Merge branch 'version_performance_2.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_performance_2.0
This commit is contained in:
commit
8dd1c6591a
@ -480,17 +480,28 @@ public class ResultRecordController extends AbstractController {
|
||||
for (ResultRecortModelDto model:dto.getRecortModelDtos()
|
||||
) {
|
||||
int index = 0;
|
||||
BigDecimal weight = BigDecimal.ZERO;
|
||||
for (ResultDetailDto detailDto:model.getDetailDtos()
|
||||
) {//排序
|
||||
ResultDetail resultDetail = new ResultDetail();
|
||||
BeanUtils.copyProperties(detailDto, resultDetail);
|
||||
resultDetail.setPriority(index);
|
||||
|
||||
index++;
|
||||
if(resultDetail.getId() != null){
|
||||
updates.add(resultDetail);
|
||||
}else{
|
||||
resultDetail.setStaffId(resultRecord.getStaffId());
|
||||
resultDetail.setRecordId(resultRecord.getId());
|
||||
resultDetail.setType(model.getType());
|
||||
inserts.add(resultDetail);
|
||||
}
|
||||
if(resultDetail.getIsDelete() == null || resultDetail.getIsDelete().intValue() == 0){
|
||||
weight = weight.add(resultDetail.getCheckWeight());
|
||||
}
|
||||
}
|
||||
if(weight.compareTo(model.getWeight()) == 1){
|
||||
return R.error(model.getName() + "的指标之和不能超过" + model.getWeight().multiply(BigDecimal.valueOf(100)) + "%");
|
||||
}
|
||||
}
|
||||
if(inserts.size() > 0){
|
||||
@ -545,7 +556,7 @@ public class ResultRecordController extends AbstractController {
|
||||
return R.ok("删除成功");
|
||||
}
|
||||
|
||||
/**
|
||||
/**lzresultrecord/saveDetail
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/recordIdsSubmit")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user