隐患信息数据统计分析,可查询指定月份的隐患

main
15036302109 3 months ago
parent c7b0c34472
commit 3c2f72b969

@ -125,6 +125,7 @@ public class EhsIndexStatisticsController extends BaseController {
{ {
DateTime dateTime = null; DateTime dateTime = null;
if (targetTime != null) { if (targetTime != null) {
targetTime = targetTime + "-01 00:00:00";
dateTime = DateUtil.parse(targetTime, "yyyy-MM-dd HH:mm:ss"); dateTime = DateUtil.parse(targetTime, "yyyy-MM-dd HH:mm:ss");
} }
if (targetTime == null) { if (targetTime == null) {
@ -142,6 +143,7 @@ public class EhsIndexStatisticsController extends BaseController {
{ {
DateTime dateTime = null; DateTime dateTime = null;
if (targetTime != null) { if (targetTime != null) {
targetTime = targetTime + "-01 00:00:00";
dateTime = DateUtil.parse(targetTime, "yyyy-MM-dd HH:mm:ss"); dateTime = DateUtil.parse(targetTime, "yyyy-MM-dd HH:mm:ss");
} }
if (targetTime == null) { if (targetTime == null) {
@ -159,6 +161,7 @@ public class EhsIndexStatisticsController extends BaseController {
{ {
DateTime dateTime = null; DateTime dateTime = null;
if (targetTime != null) { if (targetTime != null) {
targetTime = targetTime + "-01 00:00:00";
dateTime = DateUtil.parse(targetTime, "yyyy-MM-dd HH:mm:ss"); dateTime = DateUtil.parse(targetTime, "yyyy-MM-dd HH:mm:ss");
} }
if (targetTime == null) { if (targetTime == null) {
@ -176,6 +179,7 @@ public class EhsIndexStatisticsController extends BaseController {
{ {
DateTime dateTime = null; DateTime dateTime = null;
if (targetTime != null) { if (targetTime != null) {
targetTime = targetTime + "-01 00:00:00";
dateTime = DateUtil.parse(targetTime, "yyyy-MM-dd HH:mm:ss"); dateTime = DateUtil.parse(targetTime, "yyyy-MM-dd HH:mm:ss");
} }
if (targetTime == null) { if (targetTime == null) {
@ -226,7 +230,7 @@ public class EhsIndexStatisticsController extends BaseController {
return AjaxResult.success(row); return AjaxResult.success(row);
} }
/** /**
* *
*/ */
@ApiOperation("隐患整改进度分析统计") @ApiOperation("隐患整改进度分析统计")
@GetMapping("/getHiddenDangerStatusMapList") @GetMapping("/getHiddenDangerStatusMapList")
@ -234,6 +238,7 @@ public class EhsIndexStatisticsController extends BaseController {
{ {
DateTime dateTime = null; DateTime dateTime = null;
if (targetTime != null) { if (targetTime != null) {
targetTime = targetTime + "-01 00:00:00";
dateTime = DateUtil.parse(targetTime, "yyyy-MM-dd HH:mm:ss"); dateTime = DateUtil.parse(targetTime, "yyyy-MM-dd HH:mm:ss");
} }
if (targetTime == null) { if (targetTime == null) {

@ -168,6 +168,8 @@ SELECT
ehs_hidden_danger ehs_hidden_danger
WHERE WHERE
DATE_FORMAT( #{targetTime}, '%Y-%m' ) = DATE_FORMAT( check_time, '%Y-%m' )) r ON r.dept_id = d.dept_id DATE_FORMAT( #{targetTime}, '%Y-%m' ) = DATE_FORMAT( check_time, '%Y-%m' )) r ON r.dept_id = d.dept_id
WHERE
d.del_flag = 0
GROUP BY GROUP BY
d.dept_id, d.dept_id,
d.dept_name d.dept_name

Loading…
Cancel
Save