| | |
| | | @PostMapping("/submit") |
| | | public R submit(@RequestBody WorkReport workReport){ |
| | | boolean status = false; |
| | | if (null!=workReport.getId()){ |
| | | workReport.setReportTime(new Date()); |
| | | if (null==workReport.getId()){ |
| | | // workReport.setReportTime(new Date()); |
| | | workReport.setReplyDeptIds(getReplyDeptIds(workReport.getReceivedIds())); |
| | | //新增 |
| | | status = workReportService.save(workReport); |
| | |
| | | FtpUtil.sqlFileUpload(s1); |
| | | }else { |
| | | workReport.setReplyDeptIds(getReplyDeptIds(workReport.getReceivedIds())); |
| | | if (null!=workReport.getReplyTime()){ |
| | | if (null==workReport.getReplyTime()){ |
| | | workReport.setReplyTime(new Date()); |
| | | } |
| | | |
| | | //修改 |
| | | status = workReportService.updateById(workReport); |
| | | |
| | | //内网同步 |
| | | String s1 = |
| | | "update sys_work_report set type = " + "'" + workReport.getType() + "'" + |
| | |
| | | // user.setCardid(idCardNo); |
| | | // User userDetail = userService.getOne(Condition.getQueryWrapper(user)); |
| | | User userDetail = userService.getById(userId); |
| | | replyRealNameInfo = replyRealNameInfo.append(userDetail.getRealName()).append(","); |
| | | if (null!=userDetail) { |
| | | replyRealNameInfo = replyRealNameInfo.append(userDetail.getRealName()).append(","); |
| | | } |
| | | } |
| | | //截取 |
| | | return replyRealNameInfo.substring(0, replyRealNameInfo.length() - 1); |
| | | if (replyRealNameInfo.length()>0) { |
| | | return replyRealNameInfo.substring(0, replyRealNameInfo.length() - 1); |
| | | } |
| | | return replyRealNameInfo.toString(); |
| | | } |
| | | |
| | | } |