企业信息推送
This commit is contained in:
parent
686cc6ac02
commit
874df064b1
98
inventory-dao/src/main/java/com/rzyc/bean/pro/EntInfo.java
Normal file
98
inventory-dao/src/main/java/com/rzyc/bean/pro/EntInfo.java
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
package com.rzyc.bean.pro;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 省厅企业信息
|
||||
* @author dong
|
||||
* @date 2025-04-01 14:30
|
||||
* @Version V1.0
|
||||
*/
|
||||
@Data
|
||||
public class EntInfo {
|
||||
|
||||
|
||||
//平台唯一标识
|
||||
private String sysUniqueCode;
|
||||
|
||||
//企业唯一编码标识
|
||||
private String uniqueCode;
|
||||
|
||||
//企业名称
|
||||
private String entName;
|
||||
|
||||
//企业所属区域id
|
||||
private String areaId;
|
||||
|
||||
//企业所属行业id
|
||||
private String industryId;
|
||||
|
||||
//统一信用代码
|
||||
private String unifiedCode;
|
||||
|
||||
//风险等级 1-红 2-橙3-黄 4-蓝
|
||||
private Integer riskLevel;
|
||||
|
||||
//企业规模
|
||||
private String scale;
|
||||
|
||||
//组建时间
|
||||
private Date setUpDate;
|
||||
|
||||
//法人代表
|
||||
private String legalPerson;
|
||||
|
||||
//法人代表联系电话
|
||||
private String legalPersonPhone;
|
||||
|
||||
//主要负责人
|
||||
private String chargePerson;
|
||||
|
||||
//主要负责人联系电话
|
||||
private String chargePersonPhone;
|
||||
|
||||
//安全管理负责人
|
||||
private String safetyAdminPerson;
|
||||
|
||||
//安全管理负责人联系方式
|
||||
private String safetyAdminPersonPhone;
|
||||
|
||||
//安全管理员
|
||||
private String safetyAdmin;
|
||||
|
||||
//安全管理员联系方式
|
||||
private String safetyAdminPhone;
|
||||
|
||||
//实际经营地址
|
||||
private String operationPlace;
|
||||
|
||||
//从业人数
|
||||
private String staffNumber;
|
||||
|
||||
//经营范围
|
||||
private String busScope;
|
||||
|
||||
//纬度
|
||||
private String lat;
|
||||
|
||||
//经度
|
||||
private String lon;
|
||||
|
||||
//理化性质
|
||||
private String physicochemical;
|
||||
|
||||
//企业人数是否10人以下 1.是 0.否
|
||||
private String isUnderTen;
|
||||
|
||||
//是否是集团公司 1.是 2.否
|
||||
private String isGroupCompany;
|
||||
|
||||
//公司属性 1:总公司 2:分公司
|
||||
private String companyAttribute;
|
||||
|
||||
//上级公司唯一编码(公司属性为分公司时传值)
|
||||
private String superCompany;
|
||||
|
||||
}
|
||||
|
|
@ -41,6 +41,9 @@ public class BaseInClass implements Serializable {
|
|||
@ApiModelProperty("工作单元分类 多个逗号隔开")
|
||||
private String workType;
|
||||
|
||||
@ApiModelProperty("工作单元分类 多个逗号隔开")
|
||||
private String industryId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date createdon;
|
||||
|
|
@ -55,6 +58,22 @@ public class BaseInClass implements Serializable {
|
|||
|
||||
private List<BaseInClass> baseInClassList;
|
||||
|
||||
public String getIndustryId() {
|
||||
return industryId;
|
||||
}
|
||||
|
||||
public void setIndustryId(String industryId) {
|
||||
this.industryId = industryId;
|
||||
}
|
||||
|
||||
public String getUnitTradeId() {
|
||||
return unitTradeId;
|
||||
}
|
||||
|
||||
public void setUnitTradeId(String unitTradeId) {
|
||||
this.unitTradeId = unitTradeId;
|
||||
}
|
||||
|
||||
public Integer getInType() {
|
||||
return inType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,18 +5,17 @@ import com.alibaba.fastjson.JSONArray;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.common.utils.StringUtils;
|
||||
import com.common.utils.TypeConversion;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.zxing.Result;
|
||||
import com.rzyc.bean.pro.EntInfo;
|
||||
import com.rzyc.model.ent.BaseInClass;
|
||||
import com.rzyc.model.ent.PvIndustry;
|
||||
import com.rzyc.model.ent.SysEnterprise;
|
||||
import com.rzyc.provinceUtil.EnedUtils;
|
||||
import com.rzyc.provinceUtil.JsonUtils;
|
||||
import com.rzyc.provinceUtil.ProvData;
|
||||
import com.rzyc.provinceUtil.bean.DeptInfo;
|
||||
import com.rzyc.provinceUtil.bean.IndustryVo;
|
||||
import com.rzyc.provinceUtil.bean.TokenData;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -128,15 +127,15 @@ public class ProvinceService extends BaseService{
|
|||
ProvData<List<PvIndustry>> data = JsonUtils.fromJsonComplex(responseStr,ProvData.class, dataListType);
|
||||
|
||||
Integer index = 1;
|
||||
for (PvIndustry pvIndustry : data.getData()){
|
||||
pvIndustry.setSortId(index);
|
||||
pvIndustry.setCreateTime(new Date());
|
||||
pvIndustry.setModifyTime(new Date());
|
||||
pvIndustry.setCreateBy("excel");
|
||||
pvIndustry.setModifyBy("excel");
|
||||
pvIndustryMapper.insert(pvIndustry);
|
||||
index++;
|
||||
}
|
||||
// for (PvIndustry pvIndustry : data.getData()){
|
||||
// pvIndustry.setSortId(index);
|
||||
// pvIndustry.setCreateTime(new Date());
|
||||
// pvIndustry.setModifyTime(new Date());
|
||||
// pvIndustry.setCreateBy("excel");
|
||||
// pvIndustry.setModifyBy("excel");
|
||||
// pvIndustryMapper.insert(pvIndustry);
|
||||
// index++;
|
||||
// }
|
||||
|
||||
System.out.println("data --> "+JSONArray.toJSONString(data));
|
||||
}
|
||||
|
|
@ -187,6 +186,62 @@ public class ProvinceService extends BaseService{
|
|||
System.out.println("responseStr --> "+responseStr);
|
||||
}
|
||||
|
||||
|
||||
//获取隐患类型信息
|
||||
private static String ENT_INFO = "/gov/sync/ent/info";
|
||||
|
||||
|
||||
/**
|
||||
* 推送企业信息
|
||||
* @version v1.0
|
||||
* @author dong
|
||||
* @date 2025/4/1 14:47
|
||||
*/
|
||||
public void entInfoSend(String entId){
|
||||
String token = getToken();
|
||||
|
||||
|
||||
SysEnterprise enterprise = sysEnterpriseMapper.selectByPrimaryKey(entId);
|
||||
if(null != enterprise){
|
||||
|
||||
|
||||
EntInfo entInfo = new EntInfo();
|
||||
entInfo.setSysUniqueCode(SYS_UNIQUE_CODE);
|
||||
entInfo.setUniqueCode(enterprise.getSysenterpriseid());
|
||||
entInfo.setEntName(enterprise.getEntname());
|
||||
entInfo.setUniqueCode(enterprise.getSysenterpriseid());
|
||||
entInfo.setAreaId(constantsConfigure.getSuperiorOrgCode());
|
||||
|
||||
BaseInClass baseInClass = baseInClassMapper.selectByPrimaryKey(enterprise.getWorkClassId());
|
||||
if(null != baseInClass){
|
||||
entInfo.setIndustryId(baseInClass.getIndustryId());
|
||||
}
|
||||
|
||||
entInfo.setUnifiedCode(enterprise.getOrgpassno());
|
||||
if(StringUtils.isNotBlank(enterprise.getInherentRisk())){
|
||||
entInfo.setRiskLevel(TypeConversion.StringToInteger(enterprise.getInherentRisk()));
|
||||
}
|
||||
|
||||
entInfo.setLegalPerson(enterprise.getLegalrepre());
|
||||
entInfo.setLegalPersonPhone(enterprise.getLrlinktel());
|
||||
entInfo.setSafetyAdminPerson(enterprise.getSafeManager());
|
||||
entInfo.setSafetyAdminPersonPhone(enterprise.getSafeTelephone());
|
||||
entInfo.setOperationPlace(enterprise.getSysaddress());
|
||||
entInfo.setStaffNumber(enterprise.getPersoncount()+"");
|
||||
entInfo.setLat(enterprise.getLatitude());
|
||||
entInfo.setLon(enterprise.getLongitude());
|
||||
entInfo.setIsUnderTen(1+"");
|
||||
entInfo.setIsGroupCompany(2+"");
|
||||
entInfo.setCompanyAttribute(1+"");
|
||||
//加密请求参数
|
||||
String responseStr = EnedUtils.doPost(BASE_URL+ENT_INFO,JSONObject.toJSONString(entInfo),token);
|
||||
|
||||
System.out.println("responseStr --> "+responseStr);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据测试
|
||||
* @version v1.0
|
||||
|
|
@ -197,7 +252,7 @@ public class ProvinceService extends BaseService{
|
|||
//部门信息
|
||||
// getDeptApi();
|
||||
//行业信息
|
||||
// getIndustryApi();
|
||||
getIndustryApi();
|
||||
//隐患类型
|
||||
// getUpgradeTypeApi();
|
||||
//地区信息
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
<result column="SysLevel" jdbcType="INTEGER" property="syslevel" />
|
||||
<result column="SortId" jdbcType="INTEGER" property="sortid" />
|
||||
<result column="in_type" jdbcType="INTEGER" property="inType" />
|
||||
<result column="industry_id" jdbcType="VARCHAR" property="industryId" />
|
||||
<result column="CreatedOn" jdbcType="TIMESTAMP" property="createdon" />
|
||||
<result column="CreatedBy" jdbcType="VARCHAR" property="createdby" />
|
||||
<result column="ModifiedOn" jdbcType="TIMESTAMP" property="modifiedon" />
|
||||
|
|
@ -75,6 +76,7 @@
|
|||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
BaseInClassId, ClassCode, IndustryClassName, SuperInId, SuperInCode, SysLevel, SortId,in_type,
|
||||
industry_id,
|
||||
CreatedOn, CreatedBy, ModifiedOn, ModifiedBy
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.rzyc.model.ent.BaseInClassExample" resultMap="BaseResultMap">
|
||||
|
|
|
|||
|
|
@ -759,4 +759,19 @@ public class DataController extends com.rzyc.controller.BaseController {
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送企业信息
|
||||
* @version v1.0
|
||||
* @author dong
|
||||
* @date 2025/4/1 15:00
|
||||
*/
|
||||
@ApiOperation(value = "推送企业信息", notes = "推送企业信息")
|
||||
@RequestMapping(value = "/entInfoSend", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public SingleResult<String>entInfoSend(String entId)throws Exception{
|
||||
SingleResult<String> result = new SingleResult<>();
|
||||
provinceService.entInfoSend(entId);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,17 @@ server:
|
|||
port: 7010
|
||||
|
||||
spring:
|
||||
redis:
|
||||
host: 42.193.40.239
|
||||
password: zysoft2023@com
|
||||
port: 6937
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 8
|
||||
max-idle: 8
|
||||
min-idle: 0
|
||||
max-wait: 100
|
||||
shutdown-timeout: 50000
|
||||
servlet:
|
||||
multipart:
|
||||
enabled: true
|
||||
|
|
@ -28,9 +39,9 @@ spring:
|
|||
#数据库
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://120.53.125.61:3306/inventory_23?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false
|
||||
username: rzyc
|
||||
password: rzyc123456
|
||||
url: jdbc:mysql://182.132.59.28:8016/ganzi25?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&autoReconnect=true
|
||||
username: root
|
||||
password: gzQdz2023
|
||||
testOnBorrow: true
|
||||
validationQuery: SELECT 1
|
||||
tomcat:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
spring:
|
||||
profiles:
|
||||
active: test #设定打包配置文件
|
||||
active: prod #设定打包配置文件
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user