Commit 33e7256e by 宋祥

1.生产领料BUG修复

parent c9b127bc
...@@ -388,6 +388,8 @@ public class HGSqlConstant { ...@@ -388,6 +388,8 @@ public class HGSqlConstant {
public static final String LOCKS = MODULE_NAME + "locks"; public static final String LOCKS = MODULE_NAME + "locks";
// 修改库存 // 修改库存
public static final String UPDATE_INV = MODULE_NAME + "updateInv"; public static final String UPDATE_INV = MODULE_NAME + "updateInv";
// 领用查询
public static final String QUERY_LY = MODULE_NAME + "queryLy";
} }
/** /**
......
...@@ -6,6 +6,7 @@ import com.baosight.hggp.common.InventTypeDetailEnum; ...@@ -6,6 +6,7 @@ import com.baosight.hggp.common.InventTypeDetailEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.kc.domain.HGKC008; import com.baosight.hggp.hg.kc.domain.HGKC008;
import com.baosight.hggp.hg.kc.domain.HGKC008A; import com.baosight.hggp.hg.kc.domain.HGKC008A;
import com.baosight.hggp.hg.kc.domain.HGKC010; import com.baosight.hggp.hg.kc.domain.HGKC010;
...@@ -70,7 +71,7 @@ public class ServiceHGKC008B extends ServiceBase { ...@@ -70,7 +71,7 @@ public class ServiceHGKC008B extends ServiceBase {
try { try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo); Map queryRow = EiInfoUtils.getFirstRow(inInfo);
// inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "inventTypeDetails", InventTypeDetailEnum.getInentTypeTwo()); // inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "inventTypeDetails", InventTypeDetailEnum.getInentTypeTwo());
inInfo = super.query(inInfo, HGKC010.QUERY, new HGKC010()); inInfo = super.query(inInfo, HGSqlConstant.HgKc010.QUERY_LY, new HGKC010());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
...@@ -128,12 +129,12 @@ public class ServiceHGKC008B extends ServiceBase { ...@@ -128,12 +129,12 @@ public class ServiceHGKC008B extends ServiceBase {
}); });
DaoUtils.insertBatch(HGKC008A.INSERT, hgkc008AList); DaoUtils.insertBatch(HGKC008A.INSERT, hgkc008AList);
} }
private void checkConfirmData(List<HGKC008A> hgkc008AList, Map<Long, HGKC010> dbHgkc010Map, HGKC008 hgkc008) { private void checkConfirmData(List<HGKC008A> hgkc008AList, Map<Long, HGKC010> dbHgkc010Map, HGKC008 hgkc008) {
AssertUtils.isTrue(hgkc008.getStatus().compareTo(HGConstant.ProductStatus.YTJ) == 0,"领料单已提交,不可修改"); AssertUtils.isTrue(hgkc008.getStatus().compareTo(HGConstant.ProductStatus.YTJ) == 0, "领料单已提交,不可修改");
hgkc008AList.forEach(o -> { hgkc008AList.forEach(o -> {
dbHgkc010Map.forEach((k,v) ->{ dbHgkc010Map.forEach((k, v) -> {
AssertUtils.isTrue(o.getInventCode().equals(v.getInventCode()), "此领料单已选择存货:"+v.getInventCode()); AssertUtils.isTrue(o.getInventCode().equals(v.getInventCode()), "此领料单已选择存货:" + v.getInventCode());
}); });
}); });
} }
......
...@@ -120,6 +120,30 @@ ...@@ -120,6 +120,30 @@
<include refid="BaseCondition.createdTimeCondition"/> <include refid="BaseCondition.createdTimeCondition"/>
</sql> </sql>
<sql id="lyCondition">
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE LIKE CONCAT('%', #inventCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME LIKE CONCAT('%', #inventName#, '%')
</isNotEmpty>
</sql>
<sql id="orderBy"> <sql id="orderBy">
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
...@@ -145,6 +169,20 @@ ...@@ -145,6 +169,20 @@
<include refid="condition"/> <include refid="condition"/>
</select> </select>
<select id="queryLy" resultClass="com.baosight.hggp.hg.kc.domain.HGKC010">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGKC010
WHERE 1=1
<include refid="lyCondition"/>
<include refid="orderBy"/>
</select>
<select id="countLy" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGKC010 WHERE 1=1
<include refid="lyCondition"/>
</select>
<select id="querySum" resultClass="com.baosight.hggp.hg.kc.domain.HGKC010"> <select id="querySum" resultClass="com.baosight.hggp.hg.kc.domain.HGKC010">
SELECT SELECT
ACCOUNT_CODE as "accountCode", <!-- 企业编码 --> ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
......
...@@ -222,14 +222,19 @@ let save = function (btnNode) { ...@@ -222,14 +222,19 @@ let save = function (btnNode) {
* 选择 * 选择
*/ */
let selectInvent = function () { let selectInvent = function () {
let params = {
JSColorbox.open({ "inqu_status-0-receiveId": $("#inqu_status-0-receiveId").val(),
href: "HGKC008B?methodName=initLoad&inqu_status-0-receiveId="+$("#inqu_status-0-receiveId").val()+"&inqu_status-0-companyCode="+$("#inqu_status-0-companyCode").val(), "inqu_status-0-companyCode": $("#inqu_status-0-companyCode").val(),
title: "<div style='text-align: center;'>综合实时库存</div>", "inqu_status-0-whCode": $("#inqu_status-0-whCode").val()
width: "90%", }
height: "90%", JSColorbox.open({
callbackName: selectInventCallback href: "HGKC008B",
}); title: "<div style='text-align: center;'>综合实时库存</div>",
width: "90%",
height: "90%",
params: params,
callbackName: selectInventCallback
});
} }
/** /**
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<EF:EFInput ename="inqu_status-0-receiveId" cname="领料单id" colWidth="3" type="hidden"/> <EF:EFInput ename="inqu_status-0-receiveId" cname="领料单id" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-whCode" cname="仓库编码" colWidth="3" type="hidden"/> <EF:EFInput ename="inqu_status-0-whCode" cname="仓库编码" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-companyCode" cname="仓库编码" colWidth="3" type="hidden"/> <EF:EFInput ename="inqu_status-0-companyCode" cname="公司编码" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-status" cname="状态" colWidth="3" type="hidden"/> <EF:EFInput ename="inqu_status-0-status" cname="状态" colWidth="3" type="hidden"/>
<div class="row"> <div class="row">
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains"> <EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
......
...@@ -20,7 +20,7 @@ $(window).load(function () { ...@@ -20,7 +20,7 @@ $(window).load(function () {
// 查询 // 查询
query(); query();
//存货编号查询条件 //存货编号查询条件
initInventCode(); // initInventCode();
}); });
/** /**
...@@ -46,10 +46,10 @@ let confirm = function () { ...@@ -46,10 +46,10 @@ let confirm = function () {
message("勾选的第" + (i + 1) + "行库存数量必须大于0"); message("勾选的第" + (i + 1) + "行库存数量必须大于0");
return; return;
} }
if (!isPositiveNumber(invWeight)) { // if (!isPositiveNumber(invWeight)) {
message("勾选的第" + (i + 1) + "行库存总重必须大于0"); // message("勾选的第" + (i + 1) + "行库存总重必须大于0");
return; // return;
} // }
} }
JSUtils.confirm("确定对勾选的[" + rows.length + "]条数据进行\"生产领料\"操作吗? ", { JSUtils.confirm("确定对勾选的[" + rows.length + "]条数据进行\"生产领料\"操作吗? ", {
ok: function () { ok: function () {
......
...@@ -8,12 +8,9 @@ ...@@ -8,12 +8,9 @@
<EF:EFPage title="综合库存管理"> <EF:EFPage title="综合库存管理">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<EF:EFInput ename="inqu_status-0-companyCode" cname="公司编号" colWidth="3" type="hidden"/> <EF:EFInput ename="inqu_status-0-companyCode" cname="公司编号" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-whCode" cname="仓库编码" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-receiveId" cname="领料单id" colWidth="3" type="hidden"/> <EF:EFInput ename="inqu_status-0-receiveId" cname="领料单id" colWidth="3" type="hidden"/>
<div class="row"> <div class="row">
<EF:EFSelect cname="仓库名称" blockId="inqu_status" ename="whCode" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="存货类型" blockId="inqu_status" ename="inventType" row="0" colWidth="3" <EF:EFSelect cname="存货类型" blockId="inqu_status" ename="inventType" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains"> optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="invent_type_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_type_block_id" textField="textField" valueField="valueField"/>
...@@ -22,6 +19,7 @@ ...@@ -22,6 +19,7 @@
<%-- filter="contains" optionLabel="全部" defultValue="" template="[#=valueField#]#=textField#">--%> <%-- filter="contains" optionLabel="全部" defultValue="" template="[#=valueField#]#=textField#">--%>
<%-- <EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/>--%> <%-- <EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/>--%>
<%-- </EF:EFSelect>--%> <%-- </EF:EFSelect>--%>
<EF:EFInput cname="存货编码" ename="inventCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="存货名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="存货名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
......
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