소스 검색

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun

ccjgmwz 3 년 전
부모
커밋
3f95de75ca

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

@@ -90,11 +90,11 @@ public class ExportVView {
     /**
      * 毛重
      */
-    private Float grossWeight;
+    private String grossWeight;
     /**
      * 皮重
      */
-    private Float tare;
+    private String tare;
     /**
      * 扣重
      */
@@ -102,7 +102,7 @@ public class ExportVView {
     /**
      * 净重
      */
-    private Float netWeight;
+    private String netWeight;
     /**
      * 扣单价
      */
@@ -118,11 +118,11 @@ public class ExportVView {
     /**
      * 应付金额(元/吨)
      */
-    private Float amountIngPayable;
+    private String amountIngPayable;
     /**
      * 实付金额(元/吨)
      */
-    private Float amountEdPayable;
+    private String amountEdPayable;
     /**
      * 姓名
      */

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

@@ -1008,6 +1008,13 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 }
                 contractManagementInfo.setContractNo(inOutWarehouseTask.getMoveTaskNo());
                 contractManagementInfo.setContractPrice(inOutWarehouseTask.getUnitPrice());
+                //自运采购的移库
+                ContractManagementInfo contractManagementInfo1=contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
+                        .eq("comp_id",inOutWarehouseTask.getCompId())
+                        .eq("contract_no",inOutWarehouseTask.getSendWarehouse()));
+                if (contractManagementInfo1!=null){
+                    contractManagementInfo.setUnitContractPrice(contractManagementInfo1.getUnitContractPrice());
+                }
                 contractManagementInfo.setGrade(inOutWarehouseTask.getGrade());
                 contractManagementInfo.setInOutType("移库入库");
                 temp.add(contractManagementInfo);
@@ -1485,6 +1492,24 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         // 下styleDetailTitle
         styleDetail.setBorderBottom(HSSFCellStyle.BORDER_THIN);
 
+        HSSFCellStyle contextstyle = wb.createCellStyle();
+        // 指定单元格居中对齐
+        styleDetail.setAlignment(HSSFCellStyle.ALIGN_CENTER);
+        // 指定单元格垂直居中对齐
+        styleDetail.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
+        // 指定单元格自动换行
+        styleDetail.setWrapText(true);
+        // 设置单元格字体
+        styleDetail.setFont(fontDetail);
+        // 右边框
+        styleDetail.setBorderRight(HSSFCellStyle.BORDER_THIN);
+        // 左边框
+        styleDetail.setBorderLeft(HSSFCellStyle.BORDER_THIN);
+        // 上边框
+        styleDetail.setBorderTop(HSSFCellStyle.BORDER_THIN);
+        // 下styleDetailTitle
+        styleDetail.setBorderBottom(HSSFCellStyle.BORDER_THIN);
+
         HSSFCellStyle styleDetailYellow = wb.createCellStyle();
         // 指定单元格居中对齐
         styleDetailYellow.setAlignment(HSSFCellStyle.ALIGN_CENTER);
@@ -1816,16 +1841,18 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 cell.setCellValue(new Formatter().format("%.3f", editFloat(exportVView.getNetWeightPrice())).toString());
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(20);
-                cell.setCellValue(new Formatter().format("%.2f", editFloat(exportVView.getGrossWeight())).toString());
+                HSSFDataFormat df = wb.createDataFormat(); // 此处设置数据格式
+                contextstyle.setDataFormat(df.getBuiltinFormat("#,##0.00"));//保留两位小数点
+                cell.setCellValue(Double.parseDouble(exportVView.getGrossWeight()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(21);
-                cell.setCellValue(new Formatter().format("%.2f", editFloat(exportVView.getTare())).toString());
+                cell.setCellValue(Double.parseDouble(exportVView.getTare()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(22);
                 cell.setCellValue(new Formatter().format("%.2f", editFloat(exportVView.getBuckleWeight())).toString());
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(23);
-                cell.setCellValue(new Formatter().format("%.2f", editFloat(exportVView.getNetWeight())).toString());
+                cell.setCellValue(Double.parseDouble(exportVView.getNetWeight()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(24);
                 cell.setCellValue(new Formatter().format("%.2f", editFloat(exportVView.getUnitDeduction())).toString());
@@ -1834,13 +1861,13 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 cell.setCellValue(new Formatter().format("%.3f", editFloat(exportVView.getPureWeightPrice())).toString());
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(26);
-                cell.setCellValue(new Formatter().format("%.2f", editFloat(exportVView.getPureWeight())).toString());
+                cell.setCellValue(editFloat(exportVView.getPureWeight()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(27);
-                cell.setCellValue(new Formatter().format("%.2f", editFloat(exportVView.getAmountIngPayable())).toString());
+                cell.setCellValue(Double.parseDouble(exportVView.getAmountIngPayable()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(28);
-                cell.setCellValue(new Formatter().format("%.2f", editFloat(exportVView.getAmountEdPayable())).toString());
+                cell.setCellValue(Double.parseDouble(exportVView.getAmountEdPayable()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(29);
                 cell.setCellValue(editString(exportVView.getCustomerName()));
@@ -1872,7 +1899,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                     + UUID.randomUUID().toString().replaceAll("-", "");
 
             path = tempPath + excelPath + '/' + "合同信息"
-                    + ".xls";
+                    + ".xlsx";
 
         } catch (Exception e) {
             log.debug(e.getMessage());