增加执行信息

master
wj 2 years ago
parent 9434f89b5c
commit 98c0b2ed30

@ -66,8 +66,10 @@ 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 = "同步下载相关")
@ -333,28 +335,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:
saveUploadBasicData(JSONUtil.toBean(obj, SpsSyncBasicDataResponse.class)); log = saveUploadBasicData(JSONUtil.toBean(obj, SpsSyncBasicDataResponse.class));
break; break;
case OTHER_DATA: case OTHER_DATA:
saveUploadOtherData(JSONUtil.toBean(obj, SpsSyncOtherDataResponse.class)); log = saveUploadOtherData(JSONUtil.toBean(obj, SpsSyncOtherDataResponse.class));
break; break;
case DOCUMENT_TYPE_DATA: case DOCUMENT_TYPE_DATA:
saveUploadDocumentTypeData(JSONUtil.toBean(obj, SpsSyncBusResponse.class)); log = saveUploadDocumentTypeData(JSONUtil.toBean(obj, SpsSyncBusResponse.class));
break; break;
case USER_DATA: case USER_DATA:
saveUploadUserData(JSONUtil.toBean(obj, SpsSyncDataResponse.class)); log = saveUploadUserData(JSONUtil.toBean(obj, SpsSyncDataResponse.class));
break; break;
case THIRD_DATA: case THIRD_DATA:
saveUploadThrData(JSONUtil.toBean(obj, SpsSyncThrDataResponse.class)); log = saveUploadThrData(JSONUtil.toBean(obj, SpsSyncThrDataResponse.class));
break; break;
case SYS_SET_DATA: case SYS_SET_DATA:
saveUploadSysSettingData(JSONUtil.toBean(obj, SpsSyncSysSettingResponse.class)); log = saveUploadSysSettingData(JSONUtil.toBean(obj, SpsSyncSysSettingResponse.class));
break; break;
} }
String taskId = obj.getStr("taskId"); String taskId = obj.getStr("taskId");
@ -368,6 +370,7 @@ 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);
@ -375,7 +378,7 @@ public class SpsSyncDownloadController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return ResultVOUtils.error(ResultEnum.NOT_NETWORK, e.getMessage()); return ResultVOUtils.error(ResultEnum.NOT_NETWORK.getCode(), e.getMessage());
} }
} }
@ -413,40 +416,120 @@ public class SpsSyncDownloadController {
private final BasicBusTypeChangeDao basicBusTypeChangeDao; private final BasicBusTypeChangeDao basicBusTypeChangeDao;
private void saveUploadSysSettingData(SpsSyncSysSettingResponse bean) { private String saveUploadSysSettingData(SpsSyncSysSettingResponse bean) {
List<String> success = new ArrayList<>();
List<String> fail = new ArrayList<>();
if (CollectionUtil.isNotEmpty(bean.getSystemParamConfigEntities())) { if (CollectionUtil.isNotEmpty(bean.getSystemParamConfigEntities())) {
systemParamConfigDao.insertOrUpdateBatch(bean.getSystemParamConfigEntities()); String desc = "运行参数设置信息:";
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())) {
entrustReceDao.insertOrUpdateBatch(bean.getEntrustReceEntities()); String desc = "委托验收设置信息:";
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())) {
systemPDFModuleDao.insertOrUpdateBatch(bean.getSystemPDFModuleEntities()); String desc = "系统模板模块信息:";
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())) {
for (SystemPDFTemplateEntity systemPDFTemplateEntity : bean.getSystemPDFTemplateEntities()) String desc = "模板信息:";
systemPDFTemplateDao.insertOrUpdate(systemPDFTemplateEntity); boolean flag = true;
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())) {
sysPdfTemplateRelevanceCodeDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceCodeEntities()); String desc = "扫码单据关联模板信息:";
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())) {
sysPdfTemplateRelevanceBizDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceBizEntities()); String desc = "业务单据关联模板信息:";
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())) {
sysPdfTemplateRelevanceLabelDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceLabelEntities()); String desc = "标签关联模板信息:";
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())) {
sysPdfTemplateRelevanceStatemenDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceStatemenEntities()); String desc = "报表关联模板信息:";
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())) {
basicBusTypePreDao.insertOrUpdateBatch(bean.getBasicBusTypePreEntities()); String desc = "出入库单自动补单设置信息:";
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())) {
basicBusTypeChangeDao.insertOrUpdateBatch(bean.getBasicBusTypeChangeEntities()); String desc = "业务单自动补单设置信息:";
try {
basicBusTypeChangeDao.insertOrUpdateBatch(bean.getBasicBusTypeChangeEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
success.addAll(fail);
return String.join(",", success);
} }
@ -455,50 +538,147 @@ public class SpsSyncDownloadController {
private final ThrProductsDao thrProductsDao; private final ThrProductsDao thrProductsDao;
private final ThrCorpDao thrCorpDao; private final ThrCorpDao thrCorpDao;
private void saveUploadThrData(SpsSyncThrDataResponse bean) { private String saveUploadThrData(SpsSyncThrDataResponse bean) {
List<String> success = new ArrayList<>();
List<String> fail = new ArrayList<>();
if (CollectionUtil.isNotEmpty(bean.getDeptEntities())) { if (CollectionUtil.isNotEmpty(bean.getDeptEntities())) {
thrDeptDao.insertOrUpdateBatch(bean.getDeptEntities()); String desc = "第三方部门信息:";
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())) {
thrInvWarehouseDao.insertOrUpdateBatch(bean.getInvWarehouseEntities()); String desc = "第三方仓库信息:";
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())) {
thrProductsDao.insertOrUpdateBatch(bean.getProductsEntityList()); String desc = "第三方产品信息:";
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())) {
thrCorpDao.insertOrUpdateBatch(bean.getCorpEntities()); String desc = "第三方往来信息:";
try {
thrCorpDao.insertOrUpdateBatch(bean.getCorpEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
success.addAll(fail);
return String.join(",", success);
} }
private void saveUploadUserData(SpsSyncDataResponse bean) { private String saveUploadUserData(SpsSyncDataResponse bean) {
List<String> success = new ArrayList<>();
List<String> fail = new ArrayList<>();
if (CollectionUtil.isNotEmpty(bean.getAuthAdminList())) { if (CollectionUtil.isNotEmpty(bean.getAuthAdminList())) {
authAdminDao.insertOrUpdateBatch(bean.getAuthAdminList()); String desc = "系统用户信息:";
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())) {
deptDao.insertOrUpdateBatch(bean.getDeptEntityList()); String desc = "部门信息:";
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())) {
deptUserDao.replaceBatch(bean.getDeptUserEntities()); String desc = "部门用户信息:";
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())) {
invWarehouseDao.insertOrUpdateBatch(bean.getInvWarehouseEntities()); String desc = "仓库字典信息:";
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())) {
warehouseUserDao.insertOrUpdateBatch(bean.getWarehouseUserEntities()); String desc = "仓库用户信息:";
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())) {
for (WarehouseBussinessTypeEntity warehouseBussinessTypeEntity : bean.getWarehouseBussinessTypeEntities()) { String desc = "仓库单据类型信息:";
warehouseBussinessTypeDao.insertOrUpdate(warehouseBussinessTypeEntity); boolean flag = true;
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())) {
invSpaceDao.insertOrUpdateBatch(bean.getInvSpaces()); String desc = "货位信息:";
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())) {
invBusUserDao.insertOrUpdateBatch(bean.getInvBusUserEntities()); String desc = "用户关联单据信息:";
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;
@ -511,16 +691,41 @@ public class SpsSyncDownloadController {
* *
* @param bean * @param bean
*/ */
private void saveUploadDocumentTypeData(SpsSyncBusResponse bean) { private String saveUploadDocumentTypeData(SpsSyncBusResponse bean) {
List<String> success = new ArrayList<>();
List<String> fail = new ArrayList<>();
if (CollectionUtil.isNotEmpty(bean.getBussinessTypeEntities())) { if (CollectionUtil.isNotEmpty(bean.getBussinessTypeEntities())) {
basicBussinessTypeDao.insertOrUpdateBatch(bean.getBussinessTypeEntities()); String desc = "扫码单据类型信息:";
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())) {
busTypeChangeDao.insertOrUpdateBatch(bean.getBusTypeChangeEntities()); String desc = "业务单据类型:";
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())) {
thrBusTypeOriginDao.insertOrUpdateBatch(bean.getThrBusTypeOriginEntities()); String desc = "第三方单据类型信息:";
try {
thrBusTypeOriginDao.insertOrUpdateBatch(bean.getThrBusTypeOriginEntities());
success.add(desc + "成功");
} catch (Exception e) {
e.printStackTrace();
fail.add(desc + "失败");
}
} }
success.addAll(fail);
return String.join(",", success);
} }
@ -532,14 +737,31 @@ public class SpsSyncDownloadController {
* *
* @param bean * @param bean
*/ */
private void saveUploadOtherData(SpsSyncOtherDataResponse bean) { private String saveUploadOtherData(SpsSyncOtherDataResponse bean) {
List<String> success = new ArrayList<>();
List<String> fail = new ArrayList<>();
if (CollectionUtil.isNotEmpty(bean.getIoCodeLostList())) { if (CollectionUtil.isNotEmpty(bean.getIoCodeLostList())) {
ioCodeLostMapper.insertOrUpdateBatch(bean.getIoCodeLostList()); String desc = "UDI码补齐信息";
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())) {
ioCodeRelMapper.insertOrUpdateBatch(bean.getIoCodeRelList()); String desc = "UDI码关联关系";
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;
@ -558,37 +780,101 @@ public class SpsSyncDownloadController {
* *
* @param bean * @param bean
*/ */
private void saveUploadBasicData(SpsSyncBasicDataResponse bean) { private String saveUploadBasicData(SpsSyncBasicDataResponse bean) {
List<String> success = new ArrayList<>();
List<String> fail = new ArrayList<>();
if (CollectionUtil.isNotEmpty(bean.getHospTypeList())) { if (CollectionUtil.isNotEmpty(bean.getHospTypeList())) {
basicHospTypeDao.insertOrUpdateBatch(bean.getHospTypeList()); String desc = "物资字典分类信息:";
try {
basicHospTypeDao.insertOrUpdateBatch(bean.getHospTypeList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getUdiRelevanceList())) { if (CollectionUtil.isNotEmpty(bean.getUdiRelevanceList())) {
udiRelevanceDao.insertOrUpdateBatch(bean.getUdiRelevanceList()); String desc = "物资字典主表信息:";
try {
udiRelevanceDao.insertOrUpdateBatch(bean.getUdiRelevanceList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getProductsList())) { if (CollectionUtil.isNotEmpty(bean.getProductsList())) {
basicProductsDao.insertOrUpdateBatch(bean.getProductsList()); String desc = "供应商物资字典信息:";
try {
basicProductsDao.insertOrUpdateBatch(bean.getProductsList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getRelevanceList())) { if (CollectionUtil.isNotEmpty(bean.getRelevanceList())) {
relevanceDao.insertOrUpdateBatch(bean.getRelevanceList()); String desc = "物资字典子表信息:";
try {
relevanceDao.insertOrUpdateBatch(bean.getRelevanceList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getCorpList())) { if (CollectionUtil.isNotEmpty(bean.getCorpList())) {
corpDao.insertOrUpdateBatch(bean.getCorpList()); String desc = "往来单位信息:";
try {
corpDao.insertOrUpdateBatch(bean.getCorpList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getSupCertList())) { if (CollectionUtil.isNotEmpty(bean.getSupCertList())) {
supCertDao.insertOrUpdateBatch(bean.getSupCertList()); String desc = "资质证书信息:";
try {
supCertDao.insertOrUpdateBatch(bean.getSupCertList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getSupCertSetList())) { if (CollectionUtil.isNotEmpty(bean.getSupCertSetList())) {
supCertSetDao.insertOrUpdateBatch(bean.getSupCertSetList()); String desc = "资质证书要求设置信息:";
try {
supCertSetDao.insertOrUpdateBatch(bean.getSupCertSetList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getSupCompanyList())) { if (CollectionUtil.isNotEmpty(bean.getSupCompanyList())) {
supCompanyDao.insertOrUpdateBatch(bean.getSupCompanyList()); String desc = "供应商资质信息:";
try {
supCompanyDao.insertOrUpdateBatch(bean.getSupCompanyList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getSupManufacturerList())) { if (CollectionUtil.isNotEmpty(bean.getSupManufacturerList())) {
supManufacturerDao.insertOrUpdateBatch(bean.getSupManufacturerList()); String desc = "生产企业资质信息:";
try {
supManufacturerDao.insertOrUpdateBatch(bean.getSupManufacturerList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
if (CollectionUtil.isNotEmpty(bean.getSupProductList())) { if (CollectionUtil.isNotEmpty(bean.getSupProductList())) {
supProductDao.insertOrUpdateBatch(bean.getSupProductList()); String desc = "配送产品资质信息:";
try {
supProductDao.insertOrUpdateBatch(bean.getSupProductList());
success.add(desc + "成功");
} catch (Exception e) {
fail.add(desc + "失败");
}
} }
success.addAll(fail);
return String.join(",", success);
} }
@Resource @Resource

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

@ -1,5 +1,8 @@
# 字段新增 表名字段名字段类型修改方式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