Przeglądaj źródła

结算单导出

huangfuli 1 rok temu
rodzic
commit
89b5e10132

+ 20 - 7
winsea-haixin-plugin-yiliangyiyun/pom.xml

@@ -14,13 +14,13 @@
 
     <dependencies>
         <!-- 引入本地jar -->
-<!--        <dependency>-->
-<!--            <groupId>com.dangdang.openplatform.openapi</groupId>-->
-<!--            <artifactId>sdk</artifactId>-->
-<!--            <version>1.0-SNAPSHOT</version>-->
-<!--            <scope>system</scope>-->
-<!--            <systemPath>${project.basedir}/src/main/lib/jna.jar</systemPath>-->
-<!--        </dependency>-->
+        <!--        <dependency>-->
+        <!--            <groupId>com.dangdang.openplatform.openapi</groupId>-->
+        <!--            <artifactId>sdk</artifactId>-->
+        <!--            <version>1.0-SNAPSHOT</version>-->
+        <!--            <scope>system</scope>-->
+        <!--            <systemPath>${project.basedir}/src/main/lib/jna.jar</systemPath>-->
+        <!--        </dependency>-->
         <dependency>
             <groupId>com.yh.haixin</groupId>
             <artifactId>winsea-haixin-plugin-base</artifactId>
@@ -31,11 +31,13 @@
             <artifactId>jxl</artifactId>
             <version>2.6.12</version>
         </dependency>
+
         <dependency>
             <groupId>org.apache.poi</groupId>
             <artifactId>ooxml-schemas</artifactId>
             <version>1.3</version>
         </dependency>
+
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>
@@ -100,6 +102,17 @@
             <artifactId>voice-sdk</artifactId>
             <version>1.1.1</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.pdfbox</groupId>
+            <artifactId>pdfbox</artifactId>
+            <version>2.0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.reflections</groupId>
+            <artifactId>reflections</artifactId>
+            <version>0.9.11</version>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
 
 

+ 10 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/ContractManagementInfoController.java

@@ -208,5 +208,15 @@ public class ContractManagementInfoController {
         return contractManagementInfoService.toBeRedeemedInfo(contractManagementInfo);
     }
 
+    /**
+     *结算单详情导出
+     *
+     * @return
+     * @throws Exception
+     */
+    @GetMapping("/settlementExport")
+    public void settlementExport(ContractManagementInfo example, HttpServletResponse response) throws Exception {
+        contractManagementInfoService.settlementExport(example,response);
+    }
 }
 

+ 22 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/ContractManagementInfo.java

@@ -677,6 +677,28 @@ public class ContractManagementInfo extends BaseModel<ContractManagementInfo> {
      */
     @TableField(exist = false)
     private Double actualWeight;
+    /**
+     * 合同附件(1是)
+     */
+    @TableField(exist = false)
+    private String needContractUrl;
+    /**
+     * 结算单附件(1是)
+     */
+    @TableField(exist = false)
+    private String needSettlementUrl;
+    /**
+     * 发运记录(1是)
+     */
+    @TableField(exist = false)
+    private String shippingRecord;
+    /**
+     * 费用记录(1是)
+     */
+    @TableField(exist = false)
+    private String expenseRecord;
+
+
     @Override
     protected Serializable pkVal() {
         return this.id;

+ 4 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/ExportVView.java

@@ -87,6 +87,10 @@ public class ExportVView {
      * 热损伤
      */
     private String jiaorenli;
+    /**
+     * 蛋白
+     */
+    private String protein;
     /**
      * 车牌号
      */

+ 13 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IContractManagementInfoService.java

@@ -149,5 +149,18 @@ public interface IContractManagementInfoService extends IService<ContractManagem
      */
     ContractManagementInfo getInContract(String contractNo,String compId);
 
+    /**
+     * 待赎回列表查询
+     * @param contractManagementInfo
+     * @return
+     */
     Page<ContractManagementInfo> toBeRedeemedInfo(ContractManagementInfo contractManagementInfo);
+
+    /**
+     * 结算单详情导出
+     * @param example
+     * @param response
+     * @throws Exception
+     */
+    void settlementExport(ContractManagementInfo example, HttpServletResponse response) throws Exception;
 }

Plik diff jest za duży
+ 195 - 196
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ContractManagementInfoServiceImpl.java


+ 158 - 129
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseBaseInfoServiceImpl.java

@@ -1991,8 +1991,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         // 3.在webbook中添加一个sheet,对应Excel文件中的sheet
         HSSFSheet sheet;
 
-        sheet = wb.createSheet("付款信息");
-        headerTitle = "付款信息";
+        sheet = wb.createSheet("入库信息");
+        headerTitle = "入库信息";
 
         // 4.设置打印参数
         sheet.setMargin(HSSFSheet.TopMargin, (short) 1);// 页边距(上)
@@ -2248,19 +2248,20 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         sheet.setColumnWidth(30, 12 * 256 + 184);
         sheet.setColumnWidth(31, 12 * 256 + 184);
         sheet.setColumnWidth(32, 12 * 256 + 184);
-        sheet.setColumnWidth(33, "发货库".getBytes().length * 25 / 10 * 256);
-        sheet.setColumnWidth(34, 12 * 256 + 184);
+        sheet.setColumnWidth(33, 12 * 256 + 184);
+        sheet.setColumnWidth(34, "发货库".getBytes().length * 25 / 10 * 256);
         sheet.setColumnWidth(35, 12 * 256 + 184);
         sheet.setColumnWidth(36, 12 * 256 + 184);
         sheet.setColumnWidth(37, 12 * 256 + 184);
-        sheet.setColumnWidth(38, "合计应付".getBytes().length * 2 * 256);
-        sheet.setColumnWidth(39, 12 * 256 + 184);
+        sheet.setColumnWidth(38, 12 * 256 + 184);
+        sheet.setColumnWidth(39, "合计应付".getBytes().length * 2 * 256);
         sheet.setColumnWidth(40, 12 * 256 + 184);
         sheet.setColumnWidth(41, 12 * 256 + 184);
         sheet.setColumnWidth(42, 12 * 256 + 184);
-        sheet.setColumnWidth(43, "卡号".getBytes().length * 4 * 256);
-        sheet.setColumnWidth(44, "开户支行".getBytes().length * 4 * 256);
-        sheet.setColumnWidth(45, 1 * 256 + 184);
+        sheet.setColumnWidth(43, 12 * 256 + 184);
+        sheet.setColumnWidth(44, "卡号".getBytes().length * 4 * 256);
+        sheet.setColumnWidth(45, "开户支行".getBytes().length * 4 * 256);
+        sheet.setColumnWidth(46, 1 * 256 + 184);
 
         // 创建单元格对象
         HSSFCell cell = null;
@@ -2370,6 +2371,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell.setCellStyle(styleTitle);
         cell = row0.createCell(44);
         cell.setCellStyle(styleTitle);
+        cell = row0.createCell(45);
+        cell.setCellStyle(styleTitle);
         rownum++;
 
         Double waterContentTotal = 0d;//水分合计
@@ -2481,20 +2484,20 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell = rowp.createCell(24);
         cell.setCellStyle(styleDetail);
         cell = rowp.createCell(25);
+        cell.setCellStyle(styleDetail);
+        cell = rowp.createCell(26);
         cell.setCellValue(amountIngPayableTotal / netWeightTotal);
         cell.setCellStyle(contextstyle1);
-        cell = rowp.createCell(26);
-        cell.setCellStyle(styleDetail);
         cell = rowp.createCell(27);
         cell.setCellStyle(styleDetail);
         cell = rowp.createCell(28);
         cell.setCellStyle(styleDetail);
-        //纯重合计
         cell = rowp.createCell(29);
+        cell.setCellStyle(styleDetail);
+        //纯重合计
+        cell = rowp.createCell(30);
         cell.setCellValue(netWeightTotal);
         cell.setCellStyle(contextstyle2);
-        cell = rowp.createCell(30);
-        cell.setCellStyle(styleDetail);
         cell = rowp.createCell(31);
         cell.setCellStyle(styleDetail);
         cell = rowp.createCell(32);
@@ -2510,10 +2513,10 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell = rowp.createCell(37);
         cell.setCellStyle(styleDetail);
         cell = rowp.createCell(38);
+        cell.setCellStyle(styleDetail);
+        cell = rowp.createCell(39);
         cell.setCellValue(amountIngPayableTotal);
         cell.setCellStyle(contextstyle1);
-        cell = rowp.createCell(39);
-        cell.setCellStyle(styleDetail);
         cell = rowp.createCell(40);
         cell.setCellStyle(styleDetail);
         cell = rowp.createCell(41);
@@ -2524,6 +2527,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell.setCellStyle(styleDetail);
         cell = rowp.createCell(44);
         cell.setCellStyle(styleDetail);
+        cell = rowp.createCell(45);
+        cell.setCellStyle(styleDetail);
         rownum++;
 
         HSSFRow row1 = sheet.createRow((int) rownum);
@@ -2586,78 +2591,81 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell.setCellValue("不完善粒");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(20);
-        cell.setCellValue("车牌号");
+        cell.setCellValue("蛋白");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(21);
-        cell.setCellValue("箱号1");
+        cell.setCellValue("车牌号");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(22);
-        cell.setCellValue("箱号2");
+        cell.setCellValue("箱号1");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(23);
-        cell.setCellValue("封号1");
+        cell.setCellValue("箱号2");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(24);
-        cell.setCellValue("封号2");
+        cell.setCellValue("封号1");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(25);
+        cell.setCellValue("封号2");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(26);
         cell.setCellValue("净重单价");
         cell.setCellStyle(contextstyle);
-        cell = row1.createCell(26);
+        cell = row1.createCell(27);
         cell.setCellValue("毛重");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(27);
+        cell = row1.createCell(28);
         cell.setCellValue("皮重");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(28);
+        cell = row1.createCell(29);
         cell.setCellValue("扣重");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(29);
+        cell = row1.createCell(30);
         cell.setCellValue("净重(吨)");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(30);
+        cell = row1.createCell(31);
         cell.setCellValue("发货毛重");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(31);
+        cell = row1.createCell(32);
         cell.setCellValue("发货皮重");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(32);
+        cell = row1.createCell(33);
         cell.setCellValue("发货净重");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(33);
+        cell = row1.createCell(34);
         cell.setCellValue("发货库");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(34);
+        cell = row1.createCell(35);
         cell.setCellValue("扣单价");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(35);
+        cell = row1.createCell(36);
         cell.setCellValue("纯重单价");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(36);
+        cell = row1.createCell(37);
         cell.setCellValue("纯重");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(37);
+        cell = row1.createCell(38);
         cell.setCellValue("卸车扣款");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(38);
+        cell = row1.createCell(39);
         cell.setCellValue("合计应付");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(39);
+        cell = row1.createCell(40);
         cell.setCellValue("实付金额");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(40);
+        cell = row1.createCell(41);
         cell.setCellValue("运输单价");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(41);
+        cell = row1.createCell(42);
         cell.setCellValue("运费");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(42);
+        cell = row1.createCell(43);
         cell.setCellValue("姓名");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(43);
+        cell = row1.createCell(44);
         cell.setCellValue("卡号");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(44);
+        cell = row1.createCell(45);
         cell.setCellValue("开户支行");
         cell.setCellStyle(styleDetail);
 
@@ -2753,24 +2761,29 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 }
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(20);
+                if (!StringUtils.isEmpty(exportVView.getProtein()) && "大豆".equals(exportVView.getGoodsName())) {
+                    cell.setCellValue(Double.parseDouble(exportVView.getProtein()));
+                }
+                cell.setCellStyle(contextstyle);
+                cell = rowx.createCell(21);
                 cell.setCellValue(editString(exportVView.getCarNo()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(21);
+                cell = rowx.createCell(22);
                 cell.setCellValue(editString(exportVView.getBoxNo()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(22);
+                cell = rowx.createCell(23);
                 cell.setCellValue(editString(exportVView.getBoxNoOther()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(23);
+                cell = rowx.createCell(24);
                 cell.setCellValue(editString(exportVView.getTitleNo()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(24);
+                cell = rowx.createCell(25);
                 cell.setCellValue(editString(exportVView.getTitleNoOther()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(25);
+                cell = rowx.createCell(26);
                 cell.setCellValue(Double.parseDouble(exportVView.getNetWeightPrice() != null ? exportVView.getNetWeightPrice() : "0"));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(26);
+                cell = rowx.createCell(27);
                 HSSFDataFormat df = wb.createDataFormat(); // 此处设置数据格式
                 contextstyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("#,##0.00"));//保留两位小数点
                 HSSFDataFormat df3 = wb.createDataFormat(); // 此处设置数据格式
@@ -2779,69 +2792,69 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                     cell.setCellValue(editDouble(exportVView.getGrossWeight()));
                 }
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(27);
+                cell = rowx.createCell(28);
                 if (exportVView.getTare() != null) {
                     cell.setCellValue(editDouble(exportVView.getTare()));
                 }
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(28);
+                cell = rowx.createCell(29);
                 cell.setCellValue(editFloat(exportVView.getBuckleWeight()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(29);
+                cell = rowx.createCell(30);
                 cell.setCellValue(Double.parseDouble(exportVView.getNetWeight()));
                 cell.setCellStyle(contextstyle2);
-                cell = rowx.createCell(30);
+                cell = rowx.createCell(31);
                 cell.setCellValue(editDouble(exportVView.getDeliveryGrossWeight()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(31);
+                cell = rowx.createCell(32);
                 cell.setCellValue(editDouble(exportVView.getDeliveryTare()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(32);
+                cell = rowx.createCell(33);
                 cell.setCellValue(editDouble(exportVView.getDeliveryVolume()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(33);
+                cell = rowx.createCell(34);
                 cell.setCellValue(editString(exportVView.getSendWarehouse()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(34);
+                cell = rowx.createCell(35);
                 cell.setCellValue(editDouble(exportVView.getUnitDeduction()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(35);
+                cell = rowx.createCell(36);
                 if (exportVView.getPureWeightPrice() == null) {
                     cell.setCellValue(new Formatter().format("%.3f", editDouble(exportVView.getPureWeightPrice())).toString());
                 } else {
                     cell.setCellValue(new Formatter().format("%.3f", editDouble(exportVView.getPureWeightPrice() * 1000)).toString());
                 }
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(36);
+                cell = rowx.createCell(37);
                 if (exportVView.getPureWeight() == null) {
                     cell.setCellValue(editFloat(exportVView.getPureWeight()));
                 } else {
                     cell.setCellValue(editDouble(Double.valueOf(exportVView.getPureWeight()) / 1000));
                 }
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(37);
+                cell = rowx.createCell(38);
                 cell.setCellValue(editDouble(exportVView.getUnloadingDeduction() != null ? exportVView.getUnloadingDeduction() : 0));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(38);
+                cell = rowx.createCell(39);
                 cell.setCellValue(editDouble(exportVView.getAmountIngPayable() != null ? exportVView.getAmountIngPayable() : 0));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(39);
+                cell = rowx.createCell(40);
                 cell.setCellValue(new Formatter().format("%.2f", editDouble(exportVView.getAmountEdPayable())).toString());
 //                cell.setCellValue(editDouble(exportVView.getAmountEdPayable()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(40);
+                cell = rowx.createCell(41);
                 cell.setCellValue(new Formatter().format("%.2f", editDouble(exportVView.getTranPrice())).toString());
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(41);
+                cell = rowx.createCell(42);
                 cell.setCellValue(editFloat(exportVView.getFreight()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(42);
+                cell = rowx.createCell(43);
                 cell.setCellValue(editString(exportVView.getCustomerName()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(43);
+                cell = rowx.createCell(44);
                 cell.setCellValue(editString(exportVView.getCardNo()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(44);
+                cell = rowx.createCell(45);
                 cell.setCellValue(editString(exportVView.getBankDeposit() + "-" + exportVView.getBankDepositBranch()));
                 cell.setCellStyle(styleDetail);
 
@@ -2896,8 +2909,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         // 3.在webbook中添加一个sheet,对应Excel文件中的sheet
         HSSFSheet sheet;
 
-        sheet = wb.createSheet("付款信息");
-        headerTitle = "付款信息";
+        sheet = wb.createSheet("入库信息");
+        headerTitle = "入库信息";
 
         // 4.设置打印参数
         sheet.setMargin(HSSFSheet.TopMargin, (short) 1);// 页边距(上)
@@ -4006,8 +4019,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         sheet.setColumnWidth(33, 12 * 256 + 184);
         sheet.setColumnWidth(34, 12 * 256 + 184);
         sheet.setColumnWidth(35, 12 * 256 + 184);
-        sheet.setColumnWidth(36, "反馈日期".getBytes().length * 2 * 256);
-        sheet.setColumnWidth(37, 12 * 256 + 184);
+        sheet.setColumnWidth(36, 12 * 256 + 184);
+        sheet.setColumnWidth(37, "反馈日期".getBytes().length * 2 * 256);
         sheet.setColumnWidth(38, 12 * 256 + 184);
         sheet.setColumnWidth(39, 12 * 256 + 184);
         sheet.setColumnWidth(40, 12 * 256 + 184);
@@ -4016,10 +4029,11 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         sheet.setColumnWidth(43, 12 * 256 + 184);
         sheet.setColumnWidth(44, 12 * 256 + 184);
         sheet.setColumnWidth(45, 12 * 256 + 184);
-        sheet.setColumnWidth(46, "收款日期".getBytes().length * 2 * 256);
-        sheet.setColumnWidth(47, 12 * 256 + 184);
+        sheet.setColumnWidth(46, 12 * 256 + 184);
+        sheet.setColumnWidth(47, "收款日期".getBytes().length * 2 * 256);
         sheet.setColumnWidth(48, 12 * 256 + 184);
-        sheet.setColumnWidth(49, 1 * 256 + 184);
+        sheet.setColumnWidth(49, 12 * 256 + 184);
+        sheet.setColumnWidth(50, 1 * 256 + 184);
 
         // 创建单元格对象
         HSSFCell cell = null;
@@ -4137,6 +4151,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell.setCellStyle(styleTitle);
         cell = row0.createCell(48);
         cell.setCellStyle(styleTitle);
+        cell = row0.createCell(49);
+        cell.setCellStyle(styleTitle);
         rownum++;
 
         Map<String, Object> pageView = new HashMap<>();
@@ -4155,6 +4171,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             Double imperfectGrainTotal = 0d;//不完善粒合计
             Double bulkDensityTotal = 0d;//容重合计
             Double jiaorenliTotal = 0d;//热损伤合计
+            Double protrinTotal = 0d;//蛋白合计
             Double netWeightPriceTotal = 0d;//单价合计
             Double netWeightTotal = 0d;//净重合计
             Double amountIngPayableTotal = 0d;//应收合计
@@ -4177,6 +4194,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 imperfectGrainTotal = imperfectGrainTotal + ((Double.parseDouble(!StringUtils.isEmpty(exportVView.getImperfectGrain()) ? exportVView.getImperfectGrain() : "0")) * ((Double.parseDouble(!StringUtils.isEmpty(exportVView.getNetWeight()) ? exportVView.getNetWeight() : "0"))));
                 bulkDensityTotal = bulkDensityTotal + ((Double.parseDouble(!StringUtils.isEmpty(exportVView.getBulkDensity()) ? exportVView.getBulkDensity() : "0")) * ((Double.parseDouble(!StringUtils.isEmpty(exportVView.getNetWeight()) ? exportVView.getNetWeight() : "0"))));
                 jiaorenliTotal = jiaorenliTotal + ((Double.parseDouble(!StringUtils.isEmpty(exportVView.getJiaorenli()) ? exportVView.getJiaorenli() : "0")) * ((Double.parseDouble(!StringUtils.isEmpty(exportVView.getNetWeight()) ? exportVView.getNetWeight() : "0"))));
+                protrinTotal = protrinTotal + ((Double.parseDouble(!StringUtils.isEmpty(exportVView.getProtein()) ? exportVView.getProtein() : "0")) * ((Double.parseDouble(!StringUtils.isEmpty(exportVView.getNetWeight()) ? exportVView.getNetWeight() : "0"))));
                 netWeightPriceTotal = netWeightPriceTotal + (Double.valueOf(String.valueOf(exportVView.getUnitContractPrice() != null ? exportVView.getUnitContractPrice() : "0")));
                 netWeightTotal = netWeightTotal + (Double.valueOf(String.valueOf(exportVView.getNetWeight() != null ? exportVView.getNetWeight() : "0")));
                 amountIngPayableTotal = amountIngPayableTotal + exportVView.getAmountIngReceivable();
@@ -4240,7 +4258,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             cell.setCellValue(jiaorenliTotal / netWeightTmp);
             cell.setCellStyle(contextstyle1);
             cell = rowp.createCell(23);
-            cell.setCellStyle(styleDetail);
+            cell.setCellValue(protrinTotal / netWeightTmp);
+            cell.setCellStyle(contextstyle1);
             cell = rowp.createCell(24);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(25);
@@ -4256,18 +4275,18 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             cell = rowp.createCell(30);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(31);
+            cell.setCellStyle(styleDetail);
+            cell = rowp.createCell(32);
             cell.setCellValue(dataList.size());
             cell.setCellStyle(styleDetail1);
-            cell = rowp.createCell(32);
-            cell.setCellStyle(styleDetail);
             cell = rowp.createCell(33);
             cell.setCellStyle(styleDetail);
-            //纯重合计
             cell = rowp.createCell(34);
+            cell.setCellStyle(styleDetail);
+            //纯重合计
+            cell = rowp.createCell(35);
             cell.setCellValue(netWeightTotal);
             cell.setCellStyle(contextstyle1);
-            cell = rowp.createCell(35);
-            cell.setCellStyle(styleDetail);
             cell = rowp.createCell(36);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(37);
@@ -4283,10 +4302,10 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             cell = rowp.createCell(42);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(43);
+            cell.setCellStyle(styleDetail);
+            cell = rowp.createCell(44);
             cell.setCellValue(amountIngPayableTotal);
             cell.setCellStyle(contextstyle1);
-            cell = rowp.createCell(44);
-            cell.setCellStyle(styleDetail);
             cell = rowp.createCell(45);
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(46);
@@ -4295,6 +4314,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             cell.setCellStyle(styleDetail);
             cell = rowp.createCell(48);
             cell.setCellStyle(styleDetail);
+            cell = rowp.createCell(49);
+            cell.setCellStyle(styleDetail);
             rownum++;
         }
 
@@ -4368,81 +4389,84 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         cell.setCellValue("热损伤");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(23);
-        cell.setCellValue("车厢号");
+        cell.setCellValue("蛋白");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(24);
-        cell.setCellValue("箱号1");
+        cell.setCellValue("车厢号");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(25);
-        cell.setCellValue("箱号2");
+        cell.setCellValue("箱号1");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(26);
-        cell.setCellValue("封号1");
+        cell.setCellValue("箱号2");
         cell.setCellStyle(styleDetail);
         cell = row1.createCell(27);
+        cell.setCellValue("封号1");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(28);
         cell.setCellValue("封号2");
         cell.setCellStyle(contextstyle);
-        cell = row1.createCell(28);
+        cell = row1.createCell(29);
         cell.setCellValue("船名");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(29);
+        cell = row1.createCell(30);
         cell.setCellValue("航次");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(30);
+        cell = row1.createCell(31);
         cell.setCellValue("车牌号");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(31);
+        cell = row1.createCell(32);
         cell.setCellValue("车数");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(32);
+        cell = row1.createCell(33);
         cell.setCellValue("毛重(吨)");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(33);
+        cell = row1.createCell(34);
         cell.setCellValue("皮重(吨)");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(34);
+        cell = row1.createCell(35);
         cell.setCellValue("出库净重(吨)");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(35);
+        cell = row1.createCell(36);
         cell.setCellValue("反馈重量(吨)");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(36);
+        cell = row1.createCell(37);
         cell.setCellValue("反馈日期");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(37);
+        cell = row1.createCell(38);
         cell.setCellValue("结算重量(吨)");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(38);
+        cell = row1.createCell(39);
         cell.setCellValue("结算单价(元/吨)");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(39);
+        cell = row1.createCell(40);
         cell.setCellValue("汽运运费(元/吨)");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(40);
+        cell = row1.createCell(41);
         cell.setCellValue("火运运费(元/吨)");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(41);
+        cell = row1.createCell(42);
         cell.setCellValue("船运运费(元/吨)");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(42);
+        cell = row1.createCell(43);
         cell.setCellValue("运费");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(43);
+        cell = row1.createCell(44);
         cell.setCellValue("应收金额(元)");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(44);
+        cell = row1.createCell(45);
         cell.setCellValue("已收金额(元)");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(45);
+        cell = row1.createCell(46);
         cell.setCellValue("未收金额(元)");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(46);
+        cell = row1.createCell(47);
         cell.setCellValue("收款日期");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(47);
+        cell = row1.createCell(48);
         cell.setCellValue("已开票金额(元)");
         cell.setCellStyle(styleDetail);
-        cell = row1.createCell(48);
+        cell = row1.createCell(49);
         cell.setCellValue("状态");
         cell.setCellStyle(styleDetail);
         rownum++;
@@ -4537,87 +4561,92 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 }
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(23);
+                if (!StringUtils.isEmpty(exportVView.getProtein()) && "大豆".equals(exportVView.getGoodsName())) {
+                    cell.setCellValue(Double.parseDouble(exportVView.getProtein()));
+                }
+                cell.setCellStyle(contextstyle);
+                cell = rowx.createCell(24);
                 cell.setCellValue(editString(exportVView.getWingNumber()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(24);
+                cell = rowx.createCell(25);
                 cell.setCellValue(editString(exportVView.getBoxNo()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(25);
+                cell = rowx.createCell(26);
                 cell.setCellValue(editString(exportVView.getBoxNoOther()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(26);
+                cell = rowx.createCell(27);
                 cell.setCellValue(editString(exportVView.getTitleNo()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(27);
+                cell = rowx.createCell(28);
                 cell.setCellValue(editString(exportVView.getTitleNoOther()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(28);
+                cell = rowx.createCell(29);
                 cell.setCellValue(editString(exportVView.getShipNumber()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(29);
+                cell = rowx.createCell(30);
                 cell.setCellValue(editString(exportVView.getShipName()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(30);
+                cell = rowx.createCell(31);
                 cell.setCellValue(editString(exportVView.getCarNo()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(31);
+                cell = rowx.createCell(32);
                 cell.setCellValue("1");
                 cell.setCellStyle(styleDetail);
                 HSSFDataFormat df = wb.createDataFormat(); // 此处设置数据格式
                 contextstyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("#,##0.00"));//保留两位小数点
                 HSSFDataFormat df1 = wb.createDataFormat(); // 此处设置数据格式
                 contextstyle1.setDataFormat(HSSFDataFormat.getBuiltinFormat("#,##0.00"));//保留两位小数点
-                cell = rowx.createCell(32);
+                cell = rowx.createCell(33);
                 cell.setCellValue(editDouble(exportVView.getGrossWeight()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(33);
+                cell = rowx.createCell(34);
                 cell.setCellValue(editDouble(exportVView.getTare()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(34);
+                cell = rowx.createCell(35);
                 cell.setCellValue(Double.parseDouble(exportVView.getNetWeight()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(35);
+                cell = rowx.createCell(36);
                 cell.setCellValue(editFloat(exportVView.getFeedbackWeight()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(36);
+                cell = rowx.createCell(37);
                 String date1 = addDateOneDay(exportVView.getFeedbackDate() != null ? exportVView.getFeedbackDate() : new Date());
                 cell.setCellValue(date1);
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(37);
+                cell = rowx.createCell(38);
                 cell.setCellValue(editFloat(exportVView.getSettlementWeight()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(38);
+                cell = rowx.createCell(39);
                 cell.setCellValue(editFloat(exportVView.getSettlementPrice()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(39);
+                cell = rowx.createCell(40);
                 cell.setCellValue(editFloat(exportVView.getCarFreight()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(40);
+                cell = rowx.createCell(41);
                 cell.setCellValue(editFloat(exportVView.getTrainFreight()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(41);
-                cell.setCellValue(editFloat(exportVView.getShipFreight()));
-                cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(42);
                 cell.setCellValue(editFloat(exportVView.getShipFreight()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(43);
+                cell.setCellValue(editFloat(exportVView.getShipFreight()));
+                cell.setCellStyle(styleDetail);
+                cell = rowx.createCell(44);
                 cell.setCellValue(editDouble(exportVView.getAmountIngReceivable()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(44);
+                cell = rowx.createCell(45);
                 cell.setCellValue(editDouble(exportVView.getAmountEdReceivable()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(45);
+                cell = rowx.createCell(46);
                 cell.setCellValue(editDouble(exportVView.getAmountNotReceivable()));
                 cell.setCellStyle(contextstyle);
-                cell = rowx.createCell(46);
+                cell = rowx.createCell(47);
                 String date2 = addDateOneDay(exportVView.getCollectionDate() != null ? exportVView.getCollectionDate() : new Date());
                 cell.setCellValue(date2);
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(47);
+                cell = rowx.createCell(48);
                 cell.setCellValue(editFloat(exportVView.getMoney()));
                 cell.setCellStyle(styleDetail);
-                cell = rowx.createCell(48);
+                cell = rowx.createCell(49);
                 cell.setCellValue(editString(exportVView.getStatus()));
                 cell.setCellStyle(styleDetail);
 

+ 2 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/ContractManagementInfoMapper.xml

@@ -455,6 +455,8 @@
         m.settlement_price as settlementPrice,
         m.settlement_date as settlementDate,
         m.weight,
+        m.statement_url as statementUrl,
+        m.address_url as addressUrl,
         SUM(war.surplus_weight) as surplus,
         m.profit,
         m.approve_status as approveStatus,

+ 6 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseBaseInfoMapper.xml

@@ -60,6 +60,7 @@
         q.imperfect_grain as imperfectGrain,
         q.bulk_density as bulkDensity,
         q.jiaorenli as jiaorenli,
+        q.protein as protein,
         a.car_no as carNo,
         q.box_no as boxNo,
         q.box_no_other as boxNoOther,
@@ -134,6 +135,7 @@
         IFNULL(q.imperfect_grain,wd.imperfect_grain) as imperfectGrain,
         IFNULL(q.bulk_density,wd.bulk_density) as bulkDensity,
         IFNULL(q.jiaorenli,wd.jiaorenli) as jiaorenli,
+        IFNULL(q.protein,wd.protein) as protein,
         s.car_no as carNo,
         w.box_no as boxNo,
         w.box_no_other as boxNoOther,
@@ -207,6 +209,7 @@
         q.imperfect_grain as imperfectGrain,
         q.bulk_density as bulkDensity,
         q.jiaorenli as jiaorenli,
+        q.protein as protein,
         w.car_no as carNo,
         w.box_no as boxNo,
         w.box_no_other as boxNoOther,
@@ -290,6 +293,7 @@
         d.imperfect_grain as imperfectGrain,
         d.bulk_density as bulkDensity,
         d.jiaorenli as jiaorenli,
+        d.protein as protein,
         w.car_no as carNo,
         w.box_no as boxNo,
         w.box_no_other as boxNoOther,
@@ -356,6 +360,7 @@
         d.imperfect_grain as imperfectGrain,
         d.bulk_density as bulkDensity,
         d.jiaorenli as jiaorenli,
+        d.protein as protein,
         w.car_no as carNo,
         w.box_no as boxNo,
         w.box_no_other as boxNoOther,
@@ -429,6 +434,7 @@
         g.imperfect_grain as imperfectGrain,
         g.bulk_density as bulkDensity,
         g.jiaorenli as jiaorenli,
+        g.protein as protein,
         s.car_no as carNo,
         s.case_no as boxNo,
         s.case_no_other as boxNoOther,

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików