Commit a9dce189 by 宋祥

Merge branch 'dev-sx' of http://git.pseer.com:8800/platform/hg-smart into dev

parents cec223e3 2eb2ec26
......@@ -4,9 +4,11 @@ import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.ct.constant.HgCtConst;
import com.baosight.hggp.hg.ct.constant.HgCtSqlConst;
import com.baosight.hggp.hg.ct.domain.HGCT01;
import com.baosight.hggp.hg.ct.tools.HgCtTools;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -129,14 +131,10 @@ public class ServiceHGCT01 extends ServiceEPBase {
public EiInfo batchConfirm(EiInfo inInfo) {
try {
int successCount = 0;
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
resultRow.put(HGCT01.FIELD_STATUS, HgCtConst.HgCt01.Status.CLOSE);
resultRow.put(HGCT01.FIELD_CLOSE_TIME, DateUtils.shortDateTime());
int result = DaoUtils.update(HgCtSqlConst.HgCt01.CONFIRM, resultRow);
if (result > 0) {
successCount++;
}
List<HGCT01> fCt01s = MapUtils.toDaoEPBases(inInfo, HGCT01.class);
for (HGCT01 fCt01 : fCt01s) {
int result = HgCtTools.HgCt01.confirm(fCt01.getInternalCode());
successCount += result;
}
inInfo = this.query(inInfo);
inInfo.setMsg("操作成功!本次对[" + successCount + "]条数据确认已办成功!");
......
......@@ -2,7 +2,13 @@ package com.baosight.hggp.hg.ct.tools;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.ct.constant.HgCtConst;
import com.baosight.hggp.hg.ct.constant.HgCtSqlConst;
import com.baosight.hggp.hg.ct.domain.HGCT01;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
/**
* @author:songx
......@@ -16,17 +22,33 @@ public class HgCtTools {
* @author:songx
* @date:2024/3/25,21:04
*/
public static class JaCt00 {
public static class HgCt01 {
/**
* 写入数据库
*NotifyTools
*
* @param ct00
*/
public static void insertDb(HGCT01 ct00) {
ct00.setStatus(HgCtConst.HgCt01.Status.OPEN);
DaoUtils.insert(HGCT01.INSERT, ct00);
}
/**
* 确认已办
*
* @param internalCode
*/
public static int confirm(String internalCode) {
if (StringUtils.isBlank(internalCode)) {
return 0;
}
Map paramMap = new HashMap();
paramMap.put(HGCT01.FIELD_INTERNAL_CODE, internalCode);
paramMap.put(HGCT01.FIELD_STATUS, HgCtConst.HgCt01.Status.CLOSE);
paramMap.put(HGCT01.FIELD_CLOSE_TIME, DateUtils.shortDateTime());
return DaoUtils.update(HgCtSqlConst.HgCt01.CONFIRM, paramMap);
}
}
}
......@@ -36,7 +36,7 @@ public class HgCtUtils {
// 设置通知对象名称
User user = HGXSTools.XsUser.getByLogin(ct00.getUserEname());
ct00.setUserCname(user.getUserName());
HgCtTools.JaCt00.insertDb(ct00);
HgCtTools.HgCt01.insertDb(ct00);
}
/**
......@@ -55,7 +55,7 @@ public class HgCtUtils {
User user = HGXSTools.XsUser.getByLogin(loginName);
ct00.setUserCname(user.getUserName());
ct00.setUserEname(user.getLoginName());
HgCtTools.JaCt00.insertDb(ct00);
HgCtTools.HgCt01.insertDb(ct00);
}
} catch (Exception e) {
log.error("发送通知消息失败:{}", e.getMessage(), e);
......
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