Commit 451053c1 by liuyang

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

parents ff6dabc3 45b56188
...@@ -24,6 +24,7 @@ public class HGKC003 extends DaoEPBase { ...@@ -24,6 +24,7 @@ public class HGKC003 extends DaoEPBase {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; public static final String FIELD_ID = "id";
public static final String FIELD_QUALITY_ID = "qualityId"; /* 质检单ID*/
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/ public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 记录创建者*/ public static final String FIELD_CREATED_BY = "createdBy"; /* 记录创建者*/
...@@ -66,6 +67,7 @@ public class HGKC003 extends DaoEPBase { ...@@ -66,6 +67,7 @@ public class HGKC003 extends DaoEPBase {
public static final String FIELD_SUBMIT_STATUS = "submitStatus"; /* 提交状态 0未提交,1已提交*/ public static final String FIELD_SUBMIT_STATUS = "submitStatus"; /* 提交状态 0未提交,1已提交*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_QUALITY_ID = "QUALITY_ID"; /* 质检单ID*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/ public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/
...@@ -115,6 +117,7 @@ public class HGKC003 extends DaoEPBase { ...@@ -115,6 +117,7 @@ public class HGKC003 extends DaoEPBase {
public static final String UPDATE_SUBMIT_STATUS = "HGKC003.updateSubmitStatus"; public static final String UPDATE_SUBMIT_STATUS = "HGKC003.updateSubmitStatus";
private Long id = new Long(0); private Long id = new Long(0);
private Long qualityId = new Long(0); /* 质检单id*/
private String accountCode = " "; /* 企业编码*/ private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/ private String createdBy = " "; /* 记录创建者*/
...@@ -167,6 +170,10 @@ public class HGKC003 extends DaoEPBase { ...@@ -167,6 +170,10 @@ public class HGKC003 extends DaoEPBase {
eiColumn.setDescName(" "); eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QUALITY_ID);
eiColumn.setDescName("质检单id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE); eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码"); eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -1013,6 +1020,14 @@ public class HGKC003 extends DaoEPBase { ...@@ -1013,6 +1020,14 @@ public class HGKC003 extends DaoEPBase {
this.submitStatus = submitStatus; this.submitStatus = submitStatus;
} }
public Long getQualityId() {
return qualityId;
}
public void setQualityId(Long qualityId) {
this.qualityId = qualityId;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -1022,6 +1037,7 @@ public class HGKC003 extends DaoEPBase { ...@@ -1022,6 +1037,7 @@ public class HGKC003 extends DaoEPBase {
public void fromMap(Map map) { public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id)); setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setQualityId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_QUALITY_ID)), qualityId));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode)); setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
...@@ -1072,6 +1088,7 @@ public class HGKC003 extends DaoEPBase { ...@@ -1072,6 +1088,7 @@ public class HGKC003 extends DaoEPBase {
Map map = new HashMap(); Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID))); map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_QUALITY_ID, StringUtils.toString(qualityId, eiMetadata.getMeta(FIELD_QUALITY_ID)));
map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE))); map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY))); map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
......
...@@ -112,12 +112,12 @@ public class HGKC003A extends DaoEPBase { ...@@ -112,12 +112,12 @@ public class HGKC003A extends DaoEPBase {
public static final String COL_AMOUNT = "AMOUNT"; /* 金额*/ public static final String COL_AMOUNT = "AMOUNT"; /* 金额*/
public static final String COL_STORAGE_TYPE = "STORAGE_TYPE"; /* 入库类型:0:入库 1:退回*/ public static final String COL_STORAGE_TYPE = "STORAGE_TYPE"; /* 入库类型:0:入库 1:退回*/
public static final String QUERY = "hgkc003a.query"; public static final String QUERY = "HGKC003A.query";
public static final String COUNT = "hgkc003a.count"; public static final String COUNT = "HGKC003A.count";
public static final String INSERT = "hgkc003a.insert"; public static final String INSERT = "HGKC003A.insert";
public static final String UPDATE = "hgkc003a.update"; public static final String UPDATE = "HGKC003A.update";
public static final String DELETE = "hgkc003a.delete"; public static final String DELETE = "HGKC003A.delete";
public static final String BATCH_DELETE = "hgkc003a.batchDelete"; public static final String BATCH_DELETE = "HGKC003A.batchDelete";
private Long id = new Long(0); private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/ private String accountCode = " "; /* 企业编码*/
......
...@@ -7,10 +7,7 @@ import com.baosight.hggp.core.enums.DeleteFlagEnum; ...@@ -7,10 +7,7 @@ import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.kc.domain.HGKC003; import com.baosight.hggp.hg.kc.domain.HGKC003;
import com.baosight.hggp.hg.kc.utils.HGKCUtils; import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.sc.domain.HGSC003;
import com.baosight.hggp.hg.sc.domain.HGSC004A;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
......
package com.baosight.hggp.hg.kc.service; package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
...@@ -24,6 +25,7 @@ public class ServiceHGKC003B extends ServiceEPBase { ...@@ -24,6 +25,7 @@ public class ServiceHGKC003B extends ServiceEPBase {
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGKC003A.QUERY, new HGKC003A()); inInfo = super.query(inInfo, HGKC003A.QUERY, new HGKC003A());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID));
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
...@@ -33,6 +35,7 @@ public class ServiceHGKC003B extends ServiceEPBase { ...@@ -33,6 +35,7 @@ public class ServiceHGKC003B extends ServiceEPBase {
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGKC003A.QUERY, new HGKC003A()); inInfo = super.query(inInfo, HGKC003A.QUERY, new HGKC003A());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID));
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<sql id="column"> <sql id="column">
ID as "id", ID as "id",
QUALITY_ID as "qualityId", <!-- 质检单id -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 --> ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 --> CREATED_BY as "createdBy", <!-- 记录创建者 -->
...@@ -141,6 +142,9 @@ ...@@ -141,6 +142,9 @@
<isNotEmpty prepend=" AND " property="submitStatus"> <isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus# SUBMIT_STATUS = #submitStatus#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="qualityId">
QUALITY_ID = #qualityId#
</isNotEmpty>
</sql> </sql>
<sql id="idCondition"> <sql id="idCondition">
...@@ -193,6 +197,7 @@ ...@@ -193,6 +197,7 @@
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGKC003 ( INSERT INTO ${hggpSchema}.HGKC003 (
QUALITY_ID, <!-- 企业编码 -->
ACCOUNT_CODE, <!-- 企业编码 --> ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 --> CREATED_BY, <!-- 记录创建者 -->
...@@ -231,7 +236,7 @@ ...@@ -231,7 +236,7 @@
PART_SPEC, <!-- 零件规格 --> PART_SPEC, <!-- 零件规格 -->
SUBMIT_STATUS <!-- 提交状态 --> SUBMIT_STATUS <!-- 提交状态 -->
) VALUES ( ) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #qualityId#,#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #depositDate#, #depositNo#, #whCode#, #whName#, #deleteFlag#, #companyCode#, #companyName#, #depositDate#, #depositNo#, #whCode#, #whName#,
#invQty#, #invUnitWeight#, #invWeight#, #depositNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #invQty#, #invUnitWeight#, #invWeight#, #depositNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#,
#projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#,
...@@ -247,6 +252,7 @@ ...@@ -247,6 +252,7 @@
<update id="update"> <update id="update">
UPDATE ${hggpSchema}.HGKC003 UPDATE ${hggpSchema}.HGKC003
SET SET
QUALITY_ID = #qualityId#, <!-- 质检单id -->
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 --> ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 --> DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 --> CREATED_BY = #createdBy#, <!-- 记录创建者 -->
......
package com.baosight.hggp.hg.kc.tools; package com.baosight.hggp.hg.kc.tools;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant; import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.kc.domain.HGKC001; import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.domain.HGKC002; import com.baosight.hggp.hg.sc.domain.HGSC005;
import com.baosight.hggp.hg.kc.domain.HGKC003;
import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.hg.kc.domain.HGKC011;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.StringUtils; import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -129,6 +130,24 @@ public class HGKCTools { ...@@ -129,6 +130,24 @@ public class HGKCTools {
*/ */
public static class HgKc003 { public static class HgKc003 {
public static HGKC003 save(HGKC003 hgkc003){
checkSaveData(hgkc003);
hgkc003.setDepositNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PROD_DEPOSIT_NO));
DaoUtils.insert(HGKC003.INSERT,hgkc003);
return hgkc003;
}
private static void checkSaveData(HGKC003 hgkc003) {
AssertUtils.isEmpty(hgkc003.getCompanyCode(), "公司编码不能为空!");
AssertUtils.isEmpty(hgkc003.getCompanyName(), "公司名称不能为空!");
AssertUtils.isEmpty(hgkc003.getWhCode(), "仓库编码不能为空!");
AssertUtils.isEmpty(hgkc003.getWhName(), "仓库名称不能为空!");
AssertUtils.isEmpty(hgkc003.getProjCode(), "项目编号不能为空!");
AssertUtils.isEmpty(hgkc003.getProjName(), "项目名称不能为空!");
AssertUtils.isTrue(Objects.isNull(hgkc003.getQualityId())||hgkc003.getQualityId()<=0, "质检单idID不能为空!");
}
/** /**
* 锁 * 锁
* *
...@@ -170,6 +189,30 @@ public class HGKCTools { ...@@ -170,6 +189,30 @@ public class HGKCTools {
} }
/** /**
* HGKC003A 工具类
*
* @author:songx
* @date:2024/5/15,9:49
*/
public static class THGKC003A {
public static HGKC003A save(HGKC003A hgkc003a){
checkSaveData(hgkc003a);
hgkc003a.setDepositNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PROD_DEPOSIT_NO));
DaoUtils.insert(HGKC003A.INSERT,hgkc003a);
return hgkc003a;
}
private static void checkSaveData(HGKC003A hgkc003a) {
AssertUtils.isEmpty(hgkc003a.getCompanyCode(), "公司编码不能为空!");
AssertUtils.isEmpty(hgkc003a.getCompanyName(), "公司名称不能为空!");
// AssertUtils.isTrue(Objects.isNull(hgkc003.getQualityId())||hgkc003.getQualityId()<=0, "质检单idID不能为空!");
}
}
/**
* HGKC010 工具类 * HGKC010 工具类
* *
* @author:songx * @author:songx
......
...@@ -19,9 +19,6 @@ $(function () { ...@@ -19,9 +19,6 @@ $(function () {
// 查询 // 查询
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
// 选择生产任务
$("#SELECT_TASK").on("click", selectTask);
}); });
/** /**
......
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