2024年6月4日 修复可能引起错误的问题

This commit is contained in:
bai 2024-06-04 19:45:08 +08:00
parent c0b060abbd
commit 38283aa4bf
1 changed files with 8 additions and 1 deletions

View File

@ -229,7 +229,14 @@ public class KcDetectionDetailedServiceImpl extends ServiceImpl<KcDetectionDetai
detectionDetailed.setDetectionOutImgRes(rJson);
//解析获取数
JSONObject object= JSON.parseObject(rJson);
detectionDetailed.setNum(object.getInteger("person_num"));
Integer num = object.getInteger("person_num");
if(num == null){
if(detectionDetailed.getNum() == null){
detectionDetailed.setNum(0);
}
} else {
detectionDetailed.setNum(num);
}
}
Integer allNum = detectionMain.getAllNum();