예제 #1
0
  @SuppressWarnings("unchecked")
  @Override
  public void start(
      HttpServletRequest request,
      Map<String, String> variablesMap,
      JBPMWorkflowHistoryInfo jbpmWorkflowHistoryInfo)
      throws Exception {

    String contractid = variablesMap.get("contract_id");

    ContractInfo contractinfo = this.tableService.findEntityByID(ContractInfo.class, contractid);
    CustInfo custInfo = contractinfo.getCustId();
    // 将合同基本信息放入variablesMap
    contractInfoExtends.getContractBaseInfo(variablesMap, contractinfo, custInfo);

    Map<String, String> queryMainObjectMap = new HashMap<String, String>();

    queryMainObjectMap.clear();
    queryMainObjectMap.put("contractid", contractid);
    queryMainObjectMap.put("isnoequip", "true");
    queryMainObjectMap.put("paytype", "pay_type_out");
    queryMainObjectMap.put("noprerent", "true");
    // 设备款计划
    this.fundCommMethod.initFundFundPlan("json_payment_plan_str", variablesMap, queryMainObjectMap);

    // 资金付款明细
    queryMainObjectMap.clear();
    queryMainObjectMap.put("contractid", contractid);
    queryMainObjectMap.put("paytype", "pay_type_out");
    this.fundCommMethod.initFundFundCharge("json_pay_his_str", variablesMap, queryMainObjectMap);
  }
예제 #2
0
 @Override
 public void end(
     HttpServletRequest request,
     Map<String, String> variablesMap,
     JBPMWorkflowHistoryInfo jbpmWorkflowHistoryInfo)
     throws Exception {
   // 1.更新合同结束状态
   String contractid = variablesMap.get("contract_info.id");
   String endDate = variablesMap.get("contract_end_info.actualenddate");
   ContractInfo contract = this.tableService.findEntityByID(ContractInfo.class, contractid);
   contract.setContractStatus(AppStaticUtil.CONTRACT_TERMINATE);
   this.tableService.updateEntity(contract);
   WorkflowUtil.deleteWorkFlowConflict(this.tableService, variablesMap);
   this.contractCommService.saveContractChangeInfo(contract, variablesMap);
   FundRentAdjust adjust = new FundRentAdjust();
   this.tableService.copyAndOverrideExistedValueFromStringMap(
       variablesMap, adjust, null, true, "fund_rent_adjust");
   adjust.setDocId(variablesMap.get("docId"));
   adjust.setContractId(contract);
   DictionaryData adjustType = new DictionaryData();
   adjustType.setId("his_contract_end"); // 租金变更类型
   adjust.setAdjustType(adjustType);
   this.tableService.saveOrUpdateEntity(adjust);
   this.rentConditionData.updateContractConditionDataAndSaveDatatoHis(
       contract,
       variablesMap,
       variablesMap.get("docId"),
       "his_plan_change",
       "framework_condition",
       "json_fund_rent_plan_new_str",
       "json_fund_cash_flow_new_str",
       "",
       "",
       "json_fund_fund_charge_new_str");
 }