Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
| | |
| | | if (target == null) |
| | | return invocation.proceed(); |
| | | // 创建语句 |
| | | // if (SqlCommandType.INSERT == sqlCommandType) { |
| | | // this.handleOperaStatement(target, CREATE_TIME, CREATE_USER); |
| | | // } |
| | | // // 更新语句 |
| | | // else if (SqlCommandType.UPDATE == sqlCommandType) { |
| | | // this.handleOperaStatement(target, UPDATE_TIME, UPDATE_USER); |
| | | // } |
| | | if (SqlCommandType.INSERT == sqlCommandType) { |
| | | this.handleOperaStatement(target, CREATE_TIME, CREATE_USER); |
| | | } |
| | | // 更新语句 |
| | | else if (SqlCommandType.UPDATE == sqlCommandType) { |
| | | this.handleOperaStatement(target, UPDATE_TIME, UPDATE_USER); |
| | | } |
| | | return invocation.proceed(); |
| | | } |
| | | |
| | |
| | | this.setFieldValue(operaTimeField, target, new Date()); |
| | | } |
| | | } |
| | | // 操作人 |
| | | /* // 操作人 |
| | | Field operaUserField = ReflectionUtils.findField(target.getClass(), fieldNames[1]); |
| | | if (operaUserField != null) { |
| | | Object operaUser = this.getFieldValue(operaUserField, target); |
| | | if (operaUser == null && this.getLoginUser()!=null) { |
| | | this.setFieldValue(operaUserField, target, this.getLoginUser().getId()); |
| | | } |
| | | } |
| | | }*/ |
| | | } |
| | | |
| | | /** |
| | |
| | | .set(SystemUser::getOpenidHkInfo,null) |
| | | .set(SystemUser::getOpenidHkStatus,Constants.ZERO) |
| | | .eq(SystemUser::getOpenid,openid) |
| | | .eq(SystemUser::getType,user.getType())); |
| | | // .eq(SystemUser::getType,user.getType()) |
| | | ); |
| | | systemUserMapper.update(null,new UpdateWrapper<SystemUser>().lambda() |
| | | .set(SystemUser::getOpenid,openid) |
| | | .set(SystemUser::getOpenidHkStatus,Constants.ZERO) |
| | |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.NO_ALLOW_LOGIN); |
| | | } |
| | | |
| | | |
| | | String pwd = Utils.Secure.encryptPassword(new String(dto.getPassword()), user.getSalt()); |
| | | // 比较密码 |
| | | if( !StringUtils.equals(pwd, user.getPassword())){ |
| | |
| | | shwtg(4, 2,1,"运输单审核通过",null), |
| | | sqzyzwc(5,6, 1,"申请准运证完成","车辆准运证申请完成" ), |
| | | ddzhddzs(6,3,2,"到达装货地-电子锁汽运","车辆已到达装货地" ), |
| | | clqddzs(7, 4,2,"车辆启运-电子锁汽运","车辆装货完成,电子锁已上锁" ), |
| | | clqddzs(7, 4,2,"车辆启运-电子锁汽运","车辆已启运" ), |
| | | clqdapp(8, 7,3,"车辆启运-APP","车辆运输中" ), |
| | | ddzhd(9, 8,4,"到达卸货地-APP","车辆已到达卸货地" ), |
| | | ddxhd(10, 5,5,"到达卸货地-电子锁汽运","电子锁已解锁,运输任务已完成" ), |
| | |
| | | //如果是司机或者内部人员,则从system_user查询 |
| | | SystemUser user = systemUserMapper.selectOne(new QueryWrapper<SystemUser>().lambda() |
| | | .eq(SystemUser::getOpenid,openId) |
| | | .eq(SystemUser::getType,source) |
| | | .eq(Objects.nonNull(source)&&Constants.equalsInteger(source,Constants.TWO),SystemUser::getType,source) |
| | | .eq(SystemUser::getDeleted,Boolean.FALSE) |
| | | .last(" limit 1 ")); |
| | | //非访客用户 进行判断是否存在用户 |
| | |
| | | public List<AlarmEventDataVO> fightingAdminAlertList(){ |
| | | List<AlarmEventDataVO> data = new ArrayList<>(); |
| | | |
| | | //查询24小时内的 |
| | | List<FindHomeAlarmInfoPageResponse> allList = new ArrayList<>(); |
| | | boolean hasNext = true; |
| | | int curTotal = 0; |
| | | int curPage = 1; |
| | | FindHomeAlarmInfoPageRequest param = new FindHomeAlarmInfoPageRequest(); |
| | | param.setHour(24); |
| | | param.setPage(1); |
| | | param.setUserId("admin"); |
| | | while (hasNext){ |
| | | //分页遍历循环查询所有门禁设备数据 |
| | | param.setPage(curPage); |
| | | // param.setRegionIndexCodes("root000000"); |
| | | param.setAlarmStartTime(DateUtil.getFomartDate(new Date(),"yyyy-MM-dd") + " 00:00:00"); |
| | | param.setAlarmEndTime(DateUtil.getPlusTime2(new Date())); |
| | | param.setPageSize(20); |
| | | BaseResponse<BaseListPageResponse<FindHomeAlarmInfoPageResponse>> response = HKService.findHomeAlarmInfoPage(param); |
| | | if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) |
| | | && response.getData()!=null |
| | | &&response.getData().getList()!=null) { |
| | | param.setAlarmStartTime(DateUtil.getFomartDate(new Date(),"yyyy-MM-dd") + " 00:00:00"); |
| | | param.setAlarmEndTime(DateUtil.getPlusTime2(new Date())); |
| | | param.setPageSize(50); |
| | | BaseResponse<BaseListPageResponse<FindHomeAlarmInfoPageResponse>> response = HKService.findHomeAlarmInfoPage(param); |
| | | if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对不起,海康同步数据失败~"); |
| | | } |
| | | for(FindHomeAlarmInfoPageResponse r : response.getData().getList()){ |
| | | AlarmEventDataVO t = new AlarmEventDataVO(); |
| | | BeanUtils.copyProperties(r,t); |
| | | data.add(t); |
| | | try { |
| | | if(DateUtil.getDateFromString(t.getAlarmTime()).getTime() >= Utils.Date.getStart(new Date()).getTime()){ |
| | | data.add(t); |
| | | }else{ |
| | | hasNext =false; |
| | | } |
| | | }catch (Exception e){ |
| | | } |
| | | } |
| | | curTotal += 50; |
| | | if(curTotal >= response.getData().getTotal()){ |
| | | hasNext = false; |
| | | } |
| | | if(response.getData().getList() == null || response.getData().getList().size()==0){ |
| | | hasNext =false; |
| | | } |
| | | curPage++; |
| | | } |
| | | |
| | | return data; |
| | | |
| | | } |
| | |
| | | } |
| | | if( data.getGasQuantity().getTotalNum().compareTo(new BigDecimal(0)) !=0){ |
| | | //计算用气同比环比 |
| | | data.getGasQuantity().setSameRate( |
| | | (data.getGasQuantity().getTotalNum().subtract(data.getGasQuantity().getSameNum())).divide(data.getGasQuantity().getSameNum()).doubleValue()*100 +"" |
| | | if(Constants.formatBigdecimal(data.getGasQuantity().getSameNum()).compareTo(new BigDecimal(0))!=0){ |
| | | data.getGasQuantity().setSameRate( |
| | | (data.getGasQuantity().getTotalNum().subtract(data.getGasQuantity().getSameNum())).divide(data.getGasQuantity().getSameNum(),4,BigDecimal.ROUND_HALF_UP).doubleValue()*100 +"" |
| | | /*Constants.formatBigdecimal4Float(data.getGasQuantity().getSameNum() |
| | | .divide(data.getGasQuantity().getTotalNum(),4,BigDecimal.ROUND_HALF_UP)).doubleValue()*100 +""*/); |
| | | data.getGasQuantity().setRingRate( |
| | | (data.getGasQuantity().getTotalNum().subtract(data.getGasQuantity().getRingNum())).divide(data.getGasQuantity().getRingNum()).doubleValue()*100 +"" |
| | | //Constants.formatBigdecimal4Float(data.getGasQuantity().getRingNum().divide(data.getGasQuantity().getTotalNum(),4,BigDecimal.ROUND_HALF_UP)).doubleValue()*100 +"" |
| | | ); |
| | | } |
| | | if(Constants.formatBigdecimal(data.getGasQuantity().getRingNum()).compareTo(new BigDecimal(0))!=0){ |
| | | data.getGasQuantity().setRingRate( |
| | | (data.getGasQuantity().getTotalNum().subtract(data.getGasQuantity().getRingNum())).divide(data.getGasQuantity().getRingNum(),4,BigDecimal.ROUND_HALF_UP).doubleValue()*100 +"" |
| | | //Constants.formatBigdecimal4Float(data.getGasQuantity().getRingNum().divide(data.getGasQuantity().getTotalNum(),4,BigDecimal.ROUND_HALF_UP)).doubleValue()*100 +"" |
| | | ); |
| | | } |
| | | |
| | | } |
| | | if( data.getWaterQuantity().getTotalNum().compareTo(new BigDecimal(0)) !=0){ |
| | | // //计算用水同比环比 |
| | |
| | | for(Integer t :statusList){ |
| | | for(TmsCircleStatusListResponse status :data){ |
| | | if(Constants.equalsInteger(status.getOrderStatus(),Constants.FOUR) |
| | | && Constants.equalsInteger(status.getType(),TMSContants.StatusCode.rggx)) { |
| | | continue; |
| | | } |
| | | if(Constants.equalsInteger(status.getOrderStatus(),Constants.FOUR) |
| | | && Constants.equalsInteger(status.getType(),TMSContants.StatusCode.app)) { |
| | | status.setOrderStatus(TMSContants.ChildStatusLevel.clqdapp.getOrderStatus()); |
| | | } |
| | |
| | | String url = systemDictDataBiz.queryByCode(Constants.TSM_PARAM,Constants.TMS_INTERFACE_URL_PREFIX).getCode() |
| | | +TMSContants.InterfacePath.getDriverTaskList[0]; |
| | | |
| | | url = "http://10.163.4.56:8088"+TMSContants.InterfacePath.getDriverTaskList[0]; |
| | | // url = "http://10.163.4.56:8088"+TMSContants.InterfacePath.getDriverTaskList[0]; |
| | | TmsBaseResponse<TmsBasePageResponse<TmsDriveTaskListResponse> > response = sendHttpRequest(url,TMSContants.InterfacePath.getDriverTaskList[1],JSONObject.toJSONString(param) |
| | | ,new TypeReference< TmsBaseResponse<TmsBasePageResponse<TmsDriveTaskListResponse>>>(){}); |
| | | if(response ==null || response.getData() == null){ |
| | |
| | | String url = systemDictDataBiz.queryByCode(Constants.TSM_PARAM,Constants.TMS_INTERFACE_URL_PREFIX).getCode() |
| | | +TMSContants.InterfacePath.getDriverTaskDetail[0]; |
| | | |
| | | url = "http://10.163.4.56:8088"+TMSContants.InterfacePath.getDriverTaskDetail[0]; |
| | | // url = "http://10.163.4.56:8088"+TMSContants.InterfacePath.getDriverTaskDetail[0]; |
| | | TmsBaseResponse<TmsDriveTaskInfoResponse > response = sendHttpRequest(url,TMSContants.InterfacePath.getDriverTaskDetail[1],JSONObject.toJSONString(param) |
| | | ,new TypeReference< TmsBaseResponse<TmsDriveTaskInfoResponse>>(){}); |
| | | if(response ==null || response.getData() == null){ |
| | |
| | | } |
| | | String url = systemDictDataBiz.queryByCode(Constants.TSM_PARAM,Constants.TMS_INTERFACE_URL_PREFIX).getCode() |
| | | +TMSContants.InterfacePath.driverStart[0]; |
| | | url = "http://10.163.4.56:8088"+TMSContants.InterfacePath.driverStart[0]; |
| | | // url = "http://10.163.4.56:8088"+TMSContants.InterfacePath.driverStart[0]; |
| | | TmsBaseResponse<TmsDriveTaskInfoResponse > response = sendHttpRequest(url,TMSContants.InterfacePath.driverStart[1],JSONObject.toJSONString(param) |
| | | ,new TypeReference< TmsBaseResponse<TmsDriveTaskInfoResponse>>(){}); |
| | | if(response ==null || !StringUtils.equals(response.getCode(),"0")){ |
| | |
| | | } |
| | | String url = systemDictDataBiz.queryByCode(Constants.TSM_PARAM,Constants.TMS_INTERFACE_URL_PREFIX).getCode() |
| | | +TMSContants.InterfacePath.driverArrival[0]; |
| | | url = "http://10.163.4.56:8088"+TMSContants.InterfacePath.driverArrival[0]; |
| | | // url = "http://10.163.4.56:8088"+TMSContants.InterfacePath.driverArrival[0]; |
| | | TmsBaseResponse<TmsDriveTaskInfoResponse > response = sendHttpRequest(url,TMSContants.InterfacePath.driverArrival[1],JSONObject.toJSONString(param) |
| | | ,new TypeReference< TmsBaseResponse<TmsDriveTaskInfoResponse>>(){}); |
| | | if(response ==null ||!StringUtils.equals(response.getCode(),"0")){ |