Browse Source

面料损耗更新

fenghaifu 1 year ago
parent
commit
e56eb65534

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/mapper/xml/FabricLossMapper.xml

@@ -640,7 +640,7 @@
 					where trim(a.ccode) like CONCAT(#{code},'%')  and a.ccode not like '%样%' and
 						(d.cInvCCode like '01%' or d.cInvCCode like '02%' or d.cInvCCode like '03%' or d.cInvCCode like '04%')
 			) or trim(e.cSOCode) like CONCAT(#{code},'%')
-		) as t1 where (cInvCCode like '01%' or cInvCCode like '02%' or cInvCCode like '03%' or cInvCCode like '04%') and cInvCCode not in ('0299','0399','0499')
+		) as t1 where (cInvCCode like '01%' or cInvCCode like '02%' or cInvCCode like '03%' or cInvCCode like '04%')
 	</select>
 	<!--获取本次采购入库的形态转换-->
 	<select id="getPoAssemVouchList" resultType="map">

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

@@ -1841,6 +1841,9 @@ public class FabricLossServiceImpl extends ServiceImpl<FabricLossMapper, FabricL
 		if (oConvertUtils.listIsNotEmpty(outList1)){
 			otherOutList.addAll(outList1);
 		}
+		// 把成衣材料出库和销售出库cBusType设置成否,只用于扣减入库。不作为转入成本
+		otherOutList.forEach(e->e.setCBusType("否"));
+
 		allOutList.addAll(otherOutList);
 		allOutList.forEach(e->{
 			if (oConvertUtils.isEmpty(e.getCSourceInvId())) {
@@ -1894,7 +1897,7 @@ public class FabricLossServiceImpl extends ServiceImpl<FabricLossMapper, FabricL
 		List<FabricCostInvoiceDetail> costInvoiceDetailList = new ArrayList<>();
 
 		for (FabricMoOrderCK itemOut : allOutList){
-			if (DoubleOperation.getScale(itemOut.getIQuantityOut(),4)!=0) {
+			if (DoubleOperation.getScale(itemOut.getIQuantityOut(),4)!=0 && !"否".equalsIgnoreCase(itemOut.getCBusType())) {
 				FabricCostInvoiceDetail costInvoiceDetail = FabricCostInvoiceDetail.get(itemOut,"转入成本");
 				Optional<FabricCostInvoiceDetail> findOpt = costInvoiceDetailList.stream().filter(e -> e.getId().equalsIgnoreCase(costInvoiceDetail.getId())).findFirst();
 				if (findOpt.isPresent()) {