Commit fc6acfbd by 宋祥

Merge branch 'dev' of http://129.211.46.84:8800/platform/hg-smart into dev-sx

parents ffe11036 3f96edd4
...@@ -122,7 +122,7 @@ public enum DdynamicEnum { ...@@ -122,7 +122,7 @@ public enum DdynamicEnum {
* 用途:存货档案下拉框,带id名称等信息 * 用途:存货档案下拉框,带id名称等信息
* 编写: * 编写:
*/ */
PRODUCT_BLOCK_ID("product_block_id","inventCode","inventName","id","inventType","length","width","thick","inventTypeDetail", "spec","HGPZ005.queryProductComboBox"), PRODUCT_BLOCK_ID("product_block_id","inventCode","inventName","id","inventType","length","width","thick","inventTypeDetail", "spec","inventSource","HGPZ005.queryProductComboBox"),
/** /**
* 模块:存货档案(ALL) * 模块:存货档案(ALL)
* 用途:存货档案下拉框 * 用途:存货档案下拉框
......
...@@ -344,6 +344,19 @@ public class HGConstant { ...@@ -344,6 +344,19 @@ public class HGConstant {
/** /**
* *
* 产品来源
* @author:jhs
* @date:2024/10/25,15:18
*/
public static class InventSource {
// 加工
public static final Integer JG = 1;
// 外购
public static final Integer WG = 2;
}
/**
*
* 出库单数据来源 * 出库单数据来源
* @author:songx * @author:songx
* @date:2024/5/15,15:18 * @date:2024/5/15,15:18
......
...@@ -2,18 +2,17 @@ package com.baosight.hggp.hg.kc.service; ...@@ -2,18 +2,17 @@ package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeDetailEnum; import com.baosight.hggp.core.constant.CommonConstant;
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.kc.domain.*; import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.domain.HGKC007; import com.baosight.hggp.hg.kc.domain.HGKC007;
import com.baosight.hggp.hg.kc.domain.HGKC007A; import com.baosight.hggp.hg.kc.domain.HGKC007A;
import com.baosight.hggp.hg.kc.tools.HGKCTools; import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils; import com.baosight.hggp.hg.sb.domain.HGSB001;
import com.baosight.hggp.hg.pz.domain.HGPZ004; import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
...@@ -23,7 +22,6 @@ import com.baosight.iplat4j.core.ei.EiConstant; ...@@ -23,7 +22,6 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.*; import java.util.*;
...@@ -44,25 +42,24 @@ public class ServiceHGKC007A extends ServiceBase { ...@@ -44,25 +42,24 @@ public class ServiceHGKC007A extends ServiceBase {
@Override @Override
@OperationLogAnnotation(operModul = "其他出库明细", operType = "查询", operDesc = "初始化") @OperationLogAnnotation(operModul = "其他出库明细", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = super.initLoad(inInfo, new HGKC007A());
try { try {
String whCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC007A.FIELD_WH_CODE); EiInfoUtils.addBlock(outInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
String companyCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC007A.FIELD_COMPANY_CODE); List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
Map map = new HashMap(); CommonMethod.initBlock(outInfo,
map.put(HGKC007A.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
map.put(HGKC007A.FIELD_WH_CODE, whCode);
map.put(HGKC007A.FIELD_COMPANY_CODE, companyCode);
map.put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour());
CommonMethod.initBlock(inInfo,
Arrays.asList( Arrays.asList(
DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID, DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,
DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID, DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,
DdynamicEnum.SPEC_BOX_BLOCK_ID),map,false DdynamicEnum.SPEC_BOX_BLOCK_ID),
); new HashMap<String,Object>(){{
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC007A().eiMetadata); put(HGSB001.FIELD_COMPANY_CODES,roleCompanyCode);
} catch (PlatException e) { put(HGKC013A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); }}, false);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC007A().eiMetadata);
}catch (Exception e){
LogUtils.setDetailMsg(outInfo, e, "初始化失败");
} }
return inInfo; return outInfo;
} }
/** /**
......
...@@ -48,6 +48,7 @@ public class HGPZ005 extends DaoEPBase { ...@@ -48,6 +48,7 @@ public class HGPZ005 extends DaoEPBase {
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/ public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/ public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String FIELD_FLOW_ID = "flowId"; public static final String FIELD_FLOW_ID = "flowId";
public static final String FIELD_INVENT_SOURCE = "inventSource"; /* 物料来源 1加工 2外购*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 帐套编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 帐套编码*/
...@@ -111,6 +112,7 @@ public class HGPZ005 extends DaoEPBase { ...@@ -111,6 +112,7 @@ public class HGPZ005 extends DaoEPBase {
private String updatedTime = " "; /* 更新时间*/ private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/ private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
private Long flowId = new Long(0); /*工艺流程ID*/ private Long flowId = new Long(0); /*工艺流程ID*/
private Integer inventSource; /* 物料来源 1加工 2外购*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -223,6 +225,10 @@ public class HGPZ005 extends DaoEPBase { ...@@ -223,6 +225,10 @@ public class HGPZ005 extends DaoEPBase {
eiColumn.setDescName("存货类型明细"); eiColumn.setDescName("存货类型明细");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_SOURCE);
eiColumn.setDescName("物料来源 1加工 2外购");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -585,6 +591,14 @@ public class HGPZ005 extends DaoEPBase { ...@@ -585,6 +591,14 @@ public class HGPZ005 extends DaoEPBase {
this.inventTypeDetail = inventTypeDetail; this.inventTypeDetail = inventTypeDetail;
} }
public Integer getInventSource() {
return inventSource;
}
public void setInventSource(Integer inventSource) {
this.inventSource = inventSource;
}
/** /**
* 用于材料计划对比物料数据库是否存在不同,存在时就新录入一条 * 用于材料计划对比物料数据库是否存在不同,存在时就新录入一条
* @param o * @param o
...@@ -653,6 +667,7 @@ public class HGPZ005 extends DaoEPBase { ...@@ -653,6 +667,7 @@ public class HGPZ005 extends DaoEPBase {
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag)); setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setFlowId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_FLOW_ID)), flowId)); setFlowId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_FLOW_ID)), flowId));
setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail)); setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
setInventSource(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_SOURCE)), inventSource));
} }
/** /**
...@@ -685,6 +700,7 @@ public class HGPZ005 extends DaoEPBase { ...@@ -685,6 +700,7 @@ public class HGPZ005 extends DaoEPBase {
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG))); map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_FLOW_ID, StringUtils.toString(flowId, eiMetadata.getMeta(FIELD_FLOW_ID))); map.put(FIELD_FLOW_ID, StringUtils.toString(flowId, eiMetadata.getMeta(FIELD_FLOW_ID)));
map.put(FIELD_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL))); map.put(FIELD_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
map.put(FIELD_INVENT_SOURCE, StringUtils.toString(inventSource, eiMetadata.getMeta(FIELD_INVENT_SOURCE)));
return map; return map;
} }
......
...@@ -8,6 +8,7 @@ import com.baosight.hggp.core.dao.DaoUtils; ...@@ -8,6 +8,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW002; import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.pz.domain.HGPZ002; import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
...@@ -205,7 +206,7 @@ public class ServiceHGPZ002 extends ServiceBase { ...@@ -205,7 +206,7 @@ public class ServiceHGPZ002 extends ServiceBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<String> custCodes = resultRows.stream().map(row -> row.get(HGPZ002.FIELD_CUST_CODE).toString()).collect(Collectors.toList()); List<String> custCodes = resultRows.stream().map(row -> row.get(HGPZ002.FIELD_CUST_CODE).toString()).collect(Collectors.toList());
List<HGCW002> hgcw002List = queryCustCode(custCodes); List<HGSC001> hgsc001List = queryCustCode(custCodes);
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HGPZ002 hgpz002 = new HGPZ002(); HGPZ002 hgpz002 = new HGPZ002();
hgpz002.fromMap(resultRow); hgpz002.fromMap(resultRow);
...@@ -214,26 +215,28 @@ public class ServiceHGPZ002 extends ServiceBase { ...@@ -214,26 +215,28 @@ public class ServiceHGPZ002 extends ServiceBase {
if (count > 0) { if (count > 0) {
//throw new PlatException(String.format("企业[%s]已关联用户,请先解除用户", hgpz002.getAccountName())); //throw new PlatException(String.format("企业[%s]已关联用户,请先解除用户", hgpz002.getAccountName()));
} }
List<HGCW002> hgcw002s =hgcw002List.stream().filter(hgcw002 -> hgcw002.getPartyA().equals(hgpz002.getCustCode())).collect(Collectors.toList()); List<HGSC001> hgcw002s =hgsc001List.stream().filter(hgsc001 ->
AssertUtils.isNotEmpty(hgcw002s, String.format("客户[%s]已关联业务,请先解除业务", hgpz002.getCustName())); hgsc001.getSubcontractCode().equals(hgpz002.getCustCode())||
hgsc001.getGenralContractCode().equals(hgpz002.getCustCode())
).collect(Collectors.toList());
AssertUtils.isNotEmpty(hgcw002s, String.format("客户[%s]已关联业务,无法删除", hgpz002.getCustName()));
DaoUtils.update(HGPZ002.DELETE, hgpz002); DaoUtils.update(HGPZ002.DELETE, hgpz002);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败"); LogUtils.setDetailMsg(inInfo, e, "删除失败");
} }
return inInfo; return inInfo;
} }
public List<HGCW002> queryCustCode(List<String> custCodes){ public List<HGSC001> queryCustCode(List<String> custCodes){
List<HGCW002> hgcw002List = DaoBase.getInstance().query(HGCW002.QUERY, List<HGSC001> hgsc001List = DaoBase.getInstance().query(HGSC001.QUERY,
new HashMap<String,Object>(){{ new HashMap<String,Object>(){{
put("partyA", custCodes); put("custCodes", custCodes);
put("partyB", custCodes);
}}); }});
return hgcw002List; return hgsc001List;
} }
} }
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
UPDATED_NAME as "updatedName", <!-- 更新人名称 --> UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 --> DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
FLOW_ID as "flowId" FLOW_ID as "flowId",
INVENT_SOURCE as "inventSource" <!-- 物料来源 1加工 2外购 -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
<!-- 存货档案去除权限限制 <!-- 存货档案去除权限限制
...@@ -131,6 +132,9 @@ ...@@ -131,6 +132,9 @@
<isNotEmpty prepend=" AND " property="processCode"> <isNotEmpty prepend=" AND " property="processCode">
INVENT_CODE IN (SELECT INVENT_CODE FROM ${hggpSchema}.HGPZ005A WHERE PROCESS_CODE = #processCode#) INVENT_CODE IN (SELECT INVENT_CODE FROM ${hggpSchema}.HGPZ005A WHERE PROCESS_CODE = #processCode#)
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventSource">
INVENT_SOURCE = #inventSource#
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HGPZ005"> <select id="query" parameterClass="java.util.HashMap" resultClass="HGPZ005">
...@@ -178,9 +182,10 @@ ...@@ -178,9 +182,10 @@
UPDATED_NAME, <!-- 更新人名称 --> UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 --> UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 --> DELETE_FLAG, <!-- 是否删除0.否1.是 -->
FLOW_ID FLOW_ID,
INVENT_SOURCE
) )
VALUES (#id#, #accountCode#, #depCode#, #inventType#, #inventTypeDetail#, #inventCode#, #inventName#, #spec#, #length#, #width#, #thick#, #material#, #coefficient#, #unit#, #status#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#,#flowId#) VALUES (#id#, #accountCode#, #depCode#, #inventType#, #inventTypeDetail#, #inventCode#, #inventName#, #spec#, #length#, #width#, #thick#, #material#, #coefficient#, #unit#, #status#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#,#flowId#,#inventSource#)
<selectKey resultClass="java.lang.Long" keyProperty="id"> <selectKey resultClass="java.lang.Long" keyProperty="id">
SELECT MAX(ID) FROM ${hggpSchema}.HGPZ005 SELECT MAX(ID) FROM ${hggpSchema}.HGPZ005
</selectKey> </selectKey>
...@@ -214,7 +219,8 @@ ...@@ -214,7 +219,8 @@
UPDATED_NAME = #updatedName#, <!-- 更新人名称 --> UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 --> UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 --> DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
FLOW_ID = #flowId# FLOW_ID = #flowId#,
INVENT_SOURCE = #inventSource#
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
...@@ -266,7 +272,8 @@ ...@@ -266,7 +272,8 @@
ifnull(THICK,0) as "thick", <!-- 厚 --> ifnull(THICK,0) as "thick", <!-- 厚 -->
STATUS as "status", STATUS as "status",
ifnull(COEFFICIENT,0) as "coefficient", <!-- 系数 --> ifnull(COEFFICIENT,0) as "coefficient", <!-- 系数 -->
INVENT_TYPE_DETAIL as "inventTypeDetail" INVENT_TYPE_DETAIL as "inventTypeDetail",
INVENT_SOURCE as "inventSource" <!-- 物料来源 1加工 2外购 -->
FROM ${hggpSchema}.HGPZ005 FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
...@@ -284,7 +291,7 @@ ...@@ -284,7 +291,7 @@
ORDER BY INVENT_CODE ORDER BY INVENT_CODE
</select> </select>
<select id="queryProductComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryProductComboBox" parameterClass="java.util.HashMap" resultClass="HGPZ005">
SELECT DISTINCT SELECT DISTINCT
a.ID as "id", a.ID as "id",
a.INVENT_TYPE as "inventType", a.INVENT_TYPE as "inventType",
...@@ -295,7 +302,8 @@ ...@@ -295,7 +302,8 @@
a.THICK as "thick", <!-- 厚 --> a.THICK as "thick", <!-- 厚 -->
b.PAR_INVENT_TYPE as "parInventType", b.PAR_INVENT_TYPE as "parInventType",
b.INVENT_TYPE_DETAIL as "inventTypeDetail", b.INVENT_TYPE_DETAIL as "inventTypeDetail",
a.SPEC as "spec" <!-- 规格 --> a.SPEC as "spec", <!-- 规格 -->
a.INVENT_SOURCE as "inventSource" <!-- 物料来源 1加工 2外购 -->
FROM ${hggpSchema}.HGPZ005 a FROM ${hggpSchema}.HGPZ005 a
left join ${hggpSchema}.hgpz004 b on a.INVENT_TYPE = b.INVENT_TYPE and b.STATUS=1 and b.DELETE_FLAG = 0 left join ${hggpSchema}.hgpz004 b on a.INVENT_TYPE = b.INVENT_TYPE and b.STATUS=1 and b.DELETE_FLAG = 0
WHERE a.DELETE_FLAG = 0 WHERE a.DELETE_FLAG = 0
...@@ -346,7 +354,8 @@ ...@@ -346,7 +354,8 @@
THICK AS "thick" , <!-- 厚 --> THICK AS "thick" , <!-- 厚 -->
COEFFICIENT AS "coefficient", <!-- 系数 --> COEFFICIENT AS "coefficient", <!-- 系数 -->
ID AS "id", ID AS "id",
INVENT_TYPE_DETAIL as "inventTypeDetail" INVENT_TYPE_DETAIL as "inventTypeDetail",
INVENT_SOURCE as "inventSource" <!-- 物料来源 1加工 2外购 -->
FROM ${hggpSchema}.HGPZ005 FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
AND STATUS = 1 AND STATUS = 1
......
...@@ -63,6 +63,8 @@ public class HGSC004A extends DaoEPBase { ...@@ -63,6 +63,8 @@ public class HGSC004A extends DaoEPBase {
public static final String FIELD_UNIT = "unit"; /* 单位*/ public static final String FIELD_UNIT = "unit"; /* 单位*/
public static final String FIELD_proj_code_prefix = "projCodePrefix"; /* 项目编码前缀*/ public static final String FIELD_proj_code_prefix = "projCodePrefix"; /* 项目编码前缀*/
public static final String FIELD_proj_name_prefix = "projNamePrefix"; /* 项目名称前缀*/ public static final String FIELD_proj_name_prefix = "projNamePrefix"; /* 项目名称前缀*/
public static final String FIELD_invent_source = "inventSource"; /* 物料来源 1加工 2外购*/
public static final String COL_id = "id"; /* 主键*/ public static final String COL_id = "id"; /* 主键*/
public static final String COL_company_code = "company_code"; /* 公司编码(预留)*/ public static final String COL_company_code = "company_code"; /* 公司编码(预留)*/
...@@ -160,6 +162,7 @@ public class HGSC004A extends DaoEPBase { ...@@ -160,6 +162,7 @@ public class HGSC004A extends DaoEPBase {
private String updatedBy = " "; /* 更新人*/ private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 修改人名称*/ private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 更新时间*/ private String updatedTime = " "; /* 更新时间*/
private Integer inventSource; /* 物料来源 1加工 2外购*/
@ExcelAnno(index = 4) @ExcelAnno(index = 4)
private String material = " "; /* 材质*/ private String material = " "; /* 材质*/
@ExcelAnno(index = 11) @ExcelAnno(index = 11)
...@@ -400,6 +403,10 @@ public class HGSC004A extends DaoEPBase { ...@@ -400,6 +403,10 @@ public class HGSC004A extends DaoEPBase {
eiColumn = new EiColumn(FIELD_proj_name_prefix); eiColumn = new EiColumn(FIELD_proj_name_prefix);
eiColumn.setDescName("项目名称缩写"); eiColumn.setDescName("项目名称缩写");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_invent_source);
eiColumn.setDescName("物料来源 1加工 2外购");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -959,6 +966,14 @@ public class HGSC004A extends DaoEPBase { ...@@ -959,6 +966,14 @@ public class HGSC004A extends DaoEPBase {
this.projNamePrefix = projNamePrefix; this.projNamePrefix = projNamePrefix;
} }
public Integer getInventSource() {
return inventSource;
}
public void setInventSource(Integer inventSource) {
this.inventSource = inventSource;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -1007,6 +1022,7 @@ public class HGSC004A extends DaoEPBase { ...@@ -1007,6 +1022,7 @@ public class HGSC004A extends DaoEPBase {
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit)); setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setProjCodePrefix(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_code_prefix)), projCodePrefix)); setProjCodePrefix(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_code_prefix)), projCodePrefix));
setProjNamePrefix(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_name_prefix)), projNamePrefix)); setProjNamePrefix(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_name_prefix)), projNamePrefix));
setInventSource(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_invent_source)), inventSource));
} }
/** /**
...@@ -1056,6 +1072,7 @@ public class HGSC004A extends DaoEPBase { ...@@ -1056,6 +1072,7 @@ public class HGSC004A extends DaoEPBase {
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT))); map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
map.put(FIELD_proj_code_prefix, StringUtils.toString(projCodePrefix, eiMetadata.getMeta(FIELD_proj_code_prefix))); map.put(FIELD_proj_code_prefix, StringUtils.toString(projCodePrefix, eiMetadata.getMeta(FIELD_proj_code_prefix)));
map.put(FIELD_proj_name_prefix, StringUtils.toString(projNamePrefix, eiMetadata.getMeta(FIELD_proj_name_prefix))); map.put(FIELD_proj_name_prefix, StringUtils.toString(projNamePrefix, eiMetadata.getMeta(FIELD_proj_name_prefix)));
map.put(FIELD_invent_source, StringUtils.toString(inventSource, eiMetadata.getMeta(FIELD_invent_source)));
return map; return map;
} }
} }
...@@ -54,6 +54,7 @@ public class HGSC004B extends DaoEPBase { ...@@ -54,6 +54,7 @@ public class HGSC004B extends DaoEPBase {
public static final String FIELD_updated_by = "updatedBy"; /* 更新人*/ public static final String FIELD_updated_by = "updatedBy"; /* 更新人*/
public static final String FIELD_updated_name = "updatedName"; /* 修改人名称*/ public static final String FIELD_updated_name = "updatedName"; /* 修改人名称*/
public static final String FIELD_updated_time = "updatedTime"; /* 更新时间*/ public static final String FIELD_updated_time = "updatedTime"; /* 更新时间*/
public static final String FIELD_invent_source = "inventSource"; /* 物料来源 1加工 2外购*/
public static final String COL_id = "id"; /* 主键*/ public static final String COL_id = "id"; /* 主键*/
public static final String COL_material_detail_id = "material_detail_id"; /* 物料明细id*/ public static final String COL_material_detail_id = "material_detail_id"; /* 物料明细id*/
...@@ -126,6 +127,7 @@ public class HGSC004B extends DaoEPBase { ...@@ -126,6 +127,7 @@ public class HGSC004B extends DaoEPBase {
private String updatedBy = " "; /* 更新人*/ private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 修改人名称*/ private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 更新时间*/ private String updatedTime = " "; /* 更新时间*/
private Integer inventSource; /* 物料来源 1加工 2外购*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -319,7 +321,9 @@ public class HGSC004B extends DaoEPBase { ...@@ -319,7 +321,9 @@ public class HGSC004B extends DaoEPBase {
eiColumn.setDescName("更新时间"); eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_invent_source);
eiColumn.setDescName("物料来源 1加工 2外购");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -793,7 +797,13 @@ public class HGSC004B extends DaoEPBase { ...@@ -793,7 +797,13 @@ public class HGSC004B extends DaoEPBase {
public void setThick(BigDecimal thick) { public void setThick(BigDecimal thick) {
this.thick = thick; this.thick = thick;
} }
public Integer getInventSource() {
return inventSource;
}
public void setInventSource(Integer inventSource) {
this.inventSource = inventSource;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -834,6 +844,7 @@ public class HGSC004B extends DaoEPBase { ...@@ -834,6 +844,7 @@ public class HGSC004B extends DaoEPBase {
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_length)), length)); setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_length)), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_width)), width)); setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_width)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_thick)), thick)); setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_thick)), thick));
setInventSource(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_invent_source)), inventSource));
} }
/** /**
...@@ -873,6 +884,7 @@ public class HGSC004B extends DaoEPBase { ...@@ -873,6 +884,7 @@ public class HGSC004B extends DaoEPBase {
map.put(FIELD_length, StringUtils.toString(length, eiMetadata.getMeta(FIELD_length))); map.put(FIELD_length, StringUtils.toString(length, eiMetadata.getMeta(FIELD_length)));
map.put(FIELD_width, StringUtils.toString(width, eiMetadata.getMeta(FIELD_width))); map.put(FIELD_width, StringUtils.toString(width, eiMetadata.getMeta(FIELD_width)));
map.put(FIELD_thick, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_thick))); map.put(FIELD_thick, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_thick)));
map.put(FIELD_invent_source, StringUtils.toString(inventSource, eiMetadata.getMeta(FIELD_invent_source)));
return map; return map;
} }
......
...@@ -292,6 +292,8 @@ public class ServiceHGSC004A extends ServiceBase { ...@@ -292,6 +292,8 @@ public class ServiceHGSC004A extends ServiceBase {
// 全部提交后,发送计划 // 全部提交后,发送计划
Map<String,Object> mapA = new HashMap<>(); Map<String,Object> mapA = new HashMap<>();
mapA.put("materialId",hgsc004.getId()); mapA.put("materialId",hgsc004.getId());
//加工的才生成生产计划
mapA.put("inventSource", HGConstant.InventSource.JG);
hgsc004AList = dao.query(HGSC004A.QUERY_BY_MATERIAL_ID,mapA, 0, -999999); hgsc004AList = dao.query(HGSC004A.QUERY_BY_MATERIAL_ID,mapA, 0, -999999);
List<HGSC005A> hgsc005AList = new LinkedList<>(); List<HGSC005A> hgsc005AList = new LinkedList<>();
for(HGSC004A hgsc004A : hgsc004AList){ for(HGSC004A hgsc004A : hgsc004AList){
...@@ -337,12 +339,19 @@ public class ServiceHGSC004A extends ServiceBase { ...@@ -337,12 +339,19 @@ public class ServiceHGSC004A extends ServiceBase {
delHgsc005a.setTechFlowId(delHgpz005.getFlowId()); delHgsc005a.setTechFlowId(delHgpz005.getFlowId());
} }
HGSCTools.THGSC005A.delete(delHgsc005a); HGSCTools.THGSC005A.delete(delHgsc005a);
if(hgsc004A.getInventSource().intValue() == HGConstant.InventSource.JG){
//变更生产计划 //变更生产计划
HGSCTools.THGSC005A.update(hgsc005a); HGSCTools.THGSC005A.update(hgsc005a);
}else{ }else{
//如果是外购需要删除生产计划
HGSCTools.THGSC005A.delete(hgsc005a);
}
}else{
if(hgsc004A.getInventSource().intValue() == HGConstant.InventSource.JG){
hgsc005AList.add(hgsc005a); hgsc005AList.add(hgsc005a);
} }
} }
}
if(hgsc005AList != null && !hgsc005AList.isEmpty()){ if(hgsc005AList != null && !hgsc005AList.isEmpty()){
HGSCTools.THGSC005A.saveList(hgsc005AList); HGSCTools.THGSC005A.saveList(hgsc005AList);
} }
...@@ -420,7 +429,7 @@ public class ServiceHGSC004A extends ServiceBase { ...@@ -420,7 +429,7 @@ public class ServiceHGSC004A extends ServiceBase {
try { try {
List<DdynamicEnum> list = new ArrayList<>(); List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.PRODUCT_BLOCK_ID); list.add(DdynamicEnum.PRODUCT_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false); CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), true);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询存货档案失败"); LogUtils.setDetailMsg(inInfo, e, "查询存货档案失败");
} }
......
package com.baosight.hggp.hg.sc.service; package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.sc.domain.HGSC002; import com.baosight.hggp.hg.sc.domain.HGSC002;
import com.baosight.hggp.hg.sc.domain.HGSC008; import com.baosight.hggp.hg.sc.domain.HGSC008;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.sc.util.HgScUtils; import com.baosight.hggp.hg.sc.util.HgScUtils;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.*;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.ObjectUtils;
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;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
...@@ -73,6 +72,32 @@ public class ServiceHGSC008 extends ServiceEPBase { ...@@ -73,6 +72,32 @@ public class ServiceHGSC008 extends ServiceEPBase {
} }
return inInfo; return inInfo;
} }
/**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产报工单", operType = "修改", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGSC008 hgsc008 = new HGSC008();
hgsc008.fromMap(resultRow);
AssertUtils.isNull(hgsc008.getId(), "报工单id不能为空");
DaoUtils.update(hgsc008.UPDATE, hgsc008);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
} }
...@@ -44,7 +44,7 @@ public class ServiceHGSC010A extends ServiceEPBase { ...@@ -44,7 +44,7 @@ public class ServiceHGSC010A extends ServiceEPBase {
Arrays.asList(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID), Arrays.asList(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID),
new HashMap<String, Object>(){{ new HashMap<String, Object>(){{
put(HGPZ005.FIELD_STATUS,1); put(HGPZ005.FIELD_STATUS,1);
put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, Arrays.asList(InventTypeDetailEnum.COMPONENT.getCode(),InventTypeDetailEnum.RAW.getCode())); /*put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, Arrays.asList(InventTypeDetailEnum.COMPONENT.getCode(),InventTypeDetailEnum.RAW.getCode()));*/
}}, false); }}, false);
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class); EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC010A().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC010A().eiMetadata);
......
...@@ -49,7 +49,7 @@ public class ServiceHGSC010B extends ServiceEPBase { ...@@ -49,7 +49,7 @@ public class ServiceHGSC010B extends ServiceEPBase {
Arrays.asList(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID), Arrays.asList(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID),
new HashMap<String, Object>(){{ new HashMap<String, Object>(){{
put(HGPZ005.FIELD_STATUS,1); put(HGPZ005.FIELD_STATUS,1);
put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, Arrays.asList(InventTypeDetailEnum.COMPONENT.getCode(),InventTypeDetailEnum.RAW.getCode())); //put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, Arrays.asList(InventTypeDetailEnum.COMPONENT.getCode(),InventTypeDetailEnum.RAW.getCode()));
}}, false); }}, false);
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class); EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC010B().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC010B().eiMetadata);
......
...@@ -40,7 +40,7 @@ public class ServiceHGSC010C extends ServiceEPBase { ...@@ -40,7 +40,7 @@ public class ServiceHGSC010C extends ServiceEPBase {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour()); inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour());
inInfo = super.query(inInfo, HGYX001C.QUERY, new HGYX001C()); inInfo = super.query(inInfo, HGYX001C.QUERY, new HGYX001C());
Map<String, Object> queryMap = new HashMap<>(); Map<String, Object> queryMap = new HashMap<>();
queryMap.put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour()); //queryMap.put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour());
CommonMethod.initBlock(inInfo, CommonMethod.initBlock(inInfo,
Arrays.asList( Arrays.asList(
DdynamicEnum.INVENT_TYPE_BLOCK_ID, DdynamicEnum.INVENT_TYPE_BLOCK_ID,
......
...@@ -5,6 +5,7 @@ import com.baosight.hggp.core.dao.DaoBase; ...@@ -5,6 +5,7 @@ import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -38,6 +39,9 @@ public class ServiceHGSC012 extends ServiceEPBase { ...@@ -38,6 +39,9 @@ public class ServiceHGSC012 extends ServiceEPBase {
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo); Map queryMap = EiInfoUtils.getFirstRow(inInfo);
if (queryMap.containsKey("contractDate")){
queryMap.put("contractDate", DateUtils.formatShort(queryMap.get("contractDate")));
}
List<Map> list = DaoBase.getInstance().query("HGSC012.query", queryMap); List<Map> list = DaoBase.getInstance().query("HGSC012.query", queryMap);
inInfo.set(EiConstant.resultBlock, list); inInfo.set(EiConstant.resultBlock, list);
}catch (Exception e){ }catch (Exception e){
......
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/10/24
* @description 生产管理
*/
public class ServiceHGSC013 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID, DdynamicEnum.PROJ_RECORD_BLOCK_ID));
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
if (queryMap.containsKey("contractDate")){
queryMap.put("contractDate", DateUtils.formatShort(queryMap.get("contractDate")));
}
List<Map> list = DaoBase.getInstance().query("HGSC013.query", queryMap);
inInfo.set(EiConstant.resultBlock, list);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
...@@ -122,6 +122,10 @@ ...@@ -122,6 +122,10 @@
<isNotEmpty prepend=" AND " property="branchUnit"> <isNotEmpty prepend=" AND " property="branchUnit">
branch_unit = #branchUnit# branch_unit = #branchUnit#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="custCodes">
(subcontract_code in <iterate close=")" open="(" conjunction="," property="custCodes">#custCodes[]#</iterate>
or genral_contract_code in <iterate close=")" open="(" conjunction="," property="custCodes">#custCodes[]#</iterate>)
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
product_code as "productCode", <!-- 产品编号 --> product_code as "productCode", <!-- 产品编号 -->
product_name as "productName", <!-- 产品名称 --> product_name as "productName", <!-- 产品名称 -->
invent_type as "inventType", <!-- 档案类型 --> invent_type as "inventType", <!-- 档案类型 -->
invent_source as "inventSource", <!-- 物料来源 1加工 2外购 -->
spec as "spec", <!-- 规格 --> spec as "spec", <!-- 规格 -->
length as "length", <!-- 长 --> length as "length", <!-- 长 -->
width as "width", <!-- 宽 --> width as "width", <!-- 宽 -->
...@@ -145,6 +146,9 @@ ...@@ -145,6 +146,9 @@
<isNotEmpty prepend=" AND " property="thick"> <isNotEmpty prepend=" AND " property="thick">
thick = #thick# thick = #thick#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventSource">
invent_source = #inventSource#
</isNotEmpty>
</sql> </sql>
...@@ -220,6 +224,7 @@ ...@@ -220,6 +224,7 @@
a.product_code as "productCode", <!-- 产品编号 --> a.product_code as "productCode", <!-- 产品编号 -->
a.product_name as "productName", <!-- 产品名称 --> a.product_name as "productName", <!-- 产品名称 -->
a.invent_type as "inventType", <!-- 档案类型 --> a.invent_type as "inventType", <!-- 档案类型 -->
a.invent_source as "inventSource", <!-- 物料来源 1加工 2外购 -->
a.spec as "spec", a.spec as "spec",
a.length as "length", <!-- 长 --> a.length as "length", <!-- 长 -->
a.width as "width", <!-- 宽 --> a.width as "width", <!-- 宽 -->
...@@ -354,6 +359,7 @@ ...@@ -354,6 +359,7 @@
product_code, <!-- 产品编号 --> product_code, <!-- 产品编号 -->
product_name, <!-- 产品名称 --> product_name, <!-- 产品名称 -->
invent_type, <!-- 档案类型 --> invent_type, <!-- 档案类型 -->
invent_source, <!-- 物料来源 1加工 2外购 -->
product_status, <!-- 产品状态 0:未提交,1:已提交 --> product_status, <!-- 产品状态 0:未提交,1:已提交 -->
change_type, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 --> change_type, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity, <!-- 数量 --> quantity, <!-- 数量 -->
...@@ -374,7 +380,7 @@ ...@@ -374,7 +380,7 @@
) )
VALUES (#id#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, VALUES (#id#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#,
#parentProdCode#, #parentProdName#,#leaf#,#sort#,#lv#, #materialId#, #productId#,#productType#, #parentProdCode#, #parentProdName#,#leaf#,#sort#,#lv#, #materialId#, #productId#,#productType#,
#productCode#, #productName#,#inventType#, #productStatus#, #changeType#, #quantity#, #singleWeight#, #totalWeight#, #productCode#, #productName#,#inventType#,#inventSource#, #productStatus#, #changeType#, #quantity#, #singleWeight#, #totalWeight#,
#approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#, #spec#, #length#, #width#, #thick#) #updatedName#, #updatedTime#, #spec#, #length#, #width#, #thick#)
<selectKey resultClass="java.lang.Long" keyProperty="id"> <selectKey resultClass="java.lang.Long" keyProperty="id">
...@@ -406,6 +412,7 @@ ...@@ -406,6 +412,7 @@
product_code = #productCode#, <!-- 产品编号 --> product_code = #productCode#, <!-- 产品编号 -->
product_name = #productName#, <!-- 产品名称 --> product_name = #productName#, <!-- 产品名称 -->
invent_type = #inventType#, <!-- 档案类型 --> invent_type = #inventType#, <!-- 档案类型 -->
invent_source = #inventSource#, <!-- 物料来源 1加工 2外购 -->
spec = #spec#, spec = #spec#,
length = #length#, <!-- 长 --> length = #length#, <!-- 长 -->
width = #width#, <!-- 宽 --> width = #width#, <!-- 宽 -->
......
...@@ -113,6 +113,7 @@ ...@@ -113,6 +113,7 @@
product_code as "productCode", <!-- 产品编号 --> product_code as "productCode", <!-- 产品编号 -->
product_name as "productName", <!-- 产品名称 --> product_name as "productName", <!-- 产品名称 -->
invent_type as "inventType", <!-- 档案类型 --> invent_type as "inventType", <!-- 档案类型 -->
invent_source as "inventSource", <!-- 物料来源 1加工 2外购 -->
product_type as "productType", <!-- 产品类别 --> product_type as "productType", <!-- 产品类别 -->
length as "length", <!-- 长 --> length as "length", <!-- 长 -->
width as "width", <!-- 宽 --> width as "width", <!-- 宽 -->
...@@ -166,6 +167,7 @@ ...@@ -166,6 +167,7 @@
product_name, <!-- 产品名称 --> product_name, <!-- 产品名称 -->
product_type, <!-- 产品类别 --> product_type, <!-- 产品类别 -->
invent_type, <!-- 档案类型 --> invent_type, <!-- 档案类型 -->
invent_source, <!-- 物料来源 1加工 2外购 -->
product_status, <!-- 产品状态 0:未提交,1:已提交 --> product_status, <!-- 产品状态 0:未提交,1:已提交 -->
change_type, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 --> change_type, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity, <!-- 数量 --> quantity, <!-- 数量 -->
...@@ -185,7 +187,7 @@ ...@@ -185,7 +187,7 @@
) )
VALUES (#id#,#materialDetailId#, #productId#, #companyCode#, #companyName#, #depCode#, #depName#, VALUES (#id#,#materialDetailId#, #productId#, #companyCode#, #companyName#, #depCode#, #depName#,
#projCode#, #projName#, #parentProdCode#, #parentProdName#, #materialId#, #projCode#, #projName#, #parentProdCode#, #parentProdName#, #materialId#,
#productCode#, #productName#,#productType#,#inventType#, #productStatus#, #changeType#, #quantity#, #singleWeight#, #productCode#, #productName#,#productType#,#inventType#,#inventSource#, #productStatus#, #changeType#, #quantity#, #singleWeight#,
#totalWeight#, #approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #totalWeight#, #approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#,
#updatedBy#, #updatedName#, #updatedTime#, #length#, #width#, #thick#) #updatedBy#, #updatedName#, #updatedTime#, #length#, #width#, #thick#)
</insert> </insert>
...@@ -212,6 +214,7 @@ ...@@ -212,6 +214,7 @@
product_code = #productCode#, <!-- 产品编号 --> product_code = #productCode#, <!-- 产品编号 -->
product_name = #productName#, <!-- 产品名称 --> product_name = #productName#, <!-- 产品名称 -->
invent_type = #inventType#, <!-- 档案类型 --> invent_type = #inventType#, <!-- 档案类型 -->
invent_source = #inventSource#, <!-- 物料来源 1加工 2外购 -->
length = #length#, <!-- 长 --> length = #length#, <!-- 长 -->
width = #width#, <!-- 宽 --> width = #width#, <!-- 宽 -->
thick = #thick#, <!-- 厚 --> thick = #thick#, <!-- 厚 -->
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="HGSC013">
<select id="query" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select
h.company_code as "companyCode", <!-- 公司编码(预留) -->
h.company_name as "companyName", <!-- 公司名称(预留) -->
h.proj_code as "projCode", <!-- 项目编码(预留) -->
h.proj_name as "projName", <!-- 项目名称(预留) -->
ha.product_code as "productCode", <!-- 产品编号 -->
ha.product_name as "productName", <!-- 产品名称 -->
ha.spec as "spec", <!-- 规格 -->
ha.length as "length", <!-- 长 -->
ha.width as "width", <!-- 宽 -->
ha.thick as "thick", <!-- 厚 -->
ha.quantity as "quantity", <!-- 数量 -->
ha.single_weight as "singleWeight", <!-- 单重 -->
ha.total_weight as "totalWeight", <!-- 总重 -->
ha.DEPOSIT_DATE as "depositDate", <!-- 入库日期 -->
ha.INV_QTY as "invQty", <!-- 数量 -->
ha.INV_UNIT_WEIGHT as "invUnitWeight", <!-- 单重 -->
ha.INV_WEIGHT as "invWeight", <!-- 重量 -->
hb.product_code as "clproductCode" , <!-- 产品编号 -->
hb.product_name as "clproductName", <!-- 产品名称 -->
hb.spec as "clspec", <!-- 规格 -->
hb.length as "cllength", <!-- 长 -->
hb.width as "clwidth", <!-- 宽 -->
hb.thick as "clthick", <!-- 厚 -->
hb.quantity as "clquantity", <!-- 数量 -->
hb.total_weight as "cltotalWeight", <!-- 总重 -->
hb.RECEIPT_DATE as "receiptDate", <!-- 领料日期 -->
hb.INV_QTY as "llinvQty", <!-- 数量 -->
hb.INV_WEIGHT as "llinvWeight" <!-- 重量 -->
from hggp.hgsc004 h
join (
select
h.id , <!-- 主键 -->
h.company_code , <!-- 公司编码(预留) -->
h.company_name , <!-- 公司名称(预留) -->
h.proj_code , <!-- 项目编码(预留) -->
h.proj_name , <!-- 项目名称(预留) -->
h.parent_prod_code , <!-- 父节点-产品编码 -->
h.parent_prod_name , <!-- 父节点-产品名称 -->
h.material_id , <!-- 物料清单id -->
h.product_id , <!-- 产品id -->
h.product_type , <!-- 产品类别 -->
h.product_code , <!-- 产品编号 -->
h.product_name , <!-- 产品名称 -->
h.invent_type , <!-- 档案类型 -->
h.spec , <!-- 规格 -->
h.length , <!-- 长 -->
h.width , <!-- 宽 -->
h.thick , <!-- 厚 -->
h.quantity , <!-- 数量 -->
h.single_weight , <!-- 单重 -->
h.total_weight , <!-- 总重 -->
h.approval_status , <!-- 审批状态 0:待审;1:审核中;2:已审 -->
h.leaf , <!-- 是否有叶子节点 -->
h.sort , <!-- 排序字段 -->
h.lv , <!-- 层级 -->
k.DEPOSIT_DATE , <!-- 入库日期 -->
k.INV_QTY , <!-- 数量 -->
k.INV_UNIT_WEIGHT , <!-- 单重 -->
k.INV_WEIGHT <!-- 重量 -->
from hggp.hgsc004a h
left join hggp.hgkc003 k on h.company_code = k.COMPANY_CODE and h.proj_code = k.PROJ_CODE
and h.product_code = k.PRDT_CODE
and k.DELETE_FLAG = 0
where h.product_status = 1 and h.lv = 3
<isNotEmpty prepend=" AND " property="accountCode">
h.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
h.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
h.COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
h.proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
h.proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
h.product_code = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositDate">
k.DEPOSIT_DATE = #depositDate#
</isNotEmpty>
) ha on h.id = ha.material_id
join (
select
h.id ,<!-- 主键 -->
h.company_code ,<!-- 公司编码(预留) -->
h.company_name ,<!-- 公司名称(预留) -->
h.proj_code ,<!-- 项目编码(预留) -->
h.proj_name ,<!-- 项目名称(预留) -->
h.parent_prod_code ,<!-- 父节点-产品编码 -->
h.parent_prod_name ,<!-- 父节点-产品名称 -->
h.material_id ,<!-- 物料清单id -->
h.product_id ,<!-- 产品id -->
h.product_type ,<!-- 产品类别 -->
h.product_code ,<!-- 产品编号 -->
h.product_name ,<!-- 产品名称 -->
h.invent_type ,<!-- 档案类型 -->
h.spec ,<!-- 规格 -->
h.length ,<!-- 长 -->
h.width ,<!-- 宽 -->
h.thick ,<!-- 厚 -->
h.quantity ,<!-- 数量 -->
h.single_weight ,<!-- 单重 -->
h.total_weight ,<!-- 总重 -->
h.approval_status ,<!-- 审批状态 0:待审;1:审核中;2:已审 -->
h.leaf ,<!-- 是否有叶子节点 -->
h.sort ,<!-- 排序字段 -->
h.lv , <!-- 层级 -->
k.RECEIPT_DATE ,<!-- 入库日期 -->
k.INV_QTY ,<!-- 数量 -->
k.INV_WEIGHT<!-- 重量 -->
from hggp.hgsc004a h
left join (
select
k.COMPANY_CODE ,
k.PROJ_CODE ,
k1.RECEIPT_DATE ,<!-- 入库日期 -->
k.INVENT_CODE ,
sum(k.INV_QTY) as INV_QTY,<!-- 数量 -->
sum(k.INV_WEIGHT) as INV_WEIGHT<!-- 重量 -->
from hggp.hgkc008a k
join hggp.hgkc008 k1 on k.RECEIVE_ID = k1.id
where k.DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode">
k.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
k.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
k.COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
k.RECEIPT_DATE = #receiptDate#
</isNotEmpty>
group by k.COMPANY_CODE, k.PROJ_CODE, k1.RECEIPT_DATE, k.INVENT_CODE
) k on h.company_code = k.COMPANY_CODE
and h.proj_code = k.PROJ_CODE
and h.product_code = k.INVENT_CODE
where h.lv = 4 and h.product_status = 1
<isNotEmpty prepend=" AND " property="accountCode">
h.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
h.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
h.COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
h.product_code = #inventCode#
</isNotEmpty>
) hb on h.id = hb.material_id and ha.product_code = hb.parent_prod_code
order by h.id desc
</select>
</sqlMap>
\ No newline at end of file
...@@ -67,6 +67,7 @@ public class HGZL002 extends DaoEPBase { ...@@ -67,6 +67,7 @@ public class HGZL002 extends DaoEPBase {
public static final String FIELD_updated_by = "updatedBy"; /* 更新人*/ public static final String FIELD_updated_by = "updatedBy"; /* 更新人*/
public static final String FIELD_updated_name = "updatedName"; /* 修改人名称*/ public static final String FIELD_updated_name = "updatedName"; /* 修改人名称*/
public static final String FIELD_updated_time = "updatedTime"; /* 更新时间*/ public static final String FIELD_updated_time = "updatedTime"; /* 更新时间*/
public static final String FIELD_register_date = "registerDate"; /* 报工日期*/
public static final String COL_id = "id"; public static final String COL_id = "id";
public static final String COL_mat_id = "mat_id"; /* 物料清单ID*/ public static final String COL_mat_id = "mat_id"; /* 物料清单ID*/
...@@ -165,6 +166,7 @@ public class HGZL002 extends DaoEPBase { ...@@ -165,6 +166,7 @@ public class HGZL002 extends DaoEPBase {
private String updatedBy = " "; /* 更新人*/ private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 修改人名称*/ private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 更新时间*/ private String updatedTime = " "; /* 更新时间*/
private String registerDate = " "; /* 报工日期*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -364,7 +366,9 @@ public class HGZL002 extends DaoEPBase { ...@@ -364,7 +366,9 @@ public class HGZL002 extends DaoEPBase {
eiColumn.setDescName("更新时间"); eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_register_date);
eiColumn.setDescName("报工日期");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -1078,6 +1082,15 @@ public class HGZL002 extends DaoEPBase { ...@@ -1078,6 +1082,15 @@ public class HGZL002 extends DaoEPBase {
public void setUpdatedTime(String updatedTime) { public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime; this.updatedTime = updatedTime;
} }
public String getRegisterDate() {
return registerDate;
}
public void setRegisterDate(String registerDate) {
this.registerDate = registerDate;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -1130,6 +1143,7 @@ public class HGZL002 extends DaoEPBase { ...@@ -1130,6 +1143,7 @@ public class HGZL002 extends DaoEPBase {
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_by)), updatedBy)); setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_by)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_name)), updatedName)); setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_name)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_time)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_time)), updatedTime));
setRegisterDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_register_date)), registerDate));
} }
/** /**
...@@ -1183,6 +1197,7 @@ public class HGZL002 extends DaoEPBase { ...@@ -1183,6 +1197,7 @@ public class HGZL002 extends DaoEPBase {
map.put(FIELD_updated_by, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_updated_by))); map.put(FIELD_updated_by, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_updated_by)));
map.put(FIELD_updated_name, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_updated_name))); map.put(FIELD_updated_name, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_updated_name)));
map.put(FIELD_updated_time, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_updated_time))); map.put(FIELD_updated_time, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_updated_time)));
map.put(FIELD_register_date, StringUtils.toString(registerDate, eiMetadata.getMeta(FIELD_register_date)));
return map; return map;
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
Generate time : 2024-05-29 14:33:20
Version : 1.0
schema : hggp
tableName : HGZL002
id BIGINT NOT NULL primarykey,
mat_id BIGINT NOT NULL,
work_id BIGINT NOT NULL,
tech_flow_id BIGINT,
tech_flow_name BIGINT,
invent_process_id BIGINT,
process_code VARCHAR,
process_name VARCHAR,
process_order BIGINT,
company_code VARCHAR NOT NULL,
company_name VARCHAR NOT NULL,
dep_code VARCHAR,
dep_name VARCHAR,
proj_code VARCHAR,
proj_name VARCHAR,
work_code VARCHAR,
check_code VARCHAR,
product_type TINYINT,
product_code VARCHAR,
product_name VARCHAR,
plan_start_date VARCHAR,
plan_end_date VARCHAR,
factory_code VARCHAR,
factory_name VARCHAR,
group_code VARCHAR,
group_name VARCHAR,
work_by VARCHAR,
work_name VARCHAR,
quantity TINYINT,
pass_quantity TINYINT,
unpass_quantity TINYINT,
single_weight DECIMAL,
total_weight DECIMAL,
check_by VARCHAR,
check_name VARCHAR,
check_date VARCHAR,
check_status TINYINT,
account_code VARCHAR NOT NULL,
created_by VARCHAR,
created_name VARCHAR,
created_time VARCHAR,
updated_by VARCHAR,
updated_name VARCHAR,
updated_time VARCHAR
-->
<sqlMap namespace="HGZL002"> <sqlMap namespace="HGZL002">
<sql id="condition"> <sql id="condition">
...@@ -198,6 +149,9 @@ ...@@ -198,6 +149,9 @@
<isNotEmpty prepend=" AND " property="ids"> <isNotEmpty prepend=" AND " property="ids">
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate> id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="registerDate">
register_date = #registerDate#
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
...@@ -246,7 +200,8 @@ ...@@ -246,7 +200,8 @@
created_time as "createdTime", <!-- 创建时间 --> created_time as "createdTime", <!-- 创建时间 -->
updated_by as "updatedBy", <!-- 更新人 --> updated_by as "updatedBy", <!-- 更新人 -->
updated_name as "updatedName", <!-- 修改人名称 --> updated_name as "updatedName", <!-- 修改人名称 -->
updated_time as "updatedTime" <!-- 更新时间 --> updated_time as "updatedTime", <!-- 更新时间 -->
register_date as "registerDate" <!-- 报工日期 -->
FROM ${hggpSchema}.HGZL002 WHERE 1=1 FROM ${hggpSchema}.HGZL002 WHERE 1=1
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
...@@ -265,141 +220,6 @@ ...@@ -265,141 +220,6 @@
<include refid="condition" /> <include refid="condition" />
</select> </select>
<!--
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
mat_id = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="workId">
work_id = #workId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="techFlowId">
tech_flow_id = #techFlowId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="techFlowName">
tech_flow_name = #techFlowName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventProcessId">
invent_process_id = #inventProcessId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processCode">
process_code = #processCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processName">
process_name = #processName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processOrder">
process_order = #processOrder#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="workCode">
work_code = #workCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkCode">
check_code = #checkCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productType">
product_type = #productType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
product_code = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
product_name = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planStartDate">
plan_start_date = #planStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planEndDate">
plan_end_date = #planEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
factory_name = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupCode">
group_code = #groupCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupName">
group_name = #groupName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="workBy">
work_by = #workBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="workName">
work_name = #workName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
quantity = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="passQuantity">
pass_quantity = #passQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unpassQuantity">
unpass_quantity = #unpassQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="singleWeight">
single_weight = #singleWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWeight">
total_weight = #totalWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkBy">
check_by = #checkBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkName">
check_name = #checkName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkDate">
check_date = #checkDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkStatus">
check_status = #checkStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
created_by = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
created_name = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
created_time = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
updated_by = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
updated_name = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
updated_time = #updatedTime#
</isNotEmpty>
-->
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGZL002 (id, INSERT INTO ${hggpSchema}.HGZL002 (id,
mat_id, <!-- 物料清单ID --> mat_id, <!-- 物料清单ID -->
...@@ -444,9 +264,10 @@ ...@@ -444,9 +264,10 @@
created_time, <!-- 创建时间 --> created_time, <!-- 创建时间 -->
updated_by, <!-- 更新人 --> updated_by, <!-- 更新人 -->
updated_name, <!-- 修改人名称 --> updated_name, <!-- 修改人名称 -->
updated_time <!-- 更新时间 --> updated_time, <!-- 更新时间 -->
register_Date <!-- 报工日期 -->
) )
VALUES (#id#, #matId#, #workId#, #techFlowId#, #techFlowName#, #inventProcessId#, #processCode#, #processName#, #processOrder#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, #workCode#, #checkCode#, #productType#, #productCode#, #productName#, #planStartDate#, #planEndDate#, #factoryCode#, #factoryName#, #groupCode#, #groupName#, #workBy#, #workName#, #quantity#, #passQuantity#, #unpassQuantity#, #singleWeight#, #totalWeight#, #checkBy#, #checkName#, #checkDate#, #checkStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#) VALUES (#id#, #matId#, #workId#, #techFlowId#, #techFlowName#, #inventProcessId#, #processCode#, #processName#, #processOrder#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, #workCode#, #checkCode#, #productType#, #productCode#, #productName#, #planStartDate#, #planEndDate#, #factoryCode#, #factoryName#, #groupCode#, #groupName#, #workBy#, #workName#, #quantity#, #passQuantity#, #unpassQuantity#, #singleWeight#, #totalWeight#, #checkBy#, #checkName#, #checkDate#, #checkStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #registerDate#)
<selectKey resultClass="long" keyProperty="id"> <selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGSC002 SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGSC002
</selectKey> </selectKey>
...@@ -508,7 +329,8 @@ ...@@ -508,7 +329,8 @@
&#45;&#45; created_time = #createdTime#, &lt;!&ndash; 创建时间 &ndash;&gt;--> &#45;&#45; created_time = #createdTime#, &lt;!&ndash; 创建时间 &ndash;&gt;-->
updated_by = #updatedBy#, <!-- 更新人 --> updated_by = #updatedBy#, <!-- 更新人 -->
updated_name = #updatedName#, <!-- 修改人名称 --> updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 更新时间 --> updated_time = #updatedTime#, <!-- 更新时间 -->
register_Date = #registerDate# <!-- 报工日期 -->
WHERE WHERE
id = #id# id = #id#
</update> </update>
......
...@@ -300,6 +300,9 @@ ...@@ -300,6 +300,9 @@
type: 'category', type: 'category',
data: this.getByProcessWtList, data: this.getByProcessWtList,
axisLabel: { axisLabel: {
show:true,
fontSize: '10px',
interval: 0,
textStyle: { textStyle: {
color: '#ffffff' // 设置y轴标签字体颜色为白色 color: '#ffffff' // 设置y轴标签字体颜色为白色
} }
......
...@@ -42,6 +42,9 @@ ...@@ -42,6 +42,9 @@
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains"> filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="inventSource" cname="产品来源" width="80" enable="true" align="center" readonly="false" required="true">
<EF:EFCodeOption codeName="hggp.pz.inventSource"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/> <EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" align="center" required="true"/> <EF:EFColumn ename="inventName" cname="存货名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="140" align="center" maxLength="50"/> <EF:EFColumn ename="spec" cname="规格" width="140" align="center" maxLength="50"/>
......
...@@ -394,6 +394,7 @@ $(function () { ...@@ -394,6 +394,7 @@ $(function () {
resultGrid.setCellValue(e.items[0],"thick",productCodeBox[i]['param5Field']); resultGrid.setCellValue(e.items[0],"thick",productCodeBox[i]['param5Field']);
resultGrid.setCellValue(e.items[0],"productType",productCodeBox[i]['param6Field']); resultGrid.setCellValue(e.items[0],"productType",productCodeBox[i]['param6Field']);
resultGrid.setCellValue(e.items[0],"spec",productCodeBox[i]['param7Field']); resultGrid.setCellValue(e.items[0],"spec",productCodeBox[i]['param7Field']);
resultGrid.setCellValue(e.items[0],"inventSource",productCodeBox[i]['param8Field']);
} }
} }
} }
......
...@@ -57,6 +57,9 @@ ...@@ -57,6 +57,9 @@
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="productCode" required="true" cname="产品编号" /> <EF:EFColumn ename="productCode" required="true" cname="产品编号" />
<EF:EFColumn ename="productName" cname="产品名称" width="120" align="center" enable="false"/> <EF:EFColumn ename="productName" cname="产品名称" width="120" align="center" enable="false"/>
<EF:EFComboColumn ename="inventSource" cname="产品来源" width="80" enable="false" align="center" readonly="false" required="true">
<EF:EFCodeOption codeName="hggp.pz.inventSource"/>
</EF:EFComboColumn>
<EF:EFColumn ename="spec" cname="规格" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/> <EF:EFColumn ename="spec" cname="规格" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/>
<EF:EFColumn ename="length" cname="长(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/> <EF:EFColumn ename="length" cname="长(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/>
<EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/> <EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/>
......
...@@ -34,6 +34,10 @@ ...@@ -34,6 +34,10 @@
format="yyyy-MM-dd" required="true" readonly="false"/> format="yyyy-MM-dd" required="true" readonly="false"/>
<EF:EFInput ename="result-0-quantity" cname="报工数量" format="{0:0.0}" colWidth="4" required="true"/> <EF:EFInput ename="result-0-quantity" cname="报工数量" format="{0:0.0}" colWidth="4" required="true"/>
<EF:EFInput ename="result-0-totalWeight" cname="报工重量" format="{0:0.00}" editType="text" colWidth="4" readonly="true"/> <EF:EFInput ename="result-0-totalWeight" cname="报工重量" format="{0:0.00}" editType="text" colWidth="4" readonly="true"/>
<EF:EFDatePicker cname="计划完工日期" ename="result-0-planEndDate" colWidth="4"
format="yyyy-MM-dd" required="true" readonly="false"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-exceedReason" cname="超报原因" type="textarea" editType="text" colWidth="8" ratio="2:10"/> <EF:EFInput ename="result-0-exceedReason" cname="超报原因" type="textarea" editType="text" colWidth="8" ratio="2:10"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -35,6 +35,11 @@ $(function () { ...@@ -35,6 +35,11 @@ $(function () {
if(e.eiInfo.extAttr.methodName == 'save'||e.eiInfo.extAttr.methodName == 'delete' ){ if(e.eiInfo.extAttr.methodName == 'save'||e.eiInfo.extAttr.methodName == 'delete' ){
query(); query();
} }
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
} }
} }
}); });
...@@ -51,6 +56,23 @@ $(window).load(function () { ...@@ -51,6 +56,23 @@ $(window).load(function () {
query(); query();
}); });
/**
* 保存
*/
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC008", "save", true);
}
});
}
/** /**
* 显示附件清单 * 显示附件清单
* *
......
...@@ -23,9 +23,13 @@ ...@@ -23,9 +23,13 @@
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/> <EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="账套" hidden="true"/> <EF:EFColumn ename="accountCode" cname="账套" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="180" align="center" readOnly="true"/> <EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="180" align="center" readOnly="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="workCode" cname="报工单号" width="130" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="workCode" cname="报工单号" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="registerDate" cname="报工日期" width="120" enable="true" readonly="false" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" required="true"/>
<EF:EFColumn ename="planEndDate" cname="计划完工日期" width="120" enable="false" readonly="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" />
<EF:EFColumn ename="productCode" cname="产品编码" width="100" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="productCode" cname="产品编码" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="productName" cname="产品名称" width="100" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="productName" 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="processName" cname="工序" width="100" enable="false" readonly="true" align="center"/>
......
...@@ -22,11 +22,11 @@ $(function () { ...@@ -22,11 +22,11 @@ $(function () {
let inventType = option.model['inventType']; let inventType = option.model['inventType'];
if (inventType){ if (inventType){
return _.filter(inventRecordBox, function (item) { return _.filter(inventRecordBox, function (item) {
return item["param3Field"]==inventType && item["param1Field"]=='1'; return item["param3Field"]==inventType;
}) })
}else { }else {
return _.filter(inventRecordBox, function (item) { return _.filter(inventRecordBox, function (item) {
return item["param1Field"]=='1'; return item;
}) })
} }
}, },
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<style> <style>
table{ table{
border-color: #99d2ff; border-color: #99d2ff;
min-width: 100%;
} }
table tr{ table tr{
......
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/10/24
Time: 14:51
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/common/js/dayjs.min.js"></script>
<script src="${ctx}/common/js/vue-2.6.10.js"></script>
<style>
table{
border-color: #99d2ff;
min-width: 100%;
}
table tr{
}
table tr th{
padding: 2px 8px;
font-size: .8125rem;
color: #2f80ed;
background: #dbefff;
height: 30px;
text-align: center;
}
table tr th span{
white-space: nowrap;
}
table tr td span{
white-space: nowrap;
}
table tr td{
padding: 0 8px;
height: 25px;
}
#table-box{
position: relative;
width: 100%;
overflow: auto;
min-height: 100%;
height: 74vh;
}
#table-box .table-content{
position: absolute;
min-height: 100%;
min-width: 100%;
}
.bg-blue{
background-color: #eff8ff;
}
</style>
<EF:EFPage title="产品成材率">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<%-- <EF:EFDatePicker blockId="inqu_status" row="0" ename="contractDate" cname="委外加工日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>--%>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="productName" cname="产品名称" placeholder="模糊查询" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
</EF:EFGrid>
<section id="table-box">
<section class="table-content">
<table border="1" >
<colgroup>
<col v-for="(item,k) in columns2" :key="k">
</colgroup>
<thead>
<tr>
<th v-for="(item,k) in columns" :key="k" :colspan="item.colspan">
<span>{{item.label}}</span>
</th>
</tr>
<tr>
<th v-for="(item,k) in columns2" :key="k" v-if="k>0">
<span>{{item.label}}</span>
</th>
</tr>
</thead>
<tbody>
<tr v-for="(valObj,i) in list" :key="i">
<td v-for="(item,k) in columns2" :key="k" v-if="valObj[item.value].show && k>0" :rowspan="valObj[item.value].rowspan" :class="i/2%1?'bg-blue':''">
<span>{{valObj[item.value].value}}</span>
</td>
</tr>
</tbody>
</table>
</section>
</section>
</EF:EFRegion>
</EF:EFPage>
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
<EF:EFColumn ename="productCode" cname="存货编码" width="90" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="productCode" 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="quantity" cname="报工数量" width="90" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="quantity" cname="报工数量" width="90" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="registerDate" cname="报工日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" required="true"/>
<EF:EFColumn ename="passQuantity" cname="合格数量" format="{0:0.0}" width="90" align="center" required="true"/> <EF:EFColumn ename="passQuantity" cname="合格数量" format="{0:0.0}" width="90" align="center" required="true"/>
<EF:EFColumn ename="unpassQuantity" cname="不合格数量" format="{0:0.0}" width="100" align="center" <EF:EFColumn ename="unpassQuantity" cname="不合格数量" format="{0:0.0}" width="100" align="center"
required="true"/> required="true"/>
......
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