diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisTransPlanRuleMapper.java b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisTransPlanRuleMapper.java index b46290fa8..64c8cc1ef 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisTransPlanRuleMapper.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisTransPlanRuleMapper.java @@ -102,11 +102,12 @@ public interface EmisTransPlanRuleMapper { /** * 根据产品类型名称查询产品类型信息 - * + * * @param productTypeNames 产品类型名称列表 + * @param code 线路编码 * @return 产品类型信息列表 */ - public List> selectProductTypeInfoByNames(List productTypeNames); + public List> selectProductTypeInfoByNamesAndLineCode(@Param("productTypeNames") List productTypeNames, @Param("lineCode") String code); /** * 根据网点名称查询网点信息 diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTransPlanRuleServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTransPlanRuleServiceImpl.java index 58e3b302f..2147b20d1 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTransPlanRuleServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTransPlanRuleServiceImpl.java @@ -164,7 +164,7 @@ public class EmisTransPlanRuleServiceImpl extends EmisBaseService implements IEm // 产品类型(支持多个,逗号分隔) String[] productTypeNames = emisTransPlanRule.getProductTypeName().split(","); - List> productTypeInfo = emisTransPlanRuleMapper.selectProductTypeInfoByNames(Arrays.asList(productTypeNames)); + List> productTypeInfo = emisTransPlanRuleMapper.selectProductTypeInfoByNamesAndLineCode(Arrays.asList(productTypeNames),lineInfo.get(0).get("code")); if (productTypeInfo == null || productTypeInfo.isEmpty()) { throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "未找到对应的产品类型:" + emisTransPlanRule.getProductTypeName()); } diff --git a/emis-biz/src/main/resources/mapper/EmisTransPlanRuleMapper.xml b/emis-biz/src/main/resources/mapper/EmisTransPlanRuleMapper.xml index 2433ded5c..03696f49d 100644 --- a/emis-biz/src/main/resources/mapper/EmisTransPlanRuleMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisTransPlanRuleMapper.xml @@ -199,13 +199,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND del_flag = '0' - SELECT prod_code as code, prod_name as name FROM emis_trans_product WHERE prod_name IN - + #{name} + and trans_line_code =#{lineCode} AND del_flag = '0'