Merge branch 'develop_3' into 'develop_master'

Develop 3

See merge request LiuChao/foton-slrs-system-rest!173
This commit is contained in:
super_liu
2021-09-16 09:15:15 +08:00
3 changed files with 34 additions and 0 deletions
@@ -201,6 +201,22 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
//分页查询的总数
Integer count=dao.sarItemCount(page);
page.getPager().setRowCount(count);
//排序
if (page.getOrderBy()!=null && page.getOrder()!=null){
switch (page.getOrderBy()){
case "itemsNum" : page.setOrderBy("ITEMS_NUM"); break;
default:page.setOrderBy("ITEMS_NUM"); page.setOrder("DESC");
}
switch (page.getOrder()){
case "descending":page.setOrder("DESC");break;
default:page.setOrder("ASC");
}
}
List<SarStandItems> sarStandItems = dao.querySarItemAndInterpretation(page);
return sarStandItems;
}
@@ -439,11 +439,16 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
return resultMap;
}
public void attrInfoShowDetails(List<SarStandardsInfo> sarlist) throws Exception {
for (SarStandardsInfo row : sarlist) {
attrInfoDetails(row);
Map<String, Object> getAttrMap = row.getAttrInfoMap();
if (getAttrMap != null && getAttrMap.size() > 0) {
//存在的分解单文本名称列表
LinkedList<String> itemExistList = new LinkedList<>();
getAttrMap.put("itemExistList",itemExistList);
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
String name = entry.getKey();
String value = "";
@@ -452,6 +457,15 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
if (StringUtils.isNotBlank(value)) {
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
entry.setValue(fileObj);
//以标准id和文本类型查询分解单表 有数据设标记为为 1
FindSarItemsPageReqDTO sarItemCount = new FindSarItemsPageReqDTO();
sarItemCount.setStandId(row.getId());
sarItemCount.setFileType(name);
Integer sarItemsCount = standItemsDao.sarItemCount(sarItemCount);
if (sarItemsCount>0){
//存在分解单的文本名称存入列表
itemExistList.add(name);
}
}
}else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
value = entry.getValue().toString();
@@ -412,6 +412,10 @@
FROM
sar_stand_items
<include refid="sarItemWhere"/>
<if test="orderBy !=null and orderBy!=''">
order by ${orderBy} ${order}
</if>
LIMIT #{page},#{pageSize}
</select>