Merge branch 'develop_master' into develop_migration
This commit is contained in:
+1
-2
@@ -55,8 +55,7 @@ public class SarPublicIdeaServiceImpl extends ServiceImpl<SarPublicIdeaDao, SarP
|
|||||||
} else {
|
} else {
|
||||||
list.like(StringUtils.isNotEmpty(category), "category", category)
|
list.like(StringUtils.isNotEmpty(category), "category", category)
|
||||||
.like(StringUtils.isNotEmpty(cname), "cname", cname)
|
.like(StringUtils.isNotEmpty(cname), "cname", cname)
|
||||||
.ge(start != null, "start_time", start)
|
.ge("end_time", new Date())
|
||||||
.le(end != null, "end_time", end)
|
|
||||||
.orderByAsc("end_time");
|
.orderByAsc("end_time");
|
||||||
}
|
}
|
||||||
Page<SarPublicIdea> page = new Page<>(p, size);
|
Page<SarPublicIdea> page = new Page<>(p, size);
|
||||||
|
|||||||
+46
-3
@@ -19,8 +19,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -193,7 +192,35 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<SarStandItemsDto> findAllItems(String type,String[] ids){
|
public List<SarStandItemsDto> findAllItems(String type,String[] ids){
|
||||||
return dao.selectAllItemsByIds(type,ids);
|
List<SarStandItemsDto> list=dao.selectAllItemsByIds(type,ids);
|
||||||
|
List<SarStandItemsDto> res=new ArrayList<>();
|
||||||
|
if (null == list || list.isEmpty()){
|
||||||
|
return list;
|
||||||
|
}else {
|
||||||
|
List<Integer> integerList=new ArrayList<>();
|
||||||
|
Map<Integer,List<SarStandItemsDto>> map=new HashMap<>();
|
||||||
|
list.forEach(sarStandItemsDto -> {
|
||||||
|
int a= sarStandItemsDto.getItemsNum().indexOf(".");
|
||||||
|
String mark=sarStandItemsDto.getItemsNum();
|
||||||
|
if (a>0){
|
||||||
|
mark=mark.substring(0,a);
|
||||||
|
}
|
||||||
|
if (null != map.get(Integer.valueOf(mark))){
|
||||||
|
map.get(Integer.valueOf(mark)).add(sarStandItemsDto);
|
||||||
|
}else {
|
||||||
|
integerList.add(Integer.valueOf(mark));
|
||||||
|
List<SarStandItemsDto> middle=new ArrayList<>();
|
||||||
|
middle.add(sarStandItemsDto);
|
||||||
|
map.put(Integer.valueOf(mark),middle);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Collections.sort(integerList);
|
||||||
|
integerList.forEach(integer -> {
|
||||||
|
res.addAll(map.get(integer));
|
||||||
|
});
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -201,6 +228,22 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
|||||||
//分页查询的总数
|
//分页查询的总数
|
||||||
Integer count=dao.sarItemCount(page);
|
Integer count=dao.sarItemCount(page);
|
||||||
page.getPager().setRowCount(count);
|
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);
|
List<SarStandItems> sarStandItems = dao.querySarItemAndInterpretation(page);
|
||||||
return sarStandItems;
|
return sarStandItems;
|
||||||
}
|
}
|
||||||
|
|||||||
+14
@@ -439,11 +439,16 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void attrInfoShowDetails(List<SarStandardsInfo> sarlist) throws Exception {
|
public void attrInfoShowDetails(List<SarStandardsInfo> sarlist) throws Exception {
|
||||||
for (SarStandardsInfo row : sarlist) {
|
for (SarStandardsInfo row : sarlist) {
|
||||||
attrInfoDetails(row);
|
attrInfoDetails(row);
|
||||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||||
|
//存在的分解单文本名称列表
|
||||||
|
LinkedList<String> itemExistList = new LinkedList<>();
|
||||||
|
getAttrMap.put("itemExistList",itemExistList);
|
||||||
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
|
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
|
||||||
String name = entry.getKey();
|
String name = entry.getKey();
|
||||||
String value = "";
|
String value = "";
|
||||||
@@ -452,6 +457,15 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
if (StringUtils.isNotBlank(value)) {
|
if (StringUtils.isNotBlank(value)) {
|
||||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||||
entry.setValue(fileObj);
|
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)) {
|
}else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
|
||||||
value = entry.getValue().toString();
|
value = entry.getValue().toString();
|
||||||
|
|||||||
@@ -412,6 +412,10 @@
|
|||||||
FROM
|
FROM
|
||||||
sar_stand_items
|
sar_stand_items
|
||||||
<include refid="sarItemWhere"/>
|
<include refid="sarItemWhere"/>
|
||||||
|
|
||||||
|
<if test="orderBy !=null and orderBy!=''">
|
||||||
|
order by ${orderBy} ${order}
|
||||||
|
</if>
|
||||||
LIMIT #{page},#{pageSize}
|
LIMIT #{page},#{pageSize}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
@@ -738,6 +742,7 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
order by ITEMS_NUM
|
||||||
</select>
|
</select>
|
||||||
<select id="selectStandTime" resultType="com.adc.da.slrs.sarStandItems.entity.StandsTimeDto">
|
<select id="selectStandTime" resultType="com.adc.da.slrs.sarStandItems.entity.StandsTimeDto">
|
||||||
select STAND_ID,XCXSSRQ,ZCCSSRQ
|
select STAND_ID,XCXSSRQ,ZCCSSRQ
|
||||||
|
|||||||
+1
-1
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
<if test="userName != null">
|
<if test="userName != null">
|
||||||
|
|
||||||
where u.uname like concat('%','${userName}','%')
|
where u.uname like concat('%','${userName}','%') or u.account like concat('%','${userName}','%')
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
+2
@@ -50,6 +50,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
||||||
and STAND_SERIAL_NUMBER like concat(concat('%',#{sar.standSerialNumber}),'%')
|
and STAND_SERIAL_NUMBER like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||||
|
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||||
</if>
|
</if>
|
||||||
limit #{start},#{end}
|
limit #{start},#{end}
|
||||||
</select>
|
</select>
|
||||||
@@ -73,6 +74,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
||||||
and STAND_SERIAL_NUMBER like concat(concat('%',#{sar.standSerialNumber}),'%')
|
and STAND_SERIAL_NUMBER like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||||
|
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user