From 7df5c8cfececb084872bdfe85d4c7e9da4e2ff55 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854> Date: Mon, 30 Jan 2023 17:55:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=B7=A5=E5=BA=8F=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=E7=94=9F=E6=88=90=E7=89=A9=E6=96=99=E5=8D=95?= =?UTF-8?q?=E3=80=81=E8=87=AA=E5=8A=A8=E6=8E=92=E4=BD=8D=201.30?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/mixins/JeecgListMixin.js | 1 + .../views/productplan/ProductplanManage.vue | 21 +- .../productplan/ZyPlanWuLiaoDataDetail.vue | 291 ++++++++++++++++++ .../modules/ZyClothsStyleListDetail.vue | 38 --- .../controller/ZyPlanProcessController.java | 8 + .../productplan/entity/ZyPlanAccessories.java | 5 + .../productplan/entity/ZyPlanFabric.java | 4 + .../service/IZyPlanProcessService.java | 1 + .../impl/ZyPlanProcessServiceImpl.java | 44 ++- 9 files changed, 366 insertions(+), 47 deletions(-) create mode 100644 ant-design-vue-jeecg/src/views/productplan/ZyPlanWuLiaoDataDetail.vue diff --git a/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js b/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js index 79a3249f..9a5ac3cd 100644 --- a/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js +++ b/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js @@ -374,6 +374,7 @@ export const JeecgListMixin = { if(!fileName || typeof fileName != "string"){ fileName = "导出文件" } + debugger; let param = this.getQueryParams(); if(this.selectedRowKeys && this.selectedRowKeys.length>0){ param['selections'] = this.selectedRowKeys.join(",") diff --git a/ant-design-vue-jeecg/src/views/productplan/ProductplanManage.vue b/ant-design-vue-jeecg/src/views/productplan/ProductplanManage.vue index 3e66ef30..da687141 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ProductplanManage.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ProductplanManage.vue @@ -51,9 +51,9 @@ 自动排位 生成物料单 - 查看物料单(计划面料&计划辅料) + 查看物料单 - 发送到仓库 + 发送到仓库 导出 返回 @@ -351,9 +351,20 @@ export default { }, //查看物料单 - viewMaterialBill(props) { - // alert("deatil row id:"+props.row.id); - this.$refs.zyPlanProcessDataDetail.showModal(props.row.id) + viewMaterialBill() { + // alert("deatil this.planId:"+this.planId); + // this.$refs.zyPlanProcessDataDetail.showModal(this.planId) + this.$router.push({ + path: '/productplan/ZyPlanWuLiaoDataDetail', + query: { // 路由携带参数 + 'planId': this.planId, + }, + }); + }, + + //发送到仓库 + sendToRepository(){ + }, //加载传递参数 diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanWuLiaoDataDetail.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanWuLiaoDataDetail.vue new file mode 100644 index 00000000..7fd1dc3b --- /dev/null +++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanWuLiaoDataDetail.vue @@ -0,0 +1,291 @@ + + + + diff --git a/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleListDetail.vue b/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleListDetail.vue index d88b9f72..e305d82c 100644 --- a/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleListDetail.vue +++ b/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleListDetail.vue @@ -8,44 +8,6 @@ :width='1000' @ok="handleOk" @cancel="handleCancel"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

款式详情

getWuLiaoDetail(ZyPlanProcess zyPlanProcess, + HttpServletRequest req) { + Map map = zyPlanProcessService.getWuLiaoDetail(zyPlanProcess); + return Result.OK(map); + } + @ApiOperation(value = "读取工序", notes = "读取工序") @GetMapping(value = "/syncProductProcess") public Result syncProductProcess(ZyPlanProcess zyPlanProcess, diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanAccessories.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanAccessories.java index 9435045e..f828a94b 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanAccessories.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanAccessories.java @@ -75,6 +75,11 @@ public class ZyPlanAccessories implements Serializable { @ApiModelProperty(value = "辅料id") @Dict(dictTable = "zy_accessories", dicText = "contents", dicCode = "id") private String accessoriesId; + + @Excel(name = "辅料名称", width = 15) + @ApiModelProperty(value = "辅料名称") + private String accessoriesName; + /** * 用量(合计) */ diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanFabric.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanFabric.java index cc008a9f..e8079bc9 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanFabric.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanFabric.java @@ -76,6 +76,10 @@ public class ZyPlanFabric implements Serializable { @ApiModelProperty(value = "面料id") @Dict(dictTable = "zy_fabric", dicText = "name", dicCode = "id") private String fabricId; + + @Excel(name = "面料名称", width = 15) + @ApiModelProperty(value = "面料名称") + private String fabricName; /** * 用量(合计) */ diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessService.java index 80aea3a9..aaf98675 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessService.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessService.java @@ -27,4 +27,5 @@ public interface IZyPlanProcessService extends IService { void createMaterialBill(ZyPlanProcess zyPlanProcess); + Map getWuLiaoDetail(ZyPlanProcess zyPlanProcess); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java index 1500aefe..90aa62d7 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java @@ -234,12 +234,12 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl planProcessList = this.list(new LambdaQueryWrapper().eq(ZyPlanProcess::getPlanId, zyPlanProcess.getPlanId())); - if(ObjectUtils.isEmpty(planProcessList)) return; + if (ObjectUtils.isEmpty(planProcessList)) return; this.delBillData(zyPlanProcess); List idList = planProcessList.stream().map(ZyPlanProcess::getId).collect(Collectors.toList()); QueryWrapper qw = new QueryWrapper(); - qw.select("fabric_id", "sum(amount) as count"); + qw.select("fabric_id", "fabric_name", "sum(amount) as count"); qw.in("plan_process_id", idList); qw.groupBy("fabric_id"); List> maplist = zyPlanProcessFabricMapper.selectMaps(qw); @@ -248,13 +248,14 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl> maplist2 = zyPlanProcessAccessoriesMapper.selectMaps(qw2); @@ -263,6 +264,7 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl stationList, List machineList) { if (!ObjectUtils.isEmpty(machineList)) { List machineList1 = machineList.stream().map(ZyProcessMachine::getMachineId).collect(Collectors.toList()); @@ -505,12 +508,45 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl getWuLiaoDetail(ZyPlanProcess zyPlanProcess) { + String planId = zyPlanProcess.getPlanId(); + ZyProductPlan zyProductPlan = iZyProductPlanService.getById(planId); + if (ObjectUtils.isEmpty(zyProductPlan)) { + throw new JeecgBootException("生产计划不存在!"); + } + + List planProcessList = this.list(new LambdaQueryWrapper() + .eq(ZyPlanProcess::getPlanId, zyPlanProcess.getPlanId())); + + List ids = Optional.ofNullable(planProcessList).orElse(new LinkedList<>()) + .stream().map(ZyPlanProcess::getId).collect(Collectors.toList()); + + Map result = new HashMap<>(); + List fabricList = iZyPlanFabricService.list(new LambdaQueryWrapper() + .eq(ZyPlanFabric::getPlanId, zyPlanProcess.getPlanId())); + result.put("fabricList", fabricList); + + List accessoriesList = iZyPlanAccessoriesService.list(new LambdaQueryWrapper() + .eq(ZyPlanAccessories::getPlanId, zyPlanProcess.getPlanId())); + result.put("accessoriesList", accessoriesList); + + List processFabricList = iZyPlanProcessFabricService.list(new LambdaQueryWrapper() + .in(ZyPlanProcessFabric::getPlanProcessId, ids)); + result.put("processFabricList", processFabricList); + + List processAccessoriesList = iZyPlanProcessAccessoriesService.list(new LambdaQueryWrapper() + .in(ZyPlanProcessAccessories::getPlanProcessId, ids)); + result.put("processAccessoriesList", processAccessoriesList); + return result; + } + @Override public List getTeamDatalist(ZyPlanProcess zyPlanProcess) { //生产计划id String planId = zyPlanProcess.getPlanId(); ZyProductPlan zyProductPlan = iZyProductPlanService.getById(planId); - if (ObjectUtils.isEmpty(zyPlanProcess)) { + if (ObjectUtils.isEmpty(zyProductPlan)) { throw new JeecgBootException("生产计划不存在!"); } //工单id