Commit 4dea03c6 by liuyang

2024-04-24 排除库存为0的库存

parent 64609263
...@@ -10,6 +10,7 @@ import com.baosight.hpjx.hp.pz.domain.HPPZ006; ...@@ -10,6 +10,7 @@ import com.baosight.hpjx.hp.pz.domain.HPPZ006;
import com.baosight.hpjx.hp.pz.domain.HPPZ007; import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.contants.ACConstants;
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;
...@@ -65,6 +66,7 @@ public class ServiceHPKC010 extends ServiceBase { ...@@ -65,6 +66,7 @@ public class ServiceHPKC010 extends ServiceBase {
@OperationLogAnnotation(operModul = "实时库存管理", operType = "查询", operDesc = "查询") @OperationLogAnnotation(operModul = "实时库存管理", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,"isAmount",0);
inInfo = super.query(inInfo, "HPKC010.query", new HPKC010()); inInfo = super.query(inInfo, "HPKC010.query", new HPKC010());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
...@@ -117,6 +119,7 @@ public class ServiceHPKC010 extends ServiceBase { ...@@ -117,6 +119,7 @@ public class ServiceHPKC010 extends ServiceBase {
put("companyCode", companyCode); put("companyCode", companyCode);
put("whCode", whCode); put("whCode", whCode);
put("inventRecordId", inventRecordId); put("inventRecordId", inventRecordId);
put("isAmount",0);
}}); }});
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
//新增 //新增
......
...@@ -12,6 +12,7 @@ import com.baosight.hpjx.hp.sc.domain.HPSC005; ...@@ -12,6 +12,7 @@ import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.tools.HPSCTools; import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.contants.ACConstants;
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;
...@@ -59,6 +60,7 @@ public class ServiceHPKC011 extends ServiceBase { ...@@ -59,6 +60,7 @@ public class ServiceHPKC011 extends ServiceBase {
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,"isAmount",0);
inInfo = super.query(inInfo, "HPKC011.query", new HPKC011()); inInfo = super.query(inInfo, "HPKC011.query", new HPKC011());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
...@@ -110,6 +112,7 @@ public class ServiceHPKC011 extends ServiceBase { ...@@ -110,6 +112,7 @@ public class ServiceHPKC011 extends ServiceBase {
put("companyCode",companyCode); put("companyCode",companyCode);
put("whCode",whCode); put("whCode",whCode);
put("prodNo",prodNo); put("prodNo",prodNo);
put("isAmount",0);
}}); }});
if(CollectionUtils.isEmpty(list)){ if(CollectionUtils.isEmpty(list)){
//新增 //新增
......
...@@ -82,7 +82,9 @@ ...@@ -82,7 +82,9 @@
<isNotEmpty prepend=" AND " property="factoryName"> <isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName# FACTORY_NAME = #factoryName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="isAmount">
AMOUNT != 0
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -105,7 +107,7 @@ ...@@ -105,7 +107,7 @@
<select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC010"> <select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC010">
SELECT <include refid="column"/> SELECT <include refid="column"/>
FROM hpjx.T_HPKC010 FROM hpjx.T_HPKC010
WHERE 1=1 AND AMOUNT!=0 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
......
...@@ -100,7 +100,9 @@ ...@@ -100,7 +100,9 @@
<isNotEmpty prepend=" AND " property="factoryName"> <isNotEmpty prepend=" AND " property="factoryName">
a.FACTORY_NAME = #factoryName# a.FACTORY_NAME = #factoryName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="isAmount">
a.AMOUNT != 0
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -113,7 +115,7 @@ ...@@ -113,7 +115,7 @@
SELECT <include refid="column"/> SELECT <include refid="column"/>
FROM hpjx.T_HPKC011 a FROM hpjx.T_HPKC011 a
JOIN hpjx.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE JOIN hpjx.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE
WHERE 1=1 AND a.AMOUNT!=0 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
...@@ -130,7 +132,7 @@ ...@@ -130,7 +132,7 @@
SELECT <include refid="column"/> SELECT <include refid="column"/>
FROM hpjx.T_HPKC011 a FROM hpjx.T_HPKC011 a
JOIN hpjx.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE JOIN hpjx.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE
WHERE 1=1 AND a.AMOUNT!=0 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
...@@ -147,7 +149,7 @@ ...@@ -147,7 +149,7 @@
SELECT <include refid="column"/> SELECT <include refid="column"/>
FROM hpjx.T_HPKC011 a FROM hpjx.T_HPKC011 a
JOIN hpjx.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE JOIN hpjx.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE
WHERE 1=1 AND a.AMOUNT!=0 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
...@@ -156,7 +158,7 @@ ...@@ -156,7 +158,7 @@
SELECT COUNT(*) SELECT COUNT(*)
FROM hpjx.T_HPKC011 a FROM hpjx.T_HPKC011 a
JOIN hpjx.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE JOIN hpjx.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE
WHERE 1=1 AND a.AMOUNT!=0 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
......
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