Commit e13de1fd by wukaiqiang

Merge branch 'feature/sales_record_sync' of…

Merge branch 'feature/sales_record_sync' of gitlab.beecode.cn:kunlun/xyst_dinas/xyst_dinas_backend into feature/sales_record_sync
parents 5a37b463 215f5ea0
......@@ -141,12 +141,12 @@ public class BaseBusinessWarn {
String[] noticePerson = warnSetting.getPersonnel();
String message = warningCalculate.warnMessage();
try {
if (isWarning)
if (isWarning && isNotice)
notice(noticePerson, message, warnSetting.getBillId());
} catch (Exception e) {
e.printStackTrace();
}
return true;
return isWarning;
};
private WarnExeRecord createWarnExeRecord(WarnSetting warnSetting) {
......
......@@ -17,6 +17,7 @@ import com.xyst.dinas.contract.internal.scene.ContractListDefaultScene;
import com.xyst.dinas.contract.internal.service.ContractServiceImpl;
import com.xyst.dinas.contract.internal.service.ContractWarnServiceImpl;
import com.xyst.dinas.contract.listener.ContractProcessEventListener;
import com.xyst.dinas.contract.listener.ContractUpdateProcessListener;
import com.xyst.dinas.contract.query.processor.ContractPerformWarningProcessor;
import com.xyst.dinas.contract.query.processor.ContractWarnSettingProcessor;
import com.xyst.dinas.contract.service.ContractService;
......@@ -77,7 +78,7 @@ public class ContractConfiguration {
TriggerCondition triggerCondition = new TriggerCondition();
List<TriggerAction> triggerActions = new ArrayList<>();
triggerActions.add(new TriggerAction("SUBMIT","提交"));
triggerActions.add(new TriggerAction("CHANGE","变更"));
// triggerActions.add(new TriggerAction("CHANGE","变更"));
triggerCondition.setTriggerActions(triggerActions);
configuration.setTriggerCondition(triggerCondition);
//3.配置流程监听器
......@@ -129,6 +130,11 @@ public class ContractConfiguration {
return new ContractProcessEventListener();
}
@Bean(ContractConstant.CONTRACT_UPDATE_LISTENER)
public ContractUpdateProcessListener createContractUpdateProcessListener() {
return new ContractUpdateProcessListener();
}
@Bean
public ContractExpireCheckTaskRegister contractExpireCheckTaskRegister() {
return new ContractExpireCheckTaskRegister();
......
......@@ -142,7 +142,7 @@ public class ContractServiceImpl implements ContractService {
Map <String,Object> params = new HashMap();
// params.put("regionalCompanyCode", regionalCompany.getString("code"));
params.put("regionalCompanyName", regionalCompany.getString("name"));
if (needSubmitFlow(ContractConstant.BIZ_TYPE,kobject,"CHANGE")) {
if (needSubmitFlow(ContractConstant.BIZ_TYPE_UPDATE,kobject,"SUBMIT")) {
inzWorkflowService.startWorkflow("SUBMIT", ContractConstant.BIZ_TYPE_UPDATE, kobject.getString(ContractConstant.CONTRACT_NAME),kobject, params);
}
// else{
......
......@@ -31,16 +31,16 @@ public class ContractProcessEventListener implements InzBizProcessEventListener
@Override
public void afterProcessCompleted(InzBizProcessEvent event) {
if(event.getInzBizProcess().getTriggerAction().equals("SUBMIT")){
// if(event.getInzBizProcess().getTriggerAction().equals("SUBMIT")){
//自动新增合同预警条目
if(event.getInzBizProcess().getWorkflowState() == BizProcessState.DONE_WITH_AGREE.getValue()){
contractService.afterApprovedForInsert(event.getInzBizProcess().getBizDataObject());
}
}else if(event.getInzBizProcess().getTriggerAction().equals("CHANGE")){
if(event.getInzBizProcess().getWorkflowState() == BizProcessState.DONE_WITH_AGREE.getValue()){
contractService.afterApprovedForUpdate(event.getInzBizProcess().getBizDataObject());
}
}
// }else if(event.getInzBizProcess().getTriggerAction().equals("CHANGE")){
// if(event.getInzBizProcess().getWorkflowState() == BizProcessState.DONE_WITH_AGREE.getValue()){
// contractService.afterApprovedForUpdate(event.getInzBizProcess().getBizDataObject());
// }
// }
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment