Merge branch 'develop_master' into FOTON
This commit is contained in:
+1
-1
@@ -50,7 +50,7 @@ public class SarStandardComplianceAssessResultController {
|
||||
@ApiOperation(value = "条件查询标准清单")
|
||||
@GetMapping("/standard")
|
||||
public ResponseMessage<Object> selectStandard(SarStandardsInfoEO eo) throws Exception {
|
||||
|
||||
eo.setStandNumber(eo.getStandNumber().replace(" "," "));
|
||||
if (eo.getStandApplicationType() == 1) {
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
|
||||
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
|
||||
+31
@@ -254,6 +254,9 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
@Autowired
|
||||
private StandLawsSearchService standLawsSearchService;
|
||||
|
||||
@Autowired
|
||||
private ISarMenuStandardService standardService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private TsDictionaryDao tsDictionaryDao;
|
||||
@@ -3030,6 +3033,34 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
String accessCountry = sarSarAccessEOService.getCountryByRes(sarStandardsInfoEO.getId(), sarStandardsInfoEO.getStandType() + "_STAND");
|
||||
sarStandardsInfoEO.setAccessCountry(accessCountry);
|
||||
}
|
||||
QueryWrapper<SarMenuStandard> wrapper=new QueryWrapper<>();
|
||||
wrapper.in("MENU_NAME",sarStandardsInfoEO.getStandSystem());
|
||||
wrapper.orderByDesc("length(PARENT_IDS)");
|
||||
List<SarMenuStandard> standards=iSarMenuStandardService.list(wrapper);
|
||||
if (null!=standards && standards.size()>0) {
|
||||
List<String> ids=new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(standards.get(0).getParentIds())){
|
||||
if (standards.get(0).getParentIds().contains(",")){
|
||||
ids=new ArrayList<>(Arrays.asList(standards.get(0).getParentIds().split(",")));
|
||||
}else {
|
||||
ids.add(standards.get(0).getParentIds());
|
||||
}
|
||||
}
|
||||
QueryWrapper<SarMenuStandard> wrapper1 = new QueryWrapper<>();
|
||||
wrapper1.in("id", ids);
|
||||
List<SarMenuStandard> res = iSarMenuStandardService.list(wrapper1);
|
||||
if (null!=res && res.size()>0){
|
||||
Map<String,String> map=new HashMap<>();
|
||||
res.forEach(sarMenuStandard -> {map.put(sarMenuStandard.getId(),sarMenuStandard.getMenuName());});
|
||||
String result="";
|
||||
for (String s:ids) {
|
||||
result +="/"+map.get(s);
|
||||
}
|
||||
sarStandardsInfoEO.setStandSystem(result.substring(1,result.length()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return sarStandardsInfoEO;
|
||||
}
|
||||
|
||||
|
||||
+74
-21
@@ -145,28 +145,81 @@
|
||||
|
||||
|
||||
<select id="selectLawsId" resultType="string">
|
||||
select stand_id from sar_laws_attr_detailed_list
|
||||
LEFT JOIN sar_standards_info si ON sar_laws_attr_detailed_list.stand_id = si.ID
|
||||
<where>
|
||||
<if test="standId != null">
|
||||
and detailed_list_id = #{standId}
|
||||
</if>
|
||||
<if test="sar.standSort != null">
|
||||
and si.STAND_SORT = #{sar.standSort}
|
||||
</if>
|
||||
<if test="sar.standType != null">
|
||||
and si.STAND_TYPE = #{sar.standType}
|
||||
</if>
|
||||
<if test="sar.standNumber != null">
|
||||
and concat(concat(concat(concat(si.STAND_SORT,' '),si.STAND_NUMBER),'-'),si.STAND_YEAR) like concat(concat('%', #{sar.standNumber}),'%')
|
||||
or si.STAND_NAME like concat(concat('%', #{sar.standNumber}),'%')
|
||||
</if>
|
||||
<if test="sar.standName != null">
|
||||
and si.STAND_NAME like concat(concat('%', #{sar.standName}),'%')
|
||||
</if>
|
||||
SELECT A.stand_id FROM (
|
||||
select stand_id,number from sar_laws_attr_detailed_list
|
||||
LEFT JOIN sar_standards_info si ON sar_laws_attr_detailed_list.stand_id = si.ID
|
||||
<where>
|
||||
<if test="standId != null">
|
||||
and detailed_list_id = #{standId}
|
||||
</if>
|
||||
<if test="sar.standSort != null">
|
||||
and si.STAND_SORT = #{sar.standSort}
|
||||
</if>
|
||||
<if test="sar.standType != null">
|
||||
and si.STAND_TYPE = #{sar.standType}
|
||||
</if>
|
||||
<if test="sar.standNumber != null">
|
||||
and (
|
||||
(trim(replace(concat(si.STAND_SORT,' ',si.STAND_NUMBER,'-',
|
||||
si.STAND_YEAR),' ','')) like trim(replace(concat(concat('%',#{sar.standNumber}),'%'),' ','')) and si.STAND_YEAR != '')
|
||||
or (trim(replace(concat(si.STAND_SORT,' ',si.STAND_NUMBER),' ','')) like trim(replace(concat(concat('%',#{sar.standNumber}),'%'),' ',''))
|
||||
)
|
||||
<!-- and SAR_STANDARDS_INFO.STAND_YEAR = '' -->
|
||||
or (stand_name like concat(concat('%',#{sar.standNumber}),'%')))
|
||||
</if>
|
||||
<if test="sar.standName != null">
|
||||
and si.STAND_NAME like concat(concat('%', #{sar.standName}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
order by number
|
||||
</where>
|
||||
UNION
|
||||
select stand_id,number from sar_laws_attr_detailed_list
|
||||
LEFT JOIN sar_bussioness_stand si ON sar_laws_attr_detailed_list.stand_id = si.ID
|
||||
<where>
|
||||
<if test="standId != null">
|
||||
and detailed_list_id = #{standId}
|
||||
</if>
|
||||
<if test="sar.standSort != null">
|
||||
and si.STAND_SORT = #{sar.standSort}
|
||||
</if>
|
||||
<if test="sar.standNumber != null">
|
||||
and (si.STAND_CODE like concat('%', #{sar.standNumber}, '%')
|
||||
or REPLACE( si.STAND_CODE,' ','') like REPLACE( concat('%', #{sar.standNumber}, '%'),' ',''))
|
||||
</if>
|
||||
<if test="sar.standName != null">
|
||||
and si.STAND_NAME like concat(concat('%', #{sar.standName}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
UNION
|
||||
select stand_id,number from sar_laws_attr_detailed_list
|
||||
LEFT JOIN sar_laws_stand_info si ON sar_laws_attr_detailed_list.stand_id = si.ID
|
||||
LEFT JOIN TS_DICTYPE dicstandSort ON (
|
||||
dicstandSort.dic_type_code = si.LAWS_TYPE
|
||||
AND dicstandSort.dic_id IS NOT NULL
|
||||
AND dicstandSort.valid_flag = 0
|
||||
AND dicstandSort.PARENT_ID IS NULL
|
||||
)
|
||||
<where>
|
||||
<if test="standId != null">
|
||||
and detailed_list_id = #{standId}
|
||||
</if>
|
||||
<if test="sar.standSort != null">
|
||||
and si.LAWS_TYPE = #{sar.standSort}
|
||||
</if>
|
||||
<if test="sar.standNumber != null">
|
||||
and concat(concat(concat(concat(si.LAWS_TYPE,' '),si.LAWS_NUMBER),'-'),si.LAWS_YEAR) like concat(concat('%', #{sar.standNumber}),'%')
|
||||
or si.LAWS_NAME like concat(concat('%', #{sar.standNumber}),'%')
|
||||
or dicstandSort.DIC_TYPE_NAME like concat(concat('%', #{sar.standNumber}),'%')
|
||||
</if>
|
||||
<if test="sar.standName != null">
|
||||
and si.LAWS_NAME like concat(concat('%', #{sar.standName}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
) A
|
||||
order by A.number
|
||||
LIMIT #{param3} , #{param2};
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user