| | |
| | | return projectPlanProgressReportService.add(form); |
| | | } |
| | | |
| | | @PostMapping("/examine") |
| | | public Result examine(@RequestBody @Validated(Add.class) ProgressReportResponseVO form) { |
| | | return projectPlanProgressReportService.examine(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | @PreAuthorize("hasAuthority('projectPlanProgressReport:edit')") |
| | |
| | | private Integer progressStatus; |
| | | |
| | | @TableField("start_time") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | /** 计划开始时间 */ |
| | | private Date startTime; |
| | | |
| | | @TableField("end_time") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | /** 计划完成时间 */ |
| | | private Date endTime; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | Result all(); |
| | | |
| | | Result examine(ProgressReportResponseVO form); |
| | | } |
| | |
| | | package com.ycl.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | |
| | | @Override |
| | | public Result examine(ProgressReportResponseVO form) { |
| | | // 更新审批记录 |
| | | ProjectPlanExamineRecord record = new ProjectPlanExamineRecord(); |
| | | record.setId(form.getExamineRecordId().longValue()); |
| | | record.setDepartmentExamine(form.getDepartmentExamine()); |
| | | record.setDepartmentApproval(form.getDepartmentApproval()); |
| | | record.setManageExamine(form.getManageExamine()); |
| | | record.setManageApproval(form.getManageApproval()); |
| | | projectPlanExamineRecordMapper.updateById(record); |
| | | |
| | | // 更新计划项状态 |
| | | if (form.getDepartmentExamine() == 0 && form.getManageExamine() == 0){ |
| | | new LambdaUpdateChainWrapper<>(projectPlanInfoMapper) |
| | | .eq(ProjectPlanInfo::getId, form.getId()) |
| | | .set(ProjectPlanInfo::getProgressStatus, 3) |
| | | .update(); |
| | | }else { |
| | | new LambdaUpdateChainWrapper<>(projectPlanInfoMapper) |
| | | .eq(ProjectPlanInfo::getId, form.getId()) |
| | | .set(ProjectPlanInfo::getProgressStatus, 2) |
| | | .update(); |
| | | } |
| | | |
| | | |
| | | return Result.ok("审批成功"); |
| | | } |
| | | } |