bug
This commit is contained in:
@ -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,8 +156,8 @@ 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("整改负责人不能为空!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,7 +235,7 @@ public class SafetyCheckComprehensiveController {
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Result apply(HttpServletRequest request, SafetyCheckComprehensive bean) throws IOException, ServiceException {
|
public Result apply(HttpServletRequest request, SafetyCheckComprehensive bean) throws IOException, ServiceException {
|
||||||
if(StringUtils.isEmpty(bean.getDutyUserId())){
|
if (StringUtils.isEmpty(bean.getDutyUserId())) {
|
||||||
return Result.failed("整改负责人不能为空!");
|
return Result.failed("整改负责人不能为空!");
|
||||||
}
|
}
|
||||||
update(request, bean);
|
update(request, bean);
|
||||||
@ -336,7 +339,7 @@ public class SafetyCheckComprehensiveController {
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Result response(HttpServletRequest request, SafetyCheckComprehensive bean, String processInstanceId) throws IOException, ServiceException {
|
public Result response(HttpServletRequest request, SafetyCheckComprehensive bean, String processInstanceId) throws IOException, ServiceException {
|
||||||
if(StringUtils.isEmpty(bean.getConfirmUserId())){
|
if (StringUtils.isEmpty(bean.getConfirmUserId())) {
|
||||||
return Result.failed("验证人不能为空!");
|
return Result.failed("验证人不能为空!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -388,7 +391,7 @@ public class SafetyCheckComprehensiveController {
|
|||||||
bean.getConfirmUserName(),
|
bean.getConfirmUserName(),
|
||||||
bean.getCopyUserId(),
|
bean.getCopyUserId(),
|
||||||
bean.getCopyUserName(),
|
bean.getCopyUserName(),
|
||||||
SafetyCheckStatusEnum.COMPLETE.getTaskRecordPass( bean.getConfirmUserName()));
|
SafetyCheckStatusEnum.COMPLETE.getTaskRecordPass(bean.getConfirmUserName()));
|
||||||
safetyFlowTaskService.saveWorkFlowRecord(true,
|
safetyFlowTaskService.saveWorkFlowRecord(true,
|
||||||
bean.getId(),
|
bean.getId(),
|
||||||
"结束",
|
"结束",
|
||||||
|
|||||||
Reference in New Issue
Block a user