| | |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.dataInterchange.api.feignClient.UPWarnMsgAdptInfoClient; |
| | | import com.ruoyi.dataInterchange.api.feignClient.UPWarnMsgOperationInfoClient; |
| | | import com.ruoyi.dataInterchange.api.model.enums.WarnType; |
| | | import com.ruoyi.dataInterchange.api.vo.UPWarnMsgAdptInfoVo; |
| | | import com.ruoyi.dataInterchange.api.vo.UPWarnMsgOperationInfoVo; |
| | | import com.ruoyi.system.api.model.Car; |
| | | import com.ruoyi.system.api.model.Driver; |
| | | import com.ruoyi.system.api.model.Enterprise; |
| | |
| | | |
| | | @Resource |
| | | private ICarService carService; |
| | | |
| | | @Resource |
| | | private UPWarnMsgOperationInfoClient upWarnMsgOperationInfoClient; |
| | | |
| | | |
| | | /** |
| | |
| | | warn.setTreatmentState("将来处理"); |
| | | break; |
| | | } |
| | | if(0x00 != vo.getResult() && null == warn.getTreatmentTime()){ |
| | | UPWarnMsgOperationInfoVo upWarnMsgOperationInfoVo = upWarnMsgOperationInfoClient.getUPWarnMsgOperationInfo(warn.getObjectId()).getData(); |
| | | if(null != upWarnMsgOperationInfoVo){ |
| | | warn.setTreatmentUser(upWarnMsgOperationInfoVo.getOperator()); |
| | | warn.setTreatmentTime(LocalDateTime.ofEpochSecond(upWarnMsgOperationInfoVo.getCreateTime(), 0, ZoneOffset.ofHours(8)).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | switch (upWarnMsgOperationInfoVo.getMethod()) { |
| | | case 0x01: |
| | | warn.setTreatmentRemark("快速拍照"); |
| | | break; |
| | | case 0x02: |
| | | warn.setTreatmentRemark("语音下发"); |
| | | break; |
| | | case 0x03: |
| | | warn.setTreatmentRemark("不做处理"); |
| | | break; |
| | | case 0x04: |
| | | warn.setTreatmentRemark("其他"); |
| | | break; |
| | | default: |
| | | warn.setTreatmentRemark("其他"); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | warn.setCreateTime(LocalDateTime.now()); |
| | | warn.setObjectId(vo.getInfoId()); |
| | | warn.setVehicleNumber(vo.getVehicleNo()); |
| | |
| | | } |
| | | if(null == warn.getPicUrl()){ |
| | | warn.setPicUrl(vo.getPicUrl()); |
| | | } |
| | | if(0x00 != vo.getResult() && null == warn.getTreatmentTime()){ |
| | | UPWarnMsgOperationInfoVo upWarnMsgOperationInfoVo = upWarnMsgOperationInfoClient.getUPWarnMsgOperationInfo(warn.getObjectId()).getData(); |
| | | if(null != upWarnMsgOperationInfoVo){ |
| | | warn.setTreatmentUser(upWarnMsgOperationInfoVo.getOperator()); |
| | | warn.setTreatmentTime(LocalDateTime.ofEpochSecond(upWarnMsgOperationInfoVo.getCreateTime(), 0, ZoneOffset.ofHours(8)).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | switch (upWarnMsgOperationInfoVo.getMethod()) { |
| | | case 0x01: |
| | | warn.setTreatmentRemark("快速拍照"); |
| | | break; |
| | | case 0x02: |
| | | warn.setTreatmentRemark("语音下发"); |
| | | break; |
| | | case 0x03: |
| | | warn.setTreatmentRemark("不做处理"); |
| | | break; |
| | | case 0x04: |
| | | warn.setTreatmentRemark("其他"); |
| | | break; |
| | | default: |
| | | warn.setTreatmentRemark("其他"); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | this.updateById(warn); |
| | | } |
| | |
| | | if(total == 0){ |
| | | map.put("rate", BigDecimal.ZERO); |
| | | }else{ |
| | | map.put("rate", BigDecimal.valueOf(processed / total * 100).setScale(2, RoundingMode.HALF_EVEN)); |
| | | map.put("rate", new BigDecimal(processed).divide(new BigDecimal(total), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN)); |
| | | } |
| | | } |
| | | return allWarnGroupVehicleType; |