From d7d9e26badcd163d27a8d9ee3727eb28369029b3 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854> Date: Sat, 13 May 2023 17:41:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96-mock=E6=95=B0=E6=8D=AE=20=205.13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IZyProductPlanAutoServiceImpl.java | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/IZyProductPlanAutoServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/IZyProductPlanAutoServiceImpl.java index 288ace06..39def1dd 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/IZyProductPlanAutoServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/IZyProductPlanAutoServiceImpl.java @@ -204,7 +204,7 @@ public class IZyProductPlanAutoServiceImpl extends ServiceImpl() .eq(SysDepart::getOrgCategory, "2") - .eq(SysDepart::getDepartName, "测试生产企业")); + .eq(SysDepart::getDepartName, "黄淮生产车间")); if (ObjectUtils.isEmpty(sysDepart)) throw new JeecgBootException("生产计划自动化-mock-[企业信息]数据异常!"); @@ -215,7 +215,7 @@ public class IZyProductPlanAutoServiceImpl extends ServiceImpl sysUserList = iSysUserService.getUserByDepIds(sysDepartIds, null); //车间负责人 zyProductPlan.setResponsiblePerson(sysUserList.get(0).getUsername()); - Groupx groupx = iGroupxService.getOne(new LambdaQueryWrapper().eq(Groupx::getDepartId, sysDepart.getId()).eq(Groupx::getGroupName, "测试班组")); + Groupx groupx = iGroupxService.getOne(new LambdaQueryWrapper().eq(Groupx::getDepartId, sysDepart.getId()).eq(Groupx::getGroupName, "生产一组")); if (ObjectUtils.isEmpty(groupx)) throw new JeecgBootException("生产计划自动化-mock-[班组]数据异常!"); //班组 zyProductPlan.setTeamId(groupx.getId()); @@ -284,9 +284,10 @@ public class IZyProductPlanAutoServiceImpl extends ServiceImpl productPlanList = this.saveProductPlan(workOrderList); //TODO -// List productPlanList = this.saveProductPlan4Mock(workOrderList); +// List productPlanList = this.saveProductPlan(workOrderList); + //TODO + List productPlanList = this.saveProductPlan4Mock(workOrderList); if (ObjectUtils.isEmpty(productPlanList)) return Collections.EMPTY_LIST; //3,同步计划生产工序、同步生产计划工序面料、同步生产计划辅料 @@ -302,21 +303,21 @@ public class IZyProductPlanAutoServiceImpl extends ServiceImpl>> returnList = new LinkedList<>(); productPlanList.stream().forEach(k -> { //TODO 数据不完整,测试时注释 -// boolean b = this.filling4Auto(k.getId()); -// if (b) { - List planProcessList = zyPlanProcessService.list(new LambdaQueryWrapper().eq(ZyPlanProcess::getPlanId, k.getId())); - Optional.ofNullable(planProcessList).orElse(new LinkedList<>()).forEach(e -> { - // 5,生成物料单 - zyPlanProcessService.createMaterialBill(e); - // 5,发送到仓库 - zyPlanProcessService.sendToRepository(e); - }); - -// } - Map> map = new HashMap<>(); - map.put(k.getProductCode(), planProcessList); - //测试需要返回生产计划工序 - returnList.add(map); + boolean b = this.filling4Auto(k.getId()); + if (b) { + List planProcessList = zyPlanProcessService.list(new LambdaQueryWrapper().eq(ZyPlanProcess::getPlanId, k.getId())); + Optional.ofNullable(planProcessList).orElse(new LinkedList<>()).forEach(e -> { + // 5,生成物料单 + zyPlanProcessService.createMaterialBill(e); + // 5,发送到仓库 + zyPlanProcessService.sendToRepository(e); + }); + + Map> map = new HashMap<>(); + map.put(k.getProductCode(), planProcessList); + //测试需要返回生产计划工序 + returnList.add(map); + } }); return returnList; }