changhaoning преди 2 години
родител
ревизия
173b5e3a33

+ 15 - 0
src/main/java/com/dk/mdm/controller/ivt/inbound/InboundItemController.java

@@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.RestController;
 import io.swagger.annotations.Api;
 import com.dk.mdm.service.ivt.inbound.InboundItemService;
 
+import javax.validation.Valid;
+
 @Api(tags = "入库明细API接口")
 @RestController
 @RequestMapping("/ivt/inboundItem")
@@ -70,4 +72,17 @@ public class InboundItemController{
         return inboundItemService.selectCostCheck(inboundItemQuery);
     }
 
+    /**
+     * @desc   : 入库成本核对
+     * @author : 常皓宁
+     * @date   : 2024/4/17 15:24
+     */
+    @ApiOperation(
+            value = "入库成本核对",
+            notes = "入库成本核对"
+    )
+    @PostMapping({"cost_check_ok"})
+    public ResponseResultVO<?> CostCheckOk(@Valid @RequestBody InboundItemQuery inboundItemQuery) {
+        return inboundItemService.CostCheckOk(inboundItemQuery);
+    }
 }

+ 12 - 2
src/main/java/com/dk/mdm/mapper/ivt/InboundItemMapper.xml

@@ -517,6 +517,8 @@
         ,tppi.item_qty as "purItemQty"
         ,tppi.intoing_qty as "purItemIntoingQty"
         ,tppi.into_qty as "purItemIntoQty"
+        ,tmp.sup_code as "supCode"
+        ,tmp.sup_name as "supName"
         ,tpiv.inv_qty
         FROM dkic_b.t_psi_inbound_item tpii
         left join dkic_b.t_psi_inbound tpid on tpii.into_id = tpid.into_id
@@ -527,20 +529,28 @@
         left join dkic_b.t_mst_goods_brand tmgb on tmgb.brand_id = tmgs.brand_id
         left join dkic_b.t_psi_inventory tpi on tpi.inv_id = tpii.inv_id
         left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = tpii.wh_id
+        Left join dkic_b.t_mst_supplier tmp on tpid.sup_id = tmp.sup_id
         <where>
             tpii.flg_valid
+            and tpii.into_qty &lt;&gt; 0
             <if test="intoId != null and intoId != ''">
                 AND tpii.into_id = #{intoId}::uuid
             </if>
             <if test="intoNo != null and intoNo != ''">
                 AND tpid.into_no LIKE concat('%',my_ex.likequery(#{intoNo}),'%')
             </if>
-            <if test="intoDataStart != null">
-                AND tpid.into_date &gt;= #{intoDataStart}::timestamp with time zone
+            <if test="supId != null and supId != ''">
+                AND tpid.sup_id = #{supId}::uuid
+            </if>
+            <if test="intoDateStart != null">
+                AND tpid.into_date &gt;= #{intoDateStart}::timestamp with time zone
             </if>
             <if test="intoDateEnd != null">
                 AND tpid.into_date &lt; #{intoDateEnd}::timestamp with time zone + interval '1 day'
             </if>
+            <if test="skuName != null and skuName!='' ">
+                AND tmgs.sku_name LIKE concat('%',my_ex.likequery(#{skuName}),'%')
+            </if>
             <if test="cpId != null">
                 AND tpii.cp_id = #{cpId}
             </if>

+ 22 - 0
src/main/java/com/dk/mdm/model/query/ivt/InboundItemQuery.java

@@ -1,5 +1,6 @@
 package com.dk.mdm.model.query.ivt;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.dk.common.infrastructure.handler.TimestampTypeHandler;
 import com.dk.common.infrastructure.handler.UuidTypeHandler;
@@ -10,6 +11,7 @@ import lombok.Data;
 import lombok.experimental.Accessors;
 
 import java.math.BigDecimal;
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 
 /**
@@ -270,6 +272,26 @@ public class InboundItemQuery extends PageInfo<InboundItemQuery>  {
     @TableField(typeHandler = UuidTypeHandler.class)
     private String sPurItemId;
 
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class,exist = false)
+    private LocalDate intoDateStart;
+
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class,exist = false)
+    private LocalDate  intoDateEnd;
+
+    @Excel(name = "商品名称")
+    @ApiModelProperty(value = "商品名称")
+    private String skuName;
+
+    @ApiModelProperty(value = "入库单号")
+    private String intoNo;
+
+    @Excel(name = "供应商")
+    @ApiModelProperty(value = "供应商")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String supId;
+
 
     private static final long serialVersionUID = 1L;
 

+ 15 - 0
src/main/java/com/dk/mdm/model/response/ivt/InboundItemResponse.java

@@ -396,6 +396,21 @@ public class InboundItemResponse  {
     @ApiModelProperty(value = "入库单号")
     private String intoNo;
 
+    /**
+     * 供应商编号
+     */
+    @Excel(name = "供应商编号")
+    @ApiModelProperty(value = "供应商编号")
+    private String supCode;
+
+
+    /**
+     * 供应商名称
+     */
+    @Excel(name = "供应商名称")
+    @ApiModelProperty(value = "供应商名称")
+    private String supName;
+
 
 
     private static final long serialVersionUID = 1L;

+ 10 - 0
src/main/java/com/dk/mdm/service/ivt/inbound/InboundItemService.java

@@ -81,5 +81,15 @@ public class InboundItemService extends BaseService<InboundItem> {
 		return super.mergeListWithCount(inboundItemQuery, inboundItemMapper.selectCostCheck(inboundItemQuery), inboundItemMapper.countByCond(inboundItemQuery));
 	}
 
+	/**
+	 * @desc   : 入库成本核对
+	 * @author : 常皓宁
+	 * @date   : 2024/4/17 15:26
+	 */
+	@Transactional(rollbackFor = {Exception.class})
+	public ResponseResultVO<?> CostCheckOk(InboundItemQuery inboundItemQuery) {
+
+		return null;
+	}
 
 }