Commit b82e55de by 王衍超

;

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