瀏覽代碼

Merge branch 'master' of http://120.46.159.163:7400/ezhizao/ezhizao_dms_production_api

ezhizao 1 年之前
父節點
當前提交
921719d751
共有 31 個文件被更改,包括 453 次插入862 次删除
  1. 1 1
      src/main/java/cn/ezhizao/project/business/controller/BizCarrierController.java
  2. 4 8
      src/main/java/cn/ezhizao/project/business/controller/BizDayworkController.java
  3. 102 53
      src/main/java/cn/ezhizao/project/business/controller/BizLotController.java
  4. 72 76
      src/main/java/cn/ezhizao/project/business/controller/BizLotTechnologicalProcessController.java
  5. 4 1
      src/main/java/cn/ezhizao/project/business/domain/BizLot.java
  6. 2 2
      src/main/java/cn/ezhizao/project/business/domain/BizLotTechnologicalProcess.java
  7. 6 3
      src/main/java/cn/ezhizao/project/business/domain/BizLotTechnologicalProcessDetail.java
  8. 0 91
      src/main/java/cn/ezhizao/project/business/domain/BizTechnologicalWasteRecycling.java
  9. 0 85
      src/main/java/cn/ezhizao/project/business/domain/BizTechnologicalWasteRecyclingDetail.java
  10. 29 0
      src/main/java/cn/ezhizao/project/business/mapper/BizLotTechnologicalProcessDetailMapper.java
  11. 45 0
      src/main/java/cn/ezhizao/project/business/mapper/BizLotTechnologicalProcessMapper.java
  12. 0 29
      src/main/java/cn/ezhizao/project/business/mapper/BizTechnologicalAmendDetailMapper.java
  13. 0 46
      src/main/java/cn/ezhizao/project/business/mapper/BizTechnologicalAmendMapper.java
  14. 0 29
      src/main/java/cn/ezhizao/project/business/mapper/BizTechnologicalWasteRecyclingDetailMapper.java
  15. 0 29
      src/main/java/cn/ezhizao/project/business/mapper/BizTechnologicalWasteRecyclingMapper.java
  16. 32 0
      src/main/java/cn/ezhizao/project/business/service/IBizLotTechnologicalProcessDetailService.java
  17. 46 0
      src/main/java/cn/ezhizao/project/business/service/IBizLotTechnologicalProcessService.java
  18. 0 32
      src/main/java/cn/ezhizao/project/business/service/IBizTechnologicalAmendDetailService.java
  19. 0 47
      src/main/java/cn/ezhizao/project/business/service/IBizTechnologicalAmendService.java
  20. 0 30
      src/main/java/cn/ezhizao/project/business/service/IBizTechnologicalWasteRecyclingDetailService.java
  21. 0 30
      src/main/java/cn/ezhizao/project/business/service/IBizTechnologicalWasteRecyclingService.java
  22. 55 0
      src/main/java/cn/ezhizao/project/business/service/impl/BizLotTechnologicalProcessServiceImpl.java
  23. 0 43
      src/main/java/cn/ezhizao/project/business/service/impl/BizTechnologicalAmendDetailServiceImpl.java
  24. 0 56
      src/main/java/cn/ezhizao/project/business/service/impl/BizTechnologicalAmendServiceImpl.java
  25. 0 43
      src/main/java/cn/ezhizao/project/business/service/impl/BizTechnologicalWasteRecyclingDetailServiceImpl.java
  26. 0 43
      src/main/java/cn/ezhizao/project/business/service/impl/BizTechnologicalWasteRecyclingServiceImpl.java
  27. 43 0
      src/main/java/cn/ezhizao/project/business/service/impl/IBizLotLotTechnologicalProcessDetailServiceImpl.java
  28. 5 5
      src/main/resources/mybatis/business/BizLotTechnologicalProcessDetailMapper.xml
  29. 7 7
      src/main/resources/mybatis/business/BizLotTechnologicalProcessMapper.xml
  30. 0 37
      src/main/resources/mybatis/business/BizTechnologicalWasteRecyclingDetailMapper.xml
  31. 0 36
      src/main/resources/mybatis/business/BizTechnologicalWasteRecyclingMapper.xml

+ 1 - 1
src/main/java/cn/ezhizao/project/business/controller/BizCarrierController.java

@@ -30,7 +30,7 @@ public class BizCarrierController extends BaseController {
 
     @GetMapping("/list")
     public TableDataInfo list(BizCarrier data) throws NoSuchFieldException, IllegalAccessException, JsonProcessingException {
-//        startPage();
+        startPage();
         List<BizCarrier> list = iBizCarrierService.getList(data);
         return getDataTable(list);
     }

+ 4 - 8
src/main/java/cn/ezhizao/project/business/controller/BizDayworkController.java

@@ -16,14 +16,10 @@ import org.springframework.web.bind.annotation.*;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 import java.util.stream.Collectors;
 
-import static cn.ezhizao.common.utils.SecurityUtils.getTenantId;
-
 
 /**
  * 报工Controller
@@ -41,7 +37,7 @@ public class BizDayworkController extends BaseController {
     private IBizTechnologicalProcessDetailService bizTechnologicalProcessDetailService;
 
     @Resource
-    private IBizTechnologicalAmendDetailService bizTechnologicalAmendDetailService;
+    private IBizLotTechnologicalProcessDetailService bizTechnologicalAmendDetailService;
 
     @Resource
     private IBizDayworkCarrierService bizDayworkCarrierService;
@@ -159,9 +155,9 @@ public class BizDayworkController extends BaseController {
 
                 //是否单批单改
                 if(lot.getIsAmend()==1){
-                    BizTechnologicalAmendDetail amendDetail =new BizTechnologicalAmendDetail();
-                    amendDetail.setTechnologicalAmendId(lot.getTechnologicalProcessId());
-                    List<BizTechnologicalAmendDetail> amendDetailList=bizTechnologicalAmendDetailService.getList(amendDetail);
+                    BizLotTechnologicalProcessDetail amendDetail =new BizLotTechnologicalProcessDetail();
+                    amendDetail.setLotTechnologicalProcessId(lot.getTechnologicalProcessId());
+                    List<BizLotTechnologicalProcessDetail> amendDetailList=bizTechnologicalAmendDetailService.getList(amendDetail);
                     map.put("processDetails",amendDetailList);
                 } else if (lot.getIsWasteRecycling()==1) { //是否废品回用
                     

+ 102 - 53
src/main/java/cn/ezhizao/project/business/controller/BizLotController.java

@@ -15,6 +15,8 @@ import cn.ezhizao.framework.web.domain.AjaxResult;
 import cn.ezhizao.framework.web.page.TableDataInfo;
 import cn.ezhizao.project.business.domain.*;
 import cn.ezhizao.project.business.service.*;
+import cn.ezhizao.project.system.domain.SysDept;
+import cn.ezhizao.project.system.mapper.SysDeptMapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.transaction.annotation.Transactional;
@@ -42,17 +44,10 @@ public class BizLotController extends BaseController
     private IBizLotService bizLotService;
 
     @Resource
-    private IBizTechnologicalAmendService bizTechnologicalAmendService;
+    private IBizLotTechnologicalProcessService bizLotTechnologicalProcessService;
 
     @Resource
-    private IBizTechnologicalAmendDetailService bizTechnologicalAmendDetailService;
-
-    @Resource
-    private IBizTechnologicalWasteRecyclingService bizTechnologicalWasteRecyclingService;
-
-    @Resource
-    private IBizTechnologicalWasteRecyclingDetailService bizTechnologicalWasteRecyclingDetailService;
-
+    private IBizLotTechnologicalProcessDetailService bizLotTechnologicalProcessDetailService;
     @Resource
     private IBizTechnologicalProcessDetailService bizTechnologicalProcessDetailService;
     @Resource
@@ -69,6 +64,8 @@ public class BizLotController extends BaseController
     IBizDayworkCarrierService dayworkCarrierService;
     @Resource
     IBizCarrierService carrierService;
+    @Resource
+    SysDeptMapper deptMapper;
 
     @Resource
     private IBizCarrierCategoryService bizCarrierCategoryService;
@@ -121,23 +118,23 @@ public class BizLotController extends BaseController
     {
         //单批单改或多批单改
         if(bizLot.getIsAmend()==1) {
-            QueryWrapper<BizTechnologicalAmend> queryWrapper = new QueryWrapper<>();
+            QueryWrapper<BizLotTechnologicalProcess> queryWrapper = new QueryWrapper<>();
             queryWrapper.eq("is_stop",0);
             queryWrapper.eq("lot_id",bizLot.getId());
-            BizTechnologicalAmend technologicalAmend = bizTechnologicalAmendService.getOne(queryWrapper);
-            QueryWrapper<BizTechnologicalAmendDetail> wrapper = new QueryWrapper<>();
+            BizLotTechnologicalProcess technologicalAmend = bizLotTechnologicalProcessService.getOne(queryWrapper);
+            QueryWrapper<BizLotTechnologicalProcessDetail> wrapper = new QueryWrapper<>();
             wrapper.eq("technological_amend_id",technologicalAmend.getId());
-            List<BizTechnologicalAmendDetail> list = bizTechnologicalAmendDetailService.list(wrapper);
+            List<BizLotTechnologicalProcessDetail> list = bizLotTechnologicalProcessDetailService.list(wrapper);
             return success(list);
         }else{
             //该批是否废品回用
             if(bizLot.getIsWasteRecycling() == 1) {
-                QueryWrapper<BizTechnologicalWasteRecycling> queryWrapper = new QueryWrapper<>();
+                QueryWrapper<BizLotTechnologicalProcess> queryWrapper = new QueryWrapper<>();
                 queryWrapper.eq("lot_id",bizLot.getId());
-                BizTechnologicalWasteRecycling wasteRecycling = bizTechnologicalWasteRecyclingService.getOne(queryWrapper);
-                QueryWrapper<BizTechnologicalWasteRecyclingDetail> wrapper = new QueryWrapper<>();
+                BizLotTechnologicalProcess wasteRecycling = bizLotTechnologicalProcessService.getOne(queryWrapper);
+                QueryWrapper<BizLotTechnologicalProcessDetail> wrapper = new QueryWrapper<>();
                 wrapper.eq("technological_waste_recycling_id",wasteRecycling.getId());
-                List<BizTechnologicalWasteRecyclingDetail> list = bizTechnologicalWasteRecyclingDetailService.list(wrapper);
+                List<BizLotTechnologicalProcessDetail> list = bizLotTechnologicalProcessDetailService.list(wrapper);
                 return success(list);
             }
             //查原始工艺工序表
@@ -208,9 +205,9 @@ public class BizLotController extends BaseController
         }
         bizLotService.saveBatch(lotList);
         //新增批次存完,存废品回用工艺表
-        List<BizTechnologicalWasteRecycling> technologicalWasteRecyclingList = new ArrayList<>();
+        List<BizLotTechnologicalProcess> technologicalWasteRecyclingList = new ArrayList<>();
         for (BizLot item : lotList) {
-            BizTechnologicalWasteRecycling bizTechnologicalWasteRecycling = new BizTechnologicalWasteRecycling();
+            BizLotTechnologicalProcess bizTechnologicalWasteRecycling = new BizLotTechnologicalProcess();
             bizTechnologicalWasteRecycling.setLotId(item.getId());
             bizTechnologicalWasteRecycling.setLotCode(item.getLotCode());
             bizTechnologicalWasteRecycling.setProductionPlanDetailId(bizLot.getProductionPlanDetailId());
@@ -221,15 +218,17 @@ public class BizLotController extends BaseController
             bizTechnologicalWasteRecycling.setProductCode(bizLot.getProcessList().get(0).getProductCode());
             bizTechnologicalWasteRecycling.setProductId(bizLot.getProductId());
             bizTechnologicalWasteRecycling.setProductShaftCategoryName(bizLot.getProcessList().get(0).getProductShaftCategoryName());
+            bizTechnologicalWasteRecycling.setAmendmentVersions(1);
             technologicalWasteRecyclingList.add(bizTechnologicalWasteRecycling);
         }
-        bizTechnologicalWasteRecyclingService.saveBatch(technologicalWasteRecyclingList);
+        bizLotTechnologicalProcessService.saveBatch(technologicalWasteRecyclingList);
         //废品工艺表存完,存废品工序表
-        List<BizTechnologicalWasteRecyclingDetail> technologicalWasteRecyclingDetailList = new ArrayList<>();
-        for (BizTechnologicalWasteRecycling item : technologicalWasteRecyclingList) {
-            for(BizTechnologicalWasteRecyclingDetail info : bizLot.getProcessList()) {
-                BizTechnologicalWasteRecyclingDetail bizTechnologicalWasteRecyclingDetail = new BizTechnologicalWasteRecyclingDetail();
-                bizTechnologicalWasteRecyclingDetail.setTechnologicalWasteRecyclingId(item.getId());
+        List<BizLotTechnologicalProcessDetail> technologicalWasteRecyclingDetailList = new ArrayList<>();
+        for (BizLotTechnologicalProcess item : technologicalWasteRecyclingList) {
+            for(BizLotTechnologicalProcessDetail info : bizLot.getProcessList()) {
+                BizLotTechnologicalProcessDetail bizTechnologicalWasteRecyclingDetail = new BizLotTechnologicalProcessDetail();
+                bizTechnologicalWasteRecyclingDetail.setLotTechnologicalProcessId(item.getId());
+                bizTechnologicalWasteRecyclingDetail.setLotId(item.getLotId());
                 bizTechnologicalWasteRecyclingDetail.setTechnologyVersion(item.getTechnologyVersion());
                 bizTechnologicalWasteRecyclingDetail.setProductId(info.getProductId());
                 bizTechnologicalWasteRecyclingDetail.setProductCode(info.getProductCode());
@@ -244,7 +243,7 @@ public class BizLotController extends BaseController
                 technologicalWasteRecyclingDetailList.add(bizTechnologicalWasteRecyclingDetail);
             }
         }
-        return success(bizTechnologicalWasteRecyclingDetailService.saveBatch(technologicalWasteRecyclingDetailList));
+        return success(bizLotTechnologicalProcessDetailService.saveBatch(technologicalWasteRecyclingDetailList));
     }
 
     /**
@@ -309,17 +308,20 @@ public class BizLotController extends BaseController
         lot.setProductCode(product.getProductCode());
         lot.setProductDescription(product.getDescription());
         // 计划单号
-        BizProductionPlanDetail productionPlanDetail = bizProductionPlanDetailService.getById(lot.getProductionPlanDetailId());
-        lot.setProductionPlanNo(productionPlanDetail.getProductionPlanNo());
-        // 下达日期
-        lot.setIssueDate(productionPlanDetail.getIssueDate());
+        if (lot.getProductionPlanDetailId() != null) {
+            BizProductionPlanDetail productionPlanDetail = bizProductionPlanDetailService.getById(lot.getProductionPlanDetailId());
+            lot.setProductionPlanNo(productionPlanDetail.getProductionPlanNo());
+            // 下达日期
+            lot.setIssueDate(productionPlanDetail.getIssueDate());
+        }
         // 当前工段
         BizDaywork bizDaywork = bizDayworkService.query().eq("lot_id", bizLot.getId()).one();
         BizDayworkItem conditions = new BizDayworkItem();
         conditions.setLotId(lot.getId());
         List<BizDayworkItem> dayworkItemList = bizDayworkItemService.getList(conditions);
         BizDayworkItem dayworkItem = dayworkItemList.stream().sorted(Comparator.comparing(BizDayworkItem::getCreateTime).reversed()).collect(Collectors.toList()).stream().findFirst().orElse(new BizDayworkItem());
-        lot.setCurrentDept(dayworkItem.getDeptName());
+        SysDept dept = deptMapper.selectDeptById(dayworkItem.getDeptId());
+        lot.setCurrentDept(dept!= null ? dept.getDeptName() : null);
         // 当前批次对应箱号
         List<BizDayworkCarrier> dayworkCarriers = dayworkCarrierService.query().in("daywork_id", dayworkItemList.isEmpty() ? Collections.singletonList("0") : dayworkItemList.stream().map(v -> v.getDayworkId()).collect(Collectors.toList())).eq("is_changed", 0).list();
         List<BizCarrier> carriers = new ArrayList<>();
@@ -357,9 +359,10 @@ public class BizLotController extends BaseController
         List<BizDaywork> bizDayworks = new ArrayList<>();
         List<BizDayworkItem> bizDayworkItems = new ArrayList<>();
         List<BizDayworkCarrier> newDayworkCarriers = new ArrayList<>();
+        List<BizDayworkItem> delDayworkItems = new ArrayList<>();
         // 判断绑定箱是否重复
         List<Long> carrierIds = new ArrayList<>();
-        sparateList.stream().filter(v -> !v.getId().equals(bizLot.getId())).forEach(x -> carrierIds.addAll(x.getCarriers().stream().map(BizCarrier::getId).collect(Collectors.toList())));
+        sparateList.stream().filter(v -> !bizLot.getId().equals(v.getId())).forEach(x -> carrierIds.addAll(x.getCarriers().stream().map(BizCarrier::getId).collect(Collectors.toList())));
         List<BizCarrier> carriers = carrierService.query().in("id", carrierIds.isEmpty() ? Collections.singletonList("0"): carrierIds).list();
         List<BizDayworkCarrier> dayworkCarriers = dayworkCarrierService.query().in("carrier_id", carrierIds.isEmpty() ? Collections.singletonList("0"): carrierIds).eq("is_changed", 0).list();
 
@@ -377,31 +380,56 @@ public class BizLotController extends BaseController
         List<BizDayworkItem> baseDayworkItems = bizDayworkItemService.getList(new BizDayworkItem().setLotId(bizLot.getId()));
         if (baseDayworks.size() > 0) {
             sparateList.forEach(l -> {
+                l.setQualifiedNum(l.getLotNumber());
                 if (l.getId() == null) {
+                    l.setId(snowflakeIdWorker.nextId());
                     // 分批复制报工详情
                     List<BizDaywork> newDayworks = new ArrayList<>();
                     baseDayworks.forEach(v -> {
                         BizDaywork newDaywork = new BizDaywork(v);
-                        v.setId(snowflakeIdWorker.nextId());
-                        v.setProcessQualifiedNum(l.getProdNum());
-                        newDaywork.setProcessQualifiedNum(l.getProdNum());
+                        newDaywork.setId(snowflakeIdWorker.nextId());
+                        newDaywork.setProcessQualifiedNum(l.getLotNumber());
+                        newDaywork.setTemporaryProcessQualifiedNum(l.getLotNumber());
+                        newDaywork.setId(snowflakeIdWorker.nextId());
+                        newDaywork.setLotId(l.getId());
                         List<BizDayworkItem> items = baseDayworkItems.stream().filter(e -> e.getDayworkId().equals(v.getId())).sorted(Comparator.comparing(BizDayworkItem::getCreateTime).reversed()).collect(Collectors.toList());
                         // 最后一个报工是周转 修改周转数量为分批数
                         if(items.size() > 0 && Arrays.asList("4", "7", "5").contains( items.get(0).getStatus())) {
-                            BizDayworkItem item = new BizDayworkItem(items.get(0));
-                            item.setProdNum(l.getProdNum());
-                            item.setQualifiedNum(l.getProdNum());
-                            item.setDayworkId(newDaywork.getId());
-                            item.setId(null);
-                            bizDayworkItems.add(item);
+                            BizDayworkItem turnitem = new BizDayworkItem(items.get(0));
+                            turnitem.setProdNum(l.getLotNumber());
+                            turnitem.setQualifiedNum(l.getQualifiedNum());
+                            turnitem.setDayworkId(newDaywork.getId());
+                            turnitem.setLotId(l.getId());
+                            turnitem.setId(null);
+                            bizDayworkItems.add(turnitem);
+                            items.subList(1, items.size()).forEach(e -> {
+                                BizDayworkItem item = new BizDayworkItem(e);
+                                item.setDayworkId(newDaywork.getId());
+                                item.setLotId(l.getId());
+                                item.setId(null);
+                                bizDayworkItems.add(item);
+                            });
+                        } else {
+                            // 最后一个报工不是周转
+                            // 获取最后一个报工工序的第一个报工,删除其他然后修改状态为最大的那个
+                            List<BizDayworkItem> currentItems = items.stream().filter(e -> e.getTechnologicalProcessDetailId().equals(items.get(0).getTechnologicalProcessDetailId())).sorted(Comparator.comparing(BizDayworkItem::getCreateTime)).collect(Collectors.toList());
+                            List<BizDayworkItem> copyItems = items.stream().filter(e -> currentItems.stream().noneMatch(t -> t.getId().equals(e.getId()))).collect(Collectors.toList());
+                            copyItems.forEach(e -> {
+                                BizDayworkItem item = new BizDayworkItem(e);
+                                item.setDayworkId(newDaywork.getId());
+                                item.setLotId(l.getId());
+                                item.setId(null);
+                                bizDayworkItems.add(item);
+                            });
+                            BizDayworkItem latestItem = currentItems.get(0);
+                            latestItem.setStatus(currentItems.stream().max(Comparator.comparing(BizDayworkItem::getStatus)).orElse(new BizDayworkItem()).getStatus());
+                            latestItem.setProdNum(l.getLotNumber());
+                            latestItem.setQualifiedNum(l.getQualifiedNum());
+                            latestItem.setDayworkId(newDaywork.getId());
+                            latestItem.setId(null);
+                            latestItem.setLotId(l.getId());
+                            bizDayworkItems.add(latestItem);
                         }
-                        // 最后一个报工不是周转
-                        items.subList(1, items.size()).forEach(e -> {
-                            BizDayworkItem item = new BizDayworkItem(e);
-                            item.setDayworkId(newDaywork.getId());
-                            item.setId(null);
-                            bizDayworkItems.add(item);
-                        });
                         // 判断最后一个报工是那种情况
                         newDayworks.add(newDaywork);
                         // 关联载具
@@ -422,16 +450,35 @@ public class BizLotController extends BaseController
                     });
                     bizDayworks.addAll(newDayworks);
                 } else {
+                    BizDaywork bizDaywork = baseDayworks.isEmpty() ? null : baseDayworks.get(0);
+                    if (bizDaywork != null) {
+                        bizDaywork.setProductionQuantity(l.getLotNumber());
+                        bizDaywork.setProcessQualifiedNum(l.getLotNumber());
+                        bizDaywork.setTemporaryProcessQualifiedNum(l.getLotNumber());
+                        bizDayworks.add(bizDaywork);
+                    }
                     // 本批将当前报工数量改成分批后的数量
                     // 获取最新报工信息
-                    BizDayworkItem latestItem = baseDayworkItems.stream().filter(v -> v.getDayworkId().equals(l.getId())).max(Comparator.comparing(BizDayworkItem::getCreateTime)).orElse(new BizDayworkItem());
-                    // 假设最新报工是状态未开始开始的产品数量
+                    BizDayworkItem latestItem = baseDayworkItems.stream().filter(v -> v.getDayworkId().equals(baseDayworks.get(0).getId())).max(Comparator.comparing(BizDayworkItem::getCreateTime)).orElse(new BizDayworkItem());
                     if ("0".equals(latestItem.getStatus())) {
-                        latestItem.setProdNum(l.getProdNum());
+                        // 假设最新报工是状态未开始开始的产品数量
+                        latestItem.setProdNum(l.getLotNumber());
+                        bizDayworkItems.add(latestItem);
                     } else if (Arrays.asList("4", "5", "7").contains(latestItem.getStatus())) {
-                        latestItem.setProdNum(l.getProdNum());
+                        // 假设最新是周转,只改周转数量
+                        latestItem.setProdNum(l.getLotNumber());
+                        latestItem.setQualifiedNum(l.getLotNumber());
+                        bizDayworkItems.add(latestItem);
+                    } else {
+                        // 删除多的报工,只保留第一条并将状态改成最大的状态。
+                        List<BizDayworkItem> currentItems = baseDayworkItems.stream().filter(v -> v.getTechnologicalProcessDetailId().equals(latestItem.getTechnologicalProcessId())).sorted(Comparator.comparing(BizDayworkItem::getCreateTime)).collect(Collectors.toList());
+                        BizDayworkItem updateItem = currentItems.get(0);
+                        updateItem.setStatus(currentItems.stream().max(Comparator.comparing(BizDayworkItem::getStatus)).orElse(new BizDayworkItem()).getStatus());
+                        updateItem.setProdNum(l.getLotNumber());
+                        updateItem.setQualifiedNum(l.getQualifiedNum());
+                        bizDayworkItems.add(updateItem);
+                        delDayworkItems.addAll(currentItems.stream().filter(e -> currentItems.stream().noneMatch(t -> t.getId().equals(e.getId()))).collect(Collectors.toList()));
                     }
-                    // 假设最新是周转,只改周转数量
                 }
             });
         }
@@ -439,8 +486,10 @@ public class BizLotController extends BaseController
         return toAjax(
                 bizLotService.saveOrUpdateBatch(sparateList) &&
                         (bizDayworks.isEmpty() || bizDayworkService.saveOrUpdateBatch(bizDayworks)) &&
+                        (delDayworkItems.isEmpty() || bizDayworkItemService.removeBatchByIds(delDayworkItems)) &&
                         (bizDayworkItems.isEmpty() || bizDayworkItemService.saveOrUpdateBatch(bizDayworkItems)) &&
                         (newDayworkCarriers.isEmpty() || dayworkCarrierService.saveBatch(newDayworkCarriers))
         );
+//        return toAjax(true);
     }
 }

+ 72 - 76
src/main/java/cn/ezhizao/project/business/controller/BizTechnologicalAmendController.java → src/main/java/cn/ezhizao/project/business/controller/BizLotTechnologicalProcessController.java

@@ -1,7 +1,6 @@
 package cn.ezhizao.project.business.controller;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
@@ -15,11 +14,7 @@ import cn.ezhizao.framework.web.page.TableDataInfo;
 import cn.ezhizao.project.business.domain.*;
 import cn.ezhizao.project.business.service.*;
 import cn.ezhizao.project.system.service.ISysDeptService;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.Data;
-import org.apache.poi.ss.formula.functions.T;
-import org.springframework.cloud.client.loadbalancer.RequestData;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -40,15 +35,15 @@ import org.springframework.web.bind.annotation.RestController;
  */
 @RestController
 @RequestMapping("/business/amend")
-public class BizTechnologicalAmendController extends BaseController {
+public class BizLotTechnologicalProcessController extends BaseController {
     @Resource
-    private IBizTechnologicalAmendService bizTechnologicalAmendService;
+    private IBizLotTechnologicalProcessService bizLotTechnologicalProcessServic;
 
     @Resource
     private IBizTechnologicalProcessService bizTechnologicalProcessService;
 
     @Resource
-    private IBizTechnologicalAmendDetailService bizTechnologicalAmendDetailService;
+    private IBizLotTechnologicalProcessDetailService bizLotTechnologicalProcessDetailService;
 
     @Resource
     private IBizTechnologicalProcessDetailService bizTechnologicalProcessDetailService;
@@ -77,12 +72,6 @@ public class BizTechnologicalAmendController extends BaseController {
     @Resource
     private IBizLotWasteService bizLotWasteService;
 
-    @Resource
-    private IBizTechnologicalWasteRecyclingService bizTechnologicalWasteRecyclingService;
-
-    @Resource
-    private IBizTechnologicalWasteRecyclingDetailService bizTechnologicalWasteRecyclingDetailService;
-
     @Resource
     private IBizProductionPlanDetailSubDetailService bizProductionPlanDetailSubDetailService;
 
@@ -103,10 +92,10 @@ public class BizTechnologicalAmendController extends BaseController {
      */
     @PreAuthorize("@ss.hasPermi('business:amend:list')")
     @GetMapping("/list")
-    public TableDataInfo list(BizTechnologicalAmend bizTechnologicalAmend) throws NoSuchFieldException, IllegalAccessException {
-        setTenantId(bizTechnologicalAmend);
+    public TableDataInfo list(BizLotTechnologicalProcess bizLotTechnologicalProcess) throws NoSuchFieldException, IllegalAccessException {
+        setTenantId(bizLotTechnologicalProcess);
         startPage();
-        List<BizTechnologicalAmend> list = bizTechnologicalAmendService.getList(bizTechnologicalAmend);
+        List<BizLotTechnologicalProcess> list = bizLotTechnologicalProcessServic.getList(bizLotTechnologicalProcess);
         return getDataTable(list);
     }
 
@@ -124,7 +113,7 @@ public class BizTechnologicalAmendController extends BaseController {
      */
     @GetMapping("/standardProcess/{processId}")
     public TableDataInfo standardProcess(@PathVariable("processId") Long processId) throws NoSuchFieldException, IllegalAccessException {
-        BizTechnologicalAmend amend = bizTechnologicalAmendService.getById(processId);
+        BizLotTechnologicalProcess amend = bizLotTechnologicalProcessServic.getById(processId);
 
         return getDataTable(bizTechnologicalProcessDetailService.getProcessDetailsByTechnicalProcessId(amend.getTechnologicalProcessId()));
     }
@@ -202,32 +191,13 @@ public class BizTechnologicalAmendController extends BaseController {
         List<BizTechnologicalProcessDetail> processDetailList = new ArrayList<>();
 
         //是否单批单改
-        if (lot.getIsAmend() == 1) {
+        if (lot.getIsAmend() == 1 || lot.getIsWasteRecycling() == 1) {
             //查询更改后的数据
-            BizTechnologicalAmendDetail amendDetail = new BizTechnologicalAmendDetail();
-            amendDetail.setTechnologicalAmendId(lot.getTechnologicalProcessId());
-            List<BizTechnologicalAmendDetail> amendDetailList = bizTechnologicalAmendDetailService.getList(amendDetail);
-
-            for (BizTechnologicalAmendDetail item : amendDetailList) {
-                BizTechnologicalProcessDetail process = new BizTechnologicalProcessDetail();
-                process.setProcessId(item.getProcessId());
-                process.setProcessStepNumber(item.getProcessStepNumber());
-                process.setProcessCode(item.getProcessCode());
-                process.setProcessAlias(item.getProcessAlias());
-                process.setProcessKey(item.getProcessKey());
-                process.setProductShaftCategory(item.getProductShaftCategory());
-                process.setProductShaftCategoryName(item.getProductShaftCategoryName());
-                process.setTechnologicalProcessId(item.getTechnologicalAmendId());
-                process.setProductId(item.getProductId());
-                process.setProductDescription(item.getProductDescription());
-                processDetailList.add(process);
-            }
-        } else if (lot.getIsWasteRecycling() == 1) { //是否废品回用
-            BizTechnologicalWasteRecyclingDetail wasteRecyclingDetail = new BizTechnologicalWasteRecyclingDetail();
-            wasteRecyclingDetail.setTechnologicalWasteRecyclingId(lot.getTechnologicalProcessId());
-            List<BizTechnologicalWasteRecyclingDetail> processList = bizTechnologicalWasteRecyclingDetailService.getList(wasteRecyclingDetail);
+            BizLotTechnologicalProcessDetail amendDetail = new BizLotTechnologicalProcessDetail();
+            amendDetail.setLotTechnologicalProcessId(lot.getTechnologicalProcessId());
+            List<BizLotTechnologicalProcessDetail> amendDetailList = bizLotTechnologicalProcessDetailService.getList(amendDetail);
 
-            for (BizTechnologicalWasteRecyclingDetail item : processList) {
+            for (BizLotTechnologicalProcessDetail item : amendDetailList) {
                 BizTechnologicalProcessDetail process = new BizTechnologicalProcessDetail();
                 process.setProcessId(item.getProcessId());
                 process.setProcessStepNumber(item.getProcessStepNumber());
@@ -236,17 +206,38 @@ public class BizTechnologicalAmendController extends BaseController {
                 process.setProcessKey(item.getProcessKey());
                 process.setProductShaftCategory(item.getProductShaftCategory());
                 process.setProductShaftCategoryName(item.getProductShaftCategoryName());
-                process.setTechnologicalProcessId(item.getTechnologicalWasteRecyclingId());
+                process.setTechnologicalProcessId(item.getLotTechnologicalProcessId());
                 process.setProductId(item.getProductId());
                 process.setProductDescription(item.getProductDescription());
                 processDetailList.add(process);
             }
-        } else {
+        }  else {
             //查询工序信息
             processDetail.setTechnologicalProcessId(lot.getTechnologicalProcessId());
             processDetailList = bizTechnologicalProcessDetailService.getProcessDetailsByTechnicalProcessId(lot.getTechnologicalProcessId());
 
         }
+//         修改使用方式,暂时注释
+//        else if (lot.getIsWasteRecycling() == 1) { //是否废品回用
+//            BizTechnologicalWasteRecyclingDetail wasteRecyclingDetail = new BizTechnologicalWasteRecyclingDetail();
+//            wasteRecyclingDetail.setTechnologicalWasteRecyclingId(lot.getTechnologicalProcessId());
+//            List<BizTechnologicalWasteRecyclingDetail> processList = bizTechnologicalWasteRecyclingDetailService.getList(wasteRecyclingDetail);
+//
+//            for (BizTechnologicalWasteRecyclingDetail item : processList) {
+//                BizTechnologicalProcessDetail process = new BizTechnologicalProcessDetail();
+//                process.setProcessId(item.getProcessId());
+//                process.setProcessStepNumber(item.getProcessStepNumber());
+//                process.setProcessCode(item.getProcessCode());
+//                process.setProcessAlias(item.getProcessAlias());
+//                process.setProcessKey(item.getProcessKey());
+//                process.setProductShaftCategory(item.getProductShaftCategory());
+//                process.setProductShaftCategoryName(item.getProductShaftCategoryName());
+//                process.setTechnologicalProcessId(item.getTechnologicalWasteRecyclingId());
+//                process.setProductId(item.getProductId());
+//                process.setProductDescription(item.getProductDescription());
+//                processDetailList.add(process);
+//            }
+//        }
 
         //查询报工信息
         lot.setTechnologicalProcessDetailList(selectDayworkItem(processDetailList, lot));
@@ -333,10 +324,10 @@ public class BizTechnologicalAmendController extends BaseController {
     @PreAuthorize("@ss.hasPermi('business:amend:export')")
     @Log(title = "修改后工艺", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, BizTechnologicalAmend bizTechnologicalAmend) throws NoSuchFieldException, IllegalAccessException {
-        setTenantId(bizTechnologicalAmend);
-        List<BizTechnologicalAmend> list = bizTechnologicalAmendService.getList(bizTechnologicalAmend);
-        ExcelUtil<BizTechnologicalAmend> util = new ExcelUtil<BizTechnologicalAmend>(BizTechnologicalAmend.class);
+    public void export(HttpServletResponse response, BizLotTechnologicalProcess bizLotTechnologicalProcess) throws NoSuchFieldException, IllegalAccessException {
+        setTenantId(bizLotTechnologicalProcess);
+        List<BizLotTechnologicalProcess> list = bizLotTechnologicalProcessServic.getList(bizLotTechnologicalProcess);
+        ExcelUtil<BizLotTechnologicalProcess> util = new ExcelUtil<BizLotTechnologicalProcess>(BizLotTechnologicalProcess.class);
         util.exportExcel(response, list, "修改后工艺数据");
     }
 
@@ -355,7 +346,7 @@ public class BizTechnologicalAmendController extends BaseController {
 
             BizTechnologicalProcess technologicalProcess = new BizTechnologicalProcess();
             //新增修改后工艺信息
-            BizTechnologicalAmend amend = new BizTechnologicalAmend();
+            BizLotTechnologicalProcess amend = new BizLotTechnologicalProcess();
             amend.setTenantId(lot.getTenantId());
             amend.setLotId(lot.getId());
             amend.setLotCode(lot.getLotCode());
@@ -371,18 +362,19 @@ public class BizTechnologicalAmendController extends BaseController {
             amend.setProductShaftCategoryName(technologicalProcess.getProductShaftCategoryName());
             amend.setProductCode(technologicalProcess.getProductCode());
             amend.setProductDescription(technologicalProcess.getProductDescription());
-            bizTechnologicalAmendService.save(amend);
+            bizLotTechnologicalProcessServic.save(amend);
 
-            List<BizTechnologicalAmendDetail> amendDetailList = new ArrayList<>();
+            List<BizLotTechnologicalProcessDetail> amendDetailList = new ArrayList<>();
 
             for (BizTechnologicalProcessDetail detail : processDetailList) {
-                BizTechnologicalAmendDetail amendDetail = new BizTechnologicalAmendDetail();
-                amendDetail.setTechnologicalAmendId(amend.getId());
+                BizLotTechnologicalProcessDetail amendDetail = new BizLotTechnologicalProcessDetail();
+                amendDetail.setLotTechnologicalProcessId(amend.getId());
                 amendDetail.setTenantId(amend.getTenantId());
                 amendDetail.setTechnologyVersion(amend.getTechnologyVersion());
                 amendDetail.setProductId(amend.getProductId());
                 amendDetail.setProductCode(amend.getProductCode());
                 amendDetail.setProcessStepNumber(detail.getProcessStepNumber());
+                amendDetail.setLotId(lot.getId());
                 amendDetail.setProcessId(detail.getProcessId());
                 amendDetail.setProcessKey(detail.getProcessKey());
                 amendDetail.setProcessCode(detail.getProcessCode());
@@ -397,7 +389,7 @@ public class BizTechnologicalAmendController extends BaseController {
             //修改批次工艺信息
             lot.setTechnologicalProcessId(amend.getId());
             lot.setIsAmend(1);
-            bizTechnologicalAmendDetailService.saveBatch(amendDetailList) ;
+            bizLotTechnologicalProcessDetailService.saveBatch(amendDetailList) ;
             newLotList.add(lot);
 //            bizLotService.updateById(lot);
         }
@@ -418,29 +410,32 @@ public class BizTechnologicalAmendController extends BaseController {
         int num = 0;//修改过的次数
 
         //是否进行过单批单改
-        if (lot.getIsAmend() == 1) {
+        if (lot.getIsAmend() == 1||lot.getIsWasteRecycling() == 1) {
             //查询单批单改信息
-            BizTechnologicalAmend technologicalAmend = bizTechnologicalAmendService.getById(lot.getTechnologicalProcessId());
+            BizLotTechnologicalProcess technologicalAmend = bizLotTechnologicalProcessServic.getById(lot.getTechnologicalProcessId());
 
             //先将lot的工艺id设置为原始工艺id,为了给新改的原始工艺赋值
             lot.setTechnologicalProcessId(technologicalAmend.getTechnologicalProcessId());
             //查询修改过几次
-            List<BizTechnologicalAmend> list = bizTechnologicalAmendService.selectUpdateList(lot.getId());
+            List<BizLotTechnologicalProcess> list = bizLotTechnologicalProcessServic.selectUpdateList(lot.getId());
             num = list.size();
             //设为停用
             technologicalAmend.setIsStop(1);
-            bizTechnologicalAmendService.saveOrUpdate(technologicalAmend);
+            bizLotTechnologicalProcessServic.saveOrUpdate(technologicalAmend);
             //查询原始工艺信息
             technologicalProcess = bizTechnologicalProcessService.getById(technologicalAmend.getTechnologicalProcessId());
-        } else if (lot.getIsWasteRecycling() == 1) { //是否废品回用
-            BizTechnologicalWasteRecycling wasteRecycling = bizTechnologicalWasteRecyclingService.getById(lot.getTechnologicalProcessId());
-            technologicalProcess = bizTechnologicalProcessService.getById(wasteRecycling.getTechnologicalProcessId());
-        } else {
+        }  else {
             technologicalProcess = bizTechnologicalProcessService.getById(lot.getTechnologicalProcessId());
         }
 
+//        使用新方法暂时注释
+//        else if (lot.getIsWasteRecycling() == 1) { //是否废品回用
+//            BizTechnologicalWasteRecycling wasteRecycling = bizTechnologicalWasteRecyclingService.getById(lot.getTechnologicalProcessId());
+//            technologicalProcess = bizTechnologicalProcessService.getById(wasteRecycling.getTechnologicalProcessId());
+//        }
+
         //新增修改后工艺信息
-        BizTechnologicalAmend amend = new BizTechnologicalAmend();
+        BizLotTechnologicalProcess amend = new BizLotTechnologicalProcess();
         amend.setTenantId(lot.getTenantId());
         amend.setLotId(lot.getId());
         amend.setLotCode(lot.getLotCode());
@@ -456,19 +451,20 @@ public class BizTechnologicalAmendController extends BaseController {
         amend.setProductShaftCategoryName(technologicalProcess.getProductShaftCategoryName());
         amend.setProductCode(technologicalProcess.getProductCode());
         amend.setProductDescription(technologicalProcess.getProductDescription());
-        bizTechnologicalAmendService.save(amend);
+        bizLotTechnologicalProcessServic.save(amend);
 
-        List<BizTechnologicalAmendDetail> amendDetailList = new ArrayList<>();
+        List<BizLotTechnologicalProcessDetail> amendDetailList = new ArrayList<>();
 
         for (BizTechnologicalProcessDetail detail : detailList) {
-            BizTechnologicalAmendDetail amendDetail = new BizTechnologicalAmendDetail();
-            amendDetail.setTechnologicalAmendId(amend.getId());
+            BizLotTechnologicalProcessDetail amendDetail = new BizLotTechnologicalProcessDetail();
+            amendDetail.setLotTechnologicalProcessId(amend.getId());
             amendDetail.setTenantId(amend.getTenantId());
             amendDetail.setTechnologyVersion(amend.getTechnologyVersion());
             amendDetail.setProductId(amend.getProductId());
             amendDetail.setProductCode(amend.getProductCode());
             amendDetail.setProcessStepNumber(detail.getProcessStepNumber());
             amendDetail.setProcessId(detail.getProcessId());
+            amendDetail.setLotId(lot.getId());
             amendDetail.setProcessKey(detail.getProcessKey());
             amendDetail.setProcessCode(detail.getProcessCode());
             amendDetail.setProcessAlias(detail.getProcessAlias());
@@ -482,7 +478,7 @@ public class BizTechnologicalAmendController extends BaseController {
         //修改批次工艺信息
         lot.setTechnologicalProcessId(amend.getId());
         lot.setIsAmend(1);
-        return success(bizTechnologicalAmendDetailService.saveBatch(amendDetailList) && bizLotService.updateById(lot));
+        return success(bizLotTechnologicalProcessDetailService.saveBatch(amendDetailList) && bizLotService.updateById(lot));
     }
 
     /**
@@ -526,7 +522,7 @@ public class BizTechnologicalAmendController extends BaseController {
     @PreAuthorize("@ss.hasPermi('business:amend:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id) {
-        return success(bizTechnologicalAmendService.getById(id));
+        return success(bizLotTechnologicalProcessServic.getById(id));
     }
 
     /**
@@ -535,9 +531,9 @@ public class BizTechnologicalAmendController extends BaseController {
     @PreAuthorize("@ss.hasPermi('business:amend:add')")
     @Log(title = "修改后工艺", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody BizTechnologicalAmend bizTechnologicalAmend) throws NoSuchFieldException, IllegalAccessException {
-        setTenantId(bizTechnologicalAmend);
-        return toAjax(bizTechnologicalAmendService.save(bizTechnologicalAmend));
+    public AjaxResult add(@RequestBody BizLotTechnologicalProcess bizLotTechnologicalProcess) throws NoSuchFieldException, IllegalAccessException {
+        setTenantId(bizLotTechnologicalProcess);
+        return toAjax(bizLotTechnologicalProcessServic.save(bizLotTechnologicalProcess));
     }
 
     /**
@@ -546,9 +542,9 @@ public class BizTechnologicalAmendController extends BaseController {
     @PreAuthorize("@ss.hasPermi('business:amend:edit')")
     @Log(title = "修改后工艺", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody BizTechnologicalAmend bizTechnologicalAmend) throws NoSuchFieldException, IllegalAccessException {
-        setTenantId(bizTechnologicalAmend);
-        return toAjax(bizTechnologicalAmendService.updateById(bizTechnologicalAmend));
+    public AjaxResult edit(@RequestBody BizLotTechnologicalProcess bizLotTechnologicalProcess) throws NoSuchFieldException, IllegalAccessException {
+        setTenantId(bizLotTechnologicalProcess);
+        return toAjax(bizLotTechnologicalProcessServic.updateById(bizLotTechnologicalProcess));
     }
 
     /**
@@ -558,6 +554,6 @@ public class BizTechnologicalAmendController extends BaseController {
     @Log(title = "修改后工艺", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable List<Long> ids) {
-        return toAjax(bizTechnologicalAmendService.removeBatchByIds(ids));
+        return toAjax(bizLotTechnologicalProcessServic.removeBatchByIds(ids));
     }
 }

+ 4 - 1
src/main/java/cn/ezhizao/project/business/domain/BizLot.java

@@ -170,7 +170,7 @@ public class BizLot extends BaseEntity {
     private Long  lineNumber;
 
     @TableField(exist = false)
-    private List<BizTechnologicalWasteRecyclingDetail> processList;
+    private List<BizLotTechnologicalProcessDetail> processList;
 
     @TableField(exist = false)
     @ApiModelProperty("下达日期")
@@ -200,4 +200,7 @@ public class BizLot extends BaseEntity {
     @TableField(exist = false)
     private String latestLotCode;
 
+    @TableField(exist = false)
+    private Integer lotNumber;
+
 }

+ 2 - 2
src/main/java/cn/ezhizao/project/business/domain/BizTechnologicalAmend.java → src/main/java/cn/ezhizao/project/business/domain/BizLotTechnologicalProcess.java

@@ -15,8 +15,8 @@ import io.swagger.annotations.ApiModelProperty;
  * @date 2024-04-07
  */
 @Data
-@TableName(value = "biz_technological_amend")
-public class BizTechnologicalAmend extends BaseEntity
+@TableName(value = "biz_lot_technological_process")
+public class BizLotTechnologicalProcess extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 

+ 6 - 3
src/main/java/cn/ezhizao/project/business/domain/BizTechnologicalAmendDetail.java → src/main/java/cn/ezhizao/project/business/domain/BizLotTechnologicalProcessDetail.java

@@ -13,8 +13,8 @@ import io.swagger.annotations.ApiModelProperty;
  * @date 2024-04-07
  */
 @Data
-@TableName(value = "biz_technological_amend_detail")
-public class BizTechnologicalAmendDetail extends BaseEntity
+@TableName(value = "biz_lot_technological_process_detail")
+public class BizLotTechnologicalProcessDetail extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 
@@ -24,7 +24,10 @@ public class BizTechnologicalAmendDetail extends BaseEntity
 
     /** 工艺id */
     @ApiModelProperty(value = "${comment}")
-    private Long technologicalAmendId;
+    private Long lotTechnologicalProcessId;
+
+    @ApiModelProperty(value = "批次")
+    private Long lotId;
 
     /** 工艺编码 */
     @Excel(name = "工艺编码")

+ 0 - 91
src/main/java/cn/ezhizao/project/business/domain/BizTechnologicalWasteRecycling.java

@@ -1,91 +0,0 @@
-package cn.ezhizao.project.business.domain;
-
-import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
-import cn.ezhizao.framework.web.domain.BaseEntity;
-import com.baomidou.mybatisplus.annotation.TableName;
-
-import lombok.Data;
-import io.swagger.annotations.ApiModelProperty;
-
-
-/**
- * 废品回用工艺对象 biz_technological_waste_recycling
- *
- * @author ezhizao
- * @date 2024-04-17
- */
-@Data
-@TableName(value = "biz_technological_waste_recycling")
-public class BizTechnologicalWasteRecycling extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 租户id */
-    @ApiModelProperty(value = "${comment}")
-    private Long tenantId;
-
-    /** 批次号id */
-    @ApiModelProperty(value = "${comment}")
-    private Long lotId;
-
-    /** 批次号 */
-    @Excel(name = "批次号")
-    @ApiModelProperty(value = "批次号")
-    private String lotCode;
-
-    /** 计划单id */
-    @ApiModelProperty(value = "批次号")
-    private Long productionPlanId;
-
-    /** 计划单明细id */
-    @ApiModelProperty(value = "批次号")
-    private Long productionPlanDetailId;
-
-    /** 产品编码 */
-    @Excel(name = "产品编码")
-    @ApiModelProperty(value = "产品编码")
-    private String productCode;
-
-    /** 原始工艺id */
-    @ApiModelProperty(value = "产品编码")
-    private Long technologicalProcessId;
-
-    /** 原始工艺版本A,B,C */
-    @Excel(name = "原始工艺版本A,B,C")
-    @ApiModelProperty(value = "原始工艺版本A,B,C")
-    private String technologyVersion;
-
-    /** 产品描述 */
-    @Excel(name = "产品描述")
-    @ApiModelProperty(value = "产品描述")
-    private String productDescription;
-
-    /** 轴类型码 */
-    @Excel(name = "轴类型码")
-    @ApiModelProperty(value = "轴类型码")
-    private String productShaftCategory;
-
-    /** 产品id */
-    @ApiModelProperty(value = "轴类型码")
-    private Long productId;
-
-    /** 轴类型id */
-    @ApiModelProperty(value = "轴类型码")
-    private Long productShaftCategoryId;
-
-    /** 规格 */
-    @Excel(name = "规格")
-    @ApiModelProperty(value = "规格")
-    private String productSpecification;
-
-    /** 轴类型 */
-    @Excel(name = "轴类型")
-    @ApiModelProperty(value = "轴类型")
-    private String productShaftCategoryName;
-
-    /** 图号 */
-    @Excel(name = "图号")
-    @ApiModelProperty(value = "图号")
-    private String productDrawingNumber;
-
-}

+ 0 - 85
src/main/java/cn/ezhizao/project/business/domain/BizTechnologicalWasteRecyclingDetail.java

@@ -1,85 +0,0 @@
-package cn.ezhizao.project.business.domain;
-
-import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
-import cn.ezhizao.framework.web.domain.BaseEntity;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableName;
-
-import lombok.Data;
-import io.swagger.annotations.ApiModelProperty;
-
-/**
- * 废品回用工序详情对象 biz_technological_waste_recycling_detail
- *
- * @author ezhizao
- * @date 2024-04-17
- */
-@Data
-@TableName(value = "biz_technological_waste_recycling_detail")
-public class BizTechnologicalWasteRecyclingDetail extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 租户id */
-    @ApiModelProperty(value = "${comment}")
-    private Long tenantId;
-
-    /** 工艺id */
-    @ApiModelProperty(value = "${comment}")
-    private Long technologicalWasteRecyclingId;
-
-    /** 工艺编码 */
-    @Excel(name = "工艺编码")
-    @ApiModelProperty(value = "工艺编码")
-    private String technologyVersion;
-
-    /** 产品id */
-    @ApiModelProperty(value = "工艺编码")
-    private Long productId;
-
-    /** 产品编码 */
-    @Excel(name = "产品编码")
-    @ApiModelProperty(value = "产品编码")
-    private String productCode;
-
-    /** 工序排序
- */
-    private String processStepNumber;
-
-    /** 工序id */
-    private Long processId;
-
-    /** 工序key值 */
-    @Excel(name = "工序key值")
-    @ApiModelProperty(value = "工序key值")
-    private String processKey;
-
-    /** 工序编码 */
-    @Excel(name = "工序编码")
-    @ApiModelProperty(value = "工序编码")
-    private String processCode;
-
-    /** 工序简称 */
-    @Excel(name = "工序简称")
-    @ApiModelProperty(value = "工序简称")
-    private String processAlias;
-
-    /** 轴类型码 */
-    @Excel(name = "轴类型码")
-    @ApiModelProperty(value = "轴类型码")
-    private String productShaftCategory;
-
-    /** 轴类型助记码EPS */
-    @Excel(name = "轴类型助记码EPS")
-    @ApiModelProperty(value = "轴类型助记码EPS")
-    private String productShaftCategoryName;
-
-    /** 产品描述 */
-    @Excel(name = "产品描述")
-    @ApiModelProperty(value = "产品描述")
-    private String productDescription;
-    //排序字段
-    @TableField(exist = false)
-    private Integer uuid;
-
-}

+ 29 - 0
src/main/java/cn/ezhizao/project/business/mapper/BizLotTechnologicalProcessDetailMapper.java

@@ -0,0 +1,29 @@
+package cn.ezhizao.project.business.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import cn.ezhizao.project.business.domain.BizLotTechnologicalProcessDetail;
+
+/**
+ * 工艺修改明细Mapper接口
+ *
+ * @author ezhizao
+ * @date 2024-04-07
+ */
+public interface BizLotTechnologicalProcessDetailMapper extends BaseMapper<BizLotTechnologicalProcessDetail>
+{
+    /**
+     * 查询工艺修改明细列表
+     *
+     * @param bizLotTechnologicalProcessDetail 工艺修改明细
+     * @return 工艺修改明细集合
+     */
+    public List<BizLotTechnologicalProcessDetail> getList(BizLotTechnologicalProcessDetail bizLotTechnologicalProcessDetail);
+
+    /**
+     * 物理删除
+     * @param bizLotTechnologicalProcessDetail
+     * @return 删除结果
+    */
+    public int physicalDelete(BizLotTechnologicalProcessDetail bizLotTechnologicalProcessDetail);
+}

+ 45 - 0
src/main/java/cn/ezhizao/project/business/mapper/BizLotTechnologicalProcessMapper.java

@@ -0,0 +1,45 @@
+package cn.ezhizao.project.business.mapper;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import cn.ezhizao.project.business.domain.BizLotTechnologicalProcess;
+
+/**
+ * 修改后工艺Mapper接口
+ *
+ * @author ezhizao
+ * @date 2024-04-07
+ */
+public interface BizLotTechnologicalProcessMapper extends BaseMapper<BizLotTechnologicalProcess>
+{
+    /**
+     * 查询修改后工艺列表
+     *
+     * @param bizLotTechnologicalProcess 修改后工艺
+     * @return 修改后工艺集合
+     */
+    public List<BizLotTechnologicalProcess> getList(BizLotTechnologicalProcess bizLotTechnologicalProcess);
+
+    /**
+     * 物理删除
+     * @param bizLotTechnologicalProcess
+     * @return 删除结果
+    */
+    public int physicalDelete(BizLotTechnologicalProcess bizLotTechnologicalProcess);
+
+    /**
+     * 根据id查询
+     * @param id
+     * @return
+     */
+    BizLotTechnologicalProcess getById(Long id);
+
+
+    /**
+     * 根据lotId查询历史修改工艺
+     * @param lotId
+     * @return
+     */
+    List<BizLotTechnologicalProcess> selectUpdateList(Long lotId);
+}

+ 0 - 29
src/main/java/cn/ezhizao/project/business/mapper/BizTechnologicalAmendDetailMapper.java

@@ -1,29 +0,0 @@
-package cn.ezhizao.project.business.mapper;
-
-import java.util.List;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import cn.ezhizao.project.business.domain.BizTechnologicalAmendDetail;
-
-/**
- * 工艺修改明细Mapper接口
- *
- * @author ezhizao
- * @date 2024-04-07
- */
-public interface BizTechnologicalAmendDetailMapper extends BaseMapper<BizTechnologicalAmendDetail>
-{
-    /**
-     * 查询工艺修改明细列表
-     *
-     * @param bizTechnologicalAmendDetail 工艺修改明细
-     * @return 工艺修改明细集合
-     */
-    public List<BizTechnologicalAmendDetail> getList(BizTechnologicalAmendDetail bizTechnologicalAmendDetail);
-
-    /**
-     * 物理删除
-     * @param bizTechnologicalAmendDetail
-     * @return 删除结果
-    */
-    public int physicalDelete(BizTechnologicalAmendDetail bizTechnologicalAmendDetail);
-}

+ 0 - 46
src/main/java/cn/ezhizao/project/business/mapper/BizTechnologicalAmendMapper.java

@@ -1,46 +0,0 @@
-package cn.ezhizao.project.business.mapper;
-
-import java.util.List;
-
-import cn.ezhizao.project.business.domain.BizTechnologicalAmendDetail;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import cn.ezhizao.project.business.domain.BizTechnologicalAmend;
-
-/**
- * 修改后工艺Mapper接口
- *
- * @author ezhizao
- * @date 2024-04-07
- */
-public interface BizTechnologicalAmendMapper extends BaseMapper<BizTechnologicalAmend>
-{
-    /**
-     * 查询修改后工艺列表
-     *
-     * @param bizTechnologicalAmend 修改后工艺
-     * @return 修改后工艺集合
-     */
-    public List<BizTechnologicalAmend> getList(BizTechnologicalAmend bizTechnologicalAmend);
-
-    /**
-     * 物理删除
-     * @param bizTechnologicalAmend
-     * @return 删除结果
-    */
-    public int physicalDelete(BizTechnologicalAmend bizTechnologicalAmend);
-
-    /**
-     * 根据id查询
-     * @param id
-     * @return
-     */
-    BizTechnologicalAmend getById(Long id);
-
-
-    /**
-     * 根据lotId查询历史修改工艺
-     * @param lotId
-     * @return
-     */
-    List<BizTechnologicalAmend> selectUpdateList(Long lotId);
-}

+ 0 - 29
src/main/java/cn/ezhizao/project/business/mapper/BizTechnologicalWasteRecyclingDetailMapper.java

@@ -1,29 +0,0 @@
-package cn.ezhizao.project.business.mapper;
-
-import java.util.List;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import cn.ezhizao.project.business.domain.BizTechnologicalWasteRecyclingDetail;
-
-/**
- * 废品回用工序详情Mapper接口
- *
- * @author ezhizao
- * @date 2024-04-17
- */
-public interface BizTechnologicalWasteRecyclingDetailMapper extends BaseMapper<BizTechnologicalWasteRecyclingDetail>
-{
-    /**
-     * 查询废品回用工序详情列表
-     *
-     * @param bizTechnologicalWasteRecyclingDetail 废品回用工序详情
-     * @return 废品回用工序详情集合
-     */
-    public List<BizTechnologicalWasteRecyclingDetail> getList(BizTechnologicalWasteRecyclingDetail bizTechnologicalWasteRecyclingDetail);
-
-    /**
-     * 物理删除
-     * @param bizTechnologicalWasteRecyclingDetail
-     * @return 删除结果
-    */
-    public int physicalDelete(BizTechnologicalWasteRecyclingDetail bizTechnologicalWasteRecyclingDetail);
-}

+ 0 - 29
src/main/java/cn/ezhizao/project/business/mapper/BizTechnologicalWasteRecyclingMapper.java

@@ -1,29 +0,0 @@
-package cn.ezhizao.project.business.mapper;
-
-import java.util.List;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import cn.ezhizao.project.business.domain.BizTechnologicalWasteRecycling;
-
-/**
- * 废品回用工艺Mapper接口
- *
- * @author ezhizao
- * @date 2024-04-17
- */
-public interface BizTechnologicalWasteRecyclingMapper extends BaseMapper<BizTechnologicalWasteRecycling>
-{
-    /**
-     * 查询废品回用工艺列表
-     *
-     * @param bizTechnologicalWasteRecycling 废品回用工艺
-     * @return 废品回用工艺集合
-     */
-    public List<BizTechnologicalWasteRecycling> getList(BizTechnologicalWasteRecycling bizTechnologicalWasteRecycling);
-
-    /**
-     * 物理删除
-     * @param bizTechnologicalWasteRecycling
-     * @return 删除结果
-    */
-    public int physicalDelete(BizTechnologicalWasteRecycling bizTechnologicalWasteRecycling);
-}

+ 32 - 0
src/main/java/cn/ezhizao/project/business/service/IBizLotTechnologicalProcessDetailService.java

@@ -0,0 +1,32 @@
+package cn.ezhizao.project.business.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import cn.ezhizao.project.business.domain.BizLotTechnologicalProcessDetail;
+
+/**
+ * 工艺修改明细Service接口
+ *
+ * @author ezhizao
+ * @date 2024-04-07
+ */
+public interface IBizLotTechnologicalProcessDetailService extends IService<BizLotTechnologicalProcessDetail>
+{
+    /**
+     * 查询工艺修改明细列表
+     *
+     * @param bizLotTechnologicalProcessDetail 工艺修改明细
+     * @return 工艺修改明细集合
+     */
+    public List<BizLotTechnologicalProcessDetail> getList(BizLotTechnologicalProcessDetail bizLotTechnologicalProcessDetail);
+
+    /**
+     * 物理删除
+     * @param bizLotTechnologicalProcessDetail
+     * @return 删除结果
+     */
+    public int physicalDelete(BizLotTechnologicalProcessDetail bizLotTechnologicalProcessDetail);
+
+
+
+}

+ 46 - 0
src/main/java/cn/ezhizao/project/business/service/IBizLotTechnologicalProcessService.java

@@ -0,0 +1,46 @@
+package cn.ezhizao.project.business.service;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import cn.ezhizao.project.business.domain.BizLotTechnologicalProcess;
+
+/**
+ * 修改后工艺Service接口
+ *
+ * @author ezhizao
+ * @date 2024-04-07
+ */
+public interface IBizLotTechnologicalProcessService extends IService<BizLotTechnologicalProcess>
+{
+    /**
+     * 查询修改后工艺列表
+     *
+     * @param bizLotTechnologicalProcess 修改后工艺
+     * @return 修改后工艺集合
+     */
+    public List<BizLotTechnologicalProcess> getList(BizLotTechnologicalProcess bizLotTechnologicalProcess);
+
+    /**
+     * 物理删除
+     * @param bizLotTechnologicalProcess
+     * @return 删除结果
+     */
+    public int physicalDelete(BizLotTechnologicalProcess bizLotTechnologicalProcess);
+
+
+    /**
+     * 根据id 查询数据
+     * @param id
+     * @return
+     */
+    BizLotTechnologicalProcess getById(Long id);
+
+    /**
+     * 根据批次ID查询历史修改工艺
+     * @param lotId
+     * @return
+     */
+    List<BizLotTechnologicalProcess> selectUpdateList(Long lotId);
+
+}

+ 0 - 32
src/main/java/cn/ezhizao/project/business/service/IBizTechnologicalAmendDetailService.java

@@ -1,32 +0,0 @@
-package cn.ezhizao.project.business.service;
-
-import java.util.List;
-import com.baomidou.mybatisplus.extension.service.IService;
-import cn.ezhizao.project.business.domain.BizTechnologicalAmendDetail;
-
-/**
- * 工艺修改明细Service接口
- *
- * @author ezhizao
- * @date 2024-04-07
- */
-public interface IBizTechnologicalAmendDetailService extends IService<BizTechnologicalAmendDetail>
-{
-    /**
-     * 查询工艺修改明细列表
-     *
-     * @param bizTechnologicalAmendDetail 工艺修改明细
-     * @return 工艺修改明细集合
-     */
-    public List<BizTechnologicalAmendDetail> getList(BizTechnologicalAmendDetail bizTechnologicalAmendDetail);
-
-    /**
-     * 物理删除
-     * @param bizTechnologicalAmendDetail
-     * @return 删除结果
-     */
-    public int physicalDelete(BizTechnologicalAmendDetail bizTechnologicalAmendDetail);
-
-
-
-}

+ 0 - 47
src/main/java/cn/ezhizao/project/business/service/IBizTechnologicalAmendService.java

@@ -1,47 +0,0 @@
-package cn.ezhizao.project.business.service;
-
-import java.util.List;
-
-import cn.ezhizao.project.business.domain.BizTechnologicalAmendDetail;
-import com.baomidou.mybatisplus.extension.service.IService;
-import cn.ezhizao.project.business.domain.BizTechnologicalAmend;
-
-/**
- * 修改后工艺Service接口
- *
- * @author ezhizao
- * @date 2024-04-07
- */
-public interface IBizTechnologicalAmendService extends IService<BizTechnologicalAmend>
-{
-    /**
-     * 查询修改后工艺列表
-     *
-     * @param bizTechnologicalAmend 修改后工艺
-     * @return 修改后工艺集合
-     */
-    public List<BizTechnologicalAmend> getList(BizTechnologicalAmend bizTechnologicalAmend);
-
-    /**
-     * 物理删除
-     * @param bizTechnologicalAmend
-     * @return 删除结果
-     */
-    public int physicalDelete(BizTechnologicalAmend bizTechnologicalAmend);
-
-
-    /**
-     * 根据id 查询数据
-     * @param id
-     * @return
-     */
-    BizTechnologicalAmend getById(Long id);
-
-    /**
-     * 根据批次ID查询历史修改工艺
-     * @param lotId
-     * @return
-     */
-    List<BizTechnologicalAmend> selectUpdateList(Long lotId);
-
-}

+ 0 - 30
src/main/java/cn/ezhizao/project/business/service/IBizTechnologicalWasteRecyclingDetailService.java

@@ -1,30 +0,0 @@
-package cn.ezhizao.project.business.service;
-
-import java.util.List;
-import com.baomidou.mybatisplus.extension.service.IService;
-import cn.ezhizao.project.business.domain.BizTechnologicalWasteRecyclingDetail;
-
-/**
- * 废品回用工序详情Service接口
- *
- * @author ezhizao
- * @date 2024-04-17
- */
-public interface IBizTechnologicalWasteRecyclingDetailService extends IService<BizTechnologicalWasteRecyclingDetail>
-{
-    /**
-     * 查询废品回用工序详情列表
-     *
-     * @param bizTechnologicalWasteRecyclingDetail 废品回用工序详情
-     * @return 废品回用工序详情集合
-     */
-    public List<BizTechnologicalWasteRecyclingDetail> getList(BizTechnologicalWasteRecyclingDetail bizTechnologicalWasteRecyclingDetail);
-
-    /**
-     * 物理删除
-     * @param bizTechnologicalWasteRecyclingDetail
-     * @return 删除结果
-     */
-    public int physicalDelete(BizTechnologicalWasteRecyclingDetail bizTechnologicalWasteRecyclingDetail);
-
-}

+ 0 - 30
src/main/java/cn/ezhizao/project/business/service/IBizTechnologicalWasteRecyclingService.java

@@ -1,30 +0,0 @@
-package cn.ezhizao.project.business.service;
-
-import java.util.List;
-import com.baomidou.mybatisplus.extension.service.IService;
-import cn.ezhizao.project.business.domain.BizTechnologicalWasteRecycling;
-
-/**
- * 废品回用工艺Service接口
- *
- * @author ezhizao
- * @date 2024-04-17
- */
-public interface IBizTechnologicalWasteRecyclingService extends IService<BizTechnologicalWasteRecycling>
-{
-    /**
-     * 查询废品回用工艺列表
-     *
-     * @param bizTechnologicalWasteRecycling 废品回用工艺
-     * @return 废品回用工艺集合
-     */
-    public List<BizTechnologicalWasteRecycling> getList(BizTechnologicalWasteRecycling bizTechnologicalWasteRecycling);
-
-    /**
-     * 物理删除
-     * @param bizTechnologicalWasteRecycling
-     * @return 删除结果
-     */
-    public int physicalDelete(BizTechnologicalWasteRecycling bizTechnologicalWasteRecycling);
-
-}

+ 55 - 0
src/main/java/cn/ezhizao/project/business/service/impl/BizLotTechnologicalProcessServiceImpl.java

@@ -0,0 +1,55 @@
+package cn.ezhizao.project.business.service.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import cn.ezhizao.project.business.mapper.BizLotTechnologicalProcessMapper;
+import cn.ezhizao.project.business.domain.BizLotTechnologicalProcess;
+import cn.ezhizao.project.business.service.IBizLotTechnologicalProcessService;
+
+/**
+ * 修改后工艺Service业务层处理
+ *
+ * @author ezhizao
+ * @date 2024-04-07
+ */
+@Service
+public class BizLotTechnologicalProcessServiceImpl extends ServiceImpl<BizLotTechnologicalProcessMapper, BizLotTechnologicalProcess> implements IBizLotTechnologicalProcessService
+{
+    @Resource
+    private BizLotTechnologicalProcessMapper bizLotTechnologicalProcessMapper;
+
+    /**
+     * 查询修改后工艺列表
+     *
+     * @param bizLotTechnologicalProcess 修改后工艺
+     * @return 修改后工艺
+     */
+    @Override
+    public List<BizLotTechnologicalProcess> getList(BizLotTechnologicalProcess bizLotTechnologicalProcess)
+    {
+        return bizLotTechnologicalProcessMapper.getList(bizLotTechnologicalProcess);
+    }
+
+    /**
+     * 物理删除
+     * @param bizLotTechnologicalProcess
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizLotTechnologicalProcess bizLotTechnologicalProcess){ return bizLotTechnologicalProcessMapper.physicalDelete(bizLotTechnologicalProcess); }
+
+    @Override
+    public BizLotTechnologicalProcess getById(Long id) {
+        return bizLotTechnologicalProcessMapper.getById(id);
+    }
+
+    @Override
+    public List<BizLotTechnologicalProcess> selectUpdateList(Long lotId) {
+        return bizLotTechnologicalProcessMapper.selectUpdateList(lotId);
+    }
+
+
+}

+ 0 - 43
src/main/java/cn/ezhizao/project/business/service/impl/BizTechnologicalAmendDetailServiceImpl.java

@@ -1,43 +0,0 @@
-package cn.ezhizao.project.business.service.impl;
-
-import java.util.List;
-import javax.annotation.Resource;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-import cn.ezhizao.project.business.mapper.BizTechnologicalAmendDetailMapper;
-import cn.ezhizao.project.business.domain.BizTechnologicalAmendDetail;
-import cn.ezhizao.project.business.service.IBizTechnologicalAmendDetailService;
-
-/**
- * 工艺修改明细Service业务层处理
- *
- * @author ezhizao
- * @date 2024-04-07
- */
-@Service
-public class BizTechnologicalAmendDetailServiceImpl  extends ServiceImpl<BizTechnologicalAmendDetailMapper, BizTechnologicalAmendDetail> implements IBizTechnologicalAmendDetailService
-{
-    @Resource
-    private BizTechnologicalAmendDetailMapper bizTechnologicalAmendDetailMapper;
-
-    /**
-     * 查询工艺修改明细列表
-     *
-     * @param bizTechnologicalAmendDetail 工艺修改明细
-     * @return 工艺修改明细
-     */
-    @Override
-    public List<BizTechnologicalAmendDetail> getList(BizTechnologicalAmendDetail bizTechnologicalAmendDetail)
-    {
-        return bizTechnologicalAmendDetailMapper.getList(bizTechnologicalAmendDetail);
-    }
-
-    /**
-     * 物理删除
-     * @param bizTechnologicalAmendDetail
-     * @return 删除结果
-     */
-    @Override
-    public int physicalDelete(BizTechnologicalAmendDetail bizTechnologicalAmendDetail){ return bizTechnologicalAmendDetailMapper.physicalDelete(bizTechnologicalAmendDetail); };
-
-}

+ 0 - 56
src/main/java/cn/ezhizao/project/business/service/impl/BizTechnologicalAmendServiceImpl.java

@@ -1,56 +0,0 @@
-package cn.ezhizao.project.business.service.impl;
-
-import java.util.List;
-import javax.annotation.Resource;
-
-import cn.ezhizao.project.business.domain.BizTechnologicalAmendDetail;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-import cn.ezhizao.project.business.mapper.BizTechnologicalAmendMapper;
-import cn.ezhizao.project.business.domain.BizTechnologicalAmend;
-import cn.ezhizao.project.business.service.IBizTechnologicalAmendService;
-
-/**
- * 修改后工艺Service业务层处理
- *
- * @author ezhizao
- * @date 2024-04-07
- */
-@Service
-public class BizTechnologicalAmendServiceImpl  extends ServiceImpl<BizTechnologicalAmendMapper, BizTechnologicalAmend> implements IBizTechnologicalAmendService
-{
-    @Resource
-    private BizTechnologicalAmendMapper bizTechnologicalAmendMapper;
-
-    /**
-     * 查询修改后工艺列表
-     *
-     * @param bizTechnologicalAmend 修改后工艺
-     * @return 修改后工艺
-     */
-    @Override
-    public List<BizTechnologicalAmend> getList(BizTechnologicalAmend bizTechnologicalAmend)
-    {
-        return bizTechnologicalAmendMapper.getList(bizTechnologicalAmend);
-    }
-
-    /**
-     * 物理删除
-     * @param bizTechnologicalAmend
-     * @return 删除结果
-     */
-    @Override
-    public int physicalDelete(BizTechnologicalAmend bizTechnologicalAmend){ return bizTechnologicalAmendMapper.physicalDelete(bizTechnologicalAmend); }
-
-    @Override
-    public BizTechnologicalAmend getById(Long id) {
-        return bizTechnologicalAmendMapper.getById(id);
-    }
-
-    @Override
-    public List<BizTechnologicalAmend> selectUpdateList(Long lotId) {
-        return bizTechnologicalAmendMapper.selectUpdateList(lotId);
-    }
-
-
-}

+ 0 - 43
src/main/java/cn/ezhizao/project/business/service/impl/BizTechnologicalWasteRecyclingDetailServiceImpl.java

@@ -1,43 +0,0 @@
-package cn.ezhizao.project.business.service.impl;
-
-import java.util.List;
-import javax.annotation.Resource;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-import cn.ezhizao.project.business.mapper.BizTechnologicalWasteRecyclingDetailMapper;
-import cn.ezhizao.project.business.domain.BizTechnologicalWasteRecyclingDetail;
-import cn.ezhizao.project.business.service.IBizTechnologicalWasteRecyclingDetailService;
-
-/**
- * 废品回用工序详情Service业务层处理
- *
- * @author ezhizao
- * @date 2024-04-17
- */
-@Service
-public class BizTechnologicalWasteRecyclingDetailServiceImpl  extends ServiceImpl<BizTechnologicalWasteRecyclingDetailMapper, BizTechnologicalWasteRecyclingDetail> implements IBizTechnologicalWasteRecyclingDetailService
-{
-    @Resource
-    private BizTechnologicalWasteRecyclingDetailMapper bizTechnologicalWasteRecyclingDetailMapper;
-
-    /**
-     * 查询废品回用工序详情列表
-     *
-     * @param bizTechnologicalWasteRecyclingDetail 废品回用工序详情
-     * @return 废品回用工序详情
-     */
-    @Override
-    public List<BizTechnologicalWasteRecyclingDetail> getList(BizTechnologicalWasteRecyclingDetail bizTechnologicalWasteRecyclingDetail)
-    {
-        return bizTechnologicalWasteRecyclingDetailMapper.getList(bizTechnologicalWasteRecyclingDetail);
-    }
-
-    /**
-     * 物理删除
-     * @param bizTechnologicalWasteRecyclingDetail
-     * @return 删除结果
-     */
-    @Override
-    public int physicalDelete(BizTechnologicalWasteRecyclingDetail bizTechnologicalWasteRecyclingDetail){ return bizTechnologicalWasteRecyclingDetailMapper.physicalDelete(bizTechnologicalWasteRecyclingDetail); };
-
-}

+ 0 - 43
src/main/java/cn/ezhizao/project/business/service/impl/BizTechnologicalWasteRecyclingServiceImpl.java

@@ -1,43 +0,0 @@
-package cn.ezhizao.project.business.service.impl;
-
-import java.util.List;
-import javax.annotation.Resource;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-import cn.ezhizao.project.business.mapper.BizTechnologicalWasteRecyclingMapper;
-import cn.ezhizao.project.business.domain.BizTechnologicalWasteRecycling;
-import cn.ezhizao.project.business.service.IBizTechnologicalWasteRecyclingService;
-
-/**
- * 废品回用工艺Service业务层处理
- *
- * @author ezhizao
- * @date 2024-04-17
- */
-@Service
-public class BizTechnologicalWasteRecyclingServiceImpl  extends ServiceImpl<BizTechnologicalWasteRecyclingMapper, BizTechnologicalWasteRecycling> implements IBizTechnologicalWasteRecyclingService
-{
-    @Resource
-    private BizTechnologicalWasteRecyclingMapper bizTechnologicalWasteRecyclingMapper;
-
-    /**
-     * 查询废品回用工艺列表
-     *
-     * @param bizTechnologicalWasteRecycling 废品回用工艺
-     * @return 废品回用工艺
-     */
-    @Override
-    public List<BizTechnologicalWasteRecycling> getList(BizTechnologicalWasteRecycling bizTechnologicalWasteRecycling)
-    {
-        return bizTechnologicalWasteRecyclingMapper.getList(bizTechnologicalWasteRecycling);
-    }
-
-    /**
-     * 物理删除
-     * @param bizTechnologicalWasteRecycling
-     * @return 删除结果
-     */
-    @Override
-    public int physicalDelete(BizTechnologicalWasteRecycling bizTechnologicalWasteRecycling){ return bizTechnologicalWasteRecyclingMapper.physicalDelete(bizTechnologicalWasteRecycling); };
-
-}

+ 43 - 0
src/main/java/cn/ezhizao/project/business/service/impl/IBizLotLotTechnologicalProcessDetailServiceImpl.java

@@ -0,0 +1,43 @@
+package cn.ezhizao.project.business.service.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import cn.ezhizao.project.business.mapper.BizLotTechnologicalProcessDetailMapper;
+import cn.ezhizao.project.business.domain.BizLotTechnologicalProcessDetail;
+import cn.ezhizao.project.business.service.IBizLotTechnologicalProcessDetailService;
+
+/**
+ * 工艺修改明细Service业务层处理
+ *
+ * @author ezhizao
+ * @date 2024-04-07
+ */
+@Service
+public class IBizLotLotTechnologicalProcessDetailServiceImpl extends ServiceImpl<BizLotTechnologicalProcessDetailMapper, BizLotTechnologicalProcessDetail> implements IBizLotTechnologicalProcessDetailService
+{
+    @Resource
+    private BizLotTechnologicalProcessDetailMapper bizLotTechnologicalProcessDetailMapper;
+
+    /**
+     * 查询工艺修改明细列表
+     *
+     * @param bizLotTechnologicalProcessDetail 工艺修改明细
+     * @return 工艺修改明细
+     */
+    @Override
+    public List<BizLotTechnologicalProcessDetail> getList(BizLotTechnologicalProcessDetail bizLotTechnologicalProcessDetail)
+    {
+        return bizLotTechnologicalProcessDetailMapper.getList(bizLotTechnologicalProcessDetail);
+    }
+
+    /**
+     * 物理删除
+     * @param bizLotTechnologicalProcessDetail
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizLotTechnologicalProcessDetail bizLotTechnologicalProcessDetail){ return bizLotTechnologicalProcessDetailMapper.physicalDelete(bizLotTechnologicalProcessDetail); };
+
+}

+ 5 - 5
src/main/resources/mybatis/business/BizTechnologicalAmendDetailMapper.xml → src/main/resources/mybatis/business/BizLotTechnologicalProcessDetailMapper.xml

@@ -2,18 +2,18 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="cn.ezhizao.project.business.mapper.BizTechnologicalAmendDetailMapper">
+<mapper namespace="cn.ezhizao.project.business.mapper.BizLotTechnologicalProcessDetailMapper">
 
-    <resultMap type="cn.ezhizao.project.business.domain.BizTechnologicalAmendDetail" id="BizTechnologicalAmendDetailResult">
+    <resultMap type="cn.ezhizao.project.business.domain.BizLotTechnologicalProcessDetail" id="BizTechnologicalAmendDetailResult">
         <id column="id" property="id"/>
     </resultMap>
 
 
-    <select id="getList" parameterType="BizTechnologicalAmendDetail" resultMap="BizTechnologicalAmendDetailResult">
-        SELECT * FROM biz_technological_amend_detail
+    <select id="getList" parameterType="BizLotTechnologicalProcessDetail" resultMap="BizTechnologicalAmendDetailResult">
+        SELECT * FROM biz_lot_technological_process_detail
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
             deleted = 0
-            <if test="technologicalAmendId != null">AND technological_amend_id = #{technologicalAmendId}</if>
+            <if test="lotTechnologicalProcessId != null">AND lot_technological_process_id = #{lotTechnologicalProcessId}</if>
 
         </trim>
     </select>

+ 7 - 7
src/main/resources/mybatis/business/BizTechnologicalAmendMapper.xml → src/main/resources/mybatis/business/BizLotTechnologicalProcessMapper.xml

@@ -2,15 +2,15 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="cn.ezhizao.project.business.mapper.BizTechnologicalAmendMapper">
+<mapper namespace="cn.ezhizao.project.business.mapper.BizLotTechnologicalProcessMapper">
 
-    <resultMap type="cn.ezhizao.project.business.domain.BizTechnologicalAmend" id="BizTechnologicalAmendResult">
+    <resultMap type="cn.ezhizao.project.business.domain.BizLotTechnologicalProcess" id="BizTechnologicalAmendResult">
         <id column="id" property="id"/>
     </resultMap>
 
 
-    <select id="getList" parameterType="BizTechnologicalAmend" resultMap="BizTechnologicalAmendResult">
-        SELECT * FROM biz_technological_amend
+    <select id="getList" parameterType="BizLotTechnologicalProcess" resultMap="BizTechnologicalAmendResult">
+        SELECT * FROM biz_lot_technological_process
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
             deleted = 0
             AND is_stop = 0
@@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="getById" parameterType="Long" resultMap="BizTechnologicalAmendResult">
-        SELECT * FROM biz_technological_amend
+        SELECT * FROM biz_lot_technological_process
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
             <if test="id != null">
                 id = #{id} AND
@@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectUpdateList" parameterType="Long" resultMap="BizTechnologicalAmendResult">
-        SELECT * FROM biz_technological_amend
+        SELECT * FROM biz_lot_technological_process
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
             <if test="lotId != null">
                 lot_id = #{lotId} AND
@@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
     <delete id="physicalDelete">
-        DELETE FROM biz_technological_amend
+        DELETE FROM biz_lot_technological_process
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
             <if test="id != null">
                 id = #{id} AND

+ 0 - 37
src/main/resources/mybatis/business/BizTechnologicalWasteRecyclingDetailMapper.xml

@@ -1,37 +0,0 @@
-<?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="cn.ezhizao.project.business.mapper.BizTechnologicalWasteRecyclingDetailMapper">
-
-    <resultMap type="cn.ezhizao.project.business.domain.BizTechnologicalWasteRecyclingDetail" id="BizTechnologicalWasteRecyclingDetailResult">
-        <id column="id" property="id"/>
-    </resultMap>
-
-
-    <select id="getList" parameterType="BizTechnologicalWasteRecyclingDetail" resultMap="BizTechnologicalWasteRecyclingDetailResult">
-        SELECT * FROM biz_technological_waste_recycling_detail
-        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
-            deleted = 0
-            <if test="technologyVersion != null  and technologyVersion != ''"> AND technology_version = #{technologyVersion}</if>
-            <if test="productCode != null  and productCode != ''"> AND product_code = #{productCode}</if>
-            <if test="processStepNumber != null  and processStepNumber != ''"> AND process_step_number = #{processStepNumber}</if>
-            <if test="processKey != null  and processKey != ''"> AND process_key = #{processKey}</if>
-            <if test="processCode != null  and processCode != ''"> AND process_code = #{processCode}</if>
-            <if test="processAlias != null  and processAlias != ''"> AND process_alias = #{processAlias}</if>
-            <if test="productShaftCategory != null  and productShaftCategory != ''"> AND product_shaft_category = #{productShaftCategory}</if>
-            <if test="productShaftCategoryName != null  and productShaftCategoryName != ''"> AND product_shaft_category_name like concat('%', #{productShaftCategoryName}, '%')</if>
-            <if test="productDescription != null  and productDescription != ''"> AND product_description = #{productDescription}</if>
-        </trim>
-    </select>
-
-    <delete id="physicalDelete">
-        DELETE FROM biz_technological_waste_recycling_detail
-        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
-            <if test="id != null">
-                id = #{id} AND
-            </if>
-       <!-- 删除条件为其他外键可以在这里加 -->
-        </trim>
-    </delete>
-</mapper>

+ 0 - 36
src/main/resources/mybatis/business/BizTechnologicalWasteRecyclingMapper.xml

@@ -1,36 +0,0 @@
-<?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="cn.ezhizao.project.business.mapper.BizTechnologicalWasteRecyclingMapper">
-
-    <resultMap type="cn.ezhizao.project.business.domain.BizTechnologicalWasteRecycling" id="BizTechnologicalWasteRecyclingResult">
-        <id column="id" property="id"/>
-    </resultMap>
-
-
-    <select id="getList" parameterType="BizTechnologicalWasteRecycling" resultMap="BizTechnologicalWasteRecyclingResult">
-        SELECT * FROM biz_technological_waste_recycling
-        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
-            deleted = 0
-            <if test="lotCode != null  and lotCode != ''"> AND lot_code = #{lotCode}</if>
-            <if test="productCode != null  and productCode != ''"> AND product_code = #{productCode}</if>
-            <if test="technologyVersion != null  and technologyVersion != ''"> AND technology_version = #{technologyVersion}</if>
-            <if test="productDescription != null  and productDescription != ''"> AND product_description = #{productDescription}</if>
-            <if test="productShaftCategory != null  and productShaftCategory != ''"> AND product_shaft_category = #{productShaftCategory}</if>
-            <if test="productSpecification != null  and productSpecification != ''"> AND product_specification = #{productSpecification}</if>
-            <if test="productShaftCategoryName != null  and productShaftCategoryName != ''"> AND product_shaft_category_name like concat('%', #{productShaftCategoryName}, '%')</if>
-            <if test="productDrawingNumber != null  and productDrawingNumber != ''"> AND product_drawing_number = #{productDrawingNumber}</if>
-        </trim>
-    </select>
-
-    <delete id="physicalDelete">
-        DELETE FROM biz_technological_waste_recycling
-        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
-            <if test="id != null">
-                id = #{id} AND
-            </if>
-       <!-- 删除条件为其他外键可以在这里加 -->
-        </trim>
-    </delete>
-</mapper>