增加得分限制

This commit is contained in:
pengjie 2024-11-27 14:14:44 +08:00
parent 0b6d9d75ec
commit 74e525a087

View File

@ -134,9 +134,19 @@ public class GovEnterpriseScoreDetailController {
@ApiOperation(value = " 添加企业对应工程得分明细信息", notes = "添加企业对应工程得分明细信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<Object> add(@RequestBody EnterpriseScoreDetailVo enterpriseScoreDetailVo) {
List<EnterpriseScoreDetail> enterpriseScoreDetails = enterpriseScoreDetailVo.getEnterpriseScoreDetails();
boolean flag = true;
for (EnterpriseScoreDetail enterpriseScoreDetail : enterpriseScoreDetails) {
if (enterpriseScoreDetail.getScore() == null) {
flag = false;
}
}
if (flag) {
enterpriseScoreDetailService.saveOrUpdateInfo(enterpriseScoreDetailVo);
return Result.success("添加成功!");
}
return Result.error("评分失败,请输入对应得分!");
}
/**
* 编辑