Przeglądaj źródła

新增父合同

czh 2 lat temu
rodzic
commit
fcc4b0e8e4

+ 5 - 0
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/model/dto/res/QueryListResDto.java

@@ -163,4 +163,9 @@ public class QueryListResDto {
      */
     private String purchaseEntName;
 
+    /**
+     * 父合同名
+     */
+    private String contractPname;
+
 }

+ 6 - 0
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/model/report/LogisticsListExport.java

@@ -53,6 +53,12 @@ public class LogisticsListExport implements Serializable {
     @ExcelProperty(value = "合同名称")
     private String contractName;
 
+    /**
+     * 父合同名
+     */
+    @ExcelProperty(value = "父合同名称")
+    private String contractPname;
+
     /**
      * 签约方式中文名
      */

+ 6 - 0
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/model/report/TradeListExport.java

@@ -53,6 +53,12 @@ public class TradeListExport implements Serializable {
     @ExcelProperty(value = "合同名称")
     private String contractName;
 
+    /**
+     * 父合同名
+     */
+    @ExcelProperty(value = "父合同名称")
+    private String contractPname;
+
     /**
      * 签约方式中文名
      */

+ 5 - 0
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/model/vo/res/QueryListResVo.java

@@ -151,4 +151,9 @@ public class QueryListResVo implements Serializable {
      */
     private String statusName;
 
+    /**
+     * 父合同名
+     */
+    private String contractPname;
+
 }

+ 7 - 4
sckw-modules/sckw-contract/src/main/resources/mapper/KwcContractLogisticsMapper.xml

@@ -25,10 +25,10 @@
                 e.ent_id targetEntId,
                 e.firm_name targetEntName,
                 a.performed_amount performedAmount,
-                a.contract_pid contractPid
+                a.contract_pid contractPid,
+                f.name contractPname
           from kwc_contract_logistics a
-          left join kwc_contract_logistics_unit b
-            on a.id = b.contract_id
+          left join kwc_contract_logistics_unit b on a.id = b.contract_id
            and b.unit_type = #{entType}
            and case when a.status != 3 then b.ent_id in
                 <foreach collection="allEnt" separator="," open="(" close=")" item="item">
@@ -40,6 +40,7 @@
           left join kwc_contract_logistics_track c on a.id = c.contract_id and c.del_flag = 0 and c.type = 1
           left join kwc_contract_logistics_track d on a.id = d.contract_id and d.del_flag = 0 and d.type = 0
           left join kwc_contract_logistics_unit e on a.id = e.contract_id and e.unit_type != #{entType} and e.del_flag = 0
+          left join kwc_contract_logistics f on f.id = a.contract_pid
         where a.del_flag = 0
           and case when a.status = 3 then a.ent_id = #{entId} and #{entType} = 3
                 else (b.ent_id in
@@ -105,12 +106,14 @@
                e.ent_id carrierEntId,
                e.firm_name carrierEntName,
                a.performed_amount performedAmount,
-               a.contract_pid contractPid
+               a.contract_pid contractPid,
+               f.name contractPname,
           from kwc_contract_logistics a
           left join kwc_contract_logistics_unit b on a.id = b.contract_id and b.del_flag = 0 and b.unit_type = 3
           left join kwc_contract_logistics_unit e on a.id = e.contract_id and e.del_flag = 0 and e.unit_type = 4
           left join kwc_contract_logistics_track c on a.id = c.contract_id and c.del_flag = 0 and c.type = 1
           left join kwc_contract_logistics_track d on a.id = d.contract_id and d.del_flag = 0 and d.type = 0
+          left join kwc_contract_logistics f on f.id = a.contract_pid
          where a.del_flag = 0
            and a.status != 3
         <if test="startTime != null">

+ 6 - 2
sckw-modules/sckw-contract/src/main/resources/mapper/KwcContractTradeMapper.xml

@@ -25,7 +25,8 @@
                e.ent_id targetEntId,
                e.firm_name targetEntName,
                a.contract_pid contractPid,
-               a.performed_amount performedAmount
+               a.performed_amount performedAmount,
+               f.name contractPname
           from kwc_contract_trade a
           left join kwc_contract_trade_unit b
             on a.id = b.contract_id
@@ -40,6 +41,7 @@
           left join kwc_contract_trade_track c on a.id = c.contract_id and c.del_flag = 0 and c.type = 1
           left join kwc_contract_trade_track d on a.id = d.contract_id and d.del_flag = 0 and d.type = 0
           left join kwc_contract_trade_unit e on a.id = e.contract_id and e.unit_type != #{entType} and e.del_flag = 0
+          left join kwc_contract_trade f on f.id = a.contract_pid
          where a.del_flag = 0
            and case when a.status = 3 then a.ent_id = #{entId} and #{entType} = 1
                 else (b.ent_id in
@@ -132,12 +134,14 @@
                 e.ent_id purchaseEntId,
                 e.firm_name purchaseEntName,
                 a.contract_pid contractPid,
-                a.performed_amount performedAmount
+                a.performed_amount performedAmount,
+                f.name contractPname
         from kwc_contract_trade a
         left join kwc_contract_trade_unit b on a.id = b.contract_id and b.del_flag = 0 and b.unit_type = 1
         left join kwc_contract_trade_unit e on a.id = e.contract_id and e.del_flag = 0 and e.unit_type = 2
         left join kwc_contract_trade_track c on a.id = c.contract_id and c.del_flag = 0 and c.type = 1
         left join kwc_contract_trade_track d on a.id = d.contract_id and d.del_flag = 0 and d.type = 0
+        left join kwc_contract_trade f on a.contract_pid = f.id
         where a.del_flag = 0
           and a.status != 3
         <if test="startTime != null">