Java开发笔记3(数据接收)

1.controller:

//闸机 Created by guosen on 2021/11/29
@PostMapping("/getAFCInfo")
@Logger(action = LoggerConstant.ACTION_UPDATE_AFCINFO, itemType = LoggerConstant.ITEM_TYPE_AFC_INFO, param = "#getAFCInfo")
public Result getAFCInfo() {
log.info("闸机信息");
AfcInfoConf afcInfo = propertiesConf.getAfcInfo();
String url = afcInfo.getUrl();

DFQueryParamsDTO dfQueryParamsDTO = new DFQueryParamsDTO();
dfQueryParamsDTO.setMethodName("getAFCInfo");
dfQueryParamsDTO.setCompanyName(afcInfo.getCompanyName());
dfQueryParamsDTO.setUserName(afcInfo.getUserName());
dfQueryParamsDTO.setPassWord(afcInfo.getPassWord());
dfQueryParamsDTO.setUserType(afcInfo.getUserType());

String stationNames = afcInfo.getStationName();
String[] stationNameList = stationNames.split(",");
String httpPost = null;
for (String stationName : stationNameList){
dfQueryParamsDTO.setStationName(stationName);
httpPost = pisLedService.getAFCInfos(dfQueryParamsDTO);

//log.info("导向屏接口响应信息:【{}",httpPost);
if (StringUtils.isBlank(httpPost)) {
return Result.error();
}
}
return Result.ok();
}


//测试闸机导入台账接口
@GetMapping("/toRecDevice")
public Result AfcToDeviceTest() {
pisLedService.setAFCInfoToRec();
return Result.ok();
}

//测试导向屏导入台账接口
@GetMapping("/pisToRecDevice")
public Result PisToDeviceTest() {
pisLedService.setPisInfoToRec();
return Result.ok();
}



==============================================================================
2.Service:

String getAFCInfos(DFQueryParamsDTO dfQueryParamsDTO);

//闸机导入台账
void setAFCInfoToRec();

//导向屏导入台账
void setPisInfoToRec();
===============================================================================
3.ServiceImpl:

(1)

    /**
* Created by guosen
*
* @param dfQueryParamsDTO
* @return
*/
@Override
public String getAFCInfos(DFQueryParamsDTO dfQueryParamsDTO) {
log.info("获取闸机信息接口处理入参:【{}");
//获取闸机请求地址
AfcInfoConf afcInfoConf = propertiesConf.getAfcInfo();
String url = afcInfoConf.getUrl();
List<AFCGateEquipment> resultList = new ArrayList<>();
String httpPost = null;
try {
log.info("获取闸机信息接口,地址:【{}】入参:【{}】,", url, JSON.toJSONString(dfQueryParamsDTO));
//httpGet = restUtil.httpGet(url,jsonObject.toJSONString());
int reTryCount = propertiesConf.getAfcInfo().getRetryCount();
// 响应数据为空且请求次数不超过规定的重试次数会进行多次请求
// httpPost = getDataInfo1(restUtil, url, afcQueryParamsDTO, reTryCount);
httpPost = getDataInfo(restUtil, url, dfQueryParamsDTO, reTryCount);
//httpPost = restUtil.httpPost(url,JSON.toJSONString(afcQueryParamsDTO));
log.info("获取闸机信息接口,响应信息为:{}", httpPost);
JSONArray json = JSONArray.parseArray(httpPost);
for (int i = 0; i < json.size(); i++) {
JSONObject job = json.getJSONObject(i);
AFCGateEquipment afcGateEquipment = new AFCGateEquipment();
afcGateEquipment.setInfName(job.getString("inf_name"));
afcGateEquipment.setRelaTreeId(job.getString("rela_tree_id"));
afcGateEquipment.setInnerCode(job.getString("innercode"));
afcGateEquipment.setCheckType(job.getString("check_type"));
afcGateEquipment.setGateIpaddr(job.getString("gate_ipaddr"));
afcGateEquipment.setGateName(job.getString("gate_name"));
afcGateEquipment.setGateNo(job.getString("gate_no"));
resultList.add(afcGateEquipment);
}
// resultList=(List<AFCGateEquipment>)JSONArray.parseArray(httpPost, AFCGateEquipment.class);
//log.info("获取闸机信息接口,响应信息为:{}",httpGet);
} catch (Exception e) {
e.printStackTrace();
}

int insertCount = 0;
//调用的mapper的方法名
// String methodName = "insertAFCInfo";

//将字符串转化为List集合
try {
List<AFCGateEquipment> insertList = new ArrayList<>();
for (AFCGateEquipment afcGateEquipment : resultList) {
AFCGateEquipment sirt = afcInfoMapper.selectAFCInfo(afcGateEquipment.getGateNo(), afcGateEquipment.getGateIpaddr());
//log.info("基础信息数据为:【{}", sirt.getBaspisId());
if (sirt != null) {
afcGateEquipment.setId(sirt.getId());
afcInfoMapper.updateByPrimaryKeySelective(afcGateEquipment);
} else {
insertList.add(afcGateEquipment);
}
}
log.info("基础数据为:【{}", insertList.size());
//数据批量入库
if (insertList.size() > 0) {
//insertCount = (Integer) this.insertBatch(sqlSession, insertList, methodName, PisInfoMapper.class, CommonUtil.MYBATIS_MAX_COUNT);
insertCount = afcInfoMapper.insertAFCInfo(insertList);
}
log.info("闸机接口插入数据数目为:【{}", insertCount);

/**
* 调用闸机导入台账的方法
*/
// setAFCInfos(afcQueryParamsDTO);

} catch (Exception e) {
e.printStackTrace();
}
return httpPost;
}

(2)
//闸机导入台账方法
@Override
public void setAFCInfoToRec() {
setAFCInfos();
}

public Result setAFCInfos() {
List<Device> resultList = new ArrayList<>();
List<AFCGateEquipment> list = afcInfoDao.findAfcInfo();
StationInfTree stationInfTree = new StationInfTree();
for (AFCGateEquipment afcGateEquipment : list) {
//in_name
stationInfTree.setRelaTreeId(afcGateEquipment.getRelaTreeId());
String parentId = stationInfTreeDao.findInfName2(stationInfTree.getRelaTreeId()); //二级 31
String parentId2 = stationInfTreeDao.findInfName1(parentId); //一级 26
String infName = stationInfTreeDao.findInfName(parentId2); //一级对应的 infName
Device device = new Device();
device.setAddress(infName);
//innercode(s_station_id)
String innerCode = afcGateEquipment.getInnerCode();
String stationId = stationDao.getStationId(innerCode);
device.setStationId(stationId);
//check_type
String checkType = afcGateEquipment.getCheckType();
if (checkType.equals("1") || checkType.equals("2") || checkType.equals("3")) {
device.setDeviceLargeCategoryId("8a83cb4e6e7dd26c016e86800888000c"); //门式大类123
device.setDeviceCategory("8a83cb4e6f51574d016f5a015aad355a"); //门式小类123
} else if (checkType.equals("4") || checkType.equals("5")) {
device.setDeviceLargeCategoryId("8a83cb4e6e7dd26c016e86800888000c"); //柱式大类45
device.setDeviceCategory("8a83cb4e726f3abf01727421fdbf017f"); //柱式小类45
}
//gate_ipaddr
device.setIp(afcGateEquipment.getGateIpaddr());
//gate_name
device.setName(afcGateEquipment.getGateName());
//gate_no
device.setNo(afcGateEquipment.getGateNo());
resultList.add(device);
}

List<Device> insertList = new ArrayList<>();
for (Device device1 : resultList) {
if (device1.getIp() == null || device1.getIp().isEmpty()) {
continue;
}
Device dev = deviceDao.selectRecDevice2(device1.getIp());
if (dev != null) {
device1.setId(dev.getId());
device1.setCreateTime(dev.getCreateTime());
device1.setUpdateTime(new Date());
deviceDao.save(device1);
// deviceDao.updateRecDevice(device1);
} else {
insertList.add(device1);
}
}
if (insertList.size() > 0) {
for (Device device2 : insertList) {
// deviceDao.insertRecDevice(device2);
device2.setCreateTime(new Date());
deviceDao.save(device2);
}
}
return Result.ok();
}


(3)

//导向屏信息导入台账方法
public void setPisInfoToRec() {
setPisInfos();
}

public Result setPisInfos() {
List<Device> resultList = new ArrayList<>();
List<PisInfo> list = pisInfoDao.findPisInfo();
StationInfTree stationInfTree = new StationInfTree();
for (PisInfo pisInfo : list) {
//rela_tree_id(s_address)
stationInfTree.setRelaTreeId(String.valueOf(pisInfo.getRelaTreeId()));
String parentId = stationInfTreeDao.findInfName2(stationInfTree.getRelaTreeId()); //二级
String parentId2 = stationInfTreeDao.findInfName1(parentId); //一级
String infName = stationInfTreeDao.findInfName(parentId2); //一级对应的 infName
Device device = new Device();
device.setAddress(infName);
//pis_arsnum(s_no)
device.setNo(String.valueOf(pisInfo.getPisArsnum()));
//led_name(s_name)
device.setName(pisInfo.getLedname());
//led_type
int ledType = pisInfo.getLedType();
if (ledType == 1 || ledType ==3) {
device.setDeviceLargeCategoryId("8a83092878f2b5460178f3084590017b"); //异步屏大类13
device.setDeviceCategory("8a83092878f2b5460178f3087a57017c"); //异步屏小类13
} else if (ledType == 2 || ledType ==4) {
device.setDeviceLargeCategoryId("8a83092878f2b5460178f3084590017b"); //同步屏大类24
device.setDeviceCategory("8a8309287908abb401790c145a270224"); //同步屏小类24
}

//ip(s_ip)
device.setIp(pisInfo.getIp());
//station_name(s_station_id)
String stationName = pisInfo.getStationName();
String stationId = stationDao.getStationIdByName(stationName);
device.setStationId(stationId);
device.setDeviceId(String.valueOf(pisInfo.getBaspisId()));
resultList.add(device);
}

List<Device> insertList = new ArrayList<>();
for (Device device1 : resultList) {
// if (device1.getIp() == null || device1.getIp().isEmpty()) {
// continue;
// }
Device dev = deviceDao.selectRecDevice(device1.getDeviceId());
//更新
if (dev != null) {
device1.setId(dev.getId());
device1.setCreateTime(dev.getCreateTime());
device1.setUpdateTime(new Date());
deviceDao.save(device1);
} else {
insertList.add(device1);
}
}
if (insertList.size() > 0) {
//新增
for (Device device2 : insertList) {
device2.setCreateTime(new Date());
deviceDao.save(device2);
}
}
return Result.ok();
}


===========================================================================================
4.Mapper:
(1)
/**
* Created by guosen on 2021/11/30.
*/
@Repository
public interface AFCInfoMapper {

int updateByPrimaryKeySelective(AFCGateEquipment record);
AFCGateEquipment selectAFCInfo(@Param("gateNo") String gateNo, @Param("gateIpaddr") String gateIpaddr);
int insertAFCInfo(@Param("afcGateEquipments") List<AFCGateEquipment> afcGateEquipments);

}

(2)
public interface AfcInfoDao extends BaseDao<AFCGateEquipment, String> {

@Query(value = "select * from afc_gate_equipment a" ,nativeQuery = true)
List<AFCGateEquipment> findAfcInfo();
}

public interface StationInfTreeDao extends BaseDao<StationInfTree, String> {

@Query(value = "select t.parent_id from b_stationinfrelatree t where rela_tree_id = :relaTreeId" ,nativeQuery = true)
String findInfName2(@Param("relaTreeId") String relaTreeId);

@Query(value = "select t.parent_id from b_stationinfrelatree t where rela_tree_id = :parentId" ,nativeQuery = true)
String findInfName1(@Param("parentId") String parentId);

@Query(value = "select t.inf_name from b_stationinfrelatree t where rela_tree_id = :parentId2" ,nativeQuery = true)
String findInfName(@Param("parentId2") String parentId2);

}

public interface StationDao extends BaseDao<Station, String> {

@Query(value = "select s.s_id from b_station_dict s where s.s_station_telecode = :innerCode",nativeQuery = true)
String getStationId(@Param("innerCode") String innerCode);

@Query(value = "select s.s_id from b_station_dict s where s.s_station_name = :stationName",nativeQuery = true)
String getStationIdByName(@Param("stationName") String stationName);
}




public interface DeviceDao extends BaseDao<Device, String> {

@Query(value = "select * from rec_device d where d.s_device_id = :deviceId",nativeQuery = true)
Device selectRecDevice(@Param("deviceId") String deviceId);

@Query(value = "select * from rec_device d where d.s_ip = :ip",nativeQuery = true)
Device selectRecDevice2(@Param("ip") String ip);

@Transactional
@Modifying
@Query(value = "update rec_device d set d.s_address = :device1.address, d.s_station_id = :device1.stationId, d.s_large_category_id = :device1.deviceLargeCategoryId, d.s_device_category_id = :device1.deviceCategory, d.s_ip = :device1.ip, d.s_name = :device1.name, d.s_no = :device1.no", nativeQuery = true)
void updateRecDevice(@Param("device1") Device device1);

@Transactional
@Modifying
@Query(value = "insert into rec_device(s_address, s_station_id, s_large_category_id, s_device_category_id, s_ip, s_name, s_no) values (:device.address, :device.stationId, :device.deviceLargeCategoryId, :device.deviceCategory, :device.ip, :device.name, :device.no)", nativeQuery = true)
void insertRecDevice(@Param("device") Device device);
// @Query(value = "insert into rec_device(s_address, s_station_id, s_device_category_id, s_ip, s_name, s_no) values (:device.address, :device.stationId, :device.deviceCategory, :device.ip, :device.name, :device.no)", nativeQuery = true)
// void insertRecDevice(@Param("device") Device device);

}

(3)

public interface PisInfoDao extends BaseDao<PisInfo, String> {

@Query(value = "select * from pis_info p" ,nativeQuery = true)
List<PisInfo> findPisInfo();
}
 
public interface StationInfTreeDao extends BaseDao<StationInfTree, String> {

@Query(value = "select t.parent_id from b_stationinfrelatree t where rela_tree_id = :relaTreeId" ,nativeQuery = true)
String findInfName2(@Param("relaTreeId") String relaTreeId);

@Query(value = "select t.parent_id from b_stationinfrelatree t where rela_tree_id = :parentId" ,nativeQuery = true)
String findInfName1(@Param("parentId") String parentId);

@Query(value = "select t.inf_name from b_stationinfrelatree t where rela_tree_id = :parentId2" ,nativeQuery = true)
String findInfName(@Param("parentId2") String parentId2);

}



public interface StationDao extends BaseDao<Station, String> {

@Query(value = "select s.s_id from b_station_dict s where s.s_station_telecode = :innerCode",nativeQuery = true)
String getStationId(@Param("innerCode") String innerCode);

@Query(value = "select s.s_id from b_station_dict s where s.s_station_name = :stationName",nativeQuery = true)
String getStationIdByName(@Param("stationName") String stationName);
}
 
@Query(value = "select * from rec_device d where d.s_device_id = :deviceId",nativeQuery = true)
Device selectRecDevice(@Param("deviceId") String deviceId);


5. Mapper.xml

(1)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cars.ict.rbpsems.mapper.AFCInfoMapper">
<resultMap id="BaseResultMap" type="com.cars.ict.rbpsems.entity.AFCGateEquipment">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="inf_name" jdbcType="VARCHAR" property="innerCode"/>
<result column="innercode" jdbcType="CHAR" property="innerCode"/>
<result column="gate_no" jdbcType="VARCHAR" property="gateNo"/>
<result column="gate_name" jdbcType="VARCHAR" property="gateName"/>
<result column="rela_tree_id" jdbcType="VARCHAR" property="relaTreeId"/>
<result column="check_type" jdbcType="VARCHAR" property="checkType"/>
<result column="gate_ipaddr" jdbcType="VARCHAR" property="gateIpaddr"/>
</resultMap>
<sql id="Base_Column_List">
id,
inf_name,
innercode,
gate_no,
gate_name,
rela_tree_id,
check_type,
gate_ipaddr
</sql>

<select id="selectAFCInfo" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from afc_gate_equipment
where gate_no = #{gateNo,jdbcType=VARCHAR} and gate_ipaddr = #{gateIpaddr,jdbcType=VARCHAR}
</select>

<update id="updateByPrimaryKeySelective" parameterType="com.cars.ict.rbpsems.entity.AFCGateEquipment">
update afc_gate_equipment
<set>
<if test="infName != null">
inf_name = #{infName,jdbcType=VARCHAR},
</if>
<if test="innerCode != null">
innercode = #{innerCode,jdbcType=CHAR},
</if>
<if test="gateNo != null">
gate_no = #{gateNo,jdbcType=VARCHAR},
</if>
<if test="gateName != null">
gate_name = #{gateName,jdbcType=VARCHAR},
</if>
<if test="relaTreeId != null">
rela_tree_id = #{relaTreeId,jdbcType=VARCHAR},
</if>
<if test="checkType != null">
check_type = #{checkType,jdbcType=VARCHAR},
</if>
<if test="gateIpaddr != null">
gate_ipaddr = #{gateIpaddr,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>

<insert id="insertAFCInfo" parameterType="java.util.List">
insert into afc_gate_equipment (inf_name,rela_tree_id,innercode,check_type,
gate_ipaddr,gate_name,gate_no)
values
<foreach collection="afcGateEquipments" item="item" index="index" separator=",">
(#{item.infName,jdbcType=VARCHAR},#{item.relaTreeId,jdbcType=VARCHAR},
#{item.innerCode,jdbcType=VARCHAR},#{item.checkType,jdbcType=VARCHAR},
#{item.gateIpaddr,jdbcType=VARCHAR},#{item.gateName,jdbcType=VARCHAR},
#{item.gateNo,jdbcType=VARCHAR})
</foreach>
</insert>
</mapper>

<!--#{item.id,jdbcType=INTEGER},-->


========================================================================================
6.附加:

//导向屏信息导入台账方法
public void setPisInfoToRec() {
setPisInfos();
}

public Result setPisInfos() {
List<Device> resultList = new ArrayList<>();
List<PisInfo> list = pisInfoDao.findPisInfo();
StationInfTree stationInfTree = new StationInfTree();
for (PisInfo pisInfo : list) {
//rela_tree_id(s_address)
stationInfTree.setRelaTreeId(String.valueOf(pisInfo.getRelaTreeId()));
String parentId = stationInfTreeDao.findInfName2(stationInfTree.getRelaTreeId()); //二级
String parentId2 = stationInfTreeDao.findInfName1(parentId); //一级
String infName = stationInfTreeDao.findInfName(parentId2); //一级对应的 infName
Device device = new Device();
device.setAddress(infName);
//pis_arsnum(s_no)
device.setNo(String.valueOf(pisInfo.getPisArsnum()));
//led_name(s_name)
device.setName(pisInfo.getLedname());
//led_type
int ledType = pisInfo.getLedType();
if (ledType == 1 || ledType ==3) {
device.setDeviceLargeCategoryId("8a83092878f2b5460178f3084590017b"); //异步屏大类13
device.setDeviceCategory("8a83092878f2b5460178f3087a57017c"); //异步屏小类13
} else if (ledType == 2 || ledType ==4) {
device.setDeviceLargeCategoryId("8a83092878f2b5460178f3084590017b"); //同步屏大类24
device.setDeviceCategory("8a8309287908abb401790c145a270224"); //同步屏小类24
}

//ip(s_ip)
device.setIp(pisInfo.getIp());
//station_name(s_station_id)
String stationName = pisInfo.getStationName();
String stationId = stationDao.getStationIdByName(stationName);
device.setStationId(stationId);
device.setDeviceId(String.valueOf(pisInfo.getBaspisId()));
resultList.add(device);
}

List<Device> insertList = new ArrayList<>();
for (Device device1 : resultList) {
// if (device1.getIp() == null || device1.getIp().isEmpty()) {
// continue;
// }
Device dev = deviceDao.selectRecDevice(device1.getDeviceId());
//更新
if (dev != null) {
device1.setId(dev.getId());
device1.setCreateTime(dev.getCreateTime());
device1.setUpdateTime(new Date());
deviceDao.save(device1);
} else {
insertList.add(device1);
}
}
if (insertList.size() > 0) {
//新增
for (Device device2 : insertList) {
device2.setCreateTime(new Date());
deviceDao.save(device2);
}
}
return Result.ok();
}


=========================================================================

7.杂项:

package com.cars.ict.rbpsems.conf;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
* 配置文件统一管理
*
* @author xueyj
* @date 2019-10-15 17:25
*/
@Data
@ConfigurationProperties(prefix = "lvfu")
public class PropertiesConf {
//导向屏配置
private GuideScreenConf guideScreen;
//到发配置
private VehicleArrivalConf daoFa;
//导向亮度配置
private PisLedConf pisLed;
//噪声采集
private SensorConf sensor;
//闸机
private AfcInfoConf afcInfo;

public SensorConf getSensor() {
return sensor;
}

public void setSensor(SensorConf sensor) {
this.sensor = sensor;
}

public GuideScreenConf getGuideScreen() {
return guideScreen;
}

public void setGuideScreen(GuideScreenConf guideScreen) {
this.guideScreen = guideScreen;
}

public VehicleArrivalConf getDaoFa() {
return daoFa;
}

public void setDaoFa(VehicleArrivalConf daoFa) {
this.daoFa = daoFa;
}

public PisLedConf getPisLed() {
return pisLed;
}

public void setPisLed(PisLedConf pisLed) {
this.pisLed = pisLed;
}

public AfcInfoConf getAfcInfo() {
return afcInfo;
}

public void setAfcInfo(AfcInfoConf afcInfo) {
this.afcInfo = afcInfo;
}
}

=======================================================

package com.cars.ict.rbpsems.conf;

import lombok.Data;

/**
* 闸机配置加载
*
* @author guosen
* @date 2021-12-2 14:49
*/

@Data
public class AfcInfoConf {

/**
* 到发接口请求地址
*/
private String url;

private String url2;

private String station;

private String station2;

/**
* 到发接口请求用户名
*/
private String userName;

/**
* 到发接口请求密码
*/
private String passWord;

/**
* 到发接口是否开启登录
*/
private Boolean enable;

/**
* 登录失败,休眠时间
*/
private Long retryTime;

/**
* 登录失败最大重试次数
*/
private Integer retryMaxCount;

/**
* 登录调用方法名
*/
private String methodName;

/**
* 登录厂家标识
*/
private String companyName;

/**
* 登录用户类型
*/
private String userType;

/**
* 请求失败重试次数
*/
private Integer retryCount;

/**
* 车站名称
*/
private String stationName;
}

=========================================================================

# 旅服相关的配置
lvfu:
# 缓存项最大数量
guavaCacheSize: 10000
# 缓存时间:秒,若时间设置为0,或者负数,缓存不设置过期时间
guavaCacheTime: 100
guideScreen:
url: http://192.168.93.1:8091/order/2
bureauCode: "P_BXP"
typeCode: "DXP"
# 到发相关配置
daoFa:
url: http://172.28.3.134:8091/df/pasDayPlanAll
#是否开启登录
enable: true
#用户名
userName: "kerry"
#密码
passWord: "123456"
# 登录失败,重试等待时间
retryTime: 3000
#登录最大重试次数
retryMaxCount: 3
#登录调用方法名
loginMethodName: "LOGIN"
#登录厂家标识
loginCompanyName: "gzky"
#登录用户类型
loginUserType: "Request"
#请求失败重试次数
retryCount: 5
# 导向相关配置
pisLed:
url: http://10.3.69.246:50001/Service
url2: http://10.3.69.246:50001/Service
station: 西安
station2:
#是否开启登录
enable: true
#用户名
userName: "kerry"
#密码
passWord: "123456"
# 登录失败,重试等待时间
retryTime: 3000
#登录最大重试次数
retryMaxCount: 3
#登录调用方法名
loginMethodName: "LOGIN"
#登录厂家标识
loginCompanyName: "ks"
#登录用户类型
loginUserType: "Request"
#请求失败重试次数
retryCount: 2
#车站名次
stationName: 西安
afcInfo:
url: http://10.3.69.246:50001/Service
url2: http://10.3.69.246:50001/Service
station: 西安
station2:
#是否开启登录
enable: true
#用户名
userName: "kerry"
#密码
passWord: "123456"
# 登录失败,重试等待时间
retryTime: 3000
#登录最大重试次数
retryMaxCount: 3
#登录调用方法名
methodName: "LOGIN"
#登录厂家标识
companyName: "ks"
#登录用户类型
userType: "Request"
#请求失败重试次数
retryCount: 2
#车站名次
stationName: FBP
sensor:
#采集器本地路径
url: http://127.0.0.1:8087/env/getdata
#设置采集时间间隔
time: 6000
#定时删除天数
days: 2

guide:
url: http://10.96.5.161:8093/Service/

====================================================================


package com.cars.ict.rbpsems.dto;

import lombok.Data;

/**
* 到发接口请求DTO
*
* @author lyt
* @date 2019-10-24 10:48
*/
@Data
public class DFQueryParamsDTO {

/**
* 调用函数(函数名全部大写)
*/
private String methodName;
/**
* 厂家标识
*/
private String companyName;
/**
* 用户名
*/
private String userName;
/**
* 密码
*/
private String passWord;
/**
* 用户类型(主动请求或者需要推送)
*/
private String userType;
/**
* 车站名称
*/
private String stationName;
/**
* 推送地址
*/
private String RequestURL;
/**
* 推送类型(默认json
*/
private String RequestType;
/**
* 推送方法(默认post
*/
private String RequestMethod;
/**
* 推送数据(见文档)
*/
private String RMethod;
/**
* 需要参数
*/
private String RMethodParameters;

public String getMethodName() {
return methodName;
}

public void setMethodName(String methodName) {
this.methodName = methodName;
}

public String getCompanyName() {
return companyName;
}

public void setCompanyName(String companyName) {
this.companyName = companyName;
}

public String getUserName() {
return userName;
}

public void setUserName(String userName) {
this.userName = userName;
}

public String getPassWord() {
return passWord;
}

public void setPassWord(String passWord) {
this.passWord = passWord;
}

public String getUserType() {
return userType;
}

public void setUserType(String userType) {
this.userType = userType;
}

public String getStationName() {
return stationName;
}

public void setStationName(String stationName) {
this.stationName = stationName;
}

public String getRequestURL() {
return RequestURL;
}

public void setRequestURL(String requestURL) {
RequestURL = requestURL;
}

public String getRequestType() {
return RequestType;
}

public void setRequestType(String requestType) {
RequestType = requestType;
}

public String getRequestMethod() {
return RequestMethod;
}

public void setRequestMethod(String requestMethod) {
RequestMethod = requestMethod;
}

public String getRMethod() {
return RMethod;
}

public void setRMethod(String RMethod) {
this.RMethod = RMethod;
}

public String getRMethodParameters() {
return RMethodParameters;
}

public void setRMethodParameters(String RMethodParameters) {
this.RMethodParameters = RMethodParameters;
}
}
 


























posted @   sensen~||^_^|||&  阅读(53)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 记一次.NET内存居高不下排查解决与启示
历史上的今天:
2021-02-10 HTTP状态 500 - 内部服务器错误
点击右上角即可分享
微信分享提示