From 99d6db0aab044b740ce02f57872c1e38ae647b58 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期二, 29 七月 2025 19:00:50 +0800 Subject: [PATCH] 三不原则分析 中心修改 台账导入导出字段修改 --- lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/MdcProductionServiceImpl.java | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/MdcProductionServiceImpl.java b/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/MdcProductionServiceImpl.java index d517ef0..921d363 100644 --- a/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/MdcProductionServiceImpl.java +++ b/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/MdcProductionServiceImpl.java @@ -1,10 +1,13 @@ package org.jeecg.modules.system.service.impl; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.apache.commons.lang3.StringUtils; import org.jeecg.common.constant.CommonConstant; +import org.jeecg.common.constant.FillRuleConstant; +import org.jeecg.common.util.FillRuleUtil; import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.system.entity.MdcProduction; import org.jeecg.modules.system.entity.MdcProductionEquipment; @@ -122,6 +125,15 @@ mdcProduction.setParentId(""); } mdcProduction.setId(IdWorker.getIdStr(mdcProduction)); + // 鍏堝垽鏂瀵硅薄鏈夋棤鐖剁骇ID,鏈夊垯鎰忓懗鐫�涓嶆槸鏈�楂樼骇,鍚﹀垯鎰忓懗鐫�鏄渶楂樼骇 + // 鑾峰彇鐖剁骇ID + String parentId = mdcProduction.getParentId(); + JSONObject formData = new JSONObject(); + formData.put("parentId",parentId); + String[] codeArray = (String[]) FillRuleUtil.executeRule(FillRuleConstant.PRODUCTION,formData); + mdcProduction.setOrgCode(codeArray[0]); + String orgType = codeArray[1]; + mdcProduction.setOrgType(String.valueOf(orgType)); mdcProduction.setDelFlag(CommonConstant.DEL_FLAG_0.toString()); this.save(mdcProduction); } @@ -205,6 +217,38 @@ } /** + * 閫掑綊鏌ヨ鎵�鏈夊瓙鑺傜偣id + */ + @Override + public List<String> recursionChildren(String productionId) { + return this.baseMapper.recursionChildren(productionId); + } + + /** + * 鏍规嵁鐢ㄦ埛id鍜岃溅闂磇d鑾峰彇鐢ㄦ埛鎷ユ湁鐨勮溅闂磇d + * @param userId + * @param productionId + * @return + */ + @Override + public String findFirstProduction(String userId, String productionId) { + return this.baseMapper.findFirstProduction(userId, productionId); + } + + /** + * 鏍规嵁鐢ㄦ埛id鏌ヨ鐢ㄦ埛宸ユ鏉冮檺 + */ + @Override + public String findThreeProductionId(String userId) { + return this.baseMapper.findThreeProductionId(userId); + } + + @Override + public MdcProduction findProductionList(String equipmentId) { + return this.baseMapper.findProductionList(equipmentId); + } + + /** * delete 鏂规硶璋冪敤 閫掑綊鏌ユ壘瀛愰泦id */ private void checkChildrenExists(String id, List<String> idList) { -- Gitblit v1.9.3