Merge pull request 'demand: 批量导入线路规则bug修改' (#53) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/53
This commit is contained in:
commit
3ede36e863
@ -102,11 +102,12 @@ public interface EmisTransPlanRuleMapper {
|
||||
|
||||
/**
|
||||
* 根据产品类型名称查询产品类型信息
|
||||
*
|
||||
*
|
||||
* @param productTypeNames 产品类型名称列表
|
||||
* @param code 线路编码
|
||||
* @return 产品类型信息列表
|
||||
*/
|
||||
public List<Map<String, String>> selectProductTypeInfoByNames(List<String> productTypeNames);
|
||||
public List<Map<String, String>> selectProductTypeInfoByNamesAndLineCode(@Param("productTypeNames") List<String> productTypeNames, @Param("lineCode") String code);
|
||||
|
||||
/**
|
||||
* 根据网点名称查询网点信息
|
||||
|
||||
@ -164,7 +164,7 @@ public class EmisTransPlanRuleServiceImpl extends EmisBaseService implements IEm
|
||||
|
||||
// 产品类型(支持多个,逗号分隔)
|
||||
String[] productTypeNames = emisTransPlanRule.getProductTypeName().split(",");
|
||||
List<Map<String, String>> productTypeInfo = emisTransPlanRuleMapper.selectProductTypeInfoByNames(Arrays.asList(productTypeNames));
|
||||
List<Map<String, String>> productTypeInfo = emisTransPlanRuleMapper.selectProductTypeInfoByNamesAndLineCode(Arrays.asList(productTypeNames),lineInfo.get(0).get("code"));
|
||||
if (productTypeInfo == null || productTypeInfo.isEmpty()) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "未找到对应的产品类型:" + emisTransPlanRule.getProductTypeName());
|
||||
}
|
||||
|
||||
@ -199,13 +199,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectProductTypeInfoByNames" parameterType="java.util.List" resultType="java.util.Map">
|
||||
<select id="selectProductTypeInfoByNamesAndLineCode" parameterType="java.util.List" resultType="java.util.Map">
|
||||
SELECT prod_code as code, prod_name as name
|
||||
FROM emis_trans_product
|
||||
WHERE prod_name IN
|
||||
<foreach collection="list" item="name" open="(" separator="," close=")">
|
||||
<foreach collection="productTypeNames" item="name" open="(" separator="," close=")">
|
||||
#{name}
|
||||
</foreach>
|
||||
and trans_line_code =#{lineCode}
|
||||
AND del_flag = '0'
|
||||
</select>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user