Commit c8fde557 authored by 赵啸非's avatar 赵啸非

目标看板修改业务,申诉添加字段

parent bd406c3f
...@@ -24,16 +24,13 @@ public class AppealReq extends BaseReq { ...@@ -24,16 +24,13 @@ public class AppealReq extends BaseReq {
private Integer appealResult; private Integer appealResult;
private Integer processStatus; private Integer processStatus;
/** /**
* 当前员工id * 当前员工id
*/ */
private Long staffId; private Long staffId;
/** /**
* 核查记录id * 核查记录id
*/ */
......
...@@ -80,8 +80,9 @@ public class ApiLoginController extends BaseJsonBodyController { ...@@ -80,8 +80,9 @@ public class ApiLoginController extends BaseJsonBodyController {
data.put("userType", userEntity.getUserType()); data.put("userType", userEntity.getUserType());
HashSet<Integer> set = new HashSet<>(); HashSet<Integer> set = new HashSet<>();
set.add(1); set.add(0);
set.add(2); set.add(2);
set.add(3);
if (ObjectUtils.isEmpty(userEntity.getUserType()) || !set.contains(userEntity.getUserType())) { if (ObjectUtils.isEmpty(userEntity.getUserType()) || !set.contains(userEntity.getUserType())) {
throw new AppException("当前用户不支持H5登录!"); throw new AppException("当前用户不支持H5登录!");
...@@ -89,7 +90,7 @@ public class ApiLoginController extends BaseJsonBodyController { ...@@ -89,7 +90,7 @@ public class ApiLoginController extends BaseJsonBodyController {
userEntity.setLoginTime(System.currentTimeMillis()); userEntity.setLoginTime(System.currentTimeMillis());
userEntity.setToken(IdUtil.fastSimpleUUID()); userEntity.setToken(IdUtil.fastSimpleUUID());
userEntity.setExpireTime(DateUtils.addCurrDate(7).getTime()); userEntity.setExpireTime(DateUtils.addCurrDate(3).getTime());
String token = authTokenService.createToken(userEntity); String token = authTokenService.createToken(userEntity);
data.put("token", token); data.put("token", token);
ret.put(KEY_RESULT_DATA, data); ret.put(KEY_RESULT_DATA, data);
......
...@@ -173,36 +173,45 @@ public class AppealApiController extends AbstractBaseController<PerformReq> { ...@@ -173,36 +173,45 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
//根据状态 查询 当前是否已经存在正在进行的申诉 //根据状态 查询 当前是否已经存在正在进行的申诉
if (ObjectUtils.isEmpty(req.getId())) throw new AppException("核查记录Id不能为空!"); if (ObjectUtils.isEmpty(req.getId())) throw new AppException("核查记录Id不能为空!");
if (ObjectUtils.isEmpty(req.getPerformType())) throw new AppException("绩效类型不能为空!"); if (ObjectUtils.isEmpty(req.getPerformType())) throw new AppException("绩效类型不能为空!");
PerformAttendAppealEntity entity = new PerformAttendAppealEntity();
entity.initAttrValue();
if (PerformTypeEnum.考勤绩效.getValue().equals(req.getPerformType())) {
//查询当前核查是否已存在进行中的申诉记录 //查询当前核查是否已存在进行中的申诉记录
PerformAttendAppealEntity appealEntity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(req.getId())); PerformAttendAppealEntity appealEntity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(req.getId()));
if (!ObjectUtils.isEmpty(appealEntity) && appealEntity.getProcessStatus() == ProcessStatusEnum.未处理.getValue()) { if (!ObjectUtils.isEmpty(appealEntity) && appealEntity.getProcessStatus() == ProcessStatusEnum.未处理.getValue()) {
throw new AppException("当前绩效核查已经存在正在进行中的申诉记录!"); throw new AppException("当前绩效核查已经存在正在进行中的申诉记录!");
} }
PerformAttendAppealEntity entity = new PerformAttendAppealEntity();
entity.initAttrValue();
if (PerformTypeEnum.考勤绩效.getValue().equals(req.getPerformType())) {
CheckAttendRecordEntity checkEntity = checkAttendRecordService.get(req.getId(), context); CheckAttendRecordEntity checkEntity = checkAttendRecordService.get(req.getId(), context);
BeanUtils.copyProperties(checkEntity, entity, BeanUtil.getNullPropertyNames(checkEntity)); BeanUtils.copyProperties(checkEntity, entity, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.评价差评绩效.getValue().equals(req.getPerformType())) { } else if (PerformTypeEnum.评价差评绩效.getValue().equals(req.getPerformType())) {
CheckReviewRecordEntity checkEntity = checkReviewRecordService.get(req.getId(), context); CheckReviewRecordEntity checkEntity = checkReviewRecordService.get(req.getId(), context);
BeanUtils.copyProperties(checkEntity, entity, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.评价投诉绩效.getValue().equals(req.getPerformType())) { } else if (PerformTypeEnum.评价投诉绩效.getValue().equals(req.getPerformType())) {
CheckComplainRecordEntity checkEntity = checkComplainRecordService.get(req.getId(), context); CheckComplainRecordEntity checkEntity = checkComplainRecordService.get(req.getId(), context);
BeanUtils.copyProperties(checkEntity, entity, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.办件绩效.getValue().equals(req.getPerformType())) { } else if (PerformTypeEnum.办件绩效.getValue().equals(req.getPerformType())) {
CheckGoworkRecordEntity checkEntity = checkGoworkRecordService.get(req.getId(), context); CheckGoworkRecordEntity checkEntity = checkGoworkRecordService.get(req.getId(), context);
BeanUtils.copyProperties(checkEntity, entity, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.效能绩效.getValue().equals(req.getPerformType())) { } else if (PerformTypeEnum.效能绩效.getValue().equals(req.getPerformType())) {
CheckEffectRecordEntity checkEntity = checkEffectRecordService.get(req.getId(), context); CheckEffectRecordEntity checkEntity = checkEffectRecordService.get(req.getId(), context);
BeanUtils.copyProperties(checkEntity, entity, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.其它绩效.getValue().equals(req.getPerformType())) { } else if (PerformTypeEnum.其它绩效.getValue().equals(req.getPerformType())) {
CheckOtherRecordEntity checkEntity = checkOtherRecordService.get(req.getId(), context); CheckOtherRecordEntity checkEntity = checkOtherRecordService.get(req.getId(), context);
BeanUtils.copyProperties(checkEntity, entity, BeanUtil.getNullPropertyNames(checkEntity));
} else { } else {
throw new AppException("不支持当前绩效类型"); throw new AppException("不支持当前绩效类型");
} }
entity.setPerformType(req.getPerformType());
entity.setPerformAttendAppealFilesList(req.getPerformAttendAppealFilesList()); entity.setPerformAttendAppealFilesList(req.getPerformAttendAppealFilesList());
entity.setProcessStatus(1); entity.setProcessStatus(1);
entity.setAppealDesc(req.getAppealDesc());
PerformAttendAppealEntity saveEntity = appealService.save(entity, context); PerformAttendAppealEntity saveEntity = appealService.save(entity, context);
rest.setData(saveEntity); rest.setData(saveEntity);
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
......
...@@ -11,7 +11,8 @@ import java.util.Map; ...@@ -11,7 +11,8 @@ import java.util.Map;
public enum UserType { public enum UserType {
SYSTEM(0, "系统用户"), SYSTEM(0, "系统用户"),
WORK(1, "后台管理"), WORK(1, "后台管理"),
WORK_PERSON(2, "工作人员"); WORK_PERSON(2, "工作人员"),
INSPECT_PERSON(3, "巡查人员");;
private int value; private int value;
private String desc; private String desc;
......
...@@ -9,10 +9,7 @@ import com.mortals.xhx.base.system.role.model.RoleUserQuery; ...@@ -9,10 +9,7 @@ import com.mortals.xhx.base.system.role.model.RoleUserQuery;
import com.mortals.xhx.base.system.role.service.RoleUserService; import com.mortals.xhx.base.system.role.service.RoleUserService;
import com.mortals.xhx.base.system.user.model.UserEntity; import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.service.UserService; import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.StaffSatusEnum; import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.code.StaffTypeEnum;
import com.mortals.xhx.common.code.StatusEnum;
import com.mortals.xhx.common.code.UserStatus;
import com.mortals.xhx.module.staff.dao.StaffDao; import com.mortals.xhx.module.staff.dao.StaffDao;
import com.mortals.xhx.module.staff.dao.ibatis.StaffDaoImpl; import com.mortals.xhx.module.staff.dao.ibatis.StaffDaoImpl;
import com.mortals.xhx.module.staff.dao.ibatis.StaffLeaveDaoImpl; import com.mortals.xhx.module.staff.dao.ibatis.StaffLeaveDaoImpl;
...@@ -103,7 +100,7 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta ...@@ -103,7 +100,7 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
userEntity.setLoginName(StrUtil.cleanBlank(entity.getLoginName())); userEntity.setLoginName(StrUtil.cleanBlank(entity.getLoginName()));
userEntity.setRealName(entity.getName()); userEntity.setRealName(entity.getName());
userEntity.setUserType(2); userEntity.setUserType(UserType.WORK_PERSON.getValue());
userEntity.setSiteIds("1"); userEntity.setSiteIds("1");
userEntity.setAreaCodes("511500000000"); userEntity.setAreaCodes("511500000000");
userEntity.setStatus(UserStatus.NORMAL.getValue()); userEntity.setStatus(UserStatus.NORMAL.getValue());
......
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