|
|
|
@@ -2,6 +2,7 @@ package com.iformall.flowable; |
|
|
|
|
|
|
|
import com.iformall.enums.EnumRentContractAppStatus; |
|
|
|
import com.iformall.service.WxFlowService; |
|
|
|
import com.iformall.service.WxPropertyContractService; |
|
|
|
import com.iformall.service.impl.WxFlowServiceImpl; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.flowable.engine.delegate.TaskListener; |
|
|
|
@@ -13,24 +14,31 @@ import java.util.Map; |
|
|
|
|
|
|
|
/** |
|
|
|
* 合同审批完成,修改状态 |
|
|
|
* |
|
|
|
*/ |
|
|
|
@Component(value="contractTaskFinishListener") |
|
|
|
public class ContractTaskFinishHandler implements TaskListener { |
|
|
|
@Autowired |
|
|
|
private WxFlowService wxFlowService; |
|
|
|
@Autowired |
|
|
|
private WxPropertyContractService wxPropertyContractService; |
|
|
|
|
|
|
|
@Override |
|
|
|
public void notify(DelegateTask delegateTask) { |
|
|
|
Long businessId = (Long)delegateTask.getVariable("businessId"); |
|
|
|
List<Map<String,String>> variables = (List)delegateTask.getVariable("variables"); |
|
|
|
Integer flowType = (Integer)delegateTask.getVariable("flowType"); |
|
|
|
|
|
|
|
Integer contractType = 0; |
|
|
|
String str = WxFlowServiceImpl.getVariableByKey(variables,"contractType"); |
|
|
|
if(StringUtils.isNotBlank(str)){ |
|
|
|
contractType = Integer.parseInt(str); |
|
|
|
} |
|
|
|
wxFlowService.updateBusinessStatus(businessId,flowType,contractType,EnumRentContractAppStatus.FINISH.getCode()); |
|
|
|
// Long businessId = (Long)delegateTask.getVariable("businessId"); |
|
|
|
// List<Map<String,String>> variables = (List)delegateTask.getVariable("variables"); |
|
|
|
// Integer flowType = (Integer)delegateTask.getVariable("flowType"); |
|
|
|
// |
|
|
|
// Integer contractType = 0; |
|
|
|
// String str = WxFlowServiceImpl.getVariableByKey(variables,"contractType"); |
|
|
|
// if(StringUtils.isNotBlank(str)){ |
|
|
|
// contractType = Integer.parseInt(str); |
|
|
|
// |
|
|
|
// if(3==contractType){ |
|
|
|
// wxPropertyContractService.updatePropertyContractStatus(businessId); |
|
|
|
// } |
|
|
|
// } |
|
|
|
// wxFlowService.updateBusinessStatus(businessId,flowType,contractType,EnumRentContractAppStatus.FINISH.getCode()); |
|
|
|
} |
|
|
|
|
|
|
|
} |