Commit 96f4abf0 by liuyang

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

parents 38007abe e8ce41e5
...@@ -5,8 +5,10 @@ package com.baosight.hggp.common; ...@@ -5,8 +5,10 @@ package com.baosight.hggp.common;
* @version 1.0 2024/5/21 * @version 1.0 2024/5/21
*/ */
public enum CheckTypeEnum { public enum CheckTypeEnum {
PROCESS_CHECK(1,"工序质检单"), PROCESS_CHECK(1,"工序质检单"),
POLLING_CHECK(2,"日常巡检单"); POLLING_CHECK(2,"日常巡检单"),
OUTSOURCE_CHECK(3, "委外入库单");
private Integer code; private Integer code;
......
...@@ -82,6 +82,8 @@ public class HGConstant { ...@@ -82,6 +82,8 @@ public class HGConstant {
public static final String HGZL002_CHECK_CODE = "HGZL002_CHECK_CODE"; public static final String HGZL002_CHECK_CODE = "HGZL002_CHECK_CODE";
//日常巡检 //日常巡检
public static final String HGZL003_CHECK_CODE = "HGZL003_CHECK_CODE"; public static final String HGZL003_CHECK_CODE = "HGZL003_CHECK_CODE";
// 整改通知单
public static final String HGZL004_CHECK_CODE = "HGZL004_CHECK_CODE";
//生产任务订单 //生产任务订单
public static final String PROD_TASK_NO = "PROD_TASK_NO"; public static final String PROD_TASK_NO = "PROD_TASK_NO";
//售后维修单号 //售后维修单号
......
...@@ -7,12 +7,12 @@ package com.baosight.hggp.hg.ct.constant; ...@@ -7,12 +7,12 @@ package com.baosight.hggp.hg.ct.constant;
public class HgCtConst { public class HgCtConst {
/** /**
* HPCT01 定义 * HGCT01 定义
* *
* @author:songx * @author:songx
* @date:2024/9/24,17:54 * @date:2024/9/24,17:54
*/ */
public static class HgCt01 { public static class HgCt001 {
/** /**
* 状态 * 状态
......
...@@ -10,10 +10,10 @@ public class HgCtSqlConst { ...@@ -10,10 +10,10 @@ public class HgCtSqlConst {
* @author:songx * @author:songx
* @date:2024/8/29,15:54 * @date:2024/8/29,15:54
*/ */
public static class HgCt01 { public static class HgCt001 {
// 确认 // 确认
public static final String CONFIRM = "HGCT01.confirm"; public static final String CONFIRM = "HGCT001.confirm";
} }
} }
...@@ -18,7 +18,7 @@ import java.util.Map; ...@@ -18,7 +18,7 @@ import java.util.Map;
* @version 1.0 * @version 1.0
* @history 2024-10-08 17:03:25 create * @history 2024-10-08 17:03:25 create
*/ */
public class HGCT01 extends DaoEPBase { public class HGCT001 extends DaoEPBase {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -56,11 +56,11 @@ public class HGCT01 extends DaoEPBase { ...@@ -56,11 +56,11 @@ public class HGCT01 extends DaoEPBase {
public static final String COL_FORM_PARAM = "FORM_PARAM"; /* 画面参数*/ public static final String COL_FORM_PARAM = "FORM_PARAM"; /* 画面参数*/
public static final String COL_CLOSE_TIME = "CLOSE_TIME"; /* 关闭时间*/ public static final String COL_CLOSE_TIME = "CLOSE_TIME"; /* 关闭时间*/
public static final String QUERY = "HGCT01.query"; public static final String QUERY = "HGCT001.query";
public static final String COUNT = "HGCT01.count"; public static final String COUNT = "HGCT001.count";
public static final String INSERT = "HGCT01.insert"; public static final String INSERT = "HGCT001.insert";
public static final String UPDATE = "HGCT01.update"; public static final String UPDATE = "HGCT001.update";
public static final String DELETE = "HGCT01.delete"; public static final String DELETE = "HGCT001.delete";
private String createdBy = " "; /* 记录创建者*/ private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/ private String createdName = " "; /* 记录创建名称*/
...@@ -156,7 +156,7 @@ public class HGCT01 extends DaoEPBase { ...@@ -156,7 +156,7 @@ public class HGCT01 extends DaoEPBase {
/** /**
* the constructor. * the constructor.
*/ */
public HGCT01() { public HGCT001() {
initMetaData(); initMetaData();
} }
......
...@@ -3,7 +3,7 @@ package com.baosight.hggp.hg.ct.service; ...@@ -3,7 +3,7 @@ package com.baosight.hggp.hg.ct.service;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.ct.constant.HgCtConst; import com.baosight.hggp.hg.ct.constant.HgCtConst;
import com.baosight.hggp.hg.ct.constant.HgCtSqlConst; import com.baosight.hggp.hg.ct.constant.HgCtSqlConst;
import com.baosight.hggp.hg.ct.domain.HGCT01; import com.baosight.hggp.hg.ct.domain.HGCT001;
import com.baosight.hggp.hg.ct.tools.HgCtTools; import com.baosight.hggp.hg.ct.tools.HgCtTools;
import com.baosight.hggp.util.DateUtils; import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
...@@ -25,7 +25,7 @@ import java.util.Map; ...@@ -25,7 +25,7 @@ import java.util.Map;
* @author:songx * @author:songx
* @date:2021/10/15,16:46 * @date:2021/10/15,16:46
*/ */
public class ServiceHGCT01 extends ServiceEPBase { public class ServiceHGCT001 extends ServiceEPBase {
/** /**
* 页面加载调用. * 页面加载调用.
...@@ -34,7 +34,7 @@ public class ServiceHGCT01 extends ServiceEPBase { ...@@ -34,7 +34,7 @@ public class ServiceHGCT01 extends ServiceEPBase {
*/ */
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCT01().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCT001().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败"); LogUtils.setMsg(inInfo, e, "初始化失败");
} }
...@@ -50,8 +50,8 @@ public class ServiceHGCT01 extends ServiceEPBase { ...@@ -50,8 +50,8 @@ public class ServiceHGCT01 extends ServiceEPBase {
try { try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo); Map queryMap = EiInfoUtils.getFirstRow(inInfo);
// 只看自己的通知 // 只看自己的通知
queryMap.put(HGCT01.FIELD_USER_ENAME, UserSession.getLoginName()); queryMap.put(HGCT001.FIELD_USER_ENAME, UserSession.getLoginName());
inInfo = super.query(inInfo, HGCT01.QUERY); inInfo = super.query(inInfo, HGCT001.QUERY);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询失败"); LogUtils.setMsg(inInfo, e, "查询失败");
} }
...@@ -67,11 +67,11 @@ public class ServiceHGCT01 extends ServiceEPBase { ...@@ -67,11 +67,11 @@ public class ServiceHGCT01 extends ServiceEPBase {
public EiInfo queryTodo(EiInfo inInfo) { public EiInfo queryTodo(EiInfo inInfo) {
try { try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo); Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put(HGCT01.FIELD_STATUS, HgCtConst.HgCt01.Status.OPEN); queryMap.put(HGCT001.FIELD_STATUS, HgCtConst.HgCt001.Status.OPEN);
queryMap.put(HGCT01.FIELD_USER_ENAME, UserSession.getLoginName()); queryMap.put(HGCT001.FIELD_USER_ENAME, UserSession.getLoginName());
inInfo = super.query(inInfo, HGCT01.QUERY, new HGCT01()); inInfo = super.query(inInfo, HGCT001.QUERY, new HGCT001());
// 查询总数量 // 查询总数量
List<Integer> counts = dao.query(HGCT01.COUNT, queryMap); List<Integer> counts = dao.query(HGCT001.COUNT, queryMap);
inInfo.set(EiConstant.countStr, CollectionUtils.isEmpty(counts) ? 0 : counts.get(0)); inInfo.set(EiConstant.countStr, CollectionUtils.isEmpty(counts) ? 0 : counts.get(0));
} catch (Exception e) { } catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询待办信息"); LogUtils.setMsg(inInfo, e, "查询待办信息");
...@@ -88,11 +88,11 @@ public class ServiceHGCT01 extends ServiceEPBase { ...@@ -88,11 +88,11 @@ public class ServiceHGCT01 extends ServiceEPBase {
public EiInfo queryRecord(EiInfo inInfo) { public EiInfo queryRecord(EiInfo inInfo) {
try { try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo); Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put(HGCT01.FIELD_STATUS, HgCtConst.HgCt01.Status.CLOSE); queryMap.put(HGCT001.FIELD_STATUS, HgCtConst.HgCt001.Status.CLOSE);
queryMap.put(HGCT01.FIELD_USER_ENAME, UserSession.getLoginName()); queryMap.put(HGCT001.FIELD_USER_ENAME, UserSession.getLoginName());
inInfo = super.query(inInfo, HGCT01.QUERY, new HGCT01()); inInfo = super.query(inInfo, HGCT001.QUERY, new HGCT001());
// 查询总数量 // 查询总数量
List<Integer> counts = dao.query(HGCT01.COUNT, queryMap); List<Integer> counts = dao.query(HGCT001.COUNT, queryMap);
inInfo.set(EiConstant.countStr, CollectionUtils.isEmpty(counts) ? 0 : counts.get(0)); inInfo.set(EiConstant.countStr, CollectionUtils.isEmpty(counts) ? 0 : counts.get(0));
} catch (Exception e) { } catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询已办信息"); LogUtils.setMsg(inInfo, e, "查询已办信息");
...@@ -109,13 +109,13 @@ public class ServiceHGCT01 extends ServiceEPBase { ...@@ -109,13 +109,13 @@ public class ServiceHGCT01 extends ServiceEPBase {
public EiInfo confirm(EiInfo inInfo) { public EiInfo confirm(EiInfo inInfo) {
try { try {
Map resultRow = EiInfoUtils.getFirstRow(inInfo, EiConstant.resultBlock); Map resultRow = EiInfoUtils.getFirstRow(inInfo, EiConstant.resultBlock);
if (ObjectUtils.isEmpty(resultRow.get(HGCT01.FIELD_INTERNAL_CODE))) { if (ObjectUtils.isEmpty(resultRow.get(HGCT001.FIELD_INTERNAL_CODE))) {
inInfo.setMsg("无效的待办消息"); inInfo.setMsg("无效的待办消息");
return inInfo; return inInfo;
} }
resultRow.put(HGCT01.FIELD_STATUS, HgCtConst.HgCt01.Status.CLOSE); resultRow.put(HGCT001.FIELD_STATUS, HgCtConst.HgCt001.Status.CLOSE);
resultRow.put(HGCT01.FIELD_CLOSE_TIME, DateUtils.shortDateTime()); resultRow.put(HGCT001.FIELD_CLOSE_TIME, DateUtils.shortDateTime());
DaoUtils.update(HgCtSqlConst.HgCt01.CONFIRM, resultRow); DaoUtils.update(HgCtSqlConst.HgCt001.CONFIRM, resultRow);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setMsg(inInfo, e, "确认已办失败"); LogUtils.setMsg(inInfo, e, "确认已办失败");
} }
...@@ -131,9 +131,9 @@ public class ServiceHGCT01 extends ServiceEPBase { ...@@ -131,9 +131,9 @@ public class ServiceHGCT01 extends ServiceEPBase {
public EiInfo batchConfirm(EiInfo inInfo) { public EiInfo batchConfirm(EiInfo inInfo) {
try { try {
int successCount = 0; int successCount = 0;
List<HGCT01> fCt01s = MapUtils.toDaoEPBases(inInfo, HGCT01.class); List<HGCT001> fCt01s = MapUtils.toDaoEPBases(inInfo, HGCT001.class);
for (HGCT01 fCt01 : fCt01s) { for (HGCT001 fCt01 : fCt01s) {
int result = HgCtTools.HgCt01.confirm(fCt01.getInternalCode()); int result = HgCtTools.HgCt001.confirm(fCt01.getInternalCode());
successCount += result; successCount += result;
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HGCT01"> <sqlMap namespace="HGCT001">
<sql id="column"> <sql id="column">
CREATED_BY as "createdBy", <!-- 记录创建者 --> CREATED_BY as "createdBy", <!-- 记录创建者 -->
...@@ -81,23 +81,23 @@ ...@@ -81,23 +81,23 @@
</dynamic> </dynamic>
</sql> </sql>
<select id="query" resultClass="com.baosight.hggp.hg.ct.domain.HGCT01"> <select id="query" resultClass="com.baosight.hggp.hg.ct.domain.HGCT001">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM ${hggpSchema}.HGCT01 FROM ${hggpSchema}.HGCT001
WHERE 1=1 WHERE 1=1
<include refid="customCondition"/> <include refid="customCondition"/>
<include refid="orderBy"/> <include refid="orderBy"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCT01 SELECT COUNT(*) FROM ${hggpSchema}.HGCT001
WHERE 1=1 WHERE 1=1
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGCT01 ( INSERT INTO ${hggpSchema}.HGCT001 (
CREATED_BY, <!-- 记录创建者 --> CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 --> CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 --> CREATED_TIME, <!-- 记录创建时间 -->
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
<!-- 确认 --> <!-- 确认 -->
<update id="confirm"> <update id="confirm">
UPDATE ${hggpSchema}.HGCT01 UPDATE ${hggpSchema}.HGCT001
SET SET
STATUS = #status#, STATUS = #status#,
CLOSE_TIME = #closeTime#, CLOSE_TIME = #closeTime#,
......
...@@ -3,7 +3,7 @@ package com.baosight.hggp.hg.ct.tools; ...@@ -3,7 +3,7 @@ package com.baosight.hggp.hg.ct.tools;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.ct.constant.HgCtConst; import com.baosight.hggp.hg.ct.constant.HgCtConst;
import com.baosight.hggp.hg.ct.constant.HgCtSqlConst; import com.baosight.hggp.hg.ct.constant.HgCtSqlConst;
import com.baosight.hggp.hg.ct.domain.HGCT01; import com.baosight.hggp.hg.ct.domain.HGCT001;
import com.baosight.hggp.util.DateUtils; import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.StringUtils; import com.baosight.hggp.util.StringUtils;
...@@ -22,16 +22,16 @@ public class HgCtTools { ...@@ -22,16 +22,16 @@ public class HgCtTools {
* @author:songx * @author:songx
* @date:2024/3/25,21:04 * @date:2024/3/25,21:04
*/ */
public static class HgCt01 { public static class HgCt001 {
/** /**
* 写入数据库 * 写入数据库
* *
* @param ct00 * @param ct00
*/ */
public static void insertDb(HGCT01 ct00) { public static void insertDb(HGCT001 ct00) {
ct00.setStatus(HgCtConst.HgCt01.Status.OPEN); ct00.setStatus(HgCtConst.HgCt001.Status.OPEN);
DaoUtils.insert(HGCT01.INSERT, ct00); DaoUtils.insert(HGCT001.INSERT, ct00);
} }
/** /**
...@@ -44,10 +44,10 @@ public class HgCtTools { ...@@ -44,10 +44,10 @@ public class HgCtTools {
return 0; return 0;
} }
Map paramMap = new HashMap(); Map paramMap = new HashMap();
paramMap.put(HGCT01.FIELD_INTERNAL_CODE, internalCode); paramMap.put(HGCT001.FIELD_INTERNAL_CODE, internalCode);
paramMap.put(HGCT01.FIELD_STATUS, HgCtConst.HgCt01.Status.CLOSE); paramMap.put(HGCT001.FIELD_STATUS, HgCtConst.HgCt001.Status.CLOSE);
paramMap.put(HGCT01.FIELD_CLOSE_TIME, DateUtils.shortDateTime()); paramMap.put(HGCT001.FIELD_CLOSE_TIME, DateUtils.shortDateTime());
return DaoUtils.update(HgCtSqlConst.HgCt01.CONFIRM, paramMap); return DaoUtils.update(HgCtSqlConst.HgCt001.CONFIRM, paramMap);
} }
} }
......
package com.baosight.hggp.hg.ct.utils; package com.baosight.hggp.hg.ct.utils;
import com.baosight.hggp.hg.ct.domain.HGCT01; import com.baosight.hggp.hg.ct.domain.HGCT001;
import com.baosight.hggp.hg.ct.tools.HgCtTools; import com.baosight.hggp.hg.ct.tools.HgCtTools;
import com.baosight.hggp.hg.xs.domain.User; import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
...@@ -21,14 +21,14 @@ public class HgCtUtils { ...@@ -21,14 +21,14 @@ public class HgCtUtils {
* @author:songx * @author:songx
* @date:2024/10/8,17:20 * @date:2024/10/8,17:20
*/ */
public static class HgCt01 { public static class HgCt001 {
/** /**
* 发送通知 * 发送通知
* *
* @param ct00 消息体 * @param ct00 消息体
*/ */
public static void send(HGCT01 ct00) { public static void send(HGCT001 ct00) {
AssertUtils.isNull(ct00, "待办内容不能为空"); AssertUtils.isNull(ct00, "待办内容不能为空");
AssertUtils.isEmpty(ct00.getTitle(), "待办标题不能为空"); AssertUtils.isEmpty(ct00.getTitle(), "待办标题不能为空");
AssertUtils.isEmpty(ct00.getContent(), "待办内容不能为空"); AssertUtils.isEmpty(ct00.getContent(), "待办内容不能为空");
...@@ -36,7 +36,7 @@ public class HgCtUtils { ...@@ -36,7 +36,7 @@ public class HgCtUtils {
// 设置通知对象名称 // 设置通知对象名称
User user = HGXSTools.XsUser.getByLogin(ct00.getUserEname()); User user = HGXSTools.XsUser.getByLogin(ct00.getUserEname());
ct00.setUserCname(user.getUserName()); ct00.setUserCname(user.getUserName());
HgCtTools.HgCt01.insertDb(ct00); HgCtTools.HgCt001.insertDb(ct00);
} }
/** /**
...@@ -45,7 +45,7 @@ public class HgCtUtils { ...@@ -45,7 +45,7 @@ public class HgCtUtils {
* @param ct00 消息体 * @param ct00 消息体
* @param loginNames loginNames * @param loginNames loginNames
*/ */
public static void send(HGCT01 ct00, List<String> loginNames) { public static void send(HGCT001 ct00, List<String> loginNames) {
AssertUtils.isNull(ct00, "待办内容不能为空"); AssertUtils.isNull(ct00, "待办内容不能为空");
AssertUtils.isEmpty(ct00.getTitle(), "待办标题不能为空"); AssertUtils.isEmpty(ct00.getTitle(), "待办标题不能为空");
AssertUtils.isEmpty(ct00.getContent(), "待办内容不能为空"); AssertUtils.isEmpty(ct00.getContent(), "待办内容不能为空");
...@@ -55,7 +55,7 @@ public class HgCtUtils { ...@@ -55,7 +55,7 @@ public class HgCtUtils {
User user = HGXSTools.XsUser.getByLogin(loginName); User user = HGXSTools.XsUser.getByLogin(loginName);
ct00.setUserCname(user.getUserName()); ct00.setUserCname(user.getUserName());
ct00.setUserEname(user.getLoginName()); ct00.setUserEname(user.getLoginName());
HgCtTools.HgCt01.insertDb(ct00); HgCtTools.HgCt001.insertDb(ct00);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("发送通知消息失败:{}", e.getMessage(), e); log.error("发送通知消息失败:{}", e.getMessage(), e);
......
...@@ -259,8 +259,8 @@ public class ServiceHGZL011 extends ServiceBase { ...@@ -259,8 +259,8 @@ public class ServiceHGZL011 extends ServiceBase {
DaoUtils.insert(HGKC008A.INSERT, newKc008A); DaoUtils.insert(HGKC008A.INSERT, newKc008A);
// 修改库存 // 修改库存
HGKCUtils.HgKc010.updateInv(dbKc008A.getCompanyCode(), dbKc008A.getWhCode(), HGKCUtils.HgKc010.updateInv(dbKc008A.getCompanyCode(), dbKc008A.getWhCode(),
dbKc008A.getInventCode(), newKc008A.getInvQty(), newKc008A.getInvUnitWeight(), dbKc008A.getInventCode(), newKc008A.getInvQty().negate(), newKc008A.getInvUnitWeight(),
newKc008A.getInvWeight()); newKc008A.getInvWeight().negate());
} }
/** /**
......
...@@ -251,6 +251,9 @@ public class ServiceHGZL012 extends ServiceBase { ...@@ -251,6 +251,9 @@ public class ServiceHGZL012 extends ServiceBase {
} }
// 不合格量大于0,更新委外加工 // 不合格量大于0,更新委外加工
if (fZl012.getUnQualityQty().compareTo(BigDecimal.ZERO) > 0) { if (fZl012.getUnQualityQty().compareTo(BigDecimal.ZERO) > 0) {
// 生成整改通知单
HGZLTools.THGZL004.addByHGZL012(fZl012);
// 更新委外加工
HGSCTools.Hgsc010a.updateDeliver(dbKc014A.getPcsId(), fZl012.getUnQualityQty()); HGSCTools.Hgsc010a.updateDeliver(dbKc014A.getPcsId(), fZl012.getUnQualityQty());
} }
} }
......
...@@ -11,6 +11,7 @@ import com.baosight.hggp.hg.kc.tools.HGKCTools; ...@@ -11,6 +11,7 @@ import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils; import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.zl.constant.HgZlConst; import com.baosight.hggp.hg.zl.constant.HgZlConst;
import com.baosight.hggp.hg.zl.domain.HGZL012; import com.baosight.hggp.hg.zl.domain.HGZL012;
import com.baosight.hggp.hg.zl.tools.HGZLTools;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.BeanUtils; import com.baosight.hggp.util.BeanUtils;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
......
...@@ -21,10 +21,10 @@ import com.baosight.hggp.hg.zl.domain.HGZL004A; ...@@ -21,10 +21,10 @@ import com.baosight.hggp.hg.zl.domain.HGZL004A;
import com.baosight.hggp.hg.zl.domain.HGZL011; import com.baosight.hggp.hg.zl.domain.HGZL011;
import com.baosight.hggp.hg.zl.domain.HGZL012; import com.baosight.hggp.hg.zl.domain.HGZL012;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.BeanUtils;
import com.baosight.hggp.util.DateUtils; import com.baosight.hggp.util.DateUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.BeanUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.HashMap; import java.util.HashMap;
...@@ -257,7 +257,28 @@ public class HGZLTools { ...@@ -257,7 +257,28 @@ public class HGZLTools {
DaoUtils.insert(HGZL004.INSERT, hgzl004); DaoUtils.insert(HGZL004.INSERT, hgzl004);
} }
} }
/**
* 生成整改通知单
*
* @param hgZl012
*/
public static void addByHGZL012(HGZL012 hgZl012) {
if (hgZl012.getUnQualityQty().compareTo(BigDecimal.ZERO) < 1) {
return;
}
HGZL004 newZl004 = BeanUtils.copy(hgZl012, HGZL004.class);
newZl004.setCheckId(hgZl012.getId());
newZl004.setCheckType(CheckTypeEnum.OUTSOURCE_CHECK.getCode());
newZl004.setHandleStatus(HandleStatusEnum.UNPROCESS.getCode());
newZl004.setCheckCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGZL002_CHECK_CODE));
newZl004.setCheckBy(UserSessionUtils.getLoginName());
newZl004.setCheckName(UserSessionUtils.getLoginCName());
newZl004.setProductCode(hgZl012.getInventCode());
newZl004.setProductName(hgZl012.getInventName());
DaoUtils.insert(HGZL004.INSERT, newZl004);
}
public static void deleteByCheckIds(List<Long> checkIds,CheckTypeEnum checkType){ public static void deleteByCheckIds(List<Long> checkIds,CheckTypeEnum checkType){
List<HGZL004> hgzl004List = listByCheckIds(checkIds,checkType.getCode()); List<HGZL004> hgzl004List = listByCheckIds(checkIds,checkType.getCode());
List<Long> ids = hgzl004List.stream().map(HGZL004::getId).collect(Collectors.toList()); List<Long> ids = hgzl004List.stream().map(HGZL004::getId).collect(Collectors.toList());
......
...@@ -1121,13 +1121,13 @@ ...@@ -1121,13 +1121,13 @@
} }
}); });
// 绑定查看更多 // 绑定查看更多
bandForMore('todo', 'HGCT01', 'inqu_status-0-status=open'); bandForMore('todo', 'HGCT001', 'inqu_status-0-status=open');
// 绑定刷新 // 绑定刷新
bandForRefresh('todo', refreshTodo); bandForRefresh('todo', refreshTodo);
}; };
let refreshTodo = function () { let refreshTodo = function () {
refreshService('HGCT01', 'queryTodo', drawTodo); refreshService('HGCT001', 'queryTodo', drawTodo);
}; };
// 定时刷新 // 定时刷新
...@@ -1394,13 +1394,13 @@ ...@@ -1394,13 +1394,13 @@
} }
}); });
// 绑定查看更多 // 绑定查看更多
bandForMore('record', 'HGCT01', 'inqu_status-0-status=close'); bandForMore('record', 'HGCT001', 'inqu_status-0-status=close');
// 绑定刷新 // 绑定刷新
bandForRefresh('record', refreshRecord); bandForRefresh('record', refreshRecord);
}; };
let refreshRecord = function () { let refreshRecord = function () {
refreshService('HGCT01', 'queryRecord', drawRecord); refreshService('HGCT001', 'queryRecord', drawRecord);
}; };
// 定时刷新 // 定时刷新
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<!-- 工具 --> <!-- 工具 -->
<sqlMap resource="com/baosight/hggp/hg/dm/sql/HGDM099.xml"/> <sqlMap resource="com/baosight/hggp/hg/dm/sql/HGDM099.xml"/>
<sqlMap resource="com/baosight/hggp/hg/ct/sql/HGCT01.xml"/> <sqlMap resource="com/baosight/hggp/hg/ct/sql/HGCT001.xml"/>
<!-- 工艺 --> <!-- 工艺 -->
<sqlMap resource="com/baosight/hggp/hg/sj/sql/HGSJ001.xml"/> <sqlMap resource="com/baosight/hggp/hg/sj/sql/HGSJ001.xml"/>
......
...@@ -59,7 +59,7 @@ let confirm = function () { ...@@ -59,7 +59,7 @@ let confirm = function () {
} }
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"确认已办\"操作? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"确认已办\"操作? ", {
ok: function () { ok: function () {
JSUtils.submitGridsData("result", "HGCT01", "batchConfirm", true); JSUtils.submitGridsData("result", "HGCT001", "batchConfirm", true);
} }
}); });
} }
......
...@@ -22,24 +22,24 @@ ...@@ -22,24 +22,24 @@
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="checkBy" cname="质检员" hidden="true"/> <EF:EFColumn ename="checkBy" cname="质检员" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="companyName" cname="公司名称" width="130" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="problemPic" cname="问题照片" width="90" enable="false" align="center"/>
<EF:EFColumn ename="processPic" cname="处理照片" width="90" enable="false" align="center"/>
<EF:EFColumn ename="checkCode" cname="整改单号" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="companyName" cname="公司名称" width="180" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编号" width="130" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="projCode" cname="项目编号" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="130" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="createdTime" cname="单据日期" editType="date" <EF:EFColumn ename="createdTime" cname="单据日期" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" enable="true" width="120" align="center" readOnly="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="checkCode" cname="检查单号" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="checkName" cname="质检人" width="100" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="checkName" cname="质检人" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="groupName" cname="责任部门" width="100" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="groupName" cname="责任部门" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="workName" cname="姓名" width="90" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="workName" cname="姓名" width="90" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="productName" cname="产品名称" width="90" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="productName" cname="产品名称" width="90" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="processName" cname="工序" width="100" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="processName" cname="工序" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="qualityProblem" cname="质量问题描述" width="130" align="center"/> <EF:EFColumn ename="qualityProblem" cname="质量问题描述" width="130" align="center"/>
<EF:EFColumn ename="problemPic" cname="问题照片" width="90" enable="false" align="center"/>
<EF:EFColumn ename="processPic" cname="处理照片" width="90" enable="false" align="center"/>
<EF:EFColumn ename="processSugges" cname="处理意见" width="130" align="center"/> <EF:EFColumn ename="processSugges" cname="处理意见" width="130" align="center"/>
<EF:EFColumn ename="rectificatSugges" cname="整改措施" width="130" align="center"/> <EF:EFColumn ename="rectificatSugges" cname="整改措施" width="130" align="center"/>
<EF:EFComboColumn ename="handleStatus" cname="处理状态" width="80" align="center" enable="false" <EF:EFComboColumn ename="handleStatus" cname="处理状态" width="80" align="center" enable="false"
......
...@@ -277,7 +277,8 @@ function currShortDate() { ...@@ -277,7 +277,8 @@ function currShortDate() {
const year = date.getFullYear(); const year = date.getFullYear();
const month = date.getMonth() + 1; // 月份从0开始,需要加1 const month = date.getMonth() + 1; // 月份从0开始,需要加1
const day = date.getDate(); const day = date.getDate();
return year + (month < 10 ? '0' + month : month.toString()) + (day < 10 ? '0' + day : day); return year.toString() + (month < 10 ? '0' + month : month.toString())
+ (day < 10 ? '0' + day : day.toString());
} }
/** /**
...@@ -289,7 +290,7 @@ function currShortMonth(getYear) { ...@@ -289,7 +290,7 @@ function currShortMonth(getYear) {
const date = new Date(getYear); const date = new Date(getYear);
const year = date.getFullYear(); const year = date.getFullYear();
const month = date.getMonth() + 1; // 月份从0开始,需要加1 const month = date.getMonth() + 1; // 月份从0开始,需要加1
return year + (month < 10 ? '0' + month : month); return year.toString() + (month < 10 ? '0' + month : month.toString());
} }
/** /**
......
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