Commit 60d6ee29 by 宋祥

1.逻辑删除

parent fa1e81c1
...@@ -6,6 +6,8 @@ import com.baosight.hpjx.core.dao.DaoUtils; ...@@ -6,6 +6,8 @@ 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.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.util.AssertUtils;
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.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -117,6 +119,14 @@ public class ServiceHPPZ004 extends ServiceBase { ...@@ -117,6 +119,14 @@ public class ServiceHPPZ004 extends ServiceBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HPPZ004 fPz004 = new HPPZ004();
fPz004.fromMap(resultRows.get(i));
// 校验是否已经配置规格信息
Map paramMap = new HashMap();
paramMap.put("inventCode", fPz004.getInventCode());
List<HPPZ006> dbPz006 = dao.query(HPPZ006.QUERY, paramMap);
AssertUtils.isNotEmpty(dbPz006, String.format("存货编码[%s]已存在档案信息,请先删除对应档案",
fPz004.getInventCode()));
DaoUtils.update(HPPZ004.DELETE, resultRows.get(i)); DaoUtils.update(HPPZ004.DELETE, resultRows.get(i));
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -89,8 +90,9 @@ ...@@ -89,8 +90,9 @@
) )
</insert> </insert>
<!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hppz002 WHERE ID = #id# UPDATE hpjx.T_HPPZ002 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
...@@ -113,7 +115,9 @@ ...@@ -113,7 +115,9 @@
SELECT DISTINCT SELECT DISTINCT
CUST_CODE as "custCode", CUST_CODE as "custCode",
CUST_NAME as "custName" CUST_NAME as "custName"
FROM hpjx.t_hppz002 WHERE STATUS=1 FROM hpjx.t_hppz002
WHERE DELETE_FLAG = 0
AND STATUS=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -88,8 +89,9 @@ ...@@ -88,8 +89,9 @@
) )
</insert> </insert>
<!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hppz003 WHERE ID = #id# UPDATE hpjx.T_HPPZ003 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
...@@ -109,7 +111,9 @@ ...@@ -109,7 +111,9 @@
SELECT DISTINCT SELECT DISTINCT
CUST_CODE as "custCode", CUST_CODE as "custCode",
CUST_NAME as "custName" CUST_NAME as "custName"
FROM hpjx.t_hppz003 WHERE STATUS=1 FROM hpjx.t_hppz003
WHERE DELETE_FLAG = 0
AND STATUS=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -91,8 +92,9 @@ ...@@ -91,8 +92,9 @@
) )
</insert> </insert>
<!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hppz004 WHERE ID = #id# UPDATE hpjx.T_HPPZ004 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
...@@ -113,7 +115,8 @@ ...@@ -113,7 +115,8 @@
INVENT_CODE as "inventCode", INVENT_CODE as "inventCode",
INVENT_NAME as "inventName" INVENT_NAME as "inventName"
FROM hpjx.t_hppz004 FROM hpjx.t_hppz004
WHERE STATUS = 1 WHERE DELETE_FLAG
AND STATUS = 1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -101,8 +102,9 @@ ...@@ -101,8 +102,9 @@
) )
</insert> </insert>
<!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hppz006 WHERE ID = #id# UPDATE hpjx.T_HPPZ006 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
...@@ -126,7 +128,9 @@ ...@@ -126,7 +128,9 @@
SELECT DISTINCT SELECT DISTINCT
ID as "id", ID as "id",
CONCAT(INVENT_CODE,'-',INVENT_NAME,'[',SPEC,']') as "inventName" CONCAT(INVENT_CODE,'-',INVENT_NAME,'[',SPEC,']') as "inventName"
FROM hpjx.t_hppz006 WHERE STATUS=1 FROM hpjx.t_hppz006
WHERE DELETE_FLAG = 1
AND STATUS=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
...@@ -141,7 +145,9 @@ ...@@ -141,7 +145,9 @@
SELECT DISTINCT SELECT DISTINCT
INVENT_CODE as "inventCode", INVENT_CODE as "inventCode",
INVENT_NAME as "inventName" INVENT_NAME as "inventName"
FROM hpjx.t_hppz006 WHERE STATUS=1 FROM hpjx.t_hppz006
WHERE DELETE_FLAG = 0
AND STATUS=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
...@@ -156,7 +162,9 @@ ...@@ -156,7 +162,9 @@
SELECT DISTINCT SELECT DISTINCT
ID AS "id", ID AS "id",
(CASE WHEN SPEC = '' THEN '无规格' ELSE SPEC END) AS "spec" (CASE WHEN SPEC = '' THEN '无规格' ELSE SPEC END) AS "spec"
FROM hpjx.t_hppz006 WHERE STATUS=1 FROM hpjx.t_hppz006
WHERE DELETE_FLAG = 0
AND STATUS=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -96,8 +97,9 @@ ...@@ -96,8 +97,9 @@
) )
</insert> </insert>
<!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hppz007 WHERE ID = #id# UPDATE hpjx.T_HPPZ007 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
...@@ -118,7 +120,9 @@ ...@@ -118,7 +120,9 @@
SELECT DISTINCT SELECT DISTINCT
WH_CODE as "whCode", <!-- 仓库编码 --> WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName" <!-- 仓库名称 --> WH_NAME as "whName" <!-- 仓库名称 -->
FROM hpjx.t_hppz007 WHERE STATUS=1 FROM hpjx.t_hppz007
WHERE DELETE_FLAG = 0
AND STATUS=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
...@@ -130,7 +134,8 @@ ...@@ -130,7 +134,8 @@
<select id="queryByWhCode" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ007"> <select id="queryByWhCode" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ007">
SELECT WH_NAME as "whName" SELECT WH_NAME as "whName"
FROM hpjx.t_hppz007 WHERE 1=1 FROM hpjx.t_hppz007
WHERE DELETE_FLAG = 0
AND WH_CODE = #whCode# AND WH_CODE = #whCode#
</select> </select>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</sql> </sql>
<sql id="conditions"> <sql id="conditions">
AND DELETE_FLAG = '0' AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
......
...@@ -10,6 +10,21 @@ $(function() { ...@@ -10,6 +10,21 @@ $(function() {
pageSizes: [10, 20, 30, 50, 100, 200] pageSizes: [10, 20, 30, 50, 100, 200]
}, },
columns: [{ columns: [{
field: "length",
template: function (options) {
return options.length == 0 ? "-" : options.length;
}
}, {
field: "wide",
template: function (options) {
return options.length == 0 ? "-" : options.length;
}
}, {
field: "thick",
template: function (options) {
return options.length == 0 ? "-" : options.length;
}
}, {
field: "inventCode", field: "inventCode",
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < inventNameGlobalData.length; i++) { for (let i = 0; i < inventNameGlobalData.length; i++) {
......
...@@ -38,8 +38,7 @@ ...@@ -38,8 +38,7 @@
<EF:EFColumn ename="wide" cname="宽" width="100" align="right" format="{0:N2}" maxLength="10"/> <EF:EFColumn ename="wide" cname="宽" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚" width="100" align="right" format="{0:N2}" maxLength="10"/> <EF:EFColumn ename="thick" cname="厚" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="material" cname="材质" width="100" align="center" required="true"/> <EF:EFColumn ename="material" cname="材质" width="100" align="center" required="true"/>
<EF:EFColumn ename="coefficient" cname="系数" width="100" align="right" format="{0:N2}" maxLength="10" <EF:EFColumn ename="coefficient" cname="系数" width="100" align="right" format="{0:N2}" maxLength="10"/>
required="true"/>
<EF:EFColumn ename="unit" cname="单位" width="100" align="center" required="true"/> <EF:EFColumn ename="unit" cname="单位" width="100" align="center" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true" <EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true"
columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#"> columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#">
......
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