Browse Source

推送单价调整

huxy 1 year ago
parent
commit
19b4835734

+ 2 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splfi/controller/SyPackingListFabricController.java

@@ -1382,6 +1382,7 @@ public class SyPackingListFabricController implements Job {
 					 map.put("CVENCODE","one");//供应商编码
 					 map.put("orderNumber","one");//销售订单号
 					 map.put("poid","one");//销售订单id
+					 map.put("number","one");//销售订单id
 					 for (int x=0;x<3;x++){//最多循环3次
 						 try {
 							 if (map.get("account").equals("103")){
@@ -1690,6 +1691,7 @@ public class SyPackingListFabricController implements Job {
 				 map.put("CVENCODE","one");//供应商编码
 				 map.put("orderNumber","one");//销售订单号
 				 map.put("poid","one");//销售订单id
+				 map.put("number","one");//销售订单id
 				 for (int x=0;x<3;x++){//最多循环3次
 					 try {
 						 if (map.get("account").equals("103")){

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

@@ -1604,7 +1604,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 				if(orderDataItem!=null&&orderDataItem.containsKey("iSOsID")&&orderDataItem.get("iSOsID")!=null){
 					//Map<String,Object> orderDataItem2=syPackingListTailoringMapper.getSoMainItem(orderDataItem.get("iSOsID").toString());
 					Map<String,Object> orderDataItem2=new HashMap<>();
-					if (mapt.get("orderNumber").equals("one")){
+					if (mapt.get("number").equals("one")){
 						String id=item.getSyOrderDataItemId();
 						if ((id.indexOf('('))>-1){
 							id=id.substring(3,id.indexOf("(")-1);
@@ -1617,10 +1617,10 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 						orderDataItem2=syPackingListTailoringMapper.getSoMainItem(orderDataItem.get("iSOsID").toString());
 					}
 					mapItem3.put("AUTOID_SO",orderDataItem2.get("iSOsID"));//来源单据明细ID
-					System.out.println("销售订单\n"+orderDataItem2);
 					orderIrowno.setIrowno(orderDataItem2.get("irowno").toString());
 					orderIrowno.setOrderNumber(orderDataItem2.get("cSOCode").toString());
 					//mapSort.put(item.getId(),orderIrowno);
+					mapItem3.put("BSALEPRICE","1");
 					mapItem3.put("ITAXUNITPRICE",orderDataItem2.get("iTaxUnitPrice"));//原币含税单价(如果传空,取来源单据)(以含税单价为准自动计算相关价格及金额)
 					mapItem3.put("ITAXRATE",orderDataItem2.get("iTaxRate"));//税率(如果传空,取来源单据,无来源单据,取存货档案对应的销项税率)
 					map6.put("iTaxRate",orderDataItem2.get("iTaxRate"));
@@ -1730,6 +1730,22 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 				mapItem4.put("SOAUTOIDCOL","IDLSID");//订单明细ID对应字段名(关联单据类型为发货单IDLSID)
 				//mapItem4.put("AUTOID_SO","10300001");//关联明细ID 测试用先写
 
+
+				//测试新区域
+				if(item.getAccount().equals("102")&&mapt.get("account").equals("102")){//如果销售订单账套号等于102,当前推送到了102
+					//102销售发货单、102销售出库单
+					mapItem3.put("ITAXUNITPRICE",item.getPrice());
+				}else if(item.getAccount().equals("102")&&mapt.get("account").equals("102")){//如果销售订单账套号等于102,当前推送到了101
+					//101采购入库单
+					mapItem.put("IORITAXCOST",item.getPrice());//修改成报关单价
+				}
+				if(item.getAccount().equals("102")&&mapt.get("account").equals("102")){//采购发票
+					mapItem5.put("IORITAXCOST",item.getPrice());//改成使用报关单价
+				}
+				if(item.getAccount().equals("102")&&mapt.get("account").equals("102")){//销售发票
+					mapItem6.put("ITAXUNITPRICE",item.getPrice());//改成使用报关单价
+				}
+
 				mapItem5.put("CINVCODE",item.getInventoryCode());//存货编码
 
 				mapItem6.put("CINVCODE",item.getInventoryCode());//存货编码
@@ -1769,6 +1785,8 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 			mapt.put("itemSort",mapSort);
 			System.out.println("mapsort\n"+mapSort);
 		}
+
+		mapt.put("number","two");//销售订单id
 		if(mapList2!=null&&mapList2.size()>0){
 			text(mapList2,"材料出库单");
 			text(mapList7,"染厂采购入库单");

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

@@ -303,7 +303,7 @@
 		supplier,
 		memo,
 		unit_price,
-		customs_Declaration_Unit_Price,
+		unit_price customs_Declaration_Unit_Price,
 		master_Metering,
 		(select smail_po from sy_shipping_order_item
 		where tailoring_Fabric_Item_Id=sy_packing_list_tailoring_item.id and del_flag=0 limit 1) small_Po,

+ 1 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/service/impl/SyPackingListTailoringServiceImpl.java

@@ -1392,6 +1392,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 					mapItem3.put("ITAXUNITPRICE",orderDataItem2.get("iTaxUnitPrice"));//原币含税单价(如果传空,取来源单据)(以含税单价为准自动计算相关价格及金额)
 					mapItem3.put("ITAXRATE",orderDataItem2.get("iTaxRate"));//税率(如果传空,取来源单据,无来源单据,取存货档案对应的销项税率)
 					mapItem3.put("SOAUTOIDCOL","ISOSID");//来源单据明细ID对应字段名(如果取销售订单主键,需传固定值ISOSID)
+					mapItem3.put("BSALEPRICE","1");
 					mapItem3.put("AUTOID_SO",orderDataItem2.get("iSOsID"));//来源单据明细ID
 					map6.put("ITAXRATE",orderDataItem2.get("iTaxRate"));
 					mapItem6.put("ITAXRATE",orderDataItem2.get("iTaxRate"));