Commit 2b8db9a0 by yukang

1,长(MM)、宽(MM)、厚(MM)、单重(T)、总重(T)列头要带单位

2,操作列新增领料(参照生产领料),下料操作中领料,领料单绑定项目
3,下料明细新增领料记录(展示领取次数),点击查看领取记录列表
4,下料派工取数逻辑调整
5,BUG:下料组派工查询下料组
parent 221a854d
...@@ -48,6 +48,7 @@ public class HPKC002 extends DaoEPBase { ...@@ -48,6 +48,7 @@ public class HPKC002 extends DaoEPBase {
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_PROJ_CODE = "projCode"; /* 项目编码*/ public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_HPSC006_ID = "hpsc006Id";
public static final String COL_ID = "ID"; /* 主键id*/ public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
...@@ -74,7 +75,7 @@ public class HPKC002 extends DaoEPBase { ...@@ -74,7 +75,7 @@ public class HPKC002 extends DaoEPBase {
public static final String COL_OLD_REQ_NO = "OLD_REQ_NO"; /* 原领料单号*/ public static final String COL_OLD_REQ_NO = "OLD_REQ_NO"; /* 原领料单号*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/ public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/ public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_HPSC006_ID = "HPSC006_ID";
public static final String QUERY = "HPKC002.query"; public static final String QUERY = "HPKC002.query";
public static final String COUNT = "HPKC002.count"; public static final String COUNT = "HPKC002.count";
...@@ -107,7 +108,7 @@ public class HPKC002 extends DaoEPBase { ...@@ -107,7 +108,7 @@ public class HPKC002 extends DaoEPBase {
private String oldReqNo = " "; /* 原领料单号*/ private String oldReqNo = " "; /* 原领料单号*/
private Integer deleteFlag; /* 是否删除0.否1.是*/ private Integer deleteFlag; /* 是否删除0.否1.是*/
private String projCode = " "; /* 项目编码*/ private String projCode = " "; /* 项目编码*/
private Long hpsc006Id;
/** /**
* initialize the metadata. * initialize the metadata.
*/ */
...@@ -223,6 +224,10 @@ public class HPKC002 extends DaoEPBase { ...@@ -223,6 +224,10 @@ public class HPKC002 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_PROJ_CODE); eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("项目编码"); eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_HPSC006_ID);
eiColumn.setDescName("下料清单id");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -633,6 +638,22 @@ public class HPKC002 extends DaoEPBase { ...@@ -633,6 +638,22 @@ public class HPKC002 extends DaoEPBase {
this.projCode = projCode; this.projCode = projCode;
} }
/** /**
* get the hpsc006Id - hpsc006Id.
* @return the hpsc006Id
*/
public Long getHpsc006Id() {
return this.hpsc006Id;
}
/**
* set the hpsc006Id - hpsc006Id.
*
* @param hpsc006Id - hpsc006Id
*/
public void setHpsc006Id(Long hpsc006Id) {
this.hpsc006Id = hpsc006Id;
}
/**
* get the value from Map. * get the value from Map.
* *
* @param map - source data map * @param map - source data map
...@@ -665,6 +686,7 @@ public class HPKC002 extends DaoEPBase { ...@@ -665,6 +686,7 @@ public class HPKC002 extends DaoEPBase {
setOldReqNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OLD_REQ_NO)), oldReqNo)); setOldReqNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OLD_REQ_NO)), oldReqNo));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag)); setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode)); setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setHpsc006Id(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_HPSC006_ID)), hpsc006Id));
} }
/** /**
...@@ -699,6 +721,7 @@ public class HPKC002 extends DaoEPBase { ...@@ -699,6 +721,7 @@ public class HPKC002 extends DaoEPBase {
map.put(FIELD_OLD_REQ_NO, StringUtils.toString(oldReqNo, eiMetadata.getMeta(FIELD_OLD_REQ_NO))); map.put(FIELD_OLD_REQ_NO, StringUtils.toString(oldReqNo, eiMetadata.getMeta(FIELD_OLD_REQ_NO)));
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_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE))); map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_HPSC006_ID, StringUtils.toString(hpsc006Id, eiMetadata.getMeta(FIELD_HPSC006_ID)));
return map; return map;
} }
......
...@@ -9,10 +9,13 @@ import com.baosight.hpjx.hp.constant.HPConstant; ...@@ -9,10 +9,13 @@ import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC002; import com.baosight.hpjx.hp.kc.domain.HPKC002;
import com.baosight.hpjx.hp.kc.domain.HPKC010; import com.baosight.hpjx.hp.kc.domain.HPKC010;
import com.baosight.hpjx.hp.kc.tools.HPKCTools; import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.sc.domain.HPSC006;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.*; import com.baosight.hpjx.util.*;
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.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -49,9 +52,9 @@ public class ServiceHPKC002A extends ServiceEPBase { ...@@ -49,9 +52,9 @@ public class ServiceHPKC002A extends ServiceEPBase {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), queryMap); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_SPEC_BLOCK_ID), queryMap, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_SPEC_BLOCK_ID), queryMap, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID), queryMap, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID), queryMap, false);
String projCode = inInfo.getString("inqu_status-0-projCode"); String hpsc006Id = inInfo.getString("inqu_status-0-hpsc006Id");
if (StringUtils.isNotBlank(projCode)) { if (StringUtils.isNotBlank(hpsc006Id)) {
inInfo.set("inqu_result-0-projCode", projCode); inInfo.set("inqu_result-0-hpsc006Id", hpsc006Id);
} }
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC010().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC010().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
...@@ -88,7 +91,7 @@ public class ServiceHPKC002A extends ServiceEPBase { ...@@ -88,7 +91,7 @@ public class ServiceHPKC002A extends ServiceEPBase {
@OperationLogAnnotation(operModul = "库存查询",operType = "插入",operDesc = "生产领料单-库存查询-生成出库单") @OperationLogAnnotation(operModul = "库存查询",operType = "插入",operDesc = "生产领料单-库存查询-生成出库单")
public EiInfo select(EiInfo inInfo) { public EiInfo select(EiInfo inInfo) {
try { try {
String projCode = inInfo.getString("inqu_result-0-projCode"); String hpsc006Id = inInfo.getString("inqu_result-0-hpsc006Id");
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 库存ID // 库存ID
List<Long> ids = ObjectUtils.listKey(resultRows, "id"); List<Long> ids = ObjectUtils.listKey(resultRows, "id");
...@@ -99,7 +102,7 @@ public class ServiceHPKC002A extends ServiceEPBase { ...@@ -99,7 +102,7 @@ public class ServiceHPKC002A extends ServiceEPBase {
// 状态校验 // 状态校验
this.checkData(resultRows, dbKc010Map); this.checkData(resultRows, dbKc010Map);
// 生成销售库单 // 生成销售库单
this.saveData(resultRows, dbKc010Map, projCode); this.saveData(resultRows, dbKc010Map, hpsc006Id);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成领料单失败"); LogUtils.setMsg(inInfo, e, "生成领料单失败");
} }
...@@ -130,7 +133,7 @@ public class ServiceHPKC002A extends ServiceEPBase { ...@@ -130,7 +133,7 @@ public class ServiceHPKC002A extends ServiceEPBase {
* @param resultRows * @param resultRows
* @param dbKc010Map * @param dbKc010Map
*/ */
private void saveData(List<Map> resultRows, Map<Long, HPKC010> dbKc010Map, String projCode) { private void saveData(List<Map> resultRows, Map<Long, HPKC010> dbKc010Map, String hpsc006Id) {
for (Map row : resultRows) { for (Map row : resultRows) {
BigDecimal applyAmount = MapUtils.getBigDecimal(row, "applyAmount"); BigDecimal applyAmount = MapUtils.getBigDecimal(row, "applyAmount");
String applyRemark = MapUtils.getString(row, "applyRemark"); String applyRemark = MapUtils.getString(row, "applyRemark");
...@@ -144,7 +147,11 @@ public class ServiceHPKC002A extends ServiceEPBase { ...@@ -144,7 +147,11 @@ public class ServiceHPKC002A extends ServiceEPBase {
newKc002.setRemark(applyRemark); newKc002.setRemark(applyRemark);
newKc002.setKcId(kcId); newKc002.setKcId(kcId);
newKc002.setDeleteFlag(CommonConstant.YesNo.NO_0); newKc002.setDeleteFlag(CommonConstant.YesNo.NO_0);
newKc002.setProjCode(projCode); if (StringUtils.isNotBlank(hpsc006Id)) {
HPSC006 HPSC006 = HPSCTools.Hpsc006.getById(NumberUtils.toLong(hpsc006Id));
newKc002.setHpsc006Id(HPSC006.getId());
newKc002.setProjCode(HPSC006.getProjCode());
}
DaoUtils.insert(HPKC002.INSERT, newKc002); DaoUtils.insert(HPKC002.INSERT, newKc002);
// 修改库存数量 // 修改库存数量
HPKCTools.updateStock(newKc002.getWhCode(), newKc002.getInventRecordId(), HPKCTools.updateStock(newKc002.getWhCode(), newKc002.getInventRecordId(),
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
KC_ID as "kcId", <!-- 库存ID --> KC_ID as "kcId", <!-- 库存ID -->
OLD_REQ_NO as "oldReqNo", <!-- 原领料单号 --> OLD_REQ_NO as "oldReqNo", <!-- 原领料单号 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 --> DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
PROJ_CODE as "projCode" PROJ_CODE as "projCode",
HPSC006_ID as "hpsc006Id"
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -95,6 +96,9 @@ ...@@ -95,6 +96,9 @@
<isNotEmpty prepend=" AND " property="projCode"> <isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode# PROJ_CODE = #projCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="hpsc006Id">
HPSC006_ID = #hpsc006Id#
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -164,12 +168,12 @@ ...@@ -164,12 +168,12 @@
KC_ID, <!-- 库存ID --> KC_ID, <!-- 库存ID -->
OLD_REQ_NO, <!-- 原领料单号 --> OLD_REQ_NO, <!-- 原领料单号 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 --> DELETE_FLAG, <!-- 是否删除0.否1.是 -->
PROJ_CODE PROJ_CODE,HPSC006_ID
) VALUES ( ) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#reqNo#, #receiptDate#, #whCode#, #whName#, #inventType#, #inventCode#, #reqNo#, #receiptDate#, #whCode#, #whName#, #inventType#, #inventCode#,
#inventName#, #inventRecordId#, #amount#, #unitWeight#, #weight#, #remark#, #kcId#, #inventName#, #inventRecordId#, #amount#, #unitWeight#, #weight#, #remark#, #kcId#,
#oldReqNo#, #deleteFlag#, #projCode# #oldReqNo#, #deleteFlag#, #projCode#, #hpsc006Id#
) )
</insert> </insert>
...@@ -213,5 +217,6 @@ ...@@ -213,5 +217,6 @@
<select id="countNumByProjCode" resultClass="int"> <select id="countNumByProjCode" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpkc002 WHERE 1=1 SELECT COUNT(*) FROM hpjx.t_hpkc002 WHERE 1=1
AND PROJ_CODE = #projCode# AND PROJ_CODE = #projCode#
AND HPSC006_ID = #hpsc006Id#
</select> </select>
</sqlMap> </sqlMap>
...@@ -87,8 +87,10 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -87,8 +87,10 @@ public class ServiceHPSC006 extends ServiceBase {
if (StringUtils.isNotBlank(projCode)) { if (StringUtils.isNotBlank(projCode)) {
Map map = new HashMap(); Map map = new HashMap();
map.put("projCode", projCode); map.put("projCode", projCode);
int reqNum = dao.count("HPKC002.countNumByProjCode",map); map.put("hpsc006Id", hpsc006.getId());
hpsc006.setReqNum(reqNum);
List reqNum = dao.query("HPKC002.query",map);
hpsc006.setReqNum(reqNum.size());
} }
} }
} }
......
...@@ -36,6 +36,7 @@ public class EiInfoUtils { ...@@ -36,6 +36,7 @@ public class EiInfoUtils {
if (rowMap == null) { if (rowMap == null) {
rowMap = new HashMap(); rowMap = new HashMap();
eiInfo.addRow(blockId, rowMap); eiInfo.addRow(blockId, rowMap);
} }
return rowMap; return rowMap;
} }
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFInput ename="inqu_result-0-projCode" type="hidden"/> <EF:EFInput ename="inqu_result-0-hpsc006Id" type="hidden"/>
<EF:EFGrid blockId="result" autoDraw="override" autoFit="true" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" autoFit="true" checkMode="row">
<EF:EFColumn ename="id" cname="库存ID" enable="false" width="60" align="center"/> <EF:EFColumn ename="id" cname="库存ID" enable="false" width="60" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center"> <EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center">
......
...@@ -108,7 +108,7 @@ $(function () { ...@@ -108,7 +108,7 @@ $(function () {
+ 'onclick="checkIn(' + filePath1 + ')" >登记</a>'; + 'onclick="checkIn(' + filePath1 + ')" >登记</a>';
} }
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="selectStock(\'' + projCode + '\')" >领料</a>'; + 'onclick="selectStock(' + filePath1 + ')" >领料</a>';
} }
return template return template
...@@ -159,6 +159,11 @@ $(function () { ...@@ -159,6 +159,11 @@ $(function () {
} }
}, },
{ {
field: "orgName",
attributes: {
class: "i-input-readonly"
}
}, {
field: "orgNo", field: "orgNo",
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < factoryGroupGlobalData.length; i++) { for (let i = 0; i < factoryGroupGlobalData.length; i++) {
...@@ -170,10 +175,10 @@ $(function () { ...@@ -170,10 +175,10 @@ $(function () {
}, },
editor: function (container, options) { editor: function (container, options) {
let inInfo = new EiInfo(); let inInfo = new EiInfo();
inInfo.set("inqu_status-0-factoryCode", options.model["factoryCode"]); inInfo.set("inqu_status-0-parentOrgId", options.model["factoryCode"]);
// 1:生产组 // 1:生产组
inInfo.set("inqu_status-0-groupType", 1); inInfo.set("inqu_status-0-orgType", 'cutGroup');
inInfo.set("serviceName", "HPPZ011"); inInfo.set("serviceName", "HPXSOrg");
inInfo.set("methodName", "queryGroupComboBox"); inInfo.set("methodName", "queryGroupComboBox");
inInfo.set("blockId", "group_record_block_id"); inInfo.set("blockId", "group_record_block_id");
inInfo.set("field", options.field); inInfo.set("field", options.field);
...@@ -331,9 +336,9 @@ function checkIn(id) { ...@@ -331,9 +336,9 @@ function checkIn(id) {
checkInCallback = function () { checkInCallback = function () {
} }
let selectStock = function (projCode) { let selectStock = function (id) {
JSColorbox.open({ JSColorbox.open({
href: "HPKC002A?methodName=initLoad&inqu_status-0-projCode=" + projCode, href: "HPKC002A?methodName=initLoad&inqu_status-0-hpsc006Id=" + id,
title: "<div style='text-align: center;'>库存查询</div>", title: "<div style='text-align: center;'>库存查询</div>",
width: "90%", width: "90%",
height: "80%", height: "80%",
......
...@@ -78,11 +78,20 @@ ...@@ -78,11 +78,20 @@
data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/" data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置9位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置9位整数和3位小数!"/>
<EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" width="80" maxLength="12" displayType="0.000" cname="总重"/> <EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" width="80" maxLength="12" displayType="0.000" cname="总重"/>
<EF:EFComboColumn ename="factoryCode" cname="厂区" width="110" align="center"
<EF:EFComboColumn ename="factoryCode" cname="厂区" width="110" align="center" defaultValue="" required="true"
filter="contains" readonly="true"> filter="contains" readonly="true">
<EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/> <EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="orgNo" cname="下料组" width="110" align="center" readonly="true"/> <EF:EFColumn ename="factoryName" cname="厂区名称" enable="false" align="center" hidden="true"/>
<EF:EFColumn ename="orgNo" cname="下料组" width="110" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" align="center" hidden="true"/>
<%-- <EF:EFComboColumn ename="factoryCode" cname="厂区" width="110" align="center"--%>
<%-- filter="contains" readonly="true">--%>
<%-- <EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/>--%>
<%-- </EF:EFComboColumn>--%>
<%-- <EF:EFColumn ename="orgNo" cname="下料组" width="110" align="center" readonly="true"/>--%>
<EF:EFColumn ename="planCompletionDate" required='true' cname="计划完成时间" editType="date" <EF:EFColumn ename="planCompletionDate" required='true' cname="计划完成时间" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" width="120"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" width="120"/>
<EF:EFColumn ename="actualCompletionDate" cname="实际完成时间" editType="date" <EF:EFColumn ename="actualCompletionDate" cname="实际完成时间" editType="date"
......
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