|
@@ -172,6 +172,12 @@
|
|
|
<if test="sy.makingPeople != null and sy.makingPeople !=''">
|
|
|
AND JSON_EXTRACT( content, '$.makingPeople' ) LIKE CONCAT('%',#{sy.makingPeople},'%')
|
|
|
</if>
|
|
|
+ <if test="sy.sumList != null">
|
|
|
+ plan_code in
|
|
|
+ <foreach open="(" close=")" separator="," collection="list" item="item" index="index">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<select id="queryCostAllocation" resultType="org.jeecg.modules.documents.costLossReview.entity.CostAllocationReview">
|
|
@@ -262,4 +268,78 @@
|
|
|
from sy_cost_json
|
|
|
where plan_num=#{planCode}
|
|
|
</select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="queryCodeBymaker" resultType="String">
|
|
|
+ select planNo as cCode from (
|
|
|
+ select LEFT(cSOCode,CHARINDEX('-',cSOCode)-1) as planNo,cMaker as maker from UFDATA_103_2021.dbo.SO_SOMain s
|
|
|
+ JOIN UFDATA_103_2021.dbo.Department de ON s.cDepCode = de.cDepCode
|
|
|
+ JOIN UFDATA_103_2021.dbo.Person pe ON s.cMaker = pe.cPersonName
|
|
|
+ where cSOCode like 'sy%' and CHARINDEX('-',cSOCode)>0 and pe.cdepcode='TPD02'
|
|
|
+
|
|
|
+ union all
|
|
|
+ select LEFT(cCode,CHARINDEX('-',cCode)-1) as planNo,cMaker as maker from UFDATA_103_2021.dbo.OM_MOMain s
|
|
|
+ JOIN UFDATA_103_2021.dbo.Department de ON s.cDepCode = de.cDepCode
|
|
|
+ JOIN UFDATA_103_2021.dbo.Person pe ON s.cMaker = pe.cPersonName
|
|
|
+ where cCode like 'sy%' and CHARINDEX('-',cCode)>0 and pe.cdepcode='TPD02'
|
|
|
+
|
|
|
+ union all
|
|
|
+ select LEFT(cPOID,CHARINDEX('-',cPOID)-1) as planNo,cMaker as maker from UFDATA_103_2021.dbo.PO_Pomain s
|
|
|
+ JOIN UFDATA_103_2021.dbo.Department de ON s.cDepCode = de.cDepCode
|
|
|
+ JOIN UFDATA_103_2021.dbo.Person pe ON s.cMaker = pe.cPersonName
|
|
|
+ where cPOID like 'sy%' and CHARINDEX('-',cPOID)>0 and pe.cdepcode='TPD02'
|
|
|
+
|
|
|
+ union all
|
|
|
+ select LEFT(cSOCode,CHARINDEX('-',cSOCode)-1) as planNo,cMaker as maker from UFDATA_101_2021.dbo.SO_SOMain s
|
|
|
+ JOIN UFDATA_101_2021.dbo.Department de ON s.cDepCode = de.cDepCode
|
|
|
+ JOIN UFDATA_101_2021.dbo.Person pe ON s.cMaker = pe.cPersonName
|
|
|
+ where cSOCode like 'sy%' and CHARINDEX('-',cSOCode)>0 and pe.cdepcode='TPD02'
|
|
|
+
|
|
|
+ union all
|
|
|
+ select LEFT(cCode,CHARINDEX('-',cCode)-1) as planNo,cMaker as maker from UFDATA_101_2021.dbo.OM_MOMain s
|
|
|
+ JOIN UFDATA_101_2021.dbo.Department de ON s.cDepCode = de.cDepCode
|
|
|
+ JOIN UFDATA_101_2021.dbo.Person pe ON s.cMaker = pe.cPersonName
|
|
|
+ where cCode like 'sy%' and CHARINDEX('-',cCode)>0 and pe.cdepcode='TPD02'
|
|
|
+
|
|
|
+ union all
|
|
|
+ select LEFT(cPOID,CHARINDEX('-',cPOID)-1) as planNo,cMaker as maker from UFDATA_101_2021.dbo.PO_Pomain s
|
|
|
+ JOIN UFDATA_101_2021.dbo.Department de ON s.cDepCode = de.cDepCode
|
|
|
+ JOIN UFDATA_101_2021.dbo.Person pe ON s.cMaker = pe.cPersonName
|
|
|
+ where cPOID like 'sy%' and CHARINDEX('-',cPOID)>0 and pe.cdepcode='TPD02'
|
|
|
+
|
|
|
+ union all
|
|
|
+ select LEFT(cPOID,CHARINDEX('-',cPOID)-1) as planNo,cMaker as maker from UFDATA_102_2021.dbo.PO_Pomain s
|
|
|
+ JOIN UFDATA_102_2021.dbo.Department de ON s.cDepCode = de.cDepCode
|
|
|
+ JOIN UFDATA_102_2021.dbo.Person pe ON s.cMaker = pe.cPersonName
|
|
|
+ where cPOID like 'sy%' and CHARINDEX('-',cPOID)>0 and pe.cdepcode='TPD02'
|
|
|
+
|
|
|
+ union all
|
|
|
+ select LEFT(cSOCode,CHARINDEX('-',cSOCode)-1) as planNo,cMaker as maker from UFDATA_102_2021.dbo.SO_SOMain s
|
|
|
+ JOIN UFDATA_102_2021.dbo.Department de ON s.cDepCode = de.cDepCode
|
|
|
+ JOIN UFDATA_102_2021.dbo.Person pe ON s.cMaker = pe.cPersonName
|
|
|
+ where cSOCode like 'sy%' and CHARINDEX('-',cSOCode)>0 and pe.cdepcode='TPD02'
|
|
|
+ ) as views
|
|
|
+ where maker =#{maker}
|
|
|
+ group by planNo,maker
|
|
|
+ </select>
|
|
|
+ <select id="queryCodeByfstatus" resultType="String">
|
|
|
+ select plan_code as cCode
|
|
|
+ from sy_fabric_loss_report
|
|
|
+ where status=#{status}
|
|
|
+ </select>
|
|
|
+ <select id="queryCodeBycstatus" resultType="String">
|
|
|
+ select plan_num as cCode
|
|
|
+ from sy_cost_json
|
|
|
+ where status=#{status}
|
|
|
+ </select>
|
|
|
+ <select id="queryCodeByPlanTable" resultType="String">
|
|
|
+ select plan_num as cCode from sy_plan_statistics
|
|
|
+ where 1=1
|
|
|
+ <if test="remarks!=null and remarks!=''">
|
|
|
+ and remarks=#{remarks}
|
|
|
+ </if>
|
|
|
+ <if test="planMan!=null and planMan!=''">
|
|
|
+ and plan_man={planMan}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|