Merge branch 'develop_migration' into 'develop_master'
feat: There is no way the, 政策库修改1 See merge request LiuChao/foton-slrs-system-rest!441
This commit is contained in:
+24
@@ -51,6 +51,7 @@ import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||
import com.adc.da.sys.constant.ValueStateEnum;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.adc.da.sys.util.LoginUserUtil;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.adc.da.utils.util.FieldConvertUtil;
|
||||
@@ -388,8 +389,18 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
}
|
||||
|
||||
public void attrInfoShowDetails(List<SarLawsStandInfo> sarlist) throws Exception {
|
||||
//查询字典表,形成Hash映射提升速度
|
||||
List<DicTypeEO> dicInfo = dicTypeEODao.getDicInfo("dic_type_code", "dic_type_name");
|
||||
Map<String, String> dicMap = dicInfo.stream()
|
||||
.filter(item-> !item.getDicTypeCode().isEmpty())
|
||||
.collect(Collectors.toMap(DicTypeEO::getDicTypeCode,DicTypeEO::getDicTypeName,(value1, value2 )->value2));
|
||||
|
||||
for (SarLawsStandInfo row : sarlist) {
|
||||
attrInfoDetails(row);
|
||||
row.setLawsSyqy(filterValue(dicMap,row.getLawsSyqy()));
|
||||
row.setLawsSycx(filterValue(dicMap,row.getLawsSycx()));
|
||||
row.setLawsLabel(filterValue(dicMap,row.getLawsLabel()));
|
||||
row.setLawsYear(filterValue(dicMap,row.getLawsYear()));
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
|
||||
@@ -412,6 +423,19 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
private String filterValue (Map<String, String> dicMap,String value){
|
||||
List<String> list = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
String[] valArr = value.split(",");
|
||||
for (String s : valArr) {
|
||||
if (dicMap.containsKey(s)){
|
||||
list.add(dicMap.get(s));
|
||||
}
|
||||
}
|
||||
}
|
||||
return String.join(",",list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarLawsStandInfo> getExportData(String exportType, String exportContent,String userId) throws Exception {
|
||||
SarLawsStandInfoPage page = new SarLawsStandInfoPage();
|
||||
|
||||
Reference in New Issue
Block a user