瀏覽代碼

桐庐高企一件事,2021-11-03

liyisong 3 年之前
父節點
當前提交
a9620f8ff7
共有 50 個文件被更改,包括 1752 次插入802 次删除
  1. 7 4
      ttc-app/src/main/java/cn/ubitech/ttc/controller/EntryController.java
  2. 8 10
      ttc-app/src/main/java/cn/ubitech/ttc/controller/ResourceController.java
  3. 1 1
      ttc-app/src/main/resources/application-dev.yml
  4. 76 0
      ttc-app/src/test/cn/ubitech/ttc/Test1.java
  5. 5 0
      ttc-app/ttc-app.iml
  6. 63 128
      ttc-backen/src/main/java/cn/ubitech/ttc/common/utils/ExcelPatternMsgUtils.java
  7. 9 3
      ttc-backen/src/main/java/cn/ubitech/ttc/entity/CompanyEyas.java
  8. 7 2
      ttc-backen/src/main/java/cn/ubitech/ttc/entity/CompanyFeidi.java
  9. 9 4
      ttc-backen/src/main/java/cn/ubitech/ttc/entity/CompanyKunitakainfo.java
  10. 9 3
      ttc-backen/src/main/java/cn/ubitech/ttc/entity/CompanyMunicipalResearch.java
  11. 9 3
      ttc-backen/src/main/java/cn/ubitech/ttc/entity/CompanyProvincial.java
  12. 9 3
      ttc-backen/src/main/java/cn/ubitech/ttc/entity/CompanyProvincialEmphasis.java
  13. 9 3
      ttc-backen/src/main/java/cn/ubitech/ttc/entity/CompanyProvincialHighandnew.java
  14. 9 3
      ttc-backen/src/main/java/cn/ubitech/ttc/entity/CompanyProvincialScienceSmall.java
  15. 11 4
      ttc-backen/src/main/java/cn/ubitech/ttc/entity/OrganizationInfo.java
  16. 3 0
      ttc-backen/src/main/java/cn/ubitech/ttc/entity/ResourceChoiceMore.java
  17. 29 5
      ttc-backen/src/main/java/cn/ubitech/ttc/entity/Resourcelibrary.java
  18. 12 72
      ttc-backen/src/main/java/cn/ubitech/ttc/excel/entry/CompanyTaxLkExcelData.java
  19. 6 4
      ttc-backen/src/main/java/cn/ubitech/ttc/excel/entry/CompanyTaxLkExcelDataListener.java
  20. 127 77
      ttc-backen/src/main/java/cn/ubitech/ttc/excel/entry/EnterpriseBasicInfoExcelData.java
  21. 55 137
      ttc-backen/src/main/java/cn/ubitech/ttc/excel/entry/EnterpriseBasicInfoExcelDataListener.java
  22. 2 2
      ttc-backen/src/main/java/cn/ubitech/ttc/model/ResourceChoice/ResourceChoiceMoreModel.java
  23. 21 7
      ttc-backen/src/main/java/cn/ubitech/ttc/model/common/ElasticSearchTTCModel.java
  24. 15 0
      ttc-backen/src/main/java/cn/ubitech/ttc/model/organization/ImpotModel.java
  25. 1 1
      ttc-backen/src/main/java/cn/ubitech/ttc/service/entry/EntryService.java
  26. 166 10
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/datatools/DataEntryResourceImpl.java
  27. 1 1
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/datatools/ImgServiceImpl.java
  28. 600 256
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/entry/EntryServiceImpl.java
  29. 15 0
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/CompanyEyasServiceImpl.java
  30. 15 0
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/CompanyFeidiServiceImpl.java
  31. 15 0
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/CompanyKunitakainfoServiceImpl.java
  32. 15 0
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/CompanyMunicipalResearchServiceImpl.java
  33. 15 0
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/CompanyProvincialEmphasisImpl.java
  34. 15 0
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/CompanyProvincialHighandnewServiceImpl.java
  35. 15 0
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/CompanyProvincialScienceSmallServiceImpl.java
  36. 15 0
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/CompanyProvincialServiceImpl.java
  37. 1 1
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/SysUsersTaskInfoServiceImpl.java
  38. 225 15
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/resource/ElasticSearchServiceImpl.java
  39. 11 8
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/resource/ResourceLibraryServiceImpl.java
  40. 16 31
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/resourceChoice/ResouceChoiceServiceImpl.java
  41. 3 3
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/search/SearchServiceImpl.java
  42. 1 1
      ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/user/UserServiceImpl.java
  43. 12 0
      ttc-backen/src/main/java/cn/ubitech/ttc/service/mybaits/ICompanyEyasService.java
  44. 12 0
      ttc-backen/src/main/java/cn/ubitech/ttc/service/mybaits/ICompanyFeidiService.java
  45. 12 0
      ttc-backen/src/main/java/cn/ubitech/ttc/service/mybaits/ICompanyKunitakainfoService.java
  46. 12 0
      ttc-backen/src/main/java/cn/ubitech/ttc/service/mybaits/ICompanyMunicipalResearchService.java
  47. 12 0
      ttc-backen/src/main/java/cn/ubitech/ttc/service/mybaits/ICompanyProvincialEmphasisService.java
  48. 12 0
      ttc-backen/src/main/java/cn/ubitech/ttc/service/mybaits/ICompanyProvincialHighandnewService.java
  49. 12 0
      ttc-backen/src/main/java/cn/ubitech/ttc/service/mybaits/ICompanyProvincialScienceSmallService.java
  50. 12 0
      ttc-backen/src/main/java/cn/ubitech/ttc/service/mybaits/ICompanyProvincialService.java

+ 7 - 4
ttc-app/src/main/java/cn/ubitech/ttc/controller/EntryController.java

@@ -6,9 +6,12 @@ import cn.ubitech.ttc.excel.param.UploadParam;
 import cn.ubitech.ttc.model.common.Constant;
 import cn.ubitech.ttc.model.common.PageModel;
 import cn.ubitech.ttc.model.common.ResultModel;
+import cn.ubitech.ttc.model.organization.ImpotModel;
 import cn.ubitech.ttc.service.entry.EntryService;
 import cn.ubitech.ttc.service.impl.entry.EntryServiceImpl;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.google.gson.JsonObject;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -160,10 +163,10 @@ public class EntryController {
     // todo 未完成
     @RequestMapping(value = "/edit/basic", method = RequestMethod.POST)
     @ApiOperation(value = "企业基本信息编辑接口", notes = "企业基本信息编辑接口")
-    public ResultModel editBasicInfo(@RequestBody List<Object> basicInfos, String nodeId) {
+    public ResultModel editBasicInfo(@RequestBody ImpotModel basicInfos) {
         ResultModel resultModel = new ResultModel();
         try {
-            int edited = entryService.editBasicInfo(basicInfos, nodeId);
+            int edited = entryService.editBasicInfo(basicInfos.getBasicInfos(), basicInfos.getNodeId());
             // int edited = 0;
             if (edited > 0){
                 resultModel.setData(edited);
@@ -184,11 +187,11 @@ public class EntryController {
 
     @RequestMapping(value = "/edit/tax", method = RequestMethod.POST)
     @ApiOperation(value = "税务信息编辑接口", notes = "税务信息编辑接口")
-    public ResultModel editTax(@RequestBody List<CompanyTaxLkExcelData> taxInfos) {
+    public ResultModel editTax(@RequestBody ImpotModel taxInfos) {
         ResultModel resultModel = new ResultModel();
         try {
             // resultModel = (entryService.logRecordsIsVisible(node,uid));
-            int edited = entryService.editTax(taxInfos);
+            int edited = entryService.editTax(taxInfos.getBasicInfos(),taxInfos.getNodeId());
             // int edited = 0;
             if (edited > 0){
                 resultModel.setData(edited);

+ 8 - 10
ttc-app/src/main/java/cn/ubitech/ttc/controller/ResourceController.java

@@ -40,10 +40,7 @@ import javax.servlet.http.HttpServletRequest;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 
 /**
  * code is far away from bug with the animal protecting
@@ -102,7 +99,7 @@ public class ResourceController {
      * @param labelName
      * @return
      */
-    @RequestMapping(value = "/resourcelist/{keyword}/{sort}/{groupid}/{moduleid}/{userid}/{pagenum}/{category}/{tracetype}/{labelName}/{node}", method = RequestMethod.GET)
+    @RequestMapping(value = "/resourcelist/{keyword}/{sort}/{groupid}/{moduleid}/{userid}/{pagenum}/{category}/{tracetype}/{labelName}/{node}/{morescreening}/{potentiallibrary}", method = RequestMethod.GET)
     @ApiOperation(value = "资源库搜索", notes = "通过关键词查询资源库的列表")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "keyword", paramType = "path", dataType = "String", value = "关键词"),
@@ -116,19 +113,20 @@ public class ResourceController {
             @ApiImplicitParam(name = "labelName", paramType = "path", dataType = "String", value = "筛选条件"),
             @ApiImplicitParam(name = "node", paramType = "path", dataType = "String", value = "节点信息"),
             @ApiImplicitParam(name = "morescreening", paramType = "path", dataType = "String", value = "更多筛选"),
-            @ApiImplicitParam(name = "potentiallibrary", paramType = "path", dataType = "int", value = "潜力库筛选,1:国高,2:省科小,3:雏鹰,4:市级研发中心,5:省级研发中心,6:省级研究院,7:飞地研发中心")
+            @ApiImplicitParam(name = "potentiallibrary", paramType = "path", dataType = "String", value = "潜力库筛选,1:国高,2:省科小,3:雏鹰,4:市级研发中心,5:省级研发中心,6:省级研究院,7:飞地研发中心")
     })
     public ResultModel getResourcelist(@PathVariable String keyword, @PathVariable Integer pagenum, @PathVariable long userid,
                                        @PathVariable String sort, @PathVariable String groupid, @PathVariable Integer moduleid,
                                        @PathVariable String category, @PathVariable Integer tracetype, @PathVariable String labelName,
-                                       @PathVariable String node) {
-        log.info("keyword:{},userid:{},sort:{},groupid:{},moduleid:{},category:{},tracetype:{},labelName:{},node:{}",keyword,userid,sort,groupid,moduleid,category,tracetype,
-                          labelName,node);
+                                       @PathVariable String node,  @PathVariable String morescreening, @PathVariable String potentiallibrary) {
+        log.info("keyword:{},userid:{},sort:{},groupid:{},moduleid:{},category:{},tracetype:{},labelName:{},node:{},morescreening:{},potentiallibrary:{}",keyword,userid,sort,groupid,moduleid,category,tracetype,
+                          labelName,node,morescreening,potentiallibrary);
+        log.info("potentiallibrary:{}",potentiallibrary);
         ResultModel resultModel = new ResultModel();
         try {
             if (moduleid != 0) {
                 resourceLibraryService.getResourceList(keyword, pagenum, userid, sort, groupid, moduleid,
-                        category, tracetype, labelName, resultModel, node, 1);
+                        category, tracetype, labelName, resultModel, node, morescreening,Integer.valueOf(potentiallibrary));
             }
             //含有“武进区科技创新创业联盟入驻企业”标签的企业列表
             if (groupid.equals("231") && moduleid == 0) {

+ 1 - 1
ttc-app/src/main/resources/application-dev.yml

@@ -13,7 +13,7 @@ spring:
     elasticsearch:
       cluster-name: ttc_test_es
       #      cluster-nodes: 192.168.0.28:9300,192.168.0.29:9300,192.168.0.30:9300
-      cluster-nodes: 192.168.1.114:9300,192.168.1.114:9301,192.168.1.114:9302
+      cluster-nodes: 192.168.1.119:9300,192.168.1.119:9301,192.168.1.119:9302
       #      typename: esttc
       #      indexname: ttcdev
       #      label_common_indexname: label_common_dev

+ 76 - 0
ttc-app/src/test/cn/ubitech/ttc/Test1.java

@@ -0,0 +1,76 @@
+package cn.ubitech.ttc;
+
+import cn.ubitech.ttc.entity.CompanyProvincialScienceSmall;
+import cn.ubitech.ttc.entity.OrganizationInfo;
+import cn.ubitech.ttc.service.mybaits.ICompanyProvincialScienceSmallService;
+import cn.ubitech.ttc.service.mybaits.IOrganizationInfoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author lys
+ * @create 2021-10-11 11:38
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest
+public class Test1 {
+
+    @Autowired
+    private IOrganizationInfoService infoService;
+    @Autowired
+    private ICompanyProvincialScienceSmallService companyProvincialScienceSmallService;
+
+    @Test
+    public void test1() throws ParseException {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        Calendar instance = Calendar.getInstance();
+        instance.setTime(new Date());
+        instance.add(Calendar.YEAR, -3);
+        System.out.println(sdf.format(instance.getTime()));
+    }
+
+    @Test
+    public void test2() {
+        List<OrganizationInfo> list = new ArrayList<>();
+        OrganizationInfo info = new OrganizationInfo();
+        info.setName("aaaa");
+        info.setRegistrationdate(new Date());
+        list.add(info);
+        infoService.insertOrUpdateBatch(list);
+    }
+
+    @Test
+    public void test3() {
+        List<CompanyProvincialScienceSmall> list = new ArrayList<>();
+        CompanyProvincialScienceSmall companyProvincialScienceSmall = new CompanyProvincialScienceSmall();
+        companyProvincialScienceSmall.setId(54L);
+
+        list.add(companyProvincialScienceSmall);
+        companyProvincialScienceSmallService.insertOrUpdateAllColumnBatch(list);
+    }
+
+    @Test
+    public void test4() {
+        List<CompanyProvincialScienceSmall> list = new ArrayList<>();
+        CompanyProvincialScienceSmall companyProvincialScienceSmall = new CompanyProvincialScienceSmall();
+        companyProvincialScienceSmall.setId(55L);
+        companyProvincialScienceSmall.setRecognitiondate(new Date());
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        String format = sdf.format(new Date());
+        System.out.println("------------>" + format);
+        list.add(companyProvincialScienceSmall);
+        companyProvincialScienceSmallService.insertOrUpdateAllColumnBatch(list);
+    }
+
+
+}

+ 5 - 0
ttc-app/ttc-app.iml

@@ -9,6 +9,10 @@
         <webroots>
           <root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
         </webroots>
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+          <root url="file://$MODULE_DIR$/src/main/resources" />
+        </sourceRoots>
       </configuration>
     </facet>
   </component>
@@ -18,6 +22,7 @@
     <content url="file://$MODULE_DIR$">
       <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
       <excludeFolder url="file://$MODULE_DIR$/target" />
     </content>
     <orderEntry type="inheritedJdk" />

+ 63 - 128
ttc-backen/src/main/java/cn/ubitech/ttc/common/utils/ExcelPatternMsgUtils.java

@@ -131,9 +131,11 @@ public class ExcelPatternMsgUtils {
      */
     // 企业基本信息模板表头
     // public static final String BASIC_TL_HEAD = "{0:\"企业名称\",1:\"法定代表人\",2:\"注册资本(万元)\",3:\"成立日期\",4:\"统一社会信用代码\",5:\"纳税人识别号\",6:\"组织机构代码\",7:\"企业类型\",8:\"所属行业\",9:\"曾用名\",10:\"官网\",11:\"所属乡镇\",12:\"企业地址\",13:\"资质1\",14:\"认定年限1\",15:\"资质2\",16:\"认定年限2\",17:\"资质3\",18:\"认定年限3\",19:\"是否规上\",20:\"老总姓名\",21:\"电话1\",22:\"研发总监姓名\",23:\"电话2\",24:\"科技联络人姓名\",25:\"电话3\",26:\"企业简介\",27:\"主导产品1\",28:\"主导产品2\",29:\"主导产品3\",30:\"发明专利\",31:\"实用新型\",32:\"外观设计\",33:\"软件著作权\",34:\"研究机构\",35:\"研究机构名称\"}";
-    public static final String BASIC_TL_HEAD = "{0:\"企业名称\",1:\"法定代表人\",2:\"注册资本(万元)\",3:\"成立日期\",4:\"统一社会信用代码\",5:\"组织机构代码\",6:\"企业类型\",7:\"所属行业\",8:\"曾用名\",9:\"官网\",10:\"所属乡镇\",11:\"企业地址\",12:\"资质1\",13:\"认定年限1\",14:\"资质2\",15:\"认定年限2\",16:\"资质3\",17:\"认定年限3\",18:\"是否规上\",19:\"企业负责人姓名\",20:\"企业负责人联系方式\",21:\"研发总监姓名\",22:\"研发总监联系方式\",23:\"科技联络人姓名\",24:\"科技联络人联系方式\",25:\"企业简介\",26:\"主导产品1\",27:\"主导产品2\",28:\"主导产品3\",29:\"发明专利\",30:\"实用新型\",31:\"外观设计\",32:\"软件著作权\",33:\"研究机构\",34:\"研究机构名称\",35:\"机构类型\"}";
+    // public static final String BASIC_TL_HEAD = "{0:\"企业名称\",1:\"法定代表人\",2:\"注册资本(万元)\",3:\"成立日期\",4:\"统一社会信用代码\",5:\"组织机构代码\",6:\"企业类型\",7:\"所属行业\",8:\"曾用名\",9:\"官网\",10:\"所属乡镇\",11:\"企业地址\",12:\"资质1\",13:\"认定年限1\",14:\"资质2\",15:\"认定年限2\",16:\"资质3\",17:\"认定年限3\",18:\"是否规上\",19:\"企业负责人姓名\",20:\"企业负责人联系方式\",21:\"研发总监姓名\",22:\"研发总监联系方式\",23:\"科技联络人姓名\",24:\"科技联络人联系方式\",25:\"企业简介\",26:\"主导产品1\",27:\"主导产品2\",28:\"主导产品3\",29:\"发明专利\",30:\"实用新型\",31:\"外观设计\",32:\"软件著作权\",33:\"研究机构\",34:\"研究机构名称\",35:\"机构类型\"}";
+    public static final String BASIC_TL_HEAD = "{0:\"企业名称\",1:\"法定代表人\",2:\"经营状态\",3:\"注册资本(万元)\",4:\"实缴资本(万元)\",5:\"曾用名\",6:\"所属行业\",7:\"统一社会信用代码\",8:\"纳税人识别号\",9:\"工商注册号\",10:\"组织机构代码\",11:\"登记机关\",12:\"成立日期\",13:\"企业类型\",14:\"营业期限\",15:\"行政区划\",16:\"核准日期\",17:\"注册地址\",18:\"经营范围\",19:\"发明专利数\",20:\"实用新型授权数\",21:\"软件著作权数\",22:\"是否国高\",23:\"高企证书号\",24:\"高新领域代码\",25:\"是否省级重点企业研究院\",26:\"认定年份\",27:\"省级重点企业研究院名称\",28:\"是否省级企业研究院\",29:\"认定年份\",30:\"省级企业研究院名称\",31:\"是否浙江省高新技术研究开发中心\",32:\"认定年份\",33:\"浙江省高新技术研究开发中心名称\",34:\"是否省科小\",35:\"认定年份\",36:\"是否雏鹰计划\",37:\"认定年份\",38:\"是否市级研发中心\",39:\"认定年份\",40:\"市级研发中心名称\",41:\"是否在建飞地研发中心\",42:\"飞地研发中心专职人员数\",43:\"飞地研发中心场地面积\",44:\"企业法定代表人联系电话\",45:\"技术负责人姓名\",46:\"技术负责人联系电话\",47:\"财务负责人\",48:\"财务负责人联系电话\",49:\"科技联络人姓名\",50:\"科技联络人联系电话\",51:\"职工总数\",52:\"乡镇(街道)平台\",53:\"是否规上\"}";
     // 企业税务数据信息模板表头
-    public static final String TAX_TL_HEAD = "{0:\"企业名称\",1:\"统一社会信用代码\",2:\"时间段1\",3:\"企业税收利润1\",4:\"企业税收收入1\",5:\"研发费加计扣除1\",6:\"留县税收1\",7:\"时间段2\",8:\"企业税收利润2\",9:\"企业税收收入2\",10:\"研发费加计扣除2\",11:\"留县税收2\",12:\"时间段3\",13:\"企业税收利润3\",14:\"企业税收收入3\",15:\"研发费加计扣除3\",16:\"留县税收3\",17:\"时间段4\",18:\"企业税收利润4\",19:\"企业税收收入4\",20:\"研发费加计扣除4\",21:\"留县税收4\"}";
+    // public static final String TAX_TL_HEAD = "{0:\"企业名称\",1:\"统一社会信用代码\",2:\"时间段1\",3:\"企业税收利润1\",4:\"企业税收收入1\",5:\"研发费加计扣除1\",6:\"留县税收1\",7:\"时间段2\",8:\"企业税收利润2\",9:\"企业税收收入2\",10:\"研发费加计扣除2\",11:\"留县税收2\",12:\"时间段3\",13:\"企业税收利润3\",14:\"企业税收收入3\",15:\"研发费加计扣除3\",16:\"留县税收3\",17:\"时间段4\",18:\"企业税收利润4\",19:\"企业税收收入4\",20:\"研发费加计扣除4\",21:\"留县税收4\"}";
+    public static final String TAX_TL_HEAD = "{0:\"企业名称\",1:\"前三年营业收入\",2:\"前三年允许扣除的研发费用\",3:\"前两年营业收入\",4:\"前两年允许扣除的研发费用\",5:\"前一年营业收入\",6:\"前一年允许扣除的研发费用\"}";
     // 企业专利信息模板表头
     // public static final String PATENT_TL_HEAD = "{0:\"企业名称\",1:\"统一社会信用代码\",2:\"专利名称\",3:\"申请号\",4:\"申请日\",5:\"专利类型\",6:\"专利权人\",7:\"授权号\"}";
     public static final String PATENT_TL_HEAD = "{0:\"企业名称\",1:\"统一社会信用代码\",2:\"专利名称\",3:\"申请号\",4:\"申请日\",5:\"专利类型\",6:\"专利权人\",7:\"授权号\",8:\"授权日期\"}";
@@ -179,93 +181,62 @@ public class ExcelPatternMsgUtils {
     public static EnterpriseBasicInfoExcelData initTongluBasicHeadInfo(){
         String initHead = BASIC_TL_HEAD;
         Map<Integer,Object> map = JSONObject.parseObject(initHead,Map.class);
-        // 注册类型、资源资质code(详见typeentry表中字段名typenameshow为桐庐资质类型的数据)
-        // 认定年限、
-
-        // 企业名称    法定代表人   注册资本(万元) 成立日期(注册时间)    统一社会信用代码
-        // 纳税人识别号  组织机构代码(code)  企业类型   所属行业    曾用名 官网  所属乡镇
-        // 企业地址()    资质1(ishigh) 认定年限1   资质(ishigh)2 认定年限2   资质量(ishigh)3
-        // 认定年限3   是否规上hasregulationorg    老总姓名    电话1 研发总监姓名  电话2
-        // 科技联络人姓名 电话3 企业简介(content)    主导产品1   主导产品2   主导产品3   发明专利
-        // 实用新型    外观设计    软件著作权   研究机构    研究机构名称
+        //
         EnterpriseBasicInfoExcelData excelData = EnterpriseBasicInfoExcelData.builder()
-                // 企业名称
                 .name(map.get(0).toString())
-                // 法定代表人
                 .legalrepresentativename(map.get(1).toString())
-                // 注册资金 注册资本,todo Long
-                .registrationcapital(map.get(2).toString())
-                // 成立日期(注册时间)todo Date
-                .registrationdate(map.get(3).toString())
-                // 统一社会信用代码
-                .orgcode(map.get(4).toString())
-                // todo 组织机构代码????????????????新增字段
-                .institutioncode(map.get(5).toString())
-                // 企业类型 机构类型 10104:企业,10105:高校 企业类型。todo Long
-                .orgtypename(map.get(35).toString())
-                // todo 所属行业(行业领域id, category表的name)
-                .categoryname(map.get(7).toString())
-                // todo 曾用名,需新增。
-                .formername(map.get(8).toString())
-                // 官网
-                .website(map.get(9).toString())
-                // 所属乡镇(region) 浙江省杭州市桐庐县
-                .district(map.get(10).toString())
-                // 企业地址
-                .detailaddress(map.get(11).toString())
-                /**
-                 * todo 资质1-3 认定年限1-3
-                 * todo 关联表(ResQualityLk)关系,获取
-                 */
-                .qualityOne(map.get(12).toString())
-                .infoOne(map.get(13).toString())
-                .qualityTwo(map.get(14).toString())
-                .infoTwo(map.get(15).toString())
-                .qualityThree(map.get(16).toString())
-                .infoThree(map.get(17).toString())
-                // 是否规上企业:10501是,10502否 todo Integer
-                .hasregulationorgname(map.get(18).toString())
-                // 老总姓名-->企业负责人姓名
-                .contact(map.get(19).toString())
-                // 电话1--》企业负责人联系方式
-                .contactnum(map.get(20).toString())
-                // 研发总监姓名
-                .technologyContact(map.get(21).toString())
-                // 电话2,研发总监联系方式
-                .technologyContactphone(map.get(22).toString())
-                // todo 科技联络人姓名----原财务联系人
-                .financialContact(map.get(23).toString())
-                // todo 电话3,科技联络人联系方式---原财务联系人联系方式
-                .financialContactphone(map.get(24).toString())
-                // 企业简介
-                .about(map.get(25).toString())
-                /**
-                 * todo 主导产品1-3
-                 * todo 产品表(CompanyProductLk)关联关系。
-                 */
-                .productnameone(map.get(26).toString())
-                .productnametwo(map.get(27).toString())
-                .productnamethree(map.get(28).toString())
-                // 获得发明专利数量 todo Integer
-                .patentcount(map.get(29).toString())
-                // 实用新型数量(件) todo Integer
-                .patentforutilitycount(map.get(30).toString())
-                // 外观设计数量(件) todo Integer
-                .patentfordesigncount(map.get(31).toString())
-                // 软件著作权数量(件) todo Integer
-                .patentforsoftwarecount(map.get(32).toString())
-                // 研究机构 机构等级(0无 1国家级 2省级 3市级 4区级,关联typeentry表)todo Integer
-                .rdinstitutiontypecn(map.get(33).toString())
-                // todo 研究机构名称
-                .rdinstitutionname(map.get(34).toString())
-                // todo 新增字段companytype
-                .companytype(map.get(6).toString())
-                // todo 需要转换
-                .categoryid(map.get(7).toString())
-                // 机构类型 10104:企业,10105:高校 企业类型。
-                // .orgtype(map.get(6).toString())
-                // 研究机构 机构等级(0无 1国家级 2省级 3市级 4区级,关联typeentry表)todo Integer
-                // .rdinstitutiontype()
+                .managestatus(map.get(2).toString())
+                .registrationcapital(map.get(3).toString())
+                .practicalcapital(map.get(4).toString())
+                .formername(map.get(5).toString())
+                .categoryname(map.get(6).toString())
+                .orgcode(map.get(7).toString())
+                .taxpayercode(map.get(8).toString())
+                .registercode(map.get(9).toString())
+                .institutioncode(map.get(10).toString())
+                .registeroffice(map.get(11).toString())
+                .registrationdate(map.get(12).toString())
+                .registrationtype(map.get(13).toString())
+                .operatingperiod(map.get(14).toString())
+                .administrativedivision(map.get(15).toString())
+                .approvaltime(map.get(16).toString())
+                .detailaddress(map.get(17).toString())
+                .businessscope(map.get(18).toString())
+                .patentcount(map.get(19).toString())
+                .patentforutilitycount(map.get(20).toString())
+                .patentforsoftwarecount(map.get(21).toString())
+                .iskunitaka(map.get(22).toString())
+                .highenterprisecode(map.get(23).toString())
+                .highandnewcode(map.get(24).toString())
+                .isprovincialemphasisenterprise(map.get(25).toString())
+                .emphasisdate(map.get(26).toString())
+                .emphasisname(map.get(27).toString())
+                .isprovincialenterprise(map.get(28).toString())
+                .provincialdate(map.get(29).toString())
+                .provincialname(map.get(30).toString())
+                .ishighandnewenterprise(map.get(31).toString())
+                .highandnewdate(map.get(32).toString())
+                .highandnewname(map.get(33).toString())
+                .isprovincesciencesmall(map.get(34).toString())
+                .provincesciencesmalldate(map.get(35).toString())
+                .iseyasenterprise(map.get(36).toString())
+                .eyasdate(map.get(37).toString())
+                .ismunicipalresearch(map.get(38).toString())
+                .municipalresearchdate(map.get(39).toString())
+                .municipalresearchname(map.get(40).toString())
+                .isfeidienterprise(map.get(41).toString())
+                .feidipeoplecount(map.get(42).toString())
+                .feidiarea(map.get(43).toString())
+                .legalrepresentativetel(map.get(44).toString())
+                .technologycontact(map.get(45).toString())
+                .technologycontactphone(map.get(46).toString())
+                .financialcontact(map.get(47).toString())
+                .financialcontactphone(map.get(48).toString())
+                .sciencecontact(map.get(49).toString())
+                .sciencecontactphone(map.get(50).toString())
+                .workercount(map.get(51).toString())
+                .townplatform(map.get(52).toString())
+                .hasregulationorg(map.get(53).toString())
                 .build();
 
        // todo 组织机构代码 institutioncode、曾用名 formername
@@ -349,48 +320,12 @@ public class ExcelPatternMsgUtils {
         CompanyTaxLkExcelData excelData = CompanyTaxLkExcelData.builder()
                 // 企业名称
                 .orgname(map.get(0).toString())
-                // 统一社会信用代码
-                .orgcode(map.get(1).toString())
-                // 时间段1
-                .periodtimeone(map.get(2).toString())
-                // 企业税收利润1
-                .taxprofitsone(map.get(3).toString())
-                // 企业税收收入1
-                .taxrevenueone(map.get(4).toString())
-                // 研发费加计扣除1
-                .researchcostsdeductone(map.get(5).toString())
-                // 留县税收1
-                .countytaxone(map.get(6).toString())
-                // 时间段2
-                .periodtimetwo(map.get(7).toString())
-                // 企业税收利润2
-                .taxprofitstwo(map.get(8).toString())
-                // 企业税收收入2
-                .taxrevenuetwo(map.get(9).toString())
-                // 研发费加计扣除2
-                .researchcostsdeducttwo(map.get(10).toString())
-                // 留县税收2
-                .countytaxtwo(map.get(11).toString())
-                // 时间段3
-                .periodtimethree(map.get(12).toString())
-                // 企业税收利润3
-                .taxprofitsthree(map.get(13).toString())
-                // 企业税收收入3
-                .taxrevenuethree(map.get(14).toString())
-                // 研发费加计扣除3
-                .researchcostsdeductthree(map.get(15).toString())
-                // 留县税收3
-                .countytaxthree(map.get(16).toString())
-                // 时间段4
-                .periodtimefour(map.get(17).toString())
-                // 企业税收利润4      留县税收4
-                .taxprofitsfour(map.get(18).toString())
-                // 企业税收收入4
-                .taxrevenuefour(map.get(19).toString())
-                // 研发费加计扣除4
-                .researchcostsdeductfour(map.get(20).toString())
-                // 留县税收4
-                .countytaxfour(map.get(21).toString())
+                .threeyearsrevenue(map.get(1).toString())
+                .threeyeardeductexpenses(map.get(2).toString())
+                .twoyearrevenue(map.get(3).toString())
+                .twoyeardeductexpenses(map.get(4).toString())
+                .lastyearrevenue(map.get(5).toString())
+                .lastyeardeductexpenses(map.get(6).toString())
                 .build();
         return excelData;
     }

+ 9 - 3
ttc-backen/src/main/java/cn/ubitech/ttc/entity/CompanyEyas.java

@@ -4,9 +4,9 @@ import cn.ubitech.ttc.model.authority.AuthorityModel;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.enums.FieldFill;
+import com.baomidou.mybatisplus.enums.FieldStrategy;
 import com.baomidou.mybatisplus.enums.IdType;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
+import lombok.*;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
@@ -17,6 +17,9 @@ import java.util.Date;
  * @create 2021-09-23 11:20
  */
 @Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
 public class CompanyEyas extends AuthorityModel<CompanyEyas> {
@@ -33,7 +36,7 @@ public class CompanyEyas extends AuthorityModel<CompanyEyas> {
     private Integer iseyas;
 
     //认定年份
-    @TableField(value = "recognizedate",fill = FieldFill.INSERT)
+    @TableField(strategy = FieldStrategy.IGNORED)
     private Date recognizedate;
 
     //节点id
@@ -42,6 +45,9 @@ public class CompanyEyas extends AuthorityModel<CompanyEyas> {
     //创建时间
     private Date createtime;
 
+    //文件唯一标识
+    private String reqId;
+
     @TableField(exist = false)
     private String tablename = "company_eyas";
     @TableField(exist = false)

+ 7 - 2
ttc-backen/src/main/java/cn/ubitech/ttc/entity/CompanyFeidi.java

@@ -4,8 +4,7 @@ import cn.ubitech.ttc.model.authority.AuthorityModel;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.enums.IdType;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
+import lombok.*;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
@@ -17,6 +16,9 @@ import java.util.Date;
  * @create 2021-09-23 11:32
  */
 @Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
 public class CompanyFeidi extends AuthorityModel<CompanyFeidi> {
@@ -44,6 +46,9 @@ public class CompanyFeidi extends AuthorityModel<CompanyFeidi> {
     //创建时间
     private Date createtime;
 
+    //文件唯一标识
+    private String reqId;
+
     @TableField(exist = false)
     private String tablename = "company_feidi";
     @TableField(exist = false)

+ 9 - 4
ttc-backen/src/main/java/cn/ubitech/ttc/entity/CompanyKunitakainfo.java

@@ -4,8 +4,7 @@ import cn.ubitech.ttc.model.authority.AuthorityModel;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.enums.IdType;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
+import lombok.*;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
@@ -17,9 +16,12 @@ import java.util.Date;
  * @create 2021-09-23 10:36
  */
 @Data
-@EqualsAndHashCode(callSuper = false)
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode
 @Accessors(chain = true)
-public class CompanyKunitakainfo extends AuthorityModel<CompanyPatentInfo> {
+public class CompanyKunitakainfo extends AuthorityModel<CompanyKunitakainfo> {
 
     private static final long serialVersionUID = 1L;
 
@@ -44,6 +46,9 @@ public class CompanyKunitakainfo extends AuthorityModel<CompanyPatentInfo> {
     //创建时间
     private Date createtime;
 
+    //文件唯一标识
+    private String reqId;
+
     @TableField(exist = false)
     private String tablename = "company_kunitakainfo";
     @TableField(exist = false)

+ 9 - 3
ttc-backen/src/main/java/cn/ubitech/ttc/entity/CompanyMunicipalResearch.java

@@ -4,9 +4,9 @@ import cn.ubitech.ttc.model.authority.AuthorityModel;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.enums.FieldFill;
+import com.baomidou.mybatisplus.enums.FieldStrategy;
 import com.baomidou.mybatisplus.enums.IdType;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
+import lombok.*;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
@@ -18,6 +18,9 @@ import java.util.Date;
  * @create 2021-09-26 15:01
  */
 @Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
 @EqualsAndHashCode(callSuper = true)
 @Accessors(chain = true)
 public class CompanyMunicipalResearch extends AuthorityModel<CompanyMunicipalResearch> {
@@ -34,7 +37,7 @@ public class CompanyMunicipalResearch extends AuthorityModel<CompanyMunicipalRes
     private Integer ismunicipalresearch;
 
     //认定年份
-    @TableField(value = "recognizedate",fill = FieldFill.INSERT)
+    @TableField(strategy = FieldStrategy.IGNORED)
     private Date recognizedate;
 
     //市级企业研发中心名称
@@ -47,6 +50,9 @@ public class CompanyMunicipalResearch extends AuthorityModel<CompanyMunicipalRes
     @TableField(value = "createtime",fill = FieldFill.INSERT)
     private Date createtime;
 
+    //文件唯一标识
+    private String reqId;
+
     @TableField(exist = false)
     private String tablename = "company_municipal_research";
     @TableField(exist = false)

+ 9 - 3
ttc-backen/src/main/java/cn/ubitech/ttc/entity/CompanyProvincial.java

@@ -4,9 +4,9 @@ import cn.ubitech.ttc.model.authority.AuthorityModel;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.enums.FieldFill;
+import com.baomidou.mybatisplus.enums.FieldStrategy;
 import com.baomidou.mybatisplus.enums.IdType;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
+import lombok.*;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
@@ -18,6 +18,9 @@ import java.util.Date;
  * @create 2021-09-23 11:06
  */
 @Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
 public class CompanyProvincial extends AuthorityModel<CompanyProvincial> {
@@ -34,7 +37,7 @@ public class CompanyProvincial extends AuthorityModel<CompanyProvincial> {
     private Integer isprovincialenterprise;
 
     //省级企业认定年份
-    @TableField(value = "recognizedate",fill = FieldFill.INSERT)
+    @TableField(strategy = FieldStrategy.IGNORED)
     private Date recognizedate;
 
     //省级企业研究院名称
@@ -46,6 +49,9 @@ public class CompanyProvincial extends AuthorityModel<CompanyProvincial> {
     //创建时间
     private Date createtime;
 
+    //文件唯一标识
+    private String reqId;
+
     @TableField(exist = false)
     private String tablename = "company_provincial";
     @TableField(exist = false)

+ 9 - 3
ttc-backen/src/main/java/cn/ubitech/ttc/entity/CompanyProvincialEmphasis.java

@@ -4,9 +4,9 @@ import cn.ubitech.ttc.model.authority.AuthorityModel;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.enums.FieldFill;
+import com.baomidou.mybatisplus.enums.FieldStrategy;
 import com.baomidou.mybatisplus.enums.IdType;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
+import lombok.*;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
@@ -18,6 +18,9 @@ import java.util.Date;
  * @create 2021-09-23 10:59
  */
 @Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
 public class CompanyProvincialEmphasis extends AuthorityModel<CompanyProvincialEmphasis> {
@@ -34,7 +37,7 @@ public class CompanyProvincialEmphasis extends AuthorityModel<CompanyProvincialE
     private Integer isemphasis;
 
     //认定年份
-    @TableField(value = "recognizedate", fill = FieldFill.INSERT)
+    @TableField(strategy = FieldStrategy.IGNORED)
     private Date recognizedate;
 
     //省级重点企业研究院名称
@@ -46,6 +49,9 @@ public class CompanyProvincialEmphasis extends AuthorityModel<CompanyProvincialE
     //创建时间
     private Date createtime;
 
+    //文件唯一标识
+    private String reqId;
+
     @TableField(exist = false)
     private String tablename = "company_provincial_emphasis";
     @TableField(exist = false)

+ 9 - 3
ttc-backen/src/main/java/cn/ubitech/ttc/entity/CompanyProvincialHighandnew.java

@@ -4,9 +4,9 @@ import cn.ubitech.ttc.model.authority.AuthorityModel;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.enums.FieldFill;
+import com.baomidou.mybatisplus.enums.FieldStrategy;
 import com.baomidou.mybatisplus.enums.IdType;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
+import lombok.*;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
@@ -18,6 +18,9 @@ import java.util.Date;
  * @create 2021-09-23 11:11
  */
 @Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
 public class CompanyProvincialHighandnew extends AuthorityModel<CompanyProvincialHighandnew> {
@@ -34,7 +37,7 @@ public class CompanyProvincialHighandnew extends AuthorityModel<CompanyProvincia
     private Integer isprovincialhighandnew;
 
     //认定年份
-    @TableField(value = "recognizedate",fill = FieldFill.INSERT)
+    @TableField(strategy = FieldStrategy.IGNORED)
     private Date recognizedate;
 
     //省高新技术研究开发中心名称
@@ -46,6 +49,9 @@ public class CompanyProvincialHighandnew extends AuthorityModel<CompanyProvincia
     //创建时间
     private Date createtime;
 
+    //文件唯一标识
+    private String reqId;
+
     @TableField(exist = false)
     private String tablename = "company_provincial_highandnew";
     @TableField(exist = false)

+ 9 - 3
ttc-backen/src/main/java/cn/ubitech/ttc/entity/CompanyProvincialScienceSmall.java

@@ -4,9 +4,9 @@ import cn.ubitech.ttc.model.authority.AuthorityModel;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.enums.FieldFill;
+import com.baomidou.mybatisplus.enums.FieldStrategy;
 import com.baomidou.mybatisplus.enums.IdType;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
+import lombok.*;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
@@ -17,6 +17,9 @@ import java.util.Date;
  * @create 2021-09-23 11:16
  */
 @Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
 public class CompanyProvincialScienceSmall extends AuthorityModel<CompanyProvincialScienceSmall> {
@@ -33,7 +36,7 @@ public class CompanyProvincialScienceSmall extends AuthorityModel<CompanyProvinc
     private Integer isprovincesciencesmall;
 
     //认定年份
-    @TableField(value = "recognitiondate",fill = FieldFill.INSERT)
+    @TableField(strategy = FieldStrategy.IGNORED)
     private Date recognitiondate;
 
     //节点id
@@ -42,6 +45,9 @@ public class CompanyProvincialScienceSmall extends AuthorityModel<CompanyProvinc
     //创建时间
     private Date createtime;
 
+    //文件唯一标识
+    private String reqId;
+
     @TableField(exist = false)
     private String tablename = "company_provincial_science_small";
     @TableField(exist = false)

+ 11 - 4
ttc-backen/src/main/java/cn/ubitech/ttc/entity/OrganizationInfo.java

@@ -470,22 +470,29 @@ public class OrganizationInfo extends AuthorityModel<OrganizationInfo>  implemen
     private Integer feidipeoplecount;
     //飞地研发中心场地面积
     private Double feidiarea;
+    //研发总监姓名
+    private String researchdirector;
+    //研发总监联系方式
+    private String researchdirectorphone;
+
     //前三年营业收入
+    @TableField(exist = false)
     private Double threeyearsrevenue;
     //前三年允许扣除的研发费用
+    @TableField(exist = false)
     private Double threeyeardeductexpenses;
     //前两年营业收入
+    @TableField(exist = false)
     private Double twoyearrevenue;
     //前两年允许扣除的研发费用
+    @TableField(exist = false)
     private Double twoyeardeductexpenses;
     //前一年营业收入
+    @TableField(exist = false)
     private Double lastyearrevenue;
     //前一年允许扣除的研发费用
+    @TableField(exist = false)
     private Double lastyeardeductexpenses;
-    //研发总监姓名
-    private String researchdirector;
-    //研发总监联系方式
-    private String researchdirectorphone;
 
     /**
      * 非机构表中字段,存放机构对应的标签信息

+ 3 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/entity/ResourceChoiceMore.java

@@ -33,8 +33,11 @@ public class ResourceChoiceMore extends AuthorityModel<ResourceChoiceMore> imple
     private String filtermodelproperty;
     private String isenabled;
     private String choicetype;
+    @TableField(exist = false)
     private String content1;
+    @TableField(exist = false)
     private String content2;
+    @TableField(exist = false)
     private String content3;
 
     @TableField(exist = false)

+ 29 - 5
ttc-backen/src/main/java/cn/ubitech/ttc/entity/Resourcelibrary.java

@@ -1,6 +1,7 @@
 package cn.ubitech.ttc.entity;
 
 import com.baomidou.mybatisplus.enums.FieldFill;
+import com.baomidou.mybatisplus.enums.FieldStrategy;
 import com.baomidou.mybatisplus.enums.IdType;
 
 import java.io.Serializable;
@@ -559,12 +560,14 @@ public class Resourcelibrary extends AuthorityModel<Resourcelibrary> implements
     private Date setuptime;
 
     //经营期限
+    @TableField(strategy = FieldStrategy.IGNORED)
     private Date operatingPeriod;
 
     //行政区划
     private String administrativeDivision;
 
     //核准日期
+    @TableField(strategy = FieldStrategy.IGNORED)
     private Date approvaltime;
 
     //经营范围
@@ -582,15 +585,36 @@ public class Resourcelibrary extends AuthorityModel<Resourcelibrary> implements
     //乡镇(街道)平台
     private String townPlatform;
 
-    //上年度营业收入
-    private Double lastyearrevenue;
-
-    //上年度允许扣除的研发费用
-    private Double lastyeardeductexpenses;
+    //组织机构代码
+    private String institutioncode;
 
     //根据高企证书号获取高企认定年份
     @TableField(exist = false)
     private String highidentificationyear;
+    //飞地研发中心专职研发人员数
+    @TableField(exist = false)
+    private Integer feidipeoplecount;
+    //飞地研发中心场地面积
+    @TableField(exist = false)
+    private Double feidiarea;
+    //前三年营业收入
+    @TableField(exist = false)
+    private Double threeyearsrevenue;
+    //前三年允许扣除的研发费用
+    @TableField(exist = false)
+    private Double threeyeardeductexpenses;
+    //前两年营业收入
+    @TableField(exist = false)
+    private Double twoyearrevenue;
+    //前两年允许扣除的研发费用
+    @TableField(exist = false)
+    private Double twoyeardeductexpenses;
+    //上年度营业收入
+    @TableField(exist = false)
+    private Double lastyearrevenue;
+    //上年度允许扣除的研发费用
+    @TableField(exist = false)
+    private Double lastyeardeductexpenses;
 
     /**
      * 表名

+ 12 - 72
ttc-backen/src/main/java/cn/ubitech/ttc/excel/entry/CompanyTaxLkExcelData.java

@@ -23,89 +23,29 @@ public class CompanyTaxLkExcelData {
      */
     private String orgname;
     /**
-     * 统一社会信用代码
+     * 前三年营业收入
      */
-    private String orgcode;
+    private String threeyearsrevenue;
     /**
-     * 时间段1
+     * 前三年允许扣除的研发费用
      */
-    private String periodtimeone;
+    private String threeyeardeductexpenses;
     /**
-     * 企业税收利润1
+     * 前两年营业收入
      */
-    private String taxprofitsone;
+    private String twoyearrevenue;
     /**
-     * 企业税收收入1
+     * 前两年允许扣除的研发费用
      */
-    private String taxrevenueone;
+    private String twoyeardeductexpenses;
     /**
-     * 研发费加计扣除1
+     * 前一年营业收入
      */
-    private String researchcostsdeductone;
+    private String lastyearrevenue;
     /**
-     * 留县税收1
+     * 前一年允许扣除的研发费用
      */
-    private String countytaxone;
-    /**
-     * 时间段2
-     */
-    private String periodtimetwo;
-    /**
-     * 企业税收利润2
-     */
-    private String taxprofitstwo;
-    /**
-     * 企业税收收入2
-     */
-    private String taxrevenuetwo;
-    /**
-     * 研发费加计扣除2
-     */
-    private String researchcostsdeducttwo;
-    /**
-     * 留县税收2
-     */
-    private String countytaxtwo;
-    /**
-     * 时间段3
-     */
-    private String periodtimethree;
-    /**
-     * 企业税收利润3
-     */
-    private String taxprofitsthree;
-    /**
-     * 企业税收收入3
-     */
-    private String taxrevenuethree;
-    /**
-     * 研发费加计扣除3
-     */
-    private String researchcostsdeductthree;
-    /**
-     * 留县税收3
-     */
-    private String countytaxthree;
-    /**
-     * 时间段4
-     */
-    private String periodtimefour;
-    /**
-     * 企业税收利润4
-     */
-    private String taxprofitsfour;
-    /**
-     * 企业税收收入4
-     */
-    private String taxrevenuefour;
-    /**
-     * 研发费加计扣除4
-     */
-    private String researchcostsdeductfour;
-    /**
-     * 留县税收4
-     */
-    private String countytaxfour;
+    private String lastyeardeductexpenses;
 
     private Long id;
     private String reqId;

+ 6 - 4
ttc-backen/src/main/java/cn/ubitech/ttc/excel/entry/CompanyTaxLkExcelDataListener.java

@@ -85,6 +85,8 @@ public class CompanyTaxLkExcelDataListener extends AnalysisEventListener<Company
         Map<Integer, Map<Integer, String>> map = new HashMap<>();
         map.put(context.readRowHolder().getRowIndex(), headMap);
         String taxStr = ExcelPatternMsgUtils.TAX_TL_HEAD;
+        log.info("head:{}",taxStr);
+        log.info("head excel:{}",map.get(1));
         if (map.containsKey(1)) {
             if (!JSON.toJSONString(map.get(1)).equals(taxStr)) {
                 resultMessage = ExcelPatternMsgUtils.HEAD_ERROR;
@@ -107,10 +109,10 @@ public class CompanyTaxLkExcelDataListener extends AnalysisEventListener<Company
     public JSONObject checkError(CompanyTaxLkExcelData excelData){
         List<JSONObject> list = new ArrayList<>();
         System.out.println(excelData.getOrgname());
-        if (!StringUtils.isEmpty(excelData.getOrgcode())
-                && Util.isLetterDigit(excelData.getOrgcode()) == false){
-            js.put("orgcode","统一社会信用代码" + ExcelPatternMsgUtils.NUMBER_LETTER_MSG);
-        }
+        // if (!StringUtils.isEmpty(excelData.getOrgcode())
+        //         && Util.isLetterDigit(excelData.getOrgcode()) == false){
+        //     js.put("orgcode","统一社会信用代码" + ExcelPatternMsgUtils.NUMBER_LETTER_MSG);
+        // }
 //        if (!StringUtils.isEmpty(excelData.getTaxprofitsone()) && Util.isTaxNum(excelData.getTaxprofitsone()) == false){
 //            js.put("taxprofitsone","企业税收利润1" + ExcelPatternMsgUtils.TAX_NUM_MSG);
 //        }

+ 127 - 77
ttc-backen/src/main/java/cn/ubitech/ttc/excel/entry/EnterpriseBasicInfoExcelData.java

@@ -29,15 +29,26 @@ public class EnterpriseBasicInfoExcelData {
      * 法定代表人
      */
     private String legalrepresentativename;
+    /**
+     * 经营状态
+     */
+    private String managestatus;
     /**
      * 注册基本(万元)
      */
     private String registrationcapital;
     /**
-     * 成立日期
+     * 实缴资本(万元)
      */
-    private String registrationdate;
-    // private Date registrationdate;
+    private String practicalcapital;
+    /**
+     * 曾用名
+     */
+    private String formername;
+    /**
+     * 所属行业
+     */
+    private String categoryname;
     /**
      * 统一社会信用代码
      */
@@ -45,153 +56,192 @@ public class EnterpriseBasicInfoExcelData {
     /**
      * 纳税人识别号
      */
-    // private String taxpayerIdentificationNumber;
+    private String taxpayercode;
+    /**
+     * 工商注册号
+     */
+    private String registercode;
     /**
      * 组织机构代码
      */
     private String institutioncode;
     /**
-     * 企业类型
-     * todo 20210319 修改此处为机构类型,新增字段为:企业类型。
+     * 登记机关
      */
-    // private String orgtypename;
-    private String companytype;
+    private String registeroffice;
     /**
-     * 所属行业
+     * 成立日期
      */
-    private String categoryname;
+    private String registrationdate;
     /**
-     * todo 曾用名
+     * 企业类型
      */
-    private String formername;
+    private String registrationtype;
     /**
-     * 官网
+     * 经营期限
      */
-    private String website;
+    private String operatingperiod;
     /**
-     * 所属乡镇
+     * 行政区划
      */
-    private String district;
+    private String administrativedivision;
     /**
-     * 企业地址
+     * 核准日期
+     */
+    private String approvaltime;
+    /**
+     * 注册地址
      */
     private String detailaddress;
     /**
-     * 资质1
+     * 经营范围
      */
-    private String qualityOne;
+    private String businessscope;
     /**
-     * 认定年限1
+     * 发明专利
      */
-    private String infoOne;
+    private String patentcount;
     /**
-     * 资质2
+     * 实用新型
      */
-    private String qualityTwo;
+    private String patentforutilitycount;
     /**
-     * 认定年限2
+     * 软件著作权
      */
-    private String infoTwo;
+    private String patentforsoftwarecount;
     /**
-     * 资质3
+     * 是否国高
      */
-    private String qualityThree;
+    private String iskunitaka;
     /**
-     * 认定年限3
+     * 高企证书号
      */
-    private String infoThree;
+    private String highenterprisecode;
     /**
-     * 是否规上
+     * 高新领域代码
      */
-    private String hasregulationorgname;
+    private String highandnewcode;
     /**
-     * todo 企业负责人姓名
+     * 是否省级重点企业研究院
      */
-    private String contact;
+    private String isprovincialemphasisenterprise;
     /**
-     * todo 企业负责人联系方式
+     * 省级重点企业认定年份
      */
-    private String contactnum;
+    private String emphasisdate;
     /**
-     * todo 研发总监姓名
+     * 省级重点企业研究院名称
      */
-    private String technologyContact;
+    private String emphasisname;
     /**
-     * todo 研发总监电话
+     * 是否省级企业研究院
      */
-    private String technologyContactphone;
+    private String isprovincialenterprise;
     /**
-     * todo 科技联络人姓名
+     * 省级企业认定年份
      */
-    private String financialContact;
+    private String provincialdate;
     /**
-     * todo 科技联络人电话
+     * 省级企业研究院名称
      */
-    private String financialContactphone;
+    private String provincialname;
     /**
-     * 企业简介
+     * 是否省高新技术研究开发中心(浙江)
      */
-    private String about;
+    private String ishighandnewenterprise;
     /**
-     * todo 主导产品1
+     * 省高新技术研究院开发中心认定年份
      */
-    private String productnameone;
+    private String highandnewdate;
     /**
-     * todo 主导产品2
+     * 省高新技术研究开发中心名称
      */
-    private String productnametwo;
+    private String highandnewname;
     /**
-     * todo 主导产品3
+     * 是否省科小
      */
-    private String productnamethree;
+    private String isprovincesciencesmall;
     /**
-     * 发明专利
+     * 省科小认定时间
      */
-    private String patentcount;
+    private String provincesciencesmalldate;
     /**
-     * 实用新型
+     * 是否"杭州市"雏鹰计划企业
      */
-    private String patentforutilitycount;
+    private String iseyasenterprise;
     /**
-     * 外观设计
+     * 雏鹰计划认定年份
      */
-    private String patentfordesigncount;
+    private String eyasdate;
     /**
-     * 软件著作权
+     * 是否市级企业研发中心
      */
-    private String patentforsoftwarecount;
+    private String ismunicipalresearch;
     /**
-     * 研究机构
+     * 市级企业研发中心认定年份
      */
-    private String rdinstitutiontypecn;
+    private String municipalresearchdate;
     /**
-     * todo 研究机构名称
+     * 市级企业研发中心名称
      */
-    private String rdinstitutionname;
-
+    private String municipalresearchname;
     /**
-     * todo 新增字段:企业类型,一般填写为有限责任公司、股份有限公司
+     * 是否飞地在建研发中心
      */
-    private String orgtypename;
-
-    private Long id;
-    private String reqId;
+    private String isfeidienterprise;
+    /**
+     * 飞地研发中心专职研发人数
+     */
+    private String feidipeoplecount;
+    /**
+     * 飞地研发中心场地面积
+     */
+    private String feidiarea;
+    /**
+     * 企业法定代表人手机
+     */
+    private String legalrepresentativetel;
+    /**
+     * 技术负责人姓名
+     */
+    private String technologycontact;
+    /**
+     * 技术负责人手机
+     */
+    private String technologycontactphone;
+    /**
+     * 财务联系人姓名
+     */
+    private String financialcontact;
+    /**
+     * 财务联系人电话
+     */
+    private String financialcontactphone;
     /**
-     * 对应organazition—info的categoryid
+     * 科技联络人
      */
-    private String categoryid;
+    private String sciencecontact;
     /**
-     * 机构类型 10104:企业,10105:高校 企业类型。
+     * 科技联络人联系方式
      */
-    private Long orgtype;
+    private String sciencecontactphone;
     /**
-     * 是否规上企业:10501是,10502否
+     * 职工总数
      */
-    private Integer hasregulationorg;
+    private String workercount;
     /**
-     * 机构等级(0无 1国家级 2省级 3市级 4区级
+     * 乡镇街道平台
      */
-    private Integer rdinstitutiontype;
+    private String townplatform;
+    /**
+     * 是否规上
+     */
+    private String hasregulationorg;
+
+
+    private Long id;
+    private String reqId;
+
     private String errorRemark;
     private JSONObject errorMsg;
 

+ 55 - 137
ttc-backen/src/main/java/cn/ubitech/ttc/excel/entry/EnterpriseBasicInfoExcelDataListener.java

@@ -10,6 +10,7 @@ import com.alibaba.excel.event.AnalysisEventListener;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.google.common.collect.Lists;
+import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.stereotype.Component;
@@ -49,9 +50,6 @@ public class EnterpriseBasicInfoExcelDataListener extends AnalysisEventListener<
      */
     JSONObject js = new JSONObject();
 
-    // //用list集合保存解析到的结果
-    // private List<Map<Integer, Map<Integer, String>>> list;
-
     public EnterpriseBasicInfoExcelDataListener(OnAllAnalysedListener<EnterpriseBasicInfoExcelData> onAllAnalysedListener) {
         this.onAllAnalysedListener = onAllAnalysedListener;
     }
@@ -97,13 +95,15 @@ public class EnterpriseBasicInfoExcelDataListener extends AnalysisEventListener<
      */
     @Override
     public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
-        log.info("解析到一条头数据:{}", JSON.toJSONString(headMap));
+         log.info("解析到一条头数据:{}", JSON.toJSONString(headMap));
         Map<String, Map<Integer, String>> map = new HashMap<>();
         map.put(String.valueOf(context.readRowHolder().getRowIndex()), headMap);
         System.out.println("head map:"+JSON.toJSONString(map));
         String basicStr = ExcelPatternMsgUtils.BASIC_TL_HEAD;
-        if (map.containsKey(1)) {
-            if (!JSON.toJSONString(map.get(1)).equals(basicStr)) {
+        if (map.containsKey("1")) {
+            if (!JSON.toJSONString(map.get("1")).equals(basicStr)) {
+                log.info("head:{}",basicStr);
+                log.info("excel head:{}",map.get("1"));
                 resultMessage = ExcelPatternMsgUtils.HEAD_ERROR;
                 enterpriseBasicInfoExcelDataList.clear();
                 isCorrectFormat = false;
@@ -131,132 +131,69 @@ public class EnterpriseBasicInfoExcelDataListener extends AnalysisEventListener<
     public JSONObject checkError(EnterpriseBasicInfoExcelData excelData){
         List<JSONObject> list = new ArrayList<>();
         System.out.println(excelData.getName());
-        // if (!StringUtils.isEmpty(excelData.getLegalRepresentative()) && Util.isChinese(excelData.getLegalRepresentative()) == false){
-        //     js.put("legalRepresentative","法定代表人" + ExcelPatternMsgUtils.CHINESE_MSG);
-        // }
-        if (!StringUtils.isEmpty(excelData.getRegistrationdate()) && Util.isDate(excelData.getRegistrationdate()) == false){
-            // todo 待处理msg
+
+        if (StringUtils.isNotEmpty(excelData.getRegistrationcapital()) && !Util.isNumeric(excelData.getRegistrationcapital())) {
+            log.info("注册资本(万元):{}",excelData.getRegistrationcapital());
+            js.put("registrationcapital", "注册资本(万元)格式有误," + ExcelPatternMsgUtils.NUMBER_MSG);
+        }
+        if (StringUtils.isNotEmpty(excelData.getPracticalcapital()) && !Util.isTaxNum(excelData.getPracticalcapital())) {
+            log.info("实缴资本(万元):{}", excelData.getPracticalcapital());
+            js.put("practicalcapital", "实缴资本(万元)格式有误," + ExcelPatternMsgUtils.TAX_NUM_MSG);
+        }
+        if (!StringUtils.isEmpty(excelData.getRegistrationdate()) && !Util.isDate(excelData.getRegistrationdate())){
             System.out.println("getRegistrationdate");
             js.put("registrationdate", "成立日期格式有误,"+ ExcelPatternMsgUtils.DATE2_MSG);
         }
-       // if (!StringUtils.isEmpty(excelData.getUnifiedSocialCreditCode()) && Util.isLetterDigit(excelData.getUnifiedSocialCreditCode()) == false){
-       //     js.put("unifiedSocialCreditCode","纳税人识别号" + ExcelPatternMsgUtils.NUMBER_LETTER_MSG);
-       // }
-       // if (!StringUtils.isEmpty(excelData.getOrganizationCode()) && Util.isLetterDigit(excelData.getOrganizationCode()) == false){
-       //     js.put("organizationCode","组织机构代码" + ExcelPatternMsgUtils.NUMBER_LETTER_MSG);
-       // }
-       // if (!StringUtils.isEmpty(excelData.getFormerName()) && Util.isChinese(excelData.getFormerName()) == false){
-       //     js.put("formerName","曾用名" + ExcelPatternMsgUtils.CHINESE_MSG);
-       // }
-        if (!StringUtils.isEmpty(excelData.getWebsite()) && Util.isUrl(excelData.getWebsite()) == false){
-            System.out.println("website");
-            js.put("website","官网"+ ExcelPatternMsgUtils.WEBSITE_MSG);
+        if (StringUtils.isNotEmpty(excelData.getOperatingperiod()) && !Util.isDate(excelData.getOperatingperiod())) {
+            log.info("营业期限:{}",excelData.getOperatingperiod());
+            js.put("operatingperiod", "营业期限格式有误," + ExcelPatternMsgUtils.DATE2_MSG);
         }
-       // if (!StringUtils.isEmpty(excelData.getQualificationPeriodOne()) && Util.isDate(excelData.getQualificationPeriodOne()) == false){
-       //     js.put("qualificationPeriodOne","认定年限1必须为日期类型");
-       // }
-       // if (!StringUtils.isEmpty(excelData.getQualificationPeriodTwo()) && Util.isDate(excelData.getQualificationPeriodTwo()) == false){
-       //     js.put("qualificationPeriodTwo","认定年限2必须为日期类型");
-       // }
-       // if (!StringUtils.isEmpty(excelData.getQualificationPeriodThree()) && Util.isDate(excelData.getQualificationPeriodThree()) == false){
-       //     js.put("qualificationPeriodThree","认定年限3必须为日期类型");
-       // }
-        if (!StringUtils.isEmpty(excelData.getAbout()) && Util.toLength(excelData.getAbout(),200) == false){
-            js.put("about","企业简介" + ExcelPatternMsgUtils.ZISHU_LIMIT);
-            System.out.println("enterpriseBriefIntroduction");
+        if (StringUtils.isNotEmpty(excelData.getApprovaltime()) && !Util.isDate(excelData.getApprovaltime())) {
+            log.info("营业期限:{}",excelData.getApprovaltime());
+            js.put("approvaltime", "核准日期格式有误," + ExcelPatternMsgUtils.DATE2_MSG);
         }
-       // if (!StringUtils.isEmpty(excelData.getBossPhone()) && Util.isTelephone(excelData.getBossPhone()) == false){
-       //     js.put("bossPhone","老总" + ExcelPatternMsgUtils.TEL_MSG);
-       // }
-       // if (!StringUtils.isEmpty(excelData.getRdDirector()) && Util.isChinese(excelData.getRdDirector()) == false){
-       //     js.put("rdDirector","研发总监姓名" + ExcelPatternMsgUtils.CHINESE_MSG);
-       // }
-       // if (!StringUtils.isEmpty(excelData.getRdDirectorPhone()) && Util.isTelephone(excelData.getRdDirectorPhone()) == false){
-       //     js.put("rdDirectorPhone","研发总监" + ExcelPatternMsgUtils.TEL_MSG);
-       // }
-       // if (!StringUtils.isEmpty(excelData.getTechnologyContactName()) && Util.isChinese(excelData.getTechnologyContactName()) == false){
-       //     js.put("technologyContactName","科技联络人姓名" + ExcelPatternMsgUtils.CHINESE_MSG);
-       // }
-        System.err.println("contactnum:" + excelData.getContactnum());
-        if (!StringUtils.isEmpty(excelData.getContactnum())){
-            System.err.println(Util.isTelephone(excelData.getContactnum()));
-            if (Util.isTelephone(excelData.getContactnum()) == false){
-                js.put("contactnum","企业负责人联系方式" + ExcelPatternMsgUtils.TEL_OR_PHONE_MSG);
-                System.out.println("contactnum err");
-            }
+        if (StringUtils.isNotEmpty(excelData.getEmphasisdate()) && !Util.isDate(excelData.getEmphasisdate())) {
+            log.info("省级重点企业研究院认定年份:{}",excelData.getEyasdate());
+            js.put("emphasisdate","省级重点企业研究院认定年份格式有误," + ExcelPatternMsgUtils.DATE2_MSG);
         }
-
-        System.err.println("technologyContactphone:" + excelData.getTechnologyContactphone());
-        if (!StringUtils.isEmpty(excelData.getTechnologyContactphone())){
-            System.err.println(Util.isTelephone(excelData.getTechnologyContactphone()));
-            if (Util.isTelephone(excelData.getTechnologyContactphone()) == false){
-                js.put("technologyContactphone","研发总监电话" + ExcelPatternMsgUtils.TEL_OR_PHONE_MSG);
-                System.out.println("technologyContactphone err");
-            }
+        if (StringUtils.isNotEmpty(excelData.getProvincialdate()) && !Util.isDate(excelData.getProvincialdate())) {
+            log.info("省级企业研究院认定年份:{}",excelData.getProvincialdate());
+            js.put("provincialdate:{}","省级企业研究院认定年份格式有误," + ExcelPatternMsgUtils.DATE2_MSG);
         }
-
-        System.err.println("financialContactphone:" + excelData.getFinancialContactphone());
-        if (!StringUtils.isEmpty(excelData.getFinancialContactphone())){
-            System.err.println(Util.isTelephone(excelData.getFinancialContactphone()));
-            if (Util.isTelephone(excelData.getFinancialContactphone()) == false){
-                js.put("financialContactphone","科技联络人电话" + ExcelPatternMsgUtils.TEL_OR_PHONE_MSG);
-                System.out.println("financialContactphone err");
-            }
+        if (StringUtils.isNotEmpty(excelData.getHighandnewdate()) && !Util.isDate(excelData.getHighandnewdate())) {
+            js.put("highandnewdate","浙江省高新技术研究开发中心认定年份格式有误," + ExcelPatternMsgUtils.DATE2_MSG);
+        }
+        if (StringUtils.isNotEmpty(excelData.getProvincesciencesmalldate()) && !Util.isDate(excelData.getProvincesciencesmalldate())) {
+            js.put("provincesciencesmalldate","省科小认定年份格式有误," + ExcelPatternMsgUtils.DATE2_MSG);
+        }
+        if (StringUtils.isNotEmpty(excelData.getEyasdate()) && !Util.isDate(excelData.getEyasdate())) {
+            js.put("eyasdate","雏鹰计划认定年份格式有误," + ExcelPatternMsgUtils.DATE2_MSG);
+        }
+        if (StringUtils.isNotEmpty(excelData.getMunicipalresearchdate()) && !Util.isDate(excelData.getMunicipalresearchdate())) {
+            js.put("municipalresearchdate","市级研发中心认定年份格式有误," + ExcelPatternMsgUtils.DATE2_MSG);
+        }
+        if (StringUtils.isNotEmpty(excelData.getLegalrepresentativetel()) && !Util.isTelephone(excelData.getLegalrepresentativetel())) {
+            log.info("企业法定代表人联系电话," + excelData.getLegalrepresentativetel());
+            js.put("legalrepresentativetel","企业法定代表人联系电话格式有误," + ExcelPatternMsgUtils.TEL_MSG);
+        }
+        if (StringUtils.isNotEmpty(excelData.getTechnologycontactphone()) && !Util.isTelephone(excelData.getTechnologycontactphone())) {
+            log.info("技术负责人联系电话," + excelData.getTechnologycontactphone());
+            js.put("technologycontactphone","技术负责人联系电话格式有误," + ExcelPatternMsgUtils.TEL_MSG);
+        }
+        if (StringUtils.isNotEmpty(excelData.getFinancialcontactphone()) && !Util.isTelephone(excelData.getFinancialcontactphone())) {
+            log.info("财务负责人联系电话," + excelData.getFinancialcontactphone());
+            js.put("financialcontactphone","财务负责人联系电话格式有误," + ExcelPatternMsgUtils.TEL_MSG);
+        }
+        if (StringUtils.isNotEmpty(excelData.getSciencecontactphone()) && !Util.isTelephone(excelData.getSciencecontactphone())) {
+            log.info("科技联络人联系电话," + excelData.getSciencecontactphone());
+            js.put("sciencecontactphone","财务联络人联系电话格式有误," + ExcelPatternMsgUtils.TEL_MSG);
         }
-
-
-        // if (!StringUtils.isEmpty(excelData.getHasregulationorgname()) && !excelData.getHasregulationorgname().equals("规上")){
-        //     js.put("hasregulationorg","是否规上项" + ExcelPatternMsgUtils.IS_ON_THE_GAUGE_MSG);
-        //     System.out.println("isOnTheGauge");
-        // }
         System.out.println(js.toJSONString());
         list.add(js);
         System.out.println("企业基本信息,listttt>" + JSON.toJSONString(list));
         return js;
     }
 
-    // ExcelHeadProperty ehp = analysisContext.getExcelHeadProperty();
-    // for(List<String> s : ehp.getHead()){
-    //     modelHeads += s.get(0) + ",";
-    // }
-    // context.readRowHolder().setRowIndex(2);
-    // System.out.println("1:" + JSON.toJSONString(context.currentReadHolder().excelReadHeadProperty().getHeadMap()));
-    // System.out.println("2:" + JSON.toJSONString(context.currentReadHolder().excelReadHeadProperty().getContentPropertyMap()));
-    // System.out.println("3:" + JSON.toJSONString(context.currentReadHolder().excelReadHeadProperty().getHeadRowNumber()));
-    //是否手动传入表头信息 没有则自动读取实体类头信息
-    // try {
-    //     if(headMap  == null || headMap.size() <= 0){
-    //         // context.
-    //         Map<Integer, Head> map = context.currentReadHolder().excelReadHeadProperty().getHeadMap();
-    //         for (int i = 0; i < map.size(); i++) {
-    //             //封装成headMap
-    //             headMap.put(map.get(i).getColumnIndex(),map.get(i).getHeadNameList().get(0));//加入模板头
-    //         }
-    //     }
-    // }catch (Exception e){
-    //     isCorrectFormat = false; //导入错误
-    //     resultMessage = "导入失败,请联系管理员!";
-    //     log.info("未自定义Excel头信息,自动读取实体类注解的头信息,缺少注解name或index值!",e);
-    //     return;
-    // }
-    //
-    // log.info("导入的表头:" + headMap);
-    // log.info("模板的表头:" + headMap);
-    // if(headMap == null || headMap == null || headMap.size() != headMap.size()){
-    //     isCorrectFormat = false; //导入表头错误
-    //     resultMessage = "导入表的表头与模板表头不符!";
-    //     log.info("导入表的表头与模板表头不符!");
-    // }else {
-    //     for (int i = 0; i < headMap.size(); i++) { //循环遍历判断表格头是否一一对应
-    //         if(!headMap.get(i).equals(headMap.get(i))){
-    //             isCorrectFormat = false; //导入表头错误
-    //             resultMessage = "导入表的表头与模板表头不符!";
-    //             log.info("导入表的表头与模板表头不符!");
-    //             break;
-    //         }
-    //     }
-    // }
-
     /**
      * 解析出现错误会进入该方法 具体看源代码或文档
      */
@@ -265,23 +202,4 @@ public class EnterpriseBasicInfoExcelDataListener extends AnalysisEventListener<
         throw exception;
     }
 
-//     @Override
-//     public void onException(Exception exception, AnalysisContext analysisContext) {
-// //        logger.error("解析失败,但是继续解析下一行:{}", exception.getMessage());
-//         // 如果是某一个单元格的转换异常 能获取到具体行号
-//         // 如果要获取头的信息 配合invokeHeadMap使用
-//         if (exception instanceof ExcelDataConvertException) { //表格内容转换异常
-//             ExcelDataConvertException excelException = (ExcelDataConvertException) exception;
-//             log.error("第{}行,第{}列解析异常", excelException.getRowIndex() + 1, excelException.getColumnIndex() + 1);
-//             resultMessage = "第" + (excelException.getRowIndex() + 1) + "行,第" + (excelException.getColumnIndex() + 1) + "列,内容格式错误!";
-//             enterpriseBasicInfoExcelDataList.clear();
-//         } else {
-//             log.error("导入解析异常!", exception);
-//             resultMessage = "导入异常!,请联系管理员";
-//             enterpriseBasicInfoExcelDataList.clear();
-//             isCorrectFormat = false;
-//         }
-//
-//
-//     }
 }

+ 2 - 2
ttc-backen/src/main/java/cn/ubitech/ttc/model/ResourceChoice/ResourceChoiceMoreModel.java

@@ -11,7 +11,7 @@ import java.util.Collection;
  * @create 2021-10-09 18:26
  */
 @Data
-public class ResourceChoiceMoreModel implements Serializable {
-    private String title;
+public class ResourceChoiceMoreModel extends ResourceChoiceMore {
+    // private Object items;
     private Object items;
 }

+ 21 - 7
ttc-backen/src/main/java/cn/ubitech/ttc/model/common/ElasticSearchTTCModel.java

@@ -106,18 +106,32 @@ public class ElasticSearchTTCModel implements ILabelESInterface {
 
     //高企一件事所需字段
     private String registrationdate;   //成立日期
-    private Double yesteryearrevenue;  //上年度营收(税务)
-    private Double yesteryeardeduct;   //上年度允许扣除研发费用
     private Integer patentcount;   //发明专利数量
-
-    private Integer registrationyear;   //成立年限
     private Integer patentforutilitycount;  //实用新型授权数
     private Integer patentforsoftwarecount;   //软件著作权数
     private Integer highidentificationdate;   //国高最新认定年份(只存年份)
-    private Double yearrevenue;  //年度营收
-    private Double deductexpenses;   //允许扣除的研发费用
-    private String highdomain;   //国高领域
     private Integer feidipeoplecount;   //飞地研发中心专职人员数
     private Double feidiarea;   //飞地研发中心场地面积
+    private String highdomain;   //国高领域
+
+    private Double revenue2018;  //2018年营业收入
+    private Double deductexpenses2018;  //2018年允许扣除的研发费用
+    private Double revenue2019;  //2019年营业收入
+    private Double deductexpenses2019;  //2019年允许扣除的研发费用
+    private Double revenue2020;  //2020年营业收入
+    private Double deductexpenses2020;  //2020年允许扣除的研发费用
+    private Double revenue2021; //2021年营业收入
+    private Double deductexpenses2021;  //2021年允许扣除的研发费用
+    private Double revenue2022;  //2022年营业收入
+    private Double deductexpenses2022;  //2022年允许扣除的研发费用
+    private Double revenue2023;   //2023年营业收入
+    private Double deductexpenses2023;  //2023年允许扣除的研发费用
+    private Double revenue2024;   //2024年营业收入
+    private Double deductexpenses2024;  //2024年允许扣除的研发费用
+    private Double revenue2025;  //2025年营业收入
+    private Double deductexpenses2025;  //2025年允许扣除的研发费用
+
 
+    // private Double yesteryearrevenue;  //上年度营收(税务)
+    // private Double yesteryeardeduct;   //上年度允许扣除研发费用
 }

+ 15 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/model/organization/ImpotModel.java

@@ -0,0 +1,15 @@
+package cn.ubitech.ttc.model.organization;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author lys
+ * @create 2021-10-29 9:36
+ */
+@Data
+public class ImpotModel {
+    private List<Object> basicInfos;
+    private String nodeId;
+}

+ 1 - 1
ttc-backen/src/main/java/cn/ubitech/ttc/service/entry/EntryService.java

@@ -75,7 +75,7 @@ public interface EntryService {
      * @param taxInfos
      * @return
      */
-    int editTax(List<CompanyTaxLkExcelData> taxInfos);
+    int editTax(List<Object> taxInfos, String nodeId);
 
     /**
      * 3、企业专利信息编辑接口

+ 166 - 10
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/datatools/DataEntryResourceImpl.java

@@ -22,6 +22,7 @@ import org.mockito.internal.matchers.Or;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.text.ParseException;
@@ -216,6 +217,41 @@ public class DataEntryResourceImpl {
         return resourcelibrary;
     }
 
+    //针对桐庐高企一件事需求专门处理  todo lys
+    public Resourcelibrary insertResourceLibrary2(OrganizationInfo organizationInfo, String claid, String node) {
+        Resourcelibrary resourcelibrary = transferToResourceLibrary(organizationInfo, node);
+        List<Resourcelibrary> resourcelibraryList = resourcelibraryMapper.selectList(new EntityWrapper<Resourcelibrary>()
+                .eq("title", resourcelibrary.getTitle()).eq("restype", resourcelibrary.getRestype()).eq("comefrom", node));
+        //资源库中有同名资源进行修改操作
+        if (CollectionUtils.isNotEmpty(resourcelibraryList)) {
+            resourcelibrary.setId(resourcelibraryList.get(0).getId());
+        }
+        if ("null".equals(resourcelibrary.getIshigh())) {
+            resourcelibrary.setIshigh("");
+        }
+        if (resourcelibrary.getId() != null) {
+            resourcelibrary.setSnowflakeid(resourcelibraryList.get(0).getSnowflakeid());
+            resourcelibraryMapper.updateById(resourcelibrary);
+        } else {
+            resourcelibraryMapper.insert(resourcelibrary);
+        }
+        //添加标签标记(资源库id)
+        if (organizationInfo != null && organizationInfo.getOrgtype() != null && organizationInfo.getOrgtype() == 10104L) {//企业
+            Util.initResourceTypeAndIdBuilder("6", String.valueOf(resourcelibrary.getId()));
+        }
+        if (organizationInfo != null && organizationInfo.getOrgtype() != null && organizationInfo.getOrgtype() == 10105L) {//高校
+            Util.initResourceTypeAndIdBuilder("7", String.valueOf(resourcelibrary.getId()));
+        }
+        insertResTypeLk(resourcelibrary, resourcelibrary.getRestype());
+        long userId = resourcelibrary.getCreator() == null ? 0L : resourcelibrary.getCreator();
+        Map<String, Object> map = commonService.getObjectDefalutAuthority(resourcelibrary.getTablename(), userId);
+        resourcelibrary.setMap(map);
+        commonService.insertAuthority(resourcelibrary);
+        insertResclaid(resourcelibrary, claid);
+        insertES(resourcelibrary, claid, node);
+        return resourcelibrary;
+    }
+
     /**
      * 组织机构插入资源库
      *
@@ -560,7 +596,8 @@ public class DataEntryResourceImpl {
         resourcelibrary.setIshigh(organizationInfo.getIshigh() == null ? "" : String.valueOf(organizationInfo.getIshigh()));
         resourcelibrary.setIsrecinvest(organizationInfo.getIsrecinvest());
         resourcelibrary.setOid(organizationInfo.getId());
-        resourcelibrary.setCode(organizationInfo.getOrgcode() != null ? organizationInfo.getOrgcode() : "");
+        resourcelibrary.setCode(organizationInfo.getOrgcode() != null ? organizationInfo.getOrgcode() : "");   //统一社会信用代码
+        resourcelibrary.setInstitutioncode(organizationInfo.getInstitutioncode() != null ? organizationInfo.getInstitutioncode() : "");
         resourcelibrary.setContent(organizationInfo.getAbout() != null ? organizationInfo.getAbout() : "");
         resourcelibrary.setAddress(organizationInfo.getDetailaddress() != null ? organizationInfo.getDetailaddress() : "");
         resourcelibrary.setRegion(organizationInfo.getDistrict() != null ? organizationInfo.getDistrict() : "");
@@ -575,7 +612,7 @@ public class DataEntryResourceImpl {
         resourcelibrary.setFaxNo(organizationInfo.getFax() != null ? organizationInfo.getFax() : "");
         resourcelibrary.setEmail(organizationInfo.getEmail() != null ? organizationInfo.getEmail() : "");
         resourcelibrary.setPeoplenum(organizationInfo.getPeopleengagedNum() != null ? organizationInfo.getPeopleengagedNum() : Constant.ZERO);
-        resourcelibrary.setRegistrationdate(organizationInfo.getRegistrationdate() != null ? organizationInfo.getRegistrationdate() : null);
+        resourcelibrary.setRegistrationdate(organizationInfo.getRegistrationdate());
         resourcelibrary.setRegistrationtype(organizationInfo.getRegistrationtype() != null ? organizationInfo.getRegistrationtype() : Constant.ZERO);
         resourcelibrary.setRegistrationcapital(organizationInfo.getRegistrationcapital() != null ? organizationInfo.getRegistrationcapital() : Constant.ZERO);
         resourcelibrary.setHasinlibrary(organizationInfo.getHasinlibrary() != null ? organizationInfo.getHasinlibrary() : Constant.ZERO);
@@ -591,7 +628,7 @@ public class DataEntryResourceImpl {
         resourcelibrary.setServicemediatorname(organizationInfo.getServicemediatorname() != null ? organizationInfo.getServicemediatorname() : "");
         resourcelibrary.setServiceintermediaryname(organizationInfo.getServiceintermediaryname() != null ? organizationInfo.getServiceintermediaryname() : "");
         resourcelibrary.setServiceintermediarytel(organizationInfo.getServiceintermediarytel() != null ? organizationInfo.getServiceintermediarytel() : "");
-        resourcelibrary.setHasregulationorg(organizationInfo.getHasregulationorg() != null ? organizationInfo.getHasregulationorg() : Constant.ZERO);
+        resourcelibrary.setHasregulationorg(organizationInfo.getHasregulationorg() != null ? organizationInfo.getHasregulationorg() : Constant.ZERO);   //是否规上
         resourcelibrary.setHighidentificationdate(organizationInfo.getHighidentificationdate());
         resourcelibrary.setHascooperation(organizationInfo.getHascooperation() != null ? organizationInfo.getHascooperation() : Constant.ZERO);
         resourcelibrary.setThreestationsname(organizationInfo.getThreestationsname() != null ? organizationInfo.getThreestationsname() : "");
@@ -648,10 +685,91 @@ public class DataEntryResourceImpl {
         resourcelibrary.setScienceContact(organizationInfo.getSciencecontact() != null ? organizationInfo.getSciencecontact() : "");   //科技联络人
         resourcelibrary.setScienceContactphone(organizationInfo.getSciencecontactphone() != null ? organizationInfo.getSciencecontactphone() : "");   //科技联络人联系方式
         resourcelibrary.setTownPlatform(organizationInfo.getTownplatform() != null ? organizationInfo.getTownplatform() : "");     //乡镇(街道)平台
-        resourcelibrary.setHasregulationorg(organizationInfo.getHasregulationorg() != null ? (organizationInfo.getHasregulationorg() == 1 ? 10501 : 10502) : 10502);   //是否规上
         resourcelibrary.setLastyearrevenue(organizationInfo.getLastyearrevenue() != null ? organizationInfo.getLastyearrevenue() : Constant.ZERO);    //上年度营业收入
         resourcelibrary.setLastyeardeductexpenses(organizationInfo.getLastyeardeductexpenses() != null ? organizationInfo.getLastyeardeductexpenses() : Constant.ZERO);   //上年度允许扣除的研发费用
-        resourcelibrary.setHighidentificationyear(StringUtils.isNotEmpty(organizationInfo.getHighenterprisecode()) ? organizationInfo.getHighenterprisecode().substring(2,6) : "");
+        resourcelibrary.setHighidentificationyear(StringUtils.isNotEmpty(organizationInfo.getHighenterprisecode()) ? organizationInfo.getHighenterprisecode().substring(2,6) : "");  //高企认定年份
+        resourcelibrary.setFeidipeoplecount(organizationInfo.getFeidipeoplecount() != null ? organizationInfo.getFeidipeoplecount() : 0);  //飞地研发中心专职研发人员数
+        resourcelibrary.setFeidiarea(organizationInfo.getFeidiarea() != null ? organizationInfo.getFeidiarea() : 0);  //飞地研发中心场地面积
+        resourcelibrary.setThreeyearsrevenue(organizationInfo.getThreeyearsrevenue() != null ? organizationInfo.getThreeyearsrevenue() : 0.00);  //前三年营业收入
+        resourcelibrary.setThreeyeardeductexpenses(organizationInfo.getThreeyeardeductexpenses() != null ? organizationInfo.getThreeyeardeductexpenses() : 0.00);   //前三年允许扣除的研发费用
+        resourcelibrary.setTwoyearrevenue(organizationInfo.getTwoyearrevenue() != null ? organizationInfo.getTwoyearrevenue() : 0.00);  //前两年营业收入
+        resourcelibrary.setTwoyeardeductexpenses(organizationInfo.getTwoyeardeductexpenses() != null ? organizationInfo.getTwoyeardeductexpenses() : 0.00);   //前两年允许扣除的研发费用
+
+        //高企一件事是否选项、国高、规上选择‘是’时,添加到企业资质中,作为筛选条件
+        if (node.equals("330122000")) {
+            //国高
+            if (organizationInfo.getIskunitaka() != null && 1 == organizationInfo.getIskunitaka() && !resourcelibrary.getIshigh().contains("8301")) {
+                if (StringUtils.isEmpty(resourcelibrary.getIshigh())) {
+                    resourcelibrary.setIshigh("8301");
+                } else {
+                    resourcelibrary.setIshigh(resourcelibrary.getIshigh() + ",8301");
+                }
+            }
+            //规上
+            if (organizationInfo.getHasregulationorg() != null && 1 == organizationInfo.getHasregulationorg() && !resourcelibrary.getIshigh().contains("8304")) {
+                if (StringUtils.isEmpty(resourcelibrary.getIshigh())) {
+                    resourcelibrary.setIshigh("8304");
+                } else {
+                    resourcelibrary.setIshigh(resourcelibrary.getIshigh() + ",8304");
+                }
+            }
+            //省级重点企业研究院
+            if (organizationInfo.getIsprovincialemphasisenterprise() != null && 1 == organizationInfo.getIsprovincialemphasisenterprise()) {
+                if (StringUtils.isEmpty(resourcelibrary.getIshigh())) {
+                    resourcelibrary.setIshigh("3836");
+                } else {
+                    resourcelibrary.setIshigh(resourcelibrary.getIshigh() + ",3836");
+                }
+            }
+            //省级企业研究院
+            if (organizationInfo.getIsprovincialenterprise() != null && 1 == organizationInfo.getIsprovincialenterprise()) {
+                if (StringUtils.isEmpty(resourcelibrary.getIshigh())) {
+                    resourcelibrary.setIshigh("3837");
+                } else {
+                    resourcelibrary.setIshigh(resourcelibrary.getIshigh() + ",3837");
+                }
+            }
+            //省高新技术研究开发中心
+            if (organizationInfo.getIshighandnewenterprise() != null && 1 == organizationInfo.getIshighandnewenterprise()) {
+                if (StringUtils.isEmpty(resourcelibrary.getIshigh())) {
+                    resourcelibrary.setIshigh("3838");
+                } else {
+                    resourcelibrary.setIshigh(resourcelibrary.getIshigh() + ",3838");
+                }
+            }
+            //省科小
+            if (organizationInfo.getIsprovincesciencesmall() != null && 1 == organizationInfo.getIsprovincesciencesmall()) {
+                if (StringUtils.isEmpty(resourcelibrary.getIshigh())) {
+                    resourcelibrary.setIshigh("3839");
+                } else {
+                    resourcelibrary.setIshigh(resourcelibrary.getIshigh() + ",3839");
+                }
+            }
+            //雏鹰计划企业
+            if (organizationInfo.getIseyasenterprise() != null && 1 == organizationInfo.getIseyasenterprise()) {
+                if (StringUtils.isEmpty(resourcelibrary.getIshigh())) {
+                    resourcelibrary.setIshigh("3840");
+                } else {
+                    resourcelibrary.setIshigh(resourcelibrary.getIshigh() + ",3840");
+                }
+            }
+            //市级研发中心
+            if (organizationInfo.getIsmunicipalresearch() != null && 1 == organizationInfo.getIsmunicipalresearch()) {
+                if (StringUtils.isEmpty(resourcelibrary.getIshigh())) {
+                    resourcelibrary.setIshigh("3841");
+                } else {
+                    resourcelibrary.setIshigh(resourcelibrary.getIshigh() + ",3841");
+                }
+            }
+            //已在建飞地研发中心
+            if (organizationInfo.getIsfeidienterprise() != null && 1 == organizationInfo.getIsfeidienterprise()) {
+                if (StringUtils.isEmpty(resourcelibrary.getIshigh())) {
+                    resourcelibrary.setIshigh("3842");
+                } else {
+                    resourcelibrary.setIshigh(resourcelibrary.getIshigh() + ",3842");
+                }
+            }
+        }
         return resourcelibrary;
     }
 
@@ -1030,9 +1148,45 @@ public class DataEntryResourceImpl {
         elasticSearchTTCModel.setPatentcount(resourcelibrary.getPatentcount());   //发明专利数量
         elasticSearchTTCModel.setPatentforutilitycount(resourcelibrary.getPatentforutilitycount());   //实用新型数
         elasticSearchTTCModel.setPatentforsoftwarecount(resourcelibrary.getPatentforsoftwarecount());   //软件著作权数
-        elasticSearchTTCModel.setYesteryearrevenue(resourcelibrary.getLastyearrevenue());   //上年度营业收入(做筛选时以最新更新的为准)
-        elasticSearchTTCModel.setYesteryeardeduct(resourcelibrary.getLastyeardeductexpenses());   //上年度允许扣除的研发费用(做筛选时以最新更新的为准)
-        elasticSearchTTCModel.setHighidentificationdate(Integer.valueOf(resourcelibrary.getHighidentificationyear()));   //国高最新认定年份
+        // elasticSearchTTCModel.setYesteryearrevenue(resourcelibrary.getLastyearrevenue());   //上年度营业收入(做筛选时以最新更新的为准)
+        // elasticSearchTTCModel.setYesteryeardeduct(resourcelibrary.getLastyeardeductexpenses());   //上年度允许扣除的研发费用(做筛选时以最新更新的为准)
+        elasticSearchTTCModel.setHighidentificationdate(StringUtils.isNotEmpty(resourcelibrary.getHighidentificationyear()) ? Integer.valueOf(resourcelibrary.getHighidentificationyear()) : 0);   //国高最新认定年份
+        elasticSearchTTCModel.setFeidiarea(resourcelibrary.getFeidiarea() != null ? resourcelibrary.getFeidiarea() : 0.00);
+        elasticSearchTTCModel.setFeidipeoplecount(resourcelibrary.getFeidipeoplecount() != null ? resourcelibrary.getFeidipeoplecount() : 0);
+
+
+        //利用反射将税务数据存储到es中
+        try{
+            int i = Calendar.getInstance().get(Calendar.YEAR);
+            //前三年营业收入和允许扣除的研发费用
+            Class<? extends ElasticSearchTTCModel> clazz = elasticSearchTTCModel.getClass();
+            Field f1 = clazz.getDeclaredField("revenue" + (i - 3));
+            f1.setAccessible(true);
+            f1.set(elasticSearchTTCModel,resourcelibrary.getThreeyearsrevenue());
+            Field f2 = clazz.getDeclaredField("deductexpenses" + (i - 3));
+            f2.setAccessible(true);
+            f2.set(elasticSearchTTCModel,resourcelibrary.getThreeyeardeductexpenses());
+
+            //前两年营业收入和允许扣除的研发费用
+            Field f3 = clazz.getDeclaredField("revenue" + (i - 2));
+            f3.setAccessible(true);
+            f3.set(elasticSearchTTCModel,resourcelibrary.getTwoyearrevenue());
+            Field f4 = clazz.getDeclaredField("deductexpenses" + (i - 2));
+            f4.setAccessible(true);
+            f4.set(elasticSearchTTCModel,resourcelibrary.getTwoyeardeductexpenses());
+
+            //前一年营业收入和允许扣除的研发费用
+            Field f5 = clazz.getDeclaredField("revenue" + (i - 1));
+            f5.setAccessible(true);
+            f5.set(elasticSearchTTCModel,resourcelibrary.getLastyearrevenue());
+            Field f6 = clazz.getDeclaredField("deductexpenses" + (i - 1));
+            f6.setAccessible(true);
+            f6.set(elasticSearchTTCModel,resourcelibrary.getLastyeardeductexpenses());
+
+        } catch (Exception e) {
+            throw new RuntimeException("构建反射条件时异常");
+        }
+
 
         return elasticSearchTTCModel;
     }
@@ -1168,8 +1322,10 @@ public class DataEntryResourceImpl {
             resTypeLk.setType((long) restype);
             resTypeLk.setCreator(resourcelibrary.getCreator() != null ? resourcelibrary.getCreator() : 0);
             resTypeLk.setUpdater(resourcelibrary.getUpdater() != null ? resourcelibrary.getUpdater() : 0);
+            return resTypeLkMapper.insert(resTypeLk);
+        } else {
+            return resTypeLkMapper.updateById(resTypeLk);
         }
-        return resTypeLkMapper.insert(resTypeLk);
     }
 
     /**
@@ -1514,7 +1670,7 @@ public class DataEntryResourceImpl {
         List<YearMultipleoptionsSetup> setuptype = yearMultipleoptionsSetupMapper.selectList(new EntityWrapper<YearMultipleoptionsSetup>()
                 .eq("setuptype", Constant.YEAR_MULTIPLEOPTIONS_SETUP_6612)
                 .orderBy("sort")
-                .last("desc"))
+                .last("asc"))
                 .subList(0,3);   //只截取前三个年份
         return setuptype;
     }

+ 1 - 1
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/datatools/ImgServiceImpl.java

@@ -302,7 +302,7 @@ public class ImgServiceImpl {
         SearchFilterModel searchFilterModel = new SearchFilterModel();
         searchFilterModel.setFilterModuleId(8);
         searchFilterModel.setFiltergroupid("1994");
-        Page<ElasticSearchTTCModel> resourcelist = searchService.getResourcelist(searchFilterModel, 0, 2000, new HashSet(), null);
+        Page<ElasticSearchTTCModel> resourcelist = searchService.getResourcelist(searchFilterModel, 0, 2000, new HashSet(), "0",0);
         List<ElasticSearchTTCModel> content = resourcelist.getContent();
         System.out.println("专家库专家数量:-------------》" + content.size());
         for (ElasticSearchTTCModel model : content) {

File diff suppressed because it is too large
+ 600 - 256
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/entry/EntryServiceImpl.java


+ 15 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/CompanyEyasServiceImpl.java

@@ -0,0 +1,15 @@
+package cn.ubitech.ttc.service.impl.mybaits;
+
+import cn.ubitech.ttc.dao.CompanyEyasMapper;
+import cn.ubitech.ttc.entity.CompanyEyas;
+import cn.ubitech.ttc.service.mybaits.ICompanyEyasService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author lys
+ * @create 2021-10-27 10:57
+ */
+@Service
+public class CompanyEyasServiceImpl extends ServiceImpl<CompanyEyasMapper, CompanyEyas> implements ICompanyEyasService {
+}

+ 15 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/CompanyFeidiServiceImpl.java

@@ -0,0 +1,15 @@
+package cn.ubitech.ttc.service.impl.mybaits;
+
+import cn.ubitech.ttc.dao.CompanyFeidiMapper;
+import cn.ubitech.ttc.entity.CompanyFeidi;
+import cn.ubitech.ttc.service.mybaits.ICompanyFeidiService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author lys
+ * @create 2021-10-27 10:29
+ */
+@Service
+public class CompanyFeidiServiceImpl extends ServiceImpl<CompanyFeidiMapper, CompanyFeidi> implements ICompanyFeidiService {
+}

+ 15 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/CompanyKunitakainfoServiceImpl.java

@@ -0,0 +1,15 @@
+package cn.ubitech.ttc.service.impl.mybaits;
+
+import cn.ubitech.ttc.dao.CompanyKunitakainfoMapper;
+import cn.ubitech.ttc.entity.CompanyKunitakainfo;
+import cn.ubitech.ttc.service.mybaits.ICompanyKunitakainfoService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author lys
+ * @create 2021-10-27 10:17
+ */
+@Service
+public class CompanyKunitakainfoServiceImpl extends ServiceImpl<CompanyKunitakainfoMapper, CompanyKunitakainfo> implements ICompanyKunitakainfoService {
+}

+ 15 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/CompanyMunicipalResearchServiceImpl.java

@@ -0,0 +1,15 @@
+package cn.ubitech.ttc.service.impl.mybaits;
+
+import cn.ubitech.ttc.dao.CompanyMunicipalResearchMapper;
+import cn.ubitech.ttc.entity.CompanyMunicipalResearch;
+import cn.ubitech.ttc.service.mybaits.ICompanyMunicipalResearchService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author lys
+ * @create 2021-10-27 10:28
+ */
+@Service
+public class CompanyMunicipalResearchServiceImpl extends ServiceImpl<CompanyMunicipalResearchMapper, CompanyMunicipalResearch> implements ICompanyMunicipalResearchService {
+}

+ 15 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/CompanyProvincialEmphasisImpl.java

@@ -0,0 +1,15 @@
+package cn.ubitech.ttc.service.impl.mybaits;
+
+import cn.ubitech.ttc.dao.CompanyProvincialEmphasisMapper;
+import cn.ubitech.ttc.entity.CompanyProvincialEmphasis;
+import cn.ubitech.ttc.service.mybaits.ICompanyProvincialEmphasisService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author lys
+ * @create 2021-10-27 10:21
+ */
+@Service
+public class CompanyProvincialEmphasisImpl extends ServiceImpl<CompanyProvincialEmphasisMapper, CompanyProvincialEmphasis> implements ICompanyProvincialEmphasisService {
+}

+ 15 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/CompanyProvincialHighandnewServiceImpl.java

@@ -0,0 +1,15 @@
+package cn.ubitech.ttc.service.impl.mybaits;
+
+import cn.ubitech.ttc.dao.CompanyProvincialHighandnewMapper;
+import cn.ubitech.ttc.entity.CompanyProvincialHighandnew;
+import cn.ubitech.ttc.service.mybaits.ICompanyProvincialHighandnewService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author lys
+ * @create 2021-10-27 10:24
+ */
+@Service
+public class CompanyProvincialHighandnewServiceImpl extends ServiceImpl<CompanyProvincialHighandnewMapper, CompanyProvincialHighandnew> implements ICompanyProvincialHighandnewService {
+}

+ 15 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/CompanyProvincialScienceSmallServiceImpl.java

@@ -0,0 +1,15 @@
+package cn.ubitech.ttc.service.impl.mybaits;
+
+import cn.ubitech.ttc.dao.CompanyProvincialScienceSmallMapper;
+import cn.ubitech.ttc.entity.CompanyProvincialScienceSmall;
+import cn.ubitech.ttc.service.mybaits.ICompanyProvincialScienceSmallService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author lys
+ * @create 2021-10-27 10:26
+ */
+@Service
+public class CompanyProvincialScienceSmallServiceImpl extends ServiceImpl<CompanyProvincialScienceSmallMapper, CompanyProvincialScienceSmall> implements ICompanyProvincialScienceSmallService {
+}

+ 15 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/CompanyProvincialServiceImpl.java

@@ -0,0 +1,15 @@
+package cn.ubitech.ttc.service.impl.mybaits;
+
+import cn.ubitech.ttc.dao.CompanyProvincialMapper;
+import cn.ubitech.ttc.entity.CompanyProvincial;
+import cn.ubitech.ttc.service.mybaits.ICompanyProvincialService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author lys
+ * @create 2021-10-27 10:23
+ */
+@Service
+public class CompanyProvincialServiceImpl extends ServiceImpl<CompanyProvincialMapper, CompanyProvincial> implements ICompanyProvincialService {
+}

+ 1 - 1
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/mybaits/SysUsersTaskInfoServiceImpl.java

@@ -458,7 +458,7 @@ public class SysUsersTaskInfoServiceImpl extends ServiceImpl<SysUsersTaskInfoMap
                 filterModel.setFiltergroupid(nodeClassificationLk.getClaid() + "");
                 filterModel.setUnique(uniqueStr);
                 filterModel.setSortKeys("unique,DESC");
-                pagelist = searchService.getResourcelist(filterModel, 0, pagesize, new HashSet<>(), null);
+                pagelist = searchService.getResourcelist(filterModel, 0, pagesize, new HashSet<>(), "0", 0);
             }
             PageModel page = new PageModel();
 //        page.setTotalPage(null == pagelist ? 0 : pagelist.getTotalPages());

+ 225 - 15
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/resource/ElasticSearchServiceImpl.java

@@ -1,10 +1,15 @@
 package cn.ubitech.ttc.service.impl.resource;
 
+import cn.ubitech.ttc.common.utils.DateUtils;
 import cn.ubitech.ttc.entity.ResourceChoice;
 import cn.ubitech.ttc.model.common.Constant;
 import cn.ubitech.ttc.model.common.SearchFilterModel;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import io.swagger.models.auth.In;
+import jdk.nashorn.internal.runtime.logging.Logger;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang.StringUtils;
 import org.elasticsearch.index.query.*;
 import org.elasticsearch.script.Script;
@@ -16,10 +21,7 @@ import org.elasticsearch.search.highlight.HighlightBuilder.Field;
 import org.springframework.stereotype.Service;
 
 import java.lang.reflect.Method;
-import java.util.Calendar;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -49,6 +51,7 @@ import java.util.stream.Collectors;
  * @Description:
  */
 @Service
+@Slf4j
 public class ElasticSearchServiceImpl {
     /**
      * 关键词查询条件
@@ -58,7 +61,7 @@ public class ElasticSearchServiceImpl {
      * @author chen.cong
      * @version 1.0, 2017年6月26日
      */
-    public QueryBuilder getQueryBuider(SearchFilterModel filterModel, Set<ResourceChoice> choiceSet, Integer potentiallibrary) {
+    public QueryBuilder getQueryBuider(SearchFilterModel filterModel, Set<ResourceChoice> choiceSet, String morescreening, Integer potentiallibrary) {
         //查询精度,关键词符合20%即可查询出来
         String minimumShouldMatch = "20%";
         //初始化查询条件
@@ -182,8 +185,11 @@ public class ElasticSearchServiceImpl {
         // MultiMatchQueryBuilder builderSecond = new MultiMatchQueryBuilder(filterModel.getFilterKeyword(), "newtitle");
         // bqb.should(builderSecond);
 
-        //高企一件事潜力库删选
-        // potentiallibraryscreen(bqb, potentiallibrary);
+        //高企一件事更多条件筛选
+        morefilter(bqb, morescreening);
+
+        //高企一件事潜力库筛选
+        potentiallibraryscreen(bqb, potentiallibrary);
         return bqb;
     }
 
@@ -361,18 +367,222 @@ public class ElasticSearchServiceImpl {
         return true;
     }
 
+    public void morefilter(BoolQueryBuilder bqb, String morescreening) {
+        if (!"0".equals(morescreening)) {
+            JSONObject jsonObject = JSONObject.parseObject(morescreening);
+            log.info("高企一件事更多筛选条件:{}",jsonObject);
+
+            String patentcount = jsonObject.getString("patentcount");
+            log.info("发明专利数量区间:{}",patentcount);
+            if (StringUtils.isNotEmpty(patentcount) && patentcount.contains(",")) {
+                String[] split = patentcount.split(",");
+                bqb.must(QueryBuilders.rangeQuery("patentcount").gte(Integer.valueOf(split[0])).lte(Integer.valueOf(split[1])));
+            }
+
+            String patentforutilitycount = jsonObject.getString("patentforutilitycount");
+            log.info("实用新型数量:{}",patentforutilitycount);
+            if (StringUtils.isNotEmpty(patentforutilitycount) && patentforutilitycount.contains(",")) {
+                String[] split = patentforutilitycount.split(",");
+                bqb.must(QueryBuilders.rangeQuery("patentforutilitycount").gte(Integer.valueOf(split[0])).lte(Integer.valueOf(split[1])));
+            }
+
+            String patentforsoftwarecount = jsonObject.getString("patentforsoftwarecount");
+            log.info("软件著作权数:{}",patentforsoftwarecount);
+            if (StringUtils.isNotEmpty(patentforsoftwarecount) && patentforsoftwarecount.contains(",")) {
+                String[] split = patentforsoftwarecount.split(",");
+                bqb.must(QueryBuilders.rangeQuery("patentforsoftwarecount").gte(Integer.valueOf(split[0])).lte(Integer.valueOf(split[1])));
+            }
+
+            String highidentificationdate = jsonObject.getString("highidentificationdate");
+            log.info("国高最新认定年份:{}",highidentificationdate);
+            if (StringUtils.isNotEmpty(highidentificationdate)) {
+                bqb.must(QueryBuilders.termQuery("highidentificationdate",Integer.valueOf(highidentificationdate)));
+            }
+
+            String highdomain = jsonObject.getString("highdomain");
+            log.info("国高八大领域:{}",highdomain);
+            if (StringUtils.isNotEmpty(highdomain)) {
+                String[] split = highdomain.split(",");
+                for (String s : split) {
+                    bqb.should(QueryBuilders.termQuery("highdomain",s));
+                }
+            }
+
+            //更多筛选中的企业资质(省级重点企业研究院、省级企业研究院、省级研发中心、省科小、市雏鹰、市级研发中心、已在建飞地研发中心)
+            List<String> status = new ArrayList();
+            String status1 = jsonObject.getString("status1");
+            if (StringUtils.isNotEmpty(status1))
+                status.add(status1);
+            String status2 = jsonObject.getString("status2");
+            if (StringUtils.isNotEmpty(status2))
+                status.add(status2);
+            String status3 = jsonObject.getString("status3");
+            if (StringUtils.isNotEmpty(status3))
+                status.add(status3);
+            String status4 = jsonObject.getString("status4");
+            if (StringUtils.isNotEmpty(status4))
+                status.add(status4);
+            String status5 = jsonObject.getString("status5");
+            if (StringUtils.isNotEmpty(status5))
+                status.add(status5);
+            String status6 = jsonObject.getString("status6");
+            if (StringUtils.isNotEmpty(status6))
+                status.add(status6);
+            String status7 = jsonObject.getString("status7");
+            if (StringUtils.isNotEmpty(status7))
+                status.add(status7);
+            String status8 = jsonObject.getString("status8");
+            if (StringUtils.isNotEmpty(status8))
+                status.add(status8);
+            log.info("是否省级重点企业研究院、省级企业研究院、省级研发中心、省科小、市雏鹰、市级研发中心、已在建飞地研发中心:{}",status);
+            if (CollectionUtils.isNotEmpty(status) && status.size() > 0)
+                bqb.must(QueryBuilders.termsQuery("status",status));
+
+
+            String yearrevenue = jsonObject.getString("yearrevenue");
+            log.info("年度营收:{}",yearrevenue);
+            if (StringUtils.isNotEmpty(yearrevenue) && yearrevenue.contains(",")) {
+                String[] split1 = yearrevenue.split(",");
+                if (split1.length == 3) {
+                    bqb.must(QueryBuilders.rangeQuery("revenue" + split1[0]).gte(Integer.valueOf(split1[1])).lte(Integer.valueOf(split1[2])));
+                }
+            }
+
+            String deductexpenses = jsonObject.getString("deductexpenses");
+            log.info("年度允许扣除的研发费用:{}",deductexpenses);
+            if (StringUtils.isNotEmpty(deductexpenses) && deductexpenses.contains(",")) {
+                String[] split = deductexpenses.split(",");
+                if (split.length == 3) {
+                    bqb.must(QueryBuilders.rangeQuery("deductexpenses" + split[0]).gte(Integer.valueOf(split[1])).lte(Integer.valueOf(split[2])));
+                }
+            }
+
+            String feidipeoplecount = jsonObject.getString("feidipeoplecount");
+            log.info("飞地研发中心专职人员数");
+            if (StringUtils.isNotEmpty(feidipeoplecount) && feidipeoplecount.contains(",")) {
+                String[] split = feidipeoplecount.split(",");
+                bqb.must(QueryBuilders.rangeQuery("feidipeoplecount").gte(Integer.valueOf(split[0])).lte(Integer.valueOf(split[1])));
+            }
+
+            String feidiarea = jsonObject.getString("feidiarea");
+            log.info("飞地研发中心场地面积:{}",feidiarea);
+            if (StringUtils.isNotEmpty(feidiarea) && feidiarea.contains(",")) {
+                String[] split = feidiarea.split(",");
+                bqb.must(QueryBuilders.rangeQuery("feidiarea").gte(Double.valueOf(split[0])).lte(Double.valueOf(split[1])));
+            }
+        }
+    }
+
+
+
+
     public void potentiallibraryscreen(BoolQueryBuilder bqb, Integer potentiallibrary) {
-        if (potentiallibrary == null) {
-            return;
-        } else {
+        int i = Calendar.getInstance().get(Calendar.YEAR);
+        if (potentiallibrary != null) {
             switch (potentiallibrary) {
                 case Constant.ONE :   //潜力库国高筛选条件
-                    int i = Calendar.getInstance().get(Calendar.YEAR);
-                    Script script1 = new Script("doc['enterprisescale'].value - 1 > 3");   //发明专利>0
-                    Script script2 = new Script("doc['highidentificationdate'].value + 3 <=" + i);   //国高三年到期
-                    ScriptQueryBuilder scriptQueryBuilder1 = QueryBuilders.scriptQuery(script1);
+                    log.info("当今年份:{}",i);
+                    Script script2 = new Script("doc['highidentificationdate'].value + 3 >=" + i);   //国高三年到期
+                    Script script3 = new Script("doc['" + "deductexpenses " + (i - 1) + "'].value / doc['" + "revenue" + (i - 1) + "'].value > 0.03");   //上年度加计扣除 / 允许扣除的研发费用 > 3%
                     ScriptQueryBuilder scriptQueryBuilder2 = QueryBuilders.scriptQuery(script2);
-                    // bqb.must(scriptQueryBuilder1).must(scriptQueryBuilder2).should(QueryBuilders.termQuery());
+                    ScriptQueryBuilder scriptQueryBuilder3 = QueryBuilders.scriptQuery(script3);
+                    bqb.must(scriptQueryBuilder2);
+                    bqb.must(scriptQueryBuilder3);
+                    bqb.mustNot(QueryBuilders.termQuery("status",8301));  //非国高
+                    bqb.must(QueryBuilders.rangeQuery("revenue" + (i - 1)).gt(300));  //上年度营收>300万元
+                    bqb.must(QueryBuilders.rangeQuery("patentcount").gt(0));   //发明专利数量 > 0
+                    break;
+                case Constant.TWO:   //省科小
+                    bqb.mustNot(QueryBuilders.termQuery("status",3839));  //非省科小
+                    Script script = new Script("doc['patentcount'].value + doc['patentforutilitycount'].value + doc['patentforsoftwarecount'].value > 1");   //发明专利数 + 实用新型数 + 软件著作权数  > 1
+                    ScriptQueryBuilder scriptQueryBuilder4 = QueryBuilders.scriptQuery(script);
+                    bqb.must(scriptQueryBuilder4);
+                    bqb.must(QueryBuilders.rangeQuery("revenue" + (i - 1)).gt(20));  //上年度营收  > 20万元
+                    break;
+                case Constant.THREE:   //雏鹰
+                    String[] s = new String[]{"8301","3840"};
+                    bqb.mustNot(QueryBuilders.termsQuery("status",s));   //非国高、非雏鹰
+                    Date now = new Date();
+                    Calendar instance = Calendar.getInstance();
+                    instance.setTime(now);
+                    instance.add(Calendar.YEAR,-6);
+                    log.info("当前时间:{}",now);
+                    log.info("当前时间减去6年:{}",DateUtils.dateToString(instance.getTime()));
+                    bqb.must(QueryBuilders.rangeQuery("registrationdate").lte(now.getTime()).gte(instance.getTime().getTime()));   //成立年限小于6年
+                    Script script5 = new Script("doc['patentcount'].value + doc['patentforutilitycount'].value + doc['patentforsoftwarecount'].value > 1");   //发明专利数 + 实用新型数 + 软件著作权数  > 1
+                    ScriptQueryBuilder scriptQueryBuilder5 = QueryBuilders.scriptQuery(script5);
+                    bqb.must(scriptQueryBuilder5);
+                    bqb.must(QueryBuilders.rangeQuery("deductexpenses").gt(30));   //上年度允许扣除的研发费用
+                    Script script6 = new Script("doc['" + "deudctexpenses" + (i - 1) + "'].value / doc['" + "revenue" + (i - 1) + "'].value > 0.03");   //上年度加计扣除 / 上年度营收 > 3%
+                    ScriptQueryBuilder scriptQueryBuilder6 = QueryBuilders.scriptQuery(script6);
+                    bqb.must(scriptQueryBuilder6);
+                    break;
+                case Constant.FOUR:    //市级研发中心
+                    //国高或省科小
+                    bqb.should(QueryBuilders.termQuery("status",8301));
+                    bqb.should(QueryBuilders.termQuery("status",3839));
+                    //非市级研发中心
+                    bqb.mustNot(QueryBuilders.termQuery("status",3841));
+                    //上年度允许扣除的研发费用  > 150万元
+                    bqb.must(QueryBuilders.rangeQuery("deductexpenses" + (i - 1)).gt(150));
+                    break;
+                case Constant.FIVE:   //省级研发中心
+                    bqb.must(QueryBuilders.termQuery("status",8301));   //国高
+                    bqb.must(QueryBuilders.termQuery("status",3834));   //市级研发中心
+                    bqb.mustNot(QueryBuilders.termQuery("status",3838));    //非省级研发中心
+                    //发明专利 >1 || 实用新型数 + 软件著作权数 > 6
+                    Script script8 = new Script("doc['patentforutilitycount'].value + doc['patentforsoftwarecount'].value > 6");
+                    ScriptQueryBuilder scriptQueryBuilder8 = QueryBuilders.scriptQuery(script8);
+                    bqb.should(scriptQueryBuilder8);
+                    BoolQueryBuilder b = new BoolQueryBuilder();
+                    bqb.must(b.should(QueryBuilders.rangeQuery("patentcount").gt(1)).should(scriptQueryBuilder8));
+
+                    BoolQueryBuilder b1 = new BoolQueryBuilder();
+                    BoolQueryBuilder b2 = new BoolQueryBuilder();
+                    BoolQueryBuilder b3 = new BoolQueryBuilder();
+                    BoolQueryBuilder b4 = new BoolQueryBuilder();
+
+                    //上年度营收 < 500万元 && 上年度加计扣除 / 上年度营收 > 4%
+                    Script script9 = new Script("doc['" + "deductexpenses" + (i - 1) + "'].value / doc['" + "revenue" + (i - 1) + "'].value > 0.04");
+                    ScriptQueryBuilder scriptQueryBuilder9 = QueryBuilders.scriptQuery(script9);
+                    b1.must(QueryBuilders.rangeQuery("revenue" + (i - 1)).lt(5000)).must(scriptQueryBuilder9);
+
+                    //(5000万 <= 上年度营收 < 2亿元 && 上年度加计扣除 / 上年度营收 > 3%) || 上年度加计扣除 > 225万
+                    BoolQueryBuilder boolQueryBuilder = new BoolQueryBuilder();
+                    Script script10 = new Script("doc['"+ "deductexpenses" + (i - 1) +"'].value / doc['" + "revenue" + (i - 1) + "'].value > 0.03");
+                    ScriptQueryBuilder scriptQueryBuilder10 = QueryBuilders.scriptQuery(script10);
+                    b2.should(boolQueryBuilder.must(QueryBuilders.rangeQuery("revenue" + (i - 1)).gte(5000).lt(20000)).must(scriptQueryBuilder10));
+                    b2.should(QueryBuilders.rangeQuery("deductexpenses" + (i - 1)).gt(225));
+
+                    //(上年度营收 >= 2亿元 && 上年度加计扣除 / 上年度营收 > 2%) || 上年度加计扣除>750万
+                    Script script11 = new Script("doc['" + "deductexpenses" + (i - 1) + "'].value / doc['" + "revenue" + (i - 1) + "'].value > 0.03");
+                    ScriptQueryBuilder scriptQueryBuilder11 = QueryBuilders.scriptQuery(script11);
+                    BoolQueryBuilder boolQueryBuilder1 = new BoolQueryBuilder();
+                    b3.should(boolQueryBuilder1.must(QueryBuilders.rangeQuery("revenue" + (i -1)).gte(20000)).must(scriptQueryBuilder11));
+                    b3.should(QueryBuilders.rangeQuery("deductexpenses" + (i - 1)).gt(750));
+
+                    bqb.must(b4.should(b1).should(b2).should(b3));
+                    break;
+                case Constant.SIX:   //省级研究院
+                    bqb.must(QueryBuilders.termQuery("status",3838));   //省级研发中心
+                    Long[] longs = new Long[]{3836L,3837L};
+                    bqb.mustNot(QueryBuilders.termsQuery("status",longs));   //非省级研究院和非省级重点研究院
+                    bqb.must(QueryBuilders.rangeQuery("revenue" + (i - 1)).gt(10000));    //上年度营收大于  >  1亿元(es已万元为单位)
+                    Script script7 = new Script("doc['" + "deductexpenses" + (i - 1) + "'].value / doc['" + "revenue" + (i - 1) + "'].value > 0.03");   //上年度加计扣除 / 允许扣除的研发费用 > 3%
+                    ScriptQueryBuilder scriptQueryBuilder = QueryBuilders.scriptQuery(script7);
+                    bqb.should(scriptQueryBuilder);
+                    bqb.should(QueryBuilders.rangeQuery("deductexpenses" + (i - 1)).gt(900));    //上年度加计扣除  > 900万元(与上一条件为或关系)
+                    bqb.must(QueryBuilders.rangeQuery("patentcount").gt(2));   //发明专利  > 2
+                    break;
+                case Constant.SEVEN:  //飞地研发中心(注:区分已在建飞地研发中心)
+                    bqb.must(QueryBuilders.rangeQuery("deductexpenses" + (i - 1)).gte(150));   //上年度允许扣除的研发费用  >=  150万元
+                    bqb.must(QueryBuilders.rangeQuery("patentcount").gt(1));   //发明专利 > 1
+                    bqb.must(QueryBuilders.termQuery("status",3842));   //已在建飞地研发中心
+                    bqb.must(QueryBuilders.rangeQuery("feidipeoplecount").gte(5));   //飞地研发人数  >= 5
+                    bqb.must(QueryBuilders.rangeQuery("feidiarea").gte(100));
+                    break;
+                default:
+                    break;
             }
         }
 

+ 11 - 8
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/resource/ResourceLibraryServiceImpl.java

@@ -21,10 +21,12 @@ import cn.ubitech.ttc.service.impl.resourceChoice.ResouceChoiceServiceImpl;
 import cn.ubitech.ttc.service.impl.search.SearchServiceImpl;
 import cn.ubitech.ttc.service.impl.user.UserServiceImpl;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.baomidou.mybatisplus.plugins.Page;
 import com.google.gson.*;
 
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.poi.hssf.usermodel.HSSFRow;
@@ -71,6 +73,7 @@ import java.util.stream.Collectors;
  * @Description:
  */
 @Service
+@Slf4j
 public class ResourceLibraryServiceImpl {
     @Autowired
     private ResourcelibraryMapper resourcelibraryMapper;
@@ -187,7 +190,7 @@ public class ResourceLibraryServiceImpl {
 
     public void getResourceList(String keyword, Integer pagenum, long userid, String sort, String groupid, Integer moduleid,
                                 String category, Integer tracetype, String labelName, ResultModel resultModel, String node,
-                                Integer potentiallibrary) {
+                                String morescreening, Integer potentiallibrary) {
         if (moduleid == 3) {
             moduleid = 34;
         }
@@ -209,12 +212,12 @@ public class ResourceLibraryServiceImpl {
         org.springframework.data.domain.Page<ElasticSearchTTCModel> pagelist = null;
         //武进联盟活导师库,全查,通知公告库
         if (moduleid == 43 || moduleid == 44 || moduleid == 33) {
-            pagelist = searchService.getResourcelist(filterModel, pagenum, 6, choiceSet, null);
+            pagelist = searchService.getResourcelist(filterModel, pagenum, 6, choiceSet, "0", 0);
             if (pagelist.getTotalElements() > 0) {
-                pagelist = searchService.getResourcelist(filterModel, pagenum, Integer.valueOf(String.valueOf(pagelist.getTotalElements())), choiceSet, null);
+                pagelist = searchService.getResourcelist(filterModel, pagenum, Integer.valueOf(String.valueOf(pagelist.getTotalElements())), choiceSet, "0", 0);
             }
         } else {
-            pagelist = searchService.getResourcelist(filterModel, pagenum, 6, choiceSet, null);
+            pagelist = searchService.getResourcelist(filterModel, pagenum, 6, choiceSet, morescreening, potentiallibrary);
         }
 
         PageModel page = new PageModel();
@@ -467,11 +470,11 @@ public class ResourceLibraryServiceImpl {
         org.springframework.data.domain.Page<ElasticSearchTTCModel> pagelist = null;
         //武进联盟活导师库,全查
         if (moduleid == 43 || moduleid == 44) {
-            pagelist = searchService.getResourcelist(filterModel, pagenum, 6, choiceSet, null);
-            pagelist = searchService.getResourcelist(filterModel, pagenum, Integer.valueOf(String.valueOf(pagelist.getTotalElements())), choiceSet, null);
+            pagelist = searchService.getResourcelist(filterModel, pagenum, 6, choiceSet, "0", 0);
+            pagelist = searchService.getResourcelist(filterModel, pagenum, Integer.valueOf(String.valueOf(pagelist.getTotalElements())), choiceSet, "0",0);
         } else {
-            pagelist = searchService.getResourcelist(filterModel, pagenum, 6, choiceSet, null);
-            pagelist = searchService.getResourcelist(filterModel, pagenum, Integer.valueOf(String.valueOf(pagelist.getTotalElements())), choiceSet, null);
+            pagelist = searchService.getResourcelist(filterModel, pagenum, 6, choiceSet, "0", 0);
+            pagelist = searchService.getResourcelist(filterModel, pagenum, Integer.valueOf(String.valueOf(pagelist.getTotalElements())), choiceSet, "0", 0);
         }
 
         PageModel page = new PageModel();

+ 16 - 31
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/resourceChoice/ResouceChoiceServiceImpl.java

@@ -28,6 +28,7 @@ import org.elasticsearch.action.update.UpdateRequest;
 import org.elasticsearch.client.Client;
 import org.elasticsearch.common.xcontent.XContentFactory;
 import org.elasticsearch.index.query.QueryBuilders;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.elasticsearch.core.ElasticsearchTemplate;
@@ -167,7 +168,7 @@ public class ResouceChoiceServiceImpl {
         List<ElasticSearchTTCModel> sumList = new ArrayList<>();
 
         for (int i = 0; i < pagelist.getTotalPages(); i++) {
-            Page<ElasticSearchTTCModel> list = searchService.getResourcelist(filterModel, i, pagelist.getTotalPages(), new HashSet<>(), null);
+            Page<ElasticSearchTTCModel> list = searchService.getResourcelist(filterModel, i, pagelist.getTotalPages(), new HashSet<>(), "0", 0);
             list.forEach(l -> {
                 sumList.add(l);
             });
@@ -331,44 +332,28 @@ public class ResouceChoiceServiceImpl {
         return isTopResourceFlag;
     }
 
-    public List<ResourceChoiceMoreModel> getResourceChoiceMoreList(String nodeId, Integer restype) {
+    public List<Object> getResourceChoiceMoreList(String nodeId, Integer restype) {
         log.info("nodeId:{},restype:{}",nodeId,restype);
         List<ResourceChoiceMore> resourceChoiceMores = choiceMoreMapper.selectList(new EntityWrapper<ResourceChoiceMore>()
                 .eq("node",nodeId)
                 .eq("restype",restype)
                 .eq("isenabled",Constant.ONE));
+
         Map<String, List<ResourceChoiceMore>> resourceChoiceMap = resourceChoiceMores.stream().collect(Collectors.groupingBy(ResourceChoiceMore::getType));
-        List<ResourceChoiceMoreModel> list = new ArrayList<>();
+        List<ResourceChoiceMore> list1 = resourceChoiceMap.get("国高八大领域");
+        resourceChoiceMap.remove("国高八大领域");
+        List<Object> list = new ArrayList<>();
         resourceChoiceMap.forEach((k,v) -> {
-            if (k.equals("国高八大领域")) {
-                ResourceChoiceMoreModel resourceChoiceMoreModel = new ResourceChoiceMoreModel();
-                resourceChoiceMoreModel.setTitle(k);
-                resourceChoiceMoreModel.setItems(v);
-                list.add(resourceChoiceMoreModel);
-            } else {
-                ResourceChoiceMoreModel resourceChoiceMoreModel = new ResourceChoiceMoreModel();
-                resourceChoiceMoreModel.setTitle(k);
-                resourceChoiceMoreModel.setItems(v.get(0));
-                list.add(resourceChoiceMoreModel);
-            }
-
+            ResourceChoiceMoreModel resourceChoiceMoreModel = new ResourceChoiceMoreModel();
+            ResourceChoiceMore choiceMore = v.get(0);
+            BeanUtils.copyProperties(choiceMore,resourceChoiceMoreModel);
+            list.add(resourceChoiceMoreModel);
         });
-
-        // List<Map<String,Object>> list = new ArrayList();
-        // List<ResourceChoiceMore> list1 = new ArrayList();
-        // for (ResourceChoiceMore choiceMore : resourceChoiceMores) {
-        //     Map<String, Object> map = new HashMap();
-        //     if ("国高八大领域".equals(choiceMore.getType())) {
-        //         list1.add(choiceMore);
-        //     } else {
-        //         map.put("title",choiceMore.getInfo());
-        //     }
-        //     list.add(map);
-        // }
-        // Map<String,Object> map1 = new HashMap();
-        // map1.put("title","国高八大领域");
-        // map1.put("item",list1);
-        // list.add(map1);
+        ResourceChoiceMoreModel resourceChoiceMoreModel2 = new ResourceChoiceMoreModel();
+        BeanUtils.copyProperties(list1.get(0),resourceChoiceMoreModel2);
+        resourceChoiceMoreModel2.setItems(list1);
+        resourceChoiceMoreModel2.setInfo("国高八大领域");
+        list.add(resourceChoiceMoreModel2);
         return list;
     }
 

+ 3 - 3
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/search/SearchServiceImpl.java

@@ -192,7 +192,7 @@ public class SearchServiceImpl {
             SearchFilterModel filterModel = new SearchFilterModel();
             filterModel.setFilterKeyword(keyword);
             org.springframework.data.domain.Page<ElasticSearchTTCModel> resourcelist =
-                    searchService.getResourcelist(filterModel, pageModel.getCurrentPage() - Constant.ONE, 6, new HashSet<>(), 0);
+                    searchService.getResourcelist(filterModel, pageModel.getCurrentPage() - Constant.ONE, 6, new HashSet<>(), "0",0);
             pageModel.setTotalCount(resourcelist.getTotalElements());
             pageModel.setTotalPage(resourcelist.getTotalPages());
             List<ElasticSearchTTCModel> list = resourcelist.getContent();
@@ -232,11 +232,11 @@ public class SearchServiceImpl {
      * @return
      */
     public org.springframework.data.domain.Page<ElasticSearchTTCModel> getResourcelist(SearchFilterModel filterModel,
-                               Integer pagenum, Integer pageSize, Set<ResourceChoice> choiceSet, Integer potentiallibrary) {
+                               Integer pagenum, Integer pageSize, Set<ResourceChoice> choiceSet, String morescreening, Integer potentiallibrary) {
         //构建查询
         NativeSearchQueryBuilder nativeSearchQueryBuilder = new NativeSearchQueryBuilder();
         //搜索条件
-        QueryBuilder qb = esServiceImpl.getQueryBuider(filterModel, choiceSet, potentiallibrary);
+        QueryBuilder qb = esServiceImpl.getQueryBuider(filterModel, choiceSet, morescreening, potentiallibrary);
         System.out.println("qbqbqb:" + JSON.toJSONString(qb));
         nativeSearchQueryBuilder.withQuery(qb);
         //分页

+ 1 - 1
ttc-backen/src/main/java/cn/ubitech/ttc/service/impl/user/UserServiceImpl.java

@@ -690,7 +690,7 @@ public class UserServiceImpl implements IUserService {
             filterModel.setFilterCategory1Name("");
             UserHomeResourceModel model = new UserHomeResourceModel();
             if (pageSize != 0) {
-                Page<ElasticSearchTTCModel> pagelist = searchService.getResourcelist(filterModel, 0, pageSize, new HashSet<>(), null);
+                Page<ElasticSearchTTCModel> pagelist = searchService.getResourcelist(filterModel, 0, pageSize, new HashSet<>(), "0", 0);
                 List<ElasticSearchTTCModel> list = pagelist.getContent();
                 model = setUserHomeResourceModel(info, "resourceCommonDetailsPage", list, true);
             }

+ 12 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/service/mybaits/ICompanyEyasService.java

@@ -0,0 +1,12 @@
+package cn.ubitech.ttc.service.mybaits;
+
+import cn.ubitech.ttc.entity.CompanyEyas;
+import com.baomidou.mybatisplus.service.IService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+
+/**
+ * @author lys
+ * @create 2021-10-27 10:56
+ */
+public interface ICompanyEyasService extends IService<CompanyEyas> {
+}

+ 12 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/service/mybaits/ICompanyFeidiService.java

@@ -0,0 +1,12 @@
+package cn.ubitech.ttc.service.mybaits;
+
+import cn.ubitech.ttc.entity.CompanyFeidi;
+import com.baomidou.mybatisplus.service.IService;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author lys
+ * @create 2021-10-27 9:20
+ */
+public interface ICompanyFeidiService extends IService<CompanyFeidi> {
+}

+ 12 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/service/mybaits/ICompanyKunitakainfoService.java

@@ -0,0 +1,12 @@
+package cn.ubitech.ttc.service.mybaits;
+
+import cn.ubitech.ttc.entity.CompanyKunitakainfo;
+import com.baomidou.mybatisplus.service.IService;
+
+/**
+ * @author lys
+ * @create 2021-10-27 9:11
+ */
+public interface ICompanyKunitakainfoService extends IService<CompanyKunitakainfo> {
+
+}

+ 12 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/service/mybaits/ICompanyMunicipalResearchService.java

@@ -0,0 +1,12 @@
+package cn.ubitech.ttc.service.mybaits;
+
+import cn.ubitech.ttc.entity.CompanyMunicipalResearch;
+import com.baomidou.mybatisplus.service.IService;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author lys
+ * @create 2021-10-27 9:19
+ */
+public interface ICompanyMunicipalResearchService extends IService<CompanyMunicipalResearch> {
+}

+ 12 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/service/mybaits/ICompanyProvincialEmphasisService.java

@@ -0,0 +1,12 @@
+package cn.ubitech.ttc.service.mybaits;
+
+import cn.ubitech.ttc.entity.CompanyProvincialEmphasis;
+import com.baomidou.mybatisplus.service.IService;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author lys
+ * @create 2021-10-27 9:13
+ */
+public interface ICompanyProvincialEmphasisService extends IService<CompanyProvincialEmphasis> {
+}

+ 12 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/service/mybaits/ICompanyProvincialHighandnewService.java

@@ -0,0 +1,12 @@
+package cn.ubitech.ttc.service.mybaits;
+
+import cn.ubitech.ttc.entity.CompanyProvincialHighandnew;
+import com.baomidou.mybatisplus.service.IService;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author lys
+ * @create 2021-10-27 9:16
+ */
+public interface ICompanyProvincialHighandnewService extends IService<CompanyProvincialHighandnew> {
+}

+ 12 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/service/mybaits/ICompanyProvincialScienceSmallService.java

@@ -0,0 +1,12 @@
+package cn.ubitech.ttc.service.mybaits;
+
+import cn.ubitech.ttc.entity.CompanyProvincialScienceSmall;
+import com.baomidou.mybatisplus.service.IService;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author lys
+ * @create 2021-10-27 9:18
+ */
+public interface ICompanyProvincialScienceSmallService extends IService<CompanyProvincialScienceSmall> {
+}

+ 12 - 0
ttc-backen/src/main/java/cn/ubitech/ttc/service/mybaits/ICompanyProvincialService.java

@@ -0,0 +1,12 @@
+package cn.ubitech.ttc.service.mybaits;
+
+import cn.ubitech.ttc.entity.CompanyProvincial;
+import com.baomidou.mybatisplus.service.IService;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author lys
+ * @create 2021-10-27 9:15
+ */
+public interface ICompanyProvincialService extends IService<CompanyProvincial> {
+}

Some files were not shown because too many files changed in this diff