打开盘点记录
This commit is contained in:
commit
8fb503ee2e
@ -1,19 +1,19 @@
|
|||||||
package com.lz.common.aspect;
|
package com.lz.common.aspect;
|
||||||
|
|
||||||
import cn.hutool.system.UserInfo;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.lz.common.utils.OrderUtil;
|
import com.lz.common.utils.OrderUtil;
|
||||||
import com.lz.common.utils.R;
|
import com.lz.common.utils.R;
|
||||||
import com.lz.common.utils.ServletUtils;
|
import com.lz.common.utils.ServletUtils;
|
||||||
import com.lz.common.utils.StringUtil;
|
import com.lz.common.utils.StringUtil;
|
||||||
|
import com.lz.modules.sys.entity.SysUserEntity;
|
||||||
import org.apache.catalina.connector.ResponseFacade;
|
import org.apache.catalina.connector.ResponseFacade;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.aspectj.lang.ProceedingJoinPoint;
|
import org.aspectj.lang.ProceedingJoinPoint;
|
||||||
import org.aspectj.lang.annotation.Around;
|
import org.aspectj.lang.annotation.Around;
|
||||||
import org.aspectj.lang.annotation.Aspect;
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
import org.aspectj.lang.annotation.Pointcut;
|
import org.aspectj.lang.annotation.Pointcut;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.context.request.RequestContextHolder;
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
@ -22,7 +22,6 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -60,9 +59,14 @@ public class LogAspect {
|
|||||||
Object arg = result;
|
Object arg = result;
|
||||||
String ip = "";
|
String ip = "";
|
||||||
String m = "";
|
String m = "";
|
||||||
|
Object object = SecurityUtils.getSubject().getPrincipal();
|
||||||
|
String userName = "";
|
||||||
|
if(object !=null){
|
||||||
|
SysUserEntity userEntity = (SysUserEntity)object;
|
||||||
|
userName = userEntity.getUsername();
|
||||||
|
}
|
||||||
|
|
||||||
String userName = "";
|
String params = "";
|
||||||
String params = "";
|
|
||||||
try {
|
try {
|
||||||
ch.qos.logback.classic.Logger.threadLocalNo.set(logNo);
|
ch.qos.logback.classic.Logger.threadLocalNo.set(logNo);
|
||||||
ch.qos.logback.classic.Logger.threadLocalTime.set(start);
|
ch.qos.logback.classic.Logger.threadLocalTime.set(start);
|
||||||
|
|||||||
@ -64,7 +64,6 @@ public class ShiroConfig {
|
|||||||
filterMap.put("/captcha.jpg", "anon");
|
filterMap.put("/captcha.jpg", "anon");
|
||||||
filterMap.put("/aaa.txt", "anon");
|
filterMap.put("/aaa.txt", "anon");
|
||||||
filterMap.put("/dtlg/login", "anon");
|
filterMap.put("/dtlg/login", "anon");
|
||||||
filterMap.put("/api/**", "anon");
|
|
||||||
filterMap.put("/dtlg/luck", "anon");
|
filterMap.put("/dtlg/luck", "anon");
|
||||||
filterMap.put("/dtlg/look", "anon");
|
filterMap.put("/dtlg/look", "anon");
|
||||||
filterMap.put("/dtlg/jump", "anon");
|
filterMap.put("/dtlg/jump", "anon");
|
||||||
|
|||||||
@ -262,7 +262,6 @@ public class ResultRecordController extends AbstractController {
|
|||||||
list.add(comment);
|
list.add(comment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String superStaff = recordAuthService.selectByStaffId(resultRecord.getStaffId());
|
String superStaff = recordAuthService.selectByStaffId(resultRecord.getStaffId());
|
||||||
int fileCount = recordFileService.selectRecordFileCountByRecordId(resultRecord.getId());
|
int fileCount = recordFileService.selectRecordFileCountByRecordId(resultRecord.getId());
|
||||||
return R.ok()
|
return R.ok()
|
||||||
@ -487,10 +486,13 @@ public class ResultRecordController extends AbstractController {
|
|||||||
BigDecimal checkWeight = NumberUtil.objToBigDecimalDefault(resultDetail.getCheckWeight(), BigDecimal.ZERO);
|
BigDecimal checkWeight = NumberUtil.objToBigDecimalDefault(resultDetail.getCheckWeight(), BigDecimal.ZERO);
|
||||||
BigDecimal acquireScore = NumberUtil.objToBigDecimalDefault(resultDetail.getAcquireScore(), BigDecimal.ZERO);
|
BigDecimal acquireScore = NumberUtil.objToBigDecimalDefault(resultDetail.getAcquireScore(), BigDecimal.ZERO);
|
||||||
sum = sum.add(checkWeight.multiply(acquireScore));
|
sum = sum.add(checkWeight.multiply(acquireScore));
|
||||||
|
|
||||||
}
|
}
|
||||||
sum = BigDecimalUtil.setScale(sum, 3);
|
sum = BigDecimalUtil.setScale(sum, 3);
|
||||||
|
String scoreLevel = resultDetailService.getScoreLevel(sum.doubleValue());
|
||||||
resultRecord.setLastScore(sum);
|
resultRecord.setLastScore(sum);
|
||||||
resultRecord.setAllScore(sum);
|
resultRecord.setAllScore(sum);
|
||||||
|
resultRecord.setScoreLevel(scoreLevel);
|
||||||
resultRecordService.updateResultRecordById(resultRecord);
|
resultRecordService.updateResultRecordById(resultRecord);
|
||||||
}
|
}
|
||||||
return R.ok("保存成功").put("recordId", resultRecord.getId());
|
return R.ok("保存成功").put("recordId", resultRecord.getId());
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.lz.modules.app.dto.StaffStatisticalDto;
|
|||||||
import com.lz.modules.app.entity.StaffEntity;
|
import com.lz.modules.app.entity.StaffEntity;
|
||||||
import com.lz.modules.equipment.entity.model.FindByNameModel;
|
import com.lz.modules.equipment.entity.model.FindByNameModel;
|
||||||
import com.lz.modules.job.model.responseBo.DepartmentStaffBo;
|
import com.lz.modules.job.model.responseBo.DepartmentStaffBo;
|
||||||
|
import com.lz.modules.sys.entity.SysUserEntity;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -75,5 +76,6 @@ public interface StaffService extends IService<StaffEntity> {
|
|||||||
StaffEntity selectStaffByEmployeeId(String employeeId);
|
StaffEntity selectStaffByEmployeeId(String employeeId);
|
||||||
|
|
||||||
List<StaffEntity> selectBySearchName(IPage page, FindByNameModel nameModel);
|
List<StaffEntity> selectBySearchName(IPage page, FindByNameModel nameModel);
|
||||||
|
SysUserEntity getUser(String userName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -80,7 +80,11 @@ public class DepartmentsServiceImpl extends ServiceImpl<DepartmentsDao, Departme
|
|||||||
@Override
|
@Override
|
||||||
public StaffDepartmentDto selectStaffAllDepartments(String departmentId) {
|
public StaffDepartmentDto selectStaffAllDepartments(String departmentId) {
|
||||||
StaffDepartmentDto staffDepartmentDto = departmentsDao.selectStaffAllDepartments(departmentId);
|
StaffDepartmentDto staffDepartmentDto = departmentsDao.selectStaffAllDepartments(departmentId);
|
||||||
if(StringUtil.isEmpty(staffDepartmentDto.getDepartment1())){
|
if (StringUtil.isEmpty(staffDepartmentDto.getDepartment2())){
|
||||||
|
staffDepartmentDto.setDepartment1(staffDepartmentDto.getDepartment3());
|
||||||
|
staffDepartmentDto.setDepartment2(staffDepartmentDto.getDepartment4());
|
||||||
|
staffDepartmentDto.setDepartment3(null);
|
||||||
|
}else if(StringUtil.isEmpty(staffDepartmentDto.getDepartment1())){
|
||||||
staffDepartmentDto.setDepartment1(staffDepartmentDto.getDepartment2());
|
staffDepartmentDto.setDepartment1(staffDepartmentDto.getDepartment2());
|
||||||
staffDepartmentDto.setDepartment2(staffDepartmentDto.getDepartment3());
|
staffDepartmentDto.setDepartment2(staffDepartmentDto.getDepartment3());
|
||||||
staffDepartmentDto.setDepartment3(staffDepartmentDto.getDepartment4());
|
staffDepartmentDto.setDepartment3(staffDepartmentDto.getDepartment4());
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.google.common.collect.Lists;
|
|||||||
import com.lz.common.utils.DateUtils;
|
import com.lz.common.utils.DateUtils;
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
import com.lz.common.utils.Query;
|
import com.lz.common.utils.Query;
|
||||||
|
import com.lz.common.utils.R;
|
||||||
import com.lz.modules.app.dto.GraphicsStatisticalDto;
|
import com.lz.modules.app.dto.GraphicsStatisticalDto;
|
||||||
import com.lz.modules.app.dto.StaffBaseInfoDto;
|
import com.lz.modules.app.dto.StaffBaseInfoDto;
|
||||||
import com.lz.modules.app.dto.StaffDto;
|
import com.lz.modules.app.dto.StaffDto;
|
||||||
@ -18,6 +19,7 @@ import com.lz.modules.app.entity.*;
|
|||||||
import com.lz.modules.app.service.*;
|
import com.lz.modules.app.service.*;
|
||||||
import com.lz.modules.equipment.entity.model.FindByNameModel;
|
import com.lz.modules.equipment.entity.model.FindByNameModel;
|
||||||
import com.lz.modules.job.model.responseBo.DepartmentStaffBo;
|
import com.lz.modules.job.model.responseBo.DepartmentStaffBo;
|
||||||
|
import com.lz.modules.sys.entity.SysUserEntity;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@ -94,9 +96,29 @@ public class StaffServiceImpl extends ServiceImpl<StaffDao, StaffEntity> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<StaffEntity> selectBySearchName(IPage page, FindByNameModel nameModel){
|
public List<StaffEntity> selectBySearchName(IPage page, FindByNameModel nameModel) {
|
||||||
return staffDao.selectBySearchName(page, nameModel);
|
return staffDao.selectBySearchName(page, nameModel);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public SysUserEntity getUser(String userName) {
|
||||||
|
SysUserEntity user = null;
|
||||||
|
StaffEntity staffEntity = staffDao.selectByPhone(userName);
|
||||||
|
if(staffEntity != null){
|
||||||
|
user = new SysUserEntity();
|
||||||
|
user.setPassword(staffEntity.getPassword());
|
||||||
|
user.setMobile(staffEntity.getMobile());
|
||||||
|
user.setUserId(staffEntity.getId());
|
||||||
|
user.setEmail(staffEntity.getEmail());
|
||||||
|
user.setSalt(staffEntity.getSalt());
|
||||||
|
user.setStatus(1);
|
||||||
|
user.setType(1);
|
||||||
|
user.setUsername(staffEntity.getMobile());
|
||||||
|
user.setRealName(staffEntity.getName());
|
||||||
|
user.setUserNo(staffEntity.getMobile());
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -250,14 +250,14 @@ public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoMapper, E
|
|||||||
|
|
||||||
//记录日志
|
//记录日志
|
||||||
private void addRecord(EquipmentInfo info,SysUserEntity infoDto){
|
private void addRecord(EquipmentInfo info,SysUserEntity infoDto){
|
||||||
/*EquipmentFlowRecord record = new EquipmentFlowRecord();
|
EquipmentFlowRecord record = new EquipmentFlowRecord();
|
||||||
BeanUtils.copyProperties(info,record);
|
BeanUtils.copyProperties(info,record);
|
||||||
record.setEquipmentId(info.getId());
|
record.setEquipmentId(info.getId());
|
||||||
record.setChangeType(info.getEquipmentState());
|
record.setChangeType(info.getEquipmentState());
|
||||||
//record.setOriginalUser();
|
//record.setOriginalUser();
|
||||||
record.setRecordUserId(infoDto.getUserId());
|
record.setRecordUserId(infoDto.getUserId());
|
||||||
record.setRecordUser(infoDto.getRealName());
|
record.setRecordUser(infoDto.getRealName());
|
||||||
equipmentFlowRecordMapper.insertEquipmentFlowRecord(record);*/
|
equipmentFlowRecordMapper.insertEquipmentFlowRecord(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.lz.common.utils.NumberUtil;
|
import com.lz.common.utils.NumberUtil;
|
||||||
import com.lz.common.utils.StringUtil;
|
import com.lz.common.utils.StringUtil;
|
||||||
|
import com.lz.modules.app.dao.DepartmentsDao;
|
||||||
import com.lz.modules.app.entity.DepartmentsEntity;
|
import com.lz.modules.app.entity.DepartmentsEntity;
|
||||||
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
||||||
import com.lz.modules.app.entity.StaffEntity;
|
import com.lz.modules.app.entity.StaffEntity;
|
||||||
@ -49,6 +50,9 @@ public class RecordAuthServiceImpl extends ServiceImpl<RecordAuthMapper, RecordA
|
|||||||
@Autowired
|
@Autowired
|
||||||
private DepartmentsService departmentsService;
|
private DepartmentsService departmentsService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DepartmentsDao departmentsDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RecordAuth selectRecordAuthById(Long id){
|
public RecordAuth selectRecordAuthById(Long id){
|
||||||
return recordAuthMapper.selectRecordAuthById(id);
|
return recordAuthMapper.selectRecordAuthById(id);
|
||||||
@ -147,10 +151,33 @@ public class RecordAuthServiceImpl extends ServiceImpl<RecordAuthMapper, RecordA
|
|||||||
if (leader != null) {
|
if (leader != null) {
|
||||||
StaffEntity staffEntity = staffService.selectStaffById(leader.getStaffId());
|
StaffEntity staffEntity = staffService.selectStaffById(leader.getStaffId());
|
||||||
return staffEntity.getName();
|
return staffEntity.getName();
|
||||||
|
} else {
|
||||||
|
Map<String, String> map = departmentsService.selectUserAllDepartmentInFo(departmentsStaffRelateEntity.getDepartmentId());
|
||||||
|
if (StringUtil.isNotBlank(map.get("dd2"))) {
|
||||||
|
StaffEntity staffEntity = getLeader(map.get("dd2"));
|
||||||
|
if (staffEntity != null) {
|
||||||
|
return staffEntity.getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (StringUtil.isNotBlank(map.get("dd3"))) {
|
||||||
|
StaffEntity staffEntity = getLeader(map.get("dd3"));
|
||||||
|
if (staffEntity != null) {
|
||||||
|
return staffEntity.getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public StaffEntity getLeader(String departmentId){
|
||||||
|
DepartmentsStaffRelateEntity leader = departmentsStaffRelateService.selectLeaderByDepartmentId(departmentId);
|
||||||
|
if(leader !=null && leader.getIsLeader().equals(1)){
|
||||||
|
StaffEntity staffEntity = staffService.selectStaffById(leader.getStaffId());
|
||||||
|
return staffEntity;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -101,10 +101,15 @@ public class SysLoginController extends AbstractController {
|
|||||||
}
|
}
|
||||||
//用户信息
|
//用户信息
|
||||||
SysUserEntity user = sysUserService.queryByUserName(form.getUserName());
|
SysUserEntity user = sysUserService.queryByUserName(form.getUserName());
|
||||||
|
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
return R.error("账号不存在!");
|
if (user == null) {
|
||||||
|
user = staffService.getUser(form.getUserName());
|
||||||
|
if (user == null) {
|
||||||
|
return R.error("账号不存在!");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//账号不存在、密码错误
|
//账号不存在、密码错误
|
||||||
if (!user.getPassword().equals(new Sha256Hash(form.getPassword(), user.getSalt()).toHex())) {
|
if (!user.getPassword().equals(new Sha256Hash(form.getPassword(), user.getSalt()).toHex())) {
|
||||||
return R.error("密码不正确!");
|
return R.error("密码不正确!");
|
||||||
@ -200,14 +205,14 @@ public class SysLoginController extends AbstractController {
|
|||||||
if (user.getStatus() == 0) {
|
if (user.getStatus() == 0) {
|
||||||
return R.error("账号已被停用,请联系管理员");
|
return R.error("账号已被停用,请联系管理员");
|
||||||
}
|
}
|
||||||
//String verifyCode = form.getVerifyCode();
|
String verifyCode = form.getVerifyCode();
|
||||||
// CodeRecordEntity codeRecordEntity = codeRecordService.getOne(new QueryWrapper<CodeRecordEntity>().eq("send_account", user.getMobile()).eq("verify_code", verifyCode).eq("is_check", 0).ge("gmt_create", DateUtils.addDateMinutes(new Date(), -30)));
|
CodeRecordEntity codeRecordEntity = codeRecordService.getOne(new QueryWrapper<CodeRecordEntity>().eq("send_account", user.getMobile()).eq("verify_code", verifyCode).eq("is_check", 0).ge("gmt_create", DateUtils.addDateMinutes(new Date(), -30)));
|
||||||
|
|
||||||
/* if (codeRecordEntity == null) {
|
if (codeRecordEntity == null) {
|
||||||
return R.error("短信验证码不正确!");
|
return R.error("短信验证码不正确!");
|
||||||
}
|
}
|
||||||
codeRecordEntity.setIsCheck(1);
|
codeRecordEntity.setIsCheck(1);
|
||||||
codeRecordService.updateById(codeRecordEntity);*/
|
codeRecordService.updateById(codeRecordEntity);
|
||||||
|
|
||||||
//生成token,并保存到数据库
|
//生成token,并保存到数据库
|
||||||
R r = sysUserTokenService.createToken(user);
|
R r = sysUserTokenService.createToken(user);
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import java.util.Date;
|
|||||||
* 菜单权限表
|
* 菜单权限表
|
||||||
* </p>*业绩记录表
|
* </p>*业绩记录表
|
||||||
* @author quyixiao
|
* @author quyixiao
|
||||||
* @since 2020-08-20
|
* @since 2020-09-15
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -48,12 +48,12 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
private String departmentName;
|
private String departmentName;
|
||||||
//员工姓名
|
//员工姓名
|
||||||
private String staffName;
|
private String staffName;
|
||||||
|
|
||||||
//当前审批的员工 id
|
//当前审批的员工 id
|
||||||
private Long currentApprovalStaffId;
|
private Long currentApprovalStaffId;
|
||||||
//当前审批的员工名,以逗号隔开
|
//当前审批的员工名,以逗号隔开
|
||||||
private String currentApprovalStaffName;
|
private String currentApprovalStaffName;
|
||||||
|
//等级
|
||||||
|
private String scoreLevel;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
@ -130,14 +130,14 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0.新建,1 提交审批中,2 拒绝
|
* 0.新建,1 提交审批中,2 拒绝, 3 侍提交 ,4 审批通过,5 驳回
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Integer getStatus() {
|
public Integer getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 0.新建,1 提交审批中,2 拒绝
|
* 0.新建,1 提交审批中,2 拒绝, 3 侍提交 ,4 审批通过,5 驳回
|
||||||
* @param status
|
* @param status
|
||||||
*/
|
*/
|
||||||
public void setStatus(Integer status) {
|
public void setStatus(Integer status) {
|
||||||
@ -241,10 +241,8 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
public String getDepartmentId() {
|
public String getDepartmentId() {
|
||||||
return departmentId;
|
return departmentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 员工所在部门 id
|
* 员工所在部门 id
|
||||||
*
|
|
||||||
* @param departmentId
|
* @param departmentId
|
||||||
*/
|
*/
|
||||||
public void setDepartmentId(String departmentId) {
|
public void setDepartmentId(String departmentId) {
|
||||||
@ -253,13 +251,11 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 员工所在部门名称
|
* 员工所在部门名称
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getDepartmentName() {
|
public String getDepartmentName() {
|
||||||
return departmentName;
|
return departmentName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 员工所在部门名称
|
* 员工所在部门名称
|
||||||
* @param departmentName
|
* @param departmentName
|
||||||
@ -283,22 +279,51 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
this.staffName = staffName;
|
this.staffName = staffName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前审批的员工 id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public Long getCurrentApprovalStaffId() {
|
public Long getCurrentApprovalStaffId() {
|
||||||
return currentApprovalStaffId;
|
return currentApprovalStaffId;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 当前审批的员工 id
|
||||||
|
* @param currentApprovalStaffId
|
||||||
|
*/
|
||||||
public void setCurrentApprovalStaffId(Long currentApprovalStaffId) {
|
public void setCurrentApprovalStaffId(Long currentApprovalStaffId) {
|
||||||
this.currentApprovalStaffId = currentApprovalStaffId;
|
this.currentApprovalStaffId = currentApprovalStaffId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前审批的员工名,以逗号隔开
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public String getCurrentApprovalStaffName() {
|
public String getCurrentApprovalStaffName() {
|
||||||
return currentApprovalStaffName;
|
return currentApprovalStaffName;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 当前审批的员工名,以逗号隔开
|
||||||
|
* @param currentApprovalStaffName
|
||||||
|
*/
|
||||||
public void setCurrentApprovalStaffName(String currentApprovalStaffName) {
|
public void setCurrentApprovalStaffName(String currentApprovalStaffName) {
|
||||||
this.currentApprovalStaffName = currentApprovalStaffName;
|
this.currentApprovalStaffName = currentApprovalStaffName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 等级
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getScoreLevel() {
|
||||||
|
return scoreLevel;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 等级
|
||||||
|
* @param scoreLevel
|
||||||
|
*/
|
||||||
|
public void setScoreLevel(String scoreLevel) {
|
||||||
|
this.scoreLevel = scoreLevel;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ResultRecord{" +
|
return "ResultRecord{" +
|
||||||
@ -317,9 +342,9 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
",departmentId=" + departmentId +
|
",departmentId=" + departmentId +
|
||||||
",departmentName=" + departmentName +
|
",departmentName=" + departmentName +
|
||||||
",staffName=" + staffName +
|
",staffName=" + staffName +
|
||||||
|
",currentApprovalStaffId=" + currentApprovalStaffId +
|
||||||
|
",currentApprovalStaffName=" + currentApprovalStaffName +
|
||||||
|
",scoreLevel=" + scoreLevel +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -61,4 +61,6 @@ public interface ResultDetailService extends IService<ResultDetail> {
|
|||||||
String initRole(Long staffId, Long l);
|
String initRole(Long staffId, Long l);
|
||||||
|
|
||||||
List<Step> getStepList(ResultRecord resultRecord);
|
List<Step> getStepList(ResultRecord resultRecord);
|
||||||
|
|
||||||
|
String getScoreLevel(double doubleValue);
|
||||||
}
|
}
|
||||||
@ -283,4 +283,26 @@ public class ResultDetailServiceImpl extends ServiceImpl<ResultDetailMapper, Res
|
|||||||
return stepList;
|
return stepList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getScoreLevel(double doubleValue) {
|
||||||
|
if(doubleValue < 3.375){
|
||||||
|
return "3.25";
|
||||||
|
}else if(doubleValue < 3.5 ){
|
||||||
|
return "3.5-";
|
||||||
|
}else if (doubleValue < 3.583){
|
||||||
|
return "3.5";
|
||||||
|
}else if (doubleValue < 3.667){
|
||||||
|
return "3.5+";
|
||||||
|
}else if (doubleValue < 3.75){
|
||||||
|
return "3.75-";
|
||||||
|
}else if (doubleValue < 3.875){
|
||||||
|
return "3.75";
|
||||||
|
}else if (doubleValue < 4 ){
|
||||||
|
return "3.75+";
|
||||||
|
}else if (doubleValue == 4 ){
|
||||||
|
return "4";
|
||||||
|
}
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -182,7 +182,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
params.setStatusList(listx);
|
params.setStatusList(listx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if("1,2,5".equals(params.getStatusStr())){
|
if("1,2,5".equals(params.getStatusStr()) || "3".equals(params.getStatusStr())){
|
||||||
params.setApprovalStaffId(user.getUserId());
|
params.setApprovalStaffId(user.getUserId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,6 +271,15 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
if (flowDepartment == null) {
|
if (flowDepartment == null) {
|
||||||
DepartmentsStaffRelateEntity departmentsStaffRelateEntity = departmentsStaffRelateService.selectLastDepartmentByStaffId(staffId);
|
DepartmentsStaffRelateEntity departmentsStaffRelateEntity = departmentsStaffRelateService.selectLastDepartmentByStaffId(staffId);
|
||||||
DepartmentsStaffRelateEntity leader = departmentsStaffRelateService.selectLeaderByDepartmentId(departmentsStaffRelateEntity.getDepartmentId());
|
DepartmentsStaffRelateEntity leader = departmentsStaffRelateService.selectLeaderByDepartmentId(departmentsStaffRelateEntity.getDepartmentId());
|
||||||
|
if(leader == null){
|
||||||
|
Map<String, String> map = departmentsService.selectUserAllDepartmentInFo(departmentsStaffRelateEntity.getDepartmentId());
|
||||||
|
if (StringUtil.isNotBlank(map.get("dd2"))) {
|
||||||
|
leader = departmentsStaffRelateService.selectLeaderByDepartmentId(map.get("dd2"));
|
||||||
|
if(leader ==null && StringUtil.isNotBlank(map.get("dd3"))){
|
||||||
|
leader = departmentsStaffRelateService.selectLeaderByDepartmentId(map.get("dd3"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
flowDepartment = flowDepartmentService.selectByStaffId(leader.getStaffId());
|
flowDepartment = flowDepartmentService.selectByStaffId(leader.getStaffId());
|
||||||
flowId = TypeFlowDto.getFlowId(flowDepartment.getFlowIds(), Constant.CHILD, type);//表示是部门下的普通员工
|
flowId = TypeFlowDto.getFlowId(flowDepartment.getFlowIds(), Constant.CHILD, type);//表示是部门下的普通员工
|
||||||
list.add(flowDepartment);
|
list.add(flowDepartment);
|
||||||
@ -431,15 +440,17 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
flowRecord.setFlowStaffIdRole(staffRoles);
|
flowRecord.setFlowStaffIdRole(staffRoles);
|
||||||
|
|
||||||
flowRecord.setStatusName(FlowRecordEnum.APPROVALING.getName());
|
flowRecord.setStatusName(FlowRecordEnum.APPROVALING.getName());
|
||||||
FlowRecord lastFlowRecordNoStatus = flowRecordService.selectLastFlowNoStatusRecordByRecordId(resultRecordId);
|
|
||||||
|
|
||||||
|
FlowRecord lastFlowRecordNoStatus = flowRecordService.selectLastFlowNoStatusRecordByRecordId(resultRecordId);
|
||||||
// 如果上一步是开始,则不进行修改,如果上一步是确认中,改成提交,如果上一点是审批中,将上一步改成通过
|
// 如果上一步是开始,则不进行修改,如果上一步是确认中,改成提交,如果上一点是审批中,将上一步改成通过
|
||||||
if (lastFlowRecordNoStatus != null) {
|
if (lastFlowRecordNoStatus != null) {
|
||||||
if (!StringUtil.equals(lastFlowRecordNoStatus.getStatusName(), FlowRecordEnum.START.getName())
|
if (!StringUtil.equals(lastFlowRecordNoStatus.getStatusName(), FlowRecordEnum.START.getName())
|
||||||
&& !StringUtil.equals(lastFlowRecordNoStatus.getStatusName(), FlowRecordEnum.CONFIRM.getName())) {
|
&& !StringUtil.equals(lastFlowRecordNoStatus.getStatusName(), FlowRecordEnum.CONFIRM.getName())) {
|
||||||
lastFlowRecordNoStatus.setStatusName(FlowRecordEnum.APPROVAL.getName());
|
lastFlowRecordNoStatus.setStatusName(FlowRecordEnum.APPROVAL.getName());
|
||||||
|
lastFlowRecordNoStatus.setGmtCreate(new Date());
|
||||||
} else if (StringUtil.equals(lastFlowRecordNoStatus.getStatusName(), FlowRecordEnum.CONFIRM.getName())) {
|
} else if (StringUtil.equals(lastFlowRecordNoStatus.getStatusName(), FlowRecordEnum.CONFIRM.getName())) {
|
||||||
lastFlowRecordNoStatus.setStatusName(FlowRecordEnum.COMMIT.getName());
|
lastFlowRecordNoStatus.setStatusName(FlowRecordEnum.COMMIT.getName());
|
||||||
|
lastFlowRecordNoStatus.setGmtCreate(new Date());
|
||||||
}
|
}
|
||||||
flowRecordService.updateFlowRecordById(lastFlowRecordNoStatus);
|
flowRecordService.updateFlowRecordById(lastFlowRecordNoStatus);
|
||||||
}
|
}
|
||||||
@ -544,6 +555,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
|
|
||||||
FlowRecord lastFlowRecordNoStatus = flowRecordService.selectLastFlowNoStatusRecordByRecordId(req.getRecordResultId());
|
FlowRecord lastFlowRecordNoStatus = flowRecordService.selectLastFlowNoStatusRecordByRecordId(req.getRecordResultId());
|
||||||
lastFlowRecordNoStatus.setStatusName(FlowRecordEnum.REJECT.getName());
|
lastFlowRecordNoStatus.setStatusName(FlowRecordEnum.REJECT.getName());
|
||||||
|
lastFlowRecordNoStatus.setGmtCreate(new Date()); //更新驳回时间
|
||||||
flowRecordService.updateFlowRecordById(lastFlowRecordNoStatus);
|
flowRecordService.updateFlowRecordById(lastFlowRecordNoStatus);
|
||||||
|
|
||||||
// 可能会被删除
|
// 可能会被删除
|
||||||
|
|||||||
@ -21,12 +21,13 @@
|
|||||||
<result column="staff_name" property="staffName"/>
|
<result column="staff_name" property="staffName"/>
|
||||||
<result column="current_approval_staff_id" property="currentApprovalStaffId"/>
|
<result column="current_approval_staff_id" property="currentApprovalStaffId"/>
|
||||||
<result column="current_approval_staff_name" property="currentApprovalStaffName"/>
|
<result column="current_approval_staff_name" property="currentApprovalStaffName"/>
|
||||||
|
<result column="score_level" property="scoreLevel"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, month_time AS monthTime, status AS status, last_score AS lastScore, all_score AS allScore, remark AS remark, staff_id AS staffId, type AS type, flow_staff_id_role AS flowStaffIdRole, department_id AS departmentId, department_name AS departmentName, staff_name AS staffName, current_approval_staff_id AS currentApprovalStaffId, current_approval_staff_name AS currentApprovalStaffName
|
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, month_time AS monthTime, status AS status, last_score AS lastScore, all_score AS allScore, remark AS remark, staff_id AS staffId, type AS type, flow_staff_id_role AS flowStaffIdRole, department_id AS departmentId, department_name AS departmentName, staff_name AS staffName, current_approval_staff_id AS currentApprovalStaffId, current_approval_staff_name AS currentApprovalStaffName, score_level AS scoreLevel
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
@ -52,6 +53,7 @@
|
|||||||
<if test="staffName != null">staff_name, </if>
|
<if test="staffName != null">staff_name, </if>
|
||||||
<if test="currentApprovalStaffId != null">current_approval_staff_id, </if>
|
<if test="currentApprovalStaffId != null">current_approval_staff_id, </if>
|
||||||
<if test="currentApprovalStaffName != null">current_approval_staff_name, </if>
|
<if test="currentApprovalStaffName != null">current_approval_staff_name, </if>
|
||||||
|
<if test="scoreLevel != null">score_level, </if>
|
||||||
is_delete,
|
is_delete,
|
||||||
gmt_create,
|
gmt_create,
|
||||||
gmt_modified
|
gmt_modified
|
||||||
@ -69,6 +71,7 @@
|
|||||||
<if test="staffName != null">#{ staffName}, </if>
|
<if test="staffName != null">#{ staffName}, </if>
|
||||||
<if test="currentApprovalStaffId != null">#{ currentApprovalStaffId}, </if>
|
<if test="currentApprovalStaffId != null">#{ currentApprovalStaffId}, </if>
|
||||||
<if test="currentApprovalStaffName != null">#{ currentApprovalStaffName}, </if>
|
<if test="currentApprovalStaffName != null">#{ currentApprovalStaffName}, </if>
|
||||||
|
<if test="scoreLevel != null">#{ scoreLevel}, </if>
|
||||||
0,
|
0,
|
||||||
now(),
|
now(),
|
||||||
now()
|
now()
|
||||||
@ -94,7 +97,8 @@
|
|||||||
<if test="departmentName != null">department_name = #{departmentName},</if>
|
<if test="departmentName != null">department_name = #{departmentName},</if>
|
||||||
<if test="staffName != null">staff_name = #{staffName},</if>
|
<if test="staffName != null">staff_name = #{staffName},</if>
|
||||||
<if test="currentApprovalStaffId != null">current_approval_staff_id = #{currentApprovalStaffId},</if>
|
<if test="currentApprovalStaffId != null">current_approval_staff_id = #{currentApprovalStaffId},</if>
|
||||||
<if test="currentApprovalStaffName != null">current_approval_staff_name = #{currentApprovalStaffName}</if>
|
<if test="currentApprovalStaffName != null">current_approval_staff_name = #{currentApprovalStaffName},</if>
|
||||||
|
<if test="scoreLevel != null">score_level = #{scoreLevel}</if>
|
||||||
</trim>
|
</trim>
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
@ -119,7 +123,8 @@
|
|||||||
department_name = #{departmentName},
|
department_name = #{departmentName},
|
||||||
staff_name = #{staffName},
|
staff_name = #{staffName},
|
||||||
current_approval_staff_id = #{currentApprovalStaffId},
|
current_approval_staff_id = #{currentApprovalStaffId},
|
||||||
current_approval_staff_name = #{currentApprovalStaffName}
|
current_approval_staff_name = #{currentApprovalStaffName},
|
||||||
|
score_level = #{scoreLevel}
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
@ -131,6 +136,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectByCondition" resultType="com.lz.modules.sys.entity.app.ResultRecord">
|
<select id="selectByCondition" resultType="com.lz.modules.sys.entity.app.ResultRecord">
|
||||||
select * from lz_result_record where is_delete = 0
|
select * from lz_result_record where is_delete = 0
|
||||||
<if test="req.monthBeginDate != null and req.monthBeginDate != '' ">
|
<if test="req.monthBeginDate != null and req.monthBeginDate != '' ">
|
||||||
|
|||||||
@ -63,7 +63,7 @@ public class MysqlMain {
|
|||||||
}
|
}
|
||||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||||
|
|
||||||
list.add(new TablesBean("lz_flow_record"));
|
list.add(new TablesBean("lz_result_record"));
|
||||||
|
|
||||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user