From 9fbf10e12ff00b1fc17e86aa06c79eca6680a2b6 Mon Sep 17 00:00:00 2001 From: mors <3067699729@qq.com> Date: Fri, 30 Dec 2022 20:59:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../process/ZyClothsModularCompentList.vue | 22 +++-- .../src/views/process/ZyClothsModularList.vue | 14 +-- .../views/process/ZyProcessComponentList.vue | 87 +++++++++++++++++-- .../process/modules/ZyClothsComponentForm.vue | 35 ++++---- .../process/modules/ZyClothsModularForm.vue | 38 ++++---- .../modules/ZyProcessComponentForm.vue | 10 +-- .../modules/list/ZyClothsComponentList.vue | 30 +++---- .../ZyClothsModularCompentListDetails.vue | 80 +++++++++++++++++ .../zyProcessModular/ZyProcessModularList.vue | 86 +++++++++++++++++- .../views/zystylemodule/ZyStyleModuleList.vue | 6 +- .../controller/ZyStyleModularController.java | 7 +- .../ZyClothsModularCompentController.java | 17 +++- .../controller/ZyClothsModularController.java | 2 +- .../controller/ZyStyleFabricController.java | 30 +------ .../service/IZyStyleFabricService.java | 7 ++ .../impl/ZyStyleFabricServiceImpl.java | 12 ++- .../service/impl/ZyStyleModelServiceImpl.java | 11 ++- 17 files changed, 380 insertions(+), 114 deletions(-) create mode 100644 ant-design-vue-jeecg/src/views/process/modules/list/ZyClothsModularCompentListDetails.vue diff --git a/ant-design-vue-jeecg/src/views/process/ZyClothsModularCompentList.vue b/ant-design-vue-jeecg/src/views/process/ZyClothsModularCompentList.vue index 272f403e..71f8345c 100644 --- a/ant-design-vue-jeecg/src/views/process/ZyClothsModularCompentList.vue +++ b/ant-design-vue-jeecg/src/views/process/ZyClothsModularCompentList.vue @@ -3,13 +3,14 @@ +

{{biaoTi}}

@@ -88,10 +89,9 @@ - 编辑 - - - 详情 + + + 详情 删除 @@ -103,6 +103,7 @@ +
@@ -113,12 +114,15 @@ import '@/assets/less/TableExpand.less' import {mixinDevice} from '@/utils/mixin' import {JeecgListMixin} from '@/mixins/JeecgListMixin' import ZyClothsModularCompentModal from './modules/ZyClothsModularCompentModal' +import ZyClothsComponentListDetail from "@views/process/modules/ZyClothsComponentListDetail"; +import ZyClothsModularCompentListDetails from "@views/process/modules/list/ZyClothsModularCompentListDetails"; export default { name: 'ZyClothsModularCompentList', mixins: [JeecgListMixin, mixinDevice], components: { + ZyClothsModularCompentListDetails, ZyClothsModularCompentModal }, data() { @@ -127,7 +131,7 @@ export default { visible: false, confirmLoading: false, yid: '', - biaoTi: "", + biaoTi: '', // 表头 columns: [ { @@ -193,6 +197,10 @@ export default { }, }, methods: { + viewDetails(id) { + this.$refs.ZyClothsModularCompentListDetails.showModal(id); + }, + edit1(record) { this.model = Object.assign({}, record); //this.ax= this.model.id; diff --git a/ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue b/ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue index 97506aa5..5628105c 100644 --- a/ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue +++ b/ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue @@ -192,11 +192,11 @@ export default { align: "center", dataIndex: 'modularName' }, - // { - // title: '模块部件名称', - // align: "center", - // dataIndex: 'modularType_dictText' - // }, + { + title: '模块类型', + align: "center", + dataIndex: 'modularType_dictText' + }, // { // title: '描述', // align: "center", @@ -270,13 +270,13 @@ export default { viewVid(record) { this.$refs.ZyClothsModularCompentList.showModal1(); this.$refs.ZyClothsModularCompentList.edit1(record); - console.log("制衣模块传给模块部件的id zyclothsMclist" + record.id); + //console.log("制衣模块传给模块部件的id zyclothsMclist" + record.id); this.$refs.ZyClothsModularCompentList.disableSubmit = false; }, viewVid2(record) { this.$refs.ZyProcessModularList.showModal1(); this.$refs.ZyProcessModularList.edit1(record); - console.log("父弹窗ID++++++:" + record.id); + //console.log("父弹窗ID++++++:" + record.id); this.$refs.ZyProcessModularList.disableSubmit = false; }, initDictConfig() { diff --git a/ant-design-vue-jeecg/src/views/process/ZyProcessComponentList.vue b/ant-design-vue-jeecg/src/views/process/ZyProcessComponentList.vue index 3394ba02..0f735a08 100644 --- a/ant-design-vue-jeecg/src/views/process/ZyProcessComponentList.vue +++ b/ant-design-vue-jeecg/src/views/process/ZyProcessComponentList.vue @@ -2,16 +2,30 @@ +

{{biaoTi}} 部件工序管理

+ + + + + + + + + + 查询 + 重置 + +
@@ -102,7 +116,7 @@ - +
@@ -115,6 +129,8 @@ import ZyProcessComponentModal from './modules/ZyProcessComponentModal' import ZyProcessComponentFormDetail from './modules/ZyProcessComponentFormDetail' import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' + import {filterObj} from "@/utils/util"; + import {getAction} from "@api/manage"; export default { name: 'ZyProcessComponentList', @@ -151,11 +167,11 @@ align:"center", dataIndex: 'processId_dictText' }, - { - title:'是否瓶颈工序', - align:"center", - dataIndex: 'bottleneck_dictText' - }, + // { + // title:'是否瓶颈工序', + // align:"center", + // dataIndex: 'bottleneck_dictText' + // }, { title:'创建时间', align:"center", @@ -178,6 +194,9 @@ importExcelUrl: "pro/zyProcessComponent/importExcel", }, + //参数 + loadRouteType: false, + biaoTi: '', dictOptions:{}, superFieldList:[], } @@ -194,12 +213,66 @@ edit2(record) { this.model = Object.assign({}, record); this.componentId1 = this.model.id; + this.biaoTi = this.model.partsName; //console.log(topicid); this.queryParam.componentId = this.model.id; //console.log( this.queryParam.topicid); this.loadData(); this.visible = true; }, + valueChange(value) { + if (value) this.loadData() + }, + //加载传递参数 + loadParameter() { + if (this.loadRouteType === false) { + 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(); + const params = this.getQueryParams();//查询条件 + this.loading = true; + getAction(this.url.list, params).then((res) => { + if (res.success) { + //update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ + this.dataSource = res.result.records || res.result; + if (res.result.total) { + this.ipagination.total = res.result.total; + } else { + this.ipagination.total = 0; + } + //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + }, + getQueryParams() { + //获取查询条件 + let sqp = {} + if (this.superQueryParams) { + sqp['superQueryParams'] = encodeURI(this.superQueryParams) + sqp['superQueryMatchType'] = this.superQueryMatchType + } + const 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.id=this.id; + param.componentId = this.componentId1; + return filterObj(param); + }, showModal2() { this.visible = true; }, diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue index 92604697..a3a47ce6 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue @@ -24,26 +24,35 @@ + - - - + + + + - - + + + + + + + + + - + + placeholder="请选择模块类型"/> @@ -68,11 +77,7 @@ - - - - - + @@ -196,14 +201,14 @@ }); } this.model.nums = res.result - console.log('res.result') - console.log(res.result) + //console.log('res.result') + //console.log(res.result) //this.confirmLoading = false // if (this.data.length === 0) { // this.data.push(res.result) // } - console.log("制衣部件List 编号 "+this.model.nums); + //console.log("制衣部件List 编号 "+this.model.nums); }, // bianHao() { // getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => { diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue index 9192a4e7..2ecb5213 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue @@ -9,15 +9,7 @@ - - - - - - - - - + @@ -37,13 +29,31 @@ - + + + + + + + + + + + + + + + + + + + @@ -72,11 +82,7 @@ - - - - - + @@ -143,7 +149,7 @@ export default { modularName: [ {required: true, message: '请输入模块名称!'}, //{ pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!()?]{0,50}$/, message: '文本长度过长'}, - {min: 1, max: 30, message: '最多输入30字!', trigger: 'blur'}, + {min: 1, max: 50, message: '最多输入50字!', trigger: 'blur'}, ], clothsTypeId: [ {required: true, message: '请选择衣服类型!'}, diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyProcessComponentForm.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyProcessComponentForm.vue index 4d3e3cf6..b9919d3f 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyProcessComponentForm.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyProcessComponentForm.vue @@ -13,11 +13,11 @@ - - - - - + + + + + diff --git a/ant-design-vue-jeecg/src/views/process/modules/list/ZyClothsComponentList.vue b/ant-design-vue-jeecg/src/views/process/modules/list/ZyClothsComponentList.vue index ad35b2e7..b8b57e6b 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/list/ZyClothsComponentList.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/list/ZyClothsComponentList.vue @@ -125,11 +125,11 @@ export default { align:"center", dataIndex: 'nums' }, - { - title:'模块类型', - align:"center", - dataIndex: 'modularType' - }, + // { + // title:'模块类型', + // align:"center", + // dataIndex: 'modularType' + // }, { title:'部件名称', align:"center", @@ -140,11 +140,11 @@ export default { // align:"center", // dataIndex: 'componentType' // }, - // { - // title: '服装类型', - // align: "center", - // dataIndex: 'clothsTypeId_dictText' - // }, + { + title: '服装类型', + align: "center", + dataIndex: 'clothsTypeId_dictText' + }, // { // title:'描述', // align:"center", @@ -161,11 +161,11 @@ export default { // align:"center", // dataIndex: 'modularId_dictText' // }, - // { - // title:'制衣模块类型', - // align:"center", - // dataIndex: 'modularType_dictText' - // }, + { + title:'模块类型', + align:"center", + dataIndex: 'modularType_dictText' + }, // { // title:'企业', // align:"center", diff --git a/ant-design-vue-jeecg/src/views/process/modules/list/ZyClothsModularCompentListDetails.vue b/ant-design-vue-jeecg/src/views/process/modules/list/ZyClothsModularCompentListDetails.vue new file mode 100644 index 00000000..48ae7129 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/process/modules/list/ZyClothsModularCompentListDetails.vue @@ -0,0 +1,80 @@ + + + + diff --git a/ant-design-vue-jeecg/src/views/zyProcessModular/ZyProcessModularList.vue b/ant-design-vue-jeecg/src/views/zyProcessModular/ZyProcessModularList.vue index 33aae9b7..d785390a 100644 --- a/ant-design-vue-jeecg/src/views/zyProcessModular/ZyProcessModularList.vue +++ b/ant-design-vue-jeecg/src/views/zyProcessModular/ZyProcessModularList.vue @@ -2,16 +2,37 @@ +

{{biaoTi}}

+ + + + + + + + + + + + + + + 查询 + 重置 + +
@@ -102,7 +123,7 @@ - +
@@ -112,6 +133,8 @@ import '@/assets/less/TableExpand.less' import { mixinDevice } from '@/utils/mixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import ZyProcessModularModal from './modules/ZyProcessModularModal' +import {getAction} from "@api/manage"; +import {filterObj} from "@/utils/util"; export default { name: 'ZyProcessModularList', @@ -125,6 +148,9 @@ export default { visible: false, confirmLoading: false, modularId1: '', + biaoTi: '', + //参数 + loadRouteType: false, // 表头 columns: [ { @@ -176,6 +202,7 @@ export default { }, created() { this.getSuperFieldList(); + //this.loadParameter(); }, computed: { importExcelUrl: function(){ @@ -186,6 +213,7 @@ export default { edit1(record) { this.model = Object.assign({}, record); this.modularId1= this.model.id; + this.biaoTi = record.modularName+"模块工序管理"; //console.log(topicid); this.queryParam.modularId = this.model.id; console.log("子弹窗拿到的ID++++++:"+ this.queryParam.modularId); @@ -195,6 +223,60 @@ export default { showModal1() { this.visible = true; }, + valueChange(value) { + if (value) this.loadData() + }, + 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; + getAction(this.url.list, params).then((res) => { + if (res.success) { + //update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ + this.dataSource = res.result.records || res.result; + if (res.result.total) { + this.ipagination.total = res.result.total; + } else { + this.ipagination.total = 0; + } + //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ + } else { + this.$message.warning(res.message) + } + }).finally(() => { + 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.id=this.id; + param.modularId = this.modularId1; + //console.log("param.modularId "+param.modularId); + return filterObj(param); + }, + //加载传递参数 + loadParameter() { + if (this.loadRouteType === false) { + this.loadRouteType = true; + } + }, handleOk(e) { this.ModalText = 'The modal will be closed after two seconds'; this.confirmLoading = true; diff --git a/ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue b/ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue index d8eeeca7..def7f0b9 100644 --- a/ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue +++ b/ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue @@ -251,9 +251,9 @@ export default { this.id = this.$route.query.id; this.typeId = this.$route.query.typeId; this.biaoTi = this.$route.query.styleNames + "款式模块管理"; - console.log('款式模块********id对应的为款式style_id: ' + this.id); - console.log('款式模块********biaoTi: ' + this.biaoTi); - console.log('款式模块******typeId此为类型typeId: ' + this.typeId); + //console.log('款式模块********id对应的为款式style_id: ' + this.id); + //console.log('款式模块********biaoTi: ' + this.biaoTi); + //console.log('款式模块******typeId此为类型typeId: ' + this.typeId); this.loadRouteType = true; } }, diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java index 23d4e9c9..454504ee 100644 --- a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java +++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java @@ -68,12 +68,15 @@ public class ZyStyleModularController extends JeecgController queryPageList(ZyStyleModular zyStyleModular, String id,String processId, + public Result queryPageList(ZyStyleModular zyStyleModular, + @RequestParam(value = "id", required = false) String id, + @RequestParam(value = "processId", required = false) String processId, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { //QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModular, req.getParameterMap()); - + //System.err.println("id "+id); + //System.err.println("processId "+processId); QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq(StringUtils.hasText(id), "style_id", id); queryWrapper.eq(StringUtils.hasText(processId), "process_id", processId); diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularCompentController.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularCompentController.java index a01b0c43..cd71a623 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularCompentController.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularCompentController.java @@ -12,6 +12,7 @@ import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.modules.demo.base.entity.ZyClothsComponent; import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent; +import org.jeecg.modules.demo.base.entity.vo.ZyClothsComponentDetail; import org.jeecg.modules.demo.base.mapper.ZyClothsModularCompentMapper; import org.jeecg.modules.demo.base.service.IZyClothsComponentService; import org.jeecg.modules.demo.base.service.IZyClothsModularCompentService; @@ -64,7 +65,7 @@ public class ZyClothsModularCompentController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(zyClothsModularCompent, req.getParameterMap()); queryWrapper.eq(StringUtils.hasText(modularId),"modular_id", modularId); //queryWrapper.eq("modular_id", modularId); @@ -143,6 +144,20 @@ public class ZyClothsModularCompentController extends JeecgController detail(@RequestParam(name = "id", required = true) String id) { + ZyClothsModularCompent modularComponent = zyClothsModularCompentService.getById(id); + System.err.println("controller层接受到的id:制衣模块部件中间表 Id: "+id); + ZyClothsComponentDetail detail = zyClothsComponentService.queryDetail(modularComponent.getComponentId()); + return Result.OK(detail.getZyClothsComponent()); + } + + /** * 批量删除 * diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularController.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularController.java index ab988496..43272150 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularController.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularController.java @@ -73,7 +73,7 @@ public class ZyClothsModularController extends JeecgController queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(StringUtils.hasText(clothsTypeId), ZyClothsModular::getClothsTypeId, clothsTypeId); Page page = new Page<>(pageNo, pageSize); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java index 918a69f5..ec6de5b1 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java @@ -73,6 +73,7 @@ public class ZyStyleFabricController extends JeecgController list = zyStyleFabricService.list(queryWrapper); - List newZyStyleFabrics = new ArrayList<>(); - for (ZyStyleFabric zyStyleF : list) { - System.out.println("****" + zyStyleF); - NewZyStyleFabric newZySF = new NewZyStyleFabric(); - //编辑回显 - newZySF.setId(zyStyleF.getId()); - newZySF.setFabricId(zyStyleF.getFabricId()); - newZySF.setStyleId(zyStyleF.getStyleId()); - - //拿到服装类型名称 - String typeName = zyStyleFabricMapper.getTypeName(newZySF.getStyleId()); - newZySF.setTypeName(typeName); - - //款式编号和名称 - String styleId = zyStyleF.getStyleId(); - ZyClothsStyle styleById = zyClothsStyleService.getById(styleId); - newZySF.setStyleNums(styleById.getNums()); - newZySF.setStyleNames(styleById.getStyleNames()); - //模块编号和名称 - String fabricId = zyStyleF.getFabricId(); - - ZyFabric fabricById = zyFabricService.getById(fabricId); - - newZySF.setFabricNumber(fabricById.getFabricNumber()); - newZySF.setFabricName(fabricById.getName()); - newZySF.setCreateTime(zyStyleF.getCreateTime()); - newZyStyleFabrics.add(newZySF); - } + List newZyStyleFabrics = zyStyleFabricService.changeList(list); IPage pageList = new Page<>(pageNo, pageSize, list.size()); pageList.setRecords(newZyStyleFabrics); return Result.OK(pageList); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/service/IZyStyleFabricService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/service/IZyStyleFabricService.java index dfb17e1f..b34fa0d4 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/service/IZyStyleFabricService.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/service/IZyStyleFabricService.java @@ -19,4 +19,11 @@ public interface IZyStyleFabricService extends IService { List detail(String id); ZyStyleFabricDetailVo queryDetail(String id); + + /** + * 改变List中的实体类 类型 + * @param list 原实体类ZyStyleFabric + * @return 新实体类 NewZyStyleFabric + */ + List changeList(List list); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/service/impl/ZyStyleFabricServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/service/impl/ZyStyleFabricServiceImpl.java index 206b1d3d..959f1fd7 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/service/impl/ZyStyleFabricServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/service/impl/ZyStyleFabricServiceImpl.java @@ -10,6 +10,7 @@ import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric; import org.jeecg.modules.zystylefabric.entity.ZyStyleFabricDetailVo; import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper; import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService; +import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -39,7 +40,12 @@ public class ZyStyleFabricServiceImpl extends ServiceImpl detail(String id) { List list = zyStyleFabricMapper.listByStyleId(id); - List newZyStyleFabrics = new ArrayList<>(); + return changeList(list); + } + + @Override + public List changeList(@NotNull List list) { + List newFabrics = new ArrayList<>(); for (ZyStyleFabric zyStyleF : list) { //System.out.println("****" + zyStyleF); NewZyStyleFabric newZySF = new NewZyStyleFabric(); @@ -65,9 +71,9 @@ public class ZyStyleFabricServiceImpl extends ServiceImpl Date: Sat, 31 Dec 2022 20:05:21 +0800 Subject: [PATCH 2/2] =?UTF-8?q?2022-12-31=E4=BF=AE=E9=A5=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../product/pdaccessories/ProductAccessoriesList.vue | 10 ++++++++++ .../src/views/product/pdfabric/ProductFabricList.vue | 10 ++++++++++ .../src/views/product/pdmachine/ProductMachineList.vue | 10 ++++++++++ .../pdoperationtool/ProductOperationtoolList.vue | 10 ++++++++++ 4 files changed, 40 insertions(+) diff --git a/ant-design-vue-jeecg/src/views/product/pdaccessories/ProductAccessoriesList.vue b/ant-design-vue-jeecg/src/views/product/pdaccessories/ProductAccessoriesList.vue index 6f94410e..0b68e93d 100644 --- a/ant-design-vue-jeecg/src/views/product/pdaccessories/ProductAccessoriesList.vue +++ b/ant-design-vue-jeecg/src/views/product/pdaccessories/ProductAccessoriesList.vue @@ -1,5 +1,6 @@