Merge remote-tracking branch 'origin/develop_master' into develop_master

This commit is contained in:
super_liu
2021-08-10 14:56:55 +08:00
9 changed files with 69 additions and 29 deletions
@@ -30,7 +30,8 @@ public interface SarLawsAttrDetailedListDao extends BaseMapper<SarLawsAttrDetail
//用于导出
List<LawsDto> selectLawsByIdE(@Param("param1") List<String> LawsIds);
//根据标准id查出数据
List<LawsDto> selectLawsByIdC(@Param("param1") List<String> LawsIds, @Param("standName") String standName,@Param("standType")String standType);
List<LawsDto> selectLawsByIdC(@Param("start")Integer start,@Param("end")Integer end,@Param("param1") List<String> LawsIds, @Param("standName") String standName,@Param("standType")String standType,@Param("fileType")String fileType);
List<LawsDto> selectLawsByIdCount(@Param("param1") List<String> LawsIds, @Param("standName") String standName,@Param("standType")String standType,@Param("fileType")String fileType);
//查询时间
List<StandRegionalTimeDto> selectTimes(String standId);
List<String> selectLawsId2(String standId);
@@ -60,5 +60,8 @@ public class SarPublicIdea extends BaseEntity {
@TableField("stand_id")
private String standId;
@TableField("stand_type")
private String standType;
}
@@ -78,7 +78,7 @@ public class SarStandItemsController extends BaseController<SarStandItems> {
}
@ApiOperation(value = "标准查询")
@ApiOperation(value = "标准批量保存")
@PostMapping("/saveBatch")
public String saveBatch(@RequestBody List<SarStandItems> findStandDto){
findStandDto.forEach(sarStandItems -> sarStandItems.setId(UUIDUtils.randomUUID(32)));
@@ -14,4 +14,5 @@ public class FindStandDto {
private int size;
private String standName;
private String standType;
private String fileType;
}
@@ -44,4 +44,8 @@ public class SarStandItemsDto {
@ApiModelProperty(value = "覆盖关系")
private String busStandCover;
private String xcxssrq;
private String zccssrq;
}
@@ -85,8 +85,8 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
.itemsName(sarStandItemsDto.getItemsName())
.itemsNum(sarStandItemsDto.getItemsNum())
.responsibleUnit(sarStandItemsDto.getResponsibleUnit())
.XCXSSRQ(standsTimeDto.getXCXSSRQ())
.ZCCSSRQ(standsTimeDto.getZCCSSRQ())
.XCXSSRQ(sarStandItemsDto.getXcxssrq())
.ZCCSSRQ(sarStandItemsDto.getZccssrq())
.svpps(sarStandItemsDto.getSvpps())
.applyArctic(sarStandItemsDto.getApplyArctic())
.claimType(sarStandItemsDto.getClaimType())
@@ -108,8 +108,8 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
.itemsName(sarStandItemsDto.getItemsName())
.itemsNum(sarStandItemsDto.getItemsNum())
.responsibleUnit(sarStandItemsDto.getResponsibleUnit())
.XCXSSRQ(standsTimeDto.getXCXSSRQ())
.ZCCSSRQ(standsTimeDto.getZCCSSRQ())
.XCXSSRQ(sarStandItemsDto.getXcxssrq())
.ZCCSSRQ(sarStandItemsDto.getZccssrq())
.svpps(sarStandItemsDto.getSvpps())
.applyArctic(sarStandItemsDto.getApplyArctic())
.claimType(sarStandItemsDto.getClaimType())
@@ -129,8 +129,8 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
.itemsName(sarStandItemsDto.getItemsName())
.itemsNum(sarStandItemsDto.getItemsNum())
.responsibleUnit(sarStandItemsDto.getResponsibleUnit())
.XCXSSRQ(standsTimeDto1.getXCXSSRQ())
.ZCCSSRQ(standsTimeDto1.getZCCSSRQ())
.XCXSSRQ(sarStandItemsDto.getXcxssrq())
.ZCCSSRQ(sarStandItemsDto.getZccssrq())
.svpps(sarStandItemsDto.getSvpps())
.applyArctic(sarStandItemsDto.getApplyArctic())
.claimType(sarStandItemsDto.getClaimType())
@@ -168,11 +168,11 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
if (standId==null || standId.size()==0){
list = null;
}else {
list = sarLawsAttrDetailedListDao.selectLawsByIdC(standId,findStandDto.getStandName(), findStandDto.getStandType());
list = sarLawsAttrDetailedListDao.selectLawsByIdC((findStandDto.getPage()-1)*findStandDto.getSize(),findStandDto.getPage()*findStandDto.getSize(),standId,findStandDto.getStandName(), findStandDto.getStandType(),findStandDto.getFileType());
}
IPage<LawsDto> page1=new Page<>();
page1.setRecords(list);
page1.setTotal(dao.selectToken());
page1.setTotal(sarLawsAttrDetailedListDao.selectLawsByIdCount(standId,findStandDto.getStandName(),findStandDto.getStandType(),findStandDto.getFileType()).size());
return page1;
}
@@ -24,8 +24,8 @@ import java.util.List;
@Service
public class SarInterpretationNationalStandardServiceImpl extends ServiceImpl<SarInterpretationNationalStandardDao, SarInterpretationNationalStandard> implements ISarInterpretationNationalStandardService {
@Autowired
SarStandardComplianceProductAssessDao sarStandardComplianceProductAssessDao;
// @Autowired
// SarStandardComplianceProductAssessDao sarStandardComplianceProductAssessDao;
@Override
public String saveBath(List<SarInterpretationNationalStandard> sarInterpretationNationalStandards) {
@@ -34,18 +34,18 @@ public class SarInterpretationNationalStandardServiceImpl extends ServiceImpl<Sa
sarInterpretationNationalStandards.forEach(sarInterpretationNationalStandard -> {
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper=new QueryWrapper<>();
queryWrapper.eq("stand_id",sarInterpretationNationalStandard.getStandId());
List<SarStandardComplianceProductAssess> assessList = sarStandardComplianceProductAssessDao.selectList(queryWrapper);
if (assessList.isEmpty()){
SarStandardComplianceProductAssess sar=new SarStandardComplianceProductAssess();
sar.setId(UUIDUtils.randomUUID(32));
sar.setStandId(sarInterpretationNationalStandard.getStandId());
sar.setStandNumber(sarInterpretationNationalStandard.getStandNumber());
sar.setStandType(sarInterpretationNationalStandard.getStandType());
sar.setStandName(sarInterpretationNationalStandard.getStandName());
sar.setStandType(sarInterpretationNationalStandard.getStandType());
sar.setInterpretationTime(sarInterpretationNationalStandard.getInterpretationTime());
sarStandardComplianceProductAssessDao.insert(sar);
}
// List<SarStandardComplianceProductAssess> assessList = sarStandardComplianceProductAssessDao.selectList(queryWrapper);
// if (assessList.isEmpty()){
// SarStandardComplianceProductAssess sar=new SarStandardComplianceProductAssess();
// sar.setId(UUIDUtils.randomUUID(32));
// sar.setStandId(sarInterpretationNationalStandard.getStandId());
// sar.setStandNumber(sarInterpretationNationalStandard.getStandNumber());
// sar.setStandType(sarInterpretationNationalStandard.getStandType());
// sar.setStandName(sarInterpretationNationalStandard.getStandName());
// sar.setStandType(sarInterpretationNationalStandard.getStandType());
// sar.setInterpretationTime(sarInterpretationNationalStandard.getInterpretationTime());
// sarStandardComplianceProductAssessDao.insert(sar);
// }
});
String res = flag ? "1":"0";
return res;
@@ -667,6 +667,7 @@
</select>
<select id="selectSvppsByStandId" parameterType="java.lang.String" resultType="java.lang.String">
select svpps from SAR_STAND_ITEMS
where valid_flag=0 and svpps != ''
@@ -716,9 +717,7 @@
<select id="selectAllItemsByIds" 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
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
from SAR_STAND_ITEMS
where FILE_TYPE=#{type}
<if test="ids != null">
@@ -89,12 +89,16 @@
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>
@@ -103,7 +107,37 @@
#{item}
</foreach>
</where>
group by a.ID
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,a.PUT_TIME,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>
group by a.ID
</select>
<select id="selectTimes" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.StandRegionalTimeDto">
SELECT
b.country_area AS country,
@@ -177,6 +211,4 @@
</delete>
</mapper>