zhangyuewww 1 year ago
parent
commit
c8ba34e5c6

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

@@ -341,7 +341,11 @@ public class TranProcessInfo extends BaseModel<TranProcessInfo> {
      */
     @TableField(exist = false)
     private Integer filterFlag;
-
+    /**
+     * 发货库点
+     */
+    @TableField(exist = false)
+    private String sendWarehouse;
     @Override
     protected Serializable pkVal() {
         return this.id;

+ 25 - 48
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/ContractManagementInfoMapper.xml

@@ -95,28 +95,29 @@
         p.imperfect_grain as imperfectGrain,
         m.status,
         m.signing_date as signingDate,
-        (
-        SELECT
-        IFNULL( sum( s.amount_ing_receivable ), 0 )
-        FROM
-        stock_sale_receipt_report s
-        WHERE
-        s.delete_flag = '0'
-        AND s.contract_no = m.contract_no
-        AND s.comp_id = m.comp_id
-        )- (
-        SELECT
-        IFNULL( sum( ei.amount_money ), 0 )
-        FROM
-        expense_info ei
-        WHERE
-        ei.delete_flag = '0'
-        AND ei.contract_no = m.contract_no
-        AND ei.comp_id = m.comp_id
-        AND ei.expenses_type = '1'
-        AND ei.expenses_purpose = '1'
-        AND ei.cost_type = '1'
-        AND ( ei.STATUS = '已收款' OR ei.STATUS = '已完成' )) AS mildewGrain,
+--         (
+--         SELECT
+--         IFNULL( sum( s.amount_ing_receivable ), 0 )
+--         FROM
+--         stock_sale_receipt_report s
+--         WHERE
+--         s.delete_flag = '0'
+--         AND s.contract_no = m.contract_no
+--         AND s.comp_id = m.comp_id
+--         )- (
+--         SELECT
+--         IFNULL( sum( ei.amount_money ), 0 )
+--         FROM
+--         expense_info ei
+--         WHERE
+--         ei.delete_flag = '0'
+--         AND ei.contract_no = m.contract_no
+--         AND ei.comp_id = m.comp_id
+--         AND ei.expenses_type = '1'
+--         AND ei.expenses_purpose = '1'
+--         AND ei.cost_type = '1'
+--         AND ( ei.STATUS = '已收款' OR ei.STATUS = '已完成' )) AS mildewGrain,
+        p.mildew_grain as mildewGrain,
         p.goods_name as goodsNames,
         m.statement_url as statementUrl,
         m.invoice_url as invoiceUrl,
@@ -138,19 +139,7 @@
         AND ei.expenses_type = '1'
         AND ei.expenses_purpose = '1'
         AND ei.cost_type != '3'
-        AND ( ei.STATUS = '已收款' OR ei.STATUS = '已完成' ))- (
-        SELECT
-        IFNULL( sum( ei.amount_money ), 0 )
-        FROM
-        expense_info ei
-        WHERE
-        ei.delete_flag = '0'
-        AND ei.contract_no = m.contract_no
-        AND ei.comp_id = m.comp_id
-        AND ei.expenses_type = '2'
-        AND ei.expenses_purpose = '1'
-        AND ei.cost_type != '3'
-        AND ( ei.STATUS = '已付款' OR ei.STATUS = '已完成' )) AS contractRevenue,
+        AND ( ei.STATUS = '已收款' OR ei.STATUS = '已完成' )) AS contractRevenue,
         (
         SELECT
         IFNULL( sum( ei.amount_money ), 0 )
@@ -163,19 +152,7 @@
         AND ei.expenses_type = '2'
         AND ei.expenses_purpose = '1'
         AND ei.cost_type != '3'
-        AND ( ei.STATUS = '已付款' OR ei.STATUS = '已完成' ))- (
-        SELECT
-        IFNULL( sum( ei.amount_money ), 0 )
-        FROM
-        expense_info ei
-        WHERE
-        ei.delete_flag = '0'
-        AND ei.contract_no = m.contract_no
-        AND ei.comp_id = m.comp_id
-        AND ei.expenses_type = '1'
-        AND ei.expenses_purpose = '1'
-        AND ei.cost_type != '3'
-        AND ( ei.STATUS = '已收款' OR ei.STATUS = '已完成' )) AS contractExpenditure,
+        AND ( ei.STATUS = '已付款' OR ei.STATUS = '已完成' )) AS contractExpenditure,
         (
         SELECT
         IFNULL( sum( ei.amount_money ), 0 )

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

@@ -8,7 +8,7 @@
         FROM tran_settlement_report
         WHERE
         delete_flag = '0'
-        AND create_date > '2023-01-01'
+        AND create_date > '2022-11-01'
         AND comp_id = #{compId}
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
@@ -133,7 +133,7 @@
         WHERE
         delete_flag = '0'
         AND comp_id = #{compId}
-        AND create_date > '2023-01-01'
+        AND create_date > '2022-11-01'
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
                 AND status='待请款'  and approve_status is not null