新增报修管理

This commit is contained in:
2022-09-15 15:40:25 +08:00
parent 8653859d50
commit 374b2b2e50
5 changed files with 782 additions and 6 deletions

View File

@@ -109,10 +109,18 @@ public class DevicerepairrequestServiceImpl implements DevicerepairrequestServic
String nickName = SecurityUtils.getNickName();
String now = DateUtil.now();
JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser();
Long deptId = currentUser.getDeptId();
dto.setRequest_id(IdUtil.getSnowflake(1, 1).nextId());
dto.setRequest_code(CodeUtil.getNewCode("BXD_CODE"));
dto.setFault_time(now);
dto.setStatus("01");
dto.setCreate_id(currentUserId);
dto.setCreate_name(nickName);
dto.setCreate_time(now);
dto.setSyscompanyid(deptId);
dto.setSysdeptid(deptId);
WQLObject wo = WQLObject.getWQLObject("em_bi_devicerepairrequest");
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
@@ -125,11 +133,6 @@ public class DevicerepairrequestServiceImpl implements DevicerepairrequestServic
DevicerepairrequestDto entity = this.findById(dto.getRequest_id());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("em_bi_devicerepairrequest");
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
wo.update(json);