新增同步设置相关修改
parent
5cd6586c97
commit
af692363bd
@ -0,0 +1,84 @@
|
||||
package com.glxp.api.controller.sync;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.glxp.api.annotation.AuthRuleAnnotation;
|
||||
import com.glxp.api.common.res.BaseResponse;
|
||||
import com.glxp.api.common.util.ResultVOUtils;
|
||||
import com.glxp.api.entity.sync.BasicDownloadStatusEntity;
|
||||
import com.glxp.api.req.sync.BasicDownloadRequest;
|
||||
import com.glxp.api.req.sync.SpsSyncDataRequest;
|
||||
import com.glxp.api.req.system.DeleteRequest;
|
||||
import com.glxp.api.res.PageSimpleResponse;
|
||||
import com.glxp.api.service.sync.BasicDownloadService;
|
||||
import com.glxp.api.util.RedisUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class SpsSyncDownloadStatusController {
|
||||
|
||||
@Resource
|
||||
BasicDownloadService basicDownloadService;
|
||||
@Resource
|
||||
RedisUtil redisUtil;
|
||||
|
||||
|
||||
@GetMapping("sps/sync/connect/test")
|
||||
public BaseResponse connectTest(SpsSyncDataRequest spsSyncDataRequest) {
|
||||
return ResultVOUtils.success("连接成功");
|
||||
}
|
||||
|
||||
@AuthRuleAnnotation("")
|
||||
@GetMapping("/spssync/download/basic/udiinfo/getStatus")
|
||||
public BaseResponse getStatus(BasicDownloadRequest basicDownloadRequest) {
|
||||
List<BasicDownloadStatusEntity> basicDownloadStatusEntities = basicDownloadService.filterDownloadStatus(basicDownloadRequest);
|
||||
return ResultVOUtils.success(basicDownloadStatusEntities);
|
||||
}
|
||||
|
||||
@AuthRuleAnnotation("")
|
||||
@GetMapping("/spssync/download/basic/udiinfo/filter")
|
||||
public BaseResponse filterStatus(BasicDownloadRequest basicDownloadRequest) {
|
||||
List<BasicDownloadStatusEntity> basicDownloadStatusEntities = basicDownloadService.filterDownloadStatus(basicDownloadRequest);
|
||||
PageInfo<BasicDownloadStatusEntity> pageInfo;
|
||||
pageInfo = new PageInfo<>(basicDownloadStatusEntities);
|
||||
PageSimpleResponse<BasicDownloadStatusEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
||||
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||
pageSimpleResponse.setList(basicDownloadStatusEntities);
|
||||
return ResultVOUtils.success(pageSimpleResponse);
|
||||
}
|
||||
|
||||
@AuthRuleAnnotation("")
|
||||
@PostMapping("/spssync/download/basic/udiinfo/deleteByStatus")
|
||||
public BaseResponse deleteByStatus(@RequestBody DeleteRequest deleteRequest) {
|
||||
|
||||
boolean b = basicDownloadService.deleteById(deleteRequest.getId());
|
||||
redisUtil.del(deleteRequest.getId());
|
||||
if (b)
|
||||
return ResultVOUtils.success("删除成功!");
|
||||
else
|
||||
return ResultVOUtils.error(500, "删除失败!");
|
||||
}
|
||||
|
||||
@AuthRuleAnnotation("")
|
||||
@PostMapping("/spssync/download/basic/udiinfo/updateStatus")
|
||||
public BaseResponse updateStatus(@RequestBody BasicDownloadStatusEntity basicDownloadStatusEntity) {
|
||||
|
||||
basicDownloadStatusEntity.setEndTime(new Date());
|
||||
basicDownloadStatusEntity.setUpdateTime(new Date());
|
||||
boolean b = basicDownloadService.updateDownloadStatus(basicDownloadStatusEntity);
|
||||
if (b)
|
||||
return ResultVOUtils.success("更新成功!");
|
||||
else
|
||||
return ResultVOUtils.error(500, "更新成功!");
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.glxp.api.controller.sync;
|
||||
|
||||
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.res.BaseResponse;
|
||||
import com.glxp.api.common.util.ResultVOUtils;
|
||||
import com.glxp.api.entity.sync.BasicExportStatusEntity;
|
||||
import com.glxp.api.entity.sync.BasicExportStatusTimeEntity;
|
||||
import com.glxp.api.req.sync.BasicExportStatusRequest;
|
||||
import com.glxp.api.req.sync.BasicExportTimeRequest;
|
||||
import com.glxp.api.req.system.DeleteRequest;
|
||||
import com.glxp.api.res.PageSimpleResponse;
|
||||
import com.glxp.api.service.sync.BasicExportService;
|
||||
import com.glxp.api.service.sync.BasicExportTimeService;
|
||||
import com.glxp.api.util.RedisUtil;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
public class SpsSyncExportStatusController {
|
||||
|
||||
|
||||
@Resource
|
||||
BasicExportService basicExportService;
|
||||
@Resource
|
||||
BasicExportTimeService basicExportTimeService;
|
||||
@Resource
|
||||
RedisUtil redisUtil;
|
||||
|
||||
@GetMapping("/spssync/basic/udiinfo/getStatus")
|
||||
public BaseResponse getStatus(BasicExportStatusRequest basicExportStatusRequest) {
|
||||
List<BasicExportStatusEntity> basicExportStatusEntities = basicExportService.filterExportStatus(basicExportStatusRequest);
|
||||
return ResultVOUtils.success(basicExportStatusEntities);
|
||||
}
|
||||
|
||||
@GetMapping("/spssync/basic/udiinfo/filter")
|
||||
public BaseResponse filterStatus(BasicExportStatusRequest basicExportStatusRequest) {
|
||||
List<BasicExportStatusEntity> basicExportStatusEntities = basicExportService.filterExportStatus(basicExportStatusRequest);
|
||||
PageInfo<BasicExportStatusEntity> pageInfo;
|
||||
pageInfo = new PageInfo<>(basicExportStatusEntities);
|
||||
PageSimpleResponse<BasicExportStatusEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
||||
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||
pageSimpleResponse.setList(basicExportStatusEntities);
|
||||
return ResultVOUtils.success(pageSimpleResponse);
|
||||
}
|
||||
|
||||
@AuthRuleAnnotation("")
|
||||
@PostMapping("/spssync/basic/udiinfo/deleteByStatus")
|
||||
public BaseResponse deleteByStatus(@RequestBody DeleteRequest deleteRequest) {
|
||||
|
||||
boolean b = basicExportService.deleteById(deleteRequest.getId());
|
||||
redisUtil.del(deleteRequest.getId());
|
||||
if (b)
|
||||
return ResultVOUtils.success("删除成功!");
|
||||
else
|
||||
return ResultVOUtils.error(500, "删除失败!");
|
||||
}
|
||||
|
||||
@AuthRuleAnnotation("")
|
||||
@PostMapping("/spssync/basic/udiinfo/updateStatus")
|
||||
public BaseResponse updateStatus(@RequestBody BasicExportStatusEntity basicExportStatusEntity) {
|
||||
if (StrUtil.isEmpty(basicExportStatusEntity.getReceiveStatus())) {
|
||||
basicExportStatusEntity.setEndTime(new Date());
|
||||
}
|
||||
basicExportStatusEntity.setUpdateTime(new Date());
|
||||
boolean b = basicExportService.updateExportStatus(basicExportStatusEntity);
|
||||
if (b)
|
||||
return ResultVOUtils.success("更新成功!");
|
||||
else
|
||||
return ResultVOUtils.error(500, "更新成功!");
|
||||
}
|
||||
|
||||
@AuthRuleAnnotation("")
|
||||
@GetMapping("/spssync/basic/schedule/lastTime")
|
||||
public BaseResponse getLastUpdateTime(BasicExportTimeRequest basicExportTimeRequest) {
|
||||
List<BasicExportStatusTimeEntity> basicExportStatusEntities = basicExportTimeService.filterExportStatus(basicExportTimeRequest);
|
||||
if (CollUtil.isNotEmpty(basicExportStatusEntities)) {
|
||||
return ResultVOUtils.success(basicExportStatusEntities.get(0).getLastUpdateTime());
|
||||
} else {
|
||||
return ResultVOUtils.success("1949-01-01 00:00:00");
|
||||
}
|
||||
}
|
||||
|
||||
@AuthRuleAnnotation("")
|
||||
@PostMapping("/spssync/basic/schedule/updateLastTime")
|
||||
public BaseResponse updateLastTime(@RequestBody BasicExportStatusTimeEntity basicExportStatusTimeEntity) {
|
||||
|
||||
boolean b = basicExportTimeService.insertExportStatus(basicExportStatusTimeEntity);
|
||||
if (b)
|
||||
return ResultVOUtils.success("更新成功!");
|
||||
else
|
||||
return ResultVOUtils.error(500, "更新失败!");
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.glxp.api.dao.sync;
|
||||
|
||||
import com.glxp.api.entity.sync.BasicDownloadStatusEntity;
|
||||
import com.glxp.api.req.sync.BasicDownloadRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BasicDownloadDao {
|
||||
|
||||
|
||||
List<BasicDownloadStatusEntity> filterDownloadStatus(BasicDownloadRequest basicDownloadRequest);
|
||||
|
||||
boolean insertDownloadStatus(BasicDownloadStatusEntity basicDownloadStatusEntity);
|
||||
|
||||
boolean deleteById(@Param("id") String id);
|
||||
|
||||
boolean deleteByTime();
|
||||
|
||||
boolean updateDownloadStatus(BasicDownloadStatusEntity basicDownloadStatusEntity);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.glxp.api.dao.sync;
|
||||
|
||||
import com.glxp.api.entity.sync.BasicExportStatusEntity;
|
||||
import com.glxp.api.req.sync.BasicExportStatusRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BasicExportDao {
|
||||
|
||||
|
||||
List<BasicExportStatusEntity> filterExportStatus(BasicExportStatusRequest basicExportStatusRequest);
|
||||
|
||||
boolean insertExportStatus(BasicExportStatusEntity ioOrderStatusEntity);
|
||||
|
||||
boolean deleteById(@Param("id") String id);
|
||||
|
||||
boolean deleteByTime();
|
||||
|
||||
boolean updateExportStatus(BasicExportStatusEntity warehouseEntity);
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.glxp.api.dao.sync;
|
||||
|
||||
import com.glxp.api.entity.sync.BasicExportStatusTimeEntity;
|
||||
import com.glxp.api.req.sync.BasicExportTimeRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BasicExportTimeDao {
|
||||
|
||||
|
||||
List<BasicExportStatusTimeEntity> filterExportStatus(BasicExportTimeRequest basicExportStatusRequest);
|
||||
|
||||
boolean insertExportStatus(BasicExportStatusTimeEntity basicExportStatusTimeEntity);
|
||||
|
||||
boolean deleteById(String id);
|
||||
|
||||
boolean updateExportStatus(BasicExportStatusTimeEntity basicExportStatusTimeEntity);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package com.glxp.api.dao.system;
|
||||
package com.glxp.api.dao.sync;
|
||||
|
||||
import com.glxp.api.entity.system.SyncDataSetEntity;
|
||||
import com.glxp.api.entity.sync.SyncDataSetEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
@ -0,0 +1,27 @@
|
||||
package com.glxp.api.entity.sync;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class BasicDownloadStatusEntity {
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 任务ID
|
||||
*/
|
||||
private String taskId;
|
||||
private String idDatas;
|
||||
private Integer status;
|
||||
private Integer type;
|
||||
private Date updateTime;
|
||||
private Integer scheduleType;
|
||||
private Date startTime;
|
||||
private Date endTime;
|
||||
private String remark;
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.glxp.api.entity.sync;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class BasicExportStatusEntity {
|
||||
private String id;
|
||||
private String idDatas;
|
||||
private Integer status;
|
||||
private Integer type;
|
||||
private Date updateTime;
|
||||
private Integer scheduleType;
|
||||
private Date startTime;
|
||||
private Date endTime;
|
||||
private String remark;
|
||||
private String receiveStatus;
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.glxp.api.entity.sync;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BasicExportStatusTimeEntity {
|
||||
|
||||
private Integer id;
|
||||
private String lastUpdateTime;
|
||||
private String key;
|
||||
private String remark;
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.glxp.api.entity.system;
|
||||
package com.glxp.api.entity.sync;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -0,0 +1,45 @@
|
||||
package com.glxp.api.entity.sync;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@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 dbDiProducts;
|
||||
private boolean downstreamEnable;
|
||||
private boolean orderScanFinish;
|
||||
private boolean orderUnReceive;
|
||||
private boolean orderUnCheck;
|
||||
private String busTypes;
|
||||
private boolean sysUser;
|
||||
|
||||
private Integer syncTime;
|
||||
|
||||
private Integer orderSyncTime;
|
||||
private String orderSyncStart;
|
||||
private String basicSyncStart;
|
||||
private boolean entrustAction;
|
||||
|
||||
|
||||
private boolean unCheckCert;
|
||||
private boolean checkedCert;
|
||||
private boolean companyCert;
|
||||
private boolean manufacturerCert;
|
||||
private boolean productCert;
|
||||
|
||||
private String syncIp;
|
||||
|
||||
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
package com.glxp.api.entity.system;
|
||||
|
||||
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; //DI产品信息
|
||||
private boolean downstreamEnable; //上游是否联通
|
||||
private Integer syncTime; //数据上传间隔时间
|
||||
private Integer syncDownloadTime; //数据下载间隔时间
|
||||
|
||||
private boolean orderUnReceive; //未验收单据
|
||||
private boolean orderUnCheck; //待校验单据
|
||||
private String busTypes; //单据类型
|
||||
private String syncIp;
|
||||
private boolean sysUser;
|
||||
private boolean entrustAction;
|
||||
|
||||
|
||||
private Integer orderSyncTime;
|
||||
private Integer orderSyncDlTime;
|
||||
|
||||
private boolean unCheckCert;
|
||||
private boolean checkedCert;
|
||||
private boolean companyCert;
|
||||
private boolean manufacturerCert;
|
||||
private boolean productCert;
|
||||
|
||||
|
||||
private String orderSyncStart;
|
||||
private String basicSyncStart;
|
||||
}
|
@ -1,103 +0,0 @@
|
||||
package com.glxp.api.http;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.glxp.api.common.res.BaseResponse;
|
||||
import com.glxp.api.common.util.ResultVOUtils;
|
||||
import com.glxp.api.entity.system.SyncDataSetEntity;
|
||||
import com.glxp.api.req.inout.PostOrderRequest;
|
||||
import com.glxp.api.service.system.SyncDataSetService;
|
||||
import com.glxp.api.util.OkHttpCli;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class SpsDirectClient {
|
||||
@Resource
|
||||
private OkHttpCli okHttpCli;
|
||||
@Resource
|
||||
SyncDataSetService syncDataSetService;
|
||||
|
||||
public String getIpUrl() {
|
||||
SyncDataSetEntity syncDataSetEntity = syncDataSetService.findSet();
|
||||
return syncDataSetEntity.getSyncIp();
|
||||
}
|
||||
|
||||
//单据验收 todo
|
||||
// public BaseResponse reviewOrder(OrderFilterRequest orderFilterRequest) {
|
||||
// String json = JSONUtil.toJsonStr(orderFilterRequest);
|
||||
// String result = okHttpCli.doPostJson(getIpUrl() + "/sps/review/download/order/finsih", json);
|
||||
// BaseResponse<String> response =
|
||||
// JSONObject.parseObject(result, new TypeReference<BaseResponse<String>>() {
|
||||
// });
|
||||
// return response;
|
||||
//
|
||||
// }
|
||||
|
||||
//获取未验收的单据
|
||||
public BaseResponse downloadOrder(String orderId, String wmsUserId, String action) {
|
||||
Map<String, String> paramMap = new HashMap<>(16);
|
||||
paramMap.put("wmsUserId", wmsUserId);
|
||||
paramMap.put("orderId", orderId);
|
||||
paramMap.put("action", action);
|
||||
String response = okHttpCli.doGet(getIpUrl() + "/sps/review/download/order", paramMap);
|
||||
try {
|
||||
BaseResponse data = JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
|
||||
});
|
||||
return data;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return ResultVOUtils.error(500, "连接失败!");
|
||||
}
|
||||
}
|
||||
|
||||
//获取未验收的单据详情
|
||||
public BaseResponse downloadOrderDetail(String orderId, String wmsUserId) {
|
||||
Map<String, String> paramMap = new HashMap<>(16);
|
||||
paramMap.put("wmsUserId", wmsUserId);
|
||||
paramMap.put("orderId", orderId);
|
||||
String response = okHttpCli.doGet(getIpUrl() + "/sps/review/download/orderDetail", paramMap);
|
||||
try {
|
||||
BaseResponse data = JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
|
||||
});
|
||||
return data;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return ResultVOUtils.error(500, "连接失败!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//获取未验收的单据条码
|
||||
public BaseResponse downloadCodes(String wmsUserId, String orderId) {
|
||||
Map<String, String> paramMap = new HashMap<>(16);
|
||||
paramMap.put("wmsUserId", wmsUserId);
|
||||
paramMap.put("orderId", orderId);
|
||||
String response = okHttpCli.doGet(getIpUrl() + "/sps/review/download/codes", paramMap);
|
||||
try {
|
||||
BaseResponse data = JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
|
||||
});
|
||||
return data;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return ResultVOUtils.error(500, "连接失败!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//单据上传
|
||||
public BaseResponse uploadPdaOrder(PostOrderRequest postOrderRequest) {
|
||||
String json = JSONUtil.toJsonStr(postOrderRequest);
|
||||
String result = okHttpCli.doPostJson(getIpUrl() + "/sps/pda/upload/orders", json);
|
||||
BaseResponse<String> response =
|
||||
JSONObject.parseObject(result, new TypeReference<BaseResponse<String>>() {
|
||||
});
|
||||
return response;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.glxp.api.req.sync;
|
||||
|
||||
import com.glxp.api.util.page.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BasicDownloadRequest extends ListPageRequest {
|
||||
private String id;
|
||||
private String taskId; //任务ID
|
||||
private Integer status;
|
||||
private Integer type;
|
||||
private String idDatas;
|
||||
private Integer scheduleType;
|
||||
public Integer createType;
|
||||
private String syncTime;
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.glxp.api.req.sync;
|
||||
|
||||
import com.glxp.api.util.page.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BasicExportStatusRequest extends ListPageRequest {
|
||||
private String id;
|
||||
private Integer status;
|
||||
private Integer type;
|
||||
private Integer scheduleType;
|
||||
private String idDatas;
|
||||
public Integer createType;
|
||||
private String syncTime;
|
||||
private String receiveStatus;
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.glxp.api.req.sync;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BasicExportTimeRequest {
|
||||
|
||||
private Integer id;
|
||||
private String key;
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.glxp.api.req.sync;
|
||||
|
||||
import com.glxp.api.util.page.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SpsSyncDataRequest extends ListPageRequest {
|
||||
|
||||
private String lastUpdateTime;
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.glxp.api.service.sync;
|
||||
|
||||
|
||||
import com.glxp.api.entity.sync.BasicDownloadStatusEntity;
|
||||
import com.glxp.api.req.sync.BasicDownloadRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BasicDownloadService {
|
||||
|
||||
BasicDownloadStatusEntity findByData(String idDatas, Integer status);
|
||||
|
||||
List<BasicDownloadStatusEntity> filterDownloadStatus(BasicDownloadRequest basicDownloadRequest);
|
||||
|
||||
boolean insertDownloadStatus(BasicDownloadStatusEntity basicDownloadStatusEntity);
|
||||
|
||||
boolean deleteById(String id);
|
||||
|
||||
boolean deleteByTime();
|
||||
|
||||
boolean updateDownloadStatus(BasicDownloadStatusEntity basicDownloadStatusEntity);
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.glxp.api.service.sync;
|
||||
|
||||
|
||||
import com.glxp.api.entity.sync.BasicExportStatusEntity;
|
||||
import com.glxp.api.req.sync.BasicExportStatusRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BasicExportService {
|
||||
|
||||
|
||||
BasicExportStatusEntity findByData(String idDatas, Integer status);
|
||||
|
||||
List<BasicExportStatusEntity> filterExportStatus(BasicExportStatusRequest basicExportStatusRequest);
|
||||
|
||||
boolean insertExportStatus(BasicExportStatusEntity ioOrderStatusEntity);
|
||||
|
||||
boolean deleteById(String id);
|
||||
|
||||
boolean deleteByTime();
|
||||
|
||||
boolean updateExportStatus(BasicExportStatusEntity warehouseEntity);
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.glxp.api.service.sync;
|
||||
|
||||
|
||||
import com.glxp.api.entity.sync.BasicExportStatusTimeEntity;
|
||||
import com.glxp.api.req.sync.BasicExportTimeRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BasicExportTimeService {
|
||||
|
||||
|
||||
BasicExportStatusTimeEntity findByType(String type);
|
||||
|
||||
List<BasicExportStatusTimeEntity> filterExportStatus(BasicExportTimeRequest basicExportStatusRequest);
|
||||
|
||||
boolean insertExportStatus(BasicExportStatusTimeEntity basicExportStatusTimeEntity);
|
||||
|
||||
boolean deleteById(String id);
|
||||
|
||||
boolean updateExportStatus(BasicExportStatusTimeEntity basicExportStatusTimeEntity);
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package com.glxp.api.service.system;
|
||||
package com.glxp.api.service.sync;
|
||||
|
||||
import com.glxp.api.entity.system.SyncDataBustypeEntity;
|
||||
import com.glxp.api.entity.sync.SyncDataBustypeEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.glxp.api.service.system;
|
||||
package com.glxp.api.service.sync;
|
||||
|
||||
|
||||
import com.glxp.api.entity.system.SyncDataSetEntity;
|
||||
import com.glxp.api.entity.sync.SyncDataSetEntity;
|
||||
import com.glxp.api.res.system.SyncDataSetResponse;
|
||||
|
||||
public interface SyncDataSetService {
|
@ -0,0 +1,66 @@
|
||||
package com.glxp.api.service.sync.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.dao.sync.BasicDownloadDao;
|
||||
import com.glxp.api.entity.sync.BasicDownloadStatusEntity;
|
||||
import com.glxp.api.req.sync.BasicDownloadRequest;
|
||||
import com.glxp.api.service.sync.BasicDownloadService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class BasicDownloadServiceImpl implements BasicDownloadService {
|
||||
|
||||
@Resource
|
||||
BasicDownloadDao basicDownloadDao;
|
||||
|
||||
@Override
|
||||
public BasicDownloadStatusEntity findByData(String idDatas, Integer status) {
|
||||
BasicDownloadRequest basicDownloadRequest = new BasicDownloadRequest();
|
||||
basicDownloadRequest.setStatus(status);
|
||||
basicDownloadRequest.setIdDatas(idDatas);
|
||||
List<BasicDownloadStatusEntity> basicDownloadStatusEntities = basicDownloadDao.filterDownloadStatus(basicDownloadRequest);
|
||||
if (CollUtil.isNotEmpty(basicDownloadStatusEntities)) {
|
||||
return basicDownloadStatusEntities.get(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BasicDownloadStatusEntity> filterDownloadStatus(BasicDownloadRequest basicDownloadRequest) {
|
||||
if (basicDownloadRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (basicDownloadRequest.getPage() != null) {
|
||||
int offset = (basicDownloadRequest.getPage() - 1) * basicDownloadRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, basicDownloadRequest.getLimit());
|
||||
}
|
||||
return basicDownloadDao.filterDownloadStatus(basicDownloadRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertDownloadStatus(BasicDownloadStatusEntity basicDownloadStatusEntity) {
|
||||
return basicDownloadDao.insertDownloadStatus(basicDownloadStatusEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(String id) {
|
||||
return basicDownloadDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteByTime() {
|
||||
return basicDownloadDao.deleteByTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateDownloadStatus(BasicDownloadStatusEntity basicDownloadStatusEntity) {
|
||||
return basicDownloadDao.updateDownloadStatus(basicDownloadStatusEntity);
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package com.glxp.api.service.sync.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.dao.sync.BasicExportDao;
|
||||
import com.glxp.api.entity.sync.BasicExportStatusEntity;
|
||||
import com.glxp.api.req.sync.BasicExportStatusRequest;
|
||||
import com.glxp.api.service.sync.BasicExportService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class BasicExportServiceImpl implements BasicExportService {
|
||||
|
||||
@Resource
|
||||
BasicExportDao basicExportDao;
|
||||
|
||||
@Override
|
||||
public BasicExportStatusEntity findByData(String idDatas, Integer status) {
|
||||
BasicExportStatusRequest basicExportStatusRequest = new BasicExportStatusRequest();
|
||||
basicExportStatusRequest.setStatus(status);
|
||||
basicExportStatusRequest.setIdDatas(idDatas);
|
||||
List<BasicExportStatusEntity> basicExportStatusEntities = basicExportDao.filterExportStatus(basicExportStatusRequest);
|
||||
if (CollUtil.isNotEmpty(basicExportStatusEntities)) {
|
||||
return basicExportStatusEntities.get(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BasicExportStatusEntity> filterExportStatus(BasicExportStatusRequest basicExportStatusRequest) {
|
||||
if (basicExportStatusRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (basicExportStatusRequest.getPage() != null) {
|
||||
int offset = (basicExportStatusRequest.getPage() - 1) * basicExportStatusRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, basicExportStatusRequest.getLimit());
|
||||
}
|
||||
return basicExportDao.filterExportStatus(basicExportStatusRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertExportStatus(BasicExportStatusEntity basicExportStatusEntity) {
|
||||
return basicExportDao.insertExportStatus(basicExportStatusEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(String id) {
|
||||
return basicExportDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteByTime() {
|
||||
return basicExportDao.deleteByTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateExportStatus(BasicExportStatusEntity basicExportStatusEntity) {
|
||||
return basicExportDao.updateExportStatus(basicExportStatusEntity);
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.glxp.api.service.sync.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.glxp.api.dao.sync.BasicExportTimeDao;
|
||||
import com.glxp.api.entity.sync.BasicExportStatusTimeEntity;
|
||||
import com.glxp.api.req.sync.BasicExportTimeRequest;
|
||||
import com.glxp.api.service.sync.BasicExportTimeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BasicExportTimeServiceImpl implements BasicExportTimeService {
|
||||
|
||||
@Resource
|
||||
BasicExportTimeDao basicExportTimeDao;
|
||||
|
||||
@Override
|
||||
public BasicExportStatusTimeEntity findByType(String type) {
|
||||
BasicExportTimeRequest basicExportTimeRequest = new BasicExportTimeRequest();
|
||||
basicExportTimeRequest.setKey(type);
|
||||
List<BasicExportStatusTimeEntity> basicExportStatusTimeEntities = basicExportTimeDao.filterExportStatus(basicExportTimeRequest);
|
||||
if (CollUtil.isNotEmpty(basicExportStatusTimeEntities)) {
|
||||
return basicExportStatusTimeEntities.get(0);
|
||||
}
|
||||
|
||||
BasicExportStatusTimeEntity basicExportStatusTimeEntity = new BasicExportStatusTimeEntity();
|
||||
basicExportStatusTimeEntity.setKey(type);
|
||||
basicExportStatusTimeEntity.setLastUpdateTime("1949-01-01 00:00:00");
|
||||
return basicExportStatusTimeEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BasicExportStatusTimeEntity> filterExportStatus(BasicExportTimeRequest basicExportStatusRequest) {
|
||||
if (basicExportStatusRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return basicExportTimeDao.filterExportStatus(basicExportStatusRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertExportStatus(BasicExportStatusTimeEntity basicExportStatusTimeEntity) {
|
||||
return basicExportTimeDao.insertExportStatus(basicExportStatusTimeEntity);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(String id) {
|
||||
return basicExportTimeDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateExportStatus(BasicExportStatusTimeEntity basicExportStatusTimeEntity) {
|
||||
return basicExportTimeDao.updateExportStatus(basicExportStatusTimeEntity);
|
||||
|
||||
}
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
package com.glxp.api.service.system.impl;
|
||||
package com.glxp.api.service.sync.impl;
|
||||
|
||||
import com.glxp.api.dao.system.SyncDataBustypeDao;
|
||||
import com.glxp.api.entity.system.SyncDataBustypeEntity;
|
||||
import com.glxp.api.service.system.SyncDataBustypeService;
|
||||
import com.glxp.api.entity.sync.SyncDataBustypeEntity;
|
||||
import com.glxp.api.service.sync.SyncDataBustypeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
@ -1,11 +1,11 @@
|
||||
package com.glxp.api.service.system.impl;
|
||||
package com.glxp.api.service.sync.impl;
|
||||
|
||||
import com.glxp.api.dao.system.SyncDataSetDao;
|
||||
import com.glxp.api.entity.system.SyncDataBustypeEntity;
|
||||
import com.glxp.api.entity.system.SyncDataSetEntity;
|
||||
import com.glxp.api.dao.sync.SyncDataSetDao;
|
||||
import com.glxp.api.entity.sync.SyncDataBustypeEntity;
|
||||
import com.glxp.api.entity.sync.SyncDataSetEntity;
|
||||
import com.glxp.api.res.system.SyncDataSetResponse;
|
||||
import com.glxp.api.service.system.SyncDataBustypeService;
|
||||
import com.glxp.api.service.system.SyncDataSetService;
|
||||
import com.glxp.api.service.sync.SyncDataBustypeService;
|
||||
import com.glxp.api.service.sync.SyncDataSetService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -0,0 +1,89 @@
|
||||
<?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.glxp.api.dao.sync.BasicDownloadDao">
|
||||
<select id="filterDownloadStatus" parameterType="com.glxp.api.req.sync.BasicDownloadRequest"
|
||||
resultType="com.glxp.api.entity.sync.BasicDownloadStatusEntity">
|
||||
select *
|
||||
from basic_download_status
|
||||
<where>
|
||||
<if test="id != '' and id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="taskId != null and taskId != ''">
|
||||
AND taskId LIKE concat('%', #{taskId}, '%')
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and `type` = #{type}
|
||||
</if>
|
||||
<if test="idDatas != '' and idDatas != null">
|
||||
and idDatas = #{idDatas}
|
||||
</if>
|
||||
<if test="scheduleType != null">
|
||||
and scheduleType = #{scheduleType}
|
||||
</if>
|
||||
</where>
|
||||
order by updateTime desc
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertDownloadStatus" keyProperty="id"
|
||||
parameterType="com.glxp.api.entity.sync.BasicDownloadStatusEntity">
|
||||
replace
|
||||
INTO basic_download_status(id, taskId, idDatas, status, type, updateTime, scheduleType, startTime,
|
||||
endTime, remark)
|
||||
values (#{id},
|
||||
#{taskId},
|
||||
#{idDatas},
|
||||
#{status},
|
||||
#{type},
|
||||
#{updateTime},
|
||||
#{scheduleType},
|
||||
#{startTime},
|
||||
#{endTime}, #{remark})
|
||||
</insert>
|
||||
|
||||
<update id="updateDownloadStatus" parameterType="com.glxp.api.entity.sync.BasicDownloadStatusEntity">
|
||||
UPDATE basic_download_status
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="idDatas != null">
|
||||
idDatas=#{idDatas},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status=#{status},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type=#{type},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
updateTime=#{updateTime},
|
||||
</if>
|
||||
<if test="scheduleType != null">
|
||||
scheduleType=#{scheduleType},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
startTime=#{startTime},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
endTime=#{endTime},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark=#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<delete id="deleteById" parameterType="Map">
|
||||
DELETE
|
||||
FROM basic_download_status
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
<delete id="deleteByTime">
|
||||
Delete
|
||||
From basic_download_status
|
||||
where date(startTime) <= date(DATE_SUB(NOW(), INTERVAL 30 day))
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,97 @@
|
||||
<?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.glxp.api.dao.sync.BasicExportDao">
|
||||
<select id="filterExportStatus" parameterType="com.glxp.api.req.sync.BasicExportStatusRequest"
|
||||
resultType="com.glxp.api.entity.sync.BasicExportStatusEntity">
|
||||
select *
|
||||
from basic_export_status
|
||||
<where>
|
||||
<if test="id != '' and id != null">
|
||||
and id like concat('%', #{id}, '%')
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type = #{type}
|
||||
</if>
|
||||
<if test="idDatas != '' and idDatas != null">
|
||||
and idDatas = #{idDatas}
|
||||
</if>
|
||||
<if test="scheduleType != null">
|
||||
and scheduleType = #{scheduleType}
|
||||
</if>
|
||||
<if test="syncTime != null">
|
||||
and #{syncTime} BETWEEN startTime and endTime
|
||||
</if>
|
||||
|
||||
<if test="receiveStatus != null">
|
||||
and receiveStatus = #{receiveStatus}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY updateTime DESC
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertExportStatus" keyProperty="id"
|
||||
parameterType="com.glxp.api.entity.sync.BasicExportStatusEntity">
|
||||
replace
|
||||
INTO basic_export_status(id, idDatas, status, `type`, updateTime, scheduleType, startTime, endTime,
|
||||
remark, receiveStatus)
|
||||
values (#{id},
|
||||
#{idDatas},
|
||||
#{status},
|
||||
#{type},
|
||||
#{updateTime},
|
||||
#{scheduleType},
|
||||
#{startTime},
|
||||
#{endTime},
|
||||
#{remark},
|
||||
#{receiveStatus})
|
||||
</insert>
|
||||
|
||||
<update id="updateExportStatus" parameterType="com.glxp.api.entity.sync.BasicExportStatusEntity">
|
||||
UPDATE basic_export_status
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="idDatas != null">
|
||||
idDatas=#{idDatas},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status=#{status},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type`=#{type},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
updateTime=#{updateTime},
|
||||
</if>
|
||||
<if test="scheduleType != null">
|
||||
scheduleType=#{scheduleType},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
startTime=#{startTime},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
endTime=#{endTime},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark=#{remark},
|
||||
</if>
|
||||
<if test="receiveStatus != null">
|
||||
receiveStatus=#{receiveStatus},
|
||||
</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<delete id="deleteById" parameterType="Map">
|
||||
DELETE
|
||||
FROM basic_export_status
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
<delete id="deleteByTime">
|
||||
Delete
|
||||
From basic_export_status
|
||||
where date(startTime) <= date(DATE_SUB(NOW(), INTERVAL 30 day))
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,47 @@
|
||||
<?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.glxp.api.dao.sync.BasicExportTimeDao">
|
||||
<select id="filterExportStatus" parameterType="com.glxp.api.req.sync.BasicExportTimeRequest"
|
||||
resultType="com.glxp.api.entity.sync.BasicExportStatusTimeEntity">
|
||||
select *
|
||||
from basic_export_status_time
|
||||
<where>
|
||||
<if test="id != '' and id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="key != '' and key != null">
|
||||
and `key` = #{key}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertExportStatus" keyProperty="id"
|
||||
parameterType="com.glxp.api.entity.sync.BasicExportStatusTimeEntity">
|
||||
replace
|
||||
INTO basic_export_status_time(`key`, lastUpdateTime, remark)
|
||||
values (#{key},
|
||||
#{lastUpdateTime},
|
||||
#{remark})
|
||||
</insert>
|
||||
|
||||
<update id="updateExportStatus" parameterType="com.glxp.api.entity.sync.BasicExportStatusTimeEntity">
|
||||
UPDATE basic_export_status_time
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="lastUpdateTime != null">
|
||||
lastUpdateTime=#{lastUpdateTime},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark=#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
WHERE `key` = #{key}
|
||||
</update>
|
||||
|
||||
<delete id="deleteById" parameterType="Map">
|
||||
DELETE
|
||||
FROM basic_export_status_time
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,48 @@
|
||||
<?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.glxp.api.dao.sync.SyncDataSetDao">
|
||||
<select id="selectSet"
|
||||
resultType="com.glxp.api.entity.sync.SyncDataSetEntity">
|
||||
SELECT *
|
||||
FROM sync_data_set
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insert" parameterType="com.glxp.api.entity.sync.SyncDataSetEntity">
|
||||
replace
|
||||
INTO sync_data_set(id, typeBus, typeScan,
|
||||
typeThird, basicProducts, basicCorp, basicInv, basicThirdProducts, basicThirdCorp,
|
||||
basicThirdInv
|
||||
, basicThirdBusOrder, orderScanFinish, dbDiProducts, downstreamEnable, syncTime,
|
||||
orderUnReceive, orderUnCheck, busTypes, sysUser, orderSyncTime, orderSyncStart,
|
||||
basicSyncStart, entrustAction
|
||||
, unCheckCert, checkedCert, companyCert, manufacturerCert, productCert)
|
||||
values (#{id},
|
||||
#{typeBus},
|
||||
#{typeScan},
|
||||
#{typeThird},
|
||||
#{basicProducts},
|
||||
#{basicCorp},
|
||||
#{basicInv},
|
||||
#{basicThirdProducts},
|
||||
#{basicThirdCorp},
|
||||
#{basicThirdInv},
|
||||
#{basicThirdBusOrder},
|
||||
#{orderScanFinish},
|
||||
#{dbDiProducts},
|
||||
#{downstreamEnable},
|
||||
#{syncTime},
|
||||
#{orderUnReceive},
|
||||
#{orderUnCheck},
|
||||
#{busTypes},
|
||||
#{sysUser},
|
||||
#{orderSyncTime},
|
||||
#{orderSyncStart},
|
||||
#{basicSyncStart},
|
||||
#{entrustAction},
|
||||
#{unCheckCert},
|
||||
#{checkedCert}, #{companyCert}, #{manufacturerCert}, #{productCert})
|
||||
</insert>
|
||||
</mapper>
|
@ -1,53 +0,0 @@
|
||||
<?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.glxp.api.dao.system.SyncDataSetDao">
|
||||
|
||||
|
||||
<select id="selectSet"
|
||||
resultType="com.glxp.api.entity.system.SyncDataSetEntity">
|
||||
SELECT *
|
||||
FROM sync_data_set limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insert" parameterType="com.glxp.api.entity.system.SyncDataSetEntity">
|
||||
replace
|
||||
INTO sync_data_set(id,typeBus, typeScan,
|
||||
typeThird, basicProducts, basicCorp, basicInv, basicThirdProducts, basicThirdCorp, basicThirdInv
|
||||
, basicThirdBusOrder, orderScanFinish, dbDiProducts,downstreamEnable,syncTime,syncDownloadTime,
|
||||
orderUnReceive,orderUnCheck,busTypes,sysUser,syncIp,orderSyncTime,orderSyncStart,basicSyncStart,entrustAction
|
||||
,unCheckCert,checkedCert,companyCert,manufacturerCert,productCert)
|
||||
values (
|
||||
#{id},
|
||||
#{typeBus},
|
||||
#{typeScan},
|
||||
#{typeThird},
|
||||
#{basicProducts},
|
||||
#{basicCorp},
|
||||
#{basicInv},
|
||||
#{basicThirdProducts},
|
||||
#{basicThirdCorp},
|
||||
#{basicThirdInv},
|
||||
#{basicThirdBusOrder},
|
||||
#{orderScanFinish},
|
||||
#{dbDiProducts},
|
||||
#{downstreamEnable},
|
||||
#{syncTime},
|
||||
#{syncDownloadTime},
|
||||
#{orderUnReceive},
|
||||
#{orderUnCheck},
|
||||
#{busTypes},
|
||||
#{sysUser},
|
||||
#{syncIp},
|
||||
#{orderSyncTime},
|
||||
#{orderSyncStart},
|
||||
#{basicSyncStart},
|
||||
#{entrustAction},
|
||||
#{unCheckCert},
|
||||
#{checkedCert}, #{companyCert}, #{manufacturerCert}, #{productCert}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue