Compare commits
3 Commits
fa17191c88
...
d5f9650009
Author | SHA1 | Date |
---|---|---|
|
d5f9650009 | |
|
d1f0fc42ba | |
|
b2e8bb5417 |
|
@ -1,9 +1,11 @@
|
||||||
package com.zcloud.modules.bussiness.controller;
|
package com.zcloud.modules.bussiness.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.zcloud.common.annotation.SysLog;
|
import com.zcloud.common.annotation.SysLog;
|
||||||
import com.zcloud.common.utils.PageUtils;
|
import com.zcloud.common.utils.PageUtils;
|
||||||
import com.zcloud.common.utils.R;
|
import com.zcloud.common.utils.R;
|
||||||
import com.zcloud.common.validator.group.DeleteGroup;
|
import com.zcloud.common.validator.group.DeleteGroup;
|
||||||
|
import com.zcloud.modules.bussiness.dto.req.DataManualSendDto;
|
||||||
import com.zcloud.modules.bussiness.dto.req.DataMenuQueryDto;
|
import com.zcloud.modules.bussiness.dto.req.DataMenuQueryDto;
|
||||||
import com.zcloud.modules.bussiness.dto.req.DataRecordPageDto;
|
import com.zcloud.modules.bussiness.dto.req.DataRecordPageDto;
|
||||||
import com.zcloud.modules.bussiness.dto.req.DataRecordPushReqDto;
|
import com.zcloud.modules.bussiness.dto.req.DataRecordPushReqDto;
|
||||||
|
@ -18,6 +20,8 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询数据信息
|
* 查询数据信息
|
||||||
*/
|
*/
|
||||||
|
@ -74,11 +78,17 @@ public class BusDataController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@SysLog("数据信息-数据手动重推")
|
@SysLog("数据信息-数据重新推送")
|
||||||
@PostMapping("/record/log/push")
|
@PostMapping("/record/data/push")
|
||||||
@ApiOperation(value = "数据手动重推",hidden = true)
|
@ApiOperation(value = "数据手动重推",hidden = true)
|
||||||
public R recordLogPush( Integer logId) {
|
public R recordDataPush(@RequestBody List<DataManualSendDto> reqList) {
|
||||||
return dataService.recordLogPush(logId);
|
if(CollUtil.isEmpty(reqList)){
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
reqList.forEach(req -> {
|
||||||
|
dataService.recordDataPush(req);
|
||||||
|
});
|
||||||
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.zcloud.modules.bussiness.dto.req;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手动数据请求
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("数据请求实体")
|
||||||
|
public class DataManualSendDto extends PageDto {
|
||||||
|
|
||||||
|
|
||||||
|
@NotNull(message = "数据id不能为空")
|
||||||
|
@ApiModelProperty(value = "数据id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "数据类型")
|
||||||
|
@NotNull(message = "数据类型不能为空")
|
||||||
|
private Integer dataType;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -153,7 +153,7 @@ public class DataWorkBreakReqDto extends DataCommonReqDto{
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
@JsonToString
|
@JsonToString
|
||||||
private List<DataContractorInfoDto> contractorOrg;
|
private List<DataContractorInfoDto> contractorOrg;
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,7 @@ public class DataWorkHighReqDto extends DataCommonReqDto{
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
@JsonToString
|
@JsonToString
|
||||||
private List<DataContractorInfoDto> contractorOrg;
|
private List<DataContractorInfoDto> contractorOrg;
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,7 @@ public class DataWorkHoisingReqDto extends DataCommonReqDto{
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
@JsonToString
|
@JsonToString
|
||||||
private List<DataContractorInfoDto> contractorOrg;
|
private List<DataContractorInfoDto> contractorOrg;
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ public class DataWorkInspectionReqDto extends DataCommonReqDto{
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
@JsonToString
|
@JsonToString
|
||||||
private List<DataContractorInfoDto> contractorOrg;
|
private List<DataContractorInfoDto> contractorOrg;
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,7 @@ public class DataWorkJobReqDto extends DataCommonReqDto{
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
@JsonToString
|
@JsonToString
|
||||||
private List<DataContractorInfoDto> contractorOrg;
|
private List<DataContractorInfoDto> contractorOrg;
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ public class DataWorkPouringReqDto extends DataCommonReqDto{
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
@JsonToString
|
@JsonToString
|
||||||
private List<DataContractorInfoDto> contractorOrg;
|
private List<DataContractorInfoDto> contractorOrg;
|
||||||
|
|
||||||
|
|
|
@ -162,7 +162,7 @@ public class DataWorkPowerReqDto extends DataCommonReqDto{
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
@JsonToString
|
@JsonToString
|
||||||
private List<DataContractorInfoDto> contractorOrg;
|
private List<DataContractorInfoDto> contractorOrg;
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class DataWorkSpaceReqDto extends DataCommonReqDto{
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
@JsonToString
|
@JsonToString
|
||||||
private List<DataContractorInfoDto> contractorOrg;
|
private List<DataContractorInfoDto> contractorOrg;
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ public class DataWorkTankCleaningReqDto extends DataCommonReqDto{
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
@JsonToString
|
@JsonToString
|
||||||
private List<DataContractorInfoDto> contractorOrg;
|
private List<DataContractorInfoDto> contractorOrg;
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ public class DataWorkWaterReqDto extends DataCommonReqDto{
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
@JsonToString
|
@JsonToString
|
||||||
private List<DataContractorInfoDto> contractorOrg;
|
private List<DataContractorInfoDto> contractorOrg;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,8 @@ public class BusLogInfoYearEntity extends Model<BusLogInfoYearEntity> {
|
||||||
|
|
||||||
@ApiModelProperty(value = "创建时间")
|
@ApiModelProperty(value = "创建时间")
|
||||||
private Date createdTime;
|
private Date createdTime;
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "业务主键id")
|
@ApiModelProperty(value = "业务主键id")
|
||||||
private Long dataId;
|
private Long dataId;
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ public class DataWorkBlindplateEntity extends Model<DataWorkBlindplateEntity> {
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
private String contractorOrg;
|
private String contractorOrg;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
||||||
|
|
|
@ -169,7 +169,7 @@ public class DataWorkBreakEntity extends Model<DataWorkBreakEntity> {
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
private String contractorOrg;
|
private String contractorOrg;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
||||||
|
|
|
@ -163,7 +163,7 @@ public class DataWorkGroundBreakEntity extends Model<DataWorkGroundBreakEntity>
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
private String contractorOrg;
|
private String contractorOrg;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
||||||
|
|
|
@ -157,7 +157,7 @@ public class DataWorkHighEntity extends Model<DataWorkHighEntity> {
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
private String contractorOrg;
|
private String contractorOrg;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
||||||
|
|
|
@ -172,7 +172,7 @@ public class DataWorkHoisingEntity extends Model<DataWorkHoisingEntity> {
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
private String contractorOrg;
|
private String contractorOrg;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
||||||
|
|
|
@ -114,7 +114,7 @@ public class DataWorkHotEntity extends Model<DataWorkHotEntity> {
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
private String contractorOrg;
|
private String contractorOrg;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
||||||
|
|
|
@ -154,7 +154,7 @@ public class DataWorkInspectionEntity extends Model<DataWorkInspectionEntity> {
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
private String contractorOrg;
|
private String contractorOrg;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
||||||
|
|
|
@ -157,7 +157,7 @@ public class DataWorkJobEntity extends Model<DataWorkJobEntity> {
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
private String contractorOrg;
|
private String contractorOrg;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
||||||
|
|
|
@ -154,7 +154,7 @@ public class DataWorkPouringEntity extends Model<DataWorkPouringEntity> {
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
private String contractorOrg;
|
private String contractorOrg;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
||||||
|
|
|
@ -175,7 +175,7 @@ public class DataWorkPowerEntity extends Model<DataWorkPowerEntity> {
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
private String contractorOrg;
|
private String contractorOrg;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class DataWorkSpaceEntity extends Model<DataWorkSpaceEntity> {
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
private String contractorOrg;
|
private String contractorOrg;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
||||||
|
|
|
@ -154,7 +154,7 @@ public class DataWorkTankCleaningEntity extends Model<DataWorkTankCleaningEntity
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
private String contractorOrg;
|
private String contractorOrg;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
||||||
|
|
|
@ -154,7 +154,7 @@ public class DataWorkWaterEntity extends Model<DataWorkWaterEntity> {
|
||||||
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
@ApiModelProperty(value = "是否承包商作业(0-否 1-是)")
|
||||||
private String isContractorWork;
|
private String isContractorWork;
|
||||||
|
|
||||||
@ApiModelProperty(value = "承包商组织机构(名称:代码,逗号分隔)")
|
@ApiModelProperty(value = "承包商组织机构(JSON数组)")
|
||||||
private String contractorOrg;
|
private String contractorOrg;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
@ApiModelProperty(value = "是否关联其他作业票(0-否 1-是)")
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class BusLogInfoYearServiceImpl extends ServiceImpl<BusLogInfoYearDao, Bu
|
||||||
LambdaQueryWrapper<BusLogInfoYearEntity> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BusLogInfoYearEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(BusLogInfoYearEntity::getDataId, dataId)
|
queryWrapper.eq(BusLogInfoYearEntity::getDataId, dataId)
|
||||||
.eq(BusLogInfoYearEntity::getBusinessType, businessType)
|
.eq(BusLogInfoYearEntity::getBusinessType, businessType)
|
||||||
.orderByDesc(BusLogInfoYearEntity::getId);
|
.orderByDesc(BusLogInfoYearEntity::getRequestTime);
|
||||||
|
|
||||||
Page<BusLogInfoYearEntity> dataPage = page(page, queryWrapper);
|
Page<BusLogInfoYearEntity> dataPage = page(page, queryWrapper);
|
||||||
List<BusLogInfoYearEntity> records = dataPage.getRecords();
|
List<BusLogInfoYearEntity> records = dataPage.getRecords();
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.zcloud.modules.data.service.data;
|
||||||
|
|
||||||
import com.zcloud.common.utils.PageUtils;
|
import com.zcloud.common.utils.PageUtils;
|
||||||
import com.zcloud.common.utils.R;
|
import com.zcloud.common.utils.R;
|
||||||
|
import com.zcloud.modules.bussiness.dto.req.DataManualSendDto;
|
||||||
import com.zcloud.modules.bussiness.dto.req.DataMenuQueryDto;
|
import com.zcloud.modules.bussiness.dto.req.DataMenuQueryDto;
|
||||||
import com.zcloud.modules.bussiness.dto.req.DataRecordPageDto;
|
import com.zcloud.modules.bussiness.dto.req.DataRecordPageDto;
|
||||||
import com.zcloud.modules.bussiness.dto.req.DataRecordPushReqDto;
|
import com.zcloud.modules.bussiness.dto.req.DataRecordPushReqDto;
|
||||||
|
@ -36,12 +37,13 @@ public interface BusDataService {
|
||||||
*/
|
*/
|
||||||
R recordScheduledPush(Integer scheduleId);
|
R recordScheduledPush(Integer scheduleId);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据手动重推
|
* 数据重新推送
|
||||||
* @param logId
|
* @param req
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
R recordLogPush(Integer logId);
|
Object recordDataPush(DataManualSendDto req);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.json.JSONConfig;
|
import cn.hutool.json.JSONConfig;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
@ -14,30 +15,54 @@ import com.zcloud.common.exception.ZException;
|
||||||
import com.zcloud.common.utils.PageUtils;
|
import com.zcloud.common.utils.PageUtils;
|
||||||
import com.zcloud.common.utils.R;
|
import com.zcloud.common.utils.R;
|
||||||
import com.zcloud.common.utils.ShiroUtils;
|
import com.zcloud.common.utils.ShiroUtils;
|
||||||
|
import com.zcloud.modules.bussiness.dto.req.DataManualSendDto;
|
||||||
import com.zcloud.modules.bussiness.dto.req.DataMenuQueryDto;
|
import com.zcloud.modules.bussiness.dto.req.DataMenuQueryDto;
|
||||||
import com.zcloud.modules.bussiness.dto.req.DataRecordPageDto;
|
import com.zcloud.modules.bussiness.dto.req.DataRecordPageDto;
|
||||||
import com.zcloud.modules.bussiness.dto.req.DataRecordPushReqDto;
|
import com.zcloud.modules.bussiness.dto.req.DataRecordPushReqDto;
|
||||||
import com.zcloud.modules.bussiness.dto.res.DataMenuResDto;
|
import com.zcloud.modules.bussiness.dto.res.DataMenuResDto;
|
||||||
import com.zcloud.modules.bussiness.dto.res.RecordDetailResDto;
|
import com.zcloud.modules.bussiness.dto.res.RecordDetailResDto;
|
||||||
import com.zcloud.modules.bussiness.entity.BusCompanyInfoEntity;
|
import com.zcloud.modules.bussiness.entity.BusCompanyInfoEntity;
|
||||||
|
import com.zcloud.modules.bussiness.entity.BusCompanyThirdRelationEntity;
|
||||||
import com.zcloud.modules.bussiness.entity.BusServicePlatformEntity;
|
import com.zcloud.modules.bussiness.entity.BusServicePlatformEntity;
|
||||||
import com.zcloud.modules.bussiness.entity.BusThirdPlatformEntity;
|
import com.zcloud.modules.bussiness.entity.BusThirdPlatformEntity;
|
||||||
import com.zcloud.modules.bussiness.service.BusCompanyInfoService;
|
import com.zcloud.modules.bussiness.service.BusCompanyInfoService;
|
||||||
|
import com.zcloud.modules.bussiness.service.BusCompanyThirdRelationService;
|
||||||
import com.zcloud.modules.bussiness.service.BusServicePlatformService;
|
import com.zcloud.modules.bussiness.service.BusServicePlatformService;
|
||||||
import com.zcloud.modules.bussiness.service.BusThirdPlatformService;
|
import com.zcloud.modules.bussiness.service.BusThirdPlatformService;
|
||||||
|
import com.zcloud.modules.data.dao.business.DynamicTableDao;
|
||||||
import com.zcloud.modules.data.dao.data.BusDataDao;
|
import com.zcloud.modules.data.dao.data.BusDataDao;
|
||||||
import com.zcloud.modules.data.dto.data.req.DataWorkHighReqDto;
|
import com.zcloud.modules.data.dto.data.req.DataWorkHighReqDto;
|
||||||
|
import com.zcloud.modules.data.dto.hebei.dj.DjConfigurationDto;
|
||||||
|
import com.zcloud.modules.data.dto.hebei.ds.EncryptionReqDto;
|
||||||
|
import com.zcloud.modules.data.dto.hebei.ds.SzTokenResDto;
|
||||||
import com.zcloud.modules.data.dto.hebei.province.HbConfigurationDto;
|
import com.zcloud.modules.data.dto.hebei.province.HbConfigurationDto;
|
||||||
|
import com.zcloud.modules.data.dto.neimenggu.ty.TyEncryptionDto;
|
||||||
import com.zcloud.modules.data.entity.business.BusLogInfoYearEntity;
|
import com.zcloud.modules.data.entity.business.BusLogInfoYearEntity;
|
||||||
|
import com.zcloud.modules.data.entity.data.DataAramEntity;
|
||||||
import com.zcloud.modules.data.entity.data.DataPushScheduledEntity;
|
import com.zcloud.modules.data.entity.data.DataPushScheduledEntity;
|
||||||
|
import com.zcloud.modules.data.enums.business.BusThirdPlatformCodeEnum;
|
||||||
import com.zcloud.modules.data.enums.business.BusinessDataTypeEnum;
|
import com.zcloud.modules.data.enums.business.BusinessDataTypeEnum;
|
||||||
|
import com.zcloud.modules.data.enums.common.LogInfoYearTypeEnum;
|
||||||
|
import com.zcloud.modules.data.enums.data.DataIsDeleteEnum;
|
||||||
|
import com.zcloud.modules.data.enums.data.DataPushStatusEnum;
|
||||||
|
import com.zcloud.modules.data.enums.hebei.dj.url.DjReportV2Enum;
|
||||||
|
import com.zcloud.modules.data.enums.hebei.ds.url.DongShengV1Enum;
|
||||||
|
import com.zcloud.modules.data.enums.hebei.province.url.HeBeiReportV10Enum;
|
||||||
import com.zcloud.modules.data.enums.nmg.province.NmgReportEnum;
|
import com.zcloud.modules.data.enums.nmg.province.NmgReportEnum;
|
||||||
|
import com.zcloud.modules.data.enums.nmg.ty.url.TyReportV16Enum;
|
||||||
import com.zcloud.modules.data.service.business.BusLogInfoYearService;
|
import com.zcloud.modules.data.service.business.BusLogInfoYearService;
|
||||||
import com.zcloud.modules.data.service.data.BusDataService;
|
import com.zcloud.modules.data.service.data.BusDataService;
|
||||||
|
import com.zcloud.modules.data.service.data.DataAramService;
|
||||||
import com.zcloud.modules.data.service.data.DataPushScheduledService;
|
import com.zcloud.modules.data.service.data.DataPushScheduledService;
|
||||||
import com.zcloud.modules.data.thirdservice.data.ExchangeDataCommonService;
|
import com.zcloud.modules.data.thirdservice.data.ExchangeDataCommonService;
|
||||||
import com.zcloud.modules.data.thirdservice.data.PushDataStrategyFactory;
|
import com.zcloud.modules.data.thirdservice.data.PushDataStrategyFactory;
|
||||||
|
import com.zcloud.modules.data.thirdservice.hebei.dj.DjReportUtilService;
|
||||||
|
import com.zcloud.modules.data.thirdservice.hebei.ds.DsReportUtilService;
|
||||||
|
import com.zcloud.modules.data.thirdservice.hebei.province.WhReportUtilService;
|
||||||
|
import com.zcloud.modules.data.thirdservice.hebei.province.WhV13ReportUtilService;
|
||||||
import com.zcloud.modules.data.thirdservice.nmg.province.NmgReportUtilService;
|
import com.zcloud.modules.data.thirdservice.nmg.province.NmgReportUtilService;
|
||||||
|
import com.zcloud.modules.data.thirdservice.nmg.province.NmgV0ReportUtilService;
|
||||||
|
import com.zcloud.modules.data.thirdservice.nmg.ty.TyReportUtilService;
|
||||||
import com.zcloud.modules.sys.entity.SysUserEntity;
|
import com.zcloud.modules.sys.entity.SysUserEntity;
|
||||||
import com.zcloud.modules.sys.enums.SysRoleTypeEnum;
|
import com.zcloud.modules.sys.enums.SysRoleTypeEnum;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
@ -76,6 +101,26 @@ public class BusDataServiceImpl implements BusDataService {
|
||||||
private DataPushScheduledService dataPushScheduledService;
|
private DataPushScheduledService dataPushScheduledService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private NmgReportUtilService nmgReportUtilService;
|
private NmgReportUtilService nmgReportUtilService;
|
||||||
|
@Autowired
|
||||||
|
private NmgV0ReportUtilService nmgV0ReportUtilService;
|
||||||
|
@Autowired
|
||||||
|
private BusCompanyThirdRelationService companyThirdRelationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataAramService dataAramService;
|
||||||
|
@Autowired
|
||||||
|
private DynamicTableDao dynamicTableDao;
|
||||||
|
@Autowired
|
||||||
|
private WhV13ReportUtilService whV13ReportUtilService;
|
||||||
|
@Autowired
|
||||||
|
private WhReportUtilService whReportUtilService;
|
||||||
|
@Autowired
|
||||||
|
private TyReportUtilService tyReportUtilService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DjReportUtilService djReportUtilService;
|
||||||
|
@Autowired
|
||||||
|
private DsReportUtilService dsReportUtilService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageUtils queryPage(DataMenuQueryDto req) {
|
public PageUtils queryPage(DataMenuQueryDto req) {
|
||||||
|
@ -479,32 +524,287 @@ public class BusDataServiceImpl implements BusDataService {
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R recordLogPush(Integer logId) {
|
public Object recordDataPush(DataManualSendDto req) {
|
||||||
BusLogInfoYearEntity logInfo = logInfoYearService.getById(logId);
|
BusinessDataTypeEnum businessDataTypeEnum = BusinessDataTypeEnum.getById(req.getDataType());
|
||||||
Map<String, Object> dataInfo = busDataDao.getDataInfo(logInfo.getDataId(), logInfo.getBusinessType());
|
if (businessDataTypeEnum == null) {
|
||||||
//判断状态
|
throw new ZException("数据类型不存在");
|
||||||
/* Integer pushStatus = (Integer) dataInfo.get("pushStatus");
|
}
|
||||||
if(!DataPushStatusEnum.TRYING_AGAIN.getCode().equals(pushStatus)) {
|
|
||||||
log.error("MqTryAgainHandle->内蒙古省平台消息重试,数据状态为:{},非重试中,不进行重试消息,bussinessType:{},dataId:{},消息内容:{}", pushStatus,logInfo.getBusinessType(),logInfo.getDataId(), JSONUtil.toJsonStr(messageDto));
|
Map<String,Object> dataInfo = busDataDao.getDataInfo(req.getId(),businessDataTypeEnum.getTableName());
|
||||||
return;
|
if(CollUtil.isEmpty(dataInfo)){
|
||||||
}*/
|
throw new ZException("数据信息不存在");
|
||||||
/**
|
}
|
||||||
* "configInfo":"{\"url\":\"http://1.183.43.18:11037\",\"appid\":\"\",\"secret\":\"\",\"key\":\"84702E415A73CE27077B5F726E7BDBB0\",\"vi\":\"1C7AA98593AA69F4AAE119BD5C01D9ED\",\"token\":\"1553975720\",\"requestUrl\":\"http://1.183.43.18:11038\"}"
|
|
||||||
* ,"logInfoId":1713305,"businessType":"data_zone_info","number":16,"dataId":114,"indexReq":"f0c7b301-1b67-45eb-8e2c-7059561d7650"} */
|
List<BusLogInfoYearEntity> logList = logInfoYearService.getLogInfo(req.getId(), businessDataTypeEnum.getTableName());
|
||||||
|
if(CollUtil.isEmpty(logList)){
|
||||||
|
throw new ZException("推送日志为空,不进行推送,请重新组装数据推送");
|
||||||
|
}
|
||||||
|
BusLogInfoYearEntity busLogInfoYearEntity = logList.get(0);
|
||||||
|
|
||||||
|
BusThirdPlatformCodeEnum byCode = BusThirdPlatformCodeEnum.getByCode(busLogInfoYearEntity.getReceiver());
|
||||||
|
|
||||||
|
Long servicePlatformId = (Long) dataInfo.get("servicePlatformId");
|
||||||
|
Long companyId = (Long) dataInfo.get("companyId");
|
||||||
|
Long thirdPlatformId = (Long) dataInfo.get("thirdPlatformId");
|
||||||
|
LambdaQueryWrapper<BusCompanyThirdRelationEntity> companyThirdRelationWrapper = new LambdaQueryWrapper<>();
|
||||||
|
companyThirdRelationWrapper.eq(BusCompanyThirdRelationEntity::getThirdPlatformId, thirdPlatformId)
|
||||||
|
.eq(BusCompanyThirdRelationEntity::getServiceId,servicePlatformId)
|
||||||
|
.eq(BusCompanyThirdRelationEntity::getCompanyId, companyId)
|
||||||
|
.eq(BusCompanyThirdRelationEntity::getIsDelete, DataIsDeleteEnum.NO.getCode());
|
||||||
|
List<BusCompanyThirdRelationEntity> companyThirdRelationList = companyThirdRelationService.list(companyThirdRelationWrapper);
|
||||||
|
if(CollUtil.isEmpty(companyThirdRelationList)){
|
||||||
|
throw new ZException("企业配置的上游平台不存在");
|
||||||
|
}
|
||||||
|
BusCompanyThirdRelationEntity companyThirdRelation = companyThirdRelationList.get(0);
|
||||||
|
|
||||||
|
switch (byCode) {
|
||||||
|
case TUYOU:
|
||||||
|
handleTuYouDataMessage(busLogInfoYearEntity,companyThirdRelation);
|
||||||
|
break;
|
||||||
|
case DONGJIANG:
|
||||||
|
handleDongJiangDataMessage(busLogInfoYearEntity,companyThirdRelation);
|
||||||
|
break;
|
||||||
|
case HEBEI:
|
||||||
|
handleHeBeiDataMessage(busLogInfoYearEntity,companyThirdRelation);
|
||||||
|
break;
|
||||||
|
case HEBEIV13:
|
||||||
|
//河北双控
|
||||||
|
handleHeBeiV13DataMessage(busLogInfoYearEntity,companyThirdRelation);
|
||||||
|
break;
|
||||||
|
case PANJIN:
|
||||||
|
// handlePanJinMessage(messageDto);
|
||||||
|
break;
|
||||||
|
case DONGSHENG:
|
||||||
|
handleDongShengDataMessage(busLogInfoYearEntity,companyThirdRelation);
|
||||||
|
break;
|
||||||
|
case NEIMENGGU:
|
||||||
|
handleNeiMengGuDataMessage(busLogInfoYearEntity,companyThirdRelation);
|
||||||
|
break;
|
||||||
|
case NEIMENGGUV0:
|
||||||
|
//内蒙古双控
|
||||||
|
handleNeiMengGuV0DataMessage(busLogInfoYearEntity,companyThirdRelation);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
log.error("MqTryAgainHandle->上游平台消息重试,接收到消息,上游平台不存在,上游平台:{},数据内容:{}", byCode, JSONUtil.toJsonStr(dataInfo));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleDongShengDataMessage(BusLogInfoYearEntity logInfo, BusCompanyThirdRelationEntity companyThirdRelation) {
|
||||||
|
DongShengV1Enum dongShengV1Enum = DongShengV1Enum.getByBusinessType(logInfo.getBusinessType());
|
||||||
|
EncryptionReqDto configurationDto = new EncryptionReqDto();
|
||||||
|
configurationDto.setUrl(companyThirdRelation.getUrl());
|
||||||
|
String tokenInfo = null;
|
||||||
|
try {
|
||||||
|
tokenInfo = getTokenInfo(companyThirdRelation);
|
||||||
|
if(StringUtils.isEmpty(tokenInfo)){
|
||||||
|
throw new ZException("获取token为空");
|
||||||
|
}
|
||||||
|
} catch (ZException ze) {
|
||||||
|
logInfo.setResponse(ze.getMsg());
|
||||||
|
logInfoYearService.save(logInfo);
|
||||||
|
log.error("DsExchangeDataServiceImpl->,接收到推送{}的数据信息,服务平台id={},企业编码={},获取token信息失败", BusThirdPlatformCodeEnum.DONGSHENG.getDesc(), companyThirdRelation.getServiceId(), companyThirdRelation.getCompanyCode());
|
||||||
|
throw new ZException("获取token信息失败");
|
||||||
|
}
|
||||||
|
configurationDto.setToken(tokenInfo);
|
||||||
|
Integer status = dsReportUtilService.pushData(logInfo.getRequest(), dongShengV1Enum,configurationDto, logInfo, null);
|
||||||
|
log.info("handleDongShengDataMessage->东胜平台消息手动触发,消息内容:{},重试结果:{}",logInfo.getRequest(),status);
|
||||||
|
|
||||||
|
if(DataPushStatusEnum.SUCCESSFUL.getCode().equals(status)){
|
||||||
|
//处理成功,,修改业务状态
|
||||||
|
updateStatusAndSchedule(status, logInfo);
|
||||||
|
}else{
|
||||||
|
//处理失败
|
||||||
|
updateStatusAndSchedule(status, logInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private String getTokenInfo(BusCompanyThirdRelationEntity companyThirdRelation) {
|
||||||
|
try {
|
||||||
|
String url = companyThirdRelation.getUrl() + DongShengV1Enum.token.getUrl();
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("masterKey", companyThirdRelation.getAccessKey());
|
||||||
|
json.put("secretKey", companyThirdRelation.getSecret());
|
||||||
|
log.info("DsExchangeDataServiceImpl->getTokenInfo,获取token信息,url={},json={}", url, json.toString());
|
||||||
|
|
||||||
|
String tokenInfo = dsReportUtilService.basePost(url, json, String.class);
|
||||||
|
log.info("DsExchangeDataServiceImpl->getTokenInfo,获取token信息,返回信息={}",tokenInfo);
|
||||||
|
|
||||||
|
SzTokenResDto szTokenResDto = JSONUtil.toBean(tokenInfo, SzTokenResDto.class);
|
||||||
|
if(szTokenResDto == null) {
|
||||||
|
log.error("DsExchangeDataServiceImpl->getTokenInfo,获取token信息失败,url={},json={}", url, json.toString());
|
||||||
|
throw new ZException("获取token信息失败");
|
||||||
|
}
|
||||||
|
return szTokenResDto.getContent().getAccessToken();
|
||||||
|
} catch (Exception e) {
|
||||||
|
String stackTrace = ExceptionUtils.getStackTrace(e);
|
||||||
|
log.error("DsExchangeDataServiceImpl->getTokenInfo,获取token信息异常,异常信息:{}", stackTrace);
|
||||||
|
throw new ZException("获取token信息异常:" + stackTrace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleDongJiangDataMessage(BusLogInfoYearEntity logInfo, BusCompanyThirdRelationEntity companyThirdRelation) {
|
||||||
|
DjReportV2Enum djReportV2Enum = DjReportV2Enum.getByBusinessType(logInfo.getBusinessType());
|
||||||
|
|
||||||
|
DjConfigurationDto configurationDto = new DjConfigurationDto();
|
||||||
|
configurationDto.setUrl(companyThirdRelation.getUrl());
|
||||||
|
configurationDto.setAccessKey(companyThirdRelation.getAccessKey());
|
||||||
|
configurationDto.setRsaPublicKey(companyThirdRelation.getRsaPublicKey());
|
||||||
|
configurationDto.setCharKey(companyThirdRelation.getIv());
|
||||||
|
Integer status = djReportUtilService.pushData(logInfo.getRequest(), djReportV2Enum, logInfo, configurationDto,null);
|
||||||
|
log.info("handleDongJiangDataMessage->东江平台消息手动触发,消息内容:{},重试结果:{}",logInfo.getRequest(),status);
|
||||||
|
if(DataPushStatusEnum.SUCCESSFUL.getCode().equals(status)){
|
||||||
|
//处理成功,,修改业务状态
|
||||||
|
updateStatusAndSchedule(status, logInfo);
|
||||||
|
}else{
|
||||||
|
updateStatusAndSchedule(status, logInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleTuYouDataMessage(BusLogInfoYearEntity logInfo, BusCompanyThirdRelationEntity companyThirdRelation) {
|
||||||
|
TyReportV16Enum tyReportV16Enum = TyReportV16Enum.getByBusinessType(logInfo.getBusinessType());
|
||||||
|
|
||||||
|
TyEncryptionDto configurationDto = new TyEncryptionDto();
|
||||||
|
configurationDto.setUrl(companyThirdRelation.getUrl());
|
||||||
|
if (companyThirdRelation.getCode().length() > 6) {
|
||||||
|
configurationDto.setCode(companyThirdRelation.getCode().substring(companyThirdRelation.getCode().length() - 6));
|
||||||
|
}
|
||||||
|
configurationDto.setCompanyCode(companyThirdRelation.getCompanyCode());
|
||||||
|
|
||||||
|
Integer status = tyReportUtilService.pushData(logInfo.getRequest(), tyReportV16Enum, logInfo, configurationDto, null);
|
||||||
|
log.info("handleTuYouDataMessage->土右平台消息手动触发,消息内容:{},重试结果:{}",logInfo.getRequest(),status);
|
||||||
|
|
||||||
|
if(DataPushStatusEnum.SUCCESSFUL.getCode().equals(status)){
|
||||||
|
//处理成功,,修改业务状态
|
||||||
|
updateStatusAndSchedule(status, logInfo);
|
||||||
|
}else{
|
||||||
|
//处理失败
|
||||||
|
updateStatusAndSchedule(status, logInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void handleHeBeiDataMessage(BusLogInfoYearEntity logInfo, BusCompanyThirdRelationEntity companyThirdRelation) {
|
||||||
|
HeBeiReportV10Enum heBeiReportV10Enum = HeBeiReportV10Enum.getByBusinessType(logInfo.getBusinessType());
|
||||||
|
String url = companyThirdRelation.getUrl();
|
||||||
HbConfigurationDto configurationDto = new HbConfigurationDto();
|
HbConfigurationDto configurationDto = new HbConfigurationDto();
|
||||||
configurationDto.setUrl("http://1.180.56.222:11037");
|
configurationDto.setUrl(url);
|
||||||
configurationDto.setVi("1C7AA98593AA69F4AAE119BD5C01D9ED");
|
configurationDto.setRequestUrl(companyThirdRelation.getRequestUrl());
|
||||||
configurationDto.setKey("84702E415A73CE27077B5F726E7BDBB0");
|
configurationDto.setVi(companyThirdRelation.getIv());
|
||||||
configurationDto.setToken("1553975720");
|
configurationDto.setAppid(companyThirdRelation.getAppid());
|
||||||
|
configurationDto.setKey(companyThirdRelation.getAccessKey());
|
||||||
|
configurationDto.setSecret(companyThirdRelation.getSecret());
|
||||||
|
configurationDto.setToken(companyThirdRelation.getToken());
|
||||||
|
Integer status = whReportUtilService.pushData(logInfo.getRequest(), heBeiReportV10Enum, logInfo, configurationDto, null);
|
||||||
|
log.info("handleHeBeiDataMessage->河北省平台消息手动触发,消息内容:{},重试结果:{}",logInfo.getRequest(),status);
|
||||||
|
if(DataPushStatusEnum.SUCCESSFUL.getCode().equals(status)){
|
||||||
|
//处理成功,,修改业务状态
|
||||||
|
updateStatusAndSchedule(status, logInfo);
|
||||||
|
}else{
|
||||||
|
//处理失败
|
||||||
|
updateStatusAndSchedule(status, logInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleHeBeiV13DataMessage(BusLogInfoYearEntity logInfo, BusCompanyThirdRelationEntity companyThirdRelation) {
|
||||||
|
HeBeiReportV10Enum heBeiReportV10Enum = HeBeiReportV10Enum.getByBusinessType(logInfo.getBusinessType());
|
||||||
|
|
||||||
|
String url = companyThirdRelation.getUrl();
|
||||||
|
HbConfigurationDto configurationDto = new HbConfigurationDto();
|
||||||
|
configurationDto.setUrl(url);
|
||||||
|
configurationDto.setRequestUrl(companyThirdRelation.getRequestUrl());
|
||||||
|
configurationDto.setVi(companyThirdRelation.getIv());
|
||||||
|
configurationDto.setAppid(companyThirdRelation.getAppid());
|
||||||
|
configurationDto.setKey(companyThirdRelation.getAccessKey());
|
||||||
|
configurationDto.setSecret(companyThirdRelation.getSecret());
|
||||||
|
configurationDto.setToken(companyThirdRelation.getToken());
|
||||||
|
|
||||||
|
Integer status = whV13ReportUtilService.pushData(logInfo.getRequest(), heBeiReportV10Enum, logInfo, configurationDto, null);
|
||||||
|
if(DataPushStatusEnum.SUCCESSFUL.getCode().equals(status)){
|
||||||
|
//处理成功,,修改业务状态
|
||||||
|
log.info("handleHeBeiV13DataMessage->河北省V13平台消息手动触发,消息内容:{},重试结果:{}",logInfo.getRequest(),status);
|
||||||
|
updateStatusAndSchedule(status, logInfo);
|
||||||
|
}else{
|
||||||
|
log.info("handleHeBeiV13DataMessage->河北省V13平台消息手动触发,消息内容:{},重试结果:{}",logInfo.getRequest(),status);
|
||||||
|
//处理失败
|
||||||
|
updateStatusAndSchedule(status, logInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
private void handleNeiMengGuDataMessage(BusLogInfoYearEntity logInfo, BusCompanyThirdRelationEntity companyThirdRelation) {
|
||||||
NmgReportEnum nmgReportEnum = NmgReportEnum.getByBusinessType(logInfo.getBusinessType());
|
NmgReportEnum nmgReportEnum = NmgReportEnum.getByBusinessType(logInfo.getBusinessType());
|
||||||
JSONUtil.toJsonStr(logInfo.getRequest());
|
|
||||||
Integer status = nmgReportUtilService.pushData(logInfo.getRequest(), nmgReportEnum, logInfo, configurationDto, 15 + 1);
|
|
||||||
|
|
||||||
System.out.println(status);
|
HbConfigurationDto configurationDto = new HbConfigurationDto();
|
||||||
|
configurationDto.setUrl(companyThirdRelation.getUrl());
|
||||||
|
configurationDto.setRequestUrl(companyThirdRelation.getRequestUrl());
|
||||||
|
configurationDto.setVi(companyThirdRelation.getIv());
|
||||||
|
configurationDto.setAppid(companyThirdRelation.getAppid());
|
||||||
|
configurationDto.setKey(companyThirdRelation.getAccessKey());
|
||||||
|
configurationDto.setSecret(companyThirdRelation.getSecret());
|
||||||
|
configurationDto.setToken(companyThirdRelation.getToken());
|
||||||
|
Integer status = nmgReportUtilService.pushData(logInfo.getRequest(), nmgReportEnum, logInfo, configurationDto, null);
|
||||||
|
|
||||||
|
if(DataPushStatusEnum.SUCCESSFUL.getCode().equals(status)){
|
||||||
|
//处理成功,,修改业务状态
|
||||||
|
log.info("handleNeiMengGuV0DataMessage->内蒙古省平台消息手动触发,消息内容:{},重试结果:{}", logInfo.getRequest(),status);
|
||||||
|
updateStatusAndSchedule(status, logInfo);
|
||||||
|
}else{
|
||||||
|
log.info("handleNeiMengGuV0DataMessage->内蒙古省平台消息手动触发,消息内容:{},重试结果:{}",logInfo.getRequest(),status);
|
||||||
|
//处理失败
|
||||||
|
updateStatusAndSchedule(status, logInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return R.ok(status);
|
private void handleNeiMengGuV0DataMessage(BusLogInfoYearEntity logInfo,BusCompanyThirdRelationEntity companyThirdRelation) {
|
||||||
|
NmgReportEnum nmgReportEnum = NmgReportEnum.getByBusinessType(logInfo.getBusinessType());
|
||||||
|
|
||||||
|
HbConfigurationDto configurationDto = new HbConfigurationDto();
|
||||||
|
configurationDto.setUrl(companyThirdRelation.getUrl());
|
||||||
|
configurationDto.setRequestUrl(companyThirdRelation.getRequestUrl());
|
||||||
|
configurationDto.setVi(companyThirdRelation.getIv());
|
||||||
|
configurationDto.setAppid(companyThirdRelation.getAppid());
|
||||||
|
configurationDto.setKey(companyThirdRelation.getAccessKey());
|
||||||
|
configurationDto.setSecret(companyThirdRelation.getSecret());
|
||||||
|
configurationDto.setToken(companyThirdRelation.getToken());
|
||||||
|
|
||||||
|
Integer status = nmgV0ReportUtilService.pushData(logInfo.getRequest(), nmgReportEnum, logInfo, configurationDto, null);
|
||||||
|
if(DataPushStatusEnum.SUCCESSFUL.getCode().equals(status)){
|
||||||
|
//处理成功,,修改业务状态
|
||||||
|
log.info("handleNeiMengGuV0DataMessage->内蒙古省V0平台消息手动触发,消息内容:{},重试结果:{}", logInfo.getRequest(),status);
|
||||||
|
updateStatusAndSchedule(status, logInfo);
|
||||||
|
}else{
|
||||||
|
log.info("handleNeiMengGuV0DataMessage->内蒙古省V0平台消息手动触发,消息内容:{},重试结果:{}",logInfo.getRequest(),status);
|
||||||
|
//处理失败
|
||||||
|
updateStatusAndSchedule(status, logInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* @param status 推送状态
|
||||||
|
* @param logInfo 日志信息
|
||||||
|
* @param messageDto 消息数据对象
|
||||||
|
*/
|
||||||
|
public void updateStatusAndSchedule(Integer status, BusLogInfoYearEntity logInfo) {
|
||||||
|
dynamicTableDao.updatePushStatus(status, logInfo.getBusinessType(), logInfo.getDataId());
|
||||||
|
if (LogInfoYearTypeEnum.SCHEDULED.getCode().equals(logInfo.getType())) {
|
||||||
|
// 定时,需要修改定时表中状态
|
||||||
|
DataPushScheduledEntity dataPushScheduledInfo = dataPushScheduledService.getScheduledInfo(logInfo.getBusinessType(), logInfo.getDataId(), DataPushStatusEnum.TRYING_AGAIN.getCode());
|
||||||
|
if (dataPushScheduledInfo != null) {
|
||||||
|
dataPushScheduledInfo.setPushStatus(status);
|
||||||
|
dataPushScheduledInfo.setPushTime(new Date());
|
||||||
|
dataPushScheduledService.updateById(dataPushScheduledInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改告警表状态
|
||||||
|
DataAramEntity aramInfo = dataAramService.getAramInfo(logInfo.getBusinessType(), logInfo.getDataId());
|
||||||
|
if (aramInfo != null) {
|
||||||
|
aramInfo.setPushStatus(status);
|
||||||
|
dataAramService.updateById(aramInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,7 +179,6 @@ public class WhV13ReportUtilServiceImpl implements WhV13ReportUtilService {
|
||||||
number =tryNumberInit;
|
number =tryNumberInit;
|
||||||
}
|
}
|
||||||
Boolean isTryingAgain = false;
|
Boolean isTryingAgain = false;
|
||||||
JSONObject jsonObject = JSONObject.parseObject(JSONUtil.toJsonStr(dtoList));
|
|
||||||
try {
|
try {
|
||||||
sjDefaultResDto = new SjDefaultResDto();
|
sjDefaultResDto = new SjDefaultResDto();
|
||||||
// int i = 1/0;
|
// int i = 1/0;
|
||||||
|
|
|
@ -172,6 +172,7 @@ public class MqCheckResultConsumeListener implements RocketMQListener<MessageExt
|
||||||
// 处理中,需要重新发送消息
|
// 处理中,需要重新发送消息
|
||||||
Boolean b = checkResultMessage(messageDto, nmgReportEnum.getDesc(), BusThirdPlatformCodeEnum.NEIMENGGUV0.getDesc());
|
Boolean b = checkResultMessage(messageDto, nmgReportEnum.getDesc(), BusThirdPlatformCodeEnum.NEIMENGGUV0.getDesc());
|
||||||
if(!b){
|
if(!b){
|
||||||
|
// TODO 后续需要增加失败状态
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
log.info("MqCheckResultConsumeListener->内蒙古v0平台结果查询,数据id:{},第{}次重试,消息类型:{},数据正在处理,发送mq进行重试,返回内容:{}", messageDto.getDataId(), messageDto.getNumber(), nmgReportEnum.getDesc(), JSONUtil.toJsonStr(dataInfo));
|
log.info("MqCheckResultConsumeListener->内蒙古v0平台结果查询,数据id:{},第{}次重试,消息类型:{},数据正在处理,发送mq进行重试,返回内容:{}", messageDto.getDataId(), messageDto.getNumber(), nmgReportEnum.getDesc(), JSONUtil.toJsonStr(dataInfo));
|
||||||
|
@ -455,19 +456,26 @@ public class MqCheckResultConsumeListener implements RocketMQListener<MessageExt
|
||||||
}
|
}
|
||||||
|
|
||||||
private Boolean checkResultMessage(DataCheckResultMessageDto messageDto,String desc,String platform) {
|
private Boolean checkResultMessage(DataCheckResultMessageDto messageDto,String desc,String platform) {
|
||||||
if(messageDto.getBusinessType().equals("data_employee_location")){
|
BusLogInfoYearEntity logInfoYearServiceById = busLogInfoYearService.getById(messageDto.getLogInfoId());
|
||||||
|
long time = logInfoYearServiceById.getRequestTime().getTime();
|
||||||
|
long currentTime = System.currentTimeMillis();
|
||||||
|
if (messageDto.getBusinessType().equals("data_employee_location")) {
|
||||||
//如果是实时定位,并且超多时间限制,不在重试
|
//如果是实时定位,并且超多时间限制,不在重试
|
||||||
BusLogInfoYearEntity logInfoYearServiceById = busLogInfoYearService.getById(messageDto.getLogInfoId());
|
if (logInfoYearServiceById == null) {
|
||||||
if(logInfoYearServiceById == null){
|
|
||||||
log.info("MqCheckResultConsumeListener->{}平台结果查询,数据id:{}第{}次重试,查找不到消息内容,不在进行重试,消息类型:{},消息内容:{}", platform, messageDto.getIndexReq(), messageDto.getNumber(), desc, JSONUtil.toJsonStr(messageDto));
|
log.info("MqCheckResultConsumeListener->{}平台结果查询,数据id:{}第{}次重试,查找不到消息内容,不在进行重试,消息类型:{},消息内容:{}", platform, messageDto.getIndexReq(), messageDto.getNumber(), desc, JSONUtil.toJsonStr(messageDto));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
long time = logInfoYearServiceById.getRequestTime().getTime();
|
if (currentTime - time > 1000 * 60 * 60) {
|
||||||
long currentTime = System.currentTimeMillis();
|
|
||||||
if(currentTime - time > 1000 * 60 * 60){
|
|
||||||
//如果超过2小时分钟,不在重试
|
//如果超过2小时分钟,不在重试
|
||||||
log.info("MqCheckResultConsumeListener->{}平台结果查询,数据id:{},请求时间{},第{}次重试时间超多一个小时,不在进行重试,消息类型:{},消息内容:{}",
|
log.info("MqCheckResultConsumeListener->{}平台结果查询,数据id:{},请求时间{},第{}次重试时间超多一个小时,不在进行重试,消息类型:{},消息内容:{}",
|
||||||
platform, messageDto.getIndexReq(),logInfoYearServiceById.getRequestTime(), messageDto.getNumber(), desc, JSONUtil.toJsonStr(messageDto));
|
platform, messageDto.getIndexReq(), logInfoYearServiceById.getRequestTime(), messageDto.getNumber(), desc, JSONUtil.toJsonStr(messageDto));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (currentTime - time > 1000 * 60 * 60 * 2) {
|
||||||
|
//如果超过2小时分钟,不在重试
|
||||||
|
log.info("MqCheckResultConsumeListener->{}平台结果查询,数据id:{},业务类型:{},请求时间{},第{}次重试时间超多两个小时,不在进行重试,消息类型:{},消息内容:{}",
|
||||||
|
platform, messageDto.getIndexReq(), messageDto.getBusinessType(),logInfoYearServiceById.getRequestTime(), messageDto.getNumber(), desc, JSONUtil.toJsonStr(messageDto));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue