From fcb49d1a0ac87f894d0249c41043aff6e8c73375 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期五, 14 三月 2025 16:46:09 +0800
Subject: [PATCH] #新增 1. 新增质检主单 2. 新增质检明细 3. 字段优化

---
 rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/QlyIsptItemController.java    |  110 +++++
 rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/QlyInspect.java                   |   82 +--
 rsf-server/src/main/java/com/vincent/rsf/server/test/controller/QlyInspectController.java        |  110 +++++
 rsf-server/src/main/java/com/vincent/rsf/server/api/service/ReportMsgService.java                |    5 
 rsf-server/src/main/java/com/vincent/rsf/server/test/entity/QlyInspect.java                      |  222 +++++++++++
 rsf-server/src/main/java/com/vincent/rsf/server/test/service/impl/QlyInspectServiceImpl.java     |   12 
 rsf-server/src/main/resources/mapper/manager/QlyIsptItemMapper.xml                               |    5 
 rsf-server/src/main/java/com/vincent/rsf/server/api/service/ReceiveMsgService.java               |    6 
 rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReportMsgServiceImpl.java       |  147 +++++++
 rsf-server/src/main/java/com/vincent/rsf/server/test/service/QlyInspectService.java              |    8 
 rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java          |    2 
 rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java                          |    4 
 rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/QlyIsptItem.java                  |  266 +++++++++++++
 rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/QlyIsptItemServiceImpl.java |   12 
 rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/QlyInspectController.java     |    4 
 rsf-server/src/main/java/com/vincent/rsf/server/manager/mapper/QlyIsptItemMapper.java            |   12 
 rsf-server/src/main/java/com/vincent/rsf/server/test/mapper/QlyInspectMapper.java                |   12 
 rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/AsnOrderServiceImpl.java    |    5 
 rsf-server/src/main/java/com/vincent/rsf/server/manager/service/QlyIsptItemService.java          |    8 
 rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReceiveMsgServiceImpl.java      |  131 ------
 rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/StockItem.java                    |    2 
 21 files changed, 979 insertions(+), 186 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/ReceiveMsgService.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/ReceiveMsgService.java
index b0df19a..787a028 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/ReceiveMsgService.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/ReceiveMsgService.java
@@ -22,10 +22,4 @@
      */
     boolean syncPurchasee(List<OrderParams> orders);
 
-    /**
-     * 涓�閿姤妫�
-     * @param items
-     * @return
-     */
-    boolean reportInspectNotify(List<PoItemsDto> items);
 }
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/ReportMsgService.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/ReportMsgService.java
index 83ab495..537e3a0 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/ReportMsgService.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/ReportMsgService.java
@@ -1,5 +1,9 @@
 package com.vincent.rsf.server.api.service;
 
+import com.vincent.rsf.server.api.entity.dto.PoItemsDto;
+
+import java.util.List;
+
 /**
  * @author Ryan
  * @version 1.0
@@ -9,4 +13,5 @@
  */
 public interface ReportMsgService {
 
+    boolean reportInspectNotify(List<PoItemsDto> items);
 }
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java
index 7febe4a..798c9d7 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java
@@ -309,7 +309,7 @@
                     .setMatnrId(matnr.getId())
                     .setStockUnit(matnr.getStockUnit());
             QlyInspect inspect = qlyInspectMapper.selectOne(new LambdaQueryWrapper<QlyInspect>()
-                    .eq(QlyInspect::getAsnItemId, asnOrderItem.getId()).eq(QlyInspect::getPoItemId, asnOrderItem.getPoDetlId()));
+                    .eq(QlyInspect::getAsnItemId, asnOrderItem.getId()));
             if (!Objects.isNull(inspect)) {
                 //set 璐ㄦ缁撴灉
                 detlsDto.setInspect(inspect.getStatus$());
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReceiveMsgServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReceiveMsgServiceImpl.java
index 1e3daf7..36895d4 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReceiveMsgServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReceiveMsgServiceImpl.java
@@ -1,21 +1,10 @@
 package com.vincent.rsf.server.api.service.impl;
 
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
+
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
-import com.vincent.rsf.common.domain.CommonReponse;
 import com.vincent.rsf.framework.exception.CoolException;
-import com.vincent.rsf.server.api.config.RemotesInfoProperties;
-import com.vincent.rsf.server.api.entity.dto.PoItemsDto;
 import com.vincent.rsf.server.api.entity.enums.OrderType;
-import com.vincent.rsf.server.api.entity.params.ErpInspectItem;
-import com.vincent.rsf.server.api.entity.params.ErpInspectParams;
-import com.vincent.rsf.server.manager.entity.AsnOrder;
-import com.vincent.rsf.server.manager.entity.AsnOrderItem;
 import com.vincent.rsf.server.manager.entity.PurchaseItem;
-import com.vincent.rsf.server.manager.service.AsnOrderItemService;
-import com.vincent.rsf.server.manager.service.AsnOrderService;
 import com.vincent.rsf.server.manager.service.PurchaseItemService;
 import com.vincent.rsf.server.manager.service.PurchaseService;
 import com.vincent.rsf.server.system.constant.SerialRuleCode;
@@ -29,18 +18,10 @@
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.LinkedMultiValueMap;
-import org.springframework.util.MultiValueMap;
-import org.springframework.web.client.RestTemplate;
 
 import java.util.*;
-import java.util.stream.Collectors;
 
 /**
  * @author Ryan
@@ -57,16 +38,6 @@
     private PurchaseService purchaseService;
     @Autowired
     private PurchaseItemService purchaseItemService;
-    @Autowired
-    private AsnOrderService asnOrderService;
-    @Autowired
-    private AsnOrderItemService asnOrderItemService;
-    @Autowired
-    private RestTemplate restTemplate;
-    @Autowired
-    private RemotesInfoProperties remotesInfoProperties;
-    @Autowired
-    private RemotesInfoProperties.ApiInfo apiInfo;
     @Autowired
     private FieldsService fieldsService;
     @Autowired
@@ -115,106 +86,6 @@
         return true;
     }
 
-    /**
-     * @author Ryan
-     * @description 涓婃姤璐ㄦ鍒楄〃
-     * @params [items 鍒楄〃]
-     * @return boolean
-     * @time 2025/3/7 09:12
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public boolean reportInspectNotify(List<PoItemsDto> items) {
-        if (items.isEmpty()) {
-            throw new CoolException("涓婃姤鍐呭涓虹┖锛侊紒");
-        }
-        List<ErpInspectParams> inspectParams =  new ArrayList<>();
-        Map<String, List<PoItemsDto>> listMap = items.stream().collect(Collectors.groupingBy(PoItemsDto::getPurchaseId));
-        listMap.keySet().forEach(key -> {
-            Purchase purchase = purchaseService.getOne(new LambdaQueryWrapper<Purchase>().eq(Purchase::getId, Long.valueOf(key)));
-            if (Objects.isNull(purchase)) {
-                throw new CoolException("閲囪喘鍗曚俊鎭湁璇紒锛�");
-            }
-            ErpInspectParams params = new ErpInspectParams();
-            List<ErpInspectItem> inspectItems = new ArrayList<>();
-            //璧嬪�糴rp涓诲崟缂栫爜,缂栧彿
-            params.setPoId(purchase.getPlatId())
-                    .setPoCode(purchase.getPlatCode());
-            List<PoItemsDto> dtos = listMap.get(key);
-            if (dtos.isEmpty()) {
-                throw new CoolException("鍗曟嵁淇℃伅閿欒锛侊紒");
-            }
-            dtos.forEach(dto -> {
-                ErpInspectItem inspect= new ErpInspectItem();
-                BeanUtils.copyProperties(dto, inspect);
-                //璧嬪�糴rp鏄庣粏缂栫爜
-                inspect.setPoItemId(dto.getPlatItemId());
-                inspectItems.add(inspect);
-            });
-            params.setChildren(inspectItems);
-            inspectParams.add(params);
 
-        });
-
-        MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
-        //鑾峰彇涓婃姤璐ㄦ鎺ュ彛
-        String url = remotesInfoProperties.getBaseUrl() + apiInfo.getNotifyInspect();
-        // 璁剧疆璇锋眰鍙傛暟
-        params.add("params", JSONObject.toJSONString(inspectParams));
-        log.info("璇锋眰鍦板潃锛歿}锛岃姹傚弬鏁帮細{}", url, JSONObject.toJSONString(inspectParams));
-        HttpHeaders headers = new HttpHeaders();
-        headers.add("Content-Type", "application/json");
-        HttpEntity httpEntity = new HttpEntity<>(params, headers);
-        // 璇锋眰
-        ResponseEntity<String> exchange = restTemplate.exchange(url, HttpMethod.POST, httpEntity, String.class);
-        log.info("涓嬪彂浠诲姟 杩斿洖缁撴灉锛歿}", exchange);
-        if (Objects.isNull(exchange.getBody()) || exchange.getBody() == null) {
-            throw new CoolException("涓嬪彂浠诲姟澶辫触锛侊紒");
-        } else {
-            CommonReponse reponse = (CommonReponse) JSON.parse(exchange.getBody());
-            if (reponse.getCode() == 0) {
-                //淇敼asn涓婃姤鐘舵��
-                Set<String> itemSets = items.stream().map(PoItemsDto::getId).collect(Collectors.toSet());
-                Set<Long> longSet = new HashSet<>();
-                itemSets.forEach(set -> {
-                    longSet.add(Long.parseLong(set));
-                });
-
-                List<AsnOrderItem> asnOrderItems = asnOrderItemService.list(new LambdaQueryWrapper<AsnOrderItem>().in(AsnOrderItem::getPoDetlId, longSet));
-                if (asnOrderItems.isEmpty()) {
-                    throw new CoolException("ASN鍗曟嵁涓嶅瓨鍦紒锛�");
-                }
-                List<Long> list = asnOrderItems.stream().map(AsnOrderItem::getId).collect(Collectors.toList());
-
-                /**************************     淇敼ASN鏄庣粏鍗曠姸鎬�         ******************************/
-
-
-                if (!asnOrderItemService.update(new LambdaUpdateWrapper<AsnOrderItem>().in(AsnOrderItem::getId, list).set(AsnOrderItem::getStatus, 1))) {
-                    throw new CoolException("ASN鏄庣粏鍗曟嵁鐘舵�佷慨鏀瑰け璐ワ紒锛�");
-                }
-
-                /**************************     淇敼ASN涓诲崟鏁版嵁         ******************************/
-                //鑾峰彇ASN鏄庣粏璁㈠崟鏍囪瘑
-                List<Long> ids = asnOrderItems.stream().map(AsnOrderItem::getAsnId).collect(Collectors.toList());
-                //ASN鏄庣粏鍗曟嵁鍒嗙粍
-                Map<Long, List<AsnOrderItem>> asnIds = asnOrderItems.stream().collect(Collectors.groupingBy(AsnOrderItem::getAsnId));
-                ids.forEach(id -> {
-                    int count = asnOrderService.count(new LambdaQueryWrapper<AsnOrder>().in(AsnOrder::getId, id));
-                    if (count == asnIds.get(id).size()) {
-                        if (!asnOrderService.update(new LambdaUpdateWrapper<AsnOrder>().eq(AsnOrder::getId, id).set(AsnOrder::getStatus, 1))) {
-                            throw new CoolException("ASN涓诲崟鐘舵�佷慨鏀瑰け璐ワ紒锛�");
-                        }
-                    } else {
-                        if (!asnOrderService.update(new LambdaUpdateWrapper<AsnOrder>().eq(AsnOrder::getId, id).set(AsnOrder::getStatus, 2))) {
-                            throw new CoolException("ASN涓诲崟鐘舵�佷慨鏀瑰け璐ワ紒锛�");
-                        }
-                    }
-                });
-                return true;
-            } else {
-                throw new CoolException(reponse.getMsg());
-            }
-        }
-    }
 
 }
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReportMsgServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReportMsgServiceImpl.java
index 5f3bfc8..570175a 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReportMsgServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReportMsgServiceImpl.java
@@ -1,7 +1,37 @@
 package com.vincent.rsf.server.api.service.impl;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.vincent.rsf.common.domain.CommonReponse;
+import com.vincent.rsf.framework.exception.CoolException;
+import com.vincent.rsf.server.api.config.RemotesInfoProperties;
+import com.vincent.rsf.server.api.entity.dto.PoItemsDto;
+import com.vincent.rsf.server.api.entity.params.ErpInspectItem;
+import com.vincent.rsf.server.api.entity.params.ErpInspectParams;
 import com.vincent.rsf.server.api.service.ReportMsgService;
+import com.vincent.rsf.server.manager.entity.AsnOrder;
+import com.vincent.rsf.server.manager.entity.AsnOrderItem;
+import com.vincent.rsf.server.manager.entity.Purchase;
+import com.vincent.rsf.server.manager.service.AsnOrderItemService;
+import com.vincent.rsf.server.manager.service.AsnOrderService;
+import com.vincent.rsf.server.manager.service.PurchaseService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.client.RestTemplate;
+
+import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * @author Ryan
@@ -10,7 +40,124 @@
  * @description
  * @create 2025/3/12 17:08
  */
+@Slf4j
 @Service
 public class ReportMsgServiceImpl implements ReportMsgService {
 
+    @Autowired
+    private PurchaseService purchaseService;
+
+    @Autowired
+    private RemotesInfoProperties.ApiInfo apiInfo;
+
+    @Autowired
+    private RestTemplate restTemplate;
+    @Autowired
+    private RemotesInfoProperties remotesInfoProperties;
+
+    @Autowired
+    private AsnOrderService asnOrderService;
+    @Autowired
+    private AsnOrderItemService asnOrderItemService;
+    /**
+     * @author Ryan
+     * @description 涓婃姤璐ㄦ鍒楄〃
+     * @params [items 鍒楄〃]
+     * @return boolean
+     * @time 2025/3/7 09:12
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public boolean reportInspectNotify(List<PoItemsDto> items) {
+        if (items.isEmpty()) {
+            throw new CoolException("涓婃姤鍐呭涓虹┖锛侊紒");
+        }
+        List<ErpInspectParams> inspectParams =  new ArrayList<>();
+        Map<String, List<PoItemsDto>> listMap = items.stream().collect(Collectors.groupingBy(PoItemsDto::getPurchaseId));
+        listMap.keySet().forEach(key -> {
+            Purchase purchase = purchaseService.getOne(new LambdaQueryWrapper<Purchase>().eq(Purchase::getId, Long.valueOf(key)));
+            if (Objects.isNull(purchase)) {
+                throw new CoolException("閲囪喘鍗曚俊鎭湁璇紒锛�");
+            }
+            ErpInspectParams params = new ErpInspectParams();
+            List<ErpInspectItem> inspectItems = new ArrayList<>();
+            //璧嬪�糴rp涓诲崟缂栫爜,缂栧彿
+            params.setPoId(purchase.getPlatId())
+                    .setPoCode(purchase.getPlatCode());
+            List<PoItemsDto> dtos = listMap.get(key);
+            if (dtos.isEmpty()) {
+                throw new CoolException("鍗曟嵁淇℃伅閿欒锛侊紒");
+            }
+            dtos.forEach(dto -> {
+                ErpInspectItem inspect= new ErpInspectItem();
+                BeanUtils.copyProperties(dto, inspect);
+                //璧嬪�糴rp鏄庣粏缂栫爜
+                inspect.setPoItemId(dto.getPlatItemId());
+                inspectItems.add(inspect);
+            });
+            params.setChildren(inspectItems);
+            inspectParams.add(params);
+
+        });
+
+        MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
+        //鑾峰彇涓婃姤璐ㄦ鎺ュ彛
+        String url = remotesInfoProperties.getBaseUrl() + apiInfo.getNotifyInspect();
+        // 璁剧疆璇锋眰鍙傛暟
+        params.add("params", JSONObject.toJSONString(inspectParams));
+        log.info("璇锋眰鍦板潃锛歿}锛岃姹傚弬鏁帮細{}", url, JSONObject.toJSONString(inspectParams));
+        HttpHeaders headers = new HttpHeaders();
+        headers.add("Content-Type", "application/json");
+        HttpEntity httpEntity = new HttpEntity<>(params, headers);
+        // 璇锋眰
+        ResponseEntity<String> exchange = restTemplate.exchange(url, HttpMethod.POST, httpEntity, String.class);
+        log.info("涓嬪彂浠诲姟 杩斿洖缁撴灉锛歿}", exchange);
+        if (Objects.isNull(exchange.getBody()) || exchange.getBody() == null) {
+            throw new CoolException("涓嬪彂浠诲姟澶辫触锛侊紒");
+        } else {
+            CommonReponse reponse = (CommonReponse) JSON.parse(exchange.getBody());
+            if (reponse.getCode() == 0) {
+                //淇敼asn涓婃姤鐘舵��
+                Set<String> itemSets = items.stream().map(PoItemsDto::getId).collect(Collectors.toSet());
+                Set<Long> longSet = new HashSet<>();
+                itemSets.forEach(set -> {
+                    longSet.add(Long.parseLong(set));
+                });
+
+                List<AsnOrderItem> asnOrderItems = asnOrderItemService.list(new LambdaQueryWrapper<AsnOrderItem>().in(AsnOrderItem::getPoDetlId, longSet));
+                if (asnOrderItems.isEmpty()) {
+                    throw new CoolException("ASN鍗曟嵁涓嶅瓨鍦紒锛�");
+                }
+                List<Long> list = asnOrderItems.stream().map(AsnOrderItem::getId).collect(Collectors.toList());
+
+                /**************************     淇敼ASN鏄庣粏鍗曠姸鎬�         ******************************/
+
+
+                if (!asnOrderItemService.update(new LambdaUpdateWrapper<AsnOrderItem>().in(AsnOrderItem::getId, list).set(AsnOrderItem::getStatus, 1))) {
+                    throw new CoolException("ASN鏄庣粏鍗曟嵁鐘舵�佷慨鏀瑰け璐ワ紒锛�");
+                }
+
+                /**************************     淇敼ASN涓诲崟鏁版嵁         ******************************/
+                //鑾峰彇ASN鏄庣粏璁㈠崟鏍囪瘑
+                List<Long> ids = asnOrderItems.stream().map(AsnOrderItem::getAsnId).collect(Collectors.toList());
+                //ASN鏄庣粏鍗曟嵁鍒嗙粍
+                Map<Long, List<AsnOrderItem>> asnIds = asnOrderItems.stream().collect(Collectors.groupingBy(AsnOrderItem::getAsnId));
+                ids.forEach(id -> {
+                    int count = asnOrderService.count(new LambdaQueryWrapper<AsnOrder>().in(AsnOrder::getId, id));
+                    if (count == asnIds.get(id).size()) {
+                        if (!asnOrderService.update(new LambdaUpdateWrapper<AsnOrder>().eq(AsnOrder::getId, id).set(AsnOrder::getStatus, 1))) {
+                            throw new CoolException("ASN涓诲崟鐘舵�佷慨鏀瑰け璐ワ紒锛�");
+                        }
+                    } else {
+                        if (!asnOrderService.update(new LambdaUpdateWrapper<AsnOrder>().eq(AsnOrder::getId, id).set(AsnOrder::getStatus, 2))) {
+                            throw new CoolException("ASN涓诲崟鐘舵�佷慨鏀瑰け璐ワ紒锛�");
+                        }
+                    }
+                });
+                return true;
+            } else {
+                throw new CoolException(reponse.getMsg());
+            }
+        }
+    }
 }
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java b/rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java
index cde039e..39d11cc 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java
@@ -22,9 +22,9 @@
 //        generator.username="sa";
 //        generator.password="Zoneyung@zy56$";
 
-        generator.table="man_qly_inspect";
+        generator.table="man_qly_ispt_item";
         generator.tableDesc="璐ㄦ淇℃伅";
-        generator.packagePath="com.vincent.rsf.server.test";
+        generator.packagePath="com.vincent.rsf.server.manager";
 
         generator.build();
     }
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/QlyInspectController.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/QlyInspectController.java
index bf345aa..112b6f7 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/QlyInspectController.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/QlyInspectController.java
@@ -95,10 +95,10 @@
         List<KeyValVo> vos = new ArrayList<>();
         LambdaQueryWrapper<QlyInspect> wrapper = new LambdaQueryWrapper<>();
         if (!Cools.isEmpty(condition)) {
-            wrapper.like(QlyInspect::getName, condition);
+            wrapper.like(QlyInspect::getCode, condition);
         }
         qlyInspectService.page(new Page<>(1, 30), wrapper).getRecords().forEach(
-                item -> vos.add(new KeyValVo(item.getId(), item.getName()))
+                item -> vos.add(new KeyValVo(item.getId(), item.getCode()))
         );
         return R.ok().add(vos);
     }
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/QlyIsptItemController.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/QlyIsptItemController.java
new file mode 100644
index 0000000..029d41c
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/QlyIsptItemController.java
@@ -0,0 +1,110 @@
+package com.vincent.rsf.server.manager.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.vincent.rsf.framework.common.Cools;
+import com.vincent.rsf.framework.common.R;
+import com.vincent.rsf.server.common.utils.ExcelUtil;
+import com.vincent.rsf.server.common.annotation.OperationLog;
+import com.vincent.rsf.server.common.domain.BaseParam;
+import com.vincent.rsf.server.common.domain.KeyValVo;
+import com.vincent.rsf.server.common.domain.PageParam;
+import com.vincent.rsf.server.manager.entity.QlyIsptItem;
+import com.vincent.rsf.server.manager.service.QlyIsptItemService;
+import com.vincent.rsf.server.system.controller.BaseController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.*;
+
+@RestController
+public class QlyIsptItemController extends BaseController {
+
+    @Autowired
+    private QlyIsptItemService qlyIsptItemService;
+
+    @PreAuthorize("hasAuthority('manager:qlyIsptItem:list')")
+    @PostMapping("/qlyIsptItem/page")
+    public R page(@RequestBody Map<String, Object> map) {
+        BaseParam baseParam = buildParam(map, BaseParam.class);
+        PageParam<QlyIsptItem, BaseParam> pageParam = new PageParam<>(baseParam, QlyIsptItem.class);
+        return R.ok().add(qlyIsptItemService.page(pageParam, pageParam.buildWrapper(true)));
+    }
+
+    @PreAuthorize("hasAuthority('manager:qlyIsptItem:list')")
+    @PostMapping("/qlyIsptItem/list")
+    public R list(@RequestBody Map<String, Object> map) {
+        return R.ok().add(qlyIsptItemService.list());
+    }
+
+    @PreAuthorize("hasAuthority('manager:qlyIsptItem:list')")
+    @PostMapping({"/qlyIsptItem/many/{ids}", "/qlyIsptItems/many/{ids}"})
+    public R many(@PathVariable Long[] ids) {
+        return R.ok().add(qlyIsptItemService.listByIds(Arrays.asList(ids)));
+    }
+
+    @PreAuthorize("hasAuthority('manager:qlyIsptItem:list')")
+    @GetMapping("/qlyIsptItem/{id}")
+    public R get(@PathVariable("id") Long id) {
+        return R.ok().add(qlyIsptItemService.getById(id));
+    }
+
+    @PreAuthorize("hasAuthority('manager:qlyIsptItem:save')")
+    @OperationLog("Create 璐ㄦ淇℃伅")
+    @PostMapping("/qlyIsptItem/save")
+    public R save(@RequestBody QlyIsptItem qlyIsptItem) {
+        qlyIsptItem.setCreateBy(getLoginUserId());
+        qlyIsptItem.setCreateTime(new Date());
+        qlyIsptItem.setUpdateBy(getLoginUserId());
+        qlyIsptItem.setUpdateTime(new Date());
+        if (!qlyIsptItemService.save(qlyIsptItem)) {
+            return R.error("Save Fail");
+        }
+        return R.ok("Save Success").add(qlyIsptItem);
+    }
+
+    @PreAuthorize("hasAuthority('manager:qlyIsptItem:update')")
+    @OperationLog("Update 璐ㄦ淇℃伅")
+    @PostMapping("/qlyIsptItem/update")
+    public R update(@RequestBody QlyIsptItem qlyIsptItem) {
+        qlyIsptItem.setUpdateBy(getLoginUserId());
+        qlyIsptItem.setUpdateTime(new Date());
+        if (!qlyIsptItemService.updateById(qlyIsptItem)) {
+            return R.error("Update Fail");
+        }
+        return R.ok("Update Success").add(qlyIsptItem);
+    }
+
+    @PreAuthorize("hasAuthority('manager:qlyIsptItem:remove')")
+    @OperationLog("Delete 璐ㄦ淇℃伅")
+    @PostMapping("/qlyIsptItem/remove/{ids}")
+    public R remove(@PathVariable Long[] ids) {
+        if (!qlyIsptItemService.removeByIds(Arrays.asList(ids))) {
+            return R.error("Delete Fail");
+        }
+        return R.ok("Delete Success").add(ids);
+    }
+
+    @PreAuthorize("hasAuthority('manager:qlyIsptItem:list')")
+    @PostMapping("/qlyIsptItem/query")
+    public R query(@RequestParam(required = false) String condition) {
+        List<KeyValVo> vos = new ArrayList<>();
+        LambdaQueryWrapper<QlyIsptItem> wrapper = new LambdaQueryWrapper<>();
+        if (!Cools.isEmpty(condition)) {
+            wrapper.like(QlyIsptItem::getId, condition);
+        }
+        qlyIsptItemService.page(new Page<>(1, 30), wrapper).getRecords().forEach(
+                item -> vos.add(new KeyValVo(item.getId(), item.getId()))
+        );
+        return R.ok().add(vos);
+    }
+
+    @PreAuthorize("hasAuthority('manager:qlyIsptItem:list')")
+    @PostMapping("/qlyIsptItem/export")
+    public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
+        ExcelUtil.build(ExcelUtil.create(qlyIsptItemService.list(), QlyIsptItem.class), response);
+    }
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/QlyInspect.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/QlyInspect.java
index 2d29b4a..95c8d3b 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/QlyInspect.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/QlyInspect.java
@@ -10,6 +10,7 @@
 import com.vincent.rsf.server.system.service.UserService;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import lombok.experimental.Accessors;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serializable;
@@ -17,6 +18,7 @@
 import java.util.Date;
 
 @Data
+@Accessors(chain = true)
 @TableName("man_qly_inspect")
 public class QlyInspect implements Serializable {
 
@@ -35,29 +37,15 @@
     @ApiModelProperty(value= "缂栫爜")
     private String code;
 
-    /**
-     * 鍚嶇О
-     */
-    @ApiModelProperty(value= "鍚嶇О")
-    private String name;
 
-    /**
-     * 鏍囩鐮�
-     */
-    @ApiModelProperty(value= "鏍囩鐮�")
-    private String barcode;
-
-    /**
-     * 閫氱煡鍗曟槑缁嗘爣璇�
-     */
-    @ApiModelProperty(value= "閫氱煡鍗曟槑缁嗘爣璇�")
+    @ApiModelProperty("閫氱煡鍗曟槑缁咺D")
     private Long asnItemId;
 
     /**
-     * PO鍗曟槑缁嗘爣璇�
+     * 涓氬姟绫诲瀷
      */
-    @ApiModelProperty(value= "PO鍗曟槑缁嗘爣璇�")
-    private Long poItemId;
+    @ApiModelProperty(value= "涓氬姟绫诲瀷")
+    private String wkType;
 
     /**
      * 鍚堟牸鏁伴噺
@@ -66,15 +54,27 @@
     private Double safeQty;
 
     /**
-     * 涓嶅悎鏍兼暟閲�
+     * 閫佽揣鏁伴噺
      */
-    @ApiModelProperty(value= "涓嶅悎鏍兼暟閲�")
-    private Double disQty;
+    @ApiModelProperty(value= "閫佽揣鏁伴噺")
+    private Double dlyQty;
 
     /**
-     * 鐘舵�� 3:  閮ㄥ垎鍚堟牸   2: 涓嶅悎鏍�   1: 鍚堟牸   0: 鏈鏌�  
+     * 鏀惰揣鏁伴噺
      */
-    @ApiModelProperty(value= "鐘舵�� 3:  閮ㄥ垎鍚堟牸   2: 涓嶅悎鏍�   1: 鍚堟牸   0: 鏈鏌�  ")
+    @ApiModelProperty(value= "鏀惰揣鏁伴噺")
+    private Double rcptQty;
+
+    /**
+     * 璐ㄦ鏁伴噺
+     */
+    @ApiModelProperty(value= "璐ㄦ鏁伴噺")
+    private Double isptQty;
+
+    /**
+     * 鐘舵�� 1: 璐ㄦ瀹屾垚  0: 寰呰川妫�   2: 璐ㄦ涓�   3: 鍏抽棴  
+     */
+    @ApiModelProperty(value= "鐘舵�� 1: 璐ㄦ瀹屾垚  0: 寰呰川妫�   2: 璐ㄦ涓�   3: 鍏抽棴  ")
     private Integer status;
 
     /**
@@ -124,14 +124,13 @@
 
     public QlyInspect() {}
 
-    public QlyInspect(String code, String name, String barcode, Long asnItemId, Long poItemId, Double safeQty, Double disQty, Integer status, Integer deleted, Integer tenantId, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) {
+    public QlyInspect(String code, String wkType, Double safeQty, Double dlyQty, Double rcptQty, Double isptQty, Integer status, Integer deleted, Integer tenantId, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) {
         this.code = code;
-        this.name = name;
-        this.barcode = barcode;
-        this.asnItemId = asnItemId;
-        this.poItemId = poItemId;
+        this.wkType = wkType;
         this.safeQty = safeQty;
-        this.disQty = disQty;
+        this.dlyQty = dlyQty;
+        this.rcptQty = rcptQty;
+        this.isptQty = isptQty;
         this.status = status;
         this.deleted = deleted;
         this.tenantId = tenantId;
@@ -144,12 +143,11 @@
 
 //    QlyInspect qlyInspect = new QlyInspect(
 //            null,    // 缂栫爜[闈炵┖]
-//            null,    // 鍚嶇О
-//            null,    // 鏍囩鐮�
-//            null,    // 閫氱煡鍗曟槑缁嗘爣璇�
-//            null,    // PO鍗曟槑缁嗘爣璇�
+//            null,    // 涓氬姟绫诲瀷
 //            null,    // 鍚堟牸鏁伴噺
-//            null,    // 涓嶅悎鏍兼暟閲�
+//            null,    // 閫佽揣鏁伴噺
+//            null,    // 鏀惰揣鏁伴噺
+//            null,    // 璐ㄦ鏁伴噺
 //            null,    // 鐘舵�乕闈炵┖]
 //            null,    // 鏄惁鍒犻櫎[闈炵┖]
 //            null,    // 绉熸埛
@@ -163,14 +161,14 @@
     public String getStatus$(){
         if (null == this.status){ return null; }
         switch (this.status){
-            case 3:
-                return " 閮ㄥ垎鍚堟牸";
+            case 1:
+                return "璐ㄦ瀹屾垚";
+            case 0:
+                return "寰呰川妫�";
             case  2:
-                return "涓嶅悎鏍�";
-            case  1:
-                return "鍚堟牸";
-            case  0:
-                return "鏈鏌�";
+                return "璐ㄦ涓�";
+            case  3:
+                return "鍏抽棴";
             default:
                 return String.valueOf(this.status);
         }
@@ -207,8 +205,6 @@
         }
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
     }
-
-
 
     public Boolean getStatusBool(){
         if (null == this.status){ return null; }
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/QlyIsptItem.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/QlyIsptItem.java
new file mode 100644
index 0000000..9d1b124
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/QlyIsptItem.java
@@ -0,0 +1,266 @@
+package com.vincent.rsf.server.manager.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import com.vincent.rsf.framework.common.Cools;
+import com.vincent.rsf.framework.common.SpringUtils;
+import com.vincent.rsf.server.system.service.UserService;
+import com.vincent.rsf.server.system.entity.User;
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("man_qly_ispt_item")
+public class QlyIsptItem implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * ID
+     */
+    @ApiModelProperty(value= "ID")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 涓诲崟ID
+     */
+    @ApiModelProperty(value= "涓诲崟ID")
+    private Long ispectId;
+
+    /**
+     * 缂栧彿
+     */
+    @ApiModelProperty(value= "缂栧彿")
+    private String matnrCode;
+
+    /**
+     * 鐗╂枡鍚嶇О
+     */
+    @ApiModelProperty(value= "鐗╂枡鍚嶇О")
+    private String maktx;
+
+    /**
+     * 鏍囩
+     */
+    @ApiModelProperty(value= "鏍囩")
+    private String label;
+
+    /**
+     * 渚涘簲鍟嗗悕绉�
+     */
+    @ApiModelProperty(value= "渚涘簲鍟嗗悕绉�")
+    private String splrName;
+
+    /**
+     * 渚涘簲鍟嗘壒娆�
+     */
+    @ApiModelProperty(value= "渚涘簲鍟嗘壒娆�")
+    private String splrBatch;
+
+    /**
+     * 搴撳瓨鎵规
+     */
+    @ApiModelProperty(value= "搴撳瓨鎵规")
+    private String stockBatch;
+
+    /**
+     * 鏀惰揣鏁伴噺
+     */
+    @ApiModelProperty(value= "鏀惰揣鏁伴噺")
+    private Double rcptQty;
+
+    /**
+     * 閫佽揣鏁伴噺
+     */
+    @ApiModelProperty(value= "閫佽揣鏁伴噺")
+    private Double dlyQty;
+
+    /**
+     * 涓嶅悎鏁伴噺
+     */
+    @ApiModelProperty(value= "涓嶅悎鏁伴噺")
+    private Double disQty;
+
+    /**
+     * 鍚堟牸鏁伴噺
+     */
+    @ApiModelProperty(value= "鍚堟牸鏁伴噺")
+    private Double safeQty;
+
+    /**
+     * 鍥剧墖璺緞
+     */
+    @ApiModelProperty(value= "鍥剧墖璺緞")
+    private String picPath;
+
+    /**
+     * 鐘舵�� 1: 姝e父  0: 鍐荤粨  
+     */
+    @ApiModelProperty(value= "鐘舵�� 1: 姝e父  0: 鍐荤粨  ")
+    private Integer status;
+
+    /**
+     * 鏄惁鍒犻櫎 1: 鏄�  0: 鍚�  
+     */
+    @ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄�  0: 鍚�  ")
+    @TableLogic
+    private Integer deleted;
+
+    /**
+     * 绉熸埛
+     */
+    @ApiModelProperty(value= "绉熸埛")
+    private Integer tenantId;
+
+    /**
+     * 娣诲姞浜哄憳
+     */
+    @ApiModelProperty(value= "娣诲姞浜哄憳")
+    private Long createBy;
+
+    /**
+     * 娣诲姞鏃堕棿
+     */
+    @ApiModelProperty(value= "娣诲姞鏃堕棿")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /**
+     * 淇敼浜哄憳
+     */
+    @ApiModelProperty(value= "淇敼浜哄憳")
+    private Long updateBy;
+
+    /**
+     * 淇敼鏃堕棿
+     */
+    @ApiModelProperty(value= "淇敼鏃堕棿")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 澶囨敞
+     */
+    @ApiModelProperty(value= "澶囨敞")
+    private String memo;
+
+    public QlyIsptItem() {}
+
+    public QlyIsptItem(Long ispectId,String matnrCode,String maktx,String label,String splrName,String splrBatch,String stockBatch,Double rcptQty,Double dlyQty,Double disQty,Double safeQty,String picPath,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
+        this.ispectId = ispectId;
+        this.matnrCode = matnrCode;
+        this.maktx = maktx;
+        this.label = label;
+        this.splrName = splrName;
+        this.splrBatch = splrBatch;
+        this.stockBatch = stockBatch;
+        this.rcptQty = rcptQty;
+        this.dlyQty = dlyQty;
+        this.disQty = disQty;
+        this.safeQty = safeQty;
+        this.picPath = picPath;
+        this.status = status;
+        this.deleted = deleted;
+        this.tenantId = tenantId;
+        this.createBy = createBy;
+        this.createTime = createTime;
+        this.updateBy = updateBy;
+        this.updateTime = updateTime;
+        this.memo = memo;
+    }
+
+//    QlyIsptItem qlyIsptItem = new QlyIsptItem(
+//            null,    // 涓诲崟ID
+//            null,    // 缂栧彿
+//            null,    // 鐗╂枡鍚嶇О
+//            null,    // 鏍囩
+//            null,    // 渚涘簲鍟嗗悕绉�
+//            null,    // 渚涘簲鍟嗘壒娆�
+//            null,    // 搴撳瓨鎵规
+//            null,    // 鏀惰揣鏁伴噺
+//            null,    // 閫佽揣鏁伴噺
+//            null,    // 涓嶅悎鏁伴噺
+//            null,    // 鍚堟牸鏁伴噺
+//            null,    // 鍥剧墖璺緞
+//            null,    // 鐘舵�乕闈炵┖]
+//            null,    // 鏄惁鍒犻櫎[闈炵┖]
+//            null,    // 绉熸埛
+//            null,    // 娣诲姞浜哄憳
+//            null,    // 娣诲姞鏃堕棿[闈炵┖]
+//            null,    // 淇敼浜哄憳
+//            null,    // 淇敼鏃堕棿[闈炵┖]
+//            null    // 澶囨敞
+//    );
+
+    public String getStatus$(){
+        if (null == this.status){ return null; }
+        switch (this.status){
+            case 1:
+                return "姝e父";
+            case 0:
+                return "鍐荤粨";
+            default:
+                return String.valueOf(this.status);
+        }
+    }
+
+    public String getCreateBy$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.getById(this.createBy);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getNickname());
+        }
+        return null;
+    }
+
+    public String getCreateTime$(){
+        if (Cools.isEmpty(this.createTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
+    }
+
+    public String getUpdateBy$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.getById(this.updateBy);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getNickname());
+        }
+        return null;
+    }
+
+    public String getUpdateTime$(){
+        if (Cools.isEmpty(this.updateTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
+    }
+
+
+
+    public Boolean getStatusBool(){
+        if (null == this.status){ return null; }
+        switch (this.status){
+            case 1:
+                return true;
+            case 0:
+                return false;
+            default:
+                return null;
+        }
+    }
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/StockItem.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/StockItem.java
index f03fc60..8a34244 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/StockItem.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/StockItem.java
@@ -381,7 +381,7 @@
         QlyInspectService service = SpringUtils.getBean(QlyInspectService.class);
         QlyInspect qlyInspect = service.getById(this.inspectId);
         if (!Cools.isEmpty(qlyInspect)){
-            return String.valueOf(qlyInspect.getName());
+            return String.valueOf(qlyInspect.getCode());
         }
         return null;
     }
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/mapper/QlyIsptItemMapper.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/mapper/QlyIsptItemMapper.java
new file mode 100644
index 0000000..909aebf
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/mapper/QlyIsptItemMapper.java
@@ -0,0 +1,12 @@
+package com.vincent.rsf.server.manager.mapper;
+
+import com.vincent.rsf.server.manager.entity.QlyIsptItem;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface QlyIsptItemMapper extends BaseMapper<QlyIsptItem> {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/QlyIsptItemService.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/QlyIsptItemService.java
new file mode 100644
index 0000000..43cb684
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/QlyIsptItemService.java
@@ -0,0 +1,8 @@
+package com.vincent.rsf.server.manager.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.vincent.rsf.server.manager.entity.QlyIsptItem;
+
+public interface QlyIsptItemService extends IService<QlyIsptItem> {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/AsnOrderServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/AsnOrderServiceImpl.java
index 03c5ccf..99da85e 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/AsnOrderServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/AsnOrderServiceImpl.java
@@ -5,6 +5,7 @@
 import com.vincent.rsf.framework.exception.CoolException;
 import com.vincent.rsf.server.api.entity.dto.PoItemsDto;
 import com.vincent.rsf.server.api.service.ReceiveMsgService;
+import com.vincent.rsf.server.api.service.ReportMsgService;
 import com.vincent.rsf.server.manager.entity.AsnOrderItem;
 import com.vincent.rsf.server.manager.mapper.AsnOrderItemMapper;
 import com.vincent.rsf.server.manager.mapper.AsnOrderMapper;
@@ -36,6 +37,8 @@
 
     @Autowired
     private ReceiveMsgService receiveMsgService;
+    @Autowired
+    private ReportMsgService reportMsgService;
     @Resource
     private PurchaseMapper purchaseMapper;
 
@@ -55,7 +58,7 @@
             throw new CoolException("ASN鍗曟嵁涓嶈兘涓虹┖锛侊紒");
         }
         List<PoItemsDto> items = purchaseMapper.poList(asnIds);
-        if (receiveMsgService.reportInspectNotify(items)) {
+        if (reportMsgService.reportInspectNotify(items)) {
             return true;
         } else {
             return false;
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/QlyIsptItemServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/QlyIsptItemServiceImpl.java
new file mode 100644
index 0000000..f973218
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/QlyIsptItemServiceImpl.java
@@ -0,0 +1,12 @@
+package com.vincent.rsf.server.manager.service.impl;
+
+import com.vincent.rsf.server.manager.mapper.QlyIsptItemMapper;
+import com.vincent.rsf.server.manager.entity.QlyIsptItem;
+import com.vincent.rsf.server.manager.service.QlyIsptItemService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+@Service("qlyIsptItemService")
+public class QlyIsptItemServiceImpl extends ServiceImpl<QlyIsptItemMapper, QlyIsptItem> implements QlyIsptItemService {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/test/controller/QlyInspectController.java b/rsf-server/src/main/java/com/vincent/rsf/server/test/controller/QlyInspectController.java
new file mode 100644
index 0000000..573f495
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/test/controller/QlyInspectController.java
@@ -0,0 +1,110 @@
+package com.vincent.rsf.server.test.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.vincent.rsf.framework.common.Cools;
+import com.vincent.rsf.framework.common.R;
+import com.vincent.rsf.server.common.utils.ExcelUtil;
+import com.vincent.rsf.server.common.annotation.OperationLog;
+import com.vincent.rsf.server.common.domain.BaseParam;
+import com.vincent.rsf.server.common.domain.KeyValVo;
+import com.vincent.rsf.server.common.domain.PageParam;
+import com.vincent.rsf.server.test.entity.QlyInspect;
+import com.vincent.rsf.server.test.service.QlyInspectService;
+import com.vincent.rsf.server.system.controller.BaseController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.*;
+
+@RestController
+public class QlyInspectController extends BaseController {
+
+    @Autowired
+    private QlyInspectService qlyInspectService;
+
+    @PreAuthorize("hasAuthority('test:qlyInspect:list')")
+    @PostMapping("/qlyInspect/page")
+    public R page(@RequestBody Map<String, Object> map) {
+        BaseParam baseParam = buildParam(map, BaseParam.class);
+        PageParam<QlyInspect, BaseParam> pageParam = new PageParam<>(baseParam, QlyInspect.class);
+        return R.ok().add(qlyInspectService.page(pageParam, pageParam.buildWrapper(true)));
+    }
+
+    @PreAuthorize("hasAuthority('test:qlyInspect:list')")
+    @PostMapping("/qlyInspect/list")
+    public R list(@RequestBody Map<String, Object> map) {
+        return R.ok().add(qlyInspectService.list());
+    }
+
+    @PreAuthorize("hasAuthority('test:qlyInspect:list')")
+    @PostMapping({"/qlyInspect/many/{ids}", "/qlyInspects/many/{ids}"})
+    public R many(@PathVariable Long[] ids) {
+        return R.ok().add(qlyInspectService.listByIds(Arrays.asList(ids)));
+    }
+
+    @PreAuthorize("hasAuthority('test:qlyInspect:list')")
+    @GetMapping("/qlyInspect/{id}")
+    public R get(@PathVariable("id") Long id) {
+        return R.ok().add(qlyInspectService.getById(id));
+    }
+
+    @PreAuthorize("hasAuthority('test:qlyInspect:save')")
+    @OperationLog("Create 璐ㄦ淇℃伅")
+    @PostMapping("/qlyInspect/save")
+    public R save(@RequestBody QlyInspect qlyInspect) {
+        qlyInspect.setCreateBy(getLoginUserId());
+        qlyInspect.setCreateTime(new Date());
+        qlyInspect.setUpdateBy(getLoginUserId());
+        qlyInspect.setUpdateTime(new Date());
+        if (!qlyInspectService.save(qlyInspect)) {
+            return R.error("Save Fail");
+        }
+        return R.ok("Save Success").add(qlyInspect);
+    }
+
+    @PreAuthorize("hasAuthority('test:qlyInspect:update')")
+    @OperationLog("Update 璐ㄦ淇℃伅")
+    @PostMapping("/qlyInspect/update")
+    public R update(@RequestBody QlyInspect qlyInspect) {
+        qlyInspect.setUpdateBy(getLoginUserId());
+        qlyInspect.setUpdateTime(new Date());
+        if (!qlyInspectService.updateById(qlyInspect)) {
+            return R.error("Update Fail");
+        }
+        return R.ok("Update Success").add(qlyInspect);
+    }
+
+    @PreAuthorize("hasAuthority('test:qlyInspect:remove')")
+    @OperationLog("Delete 璐ㄦ淇℃伅")
+    @PostMapping("/qlyInspect/remove/{ids}")
+    public R remove(@PathVariable Long[] ids) {
+        if (!qlyInspectService.removeByIds(Arrays.asList(ids))) {
+            return R.error("Delete Fail");
+        }
+        return R.ok("Delete Success").add(ids);
+    }
+
+    @PreAuthorize("hasAuthority('test:qlyInspect:list')")
+    @PostMapping("/qlyInspect/query")
+    public R query(@RequestParam(required = false) String condition) {
+        List<KeyValVo> vos = new ArrayList<>();
+        LambdaQueryWrapper<QlyInspect> wrapper = new LambdaQueryWrapper<>();
+        if (!Cools.isEmpty(condition)) {
+            wrapper.like(QlyInspect::getId, condition);
+        }
+        qlyInspectService.page(new Page<>(1, 30), wrapper).getRecords().forEach(
+                item -> vos.add(new KeyValVo(item.getId(), item.getId()))
+        );
+        return R.ok().add(vos);
+    }
+
+    @PreAuthorize("hasAuthority('test:qlyInspect:list')")
+    @PostMapping("/qlyInspect/export")
+    public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
+        ExcelUtil.build(ExcelUtil.create(qlyInspectService.list(), QlyInspect.class), response);
+    }
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/test/entity/QlyInspect.java b/rsf-server/src/main/java/com/vincent/rsf/server/test/entity/QlyInspect.java
new file mode 100644
index 0000000..13d8af9
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/test/entity/QlyInspect.java
@@ -0,0 +1,222 @@
+package com.vincent.rsf.server.test.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import com.vincent.rsf.framework.common.Cools;
+import com.vincent.rsf.framework.common.SpringUtils;
+import com.vincent.rsf.server.system.service.UserService;
+import com.vincent.rsf.server.system.entity.User;
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("man_qly_inspect")
+public class QlyInspect implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * ID
+     */
+    @ApiModelProperty(value= "ID")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 缂栫爜
+     */
+    @ApiModelProperty(value= "缂栫爜")
+    private String code;
+
+    /**
+     * 涓氬姟绫诲瀷
+     */
+    @ApiModelProperty(value= "涓氬姟绫诲瀷")
+    private String wkType;
+
+    /**
+     * 鍚堟牸鏁伴噺
+     */
+    @ApiModelProperty(value= "鍚堟牸鏁伴噺")
+    private Double safeQty;
+
+    /**
+     * 閫佽揣鏁伴噺
+     */
+    @ApiModelProperty(value= "閫佽揣鏁伴噺")
+    private Double dlyQty;
+
+    /**
+     * 鏀惰揣鏁伴噺
+     */
+    @ApiModelProperty(value= "鏀惰揣鏁伴噺")
+    private Double rcptQty;
+
+    /**
+     * 璐ㄦ鏁伴噺
+     */
+    @ApiModelProperty(value= "璐ㄦ鏁伴噺")
+    private Double isptQty;
+
+    /**
+     * 鐘舵�� 1: 璐ㄦ瀹屾垚  0: 寰呰川妫�   2: 璐ㄦ涓�   3: 鍏抽棴  
+     */
+    @ApiModelProperty(value= "鐘舵�� 1: 璐ㄦ瀹屾垚  0: 寰呰川妫�   2: 璐ㄦ涓�   3: 鍏抽棴  ")
+    private Integer status;
+
+    /**
+     * 鏄惁鍒犻櫎 1: 鏄�  0: 鍚�  
+     */
+    @ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄�  0: 鍚�  ")
+    @TableLogic
+    private Integer deleted;
+
+    /**
+     * 绉熸埛
+     */
+    @ApiModelProperty(value= "绉熸埛")
+    private Integer tenantId;
+
+    /**
+     * 娣诲姞浜哄憳
+     */
+    @ApiModelProperty(value= "娣诲姞浜哄憳")
+    private Long createBy;
+
+    /**
+     * 娣诲姞鏃堕棿
+     */
+    @ApiModelProperty(value= "娣诲姞鏃堕棿")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /**
+     * 淇敼浜哄憳
+     */
+    @ApiModelProperty(value= "淇敼浜哄憳")
+    private Long updateBy;
+
+    /**
+     * 淇敼鏃堕棿
+     */
+    @ApiModelProperty(value= "淇敼鏃堕棿")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 澶囨敞
+     */
+    @ApiModelProperty(value= "澶囨敞")
+    private String memo;
+
+    public QlyInspect() {}
+
+    public QlyInspect(String code,String wkType,Double safeQty,Double dlyQty,Double rcptQty,Double isptQty,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
+        this.code = code;
+        this.wkType = wkType;
+        this.safeQty = safeQty;
+        this.dlyQty = dlyQty;
+        this.rcptQty = rcptQty;
+        this.isptQty = isptQty;
+        this.status = status;
+        this.deleted = deleted;
+        this.tenantId = tenantId;
+        this.createBy = createBy;
+        this.createTime = createTime;
+        this.updateBy = updateBy;
+        this.updateTime = updateTime;
+        this.memo = memo;
+    }
+
+//    QlyInspect qlyInspect = new QlyInspect(
+//            null,    // 缂栫爜[闈炵┖]
+//            null,    // 涓氬姟绫诲瀷
+//            null,    // 鍚堟牸鏁伴噺
+//            null,    // 閫佽揣鏁伴噺
+//            null,    // 鏀惰揣鏁伴噺
+//            null,    // 璐ㄦ鏁伴噺
+//            null,    // 鐘舵�乕闈炵┖]
+//            null,    // 鏄惁鍒犻櫎[闈炵┖]
+//            null,    // 绉熸埛
+//            null,    // 娣诲姞浜哄憳
+//            null,    // 娣诲姞鏃堕棿[闈炵┖]
+//            null,    // 淇敼浜哄憳
+//            null,    // 淇敼鏃堕棿[闈炵┖]
+//            null    // 澶囨敞
+//    );
+
+    public String getStatus$(){
+        if (null == this.status){ return null; }
+        switch (this.status){
+            case 1:
+                return "璐ㄦ瀹屾垚";
+            case 0:
+                return "寰呰川妫�";
+            case  2:
+                return "璐ㄦ涓�";
+            case  3:
+                return "鍏抽棴";
+            default:
+                return String.valueOf(this.status);
+        }
+    }
+
+    public String getCreateBy$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.getById(this.createBy);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getNickname());
+        }
+        return null;
+    }
+
+    public String getCreateTime$(){
+        if (Cools.isEmpty(this.createTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
+    }
+
+    public String getUpdateBy$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.getById(this.updateBy);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getNickname());
+        }
+        return null;
+    }
+
+    public String getUpdateTime$(){
+        if (Cools.isEmpty(this.updateTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
+    }
+
+
+
+    public Boolean getStatusBool(){
+        if (null == this.status){ return null; }
+        switch (this.status){
+            case 1:
+                return true;
+            case 0:
+                return false;
+            default:
+                return null;
+        }
+    }
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/test/mapper/QlyInspectMapper.java b/rsf-server/src/main/java/com/vincent/rsf/server/test/mapper/QlyInspectMapper.java
new file mode 100644
index 0000000..0df2c7a
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/test/mapper/QlyInspectMapper.java
@@ -0,0 +1,12 @@
+package com.vincent.rsf.server.test.mapper;
+
+import com.vincent.rsf.server.test.entity.QlyInspect;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface QlyInspectMapper extends BaseMapper<QlyInspect> {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/test/service/QlyInspectService.java b/rsf-server/src/main/java/com/vincent/rsf/server/test/service/QlyInspectService.java
new file mode 100644
index 0000000..023eeeb
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/test/service/QlyInspectService.java
@@ -0,0 +1,8 @@
+package com.vincent.rsf.server.test.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.vincent.rsf.server.test.entity.QlyInspect;
+
+public interface QlyInspectService extends IService<QlyInspect> {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/test/service/impl/QlyInspectServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/test/service/impl/QlyInspectServiceImpl.java
new file mode 100644
index 0000000..db841c4
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/test/service/impl/QlyInspectServiceImpl.java
@@ -0,0 +1,12 @@
+package com.vincent.rsf.server.test.service.impl;
+
+import com.vincent.rsf.server.test.mapper.QlyInspectMapper;
+import com.vincent.rsf.server.test.entity.QlyInspect;
+import com.vincent.rsf.server.test.service.QlyInspectService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+@Service("qlyInspectService")
+public class QlyInspectServiceImpl extends ServiceImpl<QlyInspectMapper, QlyInspect> implements QlyInspectService {
+
+}
diff --git a/rsf-server/src/main/resources/mapper/manager/QlyIsptItemMapper.xml b/rsf-server/src/main/resources/mapper/manager/QlyIsptItemMapper.xml
new file mode 100644
index 0000000..8aae843
--- /dev/null
+++ b/rsf-server/src/main/resources/mapper/manager/QlyIsptItemMapper.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.vincent.rsf.server.manager.mapper.QlyIsptItemMapper">
+
+</mapper>

--
Gitblit v1.9.1