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
@ -104,9 +104,10 @@ public interface EmisTransPlanRuleMapper {
|
|||||||
* 根据产品类型名称查询产品类型信息
|
* 根据产品类型名称查询产品类型信息
|
||||||
*
|
*
|
||||||
* @param productTypeNames 产品类型名称列表
|
* @param productTypeNames 产品类型名称列表
|
||||||
|
* @param code 线路编码
|
||||||
* @return 产品类型信息列表
|
* @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(",");
|
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()) {
|
if (productTypeInfo == null || productTypeInfo.isEmpty()) {
|
||||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "未找到对应的产品类型:" + emisTransPlanRule.getProductTypeName());
|
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "未找到对应的产品类型:" + emisTransPlanRule.getProductTypeName());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -199,13 +199,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
AND del_flag = '0'
|
AND del_flag = '0'
|
||||||
</select>
|
</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
|
SELECT prod_code as code, prod_name as name
|
||||||
FROM emis_trans_product
|
FROM emis_trans_product
|
||||||
WHERE prod_name IN
|
WHERE prod_name IN
|
||||||
<foreach collection="list" item="name" open="(" separator="," close=")">
|
<foreach collection="productTypeNames" item="name" open="(" separator="," close=")">
|
||||||
#{name}
|
#{name}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
and trans_line_code =#{lineCode}
|
||||||
AND del_flag = '0'
|
AND del_flag = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user