huxy 2 年 前
コミット
41e7f9eb6a

+ 6 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/service/impl/SyPreAssembledPackingListServiceImpl.java

@@ -542,6 +542,8 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
 	@Transactional
 	public boolean excelAdd(List<SyPreAssembledPackingList> items1) {
 		boolean bool=false;
+		List<SyPreAssembledPackingList> lists=new ArrayList<>();
+		List<SyPreAssembledPackingListItem> listItems=new ArrayList<>();
 		try{
 			for(SyPreAssembledPackingList syPreAssembledPackingList : items1){
 				SimpleDateFormat sf = new SimpleDateFormat("yyMMddHHmmssSSS");
@@ -636,6 +638,7 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
 						if(size.getProportion()==0){
 							item1.setTotal(null);//该尺码件数
 						}
+						listItems.add(item1);
 						syPreAssembledPackingListItemMapper.insert(item1);//添加子表数据
 					}
 				}
@@ -647,6 +650,7 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
 					syPreAssembledPackingList.setCustomer(syShippingDetails.getCustomer());
 					syPreAssembledPackingList.setSyOrderDataId(syShippingDetails.getSyOrderDataId());
 				}
+				lists.add(syPreAssembledPackingList);
 				syPreAssembledPackingListMapper.insert(syPreAssembledPackingList);//修改汇总数据
 			}
 			bool=true;
@@ -655,6 +659,8 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
 			e.getMessage();
 			bool=false;
 		}
+		//System.out.println("listItem"+listItems);
+		//System.out.println("lists"+lists);
 		return bool;
 	}
 

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

@@ -30,6 +30,10 @@ import org.jeecg.common.system.util.JwtUtil;
 import org.jeecg.common.system.vo.LoginUser;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.documents.orderData.entity.SyOrderData;
+import org.jeecg.modules.documents.orderData.entity.SyOrderDataItem;
+import org.jeecg.modules.documents.orderData.mapper.SyOrderDataItemMapper;
+import org.jeecg.modules.documents.orderData.mapper.SyOrderDataMapper;
 import org.jeecg.modules.documents.shippingDetails.entity.SyShippingDetailsItem;
 import org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo;
 import org.jeecg.modules.documents.shippingDetails.mapper.SyShippingDetailsItemMapper;
@@ -39,6 +43,7 @@ import org.jeecg.modules.spapl.entity.SyPreAssembledPackingList;
 import org.jeecg.modules.splfi.vo.SyPackingListFabricVo;
 import org.jeecg.modules.splt.entity.SyPackingListTailoring;
 import org.jeecg.modules.splt.entity.SyPackingListTailoringItem;
+import org.jeecg.modules.splt.service.ISyPackingListTailoringService;
 import org.jeecg.modules.system.controller.CommonController;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -943,6 +948,13 @@ public class SyPackingListFabricController {
 		 return result;
 	 }
 
+	 @Autowired
+	 private ISyPackingListTailoringService syPackingListTailoringService;
+	 @Autowired
+	 private SyOrderDataItemMapper syOrderDataItemMapper;
+	 @Autowired
+	 private SyOrderDataMapper syOrderDataMapper;
+
 	 @AutoLog(value = "装箱单面辅料推送u8")
 	 @ApiOperation(value="装箱单面辅料推送u8", notes="装箱单面辅料推送u8")
 	 @GetMapping(value = "/pushBatch")
@@ -961,6 +973,24 @@ public class SyPackingListFabricController {
 				 result.setMessage("请先做托书再推送");
 				 return result;
 			 }
+			 Map<String,Object> mapdate=syPackingListTailoringService.getSyShippingOrder(ids);
+			 System.out.println("madate\t"+mapdate);
+			 if(mapdate!=null){
+				 if(!mapdate.containsKey("e4")||mapdate.get("e4").equals("0")){
+					 result.setSuccess(false);
+					 result.setMessage("请先提交托书再推送");
+					 return result;
+				 }
+				 if(mapdate.containsKey("e1")&&mapdate.get("e3")!=null){
+					 main.setTheFinalShippingDate(mapdate.get("e1").toString());
+				 }
+				 if(mapdate.containsKey("e2")&&mapdate.get("e3")!=null){
+					 main.setTheFinalShippingDate(mapdate.get("e2").toString());
+				 }
+				 if(mapdate.containsKey("e3")&&mapdate.get("e3")!=null){
+					 main.setLatestDateOfShipment2(mapdate.get("e3").toString());
+				 }
+			 }
 			 QueryWrapper queryWrapper=new QueryWrapper();
 			 queryWrapper.eq("sy_Packing_List_Fabric_Id",ids);
 			 queryWrapper.eq("del_flag","0");
@@ -968,6 +998,19 @@ public class SyPackingListFabricController {
 			 String message="";//获取报错消息
 			 String account="";//当前账套
 			 if(items!=null){
+
+				 //SyOrderData syOrderData=syOrderDataMapper.selectById(items.get(0).getSyOrderDataId());//最终客户
+				 SyOrderData syOrderData=syOrderDataMapper.selectById(items.get(0).getSyOrderDataId());//最终客户
+				 if(syOrderData!=null){
+					 main.setEndCustomer(syOrderData.getEndCustomer());
+					 System.out.println("最终客户\t"+syOrderData.getEndCustomer());
+				 }
+				 SyOrderDataItem syOrderDataItem=syOrderDataItemMapper.selectById(items.get(0).getSyOrderDataItemId());//供应商全称
+				 if(syOrderDataItem!=null){
+					 main.setSupplierCode(syOrderDataItem.getSupplierCode());
+					 System.out.println("客户编码\t"+syOrderDataItem.getSupplierCode());
+				 }
+
 				 main.setSyPackingListFabricItem(items);
 				 map.put("account",items.get(0).getOmpoAccount());//委外采购账套号
 				 map.put("account1",items.get(0).getOmpoAccount());//委外采购账套号

+ 24 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splfi/entity/SyPackingListFabric.java

@@ -169,6 +169,30 @@ public class SyPackingListFabric implements Serializable {
 	@ApiModelProperty(value = "推送状态")
 	private String pushState;
 
+	/**最终船期*/
+	@TableField(exist = false)
+	private String theFinalShippingDate;
+
+	/**合同日期*/
+	@TableField(exist = false)
+	private String theFinalShippingDate2;
+
+	/**最终客户*/
+	@TableField(exist = false)
+	private java.lang.String endCustomer;
+
+	/**供应商(打印)*/
+	@TableField(exist = false)
+	private java.lang.String supplierName;
+
+
+	@TableField(exist = false)
+	private java.lang.String supplierCode;
+
+	/**装运期限*/
+	@TableField(exist = false)
+	private String latestDateOfShipment2;
+
 	/*recording*/
 	@ApiModelProperty(value = "u8推送记录")
 	private String recording;

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

@@ -954,7 +954,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 			//String createDate=main.getCreateTime().toString();
 			String createDate=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(main.getCreateTime());//转化日期类型
 			JSONObject map=new JSONObject();//采购(委外)入库单
-			map.put("CVOUCHCODE", org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cCode+100","RdRecord01","cCode")));//获取单据号
+			map.put("CVOUCHCODE", org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cCode","RdRecord01","cCode")));//获取单据号
 			//map.put("CVOUCHCODE", main.getId());//获取单据号
 			map.put("DDATE",createDate);//日期(格式2015-01-01)
 			map.put("CMAKER",createBy);//制单人
@@ -981,6 +981,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 			map4.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("ccode","rdrecord32","dnmaketime")));//单据号
 			map4.put("DDATE",createDate);//订单日期(格式2015-01-01)
 			map4.put("CHANDLER",createBy);//审核人
+			map4.put("CRDCODE","26");//出库类别
 			map4.put("CMAKER",createBy);//制单人
 
 			JSONObject map5=new JSONObject();//采购发票
@@ -996,6 +997,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 			map6.put("DDATE",createDate);//发票日期(yyyy-MM-dd)
 			map6.put("CTYPE","普通");//发票类型(普通,专用)
 			map6.put("CMAKER",createBy);//制单人名称
+			map6.put("CVERIFIER",createBy);//制单人名称
 
 			JSONObject map7=new JSONObject();//采购(委外)入库单
 			map7.put("CVOUCHCODE", org.jeecg.modules.system.util.oConvertUtils.addOne(org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cCode","RdRecord01","dnmaketime"))));//获取单据号
@@ -1004,6 +1006,17 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 			map7.put("cVouchType",1);//传1
 			map7.put("CRDCODE","12");//入库类别
 			map7.put("CGLTYPE","委外订单");//来源单据类型
+			map7.put("CMAKER",createBy);//制单人
+			map7.put("CHANDLER",createBy);//审核人
+
+
+			map.put("CDEFINE4",main.getTheFinalShippingDate());//最终船期
+			map.put("CDEFINE6",main.getTheFinalShippingDate());//合同日期
+			map5.put("CDEFINE4",main.getTheFinalShippingDate());//最终船期
+			map5.put("CDEFINE6",main.getTheFinalShippingDate());//合同日期
+			map6.put("CDEFINE11",main.getEndCustomer());//最终客户
+			map6.put("CDEFINE4",main.getTheFinalShippingDate());//最终船期
+			map6.put("CDEFINE6",main.getTheFinalShippingDate2());//合同日期
 
 			if(main.getShippingOrderNumber()!=null){
 				map.put("CDEFINE10",main.getShippingOrderNumber());
@@ -1025,6 +1038,13 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 
 			Map<String,Object> orderData=null;
 
+			if(main.getSupplierCode()!=null){
+				String	venName=syPackingListTailoringMapper.getCvenName(main.getSupplierCode());
+				map.put("CDEFINE12",venName);//供应商(打印)全称
+				map5.put("CDEFINE12",venName);//供应商(打印)全称
+				map6.put("CDEFINE12",venName);//供应商(打印)全称
+			}
+
 			if(mapt.get("account").equals("903")){//查询委外订单主表数据	顺序---1
 				orderData=syPackingListTailoringMapper.getOmOrPo("om_momain","cCode='"+mapt.get("mpOrder")+"'","moid");
 				map.put("CRDCODE","12");//入库类别(采购入库/委外入库)
@@ -1247,7 +1267,9 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 						map6.put("CDEPCODE",order.get("cDepCode"));//部门编码(如果传空,取来源单据)
 						map6.put("SALETPYECODE",order.get("cSTCode"));//销售类型编码
 						map6.put("IEXCHRATE",order.get("iExchRate"));//IEXCHRATE 汇率
+						map3.put("CEXCH_NAME",order.get("cexch_name"));//CEXCH_NAME 币种名称
 						map6.put("CEXCH_NAME",order.get("cexch_name"));//CEXCH_NAME 币种名称
+						map5.put("CEXCH_NAME",order.get("cexch_name"));//CEXCH_NAME 币种名称
 					}
 				}
 

+ 40 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/controller/SyPackingListTailoringController.java

@@ -36,6 +36,10 @@ import org.jeecg.common.util.RedisUtil;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.config.InterfaceConnUtils;
 import org.jeecg.modules.documents.letterDeposit.entity.SyLetterDepositItem;
+import org.jeecg.modules.documents.orderData.entity.SyOrderData;
+import org.jeecg.modules.documents.orderData.entity.SyOrderDataItem;
+import org.jeecg.modules.documents.orderData.mapper.SyOrderDataItemMapper;
+import org.jeecg.modules.documents.orderData.mapper.SyOrderDataMapper;
 import org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrderItem;
 import org.jeecg.modules.spapl.entity.SizeTable;
 import org.jeecg.modules.spapl.entity.SyPreAssembledPackingList;
@@ -1258,6 +1262,12 @@ public class SyPackingListTailoringController {
 		 return syPackingListTailoringService.typeConversion(syPackingListTailoringItem);
 	 }
 
+	 @Autowired
+	 private SyOrderDataItemMapper syOrderDataItemMapper;
+
+	 @Autowired
+	 private SyOrderDataMapper syOrderDataMapper;
+
 	 @AutoLog(value = "装箱单成衣推送u8")
 	 @ApiOperation(value="装箱单成衣推送u8", notes="装箱单成衣推送u8")
 	 @GetMapping(value = "/pushBatch")
@@ -1269,13 +1279,31 @@ public class SyPackingListTailoringController {
 				result.setMessage("请至少选中一条数据");
 				return result;
 			}
-			Map<String,Object> map=new HashMap<>();
 			SyPackingListTailoring main=syPackingListTailoringService.getById(ids);
 			if(main.getIsReference()==0){
 				result.setSuccess(false);
 				result.setMessage("请先做托书再推送");
 				return result;
 			}
+			Map<String,Object> map=new HashMap<>();
+			Map<String,Object> mapdate=syPackingListTailoringService.getSyShippingOrder(ids);
+			System.out.println("madate\t"+mapdate);
+			if(mapdate!=null){
+				if(!mapdate.containsKey("e4")||mapdate.get("e4").equals("0")){
+					result.setSuccess(false);
+					result.setMessage("请先提交托书再推送");
+					return result;
+				}
+				if(mapdate.containsKey("e1")&&mapdate.get("e3")!=null){
+					main.setTheFinalShippingDate(mapdate.get("e1").toString());
+				}
+				if(mapdate.containsKey("e2")&&mapdate.get("e3")!=null){
+					main.setTheFinalShippingDate(mapdate.get("e2").toString());
+				}
+				if(mapdate.containsKey("e3")&&mapdate.get("e3")!=null){
+					main.setLatestDateOfShipment2(mapdate.get("e3").toString());
+				}
+			}
 			/*QueryWrapper queryWrapper=new QueryWrapper();
 			queryWrapper.eq("sy_packing_list_tailoring_id",main.getId());
 			queryWrapper.eq("del_flag","0");*/
@@ -1288,6 +1316,17 @@ public class SyPackingListTailoringController {
 				map.put("account",main.getSyPackingListTailoringItemList().get(0).getOmpoAccount());//委外采购账套号
 				map.put("account1",main.getSyPackingListTailoringItemList().get(0).getOmpoAccount());//委外采购账套号
 				map.put("ompoId",main.getSyPackingListTailoringItemList().get(0).getOmpoId());//采购委外主表id
+
+				SyOrderData syOrderData=syOrderDataMapper.selectById(syPackingListTailoringItems.get(0).getSyOrderDataId());//最终客户
+				if(syOrderData!=null){
+					main.setEndCustomer(syOrderData.getEndCustomer());
+					System.out.println("最终客户\t"+syOrderData.getEndCustomer());
+				}
+				SyOrderDataItem syOrderDataItem=syOrderDataItemMapper.selectById(syPackingListTailoringItems.get(0).getSyOrderDataItemId());//供应商全称
+				if(syOrderDataItem!=null){
+					main.setSupplierCode(syOrderDataItem.getSupplierCode());
+					System.out.println("客户编码\t"+syOrderDataItem.getSupplierCode());
+				}
 				if(main.getPurchase()==null){
 					map.put("mpOrder",main.getSyPackingListTailoringItemList().get(0).getSpurOrSubOrder());//采购委外订单号
 				}else{

+ 24 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/entity/SyPackingListTailoring.java

@@ -210,6 +210,30 @@ public class SyPackingListTailoring implements Serializable {
 	@ApiModelProperty(value = "委外采购主表Id")
 	private String ompoId;
 
+	/**最终船期*/
+	@TableField(exist = false)
+	private String theFinalShippingDate;
+
+	/**合同日期*/
+	@TableField(exist = false)
+	private String theFinalShippingDate2;
+
+	/**最终客户*/
+	@TableField(exist = false)
+	private java.lang.String endCustomer;
+
+	/**供应商(打印)*/
+	@TableField(exist = false)
+	private java.lang.String supplierName;
+
+	/**供应商(打印)*/
+	@TableField(exist = false)
+	private java.lang.String supplierCode;
+
+	/**装运期限*/
+	@TableField(exist = false)
+	private String latestDateOfShipment2;
+
 
 	/**是否被参照(0:无,1:被预托书参照,2:被装箱单参照)*/
 	//@Excel(name = "是否被参照(0:无,1:被预托书参照,2:被装箱单参照)", width = 15)

+ 4 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/mapper/SyPackingListTailoringMapper.java

@@ -55,4 +55,8 @@ public interface SyPackingListTailoringMapper extends BaseMapper<SyPackingListTa
     String[] getExcelId();
 
     public List<Map<String,Object>> getRdrecord32(String id);
+
+    public Map<String,Object> getSyShippingOrder(String id);
+
+    public String getCvenName(String cvencode);
 }

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

@@ -151,6 +151,8 @@
 		size,
 		sum(total) total,
 		ompo_Id_Item,
+		sy_order_data_id,
+		sy_order_data_Item_id,
 		id,
 		ac_Set_No,
 		ompo_Account,

+ 16 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/mapper/xml/syPackingListTailoringMapper.xml

@@ -190,4 +190,20 @@
         ON a.id=b.sy_pre_assembled_packing_list_item_id
         WHERE a.ompo_Id_Item!=b.ompo_Id_Item
     </select>
+
+    <select id="getSyShippingOrder" resultType="java.util.HashMap"  parameterType="java.lang.String">
+        select the_final_shipping_date as e1,date_sub(the_final_shipping_date, interval 60 day) e2,
+         latest_Date_Of_Shipment e3,the_Documents_State e4
+         from sy_shipping_order
+		where id in
+		(select sy_shipping_order_item_id
+		from sy_shipping_order_item
+		where tailoring_fabric_id=#{value}  ) limit 1
+    </select>
+
+    <select id="getCvenName" parameterType="java.lang.String" resultType="java.lang.String">
+        select cVenName  from Vendor
+        where cVenCode=#{value }
+    </select>
+
 </mapper>

+ 2 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/service/ISyPackingListTailoringService.java

@@ -101,4 +101,6 @@ public interface ISyPackingListTailoringService extends IService<SyPackingListTa
 	 *
 	 */
 	public List<SyPackingListTailoringItem> getList(String id) ;
+
+	public Map<String,Object> getSyShippingOrder(String id);
 }

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

@@ -803,7 +803,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 			//String createDate=main.getCreateTime().toString();
 			String createDate=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(main.getCreateTime());//转化日期类型
 			JSONObject map=new JSONObject();//采购(委外)入库单
-			map.put("CVOUCHCODE", org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cCode+100","RdRecord01","cCode")));//获取单据号
+			map.put("CVOUCHCODE", org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cCode","RdRecord01","dnmaketime")));//获取单据号
 			//map.put("CVOUCHCODE", main.getId());//获取单据号
 			map.put("DDATE",createDate);//日期(格式2015-01-01)
 			map.put("CMEMO",main.getMemo());//制单人
@@ -811,6 +811,9 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 			map.put("CHANDLER",createBy);//审核人
 			map.put("cVouchType",1);//传1
 
+			map.put("CDEFINE4",main.getTheFinalShippingDate());//最终船期
+			map.put("CDEFINE6",main.getTheFinalShippingDate());//合同日期
+
 			JSONObject map3=new JSONObject();//销售发货单
 			map3.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cDLCode","DispatchList","dcreatesystime")));//发货单号
 			map3.put("DDATE",createDate);//发货日期(yyyy-MM-dd)
@@ -822,6 +825,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 			map4.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("ccode","rdrecord32","dnmaketime")));//单据号
 			map4.put("DDATE",createDate);//订单日期(格式2015-01-01)
 			map4.put("CHANDLER",createBy);//审核人
+			map4.put("CRDCODE","26");//出库类别
 			map4.put("CMAKER",createBy);//制单人
 
 			JSONObject map5=new JSONObject();//采购发票
@@ -831,11 +835,19 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 			map5.put("CMAKER",createBy);//制单人
 			map5.put("CHANDLER",createBy);//审核人
 
+			map5.put("CDEFINE4",main.getTheFinalShippingDate());//最终船期
+			map5.put("CDEFINE6",main.getTheFinalShippingDate());//合同日期
+
 			JSONObject map6=new JSONObject();//销售发票
 			map6.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cSBVCode","SaleBillVouch","dcreatesystime")));//发票号
 			map6.put("DDATE",createDate);//发票日期(yyyy-MM-dd)
 			map6.put("CTYPE","普通");//发票类型(普通,专用)
 			map6.put("CMAKER",createBy);//制单人名称
+			map6.put("CVERIFIER",createBy);//制单人名称
+
+			map6.put("CDEFINE11",main.getEndCustomer());//最终客户
+			map6.put("CDEFINE4",main.getTheFinalShippingDate());//最终船期
+			map6.put("CDEFINE6",main.getTheFinalShippingDate2());//合同日期
 
 			if(main.getShippingOrderNumber()!=null){
 				map.put("CDEFINE10",main.getShippingOrderNumber());
@@ -855,6 +867,14 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 
 			Map<String,Object> orderData=null;
 
+			if(main.getSupplierCode()!=null){
+			    String	venName=syPackingListTailoringMapper.getCvenName(main.getSupplierCode());
+				map.put("CDEFINE12",venName);//供应商(打印)全称
+				map5.put("CDEFINE12",venName);//供应商(打印)全称
+				map6.put("CDEFINE12",venName);//供应商(打印)全称
+				System.out.println("供应商全称\t"+venName);
+			}
+
 			if(mapt.get("account").equals("903")){//查询委外订单主表数据	顺序---1
 				orderData=syPackingListTailoringMapper.getOmOrPo("om_momain","cCode='"+mapt.get("mpOrder")+"'","moid");
 				map.put("CRDCODE","12");//入库类别(采购入库/委外入库)
@@ -884,7 +904,6 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 				}
 			}
 			if(orderData!=null){
-				map3.put("CEXCH_NAME",orderData.get("cexchname"));//币种名称
 				map.put("CVENCODE",orderData.get("cvencode"));//供应商编码
 				mapt.put("CVENCODE",orderData.get("cvencode"));//供应商编码
 				map5.put("IEXCHRATE",orderData.get("nflat"));//汇率(如果传空,接口默认1)cPayCode
@@ -989,13 +1008,15 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 					if(order!=null){//销售订单主表
 						map.put("cOrderCode",order.get("cSOCode"));//销售订单号
 						map3.put("CBUSTYPE",order.get("cBusType"));//业务类型(普通销售、分期付款)(如果传空,取来源单据)
+						map6.put("CEXCH_NAME",order.get("cexch_name"));//CEXCH_NAME 币种名称
+						map5.put("CEXCH_NAME",order.get("cexch_name"));//CEXCH_NAME 币种名称
 						map4.put("CEXCH_NAME",order.get("cexch_name"));//币种名称(如果传空,传来源单据;无来源单据,默认人民币)
+						map3.put("CEXCH_NAME",order.get("cexch_name"));//币种名称
 						map6.put("CBUSTYPE",order.get("cBusType"));//业务类型
 						map6.put("CCUSCODE",order.get("cCusCode"));//客户编码
 						map6.put("CDEPCODE",order.get("cDepCode"));//部门编码(如果传空,取来源单据)
 						map6.put("SALETPYECODE",order.get("cSTCode"));//销售类型编码
 						map6.put("IEXCHRATE",order.get("iExchRate"));//IEXCHRATE 汇率
-						map6.put("CEXCH_NAME",order.get("cexch_name"));//CEXCH_NAME 币种名称
 					}
 				}
 
@@ -1344,4 +1365,9 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 	public List<SyPackingListTailoringItem> getList(String id) {
 		return syPackingListTailoringItemMapper.getList(id);
 	}
+
+	@Override
+	public Map<String,Object> getSyShippingOrder(String id) {
+		return syPackingListTailoringMapper.getSyShippingOrder(id);
+	}
 }