|
@@ -61,18 +61,15 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public AjaxResult add(ProjectStaffRecord in) {
|
|
public AjaxResult add(ProjectStaffRecord in) {
|
|
|
- Long userId = SecurityUtils.getUserId();
|
|
|
|
|
SysUser user = SecurityUtils.getLoginUser().getUser();
|
|
SysUser user = SecurityUtils.getLoginUser().getUser();
|
|
|
String username = user.getNickName();
|
|
String username = user.getNickName();
|
|
|
- in.setAid(userId);
|
|
|
|
|
in.setName(username);
|
|
in.setName(username);
|
|
|
if(in.getProcessStatus()>1)in.setProcessStatus(1);
|
|
if(in.getProcessStatus()>1)in.setProcessStatus(1);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
boolean flag=false;
|
|
boolean flag=false;
|
|
|
if (SecurityUtils.hashRoles(UserRolesType.INSPECTORS.getCode())){
|
|
if (SecurityUtils.hashRoles(UserRolesType.INSPECTORS.getCode())){
|
|
|
in.setProcessStatus(2);
|
|
in.setProcessStatus(2);
|
|
|
- sysUserMapper.userAddDuration(userId,in.getDuration());
|
|
|
|
|
|
|
+ sysUserMapper.userAddDuration(in.getAid(),in.getDuration());
|
|
|
projectTaskMapper.projectAddDuration(in.getPid(),in.getDuration());
|
|
projectTaskMapper.projectAddDuration(in.getPid(),in.getDuration());
|
|
|
}else {
|
|
}else {
|
|
|
flag=true;
|
|
flag=true;
|
|
@@ -180,13 +177,11 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public AjaxResult update(ProjectStaffRecord in) {
|
|
public AjaxResult update(ProjectStaffRecord in) {
|
|
|
- Long userId = SecurityUtils.getUserId();
|
|
|
|
|
ProjectStaffRecord projectStaffRecord = projectStaffRecordMapper.selectByPrimaryKey(in.getId());
|
|
ProjectStaffRecord projectStaffRecord = projectStaffRecordMapper.selectByPrimaryKey(in.getId());
|
|
|
if (projectStaffRecord.getProcessStatus()!=0&&projectStaffRecord.getProcessStatus()!=3){
|
|
if (projectStaffRecord.getProcessStatus()!=0&&projectStaffRecord.getProcessStatus()!=3){
|
|
|
AjaxResult.success("打卡只有草稿和驳回状态才可以修改!");
|
|
AjaxResult.success("打卡只有草稿和驳回状态才可以修改!");
|
|
|
}
|
|
}
|
|
|
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
|
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
|
|
- in.setAid(userId);
|
|
|
|
|
in.setName(username);
|
|
in.setName(username);
|
|
|
if(in.getProcessStatus()>1)in.setProcessStatus(1);
|
|
if(in.getProcessStatus()>1)in.setProcessStatus(1);
|
|
|
projectStaffRecordMapper.updateByPrimaryKeySelective(in);
|
|
projectStaffRecordMapper.updateByPrimaryKeySelective(in);
|