Browse Source

# 解决未识别时图片上传地址为空问题

zhongwei
H.X 2 years ago
parent
commit
41ebc04cee
  1. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/DefaultRobotIdentifyTypeHandler.java
  2. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotDigitTypeHandler.java
  3. 3
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotMeterTypeHandler.java
  4. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotSwitchHTypeHandler.java
  5. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotValueTypeHandler.java
  6. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotVoiceTypeHandler.java

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/DefaultRobotIdentifyTypeHandler.java

@ -46,9 +46,9 @@ public class DefaultRobotIdentifyTypeHandler implements IRobotIdentifyTypeHandle
recordVo.setTenantId(tenantId); recordVo.setTenantId(tenantId);
recordVo.setContentId(content.getId()); recordVo.setContentId(content.getId());
String addr = content.getCameraAddr(); String addr = content.getCameraAddr();
recordVo.setFileUrl(picUrl);
if(Func.isNotEmpty(switchs)){ if(Func.isNotEmpty(switchs)){
for (RobotAiSwitchReturn re : switchs) { for (RobotAiSwitchReturn re : switchs) {
recordVo.setFileUrl(picUrl);
if(addr.trim().equals(re.getRowindex() + AIContants.COMMA + re.getColindex())){ if(addr.trim().equals(re.getRowindex() + AIContants.COMMA + re.getColindex())){
recordVo.setCurrentValue(String.valueOf(re.getState())); recordVo.setCurrentValue(String.valueOf(re.getState()));
recordVo.setCurrentStatus(setCurrentStatus(String.valueOf(re.getState()), content.getCheckVal())); recordVo.setCurrentStatus(setCurrentStatus(String.valueOf(re.getState()), content.getCheckVal()));

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotDigitTypeHandler.java

@ -32,9 +32,9 @@ public class RobotDigitTypeHandler implements IRobotIdentifyTypeHandler<RobotIde
recordVo.setTenantId(tenantId); recordVo.setTenantId(tenantId);
recordVo.setContentId(content.getId()); recordVo.setContentId(content.getId());
String addr = content.getCameraAddr(); String addr = content.getCameraAddr();
recordVo.setFileUrl(picUrl);
if(Func.isNotEmpty(digits)){ if(Func.isNotEmpty(digits)){
for (RobotAiDigitReturn re : digits) { for (RobotAiDigitReturn re : digits) {
recordVo.setFileUrl(picUrl);
if(addr.trim().equals(re.getRowindex() + AIContants.COMMA + re.getColindex())){ if(addr.trim().equals(re.getRowindex() + AIContants.COMMA + re.getColindex())){
recordVo.setCurrentValue(re.getClassname()/Math.pow(10, Double.valueOf(content.getOtherParam())) + ""); recordVo.setCurrentValue(re.getClassname()/Math.pow(10, Double.valueOf(content.getOtherParam())) + "");
recordVo.setCurrentStatus(setCurrentStatus(recordVo.getCurrentValue(), content.getCheckVal())); recordVo.setCurrentStatus(setCurrentStatus(recordVo.getCurrentValue(), content.getCheckVal()));

3
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotMeterTypeHandler.java

@ -92,10 +92,9 @@ public class RobotMeterTypeHandler implements IRobotIdentifyTypeHandler<RobotIde
} else { } else {
throw new ServiceException("表针识别表盘类型数据录入错误 —— 刻度对应值 字段 : " + clockType.getScaleValues()); throw new ServiceException("表针识别表盘类型数据录入错误 —— 刻度对应值 字段 : " + clockType.getScaleValues());
} }
recordVo.setFileUrl(picUrl);
if(Func.isNotEmpty(meter)){ if(Func.isNotEmpty(meter)){
for (RobotAiMeterReturn re : meter) { for (RobotAiMeterReturn re : meter) {
recordVo.setFileUrl(picUrl);
if(addr.trim().equals(re.getRowindex() + AIContants.COMMA + re.getColindex())){ if(addr.trim().equals(re.getRowindex() + AIContants.COMMA + re.getColindex())){
/** TODO 暂时只做了一个指针的情况*/ /** TODO 暂时只做了一个指针的情况*/
recordVo.setCurrentValue(re.getPointer().get(0).getDegree() * ratio + " " + clockType.getUnit()); recordVo.setCurrentValue(re.getPointer().get(0).getDegree() * ratio + " " + clockType.getUnit());

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotSwitchHTypeHandler.java

@ -66,9 +66,9 @@ public class RobotSwitchHTypeHandler implements IRobotIdentifyTypeHandler<RobotI
recordVo.setTenantId(tenantId); recordVo.setTenantId(tenantId);
recordVo.setContentId(content.getId()); recordVo.setContentId(content.getId());
String addr = content.getCameraAddr(); String addr = content.getCameraAddr();
recordVo.setFileUrl(picUrl);
if(Func.isNotEmpty(switchs)){ if(Func.isNotEmpty(switchs)){
for (RobotAiSwitchHReturn re : switchs) { for (RobotAiSwitchHReturn re : switchs) {
recordVo.setFileUrl(picUrl);
if(addr.trim().equals(re.getRowindex() + AIContants.COMMA + re.getColindex())){ if(addr.trim().equals(re.getRowindex() + AIContants.COMMA + re.getColindex())){
recordVo.setCurrentValue(re.getState()); recordVo.setCurrentValue(re.getState());
recordVo.setCurrentStatus(setCurrentStatus(re.getState(), content.getCheckVal())); recordVo.setCurrentStatus(setCurrentStatus(re.getState(), content.getCheckVal()));

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotValueTypeHandler.java

@ -29,9 +29,9 @@ public class RobotValueTypeHandler implements IRobotIdentifyTypeHandler<RobotIde
recordVo.setTenantId(tenantId); recordVo.setTenantId(tenantId);
recordVo.setContentId(content.getId()); recordVo.setContentId(content.getId());
String addr = content.getCameraAddr(); String addr = content.getCameraAddr();
recordVo.setFileUrl(picUrl);
if(Func.isNotEmpty(values)){ if(Func.isNotEmpty(values)){
for (RobotAiValueReturn re : values) { for (RobotAiValueReturn re : values) {
recordVo.setFileUrl(picUrl);
if(addr.trim().equals(re.getRowindex() + AIContants.COMMA + re.getColindex())){ if(addr.trim().equals(re.getRowindex() + AIContants.COMMA + re.getColindex())){
recordVo.setCurrentValue(re.getValue() + ""); recordVo.setCurrentValue(re.getValue() + "");
recordVo.setCurrentStatus(setCurrentStatus(recordVo.getCurrentValue(), content.getCheckVal())); recordVo.setCurrentStatus(setCurrentStatus(recordVo.getCurrentValue(), content.getCheckVal()));

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotVoiceTypeHandler.java

@ -27,9 +27,9 @@ public class RobotVoiceTypeHandler implements IRobotIdentifyTypeHandler<RobotIde
EventRecordAddVO recordVo = new EventRecordAddVO(); EventRecordAddVO recordVo = new EventRecordAddVO();
recordVo.setTenantId(tenantId); recordVo.setTenantId(tenantId);
recordVo.setContentId(content.getId()); recordVo.setContentId(content.getId());
recordVo.setFileUrl(picUrl);
if(Func.isNotEmpty(switchs)){ if(Func.isNotEmpty(switchs)){
for (RobotAiSwitchReturn re : switchs) { for (RobotAiSwitchReturn re : switchs) {
recordVo.setFileUrl(picUrl);
recordVo.setCurrentStatus(TaskContants.CurrentStatusEnum.normal.getType()); recordVo.setCurrentStatus(TaskContants.CurrentStatusEnum.normal.getType());
} }
} }

Loading…
Cancel
Save