Commit 57c06e2d authored by zhangch's avatar zhangch
parents f6fa3491 ec50248a
package com.hungraim.ltc.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.eval.ChAprEmp;
import com.hungraim.ltc.pojo.vo.assessment.TaskDistributionVO;
import com.hungraim.ltc.pojo.vo.assessment.TaskGroupVO;
......@@ -89,6 +90,15 @@ public class TaskController {
}
/**
* 查询失能等级列表
*/
@RequestMapping("/cfgSrvDisableLevelList")
public Result<List<ChCfgSrvDisableLevel>> cfgSrvDisableLevelList() {
List<ChCfgSrvDisableLevel> list = taskService.cfgSrvDisableLevelList();
return Result.success(list);
}
/**
* 评定报告新增
*
* @param taskId 评定报告id
......@@ -150,7 +160,6 @@ public class TaskController {
return Result.success();
}
/**
* 评定任务分组管理列表
*
......
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* @author czz
*/
@Mapper
@Repository
public interface CfgSrvDisableLevelMapper extends BaseMapper<ChCfgSrvDisableLevel> {
}
package com.hungraim.ltc.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.eval.ChAprEmp;
import com.hungraim.ltc.pojo.vo.assessment.TaskDistributionVO;
import com.hungraim.ltc.pojo.vo.assessment.TaskGroupVO;
......@@ -61,4 +62,6 @@ public interface TaskService {
List<TaskGroupVO> taskGroupList(String name, String certiCode, String tel);
Result<Object> taskGroup(Integer pushId, Integer status);
List<ChCfgSrvDisableLevel> cfgSrvDisableLevelList();
}
......@@ -5,12 +5,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.dao.*;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.eval.*;
import com.hungraim.ltc.pojo.vo.assessment.TaskDistributionVO;
import com.hungraim.ltc.pojo.vo.assessment.TaskGroupVO;
import com.hungraim.ltc.pojo.vo.assessment.TaskReportVO;
import com.hungraim.ltc.service.TaskService;
import com.hungraim.ltc.util.Result;
import com.hungraim.ltc.util.SerialNumberUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -36,6 +38,8 @@ public class TaskServiceImpl implements TaskService {
private AprPeronInfoMapper peronInfoMapper;
@Autowired
private TaskPushMapper taskPushMapper;
@Autowired
private CfgSrvDisableLevelMapper cfgSrvDisableLevelMapper;
@Override
public IPage<TaskDistributionVO> taskDistributionList(String organId, String provincial, String city,
......@@ -167,6 +171,15 @@ public class TaskServiceImpl implements TaskService {
if (count != 1) {
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();
}
......@@ -186,4 +199,9 @@ public class TaskServiceImpl implements TaskService {
taskPushMapper.updateById(chAprTaskPush);
return Result.success();
}
@Override
public List<ChCfgSrvDisableLevel> cfgSrvDisableLevelList() {
return cfgSrvDisableLevelMapper.selectList(new QueryWrapper<>());
}
}
\ No newline at end of file
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