This commit is contained in:
parent
8aa28b5ce9
commit
1f6912a794
|
|
@ -14,7 +14,6 @@ import lombok.NoArgsConstructor;
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class PmTask {
|
public class PmTask {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务名称
|
* 任务名称
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,12 @@ public class PmTaskServiceImpl implements PmTaskService{
|
||||||
job.setMisfirePolicy(task.getMisfirePolicy());
|
job.setMisfirePolicy(task.getMisfirePolicy());
|
||||||
job.setConcurrent(task.getConcurrent());
|
job.setConcurrent(task.getConcurrent());
|
||||||
job.setStatus(task.getTaskStatus());
|
job.setStatus(task.getTaskStatus());
|
||||||
|
//修改时不该任务,默认原任务,不然会影响生日等特殊任务
|
||||||
|
if(task.getId() == 1){
|
||||||
|
job.setInvokeTarget("workerSendMsgTask.sendHappyBirthDayMsg('1')");
|
||||||
|
}else{
|
||||||
job.setInvokeTarget("workerSendMsgTask.sendMsg('"+task.getId()+"')");
|
job.setInvokeTarget("workerSendMsgTask.sendMsg('"+task.getId()+"')");
|
||||||
|
}
|
||||||
job.setRelationId(task.getId());
|
job.setRelationId(task.getId());
|
||||||
job.setRelationType("短信");
|
job.setRelationType("短信");
|
||||||
job.setUpdateBy(SecurityUtils.getUsername());
|
job.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
|
@ -163,8 +168,6 @@ public class PmTaskServiceImpl implements PmTaskService{
|
||||||
}
|
}
|
||||||
int update = mapper.update(task);
|
int update = mapper.update(task);
|
||||||
if(update > 0){
|
if(update > 0){
|
||||||
//修改时不该任务,默认原任务,不然会影响生日等特殊任务
|
|
||||||
job.setInvokeTarget(null);
|
|
||||||
int i = jobService.updateJob(job);
|
int i = jobService.updateJob(job);
|
||||||
List<WorkerVo> allList = new ArrayList<>();
|
List<WorkerVo> allList = new ArrayList<>();
|
||||||
List<WorkerVo> workerList = task.getWorkerList();
|
List<WorkerVo> workerList = task.getWorkerList();
|
||||||
|
|
@ -218,6 +221,8 @@ public class PmTaskServiceImpl implements PmTaskService{
|
||||||
WorkerVo bean = new WorkerVo();
|
WorkerVo bean = new WorkerVo();
|
||||||
bean.setBatchNumber(splitStatus[0]);
|
bean.setBatchNumber(splitStatus[0]);
|
||||||
bean.setPhone(splitStatus[1]);
|
bean.setPhone(splitStatus[1]);
|
||||||
|
// 在设置发送时间时使用时分秒格式
|
||||||
|
bean.setSendTime(DateUtils.getTime()); // 简洁且安全
|
||||||
if("1".equals(splitStatus[2])){
|
if("1".equals(splitStatus[2])){
|
||||||
bean.setSendStatus("发送成功");
|
bean.setSendStatus("发送成功");
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -266,9 +271,6 @@ public class PmTaskServiceImpl implements PmTaskService{
|
||||||
o.setSubmitStatus("提交失败");
|
o.setSubmitStatus("提交失败");
|
||||||
o.setReason(split[1]);
|
o.setReason(split[1]);
|
||||||
}
|
}
|
||||||
// 在设置发送时间时使用时分秒格式
|
|
||||||
// 只要年月日 → 用 LocalDate
|
|
||||||
o.setSendTime(DateUtils.getTime()); // 简洁且安全
|
|
||||||
int i = mapper.updateOneWorkerData(o);
|
int i = mapper.updateOneWorkerData(o);
|
||||||
return i > 0 ? AjaxResult.success("更新成功") : AjaxResult.error("更新失败");
|
return i > 0 ? AjaxResult.success("更新成功") : AjaxResult.error("更新失败");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -110,8 +110,6 @@ public class WorkerSendMsgTask{
|
||||||
user.setPhone(user.getPhone());
|
user.setPhone(user.getPhone());
|
||||||
user.setSubmitStatus("提交成功");
|
user.setSubmitStatus("提交成功");
|
||||||
user.setBatchNumber(split[1]);
|
user.setBatchNumber(split[1]);
|
||||||
// 在设置发送时间时使用时分秒格式
|
|
||||||
user.setSendTime(DateUtils.getTime()); // 简洁且安全
|
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -121,8 +119,6 @@ public class WorkerSendMsgTask{
|
||||||
user.setPhone(user.getPhone());
|
user.setPhone(user.getPhone());
|
||||||
user.setSubmitStatus("提交失败");
|
user.setSubmitStatus("提交失败");
|
||||||
user.setReason(split[1]);
|
user.setReason(split[1]);
|
||||||
// 在设置发送时间时使用时分秒格式
|
|
||||||
user.setSendTime(DateUtils.getTime()); // 简洁且安全
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
mapper.insertTaskRecord(userList);
|
mapper.insertTaskRecord(userList);
|
||||||
|
|
|
||||||
|
|
@ -93,4 +93,5 @@ public class WorkerVo {
|
||||||
private String submitStatus;
|
private String submitStatus;
|
||||||
private String sendStatus;
|
private String sendStatus;
|
||||||
private String reason;
|
private String reason;
|
||||||
|
private String submitTime;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@ public class GroupServiceImpl implements GroupService {
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public int addGroup(GroupVo groupVo) {
|
public int addGroup(GroupVo groupVo) {
|
||||||
groupVo.setCreateTime(new Date());
|
|
||||||
if (StringUtils.isNotEmpty(groupVo.getGroupName())){
|
if (StringUtils.isNotEmpty(groupVo.getGroupName())){
|
||||||
//判断该分组是否存在
|
//判断该分组是否存在
|
||||||
GroupVo group = groupMapper.getGroupByName(groupVo);
|
GroupVo group = groupMapper.getGroupByName(groupVo);
|
||||||
|
|
@ -58,7 +57,6 @@ public class GroupServiceImpl implements GroupService {
|
||||||
groupMapper.addGroupDetails(worker);
|
groupMapper.addGroupDetails(worker);
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="getGroupList" resultType="com.bonus.message.dao.GroupVo">
|
<select id="getGroupList" resultType="com.bonus.message.dao.GroupVo">
|
||||||
select id,group_name,remark from pm_group where is_active= '1'
|
select id,group_name,create_user,remark from pm_group where is_active= '1'
|
||||||
<if test="groupName!= null " >
|
<if test="groupName!= null " >
|
||||||
and group_name like concat('%', #{groupName}, '%')
|
and group_name like concat('%', #{groupName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@
|
||||||
and msg_type = #{msgType}
|
and msg_type = #{msgType}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by pt.id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getById" resultMap="BaseResultMap">
|
<select id="getById" resultMap="BaseResultMap">
|
||||||
|
|
@ -95,7 +96,7 @@
|
||||||
|
|
||||||
<update id="msgSendStatus">
|
<update id="msgSendStatus">
|
||||||
<foreach collection="list" item="item" separator=";">
|
<foreach collection="list" item="item" separator=";">
|
||||||
update bm_task_record set send_status = #{item.sendStatus} where batch_number = #{item.batchNumber} and phone = #{item.phone}
|
update bm_task_record set send_status = #{item.sendStatus},send_time = #{item.sendTime} where batch_number = #{item.batchNumber} and phone = #{item.phone}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
@ -148,10 +149,10 @@
|
||||||
w.worker_name,
|
w.worker_name,
|
||||||
btw.phone,
|
btw.phone,
|
||||||
sd.dept_name AS orgName,
|
sd.dept_name AS orgName,
|
||||||
btw.send_time,
|
btw.update_time submitTime,
|
||||||
btw.submit_status,
|
btw.submit_status,
|
||||||
btw.reason,
|
btw.reason,
|
||||||
btw.update_time,
|
btw.send_time,
|
||||||
btw.send_status
|
btw.send_status
|
||||||
FROM
|
FROM
|
||||||
bm_task_record btw
|
bm_task_record btw
|
||||||
|
|
@ -162,7 +163,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateOneWorkerData">
|
<update id="updateOneWorkerData">
|
||||||
update bm_task_record set batch_number= #{batchNumber},submit_status = #{submitStatus},reason = #{reason} where id = #{id}
|
update bm_task_record set batch_number= #{batchNumber},submit_status = #{submitStatus},reason = #{reason},send_time = null where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getMsgData" resultType="java.lang.String">
|
<select id="getMsgData" resultType="java.lang.String">
|
||||||
|
|
|
||||||
|
|
@ -67,10 +67,10 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertTaskRecord">
|
<insert id="insertTaskRecord">
|
||||||
insert into bm_task_record (task_id, loop_id, worker_id, phone, batch_number, submit_status, send_time, reason)
|
insert into bm_task_record (task_id, loop_id, worker_id, phone, batch_number, submit_status, reason)
|
||||||
values
|
values
|
||||||
<foreach item="item" index="index" collection="list" separator=",">
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
(#{item.taskId}, #{item.loopId}, #{item.id}, #{item.phone}, #{item.batchNumber}, #{item.submitStatus}, #{item.sendTime}, #{item.reason})
|
(#{item.taskId}, #{item.loopId}, #{item.id}, #{item.phone}, #{item.batchNumber}, #{item.submitStatus}, #{item.reason})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<resultMap type="SysUser" id="SysUserResult">
|
<resultMap type="SysUser" id="SysUserResult">
|
||||||
<id property="userId" column="user_id" />
|
<id property="userId" column="user_id" />
|
||||||
<result property="deptId" column="dept_id" />
|
<result property="deptId" column="dept_id" />
|
||||||
|
<result property="deptName" column="dept_name" />
|
||||||
<result property="userName" column="user_name" />
|
<result property="userName" column="user_name" />
|
||||||
<result property="nickName" column="nick_name" />
|
<result property="nickName" column="nick_name" />
|
||||||
<result property="email" column="email" />
|
<result property="email" column="email" />
|
||||||
|
|
@ -20,10 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="loginDate" column="login_date" />
|
<result property="loginDate" column="login_date" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
|
||||||
<result property="updateTime" column="update_time" />
|
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
<result property="deptName" column="inspection_station_name" />
|
|
||||||
<association property="dept" javaType="SysDept" resultMap="deptResult" />
|
<association property="dept" javaType="SysDept" resultMap="deptResult" />
|
||||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue