From 335da28bb31af765ae8c2db834474e6f6d3bdfa6 Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Tue, 18 Jun 2024 15:40:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=80=BC=E7=8F=AD=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=EF=BC=8C=E5=8F=91=E5=B8=83=E6=B8=A0=E9=81=93=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zc/business/domain/DcShifts.java | 31 +++++++++---------- .../business/service/impl/MsmServiceImpl.java | 3 ++ .../mapper/business/DcEmployeesMapper.xml | 6 +--- .../mapper/business/DcPublishManageMapper.xml | 27 ++++++---------- .../mapper/business/DcShiftsMapper.xml | 14 ++++----- 5 files changed, 35 insertions(+), 46 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/domain/DcShifts.java b/zc-business/src/main/java/com/zc/business/domain/DcShifts.java index 44a7cad1..356e6cae 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcShifts.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcShifts.java @@ -17,7 +17,7 @@ import java.util.List; /** * 值班对象 dc_shifts - * + * * @author ruoyi * @date 2024-01-04 */ @@ -33,7 +33,7 @@ public class DcShifts extends BaseEntity /** 当值人员ID */ @ApiModelProperty(value = "当值人员ID", required = true) - @Excel(name = "当值人员ID") + private Long employeesId; /** 值班日期 */ @@ -45,13 +45,13 @@ public class DcShifts extends BaseEntity /** 开始时间 */ @ApiModelProperty("开始时间") @JsonFormat(pattern = "HH:mm:ss") - @Excel(name = "开始时间", width = 30, dateFormat = "HH:mm:ss") + private Date startTime; /** 结束时间 */ @ApiModelProperty("结束时间") @JsonFormat(pattern = "HH:mm:ss") - @Excel(name = "结束时间", width = 30, dateFormat = "HH:mm:ss") + private Date endTime; @ApiModelProperty("姓名") @@ -65,7 +65,7 @@ public class DcShifts extends BaseEntity @Excel(name = "岗位") private String postName; @ApiModelProperty("备注") - @Excel(name = "备注") + //@Excel(name = "备注") private String remark; @ApiModelProperty("所属路管驻点名称") @@ -73,11 +73,10 @@ public class DcShifts extends BaseEntity private String organizationName; @ApiModelProperty("排班 1-白班 2-夜班") - @Excel(name = "班次(白班和夜班)") + @Excel(name = "排班",readConverterExp = "1=白班,2=夜班") private String scheduling; @ApiModelProperty("驻点id") - @Excel(name = "驻点id") private Long station; @@ -163,44 +162,44 @@ public class DcShifts extends BaseEntity this.id = id; } - public Long getId() + public Long getId() { return id; } - public void setEmployeesId(Long employeesId) + public void setEmployeesId(Long employeesId) { this.employeesId = employeesId; } - public Long getEmployeesId() + public Long getEmployeesId() { return employeesId; } - public void setDate(Date date) + public void setDate(Date date) { this.date = date; } - public Date getDate() + public Date getDate() { return date; } - public void setStartTime(Date startTime) + public void setStartTime(Date startTime) { this.startTime = startTime; } - public Date getStartTime() + public Date getStartTime() { return startTime; } - public void setEndTime(Date endTime) + public void setEndTime(Date endTime) { this.endTime = endTime; } - public Date getEndTime() + public Date getEndTime() { return endTime; } diff --git a/zc-business/src/main/java/com/zc/business/service/impl/MsmServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/MsmServiceImpl.java index fb0d2131..219ffcf9 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/MsmServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/MsmServiceImpl.java @@ -283,6 +283,9 @@ public class MsmServiceImpl implements IMsmService { String context = "出行信息发布:" + content; dcEventProcess.setContext(context); dcEventProcessService.insertDcEventProcess(dcEventProcess); + if ("短信推送失败".equals(message)||"微信推送失败".equals(weiXin)){ + return AjaxResult.error(message + weiXin); + } return AjaxResult.success(message + weiXin); } } diff --git a/zc-business/src/main/resources/mapper/business/DcEmployeesMapper.xml b/zc-business/src/main/resources/mapper/business/DcEmployeesMapper.xml index 2df32584..f1661a18 100644 --- a/zc-business/src/main/resources/mapper/business/DcEmployeesMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEmployeesMapper.xml @@ -21,11 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select employees.employees_type,employees.id, employees.post_id, employees.organization_id, organization.organization_name,post.post_name, employees.name, employees.contact_number, - employees.create_time, employees.update_time, - CASE - WHEN employees.employees_type = 1 THEN '路管人员' - WHEN employees.employees_type = 2 THEN '交警人员' - END AS type + employees.create_time, employees.update_time from dc_employees as employees left join dc_organization as organization on organization.id=employees.organization_id left join sys_post as post on post.post_id=employees.post_id diff --git a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml index fde73636..17026d47 100644 --- a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml @@ -207,13 +207,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" p.publish_channels publishChannels, COALESCE(SUM(CASE WHEN m.publish_channels = p.publish_channels THEN 1 ELSE 0 END), 0) AS number FROM ( - SELECT 1 AS publish_channels UNION ALL - SELECT 2 AS publish_channels UNION ALL - SELECT 3 AS publish_channels UNION ALL SELECT 4 AS publish_channels UNION ALL - SELECT 5 AS publish_channels UNION ALL - SELECT 6 UNION ALL - SELECT 7 + SELECT 7 UNION ALL + SELECT 8 ) AS p LEFT JOIN dc_publish_manage AS m ON p.publish_channels = m.publish_channels AND DATE(m.publish_time) = CURDATE() @@ -258,10 +254,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT 23 ) AS h CROSS JOIN ( - SELECT 1 AS publish_channels - UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL - SELECT 5 UNION ALL SELECT 6 UNION ALL - SELECT 7 + SELECT 4 AS publish_channels + UNION ALL SELECT 7 UNION ALL SELECT 8 ) AS pc LEFT JOIN ( SELECT HOUR(publish_time) AS hour, publish_channels, COUNT(*)AS number @@ -295,10 +289,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT 11 ) AS h CROSS JOIN ( - SELECT 1 AS publish_channels - UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL - SELECT 5 UNION ALL SELECT 6 UNION ALL - SELECT 7 + SELECT 4 AS publish_channels + UNION ALL SELECT 7 UNION ALL SELECT 8 ) AS pc LEFT JOIN ( SELECT publish_channels ,dc_event.event_type eventType, COUNT(*)AS number @@ -323,10 +315,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT 11 ) AS h CROSS JOIN ( - SELECT 1 AS publish_channels - UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL - SELECT 5 UNION ALL SELECT 6 UNION ALL - SELECT 7 + SELECT 4 AS publish_channels + UNION ALL SELECT 7 UNION ALL + SELECT 8 ) AS pc LEFT JOIN ( SELECT publish_channels ,dc_event.event_type eventType, COUNT(*)AS number diff --git a/zc-business/src/main/resources/mapper/business/DcShiftsMapper.xml b/zc-business/src/main/resources/mapper/business/DcShiftsMapper.xml index a18da1eb..b2d75161 100644 --- a/zc-business/src/main/resources/mapper/business/DcShiftsMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcShiftsMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -30,9 +30,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - +