fix:检查结果接口提交

pg_adapter
wangxy 8 months ago
parent 64dee56212
commit 3d019781e2

@ -8,8 +8,8 @@ import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.check.TdCheckReport; import com.ruoyi.system.domain.check.TdCheckReport;
import com.ruoyi.system.domain.check.TdCheckType;
import com.ruoyi.system.domain.check.dto.TdCheckReportDTO; import com.ruoyi.system.domain.check.dto.TdCheckReportDTO;
import com.ruoyi.system.domain.check.dto.TdCheckTypeDTO;
import com.ruoyi.system.service.check.TdCheckTypeService; import com.ruoyi.system.service.check.TdCheckTypeService;
import com.ruoyi.web.controller.manager.CheckReportManager; import com.ruoyi.web.controller.manager.CheckReportManager;
import com.ruoyi.web.controller.manager.SysAreaManager; import com.ruoyi.web.controller.manager.SysAreaManager;
@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
@Controller @Controller
@RequestMapping("/system/checkresult") @RequestMapping("/system/checkresult")
@ -134,11 +135,15 @@ public class TdCheckResultController extends BaseController {
@PostMapping("/checkresult") @PostMapping("/checkresult")
@ResponseBody @ResponseBody
public AjaxResult selfcheckSave(@RequestBody TdCheckReportDTO checkReportDTO) { public AjaxResult selfcheckSave(@RequestBody TdCheckReportDTO checkReportDTO) {
List<TdCheckType> list = checkTypeService.lambdaQuery() boolean flag = false;
.eq(TdCheckType::getCheckId, checkReportDTO.getCheckId()) List<TdCheckTypeDTO> checkTypeDtoS = checkReportDTO.getCheckTypeDTOS();
.eq(TdCheckType::getResultStarts,"1") for (TdCheckTypeDTO tdCheckTypeDTO :checkTypeDtoS){
.list(); if("1".equals(tdCheckTypeDTO.getResultStarts())){
if (CollUtil.isNotEmpty(list)) { flag = true;
break;
}
}
if (flag) {
checkReportDTO.setCheckState("1"); checkReportDTO.setCheckState("1");
} else { } else {
checkReportDTO.setCheckState("0"); checkReportDTO.setCheckState("0");

Loading…
Cancel
Save