Commit aebda8e7 authored by wujiang's avatar wujiang

Merge branch 'developer' of http://36.40.66.175:5000/moa/jxdj_zx/amos-boot-zx-biz into developer

parents 8f84ce08 2b478238
......@@ -94,7 +94,7 @@ public interface IMcbWarningService {
Object getLampListByCodes(String questionRectificationStatus, String warningSourceType, String objectName);
List<Map<String, Object>> stationOverNum();
List<Map<String, Object>> stationOverNum(String sourceAttribution);
Object stationOverTotal(String province);
Object stationOverTotal(String province, String sourceAttribution);
}
......@@ -304,6 +304,11 @@
SubQuery sq ON a.CODE = sq.SOURCE_ATTRIBUTION
LEFT JOIN
amos_mcb.mcb_warning_warning_info b ON a.CODE = b.SOURCE_ATTRIBUTION AND date(b.CREATE_DATE) = CURRENT_DATE
<where>
<if test="sourceAttribution != null and sourceAttribution != ''">
a.CODE LIKE CONCAT(#{sourceAttribution}, '%')
</if>
</where>
GROUP BY
a.CODE, a.SEQUENCE_NBR, sq.totalRPN, sq.todayAlarm
</select>
......@@ -321,6 +326,9 @@
<if test="province != null and province != '' ">
and mwbsa.PROVINCE LIKE CONCAT (#{province},'%')
</if>
<if test="sourceAttribution != null and sourceAttribution != '' ">
and mwbsa.CODE LIKE CONCAT (#{sourceAttribution},'%')
</if>
and mcb_warning_warning_info.WARNING_SOURCE_TYPE_CODE in (select code FROM amos_mcb.mcb_data_dictionary WHERE remark = 'OVERVIEW')
</select>
......@@ -335,6 +343,9 @@
<if test="province != null and province != '' ">
and mwbsa.PROVINCE LIKE CONCAT (#{province},'%')
</if>
<if test="sourceAttribution != null and sourceAttribution != '' ">
and mwbsa.CODE LIKE CONCAT (#{sourceAttribution},'%')
</if>
and mcb_warning_warning_info.WARNING_SOURCE_TYPE_CODE in (select code FROM amos_mcb.mcb_data_dictionary WHERE remark = 'OVERVIEW')
</select>
<select id="getDayTotal" resultType="integer">
......@@ -349,6 +360,9 @@
<if test="province != null and province != '' ">
and mwbsa.PROVINCE LIKE CONCAT (#{province},'%')
</if>
<if test="sourceAttribution != null and sourceAttribution != '' ">
and mwbsa.CODE LIKE CONCAT (#{sourceAttribution},'%')
</if>
and mcb_warning_warning_info.WARNING_SOURCE_TYPE_CODE in (select code FROM amos_mcb.mcb_data_dictionary WHERE remark = 'OVERVIEW')
</select>
</mapper>
......@@ -198,14 +198,14 @@ public class McbWarningController {
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "任务总览-地图接口", notes = "任务总览-地图接口")
@GetMapping(value = "/warning-warning-info/stationOverNum")
public ResponseModel<Object> stationOverNum() {
return ResponseHelper.buildResponse(mcbWarningService.stationOverNum());
public ResponseModel<Object> stationOverNum(@RequestParam(value = "sourceAttribution", required = false) String sourceAttribution) {
return ResponseHelper.buildResponse(mcbWarningService.stationOverNum(sourceAttribution));
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "任务总览-地图接口", notes = "任务总览-地图接口")
@GetMapping(value = "/warning-warning-info/stationOverTotal")
public ResponseModel<Object> stationOverTotal(String province) {
return ResponseHelper.buildResponse(mcbWarningService.stationOverTotal(province));
public ResponseModel<Object> stationOverTotal(String province, String sourceAttribution) {
return ResponseHelper.buildResponse(mcbWarningService.stationOverTotal(province,sourceAttribution));
}
}
......@@ -77,7 +77,7 @@ public interface McbWarningMapper extends BaseMapper {
);
List<Map<String, Object>> stationOverNum();
List<Map<String, Object>> stationOverNum(String sourceAttribution);
/**
* 问题总数
......@@ -91,7 +91,7 @@ public interface McbWarningMapper extends BaseMapper {
@Param("endTime") String endTime
);
Integer getYearTotal(String province);
Integer getMonthTotal(String province);
Integer getDayTotal(String province);
Integer getYearTotal(String province, String sourceAttribution);
Integer getMonthTotal(String province, String sourceAttribution);
Integer getDayTotal(String province, String sourceAttribution);
}
......@@ -311,17 +311,17 @@ public class McbWarningServiceImpl implements IMcbWarningService {
return projectOrgCodes;
}
public List<Map<String, Object>> stationOverNum(){
return mcbWarningMapper.stationOverNum();
public List<Map<String, Object>> stationOverNum(String sourceAttribution){
return mcbWarningMapper.stationOverNum(sourceAttribution);
}
public Map<String,Object> stationOverTotal(String province){
public Map<String,Object> stationOverTotal(String province, String sourceAttribution){
Map<String, Object> map = new HashMap<>();
map.put("dayNum",mcbWarningMapper.getDayTotal(province));
map.put("monNum",mcbWarningMapper.getMonthTotal(province));
map.put("yearNum",mcbWarningMapper.getYearTotal(province));
map.put("dayNum",mcbWarningMapper.getDayTotal(province, sourceAttribution));
map.put("monNum",mcbWarningMapper.getMonthTotal(province, sourceAttribution));
map.put("yearNum",mcbWarningMapper.getYearTotal(province, sourceAttribution));
return map;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment