Browse Source

打卡记录修改

master
DX 2 months ago
parent
commit
be985aad67
  1. 8
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/inspectionslog/InspectionsLogController.java
  2. 2
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/inspectionslog/InspectionsLogService.java
  3. 35
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/inspectionslog/InspectionsLogServiceImpl.java

8
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/inspectionslog/InspectionsLogController.java

@ -67,14 +67,6 @@ public class InspectionsLogController {
return success(inspectionsLogService.signInList(inspectionsId));
}
@PutMapping("/cooperateWithSignIn")
@Operation(summary = "协同人员打卡")
@PreAuthorize("@ss.hasPermission('system:inspections-log:update')")
public CommonResult<Boolean> cooperateWithSignIn(Long inspectionsLogId) {
inspectionsLogService.cooperateWithSignIn(inspectionsLogId);
return success(true);
}
@PutMapping("/update")
@Operation(summary = "更新检查结果日志")
@PreAuthorize("@ss.hasPermission('system:inspections-log:update')")

2
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/inspectionslog/InspectionsLogService.java

@ -57,8 +57,6 @@ public interface InspectionsLogService {
List<InspectionsLogDO> list(InspectionsLogPageReqVO pageReqVO);
void cooperateWithSignIn(Long inspectionsLogId);
void confirmSignIn(InspectionsLogSaveReqVO createReqVO);
void inspectionsAudit(InspectionsLogSaveReqVO createReqVO);

35
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/inspectionslog/InspectionsLogServiceImpl.java

@ -222,41 +222,6 @@ public class InspectionsLogServiceImpl implements InspectionsLogService {
return list;
}
/**
* 协作人员签到
* @param inspectionsLogId
*/
@Override
public void cooperateWithSignIn(Long inspectionsLogId) {
// 校验存在
InspectionsLogDO inspectionsLogDO = inspectionsLogMapper.selectById(inspectionsLogId);
if (inspectionsLogDO == null) {
throw exception(INSPECTIONS_LOG_NOT_EXISTS);
}
//查询真实名称并插入
AdminUserDO user = adminUserService.getUser(getLoginUserId());
if (user == null) {
throw exception(USER_NOT_EXISTS);
}
// 更新
if (inspectionsLogDO.getCooperateWithIds() == null ) {
inspectionsLogDO.setCooperateWithIds(getLoginUserId().toString());
inspectionsLogDO.setCooperateWithName(user.getRealName());
} else {
inspectionsLogDO.setCooperateWithIds(inspectionsLogDO.getCooperateWithIds() + "," + getLoginUserId());
inspectionsLogDO.setCooperateWithName(inspectionsLogDO.getCooperateWithName() + "," + user.getRealName());
}
inspectionsLogMapper.updateById(inspectionsLogDO);
//插入协同人员打卡记录表
SignInLogDO signInLogDO = new SignInLogDO();
signInLogDO.setInsId(inspectionsLogId);
signInLogDO.setUserId(getLoginUserId());
signInLogMapper.insert(signInLogDO);
}
@Override
public void confirmSignIn(InspectionsLogSaveReqVO createReqVO) {

Loading…
Cancel
Save