Commit eecda842 by 宋祥

1.实时库存只显示原料,耗材,废料等

parent 5b393644
...@@ -35,7 +35,7 @@ import java.util.Objects; ...@@ -35,7 +35,7 @@ import java.util.Objects;
public class ServiceHPKC010 extends ServiceBase { public class ServiceHPKC010 extends ServiceBase {
// 指定存货类型 // 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(), private static final Integer[] DEFAULT_INVENT_TYPE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode(), InventTypeEnum.WASTE.getCode()}; InventTypeEnum.CONSUMABLE.getCode(), InventTypeEnum.WASTE.getCode()};
/** /**
...@@ -49,7 +49,7 @@ public class ServiceHPKC010 extends ServiceBase { ...@@ -49,7 +49,7 @@ public class ServiceHPKC010 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC010().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC010().eiMetadata);
Map queryMap = new HashMap(); Map queryMap = new HashMap();
// queryMap.put("inventCodes", DEFAULT_INVENT_CODE); queryMap.put("inventTypes", DEFAULT_INVENT_TYPE);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), queryMap); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.MATERIAL_RECORD_BLOCK_ID), queryMap); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.MATERIAL_RECORD_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_SPEC_BLOCK_ID), queryMap); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_SPEC_BLOCK_ID), queryMap);
......
...@@ -3,23 +3,21 @@ package com.baosight.hpjx.hp.pz.service; ...@@ -3,23 +3,21 @@ package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation; import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InitiateModeEnum; import com.baosight.hpjx.common.InitiateModeEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ003;
import com.baosight.hpjx.hp.pz.domain.HPPZ004; import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.hp.pz.domain.HPPZ006; import com.baosight.hpjx.hp.pz.domain.HPPZ006;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
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;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -148,21 +146,22 @@ public class ServiceHPPZ004 extends ServiceBase { ...@@ -148,21 +146,22 @@ public class ServiceHPPZ004 extends ServiceBase {
} }
/** /**
* @param eiInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货类型",operType = "查询",operDesc = "下拉框") @OperationLogAnnotation(operModul = "存货类型", operType = "查询", operDesc = "下拉框")
public EiInfo queryComboBox(EiInfo eiInfo) { public EiInfo queryComboBox(EiInfo inInfo) {
Map map = new HashMap(); Map queryRow = EiInfoUtils.getFirstRow(inInfo);
map.put("inventType", eiInfo.getString("inventType"));
List<DdynamicEnum> list = new ArrayList<>(); List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_NAME_BLOCK_ID); list.add(DdynamicEnum.INVENT_NAME_BLOCK_ID);
boolean isSplicingSymbol = false; boolean isSplicingSymbol = false;
if (eiInfo.getString("isSplicingSymbol") != null) { if (inInfo.getString("isSplicingSymbol") != null) {
isSplicingSymbol = Boolean.parseBoolean(eiInfo.getString("isSplicingSymbol")); isSplicingSymbol = Boolean.parseBoolean(inInfo.getString("isSplicingSymbol"));
} else {
isSplicingSymbol = MapUtils.getBooleanValue(queryRow, "isSplicingSymbol");
} }
CommonMethod.initBlock(eiInfo, list, map,isSplicingSymbol); CommonMethod.initBlock(inInfo, list, queryRow, isSplicingSymbol);
return eiInfo; return inInfo;
} }
} }
...@@ -330,15 +330,15 @@ public class HPPZTools { ...@@ -330,15 +330,15 @@ public class HPPZTools {
public static String jointSpec(BigDecimal length, BigDecimal width, BigDecimal thick) { public static String jointSpec(BigDecimal length, BigDecimal width, BigDecimal thick) {
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
if (length != null && length.compareTo(BigDecimal.ZERO) != 0) { if (length != null && length.compareTo(BigDecimal.ZERO) != 0) {
sb.append(length); sb.append(length.stripTrailingZeros().toPlainString());
sb.append("*"); sb.append("*");
} }
if (width != null && width.compareTo(BigDecimal.ZERO) != 0) { if (width != null && width.compareTo(BigDecimal.ZERO) != 0) {
sb.append(width); sb.append(width.stripTrailingZeros().toPlainString());
sb.append("*"); sb.append("*");
} }
if (thick != null && thick.compareTo(BigDecimal.ZERO) != 0) { if (thick != null && thick.compareTo(BigDecimal.ZERO) != 0) {
sb.append(thick); sb.append(thick.stripTrailingZeros().toPlainString());
} }
return sb.toString(); return sb.toString();
} }
...@@ -356,8 +356,7 @@ public class HPPZTools { ...@@ -356,8 +356,7 @@ public class HPPZTools {
* @param unit 单位 * @param unit 单位
*/ */
public static HPPZ006 checkAndSave(Integer inventType, String inventName, BigDecimal length, public static HPPZ006 checkAndSave(Integer inventType, String inventName, BigDecimal length,
BigDecimal width, BigDecimal width, BigDecimal thick, BigDecimal coefficient, String material, String unit) {
BigDecimal thick, BigDecimal coefficient, String material, String unit) {
// 检查存货名称是否存在 // 检查存货名称是否存在
String inventCode = HPPZTools.HpPz004.checkAndSave(inventType, inventName); String inventCode = HPPZTools.HpPz004.checkAndSave(inventType, inventName);
Map queryMap = new HashMap(); Map queryMap = new HashMap();
......
...@@ -26,6 +26,7 @@ $(function() { ...@@ -26,6 +26,7 @@ $(function() {
}, },
editor: function (container, options) { editor: function (container, options) {
let inInfo = new EiInfo(); let inInfo = new EiInfo();
// 1.原料,2.耗材
inInfo.set("inqu_status-0-inventTypes", [1, 2]); inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo.set("inqu_status-0-whType", options.model["inventType"]); inInfo.set("inqu_status-0-whType", options.model["inventType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false); inInfo.set("inqu_status-0-isSplicingSymbol", false);
...@@ -47,6 +48,7 @@ $(function() { ...@@ -47,6 +48,7 @@ $(function() {
}, },
editor: function (container, options) { editor: function (container, options) {
let inInfo = new EiInfo(); let inInfo = new EiInfo();
// 1.原料,2.耗材
inInfo.set("inqu_status-0-inventTypes", [1, 2]); inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo.set("inqu_status-0-inventType", options.model["inventType"]); inInfo.set("inqu_status-0-inventType", options.model["inventType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false); inInfo.set("inqu_status-0-isSplicingSymbol", false);
...@@ -68,6 +70,7 @@ $(function() { ...@@ -68,6 +70,7 @@ $(function() {
}, },
editor: function (container, options) { editor: function (container, options) {
let inInfo = new EiInfo(); let inInfo = new EiInfo();
// 1.原料,2.耗材
inInfo.set("inqu_status-0-inventTypes", [1, 2]); inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo.set("inqu_status-0-inventCode", options.model["inventCode"]); inInfo.set("inqu_status-0-inventCode", options.model["inventCode"]);
inInfo.set("serviceName", "HPPZ006"); inInfo.set("serviceName", "HPPZ006");
...@@ -149,6 +152,7 @@ $(window).load(function () { ...@@ -149,6 +152,7 @@ $(window).load(function () {
*/ */
let initWh = function () { let initWh = function () {
let inInfo = new EiInfo(); let inInfo = new EiInfo();
// 1.原料,2.耗材
inInfo.set("inqu_status-0-inventTypes", [1, 2]); inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo.set("inqu_status-0-isSplicingSymbol", false); inInfo.set("inqu_status-0-isSplicingSymbol", false);
EiCommunicator.send("HPPZ007", "queryComboBox", inInfo, { EiCommunicator.send("HPPZ007", "queryComboBox", inInfo, {
...@@ -165,6 +169,7 @@ let initWh = function () { ...@@ -165,6 +169,7 @@ let initWh = function () {
*/ */
let initInvent = function () { let initInvent = function () {
let inInfo = new EiInfo(); let inInfo = new EiInfo();
// 1.原料,2.耗材
inInfo.set("inqu_status-0-inventTypes", [1, 2]); inInfo.set("inqu_status-0-inventTypes", [1, 2]);
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, { EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
...@@ -180,6 +185,7 @@ let initInvent = function () { ...@@ -180,6 +185,7 @@ let initInvent = function () {
*/ */
let initSpec = function () { let initSpec = function () {
let inInfo = new EiInfo(); let inInfo = new EiInfo();
// 1.原料,2.耗材
inInfo.set("inqu_status-0-inventTypes", [1, 2]); inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo.set("inqu_status-0-isSplicingSymbol", false); inInfo.set("inqu_status-0-isSplicingSymbol", false);
EiCommunicator.send("HPPZ006", "queryComboBoxAll", inInfo, { EiCommunicator.send("HPPZ006", "queryComboBoxAll", inInfo, {
......
...@@ -57,26 +57,48 @@ $(function() { ...@@ -57,26 +57,48 @@ $(function() {
*/ */
$(window).load(function () { $(window).load(function () {
// 存货名称 // 存货名称
let eiInfo = new EiInfo(); initInventName();
// inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]); // 规格
EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, { initInventAll();
// 查询
query();
});
/**
* 初始化存货名称
*
*/
let initInventName = function () {
// 存货名称
let inInfo = new EiInfo();
// 1.原料,2.耗材,5.废料
inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows(); inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows();
}, },
onFail: function (ei) { onFail: function (ei) {
} }
}, {async: false}); }, {async: false});
// 规格 }
EiCommunicator.send("HPPZ006", "queryComboBoxAll", eiInfo, {
/**
* 初始化规格
*
*/
let initInventAll = function () {
// 存货名称
let inInfo = new EiInfo();
// 1.原料,2.耗材,5.废料
inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
EiCommunicator.send("HPPZ006", "queryComboBoxAll", inInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
specGlobalData = ei.getBlock("invent_all_block_id").getMappedRows(); specGlobalData = ei.getBlock("invent_all_block_id").getMappedRows();
}, },
onFail: function (ei) { onFail: function (ei) {
} }
}, {async: false}); }, {async: false});
// 查询 }
query();
});
/** /**
* 查询 * 查询
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-inventType" cname="存货类型" colWidth="3" filter="contains"> <EF:EFSelect ename="inqu_status-0-inventType" cname="存货类型" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <%-- 1.原料,2.耗材,5废料 --%>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('1', '2', '5')"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-inventCode" cname="存货名称" colWidth="3" filter="contains" defultValue=""> <EF:EFSelect ename="inqu_status-0-inventCode" cname="存货名称" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
...@@ -46,10 +47,10 @@ ...@@ -46,10 +47,10 @@
<EF:EFColumn ename="amount" cname="数量" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="amount" cname="数量" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="unitWeight" cname="单重" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="unitWeight" cname="单重" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="重量" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="weight" cname="重量" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
<EF:EFColumn ename="updatedBy" cname="更新人" enable="false" width="100" align="center"/> <EF:EFColumn ename="updatedName" cname="更新人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="updatedTime" cname="更新时刻" enable="false" width="140" align="center" <EF:EFColumn ename="updatedTime" cname="更新时刻" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
</EF:EFGrid> </EF:EFGrid>
......
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