diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdContractMachineryService.java b/xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdContractMachineryService.java new file mode 100644 index 00000000..ca0410b9 --- /dev/null +++ b/xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdContractMachineryService.java @@ -0,0 +1,14 @@ +package org.dromara.common.core.service; + +/** + * 机械合同信息Service接口 + * + * @author Lion Li + * @date 2025-11-12 + */ +public interface XzdContractMachineryService { + + String selectNmaeByIds(String ids); + + +} diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/constant/TransConstant.java b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/constant/TransConstant.java index dcfc8829..4acb435a 100644 --- a/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/constant/TransConstant.java +++ b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/constant/TransConstant.java @@ -53,6 +53,12 @@ public interface TransConstant { * 采购合同id转名称 */ String XZD_PURCHASE_CONTRACT_ID_TO_NAME = "xzd_purchase_contract_id_to_name"; + + /** + * 采购合同id转名称 + */ + String XZD_PURCHASE_JXXIE_ID_TO_NAME = "xzd_purchase_contract_jixie_id_to_name"; + /** * 综合服务合同id转名称 */ diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdJXHTTranslation.java b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdJXHTTranslation.java new file mode 100644 index 00000000..259d9420 --- /dev/null +++ b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdJXHTTranslation.java @@ -0,0 +1,27 @@ +package org.dromara.common.translation.core.impl; + + +import lombok.AllArgsConstructor; +import org.dromara.common.core.service.XzdContractMachineryService; +import org.dromara.common.core.service.XzdJsCgJungonService; +import org.dromara.common.translation.annotation.TranslationType; +import org.dromara.common.translation.constant.TransConstant; +import org.dromara.common.translation.core.TranslationInterface; + +@AllArgsConstructor +@TranslationType(type = TransConstant.XZD_PURCHASE_JXXIE_ID_TO_NAME) +public class XzdJXHTTranslation implements TranslationInterface { + + private final XzdContractMachineryService xzdContractMachineryService; + + @Override + public String translation(Object key, String other) { + if (key instanceof String ids) { + return xzdContractMachineryService.selectNmaeByIds(ids); + } else if (key instanceof Long id) { + return xzdContractMachineryService.selectNmaeByIds(id.toString()); + } + return null; + } + +} diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 249a5fe8..432b0264 100644 --- a/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -13,3 +13,4 @@ org.dromara.common.translation.core.impl.XzdCsContractInformationImpl org.dromara.common.translation.core.impl.XzdSupplierOpenBankImpl org.dromara.common.translation.core.impl.XzdProjectManagerApprovalImpl org.dromara.common.translation.core.impl.XzdCbysZjhcbImpl +org.dromara.common.translation.core.impl.XzdJXHTTranslation diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/jixiehetongbiang/service/impl/XzdMachineryContractAlterationServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/jixiehetongbiang/service/impl/XzdMachineryContractAlterationServiceImpl.java index 0f8499bc..7af5e95f 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/jixiehetongbiang/service/impl/XzdMachineryContractAlterationServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/jixiehetongbiang/service/impl/XzdMachineryContractAlterationServiceImpl.java @@ -220,8 +220,8 @@ public class XzdMachineryContractAlterationServiceImpl extends ServiceImpl implements IXzdContractMachineryService { +public class XzdContractMachineryServiceImpl extends ServiceImpl implements IXzdContractMachineryService , XzdContractMachineryService { private final XzdContractMachineryMapper baseMapper; @@ -234,8 +239,8 @@ public class XzdContractMachineryServiceImpl extends ServiceImpl list = new ArrayList<>(); + for (Long id : StringUtils.splitTo(ids, Convert::toLong)) { + XzdContractMachineryVo vo = SpringUtils.getAopProxy(this).getBaseMapper().selectVoById(id); + if (ObjectUtil.isNotNull(vo)) { + list.add(vo.getContractCode()); + } + } + return String.join(StringUtils.SEPARATOR, list); + } } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/jixiehetongzz/service/impl/XzdMachineryContractSuspendServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/jixiehetongzz/service/impl/XzdMachineryContractSuspendServiceImpl.java index 888ec3cc..73b387ce 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/jixiehetongzz/service/impl/XzdMachineryContractSuspendServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/jixiehetongzz/service/impl/XzdMachineryContractSuspendServiceImpl.java @@ -159,8 +159,8 @@ public class XzdMachineryContractSuspendServiceImpl extends ServiceImpl