项目库相关人员-导入校验
This commit is contained in:
-1
@@ -28,7 +28,6 @@
|
||||
where s.dict_id = (select id from sys_dict where dict_code = #{code})
|
||||
and s.item_text = #{text}
|
||||
</select>
|
||||
|
||||
<!--通过查询指定table的 text code 获取字典-->
|
||||
<select id="queryTableDictItemsByCode" parameterType="String" resultType="com.jero.common.system.vo.DictModel">
|
||||
select ${text} as "text",${code} as "value" from ${table}
|
||||
|
||||
+2
@@ -167,4 +167,6 @@ public interface ISysDictService extends IService<SysDict> {
|
||||
|
||||
/**根据字典code查询中英文名*/
|
||||
String queryDictItemByName(String code, String itemName, String cut);
|
||||
|
||||
String queryDictItemByValue(String code, String itemName, String cut);
|
||||
}
|
||||
|
||||
+12
-3
@@ -428,14 +428,23 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String queryDictItemByName(String code,String itemName,String cut) {
|
||||
public String queryDictItemByName(String code, String itemName, String cut) {
|
||||
String itemValue = sysDictMapper.queryDictKeyByText(code, itemName);
|
||||
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
String dictItemsCnName = sysDictMapper.queryDictTextByKey(code,itemName);
|
||||
String dictItemsCnName = sysDictMapper.queryDictTextByKey(code,itemValue);
|
||||
return dictItemsCnName;
|
||||
}else {
|
||||
String dictItemsEnName = sysDictMapper.queryDictTextByKeyEn(code,itemName);
|
||||
String dictItemsEnName = sysDictMapper.queryDictTextByKeyEn(code,itemValue);
|
||||
return dictItemsEnName;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String queryDictItemByValue(String code, String itemValue, String cut) {
|
||||
|
||||
String dictItemValue= sysDictMapper.queryDictTextByKey(code,itemValue);
|
||||
return dictItemValue;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user