zhangyuewww 3 jaren geleden
bovenliggende
commit
d96c3f3972

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

@@ -187,6 +187,20 @@ public class StockPurchaseReceiptReport extends BaseModel<StockPurchaseReceiptRe
      */
     @TableField(exist = false)
     private String flag;
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @TableField(exist = false)
+    private Date startDate;
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @TableField(exist = false)
+    private Date endDate;
 
     /**
      *补货结转对象

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

@@ -232,6 +232,20 @@ public class StockSaleReceiptReport extends BaseModel<StockSaleReceiptReport> {
      */
     @TableField(exist = false)
     private String flag;
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @TableField(exist = false)
+    private Date startDate;
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @TableField(exist = false)
+    private Date endDate;
 
 
     @Override

+ 2 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/StockPurchaseReceiptReportServiceImpl.java

@@ -76,6 +76,8 @@ public class StockPurchaseReceiptReportServiceImpl extends ServiceImpl<StockPurc
         pageView.put("searchKeyWord", stockPurchaseReceiptReport.getSearchKeyWord());
         pageView.put("searchType", stockPurchaseReceiptReport.getSearchType());
         pageView.put("pageSize", stockPurchaseReceiptReport.getPageSize());
+        pageView.put("startDate", stockPurchaseReceiptReport.getStartDate());
+        pageView.put("endDate", stockPurchaseReceiptReport.getEndDate());
         pageView.put("currentPage", stockPurchaseReceiptReport.getCurrentPage());
         pageView.put("contractNo", stockPurchaseReceiptReport.getContractNo());
         pageView.put("statusFlag", stockPurchaseReceiptReport.getStatusFlag());

+ 2 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/StockSaleReceiptReportServiceImpl.java

@@ -79,6 +79,8 @@ public class StockSaleReceiptReportServiceImpl extends ServiceImpl<StockSaleRece
         pageView.put("searchKeyWord", stockSaleReceiptReport.getSearchKeyWord());
         pageView.put("searchType", stockSaleReceiptReport.getSearchType());
         pageView.put("pageSize", stockSaleReceiptReport.getPageSize());
+        pageView.put("startDate", stockSaleReceiptReport.getStartDate());
+        pageView.put("endDate", stockSaleReceiptReport.getEndDate());
         pageView.put("currentPage", stockSaleReceiptReport.getCurrentPage());
         pageView.put("contractNo", stockSaleReceiptReport.getContractNo());
         pageView.put("processNo", stockSaleReceiptReport.getProcessNo());

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

@@ -1823,10 +1823,10 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 cell.setCellValue(editString(exportVView.getGrade()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(12);
-                cell.setCellValue(Double.parseDouble(exportVView.getWaterContent()));
+                cell.setCellValue(Double.parseDouble(exportVView.getWaterContent()!=null?exportVView.getWaterContent():"0"));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(13);
-                cell.setCellValue(Double.parseDouble(exportVView.getImpurity()));
+                cell.setCellValue(Double.parseDouble(exportVView.getImpurity()!=null?exportVView.getImpurity():"0"));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(14);
                 cell.setCellValue(editString(exportVView.getCarNo()));

+ 16 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/StockPurchaseReceiptReportMapper.xml

@@ -20,6 +20,14 @@
         <if test="contractNo != null and contractNo != ''">
             AND contract_no = #{contractNo}
         </if>
+        <if test="startDate != null">
+            AND (DATE_FORMAT(create_date,"%Y%m%d") &gt;=
+            DATE_FORMAT(#{startDate},"%Y%m%d"))
+        </if>
+        <if test="endDate != null">
+            AND (DATE_FORMAT(create_date,"%Y%m%d") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d"))
+        </if>
         <if test="businessKeys != null and businessKeys.size > 0">
             and(
             <foreach collection="businessKeys" item="businessValue" open="(" close=")" separator="or">
@@ -80,6 +88,14 @@
                 AND amount_ing_payable-amount_ed_payable=0
             </if>
         </if>
+        <if test="startDate != null">
+            AND (DATE_FORMAT(create_date,"%Y%m%d") &gt;=
+            DATE_FORMAT(#{startDate},"%Y%m%d"))
+        </if>
+        <if test="endDate != null">
+            AND (DATE_FORMAT(create_date,"%Y%m%d") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d"))
+        </if>
         <if test="businessKeys != null and businessKeys.size > 0">
             and(
             <foreach collection="businessKeys" item="businessValue" open="(" close=")" separator="or">

+ 16 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/StockSaleReceiptReportMapper.xml

@@ -23,6 +23,14 @@
         <if test="processNo != null and processNo != ''">
             AND process_no = #{processNo}
         </if>
+        <if test="startDate != null">
+            AND (DATE_FORMAT(create_date,"%Y%m%d") &gt;=
+            DATE_FORMAT(#{startDate},"%Y%m%d"))
+        </if>
+        <if test="endDate != null">
+            AND (DATE_FORMAT(create_date,"%Y%m%d") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d"))
+        </if>
     </select>
     <!-- 获得销售出库统计列表 -->
     <select id="getListByCondition" parameterType="Map"
@@ -80,6 +88,14 @@
                 AND amount_ing_receivable-amount_ed_receivable=0
             </if>
         </if>
+        <if test="startDate != null">
+            AND (DATE_FORMAT(create_date,"%Y%m%d") &gt;=
+            DATE_FORMAT(#{startDate},"%Y%m%d"))
+        </if>
+        <if test="endDate != null">
+            AND (DATE_FORMAT(create_date,"%Y%m%d") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d"))
+        </if>
         ORDER BY delivery_date DESC
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}

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

@@ -132,6 +132,62 @@
             AND (DATE_FORMAT(w.in_out_date,"%Y%m%d") &lt;=
             DATE_FORMAT(#{endDate},"%Y%m%d"))
         </if>
+        UNION ALL
+        SELECT
+        c.comp_name as compName,
+        w.warehouse_name as warehouseName,
+        w.bin_number as binNumber,
+        w.create_date as createDate,
+        w.contract_no as contractNo,
+        '' as paymentNo,
+        '' as customerName,
+        '' as supplier,
+        w.goods_name as goodsName,
+        case when w.goods_name = '玉米(潮粮)' then '潮粮' else '干粮' end as type,
+        w.grade as grade,
+        d.water_content as waterContent,
+        d.impurity as impurity,
+        w.car_no as carNo,
+        w.box_no as boxNo,
+        w.box_no_other as boxNoOther,
+        w.title_no as titleNo,
+        w.title_no_other as titleNoOther,
+        0 as netWeightPrice,
+        w.gross_weight as grossWeight,
+        w.tare as tare,
+        w.deduction_weight as buckleWeight,
+        w.net_weight as netWeight,
+        '' as unitDeduction,
+        '' as pureWeightPrice,
+        w.pure_weight as pureWeight,
+        0 as amountIngPayable,
+        0 as amountEdPayable,
+        '' as payeeName,
+        '' as cardNo,
+        '' as bankDeposit,
+        '' as bankDepositBranch
+        FROM warehouse_in_out_info w
+        left join warehouse_in_out_detail d on w.id=d.info_id and d.delete_flag = 0
+        left join stock_purchase_receipt_report s on s.warehouse_record_id=w.id and s.delete_flag = 0
+        left join warehouse_base_info b on b.id=w.base_id and b.delete_flag = 0
+        left join common_company c on c.comp_id = b.comp_id and c.delete_flag = 0
+        WHERE w.delete_flag = '0'
+        AND b.comp_id = #{compId}
+        and w.in_out_flag = 2
+        and w.in_out_type='移库入库'
+        and w.status_flag=3
+        and s.id is null
+        <if test="warehouseName != null and warehouseName != ''">
+            AND w.warehouse_name= #{warehouseName}
+        </if>
+        <if test="startDate != null">
+            AND (DATE_FORMAT(w.in_out_date,"%Y%m%d") &gt;=
+            DATE_FORMAT(#{startDate},"%Y%m%d"))
+        </if>
+        <if test="endDate != null">
+            AND (DATE_FORMAT(w.in_out_date,"%Y%m%d") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d"))
+        </if>
     </select>
     <!-- 获得出库导出列表 -->
     <select id="getListByConditionOut" parameterType="Map"