dongke 2 سال پیش
والد
کامیت
522e2340cf

+ 13 - 0
src/main/java/com/dk/mdm/controller/ivt/InboundController.java

@@ -57,4 +57,17 @@ public class InboundController{
     public ResponseResultVO<PageList<InboundResponse>> selectInboundAndItem(@RequestBody InboundQuery inboundQuery) {
     public ResponseResultVO<PageList<InboundResponse>> selectInboundAndItem(@RequestBody InboundQuery inboundQuery) {
         return inboundService.selectInboundAndItem(inboundQuery);
         return inboundService.selectInboundAndItem(inboundQuery);
     }
     }
+    /**
+     * @desc :  根据id查询入库单 及其明细
+     * @author : 王英杰
+     * @date : 2024/3/6 10:36
+     */
+    @ApiOperation(value = "条件查询", notes = "条件查询")
+    @PostMapping({"select_inbound_and_item_byid"})
+    public ResponseResultVO<InboundResponse> selectInboundAndItemById(@RequestBody InboundQuery inboundQuery) {
+        return inboundService.selectInboundAndItemById(inboundQuery);
+    }
+
+
+
 }
 }

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

@@ -5,6 +5,7 @@ import com.dk.common.mapper.BaseMapper;
 import com.dk.mdm.model.pojo.ivt.InboundItem;
 import com.dk.mdm.model.pojo.ivt.InboundItem;
 import com.dk.mdm.model.query.ivt.InboundQuery;
 import com.dk.mdm.model.query.ivt.InboundQuery;
 import com.dk.mdm.model.query.pur.PurchaseQuery;
 import com.dk.mdm.model.query.pur.PurchaseQuery;
+import com.dk.mdm.model.response.ivt.InboundResponse;
 import com.dk.mdm.model.response.mst.DictionaryDataResponse;
 import com.dk.mdm.model.response.mst.DictionaryDataResponse;
 import com.dk.mdm.model.response.pur.PurchaseResponse;
 import com.dk.mdm.model.response.pur.PurchaseResponse;
 import org.springframework.stereotype.Repository;
 import org.springframework.stereotype.Repository;
@@ -24,7 +25,14 @@ public interface InboundMapper extends BaseMapper<Inbound>{
      * @author : 于继渤
      * @author : 于继渤
      * @date : 2024/2/26 10:36
      * @date : 2024/2/26 10:36
      */
      */
-    List<DictionaryDataResponse> selectInboundAndItem(InboundQuery inboundQuery);
+    List<InboundResponse> selectInboundAndItem(InboundQuery inboundQuery);
+    /**
+     * @desc   :  根据id查询入库单 及其明细
+     * @author : 王英杰
+     * @date : 2024/3/08 10:36
+     */
+    InboundResponse selectInboundAndItemById(InboundQuery inboundQuery);
+
 
 
     /**
     /**
      * @desc   : 根据条件进行查询(数量)
      * @desc   : 根据条件进行查询(数量)

+ 16 - 0
src/main/java/com/dk/mdm/mapper/ivt/InboundMapper.xml

@@ -584,4 +584,20 @@
         </set>
         </set>
         where into_id = #{intoId}::uuid
         where into_id = #{intoId}::uuid
     </update>
     </update>
+
+
+    <!-- 查询表t_psi_inbound,(条件查询+分页)列表 -->
+    <select id="selectInboundAndItemById" resultMap="BaseResultMapItemResponse">
+        SELECT
+        <include refid="Base_Column_List_Item_Response"/>,
+        <include refid="Base_Column_List_Item_Response_Join"/>
+        FROM dkic_b.t_psi_inbound  tpi
+        left join dkic_b.t_psi_inbound_item tpii  on tpi.into_id = tpii.into_id
+        left join  dkic_b.t_mst_goods_sku  tmgs on tmgs.sku_id = tpii.sku_id
+        left join  dkic_b.t_psi_inventory  tpit on tpit.sku_id = tpii.sku_id
+        <include refid="Condition_Join"/>
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
 </mapper>
 </mapper>

+ 11 - 0
src/main/java/com/dk/mdm/service/ivt/InboundService.java

@@ -2,6 +2,7 @@ package com.dk.mdm.service.ivt;
 
 
 import com.dk.common.infrastructure.annotaiton.Pagination;
 import com.dk.common.infrastructure.annotaiton.Pagination;
 import com.dk.common.model.pojo.PageList;
 import com.dk.common.model.pojo.PageList;
+import com.dk.common.response.ResponseResultUtil;
 import com.dk.common.response.ResponseResultVO;
 import com.dk.common.response.ResponseResultVO;
 import com.dk.mdm.model.pojo.ivt.Inbound;
 import com.dk.mdm.model.pojo.ivt.Inbound;
 import com.dk.mdm.mapper.ivt.InboundMapper;
 import com.dk.mdm.mapper.ivt.InboundMapper;
@@ -52,4 +53,14 @@ public class InboundService extends BaseService<Inbound> {
 				inboundMapper.selectInboundAndItemCountByCond(inboundQuery));
 				inboundMapper.selectInboundAndItemCountByCond(inboundQuery));
 	}
 	}
 
 
+	/**
+	 * @desc :  根据id查询入库单 及其明细
+	 * @author : 王英杰
+	 * @date : 2024/3/6 10:36
+	 */
+	@Pagination
+	public ResponseResultVO<InboundResponse> selectInboundAndItemById(InboundQuery inboundQuery) {
+		return  ResponseResultUtil.success(inboundMapper.selectInboundAndItemById(inboundQuery));
+	}
+
 }
 }