Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

dongke 1 год назад
Родитель
Сommit
0555380578

+ 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">

+ 3 - 0
src/main/java/com/dk/mdm/mapper/ivt/OutboundItemMapper.xml

@@ -139,6 +139,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
         <result column="fact_amt" property="factAmt"/>
         <result column="discount" property="discount"/>
         <result column="disc_amt" property="discAmt"/>
+        <result column="out_no" property="outNo"/>
     </resultMap>
 
     <!-- 通用条件列 -->
@@ -222,6 +223,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
     <select id="selectByCond" resultMap="BaseResultMapResponse">
         SELECT tpoi.item_id,
         tpoi.out_id,
+        tpo.out_no,
         tpoi.out_type,
         tpoi.from_id,
         tpoi.from_item_id,
@@ -270,6 +272,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
         u2.unit_name as "subUnitName"
         FROM dkic_b.t_psi_outbound_item as tpoi
         left join dkic_b.t_mst_warehouse as tmw on tmw.wh_id = tpoi.wh_id
+        left join dkic_b.t_psi_outbound as tpo on tpo.out_id = tpoi.out_id
         LEFT JOIN dkic_b.t_mst_supplier as tms ON tpoi.sup_id = tms.sup_id
         LEFT JOIN dkic_b.t_mst_unit AS ul ON tpoi.unit_id = ul.unit_id
         LEFT JOIN dkic_b.t_mst_unit AS u2 ON tpoi.sub_unit_id = u2.unit_id

+ 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 - 0
src/main/java/com/dk/mdm/mapper/sale/OrderItemMapper.xml

@@ -703,6 +703,7 @@
     <select id="selectBySaleOut" resultMap="BaseResultMapResponse">
         SELECT
         <include refid="Base_Column_List_Response"/>,
+        tpo.ordeer_no  as "orderNo",
         tmc.cus_code as "cusCode",
         tmc.cus_name as "cusName",
         tmc.cus_phone as "cusPhone",

+ 3 - 0
src/main/java/com/dk/mdm/model/response/ivt/OutboundItemResponse.java

@@ -437,6 +437,9 @@ public class OutboundItemResponse {
     @ApiModelProperty(value = "本次出库包装数量")
     private String unitInfo;
 
+    @ApiModelProperty(value = "出库单号")
+    private String outNo;
+
     private static final long serialVersionUID = 1L;
 
 }

+ 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());
                         //入库状态

+ 1 - 0
src/main/java/com/dk/mdm/service/ivt/outbound/OutboundSaleReturnService.java

@@ -1090,6 +1090,7 @@ public class OutboundSaleReturnService extends BaseService<Outbound> {
             outboundItemResponse.setInventoryDocCode(Constant.InventoryDocCode.SALE_RETURN.getValue());
             outboundItemResponse.setOutQty(outboundItemResponse.getOutQty().negate());
             outboundItemResponse.setOutAmt(outboundItemResponse.getOutAmt().negate());
+            outboundItemResponse.setAddOrEditFlag(false);
             //endregion
 
             //region修改出库明细信息