于继渤 1 год назад
Родитель
Сommit
0455775198

+ 179 - 2
src/main/java/com/dk/mdm/mapper/ivt/InboundMapper.xml

@@ -311,6 +311,7 @@
             <if test="intoStatus != null and intoStatus != ''">
                  AND tpi.into_status LIKE concat('%',my_ex.likequery(#{intoStatus}),'%')
             </if>
+
             <if test="skuModel != null and skuModel!='' ">
                 and exists (select 1 from dkic_b.t_psi_inbound_item tpii
                 left join dkic_b.t_mst_goods_sku tmgs on tmgs.sku_id = tpii.sku_id
@@ -1198,7 +1199,95 @@
         else true end as "paymentFlag"
         FROM dkic_b.t_psi_inbound tpi
         <include refid="Join_Table_Return"/>
-        <include refid="Condition"/>
+        <where>
+                <if test="intoNo != null and intoNo != ''">
+                    AND tpi.into_no LIKE concat('%',my_ex.likequery(#{intoNo}),'%')
+                </if>
+                <if test="intoType != null and intoType != ''">
+                    AND tpi.into_type LIKE concat('%',my_ex.likequery(#{intoType}),'%')
+                </if>
+                <if test="intoTypes != null and intoTypes.size()>0">
+                    AND tpi.into_type =any(#{intoTypes,typeHandler=StringListTypeHandler})
+                </if>
+                <if test="intoReasonList != null and intoReasonList.size()>0">
+                    AND tpi.into_reason =any(#{intoReasonList,typeHandler=UuidListTypeHandler})
+                </if>
+                <if test="searchText !=null and searchText != ''">
+                    AND (
+                    tpi.into_no   LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                    or tmp.return_address LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                    or tmp.contact_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                    or tmp.sup_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                    )
+                </if>
+                <if test="staffIds != null and staffIds.size()>0">
+                    AND t.staff_id = any(#{staffIds, typeHandler=uuidListTypeHandler})
+                </if>
+                <if test="orgIds != null and orgIds.size()>0">
+                    AND t.org_id = any(#{orgIds, typeHandler=uuidListTypeHandler})
+                </if>
+                <if test="fromId != null and fromId != ''">
+                    AND tpi.from_id = #{fromId}::uuid
+                </if>
+                <if test="fromNo != null and fromNo != ''">
+                    AND tpi.from_no LIKE concat('%',my_ex.likequery(#{fromNo}),'%')
+                </if>
+                <if test="orgId != null and orgId != ''">
+                    AND tpi.org_id = #{orgId}::uuid
+                </if>
+                <if test="orgName != null and orgName != ''">
+                    AND tmo.org_name LIKE concat('%',my_ex.likequery(#{orgName}),'%')
+                </if>
+                <if test="supName != null and supName != ''">
+                    AND tmp.sup_name LIKE concat('%',my_ex.likequery(#{supName}),'%')
+                </if>
+                <if test="staffName != null and staffName != ''">
+                    AND tms.staff_name LIKE concat('%',my_ex.likequery(#{staffName}),'%')
+                </if>
+                <if test="whName != null and whName != ''">
+                    AND tmw.wh_name LIKE concat('%',my_ex.likequery(#{whName}),'%')
+                </if>
+                <if test="staffId != null and staffId != ''">
+                    AND tpi.staff_id = #{staffId}::uuid
+                </if>
+
+                <if test="supId != null and supId != ''">
+                    AND tpi.sup_id = #{supId}::uuid
+                </if>
+                <if test="makeStaff != null and makeStaff != ''">
+                    AND tpi.make_staff = #{makeStaff}
+                </if>
+                <if test="viewVoidedDocuments !=null and viewVoidedDocuments == false">
+                    AND  tpi.flg_valid = true
+                </if>
+                <if test="makeTime != null">
+                    AND tpi.make_time = #{makeTime}
+                </if>
+                <if test="receivableId != null and receivableId != ''">
+                    AND tpi.receivable_id = #{receivableId}
+                </if>
+                <if test="flgValid != null">
+                    AND tpi.flg_valid = #{flgValid}
+                </if>
+                <if test="cpId != null">
+                    AND tpi.cp_id = #{cpId}
+                </if>
+                <if test="intoDateStart != null and intoDateEnd != null">
+                    AND tpi.into_date &gt;= #{intoDateStart}::timestamp with time zone
+                    AND tpi.into_date &lt; #{intoDateEnd}::timestamp with time zone + interval '1 day'
+                </if>
+                <if test="makeTimeStart != null and makeTimeEnd != null">
+                    AND tpi.make_time &gt;= #{makeTimeStart}::timestamp with time zone
+                    AND tpi.make_time &lt; #{makeTimeEnd}::timestamp with time zone + interval '1 day'
+                </if>
+                <if test="intoStatusList != null and intoStatusList.size()>0">
+                    AND tpi.into_status =
+                    any(#{intoStatusList, typeHandler= StringListTypeHandler})
+                </if>
+                <if test="intoStatus != null and intoStatus != ''">
+                    AND tpi.into_status LIKE concat('%',my_ex.likequery(#{intoStatus}),'%')
+                </if>
+        </where>
         ORDER BY tpi.op_create_time DESC
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}
@@ -1210,7 +1299,95 @@
         count(1)
         FROM dkic_b.t_psi_inbound tpi
         <include refid="Join_Table_Return"/>
-        <include refid="Condition"/>
+        <where>
+            <if test="intoNo != null and intoNo != ''">
+                AND tpi.into_no LIKE concat('%',my_ex.likequery(#{intoNo}),'%')
+            </if>
+            <if test="intoType != null and intoType != ''">
+                AND tpi.into_type LIKE concat('%',my_ex.likequery(#{intoType}),'%')
+            </if>
+            <if test="intoTypes != null and intoTypes.size()>0">
+                AND tpi.into_type =any(#{intoTypes,typeHandler=StringListTypeHandler})
+            </if>
+            <if test="intoReasonList != null and intoReasonList.size()>0">
+                AND tpi.into_reason =any(#{intoReasonList,typeHandler=UuidListTypeHandler})
+            </if>
+            <if test="searchText !=null and searchText != ''">
+                AND (
+                tpi.into_no   LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                or tmp.return_address LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                or tmp.contact_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                or tmp.sup_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                )
+            </if>
+            <if test="staffIds != null and staffIds.size()>0">
+                AND t.staff_id = any(#{staffIds, typeHandler=uuidListTypeHandler})
+            </if>
+            <if test="orgIds != null and orgIds.size()>0">
+                AND t.org_id = any(#{orgIds, typeHandler=uuidListTypeHandler})
+            </if>
+            <if test="fromId != null and fromId != ''">
+                AND tpi.from_id = #{fromId}::uuid
+            </if>
+            <if test="fromNo != null and fromNo != ''">
+                AND tpi.from_no LIKE concat('%',my_ex.likequery(#{fromNo}),'%')
+            </if>
+            <if test="orgId != null and orgId != ''">
+                AND tpi.org_id = #{orgId}::uuid
+            </if>
+            <if test="orgName != null and orgName != ''">
+                AND tmo.org_name LIKE concat('%',my_ex.likequery(#{orgName}),'%')
+            </if>
+            <if test="supName != null and supName != ''">
+                AND tmp.sup_name LIKE concat('%',my_ex.likequery(#{supName}),'%')
+            </if>
+            <if test="staffName != null and staffName != ''">
+                AND tms.staff_name LIKE concat('%',my_ex.likequery(#{staffName}),'%')
+            </if>
+            <if test="whName != null and whName != ''">
+                AND tmw.wh_name LIKE concat('%',my_ex.likequery(#{whName}),'%')
+            </if>
+            <if test="staffId != null and staffId != ''">
+                AND tpi.staff_id = #{staffId}::uuid
+            </if>
+
+            <if test="supId != null and supId != ''">
+                AND tpi.sup_id = #{supId}::uuid
+            </if>
+            <if test="makeStaff != null and makeStaff != ''">
+                AND tpi.make_staff = #{makeStaff}
+            </if>
+            <if test="viewVoidedDocuments !=null and viewVoidedDocuments == false">
+                AND  tpi.flg_valid = true
+            </if>
+            <if test="makeTime != null">
+                AND tpi.make_time = #{makeTime}
+            </if>
+            <if test="receivableId != null and receivableId != ''">
+                AND tpi.receivable_id = #{receivableId}
+            </if>
+            <if test="flgValid != null">
+                AND tpi.flg_valid = #{flgValid}
+            </if>
+            <if test="cpId != null">
+                AND tpi.cp_id = #{cpId}
+            </if>
+            <if test="intoDateStart != null and intoDateEnd != null">
+                AND tpi.into_date &gt;= #{intoDateStart}::timestamp with time zone
+                AND tpi.into_date &lt; #{intoDateEnd}::timestamp with time zone + interval '1 day'
+            </if>
+            <if test="makeTimeStart != null and makeTimeEnd != null">
+                AND tpi.make_time &gt;= #{makeTimeStart}::timestamp with time zone
+                AND tpi.make_time &lt; #{makeTimeEnd}::timestamp with time zone + interval '1 day'
+            </if>
+            <if test="intoStatusList != null and intoStatusList.size()>0">
+                AND tpi.into_status =
+                any(#{intoStatusList, typeHandler= StringListTypeHandler})
+            </if>
+            <if test="intoStatus != null and intoStatus != ''">
+                AND tpi.into_status LIKE concat('%',my_ex.likequery(#{intoStatus}),'%')
+            </if>
+        </where>
     </select>
     <!--    查看来源单据,总单加明细  采购退货用-->
     <select id="selectInboundReturnById" resultMap="BaseResultMapInboundReturnResponse">

+ 2 - 2
src/main/java/com/dk/mdm/model/query/ivt/InboundQuery.java

@@ -243,8 +243,8 @@ public class InboundQuery extends PageInfo<InboundQuery>{
     @ApiModelProperty(value = "出库状态 (【系统字典】)")
     private String outStatus;
 
-
-
+    @ApiModelProperty(value = "查询作废标识")
+    private Boolean viewVoidedDocuments;
 
     private static final long serialVersionUID = 1L;
 

+ 1 - 1
src/main/resources/dev/bootstrap.yml

@@ -2,7 +2,7 @@ server:
   port: 7008
 spring:
   application:
-    name: mdm-server-dkic-b1
+    name: mdm-server-dkic-b1-yjb
   profiles:
     active: dev
   cloud: