|
|
|
@ -4,21 +4,25 @@ import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
|
import com.glxp.api.annotation.AuthRuleAnnotation;
|
|
|
|
|
import com.glxp.api.common.enums.ResultEnum;
|
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.dao.system.SyncDataSetDao;
|
|
|
|
|
import com.glxp.api.entity.sync.BasicDownloadStatusEntity;
|
|
|
|
|
import com.glxp.api.entity.sync.BasicExportStatusEntity;
|
|
|
|
|
import com.glxp.api.entity.sync.BasicExportStatusTimeEntity;
|
|
|
|
|
import com.glxp.api.entity.system.SyncDataSetEntity;
|
|
|
|
|
import com.glxp.api.http.sync.SpGetHttpClient;
|
|
|
|
|
import com.glxp.api.req.sync.BasicExportStatusRequest;
|
|
|
|
|
import com.glxp.api.req.sync.BasicExportTimeRequest;
|
|
|
|
|
import com.glxp.api.req.sync.ManualUploadDataReq;
|
|
|
|
|
import com.glxp.api.req.system.DeleteRequest;
|
|
|
|
|
import com.glxp.api.res.PageSimpleResponse;
|
|
|
|
|
import com.glxp.api.service.sync.BasicDownloadService;
|
|
|
|
|
import com.glxp.api.service.sync.BasicExportService;
|
|
|
|
|
import com.glxp.api.service.sync.BasicExportTimeService;
|
|
|
|
|
import com.glxp.api.res.system.SyncDataSetResponse;
|
|
|
|
|
import com.glxp.api.service.sync.*;
|
|
|
|
|
import com.glxp.api.util.BeanCopyUtils;
|
|
|
|
|
import com.glxp.api.util.RedisUtil;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
@ -39,6 +43,7 @@ import java.util.List;
|
|
|
|
|
|
|
|
|
|
@Slf4j
|
|
|
|
|
@RestController
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
|
public class SpsSyncExportStatusController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -185,4 +190,31 @@ public class SpsSyncExportStatusController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final SyncDataSetDao syncDataSetDao;
|
|
|
|
|
private final HeartService heartService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 手动上传数据
|
|
|
|
|
*
|
|
|
|
|
* @param req 参数
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|
@PostMapping("/spssync/udiinfo/uploadData")
|
|
|
|
|
public BaseResponse uploadData(@RequestBody ManualUploadDataReq req) {
|
|
|
|
|
|
|
|
|
|
if (req.getExportType() == null || req.getSyncTime() == null) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
|
|
|
|
}
|
|
|
|
|
SyncDataSetEntity syncDataSetEntity = syncDataSetDao.selectSet();
|
|
|
|
|
|
|
|
|
|
if (syncDataSetEntity.getSyncTime() == null) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.NOT_NETWORK.getCode(), "缺少初始化数据");
|
|
|
|
|
}
|
|
|
|
|
heartService.pushData(syncDataSetEntity, req.getSyncTime(), req.getExportType());
|
|
|
|
|
|
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|