|
@@ -175,6 +175,11 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
|
|
|
if(oConvertUtils.isNotEmpty(syShippingDetails.getCustomerAbbreviation())){
|
|
|
queryWrapper.like("t.customerAbbreviation",syShippingDetails.getCustomerAbbreviation());
|
|
|
}
|
|
|
+
|
|
|
+ //账套号
|
|
|
+ if(oConvertUtils.isNotEmpty(syShippingDetails.getAccount())){
|
|
|
+ queryWrapper.like("t.account",syShippingDetails.getAccount());
|
|
|
+ }
|
|
|
if(oConvertUtils.isNotEmpty(isElement)){
|
|
|
if(isElement.equals("0")){//没有维护
|
|
|
queryWrapper.isNull("t.elementsId");
|
|
@@ -493,10 +498,22 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
|
|
|
queryWrapper.isNotNull("t.elementsId");
|
|
|
}
|
|
|
|
|
|
+ }
|
|
|
+ //分销点
|
|
|
+ if(oConvertUtils.isNotEmpty(syShippingDetails.getDistributionPoint())){
|
|
|
+ queryWrapper.like("t.distributionPoint",syShippingDetails.getDistributionPoint());
|
|
|
+ }
|
|
|
+ //客户
|
|
|
+ if(oConvertUtils.isNotEmpty(syShippingDetails.getCustomerAbbreviation())){
|
|
|
+ queryWrapper.like("t.customerAbbreviation",syShippingDetails.getCustomerAbbreviation());
|
|
|
}
|
|
|
if(oConvertUtils.isNotEmpty(syShippingDetails.getSubmitStatus())){
|
|
|
queryWrapper.eq("t.submitStatus",syShippingDetails.getSubmitStatus());
|
|
|
}
|
|
|
+ //账套号
|
|
|
+ if(oConvertUtils.isNotEmpty(syShippingDetails.getAccount())){
|
|
|
+ queryWrapper.like("t.account",syShippingDetails.getAccount());
|
|
|
+ }
|
|
|
if(oConvertUtils.isNotEmpty(syShippingDetails.getId())){
|
|
|
queryWrapper.like("t.id",syShippingDetails.getId());
|
|
|
}
|
|
@@ -636,12 +653,30 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
|
|
|
}
|
|
|
builder1.deleteCharAt(builder1.length()-1);
|
|
|
//创建列名放在第一行
|
|
|
- String[] params =("成衣工厂*款号*小po*分销点*起始箱号*结束箱号*item NO./SKU NO./UPC NO./PACKS CODE*PREACKSKU*"+builder+"颜色*计划装箱数量*净重/箱*毛重/箱*外箱长度*外箱宽度*外箱高度*净净重*客户简称*发运明细子表ID*发运明细分组ID*发运明细主表ID*申报要素ID").split("\\*");
|
|
|
+ String[] params =("成衣工厂*款号*小po*分销点*起始箱号*结束箱号*item NO./SKU NO./UPC NO./PACKS CODE*PREACKSKU*"+builder+"颜色*计划装箱数量*净重/箱*毛重/箱*外箱长度*外箱宽度*外箱高度*净净重*客户简称*配码规格*箱数*总件数*总毛重*总净重*发运明细子表ID*发运明细分组ID*发运明细主表ID*申报要素ID").split("\\*");
|
|
|
String[] params1 =syPreList.get(index).toString(builder.toString(),builder1.toString()).split("\\*");
|
|
|
+ String[] params2= {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","AA","AB","AC","AD","AE","AF","AG","AH","AI","AJ","AK","AL","AM","AN","AO","AP","AQ","AR","AS","AT","AU","AV","AW","AX","AY","AZ"};
|
|
|
+
|
|
|
+ int size = 8+sizeGroup.size()-1;
|
|
|
+ String box = "";
|
|
|
+ String gross = "";
|
|
|
+ String net = "";
|
|
|
+
|
|
|
Row row1 = sheet.createRow(0);
|
|
|
Row row2 = sheet.createRow(1);
|
|
|
|
|
|
for (int x=0;x<params.length;x++){
|
|
|
+
|
|
|
+ if(params[x].equals("箱数")){
|
|
|
+ box = params2[x];
|
|
|
+ }
|
|
|
+ if(params[x].equals("净重/箱")){
|
|
|
+ net = params2[x];
|
|
|
+ }
|
|
|
+ if(params[x].equals("毛重/箱")){
|
|
|
+ gross = params2[x];
|
|
|
+ }
|
|
|
+
|
|
|
Cell cell = row1.createCell(x);
|
|
|
cell.setCellValue(params[x]);
|
|
|
|
|
@@ -651,13 +686,34 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
|
|
|
}else{
|
|
|
sheet.setColumnWidth(x,3000);
|
|
|
}
|
|
|
- if(x > 7 && x < params.length-13){
|
|
|
+ if(x > 7 && x < params.length-18){
|
|
|
Cell cell1 = row2.createCell(x);
|
|
|
cell1.setCellValue(" ");
|
|
|
}else{
|
|
|
Cell cell1 = row2.createCell(x);
|
|
|
cell1.setCellValue(params1[x]);
|
|
|
-
|
|
|
+ }
|
|
|
+ //计算箱数
|
|
|
+ if(x == params.length-8){
|
|
|
+ Cell cell1 = row2.createCell(x);
|
|
|
+ cell1.setCellFormula("SUM(F2-E2+1)");
|
|
|
+ //cell1.setCellValue("=");
|
|
|
+ }
|
|
|
+ //总件数=所有尺码值*箱数
|
|
|
+ if(x == params.length-7){
|
|
|
+ Cell cell1 = row2.createCell(x);
|
|
|
+ cell1.setCellFormula("SUM("+params2[8]+"2:"+params2[size]+"2)*"+box+"2");
|
|
|
+ //cell1.setCellValue("=");
|
|
|
+ }
|
|
|
+ //总毛重
|
|
|
+ if(x == params.length-6){
|
|
|
+ Cell cell1 = row2.createCell(x);
|
|
|
+ cell1.setCellFormula("ROUND(SUM("+gross+"2*"+box+"2),2)");
|
|
|
+ }
|
|
|
+ //总净重
|
|
|
+ if(x == params.length-5){
|
|
|
+ Cell cell1 = row2.createCell(x);
|
|
|
+ cell1.setCellFormula("ROUND(SUM("+net+"2*"+box+"2),2)");
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -743,8 +799,11 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
|
|
|
|
|
|
//判断是不是辅料数据,如果是不必维护一下内容
|
|
|
String code = li.getInventoryCcode().substring(0,2);
|
|
|
- String codeTwo = li.getInventoryCcode().substring(0,4);
|
|
|
- if(!code.equals("04") && !code.equals("05")&& !code.equals("06")&& !code.equals("07")&& !codeTwo.equals("0299")&& !codeTwo.equals("0399")){
|
|
|
+ if(li.getInventoryCcode().length() >= 4){
|
|
|
+ code = li.getInventoryCcode().substring(0,4);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!code.equals("04") && !code.equals("05")&& !code.equals("06")&& !code.equals("07")&& !code.equals("0299")&& !code.equals("0399")){
|
|
|
//判断物料成份。isTc、款号是否为空,为空不允许提交
|
|
|
if(oConvertUtils.isEmpty(li.getItemNumber()) || oConvertUtils.isEmpty(li.getMaterialComposition()) || oConvertUtils.isEmpty(li.getIsTc())){
|
|
|
result.setSuccess(false);
|
|
@@ -1292,6 +1351,18 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ //分销点
|
|
|
+ if(oConvertUtils.isNotEmpty(syShippingDetails.getDistributionPoint())){
|
|
|
+ queryWrapper.like("t.distributionPoint",syShippingDetails.getDistributionPoint());
|
|
|
+ }
|
|
|
+ //客户
|
|
|
+ if(oConvertUtils.isNotEmpty(syShippingDetails.getCustomerAbbreviation())){
|
|
|
+ queryWrapper.like("t.customerAbbreviation",syShippingDetails.getCustomerAbbreviation());
|
|
|
+ }
|
|
|
+ //账套号
|
|
|
+ if(oConvertUtils.isNotEmpty(syShippingDetails.getAccount())){
|
|
|
+ queryWrapper.like("t.account",syShippingDetails.getAccount());
|
|
|
+ }
|
|
|
if(oConvertUtils.isNotEmpty(syShippingDetails.getSubmitStatus())){
|
|
|
queryWrapper.eq("t.submitStatus",syShippingDetails.getSubmitStatus());
|
|
|
}
|