koushanshan vor 2 Jahren
Ursprung
Commit
ee1ad8db61

+ 21 - 5
src/main/java/com/dk/mdm/controller/ivt/InboundPurchaseController.java

@@ -1,11 +1,15 @@
 package com.dk.mdm.controller.ivt;
 
 
+import com.dk.common.infrastructure.annotaiton.Pagination;
 import com.dk.common.model.pojo.PageList;
+import com.dk.common.response.ResponseResultUtil;
 import com.dk.common.response.ResponseResultVO;
 import com.dk.common.service.BaseService;
 import com.dk.mdm.model.pojo.ivt.Inbound;
+import com.dk.mdm.model.query.ivt.InboundItemQuery;
 import com.dk.mdm.model.query.ivt.InboundQuery;
+import com.dk.mdm.model.response.ivt.InboundItemResponse;
 import com.dk.mdm.model.response.ivt.InboundResponse;
 import com.dk.mdm.model.vo.ivt.InboundVO;
 import com.dk.mdm.service.ivt.InboundOtherService;
@@ -13,12 +17,12 @@ import com.dk.mdm.service.ivt.InboundPurchaseService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.validation.Valid;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 
 @Api(tags = "采购入库单API接口")
@@ -48,6 +52,18 @@ public class InboundPurchaseController {
     }
 
 
+    /**
+     * @desc   : 明细信息条件查询
+     * @date   : 2024/3/15 9:15
+     * @author : 寇珊珊
+     */
+    @ApiOperation(value = "明细信息条件查询", notes = "明细信息条件查询")
+    @PostMapping({"select_purchase_inbound_item_info_by_id/{id}"})
+    public ResponseResultVO<Map<String, Object>> selectPurchaseInboundItemInfoById(@PathVariable String id) {
+        return inheritedPurchaseService.selectPurchaseInboundItemInfoById(id);
+    }
+
+
 
     /**
      * @desc   : 采购入库新建
@@ -91,7 +107,7 @@ public class InboundPurchaseController {
             notes = "采购入库撤销"
     )
     @PostMapping({"purchase_inbound_cancel"})
-    public ResponseResultVO<?> purchaseInboundCancel(@RequestBody InboundVO inboundVO) {
+    public ResponseResultVO<?> purchaseInboundCancel(@Valid @RequestBody InboundVO inboundVO) {
         return inheritedPurchaseService.purchaseInboundCancel(inboundVO);
     }
 

+ 20 - 0
src/main/java/com/dk/mdm/service/ivt/InboundPurchaseService.java

@@ -35,6 +35,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -88,6 +89,25 @@ public class InboundPurchaseService extends BaseService<Inbound> {
 	}
 
 
+
+
+	/**
+	 * @desc   : 查询明细
+	 * @date   : 2024/3/9 15:43
+	 * @author : 寇珊珊
+	 */
+	@Pagination
+	public ResponseResultVO<Map<String, Object>> selectPurchaseInboundItemInfoById(String id) {
+		Map<String, Object> result = new HashMap<>();
+		// 商品明细
+		List<InboundItemResponse> inboundItemResponses = inboundItemMapper.selectByCond(new InboundItemQuery().setIntoId(id));
+		result.put("itemList", inboundItemResponses);
+		// 收款
+
+		// 附件
+		return ResponseResultUtil.success(result);
+	}
+
 	/**
 	 * @desc   : 采购入库新建
 	 * @date   : 2024/3/7 14:13