|
@@ -128,10 +128,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
@Resource
|
|
|
private ProjectMapper projectMapper;
|
|
|
@Resource
|
|
|
- private UserSalaryMapper userSalaryMapper;
|
|
|
- @Resource
|
|
|
- private UserSalaryService userSalaryService;
|
|
|
- @Resource
|
|
|
private UserVcodeMapper userVcodeMapper;
|
|
|
@Resource
|
|
|
private TaskMapper taskMapper;
|
|
@@ -431,14 +427,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
if (updateUserList.size() > 0) {
|
|
|
//有人员薪资更新
|
|
|
updateBatchById(updateUserList);
|
|
|
- //记录薪资变动
|
|
|
- List<UserSalary> salaryChangeList = new ArrayList<>();
|
|
|
- for (User u : updateUserList) {
|
|
|
- UserSalary salary = UserSalary.copyFromUser(u);
|
|
|
- salary.setYmonth(yearMonth);
|
|
|
- salaryChangeList.add(salary);
|
|
|
- }
|
|
|
- userSalaryService.saveBatch(salaryChangeList);
|
|
|
}
|
|
|
//更新该月份的日报相关的成本
|
|
|
if (!StringUtils.isEmpty(yearMonth)) {
|
|
@@ -908,7 +896,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
httpRespMsg.setError(MessageUtils.message("staff.deleteErrorByProject"));
|
|
|
} else {
|
|
|
userMapper.deleteById(userId);
|
|
|
- userSalaryMapper.delete(new QueryWrapper<UserSalary>().eq("user_id", userId));
|
|
|
//项目参与人可以直接删除
|
|
|
participationMapper.delete(new QueryWrapper<Participation>().eq("user_id", userId));
|
|
|
}
|
|
@@ -1165,9 +1152,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
//httpRespMsg.setError("操作失败");
|
|
|
httpRespMsg.setError(MessageUtils.message("other.operationFail"));
|
|
|
} else {
|
|
|
- //插入人员历史成本表
|
|
|
- UserSalary userSalary = UserSalary.copyFromUser(user);
|
|
|
- userSalaryMapper.insert(userSalary);
|
|
|
//插入人员专业证书表
|
|
|
if (!StringUtils.isEmpty(certJson)) {
|
|
|
List<UserCert> certList = JSONArray.parseArray(certJson, UserCert.class);
|
|
@@ -1193,18 +1177,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
return httpRespMsg;
|
|
|
}
|
|
|
User oldUser = userMapper.selectById(targetId);
|
|
|
- boolean salaryChange = false;
|
|
|
-
|
|
|
- if (oldUser.getCost() == null) {
|
|
|
- if (costValue.intValue() != 0) {
|
|
|
- salaryChange = true;
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (oldUser.getCost().compareTo(costValue) != 0) {
|
|
|
- salaryChange = true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
String oldCostApplyDate = oldUser.getCostApplyDate();
|
|
|
if(!StringUtils.isEmpty(inductionDate)){
|
|
|
oldUser.setInductionDate(LocalDate.parse(inductionDate,dtf));
|
|
@@ -1246,10 +1218,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
userMapper.setSuperiorNull(oldUser.getId());
|
|
|
}
|
|
|
|
|
|
- if (salaryChange) {
|
|
|
- UserSalary userSalary = UserSalary.copyFromUser(oldUser);
|
|
|
- userSalaryMapper.insert(userSalary);
|
|
|
- }
|
|
|
if (superiorChange) {
|
|
|
//检查是否有审核中的日报
|
|
|
if (timeTypeMapper.selectById(oldUser.getCompanyId()).getReportAuditType() == 5) {
|
|
@@ -1298,7 +1266,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
if (cnt > 0) {
|
|
|
shouldChangeOldReport = true;
|
|
|
}
|
|
|
- } else if (salaryChange && costApplyDate != null) {
|
|
|
+ } else if (costApplyDate != null) {
|
|
|
//成本发生改变
|
|
|
int cnt = reportMapper.selectCount(reportQueryWrapper);
|
|
|
if (cnt > 0) {
|
|
@@ -1605,13 +1573,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
return new HttpRespMsg();
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public HttpRespMsg getUserSalaryList(String id) {
|
|
|
- List<UserSalary> userSalaries = userSalaryMapper.selectList(new QueryWrapper<UserSalary>().eq("user_id", id).orderByDesc("id"));
|
|
|
- HttpRespMsg msg = new HttpRespMsg();
|
|
|
- msg.data = userSalaries;
|
|
|
- return msg;
|
|
|
- }
|
|
|
|
|
|
@Override
|
|
|
public HttpRespMsg setActive(String id, int isActive) {
|