|
|
@@ -12,8 +12,13 @@ import java.util.Map;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
+import com.yw.contract.contract.model.ContractInfo;
|
|
|
+import com.yw.contract.contract.service.ContractEntryService;
|
|
|
+import com.yw.hr.staff.service.ContractService;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.json.JSONObject;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.context.ApplicationContext;
|
|
|
|
|
|
import com.yw.bpm.flow.model.FlowModel;
|
|
|
@@ -47,7 +52,8 @@ import com.yw.eu.base.user.service.UserService;
|
|
|
import com.yw.oa.petition.action.BpmBaseAction;
|
|
|
|
|
|
public class PaymentApplyAction extends BpmBaseAction {
|
|
|
- private String startPaymentApplyUrl = "/yw/contract/paymentApply/startPaymentApply.jsp";
|
|
|
+ private static final Logger log = LoggerFactory.getLogger(PaymentApplyAction.class);
|
|
|
+ private String startPaymentApplyUrl = "/yw/contract/paymentApply/startPaymentApply.jsp";
|
|
|
private String processPaymentApplyUrl = "/yw/contract/paymentApply/processPaymentApply.jsp";
|
|
|
private String viewPaymentApplyUrl = "/yw/contract/paymentApply/viewPaymentApply.jsp";
|
|
|
private String viewPaymentApplyInfoUrl = "/yw/contract/paymentApply/viewPaymentApplyInfo.jsp";
|
|
|
@@ -57,6 +63,7 @@ public class PaymentApplyAction extends BpmBaseAction {
|
|
|
private PaymentApplyService paymentApplyService;
|
|
|
public PaymentApply paymentApply;
|
|
|
public CodeRuleService codeRuleService;
|
|
|
+ private ContractEntryService contractEntryService;
|
|
|
|
|
|
@Override
|
|
|
public void afterSourceAction(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
|
|
@@ -173,6 +180,7 @@ public class PaymentApplyAction extends BpmBaseAction {
|
|
|
private void toProcessPaymentApply() throws Exception{
|
|
|
this.getTacheFromElement();
|
|
|
paymentApplyService = this.getBean(PaymentApplyService.class, "paymentApplyService");
|
|
|
+ contractEntryService = this.getBean(ContractEntryService.class, "contractEntryService");
|
|
|
String flow_id = request.getParameter("flowInsId");
|
|
|
String formInsId = request.getParameter("formInsId");
|
|
|
if(paymentApply == null) {
|
|
|
@@ -180,6 +188,13 @@ public class PaymentApplyAction extends BpmBaseAction {
|
|
|
}
|
|
|
paymentApply.setlFormInsId(StringUtil.strToLong(formInsId));
|
|
|
paymentApply = paymentApplyService.getPaymentApply(paymentApply);
|
|
|
+ if(paymentApply.getContractId() != null && paymentApply.getContractId() > 0){
|
|
|
+ ContractInfo contractInfo = contractEntryService.toEditContractEntry(paymentApply.getContractId(), oasession);
|
|
|
+ if(contractInfo != null){
|
|
|
+ paymentApply.setContractInsId(contractInfo.getFlowInsId());
|
|
|
+ //request.setAttribute("contractInsId", contractInfo.getFlowInsId());
|
|
|
+ }
|
|
|
+ }
|
|
|
request.setAttribute("paymentApply", paymentApply);
|
|
|
request.setAttribute("flow_ins_id", flow_id);
|
|
|
String insId = paymentApply.getFlowInsId().toString();
|