Browse Source

Merge remote-tracking branch 'origin/develop' into develop

develop
zhaoxianglong 5 months ago
parent
commit
ce25caa7a4
  1. 27
      zc-business/src/main/java/com/zc/business/controller/MsmController.java
  2. 31
      zc-business/src/main/java/com/zc/business/domain/DcShifts.java
  3. 3
      zc-business/src/main/java/com/zc/business/service/impl/MsmServiceImpl.java
  4. 6
      zc-business/src/main/resources/mapper/business/DcEmployeesMapper.xml
  5. 27
      zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
  6. 14
      zc-business/src/main/resources/mapper/business/DcShiftsMapper.xml

27
zc-business/src/main/java/com/zc/business/controller/MsmController.java

@ -50,19 +50,20 @@ public class MsmController extends BaseController {
//整合推送 //整合推送
@PostMapping("/pushAll") @PostMapping("/pushAll")
public AjaxResult pushAll(@RequestBody HashMap map){ public AjaxResult pushAll(@RequestBody HashMap map){
if (map == null || !map.containsKey("type")||StringUtils.isBlank(map.get("type").toString())) { // if (map == null || !map.containsKey("type")||StringUtils.isBlank(map.get("type").toString())) {
return AjaxResult.error("参数错误"); // return AjaxResult.error("参数错误");
} // }
if (map == null ||!map.containsKey("content")|| StringUtils.isBlank(map.get("content").toString())) { // if (map == null ||!map.containsKey("content")|| StringUtils.isBlank(map.get("content").toString())) {
return AjaxResult.error("内容为空"); // return AjaxResult.error("内容为空");
} // }
if (!map.containsKey("eventId")|| StringUtils.isBlank(map.get("eventId").toString())) { // if (!map.containsKey("eventId")|| StringUtils.isBlank(map.get("eventId").toString())) {
return AjaxResult.error("事件id为空"); // return AjaxResult.error("事件id为空");
} // }
if (map.get("content").toString().length()>=200){ // if (map.get("content").toString().length()>=200){
return AjaxResult.error("内容长度超长"); // return AjaxResult.error("内容长度超长");
} // }
return msmService.putAll(map); // return msmService.putAll(map);
return AjaxResult.error("接口已关闭");
} }
//整合推送(弃用) //整合推送(弃用)
@PostMapping("/pushAllText") @PostMapping("/pushAllText")

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

@ -17,7 +17,7 @@ import java.util.List;
/** /**
* 值班对象 dc_shifts * 值班对象 dc_shifts
* *
* @author ruoyi * @author ruoyi
* @date 2024-01-04 * @date 2024-01-04
*/ */
@ -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;
@ -163,44 +162,44 @@ public class DcShifts extends BaseEntity
this.id = id; this.id = id;
} }
public Long getId() public Long getId()
{ {
return id; return id;
} }
public void setEmployeesId(Long employeesId) public void setEmployeesId(Long employeesId)
{ {
this.employeesId = employeesId; this.employeesId = employeesId;
} }
public Long getEmployeesId() public Long getEmployeesId()
{ {
return employeesId; return employeesId;
} }
public void setDate(Date date) public void setDate(Date date)
{ {
this.date = date; this.date = date;
} }
public Date getDate() public Date getDate()
{ {
return date; return date;
} }
public void setStartTime(Date startTime) public void setStartTime(Date startTime)
{ {
this.startTime = startTime; this.startTime = startTime;
} }
public Date getStartTime() public Date getStartTime()
{ {
return startTime; return startTime;
} }
public void setEndTime(Date endTime) public void setEndTime(Date endTime)
{ {
this.endTime = endTime; this.endTime = endTime;
} }
public Date getEndTime() public Date getEndTime()
{ {
return endTime; 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; 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

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

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zc.business.mapper.DcShiftsMapper"> <mapper namespace="com.zc.business.mapper.DcShiftsMapper">
<resultMap type="DcShifts" id="DcShiftsResult"> <resultMap type="DcShifts" id="DcShiftsResult">
<result property="id" column="id" /> <result property="id" column="id" />
@ -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
@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY shifts.date,shifts.station GROUP BY shifts.date,shifts.station
order by shifts.date desc order by shifts.date desc
</select> </select>
<select id="selectDcShiftsById" parameterType="Long" resultMap="DcShiftsResult"> <select id="selectDcShiftsById" parameterType="Long" resultMap="DcShiftsResult">
<include refid="selectDcShiftsVo"/> <include refid="selectDcShiftsVo"/>
where shifts.id = #{id} where shifts.id = #{id}
@ -182,9 +182,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteDcShiftsByIds" parameterType="String"> <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=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
</mapper> </mapper>

Loading…
Cancel
Save