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

鉴定任务分配时生成组

parent f3779264
...@@ -160,7 +160,6 @@ public class TaskController { ...@@ -160,7 +160,6 @@ public class TaskController {
return Result.success(); return Result.success();
} }
/** /**
* 评定任务分组管理列表 * 评定任务分组管理列表
* *
......
...@@ -12,6 +12,7 @@ import com.hungraim.ltc.pojo.vo.assessment.TaskGroupVO; ...@@ -12,6 +12,7 @@ import com.hungraim.ltc.pojo.vo.assessment.TaskGroupVO;
import com.hungraim.ltc.pojo.vo.assessment.TaskReportVO; import com.hungraim.ltc.pojo.vo.assessment.TaskReportVO;
import com.hungraim.ltc.service.TaskService; import com.hungraim.ltc.service.TaskService;
import com.hungraim.ltc.util.Result; import com.hungraim.ltc.util.Result;
import com.hungraim.ltc.util.SerialNumberUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -170,6 +171,15 @@ public class TaskServiceImpl implements TaskService { ...@@ -170,6 +171,15 @@ public class TaskServiceImpl implements TaskService {
if (count != 1) { if (count != 1) {
return Result.failed("修改失败!"); return Result.failed("修改失败!");
} }
//生成组
ChAprTaskPush taskPush = new ChAprTaskPush();
taskPush.setTime(new Date());
taskPush.setGroupNumber(SerialNumberUtils.getSerialNumber(empId.toString()));
taskPush.setTaskId(Long.getLong(id));
taskPush.setEmpId(empId.longValue());
taskPush.setStatus((short) 1);
taskPush.setIsManual((short) 1);
taskPushMapper.insert(taskPush);
} }
return Result.success(); return Result.success();
} }
......
package com.hungraim.ltc.util;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* 流水号生成工具
*/
public class SerialNumberUtils {
/**
* 生成流水号(当前时间的年月日时分秒+key)
*
* @param key 一秒内不会重复的字符串保证流水号的唯一性
* @return 流水号
*/
public static String getSerialNumber(String key) {
DateFormat dateFormat = new SimpleDateFormat(DateUtils.DATE_PATTERN_yyyyMMddHHMMss);
dateFormat.format(new Date());
return dateFormat.toString() + key;
}
}
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