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