Commit 661c0976 by wuwenlong

sql hgjx to schema

parent 9afb54a8
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
when c.LOG_VALUE = 5 then '一级报警状态' when c.LOG_VALUE = 5 then '一级报警状态'
when c.LOG_VALUE = 6 then '二级报警状态' when c.LOG_VALUE = 6 then '二级报警状态'
else '异常状态' end as STATUS_DESC else '异常状态' end as STATUS_DESC
from hpjx.t_hpsb003 a from ${hpjxSchema}.t_hpsb003 a
join iplat.TXSOG01 b on a.GROUP_CODE = b.ORG_ID and b.IS_DELETED = 0 join iplat.TXSOG01 b on a.GROUP_CODE = b.ORG_ID and b.IS_DELETED = 0
join hpjx.t_hpsb002 c on a.DEVICE_CODE=c.EQUIPMENT_CODE join ${hpjxSchema}.t_hpsb002 c on a.DEVICE_CODE=c.EQUIPMENT_CODE
where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1 and c.EQUIPMENT_TYPE = 'STARUS_TYPE' where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1 and c.EQUIPMENT_TYPE = 'STARUS_TYPE'
and a.COMPANY_CODE = #companyCode# and a.COMPANY_CODE = #companyCode#
<isNotEmpty prepend=" AND " property="factoryCode"> <isNotEmpty prepend=" AND " property="factoryCode">
......
...@@ -146,14 +146,14 @@ ...@@ -146,14 +146,14 @@
<select id="query" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC001"> <select id="query" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC001">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.t_hpkc001 WHERE 1=1 FROM ${hpjxSchema}.t_hpkc001 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
<include refid="order"/> <include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpkc001 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hpkc001 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
...@@ -191,11 +191,11 @@ ...@@ -191,11 +191,11 @@
<!-- 逻辑删除 --> <!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
UPDATE hpjx.t_hpkc001 SET DELETE_FLAG = 1 WHERE ID = #id# UPDATE ${hpjxSchema}.t_hpkc001 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<update id="approvalStatusUpdate"> <update id="approvalStatusUpdate">
UPDATE hpjx.t_hpkc001 UPDATE ${hpjxSchema}.t_hpkc001
SET APPROVAL_STATUS = #approvalStatus# SET APPROVAL_STATUS = #approvalStatus#
WHERE ID = #id# WHERE ID = #id#
</update> </update>
......
...@@ -157,14 +157,14 @@ ...@@ -157,14 +157,14 @@
<select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC002"> <select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC002">
SELECT <include refid="column"/> SELECT <include refid="column"/>
FROM hpjx.t_hpkc002 WHERE 1=1 FROM ${hpjxSchema}.t_hpkc002 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
<include refid="order"/> <include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpkc002 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hpkc002 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
<!-- 逻辑删除 --> <!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
UPDATE hpjx.t_hpkc002 SET DELETE_FLAG = 1 WHERE ID = #id# UPDATE ${hpjxSchema}.t_hpkc002 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<!-- 行锁 --> <!-- 行锁 -->
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</select> </select>
<select id="countNumByProjCode" resultClass="int"> <select id="countNumByProjCode" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpkc002 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hpkc002 WHERE 1=1
AND PROJ_CODE = #projCode# AND PROJ_CODE = #projCode#
AND HPSC006_ID = #hpsc006Id# AND HPSC006_ID = #hpsc006Id#
</select> </select>
......
...@@ -117,14 +117,14 @@ ...@@ -117,14 +117,14 @@
<select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC003"> <select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC003">
SELECT <include refid="column"/> SELECT <include refid="column"/>
FROM hpjx.t_hpkc003 WHERE 1=1 AND DELETE_FLAG = 0 FROM ${hpjxSchema}.t_hpkc003 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
<include refid="order"/> <include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpkc003 WHERE 1=1 AND DELETE_FLAG = 0 SELECT COUNT(*) FROM ${hpjxSchema}.t_hpkc003 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
......
...@@ -148,14 +148,14 @@ ...@@ -148,14 +148,14 @@
<select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC004"> <select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC004">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.T_HPKC004 WHERE 1=1 FROM ${hpjxSchema}.T_HPKC004 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
<include refid="order"/> <include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.T_HPKC004 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.T_HPKC004 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
......
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
<select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC005"> <select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC005">
SELECT <include refid="column"/> SELECT <include refid="column"/>
FROM hpjx.T_HPKC005 FROM ${hpjxSchema}.T_HPKC005
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.T_HPKC005 SELECT COUNT(*) FROM ${hpjxSchema}.T_HPKC005
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.T_HPKC005 ( INSERT INTO ${hpjxSchema}.T_HPKC005 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 --> DEP_CODE, <!-- 部门编码 预留 -->
RECEIPT_DATE, <!-- 单据日期 --> RECEIPT_DATE, <!-- 单据日期 -->
...@@ -205,11 +205,11 @@ ...@@ -205,11 +205,11 @@
<!-- 逻辑删除 --> <!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
UPDATE hpjx.T_HPKC005 SET DELETE_FLAG = 1 WHERE ID = #id# UPDATE ${hpjxSchema}.T_HPKC005 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.T_HPKC005 UPDATE ${hpjxSchema}.T_HPKC005
SET SET
RECEIPT_DATE = #receiptDate#, <!-- 单据日期 --> RECEIPT_DATE = #receiptDate#, <!-- 单据日期 -->
WH_CODE = #whCode#, <!-- 仓库编码 --> WH_CODE = #whCode#, <!-- 仓库编码 -->
......
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpkc006 A WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hpkc006 A WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
<!-- 逻辑删除 --> <!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
UPDATE hpjx.t_hpkc006 SET DELETE_FLAG = 1 WHERE ID = #id# UPDATE ${hpjxSchema}.t_hpkc006 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<!-- 行锁 --> <!-- 行锁 -->
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
resultClass="com.baosight.hpjx.hp.kc.domain.HPKC007"> resultClass="com.baosight.hpjx.hp.kc.domain.HPKC007">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.t_hpkc007 FROM ${hpjxSchema}.t_hpkc007
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpkc007 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hpkc007 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
<!-- 逻辑删除 --> <!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
UPDATE hpjx.t_hpkc007 SET DELETE_FLAG = 1 WHERE ID = #id# UPDATE ${hpjxSchema}.t_hpkc007 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<!-- 行锁 --> <!-- 行锁 -->
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hpkc008 ( INSERT INTO ${hpjxSchema}.t_hpkc008 (
COMPANY_CODE, <!-- 企业编码 --> COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
DATE_MONTH, <!-- 月份 --> DATE_MONTH, <!-- 月份 -->
...@@ -112,11 +112,11 @@ ...@@ -112,11 +112,11 @@
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hpkc008 WHERE ID = #id# DELETE FROM ${hpjxSchema}.t_hpkc008 WHERE ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hpkc008 UPDATE ${hpjxSchema}.t_hpkc008
SET SET
DATE_MONTH = #dateMonth#, <!-- 月份 --> DATE_MONTH = #dateMonth#, <!-- 月份 -->
INVENT_CODE = #inventCode#, <!-- 存货代码 --> INVENT_CODE = #inventCode#, <!-- 存货代码 -->
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,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 ${hpjxSchema}.T_HPKC010
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
...@@ -125,21 +125,21 @@ ...@@ -125,21 +125,21 @@
<select id="queryByCondition" resultClass="java.util.HashMap"> <select id="queryByCondition" resultClass="java.util.HashMap">
SELECT <include refid="column"/> SELECT <include refid="column"/>
FROM hpjx.T_HPKC010 FROM ${hpjxSchema}.T_HPKC010
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.T_HPKC010 SELECT COUNT(*) FROM ${hpjxSchema}.T_HPKC010
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.T_HPKC010 ( INSERT INTO ${hpjxSchema}.T_HPKC010 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 --> DEP_CODE, <!-- 部门编码 预留 -->
WH_CODE, <!-- 仓库编码 --> WH_CODE, <!-- 仓库编码 -->
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
</insert> </insert>
<update id="updateStock"> <update id="updateStock">
UPDATE hpjx.T_HPKC010 UPDATE ${hpjxSchema}.T_HPKC010
SET SET
AMOUNT = #amount#, <!-- 数量 --> AMOUNT = #amount#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 --> WEIGHT = #weight#, <!-- 重量 -->
......
...@@ -113,8 +113,8 @@ ...@@ -113,8 +113,8 @@
<select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC011"> <select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC011">
SELECT <include refid="column"/> SELECT <include refid="column"/>
FROM hpjx.T_HPKC011 a FROM ${hpjxSchema}.T_HPKC011 a
JOIN hpjx.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE JOIN ${hpjxSchema}.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
...@@ -130,8 +130,8 @@ ...@@ -130,8 +130,8 @@
<select id="queryKc" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC011"> <select id="queryKc" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC011">
SELECT <include refid="column"/> SELECT <include refid="column"/>
FROM hpjx.T_HPKC011 a FROM ${hpjxSchema}.T_HPKC011 a
JOIN hpjx.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE JOIN ${hpjxSchema}.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
...@@ -147,8 +147,8 @@ ...@@ -147,8 +147,8 @@
<select id="queryByCondition" resultClass="java.util.HashMap"> <select id="queryByCondition" resultClass="java.util.HashMap">
SELECT <include refid="column"/> SELECT <include refid="column"/>
FROM hpjx.T_HPKC011 a FROM ${hpjxSchema}.T_HPKC011 a
JOIN hpjx.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE JOIN ${hpjxSchema}.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
...@@ -156,15 +156,15 @@ ...@@ -156,15 +156,15 @@
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) SELECT COUNT(*)
FROM hpjx.T_HPKC011 a FROM ${hpjxSchema}.T_HPKC011 a
JOIN hpjx.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE JOIN ${hpjxSchema}.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.T_HPKC011 ( INSERT INTO ${hpjxSchema}.T_HPKC011 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
WH_CODE, <!-- 仓库编码 --> WH_CODE, <!-- 仓库编码 -->
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
<update id="updateStock"> <update id="updateStock">
UPDATE hpjx.T_HPKC011 UPDATE ${hpjxSchema}.T_HPKC011
SET SET
AMOUNT = #amount#, <!-- 数量 --> AMOUNT = #amount#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 --> WEIGHT = #weight#, <!-- 重量 -->
......
...@@ -86,9 +86,9 @@ ...@@ -86,9 +86,9 @@
<select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC012"> <select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC012">
SELECT <include refid="column"/> SELECT <include refid="column"/>
FROM hpjx.T_HPKC010 A FROM ${hpjxSchema}.T_HPKC010 A
INNER JOIN hpjx.T_HPPZ012 B ON A.INVENT_RECORD_ID = B.INVENT_RECORD_ID INNER JOIN ${hpjxSchema}.T_HPPZ012 B ON A.INVENT_RECORD_ID = B.INVENT_RECORD_ID
LEFT JOIN hpjx.t_hppz007 C ON A.WH_CODE = C.WH_CODE LEFT JOIN ${hpjxSchema}.t_hppz007 C ON A.WH_CODE = C.WH_CODE
WHERE 1=1 WHERE 1=1
AND A.AMOUNT &lt;= B.WARN_NUM AND A.AMOUNT &lt;= B.WARN_NUM
<include refid="condition"/> <include refid="condition"/>
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.T_HPKC012 SELECT COUNT(*) FROM ${hpjxSchema}.T_HPKC012
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
......
...@@ -154,14 +154,14 @@ ...@@ -154,14 +154,14 @@
<select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC013"> <select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC013">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.T_HPKC013 WHERE 1=1 FROM ${hpjxSchema}.T_HPKC013 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
<include refid="order"/> <include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.T_HPKC013 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.T_HPKC013 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
SELECT SELECT
CAST(SUM(NUM*UNIT_WT)/1000 AS DECIMAL(15,3)) AS targetWt CAST(SUM(NUM*UNIT_WT)/1000 AS DECIMAL(15,3)) AS targetWt
FROM FROM
hpjx.t_hpsc004 ${hpjxSchema}.t_hpsc004
WHERE WHERE
PROJ_CODE IN PROJ_CODE IN
( (
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
PROJ_CODE, PROJ_CODE,
REPLACE(PLAN_COMPLETION_DATE,'/','') AS PLAN_COMPLETION_DATE REPLACE(PLAN_COMPLETION_DATE,'/','') AS PLAN_COMPLETION_DATE
FROM FROM
hpjx.t_hpsc003 ${hpjxSchema}.t_hpsc003
WHERE WHERE
LENGTH(PLAN_COMPLETION_DATE) > 6 LENGTH(PLAN_COMPLETION_DATE) > 6
) AS T ) AS T
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
SELECT SELECT
CAST(SUM(WEIGHT) AS DECIMAL(15,3)) AS actualWt CAST(SUM(WEIGHT) AS DECIMAL(15,3)) AS actualWt
FROM FROM
hpjx.t_hpkc003 ${hpjxSchema}.t_hpkc003
WHERE WHERE
SUBSTR(DOCUMENT_DATE,1,6) = #queryMonth# SUBSTR(DOCUMENT_DATE,1,6) = #queryMonth#
AND COMPANY_CODE = #companyCode# AND COMPANY_CODE = #companyCode#
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
SUM(A.WEIGHT) AS actualWt, SUM(A.WEIGHT) AS actualWt,
B.FACTORY_CODE, B.FACTORY_CODE,
B.FACTORY_NAME B.FACTORY_NAME
FROM hpjx.t_hpkc003 A LEFT JOIN ( FROM ${hpjxSchema}.t_hpkc003 A LEFT JOIN (
SELECT * FROM hpjx.t_hpsc005a SELECT * FROM ${hpjxSchema}.t_hpsc005a
) B ON A.PROD_TASK_NO=B.PROD_TASK_NO AND A.COMPANY_CODE=B.COMPANY_CODE ) B ON A.PROD_TASK_NO=B.PROD_TASK_NO AND A.COMPANY_CODE=B.COMPANY_CODE
WHERE WHERE
SUBSTR(DOCUMENT_DATE,1,6) = #queryMonth# SUBSTR(DOCUMENT_DATE,1,6) = #queryMonth#
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
SELECT FACTORY_CODE, SELECT FACTORY_CODE,
FACTORY_NAME, FACTORY_NAME,
COUNT(*) AS "num" COUNT(*) AS "num"
FROM hpjx.`t_hpzl001` FROM ${hpjxSchema}.`t_hpzl001`
WHERE WHERE
SUBSTR(RECEIPT_DATE,1,6) = #queryMonth# SUBSTR(RECEIPT_DATE,1,6) = #queryMonth#
AND COMPANY_CODE = #companyCode# AND DELETE_FLAG=0 AND COMPANY_CODE = #companyCode# AND DELETE_FLAG=0
......
...@@ -18,28 +18,28 @@ ...@@ -18,28 +18,28 @@
SELECT SELECT
format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2) format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2)
FROM FROM
hpjx.T_HPSC004 ${hpjxSchema}.T_HPSC004
WHERE WHERE
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO PARENT_ID = ${hpjxSchema}.T_HPSC003.PLAN_INFO_NO
),'%') AS "schedule", <!-- 进度 --> ),'%') AS "schedule", <!-- 进度 -->
( (
SELECT SELECT
IFNULL( SUM( ACTUAL_COMPLETION_UNIT_WT ), 0 ) IFNULL( SUM( ACTUAL_COMPLETION_UNIT_WT ), 0 )
FROM FROM
hpjx.T_HPSC004 ${hpjxSchema}.T_HPSC004
WHERE WHERE
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO PARENT_ID = ${hpjxSchema}.T_HPSC003.PLAN_INFO_NO
) AS "actualCompletionNum" <!-- 完成重量 --> ) AS "actualCompletionNum" <!-- 完成重量 -->
, ,
( (
SELECT SELECT
IFNULL( SUM( TOTAL_WT ),2) IFNULL( SUM( TOTAL_WT ),2)
FROM FROM
hpjx.T_HPSC004 ${hpjxSchema}.T_HPSC004
WHERE WHERE
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO PARENT_ID = ${hpjxSchema}.T_HPSC003.PLAN_INFO_NO
) AS "num" <!-- 计划重量 --> ) AS "num" <!-- 计划重量 -->
FROM hpjx.T_HPSC003 WHERE COMPANY_CODE= #companyCode# FROM ${hpjxSchema}.T_HPSC003 WHERE COMPANY_CODE= #companyCode#
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE CONCAT('%', #projName#, '%') PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty> </isNotEmpty>
...@@ -64,28 +64,28 @@ ...@@ -64,28 +64,28 @@
SELECT SELECT
format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2) format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2)
FROM FROM
hpjx.T_HPSC004 ${hpjxSchema}.T_HPSC004
WHERE WHERE
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO PARENT_ID = ${hpjxSchema}.T_HPSC003.PLAN_INFO_NO
),'%') AS "schedule", <!-- 进度 --> ),'%') AS "schedule", <!-- 进度 -->
( (
SELECT SELECT
IFNULL( SUM( ACTUAL_COMPLETION_UNIT_WT ), 0 ) IFNULL( SUM( ACTUAL_COMPLETION_UNIT_WT ), 0 )
FROM FROM
hpjx.T_HPSC004 ${hpjxSchema}.T_HPSC004
WHERE WHERE
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO PARENT_ID = ${hpjxSchema}.T_HPSC003.PLAN_INFO_NO
) AS "actualCompletionNum" <!-- 完成重量 --> ) AS "actualCompletionNum" <!-- 完成重量 -->
, ,
( (
SELECT SELECT
IFNULL( SUM( TOTAL_WT ),2) IFNULL( SUM( TOTAL_WT ),2)
FROM FROM
hpjx.T_HPSC004 ${hpjxSchema}.T_HPSC004
WHERE WHERE
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO PARENT_ID = ${hpjxSchema}.T_HPSC003.PLAN_INFO_NO
) AS "num" <!-- 计划重量 --> ) AS "num" <!-- 计划重量 -->
FROM hpjx.T_HPSC003 WHERE COMPANY_CODE= #companyCode# FROM ${hpjxSchema}.T_HPSC003 WHERE COMPANY_CODE= #companyCode#
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE CONCAT('%', #projName#, '%') PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty> </isNotEmpty>
...@@ -98,14 +98,14 @@ ...@@ -98,14 +98,14 @@
POOR_TYPE,<!-- 不良品类 --> POOR_TYPE,<!-- 不良品类 -->
COUNT(POOR_TYPE) AS POOR_TYPE_NUM,<!-- 单种不良品类数量 --> COUNT(POOR_TYPE) AS POOR_TYPE_NUM,<!-- 单种不良品类数量 -->
CONCAT( FORMAT(COUNT(POOR_TYPE)/ ( CONCAT( FORMAT(COUNT(POOR_TYPE)/ (
SELECT COUNT(*) FROM hpjx.t_hpzl001 WHERE SELECT COUNT(*) FROM ${hpjxSchema}.t_hpzl001 WHERE
COMPANY_CODE=#companyCode# COMPANY_CODE=#companyCode#
<isNotEmpty prepend=" AND " property="queryMonth"> <isNotEmpty prepend=" AND " property="queryMonth">
SUBSTR(CREATED_TIME,1,6) = #queryMonth# SUBSTR(CREATED_TIME,1,6) = #queryMonth#
</isNotEmpty> </isNotEmpty>
and SUBSTR(CREATED_TIME,1,6) = #queryMonth# )* 100,2),'%') AS NUM, and SUBSTR(CREATED_TIME,1,6) = #queryMonth# )* 100,2),'%') AS NUM,
ITEM_CNAME AS ITEM_CNAME ITEM_CNAME AS ITEM_CNAME
FROM hpjx.t_hpzl001 A LEFT JOIN ( FROM ${hpjxSchema}.t_hpzl001 A LEFT JOIN (
SELECT SELECT
ITEM_CODE, ITEM_CODE,
ITEM_CNAME ITEM_CNAME
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
POOR_TYPE as "poorType", <!-- 不良品类 --> POOR_TYPE as "poorType", <!-- 不良品类 -->
STATUS as "status", <!-- 单据状态 0未处理 1已处理 --> STATUS as "status", <!-- 单据状态 0未处理 1已处理 -->
B.ITEM_CNAME AS "itemCname" B.ITEM_CNAME AS "itemCname"
FROM hpjx.t_hpzl001 A LEFT JOIN ( FROM ${hpjxSchema}.t_hpzl001 A LEFT JOIN (
SELECT SELECT
ITEM_CODE, ITEM_CODE,
ITEM_CNAME ITEM_CNAME
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
<select id="pmQualityCount" resultClass="int"> <select id="pmQualityCount" resultClass="int">
SELECT SELECT
COUNT(*) COUNT(*)
FROM hpjx.t_hpzl001 FROM ${hpjxSchema}.t_hpzl001
WHERE COMPANY_CODE= #companyCode# AND STATUS=#status# AND DELETE_FLAG =0 WHERE COMPANY_CODE= #companyCode# AND STATUS=#status# AND DELETE_FLAG =0
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE CONCAT('%', #projName#, '%') PROJ_NAME LIKE CONCAT('%', #projName#, '%')
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
CHECK_USER_NAME as "checkUserName", <!-- 检查人名称 --> CHECK_USER_NAME as "checkUserName", <!-- 检查人名称 -->
STATUS as "status", <!-- 单据状态 0未处理 1已处理 --> STATUS as "status", <!-- 单据状态 0未处理 1已处理 -->
B.ITEM_CNAME AS "itemCname" B.ITEM_CNAME AS "itemCname"
FROM hpjx.t_hpzl001 A LEFT JOIN ( FROM ${hpjxSchema}.t_hpzl001 A LEFT JOIN (
SELECT SELECT
ITEM_CODE, ITEM_CODE,
ITEM_CNAME ITEM_CNAME
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hpzl001 ( INSERT INTO ${hpjxSchema}.t_hpzl001 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
RECEIPT_DATE, <!-- 单据日期 --> RECEIPT_DATE, <!-- 单据日期 -->
...@@ -355,7 +355,7 @@ ...@@ -355,7 +355,7 @@
</select> </select>
<select id="pmBannerList" resultClass="java.util.HashMap"> <select id="pmBannerList" resultClass="java.util.HashMap">
select DOC_ID from hpjx.T_HPPZ009A where 1=1 select DOC_ID from ${hpjxSchema}.T_HPPZ009A where 1=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
...@@ -363,17 +363,17 @@ ...@@ -363,17 +363,17 @@
<select id="pmStatusList" resultClass="java.util.HashMap"> <select id="pmStatusList" resultClass="java.util.HashMap">
select a.*,b.PROJ_STATUS,c.PARENT_ID select a.*,b.PROJ_STATUS,c.PARENT_ID
from hpjx.t_hpsc001 a from ${hpjxSchema}.t_hpsc001 a
left join left join
(select A.COMPANY_CODE,A.PROJ_CODE ,sum(ifnull(A.NUM,0)) as JHNUM,sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) as RKNUM,sum(ifnull(B.AMOUNT,0)) as CKNUM, (select A.COMPANY_CODE,A.PROJ_CODE ,sum(ifnull(A.NUM,0)) as JHNUM,sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) as RKNUM,sum(ifnull(B.AMOUNT,0)) as CKNUM,
case when sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(B.AMOUNT,0)) then 1 case when sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(B.AMOUNT,0)) then 1
when sum(ifnull(A.NUM,0)) = sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(B.AMOUNT,0)) then 2 when sum(ifnull(A.NUM,0)) = sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(B.AMOUNT,0)) then 2
when sum(ifnull(A.NUM,0)) = sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) = sum(ifnull(B.AMOUNT,0)) then 3 else 0 end as PROJ_STATUS when sum(ifnull(A.NUM,0)) = sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) = sum(ifnull(B.AMOUNT,0)) then 3 else 0 end as PROJ_STATUS
from hpjx.T_HPSC004 a from ${hpjxSchema}.T_HPSC004 a
left join hpjx.T_HPKC004 b on a.PROJ_CODE = b.PROJ_CODE and a.PRDT_CODE = b.SUB_INVENT_CODE left join ${hpjxSchema}.T_HPKC004 b on a.PROJ_CODE = b.PROJ_CODE and a.PRDT_CODE = b.SUB_INVENT_CODE
group by COMPANY_CODE,PROJ_CODE) b on a.COMPANY_CODE = b.COMPANY_CODE and a.PROJ_CODE = b.PROJ_CODE group by COMPANY_CODE,PROJ_CODE) b on a.COMPANY_CODE = b.COMPANY_CODE and a.PROJ_CODE = b.PROJ_CODE
left join ( select COMPANY_CODE,PROJ_CODE,PARENT_ID left join ( select COMPANY_CODE,PROJ_CODE,PARENT_ID
from hpjx.T_HPSC002 where PARENT_ID NOT IN ('root') AND DEL_STATUS = 0 and PRDT_TYPE = 4 from ${hpjxSchema}.T_HPSC002 where PARENT_ID NOT IN ('root') AND DEL_STATUS = 0 and PRDT_TYPE = 4
group by COMPANY_CODE,PROJ_CODE,PARENT_ID) c on a.COMPANY_CODE = c.COMPANY_CODE and a.PROJ_CODE = c.PROJ_CODE group by COMPANY_CODE,PROJ_CODE,PARENT_ID) c on a.COMPANY_CODE = c.COMPANY_CODE and a.PROJ_CODE = c.PROJ_CODE
WHERE 1=1 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
...@@ -389,23 +389,23 @@ ...@@ -389,23 +389,23 @@
<select id="scOrderPmList" resultClass="java.util.HashMap"> <select id="scOrderPmList" resultClass="java.util.HashMap">
select distinct PROJ_CODE as "projCode",PROJ_NAME as "projName" select distinct PROJ_CODE as "projCode",PROJ_NAME as "projName"
from hpjx.t_hpsc005 from ${hpjxSchema}.t_hpsc005
where COMPANY_CODE = #companyCode# where COMPANY_CODE = #companyCode#
</select> </select>
<select id="scOrderPrdtList" resultClass="java.util.HashMap"> <select id="scOrderPrdtList" resultClass="java.util.HashMap">
select distinct PRDT_CODE as "prdtCode",PRDT_NAME as "prdtName" from hpjx.t_hpsc005 select distinct PRDT_CODE as "prdtCode",PRDT_NAME as "prdtName" from ${hpjxSchema}.t_hpsc005
where PROJ_CODE = #projCode# and COMPANY_CODE = #companyCode# where PROJ_CODE = #projCode# and COMPANY_CODE = #companyCode#
</select> </select>
<select id="scOrderPartList" resultClass="java.util.HashMap"> <select id="scOrderPartList" resultClass="java.util.HashMap">
select distinct PART_CODE as "partCode",PART_NAME as "partName" from hpjx.t_hpsc005 select distinct PART_CODE as "partCode",PART_NAME as "partName" from ${hpjxSchema}.t_hpsc005
where PROJ_CODE = #projCode# and COMPANY_CODE = #companyCode# and PRDT_CODE = #prdtCode# where PROJ_CODE = #projCode# and COMPANY_CODE = #companyCode# and PRDT_CODE = #prdtCode#
</select> </select>
<select id="kcPickInventList" resultClass="java.util.HashMap"> <select id="kcPickInventList" resultClass="java.util.HashMap">
select distinct INVENT_CODE as "inventCode",INVENT_NAME as "inventName" select distinct INVENT_CODE as "inventCode",INVENT_NAME as "inventName"
from hpjx.T_HPKC010 from ${hpjxSchema}.T_HPKC010
where COMPANY_CODE = #companyCode# and AMOUNT != 0 where COMPANY_CODE = #companyCode# and AMOUNT != 0
</select> </select>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 --> UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM hpjx.t_hppz001 FROM ${hpjxSchema}.t_hppz001
WHERE 1=1 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="custType"> <isNotEmpty prepend=" AND " property="custType">
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz001 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hppz001 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<insert id="insert"> <insert id="insert">
INSERT INTO INSERT INTO
hpjx.t_hppz001 ( ${hpjxSchema}.t_hppz001 (
ID, ID,
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
CUST_CLASSIFY, <!-- 客商名称 1:供应商; 2:客户; --> CUST_CLASSIFY, <!-- 客商名称 1:供应商; 2:客户; -->
...@@ -108,12 +108,12 @@ ...@@ -108,12 +108,12 @@
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hppz001 WHERE DELETE FROM ${hpjxSchema}.t_hppz001 WHERE
ID = #id# ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hppz001 UPDATE ${hpjxSchema}.t_hppz001
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 --> COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
CUST_CLASSIFY = #custClassify#, <!-- 客商名称 1:供应商; 2:客户; --> CUST_CLASSIFY = #custClassify#, <!-- 客商名称 1:供应商; 2:客户; -->
......
...@@ -87,13 +87,13 @@ ...@@ -87,13 +87,13 @@
resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ002"> resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ002">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.t_hppz002 WHERE 1=1 FROM ${hpjxSchema}.t_hppz002 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="order"/> <include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz002 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hppz002 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
</select> </select>
...@@ -121,11 +121,11 @@ ...@@ -121,11 +121,11 @@
<!-- 逻辑删除 --> <!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
UPDATE hpjx.T_HPPZ002 SET DELETE_FLAG = 1 WHERE ID = #id# UPDATE ${hpjxSchema}.T_HPPZ002 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hppz002 UPDATE ${hpjxSchema}.t_hppz002
SET SET
CUST_TYPE = #custType#, <!-- 供应商类型 1 国企 : 2 民营 --> CUST_TYPE = #custType#, <!-- 供应商类型 1 国企 : 2 民营 -->
CUST_NAME = #custName#, <!-- 供应商名称 --> CUST_NAME = #custName#, <!-- 供应商名称 -->
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
SELECT DISTINCT SELECT DISTINCT
CUST_CODE as "custCode", CUST_CODE as "custCode",
CUST_NAME as "custName" CUST_NAME as "custName"
FROM hpjx.t_hppz002 FROM ${hpjxSchema}.t_hppz002
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
AND STATUS=1 AND STATUS=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
......
...@@ -106,13 +106,13 @@ ...@@ -106,13 +106,13 @@
<select id="query" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ003"> <select id="query" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ003">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.t_hppz003 WHERE 1=1 FROM ${hpjxSchema}.t_hppz003 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="order"/> <include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz003 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hppz003 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
</select> </select>
...@@ -145,11 +145,11 @@ ...@@ -145,11 +145,11 @@
<!-- 逻辑删除 --> <!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
UPDATE hpjx.T_HPPZ003 SET DELETE_FLAG = 1 WHERE ID = #id# UPDATE ${hpjxSchema}.T_HPPZ003 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hppz003 UPDATE ${hpjxSchema}.t_hppz003
SET SET
CUST_TYPE = #custType#, <!-- 客商类型 1:国企;2:民营; --> CUST_TYPE = #custType#, <!-- 客商类型 1:国企;2:民营; -->
CUST_NAME = #custName#, <!-- 客户名称 --> CUST_NAME = #custName#, <!-- 客户名称 -->
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
<!--修改客户类型--> <!--修改客户类型-->
<update id="updateCustCode"> <update id="updateCustCode">
UPDATE hpjx.t_hppz003 UPDATE ${hpjxSchema}.t_hppz003
SET SET
CUST_TYPE = #custType#, <!-- 客商类型 1:国企;2:民营; --> CUST_TYPE = #custType#, <!-- 客商类型 1:国企;2:民营; -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
SELECT DISTINCT SELECT DISTINCT
CUST_CODE as "custCode", CUST_CODE as "custCode",
CUST_NAME as "custName" CUST_NAME as "custName"
FROM hpjx.t_hppz003 FROM ${hpjxSchema}.t_hppz003
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
AND STATUS=1 AND STATUS=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<select id="query" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ004"> <select id="query" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ004">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.t_hppz004 WHERE 1=1 FROM ${hpjxSchema}.t_hppz004 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
<include refid="order"/> <include refid="order"/>
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
<select id="get" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ004"> <select id="get" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ004">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.t_hppz004 WHERE 1=1 FROM ${hpjxSchema}.t_hppz004 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="getCondition"/> <include refid="getCondition"/>
<include refid="order"/> <include refid="order"/>
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<select id="queryByCondition" resultClass="java.util.HashMap"> <select id="queryByCondition" resultClass="java.util.HashMap">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.t_hppz004 WHERE 1=1 FROM ${hpjxSchema}.t_hppz004 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz004 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hppz004 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
...@@ -144,16 +144,16 @@ ...@@ -144,16 +144,16 @@
<!-- 逻辑删除 --> <!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
UPDATE hpjx.T_HPPZ004 SET DELETE_FLAG = 1 WHERE ID = #id# UPDATE ${hpjxSchema}.T_HPPZ004 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<!-- 逻辑删除 --> <!-- 逻辑删除 -->
<delete id="deleteBack"> <delete id="deleteBack">
UPDATE hpjx.T_HPPZ004 SET DELETE_FLAG = 0 WHERE ID = #id# UPDATE ${hpjxSchema}.T_HPPZ004 SET DELETE_FLAG = 0 WHERE ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hppz004 UPDATE ${hpjxSchema}.t_hppz004
SET SET
INVENT_TYPE = #inventType#, <!-- 存货类型 --> INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_NAME = #inventName#, <!-- 存货名称 --> INVENT_NAME = #inventName#, <!-- 存货名称 -->
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
SELECT DISTINCT SELECT DISTINCT
INVENT_CODE as "inventCode", INVENT_CODE as "inventCode",
INVENT_NAME as "inventName" INVENT_NAME as "inventName"
FROM hpjx.t_hppz004 FROM ${hpjxSchema}.t_hppz004
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
AND STATUS = 1 AND STATUS = 1
<include refid="condition"/> <include refid="condition"/>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- table information <!-- table information
Generate time : 2024-01-09 10:44:10 Generate time : 2024-01-09 10:44:10
Version : 1.0 Version : 1.0
tableName :hpjx.t_hppz005 tableName :${hpjxSchema}.t_hppz005
ID INTEGER NOT NULL primarykey, ID INTEGER NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL, COMPANY_CODE VARCHAR NOT NULL,
INVENT_CODE VARCHAR NOT NULL, INVENT_CODE VARCHAR NOT NULL,
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
UPDATED_BY as "updatedBy", <!-- 修改人 --> UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_TIME as "updatedTime" <!-- 修改时间 --> UPDATED_TIME as "updatedTime" <!-- 修改时间 -->
FROM hpjx.t_hppz005 WHERE 1=1 FROM ${hpjxSchema}.t_hppz005 WHERE 1=1
<isNotEmpty prepend=" AND " property="inventName"> <isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME LIKE CONCAT('%', CONCAT(#inventName#,'%')) INVENT_NAME LIKE CONCAT('%', CONCAT(#inventName#,'%'))
</isNotEmpty> </isNotEmpty>
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz005 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hppz005 WHERE 1=1
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
--> -->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hppz005 ( INSERT INTO ${hpjxSchema}.t_hppz005 (
INVENT_CODE, <!-- 类型编码 --> INVENT_CODE, <!-- 类型编码 -->
INVENT_NAME, <!-- 存货类型 --> INVENT_NAME, <!-- 存货类型 -->
STATUS, <!-- 状态 0未启用 1启用 --> STATUS, <!-- 状态 0未启用 1启用 -->
...@@ -98,12 +98,12 @@ ...@@ -98,12 +98,12 @@
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hppz005 WHERE DELETE FROM ${hpjxSchema}.t_hppz005 WHERE
ID = #id# ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hppz005 UPDATE ${hpjxSchema}.t_hppz005
SET SET
INVENT_CODE = #inventCode#, <!-- 类型编码 --> INVENT_CODE = #inventCode#, <!-- 类型编码 -->
INVENT_NAME = #inventName#, <!-- 存货类型 --> INVENT_NAME = #inventName#, <!-- 存货类型 -->
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
<select id="query" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ006"> <select id="query" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ006">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.t_hppz006 WHERE 1=1 FROM ${hpjxSchema}.t_hppz006 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
<include refid="order"/> <include refid="order"/>
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
<select id="queryByCondition" resultClass="java.util.HashMap"> <select id="queryByCondition" resultClass="java.util.HashMap">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.t_hppz006 WHERE 1=1 FROM ${hpjxSchema}.t_hppz006 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz006 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hppz006 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
...@@ -194,11 +194,11 @@ ...@@ -194,11 +194,11 @@
<!-- 逻辑删除 --> <!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
UPDATE hpjx.T_HPPZ006 SET DELETE_FLAG = 1 WHERE ID = #id# UPDATE ${hpjxSchema}.T_HPPZ006 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hppz006 UPDATE ${hpjxSchema}.t_hppz006
SET SET
STATUS = #status#, <!-- 状态 0未启用 1启用 --> STATUS = #status#, <!-- 状态 0未启用 1启用 -->
SPEC = #spec#, <!-- 规格 --> SPEC = #spec#, <!-- 规格 -->
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
THICK AS "thick" , <!-- 厚 --> THICK AS "thick" , <!-- 厚 -->
COEFFICIENT AS "coefficient" , <!-- 系数 --> COEFFICIENT AS "coefficient" , <!-- 系数 -->
ID AS "id" ID AS "id"
FROM hpjx.t_hppz006 FROM ${hpjxSchema}.t_hppz006
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
AND STATUS=1 AND STATUS=1
<include refid="condition"/> <include refid="condition"/>
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
SELECT DISTINCT SELECT DISTINCT
INVENT_CODE as "inventCode", INVENT_CODE as "inventCode",
INVENT_NAME as "inventName" INVENT_NAME as "inventName"
FROM hpjx.t_hppz006 FROM ${hpjxSchema}.t_hppz006
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
AND STATUS = 1 AND STATUS = 1
<include refid="condition"/> <include refid="condition"/>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
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 FROM ${hpjxSchema}.t_hppz006
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
AND STATUS = 1 AND STATUS = 1
<include refid="condition"/> <include refid="condition"/>
...@@ -266,7 +266,7 @@ ...@@ -266,7 +266,7 @@
<select id="queryComboBoxSpecName" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryComboBoxSpecName" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT SELECT DISTINCT
(CASE WHEN SPEC = '' THEN '无规格' ELSE SPEC END) AS "spec" (CASE WHEN SPEC = '' THEN '无规格' ELSE SPEC END) AS "spec"
FROM hpjx.t_hppz006 FROM ${hpjxSchema}.t_hppz006
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
AND STATUS = 1 AND STATUS = 1
<include refid="condition"/> <include refid="condition"/>
...@@ -285,7 +285,7 @@ ...@@ -285,7 +285,7 @@
COEFFICIENT AS "coefficient" , <!-- 系数 --> COEFFICIENT AS "coefficient" , <!-- 系数 -->
MATERIAL AS "material" , <!-- 材质 --> MATERIAL AS "material" , <!-- 材质 -->
UNIT AS "unit" <!-- 单位 --> UNIT AS "unit" <!-- 单位 -->
FROM hpjx.t_hppz006 FROM ${hpjxSchema}.t_hppz006
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
AND STATUS = 1 AND STATUS = 1
<include refid="condition"/> <include refid="condition"/>
...@@ -296,7 +296,7 @@ ...@@ -296,7 +296,7 @@
<!-- 单位下拉框 --> <!-- 单位下拉框 -->
<select id="queryComboBoxUnit" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryComboBoxUnit" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT UNIT AS "unit" SELECT DISTINCT UNIT AS "unit"
FROM hpjx.t_hppz006 FROM ${hpjxSchema}.t_hppz006
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
AND STATUS = 1 AND STATUS = 1
<include refid="condition"/> <include refid="condition"/>
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
ID AS "id", ID AS "id",
INVENT_CODE as "inventCode", INVENT_CODE as "inventCode",
INVENT_NAME as "inventName" INVENT_NAME as "inventName"
FROM hpjx.t_hppz006 FROM ${hpjxSchema}.t_hppz006
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
AND STATUS = 1 AND STATUS = 1
AND IFNULL(SPEC,'') = '' AND IFNULL(SPEC,'') = ''
......
...@@ -82,14 +82,14 @@ ...@@ -82,14 +82,14 @@
<select id="query" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ007"> <select id="query" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ007">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.t_hppz007 WHERE 1=1 FROM ${hpjxSchema}.t_hppz007 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
<include refid="order"/> <include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz007 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hppz007 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
...@@ -116,11 +116,11 @@ ...@@ -116,11 +116,11 @@
<!-- 逻辑删除 --> <!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
UPDATE hpjx.T_HPPZ007 SET DELETE_FLAG = 1 WHERE ID = #id# UPDATE ${hpjxSchema}.T_HPPZ007 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hppz007 UPDATE ${hpjxSchema}.t_hppz007
SET SET
WH_TYPE = #whType#, <!-- 仓库类型 --> WH_TYPE = #whType#, <!-- 仓库类型 -->
WH_NAME = #whName#, <!-- 仓库名称 --> WH_NAME = #whName#, <!-- 仓库名称 -->
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
SELECT DISTINCT SELECT DISTINCT
WH_CODE as "whCode", <!-- 仓库编码 --> WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName" <!-- 仓库名称 --> WH_NAME as "whName" <!-- 仓库名称 -->
FROM hpjx.t_hppz007 FROM ${hpjxSchema}.t_hppz007
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
AND STATUS = 1 AND STATUS = 1
<include refid="condition"/> <include refid="condition"/>
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
<!-- 根据编码查名称 --> <!-- 根据编码查名称 -->
<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 FROM ${hpjxSchema}.t_hppz007
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
AND WH_CODE = #whCode# AND WH_CODE = #whCode#
</select> </select>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- table information <!-- table information
Generate time : 2024-01-09 16:02:58 Generate time : 2024-01-09 16:02:58
Version : 1.0 Version : 1.0
tableName :hpjx.t_hppz008 tableName :${hpjxSchema}.t_hppz008
ID BIGINT NOT NULL primarykey, ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL, COMPANY_CODE VARCHAR NOT NULL,
WH_TYPE TINYINT, WH_TYPE TINYINT,
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 --> UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM hpjx.t_hppz008 WHERE 1=1 FROM ${hpjxSchema}.t_hppz008 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz008 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hppz008 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
--> -->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hppz008 (ID, INSERT INTO ${hpjxSchema}.t_hppz008 (ID,
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
WH_TYPE, <!-- 仓库类型 --> WH_TYPE, <!-- 仓库类型 -->
WH_CODE, <!-- 仓库编码 --> WH_CODE, <!-- 仓库编码 -->
...@@ -155,12 +155,12 @@ ...@@ -155,12 +155,12 @@
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hppz008 WHERE DELETE FROM ${hpjxSchema}.t_hppz008 WHERE
ID = #id# ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hppz008 UPDATE ${hpjxSchema}.t_hppz008
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 --> COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
WH_TYPE = #whType#, <!-- 仓库类型 --> WH_TYPE = #whType#, <!-- 仓库类型 -->
......
...@@ -182,8 +182,8 @@ ...@@ -182,8 +182,8 @@
<select id="query" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ015A"> <select id="query" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ015A">
SELECT SELECT
<include refid="column1"/> <include refid="column1"/>
FROM hpjx.t_hppz015a A FROM ${hpjxSchema}.t_hppz015a A
LEFT JOIN hpjx.t_hpsc005 B on A.ID = B.MAT_ID LEFT JOIN ${hpjxSchema}.t_hpsc005 B on A.ID = B.MAT_ID
WHERE 1=1 WHERE 1=1
AND PARENT_ID NOT IN ('root') AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0 AND DEL_STATUS = 0
...@@ -192,14 +192,14 @@ ...@@ -192,14 +192,14 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz015a WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hppz015a WHERE 1=1
AND PARENT_ID NOT IN ('root') AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0 AND DEL_STATUS = 0
<include refid="condition"/> <include refid="condition"/>
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hppz015a (ID, INSERT INTO ${hpjxSchema}.t_hppz015a (ID,
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 --> DEP_CODE, <!-- 部门编码 预留 -->
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
</insert> </insert>
<insert id="insertMb" parameterClass="java.util.HashMap"> <insert id="insertMb" parameterClass="java.util.HashMap">
INSERT INTO hpjx.t_hppz015a( INSERT INTO ${hpjxSchema}.t_hppz015a(
ID, ID,
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 --> DEP_CODE, <!-- 部门编码 预留 -->
...@@ -306,17 +306,17 @@ ...@@ -306,17 +306,17 @@
LENGTH, <!-- 长 --> LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 --> WIDTH, <!-- 宽 -->
THICK <!-- 厚 --> THICK <!-- 厚 -->
FROM hpjx.t_hpsc002 WHERE PROJ_CODE=#projCode# AND COMPANY_CODE=#companyCode# FROM ${hpjxSchema}.t_hpsc002 WHERE PROJ_CODE=#projCode# AND COMPANY_CODE=#companyCode#
) )
</insert> </insert>
<!-- 删除 --> <!-- 删除 -->
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hppz015a WHERE PROJ_CODE = #projCode# DELETE FROM ${hpjxSchema}.t_hppz015a WHERE PROJ_CODE = #projCode#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hppz015a UPDATE ${hpjxSchema}.t_hppz015a
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 --> COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEP_CODE = #depCode#, <!-- 部门编码 预留 --> DEP_CODE = #depCode#, <!-- 部门编码 预留 -->
...@@ -375,7 +375,7 @@ ...@@ -375,7 +375,7 @@
LV as "lv", LV as "lv",
SPEC as "spec" SPEC as "spec"
FROM FROM
hpjx.t_hppz015a ${hpjxSchema}.t_hppz015a
WHERE WHERE
1=1 1=1
<isNotEmpty prepend=" AND " property="pEname"> <isNotEmpty prepend=" AND " property="pEname">
...@@ -391,7 +391,7 @@ ...@@ -391,7 +391,7 @@
<select id="queryTreeNodeByParentPrtdCode" resultClass="java.util.HashMap"> <select id="queryTreeNodeByParentPrtdCode" resultClass="java.util.HashMap">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.t_hppz015a FROM ${hpjxSchema}.t_hppz015a
WHERE 1 = 1 WHERE 1 = 1
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
PARENT_ID = #id# PARENT_ID = #id#
...@@ -416,20 +416,20 @@ ...@@ -416,20 +416,20 @@
</select> </select>
<update id="updateTreeNodeLeaf"> <update id="updateTreeNodeLeaf">
UPDATE hpjx.t_hppz015a SET LEAF = #leaf# WHERE ID = #id# UPDATE ${hpjxSchema}.t_hppz015a SET LEAF = #leaf# WHERE ID = #id#
</update> </update>
<update id="check"> <update id="check">
UPDATE hpjx.t_hppz015a SET status = #status# WHERE ID = #id# UPDATE ${hpjxSchema}.t_hppz015a SET status = #status# WHERE ID = #id#
</update> </update>
<update id="bindDocIdById"> <update id="bindDocIdById">
UPDATE hpjx.t_hppz015a SET FILE_PATH1 = #filePath1# WHERE ID = #id# AND BIZ_TYPE = #bizType# UPDATE ${hpjxSchema}.t_hppz015a SET FILE_PATH1 = #filePath1# WHERE ID = #id# AND BIZ_TYPE = #bizType#
</update> </update>
<select id="checkExamineNum1" resultClass="int"> <select id="checkExamineNum1" resultClass="int">
SELECT COUNT(1) from hpjx.t_hppz015a SELECT COUNT(1) from ${hpjxSchema}.t_hppz015a
WHERE 1 = 1 WHERE 1 = 1
AND PARENT_ID != 'root' AND PARENT_ID != 'root'
AND `STATUS` = 0 AND `STATUS` = 0
...@@ -439,12 +439,12 @@ ...@@ -439,12 +439,12 @@
</select> </select>
<select id="queryLv" resultClass="int"> <select id="queryLv" resultClass="int">
SELECT LV from hpjx.t_hppz015a SELECT LV from ${hpjxSchema}.t_hppz015a
WHERE ID = #id# WHERE ID = #id#
</select> </select>
<select id="checkExamineNum1Count" resultClass="int"> <select id="checkExamineNum1Count" resultClass="int">
SELECT COUNT(1) from hpjx.t_hppz015a SELECT COUNT(1) from ${hpjxSchema}.t_hppz015a
WHERE 1 = 1 WHERE 1 = 1
AND PARENT_ID != 'root' AND PARENT_ID != 'root'
<isNotEmpty prepend=" AND " property="projCode"> <isNotEmpty prepend=" AND " property="projCode">
...@@ -453,7 +453,7 @@ ...@@ -453,7 +453,7 @@
</select> </select>
<select id="checkExamineNum" resultClass="int"> <select id="checkExamineNum" resultClass="int">
SELECT COUNT(1) FROM hpjx.t_hppz015a SELECT COUNT(1) FROM ${hpjxSchema}.t_hppz015a
WHERE LEAF = '1' WHERE LEAF = '1'
AND STATUS = 0 AND DEL_STATUS = 0 AND STATUS = 0 AND DEL_STATUS = 0
<isNotEmpty prepend=" AND " property="parentId"> <isNotEmpty prepend=" AND " property="parentId">
...@@ -497,7 +497,7 @@ ...@@ -497,7 +497,7 @@
LENGTH as "length", <!-- 长 --> LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 --> WIDTH as "width", <!-- 宽 -->
THICK as "thick" <!-- 厚 --> THICK as "thick" <!-- 厚 -->
FROM hpjx.t_hppz015a FROM ${hpjxSchema}.t_hppz015a
WHERE 1=1 AND PROJ_CODE=#projCode# AND PARENT_ID NOT IN('root') WHERE 1=1 AND PROJ_CODE=#projCode# AND PARENT_ID NOT IN('root')
</select> </select>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- table information <!-- table information
Generate time : 2024-02-23 15:28:50 Generate time : 2024-02-23 15:28:50
Version : 1.0 Version : 1.0
tableName :hpjx.sys_operation_log tableName :${hpjxSchema}.tsys_operation_log
ID BIGINT NOT NULL primarykey, ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL, COMPANY_CODE VARCHAR NOT NULL,
CREATED_BY VARCHAR, CREATED_BY VARCHAR,
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
OPER_TYPE as "operType", <!-- 操作类型 --> OPER_TYPE as "operType", <!-- 操作类型 -->
OPER_DESC as "operDesc", <!-- 操作说明 --> OPER_DESC as "operDesc", <!-- 操作说明 -->
OPER_CONTENT as "operContent" <!-- 操作内容 --> OPER_CONTENT as "operContent" <!-- 操作内容 -->
FROM hpjx.sys_operation_log WHERE 1=1 FROM ${hpjxSchema}.tsys_operation_log WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.sys_operation_log WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.tsys_operation_log WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
--> -->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.sys_operation_log (ID, <!-- 主键id --> INSERT INTO ${hpjxSchema}.tsys_operation_log (ID, <!-- 主键id -->
COMPANY_CODE, <!-- 企业编码 --> COMPANY_CODE, <!-- 企业编码 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 --> CREATED_NAME, <!-- 创建人名称 -->
...@@ -139,12 +139,12 @@ ...@@ -139,12 +139,12 @@
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.sys_operation_log WHERE DELETE FROM ${hpjxSchema}.tsys_operation_log WHERE
ID = #id# ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.sys_operation_log UPDATE ${hpjxSchema}.tsys_operation_log
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 --> COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 --> CREATED_BY = #createdBy#, <!-- 创建人 -->
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
<select id="queryOperModulComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryOperModulComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT SELECT
distinct OPER_MODUL as "operModul" <!-- 操作模块 --> distinct OPER_MODUL as "operModul" <!-- 操作模块 -->
FROM hpjx.sys_operation_log WHERE 1=1 FROM ${hpjxSchema}.tsys_operation_log WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
<select id="queryOperTypeComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryOperTypeComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT SELECT
distinct OPER_TYPE as "operType" <!-- 操作类型 --> distinct OPER_TYPE as "operType" <!-- 操作类型 -->
FROM hpjx.sys_operation_log WHERE 1=1 FROM ${hpjxSchema}.tsys_operation_log WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- table information <!-- table information
Generate time : 2024-04-12 16:36:52 Generate time : 2024-04-12 16:36:52
Version : 1.0 Version : 1.0
tableName :hpjx.t_hpsb001 tableName :${hpjxSchema}.t_hpsb001
ID VARCHAR NOT NULL primarykey, ID VARCHAR NOT NULL primarykey,
ERROR_CODE VARCHAR, ERROR_CODE VARCHAR,
PRIO VARCHAR, PRIO VARCHAR,
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
</update> </update>
<delete id="deleteByCreatedTime"> <delete id="deleteByCreatedTime">
DELETE FROM hpjx.t_hpsb001 WHERE DELETE FROM ${hpjxSchema}.t_hpsb001 WHERE
SUBSTR(CREATED_TIME,1,8) &lt; DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 30 day),'%Y%m%d') SUBSTR(CREATED_TIME,1,8) &lt; DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 30 day),'%Y%m%d')
</delete> </delete>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- table information <!-- table information
Generate time : 2024-04-17 9:51:19 Generate time : 2024-04-17 9:51:19
Version : 1.0 Version : 1.0
tableName :hpjx.t_hpsb002 tableName :${hpjxSchema}.t_hpsb002
ID VARCHAR NOT NULL primarykey, ID VARCHAR NOT NULL primarykey,
FILE_NAME VARCHAR, FILE_NAME VARCHAR,
EQUIPMENT_TYPE VARCHAR, EQUIPMENT_TYPE VARCHAR,
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
</update> </update>
<delete id="deleteByCreatedTime"> <delete id="deleteByCreatedTime">
DELETE FROM hpjx.t_hpsb002 WHERE DELETE FROM ${hpjxSchema}.t_hpsb002 WHERE
SUBSTR(CREATED_TIME,1,8) &lt; DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 30 day),'%Y%m%d') SUBSTR(CREATED_TIME,1,8) &lt; DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 30 day),'%Y%m%d')
</delete> </delete>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
REMARK as "remark", <!-- 备注 --> REMARK as "remark", <!-- 备注 -->
MATERIAL_STATUS as "materialStatus" MATERIAL_STATUS as "materialStatus"
FROM hpjx.t_hpsc001 WHERE 1=1 FROM ${hpjxSchema}.t_hpsc001 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpsc001 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hpsc001 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
--> -->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hpsc001 (ID, INSERT INTO ${hpjxSchema}.t_hpsc001 (ID,
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
PROJ_TYPE, <!-- 项目类型 --> PROJ_TYPE, <!-- 项目类型 -->
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
...@@ -173,12 +173,12 @@ ...@@ -173,12 +173,12 @@
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hpsc001 WHERE DELETE FROM ${hpjxSchema}.t_hpsc001 WHERE
ID = #id# ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hpsc001 UPDATE ${hpjxSchema}.t_hpsc001
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 --> COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
PROJ_TYPE = #projType#, <!-- 项目类型 --> PROJ_TYPE = #projType#, <!-- 项目类型 -->
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
SELECT DISTINCT SELECT DISTINCT
PROJ_CODE as "projCode", PROJ_CODE as "projCode",
PROJ_NAME as "projName" PROJ_NAME as "projName"
FROM hpjx.t_hpsc001 WHERE 1=1 FROM ${hpjxSchema}.t_hpsc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
REMARK as "remark", <!-- 备注 --> REMARK as "remark", <!-- 备注 -->
MATERIAL_STATUS as "materialStatus" MATERIAL_STATUS as "materialStatus"
FROM hpjx.t_hpsc001 WHERE 1=1 FROM ${hpjxSchema}.t_hpsc001 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
...@@ -244,11 +244,11 @@ ...@@ -244,11 +244,11 @@
</select> </select>
<update id="check"> <update id="check">
UPDATE hpjx.t_hpsc001 SET status = #status# WHERE ID = #id# UPDATE ${hpjxSchema}.t_hpsc001 SET status = #status# WHERE ID = #id#
</update> </update>
<update id="checkByProjCode"> <update id="checkByProjCode">
UPDATE hpjx.t_hpsc001 SET MATERIAL_STATUS = #materialStatus# WHERE PROJ_CODE = #projCode# UPDATE ${hpjxSchema}.t_hpsc001 SET MATERIAL_STATUS = #materialStatus# WHERE PROJ_CODE = #projCode#
</update> </update>
<select id="queryDomainById" parameterClass="java.util.HashMap" <select id="queryDomainById" parameterClass="java.util.HashMap"
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
REMARK as "remark" <!-- 备注 --> REMARK as "remark" <!-- 备注 -->
FROM hpjx.t_hpsc001 WHERE 1=1 FROM ${hpjxSchema}.t_hpsc001 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
......
...@@ -193,8 +193,8 @@ ...@@ -193,8 +193,8 @@
<select id="query" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002"> <select id="query" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002">
SELECT SELECT
<include refid="column1"/> <include refid="column1"/>
FROM hpjx.t_hpsc002 A FROM ${hpjxSchema}.t_hpsc002 A
LEFT JOIN hpjx.t_hpsc005 B on A.ID = B.MAT_ID LEFT JOIN ${hpjxSchema}.t_hpsc005 B on A.ID = B.MAT_ID
WHERE 1=1 WHERE 1=1
AND PARENT_ID NOT IN ('root') AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0 AND DEL_STATUS = 0
...@@ -206,14 +206,14 @@ ...@@ -206,14 +206,14 @@
SELECT SELECT
<include refid="column1"/> <include refid="column1"/>
,ifnull(C.CKNUM,0) as "cknum",ifnull(C.RKNUM,0) as "rknum",ifnull(C.PROJ_STATUS,1) as "projStatus" ,ifnull(C.CKNUM,0) as "cknum",ifnull(C.RKNUM,0) as "rknum",ifnull(C.PROJ_STATUS,1) as "projStatus"
FROM hpjx.t_hpsc002 A FROM ${hpjxSchema}.t_hpsc002 A
LEFT JOIN hpjx.t_hpsc005 B on A.ID = B.MAT_ID LEFT JOIN ${hpjxSchema}.t_hpsc005 B on A.ID = B.MAT_ID
LEFT JOIN (select A.COMPANY_CODE,A.PROJ_CODE,A.PRDT_CODE,A.PARENT_PRDT_NAME,sum(ifnull(A.NUM,0)) as JHNUM,sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) as RKNUM,sum(ifnull(B.AMOUNT,0)) as CKNUM, LEFT JOIN (select A.COMPANY_CODE,A.PROJ_CODE,A.PRDT_CODE,A.PARENT_PRDT_NAME,sum(ifnull(A.NUM,0)) as JHNUM,sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) as RKNUM,sum(ifnull(B.AMOUNT,0)) as CKNUM,
case when sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(B.AMOUNT,0)) then 1 case when sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(B.AMOUNT,0)) then 1
when sum(ifnull(A.NUM,0)) = sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(B.AMOUNT,0)) then 2 when sum(ifnull(A.NUM,0)) = sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(B.AMOUNT,0)) then 2
when sum(ifnull(A.NUM,0)) = sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) = sum(ifnull(B.AMOUNT,0)) then 3 else 0 end as PROJ_STATUS when sum(ifnull(A.NUM,0)) = sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) = sum(ifnull(B.AMOUNT,0)) then 3 else 0 end as PROJ_STATUS
from hpjx.T_HPSC004 a from ${hpjxSchema}.T_HPSC004 a
left join hpjx.T_HPKC004 b on a.PROJ_CODE = b.PROJ_CODE and a.PRDT_CODE = b.SUB_INVENT_CODE left join ${hpjxSchema}.T_HPKC004 b on a.PROJ_CODE = b.PROJ_CODE and a.PRDT_CODE = b.SUB_INVENT_CODE
group by A.COMPANY_CODE,A.PROJ_CODE,A.PRDT_CODE,A.PARENT_PRDT_NAME) C on A.COMPANY_CODE = C.COMPANY_CODE and A.PROJ_CODE = C.PROJ_CODE group by A.COMPANY_CODE,A.PROJ_CODE,A.PRDT_CODE,A.PARENT_PRDT_NAME) C on A.COMPANY_CODE = C.COMPANY_CODE and A.PROJ_CODE = C.PROJ_CODE
and A.PARENT_PRDT_NAME = C.PARENT_PRDT_NAME and A.PRDT_CODE = C.PRDT_CODE and A.PARENT_PRDT_NAME = C.PARENT_PRDT_NAME and A.PRDT_CODE = C.PRDT_CODE
WHERE 1=1 WHERE 1=1
...@@ -231,7 +231,7 @@ ...@@ -231,7 +231,7 @@
SELECT SELECT
COALESCE(SUM(NUM), 0) AS "num", <!-- 数量 --> COALESCE(SUM(NUM), 0) AS "num", <!-- 数量 -->
COALESCE(SUM(TOTAL_WT), 0) AS "totalWt" <!-- 重量 --> COALESCE(SUM(TOTAL_WT), 0) AS "totalWt" <!-- 重量 -->
FROM hpjx.t_hpsc002 WHERE 1=1 FROM ${hpjxSchema}.t_hpsc002 WHERE 1=1
AND PARENT_ID NOT IN ('root') AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0 AND DEL_STATUS = 0
<include refid="condition"/> <include refid="condition"/>
...@@ -239,14 +239,14 @@ ...@@ -239,14 +239,14 @@
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) SELECT COUNT(*)
FROM hpjx.t_hpsc002 WHERE 1=1 FROM ${hpjxSchema}.t_hpsc002 WHERE 1=1
AND PARENT_ID NOT IN ('root') AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0 AND DEL_STATUS = 0
<include refid="condition"/> <include refid="condition"/>
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hpsc002 (ID, INSERT INTO ${hpjxSchema}.t_hpsc002 (ID,
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 --> DEP_CODE, <!-- 部门编码 预留 -->
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
...@@ -291,17 +291,17 @@ ...@@ -291,17 +291,17 @@
<!-- 删除 --> <!-- 删除 -->
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hpsc002 WHERE ID = #id# DELETE FROM ${hpjxSchema}.t_hpsc002 WHERE ID = #id#
</delete> </delete>
<!-- 删除 --> <!-- 删除 -->
<delete id="deleteByPro"> <delete id="deleteByPro">
DELETE FROM hpjx.t_hpsc002 WHERE PROJ_CODE = #projCode# DELETE FROM ${hpjxSchema}.t_hpsc002 WHERE PROJ_CODE = #projCode#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hpsc002 UPDATE ${hpjxSchema}.t_hpsc002
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 --> COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEP_CODE = #depCode#, <!-- 部门编码 预留 --> DEP_CODE = #depCode#, <!-- 部门编码 预留 -->
...@@ -362,7 +362,7 @@ ...@@ -362,7 +362,7 @@
SPEC as "spec", SPEC as "spec",
DELIVERY_DATE as "deliveryDate" DELIVERY_DATE as "deliveryDate"
FROM FROM
hpjx.t_hpsc002 ${hpjxSchema}.t_hpsc002
WHERE 1=1 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="pEname"> <isNotEmpty prepend=" AND " property="pEname">
...@@ -396,7 +396,7 @@ ...@@ -396,7 +396,7 @@
SPEC as "spec", SPEC as "spec",
DELIVERY_DATE as "deliveryDate" DELIVERY_DATE as "deliveryDate"
FROM FROM
hpjx.t_hpsc002 ${hpjxSchema}.t_hpsc002
WHERE 1=1 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
AND PARENT_ID NOT IN ('root') AND PARENT_ID NOT IN ('root')
...@@ -433,7 +433,7 @@ ...@@ -433,7 +433,7 @@
SPEC as "spec", SPEC as "spec",
DELIVERY_DATE as "deliveryDate" DELIVERY_DATE as "deliveryDate"
FROM FROM
hpjx.t_hpsc002 ${hpjxSchema}.t_hpsc002
WHERE 1=1 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="pEname"> <isNotEmpty prepend=" AND " property="pEname">
...@@ -449,7 +449,7 @@ ...@@ -449,7 +449,7 @@
<select id="queryTreeNodeByParentPrtdCode" resultClass="java.util.HashMap"> <select id="queryTreeNodeByParentPrtdCode" resultClass="java.util.HashMap">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.t_hpsc002 FROM ${hpjxSchema}.t_hpsc002
WHERE 1 = 1 WHERE 1 = 1
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
PARENT_ID = #id# PARENT_ID = #id#
...@@ -474,31 +474,31 @@ ...@@ -474,31 +474,31 @@
</select> </select>
<update id="updateTreeNodeLeaf"> <update id="updateTreeNodeLeaf">
UPDATE hpjx.t_hpsc002 SET LEAF = #leaf# WHERE ID = #id# UPDATE ${hpjxSchema}.t_hpsc002 SET LEAF = #leaf# WHERE ID = #id#
</update> </update>
<update id="updateTreeNodeLeaf2"> <update id="updateTreeNodeLeaf2">
UPDATE hpjx.t_hpsc002 SET LEAF = #leaf# WHERE PROJ_CODE = #projCode# UPDATE ${hpjxSchema}.t_hpsc002 SET LEAF = #leaf# WHERE PROJ_CODE = #projCode#
</update> </update>
<update id="check"> <update id="check">
UPDATE hpjx.t_hpsc002 SET status = #status# WHERE ID = #id# UPDATE ${hpjxSchema}.t_hpsc002 SET status = #status# WHERE ID = #id#
</update> </update>
<update id="bindDocIdById"> <update id="bindDocIdById">
UPDATE hpjx.t_hpsc002 SET FILE_PATH1 = #filePath1# WHERE ID = #id# AND BIZ_TYPE = #bizType# UPDATE ${hpjxSchema}.t_hpsc002 SET FILE_PATH1 = #filePath1# WHERE ID = #id# AND BIZ_TYPE = #bizType#
</update> </update>
<!--更新零件后,更新部件重量--> <!--更新零件后,更新部件重量-->
<update id="updatePrdtWt"> <update id="updatePrdtWt">
update hpjx.t_hpsc002 update ${hpjxSchema}.t_hpsc002
set TOTAL_WT = (select TOTAL_WT from (select sum(TOTAL_WT) as TOTAL_WT from hpjx.t_hpsc002 where PARENT_ID = #parentId#) a), set TOTAL_WT = (select TOTAL_WT from (select sum(TOTAL_WT) as TOTAL_WT from ${hpjxSchema}.t_hpsc002 where PARENT_ID = #parentId#) a),
UNIT_WT = (select TOTAL_WT from (select sum(TOTAL_WT) as TOTAL_WT from hpjx.t_hpsc002 where PARENT_ID = #parentId#) a)/NUM*1000 UNIT_WT = (select TOTAL_WT from (select sum(TOTAL_WT) as TOTAL_WT from ${hpjxSchema}.t_hpsc002 where PARENT_ID = #parentId#) a)/NUM*1000
where ID = #parentId# where ID = #parentId#
</update> </update>
<select id="checkExamineNum1" resultClass="int"> <select id="checkExamineNum1" resultClass="int">
SELECT COUNT(1) from hpjx.t_hpsc002 SELECT COUNT(1) from ${hpjxSchema}.t_hpsc002
WHERE 1 = 1 WHERE 1 = 1
AND PARENT_ID != 'root' AND PARENT_ID != 'root'
AND `STATUS` = 0 AND `STATUS` = 0
...@@ -508,12 +508,12 @@ ...@@ -508,12 +508,12 @@
</select> </select>
<select id="queryLv" resultClass="int"> <select id="queryLv" resultClass="int">
SELECT LV from hpjx.t_hpsc002 SELECT LV from ${hpjxSchema}.t_hpsc002
WHERE ID = #id# WHERE ID = #id#
</select> </select>
<select id="checkExamineNum1Count" resultClass="int"> <select id="checkExamineNum1Count" resultClass="int">
SELECT COUNT(1) from hpjx.t_hpsc002 SELECT COUNT(1) from ${hpjxSchema}.t_hpsc002
WHERE 1 = 1 WHERE 1 = 1
AND PARENT_ID != 'root' AND PARENT_ID != 'root'
<isNotEmpty prepend=" AND " property="projCode"> <isNotEmpty prepend=" AND " property="projCode">
...@@ -522,7 +522,7 @@ ...@@ -522,7 +522,7 @@
</select> </select>
<select id="checkExamineNum" resultClass="int"> <select id="checkExamineNum" resultClass="int">
SELECT COUNT(1) FROM hpjx.t_hpsc002 SELECT COUNT(1) FROM ${hpjxSchema}.t_hpsc002
WHERE LEAF = '1' WHERE LEAF = '1'
AND STATUS = 0 AND DEL_STATUS = 0 AND STATUS = 0 AND DEL_STATUS = 0
<isNotEmpty prepend=" AND " property="parentId"> <isNotEmpty prepend=" AND " property="parentId">
...@@ -548,8 +548,8 @@ ...@@ -548,8 +548,8 @@
<select id="queryList" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002"> <select id="queryList" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002">
SELECT SELECT
<include refid="column1"/> <include refid="column1"/>
FROM hpjx.t_hpsc002 A FROM ${hpjxSchema}.t_hpsc002 A
LEFT JOIN hpjx.t_hpsc005 B on A.ID = B.MAT_ID LEFT JOIN ${hpjxSchema}.t_hpsc005 B on A.ID = B.MAT_ID
WHERE 1=1 WHERE 1=1
AND DEL_STATUS = 0 AND DEL_STATUS = 0
<include refid="condition1"/> <include refid="condition1"/>
......
...@@ -114,11 +114,11 @@ ...@@ -114,11 +114,11 @@
SELECT SELECT
format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2) format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2)
FROM FROM
hpjx.T_HPSC004 ${hpjxSchema}.T_HPSC004
WHERE WHERE
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO PARENT_ID = ${hpjxSchema}.T_HPSC003.PLAN_INFO_NO
),'%') AS "schedule" ),'%') AS "schedule"
FROM hpjx.T_HPSC003 WHERE 1=1 FROM ${hpjxSchema}.T_HPSC003 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
...@@ -132,12 +132,12 @@ ...@@ -132,12 +132,12 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.T_HPSC003 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC003 WHERE 1=1
<include refid="condition" /> <include refid="condition" />
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.T_HPSC003 (ID, INSERT INTO ${hpjxSchema}.T_HPSC003 (ID,
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
PROJ_TYPE, <!-- 项目类型 --> PROJ_TYPE, <!-- 项目类型 -->
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
...@@ -170,16 +170,16 @@ ...@@ -170,16 +170,16 @@
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.T_HPSC003 WHERE DELETE FROM ${hpjxSchema}.T_HPSC003 WHERE
ID = #id# ID = #id#
</delete> </delete>
<delete id="deleteByMat"> <delete id="deleteByMat">
DELETE FROM hpjx.T_HPSC003 WHERE MAT_ID = #matId# DELETE FROM ${hpjxSchema}.T_HPSC003 WHERE MAT_ID = #matId#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.T_HPSC003 UPDATE ${hpjxSchema}.T_HPSC003
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 --> COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
PROJ_TYPE = #projType#, <!-- 项目类型 --> PROJ_TYPE = #projType#, <!-- 项目类型 -->
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
<!--计划完成时间回写--> <!--计划完成时间回写-->
<update id="updateDate"> <update id="updateDate">
UPDATE hpjx.T_HPSC003 UPDATE ${hpjxSchema}.T_HPSC003
SET SET
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 --> PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 -->
<include refid="updateRevise"/> <include refid="updateRevise"/>
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
<!-- 修改状态 --> <!-- 修改状态 -->
<update id="updateStatus"> <update id="updateStatus">
UPDATE hpjx.T_HPSC003 UPDATE ${hpjxSchema}.T_HPSC003
SET SET
STATUS = #status#, STATUS = #status#,
<include refid="updateRevise"/> <include refid="updateRevise"/>
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
<!-- 修改二维码地址 --> <!-- 修改二维码地址 -->
<update id="updateQrcode"> <update id="updateQrcode">
UPDATE hpjx.T_HPSC003 UPDATE ${hpjxSchema}.T_HPSC003
SET SET
QRCODE_DOC_ID = #qrcodeDocId#, QRCODE_DOC_ID = #qrcodeDocId#,
<include refid="updateRevise"/> <include refid="updateRevise"/>
......
...@@ -216,19 +216,19 @@ ...@@ -216,19 +216,19 @@
<select id="query" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004"> <select id="query" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.T_HPSC004 FROM ${hpjxSchema}.T_HPSC004
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="order"/> <include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.T_HPSC004 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC004 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.T_HPSC004 ( INSERT INTO ${hpjxSchema}.T_HPSC004 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 --> DEP_CODE, <!-- 部门编码 预留 -->
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
...@@ -281,16 +281,16 @@ ...@@ -281,16 +281,16 @@
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.T_HPSC004 WHERE ID = #id# DELETE FROM ${hpjxSchema}.T_HPSC004 WHERE ID = #id#
</delete> </delete>
<!-- 根据材料号删除 --> <!-- 根据材料号删除 -->
<delete id="deleteByMat"> <delete id="deleteByMat">
DELETE FROM hpjx.T_HPSC004 WHERE MAT_ID = #matId# DELETE FROM ${hpjxSchema}.T_HPSC004 WHERE MAT_ID = #matId#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.T_HPSC004 UPDATE ${hpjxSchema}.T_HPSC004
SET SET
PROJ_CODE = #projCode#, <!-- 项目编码 --> PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 --> PROJ_NAME = #projName#, <!-- 项目名称 -->
...@@ -333,7 +333,7 @@ ...@@ -333,7 +333,7 @@
<!-- 更新计划时间 --> <!-- 更新计划时间 -->
<update id="updatePlanDate"> <update id="updatePlanDate">
UPDATE hpjx.T_HPSC004 UPDATE ${hpjxSchema}.T_HPSC004
SET SET
PLAN_COMMENT_DATE = #planCommentDate#, <!-- 计划开始时间 --> PLAN_COMMENT_DATE = #planCommentDate#, <!-- 计划开始时间 -->
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划结束时间 --> PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划结束时间 -->
...@@ -343,7 +343,7 @@ ...@@ -343,7 +343,7 @@
<!-- 更新完成数量、重量、时间 --> <!-- 更新完成数量、重量、时间 -->
<update id="updateComplete"> <update id="updateComplete">
UPDATE hpjx.T_HPSC004 UPDATE ${hpjxSchema}.T_HPSC004
SET SET
ACTUAL_COMPLETION_DATE = #actualCompletionDate#, <!-- 实际完工日期 --> ACTUAL_COMPLETION_DATE = #actualCompletionDate#, <!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM = #actualCompletionNum#, <!-- 实际完工数量 --> ACTUAL_COMPLETION_NUM = #actualCompletionNum#, <!-- 实际完工数量 -->
...@@ -354,7 +354,7 @@ ...@@ -354,7 +354,7 @@
<!-- 更新订单号 --> <!-- 更新订单号 -->
<update id="updateProdOrderNo"> <update id="updateProdOrderNo">
UPDATE hpjx.T_HPSC004 UPDATE ${hpjxSchema}.T_HPSC004
SET SET
PROD_ORDER_NO = #prodOrderNo#, PROD_ORDER_NO = #prodOrderNo#,
<include refid="updateRevise"/> <include refid="updateRevise"/>
...@@ -365,19 +365,19 @@ ...@@ -365,19 +365,19 @@
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004"> resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.T_HPSC004 FROM ${hpjxSchema}.T_HPSC004
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
</select> </select>
<select id="inspectDetail" resultClass="int"> <select id="inspectDetail" resultClass="int">
SELECT COUNT(*) FROM hpjx.T_HPSC004 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC004 WHERE 1=1
AND PARENT_ID = #id# AND (PLAN_COMMENT_DATE = '' OR PLAN_COMMENT_DATE IS NULL AND PARENT_ID = #id# AND (PLAN_COMMENT_DATE = '' OR PLAN_COMMENT_DATE IS NULL
OR PLAN_COMPLETION_DATE = '' OR PLAN_COMPLETION_DATE IS NULL ) OR PLAN_COMPLETION_DATE = '' OR PLAN_COMPLETION_DATE IS NULL )
</select> </select>
<update id="updateRK"> <update id="updateRK">
UPDATE hpjx.T_HPSC004 UPDATE ${hpjxSchema}.T_HPSC004
SET SET
ACTUAL_COMPLETION_DATE = #actualCompletionDate#, <!-- 实际完工日期 --> ACTUAL_COMPLETION_DATE = #actualCompletionDate#, <!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM = #actualCompletionNum#, <!-- 实际完工数量 --> ACTUAL_COMPLETION_NUM = #actualCompletionNum#, <!-- 实际完工数量 -->
...@@ -419,7 +419,7 @@ ...@@ -419,7 +419,7 @@
<select id="queryDate" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004"> <select id="queryDate" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004">
SELECT SELECT
MAX(PLAN_COMPLETION_DATE) as "planCompletionDate" <!-- 计划结束时间 --> MAX(PLAN_COMPLETION_DATE) as "planCompletionDate" <!-- 计划结束时间 -->
FROM hpjx.T_HPSC004 WHERE 1=1 FROM ${hpjxSchema}.T_HPSC004 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
......
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
</delete> </delete>
<delete id="deleteByMat"> <delete id="deleteByMat">
DELETE FROM hpjx.T_HPSC005 WHERE MAT_ID = #matId# DELETE FROM ${hpjxSchema}.T_HPSC005 WHERE MAT_ID = #matId#
</delete> </delete>
<update id="update"> <update id="update">
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
MATERIAL_STATUS as "materialStatus" MATERIAL_STATUS as "materialStatus"
FROM hpjx.t_hpsc001 WHERE 1=1 FROM ${hpjxSchema}.t_hpsc001 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpsc001 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hpsc001 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
--> -->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hpsc001 (ID, INSERT INTO ${hpjxSchema}.t_hpsc001 (ID,
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
PROJ_TYPE, <!-- 项目类型 --> PROJ_TYPE, <!-- 项目类型 -->
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
...@@ -156,12 +156,12 @@ ...@@ -156,12 +156,12 @@
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hpsc001 WHERE DELETE FROM ${hpjxSchema}.t_hpsc001 WHERE
ID = #id# ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hpsc001 UPDATE ${hpjxSchema}.t_hpsc001
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 --> COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
PROJ_TYPE = #projType#, <!-- 项目类型 --> PROJ_TYPE = #projType#, <!-- 项目类型 -->
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
SELECT DISTINCT SELECT DISTINCT
PROJ_CODE as "projCode", PROJ_CODE as "projCode",
PROJ_NAME as "projName" PROJ_NAME as "projName"
FROM hpjx.t_hpsc001 WHERE 1=1 FROM ${hpjxSchema}.t_hpsc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
...@@ -195,6 +195,6 @@ ...@@ -195,6 +195,6 @@
</select> </select>
<update id="check"> <update id="check">
UPDATE hpjx.t_hpsc001 SET status = #status# WHERE ID = #id# UPDATE ${hpjxSchema}.t_hpsc001 SET status = #status# WHERE ID = #id#
</update> </update>
</sqlMap> </sqlMap>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- table information <!-- table information
Generate time : 2024-04-18 8:37:45 Generate time : 2024-04-18 8:37:45
Version : 1.0 Version : 1.0
tableName :hpjx.t_hpxs006 tableName :${hpjxSchema}.t_hpxs006
ID BIGINT NOT NULL primarykey, ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR, COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR, DEP_CODE VARCHAR,
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
REP_CUSTOM_ID as "repCustomId", <!-- 客户人员 --> REP_CUSTOM_ID as "repCustomId", <!-- 客户人员 -->
REP_USER_ID as "repUserId", <!-- 维修人员 --> REP_USER_ID as "repUserId", <!-- 维修人员 -->
REP_STATUS as "repStatus" <!-- 维修状态 0-待维修 1-已维修 --> REP_STATUS as "repStatus" <!-- 维修状态 0-待维修 1-已维修 -->
FROM hpjx.t_hpxs006 WHERE 1=1 FROM ${hpjxSchema}.t_hpxs006 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<include refid="condition"/> <include refid="condition"/>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpxs006 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hpxs006 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<include refid="condition"/> <include refid="condition"/>
</select> </select>
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
--> -->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hpxs006 (ID, <!-- ID --> INSERT INTO ${hpjxSchema}.t_hpxs006 (ID, <!-- ID -->
COMPANY_CODE, <!-- 公司编码 --> COMPANY_CODE, <!-- 公司编码 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
...@@ -156,12 +156,12 @@ ...@@ -156,12 +156,12 @@
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hpxs006 WHERE DELETE FROM ${hpjxSchema}.t_hpxs006 WHERE
ID = #id# ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hpxs006 UPDATE ${hpjxSchema}.t_hpxs006
SET SET
COMPANY_CODE = #companyCode#, <!-- 公司编码 --> COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 --> DEP_CODE = #depCode#, <!-- 部门编码 -->
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
</update> </update>
<update id="check"> <update id="check">
UPDATE hpjx.t_hpxs006 UPDATE ${hpjxSchema}.t_hpxs006
SET SET
REP_STATUS = #repStatus# <!-- 维修状态 0-待维修 1-已维修 --> REP_STATUS = #repStatus# <!-- 维修状态 0-待维修 1-已维修 -->
WHERE WHERE
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- table information <!-- table information
Generate time : 2024-04-22 14:15:25 Generate time : 2024-04-22 14:15:25
Version : 1.0 Version : 1.0
tableName :hpjx.t_hpxs007 tableName :${hpjxSchema}.t_hpxs007
ID BIGINT NOT NULL primarykey, ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR, COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR, DEP_CODE VARCHAR,
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
DEL_ORDER_NO as "delOrderNo", <!-- 发货单号 --> DEL_ORDER_NO as "delOrderNo", <!-- 发货单号 -->
FOL_TYPE as "folType", <!-- 回访方式 1-电话回访 2-上门回访 --> FOL_TYPE as "folType", <!-- 回访方式 1-电话回访 2-上门回访 -->
FOL_STATUS as "folStatus" <!-- 回访状态 0-待回访 1-已回访 --> FOL_STATUS as "folStatus" <!-- 回访状态 0-待回访 1-已回访 -->
FROM hpjx.t_hpxs007 WHERE 1=1 FROM ${hpjxSchema}.t_hpxs007 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<include refid="condition"/> <include refid="condition"/>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpxs007 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hpxs007 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<include refid="condition"/> <include refid="condition"/>
</select> </select>
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
--> -->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hpxs007 (ID, <!-- ID --> INSERT INTO ${hpjxSchema}.t_hpxs007 (ID, <!-- ID -->
COMPANY_CODE, <!-- 公司编码 --> COMPANY_CODE, <!-- 公司编码 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
...@@ -147,12 +147,12 @@ ...@@ -147,12 +147,12 @@
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hpxs007 WHERE DELETE FROM ${hpjxSchema}.t_hpxs007 WHERE
ID = #id# ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hpxs007 UPDATE ${hpjxSchema}.t_hpxs007
SET SET
COMPANY_CODE = #companyCode#, <!-- 公司编码 --> COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 --> DEP_CODE = #depCode#, <!-- 部门编码 -->
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
</update> </update>
<update id="check"> <update id="check">
UPDATE hpjx.t_hpxs007 UPDATE ${hpjxSchema}.t_hpxs007
SET SET
FOL_STATUS = #folStatus# <!-- 回访状态 0-待回访 1-已回访 --> FOL_STATUS = #folStatus# <!-- 回访状态 0-待回访 1-已回访 -->
WHERE WHERE
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
<select id="getSaleCode" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="getSaleCode" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select SALE_NO as "saleNo" select SALE_NO as "saleNo"
from hpjx.T_HPKC004 from ${hpjxSchema}.T_HPKC004
where DELETE_FLAG = 0 and IS_PRINT = 1 where DELETE_FLAG = 0 and IS_PRINT = 1
<include refid="authCondition"/> <include refid="authCondition"/>
</select> </select>
......
...@@ -129,18 +129,18 @@ ...@@ -129,18 +129,18 @@
<select id="query" resultClass="com.baosight.hpjx.hp.zl.domain.HPZL001"> <select id="query" resultClass="com.baosight.hpjx.hp.zl.domain.HPZL001">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM hpjx.t_hpzl001 WHERE 1=1 FROM ${hpjxSchema}.t_hpzl001 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="order"/> <include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpzl001 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.t_hpzl001 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hpzl001 ( INSERT INTO ${hpjxSchema}.t_hpzl001 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
RECEIPT_DATE, <!-- 单据日期 --> RECEIPT_DATE, <!-- 单据日期 -->
...@@ -175,14 +175,14 @@ ...@@ -175,14 +175,14 @@
<!-- 逻辑删除--> <!-- 逻辑删除-->
<delete id="delete"> <delete id="delete">
UPDATE hpjx.t_hpzl001 UPDATE ${hpjxSchema}.t_hpzl001
SET DELETE_FLAG = 1, SET DELETE_FLAG = 1,
<include refid="updateRevise"/> <include refid="updateRevise"/>
WHERE ID = #id# WHERE ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hpzl001 UPDATE ${hpjxSchema}.t_hpzl001
SET SET
POOR_TYPE = #poorType#, <!-- 不良品类 --> POOR_TYPE = #poorType#, <!-- 不良品类 -->
PROBLEM_DESC = #problemDesc#, <!-- 质量问题描述 --> PROBLEM_DESC = #problemDesc#, <!-- 质量问题描述 -->
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
<!-- 已处理 --> <!-- 已处理 -->
<update id="doProcess"> <update id="doProcess">
UPDATE hpjx.t_hpzl001 UPDATE ${hpjxSchema}.t_hpzl001
SET SET
STATUS = #status#, STATUS = #status#,
CHECK_USER = #checkUser#, <!-- 检查人 --> CHECK_USER = #checkUser#, <!-- 检查人 -->
...@@ -207,7 +207,7 @@ ...@@ -207,7 +207,7 @@
<!-- 移动端已处理 --> <!-- 移动端已处理 -->
<update id="doProcess2"> <update id="doProcess2">
UPDATE hpjx.t_hpzl001 UPDATE ${hpjxSchema}.t_hpzl001
SET SET
STATUS = #status#, STATUS = #status#,
CHECK_USER = #checkUser#, <!-- 检查人 --> CHECK_USER = #checkUser#, <!-- 检查人 -->
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
<!-- 更新附件信息 --> <!-- 更新附件信息 -->
<update id="updateAffix"> <update id="updateAffix">
UPDATE hpjx.t_hpzl001 UPDATE ${hpjxSchema}.t_hpzl001
SET SET
AFFIX = #affix#, <!-- 附件 --> AFFIX = #affix#, <!-- 附件 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
......
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