This commit is contained in:
Timer
2026-03-25 00:56:45 +08:00
parent 17751bd0ab
commit 75f33e37d7

View File

@ -36,6 +36,7 @@ import java.util.UUID;
/** /**
* 综合检查 * 综合检查
*
* @author lt * @author lt
*/ */
@Controller @Controller
@ -125,11 +126,13 @@ public class SafetyCheckComprehensiveController {
@RequestMapping("/save.do") @RequestMapping("/save.do")
@ResponseBody @ResponseBody
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Result save(HttpServletRequest request, SafetyCheckComprehensive bean, MultipartFile file) throws Exception { public Result save(HttpServletRequest request, SafetyCheckComprehensive bean, MultipartFile[] multipartFiles) throws Exception {
User cu = (User) request.getSession().getAttribute("cu"); User cu = (User) request.getSession().getAttribute("cu");
bean.setId(UUID.randomUUID().toString()); bean.setId(UUID.randomUUID().toString());
if (file.getSize() > 0) { if (multipartFiles != null) {
safetyFilesService.upload(request, null, SafetyFunctionEnum.SAFETY_CHECK_COMPREHENSIVE.getId(), SafetyCheckStatusEnum.APPLY.getId(), bean.getId()); for (MultipartFile file : multipartFiles) {
safetyFilesService.upload(request, file, SafetyFunctionEnum.SAFETY_CHECK_COMPREHENSIVE.getId(), SafetyCheckStatusEnum.APPLY.getId(), bean.getId());
}
} }
bean.setCheckCode(safetySeqService.code(request, SafetyFunctionEnum.SAFETY_CHECK_COMPREHENSIVE)); bean.setCheckCode(safetySeqService.code(request, SafetyFunctionEnum.SAFETY_CHECK_COMPREHENSIVE));
if (bean.getCheckResult() == SafetyCheckResultEnum.OK.getId()) { if (bean.getCheckResult() == SafetyCheckResultEnum.OK.getId()) {
@ -153,7 +156,7 @@ public class SafetyCheckComprehensiveController {
@RequestMapping("/saveApply.do") @RequestMapping("/saveApply.do")
@ResponseBody @ResponseBody
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Result saveApply(HttpServletRequest request, SafetyCheckComprehensive bean, MultipartFile file) throws Exception { public Result saveApply(HttpServletRequest request, SafetyCheckComprehensive bean, MultipartFile[] file) throws Exception {
if (StringUtils.isEmpty(bean.getDutyUserId())) { if (StringUtils.isEmpty(bean.getDutyUserId())) {
return Result.failed("整改负责人不能为空!"); return Result.failed("整改负责人不能为空!");
} }