fix:材料校验提交

dev
wangxy 12 months ago
parent 18c28a8974
commit 077fe62e57

@ -1,11 +1,14 @@
package com.hyp.web.controller.manager;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.io.FileUtil;
import com.hyp.common.core.domain.AjaxResult;
import com.hyp.common.exception.ServiceException;
import com.hyp.system.domain.RewFileRelation;
import com.hyp.system.service.RewFileRelationService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
import java.util.Objects;
/**
@ -55,6 +58,27 @@ public class FileRelationManager {
}
/**
*
*
* @param applyId
* @return com.hyp.common.core.domain.AjaxResult
*/
public AjaxResult checkFile(String applyId){
List<RewFileRelation> list = fileRelationService.lambdaQuery()
.eq(RewFileRelation::getApplyId, applyId)
.list();
if(CollUtil.isNotEmpty(list)){
for(RewFileRelation rewFileRelation : list){
if(Objects.equals(rewFileRelation.getFileState(),2)){
return AjaxResult.error("材料存在未通过情况,请检查");
}
}
}
return AjaxResult.success();
}

@ -44,6 +44,13 @@ public class FileRelationController extends BaseController {
}
@ApiOperation("材料校验")
@GetMapping("/checkFile/{applyId}")
public AjaxResult checkFile(@PathVariable String applyId){
return fileRelationManager.checkFile(applyId);
}

Loading…
Cancel
Save