| | |
| | | grp.group_code AS groupCode, |
| | | (SELECT COUNT(*) FROM ir_group_intake WHERE group_id = grp.id) AS intakeCount, |
| | | grp.default_duration AS defaultDuration, |
| | | 0 as sort, |
| | | pg.sort, |
| | | grp.operate_time |
| | | FROM ir_irrigate_group grp |
| | | LEFT JOIN ir_project_group pg ON pg.group_id = grp.id |
| | |
| | | AND grp.group_code LIKE CONCAT('%', #{groupCode}, '%') |
| | | </if> |
| | | </where> |
| | | ORDER BY grp.operate_time DESC |
| | | ORDER BY pg.sort |
| | | <trim prefix="limit "> |
| | | <if test="start != null and count != null"> |
| | | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} |
| | |
| | | } |
| | | |
| | | @GetMapping(path = "/getSimpleGroups") |
| | | public BaseResponse<QueryResultVo<List<VoGroupSimple>>> getSimpleGroups(QoGroup qo) { |
| | | public BaseResponse<List<VoGroupSimple>> getSimpleGroups(QoGroup qo) { |
| | | if(qo.getProjectId() == null) { |
| | | return BaseResponseUtils.buildErrorMsg("请选择项目"); |
| | | } |
| | | |
| | | try { |
| | | QueryResultVo<List<VoGroupSimple>> res = irrigationSv.getSimpleGroups(qo); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | //QueryResultVo<List<VoGroupSimple>> res = irrigationSv.getSimpleGroups(qo); |
| | | return BaseResponseUtils.buildSuccess(irrigationSv.getSimpleGroups(qo)); |
| | | } catch (Exception e) { |
| | | log.error("获取轮灌组记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()); |
| | |
| | | * @param queryVo |
| | | * @return |
| | | */ |
| | | public QueryResultVo<List<VoGroupSimple>> getSimpleGroups(QoGroup queryVo) { |
| | | public List<VoGroupSimple> getSimpleGroups(QoGroup queryVo) { |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo); |
| | | Long itemTotal = irIrrigateGroupMapper.getSimpleGroupCount(params); |
| | | //Long itemTotal = irIrrigateGroupMapper.getSimpleGroupCount(params); |
| | | |
| | | QueryResultVo<List<VoGroupSimple>> rsVo = new QueryResultVo<>(); |
| | | //QueryResultVo<List<VoGroupSimple>> rsVo = new QueryResultVo<>(); |
| | | |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | rsVo.obj = irIrrigateGroupMapper.getSimpleGroups(params); |
| | | return rsVo; |
| | | //rsVo.calculateAndSet(itemTotal, params); |
| | | //rsVo.obj = irIrrigateGroupMapper.getSimpleGroups(params); |
| | | //return rsVo; |
| | | return irIrrigateGroupMapper.getSimpleGroups(params); |
| | | } |
| | | |
| | | } |