Commit 4dea03c6 by liuyang

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

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