Commit b82e55de by 王衍超

;

parent 7ef8da23
package com.xyst.dinas.biz.warn.service; package com.xyst.dinas.biz.warn.service;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
...@@ -11,6 +13,7 @@ import com.beecode.amino.core.Amino; ...@@ -11,6 +13,7 @@ import com.beecode.amino.core.Amino;
import com.beecode.bcp.type.KClass; import com.beecode.bcp.type.KClass;
import com.beecode.bcp.type.KObject; import com.beecode.bcp.type.KObject;
import com.beecode.bcp.type.json.JSONObjectUtils; import com.beecode.bcp.type.json.JSONObjectUtils;
import com.beecode.inz.common.BaseConstants;
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.JsonNode;
import com.xyst.dinas.biz.request.UpdateWarnSetting; import com.xyst.dinas.biz.request.UpdateWarnSetting;
import com.xyst.dinas.biz.warn.WarnExeRecord; import com.xyst.dinas.biz.warn.WarnExeRecord;
...@@ -32,6 +35,8 @@ public class WarningSettingServiceImpl implements IWarningSettingService{ ...@@ -32,6 +35,8 @@ public class WarningSettingServiceImpl implements IWarningSettingService{
KClass type = Amino.getApplicationMetadataContext().getBean(WarnSettingConstant.ENTITY_WARNSETTING, KClass.class); KClass type = Amino.getApplicationMetadataContext().getBean(WarnSettingConstant.ENTITY_WARNSETTING, KClass.class);
JsonNode json = JSONObjectUtils.toJson(warnSetting); JsonNode json = JSONObjectUtils.toJson(warnSetting);
KObject object = JSONObjectUtils.toObject(json, type); KObject object = JSONObjectUtils.toObject(json, type);
object.set(BaseConstants.CREATE_TIME, LocalDateTime.now());
return warnSettingDao.create(object); return warnSettingDao.create(object);
} }
......
...@@ -109,7 +109,7 @@ public class ContractServiceImpl implements ContractService { ...@@ -109,7 +109,7 @@ public class ContractServiceImpl implements ContractService {
inzWorkflowService.startWorkflow("SUBMIT", ContractConstant.BIZ_TYPE, kobject.getString(ContractConstant.CONTRACT_NAME),kobject); inzWorkflowService.startWorkflow("SUBMIT", ContractConstant.BIZ_TYPE, kobject.getString(ContractConstant.CONTRACT_NAME),kobject);
}else{ }else{
afterSubmitApproved(kobject); afterSubmitApproved(kobject);
} }
} }
//变更合同的工作流 //变更合同的工作流
......
...@@ -15,6 +15,7 @@ public class ContractProcessEventListener implements InzBizProcessEventListener ...@@ -15,6 +15,7 @@ public class ContractProcessEventListener implements InzBizProcessEventListener
@Override @Override
public void beforeProcessStarted(InzBizProcessEvent event) { public void beforeProcessStarted(InzBizProcessEvent event) {
System.out.println("beforeProcessStarted");
//do nothing //do nothing
} }
......
...@@ -139,10 +139,10 @@ public class ContractController { ...@@ -139,10 +139,10 @@ public class ContractController {
@Autowired @Autowired
private IWarningSettingService warningSettingService; private IWarningSettingService warningSettingService;
@PostMapping("/contract/test") @PostMapping("/contract/warn/fire")
public void afterApproved() { public void warnFire() {
// 合同审批通过后,自动新增砂石余量预警设置 // 合同审批通过后,自动新增砂石余量预警设置
String billType = "合同"; String billType = "合同";
UUID contractId = UUID.fromString("598A9B1B-34C7-4BFB-A846-40EDEF357752"); UUID contractId = UUID.fromString("598A9B1B-34C7-4BFB-A846-40EDEF357752");
String target = "清砂"; String target = "清砂";
...@@ -154,12 +154,6 @@ public class ContractController { ...@@ -154,12 +154,6 @@ public class ContractController {
contractBusinessWarn.setWarningCalculate(dinasCountWarningCalculate); contractBusinessWarn.setWarningCalculate(dinasCountWarningCalculate);
contractBusinessWarn.warn(); contractBusinessWarn.warn();
// WarnSettingEntity warnSetting = new WarnSettingEntity();
// warnSetting.setBillType(billType);
// warnSetting.setBillId(contractId);
// warnSetting.setTarget(dinasTypeName);
// warnSetting.setOpen(true);
// warningSettingService.insertWarnSetting(warnSetting);
} }
} }
\ No newline at end of file
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