Browse Source

值班导出,发布渠道,

develop
wangsixiang 5 months ago
parent
commit
335da28bb3
  1. 11
      zc-business/src/main/java/com/zc/business/domain/DcShifts.java
  2. 3
      zc-business/src/main/java/com/zc/business/service/impl/MsmServiceImpl.java
  3. 6
      zc-business/src/main/resources/mapper/business/DcEmployeesMapper.xml
  4. 27
      zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
  5. 6
      zc-business/src/main/resources/mapper/business/DcShiftsMapper.xml

11
zc-business/src/main/java/com/zc/business/domain/DcShifts.java

@ -33,7 +33,7 @@ public class DcShifts extends BaseEntity
/** 当值人员ID */ /** 当值人员ID */
@ApiModelProperty(value = "当值人员ID", required = true) @ApiModelProperty(value = "当值人员ID", required = true)
@Excel(name = "当值人员ID")
private Long employeesId; private Long employeesId;
/** 值班日期 */ /** 值班日期 */
@ -45,13 +45,13 @@ public class DcShifts extends BaseEntity
/** 开始时间 */ /** 开始时间 */
@ApiModelProperty("开始时间") @ApiModelProperty("开始时间")
@JsonFormat(pattern = "HH:mm:ss") @JsonFormat(pattern = "HH:mm:ss")
@Excel(name = "开始时间", width = 30, dateFormat = "HH:mm:ss")
private Date startTime; private Date startTime;
/** 结束时间 */ /** 结束时间 */
@ApiModelProperty("结束时间") @ApiModelProperty("结束时间")
@JsonFormat(pattern = "HH:mm:ss") @JsonFormat(pattern = "HH:mm:ss")
@Excel(name = "结束时间", width = 30, dateFormat = "HH:mm:ss")
private Date endTime; private Date endTime;
@ApiModelProperty("姓名") @ApiModelProperty("姓名")
@ -65,7 +65,7 @@ public class DcShifts extends BaseEntity
@Excel(name = "岗位") @Excel(name = "岗位")
private String postName; private String postName;
@ApiModelProperty("备注") @ApiModelProperty("备注")
@Excel(name = "备注") //@Excel(name = "备注")
private String remark; private String remark;
@ApiModelProperty("所属路管驻点名称") @ApiModelProperty("所属路管驻点名称")
@ -73,11 +73,10 @@ public class DcShifts extends BaseEntity
private String organizationName; private String organizationName;
@ApiModelProperty("排班 1-白班 2-夜班") @ApiModelProperty("排班 1-白班 2-夜班")
@Excel(name = "班次(白班和夜班)") @Excel(name = "排班",readConverterExp = "1=白班,2=夜班")
private String scheduling; private String scheduling;
@ApiModelProperty("驻点id") @ApiModelProperty("驻点id")
@Excel(name = "驻点id")
private Long station; private Long station;

3
zc-business/src/main/java/com/zc/business/service/impl/MsmServiceImpl.java

@ -283,6 +283,9 @@ public class MsmServiceImpl implements IMsmService {
String context = "出行信息发布:" + content; String context = "出行信息发布:" + content;
dcEventProcess.setContext(context); dcEventProcess.setContext(context);
dcEventProcessService.insertDcEventProcess(dcEventProcess); dcEventProcessService.insertDcEventProcess(dcEventProcess);
if ("短信推送失败".equals(message)||"微信推送失败".equals(weiXin)){
return AjaxResult.error(message + weiXin);
}
return AjaxResult.success(message + weiXin); return AjaxResult.success(message + weiXin);
} }
} }

6
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, select employees.employees_type,employees.id, employees.post_id, employees.organization_id,
organization.organization_name,post.post_name, organization.organization_name,post.post_name,
employees.name, employees.contact_number, employees.name, employees.contact_number,
employees.create_time, employees.update_time, employees.create_time, employees.update_time
CASE
WHEN employees.employees_type = 1 THEN '路管人员'
WHEN employees.employees_type = 2 THEN '交警人员'
END AS type
from dc_employees as employees from dc_employees as employees
left join dc_organization as organization on organization.id=employees.organization_id 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 left join sys_post as post on post.post_id=employees.post_id

27
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, p.publish_channels publishChannels,
COALESCE(SUM(CASE WHEN m.publish_channels = p.publish_channels THEN 1 ELSE 0 END), 0) AS number COALESCE(SUM(CASE WHEN m.publish_channels = p.publish_channels THEN 1 ELSE 0 END), 0) AS number
FROM ( 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 4 AS publish_channels UNION ALL
SELECT 5 AS publish_channels UNION ALL SELECT 7 UNION ALL
SELECT 6 UNION ALL SELECT 8
SELECT 7
) AS p ) AS p
LEFT JOIN dc_publish_manage AS m ON p.publish_channels = m.publish_channels LEFT JOIN dc_publish_manage AS m ON p.publish_channels = m.publish_channels
AND DATE(m.publish_time) = CURDATE() AND DATE(m.publish_time) = CURDATE()
@ -258,10 +254,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT 23 SELECT 23
) AS h ) AS h
CROSS JOIN ( CROSS JOIN (
SELECT 1 AS publish_channels SELECT 4 AS publish_channels
UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL UNION ALL SELECT 7 UNION ALL SELECT 8
SELECT 5 UNION ALL SELECT 6 UNION ALL
SELECT 7
) AS pc ) AS pc
LEFT JOIN ( LEFT JOIN (
SELECT HOUR(publish_time) AS hour, publish_channels, COUNT(*)AS number 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 SELECT 11
) AS h ) AS h
CROSS JOIN ( CROSS JOIN (
SELECT 1 AS publish_channels SELECT 4 AS publish_channels
UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL UNION ALL SELECT 7 UNION ALL SELECT 8
SELECT 5 UNION ALL SELECT 6 UNION ALL
SELECT 7
) AS pc ) AS pc
LEFT JOIN ( LEFT JOIN (
SELECT publish_channels ,dc_event.event_type eventType, COUNT(*)AS number 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 SELECT 11
) AS h ) AS h
CROSS JOIN ( CROSS JOIN (
SELECT 1 AS publish_channels SELECT 4 AS publish_channels
UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL UNION ALL SELECT 7 UNION ALL
SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 8
SELECT 7
) AS pc ) AS pc
LEFT JOIN ( LEFT JOIN (
SELECT publish_channels ,dc_event.event_type eventType, COUNT(*)AS number SELECT publish_channels ,dc_event.event_type eventType, COUNT(*)AS number

6
zc-business/src/main/resources/mapper/business/DcShiftsMapper.xml

@ -30,9 +30,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectDcShiftsList" parameterType="DcShifts" resultMap="DcShiftsResult"> <select id="selectDcShiftsList" parameterType="DcShifts" resultMap="DcShiftsResult">
select DISTINCT shifts.id, select shifts.id, shifts.employees_id,shifts.station,
shifts.station,organization.organization_name, employees.name,employees.contact_number,post.post_name,organization.organization_name,
shifts.date, shifts.start_time, shifts.end_time, shifts.date, shifts.start_time, shifts.end_time,shifts.scheduling,
shifts.remark, shifts.create_time, shifts.update_time from dc_shifts as shifts shifts.remark, shifts.create_time, shifts.update_time from dc_shifts as shifts
left join dc_employees as employees on employees.id=shifts.employees_id left join dc_employees as employees on employees.id=shifts.employees_id
left join sys_post as post on employees.post_id=post.post_id left join sys_post as post on employees.post_id=post.post_id

Loading…
Cancel
Save