From 53ac72043c8db3d68bee39375cef583f6af152c7 Mon Sep 17 00:00:00 2001 From: mors <3067699729@qq.com> Date: Thu, 12 Jan 2023 18:21:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E8=A1=A3=E9=83=A8=E4=BB=B6=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/process/ZyClothsComponentList.vue | 9 +- .../src/views/process/ZyClothsTypeList.vue | 2 +- .../views/process/ZyProcessComponentList.vue | 31 +- .../process/modules/ZyClothsComponentForm.vue | 10 +- .../process/modules/ZyClothsTypeForm.vue | 271 +++++++++--------- .../modules/list/ZyClothsComponentList.vue | 67 +---- .../ZyClothsComponentController.java | 30 +- .../controller/ZyClothsTypeController.java | 22 +- .../demo/base/mapper/ZyProcessMapper.java | 8 +- .../base/service/IZyClothsTypeService.java | 20 +- .../service/impl/ZyClothsTypeServiceImpl.java | 75 ++--- .../vue/modules/ZyClothsComponentForm.vue | 129 --------- .../vue/modules/ZyClothsComponentModal.vue | 60 ---- .../ZyClothsComponentModal__Style#Drawer.vue | 84 ------ .../base/vue/modules/ZyClothsModularForm.vue | 129 --------- .../base/vue/modules/ZyClothsModularModal.vue | 60 ---- .../ZyClothsModularModal__Style#Drawer.vue | 84 ------ .../base/vue/modules/ZyClothsTypeForm.vue | 114 -------- .../base/vue/modules/ZyClothsTypeModal.vue | 60 ---- .../ZyClothsTypeModal__Style#Drawer.vue | 84 ------ .../ZyProcessComponentController.java | 14 + .../demo/pro/entity/ZyProcessComponent.java | 9 +- .../ZyProcessModularController.java | 9 +- 23 files changed, 266 insertions(+), 1115 deletions(-) delete mode 100644 jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsComponentForm.vue delete mode 100644 jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsComponentModal.vue delete mode 100644 jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsComponentModal__Style#Drawer.vue delete mode 100644 jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsModularForm.vue delete mode 100644 jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsModularModal.vue delete mode 100644 jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsModularModal__Style#Drawer.vue delete mode 100644 jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsTypeForm.vue delete mode 100644 jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsTypeModal.vue delete mode 100644 jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsTypeModal__Style#Drawer.vue diff --git a/ant-design-vue-jeecg/src/views/process/ZyClothsComponentList.vue b/ant-design-vue-jeecg/src/views/process/ZyClothsComponentList.vue index 2aa9d775..12e858f9 100644 --- a/ant-design-vue-jeecg/src/views/process/ZyClothsComponentList.vue +++ b/ant-design-vue-jeecg/src/views/process/ZyClothsComponentList.vue @@ -4,6 +4,12 @@
+ + + + + + @@ -159,6 +165,7 @@ export default { }, data() { return { + //制衣部件 description: 'zy_cloths_component管理页面', // 表头 columns: [ @@ -173,7 +180,7 @@ export default { } }, { - title: '编号', + title: '部件编号', align: "center", dataIndex: 'nums' }, diff --git a/ant-design-vue-jeecg/src/views/process/ZyClothsTypeList.vue b/ant-design-vue-jeecg/src/views/process/ZyClothsTypeList.vue index 33eb1989..c39b8c35 100644 --- a/ant-design-vue-jeecg/src/views/process/ZyClothsTypeList.vue +++ b/ant-design-vue-jeecg/src/views/process/ZyClothsTypeList.vue @@ -202,7 +202,7 @@ } }, created() { - this.getSuperFieldList(); + this.getSuperFieldList(); // this.loadParameter(); }, computed: { diff --git a/ant-design-vue-jeecg/src/views/process/ZyProcessComponentList.vue b/ant-design-vue-jeecg/src/views/process/ZyProcessComponentList.vue index 23c45311..26ae0f66 100644 --- a/ant-design-vue-jeecg/src/views/process/ZyProcessComponentList.vue +++ b/ant-design-vue-jeecg/src/views/process/ZyProcessComponentList.vue @@ -8,12 +8,19 @@ @ok="handleOk" @cancel="handleCancel" > -

{{biaoTi}} 模块工序管理

+

{{biaoTi}} 部件工序管理

+ + + + + + @@ -90,27 +97,14 @@ - 编辑 + - + 详情 删除 - - - - - - - - - - - - - @@ -162,6 +156,11 @@ align:"center", dataIndex: 'componentId_dictText' }, + { + title:'工序代码', + align:"center", + dataIndex: 'processCode' + }, { title:'工序', align:"center", 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 64460e17..a2921c8a 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue @@ -27,8 +27,8 @@ - - + + @@ -145,9 +145,9 @@ export default { }, confirmLoading: false, validatorRules: { - // nums: [ - // { required: true, message: '请输入编号!'}, - // ], + nums: [ + {required: true, message: '部件编号不能为空!'}, + ], clothsTypeId: [ {required: true, message: '请选择服装类型!'}, ], diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue index 7d561953..c4974fc1 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue @@ -5,12 +5,12 @@ - + - + @@ -18,7 +18,7 @@ + placeholder="请选择上级类型"> {{ typeId }} @@ -26,15 +26,15 @@ - + - + @@ -44,86 +44,85 @@ \ No newline at end of file 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 3b65e0ff..6d4104cd 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 @@ -13,17 +13,6 @@ - - - - - - - - - - - @@ -47,47 +36,14 @@ class="j-table-force-nowrap" @change="handleTableChange"> - - - - - - - - - - - - - 删除 -
- - - @@ -99,13 +55,14 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'; export default { + //制衣模块中模块部件新增的时候 弹出的部件列表 + //弹出的数据 是根据制衣模块的模块类型 和 服装类型进行筛选 name: 'ZyClothsComponentList', mixins:[JeecgListMixin, mixinDevice], components: {}, data () { return { model:{ - fuId: '', clothsId: '', }, description: 'zy_cloths_component管理页面', @@ -147,11 +104,6 @@ export default { dataIndex: 'clothsTypeId_dictText' }, // { - // title:'描述', - // align:"center", - // dataIndex: 'description' - // }, - // { // title:'图片', // align:"center", // dataIndex: 'pictureUrl', @@ -177,12 +129,6 @@ export default { align:"center", dataIndex: 'createTime' }, - // { - // title: '部件工序', - // dataIndex: 'action2', - // align:"center", - // scopedSlots: { customRender: 'action2' } - // }, { title: '操作', dataIndex: 'action', @@ -213,11 +159,6 @@ export default { }, }, methods: { - // viewVid2(record){ - // this.$refs.ZyProcessComponentList.showModal2(); - // this.$refs.ZyProcessComponentList.edit2(record); - // this.$refs.ZyProcessComponentList.disableSubmit = false; - // }, onSelectChange1(selectedRowKeys, selectionRows) { this.selectedRowKeys = selectedRowKeys; this.selectionRows = selectionRows; @@ -228,9 +169,9 @@ export default { this.$emit('onChangeRowKey', ids) }, add1(id) { - this.queryParam.fuId = id; + this.queryParam.modularId = id; //this.queryParam.clothsId = this.model.id; - this.url.list = '/base/zyClothsComponent/listTwo'; + //this.url.list = '/base/zyClothsComponent/listTwo'; this.loadData(); //this.model.fuId = id; // this.loadData() diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsComponentController.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsComponentController.java index 4c0a02fb..b3e56202 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsComponentController.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsComponentController.java @@ -67,24 +67,29 @@ public class ZyClothsComponentController extends JeecgController queryPageListTwo(ZyClothsComponent zyClothsComponent, - @RequestParam(name = "fuId", required = true) String fuId, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { - //fuId为制衣模块 zy cloths Modular中的id - ZyClothsModular clothsModular = zyClothsModularService.getById(fuId); - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyClothsComponent, req.getParameterMap()); - queryWrapper.eq(StringUtils.hasText(clothsModular.getClothsTypeId()), "cloths_type_id", clothsModular.getClothsTypeId()); - queryWrapper.eq(StringUtils.hasText(clothsModular.getModularType()), "modular_type",clothsModular.getModularType()); - Page page = new Page<>(pageNo, pageSize); - IPage pageList = zyClothsComponentService.page(page, queryWrapper); - return Result.OK(pageList); + // modularId为制衣模块 zy cloths Modular中的id + if (StringUtils.hasText(zyClothsComponent.getModularId())){ + //System.err.println("modularId为制衣模块 zy cloths Modular中的id: "+zyClothsComponent.getModularId()); + ZyClothsModular clothsModular = zyClothsModularService.getById(zyClothsComponent.getModularId()); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq(StringUtils.hasText(clothsModular.getClothsTypeId()), "cloths_type_id", clothsModular.getClothsTypeId()); + queryWrapper.eq(StringUtils.hasText(clothsModular.getModularType()), "modular_type",clothsModular.getModularType()); + Page page = new Page<>(pageNo, pageSize); + IPage pageList = zyClothsComponentService.page(page, queryWrapper); + return Result.OK(pageList); + } + return Result.error("查询失败!制衣模块的id不能为空"); } // @AutoLog(value = "zy_cloths_component-查询所有") @@ -133,12 +138,15 @@ public class ZyClothsComponentController extends JeecgController queryWrapper = new LambdaQueryWrapper<>(); List zyClothsComponentList = zyClothsComponentService.list(queryWrapper); for (ZyClothsComponent zy : zyClothsComponentList) { if (zyClothsComponent.getPartsName().equals(zy.getPartsName())){ - return Result.error("添加失败!数据已存在"); + return Result.error("添加失败!部件名称已存在"); } } zyClothsComponentService.save(zyClothsComponent); diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java index 5140b48f..6eff06ec 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java @@ -65,7 +65,7 @@ public class ZyClothsTypeController extends JeecgController records = pageList.getRecords(); for (ZyClothsType zy : records) { String typeId = zy.getTypeId(); - if (StringUtils.isEmpty(typeId)){ + if (StringUtils.isEmpty(typeId)) { zy.setTypeId("1455487094925819901"); } } @@ -82,6 +82,9 @@ public class ZyClothsTypeController extends JeecgController add(@RequestBody ZyClothsType zyClothsType) { + if (StringUtils.isEmpty(zyClothsType.getNums())) { + return Result.error("服装类型编号 不能为空"); + } //type_name,类型名称,varchar,50,非空,同类型下不重复 String typeName = zyClothsType.getTypeName(); if (!StringUtils.hasText(typeName)) { @@ -97,7 +100,7 @@ public class ZyClothsTypeController extends JeecgController zyClothsTypeList = zyClothsTypeMapper.listByTypeId(typeId); zyClothsTypeList.add(zyClothsType.getTypeName()); HashSet set = new HashSet<>(zyClothsTypeList); - if (set.size() != zyClothsTypeList.size()){ + if (set.size() != zyClothsTypeList.size()) { return Result.error("同类型下 类型名称不能重复"); } } @@ -105,17 +108,10 @@ public class ZyClothsTypeController extends JeecgController weiyi(@RequestParam(name = "id", required = true) String enterpriseId) { - if(StringUtils.isEmpty(enterpriseId)){ + if (StringUtils.isEmpty(enterpriseId)) { return Result.error("请先选择一个企业"); } - String a=zyClothsTypeService.sort(enterpriseId); - if(a==null){ + String a = zyClothsTypeService.sort(enterpriseId); + if (a == null) { return Result.OK("0"); } //a.substring(4)截掉前4位 diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyProcessMapper.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyProcessMapper.java index 18b93a63..0110d700 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyProcessMapper.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyProcessMapper.java @@ -22,13 +22,17 @@ public interface ZyProcessMapper extends BaseMapper { ZyClothActionVo selectListZyClothActionVo(@Param("id") String id); - public List selectByComponentId(@Param("component_id") String component_id); + List selectByComponentId(@Param("component_id") String component_id); + String getProcessNameById(String processId); @Select("select process_code from zy_process where style_id=#{id} order by process_code DESC limit 0,1") String sort(String id); + @Select("select process_code from zy_process where id=#{processId}") + String getCodeByProcessId(String processId); + @Select("select type_id from zy_cloths_style where id=#{clothStyleId}") String getTypeId(String clothStyleId); @@ -40,4 +44,6 @@ public interface ZyProcessMapper extends BaseMapper { @Select("select cloths_type_id from zy_cloths_component where id=#{clothsComponentId}") String getClothsComponentId(String clothsComponentId); + + } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java index 1526ca47..27344e61 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java @@ -3,6 +3,8 @@ package org.jeecg.modules.demo.base.service; import org.jeecg.modules.demo.base.entity.ZyClothsType; import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + /** * @Description: zy_cloths_type * @Author: jeecg-boot @@ -11,13 +13,23 @@ import com.baomidou.mybatisplus.extension.service.IService; */ public interface IZyClothsTypeService extends IService { - /**nums,编号,varchar,10,非空,不重复,企业缩写(4)+顺序号(6)*/ - String generateNumber(); - String sort(String enterpriseId); /**根据企业名称拿到企业编号*/ String getEnterpriseNums(String enterpriseName); - void chuliBianHaoWenti(); + + + Long orderNumber(); + + /** + * 拿到集合中的最大值 + * @param listString 传进来一个String类型的集合 + * @param i 返回数字的位数 例如一般6位或8位 + * @return 返回一个long类型的i位数最大值 + */ + Long getListMax(List listString, int i); + + + } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java index 89fa7cec..28fa3699 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java @@ -1,9 +1,9 @@ package org.jeecg.modules.demo.base.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.jeecg.modules.demo.base.entity.ZyClothsType; import org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper; import org.jeecg.modules.demo.base.service.IZyClothsTypeService; +import org.jetbrains.annotations.NotNull; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -12,14 +12,13 @@ import org.springframework.util.StringUtils; import javax.annotation.Resource; import java.util.ArrayList; import java.util.Collections; -import java.util.Date; import java.util.List; import java.util.regex.Pattern; /** * @Description: zy_cloths_type * @Author: jeecg-boot - * @Date: 2021-11-10 + * @Date: 2021-11-10 * @Version: V1.0 */ @Service @@ -27,38 +26,23 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); - List zyClothsTypeList = list(queryWrapper); - System.err.println(new Date()); - for (ZyClothsType enterId : zyClothsTypeList) { - String enterpriseName = enterId.getEnterpriseId(); - String id = zyClothsTypeMapper.getEnterpriseName(enterpriseName); - if (StringUtils.hasText(id)){ - zyClothsTypeMapper.setEnterpriseId(id); - } - } + public Long orderNumber() { + List listString = zyClothsTypeMapper.selectNumsList(); + return this.getListMax(listString,6); } - private Long orderNumber() { - List listString = zyClothsTypeMapper.selectNumsList(); - //System.out.println(listString); + @Override + public Long getListMax(@NotNull List listString, int i) { List listLong = new ArrayList<>(); for (String nums : listString) { - //System.err.println(nums); String REGEX = "[^0-9]"; //只要数字 String newNums = Pattern.compile(REGEX).matcher(nums).replaceAll("").trim(); - //System.err.println(newNums); - if (!StringUtils.hasText(newNums)){ - newNums = "0"; + if (StringUtils.isEmpty(newNums)) { + continue; } - if (newNums.length() > 6) { + if (newNums.length() > i) { //拿到后6位 - String substring = newNums.substring(newNums.length() - 6); + String substring = newNums.substring(newNums.length() - i); listLong.add(Long.valueOf(substring)); - }else { + } else { listLong.add(Long.valueOf(newNums)); } } - return Collections.max(listLong)+1; + long max = Collections.max(listLong) + 1; + if (Long.toString(max).length() > i) { + String toString = Long.toString(max); + String substring = toString.substring(toString.length() - i); + return Long.valueOf(substring); + } + return max; } + } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsComponentForm.vue b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsComponentForm.vue deleted file mode 100644 index 6a62c7cc..00000000 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsComponentForm.vue +++ /dev/null @@ -1,129 +0,0 @@ - - - diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsComponentModal.vue b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsComponentModal.vue deleted file mode 100644 index 07d53bdf..00000000 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsComponentModal.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsComponentModal__Style#Drawer.vue b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsComponentModal__Style#Drawer.vue deleted file mode 100644 index 0aee9460..00000000 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsComponentModal__Style#Drawer.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - - - diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsModularForm.vue b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsModularForm.vue deleted file mode 100644 index 052039b8..00000000 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsModularForm.vue +++ /dev/null @@ -1,129 +0,0 @@ - - - diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsModularModal.vue b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsModularModal.vue deleted file mode 100644 index 07b38f2f..00000000 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsModularModal.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsModularModal__Style#Drawer.vue b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsModularModal__Style#Drawer.vue deleted file mode 100644 index a4b038a2..00000000 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsModularModal__Style#Drawer.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - - - diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsTypeForm.vue b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsTypeForm.vue deleted file mode 100644 index b85cb9c5..00000000 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsTypeForm.vue +++ /dev/null @@ -1,114 +0,0 @@ - - - diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsTypeModal.vue b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsTypeModal.vue deleted file mode 100644 index 59b33e01..00000000 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsTypeModal.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsTypeModal__Style#Drawer.vue b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsTypeModal__Style#Drawer.vue deleted file mode 100644 index d6c89f7a..00000000 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/vue/modules/ZyClothsTypeModal__Style#Drawer.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - - - diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessComponentController.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessComponentController.java index 07a2b2e2..30971bdd 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessComponentController.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessComponentController.java @@ -22,6 +22,7 @@ import org.jeecg.modules.demo.pro.entity.ZyProcessComponent; import org.jeecg.modules.demo.pro.mapper.ZyProcessComponentMapper; import org.jeecg.modules.demo.pro.service.IZyProcessComponentService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; @@ -32,6 +33,7 @@ import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.stream.Collectors; /** * @Description: zy_process_component @@ -71,9 +73,21 @@ public class ZyProcessComponentController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(zyProcessComponent, req.getParameterMap()); Page page = new Page(pageNo, pageSize); IPage pageList = zyProcessComponentService.page(page, queryWrapper); + //在部件工序页面通过 工序代码 进行查询的时候 会有一个processCode参数 + if (StringUtils.hasText(zyProcessComponent.getProcessCode())){ + //System.err.println("processCode参数: " + zyProcessComponent.getProcessCode()); + List zyProcessList = zyProcessService.list(new LambdaQueryWrapper().like(ZyProcess::getProcessCode, zyProcessComponent.getProcessCode())); + List list = new ArrayList<>(); + zyProcessList.forEach(zyProcess -> list.addAll(zyProcessComponentService.list(new LambdaQueryWrapper().eq(ZyProcessComponent::getProcessId,zyProcess.getId())))); + List collect = list.stream().filter(zyProComponent -> zyProComponent.getComponentId().equals(zyProcessComponent.getComponentId())).collect(Collectors.toList()); + pageList.setRecords(collect); + } + pageList.getRecords().forEach(zy -> zy.setProcessCode(zyProcessMapper.getCodeByProcessId(zy.getProcessId()))); return Result.OK(pageList); } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessComponent.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessComponent.java index 13c5fa43..c1c96592 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessComponent.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessComponent.java @@ -1,6 +1,7 @@ package org.jeecg.modules.demo.pro.entity; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; @@ -40,10 +41,14 @@ public class ZyProcessComponent implements Serializable { @ApiModelProperty(value = "部件") private String componentId; /**工艺*/ - @Excel(name = "工艺", width = 15, dictTable = "zy_process", dicText = "process_name", dicCode = "id") + @Excel(name = "工序", width = 15) @Dict(dictTable = "zy_process", dicText = "process_name", dicCode = "id") - @ApiModelProperty(value = "工艺") + @ApiModelProperty(value = "工序") private String processId; + + /**工序代码*/ + @TableField(exist = false) + private String processCode; // /**是否瓶颈工序*/ // @Excel(name = "是否瓶颈工序", width = 15,dicCode = "pingjing") // @Dict(dicCode = "pingjing") diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyProcessModular/controller/ZyProcessModularController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyProcessModular/controller/ZyProcessModularController.java index 3fcc17df..43ce395e 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyProcessModular/controller/ZyProcessModularController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyProcessModular/controller/ZyProcessModularController.java @@ -65,6 +65,7 @@ public class ZyProcessModularController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(zyProcessModular, req.getParameterMap()); Page page = new Page(pageNo, pageSize); IPage pageList = zyProcessModularService.page(page, queryWrapper); @@ -73,11 +74,9 @@ public class ZyProcessModularController extends JeecgController zyProcessList = zyProcessService.list(new LambdaQueryWrapper().like(ZyProcess::getProcessCode,zyProcessModular.getProcessCode())); List modularList = new ArrayList<>(); - zyProcessList.forEach(zyProcess -> { - modularList.addAll(zyProcessModularService.list(new LambdaQueryWrapper().eq(ZyProcessModular::getProcessId, zyProcess.getId()))); - List collect = modularList.stream().filter(zyPModular -> zyPModular.getModularId().equals(zyProcessModular.getModularId())).collect(Collectors.toList()); - pageList.setRecords(collect); - }); + zyProcessList.forEach(zyProcess -> modularList.addAll(zyProcessModularService.list(new LambdaQueryWrapper().eq(ZyProcessModular::getProcessId, zyProcess.getId())))); + List collect = modularList.stream().filter(zyPModular -> zyPModular.getModularId().equals(zyProcessModular.getModularId())).collect(Collectors.toList()); + pageList.setRecords(collect); } //不怕空值 pageList.getRecords().forEach(zyProModular -> {