|
@@ -972,6 +972,14 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
|
|
|
for (int i=0; i<strs.length;i++){
|
|
|
Cell cell = row.createCell(i);//横向
|
|
|
cell.setCellStyle(cellStyle2);
|
|
|
+ if(i>9&&i<12){
|
|
|
+ cell.setCellValue(Integer.parseInt(strs[i]));
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ else if(i>11&&i<15){
|
|
|
+ cell.setCellValue(Double.parseDouble(strs[i]));
|
|
|
+ continue;
|
|
|
+ }
|
|
|
cell.setCellValue(strs[i]);
|
|
|
//System.out.println("strs"+i+""+strs[i]);
|
|
|
}
|
|
@@ -980,23 +988,25 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
|
|
|
Row row = sheet.createRow(num+1);//数量 箱数 总净重 总毛重 总体积
|
|
|
Cell cell = row.createCell(9);
|
|
|
|
|
|
+
|
|
|
+
|
|
|
cell.setCellStyle(cellStyle);
|
|
|
cell.setCellValue("分组合计");
|
|
|
Cell cell1 = row.createCell(10);
|
|
|
cell1.setCellStyle(cellStyle);
|
|
|
- cell1.setCellValue(sysGroupCount.getTotal().toString());
|
|
|
+ cell1.setCellValue(sysGroupCount.getTotal().intValue());
|
|
|
Cell cell2 = row.createCell(11);
|
|
|
cell2.setCellStyle(cellStyle);
|
|
|
- cell2.setCellValue(sysGroupCount.getTotalBoxes().toString());
|
|
|
+ cell2.setCellValue(sysGroupCount.getTotalBoxes().intValue());
|
|
|
Cell cell3 = row.createCell(12);
|
|
|
cell3.setCellStyle(cellStyle);
|
|
|
- cell3.setCellValue(sysGroupCount.getTotalNetWeight().toString());
|
|
|
+ cell3.setCellValue(sysGroupCount.getTotalNetWeight().doubleValue());
|
|
|
Cell cell4 = row.createCell(13);
|
|
|
cell4.setCellStyle(cellStyle);
|
|
|
- cell4.setCellValue(sysGroupCount.getTotalGrossWeight().toString());
|
|
|
+ cell4.setCellValue(sysGroupCount.getTotalGrossWeight().doubleValue());
|
|
|
Cell cell5 = row.createCell(14);
|
|
|
cell5.setCellStyle(cellStyle);
|
|
|
- cell5.setCellValue(sysGroupCount.getTotalVolume().toString());
|
|
|
+ cell5.setCellValue(sysGroupCount.getTotalVolume().doubleValue());
|
|
|
num++;
|
|
|
}
|
|
|
Row row = sheet.createRow(num+1);//数量 箱数 总净重 总毛重 总体积
|
|
@@ -1202,7 +1212,8 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
|
|
|
}
|
|
|
cell.setCellValue(params[x]);//比例
|
|
|
}
|
|
|
- }else{
|
|
|
+ }
|
|
|
+ /*else{
|
|
|
params=("序号,PO,款号,订单号,UNIT PRICE(单价),分销点,ITEMCODE,启始箱号,结束箱号," +
|
|
|
"颜色(中英文),"+strs+"件数/每箱,箱数,总件数,外箱长度,外箱宽度,外箱高度,总体积,外箱净重,总净重," +
|
|
|
"外箱毛重,总毛重,NN.W,总价,Lot NO,Packs CODE,DC NO,SKU号码,LABEL(标签),ORDER NO,Pre-Pack SKU Number").split(",");
|
|
@@ -1216,7 +1227,7 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
|
|
|
}
|
|
|
cell.setCellValue(params[x]);//比例
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
List<SizeTable> sizes=list.get(i).getSizeTables();
|
|
|
SyPreAssembledPackingListItem itemN=list.get(0);
|
|
|
if(name!=null&&name.equals("1")){
|
|
@@ -1225,16 +1236,27 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
|
|
|
Cell cell = row.createCell(y);//横向
|
|
|
if(y==0){
|
|
|
cell.setCellStyle(cellStyle2);
|
|
|
- cell.setCellValue(i+1);//比例
|
|
|
+ cell.setCellValue(i+1);//
|
|
|
continue;
|
|
|
} else if(y>6&&y<params.length-8){
|
|
|
cell.setCellStyle(cellStyle);
|
|
|
- }else{
|
|
|
+ } else{
|
|
|
cell.setCellStyle(cellStyle2);
|
|
|
+ cell.setCellValue(params[y]);//
|
|
|
+ }
|
|
|
+
|
|
|
+ if(y==4||y==5||y>6&&y<params.length-8){
|
|
|
+ if(!params[y].equals("null")&&!params[y].equals("")){
|
|
|
+ cell.setCellValue(Integer.parseInt(params[y]));//
|
|
|
+ }
|
|
|
+ }else if(y>params.length-8&&y<params.length-2){
|
|
|
+ if(!params[y].equals("null")&&!params[y].equals("")){
|
|
|
+ cell.setCellValue(Double.parseDouble(params[y]));//
|
|
|
+ }
|
|
|
}
|
|
|
- cell.setCellValue(params[y]);//比例
|
|
|
}
|
|
|
- }else{
|
|
|
+ }
|
|
|
+ /* else{
|
|
|
params=list.get(i).toString2().replace("null","").split(",");
|
|
|
for (int y=0;y<params.length;y++){
|
|
|
Cell cell = row.createCell(y);//横向
|
|
@@ -1249,7 +1271,7 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
|
|
|
}
|
|
|
cell.setCellValue(params[y]);//比例
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1397,6 +1419,7 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
|
|
|
list.add("item NO./SKU NO./UPC NO./PACKS CODE");
|
|
|
list.add("PREACKSKU");
|
|
|
list.add("净净重");
|
|
|
+ list.add("配码规格");
|
|
|
for (int x=0;x<=sheet.getLastRowNum();x++){
|
|
|
Row row=sheet.getRow(x);//列
|
|
|
if(row==null){
|
|
@@ -1410,8 +1433,8 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
|
|
|
List<String> strs2=new ArrayList<String>();//获取尺码的信息
|
|
|
for (int i=0;i<row.getLastCellNum();i++){
|
|
|
Cell cell=row.getCell(i);
|
|
|
- if(x==0){
|
|
|
- if((i>7&&i<row.getLastCellNum()-13)||i==row.getLastCellNum()-4){
|
|
|
+ if(x==0){//获取字段名称
|
|
|
+ if((i>7&&i<row.getLastCellNum()-18)||i==row.getLastCellNum()-4){
|
|
|
strs3.add(cell.getStringCellValue());
|
|
|
}
|
|
|
if(list.contains(cell.getStringCellValue())){
|
|
@@ -1419,7 +1442,7 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
|
|
|
System.out.println("字段\t"+cell.getStringCellValue()+"\t"+i);
|
|
|
}
|
|
|
}else{
|
|
|
- if((i>7&&i<row.getLastCellNum()-13)||i==row.getLastCellNum()-4){
|
|
|
+ if((i>7&&i<row.getLastCellNum()-18)||i==row.getLastCellNum()-4){
|
|
|
if(cell==null){
|
|
|
strs2.add("");
|
|
|
}else{
|
|
@@ -1515,6 +1538,7 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
|
|
|
list.add("item NO./SKU NO./UPC NO./PACKS CODE");
|
|
|
list.add("PREACKSKU");
|
|
|
list.add("净净重");
|
|
|
+ list.add("配码规格");
|
|
|
for (int x=0;x<=sheet.getLastRowNum();x++){
|
|
|
//System.out.println("sheet.getLastRowNum()\t"+sheet.getLastRowNum());
|
|
|
Row row=sheet.getRow(x);//列
|
|
@@ -1530,14 +1554,14 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
|
|
|
for (int i=0;i<row.getLastCellNum();i++){
|
|
|
Cell cell=row.getCell(i);
|
|
|
if(x==0){
|
|
|
- if((i>7&&i<row.getLastCellNum()-13)||i==row.getLastCellNum()-4){
|
|
|
+ if((i>7&&i<row.getLastCellNum()-18)||i==row.getLastCellNum()-4){
|
|
|
strs3.add(cell.getStringCellValue());
|
|
|
}
|
|
|
if(list.contains(cell.getStringCellValue())){
|
|
|
nums.add(i);
|
|
|
}
|
|
|
}else{
|
|
|
- if((i>7&&i<row.getLastCellNum()-13)||i==row.getLastCellNum()-4){
|
|
|
+ if((i>7&&i<row.getLastCellNum()-18)||i==row.getLastCellNum()-4){
|
|
|
if(cell==null){
|
|
|
strs2.add("");
|
|
|
}else{
|
|
@@ -1585,10 +1609,11 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
|
|
|
@AutoLog(value = "获取excel导入的数据")
|
|
|
@ApiOperation(value="获取excel导入的数据", notes="获取excel导入的数据")
|
|
|
@RequestMapping(value = "/getExcelId", method = {RequestMethod.POST})
|
|
|
- public Result getExcelId(){
|
|
|
+ public Result getExcelId( ){
|
|
|
String[] ids=syPreAssembledPackingListService.getExcelId();
|
|
|
return Result.ok(ids);
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
}
|