update:检索条件
This commit is contained in:
+2
@@ -23,6 +23,8 @@ public interface SarLawsAttrDetailedListDao extends BaseMapper<SarLawsAttrDetail
|
||||
List<String> selectLawsId(@Param("standId") String standId,@Param("param3") Integer page,@Param("param2") Integer size);
|
||||
//根据标准id查出数据
|
||||
List<LawsDto> selectLawsById(@Param("param1") List<String> LawsIds, @Param("standName") String standName);
|
||||
//根据标准id查出数据
|
||||
List<LawsDto> selectLawsByIdC(@Param("param1") List<String> LawsIds, @Param("standName") String standName,@Param("standType")String standType);
|
||||
//查询适用车型
|
||||
List<String> selectTypeApplicable(@Param("param1") String LawsId);
|
||||
List<String> selectLawsId2(String standId);
|
||||
|
||||
+3
-2
@@ -5,6 +5,7 @@ import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto;
|
||||
import com.adc.da.slrs.sarStandItems.entity.FindStandDto;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarItemsTime;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItemsDto;
|
||||
import com.adc.da.slrs.sarStandItems.service.impl.SarStandItemsServiceImpl;
|
||||
@@ -62,8 +63,8 @@ public class SarStandItemsController extends BaseController<SarStandItems> {
|
||||
|
||||
@ApiOperation(value = "标准查询")
|
||||
@PostMapping("/findStand")
|
||||
public IPage<LawsDto> findStand(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int size){
|
||||
IPage<LawsDto> sarItems = ServiceImpl.selectLawDto(page,size);
|
||||
public IPage<LawsDto> findStand(FindStandDto findStandDto){
|
||||
IPage<LawsDto> sarItems = ServiceImpl.selectLawDto(findStandDto);
|
||||
return sarItems;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.adc.da.slrs.sarStandItems.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* //TODO 添加类、接口描述
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-07-19
|
||||
*/
|
||||
@Data
|
||||
public class FindStandDto {
|
||||
private int page;
|
||||
private int size;
|
||||
private String standName;
|
||||
private String standType;
|
||||
}
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarStandItems.service;
|
||||
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto;
|
||||
import com.adc.da.slrs.sarStandItems.entity.FindStandDto;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarItemsTime;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||
import com.adc.da.slrs.sarStandItems.page.SarStandItemsEOPage;
|
||||
@@ -22,5 +23,5 @@ public interface ISarStandItemsService extends IService<SarStandItems> {
|
||||
|
||||
List<ActSarItemsEO> queryItemsByList(SarStandItemsEOPage page, String resType);
|
||||
List<SarItemsTime> findItemsTime(String type,String ids);
|
||||
IPage<LawsDto> selectLawDto(int page, int size);
|
||||
IPage<LawsDto> selectLawDto(FindStandDto findStandDto);
|
||||
}
|
||||
|
||||
+9
-7
@@ -3,11 +3,8 @@ package com.adc.da.slrs.sarStandItems.service.impl;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarItemsTime;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||
import com.adc.da.slrs.sarStandItems.entity.*;
|
||||
import com.adc.da.slrs.sarStandItems.dao.SarStandItemsDao;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItemsDto;
|
||||
import com.adc.da.slrs.sarStandItems.entity.StandsTimeDto;
|
||||
import com.adc.da.slrs.sarStandItems.page.SarStandItemsEOPage;
|
||||
import com.adc.da.slrs.sarStandItems.service.ISarStandItemsService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.ActSarItemsEO;
|
||||
@@ -146,9 +143,14 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<LawsDto> selectLawDto(int page, int size) {
|
||||
List<String> standId = dao.selectStandId(page-1,size);
|
||||
List<LawsDto> list = sarLawsAttrDetailedListDao.selectLawsById(standId,null);
|
||||
public IPage<LawsDto> selectLawDto(FindStandDto findStandDto) {
|
||||
List<String> standId = dao.selectStandId((findStandDto.getPage())-1, findStandDto.getSize());
|
||||
List<LawsDto> list=new ArrayList<>();
|
||||
if (standId==null || standId.size()==0){
|
||||
list = null;
|
||||
}else {
|
||||
list = sarLawsAttrDetailedListDao.selectLawsByIdC(standId,findStandDto.getStandName(), findStandDto.getStandType());
|
||||
}
|
||||
for (LawsDto lawsDto:list){
|
||||
if (sarLawsAttrDetailedListDao.selectTypeApplicable(lawsDto.getId()).size()!=0){
|
||||
lawsDto.setTypeApplicable(StringUtils.join(sarLawsAttrDetailedListDao.selectTypeApplicable(lawsDto.getId()), ","));
|
||||
|
||||
@@ -671,6 +671,7 @@
|
||||
LEFT JOIN sar_standards_info b
|
||||
on a.STAND_ID=b.ID
|
||||
WHERE b.VALID_FLAG = 0
|
||||
and a.FILE_TYPE ='FBGBJBD'
|
||||
GROUP BY
|
||||
a.STAND_ID
|
||||
limit #{page},#{size}
|
||||
|
||||
+20
-2
@@ -15,8 +15,7 @@
|
||||
a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
</foreach
|
||||
</where>
|
||||
|
||||
</select>
|
||||
@@ -47,6 +46,25 @@
|
||||
FROM sar_stand_items
|
||||
WHERE ID =#{param1,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<select id="selectLawsByIdC" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
|
||||
SELECT a.ID,a.STAND_NUMBER,a.STAND_NAME,a.STAND_EN_NAME,b.NYLX,a.PUT_TIME,b.XCXSSRQGJ,b.ZCCSSRQGJ,b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN
|
||||
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
||||
a.ID = b.STAND_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="standType !=null">
|
||||
a.STAND_TYPE = #{standType} and
|
||||
</if>
|
||||
a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertList">
|
||||
|
||||
Reference in New Issue
Block a user