增加得分限制
This commit is contained in:
parent
0b6d9d75ec
commit
74e525a087
@ -134,8 +134,18 @@ public class GovEnterpriseScoreDetailController {
|
|||||||
@ApiOperation(value = " 添加企业对应工程得分明细信息", notes = "添加企业对应工程得分明细信息", httpMethod = "POST")
|
@ApiOperation(value = " 添加企业对应工程得分明细信息", notes = "添加企业对应工程得分明细信息", httpMethod = "POST")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<Object> add(@RequestBody EnterpriseScoreDetailVo enterpriseScoreDetailVo) {
|
public Result<Object> add(@RequestBody EnterpriseScoreDetailVo enterpriseScoreDetailVo) {
|
||||||
enterpriseScoreDetailService.saveOrUpdateInfo(enterpriseScoreDetailVo);
|
List<EnterpriseScoreDetail> enterpriseScoreDetails = enterpriseScoreDetailVo.getEnterpriseScoreDetails();
|
||||||
return Result.success("添加成功!");
|
boolean flag = true;
|
||||||
|
for (EnterpriseScoreDetail enterpriseScoreDetail : enterpriseScoreDetails) {
|
||||||
|
if (enterpriseScoreDetail.getScore() == null) {
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (flag) {
|
||||||
|
enterpriseScoreDetailService.saveOrUpdateInfo(enterpriseScoreDetailVo);
|
||||||
|
return Result.success("添加成功!");
|
||||||
|
}
|
||||||
|
return Result.error("评分失败,请输入对应得分!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user