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. 11
      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. 6
      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")
public AjaxResult pushAll(@RequestBody HashMap map){
if (map == null || !map.containsKey("type")||StringUtils.isBlank(map.get("type").toString())) {
return AjaxResult.error("参数错误");
}
if (map == null ||!map.containsKey("content")|| StringUtils.isBlank(map.get("content").toString())) {
return AjaxResult.error("内容为空");
}
if (!map.containsKey("eventId")|| StringUtils.isBlank(map.get("eventId").toString())) {
return AjaxResult.error("事件id为空");
}
if (map.get("content").toString().length()>=200){
return AjaxResult.error("内容长度超长");
}
return msmService.putAll(map);
// if (map == null || !map.containsKey("type")||StringUtils.isBlank(map.get("type").toString())) {
// return AjaxResult.error("参数错误");
// }
// if (map == null ||!map.containsKey("content")|| StringUtils.isBlank(map.get("content").toString())) {
// return AjaxResult.error("内容为空");
// }
// if (!map.containsKey("eventId")|| StringUtils.isBlank(map.get("eventId").toString())) {
// return AjaxResult.error("事件id为空");
// }
// if (map.get("content").toString().length()>=200){
// return AjaxResult.error("内容长度超长");
// }
// return msmService.putAll(map);
return AjaxResult.error("接口已关闭");
}
//整合推送(弃用)
@PostMapping("/pushAllText")

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

@ -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;

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

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

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

Loading…
Cancel
Save