From ee30cbd2995ff27cbd311b25118b7a8a5c7de103 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854> Date: Sat, 17 Dec 2022 11:23:32 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=AE=A1=E5=88=92=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=2012.17?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productplan/ZyPlanProcessDataList.vue | 226 ++++++++++++------ .../views/productplan/ZyPlanProcessList.vue | 11 +- .../controller/ZyPlanProcessController.java | 8 +- .../impl/ZyPlanProcessServiceImpl.java | 9 +- 4 files changed, 169 insertions(+), 85 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue index 5f1a6293..8e00eb7a 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue @@ -10,36 +10,36 @@ -
- 新增 - 导出 - - - - - - - - - - - 删除 - - - 批量操作 - - - -
+ + + + + + + + + + + + + + + + + + + + + +
-
- 已选择 {{ selectedRowKeys.length }}项 - 清空 -
+ + + + + 编辑--> - + 删除 - - 制定计划详情 + +
- + @@ -85,6 +85,8 @@ import '@/assets/less/TableExpand.less' import {mixinDevice} from '@/utils/mixin' import {JeecgListMixin} from '@/mixins/JeecgListMixin' import ZyPlanProcessModal from './modules/ZyPlanProcessModal2' +import {getAction} from "@api/manage"; +import {filterObj} from "@/utils/util"; export default { name: 'ZyPlanProcessList', @@ -94,7 +96,7 @@ export default { }, data() { return { - description: '计划工序制定数据列表', + description: '生产计划工序管理页面', // 表头 columns: [ { @@ -108,34 +110,48 @@ export default { } }, { - title: '生产计划id', + title: '计划id', align: "center", dataIndex: 'planId' }, { - title: '车间名称', + title: '工单编号', align: "center", - dataIndex: 'teamName' + dataIndex: 'workOrderId' }, { - title: '工单编号', + title: '产品id', + align: "center", + dataIndex: 'productId' + }, { + title: '车间', align: "center", - dataIndex: 'productCode' + dataIndex: 'departId' }, { - title: '产品名称', + title: '工序id', align: "center", - dataIndex: 'productCode2' + dataIndex: 'productProcessId' }, { - title:'工序名称', - align:"center", - dataIndex: 'processId_dictText' + title: '工位list', + align: "center", + dataIndex: 'stationList.stationName' + }, + { + title: '工具id列表', + align: "center", + dataIndex: 'toolsIds' + }, + { + title: '工序id列表', + align: "center", + dataIndex: 'processIds' }, { - title:'序号', - align:"center", - dataIndex: 'number' + title: '成员id列表', + align: "center", + dataIndex: 'userIds' }, { title: '操作', @@ -147,20 +163,25 @@ export default { } ], url: { - list: "/org.jeecg.modules.productplan/zyPlanProcess/list", - productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list", + list: "/org.jeecg.modules.productplan/zyPlanProcess/getProcessDatalist", + // productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list", delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete", - deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch", - exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls", - importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/importExcel", - + // deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch", + // exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls", + // importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/importExcel", }, + loadRouteType: false, + planId: "", dictOptions: {}, superFieldList: [], } }, + // mounted() { + // this.loadData() + // }, created() { this.getSuperFieldList(); + // this.loadParameter(); }, computed: { importExcelUrl: function () { @@ -168,8 +189,66 @@ export default { }, }, methods: { - initDictConfig() { + // valueChange(value) { + // if (value) this.loadData() + // }, + //加载传递参数 + loadParameter() { + if (this.loadRouteType === false) { + this.planId = this.$route.query.planId; + // this.biaoTi = this.$route.query.styleNames+"款式面料管理"; + console.log("*******传递的planId:" + this.planId) + this.loadRouteType = true; + } + }, + loadData(arg) { + if (!this.url.list) { + this.$message.error("请设置url.list属性!") + return + } + //加载数据 若传入参数1则加载第一页的内容 + if (arg === 1) { + this.ipagination.current = 1; + } + this.loadParameter(); + var params = this.getQueryParams();//查询条件 + this.loading = true; + console.log("----------------the params:", params); + getAction(this.url.list, params).then((res) => { + if (res.success) { + this.dataSource = res.result.records || res.result; + if (res.result.total) { + this.ipagination.total = res.result.total; + } else { + this.ipagination.total = 0; + } + } else { + this.$message.warning(res.message) + } + }).finally(() => { + // this.dataSource.forEach(item => { + // item['stationName'] = this.stationName; + // item['stationNum'] = this.stationNum; + // }) + this.loading = false + }) + }, + getQueryParams() { + //获取查询条件 + let sqp = {} + if (this.superQueryParams) { + sqp['superQueryParams'] = encodeURI(this.superQueryParams) + sqp['superQueryMatchType'] = this.superQueryMatchType + } + var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters); + param.field = this.getQueryField(); + param.pageNo = this.ipagination.current; + param.pageSize = this.ipagination.pageSize; + param.planId = this.planId; + return filterObj(param); }, + // initDictConfig() { + // }, getSuperFieldList() { let fieldList = []; fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''}) @@ -180,16 +259,17 @@ export default { fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''}) this.superFieldList = fieldList }, - jumpPage1(record) { - this.$router.push({ - path: '/productplan/ZyProductPlanList', - - // query: { // 路由携带参数 - // 'stationId': record.id, - // 'stationName': record.stationName, - // }, - }); - }, + // jumpPage1(record) { + // this.$router.push({ + // // path: '/productplan/ZyProductPlanList', + // path: '/productplan/ZyPlanProcessDataList', + // + // // query: { // 路由携带参数 + // // 'stationId': record.id, + // // 'stationName': record.stationName, + // // }, + // }); + // }, // pf(record) { // this.$router.push({ // path: '/productplan/ZyPlanProcessAddList', @@ -197,17 +277,17 @@ export default { // } // }); - // getAction("productPlanlist", {id: record.id}).then((res) => { - // if (res.success) { - // this.$router.push({ - // path: '/src/views/processassessment/assessmentCourse/ClassOpeningTaskList', - // query: { // 路由携带参数 - // } - // }); - // } else { - // this.$message.error(res.message) - // } - // }); + // getAction("productPlanlist", {id: record.id}).then((res) => { + // if (res.success) { + // this.$router.push({ + // path: '/src/views/processassessment/assessmentCourse/ClassOpeningTaskList', + // query: { // 路由携带参数 + // } + // }); + // } else { + // this.$message.error(res.message) + // } + // }); // }, } } diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue index f63c30b1..18569ec4 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue @@ -181,12 +181,11 @@ export default { }, jumpPage1(record) { this.$router.push({ - path: '/productplan/ZyProductPlanList', - - // query: { // 路由携带参数 - // 'stationId': record.id, - // 'stationName': record.stationName, - // }, + path: '/productplan/ZyPlanProcessDataList', + query: { // 路由携带参数 + 'planId': record.planId, + // 'stationName': record.stationName, + }, }); }, // pf(record) { diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java index 1340be1d..66741e14 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java @@ -3,6 +3,7 @@ package org.jeecg.modules.productplan.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.metadata.PageList; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -68,9 +69,10 @@ public class ZyPlanProcessController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap()); Page page = new Page(pageNo, pageSize); -// IPage pageList = zyPlanProcessService.getProcessDatalist(page, queryWrapper); - List pageList = zyPlanProcessService.getProcessDatalist(zyPlanProcess); - return Result.OK(pageList); + List processDatalist = zyPlanProcessService.getProcessDatalist(zyPlanProcess); + PageList processDataVos = new PageList<>(processDatalist, processDatalist.size()); + + return Result.OK(processDatalist); } /** 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 5af4f5c4..e1295ef4 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 @@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; +import java.util.LinkedList; import java.util.List; import java.util.Optional; @@ -47,9 +48,10 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl result = new LinkedList<>(); //根据产品id获取产品工序列表 - List productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper().eq(ZyProductProcess::getProductId, "产品id")); +// List productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper().eq(ZyProductProcess::getProductId, "产品id")); + List productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper().eq(ZyProductProcess::getProductId, "1")); Optional.ofNullable(productProcessesList).orElse(new ArrayList<>()).forEach(e -> { ProcessDataVo vo = new ProcessDataVo(); vo.setProductProcessId(e.getProcessId()); @@ -57,8 +59,9 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl().eq(Station::getDepartId, departId))); + result.add(vo); }); - return null; + return result; } } From 80bcfca71190638ce1a540aa16847bd88b157029 Mon Sep 17 00:00:00 2001 From: shenyuan Date: Sat, 17 Dec 2022 11:56:46 +0800 Subject: [PATCH 2/5] 1 --- .../src/views/productplan/ZyPlanProcessDataList.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue index 8e00eb7a..6d1601cb 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue @@ -54,7 +54,13 @@ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" class="j-table-force-nowrap" @change="handleTableChange"> - + + + + {{item.stationName}} + + + @@ -136,7 +142,8 @@ export default { { title: '工位list', align: "center", - dataIndex: 'stationList.stationName' + dataIndex: 'stationList', + scopedSlots: {customRender: 'stationList'} }, { title: '工具id列表', From 4ff41ec6366ebef335053f85a4568a1a44027d1b Mon Sep 17 00:00:00 2001 From: zhc077 <565291854> Date: Sat, 17 Dec 2022 15:40:36 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=B7=A5=E5=BA=8F?= =?UTF-8?q?=E7=AE=A1=E7=90=86=2012.17?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productplan/ZyPlanProcessDataList.vue | 126 ++++++++++++------ .../productplan/entity/vo/ProcessDataVo.java | 15 ++- .../impl/ZyPlanProcessServiceImpl.java | 40 ++++-- 3 files changed, 125 insertions(+), 56 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue index 6d1601cb..f17cd089 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue @@ -32,6 +32,12 @@ +
+ + + 导出 + 返回 +
@@ -55,32 +61,35 @@ class="j-table-force-nowrap" @change="handleTableChange"> - - - {{item.stationName}} + + + {{ item.stationName }} - - - - - - - - - - - - 删除 - - - + + + + + {{ item.name }} + + + + + + {{ item.name }} + + +
+
+ 提交 +
+ @@ -115,11 +124,11 @@ export default { return parseInt(index) + 1; } }, - { - title: '计划id', - align: "center", - dataIndex: 'planId' - }, + // { + // title: '计划id', + // align: "center", + // dataIndex: 'planId' + // }, { title: '工单编号', align: "center", @@ -129,36 +138,43 @@ export default { title: '产品id', align: "center", dataIndex: 'productId' - }, { - title: '车间', + }, + { + title: '产品', align: "center", - dataIndex: 'departId' + dataIndex: 'productName' }, { - title: '工序id', + title: '车间', align: "center", - dataIndex: 'productProcessId' + dataIndex: 'departName' }, { - title: '工位list', + title: '工序', align: "center", - dataIndex: 'stationList', - scopedSlots: {customRender: 'stationList'} + dataIndex: 'processName' }, { - title: '工具id列表', + title: '工位列表', align: "center", - dataIndex: 'toolsIds' + dataIndex: 'stationList', + width: 150, + scopedSlots: {customRender: 'stationList'} }, { - title: '工序id列表', + title: '工位工具列表', align: "center", - dataIndex: 'processIds' + dataIndex: 'toolsList', + width: 150, + scopedSlots: {customRender: 'toolsList'} + // scopedSlots: {customRender: this.toolsList} }, { - title: '成员id列表', + title: '工具设备列表', align: "center", - dataIndex: 'userIds' + dataIndex: 'machineList', + width: 150, + scopedSlots: {customRender: 'machineList'} }, { title: '操作', @@ -171,6 +187,8 @@ export default { ], url: { list: "/org.jeecg.modules.productplan/zyPlanProcess/getProcessDatalist", + stationToolslist: "/stationTool/list", + stationMachinelist: "/stationMachine/list", // productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list", delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete", // deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch", @@ -181,14 +199,12 @@ export default { planId: "", dictOptions: {}, superFieldList: [], + toolsList: [], + machineList: [], } }, - // mounted() { - // this.loadData() - // }, created() { this.getSuperFieldList(); - // this.loadParameter(); }, computed: { importExcelUrl: function () { @@ -196,9 +212,31 @@ export default { }, }, methods: { - // valueChange(value) { - // if (value) this.loadData() - // }, + fanHui() { + this.$router.push({ + path: '/productplan/ZyPlanProcessList', + }); + }, + getToolAndMachine(stationId) { + // alert("stationId=" + stationId); + getAction(this.url.stationToolslist, {"stationId": stationId}).then((res) => { + if (res.success) { + this.toolsList = res.result.records || res.result; + console.log("toolsList", JSON.stringify(this.toolsList)) + } else { + this.$message.warning(res.message) + } + }); + + getAction(this.url.stationMachinelist, {"stationId": stationId}).then((res) => { + if (res.success) { + this.machineList = res.result.records || res.result; + console.log("machineList", JSON.stringify(this.toolsList)) + } else { + this.$message.warning(res.message) + } + }); + }, //加载传递参数 loadParameter() { if (this.loadRouteType === false) { diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/vo/ProcessDataVo.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/vo/ProcessDataVo.java index d0dfb54b..596a69f1 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/vo/ProcessDataVo.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/vo/ProcessDataVo.java @@ -1,27 +1,38 @@ package org.jeecg.modules.productplan.entity.vo; import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; import org.jeecg.common.aspect.annotation.Dict; import org.jeecg.modules.team.entity.Station; +import java.io.Serializable; import java.util.List; @Data -public class ProcessDataVo { +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +public class ProcessDataVo implements Serializable { + + private static final long serialVersionUID = 1009888L; //工单id private String workOrderId; //产品id private String productId; + private String productName; //车间 +// @Dict(dictTable ="sys_depart",dicText = "depart_name",dicCode = "id") private String departId; + private String departName; //工位 private List stationList; -// @Dict("") //产品工序id +// @Dict(dictTable ="zy_process",dicText = "process_name",dicCode = "id") private String productProcessId; + private String processName; } 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 e1295ef4..629a3792 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 @@ -4,6 +4,8 @@ package org.jeecg.modules.productplan.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import io.swagger.annotations.Authorization; +import org.jeecg.common.exception.JeecgBootException; +import org.jeecg.modules.demo.base.service.IZyProcessService; import org.jeecg.modules.product.zyproductprocess.entity.ZyProductProcess; import org.jeecg.modules.product.zyproductprocess.service.IZyProductProcessService; import org.jeecg.modules.productplan.entity.ZyPlanProcess; @@ -12,10 +14,13 @@ import org.jeecg.modules.productplan.entity.vo.ProcessDataVo; import org.jeecg.modules.productplan.mapper.ZyPlanProcessMapper; import org.jeecg.modules.productplan.service.IZyPlanProcessService; import org.jeecg.modules.productplan.service.IZyProductPlanService; +import org.jeecg.modules.system.entity.SysDepart; +import org.jeecg.modules.system.service.ISysDepartService; import org.jeecg.modules.team.entity.Station; import org.jeecg.modules.team.service.IStationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.ObjectUtils; import java.util.ArrayList; import java.util.LinkedList; @@ -39,11 +44,20 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl getProcessDatalist(ZyPlanProcess zyPlanProcess) { //生产计划id String planId = zyPlanProcess.getPlanId(); ZyProductPlan zyProductPlan = iZyProductPlanService.getById(planId); + if (ObjectUtils.isEmpty(zyPlanProcess)) { + throw new JeecgBootException("生产计划不存在!"); + + } //工单id String productCode = zyProductPlan.getProductCode(); String departId = zyProductPlan.getWorkshopId(); @@ -52,16 +66,22 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper().eq(ZyProductProcess::getProductId, "产品id")); List productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper().eq(ZyProductProcess::getProductId, "1")); - Optional.ofNullable(productProcessesList).orElse(new ArrayList<>()).forEach(e -> { - ProcessDataVo vo = new ProcessDataVo(); - vo.setProductProcessId(e.getProcessId()); - vo.setProductId(e.getProductId()); - vo.setWorkOrderId(productCode); - vo.setDepartId(departId); - vo.setStationList(iStationService.list(new LambdaQueryWrapper().eq(Station::getDepartId, departId))); - result.add(vo); - }); - + if (!ObjectUtils.isEmpty(productProcessesList)) { + SysDepart depart = iSysDepartService.getById(departId); + List stationList = iStationService.list(new LambdaQueryWrapper().eq(Station::getDepartId, departId)); + productProcessesList.forEach(e -> { + ProcessDataVo vo = new ProcessDataVo(); + vo.setProductProcessId(e.getProcessId()); + vo.setProcessName(iZyProcessService.getById(e.getProcessId()).getProcessName()); + vo.setProductId(e.getProductId()); +// vo.setProductName("产品名称") + vo.setWorkOrderId(productCode); + vo.setDepartId(departId); + vo.setDepartName(depart.getDepartName()); + vo.setStationList(stationList); + result.add(vo); + }); + } return result; } } From 520ce4fb7b3e830e3b6edd41dece1ad46d78cfdb Mon Sep 17 00:00:00 2001 From: zhc077 <565291854> Date: Sat, 17 Dec 2022 17:06:50 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92-?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=2012.16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/productplan/ZyPlanProcessList.vue | 108 ++++++++++++------ .../controller/ZyPlanProcessController.java | 44 ++++++- .../productplan/entity/ZyPlanProcess.java | 18 ++- .../impl/ZyPlanProcessServiceImpl.java | 1 - 4 files changed, 127 insertions(+), 44 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue index 18569ec4..02a75a6b 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue @@ -55,16 +55,51 @@ class="j-table-force-nowrap" @change="handleTableChange"> - - - - - + + + + {{ text }} + + + + + + {{ text }} + + + + + + + {{ text }} + + + + + + + {{ text }} + + + + + + + {{ text }} + + + - - - - 删除 @@ -108,33 +143,39 @@ export default { } }, { - title: '生产计划id', + title: '生产计划', align: "center", dataIndex: 'planId' - }, { - title: '工位id', + }, + { + title: '工序', align: "center", - dataIndex: 'stationId' + dataIndex: 'processId_dictText', + scopedSlots: {customRender: 'stationId_dictText'} }, { - title: '设备id列表', + title: '工位', align: "center", - dataIndex: 'machineIds' + dataIndex: 'stationId_dictText', + scopedSlots: {customRender: 'stationId_dictText'} }, { - title: '工具id列表', + title: '设备', align: "center", - dataIndex: 'toolsIds' + dataIndex: 'machineIds_dictText', + scopedSlots: {customRender: 'machineIds_dictText'} }, { - title: '工序id列表', + title: '工具', align: "center", - dataIndex: 'processIds' + dataIndex: 'toolsIds_dictText', + scopedSlots: {customRender: 'toolsIds_dictText'} }, { - title: '成员id列表', + title: '成员', align: "center", - dataIndex: 'userIds' + dataIndex: 'userIds', + scopedSlots: {customRender: 'userIds'} }, { title: '操作', @@ -146,7 +187,8 @@ export default { } ], url: { - list: "/org.jeecg.modules.productplan/zyPlanProcess/list", + // list: "/org.jeecg.modules.productplan/zyPlanProcess/list", + list: "/org.jeecg.modules.productplan/zyPlanProcess/list2", productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list", delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete", deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch", @@ -195,17 +237,17 @@ export default { // } // }); - // getAction("productPlanlist", {id: record.id}).then((res) => { - // if (res.success) { - // this.$router.push({ - // path: '/src/views/processassessment/assessmentCourse/ClassOpeningTaskList', - // query: { // 路由携带参数 - // } - // }); - // } else { - // this.$message.error(res.message) - // } - // }); + // getAction("productPlanlist", {id: record.id}).then((res) => { + // if (res.success) { + // this.$router.push({ + // path: '/src/views/processassessment/assessmentCourse/ClassOpeningTaskList', + // query: { // 路由携带参数 + // } + // }); + // } else { + // this.$message.error(res.message) + // } + // }); // }, } } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java index 66741e14..b26835f3 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java @@ -16,6 +16,7 @@ import org.jeecg.modules.productplan.entity.ZyPlanProcess; import org.jeecg.modules.productplan.entity.vo.ProcessDataVo; import org.jeecg.modules.productplan.service.IZyPlanProcessService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.ObjectUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; @@ -48,7 +49,7 @@ public class ZyPlanProcessController extends JeecgController queryPageList(ZyPlanProcess zyPlanProcess, @@ -61,12 +62,47 @@ public class ZyPlanProcessController extends JeecgController queryPageList2(ZyPlanProcess zyPlanProcess, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = zyPlanProcessService.page(page, queryWrapper); + if (!ObjectUtils.isEmpty(pageList)) { + String processIdList = ""; + String stationIdList = ""; + String machineIdList = ""; + String toolsIdList = ""; + String userIdList = ""; + List records = pageList.getRecords(); + for (ZyPlanProcess e : records) { + processIdList += e.getProcessId(); + stationIdList += e.getStationId(); + machineIdList += e.getMachineIds(); + toolsIdList += e.getToolsIds(); + userIdList += e.getUserIds(); + } + for (ZyPlanProcess e : records) { + e.setProcessId(processIdList); + e.setStationId(stationIdList); + e.setMachineIds(machineIdList); + e.setToolsIds(toolsIdList); + e.setUserIds(userIdList); + } + } + return Result.OK(pageList); + } + @ApiOperation(value = "生产计划工序-查询产品工序&计划", notes = "生产计划工序-查询产品工序&计划") @GetMapping(value = "/getProcessDatalist") public Result getProcessDatalist(ZyPlanProcess zyPlanProcess, - @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, - HttpServletRequest req) { + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap()); Page page = new Page(pageNo, pageSize); List processDatalist = zyPlanProcessService.getProcessDatalist(zyPlanProcess); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanProcess.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanProcess.java index 36cd67d0..ae3b5c27 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanProcess.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanProcess.java @@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; import org.jeecgframework.poi.excel.annotation.Excel; import org.springframework.format.annotation.DateTimeFormat; @@ -66,34 +67,39 @@ public class ZyPlanProcess implements Serializable { @Excel(name = "生产计划id", width = 15) @ApiModelProperty(value = "生产计划id") private String planId; + /** + * 工序id列表 + */ + @Excel(name = "工序id", width = 15) + @ApiModelProperty(value = "工序id列表") + @Dict(dictTable = "zy_process",dicText = "process_name",dicCode = "id") + private String processId; /** * 工位id */ @Excel(name = "工位id", width = 15) @ApiModelProperty(value = "工位id") + @Dict(dictTable = "station",dicText = "station_name",dicCode = "id") private String stationId; /** * 设备id列表 */ @Excel(name = "设备id列表", width = 15) @ApiModelProperty(value = "设备id列表") + @Dict(dictTable = "zy_devicetype", dicText = "name", dicCode = "id") private String machineIds; /** * 工具id列表 */ @Excel(name = "工具id列表", width = 15) @ApiModelProperty(value = "工具id列表") + @Dict(dictTable = "zy_tool", dicText = "name", dicCode = "id") private String toolsIds; - /** - * 工序id列表 - */ - @Excel(name = "工序id列表", width = 15) - @ApiModelProperty(value = "工序id列表") - private String processIds; /** * 成员id列表 */ @Excel(name = "成员id列表", width = 15) @ApiModelProperty(value = "成员id列表") +// @Dict(dictTable = "sys_user", dicText = "name", dicCode = "id") private String userIds; } 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 629a3792..ee9ddff8 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 @@ -56,7 +56,6 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl Date: Mon, 19 Dec 2022 10:42:18 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E7=AE=A1=E7=90=86-=E8=A1=A8=E5=AD=97=E6=AE=B5=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=2012.19?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/productplan/ZyProductPlanList.vue | 4 ++-- .../src/views/productplan/modules/ZyProductPlanForm.vue | 6 +++--- .../org/jeecg/modules/productplan/entity/ZyProductPlan.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue index 2233a512..9540c7e7 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue @@ -184,7 +184,7 @@ export default { { title: '生产时长', align: "center", - dataIndex: 'offTime' + dataIndex: 'duration' }, { title: '状态', @@ -252,7 +252,7 @@ export default { fieldList.push({type: 'string', value: 'teamId', text: '班组', dictCode: ''}) fieldList.push({type: 'string', value: 'teamLeader', text: '组长', dictCode: ''}) fieldList.push({type: 'date', value: 'workTime', text: '生产开始时间'}) - fieldList.push({type: 'int', value: 'offTime', text: '生产时长', dictCode: ''}) + fieldList.push({type: 'int', value: 'duration', text: '生产时长', dictCode: ''}) fieldList.push({type: 'int', value: 'status', text: '状态', dictCode: ''}) fieldList.push({type: 'int', value: 'speedUp', text: '是否加急', dictCode: ''}) fieldList.push({type: 'string', value: 'auditBy', text: '审核人', dictCode: ''}) diff --git a/ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue b/ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue index 58ab2ebf..d7c93fad 100644 --- a/ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue +++ b/ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue @@ -57,8 +57,8 @@ - - + + @@ -134,7 +134,7 @@ export default { // status: [ // {required: true,message: "状态不能为空"}, // ], - offTime: [ + duration: [ {required: true, message: "生产时长不能不空"}, {pattern: /^[0-9]{0,100}$/, message: '生产时间不能为空且长度为正整数'} ], diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyProductPlan.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyProductPlan.java index bf4e54e3..9f8a5495 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyProductPlan.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyProductPlan.java @@ -103,7 +103,7 @@ public class ZyProductPlan implements Serializable { */ @Excel(name = "生产时长", width = 15) @ApiModelProperty(value = "生产时长") - private Integer offTime; + private Integer duration; /** * 值:未审核0、已审核1、生产中2、已完成3、已撤销8、异常9,默认0 */