Commit f5732181 authored by 蔡镇泽's avatar 蔡镇泽

设置预约日期和备注接口

parent 55bd9ae6
...@@ -300,4 +300,37 @@ public class TaskController { ...@@ -300,4 +300,37 @@ public class TaskController {
return Result.success(); return Result.success();
} }
/**
* 设置预约日期和备注
*
* @param pushId 分组id
* @param time 预约日期 yyyy-MM-dd
* @param remark 备注
*/
@RequestMapping("/updatePushTimeAndRemark")
public Result updatePushTimeAndRemark(String pushId, String time, String remark) {
if (StringUtils.isBlank(pushId)) {
return Result.failed("分组id不能为空!");
}
if (StringUtils.isBlank(time)) {
return Result.failed("预约日期不能为空!");
}
if (StringUtils.isBlank(remark)) {
return Result.failed("备注不能为空!");
}
Date timeDate;
try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
timeDate = sdf.parse(time);
} catch (ParseException e) {
return Result.failed("预约日期格式不正确!");
}
Result<Object> objectResult = taskService.updatePushTimeAndRemark(pushId, timeDate, remark);
if (!ResultCode.SUCCESS.getCode().equals(objectResult.getCode())) {
//失败
return Result.failed(objectResult.getMsg());
}
return Result.success();
}
} }
...@@ -72,4 +72,6 @@ public interface TaskService { ...@@ -72,4 +72,6 @@ public interface TaskService {
TaskGroupInfoListInfoVO taskGroupInfoListInfo(String pushId); TaskGroupInfoListInfoVO taskGroupInfoListInfo(String pushId);
List<AllotTaskHisVO> allotTaskHisList(); List<AllotTaskHisVO> allotTaskHisList();
Result<Object> updatePushTimeAndRemark(String pushId, Date timeDate, String remark);
} }
...@@ -174,7 +174,6 @@ public class TaskServiceImpl implements TaskService { ...@@ -174,7 +174,6 @@ public class TaskServiceImpl implements TaskService {
} }
//生成组 //生成组
ChAprTaskPush taskPush = new ChAprTaskPush(); ChAprTaskPush taskPush = new ChAprTaskPush();
taskPush.setTime(new Date());
taskPush.setAssignTime(new Date()); taskPush.setAssignTime(new Date());
taskPush.setGroupNumber(SerialNumberUtils.getSerialNumber(empId)); taskPush.setGroupNumber(SerialNumberUtils.getSerialNumber(empId));
taskPush.setTaskId(Long.parseLong(id)); taskPush.setTaskId(Long.parseLong(id));
...@@ -245,4 +244,19 @@ public class TaskServiceImpl implements TaskService { ...@@ -245,4 +244,19 @@ public class TaskServiceImpl implements TaskService {
public List<AllotTaskHisVO> allotTaskHisList() { public List<AllotTaskHisVO> allotTaskHisList() {
return taskMapper.allotTaskHisList(); return taskMapper.allotTaskHisList();
} }
@Override
public Result<Object> updatePushTimeAndRemark(String pushId, Date timeDate, String remark) {
ChAprTaskPush chAprTaskPush = taskPushMapper.selectById(pushId);
if (chAprTaskPush == null) {
return Result.failed("无效的分组id!");
}
chAprTaskPush.setTime(timeDate);
chAprTaskPush.setRefuseRemark(remark);
int i = taskPushMapper.updateById(chAprTaskPush);
if (i <= 0) {
return Result.failed("更新失败!");
}
return Result.success();
}
} }
\ No newline at end of file
...@@ -233,6 +233,7 @@ ...@@ -233,6 +233,7 @@
<select id="taskGroupInfoList" resultType="com.hungraim.ltc.pojo.vo.assessment.TaskGroupInfoVO"> <select id="taskGroupInfoList" resultType="com.hungraim.ltc.pojo.vo.assessment.TaskGroupInfoVO">
select push.task_push_id taskPushId, select push.task_push_id taskPushId,
push.time time, push.time time,
push.assignTime assignTime,
push.Group_number groupNumber, push.Group_number groupNumber,
task.apr_organ_id aprOrganId, task.apr_organ_id aprOrganId,
organ.ORGAN_NAME organName, organ.ORGAN_NAME organName,
......
...@@ -15,11 +15,16 @@ public class TaskGroupInfoVO { ...@@ -15,11 +15,16 @@ public class TaskGroupInfoVO {
*/ */
private String taskPushId; private String taskPushId;
/** /**
* 分组日期 * 预约时间
*/ */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date time; private Date time;
/** /**
* 分组日期
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date assignTime;
/**
* 组号 * 组号
*/ */
private String groupNumber; private String groupNumber;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment