不良代码待办事项

赵嘉伟 4 years ago
parent 6402fb0ed2
commit 1916916935

@ -128,8 +128,8 @@ public class NcCodeController {
*
*/
@GetMapping("/findNcByNG")
public R findNcByNG(String messageType){
return R.ok(ncCodeService.findNcByNG(messageType));
public R findNcByNG(String messageType,String ncCode){
return R.ok(ncCodeService.findNcByNG(messageType,ncCode));
}
@GetMapping("findSecondaryNcByNc")

@ -17,7 +17,10 @@ import java.util.List;
*/
@Repository
public interface NcCodeMapper extends BaseMapper<NcCode> {
List<NcCode> findNcByNG(@Param("site")String site, @Param("locale")String locale, @Param("messageType")String messageType);
List<NcCode> findNcByNG(@Param("site")String site,
@Param("locale")String locale,
@Param("messageType")String messageType,
@Param("ncCode")String ncCode);
List<NcCode> findSecondaryNcByNc(@Param("site")String site,@Param("locale")String locale,@Param("ncCode")String ncCode);
}

@ -26,7 +26,7 @@ public interface NcCodeService extends IService<NcCode> {
List<NcCode> selectList(NcCode ncCode);
List<NcCode> findNcByNG(String messageType);
List<NcCode> findNcByNG(String messageType,String ncCode);
List<NcCode> findSecondaryNcByNc(String ncCode);
}

@ -46,10 +46,10 @@ public class NcCodeServiceImpl extends ServiceImpl<NcCodeMapper, NcCode> impleme
}
@Override
public List<NcCode> findNcByNG(String messageType) {
public List<NcCode> findNcByNG(String messageType,String ncCode) {
String site = CommonMethods.getSite();
String locale = LocaleContextHolder.getLocale().getLanguage();
return ncCodeMapper.findNcByNG(site,locale,messageType);
return ncCodeMapper.findNcByNG(site,locale,messageType,ncCode);
}
@Override

@ -353,7 +353,15 @@
INNER JOIN NC_CODE NC ON NC.HANDLE = NGM.NC_CODE_OR_GROUP_GBO
INNER JOIN NC_CODE_DEF NCD ON NC.HANDLE = NCD.NC_CODE_OR_GROUP_GBO AND NCD.CAN_BE_PRIMARY_CODE = 'true'
INNER JOIN NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE AND NCT.LOCALE = #{locale}
WHERE NG.NC_GROUP = #{messageType} AND NG.SITE = #{site}
<where>
NG.SITE = #{site}
<if test="messageType != null and messageType != ''">
AND NG.NC_GROUP =#{messageType}
</if>
<if test="ncCode != null and ncCode != ''">
AND NC.NC_CODE = #{ncCode}
</if>
</where>
</select>
<select id="findSecondaryNcByNc" resultMap="BaseResultMap">

Loading…
Cancel
Save