Merge branch 'master' into test

pro
wj 2 years ago
commit 9ce5728647

@ -19,7 +19,7 @@ public enum BasicExportTypeEnum {
/** /**
* DI * DI
*/ */
// COUNTRY_DI_DATA("country_di_data", "国家库DI数据"), COUNTRY_DI_DATA("country_di_data", "国家库DI数据"),
/** /**
* *
@ -45,6 +45,11 @@ public enum BasicExportTypeEnum {
* *
*/ */
SYS_SET_DATA("sys_set_data", "系统设置数据"), SYS_SET_DATA("sys_set_data", "系统设置数据"),
/**
*
*/
IO_ORDER("io_order", "单据信息"),
; ;
@EnumValue @EnumValue
private String key; private String key;

@ -66,10 +66,8 @@ import javax.validation.Valid;
import java.io.*; import java.io.*;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
@RestController @RestController
@Api(tags = "同步下载相关") @Api(tags = "同步下载相关")
@ -335,28 +333,28 @@ public class SpsSyncDownloadController {
@ApiOperation("上传同步数据") @ApiOperation("上传同步数据")
@PostMapping("sps/sync/upload/data") @PostMapping("sps/sync/upload/data")
@Transactional
public Object uploadData(@RequestBody SyncUpLoadRequest upLoadRequest) { public Object uploadData(@RequestBody SyncUpLoadRequest upLoadRequest) {
try { try {
JSONObject obj = JSONUtil.parseObj(upLoadRequest.getData()); JSONObject obj = JSONUtil.parseObj(upLoadRequest.getData());
String log = "";
switch (upLoadRequest.getExportType()) { switch (upLoadRequest.getExportType()) {
case BASIC_DATA: case BASIC_DATA:
log = saveUploadBasicData(JSONUtil.toBean(obj, SpsSyncBasicDataResponse.class)); saveUploadBasicData(JSONUtil.toBean(obj, SpsSyncBasicDataResponse.class));
break; break;
case OTHER_DATA: case OTHER_DATA:
log = saveUploadOtherData(JSONUtil.toBean(obj, SpsSyncOtherDataResponse.class)); saveUploadOtherData(JSONUtil.toBean(obj, SpsSyncOtherDataResponse.class));
break; break;
case DOCUMENT_TYPE_DATA: case DOCUMENT_TYPE_DATA:
log = saveUploadDocumentTypeData(JSONUtil.toBean(obj, SpsSyncBusResponse.class)); saveUploadDocumentTypeData(JSONUtil.toBean(obj, SpsSyncBusResponse.class));
break; break;
case USER_DATA: case USER_DATA:
log = saveUploadUserData(JSONUtil.toBean(obj, SpsSyncDataResponse.class)); saveUploadUserData(JSONUtil.toBean(obj, SpsSyncDataResponse.class));
break; break;
case THIRD_DATA: case THIRD_DATA:
log = saveUploadThrData(JSONUtil.toBean(obj, SpsSyncThrDataResponse.class)); saveUploadThrData(JSONUtil.toBean(obj, SpsSyncThrDataResponse.class));
break; break;
case SYS_SET_DATA: case SYS_SET_DATA:
log = saveUploadSysSettingData(JSONUtil.toBean(obj, SpsSyncSysSettingResponse.class)); saveUploadSysSettingData(JSONUtil.toBean(obj, SpsSyncSysSettingResponse.class));
break; break;
} }
String taskId = obj.getStr("taskId"); String taskId = obj.getStr("taskId");
@ -370,15 +368,14 @@ public class SpsSyncDownloadController {
.type(upLoadRequest.getExportType().getRemark()) .type(upLoadRequest.getExportType().getRemark())
.idDatas(upLoadRequest.getExportType().getKey()) .idDatas(upLoadRequest.getExportType().getKey())
.scheduleType(1) .scheduleType(1)
.execInfo(log)
.build(); .build();
String fileFullPath = writeFile(filePrefix, upLoadRequest.getExportType().getRemark(), JSONUtil.toJsonStr(upLoadRequest.getData())); String fileFullPath = writeFile(filePrefix, upLoadRequest.getExportType().getRemark(), JSONUtil.toJsonStr(upLoadRequest.getData()));
downloadStatus.setCacheFilePath(fileFullPath); downloadStatus.setCacheFilePath(fileFullPath);
basicDownloadService.insertDownloadStatus(downloadStatus); basicDownloadService.insertDownloadStatus(downloadStatus);
return ResultVOUtils.success(log); return ResultVOUtils.success();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return ResultVOUtils.error(ResultEnum.NOT_NETWORK.getCode(), e.getMessage()); return ResultVOUtils.error(ResultEnum.NOT_NETWORK, e.getMessage());
} }
} }
@ -416,120 +413,40 @@ public class SpsSyncDownloadController {
private final BasicBusTypeChangeDao basicBusTypeChangeDao; private final BasicBusTypeChangeDao basicBusTypeChangeDao;
private String saveUploadSysSettingData(SpsSyncSysSettingResponse bean) { private void saveUploadSysSettingData(SpsSyncSysSettingResponse bean) {
List<String> success = new ArrayList<>();
List<String> fail = new ArrayList<>();
if (CollectionUtil.isNotEmpty(bean.getSystemParamConfigEntities())) { if (CollectionUtil.isNotEmpty(bean.getSystemParamConfigEntities())) {
String desc = "运行参数设置信息:"; systemParamConfigDao.insertOrUpdateBatch(bean.getSystemParamConfigEntities());
try {
systemParamConfigDao.insertOrUpdateBatch(bean.getSystemParamConfigEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getEntrustReceEntities())) { if (CollectionUtil.isNotEmpty(bean.getEntrustReceEntities())) {
String desc = "委托验收设置信息:"; entrustReceDao.insertOrUpdateBatch(bean.getEntrustReceEntities());
try {
entrustReceDao.insertOrUpdateBatch(bean.getEntrustReceEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getSystemPDFModuleEntities())) { if (CollectionUtil.isNotEmpty(bean.getSystemPDFModuleEntities())) {
String desc = "系统模板模块信息:"; systemPDFModuleDao.insertOrUpdateBatch(bean.getSystemPDFModuleEntities());
try {
systemPDFModuleDao.insertOrUpdateBatch(bean.getSystemPDFModuleEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getSystemPDFTemplateEntities())) { if (CollectionUtil.isNotEmpty(bean.getSystemPDFTemplateEntities())) {
String desc = "模板信息:"; for (SystemPDFTemplateEntity systemPDFTemplateEntity : bean.getSystemPDFTemplateEntities())
boolean flag = true; systemPDFTemplateDao.insertOrUpdate(systemPDFTemplateEntity);
int failCount = 0;
try {
for (SystemPDFTemplateEntity systemPDFTemplateEntity : bean.getSystemPDFTemplateEntities()) {
try {
systemPDFTemplateDao.insertOrUpdate(systemPDFTemplateEntity);
} catch (Exception e) {
e.printStackTrace();
flag = false;
failCount++;
}
}
success.add(desc + "成功" + (bean.getSystemPDFTemplateEntities().size() - failCount) + "条");
} catch (Exception e) {
fail.add(desc + "失败" + failCount + "条");
}
} }
if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceCodeEntities())) { if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceCodeEntities())) {
String desc = "扫码单据关联模板信息:"; sysPdfTemplateRelevanceCodeDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceCodeEntities());
try {
sysPdfTemplateRelevanceCodeDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceCodeEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceBizEntities())) { if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceBizEntities())) {
String desc = "业务单据关联模板信息:"; sysPdfTemplateRelevanceBizDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceBizEntities());
try {
sysPdfTemplateRelevanceBizDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceBizEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceLabelEntities())) { if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceLabelEntities())) {
String desc = "标签关联模板信息:"; sysPdfTemplateRelevanceLabelDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceLabelEntities());
try {
sysPdfTemplateRelevanceLabelDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceLabelEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceStatemenEntities())) { if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceStatemenEntities())) {
String desc = "报表关联模板信息:"; sysPdfTemplateRelevanceStatemenDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceStatemenEntities());
try {
sysPdfTemplateRelevanceStatemenDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceStatemenEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getBasicBusTypePreEntities())) { if (CollectionUtil.isNotEmpty(bean.getBasicBusTypePreEntities())) {
String desc = "出入库单自动补单设置信息:"; basicBusTypePreDao.insertOrUpdateBatch(bean.getBasicBusTypePreEntities());
try {
basicBusTypePreDao.insertOrUpdateBatch(bean.getBasicBusTypePreEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getBasicBusTypeChangeEntities())) { if (CollectionUtil.isNotEmpty(bean.getBasicBusTypeChangeEntities())) {
String desc = "业务单自动补单设置信息:"; basicBusTypeChangeDao.insertOrUpdateBatch(bean.getBasicBusTypeChangeEntities());
try {
basicBusTypeChangeDao.insertOrUpdateBatch(bean.getBasicBusTypeChangeEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
success.addAll(fail);
return String.join(",", success);
} }
@ -538,147 +455,50 @@ public class SpsSyncDownloadController {
private final ThrProductsDao thrProductsDao; private final ThrProductsDao thrProductsDao;
private final ThrCorpDao thrCorpDao; private final ThrCorpDao thrCorpDao;
private String saveUploadThrData(SpsSyncThrDataResponse bean) { private void saveUploadThrData(SpsSyncThrDataResponse bean) {
List<String> success = new ArrayList<>();
List<String> fail = new ArrayList<>();
if (CollectionUtil.isNotEmpty(bean.getDeptEntities())) { if (CollectionUtil.isNotEmpty(bean.getDeptEntities())) {
String desc = "第三方部门信息:"; thrDeptDao.insertOrUpdateBatch(bean.getDeptEntities());
try {
thrDeptDao.insertOrUpdateBatch(bean.getDeptEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getInvWarehouseEntities())) { if (CollectionUtil.isNotEmpty(bean.getInvWarehouseEntities())) {
String desc = "第三方仓库信息:"; thrInvWarehouseDao.insertOrUpdateBatch(bean.getInvWarehouseEntities());
try {
thrInvWarehouseDao.insertOrUpdateBatch(bean.getInvWarehouseEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getProductsEntityList())) { if (CollectionUtil.isNotEmpty(bean.getProductsEntityList())) {
String desc = "第三方产品信息:"; thrProductsDao.insertOrUpdateBatch(bean.getProductsEntityList());
try {
thrProductsDao.insertOrUpdateBatch(bean.getProductsEntityList());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getCorpEntities())) { if (CollectionUtil.isNotEmpty(bean.getCorpEntities())) {
String desc = "第三方往来信息:"; thrCorpDao.insertOrUpdateBatch(bean.getCorpEntities());
try {
thrCorpDao.insertOrUpdateBatch(bean.getCorpEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
success.addAll(fail);
return String.join(",", success);
} }
private String saveUploadUserData(SpsSyncDataResponse bean) { private void saveUploadUserData(SpsSyncDataResponse bean) {
List<String> success = new ArrayList<>();
List<String> fail = new ArrayList<>();
if (CollectionUtil.isNotEmpty(bean.getAuthAdminList())) { if (CollectionUtil.isNotEmpty(bean.getAuthAdminList())) {
String desc = "系统用户信息:"; authAdminDao.insertOrUpdateBatch(bean.getAuthAdminList());
try {
authAdminDao.insertOrUpdateBatch(bean.getAuthAdminList());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getDeptEntityList())) { if (CollectionUtil.isNotEmpty(bean.getDeptEntityList())) {
String desc = "部门信息:"; deptDao.insertOrUpdateBatch(bean.getDeptEntityList());
try {
deptDao.insertOrUpdateBatch(bean.getDeptEntityList());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getDeptUserEntities())) { if (CollectionUtil.isNotEmpty(bean.getDeptUserEntities())) {
String desc = "部门用户信息:"; deptUserDao.replaceBatch(bean.getDeptUserEntities());
try {
deptUserDao.replaceBatch(bean.getDeptUserEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getInvWarehouseEntities())) { if (CollectionUtil.isNotEmpty(bean.getInvWarehouseEntities())) {
String desc = "仓库字典信息:"; invWarehouseDao.insertOrUpdateBatch(bean.getInvWarehouseEntities());
try {
invWarehouseDao.insertOrUpdateBatch(bean.getInvWarehouseEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getWarehouseUserEntities())) { if (CollectionUtil.isNotEmpty(bean.getWarehouseUserEntities())) {
String desc = "仓库用户信息:"; warehouseUserDao.insertOrUpdateBatch(bean.getWarehouseUserEntities());
try {
warehouseUserDao.insertOrUpdateBatch(bean.getWarehouseUserEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getWarehouseBussinessTypeEntities())) { if (CollectionUtil.isNotEmpty(bean.getWarehouseBussinessTypeEntities())) {
String desc = "仓库单据类型信息:"; for (WarehouseBussinessTypeEntity warehouseBussinessTypeEntity : bean.getWarehouseBussinessTypeEntities()) {
boolean flag = true; warehouseBussinessTypeDao.insertOrUpdate(warehouseBussinessTypeEntity);
int failCount = 0;
try {
for (WarehouseBussinessTypeEntity warehouseBussinessTypeEntity : bean.getWarehouseBussinessTypeEntities()) {
try {
warehouseBussinessTypeDao.insertOrUpdate(warehouseBussinessTypeEntity);
} catch (Exception e) {
e.printStackTrace();
flag = false;
failCount++;
}
}
success.add(desc + "成功" + (bean.getWarehouseBussinessTypeEntities().size() - failCount) + "条");
} catch (Exception e) {
fail.add(desc + "失败" + failCount + "条");
} }
} }
if (CollectionUtil.isNotEmpty(bean.getInvSpaces())) { if (CollectionUtil.isNotEmpty(bean.getInvSpaces())) {
String desc = "货位信息:"; invSpaceDao.insertOrUpdateBatch(bean.getInvSpaces());
try {
invSpaceDao.insertOrUpdateBatch(bean.getInvSpaces());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getInvBusUserEntities())) { if (CollectionUtil.isNotEmpty(bean.getInvBusUserEntities())) {
String desc = "用户关联单据信息:"; invBusUserDao.insertOrUpdateBatch(bean.getInvBusUserEntities());
try {
invBusUserDao.insertOrUpdateBatch(bean.getInvBusUserEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
success.addAll(fail);
return String.join(",", success);
} }
private final BasicBussinessTypeDao basicBussinessTypeDao; private final BasicBussinessTypeDao basicBussinessTypeDao;
@ -691,41 +511,16 @@ public class SpsSyncDownloadController {
* *
* @param bean * @param bean
*/ */
private String saveUploadDocumentTypeData(SpsSyncBusResponse bean) { private void saveUploadDocumentTypeData(SpsSyncBusResponse bean) {
List<String> success = new ArrayList<>();
List<String> fail = new ArrayList<>();
if (CollectionUtil.isNotEmpty(bean.getBussinessTypeEntities())) { if (CollectionUtil.isNotEmpty(bean.getBussinessTypeEntities())) {
String desc = "扫码单据类型信息:"; basicBussinessTypeDao.insertOrUpdateBatch(bean.getBussinessTypeEntities());
try {
basicBussinessTypeDao.insertOrUpdateBatch(bean.getBussinessTypeEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getBusTypeChangeEntities())) { if (CollectionUtil.isNotEmpty(bean.getBusTypeChangeEntities())) {
String desc = "业务单据类型:"; busTypeChangeDao.insertOrUpdateBatch(bean.getBusTypeChangeEntities());
try {
busTypeChangeDao.insertOrUpdateBatch(bean.getBusTypeChangeEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getThrBusTypeOriginEntities())) { if (CollectionUtil.isNotEmpty(bean.getThrBusTypeOriginEntities())) {
String desc = "第三方单据类型信息:"; thrBusTypeOriginDao.insertOrUpdateBatch(bean.getThrBusTypeOriginEntities());
try {
thrBusTypeOriginDao.insertOrUpdateBatch(bean.getThrBusTypeOriginEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
success.addAll(fail);
return String.join(",", success);
} }
@ -737,31 +532,14 @@ public class SpsSyncDownloadController {
* *
* @param bean * @param bean
*/ */
private String saveUploadOtherData(SpsSyncOtherDataResponse bean) { private void saveUploadOtherData(SpsSyncOtherDataResponse bean) {
List<String> success = new ArrayList<>();
List<String> fail = new ArrayList<>();
if (CollectionUtil.isNotEmpty(bean.getIoCodeLostList())) { if (CollectionUtil.isNotEmpty(bean.getIoCodeLostList())) {
String desc = "UDI码补齐信息"; ioCodeLostMapper.insertOrUpdateBatch(bean.getIoCodeLostList());
try {
ioCodeLostMapper.insertOrUpdateBatch(bean.getIoCodeLostList());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getIoCodeRelList())) { if (CollectionUtil.isNotEmpty(bean.getIoCodeRelList())) {
String desc = "UDI码关联关系"; ioCodeRelMapper.insertOrUpdateBatch(bean.getIoCodeRelList());
try {
ioCodeRelMapper.insertOrUpdateBatch(bean.getIoCodeRelList());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
success.addAll(fail);
return String.join(",", success);
} }
private final BasicHospTypeDao basicHospTypeDao; private final BasicHospTypeDao basicHospTypeDao;
@ -780,101 +558,37 @@ public class SpsSyncDownloadController {
* *
* @param bean * @param bean
*/ */
private String saveUploadBasicData(SpsSyncBasicDataResponse bean) { private void saveUploadBasicData(SpsSyncBasicDataResponse bean) {
List<String> success = new ArrayList<>();
List<String> fail = new ArrayList<>();
if (CollectionUtil.isNotEmpty(bean.getHospTypeList())) { if (CollectionUtil.isNotEmpty(bean.getHospTypeList())) {
String desc = "物资字典分类信息:"; basicHospTypeDao.insertOrUpdateBatch(bean.getHospTypeList());
try {
basicHospTypeDao.insertOrUpdateBatch(bean.getHospTypeList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getUdiRelevanceList())) { if (CollectionUtil.isNotEmpty(bean.getUdiRelevanceList())) {
String desc = "物资字典主表信息:"; udiRelevanceDao.insertOrUpdateBatch(bean.getUdiRelevanceList());
try {
udiRelevanceDao.insertOrUpdateBatch(bean.getUdiRelevanceList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getProductsList())) { if (CollectionUtil.isNotEmpty(bean.getProductsList())) {
String desc = "供应商物资字典信息:"; basicProductsDao.insertOrUpdateBatch(bean.getProductsList());
try {
basicProductsDao.insertOrUpdateBatch(bean.getProductsList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getRelevanceList())) { if (CollectionUtil.isNotEmpty(bean.getRelevanceList())) {
String desc = "物资字典子表信息:"; relevanceDao.insertOrUpdateBatch(bean.getRelevanceList());
try {
relevanceDao.insertOrUpdateBatch(bean.getRelevanceList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getCorpList())) { if (CollectionUtil.isNotEmpty(bean.getCorpList())) {
String desc = "往来单位信息:"; corpDao.insertOrUpdateBatch(bean.getCorpList());
try {
corpDao.insertOrUpdateBatch(bean.getCorpList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getSupCertList())) { if (CollectionUtil.isNotEmpty(bean.getSupCertList())) {
String desc = "资质证书信息:"; supCertDao.insertOrUpdateBatch(bean.getSupCertList());
try {
supCertDao.insertOrUpdateBatch(bean.getSupCertList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getSupCertSetList())) { if (CollectionUtil.isNotEmpty(bean.getSupCertSetList())) {
String desc = "资质证书要求设置信息:"; supCertSetDao.insertOrUpdateBatch(bean.getSupCertSetList());
try {
supCertSetDao.insertOrUpdateBatch(bean.getSupCertSetList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getSupCompanyList())) { if (CollectionUtil.isNotEmpty(bean.getSupCompanyList())) {
String desc = "供应商资质信息:"; supCompanyDao.insertOrUpdateBatch(bean.getSupCompanyList());
try {
supCompanyDao.insertOrUpdateBatch(bean.getSupCompanyList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getSupManufacturerList())) { if (CollectionUtil.isNotEmpty(bean.getSupManufacturerList())) {
String desc = "生产企业资质信息:"; supManufacturerDao.insertOrUpdateBatch(bean.getSupManufacturerList());
try {
supManufacturerDao.insertOrUpdateBatch(bean.getSupManufacturerList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getSupProductList())) { if (CollectionUtil.isNotEmpty(bean.getSupProductList())) {
String desc = "配送产品资质信息:"; supProductDao.insertOrUpdateBatch(bean.getSupProductList());
try {
supProductDao.insertOrUpdateBatch(bean.getSupProductList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
success.addAll(fail);
return String.join(",", success);
} }
@Resource @Resource

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log; import com.glxp.api.annotation.Log;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.*; import com.glxp.api.constant.*;
@ -13,16 +14,23 @@ import com.glxp.api.entity.sync.BasicExportStatusEntity;
import com.glxp.api.entity.sync.BasicExportStatusTimeEntity; import com.glxp.api.entity.sync.BasicExportStatusTimeEntity;
import com.glxp.api.req.sync.BasicExportStatusRequest; import com.glxp.api.req.sync.BasicExportStatusRequest;
import com.glxp.api.req.sync.BasicExportTimeRequest; import com.glxp.api.req.sync.BasicExportTimeRequest;
import com.glxp.api.req.sync.ManualSyncDataReq;
import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.sync.SpSyncUdiResponse; import com.glxp.api.res.sync.SpSyncUdiResponse;
import com.glxp.api.res.sync.SpsSyncBusResponse; import com.glxp.api.res.sync.SpsSyncBusResponse;
import com.glxp.api.res.sync.SpsSyncDataResponse; import com.glxp.api.res.sync.SpsSyncDataResponse;
import com.glxp.api.res.sync.SpsSyncOrderResponse; import com.glxp.api.res.sync.SpsSyncOrderResponse;
import com.glxp.api.res.system.SyncDataSetResponse;
import com.glxp.api.service.sync.BasicExportService; import com.glxp.api.service.sync.BasicExportService;
import com.glxp.api.service.sync.BasicExportTimeService; import com.glxp.api.service.sync.BasicExportTimeService;
import com.glxp.api.service.sync.SpsSyncDownloadService;
import com.glxp.api.service.sync.SyncDataSetService;
import com.glxp.api.task.TaskExecutorConfig;
import com.glxp.api.util.CustomUtil; import com.glxp.api.util.CustomUtil;
import com.glxp.api.util.RedisUtil; import com.glxp.api.util.RedisUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
@ -36,8 +44,10 @@ import java.net.URLEncoder;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.concurrent.CompletableFuture;
@RestController @RestController
@RequiredArgsConstructor
public class SpsSyncExportStatusController { public class SpsSyncExportStatusController {
@ -229,6 +239,43 @@ public class SpsSyncExportStatusController {
} }
private final SpsSyncDownloadService spsSyncDownloadService;
private final SyncDataSetService syncDataSetService;
private final ThreadPoolTaskExecutor executorConfig;
/**
*
*
* @param req
* @return
*/
@AuthRuleAnnotation("")
@PostMapping("/spssync/udiinfo/syncData")
public BaseResponse syncData(@RequestBody ManualSyncDataReq req) {
if (req.getExportType() == null || req.getSyncTime() == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
SyncDataSetResponse syncDataSetEntity = syncDataSetService.selectSet();
if (syncDataSetEntity.getSyncTime() == null) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK.getCode(), "缺少初始化数据");
}
CompletableFuture future = CompletableFuture.runAsync(() -> {
switch (req.getExportType()) {
case IO_ORDER:
spsSyncDownloadService.syncOrderTask();
break;
case COUNTRY_DI_DATA:
spsSyncDownloadService.syncDiProductsTask();
break;
default:
spsSyncDownloadService.syncData(syncDataSetEntity, req.getExportType(), req.getSyncTime());
}
}, executorConfig);
return ResultVOUtils.success();
}
} }

@ -35,5 +35,4 @@ public class BasicDownloadStatusEntity {
private String remark; private String remark;
@TableField(value = "cacheFilePath") @TableField(value = "cacheFilePath")
private String cacheFilePath; private String cacheFilePath;
private String execInfo;
} }

@ -0,0 +1,18 @@
package com.glxp.api.req.sync;
import com.glxp.api.constant.BasicExportTypeEnum;
import lombok.Data;
import java.util.Date;
/**
*
*/
@Data
public class ManualSyncDataReq {
private BasicExportTypeEnum exportType;
private Date syncTime;
}

@ -176,78 +176,33 @@ public class SpsSyncDownloadService {
* @param info * @param info
* @param exportType * @param exportType
*/ */
public void syncData(SyncDataSetResponse info, BasicExportTypeEnum exportType) { public void syncData(SyncDataSetResponse info, BasicExportTypeEnum exportType, Date syncTime) {
Date now = new Date(); Date now = new Date();
switch (exportType) { switch (exportType) {
case BASIC_DATA: case BASIC_DATA:
if (needExec(info.getBasicProducts(), info.getBasicCorp(), info.getSupCert())) { if (needExec(info.getBasicProducts(), info.getBasicCorp(), info.getSupCert())) {
basicExportInfoCreate(exportType, now basicExportInfoCreate(exportType, now
, x -> x.generateBasicDataFile(info, now, false) , x -> x.generateBasicDataFile(info, now, false, syncTime)
, x -> x.generateBasicDataFile(info, now, true)); , x -> x.generateBasicDataFile(info, now, true, syncTime));
} }
break; break;
case OTHER_DATA: case OTHER_DATA:
if (needExec(info.getUdiCodeLost(), info.getUdiCodeRel())) { if (needExec(info.getUdiCodeLost(), info.getUdiCodeRel())) {
basicExportInfoCreate(exportType, now basicExportInfoCreate(exportType, now
, x -> x.generateOtherDataFile(info, now, false) , x -> x.generateOtherDataFile(info, now, false, syncTime)
, x -> x.generateOtherDataFile(info, now, true)); , x -> x.generateOtherDataFile(info, now, true, syncTime));
} }
break; break;
case DOCUMENT_TYPE_DATA: case DOCUMENT_TYPE_DATA:
if (needExec(info.getTypeBus(), info.getTypeScan(), info.getTypeThird())) { if (needExec(info.getTypeBus(), info.getTypeScan(), info.getTypeThird())) {
basicExportInfoCreate(exportType, now basicExportInfoCreate(exportType, now
, x -> x.generateDocumentTypeDataFile(info, now, false) , x -> x.generateDocumentTypeDataFile(info, now, false, syncTime)
, x -> x.generateDocumentTypeDataFile(info, now, true)); , x -> x.generateDocumentTypeDataFile(info, now, true, syncTime));
} }
break; break;
} }
} }
/**
*
*
* @param info
*/
public void syncBasicData(SyncDataSetResponse info) {
Date now = new Date();
//是否需要执行
boolean needExec = info.getBasicProducts() == 2 || info.getBasicCorp() == 2 || info.getSupCert() == 2;
if (!needExec) {
return;
}
try {
basicExportInfoCreate(BasicExportTypeEnum.BASIC_DATA, now
, x -> x.generateBasicDataFile(info, now, false)
, x -> x.generateBasicDataFile(info, now, true));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
/**
*
*
* @param info
*/
public void syncOtherData(SyncDataSetResponse info) {
Date now = new Date();
//是否需要执行
boolean needExec = info.getUdiCodeLost() == 2 || info.getUdiCodeRel() == 2;
if (!needExec) {
return;
}
try {
basicExportInfoCreate(BasicExportTypeEnum.OTHER_DATA, now
, x -> x.generateOtherDataFile(info, now, false)
, x -> x.generateOtherDataFile(info, now, true));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
/** /**
* *
@ -315,17 +270,25 @@ public class SpsSyncDownloadService {
* @param createFile * @param createFile
* @return true/false / * @return true/false /
*/ */
protected boolean generateBasicDataFile(SyncDataSetResponse info, Date now, boolean createFile) { protected boolean generateBasicDataFile(SyncDataSetResponse info, Date now, boolean createFile, Date syncTime) {
BasicExportTypeEnum exportType = BasicExportTypeEnum.BASIC_DATA; BasicExportTypeEnum exportType = BasicExportTypeEnum.BASIC_DATA;
//文件数据 //文件数据
Map<String, Object> jsonMap = new WeakHashMap<>(4); Map<String, Object> jsonMap = new WeakHashMap<>(4);
List<String> syncFiles = new ArrayList<>(); List<String> syncFiles = new ArrayList<>();
Map<BasicExportStatusTimeEnum, Map<String, Object>> totalTimeMap = new WeakHashMap<>(10); Map<BasicExportStatusTimeEnum, Map<String, Object>> totalTimeMap = new WeakHashMap<>(10);
StringBuffer remark = new StringBuffer(); StringBuffer remark = new StringBuffer();
Map<String, Object> syncTimeMap = new WeakHashMap<>(3);
syncTimeMap.put("isNew", true);
try { try {
//确认有开启物资字典由外向内同步 //确认有开启物资字典由外向内同步
if (needExec(info.getBasicProducts())) { if (needExec(info.getBasicProducts())) {
Map<String, Object> map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.BASIC_PRODUCTS, createFile); Map<String, Object> map;
if (syncTime == null) {
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.BASIC_PRODUCTS, createFile);
} else {
map = syncTimeMap;
now = syncTime;
}
totalTimeMap.put(BasicExportStatusTimeEnum.BASIC_PRODUCTS, map); totalTimeMap.put(BasicExportStatusTimeEnum.BASIC_PRODUCTS, map);
List<BasicHospTypeEntity> hospTypeList = hospTypeService.list(Wrappers.lambdaQuery(BasicHospTypeEntity.class) List<BasicHospTypeEntity> hospTypeList = hospTypeService.list(Wrappers.lambdaQuery(BasicHospTypeEntity.class)
.le((boolean) map.get("isNew"), BasicHospTypeEntity::getUpdateTime, now) .le((boolean) map.get("isNew"), BasicHospTypeEntity::getUpdateTime, now)
@ -366,7 +329,13 @@ public class SpsSyncDownloadService {
} }
//确认有开启往来单位字典同步 //确认有开启往来单位字典同步
if (needExec(info.getBasicCorp())) { if (needExec(info.getBasicCorp())) {
Map<String, Object> map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.BASIC_CORP, createFile); Map<String, Object> map;
if (syncTime == null) {
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.BASIC_CORP, createFile);
} else {
map = syncTimeMap;
now = syncTime;
}
totalTimeMap.put(BasicExportStatusTimeEnum.BASIC_CORP, map); totalTimeMap.put(BasicExportStatusTimeEnum.BASIC_CORP, map);
List<BasicCorpEntity> corpList = corpService.list(Wrappers.lambdaQuery(BasicCorpEntity.class) List<BasicCorpEntity> corpList = corpService.list(Wrappers.lambdaQuery(BasicCorpEntity.class)
.le((boolean) map.get("isNew"), BasicCorpEntity::getUpdateTime, now) .le((boolean) map.get("isNew"), BasicCorpEntity::getUpdateTime, now)
@ -381,7 +350,13 @@ public class SpsSyncDownloadService {
//确认有开启首营资质同步 //确认有开启首营资质同步
if (needExec(info.getSupCert())) { if (needExec(info.getSupCert())) {
Map<String, Object> map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.SUP_CERT, createFile); Map<String, Object> map;
if (syncTime == null) {
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.SUP_CERT, createFile);
} else {
map = syncTimeMap;
now = syncTime;
}
totalTimeMap.put(BasicExportStatusTimeEnum.SUP_CERT, map); totalTimeMap.put(BasicExportStatusTimeEnum.SUP_CERT, map);
List<SupCertEntity> supCertList = supCertService.list(Wrappers.lambdaQuery(SupCertEntity.class) List<SupCertEntity> supCertList = supCertService.list(Wrappers.lambdaQuery(SupCertEntity.class)
.le((boolean) map.get("isNew"), SupCertEntity::getUpdateTime, now) .le((boolean) map.get("isNew"), SupCertEntity::getUpdateTime, now)
@ -488,16 +463,24 @@ public class SpsSyncDownloadService {
* @param createFile * @param createFile
* @return true/false / * @return true/false /
*/ */
protected boolean generateOtherDataFile(SyncDataSetResponse info, Date now, boolean createFile) { protected boolean generateOtherDataFile(SyncDataSetResponse info, Date now, boolean createFile, Date syncTime) {
StringBuffer remark = new StringBuffer(); StringBuffer remark = new StringBuffer();
BasicExportTypeEnum exportType = BasicExportTypeEnum.OTHER_DATA; BasicExportTypeEnum exportType = BasicExportTypeEnum.OTHER_DATA;
//文件数据 //文件数据
Map<String, Object> jsonMap = new WeakHashMap<>(4); Map<String, Object> jsonMap = new WeakHashMap<>(4);
Map<BasicExportStatusTimeEnum, Map<String, Object>> totalTimeMap = new WeakHashMap<>(10); Map<BasicExportStatusTimeEnum, Map<String, Object>> totalTimeMap = new WeakHashMap<>(10);
Map<String, Object> syncTimeMap = new WeakHashMap<>(3);
syncTimeMap.put("isNew", true);
try { try {
//确认有开启物资字典由外向内同步 //确认有开启物资字典由外向内同步
if (info.getUdiCodeLost() == 2) { if (info.getUdiCodeLost() == 2) {
Map<String, Object> map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.IO_CODE_LOST, createFile); Map<String, Object> map;
if (syncTime == null) {
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.IO_CODE_LOST, createFile);
} else {
map = syncTimeMap;
now = syncTime;
}
totalTimeMap.put(BasicExportStatusTimeEnum.IO_CODE_LOST, map); totalTimeMap.put(BasicExportStatusTimeEnum.IO_CODE_LOST, map);
List<IoCodeLostEntity> ioCodeLostList = ioCodeLostService.list(Wrappers.lambdaQuery(IoCodeLostEntity.class) List<IoCodeLostEntity> ioCodeLostList = ioCodeLostService.list(Wrappers.lambdaQuery(IoCodeLostEntity.class)
.le((boolean) map.get("isNew"), IoCodeLostEntity::getUpdateTime, now) .le((boolean) map.get("isNew"), IoCodeLostEntity::getUpdateTime, now)
@ -511,7 +494,13 @@ public class SpsSyncDownloadService {
} }
//确认有开启udi关联关系同步 //确认有开启udi关联关系同步
if (info.getUdiCodeRel() == 2) { if (info.getUdiCodeRel() == 2) {
Map<String, Object> map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.IO_CODE_REL, createFile); Map<String, Object> map;
if (syncTime == null) {
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.IO_CODE_REL, createFile);
} else {
map = syncTimeMap;
now = syncTime;
}
totalTimeMap.put(BasicExportStatusTimeEnum.IO_CODE_REL, map); totalTimeMap.put(BasicExportStatusTimeEnum.IO_CODE_REL, map);
List<IoCodeRelEntity> ioCodeRelList = ioCodeRelService.list(Wrappers.lambdaQuery(IoCodeRelEntity.class) List<IoCodeRelEntity> ioCodeRelList = ioCodeRelService.list(Wrappers.lambdaQuery(IoCodeRelEntity.class)
.le((boolean) map.get("isNew"), IoCodeRelEntity::getUpdateTime, now) .le((boolean) map.get("isNew"), IoCodeRelEntity::getUpdateTime, now)
@ -572,16 +561,24 @@ public class SpsSyncDownloadService {
* @param createFile * @param createFile
* @return true/false / * @return true/false /
*/ */
protected boolean generateDocumentTypeDataFile(SyncDataSetResponse info, Date now, boolean createFile) { protected boolean generateDocumentTypeDataFile(SyncDataSetResponse info, Date now, boolean createFile, Date syncTime) {
StringBuffer remark = new StringBuffer(); StringBuffer remark = new StringBuffer();
BasicExportTypeEnum exportType = BasicExportTypeEnum.DOCUMENT_TYPE_DATA; BasicExportTypeEnum exportType = BasicExportTypeEnum.DOCUMENT_TYPE_DATA;
//文件数据 //文件数据
Map<String, Object> jsonMap = new WeakHashMap<>(4); Map<String, Object> jsonMap = new WeakHashMap<>(4);
Map<BasicExportStatusTimeEnum, Map<String, Object>> totalTimeMap = new WeakHashMap<>(10); Map<BasicExportStatusTimeEnum, Map<String, Object>> totalTimeMap = new WeakHashMap<>(10);
Map<String, Object> syncTimeMap = new WeakHashMap<>(3);
syncTimeMap.put("isNew", true);
try { try {
//确认有开启业务单据类型同步 //确认有开启业务单据类型同步
if (needExec(info.getTypeBus())) { if (needExec(info.getTypeBus())) {
Map<String, Object> map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.BASIC_BUSSINESS_TYPE, createFile); Map<String, Object> map;
if (syncTime == null) {
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.BASIC_BUSSINESS_TYPE, createFile);
} else {
map = syncTimeMap;
now = syncTime;
}
totalTimeMap.put(BasicExportStatusTimeEnum.BASIC_BUSSINESS_TYPE, map); totalTimeMap.put(BasicExportStatusTimeEnum.BASIC_BUSSINESS_TYPE, map);
List<BasicBussinessTypeEntity> bussinessTypeEntities = bussinessTypeService.list(Wrappers.lambdaQuery(BasicBussinessTypeEntity.class) List<BasicBussinessTypeEntity> bussinessTypeEntities = bussinessTypeService.list(Wrappers.lambdaQuery(BasicBussinessTypeEntity.class)
.le((boolean) map.get("isNew"), BasicBussinessTypeEntity::getUpdateTime, now) .le((boolean) map.get("isNew"), BasicBussinessTypeEntity::getUpdateTime, now)
@ -595,7 +592,13 @@ public class SpsSyncDownloadService {
} }
//确认有开启扫码单据类型同步 //确认有开启扫码单据类型同步
if (needExec(info.getTypeScan())) { if (needExec(info.getTypeScan())) {
Map<String, Object> map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.BASIC_BUSTYPE_CHANGE, createFile); Map<String, Object> map;
if (syncTime == null) {
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.BASIC_BUSTYPE_CHANGE, createFile);
} else {
map = syncTimeMap;
now = syncTime;
}
totalTimeMap.put(BasicExportStatusTimeEnum.BASIC_BUSTYPE_CHANGE, map); totalTimeMap.put(BasicExportStatusTimeEnum.BASIC_BUSTYPE_CHANGE, map);
List<BasicBusTypeChangeEntity> busTypeChangeEntities = busTypeChangeService.list(Wrappers.lambdaQuery(BasicBusTypeChangeEntity.class) List<BasicBusTypeChangeEntity> busTypeChangeEntities = busTypeChangeService.list(Wrappers.lambdaQuery(BasicBusTypeChangeEntity.class)
.le((boolean) map.get("isNew"), BasicBusTypeChangeEntity::getUpdateTime, now) .le((boolean) map.get("isNew"), BasicBusTypeChangeEntity::getUpdateTime, now)
@ -609,7 +612,13 @@ public class SpsSyncDownloadService {
} }
//确认有开启第三方单据类型同步 //确认有开启第三方单据类型同步
if (needExec(info.getTypeThird())) { if (needExec(info.getTypeThird())) {
Map<String, Object> map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.THR_BUSTYPE_ORIGIN, createFile); Map<String, Object> map;
if (syncTime == null) {
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.THR_BUSTYPE_ORIGIN, createFile);
} else {
map = syncTimeMap;
now = syncTime;
}
totalTimeMap.put(BasicExportStatusTimeEnum.THR_BUSTYPE_ORIGIN, map); totalTimeMap.put(BasicExportStatusTimeEnum.THR_BUSTYPE_ORIGIN, map);
List<ThrBusTypeOriginEntity> thrBusTypeOriginEntities = thrBusTypeOriginService.list(Wrappers.lambdaQuery(ThrBusTypeOriginEntity.class) List<ThrBusTypeOriginEntity> thrBusTypeOriginEntities = thrBusTypeOriginService.list(Wrappers.lambdaQuery(ThrBusTypeOriginEntity.class)
.le((boolean) map.get("isNew"), ThrBusTypeOriginEntity::getUpdateTime, now) .le((boolean) map.get("isNew"), ThrBusTypeOriginEntity::getUpdateTime, now)

@ -68,7 +68,7 @@ public class AsyncHeartTask implements SchedulingConfigurer {
spsSyncDownloadService.syncDiProductsTask(); spsSyncDownloadService.syncDiProductsTask();
// todo 生成任务都写在这 // todo 生成任务都写在这
Arrays.stream(BasicExportTypeEnum.values()).forEach(i -> { Arrays.stream(BasicExportTypeEnum.values()).forEach(i -> {
spsSyncDownloadService.syncData(syncDataSetEntity, i); spsSyncDownloadService.syncData(syncDataSetEntity, i, null);
}); });
// spsSyncDownloadService.syncBasicData(syncDataSetEntity); // spsSyncDownloadService.syncBasicData(syncDataSetEntity);
// spsSyncDownloadService.syncOtherData(syncDataSetEntity); // spsSyncDownloadService.syncOtherData(syncDataSetEntity);

@ -1,7 +1,5 @@
# 字段新增 表名字段名字段类型修改方式1新增2修改3删除 # 字段新增 表名字段名字段类型修改方式1新增2修改3删除
CALL Pro_Temp_ColumnWork('basic_download_status', 'execInfo',
'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('basic_download_status', 'cacheFilePath', CALL Pro_Temp_ColumnWork('basic_download_status', 'cacheFilePath',
'varchar(255) ', 1); 'varchar(255) ', 1);

Loading…
Cancel
Save