3b4f6593 张雷

水质监控接口修改

1 个父辈 529473f1
...@@ -388,7 +388,7 @@ public class AjhMeetingSendController { ...@@ -388,7 +388,7 @@ public class AjhMeetingSendController {
388 queryWrapper.orderByDesc("send_status"); 388 queryWrapper.orderByDesc("send_status");
389 //Step.2 AutoPoi 导出Excel 389 //Step.2 AutoPoi 导出Excel
390 ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); 390 ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
391 List<AjhMeetingSend> pageList = ajhMeetingSendService.list(queryWrapper); 391 List<AjhMeetingSend> pageList = ajhMeetingSendService.getList(queryWrapper);
392 //导出文件名称 392 //导出文件名称
393 mv.addObject(NormalExcelConstants.FILE_NAME, "会议记录列表"); 393 mv.addObject(NormalExcelConstants.FILE_NAME, "会议记录列表");
394 mv.addObject(NormalExcelConstants.CLASS, AjhMeetingSend.class); 394 mv.addObject(NormalExcelConstants.CLASS, AjhMeetingSend.class);
......
...@@ -33,4 +33,10 @@ public interface AjhMeetingSendMapper extends BaseMapper<AjhMeetingSend> { ...@@ -33,4 +33,10 @@ public interface AjhMeetingSendMapper extends BaseMapper<AjhMeetingSend> {
33 " LEFT JOIN ( SELECT count( id ) count, meets_id FROM ajh_meeting_receipt GROUP BY meets_id ) r ON r.meets_id = id " + 33 " LEFT JOIN ( SELECT count( id ) count, meets_id FROM ajh_meeting_receipt GROUP BY meets_id ) r ON r.meets_id = id " +
34 " LEFT JOIN ( SELECT count( id ) count, meets_id FROM ajh_meeting_attend GROUP BY meets_id ) a ON a.meets_id = id ${ew.customSqlSegment}") 34 " LEFT JOIN ( SELECT count( id ) count, meets_id FROM ajh_meeting_attend GROUP BY meets_id ) a ON a.meets_id = id ${ew.customSqlSegment}")
35 List<AjhMeetingSend> getListByWrapper(Page page,@Param("ew") QueryWrapper<AjhMeetingSend> queryWrapper); 35 List<AjhMeetingSend> getListByWrapper(Page page,@Param("ew") QueryWrapper<AjhMeetingSend> queryWrapper);
36
37 @Select("SELECT *,IFNULL( r.count, 0 ) AS invite_num,IFNULL( a.count, 0 ) AS partic_num " +
38 " FROM ajh_meeting_send " +
39 " LEFT JOIN ( SELECT count( id ) count, meets_id FROM ajh_meeting_receipt GROUP BY meets_id ) r ON r.meets_id = id " +
40 " LEFT JOIN ( SELECT count( id ) count, meets_id FROM ajh_meeting_attend GROUP BY meets_id ) a ON a.meets_id = id ${ew.customSqlSegment}")
41 List<AjhMeetingSend> getList(@Param("ew") QueryWrapper<AjhMeetingSend> queryWrapper);
36 } 42 }
......
...@@ -9,6 +9,7 @@ import com.skua.modules.ajh.vo.AjhMeetingVO; ...@@ -9,6 +9,7 @@ import com.skua.modules.ajh.vo.AjhMeetingVO;
9 import org.springframework.scheduling.annotation.Async; 9 import org.springframework.scheduling.annotation.Async;
10 10
11 import java.util.HashMap; 11 import java.util.HashMap;
12 import java.util.List;
12 13
13 /** 14 /**
14 * 会议记录 15 * 会议记录
...@@ -35,4 +36,6 @@ public interface IAjhMeetingSendService extends IService<AjhMeetingSend> { ...@@ -35,4 +36,6 @@ public interface IAjhMeetingSendService extends IService<AjhMeetingSend> {
35 public AjhMeetingSend queryByMeetId(String meetId); 36 public AjhMeetingSend queryByMeetId(String meetId);
36 37
37 IPage<AjhMeetingSend> queryPage(Page<AjhMeetingSend> page, QueryWrapper<AjhMeetingSend> queryWrapper); 38 IPage<AjhMeetingSend> queryPage(Page<AjhMeetingSend> page, QueryWrapper<AjhMeetingSend> queryWrapper);
39
40 List<AjhMeetingSend> getList(QueryWrapper<AjhMeetingSend> queryWrapper);
38 } 41 }
......
...@@ -180,4 +180,10 @@ public class AjhMeetingSendServiceImpl extends ServiceImpl<AjhMeetingSendMapper, ...@@ -180,4 +180,10 @@ public class AjhMeetingSendServiceImpl extends ServiceImpl<AjhMeetingSendMapper,
180 page.setRecords(list); 180 page.setRecords(list);
181 return page; 181 return page;
182 } 182 }
183
184 @Override
185 public List<AjhMeetingSend> getList(QueryWrapper<AjhMeetingSend> queryWrapper) {
186 List<AjhMeetingSend> list = ajhMeetingSendMapper.getList(queryWrapper);
187 return list;
188 }
183 } 189 }
......
1 package com.skua.modules.dataAnalysis.controller; 1 package com.skua.modules.dataAnalysis.controller;
2 2
3 import com.skua.core.api.vo.Result; 3 import com.skua.core.api.vo.Result;
4 import com.skua.core.context.BaseContextHandler;
5 import com.skua.modules.common.service.ICommonSqlService;
4 import com.skua.modules.dataAnalysis.service.IFactoryCenterService; 6 import com.skua.modules.dataAnalysis.service.IFactoryCenterService;
5 import com.skua.modules.dataAnalysis.vo.StatisticsParam; 7 import com.skua.modules.dataAnalysis.vo.StatisticsParam;
6 import com.skua.modules.dataAnalysis.vo.WaterQualityMonitoringDetailVO; 8 import com.skua.modules.dataAnalysis.vo.WaterQualityMonitoringDetailVO;
7 import com.skua.modules.dataAnalysis.vo.WaterQualityMonitoringVO; 9 import com.skua.modules.dataAnalysis.vo.WaterQualityMonitoringVO;
10 import com.skua.modules.dataAnalysis.vo.WaterQualityParams;
8 import io.swagger.annotations.Api; 11 import io.swagger.annotations.Api;
9 import io.swagger.annotations.ApiOperation; 12 import io.swagger.annotations.ApiOperation;
10 import lombok.extern.slf4j.Slf4j; 13 import lombok.extern.slf4j.Slf4j;
...@@ -13,6 +16,7 @@ import org.springframework.web.bind.annotation.GetMapping; ...@@ -13,6 +16,7 @@ import org.springframework.web.bind.annotation.GetMapping;
13 import org.springframework.web.bind.annotation.RequestMapping; 16 import org.springframework.web.bind.annotation.RequestMapping;
14 import org.springframework.web.bind.annotation.RestController; 17 import org.springframework.web.bind.annotation.RestController;
15 18
19 import java.util.ArrayList;
16 import java.util.HashMap; 20 import java.util.HashMap;
17 import java.util.List; 21 import java.util.List;
18 import java.util.Map; 22 import java.util.Map;
...@@ -25,12 +29,14 @@ public class FactoryCenterController { ...@@ -25,12 +29,14 @@ public class FactoryCenterController {
25 29
26 @Autowired 30 @Autowired
27 private IFactoryCenterService factoryCenterService; 31 private IFactoryCenterService factoryCenterService;
32 @Autowired
33 private ICommonSqlService commonSqlService;
28 34
29 @ApiOperation(value="厂区驾驶舱实时数据查询", notes="厂区驾驶舱实时数据查询") 35 @ApiOperation(value="厂区驾驶舱实时数据查询", notes="厂区驾驶舱实时数据查询")
30 @GetMapping(value = "/getRealTimeData") 36 @GetMapping(value = "/getRealTimeData")
31 public Result<List<WaterQualityMonitoringDetailVO>> getRealTimeData(String departId) { 37 public Result<List<WaterQualityMonitoringDetailVO>> getRealTimeData(String departId) {
32 Result<List<WaterQualityMonitoringDetailVO>> result = new Result<List<WaterQualityMonitoringDetailVO>>(); 38 Result<List<WaterQualityMonitoringDetailVO>> result = new Result<List<WaterQualityMonitoringDetailVO>>();
33 List<WaterQualityMonitoringDetailVO> list = factoryCenterService.queryMonitoringData(departId); 39 List<WaterQualityMonitoringDetailVO> list = factoryCenterService.queryMonitoringData(departId,null);
34 result.setSuccess(true); 40 result.setSuccess(true);
35 result.setResult(list); 41 result.setResult(list);
36 return result; 42 return result;
...@@ -177,4 +183,21 @@ public class FactoryCenterController { ...@@ -177,4 +183,21 @@ public class FactoryCenterController {
177 result.setResult(map); 183 result.setResult(map);
178 return result; 184 return result;
179 } 185 }
186
187 @ApiOperation(value="水质监控实时数据查询", notes="水质监控实时数据查询")
188 @GetMapping(value = "/queryMonitoringData")
189 public Result<List<WaterQualityMonitoringDetailVO>> queryMonitoringData(WaterQualityParams waterQualityParams) {
190 Result<List<WaterQualityMonitoringDetailVO>> result = new Result<List<WaterQualityMonitoringDetailVO>>();
191 List<WaterQualityMonitoringDetailVO> list = new ArrayList<>();
192 String departIds = waterQualityParams.getDepartId();
193 if(waterQualityParams.getDepartId()!=null){
194 departIds = commonSqlService.getChildFactorys(waterQualityParams.getDepartId());
195 }else{
196 departIds = commonSqlService.getChildFactorys(BaseContextHandler.getRealDepartId());
197 }
198 list = factoryCenterService.queryMonitoringData(departIds,waterQualityParams.getParmType());
199 result.setSuccess(true);
200 result.setResult(list);
201 return result;
202 }
180 } 203 }
......
...@@ -13,7 +13,7 @@ public interface IFactoryCenterService { ...@@ -13,7 +13,7 @@ public interface IFactoryCenterService {
13 * @param departId 13 * @param departId
14 * @return 14 * @return
15 */ 15 */
16 List<WaterQualityMonitoringDetailVO> queryMonitoringData(String departId); 16 List<WaterQualityMonitoringDetailVO> queryMonitoringData(String departId,String parmType);
17 17
18 Map<String, Object> getData(String departId,String month); 18 Map<String, Object> getData(String departId,String month);
19 19
......
1 package com.skua.modules.dataAnalysis.vo;
2
3 import io.swagger.annotations.ApiModel;
4 import io.swagger.annotations.ApiModelProperty;
5 import lombok.Data;
6
7 /**
8 * 水质监控参数对象
9 */
10 @Data
11 @ApiModel(value="水质监控参数对象", description="水质监控参数对象")
12 public class WaterQualityParams {
13
14 //所属机构
15 @ApiModelProperty(value = "所属机构")
16 private String departId;
17
18 //进出水类型
19 @ApiModelProperty(value = "进出水类型")
20 private String parmType;
21
22 }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!