| | |
| | | import cn.gistack.sm.sjztmd.entity.TbResGeneralInvestigation; |
| | | import cn.gistack.sm.sjztmd.service.IAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.ITbResGeneralInvestigationService; |
| | | import cn.gistack.sm.sjztmd.vo.AttResBaseGeneralInvestigationVO; |
| | | import cn.gistack.sm.sjztmd.wrapper.AttResBaseWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | private IAttResBaseService attResBaseService; |
| | | |
| | | @ApiOperation(value = "中台水库-分页列表查询", notes = "中台水库-分页列表查询") |
| | | @GetMapping(value = "/resList") |
| | | public R queryPageList(AttResBase attResBase, Query query) { |
| | | IPage<AttResBase> pageList = attResBaseService.selectAttResBasePage(Condition.getPage(query), attResBase); |
| | | return R.data(AttResBaseWrapper.build().pageVO(pageList)); |
| | | @GetMapping(value = "/queryPageResList") |
| | | public R queryPageResList(AttResBaseGeneralInvestigationVO attResBase, Query query) { |
| | | IPage<AttResBaseGeneralInvestigationVO> pageList = attResBaseService.selectAttResBaseGeneralInvestigation(Condition.getPage(query), attResBase); |
| | | return R.data(pageList); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | |
| | | queryWrapper.eq("\"check_state\"", param.getCheckState()); |
| | | if (!StringUtil.isBlank(param.getResName())) |
| | | queryWrapper.like("\"res_name\"", param.getResName()); |
| | | if (!StringUtil.isBlank(param.getResGuid())) |
| | | queryWrapper.like("\"res_guid\"", param.getResGuid()); |
| | | return R.data(tbResGeneralInvestigationService.page(Condition.getPage(query), queryWrapper)); |
| | | } |
| | | |
| | |
| | | import cn.gistack.sm.sjztmd.dto.AttResBaseUserDTO; |
| | | import cn.gistack.sm.sjztmd.entity.AttResBase; |
| | | import cn.gistack.sm.sjztmd.vo.AttResAdVO; |
| | | import cn.gistack.sm.sjztmd.vo.AttResBaseGeneralInvestigationVO; |
| | | import cn.gistack.sm.sjztmd.vo.AttResBaseVO; |
| | | import cn.gistack.sm.sjztmd.vo.ManagePersonVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | |
| | | |
| | | |
| | | List<AttResBase> selectAttResBasePage(IPage<AttResBase> page, @Param("attResBase") AttResBase attResBase); |
| | | |
| | | List<AttResBaseGeneralInvestigationVO> selectAttResBaseGeneralInvestigation(IPage<AttResBaseGeneralInvestigationVO> page, @Param("attResBase") AttResBaseGeneralInvestigationVO attResBase); |
| | | |
| | | List<AttResBase> getListByRegion(IPage<AttResBase> page,@Param("obj") Map<String, Object> obj); |
| | | |
| | |
| | | * @return |
| | | */ |
| | | int getDimResInfoACount(); |
| | | |
| | | } |
| | |
| | | AND "name" LIKE CONCAT('%',#{attResBase.name},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectAttResBaseGeneralInvestigation" resultType="cn.gistack.sm.sjztmd.vo.AttResBaseGeneralInvestigationVO"> |
| | | select * from ( |
| | | select *, |
| | | case |
| | | when (select count(*) from sjzt_md."tb_res_general_investigation" b where a."guid" = b."res_guid" and b."check_state" = 2) > 0 THEN '2' |
| | | when (select count(*) from sjzt_md."tb_res_general_investigation" b where a."guid" = b."res_guid" and b."check_state" = 1) > 0 THEN '1' |
| | | when (select count(*) from sjzt_md."tb_res_general_investigation" b where a."guid" = b."res_guid" and b."check_state" = 0) > 0 THEN '0' |
| | | ELSE '-1' |
| | | END AS tb_state |
| | | |
| | | |
| | | from sjzt_md."att_res_base" a |
| | | ) a WHERE "is_deleted"=0 |
| | | |
| | | <if test="attResBase.name !=null and attResBase.name !=''"> |
| | | AND "name" LIKE CONCAT('%',#{attResBase.name},'%') |
| | | </if> |
| | | <if test="attResBase.code !=null and attResBase.code !=''"> |
| | | AND "code" LIKE CONCAT('%',#{attResBase.code},'%') |
| | | </if> |
| | | <if test="attResBase.resRegCode !=null and attResBase.resRegCode !=''"> |
| | | AND "res_reg_code" LIKE CONCAT('%',#{attResBase.resRegCode},'%') |
| | | </if> |
| | | <if test="attResBase.tbState !=null and attResBase.tbState !=''"> |
| | | AND tb_state = #{attResBase.tbState} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getListByRegion" resultType="cn.gistack.sm.sjztmd.entity.AttResBase"> |
| | | SELECT arb."guid",arb."code",arb."name",arb."ad_guid",arb."eng_scal",arb."res_loc" FROM "att_res_base" arb |
| | | left join "att_ad_base" aab on aab."guid" = arb."interior_ad_guid" |
| | |
| | | import cn.gistack.sm.sjztmd.entity.AttResBase; |
| | | import cn.gistack.sm.sjztmd.vo.AttAdBaseVO; |
| | | import cn.gistack.sm.sjztmd.vo.AttResAdVO; |
| | | import cn.gistack.sm.sjztmd.vo.AttResBaseGeneralInvestigationVO; |
| | | import cn.gistack.sm.sjztmd.vo.AttResBaseVO; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | |
| | | |
| | | IPage<AttResBase> selectAttResBasePage(IPage<AttResBase> page, AttResBase attResBase); |
| | | |
| | | IPage<AttResBaseGeneralInvestigationVO> selectAttResBaseGeneralInvestigation(IPage<AttResBaseGeneralInvestigationVO> page, AttResBaseGeneralInvestigationVO attResBase); |
| | | |
| | | IPage<AttResBase> getListByRegion(IPage<AttResBase> page,Map<String, Object> obj); |
| | | |
| | | AttResBase getDetailByCode(String code); |
| | |
| | | import cn.gistack.sm.sjztmd.mapper.AttResBaseMapper; |
| | | import cn.gistack.sm.sjztmd.service.IAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.vo.AttResAdVO; |
| | | import cn.gistack.sm.sjztmd.vo.AttResBaseGeneralInvestigationVO; |
| | | import cn.gistack.sm.sjztmd.vo.AttResBaseVO; |
| | | import cn.gistack.sm.sjztmd.vo.ManagePersonVO; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public IPage<AttResBaseGeneralInvestigationVO> selectAttResBaseGeneralInvestigation(IPage<AttResBaseGeneralInvestigationVO> page, AttResBaseGeneralInvestigationVO attResBase) { |
| | | return page.setRecords(baseMapper.selectAttResBaseGeneralInvestigation(page,attResBase)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<AttResBase> getListByRegion(IPage<AttResBase> page,Map<String, Object> obj) { |
| | | return page.setRecords(baseMapper.getListByRegion(page,obj)); |
| | | } |
| | |
| | | public class AttResBaseGeneralInvestigationVO extends AttResBase { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private Boolean isSb;//是否上报 |
| | | private String tbState;//填报状态 |
| | | } |
| | |
| | | return vo; |
| | | } |
| | | |
| | | public IPage<AttResBaseGeneralInvestigationVO> pageVO(IPage<AttResBase> pages) { |
| | | List<AttResBaseGeneralInvestigationVO> records = listVO(pages.getRecords()); |
| | | |
| | | for (AttResBaseGeneralInvestigationVO vo:records) { |
| | | QueryWrapper queryWrapper = new QueryWrapper(); |
| | | queryWrapper.eq("\"res_guid\"",vo.getGuid()); |
| | | queryWrapper.ne("\"check_state\"", 0); |
| | | long tbCount = tbResGeneralInvestigationService.count(queryWrapper); |
| | | vo.setIsSb(tbCount > 0); |
| | | } |
| | | |
| | | IPage<AttResBaseGeneralInvestigationVO> pageVo = new Page<>(pages.getCurrent(), pages.getSize(), pages.getTotal()); |
| | | pageVo.setRecords(records); |
| | | return pageVo; |
| | | } |
| | | } |