1.修改数据同步日志记录

version1
x_z 3 years ago
parent 3946dde748
commit 101638aac3

@ -46,4 +46,7 @@ public class BasicProcessStatus {
public static final int SCHEDULE_TRANSFER = 2; //需要传递任务
public static final int INTERFACE_TYPE = 1; //接口方式
public static final int FILE_TYPE = 2; //文件方式
}

@ -0,0 +1,10 @@
package com.glxp.sale.admin.constant;
public class ConstantStatus {
public static final String SYNC_BASIC_DATA = "AutoDownloadAllData";
public static final String SYNC_BUS_TYPE = "AutoDownloadBusType";
public static final String SYNC_SCAN_ORDER = "AutoDownloadOrder";
public static final String SYNC_DI_PRODUCTS = "AutoDownloadDiProducts";
}

@ -0,0 +1,104 @@
package com.glxp.sale.admin.controller.sync;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.entity.sync.BasicUploadStatusEntity;
import com.glxp.sale.admin.entity.sync.BasicExportStatusEntity;
import com.glxp.sale.admin.req.sync.BasicUploadRequest;
import com.glxp.sale.admin.req.sync.BasicExportStatusRequest;
import com.glxp.sale.admin.res.PageSimpleResponse;
import com.glxp.sale.admin.service.sync.BasicUploadService;
import com.glxp.sale.admin.service.sync.BasicExportService;
import com.glxp.sale.common.enums.ResultEnum;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
*
*/
@Slf4j
@RestController
public class BasicDataSyncStatusController {
@Resource
private BasicUploadService basicUploadService;
@Resource
private BasicExportService basicExportService;
//--------------------------------------------------下载任务接口-----------------------------------------------------------------
/**
*
*
* @param basicExportStatusRequest
* @return
*/
@GetMapping("/spssync/basic/download/status/filter")
public BaseResponse filterDownloadStatus(BasicExportStatusRequest basicExportStatusRequest) {
List<BasicExportStatusEntity> basicExportStatusEntities = basicExportService.filterExportStatus(basicExportStatusRequest);
PageInfo<BasicExportStatusEntity> pageInfo = new PageInfo<>(basicExportStatusEntities);
PageSimpleResponse<BasicExportStatusEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(basicExportStatusEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
/**
*
*
* @param id
* @return
*/
@GetMapping("/spssync/basic/download/status/delete")
public BaseResponse deleteDownloadStatus(String id) {
if (StrUtil.isBlank(id)) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
if (basicExportService.deleteById(id)) {
return ResultVOUtils.success();
}
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
//---------------------------------------------------上传任务接口----------------------------------------------------------------
/**
*
*
* @param basicDownloadRequest
* @return
*/
@GetMapping("/spssync/basic/upload/status/filter")
public BaseResponse filterUploadStatus(BasicUploadRequest basicDownloadRequest) {
List<BasicUploadStatusEntity> basicDownloadStatusEntities = basicUploadService.filterDownloadStatus(basicDownloadRequest);
PageInfo<BasicUploadStatusEntity> pageInfo = new PageInfo<>(basicDownloadStatusEntities);
PageSimpleResponse<BasicUploadStatusEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setList(basicDownloadStatusEntities);
pageSimpleResponse.setTotal(pageInfo.getTotal());
return ResultVOUtils.success(pageSimpleResponse);
}
/**
*
*
* @param id
* @return
*/
@GetMapping("/spssync/basic/upload/status/delete")
public BaseResponse deleteUploadStatus(String id) {
if (StrUtil.isBlank(id)) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
if (basicUploadService.deleteById(id)) {
return ResultVOUtils.success();
}
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
}

@ -1,30 +1,23 @@
package com.glxp.sale.admin.controller.sync;
import cn.hutool.core.collection.CollUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.glxp.sale.admin.annotation.AuthRuleAnnotation;
import com.glxp.sale.admin.constant.BasicProcessStatus;
import com.glxp.sale.admin.entity.sync.BasicExportStatusEntity;
import com.glxp.sale.admin.req.info.DeleteRequest;
import com.glxp.sale.admin.req.sync.BasicExportStatusRequest;
import com.glxp.sale.admin.req.sync.FilterUdiInfoRequest;
import com.glxp.sale.admin.res.sync.*;
import com.glxp.sale.admin.service.sync.BasicExportService;
import com.glxp.sale.admin.util.RedisUtil;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
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.List;
@RestController
public class BasicDowmloadController {
public class BasicDownloadController {
@Resource
@ -32,20 +25,6 @@ public class BasicDowmloadController {
@Resource
RedisUtil redisUtil;
@GetMapping("/spssync/basic/udiinfo/getStatus")
public BaseResponse getStatus(BasicExportStatusRequest basicExportStatusRequest) {
List<BasicExportStatusEntity> basicExportStatusEntities = basicExportService.filterExportStatus(basicExportStatusRequest);
if (CollUtil.isNotEmpty(basicExportStatusEntities)) {
for (BasicExportStatusEntity basicExportStatusEntity : basicExportStatusEntities) {
basicExportStatusEntity.setFromType(1);
}
}
return ResultVOUtils.success(basicExportStatusEntities);
}
@PostMapping("/spssync/basic/udiinfo/downloadByStatus")
public BaseResponse downloadByStatus(@RequestBody BasicExportStatusRequest basicExportStatusRequest) {
@ -53,30 +32,37 @@ public class BasicDowmloadController {
String data = (String) redisUtil.get(basicExportStatusRequest.getId() + "");
UdiRelevanceExportJsonResponse udiRelevanceExportJsonResponse = JSONObject.parseObject(data, new TypeReference<UdiRelevanceExportJsonResponse>() {
});
basicExportService.finished(basicExportStatusRequest.getId());
return ResultVOUtils.success(udiRelevanceExportJsonResponse);
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.BASIC_CORP) {//基础信息下载
String data = (String) redisUtil.get(basicExportStatusRequest.getId() + "");
BasicUnitMaintainExportResponse basicUnitMaintainExportResponse = JSONObject.parseObject(data, new TypeReference<BasicUnitMaintainExportResponse>() {
});
basicExportService.finished(basicExportStatusRequest.getId());
return ResultVOUtils.success(basicUnitMaintainExportResponse);
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.BASIC_INV) {//基础信息下载
String data = (String) redisUtil.get(basicExportStatusRequest.getId() + "");
InvWarehouseExportResponse invWarehouseExportResponse = JSONObject.parseObject(data, new TypeReference<InvWarehouseExportResponse>() {
});
basicExportService.finished(basicExportStatusRequest.getId());
return ResultVOUtils.success(invWarehouseExportResponse);
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_DATA) {//基础信息下载
SpsSyncDataResponse spsSyncDataResponse = (SpsSyncDataResponse) redisUtil.get(basicExportStatusRequest.getId() + "");
basicExportService.finished(basicExportStatusRequest.getId());
return ResultVOUtils.success(spsSyncDataResponse);
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_BUS) {//单据类型
SpsSyncBusResponse spsSyncDataResponse = (SpsSyncBusResponse) redisUtil.get(basicExportStatusRequest.getId() + "");
basicExportService.finished(basicExportStatusRequest.getId());
return ResultVOUtils.success(spsSyncDataResponse);
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_ORDER) {//单据
SpsSyncOrderResponse spsSyncDataResponse = (SpsSyncOrderResponse) redisUtil.get(basicExportStatusRequest.getId() + "");
basicExportService.finished(basicExportStatusRequest.getId());
return ResultVOUtils.success(spsSyncDataResponse);
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_UDIS) {//单据
String data = (String) redisUtil.get(basicExportStatusRequest.getId() + "");
SpSyncUdiResponse spSyncUdiResponse = JSONObject.parseObject(data, new TypeReference<SpSyncUdiResponse>() {
});
basicExportService.finished(basicExportStatusRequest.getId());
return ResultVOUtils.success(spSyncUdiResponse);
}
return ResultVOUtils.error(500, "数据不存在!");
@ -84,18 +70,6 @@ public class BasicDowmloadController {
}
@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, "删除失败!");
}
@PostMapping("/spssync/basic/udiinfo/updateStatus")
public BaseResponse updateStatus(@RequestBody BasicExportStatusEntity basicExportStatusEntity) {

@ -1,13 +1,16 @@
package com.glxp.sale.admin.controller.sync;
import com.alibaba.fastjson.JSON;
import com.glxp.sale.admin.constant.BasicProcessStatus;
import com.glxp.sale.admin.constant.ConstantStatus;
import com.glxp.sale.admin.constant.FileConstant;
import com.glxp.sale.admin.entity.param.SystemParamConfigEntity;
import com.glxp.sale.admin.entity.sync.BasicExportStatusEntity;
import com.glxp.sale.admin.entity.sync.BasicUploadStatusEntity;
import com.glxp.sale.admin.http.SpPostHttp;
import com.glxp.sale.admin.req.sync.SpsSyncDataRequest;
import com.glxp.sale.admin.res.sync.*;
import com.glxp.sale.admin.service.param.SystemParamConfigService;
import com.glxp.sale.admin.service.sync.BasicUploadService;
import com.glxp.sale.admin.util.CustomUtil;
import com.glxp.sale.admin.util.DateUtil;
import com.glxp.sale.admin.util.FileUtils;
@ -34,6 +37,9 @@ public class SpsSyncDataController {
SystemParamConfigService systemParamConfigService;
@Resource
SpPostHttp spPostHttp;
@Resource
private BasicUploadService basicUploadService;
private static final Logger logger = LoggerFactory.getLogger(SpsSyncDataController.class);
public String getPath() {
@ -83,16 +89,41 @@ public class SpsSyncDataController {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("sync_upstream_enable");
BasicUploadStatusEntity basicUploadStatusEntity = new BasicUploadStatusEntity();
basicUploadStatusEntity.setId(CustomUtil.getId());
basicUploadStatusEntity.setTaskId(syncDataResponse.getTaskId());
basicUploadStatusEntity.setStartTime(DateUtil.getDateTime());
basicUploadStatusEntity.setIdDatas(ConstantStatus.SYNC_BASIC_DATA);
basicUploadStatusEntity.setType(BasicProcessStatus.NEW_ALL_DATA);
basicUploadStatusEntity.setRemark(syncDataResponse.toString());
if (systemParamConfigEntity.getParamValue().equals("0")) {//上游不通
String path = getPath();
String fileName = path + FileConstant.lowerWaitCopy_products + "BaseData_" + DateUtil.formatDate(new Date(), "yyyyMMddHHmmss") + ".UpperIn";
String datas = JSON.toJSONString(syncDataResponse);
FileUtils.SaveFileAs(datas, fileName);
basicUploadStatusEntity.setTransportType(BasicProcessStatus.FILE_TYPE);
basicUploadStatusEntity.setUpdateTime(new Date());
basicUploadStatusEntity.setEndTime(DateUtil.getDateTime());
basicUploadStatusEntity.setStatus(1);
basicUploadService.insertDownloadStatus(basicUploadStatusEntity);
return ResultVOUtils.success("文件上传成功,已保存,等待拷贝!");
} else {
//上游通
return spPostHttp.postAllDatas(syncDataResponse);
BaseResponse<String> response = spPostHttp.postAllDatas(syncDataResponse);
basicUploadStatusEntity.setTransportType(BasicProcessStatus.INTERFACE_TYPE);
basicUploadStatusEntity.setEndTime(DateUtil.getDateTime());
basicUploadStatusEntity.setUpdateTime(new Date());
if (response.getCode() == 20000) {
basicUploadStatusEntity.setStatus(1);
} else {
basicUploadStatusEntity.setStatus(0);
}
basicUploadService.insertDownloadStatus(basicUploadStatusEntity);
return response;
}
}
@ -104,15 +135,40 @@ public class SpsSyncDataController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("sync_upstream_enable");
BasicUploadStatusEntity basicUploadStatusEntity = new BasicUploadStatusEntity();
basicUploadStatusEntity.setId(CustomUtil.getId());
basicUploadStatusEntity.setTaskId(spsSyncOrderResponse.getTaskId());
basicUploadStatusEntity.setStartTime(DateUtil.getDateTime());
basicUploadStatusEntity.setIdDatas(ConstantStatus.SYNC_SCAN_ORDER);
basicUploadStatusEntity.setType(BasicProcessStatus.NEW_ALL_ORDER);
basicUploadStatusEntity.setRemark(spsSyncOrderResponse.toString());
if (systemParamConfigEntity.getParamValue().equals("0")) {//上游不通
String path = getPath();
String fileName = path + FileConstant.lowerWaitCopy_products + "order_" + DateUtil.formatDate(new Date(), "yyyyMMddHHmmss") + ".UpperIn";
String datas = JSON.toJSONString(spsSyncOrderResponse);
FileUtils.SaveFileAs(datas, fileName);
basicUploadStatusEntity.setUpdateTime(new Date());
basicUploadStatusEntity.setEndTime(DateUtil.getDateTime());
basicUploadStatusEntity.setTransportType(BasicProcessStatus.FILE_TYPE);
basicUploadStatusEntity.setStatus(1);
return ResultVOUtils.success("文件上传成功,已保存,等待拷贝!");
} else {
//上游通
return spPostHttp.postAllOrders(spsSyncOrderResponse);
BaseResponse<String> response = spPostHttp.postAllOrders(spsSyncOrderResponse);
basicUploadStatusEntity.setUpdateTime(new Date());
basicUploadStatusEntity.setEndTime(DateUtil.getDateTime());
basicUploadStatusEntity.setTransportType(BasicProcessStatus.INTERFACE_TYPE);
if (response.getCode() == 20000) {
basicUploadStatusEntity.setStatus(1);
} else {
basicUploadStatusEntity.setStatus(0);
}
basicUploadService.insertDownloadStatus(basicUploadStatusEntity);
return response;
}
}
@ -125,33 +181,81 @@ public class SpsSyncDataController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("sync_upstream_enable");
BasicUploadStatusEntity basicUploadStatusEntity = new BasicUploadStatusEntity();
basicUploadStatusEntity.setId(CustomUtil.getId());
basicUploadStatusEntity.setTaskId(spsSyncBusResponse.getTaskId());
basicUploadStatusEntity.setStartTime(DateUtil.getDateTime());
basicUploadStatusEntity.setIdDatas(ConstantStatus.SYNC_BUS_TYPE);
basicUploadStatusEntity.setType(BasicProcessStatus.NEW_ALL_BUS);
basicUploadStatusEntity.setRemark(spsSyncBusResponse.toString());
if (systemParamConfigEntity.getParamValue().equals("0")) {//上游不通
String path = getPath();
String fileName = path + FileConstant.lowerWaitCopy_products + "BusType_" + DateUtil.formatDate(new Date(), "yyyyMMddHHmmss") + ".UpperIn";
String datas = JSON.toJSONString(spsSyncBusResponse);
FileUtils.SaveFileAs(datas, fileName);
basicUploadStatusEntity.setUpdateTime(new Date());
basicUploadStatusEntity.setEndTime(DateUtil.getDateTime());
basicUploadStatusEntity.setTransportType(BasicProcessStatus.FILE_TYPE);
basicUploadStatusEntity.setStatus(1);
basicUploadService.insertDownloadStatus(basicUploadStatusEntity);
return ResultVOUtils.success("文件上传成功,已保存,等待拷贝!");
} else {
//上游通
return spPostHttp.postAllBus(spsSyncBusResponse);
BaseResponse<String> response = spPostHttp.postAllBus(spsSyncBusResponse);
basicUploadStatusEntity.setUpdateTime(new Date());
basicUploadStatusEntity.setEndTime(DateUtil.getDateTime());
basicUploadStatusEntity.setTransportType(BasicProcessStatus.INTERFACE_TYPE);
if (response.getCode() == 20000) {
basicUploadStatusEntity.setStatus(0);
} else {
basicUploadStatusEntity.setStatus(1);
}
basicUploadService.insertDownloadStatus(basicUploadStatusEntity);
return response;
}
}
@PostMapping("sps/sync/schedule/upload")
public BaseResponse postSchedule(@RequestBody SpsSyncScheduleResponse spsSyncScheduleResponse) {
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("sync_upstream_enable");
BasicUploadStatusEntity basicUploadStatusEntity = new BasicUploadStatusEntity();
basicUploadStatusEntity.setId(CustomUtil.getId());
basicUploadStatusEntity.setStartTime(DateUtil.getDateTime());
basicUploadStatusEntity.setRemark(spsSyncScheduleResponse.toString());
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("sync_upstream_enable");
if (systemParamConfigEntity.getParamValue().equals("0")) {//上游不通
String path = getPath();
String fileName = path + FileConstant.lowerWaitCopy_products + "ScheduleList_" + DateUtil.formatDate(new Date(), "yyyyMMddHHmmss") + ".UpperIn";
String datas = JSON.toJSONString(spsSyncScheduleResponse);
FileUtils.SaveFileAs(datas, fileName);
basicUploadStatusEntity.setUpdateTime(new Date());
basicUploadStatusEntity.setEndTime(DateUtil.getDateTime());
basicUploadStatusEntity.setStatus(1);
basicUploadStatusEntity.setTransportType(BasicProcessStatus.FILE_TYPE);
basicUploadService.insertDownloadStatus(basicUploadStatusEntity);
return ResultVOUtils.success("文件上传成功,已保存,等待拷贝!");
} else {
//上游通
return spPostHttp.postAllSchedule(spsSyncScheduleResponse);
BaseResponse<String> response = spPostHttp.postAllSchedule(spsSyncScheduleResponse);
basicUploadStatusEntity.setUpdateTime(new Date());
basicUploadStatusEntity.setEndTime(DateUtil.getDateTime());
basicUploadStatusEntity.setTransportType(BasicProcessStatus.INTERFACE_TYPE);
if (response.getCode() == 20000) {
basicUploadStatusEntity.setStatus(1);
} else {
basicUploadStatusEntity.setStatus(0);
}
basicUploadService.insertDownloadStatus(basicUploadStatusEntity);
return response;
}
}

@ -19,4 +19,5 @@ public interface BasicExportDao {
boolean updateExportStatus(BasicExportStatusEntity warehouseEntity);
BasicExportStatusEntity selectById(@Param("id") String id);
}

@ -0,0 +1,21 @@
package com.glxp.sale.admin.dao.sync;
import com.glxp.sale.admin.entity.sync.BasicUploadStatusEntity;
import com.glxp.sale.admin.req.sync.BasicUploadRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface BasicUploadDao {
List<BasicUploadStatusEntity> filterUploadStatus(BasicUploadRequest basicDownloadRequest);
boolean insertUploadStatus(BasicUploadStatusEntity basicDownloadStatusEntity);
boolean deleteById(@Param("id") String id);
boolean updateUploadStatus(BasicUploadStatusEntity basicDownloadStatusEntity);
}

@ -7,10 +7,20 @@ import java.util.Date;
@Data
public class BasicExportStatusEntity {
private String id;
private String taskId;
private String idDatas;
private Integer status;
private Integer type;
/**
* 1. 2.
*/
private Integer transportType;
private Date updateTime;
private Integer scheduleType;
private int fromType;
private String startTime;
private String endTime;
private String remark;
private String superiorService; //上游服务
private String subordinateService; //下游服务
}

@ -0,0 +1,28 @@
package com.glxp.sale.admin.entity.sync;
import lombok.Data;
import java.util.Date;
/**
*
*/
@Data
public class BasicUploadStatusEntity {
private String id;
private String taskId;
private String idDatas;
private Integer status;
private Integer type;
/**
* 1. 2.
*/
private Integer transportType;
private Date updateTime;
private Integer scheduleType;
private String startTime;
private String endTime;
private String remark;
private String superiorService; //上游服务
private String subordinateService; //下游服务
}

@ -0,0 +1,16 @@
package com.glxp.sale.admin.req.sync;
import com.glxp.sale.admin.req.ListPageRequest;
import lombok.Data;
@Data
public class BasicUploadRequest 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;
}

@ -1,5 +1,6 @@
package com.glxp.sale.admin.res.sync;
import cn.hutool.core.collection.CollUtil;
import com.glxp.sale.admin.entity.sync.*;
import lombok.Data;
@ -10,9 +11,30 @@ public class SpsSyncBusResponse {
//同步任务ID
private String taskId;
private List<BussinessTypeEntity> bussinessTypeEntities;
private List<BussinessOriginTypeEntity> bussinessOriginTypeEntities;
private List<BussinessLocalTypeEntity> bussinessLocalTypeEntities;
private List<BussinessChangeTypeEntity> bussinessChangeTypeEntities;
private List<EntrustReceEntity> entrustReceEntities;
private List<BussinessTypeEntity> bussinessTypeEntities; //扫码单据类型
private List<BussinessOriginTypeEntity> bussinessOriginTypeEntities; //第三方单据类型
private List<BussinessLocalTypeEntity> bussinessLocalTypeEntities; //业务单据类型
private List<BussinessChangeTypeEntity> bussinessChangeTypeEntities; //缺量补单单据类型
private List<EntrustReceEntity> entrustReceEntities; //委托验收单据类型
@Override
public String toString() {
StringBuffer remark = new StringBuffer();
if (CollUtil.isNotEmpty(bussinessTypeEntities)) {
remark.append("扫码单据类型:").append(bussinessTypeEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(bussinessLocalTypeEntities)) {
remark.append("业务单据类型:").append(bussinessTypeEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(bussinessOriginTypeEntities)) {
remark.append("第三方单据类型:").append(bussinessOriginTypeEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(bussinessChangeTypeEntities)) {
remark.append("缺量补单单据类型:").append(bussinessChangeTypeEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(entrustReceEntities)) {
remark.append("委托验收单据类型:").append(entrustReceEntities.size()).append(" 条\n");
}
return remark.toString();
}
}

@ -1,5 +1,6 @@
package com.glxp.sale.admin.res.sync;
import cn.hutool.core.collection.CollUtil;
import com.glxp.sale.admin.entity.auth.AuthAdmin;
import com.glxp.sale.admin.entity.info.CompanyProductRelevanceEntity;
import com.glxp.sale.admin.entity.info.WarehouseBussinessTypeEntity;
@ -29,4 +30,49 @@ public class SpsSyncDataResponse {
List<WarehouseBussinessTypeEntity> warehouseBussinessTypeEntities;
List<WarehouseUserEntity> warehouseUserEntities;
List<AuthAdmin> authAdminList;
@Override
public String toString() {
StringBuffer remark = new StringBuffer();
if (CollUtil.isNotEmpty(invWarehouseEntities)) {
remark.append("仓库信息:").append(invWarehouseEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(warehouseBussinessTypeEntities)) {
remark.append("仓库用户信息:").append(warehouseBussinessTypeEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(warehouseBussinessTypeEntities)) {
remark.append("仓库单据类型:").append(warehouseBussinessTypeEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(udiInfoEntities)) {
remark.append("产品信息:").append(udiInfoEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(basicUnitMaintainEntities)) {
remark.append("往来单位:").append(basicUnitMaintainEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(thrInvWarehouseEntities)) {
remark.append("第三方仓库信息:").append(thrInvWarehouseEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(thrCorpEntities)) {
remark.append("第三方往来单位:").append(thrCorpEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(thrProductsEntities)) {
remark.append("第三方产品信息:").append(thrProductsEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(thrOrderEntities)) {
remark.append("第三方单据:").append(thrOrderEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(thrOrderDetailEntities)) {
remark.append("第三方单据详情:").append(thrOrderDetailEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(companyProductRelevanceEntities)) {
remark.append("公司产品信息:").append(companyProductRelevanceEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(udiRelevanceEntities)) {
remark.append("耗材字典:").append(udiRelevanceEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(authAdminList)) {
remark.append("用户信息:").append(authAdminList.size()).append(" 条\n");
}
return remark.toString();
}
}

@ -1,5 +1,6 @@
package com.glxp.sale.admin.res.sync;
import cn.hutool.core.collection.CollUtil;
import com.glxp.sale.admin.entity.sync.ErpOrderEntity;
import com.glxp.sale.admin.entity.sync.OrderEntity;
import com.glxp.sale.admin.entity.sync.WarehouseEntity;
@ -15,4 +16,19 @@ public class SpsSyncOrderResponse {
List<OrderEntity> orderEntities;
List<ErpOrderEntity> orderDetailEntityList;
List<WarehouseEntity> warehouseEntityList;
@Override
public String toString() {
StringBuffer remark = new StringBuffer();
if (CollUtil.isNotEmpty(orderEntities)) {
remark.append("单据:").append(orderEntities.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(orderDetailEntityList)) {
remark.append("单据详情:").append(orderDetailEntityList.size()).append(" 条\n");
}
if (CollUtil.isNotEmpty(warehouseEntityList)) {
remark.append("库存信息:").append(warehouseEntityList.size()).append(" 条\n");
}
return remark.toString();
}
}

@ -1,5 +1,6 @@
package com.glxp.sale.admin.res.sync;
import cn.hutool.core.collection.CollUtil;
import com.glxp.sale.admin.entity.sync.BasicExportStatusEntity;
import lombok.Data;
@ -9,4 +10,12 @@ import java.util.List;
public class SpsSyncScheduleResponse {
List<BasicExportStatusEntity> basicExportStatusEntities;
@Override
public String toString() {
StringBuffer remark = new StringBuffer();
if (CollUtil.isNotEmpty(basicExportStatusEntities)) {
remark.append("任务:").append(basicExportStatusEntities.size()).append(" 条\n");
}
return remark.toString();
}
}

@ -1,7 +1,6 @@
package com.glxp.sale.admin.service.sync;
import com.glxp.sale.admin.entity.sync.BasicExportStatusEntity;
import com.glxp.sale.admin.req.sync.BasicExportStatusRequest;
@ -14,7 +13,15 @@ public interface BasicExportService {
boolean insertExportStatus(BasicExportStatusEntity ioOrderStatusEntity);
boolean deleteById(String id);
boolean deleteById(String id);
boolean updateExportStatus(BasicExportStatusEntity warehouseEntity);
/**
*
*
* @param id
* @return
*/
boolean finished(String id);
}

@ -0,0 +1,20 @@
package com.glxp.sale.admin.service.sync;
import com.glxp.sale.admin.entity.sync.BasicUploadStatusEntity;
import com.glxp.sale.admin.req.sync.BasicUploadRequest;
import java.util.List;
public interface BasicUploadService {
BasicUploadStatusEntity findByData(String idDatas, Integer status);
List<BasicUploadStatusEntity> filterDownloadStatus(BasicUploadRequest basicDownloadRequest);
boolean insertDownloadStatus(BasicUploadStatusEntity basicDownloadStatusEntity);
boolean deleteById(String id);
boolean updateDownloadStatus(BasicUploadStatusEntity basicDownloadStatusEntity);
}

@ -1,11 +1,14 @@
package com.glxp.sale.admin.service.sync.impl;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageHelper;
import com.glxp.sale.admin.dao.sync.BasicExportDao;
import com.glxp.sale.admin.entity.sync.BasicExportStatusEntity;
import com.glxp.sale.admin.req.sync.BasicExportStatusRequest;
import com.glxp.sale.admin.service.sync.BasicExportService;
import com.glxp.sale.admin.util.DateUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Collections;
@ -43,4 +46,18 @@ public class BasicExportServiceImpl implements BasicExportService {
public boolean updateExportStatus(BasicExportStatusEntity basicExportStatusEntity) {
return basicExportDao.updateExportStatus(basicExportStatusEntity);
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean finished(String id) {
if (StrUtil.isNotBlank(id)) {
BasicExportStatusEntity basicExportStatusEntity = basicExportDao.selectById(id);
if (null != basicExportStatusEntity) {
basicExportStatusEntity.setEndTime(DateUtil.getDateTime());
basicExportStatusEntity.setStatus(1);
basicExportDao.updateExportStatus(basicExportStatusEntity);
}
}
return false;
}
}

@ -0,0 +1,61 @@
package com.glxp.sale.admin.service.sync.impl;
import cn.hutool.core.collection.CollUtil;
import com.github.pagehelper.PageHelper;
import com.glxp.sale.admin.dao.sync.BasicUploadDao;
import com.glxp.sale.admin.entity.sync.BasicUploadStatusEntity;
import com.glxp.sale.admin.req.sync.BasicUploadRequest;
import com.glxp.sale.admin.service.sync.BasicUploadService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Slf4j
@Service
public class BasicUploadServiceImpl implements BasicUploadService {
@Resource
private BasicUploadDao basicUploadDao;
@Override
public BasicUploadStatusEntity findByData(String idDatas, Integer status) {
BasicUploadRequest basicUploadRequest = new BasicUploadRequest();
basicUploadRequest.setStatus(status);
basicUploadRequest.setIdDatas(idDatas);
List<BasicUploadStatusEntity> basicDownloadStatusEntities = basicUploadDao.filterUploadStatus(basicUploadRequest);
if (CollUtil.isNotEmpty(basicDownloadStatusEntities)) {
return basicDownloadStatusEntities.get(0);
}
return null;
}
@Override
public List<BasicUploadStatusEntity> filterDownloadStatus(BasicUploadRequest basicUploadRequest) {
if (basicUploadRequest == null) {
return Collections.emptyList();
}
if (basicUploadRequest.getPage() != null) {
int offset = (basicUploadRequest.getPage() - 1) * basicUploadRequest.getLimit();
PageHelper.offsetPage(offset, basicUploadRequest.getLimit());
}
return basicUploadDao.filterUploadStatus(basicUploadRequest);
}
@Override
public boolean insertDownloadStatus(BasicUploadStatusEntity basicDownloadStatusEntity) {
return basicUploadDao.insertUploadStatus(basicDownloadStatusEntity);
}
@Override
public boolean deleteById(String id) {
return basicUploadDao.deleteById(id);
}
@Override
public boolean updateDownloadStatus(BasicUploadStatusEntity basicDownloadStatusEntity) {
return basicUploadDao.updateUploadStatus(basicDownloadStatusEntity);
}
}

@ -3,11 +3,11 @@ package com.glxp.sale.admin.thread;
import cn.hutool.core.collection.CollUtil;
import com.alibaba.fastjson.JSON;
import com.glxp.sale.admin.constant.BasicProcessStatus;
import com.glxp.sale.admin.constant.ConstantStatus;
import com.glxp.sale.admin.constant.FileConstant;
import com.glxp.sale.admin.entity.param.SystemParamConfigEntity;
import com.glxp.sale.admin.entity.sync.BasicExportStatusEntity;
import com.glxp.sale.admin.entity.sync.ProductInfoEntity;
import com.glxp.sale.admin.entity.sync.ThrImportLogEntity;
import com.glxp.sale.admin.entity.sync.UdiCompanyEntity;
import com.glxp.sale.admin.http.SpGetHttp;
import com.glxp.sale.admin.req.sync.BasicExportStatusRequest;
@ -15,20 +15,15 @@ import com.glxp.sale.admin.req.sync.SpsSyncDataRequest;
import com.glxp.sale.admin.res.sync.*;
import com.glxp.sale.admin.service.param.SystemParamConfigService;
import com.glxp.sale.admin.service.sync.BasicExportService;
import com.glxp.sale.admin.service.sync.ThrImportLogService;
import com.glxp.sale.admin.thread.didl.AsyncDiDlHelper;
import com.glxp.sale.admin.util.CustomUtil;
import com.glxp.sale.admin.util.DateUtil;
import com.glxp.sale.admin.util.FileUtils;
import com.glxp.sale.admin.util.RedisUtil;
import com.glxp.sale.common.res.BaseResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -95,6 +90,11 @@ public class DlAllDataService {
myEntity.setStatus(0);
myEntity.setUpdateTime(new Date());
myEntity.setType(BasicProcessStatus.NEW_ALL_DATA);
myEntity.setTransportType(BasicProcessStatus.INTERFACE_TYPE);
myEntity.setIdDatas(basicExportStatusRequest.getIdDatas());
myEntity.setStartTime(DateUtil.getDateTime());
myEntity.setTaskId(syncOrderResponse.getTaskId());
myEntity.setRemark(syncOrderResponse.toString());
basicExportService.insertExportStatus(myEntity);
} else {
String path = getPath();
@ -161,9 +161,13 @@ public class DlAllDataService {
redisUtil.set(key, baseResponse.getData());
BasicExportStatusEntity myEntity = new BasicExportStatusEntity();
myEntity.setId(key);
myEntity.setTaskId(syncOrderResponse.getTaskId());
myEntity.setStatus(0);
myEntity.setUpdateTime(new Date());
myEntity.setStartTime(DateUtil.getDateTime());
myEntity.setIdDatas(ConstantStatus.SYNC_SCAN_ORDER);
myEntity.setType(BasicProcessStatus.NEW_ALL_ORDER);
myEntity.setRemark(syncOrderResponse.toString());
basicExportService.insertExportStatus(myEntity);
} else {
String path = getPath();
@ -229,9 +233,14 @@ public class DlAllDataService {
redisUtil.set(key, baseResponse.getData());
BasicExportStatusEntity myEntity = new BasicExportStatusEntity();
myEntity.setId(key);
myEntity.setTaskId(syncOrderResponse.getTaskId());
myEntity.setStatus(0);
myEntity.setUpdateTime(new Date());
myEntity.setStartTime(DateUtil.getDateTime());
myEntity.setTransportType(BasicProcessStatus.INTERFACE_TYPE);
myEntity.setType(BasicProcessStatus.NEW_ALL_BUS);
myEntity.setIdDatas(ConstantStatus.SYNC_BUS_TYPE);
myEntity.setRemark(syncOrderResponse.toString());
basicExportService.insertExportStatus(myEntity);
} else {
String path = getPath();
@ -293,7 +302,7 @@ public class DlAllDataService {
public void dlAllDi() {
log.info("下载所有国家库DI信息--");
BasicExportStatusRequest basicExportStatusRequest = new BasicExportStatusRequest();
basicExportStatusRequest.setIdDatas("AutoDownloadDiProducts");
basicExportStatusRequest.setIdDatas(ConstantStatus.SYNC_DI_PRODUCTS);
basicExportStatusRequest.setStatus(0);
basicExportStatusRequest.setType(BasicProcessStatus.NEW_ALL_UDIS);
basicExportStatusRequest.setScheduleType(BasicProcessStatus.SCHEDULE_NORMAL);
@ -303,6 +312,7 @@ public class DlAllDataService {
SystemParamConfigEntity downstream = systemParamConfigService.selectByParamKey("sync_downstream_enable");
for (BasicExportStatusEntity basicExportStatusEntity : basicExportStatusEntities) {
if (basicExportStatusEntity.getFromType() == 0) {
BaseResponse<String> response = spGetHttp.getLastUpdateTime("AutoDownloadDiProducts");
String lastUpdateTime = response.getData();
if (lastUpdateTime.equals("1949-01-01 00:00:00")) {
@ -321,11 +331,17 @@ public class DlAllDataService {
if (downstream.getParamValue().equals("1")) {
String datas = JSON.toJSON(spSyncUdiResponse).toString();
redisUtil.set(key, datas);
//记录下载日志
BasicExportStatusEntity myEntity = new BasicExportStatusEntity();
myEntity.setId(key);
myEntity.setTaskId(spSyncUdiResponse.getTaskId());
myEntity.setStatus(0);
myEntity.setIdDatas(ConstantStatus.SYNC_DI_PRODUCTS);
myEntity.setUpdateTime(new Date());
myEntity.setType(BasicProcessStatus.NEW_ALL_UDIS);
myEntity.setTransportType(BasicProcessStatus.INTERFACE_TYPE);
myEntity.setStartTime(DateUtil.getDateTime());
myEntity.setRemark("国家库DI信息" + spSyncUdiResponse.getUdiCompanyEntities().size() + " 条");
basicExportService.insertExportStatus(myEntity);
} else {
String path = getPath();
@ -361,9 +377,15 @@ public class DlAllDataService {
redisUtil.set(key, datas);
BasicExportStatusEntity myEntity = new BasicExportStatusEntity();
myEntity.setId(key);
myEntity.setTaskId(spSyncUdiResponse.getTaskId());
myEntity.setStatus(0);
myEntity.setUpdateTime(new Date());
myEntity.setType(BasicProcessStatus.NEW_ALL_UDIS);
myEntity.setTransportType(BasicProcessStatus.INTERFACE_TYPE);
myEntity.setStartTime(DateUtil.getDateTime());
myEntity.setUpdateTime(new Date());
myEntity.setIdDatas(ConstantStatus.SYNC_DI_PRODUCTS);
myEntity.setRemark("公司信息:{} " + spSyncUdiResponse.getUdiCompanyEntities().size() + " 条");
basicExportService.insertExportStatus(myEntity);
} else {
String path = getPath();
@ -395,14 +417,21 @@ public class DlAllDataService {
spsSyncDataRequest.setId(basicExportStatusEntity.getId());
BaseResponse<SpSyncUdiResponse> baseResponse = spGetHttp.getAllDi(spsSyncDataRequest);
SpSyncUdiResponse spSyncUdiResponse = baseResponse.getData();
if (downstream.getParamValue().equals("1")) {
String key = "UdiPrdoucts" + System.currentTimeMillis();
redisUtil.set(key, baseResponse.getData());
BasicExportStatusEntity myEntity = new BasicExportStatusEntity();
myEntity.setId(key);
myEntity.setTaskId(spSyncUdiResponse.getTaskId());
myEntity.setStatus(0);
myEntity.setUpdateTime(new Date());
myEntity.setStartTime(DateUtil.getDateTime());
myEntity.setIdDatas(ConstantStatus.SYNC_DI_PRODUCTS);
myEntity.setTransportType(BasicProcessStatus.INTERFACE_TYPE);
myEntity.setType(BasicProcessStatus.NEW_ALL_UDIS);
myEntity.setRemark("国家库DI信息" + spSyncUdiResponse.getUdiCompanyEntities().size() + " 条\n"
+ "公司信息:" + spSyncUdiResponse.getUdiCompanyEntities().size() + "条\n");
basicExportService.insertExportStatus(myEntity);
} else {
String path = getPath();

@ -1,35 +1,30 @@
package com.glxp.sale.admin.thread;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.glxp.sale.admin.constant.BasicProcessStatus;
import com.glxp.sale.admin.constant.ConstantStatus;
import com.glxp.sale.admin.constant.FileConstant;
import com.glxp.sale.admin.entity.param.SystemParamConfigEntity;
import com.glxp.sale.admin.entity.sync.BasicExportStatusEntity;
import com.glxp.sale.admin.entity.sync.IOOrderStatusEntity;
import com.glxp.sale.admin.entity.sync.UdiCompanyEntity;
import com.glxp.sale.admin.entity.sync.WarehouseEntity;
import com.glxp.sale.admin.res.sync.SpsSyncBusResponse;
import com.glxp.sale.admin.res.sync.SpsSyncDataResponse;
import com.glxp.sale.admin.res.sync.SpsSyncOrderResponse;
import com.glxp.sale.admin.res.sync.SpsSyncScheduleResponse;
import com.glxp.sale.admin.service.param.SystemParamConfigService;
import com.glxp.sale.admin.service.sync.BasicExportService;
import com.glxp.sale.admin.service.sync.IOOrderStatusService;
import com.glxp.sale.admin.util.DateUtil;
import com.glxp.sale.admin.util.FileFilterImpl;
import com.glxp.sale.admin.util.FileUtils;
import com.glxp.sale.admin.util.RedisUtil;
import com.glxp.sale.common.res.BaseResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.io.File;
import java.util.Date;
import java.util.List;
/**
* udi
@ -66,10 +61,15 @@ public class ScanDownloadService {
String fileName = file.getName();
basicExportStatusEntity.setId(fileName);
basicExportStatusEntity.setUpdateTime(new Date());
basicExportStatusEntity.setStartTime(DateUtil.getDateTime());
basicExportStatusEntity.setStatus(1);
basicExportStatusEntity.setIdDatas(file.getPath());
basicExportStatusEntity.setIdDatas(ConstantStatus.SYNC_BASIC_DATA);
basicExportStatusEntity.setType(BasicProcessStatus.NEW_ALL_DATA);
basicExportStatusEntity.setScheduleType(BasicProcessStatus.SCHEDULE_NORMAL);
basicExportStatusEntity.setTransportType(BasicProcessStatus.FILE_TYPE);
SpsSyncDataResponse spsSyncDataResponse = JSONUtil.toBean(data, SpsSyncDataResponse.class);
basicExportStatusEntity.setRemark(spsSyncDataResponse.toString());
basicExportService.insertExportStatus(basicExportStatusEntity);
SpsSyncDataResponse baseResponse =
JSONObject.parseObject(data, new TypeReference<SpsSyncDataResponse>() {

@ -27,14 +27,21 @@
<insert id="insertExportStatus" keyProperty="id"
parameterType="com.glxp.sale.admin.entity.sync.BasicExportStatusEntity">
replace
INTO basic_export_status(id,idDatas,status,`type`,updateTime,scheduleType)
INTO basic_export_status(id,taskId,idDatas,status,`type`,transportType,updateTime,scheduleType,startTime,endTime,remark,superiorService,subordinateService)
values(
#{id},
#{taskId},
#{idDatas},
#{status},
#{type},
#{transportType},
#{updateTime},
#{scheduleType}
#{scheduleType},
#{startTime},
#{endTime},
#{remark},
#{superiorService},
#{subordinateService}
)
</insert>
@ -42,11 +49,17 @@
UPDATE basic_export_status
<trim prefix="set" suffixOverrides=",">
<if test="idDatas != null">idDatas=#{idDatas},</if>
<if test="taskId != null">taskId=#{taskId},</if>
<if test="status != null">status=#{status},</if>
<if test="type != null">`type`=#{type},</if>
<if test="transportType != null">transportType=#{transportType},</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="superiorService != null">superiorService=#{superiorService},</if>
<if test="subordinateService != null">subordinateService=#{subordinateService},</if>
</trim>
WHERE id = #{id}
</update>
@ -56,4 +69,10 @@
WHERE id = #{id}
</delete>
<select id="selectById" resultType="com.glxp.sale.admin.entity.sync.BasicExportStatusEntity">
select *
from basic_export_status
where id = #{id}
</select>
</mapper>

@ -0,0 +1,78 @@
<?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.sale.admin.dao.sync.BasicUploadDao">
<select id="filterUploadStatus" parameterType="com.glxp.sale.admin.req.sync.BasicUploadRequest"
resultType="com.glxp.sale.admin.entity.sync.BasicUploadStatusEntity">
select *
from basic_upload_status
<where>
<if test="id != '' and id != null">
and id = #{id}
</if>
<if test="taskId != null and taskId != ''">
and taskId = #{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="insertUploadStatus" keyProperty="id"
parameterType="com.glxp.sale.admin.entity.sync.BasicUploadStatusEntity">
replace
INTO basic_upload_status(id,taskId,idDatas,status,type,transportType,updateTime,scheduleType,startTime,endTime,remark,superiorService,subordinateService)
values(
#{id},
#{taskId},
#{idDatas},
#{status},
#{type},
#{transportType},
#{updateTime},
#{scheduleType},
#{startTime},
#{endTime},
#{remark},
#{superiorService},
#{subordinateService}
)
</insert>
<update id="updateUploadStatus" parameterType="com.glxp.sale.admin.entity.sync.BasicUploadStatusEntity">
UPDATE basic_upload_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="transportType != null">transportType=#{transportType},</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="subordinateService != null">subordinateService=#{subordinateService},</if>
<if test="superiorService != null">superiorService=#{superiorService},</if>
</trim>
WHERE id = #{id}
</update>
<delete id="deleteById" parameterType="Map">
DELETE
FROM basic_upload_status
WHERE id = #{id}
</delete>
</mapper>
Loading…
Cancel
Save