|
@@ -35,6 +35,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.codec.digest.DigestUtils;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
+import org.apache.poi.xwpf.usermodel.TOC;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -281,6 +282,7 @@ public class EntryServiceImpl implements EntryService {
|
|
|
resultModel.setCode(Constant.INTERFACE_STATUS_CODE_3351);
|
|
|
// todo 也要做。
|
|
|
resultModel.setMessage("文件不能为空或文件类型不匹配,请上传正确类型的文件后再试!");
|
|
|
+ uploadMapper.deleteById(upload.getId());
|
|
|
return resultModel;
|
|
|
} else {
|
|
|
Map<String, Object> checkMap = toCheckData(parselist, uploadParam.getFileType(), uploadParam.getNodeId());
|
|
@@ -307,6 +309,7 @@ public class EntryServiceImpl implements EntryService {
|
|
|
resultModel.setCode(Constant.INTERFACE_STATUS_CODE_3351);
|
|
|
// todo 也要做。
|
|
|
resultModel.setMessage("文件内容不能为空,请勿上传空文件!");
|
|
|
+ uploadMapper.deleteById(upload.getId());
|
|
|
return resultModel;
|
|
|
}else {
|
|
|
resultModel.setCode(Constant.INTERFACE_STATUS_CODE_3350);
|
|
@@ -437,11 +440,17 @@ public class EntryServiceImpl implements EntryService {
|
|
|
List<CompanyMunicipalResearch> companyMunicipalResearches = new ArrayList<>();
|
|
|
//飞地在建研发中心
|
|
|
List<CompanyFeidi> companyFeidis = new ArrayList<>();
|
|
|
+ //税务数据
|
|
|
+ List<List<CompanyYearMultipleoptionsLk>> years = new ArrayList<>();
|
|
|
+ List<CompanyYearMultipleoptionsLk> taxs = new ArrayList<>();
|
|
|
if ("320117400".equals(nodeId)) {
|
|
|
List<EnterpriseBasicInfoExcelDataLishui> excelDatas = JSONObject.parseArray(JSONObject.toJSONString(basicInfos), EnterpriseBasicInfoExcelDataLishui.class);
|
|
|
for (EnterpriseBasicInfoExcelDataLishui excelData : excelDatas) {
|
|
|
OrganizationInfo info = new OrganizationInfo();
|
|
|
BeanUtils.copyProperties(excelData,info);
|
|
|
+ info.setRegionid(Long.valueOf(nodeId));
|
|
|
+ info.setOrgtype(10104L);
|
|
|
+ info.setIsenabled(1);
|
|
|
info.setCategoryname(StringUtils.isNotEmpty(excelData.getCategory()) ? excelData.getCategory() : "");
|
|
|
info.setCategoryid(StringUtils.isNotEmpty(excelData.getCategory()) ? domainNameToType(excelData.getCategory()) : "");
|
|
|
info.setPeopleengagedNum(StringUtils.isNotEmpty(excelData.getPeopleengagedNum()) ? Integer.valueOf(excelData.getPeopleengagedNum()) : 0);
|
|
@@ -457,6 +466,8 @@ public class EntryServiceImpl implements EntryService {
|
|
|
for (EnterpriseBasicInfoExcelData excelData : excelDatas) {
|
|
|
OrganizationInfo info = new OrganizationInfo();
|
|
|
BeanUtils.copyProperties(excelData, info);
|
|
|
+ info.setRegionid(Long.valueOf(nodeId));
|
|
|
+ info.setIsenabled(1);
|
|
|
info.setRegistrationcapital(StringUtils.isNotBlank(excelData.getRegistrationcapital()) ? Long.valueOf(excelData.getRegistrationcapital()) : 0);
|
|
|
info.setPracticalcapital(StringUtils.isNotBlank(excelData.getPracticalcapital()) ? Float.valueOf(excelData.getPracticalcapital()) : 0);
|
|
|
info.setRegistrationdate(StringUtils.isNotBlank(excelData.getRegistrationdate()) ? DateUtils.stringToDate(excelData.getRegistrationdate()) : null);
|
|
@@ -484,11 +495,17 @@ public class EntryServiceImpl implements EntryService {
|
|
|
info.setFeidiarea(StringUtils.isNotBlank(excelData.getFeidiarea()) ? Double.valueOf(excelData.getFeidiarea()) : 0);
|
|
|
info.setWorkercount(StringUtils.isNotBlank(excelData.getWorkercount()) ? Integer.valueOf(excelData.getWorkercount()) : 0);
|
|
|
info.setHasregulationorg("是".equals(excelData.getHasregulationorg()) ? 1 : 0);
|
|
|
+ info.setThreeyearsrevenue(StringUtils.isNotEmpty(excelData.getThreeyearsrevenue()) ? Double.valueOf(excelData.getThreeyearsrevenue()) : 0);
|
|
|
+ info.setThreeyeardeductexpenses(StringUtils.isNotEmpty(excelData.getThreeyeardeductexpenses()) ? Double.valueOf(excelData.getThreeyeardeductexpenses()) : 0);
|
|
|
+ info.setTwoyearrevenue(StringUtils.isNotEmpty(excelData.getTwoyearrevenue()) ? Double.valueOf(excelData.getTwoyearrevenue()) : 0);
|
|
|
+ info.setTwoyeardeductexpenses(StringUtils.isNotEmpty(excelData.getTwoyeardeductexpenses()) ? Double.valueOf(excelData.getTwoyeardeductexpenses()) : 0);
|
|
|
+ info.setLastyearrevenue(StringUtils.isNotEmpty(excelData.getLastyearrevenue()) ? Double.valueOf(excelData.getLastyearrevenue()) : 0);
|
|
|
+ info.setLastyeardeductexpenses(StringUtils.isNotEmpty(excelData.getLastyeardeductexpenses()) ? Double.valueOf(excelData.getLastyeardeductexpenses()) : 0);
|
|
|
System.out.println("save orginfo:" + JSON.toJSONString(info));
|
|
|
System.out.println("save errorremark:" + excelData.getErrorRemark());
|
|
|
infos.add(info);
|
|
|
- String claid = interviewDataEntryService.getClaid(nodeId, 0);
|
|
|
- dataEntryResource.insertResourceLibrary2(info, claid, nodeId);
|
|
|
+ // String claid = interviewDataEntryService.getClaid(nodeId, 0);
|
|
|
+ // dataEntryResource.insertResourceLibrary2(info, claid, nodeId);
|
|
|
// 专利信息
|
|
|
CompanyPatentInfo companyPatentInfo = baseToPatentInfo(info, excelData, excelData.getReqId());
|
|
|
if (companyPatentInfo != null) companyPatentInfos.add(companyPatentInfo);
|
|
@@ -516,7 +533,9 @@ public class EntryServiceImpl implements EntryService {
|
|
|
//飞地在建研发中心
|
|
|
CompanyFeidi companyFeidi = baseToCompanyFeidi(info, excelData, excelData.getReqId());
|
|
|
if (companyFeidi != null) companyFeidis.add(companyFeidi);
|
|
|
-
|
|
|
+ //税务数据
|
|
|
+ List<CompanyYearMultipleoptionsLk> list = baseToYearMultipleoptionsLk(info, excelData, excelData.getReqId(), nodeId);
|
|
|
+ if (CollectionUtils.isNotEmpty(list)) years.add(list);
|
|
|
}
|
|
|
}
|
|
|
for (int i = 0; i < infos.size(); i++) {
|
|
@@ -592,6 +611,37 @@ public class EntryServiceImpl implements EntryService {
|
|
|
companyFeidi.setId(feidis.get(0).getId());
|
|
|
}
|
|
|
}
|
|
|
+ if (CollectionUtils.isNotEmpty(years)) {
|
|
|
+ List<CompanyYearMultipleoptionsLk> list = years.get(i);
|
|
|
+ for (CompanyYearMultipleoptionsLk tax : list) {
|
|
|
+ tax.setCompanyid(infos.get(i).getId());
|
|
|
+ if ("1".equals(tax.getTaxflag())) {
|
|
|
+ List<CompanyYearMultipleoptionsLk> yearMultipleoptionsLks1 = companyYearMultipleoptionsLkMapper.selectList(new EntityWrapper<CompanyYearMultipleoptionsLk>()
|
|
|
+ .eq("companyid", infos.get(i).getId())
|
|
|
+ .eq("taxflag", "1"));
|
|
|
+ if (CollectionUtils.isNotEmpty(yearMultipleoptionsLks1)) {
|
|
|
+ tax.setId(yearMultipleoptionsLks1.get(0).getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ("2".equals(tax.getTaxflag())) {
|
|
|
+ List<CompanyYearMultipleoptionsLk> yearMultipleoptionsLks1 = companyYearMultipleoptionsLkMapper.selectList(new EntityWrapper<CompanyYearMultipleoptionsLk>()
|
|
|
+ .eq("companyid", infos.get(i).getId())
|
|
|
+ .eq("taxflag", "2"));
|
|
|
+ if (CollectionUtils.isNotEmpty(yearMultipleoptionsLks1)) {
|
|
|
+ tax.setId(yearMultipleoptionsLks1.get(0).getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ("3".equals(tax.getTaxflag())) {
|
|
|
+ List<CompanyYearMultipleoptionsLk> yearMultipleoptionsLks1 = companyYearMultipleoptionsLkMapper.selectList(new EntityWrapper<CompanyYearMultipleoptionsLk>()
|
|
|
+ .eq("companyid", infos.get(i).getId())
|
|
|
+ .eq("taxflag", "3"));
|
|
|
+ if (CollectionUtils.isNotEmpty(yearMultipleoptionsLks1)) {
|
|
|
+ tax.setId(yearMultipleoptionsLks1.get(0).getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ taxs.add(tax);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
companyPatentInfoService.insertOrUpdateAllColumnBatch(companyPatentInfos);
|
|
|
companyKunitakainfoService.insertOrUpdateAllColumnBatch(companyKunitakainfos);
|
|
@@ -602,10 +652,28 @@ public class EntryServiceImpl implements EntryService {
|
|
|
companyProvincialScienceSmallService.insertOrUpdateAllColumnBatch(companyProvincialScienceSmalls);
|
|
|
companyMunicipalResearchService.insertOrUpdateAllColumnBatch(companyMunicipalResearches);
|
|
|
companyFeidiService.insertOrUpdateAllColumnBatch(companyFeidis);
|
|
|
-
|
|
|
+ companyYearMultipleoptionsLkService.insertOrUpdateAllColumnBatch(taxs);
|
|
|
if (infos.size() > 0){
|
|
|
boolean b = organizationInfoService.insertOrUpdateAllColumnBatch(infos);
|
|
|
System.out.println("更新状态****---:"+b);
|
|
|
+ if (b) {
|
|
|
+ String claid = interviewDataEntryService.getClaid(nodeId, 0L);
|
|
|
+ System.out.println("一键导入保存es库获取claid" + claid);
|
|
|
+ try {
|
|
|
+ System.out.println("--**--开始保存--**--");
|
|
|
+ for (OrganizationInfo organizationInfo : infos) {
|
|
|
+ Resourcelibrary resourcelibrary = dataEntryResource.insertResourceLibrary2(organizationInfo, claid, nodeId);
|
|
|
+ if (resourcelibrary != null) {
|
|
|
+ System.out.println("保存成功");
|
|
|
+ }else {
|
|
|
+ System.out.println("保存失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ System.out.println("保存es库异常");
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
return b ? 1 : 0;
|
|
|
}
|
|
|
return 0;
|
|
@@ -619,7 +687,8 @@ public class EntryServiceImpl implements EntryService {
|
|
|
for (CompanyTaxLkExcelData excelData : excelDatas) {
|
|
|
log.info("解析出的税务信息:info:{}", JSON.toJSONString(excelData));
|
|
|
// 根据企业名称获取对应的税务数据的id
|
|
|
- List<OrganizationInfo> orgInfos = organizationInfoMapper.getOrgListByNode(excelData.getOrgname(), "330122000");
|
|
|
+ // List<OrganizationInfo> orgInfos = organizationInfoMapper.getOrgListByNode(excelData.getOrgname(), "330122000");
|
|
|
+ List<OrganizationInfo> orgInfos = organizationInfoMapper.selectList(new EntityWrapper<OrganizationInfo>().eq("name", excelData.getOrgname()).eq("orgcode", excelData.getOrgcode()));
|
|
|
Long companyid = orgInfos.size() > 0 ? orgInfos.get(0).getId() : 0L;
|
|
|
if (orgInfos.size() < 0) {
|
|
|
System.out.println("未找到企业,请检查是否修改企业名称");
|
|
@@ -1464,6 +1533,12 @@ public class EntryServiceImpl implements EntryService {
|
|
|
excelData.setFeidiarea(orginfo.getFeidiarea() != null ? String.valueOf(orginfo.getFeidiarea()) : "");
|
|
|
excelData.setWorkercount(orginfo.getWorkercount() != null ? String.valueOf(orginfo.getWorkercount()) : "");
|
|
|
excelData.setHasregulationorg(orginfo.getHasregulationorg() == 1 ? "是" : "否");
|
|
|
+ excelData.setThreeyearsrevenue(orginfo.getThreeyearsrevenue() != null ? String.valueOf(orginfo.getThreeyearsrevenue()) : "");
|
|
|
+ excelData.setThreeyeardeductexpenses(orginfo.getThreeyeardeductexpenses() != null ? String.valueOf(orginfo.getThreeyeardeductexpenses()) : "");
|
|
|
+ excelData.setTwoyearrevenue(orginfo.getTwoyearrevenue() != null ? String.valueOf(orginfo.getTwoyearrevenue()) : "");
|
|
|
+ excelData.setTwoyeardeductexpenses(orginfo.getTwoyeardeductexpenses() != null ? String.valueOf(orginfo.getTwoyeardeductexpenses()) : "");
|
|
|
+ excelData.setLastyearrevenue(orginfo.getLastyearrevenue() != null ? String.valueOf(orginfo.getLastyearrevenue()) : "");
|
|
|
+ excelData.setLastyeardeductexpenses(orginfo.getLastyeardeductexpenses() != null ? String.valueOf(orginfo.getLastyeardeductexpenses()) : "");
|
|
|
System.err.println("getRdinstitutionname:" + orginfo.getRdinstitutionname());
|
|
|
|
|
|
return excelData;
|
|
@@ -1524,6 +1599,7 @@ public class EntryServiceImpl implements EntryService {
|
|
|
BeanUtils.copyProperties(taxinfo, taxExcelData);
|
|
|
OrganizationInfo orgInfo = selOrgInfoById(taxinfo.getCompanyid());
|
|
|
taxExcelData.setOrgname(null != orgInfo ? orgInfo.getName() : "");
|
|
|
+ taxExcelData.setOrgcode(null != orgInfo ? orgInfo.getOrgcode() : "");
|
|
|
for (CompanyYearMultipleoptionsLk selList : selLists) {
|
|
|
if ("1".equals(selList.getTaxflag())) {
|
|
|
taxExcelData.setThreeyearsrevenue(StringUtils.isNotEmpty(selList.getYvalue6()) ? selList.getYvalue6() : "");
|
|
@@ -2314,7 +2390,10 @@ public class EntryServiceImpl implements EntryService {
|
|
|
List<CompanyMunicipalResearch> companyMunicipalResearches = new ArrayList<>();
|
|
|
//飞地在建研发中心
|
|
|
List<CompanyFeidi> companyFeidis = new ArrayList<>();
|
|
|
+ //税务数据
|
|
|
+ List<List<CompanyYearMultipleoptionsLk>> yearMultipleoptionsLks = new ArrayList();
|
|
|
List<String> errors = new ArrayList<>();
|
|
|
+ List<CompanyYearMultipleoptionsLk> list = new ArrayList<>();
|
|
|
for (EnterpriseBasicInfoExcelData excelData : datas) {
|
|
|
// JSONObject json = baseToOrgInfo(excelData,nodeId,errors);
|
|
|
// 企业基本信息转OrganizationInfo
|
|
@@ -2352,7 +2431,9 @@ public class EntryServiceImpl implements EntryService {
|
|
|
//飞地在建研发中心
|
|
|
CompanyFeidi companyFeidi = baseToCompanyFeidi(info, excelData, reqId);
|
|
|
if (companyFeidi != null) companyFeidis.add(companyFeidi);
|
|
|
-
|
|
|
+ //税务数据
|
|
|
+ List<CompanyYearMultipleoptionsLk> years = baseToYearMultipleoptionsLk(info, excelData, reqId, nodeId);
|
|
|
+ yearMultipleoptionsLks.add(years);
|
|
|
// 过滤掉表头。
|
|
|
infos = infos.stream().filter(a -> !a.getName().contains("企业名称")).collect(Collectors.toList());
|
|
|
System.err.println("filter:" + JSON.toJSONString(infos));
|
|
@@ -2446,6 +2527,38 @@ public class EntryServiceImpl implements EntryService {
|
|
|
companyFeidi.setId(feidis.get(0).getId());
|
|
|
}
|
|
|
}
|
|
|
+ if (CollectionUtils.isNotEmpty(yearMultipleoptionsLks)) {
|
|
|
+ List<CompanyYearMultipleoptionsLk> taxs = yearMultipleoptionsLks.get(i);
|
|
|
+ for (CompanyYearMultipleoptionsLk tax : taxs) {
|
|
|
+ tax.setCompanyid(infos.get(i).getId());
|
|
|
+ if ("1".equals(tax.getTaxflag())) {
|
|
|
+ List<CompanyYearMultipleoptionsLk> yearMultipleoptionsLks1 = companyYearMultipleoptionsLkMapper.selectList(new EntityWrapper<CompanyYearMultipleoptionsLk>()
|
|
|
+ .eq("companyid", infos.get(i).getId())
|
|
|
+ .eq("taxflag", "1"));
|
|
|
+ if (CollectionUtils.isNotEmpty(yearMultipleoptionsLks1)) {
|
|
|
+ tax.setId(yearMultipleoptionsLks1.get(0).getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ("2".equals(tax.getTaxflag())) {
|
|
|
+ List<CompanyYearMultipleoptionsLk> yearMultipleoptionsLks1 = companyYearMultipleoptionsLkMapper.selectList(new EntityWrapper<CompanyYearMultipleoptionsLk>()
|
|
|
+ .eq("companyid", infos.get(i).getId())
|
|
|
+ .eq("taxflag", "2"));
|
|
|
+ if (CollectionUtils.isNotEmpty(yearMultipleoptionsLks1)) {
|
|
|
+ tax.setId(yearMultipleoptionsLks1.get(0).getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ("3".equals(tax.getTaxflag())) {
|
|
|
+ List<CompanyYearMultipleoptionsLk> yearMultipleoptionsLks1 = companyYearMultipleoptionsLkMapper.selectList(new EntityWrapper<CompanyYearMultipleoptionsLk>()
|
|
|
+ .eq("companyid", infos.get(i).getId())
|
|
|
+ .eq("taxflag", "3"));
|
|
|
+ if (CollectionUtils.isNotEmpty(yearMultipleoptionsLks1)) {
|
|
|
+ tax.setId(yearMultipleoptionsLks1.get(0).getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ list.add(tax);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
// 初始化节点与公司关联列表。
|
|
|
companyNodeLks.add(toCompanyNodeLk(infos.get(i), nodeId));
|
|
@@ -2459,8 +2572,9 @@ public class EntryServiceImpl implements EntryService {
|
|
|
companyProvincialScienceSmallService.insertOrUpdateAllColumnBatch(companyProvincialScienceSmalls);
|
|
|
companyMunicipalResearchService.insertOrUpdateAllColumnBatch(companyMunicipalResearches);
|
|
|
companyFeidiService.insertOrUpdateAllColumnBatch(companyFeidis);
|
|
|
+ companyYearMultipleoptionsLkService.insertOrUpdateAllColumnBatch(list);
|
|
|
// 插入节点与公司关联表。
|
|
|
- companyNodeLkService.insertBatch(companyNodeLks);
|
|
|
+ companyNodeLkService.insertOrUpdateAllColumnBatch(companyNodeLks);
|
|
|
// upload表更新错误数据字段。
|
|
|
savedUploadByReqId(reqId, JSON.toJSONString(errors));
|
|
|
|
|
@@ -2586,7 +2700,8 @@ public class EntryServiceImpl implements EntryService {
|
|
|
CompanyYearMultipleoptionsLk info;
|
|
|
List<CompanyYearMultipleoptionsLk> infos = new ArrayList<>();
|
|
|
for (CompanyTaxLkExcelData excelData : datas) {
|
|
|
- List<OrganizationInfo> orgInfos = organizationInfoMapper.getOrgListByNode(excelData.getOrgname(), nodeId);
|
|
|
+ // List<OrganizationInfo> orgInfos = organizationInfoMapper.getOrgListByNode(excelData.getOrgname(), nodeId);
|
|
|
+ List<OrganizationInfo> orgInfos = organizationInfoMapper.selectList(new EntityWrapper<OrganizationInfo>().eq("name", excelData.getOrgname()).eq("orgcode", excelData.getOrgcode()));
|
|
|
Long companyid = orgInfos.size() > 0 ? orgInfos.get(0).getId() : 0L;
|
|
|
CompanyYearMultipleoptionsLk year = CompanyYearMultipleoptionsLk.builder()
|
|
|
.companyid(companyid)
|
|
@@ -4450,6 +4565,8 @@ public class EntryServiceImpl implements EntryService {
|
|
|
.creator(2865L)
|
|
|
.serialnum(1)
|
|
|
.build();
|
|
|
+ List<CompanyNodeLk> companyNodeLks = companyNodeLkService.selectList(new EntityWrapper<CompanyNodeLk>().eq("companyid", info.getId()).eq("comefrom", nodeId));
|
|
|
+ if (CollectionUtils.isNotEmpty(companyNodeLks)) companyNodeLk.setId(companyNodeLks.get(0).getId());
|
|
|
return companyNodeLk;
|
|
|
}
|
|
|
|
|
@@ -4465,12 +4582,12 @@ public class EntryServiceImpl implements EntryService {
|
|
|
// public JSONObject baseToOrgInfo(EnterpriseBasicInfoExcelData excelData, String nodeId, List<String> errors) throws ParseException {
|
|
|
OrganizationInfo info = new OrganizationInfo();
|
|
|
BeanUtils.copyProperties(excelData, info);
|
|
|
- List<OrganizationInfo> infos = organizationInfoMapper.selectList(new EntityWrapper<OrganizationInfo>().eq("name", excelData.getName()).eq("regionid", nodeId));
|
|
|
+ List<OrganizationInfo> infos = organizationInfoMapper.selectList(new EntityWrapper<OrganizationInfo>().eq("orgcode",excelData.getOrgcode()));
|
|
|
if (CollectionUtils.isNotEmpty(infos)) { //高企一件事需求,对已有数据导入时进行修改操作
|
|
|
info.setId(infos.get(0).getId());
|
|
|
}
|
|
|
List<LabelIntelligentCommonInfo> commonInfos = labelIntelligentCommonInfoMapper.selectList(new EntityWrapper<LabelIntelligentCommonInfo>().eq("name", excelData.getCategoryname()));
|
|
|
- info.setCategoryid(commonInfos.get(0).getCode());
|
|
|
+ info.setCategoryid(CollectionUtils.isNotEmpty(commonInfos) ? commonInfos.get(0).getCode() : "");
|
|
|
info.setRegistrationcapital(StringUtils.isNotEmpty(excelData.getRegistrationcapital()) ? Long.valueOf(excelData.getRegistrationcapital()) : null);
|
|
|
info.setPracticalcapital(StringUtils.isNotEmpty(excelData.getPracticalcapital()) ? Float.valueOf(excelData.getPracticalcapital()) : null);
|
|
|
info.setRegistrationdate(StringUtils.isNotEmpty(excelData.getRegistrationdate()) ? DateUtils.stringToDate(excelData.getRegistrationdate()) : null);
|
|
@@ -4481,6 +4598,15 @@ public class EntryServiceImpl implements EntryService {
|
|
|
info.setPatentforutilitycount(StringUtils.isNotEmpty(excelData.getPatentforutilitycount()) ? Integer.valueOf(excelData.getPatentforutilitycount()) : null);
|
|
|
info.setPatentforsoftwarecount(StringUtils.isNotEmpty(excelData.getPatentforsoftwarecount()) ? Integer.valueOf(excelData.getPatentforsoftwarecount()) : null);
|
|
|
info.setIskunitaka(StringUtils.isNotEmpty(excelData.getIskunitaka()) ? (excelData.getIskunitaka().equals("是") ? 1 : 0) : 0);
|
|
|
+ if (info.getIskunitaka() == 1 && StringUtils.isNotBlank(info.getHighandnewcode())) { //在高新领域代码字段截取国高八大领域
|
|
|
+ String i = info.getHighandnewcode().substring(0);
|
|
|
+ if (!"0".equals(i)) {
|
|
|
+ info.setHighdomain(interviewDataEntryService.highdomainNumberToType(i));
|
|
|
+ } else {
|
|
|
+ i = info.getHighandnewcode().substring(1,2);
|
|
|
+ info.setHighdomain(interviewDataEntryService.highdomainNumberToType(i));
|
|
|
+ }
|
|
|
+ }
|
|
|
info.setIsprovincialemphasisenterprise(StringUtils.isNotEmpty(excelData.getIsprovincialemphasisenterprise()) ? (excelData.getIsprovincialemphasisenterprise().equals("是") ? 1 : 0) : 0);
|
|
|
info.setEmphasisdate(StringUtils.isNotEmpty(excelData.getEmphasisdate()) ? DateUtils.stringToDate(excelData.getEmphasisdate()) : null);
|
|
|
info.setIsprovincialenterprise(StringUtils.isNotEmpty(excelData.getIsprovincialenterprise()) ? (excelData.getIsprovincialenterprise().equals("是")) ? 1 : 0 : 0);
|
|
@@ -4499,6 +4625,12 @@ public class EntryServiceImpl implements EntryService {
|
|
|
info.setWorkercount(StringUtils.isNotEmpty(excelData.getWorkercount()) ? Integer.valueOf(excelData.getWorkercount()) : null);
|
|
|
info.setHasregulationorg(StringUtils.isNotEmpty(excelData.getHasregulationorg()) ? (excelData.getHasregulationorg().equals("是") ? 1 : 0) : 0);
|
|
|
info.setRegionid(Long.valueOf(nodeId));
|
|
|
+ info.setThreeyearsrevenue(StringUtils.isNotEmpty(excelData.getThreeyearsrevenue()) ? Double.valueOf(excelData.getThreeyearsrevenue()) : 0);
|
|
|
+ info.setThreeyeardeductexpenses(StringUtils.isNotEmpty(excelData.getThreeyeardeductexpenses()) ? Double.valueOf(excelData.getThreeyeardeductexpenses()) : 0);
|
|
|
+ info.setTwoyearrevenue(StringUtils.isNotEmpty(excelData.getTwoyearrevenue()) ? Double.valueOf(excelData.getTwoyearrevenue()) : 0);
|
|
|
+ info.setTwoyeardeductexpenses(StringUtils.isNotEmpty(excelData.getTwoyeardeductexpenses()) ? Double.valueOf(excelData.getTwoyeardeductexpenses()) : 0);
|
|
|
+ info.setLastyearrevenue(StringUtils.isNotEmpty(excelData.getLastyearrevenue()) ? Double.valueOf(excelData.getLastyearrevenue()) : 0);
|
|
|
+ info.setLastyeardeductexpenses(StringUtils.isNotEmpty(excelData.getLastyeardeductexpenses()) ? Double.valueOf(excelData.getLastyeardeductexpenses()) : 0);
|
|
|
info.setIsenabled(1);
|
|
|
info.setOperateorg(0L);
|
|
|
info.setPeopleengagedNum(0);
|
|
@@ -4583,9 +4715,9 @@ public class EntryServiceImpl implements EntryService {
|
|
|
public CompanyPatentInfo baseToPatentInfo(OrganizationInfo info, EnterpriseBasicInfoExcelData excelData, String reqId) {
|
|
|
CompanyPatentInfo companyPatentInfo = CompanyPatentInfo.builder()
|
|
|
.companyid(info.getId())
|
|
|
- .patentcount(excelData.getPatentcount() != null ? Integer.valueOf(excelData.getPatentcount()) : 0)
|
|
|
- .patentforutilitycount(excelData.getPatentforutilitycount() != null ? Integer.valueOf(excelData.getPatentforutilitycount()) : 0)
|
|
|
- .patentforsoftwarecount(excelData.getPatentforsoftwarecount() != null ? Integer.valueOf(excelData.getPatentforsoftwarecount()) : 0)
|
|
|
+ .patentcount(info.getPatentcount() != null ? Integer.valueOf(info.getPatentcount()) : 0)
|
|
|
+ .patentforutilitycount(info.getPatentforutilitycount() != null ? Integer.valueOf(info.getPatentforutilitycount()) : 0)
|
|
|
+ .patentforsoftwarecount(info.getPatentforsoftwarecount() != null ? Integer.valueOf(info.getPatentforsoftwarecount()) : 0)
|
|
|
.node("330122000")
|
|
|
.isenabled(Constant.ONE)
|
|
|
.reqid(reqId)
|
|
@@ -4678,6 +4810,66 @@ public class EntryServiceImpl implements EntryService {
|
|
|
.build();
|
|
|
return companyFeidi;
|
|
|
}
|
|
|
+ public List<CompanyYearMultipleoptionsLk> baseToYearMultipleoptionsLk(OrganizationInfo info, EnterpriseBasicInfoExcelData excelData, String reqId, String nodeId) {
|
|
|
+ List<CompanyYearMultipleoptionsLk> list = new ArrayList();
|
|
|
+ CompanyYearMultipleoptionsLk yearMultipleoptionsLk = CompanyYearMultipleoptionsLk.builder()
|
|
|
+ .companyid(info.getId())
|
|
|
+ .linktype(30030)
|
|
|
+ .yid(dataEntryResource.getYear().get(0).getId())
|
|
|
+ .yvalue6(info.getThreeyearsrevenue() != null ? info.getThreeyearsrevenue().toString() : "")
|
|
|
+ .yvalue7(info.getThreeyeardeductexpenses() != null ? info.getThreeyeardeductexpenses().toString() : "")
|
|
|
+ .isenabled(1)
|
|
|
+ .issave(1)
|
|
|
+ .sourcetype(1)
|
|
|
+ .taxflag("1")
|
|
|
+ .reqId(reqId)
|
|
|
+ .build();
|
|
|
+ List<CompanyYearMultipleoptionsLk> yearMultipleoptionsLks = companyYearMultipleoptionsLkMapper.selectList(new EntityWrapper<CompanyYearMultipleoptionsLk>().eq("companyid", info.getId()).eq("taxflag", "1"));
|
|
|
+ if (CollectionUtils.isNotEmpty(yearMultipleoptionsLks)) {
|
|
|
+ yearMultipleoptionsLk.setId(yearMultipleoptionsLks.get(0).getId());
|
|
|
+ yearMultipleoptionsLk.setYid(dataEntryResource.getYear().get(0).getId());
|
|
|
+ }
|
|
|
+ list.add(yearMultipleoptionsLk);
|
|
|
+
|
|
|
+ CompanyYearMultipleoptionsLk yearMultipleoptionsLk1 = CompanyYearMultipleoptionsLk.builder()
|
|
|
+ .companyid(info.getId())
|
|
|
+ .linktype(30030)
|
|
|
+ .yid(dataEntryResource.getYear().get(1).getId())
|
|
|
+ .yvalue6(info.getTwoyearrevenue() != null ? info.getTwoyearrevenue().toString() : "")
|
|
|
+ .yvalue7(info.getTwoyeardeductexpenses() != null ? info.getTwoyeardeductexpenses().toString() : "")
|
|
|
+ .isenabled(1)
|
|
|
+ .issave(1)
|
|
|
+ .sourcetype(1)
|
|
|
+ .taxflag("2")
|
|
|
+ .reqId(reqId)
|
|
|
+ .build();
|
|
|
+ List<CompanyYearMultipleoptionsLk> yearMultipleoptionsLks1 = companyYearMultipleoptionsLkMapper.selectList(new EntityWrapper<CompanyYearMultipleoptionsLk>().eq("companyid", info.getId()).eq("taxflag", "2"));
|
|
|
+ if (CollectionUtils.isNotEmpty(yearMultipleoptionsLks1)) {
|
|
|
+ yearMultipleoptionsLk1.setId(yearMultipleoptionsLks1.get(0).getId());
|
|
|
+ yearMultipleoptionsLk.setYid(dataEntryResource.getYear().get(0).getId());
|
|
|
+ }
|
|
|
+ list.add(yearMultipleoptionsLk1);
|
|
|
+
|
|
|
+ CompanyYearMultipleoptionsLk yearMultipleoptionsLk2 = CompanyYearMultipleoptionsLk.builder()
|
|
|
+ .companyid(info.getId())
|
|
|
+ .linktype(30030)
|
|
|
+ .yid(dataEntryResource.getYear().get(2).getId())
|
|
|
+ .yvalue6(info.getLastyearrevenue() != null ? info.getLastyearrevenue().toString() : "")
|
|
|
+ .yvalue7(info.getLastyeardeductexpenses() != null ? info.getLastyeardeductexpenses().toString() : "")
|
|
|
+ .isenabled(1)
|
|
|
+ .issave(1)
|
|
|
+ .sourcetype(1)
|
|
|
+ .taxflag("3")
|
|
|
+ .reqId(reqId)
|
|
|
+ .build();
|
|
|
+ List<CompanyYearMultipleoptionsLk> yearMultipleoptionsLks2 = companyYearMultipleoptionsLkMapper.selectList(new EntityWrapper<CompanyYearMultipleoptionsLk>().eq("companyid", info.getId()).eq("taxflag", "3"));
|
|
|
+ if (CollectionUtils.isNotEmpty(yearMultipleoptionsLks2)) {
|
|
|
+ yearMultipleoptionsLk2.setId(yearMultipleoptionsLks2.get(0).getId());
|
|
|
+ yearMultipleoptionsLk2.setYid(dataEntryResource.getYear().get(0).getId());
|
|
|
+ }
|
|
|
+ list.add(yearMultipleoptionsLk2);
|
|
|
+ return list;
|
|
|
+ }
|
|
|
|
|
|
//初始化主导产品信息(溧水节点)
|
|
|
public List<CompanyProductLk> baseToProductLishui(OrganizationInfo info, EnterpriseBasicInfoExcelDataLishui excelData, String reqId) {
|