Browse Source

值班导出,发布渠道,

develop
wangsixiang 5 months ago
parent
commit
335da28bb3
  1. 31
      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. 14
      zc-business/src/main/resources/mapper/business/DcShiftsMapper.xml

31
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;
}

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;
dcEventProcess.setContext(context);
dcEventProcessService.insertDcEventProcess(dcEventProcess);
if ("短信推送失败".equals(message)||"微信推送失败".equals(weiXin)){
return AjaxResult.error(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,
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

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,
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

14
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">
<mapper namespace="com.zc.business.mapper.DcShiftsMapper">
<resultMap type="DcShifts" id="DcShiftsResult">
<result property="id" column="id" />
@ -30,9 +30,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectDcShiftsList" parameterType="DcShifts" resultMap="DcShiftsResult">
select DISTINCT shifts.id,
shifts.station,organization.organization_name,
shifts.date, shifts.start_time, shifts.end_time,
select shifts.id, shifts.employees_id,shifts.station,
employees.name,employees.contact_number,post.post_name,organization.organization_name,
shifts.date, shifts.start_time, shifts.end_time,shifts.scheduling,
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 sys_post as post on employees.post_id=post.post_id
@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY shifts.date,shifts.station
order by shifts.date desc
</select>
<select id="selectDcShiftsById" parameterType="Long" resultMap="DcShiftsResult">
<include refid="selectDcShiftsVo"/>
where shifts.id = #{id}
@ -182,9 +182,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteDcShiftsByIds" parameterType="String">
delete from dc_shifts where id in
delete from dc_shifts where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
</mapper>

Loading…
Cancel
Save