姜永辉 1 год назад
Родитель
Сommit
164a416e8e

+ 9 - 4
src/main/java/com/dk/mdm/mapper/ivt/InboundMapper.xml

@@ -112,6 +112,7 @@
         <result column="flg_handle_setting" property="flgHandleSetting"/>
         <result column="flg_neg_into" property="flgNegInto"/>
         <result column="pickup_date" property="pickupDate" typeHandler="TimestampTypeHandler"/>
+        <result column="op_update_time" property="opUpdateTime" typeHandler="TimestampTypeHandler"/>
     </resultMap>
 
 
@@ -753,7 +754,8 @@
         tpi.into_reason,
         tpi.flg_valid,
         tpi.flg_auto_handle,
-        tpi.flg_handle_setting
+        tpi.flg_handle_setting,
+        tpi.op_update_time
     </sql>
     <sql id="Base_Column_List_Response_Out">
         tpo.out_id  as into_id,
@@ -781,10 +783,12 @@
         tpo.out_reason as into_reason,
         tpo.flg_valid,
         tpo.flg_auto_handle,
-        tpo.flg_handle_setting
+        tpo.flg_handle_setting,
+        tpo.op_update_time
     </sql>
     <!-- 条件查询 web端入库办理用,-->
     <select id="selectInbound" resultMap="BaseResultMapResponse">
+        select  * from (
         SELECT
         <include refid="Base_Column_List_Response_Into"/>,
         tmo.org_name AS "orgName",
@@ -809,7 +813,7 @@
             </if>
             <if test="intoTypes == null || intoTypes.size()==0">
                 AND (tpi.into_type = '入库类型-其他入库'
-                or tpi.into_type =  '入库类型-采购入库')
+                or tpi.into_type =  '入库类型-采购入库' or tpi.into_type =  '入库类型-期初入库')
             </if>
             <if test=" intoStatus != null and intoStatus != '' ">
                 AND  tpi.into_status LIKE concat('%',my_ex.likequery(#{intoStatus}),'%')
@@ -895,6 +899,7 @@
                 AND tpo.flg_valid =any(#{flgValidList, typeHandler=BooleanListTypeHandler})
             </if>
         </where>
+        ) tt order by tt.op_update_time desc
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}
         </if>
@@ -926,7 +931,7 @@
             </if>
             <if test="intoTypes == null || intoTypes.size()==0">
                 AND (tpi.into_type = '入库类型-其他入库'
-                or tpi.into_type =  '入库类型-采购入库')
+                or tpi.into_type =  '入库类型-采购入库'or tpi.into_type =  '入库类型-期初入库')
             </if>
             <if test=" intoStatus != null and intoStatus != '' ">
                 AND  tpi.into_status LIKE concat('%',my_ex.likequery(#{intoStatus}),'%')

+ 7 - 3
src/main/java/com/dk/mdm/mapper/ivt/OutboundMapper.xml

@@ -103,7 +103,7 @@
         <result column="out_reason_name" property="outReasonName" />
         <result column="sumOutAmt" property="sumOutAmt" />
         <result column="sumOutQty" property="sumOutQty" />
-
+        <result column="op_update_time" property="opUpdateTime" typeHandler="TimestampTypeHandler"/>
     </resultMap>
 
     <resultMap id="BaseResultMapDetailResponse" type="com.dk.mdm.model.response.ivt.OutboundResponse">
@@ -691,7 +691,8 @@
         tpo.out_reason,
         tpo.flg_valid,
         tpo.flg_auto_handle,
-        tpo.flg_handle_setting
+        tpo.flg_handle_setting,
+        tpo.op_update_time
     </sql>
     <sql id="Base_Column_List_Response_Into">
         tpi.into_id as out_id,
@@ -718,10 +719,12 @@
         tpi.into_reason as out_reason,
         tpi.flg_valid,
         tpi.flg_auto_handle,
-        tpi.flg_handle_setting
+        tpi.flg_handle_setting,
+        tpi.op_update_time
     </sql>
     <!-- 条件查询 web端入库办理用,-->
     <select id="selectOutbound" resultMap="BaseResultMapResponse">
+        select  * from (
         select
         <include refid="Base_Column_List_Response_Out"/>,
         tmo.org_name AS "orgName",
@@ -828,6 +831,7 @@
                 AND tpi.flg_valid =any(#{flgValidList, typeHandler=BooleanListTypeHandler})
             </if>
         </where>
+        ) tt order by tt.op_update_time desc
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}
         </if>

+ 8 - 0
src/main/java/com/dk/mdm/model/response/ivt/InboundResponse.java

@@ -65,6 +65,14 @@ public class InboundResponse  {
     private LocalDate pickupDate;
 
     /**
+     * 修改时间 (触发器自动处理)
+     */
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+    /**
      * 入库类型 (【系统字典】采购入库、销退入库、其他入库)
      */
     @Excel(name = "入库类型 (【系统字典】采购入库、销退入库、其他入库)")

+ 7 - 1
src/main/java/com/dk/mdm/model/response/ivt/OutboundResponse.java

@@ -191,7 +191,13 @@ public class OutboundResponse extends PageInfo<OutboundResponse> implements Seri
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     @TableField(typeHandler = TimestampTypeHandler.class)
     private LocalDate outDate;
-
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
 
     /**
      * 备注