Przeglądaj źródła

面辅料拉取改动

huxy 11 miesięcy temu
rodzic
commit
7a09578ccb

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

@@ -30,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.math.BigInteger;
+import java.math.RoundingMode;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -320,7 +321,8 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
                             if(fabricOMOrder.getCInvName().equals(syTransfer.getGoodsName())){
                                 Double unitCost=fabricOMOrder.getFabricMoOrderRKList().stream().mapToDouble(FabricMoOrderRK::getIPrice).average().orElse(0d);
                                 syTransfer.setUnitCost(new BigDecimal(unitCost));
-                                syTransfer.setCost(syTransfer.getUnitCost().multiply(new BigDecimal(syTransfer.getNumber())));
+                                syTransfer.setCost(syTransfer.getUnitCost().multiply(new BigDecimal(syTransfer.getNumber())).setScale(2, RoundingMode.HALF_UP));
+//                                syTransfer.setCost(syTransfer.getUnitCost().multiply(new BigDecimal(syTransfer.getNumber())));
                                 cost=cost.add(syTransfer.getCost());
                             }
                         }

+ 2 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splfi/service/impl/SyPackingListFabricServiceImpl.java

@@ -2213,7 +2213,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 		SimpleDateFormat sf = new SimpleDateFormat("yyMMdd");
 		String[] arrs = syPackingListFabricItemMapper.getu8Data();//获取发运明细已提交的辅料
 		List<String> documentNos=syPackingListFabricItemMapper.getDocumentNos();
-		System.out.println("documentNos.size\t"+documentNos.size());
+//		System.out.println("documentNos.size\t"+documentNos.size());
 		Map<String, List<String>> maps = new HashMap<>();//获取两个账套
 		for (String arr : arrs) {
 			String account = arr.substring(0, 3);
@@ -2291,6 +2291,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 					if(documentNos.contains(sy.getDocumentNo())){
 						continue;
 					}
+					documentNos.add(sy.getDocumentNo());
 					sy.setDataSource("u8拉取");//直接从u8拉取的数据
 					sy.setPushState("4");
 					sy.setId(oConvertUtils.getId());