Commit 60d6ee29 by 宋祥

1.逻辑删除

parent fa1e81c1
......@@ -6,6 +6,8 @@ import com.baosight.hpjx.core.dao.DaoUtils;
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.HPPZ006;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -117,6 +119,14 @@ public class ServiceHPPZ004 extends ServiceBase {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
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));
}
inInfo = this.query(inInfo);
......
......@@ -20,6 +20,7 @@
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
......@@ -89,8 +90,9 @@
)
</insert>
<!-- 逻辑删除 -->
<delete id="delete">
DELETE FROM hpjx.t_hppz002 WHERE ID = #id#
UPDATE hpjx.T_HPPZ002 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete>
<update id="update">
......@@ -113,7 +115,9 @@
SELECT DISTINCT
CUST_CODE as "custCode",
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">
COMPANY_CODE = #companyCode#
</isNotEmpty>
......
......@@ -20,6 +20,7 @@
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
......@@ -88,8 +89,9 @@
)
</insert>
<!-- 逻辑删除 -->
<delete id="delete">
DELETE FROM hpjx.t_hppz003 WHERE ID = #id#
UPDATE hpjx.T_HPPZ003 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete>
<update id="update">
......@@ -109,7 +111,9 @@
SELECT DISTINCT
CUST_CODE as "custCode",
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">
COMPANY_CODE = #companyCode#
</isNotEmpty>
......
......@@ -19,6 +19,7 @@
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
......@@ -91,8 +92,9 @@
)
</insert>
<!-- 逻辑删除 -->
<delete id="delete">
DELETE FROM hpjx.t_hppz004 WHERE ID = #id#
UPDATE hpjx.T_HPPZ004 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete>
<update id="update">
......@@ -113,7 +115,8 @@
INVENT_CODE as "inventCode",
INVENT_NAME as "inventName"
FROM hpjx.t_hppz004
WHERE STATUS = 1
WHERE DELETE_FLAG
AND STATUS = 1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
......
......@@ -26,6 +26,7 @@
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
......@@ -101,8 +102,9 @@
)
</insert>
<!-- 逻辑删除 -->
<delete id="delete">
DELETE FROM hpjx.t_hppz006 WHERE ID = #id#
UPDATE hpjx.T_HPPZ006 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete>
<update id="update">
......@@ -126,7 +128,9 @@
SELECT DISTINCT
ID as "id",
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">
COMPANY_CODE = #companyCode#
</isNotEmpty>
......@@ -141,7 +145,9 @@
SELECT DISTINCT
INVENT_CODE as "inventCode",
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">
COMPANY_CODE = #companyCode#
</isNotEmpty>
......@@ -156,7 +162,9 @@
SELECT DISTINCT
ID AS "id",
(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">
COMPANY_CODE = #companyCode#
</isNotEmpty>
......
......@@ -26,6 +26,7 @@
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
......@@ -96,8 +97,9 @@
)
</insert>
<!-- 逻辑删除 -->
<delete id="delete">
DELETE FROM hpjx.t_hppz007 WHERE ID = #id#
UPDATE hpjx.T_HPPZ007 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete>
<update id="update">
......@@ -118,7 +120,9 @@
SELECT DISTINCT
WH_CODE as "whCode", <!-- 仓库编码 -->
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">
COMPANY_CODE = #companyCode#
</isNotEmpty>
......@@ -130,7 +134,8 @@
<select id="queryByWhCode" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ007">
SELECT WH_NAME as "whName"
FROM hpjx.t_hppz007 WHERE 1=1
FROM hpjx.t_hppz007
WHERE DELETE_FLAG = 0
AND WH_CODE = #whCode#
</select>
......
......@@ -17,7 +17,7 @@
</sql>
<sql id="conditions">
AND DELETE_FLAG = '0'
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
......
......@@ -10,6 +10,21 @@ $(function() {
pageSizes: [10, 20, 30, 50, 100, 200]
},
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",
template: function (dataItem) {
for (let i = 0; i < inventNameGlobalData.length; i++) {
......
......@@ -38,8 +38,7 @@
<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="material" cname="材质" width="100" align="center" required="true"/>
<EF:EFColumn ename="coefficient" cname="系数" width="100" align="right" format="{0:N2}" maxLength="10"
required="true"/>
<EF:EFColumn ename="coefficient" cname="系数" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="unit" cname="单位" width="100" align="center" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true"
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