分解单查询接口 标准评估流程用
This commit is contained in:
+8
@@ -53,6 +53,14 @@ public class SarStandItemsController extends BaseController<SarStandItems> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "分解单查询")
|
||||||
|
@GetMapping("/findItemById")
|
||||||
|
public ResponseMessage findItemById( @RequestParam("type") String type,@RequestParam("ids") String ids){
|
||||||
|
String[] Sids=ids.split(",");
|
||||||
|
List<SarStandItemsDto> ItemDto = ServiceImpl.findItemById(type,Sids);
|
||||||
|
return Result.success("200",ItemDto);
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "项目评估流程分解单查询")
|
@ApiOperation(value = "项目评估流程分解单查询")
|
||||||
@GetMapping("/workflowFindItems")
|
@GetMapping("/workflowFindItems")
|
||||||
public ResponseMessage workflowFindItems( @RequestParam("ids") String ids,@RequestParam("types") String types){
|
public ResponseMessage workflowFindItems( @RequestParam("ids") String ids,@RequestParam("types") String types){
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ public interface SarStandItemsDao extends BaseMapper<SarStandItems> {
|
|||||||
|
|
||||||
List<SarStandItemsDto> selectAllItemsByIds(@Param("type") String type,@Param("ids") String[] ids);
|
List<SarStandItemsDto> selectAllItemsByIds(@Param("type") String type,@Param("ids") String[] ids);
|
||||||
|
|
||||||
|
List<SarStandItemsDto> findItemById(@Param("type") String type,@Param("ids") String[] ids);
|
||||||
|
|
||||||
StandsTimeDto selectStandTime(String standId);
|
StandsTimeDto selectStandTime(String standId);
|
||||||
|
|
||||||
List<StandsTimeDto> selectStandTimeAll();
|
List<StandsTimeDto> selectStandTimeAll();
|
||||||
|
|||||||
+37
@@ -220,6 +220,43 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<SarStandItemsDto> findItemById(String type,String[] ids){
|
||||||
|
List<SarStandItemsDto> list=dao.findItemById(type,ids);
|
||||||
|
List<SarStandItemsDto> res=new ArrayList<>();
|
||||||
|
List<SarStandItemsDto> chinese=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);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
chinese.add(sarStandItemsDto);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Collections.sort(integerList);
|
||||||
|
integerList.forEach(integer -> {
|
||||||
|
res.addAll(map.get(integer));
|
||||||
|
});
|
||||||
|
res.addAll(chinese);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<SarStandItems> querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
|
public List<SarStandItems> querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
|
||||||
//排序
|
//排序
|
||||||
|
|||||||
@@ -757,6 +757,20 @@
|
|||||||
</if>
|
</if>
|
||||||
order by ITEMS_NUM
|
order by ITEMS_NUM
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="findItemById" resultType="com.adc.da.slrs.sarStandItems.entity.SarStandItemsDto">
|
||||||
|
select ID,STAND_ID,ITEMS_NUM,ITEMS_NAME,RESPONSIBLE_UNIT,SVPPS,APPLY_ARCTIC,CLAIM_TYPE,BUS_STAND_COVER,DUTY_ENGINEER as responsibleEngineer,XCXSSRQ as xcxssrq,ZCCSSRQ as zccssrq ,read_content as technicalRequir ,compared_with_previous as changePoint
|
||||||
|
,TERMS_CONDITIONS as termsConditions
|
||||||
|
from SAR_STAND_ITEMS
|
||||||
|
where FILE_TYPE=#{type}
|
||||||
|
<if test="ids != null">
|
||||||
|
and ID in
|
||||||
|
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
order by ITEMS_NUM
|
||||||
|
</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
|
||||||
from sar_stand_attr_info
|
from sar_stand_attr_info
|
||||||
|
|||||||
Reference in New Issue
Block a user