Browse Source

成本分配

zengtx 1 year ago
parent
commit
0aa5e1fddd

+ 22 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationFabricMapper.xml

@@ -48,8 +48,8 @@ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
 		join UFDATA_101_2021.dbo.OM_MOMaterials ot on ot.MoDetailsID=od.MODetailsID
 		join UFDATA_101_2021.dbo.Inventory oti on oti.cInvCode=ot.cInvCode
 		join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser')
-		and om.cCode like CONCAT(#{code},'%') 	and omi.cInvCcode like '19%' and om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser')
+		and om.cCode like CONCAT(#{code},'%') 	and omi.cInvCcode like '19%' and om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser')
 		GROUP BY oti.cInvCode
 		) vim on vim.cInvCode = vif.cInvCode
 		where trim(vif.cCode) like CONCAT(#{code},'%')
@@ -65,7 +65,7 @@ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
 		from UFDATA_101_2021.dbo.PO_POmain om
 		join UFDATA_101_2021.dbo.PO_PODetails od on om.poid=od.poid
 		join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser='asuser')
 		and om.cPOID like CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvCode
@@ -77,7 +77,7 @@ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
 		from UFDATA_101_2021.dbo.om_momain om
 		join UFDATA_101_2021.dbo.OM_MODetails od on om.moid=od.moid
 		join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser='asuser')
 		and om.cCode like CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvCode
@@ -91,7 +91,7 @@ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
 		from UFDATA_101_2021.dbo.om_momain om
 		join UFDATA_101_2021.dbo.OM_MODetails od on om.moid=od.moid
 		join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser')
 		and omi.cInvCcode like '19%' and om.cCode like CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvCode
@@ -125,8 +125,8 @@ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
 		join UFDATA_103_2021.dbo.OM_MOMaterials ot on ot.MoDetailsID=od.MODetailsID
 		join UFDATA_103_2021.dbo.Inventory oti on oti.cInvCode=ot.cInvCode
 		join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser')
-		and om.cCode like CONCAT(#{code},'%') and om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser')
+		and om.cCode like CONCAT(#{code},'%') and om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser')
 		and omi.cInvCcode like '19%'
 		GROUP BY oti.cInvCode
 		) vim on vim.cInvCode = vif.cInvCode
@@ -143,7 +143,7 @@ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
 		from UFDATA_103_2021.dbo.PO_POmain om
 		join UFDATA_103_2021.dbo.PO_PODetails od on om.poid=od.poid
 		join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser='asuser')
 		and om.cPOID like CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvCode
@@ -155,7 +155,7 @@ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
 		from UFDATA_103_2021.dbo.om_momain om
 		join UFDATA_103_2021.dbo.OM_MODetails od on om.moid=od.moid
 		join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser='asuser')
 		and om.cCode like CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvCode
@@ -169,7 +169,7 @@ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
 		from UFDATA_103_2021.dbo.om_momain om
 		join UFDATA_103_2021.dbo.OM_MODetails od on om.moid=od.moid
 		join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser')
 		and omi.cInvCcode like '19%' and om.cCode like CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvCode
@@ -196,7 +196,7 @@ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
 		from UFDATA_101_2021.dbo.PO_POmain om
 		join UFDATA_101_2021.dbo.PO_PODetails od on om.poid=od.poid
 		join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser!='asuser') and omi.cInvCcode like '19%'
+		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser='asuser') and omi.cInvCcode like '19%'
 		and om.cPOID like CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvName,rs.cBatch,rs.cFree1
@@ -208,7 +208,7 @@ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
 		from UFDATA_101_2021.dbo.om_momain om
 		join UFDATA_101_2021.dbo.OM_MODetails od on om.moid=od.moid
 		join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser!='asuser') and omi.cInvCcode like '19%'
+		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser='asuser') and omi.cInvCcode like '19%'
 		and om.cCode like CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvName,rs.cBatch,rs.cFree1
@@ -222,7 +222,7 @@ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
 		from UFDATA_101_2021.dbo.om_momain om
 		join UFDATA_101_2021.dbo.OM_MODetails od on om.moid=od.moid
 		join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser')
 		and omi.cInvCcode like '19%' and om.cCode like CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvName,rs.cBatch,rs.cFree1
@@ -245,7 +245,7 @@ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
 		from UFDATA_103_2021.dbo.PO_POmain om
 		join UFDATA_103_2021.dbo.PO_PODetails od on om.poid=od.poid
 		join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser!='asuser') and omi.cInvCcode like '19%'
+		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser='asuser') and omi.cInvCcode like '19%'
 		and om.cPOID like CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvName,rs.cBatch,rs.cFree1
@@ -257,7 +257,7 @@ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
 		from UFDATA_103_2021.dbo.om_momain om
 		join UFDATA_103_2021.dbo.OM_MODetails od on om.moid=od.moid
 		join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser!='asuser') and omi.cInvCcode like '19%'
+		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser='asuser') and omi.cInvCcode like '19%'
 		and om.cCode like CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvName,rs.cBatch,rs.cFree1
@@ -271,7 +271,7 @@ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
 		from UFDATA_103_2021.dbo.om_momain om
 		join UFDATA_103_2021.dbo.OM_MODetails od on om.moid=od.moid
 		join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser')
 		and omi.cInvCcode like '19%' and om.cCode like CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvName,rs.cBatch,rs.cFree1
@@ -289,7 +289,7 @@ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
 	join UFDATA_101_2021.dbo.OM_MOMaterials ot on ot.MoDetailsID=od.MODetailsID
 	join UFDATA_101_2021.dbo.Inventory oti on oti.cInvCode=ot.cInvCode
 	join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-	WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and omi.cInvCcode like '19%' and om.cCode LIKE CONCAT(#{code},'%') and oti.cInvName = #{goodName}
+	WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and omi.cInvCcode like '19%' and om.cCode LIKE CONCAT(#{code},'%') and oti.cInvName = #{goodName}
 	and (oti.cInvCcode like '03%' or oti.cInvCcode like '04%') and oti.cInvCCode != '0399' and oti.cInvCCode != '0499'
 	GROUP BY oti.cInvName,ot.cFree1
 
@@ -301,7 +301,7 @@ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
 	join UFDATA_103_2021.dbo.OM_MOMaterials ot on ot.MoDetailsID=od.MODetailsID
 	join UFDATA_103_2021.dbo.Inventory oti on oti.cInvCode=ot.cInvCode
 	join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-	WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and omi.cInvCcode like '19%' and om.cCode LIKE CONCAT(#{code},'%') and oti.cInvName = #{goodName}
+	WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and omi.cInvCcode like '19%' and om.cCode LIKE CONCAT(#{code},'%') and oti.cInvName = #{goodName}
 	and (oti.cInvCcode like '03%' or oti.cInvCcode like '04%') and oti.cInvCCode != '0399' and oti.cInvCCode != '0499'
 	GROUP BY oti.cInvName,ot.cFree1
 	</select>
@@ -320,7 +320,7 @@ select
 		join UFDATA_101_2021.dbo.OM_MOMaterials ot on ot.MoDetailsID=od.MODetailsID
 		join UFDATA_101_2021.dbo.Inventory oti on oti.cInvCode=ot.cInvCode
 		join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and omi.cInvCcode like '19%' and om.cCode like CONCAT(#{code},'%') and oti.cInvName = #{goodName}
+		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and omi.cInvCcode like '19%' and om.cCode like CONCAT(#{code},'%') and oti.cInvName = #{goodName}
 		GROUP BY ot.cFree1
 		) tab
 		left join
@@ -332,7 +332,7 @@ select
 			from UFDATA_101_2021.dbo.PO_POmain om
 		join UFDATA_101_2021.dbo.PO_PODetails od on om.poid=od.poid
 		join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser='asuser')
 		 and om.cPOID like CONCAT(#{code},'%')
 		)  and i.cInvName = #{goodName}
 		 and rs.cBatch like CONCAT(#{code},'%')
@@ -354,7 +354,7 @@ select
 		join UFDATA_103_2021.dbo.OM_MOMaterials ot on ot.MoDetailsID=od.MODetailsID
 		join UFDATA_103_2021.dbo.Inventory oti on oti.cInvCode=ot.cInvCode
 		join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and omi.cInvCcode like '19%' and om.cCode like CONCAT(#{code},'%') and oti.cInvName = #{goodName}
+		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and omi.cInvCcode like '19%' and om.cCode like CONCAT(#{code},'%') and oti.cInvName = #{goodName}
 		GROUP BY ot.cFree1
 		) tab
 		left join
@@ -366,7 +366,7 @@ select
 			from UFDATA_101_2021.dbo.PO_POmain om
 		join UFDATA_103_2021.dbo.PO_PODetails od on om.poid=od.poid
 		join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser='asuser')
 		 and om.cPOID like CONCAT(#{code},'%')
 		)  and i.cInvName = #{goodName}
 		 and rs.cBatch like CONCAT(#{code},'%')

+ 19 - 19
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationIngredientMapper.xml

@@ -49,7 +49,7 @@
 		JOIN UFDATA_103_2021.dbo.Inventory omi ON omi.cInvCode= od.cInvCode
 		WHERE
 		om.iVerifyStateNew = 2
-		AND ( om.cCloser IS NULL OR om.cCloser!='asuser' )
+		AND ( om.cCloser IS NULL OR om.cCloser='asuser' )
 		AND omi.cInvCcode LIKE '19%'
 		AND om.cCode LIKE CONCAT(#{code},'%')
 
@@ -94,7 +94,7 @@
 		JOIN UFDATA_103_2021.dbo.Inventory omi ON omi.cInvCode= od.cInvCode
 		WHERE
 		om.iVerifyStateNew = 2
-		AND ( om.cCloser IS NULL OR om.cCloser!='asuser' )
+		AND ( om.cCloser IS NULL OR om.cCloser='asuser' )
 		AND omi.cInvCcode LIKE '19%'
 		AND om.cCode LIKE CONCAT(#{code},'%')
 
@@ -136,7 +136,7 @@
 		from UFDATA_103_2021.dbo.PO_POmain om
 		join UFDATA_103_2021.dbo.PO_PODetails od on om.POID=od.POID
 		join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser='asuser')
 		and om.cPOID LIKE CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvCode,i.cInvName
@@ -148,7 +148,7 @@
 		from UFDATA_103_2021.dbo.om_momain om
 		join UFDATA_103_2021.dbo.OM_MODetails od on om.MOID=od.MOID
 		join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser='asuser')
 		and om.cCode like CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvCode,i.cInvName
@@ -162,7 +162,7 @@
 		from UFDATA_103_2021.dbo.om_momain om
 		join UFDATA_103_2021.dbo.OM_MODetails od on om.moid=od.moid
 		join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser')
 		and omi.cInvCcode like '19%' and om.cCode LIKE CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvCode,i.cInvName--,rs.cBatch
@@ -196,7 +196,7 @@
 		join UFDATA_101_2021.dbo.Inventory oti on oti.cInvCode=ot.cInvCode
 		join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
 
-		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and omi.cInvCcode like '19%'
+		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and omi.cInvCcode like '19%'
 		and om.cCode LIKE CONCAT(#{code},'%')
 		group by ot.cInvCode,od.isosid,om.ccode,oti.cInvName
 		) as t1,
@@ -227,7 +227,7 @@
 		join UFDATA_101_2021.dbo.Inventory oti on oti.cInvCode=ot.cInvCode
 		join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
 
-		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and omi.cInvCcode like '19%'
+		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and omi.cInvCcode like '19%'
 		and om.cCode LIKE CONCAT(#{code},'%')
 		group by ot.cInvCode,od.isosid,om.ccode,oti.cInvName
 		) as t1
@@ -261,7 +261,7 @@
 		join UFDATA_101_2021.dbo.Inventory oti on oti.cInvCode=ot.cInvCode
 		join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
 
-		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and omi.cInvCcode like '19%'
+		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and omi.cInvCcode like '19%'
 		and om.cCode LIKE CONCAT(#{code},'%')
 		group by ot.cInvCode,od.isosid,om.ccode,oti.cInvName
 		) as t1,
@@ -299,7 +299,7 @@
 		from UFDATA_101_2021.dbo.PO_POmain om
 		join UFDATA_101_2021.dbo.PO_PODetails od on om.POID=od.POID
 		join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser='asuser')
 		and om.cPOID LIKE CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvCode,i.cInvName
@@ -311,7 +311,7 @@
 		from UFDATA_101_2021.dbo.om_momain om
 		join UFDATA_101_2021.dbo.OM_MODetails od on om.MOID=od.MOID
 		join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser='asuser')
 		and om.cCode like CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvCode,i.cInvName
@@ -325,7 +325,7 @@
 		from UFDATA_101_2021.dbo.om_momain om
 		join UFDATA_101_2021.dbo.OM_MODetails od on om.moid=od.moid
 		join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser')
 		and omi.cInvCcode like '19%' and om.cCode LIKE CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvCode,i.cInvName
@@ -369,7 +369,7 @@
 						 where pm.cVenCode != 'T010001' and pom.cVenCode = 'T010001'
 						 GROUP BY pod.cInvCode,pod.iorderdid
 				 ) pb on pb.cInvCode=ot.cInvCode and pb.iorderdid=od.isosid
-				WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and omi.cInvCcode like '19%'
+				WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and omi.cInvCcode like '19%'
 							and om.cCode LIKE CONCAT(#{code},'%') and (oti.cInvCcode like '05%' or oti.cInvCcode like '06%'
 							or oti.cInvCcode like '07%' or oti.cInvCCode = '0399' or oti.cInvCCode = '0499')
 							and oti.cInvName = #{goodName}
@@ -384,7 +384,7 @@
 		from UFDATA_101_2021.dbo.PO_POmain om
 		join UFDATA_101_2021.dbo.PO_PODetails od on om.POID=od.POID
 		join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser='asuser')
 		and om.cPOID like CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvCode,i.cInvName,rs.cBatch
@@ -398,7 +398,7 @@
 						from UFDATA_101_2021.dbo.om_momain om
 						join UFDATA_101_2021.dbo.OM_MODetails od on om.moid=od.moid
 						join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-						WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser')
+						WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser')
 									and omi.cInvCcode like '19%' and om.cCode like CONCAT(#{code},'%')
 				) and (i.cInvCcode like '05%' or i.cInvCcode like '06%' or i.cInvCcode like '07%'
 						or i.cInvCCode = '0399' or i.cInvCCode = '0499' or i.cInvCCode = '0299')
@@ -425,7 +425,7 @@
 						join UFDATA_103_2021.dbo.PurBillVouchs bi  on bi.iPOsID=p.ID
 						GROUP BY p.cInvCode,p.iorderdid
 				 ) pb on pb.cInvCode=ot.cInvCode and pb.iorderdid=od.isosid
-				WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and omi.cInvCcode like '19%'
+				WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and omi.cInvCcode like '19%'
 							and om.cCode LIKE CONCAT(#{code},'%') and (oti.cInvCcode like '05%' or oti.cInvCcode like '06%'
 							or oti.cInvCcode like '07%' or oti.cInvCCode = '0399' or oti.cInvCCode = '0499')
 							and oti.cInvName = #{goodName}
@@ -440,7 +440,7 @@
 		from UFDATA_103_2021.dbo.PO_POmain om
 		join UFDATA_103_2021.dbo.PO_PODetails od on om.POID=od.POID
 		join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser!='asuser')
+		WHERE om.cVerifier is not null and (om.cCloser is null or om.cCloser='asuser')
 		and om.cPOID like CONCAT(#{code},'%')
 		)
 		GROUP BY i.cInvCode,i.cInvName,rs.cBatch
@@ -454,7 +454,7 @@
 						from UFDATA_103_2021.dbo.om_momain om
 						join UFDATA_103_2021.dbo.OM_MODetails od on om.moid=od.moid
 						join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
-						WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser')
+						WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser')
 									and omi.cInvCcode like '19%' and om.cCode like CONCAT(#{code},'%')
 				) and (i.cInvCcode like '05%' or i.cInvCcode like '06%' or i.cInvCcode like '07%'
 						or i.cInvCCode = '0399' or i.cInvCCode = '0499' or i.cInvCCode = '0299')
@@ -493,7 +493,7 @@
 						 where pm.cVenCode != 'T010001' and pom.cVenCode = 'T010001'
 						 GROUP BY pod.cInvCode,pod.iorderdid
 				 ) pb on pb.cInvCode=ot.cInvCode and pb.iorderdid=od.isosid
-		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and omi.cInvCcode like '19%'
+		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and omi.cInvCcode like '19%'
 					and om.cCode LIKE CONCAT(#{code},'%') and (oti.cInvCcode like '05%' or oti.cInvCcode like '06%'
 					or oti.cInvCcode like '07%' or oti.cInvCCode = '0399' or oti.cInvCCode = '0499')
 					and oti.cInvName = #{goodName}
@@ -514,7 +514,7 @@
 				join UFDATA_103_2021.dbo.PurBillVouchs bi  on bi.iPOsID=p.ID
 				GROUP BY p.cInvCode,p.iorderdid
 		 ) pb on pb.cInvCode=ot.cInvCode and pb.iorderdid=od.isosid
-		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and omi.cInvCcode like '19%'
+		WHERE om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and omi.cInvCcode like '19%'
 					and om.cCode LIKE CONCAT(#{code},'%') and (oti.cInvCcode like '05%' or oti.cInvCcode like '06%'
 					or oti.cInvCcode like '07%' or oti.cInvCCode = '0399' or oti.cInvCCode = '0499')
 					and oti.cInvName = #{goodName}

+ 4 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationMapper.xml

@@ -40,7 +40,7 @@
                      UFDATA_101_2021.dbo.OM_MOMain om     
                      inner JOIN UFDATA_101_2021.dbo.OM_MODetails od ON om.MOID = od.MOID      
                      WHERE     
-                     om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and om.cCode like CONCAT(#{code},'%')
+                     om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and om.cCode like CONCAT(#{code},'%')
                      ) o ON s.isosid  = o.isosid AND s.cInvCode = o.cInvCode     
         inner JOIN UFDATA_101_2021.dbo.Vendor v ON o.supplierCode= v.cVenCode     
         inner JOIN UFDATA_101_2021.dbo.Inventory c on c.cInvCode=s.cInvCode     
@@ -68,7 +68,7 @@
                      UFDATA_103_2021.dbo.OM_MOMain om     
                      inner JOIN UFDATA_103_2021.dbo.OM_MODetails od ON om.MOID = od.MOID      
                      WHERE     
-                     om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and om.cCode like CONCAT(#{code},'%')
+                     om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and om.cCode like CONCAT(#{code},'%')
                      ) o ON a.isosid  = o.isosid AND a.cInvCode = o.cInvCode     
         inner JOIN UFDATA_103_2021.dbo.Vendor v ON o.supplierCode= v.cVenCode     
         inner JOIN UFDATA_103_2021.dbo.Inventory c on c.cInvCode=a.cInvCode     
@@ -108,7 +108,7 @@
                      UFDATA_103_2021.dbo.OM_MOMain om     
                      inner JOIN UFDATA_103_2021.dbo.OM_MODetails od ON om.MOID = od.MOID      
                      WHERE     
-                     om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and om.cCode like CONCAT(#{code},'%')
+                     om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and om.cCode like CONCAT(#{code},'%')
                      ) o ON a.isosid  = o.isosid AND a.cInvCode = o.cInvCode     
         inner JOIN UFDATA_103_2021.dbo.Vendor v ON o.supplierCode= v.cVenCode     
         inner JOIN UFDATA_103_2021.dbo.Inventory c on c.cInvCode=a.cInvCode     
@@ -146,7 +146,7 @@
                      UFDATA_103_2021.dbo.OM_MOMain om
                      inner JOIN UFDATA_103_2021.dbo.OM_MODetails od ON om.MOID = od.MOID
                      WHERE
-                     om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and om.cCode like CONCAT(#{code},'%')
+                     om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and om.cCode like CONCAT(#{code},'%')
                      ) o ON a.isosid  = o.isosid AND a.cInvCode = o.cInvCode
         inner JOIN UFDATA_103_2021.dbo.Vendor v ON o.supplierCode= v.cVenCode
         inner JOIN UFDATA_103_2021.dbo.Inventory c on c.cInvCode=a.cInvCode

+ 3 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationShipdetailMapper.xml

@@ -86,7 +86,7 @@ GROUP BY sbv.cDefine10,sbv.iExchRate,sbv.cSOCode
 									 left join UFDATA_103_2021.dbo.PurBillVouch pb  on bi.PBVID =pb.PBVID 
 									 	left join UFDATA_103_2021.dbo.Inventory inv on bi.cInvCode = inv.cInvCode
 									 WHERE
-									 om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and om.cCode like CONCAT(#{code},'%') and inv.cInvCCode like '19%'
+									 om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and om.cCode like CONCAT(#{code},'%') and inv.cInvCCode like '19%'
 									 GROUP BY od.csoordercode
 									 ) o ON a.csocode = o.csoordercode 
 						inner JOIN UFDATA_103_2021.dbo.Vendor v ON o.supplierCode= v.cVenCode
@@ -145,7 +145,7 @@ GROUP BY sbv.cDefine10,sbv.iExchRate,sbv.cSOCode
 									  left join UFDATA_103_2021.dbo.PurBillVouch pb  on bi.PBVID =pb.PBVID 
 										left join UFDATA_103_2021.dbo.Inventory inv on bi.cInvCode = inv.cInvCode
 									 WHERE
-									 om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and om.cCode like CONCAT(#{code},'%') and inv.cInvCCode like '19%'
+									 om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and om.cCode like CONCAT(#{code},'%') and inv.cInvCCode like '19%'
 									 GROUP BY od.csoordercode
 									 ) o ON a.csocode = o.csoordercode 
 						inner JOIN UFDATA_103_2021.dbo.Vendor v ON o.supplierCode= v.cVenCode
@@ -205,7 +205,7 @@ UNION ALL
 									  left join UFDATA_103_2021.dbo.PurBillVouch pb  on bi.PBVID =pb.PBVID 
 										left join UFDATA_103_2021.dbo.Inventory inv on bi.cInvCode = inv.cInvCode
 									 WHERE
-									 om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser!='asuser') and om.cCode like CONCAT(#{code},'%') and inv.cInvCCode like '19%'
+									 om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser') and om.cCode like CONCAT(#{code},'%') and inv.cInvCCode like '19%'
 									 GROUP BY od.csoordercode
 									 ) o ON a.csocode = o.csoordercode 
 						inner JOIN UFDATA_103_2021.dbo.Vendor v ON o.supplierCode= v.cVenCode

+ 4 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationServiceImpl.java

@@ -81,17 +81,20 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
 
     public Result<T> saveMain(String plannum, SyCostAllocation json) {
         Result<T> result = new Result<>();
+
+        String status = "保存";
         //查询保存表中有没有当前单据 如果有 更新操作:删除旧单据并重新添加新单据
         Map<String,Object> queryMap = new HashMap();
         queryMap.put("plan_num",plannum);
         List<SyCostJson> list = syCostJsonMapper.selectByMap(queryMap);
         if(list.size()>0){
+            status = list.get(0).getStatus();
             syCostJsonMapper.deleteByMap(queryMap);
         }
 
         JSONObject costJson = JSONObject.parseObject(JSON.toJSONString(json));
         SyCostJson cost = new SyCostJson();
-        cost.setStatus("保存");
+        cost.setStatus(status);
         cost.setPlanNum(plannum);
         cost.setCostInfo(costJson);
         int i = syCostJsonMapper.insert(cost);