Merge remote-tracking branch 'origin/develop_master' into develop_3
This commit is contained in:
+28
-23
@@ -155,24 +155,24 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
|||||||
page.setPageSize(findStandDto.getSize());
|
page.setPageSize(findStandDto.getSize());
|
||||||
page.setUserId(null);
|
page.setUserId(null);
|
||||||
List<SarStandardsInfo> pageInfo = null;
|
List<SarStandardsInfo> pageInfo = null;
|
||||||
try {
|
// try {
|
||||||
pageInfo = sarStandardsInfoService.getSarStandardsInfoPageBak(page);
|
// pageInfo = sarStandardsInfoService.getSarStandardsInfoPageBak(page);
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
// }
|
||||||
List<String> standId = new ArrayList<>();
|
List<String> standId = new ArrayList<>();
|
||||||
for (SarStandardsInfo standardsInfo : pageInfo){
|
// for (SarStandardsInfo standardsInfo : pageInfo){
|
||||||
if (standardsInfo.getAttrInfoCaseMap().get("FBGBJBD")!=null || standardsInfo.getAttrInfoCaseMap().get("fbgbjbd")!=null){
|
//// if (standardsInfo.getAttrInfoCaseMap().get("FBGBJBD")!=null || standardsInfo.getAttrInfoCaseMap().get("fbgbjbd")!=null){
|
||||||
standId.add(standardsInfo.getId());
|
// standId.add(standardsInfo.getId());
|
||||||
}
|
//// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
List<LawsDto> list=new ArrayList<>();
|
List<LawsDto> list=new ArrayList<>();
|
||||||
if (standId==null || standId.size()==0){
|
// if (standId==null || standId.size()==0){
|
||||||
list = null;
|
// list = null;
|
||||||
}else {
|
// }else {
|
||||||
list = sarLawsAttrDetailedListDao.selectLawsByIdC((findStandDto.getPage()-1)*findStandDto.getSize(),findStandDto.getPage()*findStandDto.getSize(),standId,findStandDto.getStandName(), findStandDto.getStandType(),findStandDto.getFileType());
|
list = sarLawsAttrDetailedListDao.selectLawsByIdC((findStandDto.getPage()-1)*findStandDto.getSize(),findStandDto.getPage()*findStandDto.getSize(),standId,findStandDto.getStandName(), findStandDto.getStandType(),findStandDto.getFileType());
|
||||||
}
|
// }
|
||||||
IPage<LawsDto> page1=new Page<>();
|
IPage<LawsDto> page1=new Page<>();
|
||||||
page1.setRecords(list);
|
page1.setRecords(list);
|
||||||
page1.setTotal(sarLawsAttrDetailedListDao.selectLawsByIdCount(standId,findStandDto.getStandName(),findStandDto.getStandType(),findStandDto.getFileType()).size());
|
page1.setTotal(sarLawsAttrDetailedListDao.selectLawsByIdCount(standId,findStandDto.getStandName(),findStandDto.getStandType(),findStandDto.getFileType()).size());
|
||||||
@@ -195,6 +195,7 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
|||||||
public List<SarStandItemsDto> findAllItems(String type,String[] ids){
|
public List<SarStandItemsDto> findAllItems(String type,String[] ids){
|
||||||
List<SarStandItemsDto> list=dao.selectAllItemsByIds(type,ids);
|
List<SarStandItemsDto> list=dao.selectAllItemsByIds(type,ids);
|
||||||
List<SarStandItemsDto> res=new ArrayList<>();
|
List<SarStandItemsDto> res=new ArrayList<>();
|
||||||
|
List<SarStandItemsDto> chinese=new ArrayList<>();
|
||||||
if (null == list || list.isEmpty()){
|
if (null == list || list.isEmpty()){
|
||||||
return list;
|
return list;
|
||||||
}else {
|
}else {
|
||||||
@@ -206,20 +207,24 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
|||||||
if (a>0){
|
if (a>0){
|
||||||
mark=mark.substring(0,a);
|
mark=mark.substring(0,a);
|
||||||
}
|
}
|
||||||
if (null != map.get(Integer.valueOf(mark))){
|
try {
|
||||||
map.get(Integer.valueOf(mark)).add(sarStandItemsDto);
|
if (null != map.get(Integer.valueOf(mark))) {
|
||||||
}else {
|
map.get(Integer.valueOf(mark)).add(sarStandItemsDto);
|
||||||
integerList.add(Integer.valueOf(mark));
|
} else {
|
||||||
List<SarStandItemsDto> middle=new ArrayList<>();
|
integerList.add(Integer.valueOf(mark));
|
||||||
middle.add(sarStandItemsDto);
|
List<SarStandItemsDto> middle = new ArrayList<>();
|
||||||
map.put(Integer.valueOf(mark),middle);
|
middle.add(sarStandItemsDto);
|
||||||
}
|
map.put(Integer.valueOf(mark), middle);
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
chinese.add(sarStandItemsDto);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Collections.sort(integerList);
|
Collections.sort(integerList);
|
||||||
integerList.forEach(integer -> {
|
integerList.forEach(integer -> {
|
||||||
res.addAll(map.get(integer));
|
res.addAll(map.get(integer));
|
||||||
});
|
});
|
||||||
|
res.addAll(chinese);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+23
@@ -56,6 +56,29 @@ public class SarStandUnqualifiedController extends BaseController<SarStandUnqual
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("未符合项整改新增")
|
||||||
|
@PostMapping("/addOne")
|
||||||
|
public ResponseMessage<Object> add(@RequestBody SarStandUnqualified sarStandUnqualified){
|
||||||
|
sarStandUnqualified.setCreateTime(new Date());
|
||||||
|
if (sarStandUnqualifiedService.save(sarStandUnqualified)) {
|
||||||
|
return Result.success("新增成功");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return Result.error("新增失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("未符合项整改新增")
|
||||||
|
@PostMapping("/updateOne")
|
||||||
|
public ResponseMessage<Object> update(@RequestBody SarStandUnqualified sarStandUnqualified){
|
||||||
|
if (sarStandUnqualifiedService.updateById(sarStandUnqualified)) {
|
||||||
|
return Result.success("新增成功");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return Result.error("新增失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询未符合项
|
* 分页查询未符合项
|
||||||
* @param sarStandUnqualifiedPage:筛选、分页信息
|
* @param sarStandUnqualifiedPage:筛选、分页信息
|
||||||
|
|||||||
+87
-78
@@ -99,95 +99,43 @@
|
|||||||
order by number
|
order by number
|
||||||
</select>
|
</select>
|
||||||
<select id="selectLawsByIdC" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
|
<select id="selectLawsByIdC" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
|
||||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
select distinct c.ID,c.* from (
|
||||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
|
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as
|
||||||
|
SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||||
|
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as
|
||||||
|
standSortShow,
|
||||||
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||||
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
FROM sar_stand_items ssi
|
||||||
a.ID = b.STAND_ID
|
left join sar_standards_info a on ssi.stand_id = a.id
|
||||||
left join sar_stand_items ssi on ssi.stand_id = a.id
|
LEFT JOIN sar_stand_attr_info b on a.ID = b.STAND_ID
|
||||||
<where>
|
<where>
|
||||||
|
1=1
|
||||||
<if test="standName != null">
|
<if test="standName != null">
|
||||||
|
and
|
||||||
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||||
and
|
|
||||||
</if>
|
</if>
|
||||||
<if test="fileType !=null">
|
<if test="fileType !=null">
|
||||||
ssi.FILE_TYPE = #{fileType} and
|
and ssi.FILE_TYPE = #{fileType}
|
||||||
</if>
|
</if>
|
||||||
<if test="standType !=null">
|
<if test="standType !=null">
|
||||||
a.STAND_TYPE = #{standType} and
|
and a.STAND_TYPE = #{standType}
|
||||||
</if>
|
</if>
|
||||||
a.ID IN
|
<if test="param1 != null and param1.size()>0">
|
||||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
and a.ID IN
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</where>
|
|
||||||
|
|
||||||
UNION
|
|
||||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
|
||||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
|
|
||||||
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
|
||||||
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
|
||||||
a.ID = b.STAND_ID
|
|
||||||
left join sar_stand_items ssi on ssi.stand_id = a.id
|
|
||||||
<where>
|
|
||||||
<if test="standName != null">
|
|
||||||
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
|
||||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
|
||||||
and
|
|
||||||
</if>
|
|
||||||
<if test="fileType !=null">
|
|
||||||
ssi.FILE_TYPE = #{fileType} and
|
|
||||||
</if>
|
|
||||||
<if test="standType !=null">
|
|
||||||
a.STAND_TYPE = #{standType} and
|
|
||||||
</if>
|
|
||||||
a.ID IN
|
|
||||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</where>
|
|
||||||
limit #{start},#{end}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectLawsByIdCount" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
|
|
||||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
|
||||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
|
|
||||||
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
|
||||||
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
|
||||||
a.ID = b.STAND_ID
|
|
||||||
left join sar_stand_items ssi on ssi.stand_id = a.id
|
|
||||||
<where>
|
|
||||||
<if test="standName != null">
|
|
||||||
and
|
|
||||||
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
|
||||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
|
||||||
|
|
||||||
</if>
|
|
||||||
<if test="fileType !=null">
|
|
||||||
and
|
|
||||||
ssi.FILE_TYPE = #{fileType}
|
|
||||||
</if>
|
|
||||||
<if test="standType !=null">
|
|
||||||
and
|
|
||||||
a.STAND_TYPE = #{standType}
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<if test="param1 !=null and param1.size()>0 " >
|
|
||||||
and
|
|
||||||
a.ID IN
|
|
||||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
UNION
|
|
||||||
|
UNION all
|
||||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
|
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
|
||||||
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||||
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
FROM sar_stand_items ssi
|
||||||
a.ID = b.STAND_ID
|
left join sar_standards_info a on ssi.stand_id = a.id
|
||||||
left join sar_stand_items ssi on ssi.stand_id = a.id
|
LEFT JOIN sar_stand_attr_info b on a.ID = b.STAND_ID
|
||||||
<where>
|
<where>
|
||||||
1=1
|
1=1
|
||||||
<if test="standName != null">
|
<if test="standName != null">
|
||||||
@@ -196,21 +144,82 @@
|
|||||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="fileType !=null">
|
<if test="fileType !=null">
|
||||||
and
|
and ssi.FILE_TYPE = #{fileType}
|
||||||
ssi.FILE_TYPE = #{fileType}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="standType !=null">
|
<if test="standType !=null">
|
||||||
and
|
and a.STAND_TYPE = #{standType}
|
||||||
a.STAND_TYPE = #{standType}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="param1 !=null and param1.size()>0 " >
|
<if test="param1 != null and param1.size()>0">
|
||||||
and
|
and a.ID IN
|
||||||
a.ID IN
|
|
||||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
)c
|
||||||
|
limit #{start},#{end}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectLawsByIdCount" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
|
||||||
|
select distinct c.ID,c.* from (
|
||||||
|
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as
|
||||||
|
SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||||
|
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as
|
||||||
|
standSortShow,
|
||||||
|
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||||
|
FROM sar_stand_items ssi
|
||||||
|
left join sar_standards_info a on ssi.stand_id = a.id
|
||||||
|
LEFT JOIN sar_stand_attr_info b on a.ID = b.STAND_ID
|
||||||
|
<where>
|
||||||
|
1=1
|
||||||
|
<if test="standName != null">
|
||||||
|
and
|
||||||
|
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||||
|
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||||
|
</if>
|
||||||
|
<if test="fileType !=null">
|
||||||
|
and ssi.FILE_TYPE = #{fileType}
|
||||||
|
</if>
|
||||||
|
<if test="standType !=null">
|
||||||
|
and a.STAND_TYPE = #{standType}
|
||||||
|
</if>
|
||||||
|
<if test="param1 != null and param1.size()>0">
|
||||||
|
and a.ID IN
|
||||||
|
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
UNION all
|
||||||
|
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as
|
||||||
|
SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||||
|
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as
|
||||||
|
standSortShow,
|
||||||
|
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||||
|
FROM sar_stand_items ssi
|
||||||
|
left join sar_standards_info a on ssi.stand_id = a.id
|
||||||
|
LEFT JOIN sar_stand_attr_info b on a.ID = b.STAND_ID
|
||||||
|
<where>
|
||||||
|
1=1
|
||||||
|
<if test="standName != null">
|
||||||
|
and
|
||||||
|
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||||
|
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||||
|
</if>
|
||||||
|
<if test="fileType !=null">
|
||||||
|
and ssi.FILE_TYPE = #{fileType}
|
||||||
|
</if>
|
||||||
|
<if test="standType !=null">
|
||||||
|
and a.STAND_TYPE = #{standType}
|
||||||
|
</if>
|
||||||
|
<if test="param1 != null and param1.size()>0">
|
||||||
|
and a.ID IN
|
||||||
|
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
)c
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectTimes" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.StandRegionalTimeDto">
|
<select id="selectTimes" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.StandRegionalTimeDto">
|
||||||
|
|||||||
Reference in New Issue
Block a user