|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.glxp.api.service.thrsys;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import cn.hutool.core.io.file.FileWriter;
|
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
@ -77,7 +78,7 @@ public class ThrCorpsDlService {
|
|
|
|
|
thrCorpImportDetailEntities = thrCorpsResponseList.stream().map(
|
|
|
|
|
item -> {
|
|
|
|
|
ThrCorpImportDetailEntity thrCorpEntity = new ThrCorpImportDetailEntity();
|
|
|
|
|
BeanUtils.copyProperties(item, thrCorpEntity);
|
|
|
|
|
BeanUtil.copyProperties(item, thrCorpEntity);
|
|
|
|
|
thrCorpEntity.setUnitId(item.getUnitId());
|
|
|
|
|
thrCorpEntity.setUpdateTime(new Date());
|
|
|
|
|
thrCorpEntity.setCreateTime(new Date());
|
|
|
|
@ -95,7 +96,7 @@ public class ThrCorpsDlService {
|
|
|
|
|
List<ThrCorpEntity> thrCorpEntities = temps.stream().map(
|
|
|
|
|
item -> {
|
|
|
|
|
ThrCorpEntity thrProductsEntity = new ThrCorpEntity();
|
|
|
|
|
BeanUtils.copyProperties(item, thrProductsEntity);
|
|
|
|
|
BeanUtil.copyProperties(item, thrProductsEntity);
|
|
|
|
|
thrProductsEntity.setThirdSysFk(thirdSys);
|
|
|
|
|
thrProductsEntity.setUpdateTime(new Date());
|
|
|
|
|
thrProductsEntity.setCreateTime(new Date());
|
|
|
|
@ -135,7 +136,7 @@ public class ThrCorpsDlService {
|
|
|
|
|
List<ThrCorpEntity> thrCorpEntities = thrCorpImportDetailEntities.stream().map(
|
|
|
|
|
item -> {
|
|
|
|
|
ThrCorpEntity thrProductsEntity = new ThrCorpEntity();
|
|
|
|
|
BeanUtils.copyProperties(item, thrProductsEntity);
|
|
|
|
|
BeanUtil.copyProperties(item, thrProductsEntity);
|
|
|
|
|
thrProductsEntity.setUpdateTime(new Date());
|
|
|
|
|
thrProductsEntity.setThirdSysFk(thirdSys);
|
|
|
|
|
return thrProductsEntity;
|
|
|
|
@ -206,7 +207,7 @@ public class ThrCorpsDlService {
|
|
|
|
|
} else {
|
|
|
|
|
//根据查询条件一键导出数据库往来单位
|
|
|
|
|
FilterThrCorpRequest filterThrCorpRequest = new FilterThrCorpRequest();
|
|
|
|
|
BeanUtils.copyProperties(thrCorpExportRequest, filterThrCorpRequest);
|
|
|
|
|
BeanUtil.copyProperties(thrCorpExportRequest, filterThrCorpRequest);
|
|
|
|
|
filterThrCorpRequest.setPage(null);
|
|
|
|
|
List<List<String>> genDatas = genExcelData(filterThrCorpRequest);
|
|
|
|
|
if (genDatas != null && genDatas.size() > 0) {
|
|
|
|
@ -234,7 +235,7 @@ public class ThrCorpsDlService {
|
|
|
|
|
thrCorpImportDetailEntities = thrCorpsResponseList.stream().map(
|
|
|
|
|
item -> {
|
|
|
|
|
ThrCorpImportDetailEntity thrCorpEntity = new ThrCorpImportDetailEntity();
|
|
|
|
|
BeanUtils.copyProperties(item, thrCorpEntity);
|
|
|
|
|
BeanUtil.copyProperties(item, thrCorpEntity);
|
|
|
|
|
thrCorpEntity.setGenKeyFk(finalGenKey);
|
|
|
|
|
thrCorpEntity.setUpdateTime(new Date());
|
|
|
|
|
thrCorpEntity.setThirdSysFk(thirdSys);
|
|
|
|
@ -245,7 +246,7 @@ public class ThrCorpsDlService {
|
|
|
|
|
thrCorpEntities = thrCorpImportDetailEntities.stream().map(
|
|
|
|
|
item -> {
|
|
|
|
|
ThrCorpEntity thrCorpEntity = new ThrCorpEntity();
|
|
|
|
|
BeanUtils.copyProperties(item, thrCorpEntity);
|
|
|
|
|
BeanUtil.copyProperties(item, thrCorpEntity);
|
|
|
|
|
// thrCorpEntity.setUnitId(item.getId());
|
|
|
|
|
thrCorpEntity.setUpdateTime(new Date());
|
|
|
|
|
thrCorpEntity.setThirdSysFk(thirdSys);
|
|
|
|
@ -280,7 +281,7 @@ public class ThrCorpsDlService {
|
|
|
|
|
thrCorpImportDetailEntities = erpUnitsResponses.stream().map(
|
|
|
|
|
item -> {
|
|
|
|
|
ThrCorpImportDetailEntity thrCorpEntity = new ThrCorpImportDetailEntity();
|
|
|
|
|
BeanUtils.copyProperties(item, thrCorpEntity);
|
|
|
|
|
BeanUtil.copyProperties(item, thrCorpEntity);
|
|
|
|
|
thrCorpEntity.setUnitId(item.getUnitId());
|
|
|
|
|
thrCorpEntity.setGenKeyFk(finalGenKey);
|
|
|
|
|
thrCorpEntity.setUpdateTime(new Date());
|
|
|
|
@ -340,7 +341,7 @@ public class ThrCorpsDlService {
|
|
|
|
|
List<ThrCorpEntity> thrCorpEntities = erpUnitsResponses.stream().map(
|
|
|
|
|
item -> {
|
|
|
|
|
ThrCorpEntity thrProductsEntity = new ThrCorpEntity();
|
|
|
|
|
BeanUtils.copyProperties(item, thrProductsEntity);
|
|
|
|
|
BeanUtil.copyProperties(item, thrProductsEntity);
|
|
|
|
|
thrProductsEntity.setUnitId(item.getId());
|
|
|
|
|
return thrProductsEntity;
|
|
|
|
|
}
|
|
|
|
@ -359,7 +360,7 @@ public class ThrCorpsDlService {
|
|
|
|
|
thrCorpEntityList = thrCorpsResponseList.stream().map(
|
|
|
|
|
item -> {
|
|
|
|
|
ThrCorpEntity thrCorpEntity = new ThrCorpEntity();
|
|
|
|
|
BeanUtils.copyProperties(item, thrCorpEntity);
|
|
|
|
|
BeanUtil.copyProperties(item, thrCorpEntity);
|
|
|
|
|
return thrCorpEntity;
|
|
|
|
|
}
|
|
|
|
|
).collect(Collectors.toList());
|
|
|
|
@ -421,14 +422,14 @@ public class ThrCorpsDlService {
|
|
|
|
|
//根据查询条件一键导出数据库往来单位
|
|
|
|
|
List<ThrCorpEntity> thrCorpEntityList = new ArrayList<>();
|
|
|
|
|
FilterThrCorpRequest filterThrCorpRequest = new FilterThrCorpRequest();
|
|
|
|
|
BeanUtils.copyProperties(thrCorpExportRequest, filterThrCorpRequest);
|
|
|
|
|
BeanUtil.copyProperties(thrCorpExportRequest, filterThrCorpRequest);
|
|
|
|
|
filterThrCorpRequest.setPage(null);
|
|
|
|
|
List<ThrCorpsResponse> thrCorpsResponseList = thrCorpService.filterThrCorps(filterThrCorpRequest);
|
|
|
|
|
if (thrCorpsResponseList.size() > 0) {
|
|
|
|
|
thrCorpEntityList = thrCorpsResponseList.stream().map(
|
|
|
|
|
item -> {
|
|
|
|
|
ThrCorpEntity thrCorpEntity = new ThrCorpEntity();
|
|
|
|
|
BeanUtils.copyProperties(item, thrCorpEntity);
|
|
|
|
|
BeanUtil.copyProperties(item, thrCorpEntity);
|
|
|
|
|
return thrCorpEntity;
|
|
|
|
|
}
|
|
|
|
|
).collect(Collectors.toList());
|
|
|
|
@ -478,14 +479,14 @@ public class ThrCorpsDlService {
|
|
|
|
|
//根据查询条件一键导出数据库往来单位
|
|
|
|
|
List<ThrCorpEntity> thrCorpEntityList = new ArrayList<>();
|
|
|
|
|
FilterThrCorpRequest filterThrCorpRequest = new FilterThrCorpRequest();
|
|
|
|
|
BeanUtils.copyProperties(thrCorpExportRequest, filterThrCorpRequest);
|
|
|
|
|
BeanUtil.copyProperties(thrCorpExportRequest, filterThrCorpRequest);
|
|
|
|
|
filterThrCorpRequest.setPage(null);
|
|
|
|
|
List<ThrCorpsResponse> thrCorpsResponseList = thrCorpService.filterThrCorps(filterThrCorpRequest);
|
|
|
|
|
if (thrCorpsResponseList.size() > 0) {
|
|
|
|
|
thrCorpEntityList = thrCorpsResponseList.stream().map(
|
|
|
|
|
item -> {
|
|
|
|
|
ThrCorpEntity thrCorpEntity = new ThrCorpEntity();
|
|
|
|
|
BeanUtils.copyProperties(item, thrCorpEntity);
|
|
|
|
|
BeanUtil.copyProperties(item, thrCorpEntity);
|
|
|
|
|
return thrCorpEntity;
|
|
|
|
|
}
|
|
|
|
|
).collect(Collectors.toList());
|
|
|
|
|