فهرست منبع

其他出入库

姜永辉 1 سال پیش
والد
کامیت
e9388c52dd

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

@@ -846,14 +846,19 @@
                 AND tpi.sup_id = #{supId}::uuid
             </if>
             <if test="orgIdList != null and orgIdList.size() > 0">
-                AND tmo.org_id  =any(#{orgIdList, typeHandler=uuidListTypeHandler})
+                AND tpi.org_id  =any(#{orgIdList, typeHandler=uuidListTypeHandler})
             </if>
             <if test="staffIdList != null and staffIdList.size() > 0">
-                AND tms.staff_id  =any(#{staffIdList, typeHandler=uuidListTypeHandler})
+                AND tpi.staff_id  =any(#{staffIdList, typeHandler=uuidListTypeHandler})
             </if>
             <if test="flgValidList != null and flgValidList.size()>0">
                 AND tpi.flg_valid =any(#{flgValidList, typeHandler=BooleanListTypeHandler})
             </if>
+            <if test="searchText !=null and searchText != ''">
+                AND (
+                tpi.into_no   LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                )
+            </if>
         </where>
         union all
         select
@@ -901,14 +906,19 @@
                 AND tpo.sup_id = #{supId}::uuid
             </if>
             <if test="orgIdList != null and orgIdList.size() > 0">
-                AND tmo.org_id  =any(#{orgIdList, typeHandler=uuidListTypeHandler})
+                AND tpo.org_id  =any(#{orgIdList, typeHandler=uuidListTypeHandler})
             </if>
             <if test="staffIdList != null and staffIdList.size() > 0">
-                AND tms.staff_id  =any(#{staffIdList, typeHandler=uuidListTypeHandler})
+                AND tpo.staff_id  =any(#{staffIdList, typeHandler=uuidListTypeHandler})
             </if>
             <if test="flgValidList != null and flgValidList.size()>0">
                 AND tpo.flg_valid =any(#{flgValidList, typeHandler=BooleanListTypeHandler})
             </if>
+            <if test="searchText !=null and searchText != ''">
+                AND (
+                tpo.out_no   LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                )
+            </if>
         </where>
         ) tt order by tt.op_update_time desc
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">

+ 36 - 20
src/main/java/com/dk/mdm/mapper/ivt/OutboundMapper.xml

@@ -322,11 +322,11 @@
             <if test="cusName != null and cusName != ''">
                 AND tmc.cus_name LIKE concat('%',my_ex.likequery(#{cusName}),'%')
             </if>
-            <if test="orgIdList != null and orgIdList.size() > 0">
-                AND t.org_id  =any(#{orgIdList, typeHandler=uuidListTypeHandler})
+            <if test="orgIds != null and orgIds.size() > 0">
+                AND t.org_id  =any(#{orgIds, typeHandler=uuidListTypeHandler})
             </if>
-            <if test="staffIdList != null and staffIdList.size() > 0">
-                AND t.staff_id  =any(#{staffIdList, typeHandler=uuidListTypeHandler})
+            <if test="staffIds != null and staffIds.size() > 0">
+                AND t.staff_id  =any(#{staffIds, typeHandler=uuidListTypeHandler})
             </if>
             <if test="outStatusList != null and outStatusList.size() > 0">
                 AND t.out_status  =any(#{outStatusList, typeHandler=StringListTypeHandler})
@@ -809,15 +809,23 @@
             <if test="supId != null and supId != ''">
                 AND tpo.sup_id = #{supId}::uuid
             </if>
-            <if test="orgIdList != null and orgIdList.size() > 0">
-                AND tmo.org_id  =any(#{orgIdList, typeHandler=uuidListTypeHandler})
+            <if test="orgIds != null and orgIds.size() > 0">
+                AND tpo.org_id  =any(#{orgIds, typeHandler=uuidListTypeHandler})
             </if>
-            <if test="staffIdList != null and staffIdList.size() > 0">
-                AND tms.staff_id  =any(#{staffIdList, typeHandler=uuidListTypeHandler})
+            <if test="staffIds != null and staffIds.size() > 0">
+                AND tpo.staff_id  =any(#{staffIds, typeHandler=uuidListTypeHandler})
             </if>
             <if test="flgValidList != null and flgValidList.size()>0">
                 AND tpo.flg_valid =any(#{flgValidList, typeHandler=BooleanListTypeHandler})
             </if>
+            <if test="searchText !=null and searchText != ''">
+                AND (
+                tpo.out_no   LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                or tpo.cus_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                or tpo.cus_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                or tpo.address_full LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                )
+            </if>
         </where>
         union all
         SELECT
@@ -862,15 +870,23 @@
             <if test="supId != null and supId != ''">
                 AND tpi.sup_id = #{supId}::uuid
             </if>
-            <if test="orgIdList != null and orgIdList.size() > 0">
-                AND tmo.org_id  =any(#{orgIdList, typeHandler=uuidListTypeHandler})
+            <if test="orgIds != null and orgIds.size() > 0">
+                AND tpi.org_id  =any(#{orgIds, typeHandler=uuidListTypeHandler})
             </if>
-            <if test="staffIdList != null and staffIdList.size() > 0">
-                AND tms.staff_id  =any(#{staffIdList, typeHandler=uuidListTypeHandler})
+            <if test="staffIds != null and staffIds.size() > 0">
+                AND tpi.staff_id  =any(#{staffIds, typeHandler=uuidListTypeHandler})
             </if>
             <if test="flgValidList != null and flgValidList.size()>0">
                 AND tpi.flg_valid =any(#{flgValidList, typeHandler=BooleanListTypeHandler})
             </if>
+            <if test="searchText !=null and searchText != ''">
+                AND (
+                tpi.into_no   LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                or tmc.cus_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                or tmc.cus_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                or tmc.address_full LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+                )
+            </if>
         </where>
         ) tt order by tt.op_update_time desc
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
@@ -924,11 +940,11 @@
             <if test="supId != null and supId != ''">
                 AND tpo.sup_id = #{supId}::uuid
             </if>
-            <if test="orgIdList != null and orgIdList.size() > 0">
-                AND tmo.org_id  =any(#{orgIdList, typeHandler=uuidListTypeHandler})
+            <if test="orgIds != null and orgIds.size() > 0">
+                AND tmo.org_id  =any(#{orgIds, typeHandler=uuidListTypeHandler})
             </if>
-            <if test="staffIdList != null and staffIdList.size() > 0">
-                AND tms.staff_id  =any(#{staffIdList, typeHandler=uuidListTypeHandler})
+            <if test="staffIds != null and staffIds.size() > 0">
+                AND tms.staff_id  =any(#{staffIds, typeHandler=uuidListTypeHandler})
             </if>
             <if test="flgValidList != null and flgValidList.size()>0">
                 AND tpo.flg_valid =any(#{flgValidList, typeHandler=BooleanListTypeHandler})
@@ -977,11 +993,11 @@
             <if test="supId != null and supId != ''">
                 AND tpi.sup_id = #{supId}::uuid
             </if>
-            <if test="orgIdList != null and orgIdList.size() > 0">
-                AND tmo.org_id  =any(#{orgIdList, typeHandler=uuidListTypeHandler})
+            <if test="orgIds != null and orgIds.size() > 0">
+                AND tmo.org_id  =any(#{orgIds, typeHandler=uuidListTypeHandler})
             </if>
-            <if test="staffIdList != null and staffIdList.size() > 0">
-                AND tms.staff_id  =any(#{staffIdList, typeHandler=uuidListTypeHandler})
+            <if test="staffIds != null and staffIds.size() > 0">
+                AND tms.staff_id  =any(#{staffIds, typeHandler=uuidListTypeHandler})
             </if>
             <if test="flgValidList != null and flgValidList.size()>0">
                 AND tpi.flg_valid =any(#{flgValidList, typeHandler=BooleanListTypeHandler})

+ 1 - 1
src/main/java/com/dk/mdm/service/ivt/inbound/InboundOtherService.java

@@ -295,7 +295,7 @@ public class InboundOtherService extends BaseService<Inbound> {
                                 .setIntoingQty(BigDecimal.ZERO)
                                 .setIntoingAmt(BigDecimal.ZERO)
                                 .setCostPrice(inboundItemVO.getPriceInto())
-                                .setCostAmt(inboundItemVO.getOutQty().multiply(inboundItemVO.getPriceInto()).setScale(2, BigDecimal.ROUND_HALF_UP))
+                                .setCostAmt(inboundItemVO.getIntoQty().multiply(inboundItemVO.getPriceInto()).setScale(2, BigDecimal.ROUND_HALF_UP))
                         ;
                         inboundItemVO.setIntoId(inboundVO.getIntoId());
                         //入库状态