📄 50d874cbb115001d1425beaaf88110b5
字号:
/*******************************************************************************
* Copyright (c) 2005 Eteration A.S. and others. All rights reserved. This
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: Eteration A.S. - initial API and implementation
******************************************************************************/
package com.cost.web.struts.action.bsm;
import java.io.IOException;
import java.util.Calendar;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.hibernate.classic.Session;
import com.cost.biz.bsm.FeeOperate;
import com.cost.biz.sysm.UserCheckbiz;
import com.cost.persistence.hibernate.pojo.Order;
import com.cost.persistence.hibernate.pojo.Userinfo;
import com.cost.web.struts.form.bsm.FeeCheckForm;
import com.cost.web.util.Errorforward;
public class FeeCheckAction extends Action {
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
try {
String target = "success";
FeeCheckForm cf = (FeeCheckForm) form;
String orderNo = cf.getOrderNo();
Order order = FeeOperate.FeeView(orderNo);
Userinfo userinfo = UserCheckbiz.getUserinfo(request);
Date date = Calendar.getInstance().getTime();
if (!cf.getUpdateapply().equals(order.getDoorState().toString())) {
String canclestate = cf.getUpdateapply();
char[] x = canclestate.toCharArray();
char y = x[0];
Character z = Character.valueOf(y);
order.setDoorState(z);
}
if (!cf.getCheckstate().equals(order.getCancleState().toString())) {
if (cf.getCheckstate().equals("4")) {
char x = '4';
Character y = Character.valueOf(x);
order.setCancleState(y);
char i = '3';
Character j = Character.valueOf(i);
order.setDoorState(j);
System.out.println(order.getDoorState());
} else {
char x = '1';
Character y = Character.valueOf(x);
order.setCancleState(y);
}
}
order.setUserinfoByCheckPeople(userinfo);
order.setCheckTime(date);
FeeOperate.OrderUpdate(order);
return mapping.findForward(target);
} catch (Exception e) {
Errorforward.forwarderrorpage(request, response, 11,"error.jsp");
return null; }
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -