|
@@ -15,6 +15,7 @@ import cn.ubitech.ttc.model.common.PageModel;
|
|
|
import cn.ubitech.ttc.model.common.RequestModel;
|
|
|
import cn.ubitech.ttc.model.common.ResultModel;
|
|
|
import cn.ubitech.ttc.model.researchcost.DownModel;
|
|
|
+import cn.ubitech.ttc.model.user.InspectionPropertyModel;
|
|
|
import cn.ubitech.ttc.model.user.TongTechUser;
|
|
|
import cn.ubitech.ttc.model.web.InnovationVoucherModel;
|
|
|
import cn.ubitech.ttc.service.impl.PushIntegral.PushIntegralServiceImpl;
|
|
@@ -30,15 +31,19 @@ import cn.ubitech.ttc.service.impl.mybaits.SysUsersTaskInfoServiceImpl;
|
|
|
import cn.ubitech.ttc.service.mybaits.ISysUsersInfoService;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
|
|
import com.baomidou.mybatisplus.plugins.Page;
|
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
|
+import com.sun.org.apache.bcel.internal.generic.NEW;
|
|
|
import com.tencentcloudapi.common.Credential;
|
|
|
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
|
|
import com.tencentcloudapi.common.profile.ClientProfile;
|
|
|
import com.tencentcloudapi.common.profile.HttpProfile;
|
|
|
import com.tencentcloudapi.sms.v20190711.SmsClient;
|
|
|
import com.tencentcloudapi.sms.v20190711.models.*;
|
|
|
+import io.swagger.models.auth.In;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFRow;
|
|
@@ -46,6 +51,7 @@ import org.apache.poi.hssf.usermodel.HSSFSheet;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
import org.elasticsearch.client.Client;
|
|
|
import org.joda.time.DateTime;
|
|
|
+import org.omg.CORBA.LongHolder;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -65,6 +71,7 @@ import java.util.concurrent.ExecutorService;
|
|
|
import java.util.concurrent.Executors;
|
|
|
import java.util.concurrent.Future;
|
|
|
import java.util.stream.Collectors;
|
|
|
+import java.util.stream.Stream;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -77,6 +84,7 @@ import java.util.stream.Collectors;
|
|
|
*/
|
|
|
|
|
|
@Service
|
|
|
+@Slf4j
|
|
|
public class SysUsersInfoServiceImpl extends ServiceImpl<SysUsersInfoMapper, SysUsersInfo> implements ISysUsersInfoService {
|
|
|
|
|
|
@Autowired
|
|
@@ -164,6 +172,19 @@ public class SysUsersInfoServiceImpl extends ServiceImpl<SysUsersInfoMapper, Sys
|
|
|
@Autowired
|
|
|
private SysUsersInfoServiceImpl sysUsersInfoService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private InspectionPropertyMapper inspectionPropertyMapper;
|
|
|
+ @Autowired
|
|
|
+ private InspectionEyasOrgMapper eyasOrgMapper;
|
|
|
+ @Autowired
|
|
|
+ private InspectionMunicipalMapper municipalMapper;
|
|
|
+ @Autowired
|
|
|
+ private InspectionProvincialScienceSmallMapper provincialScienceSmallMapper;
|
|
|
+ @Autowired
|
|
|
+ private InspectionProvincialMapper inspectionProvincialMapper;
|
|
|
+ @Autowired
|
|
|
+ private InspectionFeidiMapper inspectionFeidiMapper;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 查询用户是否有认证审核权限
|
|
@@ -1913,6 +1934,7 @@ public class SysUsersInfoServiceImpl extends ServiceImpl<SysUsersInfoMapper, Sys
|
|
|
org.setPatentfordesigncount(Integer.valueOf(highOrgMap.get("appearancepatentcount") == null ? "0" : highOrgMap.get("appearancepatentcount").toString()));
|
|
|
org.setCreator(Long.valueOf(userid));
|
|
|
org.setUpdator(Long.valueOf(userid));
|
|
|
+ org.setIsenabled(1);
|
|
|
organizationInfoMapper.insert(org);
|
|
|
CompanyNodeLk lk = new CompanyNodeLk();
|
|
|
lk.setCompanyid(org.getId());
|
|
@@ -2020,6 +2042,9 @@ public class SysUsersInfoServiceImpl extends ServiceImpl<SysUsersInfoMapper, Sys
|
|
|
}
|
|
|
highOrg.setTechincome(Double.valueOf(threeYearInfoMap.get("techincome") == null ? "0" : threeYearInfoMap.get("techincome").toString()));
|
|
|
System.err.println(threeYearInfoMap.get("income"));
|
|
|
+ if (StringUtils.isNotEmpty(threeYearInfoMap.get("income"))){
|
|
|
+ threeYearInfoMap.put("income","0");
|
|
|
+ }
|
|
|
if (threeYearInfoMap.get("income").toString().equals("0")){
|
|
|
highOrg.setTechincomeinfeetotal(0d);
|
|
|
}else {
|
|
@@ -2946,4 +2971,840 @@ public class SysUsersInfoServiceImpl extends ServiceImpl<SysUsersInfoMapper, Sys
|
|
|
trackLog.setCreator(2865L);
|
|
|
trackLogMapper.insert(trackLog);
|
|
|
}
|
|
|
+
|
|
|
+ //获取自检录入需要的字段
|
|
|
+ public List<InspectionPropertyModel> inspectionPropertyList(Integer restype) {
|
|
|
+ List<InspectionProperty> inspectionProperties = inspectionPropertyMapper.selectList(new EntityWrapper<InspectionProperty>()
|
|
|
+ .eq("restype", restype));
|
|
|
+ List<InspectionPropertyModel> list = new ArrayList();
|
|
|
+ Map<String, List<InspectionProperty>> collect = inspectionProperties.stream().collect(Collectors.groupingBy(InspectionProperty::getGroup));
|
|
|
+ collect.forEach((k,v) -> {
|
|
|
+ InspectionPropertyModel model = new InspectionPropertyModel();
|
|
|
+ model.setTitle(k);
|
|
|
+ model.setItems(v);
|
|
|
+ list.add(model);
|
|
|
+ });
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Map<String, List> inspect(RequestModel requestModel) {
|
|
|
+ long userid = requestModel.getUserid();
|
|
|
+ String node = requestModel.getNode();
|
|
|
+ switch (Integer.valueOf(requestModel.getRestype())) {
|
|
|
+ case 1: //雏鹰自检
|
|
|
+ InspectionEyasOrg inspectionEyasOrg = JSONObject.parseObject(JSONObject.toJSONString(requestModel.getData()), InspectionEyasOrg.class);
|
|
|
+ return insertEyasInspection(inspectionEyasOrg, node, userid);
|
|
|
+ case 2: //省科小自检
|
|
|
+ InspectionProvincialScienceSmall provincialScienceSmall = JSONObject.parseObject(JSONObject.toJSONString(requestModel.getData()), InspectionProvincialScienceSmall.class);
|
|
|
+ return insertProvincialScienceSmallInspect(provincialScienceSmall, node, userid);
|
|
|
+ case 3: //市级研发中心自检
|
|
|
+ InspectionMunicipal inspectionMunicipal = JSONObject.parseObject(JSONObject.toJSONString(requestModel.getData()), InspectionMunicipal.class);
|
|
|
+ return insertMunicipalInspect(inspectionMunicipal, node, userid);
|
|
|
+ case 4: //省级研发中心自检
|
|
|
+ InspectionProvincial inspectionProvincial = JSONObject.parseObject(JSONObject.toJSONString(requestModel.getData()), InspectionProvincial.class);
|
|
|
+ return insertProvincial(inspectionProvincial, node, userid);
|
|
|
+ case 5: //省级企业研究院自检
|
|
|
+ InspectionProvincial provincial = JSONObject.parseObject(JSONObject.toJSONString(requestModel.getData()), InspectionProvincial.class);
|
|
|
+ return insertProvincial2(provincial, node, userid);
|
|
|
+ case 6:
|
|
|
+ InspectionFeidi inspectionFeidi = JSONObject.parseObject(JSONObject.toJSONString(requestModel.getData()), InspectionFeidi.class);
|
|
|
+ return insertFeidi(inspectionFeidi, node, userid);
|
|
|
+ default:
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //市级研发中心自检
|
|
|
+ public Map<String, List> insertMunicipalInspect(InspectionMunicipal inspectionMunicipal, String node, Long userid) {
|
|
|
+
|
|
|
+ Map<String, List> map = new HashMap();
|
|
|
+ List<String> unqualified = new ArrayList();
|
|
|
+ List<String> qualified = new ArrayList();
|
|
|
+
|
|
|
+ List<OrganizationInfo> infos = organizationInfoMapper.getOrgListByNode(inspectionMunicipal.getOrgname(), node);
|
|
|
+ OrganizationInfo info = new OrganizationInfo();
|
|
|
+ if (infos.size() > 0) {
|
|
|
+ info = infos.get(0);
|
|
|
+ inspectionMunicipal.setOrgid(info.getId());
|
|
|
+ } else {
|
|
|
+ //企业不存在,就存入企业库
|
|
|
+ List<LabelIntelligentCommonInfo> labelIntelligentCommonInfos = null;
|
|
|
+ if (StringUtils.isNotEmpty(inspectionMunicipal.getCategory())) {
|
|
|
+ labelIntelligentCommonInfos = labelIntelligentCommonInfoMapper.selectList(new EntityWrapper<LabelIntelligentCommonInfo>().eq("name", inspectionMunicipal.getCategory()).eq("node", node).eq("by1", "category"));
|
|
|
+ if (labelIntelligentCommonInfos.size() == 0) {
|
|
|
+ labelIntelligentCommonInfos = labelIntelligentCommonInfoMapper.selectList(new EntityWrapper<LabelIntelligentCommonInfo>().eq("name", inspectionMunicipal.getCategory()).eq("node", 0).eq("by1", "category"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ info.setName(inspectionMunicipal.getOrgname());
|
|
|
+ info.setOrgtype(10104L);
|
|
|
+ info.setRegistrationdate(inspectionMunicipal.getRegisterdate());
|
|
|
+ info.setContact(StringUtils.isNotEmpty(inspectionMunicipal.getContract()) ? inspectionMunicipal.getContract() : "");
|
|
|
+ info.setContactnum(StringUtils.isNotEmpty(inspectionMunicipal.getContracttel()) ? inspectionMunicipal.getContracttel() : "");
|
|
|
+ info.setOrgcode(StringUtils.isNotEmpty(inspectionMunicipal.getOrgcode()) ? inspectionMunicipal.getOrgcode() : "");
|
|
|
+ info.setCategoryid(CollectionUtils.isNotEmpty(labelIntelligentCommonInfos) ? labelIntelligentCommonInfos.get(0).getCode() : "");
|
|
|
+ info.setWorkercount(inspectionMunicipal.getWorkercount());
|
|
|
+ info.setTechnicalpersonnelcount(inspectionMunicipal.getTechnicalcount());
|
|
|
+ info.setPatentcount(inspectionMunicipal.getPatentcount());
|
|
|
+ info.setPatentforutilitycount(inspectionMunicipal.getNewpatentcount());
|
|
|
+ info.setPatentfordesigncount(inspectionMunicipal.getAppearancepatentcount());
|
|
|
+ info.setPatentforsoftwarecount(inspectionMunicipal.getPatentforsoftwarecount());
|
|
|
+ info.setCreator(userid);
|
|
|
+ info.setUpdator(userid);
|
|
|
+ info.setIsenabled(1);
|
|
|
+ organizationInfoMapper.insert(info);
|
|
|
+ inspectionMunicipal.setOrgid(info.getId());
|
|
|
+
|
|
|
+ insertRelevant(info, node, userid);
|
|
|
+ }
|
|
|
+
|
|
|
+ //注册地在杭州市行政区域内
|
|
|
+ if (inspectionMunicipal.getRegisteraddress().equals("非杭州市")) {
|
|
|
+ unqualified.add("注册地址要在杭州市行政区域内");
|
|
|
+ }
|
|
|
+
|
|
|
+ //注册成立时间大于一年
|
|
|
+ if (inspectionMunicipal.getRegisterdate() != null) {
|
|
|
+ Calendar c = Calendar.getInstance();
|
|
|
+ c.setTime(inspectionMunicipal.getRegisterdate());
|
|
|
+ c.add(Calendar.YEAR,1);
|
|
|
+ if (c.getTime().getTime() >= new Date().getTime()) {
|
|
|
+ unqualified.add("注册成立时间要大于等于一年");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //专职科技人员数 >= 10 || 专职科技人员数 \ 职工总数 >= 10%
|
|
|
+ double rate = inspectionMunicipal.getTechnicalcount() / inspectionMunicipal.getWorkercount();
|
|
|
+ inspectionMunicipal.setTechnicalinworkerrate(rate);
|
|
|
+ if (!(inspectionMunicipal.getTechnicalcount() >= 10 || rate >= 0.1)) {
|
|
|
+ unqualified.add("专职科技人员数要大于等于10 或者 专职科技人员数大于等于职工总数的10%");
|
|
|
+ }
|
|
|
+
|
|
|
+ //市级以上科研项目 > 1 || 企业自主立项技术创新项目 > 3
|
|
|
+ if (!(inspectionMunicipal.getCityabovescientificproject() > 1 || inspectionMunicipal.getSelfdependentproject() > 3)) {
|
|
|
+ unqualified.add("市级以上科研项目数要大于1 或者 企业自主创新项目大于3");
|
|
|
+ }
|
|
|
+
|
|
|
+ //发明专利授权数 + 集成电路布图设计专有权 >= 1 || 新型专利 + 外观设计专利 + 软件著作权 + 登记(奖励)结果 >= 3
|
|
|
+ Integer sum2 = inspectionMunicipal.getPatentcount() + inspectionMunicipal.getIntegratedcircuitcount();
|
|
|
+ Integer sum4 = inspectionMunicipal.getNewpatentcount() + inspectionMunicipal.getAppearancepatentcount() + inspectionMunicipal.getPatentforsoftwarecount() + inspectionMunicipal.getAwardcount();
|
|
|
+ if (!(sum2 >= 1 || sum4 >= 3)) {
|
|
|
+ unqualified.add("发明专利数与集成电路布图设计专有权总和要大于等于1 或者 新型专利与外观设计专利与软件著作权与登记(奖励)结果要大于等于3");
|
|
|
+ }
|
|
|
+
|
|
|
+ //上年度自筹研发投入 >= 200万元
|
|
|
+ if (inspectionMunicipal.getLastyearselfraisedtotal() < 200) {
|
|
|
+ unqualified.add("上年度自筹研发投入要大于等于200万元");
|
|
|
+ }
|
|
|
+
|
|
|
+ //上年度研发投入 / 上年度销售收入 > 3% (农业科技企业)
|
|
|
+ double rate1 = inspectionMunicipal.getLastyearresearchtotal() / inspectionMunicipal.getLastyearsaletotal();
|
|
|
+ inspectionMunicipal.setResearchinsalerate(rate1);
|
|
|
+ if ("农业科技企业".equals(inspectionMunicipal.getOrgtype()) && rate1 <= 0.03) {
|
|
|
+ unqualified.add("农业科技企业,上年度研发投入要大于上年度销售收入的3%");
|
|
|
+ }
|
|
|
+
|
|
|
+ //科研产地面积 >= 200
|
|
|
+ if (inspectionMunicipal.getResearchsitearea() < 200) {
|
|
|
+ unqualified.add("科研场地面积要大于等于200平方米");
|
|
|
+ }
|
|
|
+
|
|
|
+ //专用科研设备原值总额,软件类企业和农业科技企业 >= 100万元;其他企业≥200万元(根据企业类型来判断)
|
|
|
+ if ((inspectionMunicipal.getIssoftwareenterprise() == 1 || "农业科技企业".equals(inspectionMunicipal.getOrgtype())) && inspectionMunicipal.getResearchequipmenttotal() < 100) {
|
|
|
+ unqualified.add("软件类企业和农业科技企业专用科研设备原值总额要大于等于100万元");
|
|
|
+ } else if ((inspectionMunicipal.getIssoftwareenterprise() == 0 || !"农业科技企业".equals(inspectionMunicipal.getOrgtype())) && inspectionMunicipal.getResearchequipmenttotal() < 200){
|
|
|
+ unqualified.add("企业专用科研设备原值总额要大于等于200万元");
|
|
|
+ }
|
|
|
+
|
|
|
+ //专用科研设备原值总额 / 组建中心设施总值 >= 80(若有组建中心,此项需作为评判标准,若无则忽略此项)
|
|
|
+ if (inspectionMunicipal.getIsunitecentre() == 1 && inspectionMunicipal.getUnitecentretotal() != null && inspectionMunicipal.getUnitecentretotal() != 0) {
|
|
|
+ double rate2 = inspectionMunicipal.getResearchequipmenttotal() / inspectionMunicipal.getUnitecentretotal();
|
|
|
+ inspectionMunicipal.setFacilityinunitecentrerate(rate2);
|
|
|
+ if (rate2 < 0.8) {
|
|
|
+ unqualified.add("专用科研设备原值总额要大于等于组件研发中心设施的80%");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ inspectionMunicipal.setCreator(Integer.valueOf(String.valueOf(userid)));
|
|
|
+
|
|
|
+ StringBuilder stringBuilder = new StringBuilder();
|
|
|
+ unqualified.forEach( u -> {
|
|
|
+ stringBuilder.append(u + ",");
|
|
|
+ });
|
|
|
+ inspectionMunicipal.setInconformity(stringBuilder.deleteCharAt(stringBuilder.length() - 1).toString());
|
|
|
+ municipalMapper.insert(inspectionMunicipal);
|
|
|
+
|
|
|
+ //不合格条件
|
|
|
+ if (unqualified.size() > 0) {
|
|
|
+ map.put(inspectionMunicipal.getOrgname() + " 不符合市级研发中心认定条件", unqualified);
|
|
|
+ } else {
|
|
|
+ map.put(inspectionMunicipal.getOrgname() + " 符合市级研发中心认定条件", null);
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ //雏鹰自检
|
|
|
+ public Map<String, List> insertEyasInspection(InspectionEyasOrg inspectionEyasOrg, String node, Long userid) {
|
|
|
+ Map<String, List> map = new HashMap();
|
|
|
+ List<String> unqualified = new ArrayList();
|
|
|
+
|
|
|
+ List<OrganizationInfo> infos = organizationInfoMapper.getOrgListByNode(inspectionEyasOrg.getOrgname(), node);
|
|
|
+ OrganizationInfo info = new OrganizationInfo();
|
|
|
+ if (infos.size() > 0) {
|
|
|
+ info = infos.get(0);
|
|
|
+ } else {
|
|
|
+ //企业信息不存在,就存入企业库
|
|
|
+ List<LabelIntelligentCommonInfo> labelIntelligentCommonInfos = null;
|
|
|
+ if (StringUtils.isNotEmpty(inspectionEyasOrg.getCategory())) {
|
|
|
+ labelIntelligentCommonInfos = labelIntelligentCommonInfoMapper.selectList(new EntityWrapper<LabelIntelligentCommonInfo>().eq("name", inspectionEyasOrg.getCategory()).eq("node", node).eq("by1", "category"));
|
|
|
+ if (labelIntelligentCommonInfos.size() == 0) {
|
|
|
+ labelIntelligentCommonInfos = labelIntelligentCommonInfoMapper.selectList(new EntityWrapper<LabelIntelligentCommonInfo>().eq("name", inspectionEyasOrg.getCategory()).eq("node", 0).eq("by1", "category"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ info.setName(inspectionEyasOrg.getOrgname());
|
|
|
+ info.setOrgtype(10104L);
|
|
|
+ info.setRegistrationdate(inspectionEyasOrg.getRegisterdate());
|
|
|
+ info.setContact(StringUtils.isNotEmpty(inspectionEyasOrg.getContract()) ? inspectionEyasOrg.getContract() : "");
|
|
|
+ info.setContactnum(StringUtils.isNotEmpty(inspectionEyasOrg.getContracttel()) ? inspectionEyasOrg.getContracttel() : "");
|
|
|
+ info.setOrgcode(StringUtils.isNotEmpty(inspectionEyasOrg.getOrgcode()) ? inspectionEyasOrg.getOrgcode() : "");
|
|
|
+ info.setCategoryid(CollectionUtils.isNotEmpty(labelIntelligentCommonInfos) ? labelIntelligentCommonInfos.get(0).getCode() : "");
|
|
|
+ info.setTechnicalpersonnelcount(inspectionEyasOrg.getTechnicalcount() != null ? inspectionEyasOrg.getTechnicalcount() : 0);
|
|
|
+ info.setWorkercount(inspectionEyasOrg.getThisyearworkercount() != null ? inspectionEyasOrg.getThisyearworkercount() : 0);
|
|
|
+ info.setPatentcount(inspectionEyasOrg.getPatentcount() != null ? inspectionEyasOrg.getPatentcount() : 0);
|
|
|
+ info.setPatentforutilitycount(inspectionEyasOrg.getPracticalpatentcount() != null ? inspectionEyasOrg.getPracticalpatentcount() : 0);
|
|
|
+ info.setPatentfordesigncount(inspectionEyasOrg.getAppearancepatentcount() != null ? inspectionEyasOrg.getAppearancepatentcount() : 0);
|
|
|
+ info.setIntellectualpropertyone(inspectionEyasOrg.getOneintellectualcount() != null ? inspectionEyasOrg.getOneintellectualcount() : 0);
|
|
|
+ info.setIntellectualpropertytwo(inspectionEyasOrg.getTwointellectualcount() != null ? inspectionEyasOrg.getTwointellectualcount() : 0);
|
|
|
+ info.setCreator(userid);
|
|
|
+ info.setUpdator(userid);
|
|
|
+ info.setIsenabled(1);
|
|
|
+ organizationInfoMapper.insert(info);
|
|
|
+
|
|
|
+ insertRelevant(info, node, userid);
|
|
|
+ }
|
|
|
+
|
|
|
+ inspectionEyasOrg.setOrgid(info.getId());
|
|
|
+
|
|
|
+ //注册地在杭州市行政区域内
|
|
|
+ if (inspectionEyasOrg.getRegisteraddress().equals("非杭州市")) {
|
|
|
+ unqualified.add("注册地要在杭州市行政区域内");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 1年 <= 注册成立时间 <= 6年
|
|
|
+ Calendar c = Calendar.getInstance();
|
|
|
+ c.setTime(inspectionEyasOrg.getRegisterdate());
|
|
|
+ c.add(Calendar.YEAR,1);
|
|
|
+ long l1 = c.getTimeInMillis();
|
|
|
+ c.add(Calendar.YEAR, 5);
|
|
|
+ long l2 = c.getTimeInMillis();
|
|
|
+ if (l1 > new Date().getTime() && new Date().getTime() > l2) {
|
|
|
+ unqualified.add("注册成立时间要大于等于1年并且小于等于6年");
|
|
|
+ }
|
|
|
+
|
|
|
+ //上年度职工总数 >= 10
|
|
|
+ if (inspectionEyasOrg.getLastyearworkercount() < 10) {
|
|
|
+ unqualified.add("上年度职工总数要大于等于10");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 科技人员数 / 职工总数 >= 15%
|
|
|
+ double rate = inspectionEyasOrg.getTechnicalcount() / inspectionEyasOrg.getThisyearworkercount();
|
|
|
+ inspectionEyasOrg.setTechnicalinworkerrate(rate);
|
|
|
+ if (rate < 0.15) {
|
|
|
+ unqualified.add("科技人员数要占当年度职工总数的15%以上");
|
|
|
+ }
|
|
|
+
|
|
|
+ //上年度销售收入 <= 5000万元
|
|
|
+ if (inspectionEyasOrg.getLastyearsaletotal() > 5000) {
|
|
|
+ unqualified.add("上年度销售收入要大于等于5000万元");
|
|
|
+ }
|
|
|
+
|
|
|
+ //上年度研发投入 >= 50万元
|
|
|
+ if (inspectionEyasOrg.getLastyearresearchtotal() < 50) {
|
|
|
+ unqualified.add("上年度研发投入要大于等于50万元");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 上年度研发投入 / 上年度销售收入
|
|
|
+ * 1.上年度销售收入小于3,000万元的企业 >= 5% ;
|
|
|
+ * 2.上年度销售收入在3,000万元至5000万元的企业 >= 4%
|
|
|
+ * 3.上年度销售收入大于5000万元的企业,直接判定不符合
|
|
|
+ */
|
|
|
+ double rate2 = inspectionEyasOrg.getLastyearresearchtotal() / inspectionEyasOrg.getLastyearsaletotal();
|
|
|
+ inspectionEyasOrg.setResearchdividesalerate(rate2);
|
|
|
+ if (5000 < inspectionEyasOrg.getLastyearsaletotal()) {
|
|
|
+ unqualified.add("上年度销售收入大于5000万元");
|
|
|
+ } else if (3000 <= inspectionEyasOrg.getLastyearsaletotal() && 5000 >= inspectionEyasOrg.getLastyearsaletotal()) {
|
|
|
+ if (rate2 < 0.04) {
|
|
|
+ unqualified.add("上年度销售收入在3000万元至5000万元的企业,上年度的研发投入要占上年度销售收入的4%以上");
|
|
|
+ }
|
|
|
+ } else if (inspectionEyasOrg.getLastyearsaletotal() < 3000) {
|
|
|
+ if (rate2 > 0.05) {
|
|
|
+ unqualified.add("上年度销售收入小于3000万元的企业,上年度的研发投入要占上年度销售收入的5%以上");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ StringBuilder stringBuilder = new StringBuilder();
|
|
|
+ unqualified.forEach(u -> {
|
|
|
+ stringBuilder.append(u + ",");
|
|
|
+ });
|
|
|
+ inspectionEyasOrg.setInconformity(stringBuilder.deleteCharAt(stringBuilder.length() - 1).toString());
|
|
|
+ eyasOrgMapper.insert(inspectionEyasOrg);
|
|
|
+
|
|
|
+ //不合格条件
|
|
|
+ if (unqualified.size() > 0) {
|
|
|
+ map.put(inspectionEyasOrg.getOrgname() + " 不符合雏鹰认定条件", unqualified);
|
|
|
+ } else {
|
|
|
+ map.put(inspectionEyasOrg.getOrgname() + " 符合雏鹰认定条件", null);
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ //省科小自检
|
|
|
+ public Map<String, List> insertProvincialScienceSmallInspect(InspectionProvincialScienceSmall provincialScienceSmall, String node, Long userid) {
|
|
|
+ Map<String, List> map = new HashMap();
|
|
|
+ List<String> unqualified = new ArrayList();
|
|
|
+
|
|
|
+ List<OrganizationInfo> infos = organizationInfoMapper.getOrgListByNode(provincialScienceSmall.getOrgname(), node);
|
|
|
+ OrganizationInfo info = new OrganizationInfo();
|
|
|
+ if (infos.size() > 0) {
|
|
|
+ info = infos.get(0);
|
|
|
+ } else {
|
|
|
+ //企业不存在,就存入企业库
|
|
|
+ List<LabelIntelligentCommonInfo> labelIntelligentCommonInfos = null;
|
|
|
+ if (StringUtils.isNotEmpty(provincialScienceSmall.getCategory())) {
|
|
|
+ labelIntelligentCommonInfos = labelIntelligentCommonInfoMapper.selectList(new EntityWrapper<LabelIntelligentCommonInfo>().eq("name", provincialScienceSmall.getCategory()).eq("node", node).eq("by1", "category"));
|
|
|
+ if (labelIntelligentCommonInfos.size() == 0) {
|
|
|
+ labelIntelligentCommonInfos = labelIntelligentCommonInfoMapper.selectList(new EntityWrapper<LabelIntelligentCommonInfo>().eq("name", provincialScienceSmall.getCategory()).eq("node", 0).eq("by1", "category"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ info.setName(provincialScienceSmall.getOrgname());
|
|
|
+ info.setOrgtype(10104L);
|
|
|
+ info.setRegistrationdate(provincialScienceSmall.getRegisterdate());
|
|
|
+ info.setContact(StringUtils.isNotEmpty(provincialScienceSmall.getContract()) ? provincialScienceSmall.getContract() : "");
|
|
|
+ info.setContactnum(StringUtils.isNotEmpty(provincialScienceSmall.getContracttel()) ? provincialScienceSmall.getContracttel() : "");
|
|
|
+ info.setOrgcode(StringUtils.isNotEmpty(provincialScienceSmall.getOrgcode()) ? provincialScienceSmall.getOrgcode() : "");
|
|
|
+ info.setCategoryid(CollectionUtils.isNotEmpty(labelIntelligentCommonInfos) ? labelIntelligentCommonInfos.get(0).getCode() : "");
|
|
|
+ info.setWorkercount(provincialScienceSmall.getWorkercount() != null ? provincialScienceSmall.getWorkercount() : 0);
|
|
|
+ info.setTechnicalpersonnelcount(provincialScienceSmall.getTechnicalcount() != null ? provincialScienceSmall.getTechnicalcount() : 0);
|
|
|
+ info.setPatentcount(provincialScienceSmall.getPatentcount() != null ? provincialScienceSmall.getPatentcount() : 0);
|
|
|
+ info.setCreator(userid);
|
|
|
+ info.setUpdator(userid);
|
|
|
+ info.setIsenabled(1);
|
|
|
+ organizationInfoMapper.insert(info);
|
|
|
+
|
|
|
+ insertRelevant(info,node,userid);
|
|
|
+ }
|
|
|
+
|
|
|
+ provincialScienceSmall.setOrgid(info.getId());
|
|
|
+
|
|
|
+ //注册地在杭州市行政区域内
|
|
|
+ if (provincialScienceSmall.getRegisteraddress().equals("非杭州市")) {
|
|
|
+ unqualified.add("注册地址要在杭州市行政区域内");
|
|
|
+ }
|
|
|
+
|
|
|
+ //注册成立时间大于一年
|
|
|
+ if (provincialScienceSmall.getRegisterdate() != null) {
|
|
|
+ Calendar c = Calendar.getInstance();
|
|
|
+ c.setTime(provincialScienceSmall.getRegisterdate());
|
|
|
+ c.add(Calendar.YEAR,1);
|
|
|
+ if (c.getTime().getTime() >= new Date().getTime()) {
|
|
|
+ unqualified.add("注册成立时间要大于等于一年");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //专职科技人员数 \ 职工总数 >= 10%
|
|
|
+ double rate = provincialScienceSmall.getTechnicalcount() / provincialScienceSmall.getWorkercount();
|
|
|
+ provincialScienceSmall.setTechnicalinworkerrate(rate);
|
|
|
+ if (rate < 0.01) {
|
|
|
+ unqualified.add("专职科技人员数要大于等于职工总数的10%");
|
|
|
+ }
|
|
|
+
|
|
|
+ //有基于自主知识产权、专有技术或先进知识获得的产品或服务
|
|
|
+ if (provincialScienceSmall.getIshasproprietarytechnology() == 0) {
|
|
|
+ unqualified.add("必须有基于自主知识产权、专有技术或先进知识获得的产品或服务");
|
|
|
+ }
|
|
|
+
|
|
|
+ //上年度销售收入,根据《中小企业划型标准规定》判定企业规模,需要符合中小企业要求 todo 需求存在问题
|
|
|
+
|
|
|
+
|
|
|
+ //上年度研发投入 > 0
|
|
|
+ if (provincialScienceSmall.getLastyearresearch() <= 0) {
|
|
|
+ unqualified.add("上年度没有研发投入");
|
|
|
+ }
|
|
|
+
|
|
|
+ //独立核算、自主经营、自负盈亏
|
|
|
+ if(provincialScienceSmall.getIsindependentmanagement() == 0) {
|
|
|
+ unqualified.add("必须独立核算、自主经营、自负盈亏");
|
|
|
+ }
|
|
|
+
|
|
|
+ //企业上年度不能发生重大安全、重大质量事故、有严重环境违法或严重失信行为
|
|
|
+ if (provincialScienceSmall.getIslastyearshasincident() == 1) {
|
|
|
+ unqualified.add("企业上年度存在重大安全、重大质量事故、有严重环境违法或严重失信行为");
|
|
|
+ }
|
|
|
+
|
|
|
+ StringBuilder stringBuilder = new StringBuilder();
|
|
|
+ unqualified.forEach(u -> {
|
|
|
+ stringBuilder.append(u + ",");
|
|
|
+ });
|
|
|
+ provincialScienceSmall.setInconformity(stringBuilder.deleteCharAt(stringBuilder.length() - 1).toString());
|
|
|
+ provincialScienceSmallMapper.insert(provincialScienceSmall);
|
|
|
+
|
|
|
+ //不合格条件
|
|
|
+ if (unqualified.size() > 0) {
|
|
|
+ map.put(provincialScienceSmall.getOrgname() + " 不符合省科小认定条件", unqualified);
|
|
|
+ } else {
|
|
|
+ map.put(provincialScienceSmall.getOrgname() + " 符合省科小认定条件", null);
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ //省级研发中心自检
|
|
|
+ public Map<String, List> insertProvincial(InspectionProvincial inspectionProvincial, String node, Long userid) {
|
|
|
+ Map<String, List> map = new HashMap();
|
|
|
+ List<String> unqualified = new ArrayList();
|
|
|
+
|
|
|
+ List<OrganizationInfo> infos = organizationInfoMapper.getOrgListByNode(inspectionProvincial.getOrgname(), node);
|
|
|
+ OrganizationInfo info = new OrganizationInfo();
|
|
|
+ if (infos.size() > 0) {
|
|
|
+ info = infos.get(0);
|
|
|
+ } else {
|
|
|
+ //企业信息不存在,就存入企业库
|
|
|
+ List<LabelIntelligentCommonInfo> labelIntelligentCommonInfos = null;
|
|
|
+ if (StringUtils.isNotEmpty(inspectionProvincial.getCategory())) {
|
|
|
+ labelIntelligentCommonInfos = labelIntelligentCommonInfoMapper.selectList(new EntityWrapper<LabelIntelligentCommonInfo>().eq("name", inspectionProvincial.getCategory()).eq("node", node).eq("by1", "category"));
|
|
|
+ if (labelIntelligentCommonInfos.size() == 0) {
|
|
|
+ labelIntelligentCommonInfos = labelIntelligentCommonInfoMapper.selectList(new EntityWrapper<LabelIntelligentCommonInfo>().eq("name", inspectionProvincial.getCategory()).eq("node", 0).eq("by1", "category"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ info.setName(inspectionProvincial.getOrgname());
|
|
|
+ info.setOrgtype(10104L);
|
|
|
+ info.setRegistrationdate(inspectionProvincial.getRegisterdate());
|
|
|
+ info.setContact(StringUtils.isNotEmpty(inspectionProvincial.getContract()) ? inspectionProvincial.getContract() : "");
|
|
|
+ info.setContactnum(StringUtils.isNotEmpty(inspectionProvincial.getContracttel()) ? inspectionProvincial.getContracttel() : "");
|
|
|
+ info.setOrgcode(StringUtils.isNotEmpty(inspectionProvincial.getOrgcode()) ? inspectionProvincial.getOrgcode() : "");
|
|
|
+ info.setCategoryid(CollectionUtils.isNotEmpty(labelIntelligentCommonInfos) ? labelIntelligentCommonInfos.get(0).getCode() : "");
|
|
|
+ info.setWorkercount(inspectionProvincial.getThisyearworkercount() != null ? inspectionProvincial.getThisyearworkercount() : 0);
|
|
|
+ info.setTechnicalpersonnelcount(inspectionProvincial.getTechnicalcount() != null ? inspectionProvincial.getTechnicalcount() : 0);
|
|
|
+ info.setIntellectualpropertyone(inspectionProvincial.getOneintellectualcount() != null ? inspectionProvincial.getOneintellectualcount() : 0);
|
|
|
+ info.setIntellectualpropertytwo(inspectionProvincial.getTwointellectualcount() != null ? inspectionProvincial.getTwointellectualcount() : 0);
|
|
|
+ info.setPatentcount(inspectionProvincial.getPatentcount() != null ? inspectionProvincial.getPatentcount() : 0);
|
|
|
+ info.setPatentforutilitycount(inspectionProvincial.getPracticalpatentcount() != null ? inspectionProvincial.getPracticalpatentcount() : 0);
|
|
|
+ info.setPatentfordesigncount(inspectionProvincial.getAppearancepatentcount() != null ? inspectionProvincial.getAppearancepatentcount() : 0);
|
|
|
+ info.setPatentforsoftwarecount(inspectionProvincial.getPatentforsoftwarecount() != null ? inspectionProvincial.getPatentforsoftwarecount() : 0);
|
|
|
+ info.setCreator(userid);
|
|
|
+ info.setUpdator(userid);
|
|
|
+ info.setIsenabled(1);
|
|
|
+ organizationInfoMapper.insert(info);
|
|
|
+
|
|
|
+ insertRelevant(info, node, userid);
|
|
|
+ }
|
|
|
+
|
|
|
+ inspectionProvincial.setOrgid(info.getId());
|
|
|
+
|
|
|
+ //注册地在浙江省行政区域内
|
|
|
+ if (inspectionProvincial.getRegisteraddress().equals("非浙江省")) {
|
|
|
+ unqualified.add("注册地必须是在浙江省行政区域内");
|
|
|
+ }
|
|
|
+
|
|
|
+ //注册成立时间≥1年
|
|
|
+ if (inspectionProvincial.getRegisterdate() != null) {
|
|
|
+ Calendar c = Calendar.getInstance();
|
|
|
+ c.setTime(inspectionProvincial.getRegisterdate());
|
|
|
+ c.add(Calendar.YEAR,1);
|
|
|
+ if (c.getTime().getTime() >= new Date().getTime()) {
|
|
|
+ unqualified.add("注册成立时间要大于等于一年");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //专职研究开发人员数 >= 15(软件类企业大于等于30人)
|
|
|
+ if (inspectionProvincial.getIssoftwareenterprise() == 1 && inspectionProvincial.getTechnicalcount() < 30) {
|
|
|
+ unqualified.add("软件类企业专职研究开发人员要大于等于30人");
|
|
|
+ } else if (inspectionProvincial.getIssoftwareenterprise() == 0 && inspectionProvincial.getTechnicalcount() < 15){
|
|
|
+ unqualified.add("非软件类企业专职研究开发人员数要大于等于15");
|
|
|
+ }
|
|
|
+
|
|
|
+ //科技人员数 / 职工总数 >= 10%
|
|
|
+ double rate = inspectionProvincial.getTechnicalcount() / inspectionProvincial.getThisyearworkercount();
|
|
|
+ if (rate < 0.1) {
|
|
|
+ unqualified.add("科技人员数要大于等于企业职工总数的10%");
|
|
|
+ }
|
|
|
+ inspectionProvincial.setTechnicalinworkerrate(rate);
|
|
|
+
|
|
|
+ //本科以上学历或中级以上职称的工程技术人员数 / 专职研究开发人员数 >= 60%
|
|
|
+ double rate1 = inspectionProvincial.getBachelororaboveeducation() / inspectionProvincial.getTechnicalcount();
|
|
|
+ if (rate1 < 0.6) {
|
|
|
+ unqualified.add("本科以上学历或中级以上职称的工程技术人员数要大于或等于专职研究开发人员数的60%");
|
|
|
+ }
|
|
|
+ inspectionProvincial.setBachelorintechrate(rate1);
|
|
|
+
|
|
|
+ //建有市级高新技术企业研发中心
|
|
|
+ if (inspectionProvincial.getIshasmunicipalresearchcenter() == 0) {
|
|
|
+ unqualified.add("企业必须建有市级高新技术企业研究中心");
|
|
|
+ }
|
|
|
+
|
|
|
+ //近三年累计转化科技成果 >= 15
|
|
|
+ if (inspectionProvincial.getThreeyearchangeachievement() < 15) {
|
|
|
+ unqualified.add("近三年累计转化科技成果要大于等于15");
|
|
|
+ }
|
|
|
+
|
|
|
+ //Ⅰ类知识产权数 >= 1
|
|
|
+ if (inspectionProvincial.getOneintellectualcount() < 1) {
|
|
|
+ unqualified.add("Ⅰ类知识产权数要大于都等于1");
|
|
|
+ }
|
|
|
+
|
|
|
+ //Ⅱ类知识产权数
|
|
|
+ if (inspectionProvincial.getTwointellectualcount() < 6) {
|
|
|
+ unqualified.add("Ⅱ类知识产权数要大于等于6");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 上年度研发投入 / 上年度销售收入
|
|
|
+ *
|
|
|
+ * 1、若销售收入<5000万元,需≥6%;
|
|
|
+ * 2、若5000万元≤销售收入<20000万元,需≥4%;且开发费用≥于300万元;
|
|
|
+ * 3、若销售收入≥20000万元,需≥3%,且研究开发费用>800万元;
|
|
|
+ * 4、若销售收入≥20000万元,研究开发费用达到1000万元以上
|
|
|
+ */
|
|
|
+ double rate2 = inspectionProvincial.getLastyearresearchtotal() / inspectionProvincial.getLastyearresearchtotal();
|
|
|
+ inspectionProvincial.setResearchinsalerate(rate2);
|
|
|
+ if (inspectionProvincial.getLastyearsaletotal() < 5000 && rate2 < 0.06) {
|
|
|
+ unqualified.add("销售收入小于5000万元,则研发投入需占销售收入的6%以上");
|
|
|
+ } else if (inspectionProvincial.getLastyearsaletotal() >= 5000 && inspectionProvincial.getLastyearsaletotal() < 20000 && rate2 < 0.04 && inspectionProvincial.getLastyearresearchtotal() < 300) {
|
|
|
+ unqualified.add("销售收入大于等于5000万元且小于20000万元,则研发投入需占销售收入的4%以上并且研发费用大于等于300万元");
|
|
|
+ } else if (inspectionProvincial.getLastyearsaletotal() >= 20000 && rate2 < 0.03 && inspectionProvincial.getLastyearresearchtotal() <= 800) {
|
|
|
+ unqualified.add("销售收入大于等于20000元,则研发投入需占销售收入的3%以上并且研发费用需大于800万元");
|
|
|
+ } else if (inspectionProvincial.getLastyearsaletotal() >= 20000 && inspectionProvincial.getLastyearresearchtotal() <= 1000) {
|
|
|
+ unqualified.add("销售收入大于等于20000元,则研发费用需达到1000万元以上");
|
|
|
+ }
|
|
|
+
|
|
|
+ //研发场地面积 >= 500平方
|
|
|
+ if(inspectionProvincial.getSitearea() < 500) {
|
|
|
+ unqualified.add("研发场地面积要大于等于500平方米");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 科研设备原值总额
|
|
|
+ * 1.软件类企业 >= 100万元
|
|
|
+ * 2.其他企业 >= 500万元
|
|
|
+ */
|
|
|
+ if (inspectionProvincial.getIssoftwareenterprise() == 1 && inspectionProvincial.getResearchtotal() < 100) {
|
|
|
+ unqualified.add("软件类企业科研设备原值总额要大于等于100万元");
|
|
|
+ } else if (inspectionProvincial.getResearchtotal() < 500){
|
|
|
+ unqualified.add("企业科研设备原值总额要大于等于500万元");
|
|
|
+ }
|
|
|
+
|
|
|
+ //科研生产共用的设备原值总额 / 科研设备原值总额 <= 30%
|
|
|
+ double rate3 = inspectionProvincial.getSharetotal() / inspectionProvincial.getResearchtotal();
|
|
|
+ inspectionProvincial.setShareinresearchrate(rate3);
|
|
|
+ if (rate3 > 0.3) {
|
|
|
+ unqualified.add("科研生产共用的设备原值总额需大于等于科研设备原值总额的30%");
|
|
|
+ }
|
|
|
+
|
|
|
+ //建立完整规范的技术创新管理体制
|
|
|
+ if (0 == inspectionProvincial.getIshasmunicipalresearchcenter()) {
|
|
|
+ unqualified.add("企业需有完整规范的技术创新管理体制");
|
|
|
+ }
|
|
|
+
|
|
|
+ //企业申请认定前一年度至申请之日内未发生重大的安全、质量事故,严重的环境违法、知识产权违法、税务违法、科研失信等行为
|
|
|
+ if (1 == inspectionProvincial.getIshasillegalbehaviorinlastyear()) {
|
|
|
+ unqualified.add("企业申请认定前一年度至申请之日内发生过重大的安全、质量事故,严重的环境违法、知识产权违法、税务违法、科研失信等行为");
|
|
|
+ }
|
|
|
+
|
|
|
+ StringBuilder stringBuilder = new StringBuilder();
|
|
|
+ unqualified.forEach(u -> {
|
|
|
+ stringBuilder.append(u + ",");
|
|
|
+ });
|
|
|
+ inspectionProvincial.setInconformity(stringBuilder.deleteCharAt(stringBuilder.length() - 1).toString());
|
|
|
+ inspectionProvincialMapper.insert(inspectionProvincial);
|
|
|
+
|
|
|
+ if (unqualified.size() > 0) {
|
|
|
+ map.put(inspectionProvincial.getOrgname() + " 不符合省级研发中心认定条件", unqualified);
|
|
|
+ } else {
|
|
|
+ map.put(inspectionProvincial.getOrgname() + " 符合省级研发中心认定条件", null);
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ //省级企业研究院
|
|
|
+ public Map<String, List> insertProvincial2(InspectionProvincial inspectionProvincial, String node, Long userid) {
|
|
|
+ Map<String, List> map = new HashMap();
|
|
|
+ List<String> unqualified = new ArrayList();
|
|
|
+
|
|
|
+ List<OrganizationInfo> infos = organizationInfoMapper.getOrgListByNode(inspectionProvincial.getOrgname(), node);
|
|
|
+ OrganizationInfo info = new OrganizationInfo();
|
|
|
+ if (infos.size() > 0) {
|
|
|
+ info = infos.get(0);
|
|
|
+ } else {
|
|
|
+ //企业信息不存在,就存入企业库
|
|
|
+ List<LabelIntelligentCommonInfo> labelIntelligentCommonInfos = null;
|
|
|
+ if (StringUtils.isNotEmpty(inspectionProvincial.getCategory())) {
|
|
|
+ labelIntelligentCommonInfos = labelIntelligentCommonInfoMapper.selectList(new EntityWrapper<LabelIntelligentCommonInfo>().eq("name", inspectionProvincial.getCategory()).eq("node", node).eq("by1", "category"));
|
|
|
+ if (labelIntelligentCommonInfos.size() == 0) {
|
|
|
+ labelIntelligentCommonInfos = labelIntelligentCommonInfoMapper.selectList(new EntityWrapper<LabelIntelligentCommonInfo>().eq("name", inspectionProvincial.getCategory()).eq("node", 0).eq("by1", "category"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ info.setName(inspectionProvincial.getOrgname());
|
|
|
+ info.setOrgtype(10104L);
|
|
|
+ info.setRegistrationdate(inspectionProvincial.getRegisterdate());
|
|
|
+ info.setContact(StringUtils.isNotEmpty(inspectionProvincial.getContract()) ? inspectionProvincial.getContract() : "");
|
|
|
+ info.setContactnum(StringUtils.isNotEmpty(inspectionProvincial.getContracttel()) ? inspectionProvincial.getContracttel() : "");
|
|
|
+ info.setOrgcode(StringUtils.isNotEmpty(inspectionProvincial.getOrgcode()) ? inspectionProvincial.getOrgcode() : "");
|
|
|
+ info.setCategoryid(CollectionUtils.isNotEmpty(labelIntelligentCommonInfos) ? labelIntelligentCommonInfos.get(0).getCode() : "");
|
|
|
+ info.setWorkercount(inspectionProvincial.getThisyearworkercount() != null ? inspectionProvincial.getThisyearworkercount() : 0);
|
|
|
+ info.setTechnicalpersonnelcount(inspectionProvincial.getTechnicalcount() != null ? inspectionProvincial.getTechnicalcount() : 0);
|
|
|
+ info.setIntellectualpropertyone(inspectionProvincial.getOneintellectualcount() != null ? inspectionProvincial.getOneintellectualcount() : 0);
|
|
|
+ info.setIntellectualpropertytwo(inspectionProvincial.getTwointellectualcount() != null ? inspectionProvincial.getTwointellectualcount() : 0);
|
|
|
+ info.setCreator(userid);
|
|
|
+ info.setUpdator(userid);
|
|
|
+ info.setIsenabled(1);
|
|
|
+ organizationInfoMapper.insert(info);
|
|
|
+
|
|
|
+ insertRelevant(info, node, userid);
|
|
|
+ }
|
|
|
+
|
|
|
+ inspectionProvincial.setOrgid(info.getId());
|
|
|
+
|
|
|
+ //注册地在浙江省行政区域内
|
|
|
+ if (inspectionProvincial.getRegisteraddress().equals("非浙江省")) {
|
|
|
+ unqualified.add("注册地必须是在浙江省行政区域内");
|
|
|
+ }
|
|
|
+
|
|
|
+ //注册成立时间≥1年
|
|
|
+ if (inspectionProvincial.getRegisterdate() != null) {
|
|
|
+ Calendar c = Calendar.getInstance();
|
|
|
+ c.setTime(inspectionProvincial.getRegisterdate());
|
|
|
+ c.add(Calendar.YEAR,1);
|
|
|
+ if (c.getTime().getTime() >= new Date().getTime()) {
|
|
|
+ unqualified.add("注册成立时间要大于等于一年");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //专职研究开发人员数 >= 50 软件类企业大于等于100人
|
|
|
+ if (inspectionProvincial.getIssoftwareenterprise() == 1 && inspectionProvincial.getTechnicalcount() < 100) {
|
|
|
+ unqualified.add("软件类企业专职研究开发人员数要大于等于100");
|
|
|
+ } else if (inspectionProvincial.getIssoftwareenterprise() == 0 && inspectionProvincial.getIssoftwareenterprise() < 50) {
|
|
|
+ unqualified.add("企业专职研究开发人员数要大于等于50");
|
|
|
+ }
|
|
|
+
|
|
|
+ //科技人员数 / 职工总数 >= 10%
|
|
|
+ double rate = inspectionProvincial.getTechnicalcount() / inspectionProvincial.getThisyearworkercount();
|
|
|
+ if (rate < 0.1) {
|
|
|
+ unqualified.add("科技人员数要大于等于企业职工总数的10%");
|
|
|
+ }
|
|
|
+ inspectionProvincial.setTechnicalinworkerrate(rate);
|
|
|
+
|
|
|
+ //本科以上学历或中级以上职称的工程技术人员数 / 专职研究开发人员数 >= 60%
|
|
|
+ double rate1 = inspectionProvincial.getBachelororaboveeducation() / inspectionProvincial.getTechnicalcount();
|
|
|
+ if (rate1 < 0.6) {
|
|
|
+ unqualified.add("本科以上学历或中级以上职称的工程技术人员数要大于或等于专职研究开发人员数的60%");
|
|
|
+ }
|
|
|
+ inspectionProvincial.setBachelorintechrate(rate1);
|
|
|
+
|
|
|
+ //Ⅰ类知识产权数 >= 1
|
|
|
+ if (inspectionProvincial.getOneintellectualcount() < 2) {
|
|
|
+ unqualified.add("Ⅰ类知识产权数要大于都等于1");
|
|
|
+ }
|
|
|
+
|
|
|
+ //知识产权获得方式必须是自主研发
|
|
|
+ if (!inspectionProvincial.getObtainway().equals("有自主研发")) {
|
|
|
+ unqualified.add("知识产权获得方式必须是自主研发");
|
|
|
+ }
|
|
|
+
|
|
|
+ //上年度销售收入 >= 1亿元
|
|
|
+ if (inspectionProvincial.getLastyearsaletotal() < 10000) {
|
|
|
+ unqualified.add("上年度销售收入要大于等于1亿元");
|
|
|
+ }
|
|
|
+
|
|
|
+ //上年度研究开发费用 >= 1200万元 || 上年度研发投入 / 上年度销售收入 >= 4%
|
|
|
+ double rate3 = inspectionProvincial.getLastyearresearchtotal() / inspectionProvincial.getLastyearsaletotal();
|
|
|
+ if (!(inspectionProvincial.getLastyearresearchtotal() >= 1200 || rate3 >= 0.04)) {
|
|
|
+ unqualified.add("上年度研究开发费用要大于等于1200万元或者上年度研发投入要大于等于上年度销售收入的4%");
|
|
|
+ }
|
|
|
+ inspectionProvincial.setResearchinsalerate(rate3);
|
|
|
+
|
|
|
+ //研发场地面积 >= 1000平方米
|
|
|
+ if (inspectionProvincial.getSitearea() < 1000) {
|
|
|
+ unqualified.add("研发场地面积要大于等于1000平方米");
|
|
|
+ }
|
|
|
+
|
|
|
+ //科研设备原值总额 >= 1000万元
|
|
|
+ if (inspectionProvincial.getResearchtotal() < 1000) {
|
|
|
+ unqualified.add("科研设备原值总额要大于等于1000万元");
|
|
|
+ }
|
|
|
+
|
|
|
+ //企业申请认定前一年度至申请之日内未发生重大的安全、质量事故,严重的环境违法、知识产权违法、税务违法、科研失信等行为
|
|
|
+ if (1 == inspectionProvincial.getIshasillegalbehaviorinlastyear()) {
|
|
|
+ unqualified.add("企业申请认定前一年度至申请之日内发生过重大的安全、质量事故,严重的环境违法、知识产权违法、税务违法、科研失信等行为");
|
|
|
+ }
|
|
|
+
|
|
|
+ StringBuilder stringBuilder = new StringBuilder();
|
|
|
+ unqualified.forEach(u -> {
|
|
|
+ stringBuilder.append(u + ",");
|
|
|
+ });
|
|
|
+ inspectionProvincial.setInconformity(stringBuilder.deleteCharAt(stringBuilder.length() - 1).toString());
|
|
|
+ inspectionProvincialMapper.insert(inspectionProvincial);
|
|
|
+
|
|
|
+ if (unqualified.size() > 0) {
|
|
|
+ map.put(inspectionProvincial.getOrgname() + " 不符合省级研究院认定条件", unqualified);
|
|
|
+ } else {
|
|
|
+ map.put(inspectionProvincial.getOrgname() + " 符合省级研究院认定条件", null);
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ //飞地研发中心自检
|
|
|
+ public Map<String, List> insertFeidi(InspectionFeidi inspectionFeidi, String node, Long userid) {
|
|
|
+ Map<String, List> map = new HashMap();
|
|
|
+ List<String> unqualified = new ArrayList();
|
|
|
+
|
|
|
+ List<OrganizationInfo> infos = organizationInfoMapper.getOrgListByNode(inspectionFeidi.getOrgname(), node);
|
|
|
+ OrganizationInfo info = new OrganizationInfo();
|
|
|
+ if (infos.size() > 0) {
|
|
|
+ info = infos.get(0);
|
|
|
+ } else {
|
|
|
+ //企业信息不存在,就存入企业库
|
|
|
+ List<LabelIntelligentCommonInfo> labelIntelligentCommonInfos = null;
|
|
|
+ if (StringUtils.isNotEmpty(inspectionFeidi.getCategory())) {
|
|
|
+ labelIntelligentCommonInfos = labelIntelligentCommonInfoMapper.selectList(new EntityWrapper<LabelIntelligentCommonInfo>().eq("name", inspectionFeidi.getCategory()).eq("node", node).eq("by1", "category"));
|
|
|
+ if (labelIntelligentCommonInfos.size() == 0) {
|
|
|
+ labelIntelligentCommonInfos = labelIntelligentCommonInfoMapper.selectList(new EntityWrapper<LabelIntelligentCommonInfo>().eq("name", inspectionFeidi.getCategory()).eq("node", 0).eq("by1", "category"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ info.setName(inspectionFeidi.getOrgname());
|
|
|
+ info.setOrgtype(10104L);
|
|
|
+ info.setRegistrationdate(inspectionFeidi.getRegisterdate());
|
|
|
+ info.setContact(StringUtils.isNotEmpty(inspectionFeidi.getContract()) ? inspectionFeidi.getContract() : "");
|
|
|
+ info.setContactnum(StringUtils.isNotEmpty(inspectionFeidi.getContracttel()) ? inspectionFeidi.getContracttel() : "");
|
|
|
+ info.setOrgcode(StringUtils.isNotEmpty(inspectionFeidi.getOrgcode()) ? inspectionFeidi.getOrgcode() : "");
|
|
|
+ info.setCategoryid(CollectionUtils.isNotEmpty(labelIntelligentCommonInfos) ? labelIntelligentCommonInfos.get(0).getCode() : "");
|
|
|
+ info.setWorkercount(inspectionFeidi.getThisyearworkercount() != null ? inspectionFeidi.getThisyearworkercount() : 0);
|
|
|
+ info.setTechnicalpersonnelcount(inspectionFeidi.getTechnicalcount() != null ? inspectionFeidi.getTechnicalcount() : 0);
|
|
|
+
|
|
|
+ organizationInfoMapper.insert(info);
|
|
|
+
|
|
|
+ insertRelevant(info, node, userid);
|
|
|
+ }
|
|
|
+ inspectionFeidi.setOrgid(info.getId());
|
|
|
+
|
|
|
+ //所属行业领域,属于《国家重点支持的高新技术领域》
|
|
|
+ List<String> list = Stream.of("电子信息","生物与新医药","航空航天","新材料","高技术服务","新能源与节能","资源与环境","高新技术改造传统产业").collect(Collectors.toList());
|
|
|
+ if (!list.contains(inspectionFeidi.getCategory())) {
|
|
|
+ unqualified.add("所属行业领域不属于国家重点支持的高新技术领域");
|
|
|
+ }
|
|
|
+
|
|
|
+ //专职研究开发人员数 >= 10
|
|
|
+ if (inspectionFeidi.getTechnicalcount() < 10) {
|
|
|
+ unqualified.add("专职研究开发人数要大于等于10");
|
|
|
+ }
|
|
|
+
|
|
|
+ //科技人员数 / 职工总数 >= 80%
|
|
|
+ double rate = inspectionFeidi.getTechnicalcount() / inspectionFeidi.getThisyearworkercount();
|
|
|
+ if (rate < 0.8) {
|
|
|
+ unqualified.add("科技人员数要大于等于职工总数的80%");
|
|
|
+ }
|
|
|
+ inspectionFeidi.setTechnicalinworkerrate(rate);
|
|
|
+
|
|
|
+ //专职研究开发人员中,有中级职称以上人员数 + 专职研究开发人员中,最高学历为硕士研究生及以上学历人员数 >= 1
|
|
|
+ if ((inspectionFeidi.getIntermediateprofessionaltitleorabove() + inspectionFeidi.getMasterdegreecandidate()) < 1) {
|
|
|
+ unqualified.add("专职研究开发人员中,有中级职称以上人员数与最高学历为硕士研究生及以上学历人员数相加要大于等于1");
|
|
|
+ }
|
|
|
+
|
|
|
+ //专职研究开发人员中,最高学历为硕士研究生及以上学历人员数 + 专职研究开发人员中,最高学历为本科且没有中级以上职称的人员数 >= 5
|
|
|
+ if ((inspectionFeidi.getMasterdegreecandidate() + inspectionFeidi.getUndergraduateandnohasintermediate()) >= 5) {
|
|
|
+ unqualified.add("专职研究开发人员中,最高学历为硕士研究生及以上学历人员数与最高学历为本科且没有中级以上职称的人员数相加要大于等于5");
|
|
|
+ }
|
|
|
+
|
|
|
+ //专职研究开发人员在研发中心从事研发工作183天以上
|
|
|
+ if (inspectionFeidi.getWorkleasthalfyear() == 0) {
|
|
|
+ unqualified.add("专职研究开发人员要在研发中心从事研发工作183天以上");
|
|
|
+ }
|
|
|
+
|
|
|
+ //专职研究开发人员从事相关工作不少于2年
|
|
|
+ if (inspectionFeidi.getWorktimeuptwoyear() == 0) {
|
|
|
+ unqualified.add("专职研究开发人员要从事相关工作不少于2年");
|
|
|
+ }
|
|
|
+
|
|
|
+ //近三年Ⅰ类知识产权数 >= 1
|
|
|
+ if (inspectionFeidi.getThreeyearoneintellectualcount() < 1) {
|
|
|
+ unqualified.add("近三年Ⅱ类知识产权数要大于等于1");
|
|
|
+ }
|
|
|
+
|
|
|
+ //近三年Ⅱ类知识产权数 >= 3
|
|
|
+ if (inspectionFeidi.getThreeyeartwointellectualcount() < 3) {
|
|
|
+ unqualified.add("近三年Ⅱ类知识产权数要大于等于3");
|
|
|
+ }
|
|
|
+
|
|
|
+ //县级以上科研项目数 >= 1
|
|
|
+ if (inspectionFeidi.getAbovecountylevel() < 1) {
|
|
|
+ unqualified.add("县级以上科研项目数要大于等于1");
|
|
|
+ }
|
|
|
+
|
|
|
+ //企业内部立项技术创新项目数 >= 3
|
|
|
+ if (inspectionFeidi.getInorginnovatecount() < 3) {
|
|
|
+ unqualified.add("企业内部立项技术创新项目数要大于等于3");
|
|
|
+ }
|
|
|
+
|
|
|
+ //上年度研究开发费用 >= 100万元
|
|
|
+ if (inspectionFeidi.getLastyearresearchtotal() < 100) {
|
|
|
+ unqualified.add("上年度研究开发费用要大于等于100万元");
|
|
|
+ }
|
|
|
+
|
|
|
+ //上年度研发投入 / 上年度销售收入 >= 1%
|
|
|
+ double rate1 = inspectionFeidi.getLastyearresearchtotal() / inspectionFeidi.getLastyearsaletotal();
|
|
|
+ if (rate1 < 0.01) {
|
|
|
+ unqualified.add("上年度研发投入要大于等于上年度销售收入的1%");
|
|
|
+ }
|
|
|
+ inspectionFeidi.setResearchinsalerate(rate1);
|
|
|
+
|
|
|
+ //上一年度专职研究开发人员平均薪金 >= 10万元
|
|
|
+ if (inspectionFeidi.getLastyearavgpay() < 10) {
|
|
|
+ unqualified.add("上一年度专职研究开发人员平均工资要大于等于10万元");
|
|
|
+ }
|
|
|
+
|
|
|
+ //研发场地面积 >= 100平方米
|
|
|
+ if (inspectionFeidi.getResearcharea() < 100) {
|
|
|
+ unqualified.add("研发场地面积要大于等于100平方米");
|
|
|
+ }
|
|
|
+
|
|
|
+ //申报前一年度内,未列入严重失信名单
|
|
|
+ if (inspectionFeidi.getNohaspromise() == 0) {
|
|
|
+ unqualified.add("申报前一年度内不得列入严重失信名单");
|
|
|
+ }
|
|
|
+
|
|
|
+ StringBuilder stringBuilder = new StringBuilder();
|
|
|
+ unqualified.forEach(u -> {
|
|
|
+ stringBuilder.append(u + ",");
|
|
|
+ });
|
|
|
+ inspectionFeidi.setInconformity(stringBuilder.deleteCharAt(stringBuilder.length() - 1).toString());
|
|
|
+
|
|
|
+ inspectionFeidiMapper.insert(inspectionFeidi);
|
|
|
+
|
|
|
+ //不合格条件
|
|
|
+ if (unqualified.size() > 0) {
|
|
|
+ map.put(inspectionFeidi.getOrgname() + " 不符合飞地研发中心认定条件", unqualified);
|
|
|
+ } else {
|
|
|
+ map.put(inspectionFeidi.getOrgname() + " 符合飞地研发中心认定条件", null);
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ //企业自检时,企业库没有该企业插入时需要插入的相关步骤
|
|
|
+ public void insertRelevant(OrganizationInfo info, String node, Long userid) {
|
|
|
+ CompanyNodeLk lk = new CompanyNodeLk();
|
|
|
+ lk.setCompanyid(info.getId());
|
|
|
+ lk.setComefrom(node);
|
|
|
+ lk.setCreator(userid);
|
|
|
+ lk.setUpdater(userid);
|
|
|
+ Resourcelibrary resourcelibrary = dataEntryResource.transferToResourceLibrary(info, node);
|
|
|
+ resourcelibrary.setCreator(userid);
|
|
|
+ resourcelibrary.setUpdater(userid);
|
|
|
+ resourcelibraryMapper.insert(resourcelibrary);
|
|
|
+ String claid = interviewDataEntryService.getClaid(node, userid);
|
|
|
+ dataEntryResource.insertResclaid(resourcelibrary, claid);
|
|
|
+ dataEntryResource.insertResTypeLk(resourcelibrary, resourcelibrary.getRestype());
|
|
|
+ Map<String, Object> m = commonService.getObjectDefalutAuthority(resourcelibrary.getTablename(), userid);
|
|
|
+ resourcelibrary.setMap(m);
|
|
|
+ commonService.insertAuthority(resourcelibrary);
|
|
|
+ dataEntryResource.insertES(resourcelibrary, claid, node);
|
|
|
+ }
|
|
|
+
|
|
|
}
|