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 { ...@@ -94,7 +94,7 @@ public interface IMcbWarningService {
Object getLampListByCodes(String questionRectificationStatus, String warningSourceType, String objectName); 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 @@ ...@@ -304,6 +304,11 @@
SubQuery sq ON a.CODE = sq.SOURCE_ATTRIBUTION SubQuery sq ON a.CODE = sq.SOURCE_ATTRIBUTION
LEFT JOIN LEFT JOIN
amos_mcb.mcb_warning_warning_info b ON a.CODE = b.SOURCE_ATTRIBUTION AND date(b.CREATE_DATE) = CURRENT_DATE 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 GROUP BY
a.CODE, a.SEQUENCE_NBR, sq.totalRPN, sq.todayAlarm a.CODE, a.SEQUENCE_NBR, sq.totalRPN, sq.todayAlarm
</select> </select>
...@@ -321,6 +326,9 @@ ...@@ -321,6 +326,9 @@
<if test="province != null and province != '' "> <if test="province != null and province != '' ">
and mwbsa.PROVINCE LIKE CONCAT (#{province},'%') and mwbsa.PROVINCE LIKE CONCAT (#{province},'%')
</if> </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') and mcb_warning_warning_info.WARNING_SOURCE_TYPE_CODE in (select code FROM amos_mcb.mcb_data_dictionary WHERE remark = 'OVERVIEW')
</select> </select>
...@@ -335,6 +343,9 @@ ...@@ -335,6 +343,9 @@
<if test="province != null and province != '' "> <if test="province != null and province != '' ">
and mwbsa.PROVINCE LIKE CONCAT (#{province},'%') and mwbsa.PROVINCE LIKE CONCAT (#{province},'%')
</if> </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') and mcb_warning_warning_info.WARNING_SOURCE_TYPE_CODE in (select code FROM amos_mcb.mcb_data_dictionary WHERE remark = 'OVERVIEW')
</select> </select>
<select id="getDayTotal" resultType="integer"> <select id="getDayTotal" resultType="integer">
...@@ -349,6 +360,9 @@ ...@@ -349,6 +360,9 @@
<if test="province != null and province != '' "> <if test="province != null and province != '' ">
and mwbsa.PROVINCE LIKE CONCAT (#{province},'%') and mwbsa.PROVINCE LIKE CONCAT (#{province},'%')
</if> </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') and mcb_warning_warning_info.WARNING_SOURCE_TYPE_CODE in (select code FROM amos_mcb.mcb_data_dictionary WHERE remark = 'OVERVIEW')
</select> </select>
</mapper> </mapper>
...@@ -198,14 +198,14 @@ public class McbWarningController { ...@@ -198,14 +198,14 @@ public class McbWarningController {
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "任务总览-地图接口", notes = "任务总览-地图接口") @ApiOperation(httpMethod = "GET", value = "任务总览-地图接口", notes = "任务总览-地图接口")
@GetMapping(value = "/warning-warning-info/stationOverNum") @GetMapping(value = "/warning-warning-info/stationOverNum")
public ResponseModel<Object> stationOverNum() { public ResponseModel<Object> stationOverNum(@RequestParam(value = "sourceAttribution", required = false) String sourceAttribution) {
return ResponseHelper.buildResponse(mcbWarningService.stationOverNum()); return ResponseHelper.buildResponse(mcbWarningService.stationOverNum(sourceAttribution));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "任务总览-地图接口", notes = "任务总览-地图接口") @ApiOperation(httpMethod = "GET", value = "任务总览-地图接口", notes = "任务总览-地图接口")
@GetMapping(value = "/warning-warning-info/stationOverTotal") @GetMapping(value = "/warning-warning-info/stationOverTotal")
public ResponseModel<Object> stationOverTotal(String province) { public ResponseModel<Object> stationOverTotal(String province, String sourceAttribution) {
return ResponseHelper.buildResponse(mcbWarningService.stationOverTotal(province)); return ResponseHelper.buildResponse(mcbWarningService.stationOverTotal(province,sourceAttribution));
} }
} }
...@@ -77,7 +77,7 @@ public interface McbWarningMapper extends BaseMapper { ...@@ -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 { ...@@ -91,7 +91,7 @@ public interface McbWarningMapper extends BaseMapper {
@Param("endTime") String endTime @Param("endTime") String endTime
); );
Integer getYearTotal(String province); Integer getYearTotal(String province, String sourceAttribution);
Integer getMonthTotal(String province); Integer getMonthTotal(String province, String sourceAttribution);
Integer getDayTotal(String province); Integer getDayTotal(String province, String sourceAttribution);
} }
...@@ -311,17 +311,17 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -311,17 +311,17 @@ public class McbWarningServiceImpl implements IMcbWarningService {
return projectOrgCodes; return projectOrgCodes;
} }
public List<Map<String, Object>> stationOverNum(){ public List<Map<String, Object>> stationOverNum(String sourceAttribution){
return mcbWarningMapper.stationOverNum(); 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<String, Object> map = new HashMap<>();
map.put("dayNum",mcbWarningMapper.getDayTotal(province)); map.put("dayNum",mcbWarningMapper.getDayTotal(province, sourceAttribution));
map.put("monNum",mcbWarningMapper.getMonthTotal(province)); map.put("monNum",mcbWarningMapper.getMonthTotal(province, sourceAttribution));
map.put("yearNum",mcbWarningMapper.getYearTotal(province)); map.put("yearNum",mcbWarningMapper.getYearTotal(province, sourceAttribution));
return map; 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