| | |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.dy.common.aop.SsoAop; |
| | | import com.dy.common.multiDataSource.DataSourceContext; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.CodeV1_0_1; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.downVos.*; |
| | | import com.dy.common.mw.protocol.p206V202404.CodeV202404; |
| | |
| | | import com.dy.pipIrrRemote.common.CommandSv; |
| | | import com.dy.pipIrrRemote.common.dto.*; |
| | | import com.dy.pipIrrRemote.result.RemoteResultCode; |
| | | import com.dy.pipIrrRemote.valve.dto.deleteUnclosedParam; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.validation.Valid; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | |
| | | } |
| | | //Long intakeId = job_rtu.getLong("intakeId"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | String commandCode = null; |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage()); |
| | | } |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | String commandCode = null; |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 强制因此未关阀记录:为指定(阀控器地址、水卡编号、无关阀记录)开关阀最新记录添加关阀时间,使之不在未关阀记录中显示 |
| | | * @param po |
| | | * @param bindingResult |
| | | * @return |
| | | */ |
| | | @PostMapping(path = "deleteUnclosed", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> deleteUnclosed(@RequestBody @Valid deleteUnclosedParam po, BindingResult bindingResult) { |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | commandSv.addClostTime(po.getRtuAddr(), po.getVcNum()); |
| | | return BaseResponseUtils.buildSuccess(); |
| | | } |
| | | |
| | | /** |
| | | * 平台远程充值 |
| | | * @param po |
| | | * @param bindingResult |