1.数据同步修改为读取同步配置

2.修改往来单位信息同步修改更新时间
3.数据同步功能查询仓库信息方法修改
master
x_z 3 years ago
parent bf7ea7ec64
commit 6968e7cea9

@ -4,24 +4,25 @@ import lombok.Data;
@Data
public class SyncDataSetEntity {
private Integer id;
private boolean typeBus;
private boolean typeScan;
private boolean typeThird;
private boolean basicProducts;
private boolean basicCorp;
private boolean basicInv;
private boolean basicThirdProducts;
private boolean basicThirdCorp;
private boolean basicThirdInv;
private boolean basicThirdBusOrder;
private boolean orderScanFinish;
private boolean dbDiProducts;
private boolean downstreamEnable;
private Integer syncTime; //定时上传时间
private Integer syncDownloadTime; //定时下载时间
private boolean typeBus; //业务单据类型
private boolean typeScan; //扫码单据类型
private boolean typeThird; //第三方单据类型
private boolean basicProducts; //耗材字典
private boolean basicCorp; //往来单位字典
private boolean basicInv; //仓库字典
private boolean basicThirdProducts; //第三方产品信息
private boolean basicThirdCorp; //第三方往来信息
private boolean basicThirdInv; //第三方仓库信息
private boolean basicThirdBusOrder; //第三方业务单据
private boolean orderScanFinish; //已完成单据
private boolean dbDiProducts; //DI产品信息
private boolean downstreamEnable; //下游是否联通
private Integer syncTime; //数据上传间隔时间
private Integer syncDownloadTime; //数据下载间隔时间
private boolean orderUnReceive;
private boolean orderUnCheck;
private String busTypes;
private boolean orderUnReceive; //未验收单据
private boolean orderUnCheck; //待校验单据
private String busTypes; //单据类型
}

@ -4,13 +4,12 @@ import com.github.pagehelper.PageHelper;
import com.glxp.api.admin.dao.basic.BasicUnitMaintainDao;
import com.glxp.api.admin.entity.basic.BasicUnitMaintainEntity;
import com.glxp.api.admin.req.basic.BasicUnitMaintainFilterRequest;
import com.glxp.api.admin.req.basic.BasicUnitMaintainSaveRequest;
import com.glxp.api.admin.req.basic.FilterUdiInfoRequest;
import com.glxp.api.admin.service.basic.BasicUnitMaintainService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.Date;
import java.util.List;
@Service
@ -50,7 +49,7 @@ public class BasicUnitMaintainServiceImpl implements BasicUnitMaintainService {
@Override
public boolean updateById(BasicUnitMaintainEntity basicUnitMaintainSaveRequest) {
basicUnitMaintainSaveRequest.setUpdateTime(new Date());
return basicUnitMaintainDao.updateById(basicUnitMaintainSaveRequest);
}

@ -1,27 +1,12 @@
package com.glxp.api.admin.thread;
import cn.hutool.core.collection.CollUtil;
import com.glxp.api.admin.constant.BasicProcessStatus;
import com.glxp.api.admin.constant.RedisContant;
import com.glxp.api.admin.dao.info.SyncDataSetDao;
import com.glxp.api.admin.dao.schedule.ScheduledDao;
import com.glxp.api.admin.entity.basic.BasicExportStatusEntity;
import com.glxp.api.admin.entity.basic.BasicExportStatusTimeEntity;
import com.glxp.api.admin.entity.info.ScheduledEntity;
import com.glxp.api.admin.entity.info.SystemParamConfigEntity;
import com.glxp.api.admin.req.basic.BasicExportStatusRequest;
import com.glxp.api.admin.entity.info.SyncDataSetEntity;
import com.glxp.api.admin.req.info.ScheduledRequest;
import com.glxp.api.admin.res.basic.SpsSyncBusResponse;
import com.glxp.api.admin.res.basic.SpsSyncDataResponse;
import com.glxp.api.admin.res.basic.SpsSyncOrderResponse;
import com.glxp.api.admin.res.basic.SpsSyncScheduleResponse;
import com.glxp.api.admin.service.basic.BasicExportService;
import com.glxp.api.admin.service.basic.BasicExportTimeService;
import com.glxp.api.admin.service.info.SystemParamConfigService;
import com.glxp.api.admin.util.CustomUtil;
import com.glxp.api.admin.util.DateUtil;
import com.glxp.api.admin.util.RedisUtil;
import com.glxp.api.admin.util.SpGetHttp;
import com.glxp.api.common.res.BaseResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.EnableScheduling;
@ -31,8 +16,6 @@ import org.springframework.scheduling.support.CronTrigger;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@Component
@ -50,6 +33,8 @@ public class HeartTask implements SchedulingConfigurer {
DlUploadService dlUploadService;
@Resource
HeartService heartService;
@Resource
private SyncDataSetDao syncDataSetDao;
@Override
public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) {
@ -69,14 +54,11 @@ public class HeartTask implements SchedulingConfigurer {
private void process() {
SystemParamConfigEntity upConnect = systemParamConfigService.selectByParamKey("sync_upstream_enable");
if (upConnect.getParamValue().equals("1")) {
//查询数据同步设置
SyncDataSetEntity syncDataSetEntity = syncDataSetDao.selectSet();
if (syncDataSetEntity.isDownstreamEnable()) {
//定时上传最近更新数据至上游轮询时间
SystemParamConfigEntity systemParamConfigEntity1 = systemParamConfigService.selectByParamKey("sps_sync_upload_data");
long timeInterval1 = Long.parseLong(systemParamConfigEntity1.getParamValue()) * 60 * 1000;
long timeInterval1 = syncDataSetEntity.getSyncTime() * 60 * 1000;
long curTime1 = System.currentTimeMillis();
Long lastTime1 = (Long) redisUtil.get("SPS_SYNC_UPLOAD_DATA");
if (lastTime1 == null) {
@ -93,8 +75,7 @@ public class HeartTask implements SchedulingConfigurer {
//定时下载上游最近更新数据轮询时间
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("sps_sync_donwload_data");
long timeInterval = Long.parseLong(systemParamConfigEntity.getParamValue()) * 60 * 1000;
long timeInterval = syncDataSetEntity.getSyncDownloadTime() * 60 * 1000;
long curTime = System.currentTimeMillis();
Long lastTime = (Long) redisUtil.get("SPS_SYNC_DOWNLOAD_DATA");
if (lastTime == null) {
@ -106,6 +87,7 @@ public class HeartTask implements SchedulingConfigurer {
redisUtil.set("SPS_SYNC_DOWNLOAD_DATA", curTime);
}
}
}

@ -9,7 +9,10 @@ import com.glxp.api.admin.entity.inout.OrderEntity;
import com.glxp.api.admin.entity.inout.WarehouseEntity;
import com.glxp.api.admin.entity.inventory.InvWarehouseEntity;
import com.glxp.api.admin.entity.thrsys.*;
import com.glxp.api.admin.req.basic.*;
import com.glxp.api.admin.req.basic.BasicUnitMaintainFilterRequest;
import com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest;
import com.glxp.api.admin.req.basic.BussinessOriginTypeFilterRequest;
import com.glxp.api.admin.req.basic.FilterUdiInfoRequest;
import com.glxp.api.admin.req.inout.OrderFilterRequest;
import com.glxp.api.admin.req.inventory.FilterInvWarehouseRequest;
import com.glxp.api.admin.req.receipt.BussinessTypeFilterRequest;
@ -24,7 +27,6 @@ import com.glxp.api.admin.service.inout.OrderDetailService;
import com.glxp.api.admin.service.inout.OrderService;
import com.glxp.api.admin.service.inventory.InvWarehouseService;
import com.glxp.api.admin.service.thrsys.*;
import com.glxp.api.common.util.ResultVOUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@ -73,7 +75,7 @@ public class UpBasicService {
//仓库字典
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
filterInvWarehouseRequest.setLastUpdateTime(basicExportStatusTimeEntity.getLastUpdateTime());
List<InvWarehouseEntity> invWarehouseEntities = invWarehouseService.filterGroupInvWarehouse(filterInvWarehouseRequest);
List<InvWarehouseEntity> invWarehouseEntities = invWarehouseService.filterInvWarehouse(filterInvWarehouseRequest);
//耗材字典
FilterUdiInfoRequest filterUdiInfoRequest = new FilterUdiInfoRequest();

Loading…
Cancel
Save