huxy 2 лет назад
Родитель
Сommit
c0327bcd99
19 измененных файлов с 320 добавлено и 181 удалено
  1. 126 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/controller/SyPreAssembledPackingListController.java
  2. 7 7
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/entity/SyPreAssembledPackingList.java
  3. 28 28
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/entity/SyPreAssembledPackingListItem.java
  4. 5 5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/mapper/SyPreAssembledPackingListItemMapper.java
  5. 2 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/mapper/SyPreAssembledPackingListMapper.java
  6. 5 5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/service/ISyPreAssembledPackingListService.java
  7. 0 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/service/impl/SyPreAssembledPackingListServiceImpl.java
  8. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/vo/PackingHeaderVo.java
  9. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/vo/PackingLineVo.java
  10. 25 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/vo/SyPreAssembledPackingListVo.java
  11. 2 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/controller/SyPackingListTailoringController.java
  12. 6 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/entity/SyPackingListTailoring.java
  13. 30 30
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/entity/SyPackingListTailoringItem.java
  14. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/mapper/SyPackingListTailoringItemMapper.java
  15. 3 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/mapper/SyPackingListTailoringMapper.java
  16. 3 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/mapper/xml/syPackingListTailoringMapper.xml
  17. 6 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/service/ISyPackingListTailoringService.java
  18. 34 40
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/service/impl/SyPackingListTailoringServiceImpl.java
  19. 35 35
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/vo/SyPackingListTailoringPage.java

+ 126 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/controller/SyPreAssembledPackingListController.java

@@ -4,6 +4,8 @@ import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.lang.reflect.Array;
+import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
 
@@ -827,6 +829,130 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
         return result;
     }
 
+    @AutoLog(value = "导出")
+    @ApiOperation(value="导出", notes="导出")
+    @RequestMapping(value = "/exportXls2")
+    public Result<SyPreAssembledPackingList> exportXls2(HttpServletRequest request,HttpServletResponse response,SyPreAssembledPackingListVo syPreAssembledPackingListVo,
+                                                        String stratDate,
+                                                        String endDate ) {
+        QueryWrapper<SyPreAssembledPackingListVo> queryWrapper =new QueryWrapper<>();//初始化
+        queryWrapper.eq("a.del_flag","0");//默认查询未删除
+        if(oConvertUtils.isNotEmpty(syPreAssembledPackingListVo.getId())){//查询id
+            queryWrapper.eq("a.id",syPreAssembledPackingListVo.getId());
+        }
+        if(oConvertUtils.isNotEmpty(syPreAssembledPackingListVo.getOrderNumber())){//订单号
+            queryWrapper.like("a.order_number",syPreAssembledPackingListVo.getOrderNumber());
+        }
+        if(oConvertUtils.isNotEmpty(syPreAssembledPackingListVo.getGarmentFactory())){//成衣工厂
+            queryWrapper.like("b.garment_Factory",syPreAssembledPackingListVo.getGarmentFactory());
+        }
+        if(oConvertUtils.isNotEmpty(syPreAssembledPackingListVo.getDocumentNo())){//单据号
+            queryWrapper.like("a.document_No",syPreAssembledPackingListVo.getDocumentNo());
+        }
+        if(oConvertUtils.isNotEmpty(syPreAssembledPackingListVo.getItemNumber())){//款号
+            queryWrapper.like("a.item_number",syPreAssembledPackingListVo.getItemNumber());
+        }
+        if(oConvertUtils.isNotEmpty(syPreAssembledPackingListVo.getProductName())){//品名
+            queryWrapper.like("a.product_Name",syPreAssembledPackingListVo.getProductName());
+        }
+        // 小po 分销点
+        if(oConvertUtils.isNotEmpty(syPreAssembledPackingListVo.getSmallPo())){//小po
+            queryWrapper.like("b.small_Po",syPreAssembledPackingListVo.getSmallPo());
+        }
+        if(oConvertUtils.isNotEmpty(syPreAssembledPackingListVo.getDistributionPoint())){//分销点
+            queryWrapper.like("b.distribution_Point",syPreAssembledPackingListVo.getDistributionPoint());
+        }
+        //预发货日期
+        if(oConvertUtils.isNotEmpty(stratDate)){//起始
+            queryWrapper.ge("b.hod",stratDate);
+        }
+        if(oConvertUtils.isNotEmpty(endDate)){//结束
+            queryWrapper.le("b.hod",endDate);
+        }
+        Page<SyPreAssembledPackingListVo> page = new Page<SyPreAssembledPackingListVo>(1, 10000);
+        Result result=new Result();
+        try{
+            List<SyPreAssembledPackingListVo> pageLists = syPreAssembledPackingListService.selectPage(page, queryWrapper).getRecords();
+            if(pageLists.size()==0){
+                result.setResult(null);
+                result.setMessage("导出失败!没有查询到数据");
+                result.setSuccess(false);
+                return result;
+            }
+            String load="D:\\单证模板\\预装箱单新.xlsx";
+            File file=new File(load);
+            TemplateExportParams templateExcelConstants=new TemplateExportParams(file.getAbsolutePath(),true,"预装箱单汇总");
+            Map<Integer, Map<String, Object>> maps = new HashMap<>();
+            templateExcelConstants.setColForEach(true);//横向循环
+            Workbook workbook = ExcelExportUtil.exportExcel(maps,templateExcelConstants);
+            ServletOutputStream outputStream = response.getOutputStream();
+            workbook.write(outputStream);
+            refreshSheet(workbook,pageLists);//配置某列数据
+            result.setCode(200);
+            result.setResult(pageLists.get(0));
+            result.setMessage("导出成功!");
+            result.setSuccess(true);
+        }catch (Exception e){
+            e.printStackTrace();
+            result.setResult(null);
+            result.setMessage(e.getMessage());
+            result.setSuccess(false);
+        }finally {
+            return result;
+        }
+
+    }
+
+    protected static void refreshSheet(Workbook workbook,List<SyPreAssembledPackingListVo> mains ) {
+        Iterator sheets=workbook.sheetIterator();
+        if (sheets.hasNext()){
+            Sheet sheet=(Sheet) sheets.next();
+            System.out.println("sheets.size\t"+sheet);
+            Map<String,Object> maps=new HashMap<>();
+            SyPreAssembledPackingListVo sysCount=new SyPreAssembledPackingListVo();
+            sysCount.setTotal(new BigDecimal("0"));
+            sysCount.setTotalBoxes(new BigDecimal("0"));
+            sysCount.setTotalGrossWeight(new BigDecimal("0"));
+            sysCount.setTotalNetWeight(new BigDecimal("0"));
+            sysCount.setTotalVolume(new BigDecimal("0"));
+            for (int i=0; i < mains.size(); i++) {//循环
+                String depositaryReceiptNo=mains.get(i).getDepositaryReceiptNo()==null?"空":mains.get(i).getDepositaryReceiptNo();//预托书号
+                String containerCode=mains.get(i).getContainerCode()==null?"空":mains.get(i).getContainerCode();//集装箱代号
+                sysCount.setTotal(sysCount.getTotal().add(mains.get(i).getTotal()));
+                sysCount.setTotalBoxes(sysCount.getTotalBoxes().add(mains.get(i).getTotalBoxes()));
+                sysCount.setTotalGrossWeight(sysCount.getTotalGrossWeight().add(mains.get(i).getTotalGrossWeight()));
+                sysCount.setTotalNetWeight(sysCount.getTotalNetWeight().add(mains.get(i).getTotalNetWeight()));
+                sysCount.setTotalVolume(sysCount.getTotalVolume().add(mains.get(i).getTotalVolume()));
+                if(maps.containsKey(depositaryReceiptNo+containerCode)){
+                    List<SyPreAssembledPackingListVo> sys= (List<SyPreAssembledPackingListVo>) maps.get(depositaryReceiptNo+containerCode);
+                    sys.add(mains.get(i));
+                    maps.put(depositaryReceiptNo+containerCode,sys);
+                }else{
+                    List<SyPreAssembledPackingListVo> sys=new ArrayList<>();
+                    sys.add(mains.get(i));
+                    maps.put(depositaryReceiptNo+containerCode,sys);
+                }
+            }
+            int num=0;
+            for (String key : maps.keySet()) {
+                List<SyPreAssembledPackingListVo> sys = (List<SyPreAssembledPackingListVo>) maps.get(key);
+                for (SyPreAssembledPackingListVo sy : sys){
+                    Row row = sheet.createRow( num);//列
+                    String [] strs=sy.str().split(",");
+                    for (int i=0; i<strs.length;i++){
+                        Cell cell = row.createCell(i+1);//横向
+                        cell.setCellValue("1134134");
+                        System.out.println("strs"+i+""+strs[i]);
+                    }
+                    num++;
+                }
+            }
+        }
+    }
+
+
+
+
     @AutoLog(value = "导出")
     @ApiOperation(value="导出", notes="导出")
     @RequestMapping(value = "/exportXls")

+ 7 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/entity/SyPreAssembledPackingList.java

@@ -35,7 +35,7 @@ public class SyPreAssembledPackingList implements Serializable {
 	private String id;
 	@Excel(name = "单据号", width = 35)
 	@ApiModelProperty(value = "单据号")
-	private java.lang.String documentNo;
+	private String documentNo;
 	/**发运明细主表id*/
 	@ApiModelProperty(value = "发运明细主表id")
 	private String syDeclarationElementsId;
@@ -173,17 +173,17 @@ public class SyPreAssembledPackingList implements Serializable {
 	/**业务类型*/
 	//@Excel(name = "业务类型", width = 15)
 	@ApiModelProperty(value = "业务类型")
-	private java.lang.String businessTypeValue;
+	private String businessTypeValue;
 
 	/**业务员*/
 	//@Excel(name = "业务员", width = 15)
 	@ApiModelProperty(value = "业务员")
-	private java.lang.String salesman;
+	private String salesman;
 
 	/**业务部门(销售部门)*/
 	//@Excel(name = "业务部门(销售部门)", width = 15)
 	@ApiModelProperty(value = "业务部门(销售部门)")
-	private java.lang.String salesDepartment;
+	private String salesDepartment;
 
 	/**是否被参照(0:无,1:被预托书参照,2:被装箱单参照)*/
 	//@Excel(name = "是否被参照(0:无,1:被预托书参照,2:被装箱单参照)", width = 15)
@@ -191,7 +191,7 @@ public class SyPreAssembledPackingList implements Serializable {
 	private Integer isReference;
 
 	//委外采购Id 主
-	private java.lang.String ompoId;
+	private String ompoId;
 
 	//子表集合
 	@TableField(exist = false)
@@ -206,10 +206,10 @@ public class SyPreAssembledPackingList implements Serializable {
 
 	//最底层供应商编码
 	@ApiModelProperty(value = "最底层供应商编码")
-	private java.lang.String supplierCode;
+	private String supplierCode;
 	//最底层供应商名称
 	@ApiModelProperty(value = "最底层供应商名称")
-	private java.lang.String supplier;
+	private String supplier;
 
 	public SyPreAssembledPackingList(){
 

+ 28 - 28
jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/entity/SyPreAssembledPackingListItem.java

@@ -105,68 +105,68 @@ public class SyPreAssembledPackingListItem implements Serializable {
 	/**件数/箱*/
     @Excel(name = "件数/箱", width = 15,isStatistics = true)
 	@ApiModelProperty(value = "件数/箱")
-	private java.math.BigDecimal piecesBox;
+	private BigDecimal piecesBox;
 	/**箱数*/
     @Excel(name = "箱数", width = 15,isStatistics = true)
 	@ApiModelProperty(value = "箱数")
-	private java.math.BigDecimal boxNumber;
+	private BigDecimal boxNumber;
 	/**总件数*/
     @Excel(name = "总件数", width = 15,isStatistics = true)
 	@ApiModelProperty(value = "总件数")
-	private java.math.BigDecimal total;
+	private BigDecimal total;
 	/**计划装箱数量*/
 	@Excel(name = "计划装箱数量", width = 15,isStatistics = true)
 	@ApiModelProperty(value = "计划装箱数量")
-	private java.math.BigDecimal planQuantity;
+	private BigDecimal planQuantity;
 	/**计划装箱数量*/
 	@Excel(name = "实际装箱数量", width = 15,isStatistics = true)
 	@ApiModelProperty(value = "实际装箱数量")
-	private java.math.BigDecimal actualPackingQty;
+	private BigDecimal actualPackingQty;
 
 	/**净重/箱*/
    // @Excel(name = "净重/箱", width = 15)
 	@ApiModelProperty(value = "净重/箱")
-	private java.math.BigDecimal netWeight;
+	private BigDecimal netWeight;
 	/**总净重*/
    // @Excel(name = "总净重", width = 15)
 	@ApiModelProperty(value = "总净重")
-	private java.math.BigDecimal totalNetWeight;
+	private BigDecimal totalNetWeight;
 	/**毛重*/
    // @Excel(name = "毛重/箱", width = 15)
 	@ApiModelProperty(value = "毛重/箱")
-	private java.math.BigDecimal grossWeight;
+	private BigDecimal grossWeight;
 	/**总毛重*/
     @Excel(name = "总毛重", width = 15)
 	@ApiModelProperty(value = "总毛重")
-	private java.math.BigDecimal totalGrossWeight;
+	private BigDecimal totalGrossWeight;
 	/**外箱长度*/
     //@Excel(name = "外箱长度", width = 15)
 	@ApiModelProperty(value = "外箱长度")
-	private java.math.BigDecimal outerBoxLength;
+	private BigDecimal outerBoxLength;
 	/**外箱宽度*/
   //  @Excel(name = "外箱宽度", width = 15)
 	@ApiModelProperty(value = "外箱宽度")
-	private java.math.BigDecimal outerBoxWidth;
+	private BigDecimal outerBoxWidth;
 	/**外箱高度*/
   //  @Excel(name = "外箱高度", width = 15)
 	@ApiModelProperty(value = "外箱高度")
-	private java.math.BigDecimal outerBoxHeight;
+	private BigDecimal outerBoxHeight;
 	/**总体积*/
     @Excel(name = "总体积", width = 15)
 	@ApiModelProperty(value = "总体积")
-	private java.math.BigDecimal totalVolume;
+	private BigDecimal totalVolume;
 	/**净净重*/
   //  @Excel(name = "净净重", width = 15)
 	@ApiModelProperty(value = "净净重")
-	private java.math.BigDecimal netWeightToo;
+	private BigDecimal netWeightToo;
 	/**单价*/
    // @Excel(name = "单价", width = 15)
 	@ApiModelProperty(value = "单价")
-	private java.math.BigDecimal unitPrice;
+	private BigDecimal unitPrice;
 	/**总价*/
     @Excel(name = "总价", width = 15)
 	@ApiModelProperty(value = "总价")
-	private java.math.BigDecimal totalPrice;
+	private BigDecimal totalPrice;
 	/**排序*/
    // @Excel(name = "排序", width = 15)
 	@ApiModelProperty(value = "排序")
@@ -218,7 +218,7 @@ public class SyPreAssembledPackingListItem implements Serializable {
 	/**工厂单价*/
 //	@Excel(name = "工厂单价", width = 20)
 	@ApiModelProperty(value = "工厂单价")
-	private java.math.BigDecimal factoryUnitPrice;
+	private BigDecimal factoryUnitPrice;
 
 //	@Excel(name = "计量单位", width = 20)
 	@ApiModelProperty(value = "计量单位")
@@ -241,7 +241,7 @@ public class SyPreAssembledPackingListItem implements Serializable {
 
 	/**存货编码*/
 	@ApiModelProperty(value = "存货编码")
-	private java.lang.String inventoryCode;
+	private String inventoryCode;
 
 	/**区分成衣跟面辅料*/
 	@ApiModelProperty(value = "区分成衣跟面辅料")
@@ -254,28 +254,28 @@ public class SyPreAssembledPackingListItem implements Serializable {
 	private int isAdd;
 	//最底层供应商编码
 	@ApiModelProperty(value = "最底层供应商编码")
-	private java.lang.String supplierCode;
+	private String supplierCode;
 	//最底层供应商名称
 	@ApiModelProperty(value = "最底层供应商名称")
-	private java.lang.String supplier;
+	private String supplier;
 	//采购委外账套号
 	@ApiModelProperty(value = "采购委外账套号")
-	private java.lang.String ompoAccount;
+	private String ompoAccount;
 	//委外采购主表id
 	@ApiModelProperty(value = "委外采购主表id")
-	private java.lang.String ompoId;
+	private String ompoId;
 	//委外采购子表id
 	@ApiModelProperty(value = "委外采购子表id")
-	private java.lang.String ompoIdItem;
+	private String ompoIdItem;
 	//佣金
 	@ApiModelProperty(value = "佣金")
-	private java.math.BigDecimal ymoney;
+	private BigDecimal ymoney;
 	//订单号
 	@ApiModelProperty(value = "订单号")
 	private String orderNumber;
 	//剩余数量
 	@ApiModelProperty(value = "剩余数量")
-	private java.math.BigDecimal remainingQuantity;//剩余数量为0就会变成超发数量
+	private BigDecimal remainingQuantity;//剩余数量为0就会变成超发数量
 	/**超发数量*/
 	@Excel(name = "超发数量", width = 15)
 	@TableField(exist = false)
@@ -284,11 +284,11 @@ public class SyPreAssembledPackingListItem implements Serializable {
 	/**业务员*/
 	//@Excel(name = "业务员", width = 15)
 	@ApiModelProperty(value = "业务员")
-	private java.lang.String salesman;
+	private String salesman;
 	/**业务部门(销售部门)*/
 	//@Excel(name = "业务部门(销售部门)", width = 15)
 	@ApiModelProperty(value = "业务部门(销售部门)")
-	private java.lang.String salesDepartment;
+	private String salesDepartment;
 	/**采购/委外订单号*/
 	@Excel(name = "采购/委外订单号", width = 20)
 	@ApiModelProperty(value = "采购/委外订单号")
@@ -296,7 +296,7 @@ public class SyPreAssembledPackingListItem implements Serializable {
 	/**报关单价*/
 	@Excel(name = "报关单价", width = 15)
 	@ApiModelProperty(value = "报关单价")
-	private java.math.BigDecimal customsDeclarationUnitPrice;
+	private BigDecimal customsDeclarationUnitPrice;
 
 	//序号,H/D,PO,款号,订单号,UNIT PRICE(单价,分销点,ITEMCODE,启始箱号,结束箱号,颜色(中英文) sizes	件数/每箱,箱数,总件数,外箱长度,外箱宽度,外箱高度,总体积,外箱净重,总净重,外箱毛重,总毛重,NN.W,总价
 

+ 5 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/mapper/SyPreAssembledPackingListItemMapper.java

@@ -24,17 +24,17 @@ public interface SyPreAssembledPackingListItemMapper extends BaseMapper<SyPreAss
 
 	public List<SyPreAssembledPackingListItem> selectAll(String mainId);
 
-	public List<SyPreAssembledPackingListItem> selectSyShippingDetailsItemData(@Param("id")String id,@Param("groupId")String groupId);
+	public List<SyPreAssembledPackingListItem> selectSyShippingDetailsItemData(@Param("id") String id, @Param("groupId") String groupId);
 
-	public List<SizeTable> selectSize(@Param("begin") String begin,@Param("end") String end);
+	public List<SizeTable> selectSize(@Param("begin") String begin, @Param("end") String end);
 
-	public List<SizeTable> querySizes(@Param("value")String value,@Param("groupId")String groupId);
+	public List<SizeTable> querySizes(@Param("value") String value, @Param("groupId") String groupId);
 
 	public List<SizeTable> querySizes2(String ids);
 
-	public List<SizeTable> querySize(@Param("value")String value,@Param("groupId")String groupId);
+	public List<SizeTable> querySize(@Param("value") String value, @Param("groupId") String groupId);
 
-	public List<SizeTable> querySize2(@Param("groupId")String groupId,@Param("value2") String pid);
+	public List<SizeTable> querySize2(@Param("groupId") String groupId, @Param("value2") String pid);
 
 	@InterceptorIgnore(tenantLine = "true")
 	public List<PackingLineVo> pushData(String id);

+ 2 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/mapper/SyPreAssembledPackingListMapper.java

@@ -19,7 +19,7 @@ import org.jeecg.modules.spapl.vo.SyPreAssembledPackingListVo;
  */
 public interface SyPreAssembledPackingListMapper extends BaseMapper<SyPreAssembledPackingList> {
 
-   SyPreAssembledPackingList  selectSyShippingDetailsData(@Param("value")String id,@Param("groupId")String groupId);
+   SyPreAssembledPackingList  selectSyShippingDetailsData(@Param("value") String id, @Param("groupId") String groupId);
 
    SyPreAssembledPackingList  selectByOneId(String id);
 
@@ -29,7 +29,7 @@ public interface SyPreAssembledPackingListMapper extends BaseMapper<SyPreAssembl
 
    PackingHeaderVo pushData(String id);
 
-   List<PackingHeaderVo> pushDataBatch(@Param("list")String[] ids);
+   List<PackingHeaderVo> pushDataBatch(@Param("list") String[] ids);
    //发运明细分页列表查询
    public IPage<SyShippingDetailsVo> queryShippingDetails(IPage<SyShippingDetailsVo> page, @Param("ew") QueryWrapper<SyShippingDetailsVo> queryWrapper);
 

+ 5 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/service/ISyPreAssembledPackingListService.java

@@ -57,14 +57,14 @@ public interface ISyPreAssembledPackingListService extends IService<SyPreAssembl
 	 * @param id
 	 * @return
 	 */
-	public SyPreAssembledPackingList queryPageList3(String id,String groupId);
+	public SyPreAssembledPackingList queryPageList3(String id, String groupId);
 
 	/**
 	 * 汇总预装箱单
 	 * @param page,queryWrapper
 	 * @return
 	 */
-	public IPage<SyPreAssembledPackingListVo> selectPage(IPage<SyPreAssembledPackingListVo> page,QueryWrapper<SyPreAssembledPackingListVo> queryWrapper);
+	public IPage<SyPreAssembledPackingListVo> selectPage(IPage<SyPreAssembledPackingListVo> page, QueryWrapper<SyPreAssembledPackingListVo> queryWrapper);
 
 
 	/**
@@ -87,16 +87,16 @@ public interface ISyPreAssembledPackingListService extends IService<SyPreAssembl
 	 * @param ids
 	 * @return	PackingHeaderVo
 	 */
-	public List<PackingHeaderVo> pushDataBatch(String []ids);
+	public List<PackingHeaderVo> pushDataBatch(String[] ids);
 
 	/**
 	 * 根据数组
 	 * @param ids
 	 * @return
 	 */
-	public String submitBatch(String [] ids);
+	public String submitBatch(String[] ids);
 
-	public String cancelSubmitBatch(String [] ids);
+	public String cancelSubmitBatch(String[] ids);
 
 	public String updateShipping();
 

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

@@ -1,18 +1,14 @@
 package org.jeecg.modules.spapl.service.impl;
 
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.hibernate.engine.jdbc.Size;
 import org.jeecg.common.exception.JeecgBootException;
 import org.jeecg.common.util.oConvertUtils;
-import org.jeecg.modules.documents.letterDeposit.entity.SyLetterDeposit;
 import org.jeecg.modules.documents.letterDeposit.entity.SyLetterDepositItem;
 import org.jeecg.modules.documents.letterDeposit.mapper.SyLetterDepositItemMapper;
 import org.jeecg.modules.documents.letterDeposit.mapper.SyLetterDepositMapper;
 import org.jeecg.modules.documents.shippingDetails.entity.SyShippingDetails;
-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;
 import org.jeecg.modules.documents.shippingDetails.mapper.SyShippingDetailsMapper;
@@ -32,11 +28,9 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 
-import javax.annotation.Resource;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Collection;

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/vo/PackingHeaderVo.java

@@ -8,7 +8,7 @@ import java.util.List;
 @Data
 public class PackingHeaderVo {
     @ApiModelProperty("租户ID")
-    private java.lang.Long  tenantId;//租户ID
+    private Long  tenantId;//租户ID
     @ApiModelProperty("计划装箱单号")
     private String  packingHeaderNum;//计划装箱单号
     /*@ApiModelProperty("计划装箱单ID")

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/vo/PackingLineVo.java

@@ -7,7 +7,7 @@ import org.apache.poi.hpsf.Decimal;
 @Data
 public class PackingLineVo {
     @ApiModelProperty("租户ID")
-    private java.lang.Long tenantId;//租户ID
+    private Long tenantId;//租户ID
    /* @ApiModelProperty("装箱单行id")
     private String packingLineId;//装箱单行id,全局唯一*/
     /*@ApiModelProperty("装箱单头 ID")

+ 25 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/vo/SyPreAssembledPackingListVo.java

@@ -35,7 +35,7 @@ public class SyPreAssembledPackingListVo {
 	/**单据号*/
 	@Excel(name = "单据号", width = 35)
 	@ApiModelProperty(value = "单据号")
-	private java.lang.String documentNo;
+	private String documentNo;
 	/**款号*/
 	@ApiModelProperty(value = "款号")
   	@Excel(name = "款号", width = 15)
@@ -190,5 +190,28 @@ public class SyPreAssembledPackingListVo {
 	//@Excel(name = "是否被参照(0:无,1:被预托书参照,2:被装箱单参照)", width = 15)
 	@ApiModelProperty(value = "是否被参照(0:无,1:被预托书参照,2:被装箱单参照)")
 	private Integer isReference;
-	
+
+	public String str(){
+		//单据号	订单号	款号	客户(简称)	预发货日期	小po	分销点	存货名称	颜色
+		//采购/委外订单号	数量 	箱数	总净重	总毛重	总体积	集装箱代号	集装箱号	预托书号	成衣工厂
+		return documentNo+","+
+		orderNumber+","+
+		itemNumber+","+
+		customerAbbreviation+","+
+		preDeliveryDate+","+
+		smallPo+","+
+		distributionPoint+","+
+		inventoryName+","+
+		colour+","+
+		spurOrSubOrder+","+
+		total+","+
+		totalBoxes+","+
+		totalNetWeight+","+
+		totalGrossWeight+","+
+		totalVolume+","+
+		containerCode+","+
+		containerNumber+","+
+		depositaryReceiptNo+","+
+		garmentFactory;
+	}
 }

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

@@ -265,6 +265,8 @@ public class SyPackingListTailoringController {
 		 return Result.OK(pageList);
 	 }
 
+
+
 	/**
 	 * 添加
 	 *

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

@@ -181,30 +181,30 @@ public class SyPackingListTailoring implements Serializable {
 	/**业务类型*/
 	//@Excel(name = "业务类型", width = 15)
 	@ApiModelProperty(value = "业务类型")
-	private java.lang.String businessTypeValue;
+	private String businessTypeValue;
 
 	/**业务员*/
 	//@Excel(name = "业务员", width = 15)
 	@ApiModelProperty(value = "业务员")
-	private java.lang.String salesman;
+	private String salesman;
 
 	/*recording*/
 	@ApiModelProperty(value = "u8推送记录")
-	private java.lang.String recording;
+	private String recording;
 
 	/**syOrderDataId*/
 	//@Excel(name = "syOrderDataId", width = 15)
 	@ApiModelProperty(value = "syOrderDataId")
-	private java.lang.String syOrderDataId;
+	private String syOrderDataId;
 
 	/**业务部门(销售部门)*/
 	//@Excel(name = "业务部门(销售部门)", width = 15)
 	@ApiModelProperty(value = "业务部门(销售部门)")
-	private java.lang.String salesDepartment;
+	private String salesDepartment;
 
 	//委外采购Id
 	@ApiModelProperty(value = "委外采购主表Id")
-	private java.lang.String ompoId;
+	private String ompoId;
 
 	/**是否被参照(0:无,1:被预托书参照,2:被装箱单参照)*/
 	//@Excel(name = "是否被参照(0:无,1:被预托书参照,2:被装箱单参照)", width = 15)

+ 30 - 30
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/entity/SyPackingListTailoringItem.java

@@ -108,67 +108,67 @@ public class SyPackingListTailoringItem implements Serializable {
 	/**件数/箱*/
     @Excel(name = "件数/箱", width = 15)
 	@ApiModelProperty(value = "件数/箱")
-	private java.math.BigDecimal piecesBox;
+	private BigDecimal piecesBox;
 	/**箱数*/
     @Excel(name = "箱数", width = 15)
 	@ApiModelProperty(value = "箱数")
-	private java.math.BigDecimal boxNumber;
+	private BigDecimal boxNumber;
 	/**总件数*/
 	@Excel(name = "总件数", width = 15)
 	@ApiModelProperty(value = "总件数")
-	private java.math.BigDecimal total;
+	private BigDecimal total;
 	/**计划装箱数量*/
 	@Excel(name = "计划装箱数量", width = 15,isStatistics = true)
 	@ApiModelProperty(value = "计划装箱数量")
-	private java.math.BigDecimal planQuantity;
+	private BigDecimal planQuantity;
 	/**计划装箱数量*/
 	@Excel(name = "实际装箱数量", width = 15,isStatistics = true)
 	@ApiModelProperty(value = "实际装箱数量")
-	private java.math.BigDecimal actualPackingQty;
+	private BigDecimal actualPackingQty;
 	/**净重/箱*/
     @Excel(name = "净重/箱", width = 15)
 	@ApiModelProperty(value = "净重/箱")
-	private java.math.BigDecimal netWeight;
+	private BigDecimal netWeight;
 	/**总净重*/
     @Excel(name = "总净重", width = 15)
 	@ApiModelProperty(value = "总净重")
-	private java.math.BigDecimal totalNetWeight;
+	private BigDecimal totalNetWeight;
 	/**毛重/箱*/
     @Excel(name = "毛重/箱", width = 15)
 	@ApiModelProperty(value = "毛重/箱")
-	private java.math.BigDecimal grossWeight;
+	private BigDecimal grossWeight;
 	/**总毛重*/
     @Excel(name = "总毛重", width = 15)
 	@ApiModelProperty(value = "总毛重")
-	private java.math.BigDecimal totalGrossWeight;
+	private BigDecimal totalGrossWeight;
 	/**外箱长度*/
     @Excel(name = "外箱长度", width = 15)
 	@ApiModelProperty(value = "外箱长度")
-	private java.math.BigDecimal outerBoxLength;
+	private BigDecimal outerBoxLength;
 	/**外箱宽度*/
     @Excel(name = "外箱宽度", width = 15)
 	@ApiModelProperty(value = "外箱宽度")
-	private java.math.BigDecimal outerBoxWidth;
+	private BigDecimal outerBoxWidth;
 	/**外箱高度*/
     @Excel(name = "外箱高度", width = 15)
 	@ApiModelProperty(value = "外箱高度")
-	private java.math.BigDecimal outerBoxHeight;
+	private BigDecimal outerBoxHeight;
 	/**总体积*/
     @Excel(name = "总体积", width = 15)
 	@ApiModelProperty(value = "总体积")
-	private java.math.BigDecimal totalVolume;
+	private BigDecimal totalVolume;
 	/**净净重*/
     @Excel(name = "净净重", width = 15)
 	@ApiModelProperty(value = "净净重")
-	private java.math.BigDecimal netWeightToo;
+	private BigDecimal netWeightToo;
 	/**单价*/
     @Excel(name = "单价", width = 15)
 	@ApiModelProperty(value = "单价")
-	private java.math.BigDecimal unitPrice;
+	private BigDecimal unitPrice;
 	/**总价*/
     @Excel(name = "总价", width = 15)
 	@ApiModelProperty(value = "总价")
-	private java.math.BigDecimal totalPrice;
+	private BigDecimal totalPrice;
 	/**备注*/
     @Excel(name = "备注", width = 15)
 	@ApiModelProperty(value = "备注")
@@ -231,7 +231,7 @@ public class SyPackingListTailoringItem implements Serializable {
 	/**存货编码*/
 	@Excel(name = "存货编码", width = 15)
 	@ApiModelProperty(value = "存货编码")
-	private java.lang.String inventoryCode;
+	private String inventoryCode;
 
 	@Excel(name = "计量单位", width = 20)
 	@ApiModelProperty(value = "计量单位")
@@ -239,7 +239,7 @@ public class SyPackingListTailoringItem implements Serializable {
 
 	@Excel(name = "工厂单价", width = 20)
 	@ApiModelProperty(value = "工厂单价")
-	private java.math.BigDecimal factoryUnitPrice;
+	private BigDecimal factoryUnitPrice;
 
 
 
@@ -252,7 +252,7 @@ public class SyPackingListTailoringItem implements Serializable {
 	//@TableField(exist = false)
 	@Excel(name = "采购/委外订单号", width = 15)
 	@ApiModelProperty(value = "采购/委外订单号")
-	private java.lang.String spurOrSubOrder;
+	private String spurOrSubOrder;
 
 	/**计划尺码数量汇总*/
 	//@ExcelCollection(name="计划尺码数量汇总")
@@ -266,26 +266,26 @@ public class SyPackingListTailoringItem implements Serializable {
 
 
 	@ApiModelProperty(value = "最底层供应商编码")
-	private java.lang.String supplierCode;
+	private String supplierCode;
 
 	@ApiModelProperty(value = "最底层供应商名称")
-	private java.lang.String supplier;
+	private String supplier;
 
 	//采购委外账套号
 	@ApiModelProperty(value = "采购委外账套号")
-	private java.lang.String ompoAccount;
+	private String ompoAccount;
 
 	//委外采购主表Id
 	@ApiModelProperty(value = "委外采购主表Id")
-	private java.lang.String ompoId;
+	private String ompoId;
 
 	//委外采购子表Id
 	@ApiModelProperty(value = "委外采购子表Id")
-	private java.lang.String ompoIdItem;
+	private String ompoIdItem;
 
 	//佣金
 	@ApiModelProperty(value = "佣金")
-	private java.math.BigDecimal ymoney;
+	private BigDecimal ymoney;
 
 	//订单号
 	@ApiModelProperty(value = "订单号")
@@ -294,12 +294,12 @@ public class SyPackingListTailoringItem implements Serializable {
 	/**业务员*/
 	//@Excel(name = "业务员", width = 15)
 	@ApiModelProperty(value = "业务员")
-	private java.lang.String salesman;
+	private String salesman;
 
 	/**业务部门(销售部门)*/
 	//@Excel(name = "业务部门(销售部门)", width = 15)
 	@ApiModelProperty(value = "业务部门(销售部门)")
-	private java.lang.String salesDepartment;
+	private String salesDepartment;
 
 	/**申报要素ID*/
 	@ApiModelProperty(value = "申报要素ID")
@@ -308,16 +308,16 @@ public class SyPackingListTailoringItem implements Serializable {
 	/**报关单价*/
 	@Excel(name = "报关单价", width = 15)
 	@ApiModelProperty(value = "报关单价")
-	private java.math.BigDecimal customsDeclarationUnitPrice;
+	private BigDecimal customsDeclarationUnitPrice;
 
 	/**订单数据主表id*/
 	//@Excel(name = "订单数据主表id", width = 15)
 	@ApiModelProperty(value = "订单数据主表id")
-	private java.lang.String syOrderDataId;
+	private String syOrderDataId;
 
 	//@Excel(name = "订单数据子表id", width = 15)
 	@ApiModelProperty(value = "订单数据子表id")
-	private java.lang.String syOrderDataItemId;
+	private String syOrderDataItemId;
 
 	public SyPackingListTailoringItem(){
 

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

@@ -22,7 +22,7 @@ public interface SyPackingListTailoringItemMapper extends BaseMapper<SyPackingLi
 
 	public List<SyPackingListTailoringItem> queryId(String pId);
 
-	public List<SizeTable>size(String group_id,String id);
+	public List<SizeTable>size(String group_id, String id);
 
 	public List<SizeTable> sizes(String id);
 }

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

@@ -33,10 +33,10 @@ public interface SyPackingListTailoringMapper extends BaseMapper<SyPackingListTa
     public String getWhCodeByVenCode(String venCode);
 
     //获取供应商,区分来源
-    public Map<String,Object> getOmOrPo(@Param("tableName")String tableName,@Param("orderName")String orderName,@Param("id")String id);
+    public Map<String,Object> getOmOrPo(@Param("tableName") String tableName, @Param("orderName") String orderName, @Param("id") String id);
 
     //获取供应商,区分来源
-    public Map<String,Object> getOmOrPoItem(@Param("tableName")String tableName ,@Param("orderName")String orderName,@Param("id")String id);
+    public Map<String,Object> getOmOrPoItem(@Param("tableName") String tableName, @Param("orderName") String orderName, @Param("id") String id);
 
     //获取供应商,区分来源
     public Map<String,Object> getSoMain(String id);
@@ -50,5 +50,5 @@ public interface SyPackingListTailoringMapper extends BaseMapper<SyPackingListTa
     //获取供应商,区分来源
     public List<Map<String,Object>> getDispatchLists(String id);
 
-    public List<Map<String,Object>> getSaleBillVouchs(String id);
+    public List<Map<String,Object>> getRdrecord32(String id);
 }

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

@@ -159,7 +159,7 @@
     </select>
 
     <select id="getSoMain" parameterType="java.lang.String" resultType="java.util.HashMap">
-        select cPersonCode,cDepCode,cBusType,cPayCode,cexch_name,iExchRate,cCusCode,cSOCode    from SO_SOMain WHERE id=#{id}
+        select cPersonCode,cDepCode,cBusType,cPayCode,cexch_name,iExchRate,cCusCode,cSOCode,cSTCode,cexch_name     from SO_SOMain WHERE id=#{id}
     </select>
 
     <select id="getSoMainItem" parameterType="java.lang.String" resultType="java.util.HashMap">
@@ -174,7 +174,7 @@
         select * from DispatchLists where dlid=(select dlid from DispatchList where cDLCode=#{value })
     </select>
 
-    <select id="getSaleBillVouchs" parameterType="java.lang.String" resultType="java.util.HashMap">
-        select cinvcode,iQuantity,autoid from SaleBillVouchs where sbvid= (select sbvid from SaleBillVouch where cSBVCode=#{value });
+    <select id="getRdrecord32" parameterType="java.lang.String" resultType="java.util.HashMap">
+        select cinvcode,iQuantity,autoid from rdrecords32  where ID = (select ID  from rdrecord32  where ccode=#{value });
     </select>
 </mapper>

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

@@ -69,7 +69,7 @@ public interface ISyPackingListTailoringService extends IService<SyPackingListTa
 	 * @param queryWrapper
 	 * @return
 	 */
-	public IPage<SyPackingListTailoringVo> selectList(IPage<SyPackingListTailoringVo> page,QueryWrapper<SyPackingListTailoringVo> queryWrapper);
+	public IPage<SyPackingListTailoringVo> selectList(IPage<SyPackingListTailoringVo> page, QueryWrapper<SyPackingListTailoringVo> queryWrapper);
 
 	//类型转换
 	public SyShippingOrderItem typeConversion(SyPackingListTailoringItem syPackingListTailoringItem);
@@ -78,19 +78,19 @@ public interface ISyPackingListTailoringService extends IService<SyPackingListTa
 	SyPackingListTailoring getOrderNumber();
 
 	//批量提交
-	boolean submitBatch(String [] ids);
+	boolean submitBatch(String[] ids);
 
-	String cancelSubmitBatch(String [] ids);
+	String cancelSubmitBatch(String[] ids);
 
 	boolean excelAdd(List<SyPackingListTailoring> mains);
 
     String test(List<SyPackingListTailoring> mains);
 
-	Map<String,Object> one(List<SyPackingListTailoring> mains,Map<String,Object> map);
+	Map<String,Object> one(List<SyPackingListTailoring> mains, Map<String, Object> map);
 
-	Map<String,Object> two(List<SyPackingListTailoring> mains,Map<String,Object> map);
+	Map<String,Object> two(List<SyPackingListTailoring> mains, Map<String, Object> map);
 
-	Map<String,Object> three(List<SyPackingListTailoring> mains,Map<String,Object> map);
+	Map<String,Object> three(List<SyPackingListTailoring> mains, Map<String, Object> map);
 
     String getOrderDataId(String id);
 }

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

@@ -6,19 +6,12 @@ import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonObject;
 import org.jeecg.common.exception.JeecgBootException;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.config.InterfaceConnUtils;
-import org.jeecg.modules.documents.letterDeposit.entity.SyLetterDepositItem;
-import org.jeecg.modules.documents.shippingDetails.entity.SyShippingDetails;
-import org.jeecg.modules.documents.shippingDetails.entity.SyShippingDetailsItem;
-import org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrder;
 import org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrderItem;
 import org.jeecg.modules.documents.syShippingOrder.mapper.SyShippingOrderItemMapper;
 import org.jeecg.modules.documents.syShippingOrder.mapper.SyShippingOrderMapper;
-import org.jeecg.modules.documents.syShippingOrder.service.ISyShippingOrderService;
 import org.jeecg.modules.openApi.mapper.PurchaseWarehousingMapper;
 import org.jeecg.modules.spapl.entity.SizeTable;
 import org.jeecg.modules.spapl.entity.SyPreAssembledPackingList;
@@ -31,19 +24,15 @@ import org.jeecg.modules.splt.mapper.SyPackingListTailoringItemMapper;
 import org.jeecg.modules.splt.mapper.SyPackingListTailoringMapper;
 import org.jeecg.modules.splt.service.ISyPackingListTailoringService;
 import org.jeecg.modules.splt.vo.SyPackingListTailoringVo;
-import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 
-import java.io.File;
-import java.io.FileOutputStream;
 import java.io.FileWriter;
 import java.io.Serializable;
 import java.math.BigDecimal;
-import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
 
@@ -892,6 +881,11 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 						map3.put("CBUSTYPE",order.get("cBusType"));//业务类型(普通销售、分期付款)(如果传空,取来源单据)
 						map4.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 币种名称
 					}
 				}
 
@@ -911,6 +905,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 
 				mapItem4.put("CINVCODE",item.getInventoryCode());//存货编码
 				mapItem4.put("IQUANTITY",item.getTotal());//数量
+				mapItem4.put("size",item.getSize());//根据尺码判断
 				mapItem4.put("SOAUTOIDCOL","IDLSID");//订单明细ID对应字段名(关联单据类型为发货单IDLSID)
 				//mapItem4.put("AUTOID_SO","10300001");//关联明细ID 测试用先写
 
@@ -919,6 +914,8 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 
 				mapItem6.put("CINVCODE",item.getInventoryCode());//存货编码
 				mapItem6.put("IQUANTITY",item.getTotal());//数量
+				mapItem6.put("size",item.getSize());//根据尺码判断
+
 
 				mapItems.add(mapItem);
 				//mapItems2.add(mapItem2);
@@ -950,28 +947,10 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 			}
 			mapt.put("itemSort",mapSort);
 		}
-		try{
-			String txtWorld=((Map)mapList.get(0)).get("CACCID")+"\t"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS").format(System.currentTimeMillis())+"\n\n";
-			txtWorld+=mapList.toString()+"\n\n";
-			txtWorld+=mapList3.toString()+"\n\n";
-			txtWorld+=mapList4.toString()+"\n\n";
-			txtWorld+=mapList5.toString()+"\n\n";
-			txtWorld+=mapList6.toString()+"\n\n";
-			FileWriter file =new FileWriter ("D:\\test1\\test.txt",true);
-			file.write(txtWorld);	//以字节数组类型写入内容
-			file.close();
-			System.out.println("已创建test.txt文件,已写入内容");
-		}catch (Exception e){
-			e.printStackTrace();
-		}
-
-		/*mapLists.addAll(mapList);
-		//mapLists.addAll(mapList2);
-		mapLists.addAll(mapList3);
-		mapLists.addAll(mapList4);
-		mapLists.addAll(mapList5);
-		mapLists.addAll(mapList6);*/
 
+		text(mapList,"采购入库单");
+		text(mapList3,"销售发货单");
+		text(mapList5,"采购发票单");
 		JSONArray resturn1 = InterfaceConnUtils.doPost(mapList,"purchasein_import");//采购入库单		主表添加了一个字段,子表可能要添加一个字段
 		//JSONArray resturn2 = InterfaceConnUtils.doPost(mapList,"materialout_import");//材料出库单
 		JSONArray resturn3 = InterfaceConnUtils.doPost(mapList3,"consignment_import");//销售发货单
@@ -988,8 +967,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 		result(resturn5,"采购发票单",((Map) mapList.get(0)).get("CACCID").toString(),mains.get(0).getId());//采购发票单
 		this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn5.getJSONObject(0).get("U8ReceiptNo").toString()),"109");
 
-
-		JSONObject jsonObject3=resturn3.getJSONObject(0);//销售发货单*/
+		JSONObject jsonObject3=resturn3.getJSONObject(0);//销售发货单
 		String consignmentName=jsonObject3.get("U8ReceiptNo").toString();//获取销售发货单
 		//String consignmentName= "20220401T00245841";// jsonObject3.get("U8ReceiptNo").toString();//获取销售发货单
 		List<Map<String,Object>> consignmentMaps= syPackingListTailoringMapper.getDispatchLists(consignmentName);
@@ -998,15 +976,18 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 				JSONObject jsonObject=mapList4.getJSONObject(0);//循环迭代
 				List<Map<String,Object>> mapItems4= (List<Map<String,Object>>) jsonObject.get("DETAILList");
 				for (Map itemMap4 :  mapItems4){
-					if(itemMap4.get("CINVCODE").equals(map.get("cinvcode"))&&itemMap4.get("IQUANTITY").equals(map.get("iQuantity"))&&!itemMap4.containsKey("AUTOID_SO")){
+					if(itemMap4.get("size").equals(map.get("cFree2"))&&(Double.parseDouble( itemMap4.get("IQUANTITY").toString())
+					==Double.parseDouble( map.get("iQuantity").toString()))&&!itemMap4.containsKey("AUTOID_SO")){//根据尺码判断
 						getcFree((JSONObject) itemMap4,map);
 						itemMap4.put("AUTOID_SO",map.get("iDLsID"));
 					}
 				}
+				System.out.println("mapItems4\t"+mapItems4);
 			}
 		}
 
-		JSONArray resturn4 = InterfaceConnUtils.doPost(mapList4,"saleout_import");//销售出库单
+		text(mapList4,"销售出库单");
+		JSONArray resturn4 = InterfaceConnUtils.doPost(mapList4,"saleout_import");//
 		result(resturn4,"销售出库单",((Map) mapList.get(0)).get("CACCID").toString(),mains.get(0).getId());//销售出库单
 
 
@@ -1016,7 +997,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 		this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(saleoutName),"131");
 
 		//String saleoutName= "0000005974";// jsonObject4.get("U8ReceiptNo").toString();//获取销售发货单
-		List<Map<String,Object>> saleoutMaps= syPackingListTailoringMapper.getSaleBillVouchs(saleoutName);
+		List<Map<String,Object>> saleoutMaps= syPackingListTailoringMapper.getRdrecord32(saleoutName);
 		//System.out.println("saleoutMaps\t"+saleoutMaps);
 		if(saleoutMaps!=null){
 			for (Map map : saleoutMaps){
@@ -1024,22 +1005,35 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 				List<Map<String,Object>> mapItems6= (List<Map<String,Object>>) jsonObject.get("DETAILList");
 				for (Map itemMap6 :  mapItems6){
 					itemMap6.put("DISAUTOIDCOL","AUTOID");
-					if(itemMap6.get("CINVCODE").equals(map.get("cinvcode"))&&itemMap6.get("IQUANTITY").equals(map.get("iQuantity"))&&!itemMap6.containsKey("AUTOID_DIS")){
+					if(itemMap6.get("size").equals(map.get("cFree2"))&&(Double.parseDouble( itemMap6.get("IQUANTITY").toString())
+									==Double.parseDouble( map.get("iQuantity").toString()))&&!itemMap6.containsKey("AUTOID_DIS")){
 						itemMap6.put("AUTOID_DIS",map.get("autoid"));
 					}
 				}
 			}
 		}
 
+		text(mapList6,"销售发票单");
 		JSONArray resturn6 = InterfaceConnUtils.doPost(mapList6,"saleinvoice_import");//销售发票单
 		result(resturn6,"销售发票单",((Map) mapList.get(0)).get("CACCID").toString(),mains.get(0).getId());//销售发票单
 		this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn6.getJSONObject(0).get("U8ReceiptNo").toString()),"120");
 
-
-
 		return mapt;
 	}
 
+	public void text(JSONArray mapList,String tableName){
+		try{
+			String txtWorld=((Map)mapList.get(0)).get("CACCID")+"\t"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS").format(System.currentTimeMillis())+"\n\n";
+			txtWorld+=mapList.toString();
+			FileWriter file =new FileWriter ("D:\\test1\\"+tableName+".txt",true);
+			file.write(txtWorld);	//以字节数组类型写入内容
+			file.close();
+			System.out.println("已创建test.txt文件,已写入内容");
+		}catch (Exception e){
+			e.printStackTrace();
+		}
+	}
+
 	public void result(JSONArray jsonArray,String tableName ,String account,String id){
 		JSONObject jsonObject=jsonArray.getJSONObject(0);
 		if(jsonObject.get("Result").equals("F")){//获取发货单是否成功添加

+ 35 - 35
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/vo/SyPackingListTailoringPage.java

@@ -23,97 +23,97 @@ import io.swagger.annotations.ApiModelProperty;
 public class SyPackingListTailoringPage {
 	
 	/**主键*/
-	private java.lang.String id;
+	private String id;
 	/**预装箱单主表id*/
   	@Excel(name = "预装箱单主表id", width = 15)
-	private java.lang.String syPreAssembledPackingListId;
+	private String syPreAssembledPackingListId;
 	/**创建人*/
   	@Excel(name = "创建人", width = 15)
-	private java.lang.String createBy;
+	private String createBy;
 	/**创建日期*/
   	@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
   	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-	private java.util.Date createTime;
+	private Date createTime;
 	/**修改人*/
   	@Excel(name = "修改人", width = 15)
-	private java.lang.String updateBy;
+	private String updateBy;
 	/**修改日期*/
   	@Excel(name = "修改日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
   	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-	private java.util.Date updateTime;
+	private Date updateTime;
 	/**组织*/
   	@Excel(name = "组织", width = 15)
-	private java.lang.String pkOrg;
+	private String pkOrg;
 	/**删除状态*/
   	@Excel(name = "删除状态", width = 15)
-	private java.lang.String delFlag;
+	private String delFlag;
 	/**订单号*/
   	@Excel(name = "订单号", width = 15)
-	private java.lang.String orderNumber;
+	private String orderNumber;
 	/**款号*/
   	@Excel(name = "款号", width = 15)
-	private java.lang.String itemNumber;
+	private String itemNumber;
 	/**品名*/
   	@Excel(name = "品名", width = 15)
-	private java.lang.String productName;
+	private String productName;
 	/**尺码范围*/
   	@Excel(name = "尺码范围", width = 15)
-	private java.lang.String sizeRange;
+	private String sizeRange;
 	/**客户*/
   	@Excel(name = "客户", width = 15)
-	private java.lang.String customer;
+	private String customer;
 	/**客户简称*/
   	@Excel(name = "客户简称", width = 15)
-	private java.lang.String customerAbbreviation;
+	private String customerAbbreviation;
 	/**集装箱代号*/
   	@Excel(name = "集装箱代号", width = 15)
-	private java.lang.String containerCode;
+	private String containerCode;
 	/**集装箱号*/
   	@Excel(name = "集装箱号", width = 15)
-	private java.lang.String containerNumber;
+	private String containerNumber;
 	/**备注*/
   	@Excel(name = "备注", width = 15)
-	private java.lang.Object memo;
+	private Object memo;
 	/**成衣工厂*/
   	@Excel(name = "成衣工厂", width = 15)
-	private java.lang.String garmentFactory;
+	private String garmentFactory;
 	/**外销发票号*/
   	@Excel(name = "外销发票号", width = 15)
-	private java.lang.String exportInvoiceNo;
+	private String exportInvoiceNo;
 	/**u8备注*/
   	@Excel(name = "u8备注", width = 15)
-	private java.lang.Object u8Remarks;
+	private Object u8Remarks;
 	/**托书号*/
   	@Excel(name = "托书号", width = 15)
-	private java.lang.String syXxxId;
+	private String syXxxId;
 	/**预托书号*/
   	@Excel(name = "预托书号", width = 15)
-	private java.lang.String syXxxxId;
+	private String syXxxxId;
 	/**预发货日期*/
   	@Excel(name = "预发货日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
   	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-	private java.util.Date preDeliveryDate;
+	private Date preDeliveryDate;
 	/**小PO*/
   	@Excel(name = "小PO", width = 15)
-	private java.lang.String smailPo;
+	private String smailPo;
 	/**分销点*/
   	@Excel(name = "分销点", width = 15)
-	private java.lang.String theDistribution;
+	private String theDistribution;
 	/**存货名称*/
   	@Excel(name = "存货名称", width = 15)
-	private java.lang.String nameOfTheInventory;
+	private String nameOfTheInventory;
 	/**颜色*/
   	@Excel(name = "颜色", width = 15)
-	private java.lang.String color;
+	private String color;
 	/**采购/委外订单号*/
   	@Excel(name = "采购/委外订单号", width = 15)
-	private java.lang.String purchase;
+	private String purchase;
 	/**订单类型*/
   	@Excel(name = "订单类型", width = 15)
-	private java.lang.String orderType;
+	private String orderType;
 	/**工厂单价*/
   	@Excel(name = "工厂单价", width = 15)
 	private java.math.BigDecimal theFactoryPrice;
@@ -134,22 +134,22 @@ public class SyPackingListTailoringPage {
 	private java.math.BigDecimal totalVolume;
 	/**推送状态*/
   	@Excel(name = "推送状态", width = 15)
-	private java.lang.String pushState;
+	private String pushState;
 	/**单据状态*/
   	@Excel(name = "单据状态", width = 15)
-	private java.lang.String theDocumentsState;
+	private String theDocumentsState;
 	/**原因*/
   	@Excel(name = "原因", width = 15)
-	private java.lang.String cause;
+	private String cause;
 	/**是否云工厂推送*/
   	@Excel(name = "是否云工厂推送", width = 15)
-	private java.lang.String whetherCloudFactoryPush;
+	private String whetherCloudFactoryPush;
 	/**状态*/
   	@Excel(name = "状态", width = 15)
-	private java.lang.String state;
+	private String state;
 	/**附件*/
   	@Excel(name = "附件", width = 15)
-	private java.lang.String accessory;
+	private String accessory;
 	
 	@ExcelCollection(name="装箱单子表")
 	@ApiModelProperty(value = "装箱单子表")