企业注册 和 岗位添加地区信息
This commit is contained in:
parent
3c5fb2dae4
commit
075674c02f
|
|
@ -0,0 +1,161 @@
|
|||
package com.rzyc.bean.ent;
|
||||
|
||||
import com.common.utils.excel.ExcelColumn;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @author dong
|
||||
* @date 2023-07-18 15:12
|
||||
* @Version V1.0
|
||||
*/
|
||||
@ApiModel("企业注册")
|
||||
public class EntRegisterDto {
|
||||
|
||||
|
||||
@ApiModelProperty("地区id")
|
||||
private String areaCode;
|
||||
|
||||
@ApiModelProperty("企业名称")
|
||||
private String entname;
|
||||
|
||||
@ApiModelProperty("经营范围")
|
||||
private String manageType;
|
||||
|
||||
|
||||
@ApiModelProperty("行业id")
|
||||
private String baseinclassid;
|
||||
|
||||
|
||||
@ApiModelProperty("实际经营地址")
|
||||
private String sysaddress;
|
||||
|
||||
|
||||
private Integer personcount;
|
||||
|
||||
@ApiModelProperty("企业统一信用代码")
|
||||
private String orgpassno;
|
||||
|
||||
@ExcelColumn(value = "企业法人", col = 6)
|
||||
private String legalrepre;
|
||||
|
||||
@ExcelColumn(value = "联系方式", col = 7)
|
||||
private String lrlinktel;
|
||||
|
||||
@ApiModelProperty("成立时间")
|
||||
private String establishdate;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
private String latitude;
|
||||
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty("企业简介")
|
||||
private String comments;
|
||||
|
||||
public String getAreaCode() {
|
||||
return areaCode;
|
||||
}
|
||||
|
||||
public void setAreaCode(String areaCode) {
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
|
||||
public String getEntname() {
|
||||
return entname;
|
||||
}
|
||||
|
||||
public void setEntname(String entname) {
|
||||
this.entname = entname;
|
||||
}
|
||||
|
||||
public String getManageType() {
|
||||
return manageType;
|
||||
}
|
||||
|
||||
public void setManageType(String manageType) {
|
||||
this.manageType = manageType;
|
||||
}
|
||||
|
||||
public String getBaseinclassid() {
|
||||
return baseinclassid;
|
||||
}
|
||||
|
||||
public void setBaseinclassid(String baseinclassid) {
|
||||
this.baseinclassid = baseinclassid;
|
||||
}
|
||||
|
||||
public String getSysaddress() {
|
||||
return sysaddress;
|
||||
}
|
||||
|
||||
public void setSysaddress(String sysaddress) {
|
||||
this.sysaddress = sysaddress;
|
||||
}
|
||||
|
||||
public Integer getPersoncount() {
|
||||
return personcount;
|
||||
}
|
||||
|
||||
public void setPersoncount(Integer personcount) {
|
||||
this.personcount = personcount;
|
||||
}
|
||||
|
||||
public String getOrgpassno() {
|
||||
return orgpassno;
|
||||
}
|
||||
|
||||
public void setOrgpassno(String orgpassno) {
|
||||
this.orgpassno = orgpassno;
|
||||
}
|
||||
|
||||
public String getLegalrepre() {
|
||||
return legalrepre;
|
||||
}
|
||||
|
||||
public void setLegalrepre(String legalrepre) {
|
||||
this.legalrepre = legalrepre;
|
||||
}
|
||||
|
||||
public String getLrlinktel() {
|
||||
return lrlinktel;
|
||||
}
|
||||
|
||||
public void setLrlinktel(String lrlinktel) {
|
||||
this.lrlinktel = lrlinktel;
|
||||
}
|
||||
|
||||
public String getEstablishdate() {
|
||||
return establishdate;
|
||||
}
|
||||
|
||||
public void setEstablishdate(String establishdate) {
|
||||
this.establishdate = establishdate;
|
||||
}
|
||||
|
||||
public String getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(String latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public String getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(String longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public String getComments() {
|
||||
return comments;
|
||||
}
|
||||
|
||||
public void setComments(String comments) {
|
||||
this.comments = comments;
|
||||
}
|
||||
}
|
||||
|
|
@ -79,6 +79,10 @@ public interface SysEnterpriseMapper extends BaseMapper<SysEnterprise> {
|
|||
/*通过企业名 查询企业信息*/
|
||||
SysEnterprise findByName(@Param("entName") String entName);
|
||||
|
||||
/*通过企业名 统一信用代码 查询企业信息*/
|
||||
SysEnterprise findByEnt(@Param("entName") String entName,
|
||||
@Param("orgPassNo") String orgPassNo);
|
||||
|
||||
/*修改企业信息*/
|
||||
Integer changeEnt(SysEnterprise record);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import java.util.List;
|
|||
@ApiModel("企业表")
|
||||
@TableName("sysenterprise")
|
||||
public class SysEnterprise implements Serializable {
|
||||
|
||||
@ApiModelProperty("主键")
|
||||
@TableId("SysEnterpriseId")
|
||||
private String sysenterpriseid;
|
||||
|
|
@ -184,7 +185,7 @@ public class SysEnterprise implements Serializable {
|
|||
@TableField("MaleCode")
|
||||
private String malecode;
|
||||
|
||||
|
||||
//统一信用代码
|
||||
@TableField("OrgPassNo")
|
||||
private String orgpassno;
|
||||
|
||||
|
|
@ -297,6 +298,18 @@ public class SysEnterprise implements Serializable {
|
|||
@ExcelColumn(value = "企业状态", col = 11)
|
||||
private String state = "启用";
|
||||
|
||||
/**
|
||||
* 审核状态 1、审核通过 2、未审核通过
|
||||
*/
|
||||
@TableField("audit_status")
|
||||
private Integer auditStatus;
|
||||
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
@TableField("audit_remarks")
|
||||
private String auditRemarks;
|
||||
|
||||
/**
|
||||
* 是否隐藏
|
||||
*/
|
||||
|
|
@ -379,6 +392,23 @@ public class SysEnterprise implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
public Integer getAuditStatus() {
|
||||
return auditStatus;
|
||||
}
|
||||
|
||||
public void setAuditStatus(Integer auditStatus) {
|
||||
this.auditStatus = auditStatus;
|
||||
}
|
||||
|
||||
public String getAuditRemarks() {
|
||||
return auditRemarks;
|
||||
}
|
||||
|
||||
public void setAuditRemarks(String auditRemarks) {
|
||||
this.auditRemarks = auditRemarks;
|
||||
}
|
||||
|
||||
public String getAreaCode() {
|
||||
return areaCode;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.rzyc.model.user;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
|
@ -13,66 +14,87 @@ import java.util.List;
|
|||
@ApiModel("岗位")
|
||||
public class ListPerform implements Serializable {
|
||||
|
||||
@TableField("ListPerformId")
|
||||
@ApiModelProperty("岗位id")
|
||||
private String listperformid;
|
||||
|
||||
|
||||
@ApiModelProperty("岗位编号")
|
||||
@TableField("PerformClassCode")
|
||||
private String performclasscode;
|
||||
|
||||
@TableField("PerformClassName")
|
||||
@ApiModelProperty("岗位名")
|
||||
private String performclassname;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
@TableField("PerformName")
|
||||
@ApiModelProperty("负责人")
|
||||
private String performName;
|
||||
|
||||
@TableField("SortId")
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sortid;
|
||||
|
||||
@TableField("SysLevel")
|
||||
@ApiModelProperty("级别")
|
||||
private Integer syslevel;
|
||||
|
||||
@TableField("SupClassId")
|
||||
@ApiModelProperty("父级岗位id")
|
||||
private String supclassid;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("父级岗位名")
|
||||
private String superName;
|
||||
|
||||
@TableField("SupClassCode")
|
||||
private String supclasscode;
|
||||
|
||||
/**
|
||||
* 履职完成进度
|
||||
*/
|
||||
@TableField("Completion")
|
||||
@ApiModelProperty("履职完成进度")
|
||||
private String completion;
|
||||
|
||||
@TableField("SupClassName")
|
||||
private String supclassname;
|
||||
|
||||
/**
|
||||
* 可查看履职的职务id
|
||||
*/
|
||||
@TableField("ViewJurisdiction")
|
||||
@ApiModelProperty("可查看履职的职务id")
|
||||
private String viewJurisdiction;
|
||||
|
||||
@TableField("parent_path")
|
||||
@ApiModelProperty("父级地址")
|
||||
private String parentPath;
|
||||
|
||||
@TableField("parent_name")
|
||||
@ApiModelProperty("父级名称")
|
||||
private String parentName;
|
||||
|
||||
@TableField("CreatedOn")
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createdon;
|
||||
|
||||
@TableField("CreatedBy")
|
||||
@ApiModelProperty("创建人")
|
||||
private String createdby;
|
||||
|
||||
@TableField("ModifiedOn")
|
||||
@ApiModelProperty("修改时间")
|
||||
private Date modifiedon;
|
||||
|
||||
@TableField("ModifiedBy")
|
||||
@ApiModelProperty("修改人")
|
||||
private String modifiedby;
|
||||
|
||||
@TableField("WorkDivision")
|
||||
@ApiModelProperty("工作分工")
|
||||
private String workdivision;
|
||||
|
||||
|
|
@ -81,9 +103,26 @@ public class ListPerform implements Serializable {
|
|||
*/
|
||||
private Boolean checked = false;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("子级")
|
||||
private List<ListPerform> children;
|
||||
|
||||
@ApiModelProperty("地区id")
|
||||
@TableField("area_code")
|
||||
private String areaCode;
|
||||
|
||||
@ApiModelProperty("地区路径")
|
||||
@TableField("area_path")
|
||||
private String areaPath;
|
||||
|
||||
@ApiModelProperty("地区路径名")
|
||||
@TableField("area_path_name")
|
||||
private String areaPathName;
|
||||
|
||||
@ApiModelProperty("岗位类型 1、部门 2、岗位")
|
||||
@TableField("position_type")
|
||||
private Integer positionType;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public String getParentPath() {
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@
|
|||
<result column="area_name" jdbcType="VARCHAR" property="areaName"/>
|
||||
<result column="area_code" jdbcType="VARCHAR" property="areaCode"/>
|
||||
<result column="area_path" jdbcType="VARCHAR" property="areaPath"/>
|
||||
<result column="audit_status" jdbcType="INTEGER" property="auditStatus"/>
|
||||
<result column="audit_remarks" jdbcType="VARCHAR" property="auditRemarks"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
|
|
@ -82,6 +84,8 @@
|
|||
SysAddress,
|
||||
safeTelephone,
|
||||
safeManager,
|
||||
audit_status,
|
||||
audit_remarks,
|
||||
PostCode, EcoType,
|
||||
PersonCount, EntLogoPic, MaleCode, OrgPassNo, LegalRepre, LRIDCard, LRLinkTel, EstablishDate,
|
||||
RiskLevel, Latitude, Longitude, IsBlackList, Comments, ISMaleCode, EntScore, EntHouseNum,
|
||||
|
|
@ -119,6 +123,8 @@
|
|||
SysAddress,
|
||||
safeTelephone,
|
||||
safeManager,
|
||||
audit_status,
|
||||
audit_remarks,
|
||||
PostCode, EcoType, PersonCount,
|
||||
EntLogoPic, MaleCode, OrgPassNo,
|
||||
LegalRepre, LRIDCard, LRLinkTel,
|
||||
|
|
@ -155,6 +161,8 @@
|
|||
#{sysaddress,jdbcType=VARCHAR},
|
||||
#{safeTelephone,jdbcType=VARCHAR},
|
||||
#{safeManager,jdbcType=VARCHAR},
|
||||
#{auditStatus,jdbcType=INTEGER},
|
||||
#{auditRemarks,jdbcType=VARCHAR},
|
||||
#{postcode,jdbcType=VARCHAR}, #{ecotype,jdbcType=VARCHAR}, #{personcount,jdbcType=INTEGER},
|
||||
#{entlogopic,jdbcType=VARCHAR}, #{malecode,jdbcType=VARCHAR}, #{orgpassno,jdbcType=VARCHAR},
|
||||
#{legalrepre,jdbcType=VARCHAR}, #{lridcard,jdbcType=VARCHAR}, #{lrlinktel,jdbcType=VARCHAR},
|
||||
|
|
@ -1277,6 +1285,11 @@
|
|||
SELECT * FROM SysEnterprise se WHERE se.`EntName` = #{entName}
|
||||
</select>
|
||||
|
||||
<!--通过企业名 查询企业信息-->
|
||||
<select id="findByEnt" resultMap="BaseResultMap">
|
||||
SELECT * FROM SysEnterprise se WHERE (se.`EntName` = #{entName} or se.OrgPassNo = #{orgPassNo})
|
||||
</select>
|
||||
|
||||
<!--修改导入企业-->
|
||||
<update id="changeImportEnt" >
|
||||
update SysEnterprise
|
||||
|
|
|
|||
|
|
@ -731,7 +731,9 @@
|
|||
<select id="findByName" resultMap="BaseResultMap">
|
||||
SELECT * FROM ListPerform lf
|
||||
WHERE lf.`PerformClassName` = #{performClassName}
|
||||
<if test="null != supClassId and '' != supClassId">
|
||||
AND lf.`SupClassId` = #{supClassId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--查询岗位-->
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.rzyc.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.common.utils.*;
|
||||
import com.common.utils.SMS.SendSMS;
|
||||
|
|
@ -13,6 +14,7 @@ import com.common.utils.jwt.JwtUtil;
|
|||
import com.rzyc.bean.OaTaskTime;
|
||||
import com.common.utils.model.Pager;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.rzyc.bean.TreeModel;
|
||||
import com.rzyc.bean.check.CheckList;
|
||||
import com.rzyc.bean.check.CheckPerform;
|
||||
import com.rzyc.config.ConstantsConfigure;
|
||||
|
|
@ -2033,4 +2035,106 @@ public class BaseController {
|
|||
sysEnterpriseMapper.changeInherentRisk(enterpriseId,riskMap.get(rkCompanyDiagnosis.getScore()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 行业类别
|
||||
* */
|
||||
public List<TreeModel>baseInClasses(int isTree, Integer type)throws Exception{
|
||||
List<TreeModel> baseInClasses = baseInClassMapper.findInClass();
|
||||
JSONArray jsonArray = handleTreeModel(baseInClasses);
|
||||
List<TreeModel> treeModels = JSONArray.parseArray(jsonArray.toJSONString(),TreeModel.class);
|
||||
return treeModels;
|
||||
}
|
||||
|
||||
/**
|
||||
* 地区树形结构
|
||||
* @param treeModels
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public JSONArray handleTreeModel(List<TreeModel> treeModels)throws Exception{
|
||||
List<Map<String,Object>> data = new ArrayList<>();
|
||||
for(TreeModel treeModel : treeModels){
|
||||
if(StringUtils.isBlank(treeModel.getParentId())){
|
||||
treeModel.setParentId("");
|
||||
}
|
||||
Map<String,Object> entUserMap = new HashMap<String,Object>();
|
||||
entUserMap.put("label",treeModel.getLabel());
|
||||
entUserMap.put("id",treeModel.getId());
|
||||
entUserMap.put("parentId",treeModel.getParentId());
|
||||
entUserMap.put("code",treeModel.getCode());
|
||||
entUserMap.put("isSelect",treeModel.getIsSelect());
|
||||
|
||||
data.add(entUserMap);
|
||||
}
|
||||
JSONArray result = TypeConversion.listToTree(JSONArray.parseArray(JSON.toJSONString(data)),"id","parentId","children");
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 安全类别
|
||||
* */
|
||||
public List<BaseSafeClass>baseSafeClasses(int isTree){
|
||||
List<BaseSafeClass>baseSafeClasses;
|
||||
if (isTree == 1){
|
||||
baseSafeClasses = baseSafeClassMapper.findAllTree();
|
||||
}else {
|
||||
baseSafeClasses = baseSafeClassMapper.findAll();
|
||||
}
|
||||
return baseSafeClasses;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改企业清单数量
|
||||
* @param companyId
|
||||
* @throws Exception
|
||||
*/
|
||||
protected void changeEntListNum(String companyId,String nickName)throws Exception{
|
||||
EntMessage entMessage = entMessageMapper.findByEntId(companyId);
|
||||
|
||||
/**
|
||||
* 主体清单数
|
||||
*/
|
||||
Integer mainNum = sysEntListMapper.countByEntId(companyId, EntListType.SUBJECT_LIST.getType());
|
||||
|
||||
/**
|
||||
* 岗位清单数
|
||||
*/
|
||||
Integer postNum = sysEntListMapper.countByEntId(companyId, EntListType.POST_LIST.getType());
|
||||
|
||||
/**
|
||||
* 检查清单数
|
||||
*/
|
||||
Integer checkNum = sysEntListMapper.countByEntId(companyId, EntListType.CHECK_LIST.getType());
|
||||
|
||||
/**
|
||||
* 应急清单数
|
||||
*/
|
||||
Integer urgentNum = sysEntListMapper.countByEntId(companyId, EntListType.OTH_LIST.getType());
|
||||
|
||||
|
||||
if(null != entMessage){
|
||||
entMessage.setMainNum(mainNum);
|
||||
entMessage.setPostNum(postNum);
|
||||
entMessage.setCheckNum(checkNum);
|
||||
entMessage.setUrgentNum(urgentNum);
|
||||
entMessage.setModifiedBy(nickName);
|
||||
entMessage.setModifiedOn(new Date());
|
||||
entMessageMapper.changeByEntId(entMessage);
|
||||
}else{
|
||||
entMessage = new EntMessage();
|
||||
entMessage.setSysEnterpriseId(companyId);
|
||||
entMessage.setEntMessageId(RandomNumber.getUUid());
|
||||
entMessage.setMainNum(mainNum);
|
||||
entMessage.setPostNum(postNum);
|
||||
entMessage.setCheckNum(checkNum);
|
||||
entMessage.setUrgentNum(urgentNum);
|
||||
entMessage.setCreatedBy(nickName);
|
||||
entMessage.setCreatedOn(new Date());
|
||||
entMessage.setModifiedBy(nickName);
|
||||
entMessage.setModifiedOn(new Date());
|
||||
entMessageMapper.insertSelective(entMessage);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,597 @@
|
|||
package com.rzyc.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.common.utils.DateUtils;
|
||||
import com.common.utils.RandomNumber;
|
||||
import com.common.utils.StringUtils;
|
||||
import com.common.utils.TypeConversion;
|
||||
import com.common.utils.model.Code;
|
||||
import com.common.utils.model.Message;
|
||||
import com.common.utils.model.MultiResult;
|
||||
import com.common.utils.model.SingleResult;
|
||||
import com.common.utils.verification.Verification;
|
||||
import com.rzyc.bean.ImportListDetail;
|
||||
import com.rzyc.bean.TreeModel;
|
||||
import com.rzyc.bean.ent.IndustryClassDto;
|
||||
import com.rzyc.enums.EntListType;
|
||||
import com.rzyc.model.AppHelp;
|
||||
import com.rzyc.model.Dynamic;
|
||||
import com.rzyc.model.SysOrg;
|
||||
import com.rzyc.model.ent.*;
|
||||
import com.rzyc.service.TaskService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.OutputStream;
|
||||
import java.util.*;
|
||||
|
||||
@Api(tags = "其他")
|
||||
@Controller
|
||||
@CrossOrigin("*")
|
||||
public class OtherController extends BaseController{
|
||||
|
||||
//定时任务
|
||||
@Autowired
|
||||
private TaskService taskService;
|
||||
|
||||
/*动态详情*/
|
||||
@GetMapping(value = "/dynamicDetail")
|
||||
public String newsDetail(String dynamicId,Model model){
|
||||
System.out.println("dynamicId --- > "+dynamicId);
|
||||
Dynamic dynamic = newsCntMapper.newCntDetail(dynamicId);
|
||||
if(null != dynamic){
|
||||
dynamic.setTime(DateUtils.parseDate2String(dynamic.getPublictime(), "yyyy-MM-dd"));
|
||||
}else{
|
||||
dynamic = new Dynamic();
|
||||
}
|
||||
model.addAttribute("dynamic",dynamic);
|
||||
return "dynamic/dynamic_detail";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安全类型
|
||||
* */
|
||||
@ApiOperation(value = "获取安全类型", notes = "获取安全类型")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "isTree", value = "是否树形结构 1.树形结构 2.平行结构", required = true, dataType = "int")
|
||||
})
|
||||
@GetMapping("/safeClass")
|
||||
@ResponseBody
|
||||
public SingleResult<List<BaseSafeClass>> companyDetailAccident(int isTree)throws Exception {
|
||||
SingleResult singleResult = new SingleResult();
|
||||
List<BaseSafeClass> list = baseSafeClasses(isTree);
|
||||
if (list!=null){
|
||||
singleResult.setMessage(Message.SUCCESS);
|
||||
singleResult.setCode(Code.SUCCESS.getCode());
|
||||
singleResult.setData(list);
|
||||
}else {
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取行业类型
|
||||
* */
|
||||
@ApiOperation(value = "获取行业类型", notes = "获取行业类型")
|
||||
@GetMapping("/industryClass")
|
||||
@ResponseBody
|
||||
public SingleResult<List<TreeModel>> industryClass(@Valid IndustryClassDto industryClassDto)throws Exception {
|
||||
SingleResult singleResult = new SingleResult();
|
||||
List<TreeModel> list = super.baseInClasses(industryClassDto.getIsTree(),industryClassDto.getType());
|
||||
if (list!=null){
|
||||
singleResult.setMessage(Message.SUCCESS);
|
||||
singleResult.setCode(Code.SUCCESS.getCode());
|
||||
singleResult.setData(list);
|
||||
}else {
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 工作单元行业
|
||||
* */
|
||||
@ApiOperation(value = "工作单元行业", notes = "工作单元行业")
|
||||
@GetMapping("/workIndustry")
|
||||
@ResponseBody
|
||||
public SingleResult<List<BaseInClass>> workIndustry(@Valid IndustryClassDto industryClassDto)throws Exception {
|
||||
SingleResult singleResult = new SingleResult();
|
||||
|
||||
List<BaseInClass> list = baseInClassMapper.workIndustry();
|
||||
if (list!=null){
|
||||
singleResult.setMessage(Message.SUCCESS);
|
||||
singleResult.setCode(Code.SUCCESS.getCode());
|
||||
singleResult.setData(list);
|
||||
}else {
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 所有行业类型
|
||||
* */
|
||||
@ApiOperation(value = "所有行业类型", notes = "所有行业类型")
|
||||
@GetMapping("/allIndustryClass")
|
||||
@ResponseBody
|
||||
public SingleResult<List<TreeModel>> allIndustryClass(@Valid IndustryClassDto industryClassDto)throws Exception {
|
||||
SingleResult singleResult = new SingleResult();
|
||||
List<TreeModel> list = super.baseInClasses(industryClassDto.getIsTree(),industryClassDto.getType());
|
||||
if (list!=null){
|
||||
singleResult.setMessage(Message.SUCCESS);
|
||||
singleResult.setCode(Code.SUCCESS.getCode());
|
||||
singleResult.setData(list);
|
||||
}else {
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查帮助
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/govHelp")
|
||||
public String govHelp(Model model){
|
||||
String type = "GOV";
|
||||
AppHelp appHelp = appHelpMapper.findByType(type);
|
||||
if(null == appHelp){
|
||||
appHelp = new AppHelp();
|
||||
}
|
||||
model.addAttribute("appHelp",appHelp);
|
||||
return "help/gov_help";
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查帮助
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/entHelp")
|
||||
public String entHelp(Model model){
|
||||
String type = "ENT";
|
||||
AppHelp appHelp = appHelpMapper.findByType(type);
|
||||
if(null == appHelp){
|
||||
appHelp = new AppHelp();
|
||||
}
|
||||
model.addAttribute("appHelp",appHelp);
|
||||
return "help/ent_help";
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查帮助
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/appGovHelp")
|
||||
public String appGovHelp(Model model){
|
||||
String type = "GOV";
|
||||
AppHelp appHelp = appHelpMapper.findByType(type);
|
||||
if(null == appHelp){
|
||||
appHelp = new AppHelp();
|
||||
}
|
||||
model.addAttribute("appHelp",appHelp);
|
||||
return "help/app_gov_help";
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业端检查帮助
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/appEntHelp")
|
||||
public String appEntHelp(Model model){
|
||||
String type = "ENT";
|
||||
AppHelp appHelp = appHelpMapper.findByType(type);
|
||||
if(null == appHelp){
|
||||
appHelp = new AppHelp();
|
||||
}
|
||||
model.addAttribute("appHelp",appHelp);
|
||||
return "help/app_ent_help";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param appHelp
|
||||
*/
|
||||
@RequestMapping(value = "/changeGovHelp", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public String changeGovHelp(AppHelp appHelp){
|
||||
appHelpMapper.changeAppHelp(appHelp);
|
||||
return "success";
|
||||
}
|
||||
|
||||
|
||||
/*导入企业清单*/
|
||||
@GetMapping("/importList")
|
||||
public String importList(){
|
||||
return "import_list/import_list";
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传企业清单
|
||||
* @param file
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/uploadEntList", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Map<String,Object> uploadEntList(@RequestBody MultipartFile file,String entName) {
|
||||
Map<String,Object> resultMap = new HashMap<String,Object>();
|
||||
resultMap.put("code",1);
|
||||
try {
|
||||
List<String> excelRow = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(entName)){
|
||||
System.out.println("entName -> "+entName);
|
||||
System.out.println("file -> "+file.getOriginalFilename());
|
||||
Map<String,Object> companyData = this.getCompanyData(file);//错误集合收集 get excelRow
|
||||
//清单数据
|
||||
List<ImportListDetail> listDetails = (List<ImportListDetail>)companyData.get("listDetails");
|
||||
//出错数据
|
||||
excelRow = (List<String>)companyData.get("excelRow");
|
||||
if(null == excelRow ){
|
||||
excelRow = new ArrayList<>();
|
||||
}
|
||||
|
||||
this.handleEntList(listDetails,excelRow,entName);
|
||||
}else{
|
||||
excelRow.add("请输入企业名");
|
||||
}
|
||||
|
||||
|
||||
|
||||
resultMap.put("excelRow",excelRow);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理企业清单
|
||||
* @param listDetails
|
||||
* @param excelRow
|
||||
* @throws Exception
|
||||
*/
|
||||
private void handleEntList(List<ImportListDetail> listDetails,List<String> excelRow,String entName)throws Exception{
|
||||
if(null != listDetails && listDetails.size() > 0){
|
||||
Integer listSort = 1;
|
||||
|
||||
List<SysEntListWithBLOBs> sysEntLists = new ArrayList<>();
|
||||
List<String> sysUserIds = new ArrayList<>();
|
||||
|
||||
for (ImportListDetail listDetail : listDetails){
|
||||
listDetail.setEntName(entName);
|
||||
listDetail.setListSort(listSort);
|
||||
System.out.println("listDetail -> "+JSONArray.toJSONString(listDetail));
|
||||
String errorMsg = this.addEntList(listDetail,sysEntLists,sysUserIds);
|
||||
if(StringUtils.isNotBlank(errorMsg)){
|
||||
excelRow.add(errorMsg);
|
||||
}
|
||||
listSort++ ;
|
||||
}
|
||||
|
||||
//先删除之前上传的企业清单
|
||||
if(null != sysUserIds && sysUserIds.size() > 0 && null != sysEntLists && sysEntLists.size() > 0){
|
||||
//删除企业清单
|
||||
sysEntListMapper.delByListType(sysEntLists.get(0).getSysenterpriseid(),"","");
|
||||
//上传企业清单
|
||||
sysEntListMapper.insertList(sysEntLists);
|
||||
//修改统计数据
|
||||
super.changeEntListNum(sysEntLists.get(0).getSysenterpriseid(),"excel");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入企业清单
|
||||
* @param listDetail
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public String addEntList(ImportListDetail listDetail,List<SysEntListWithBLOBs> sysEntLists,List<String> sysUserIds)throws Exception{
|
||||
String errorMsg= "";
|
||||
List<SysEnterprise> enterprises = sysEnterpriseMapper.findByEntName(listDetail.getEntName(),"");
|
||||
if(null != enterprises && enterprises.size() > 0){
|
||||
List<String> entUserIds = new ArrayList<>();
|
||||
//岗位存在多个岗位名相同的记录
|
||||
List<SysEntUser> entUsers = sysEntUserMapper.findByPostName(listDetail.getPostName(),enterprises.get(0).getSysenterpriseid());
|
||||
if(null != entUsers && entUsers.size() > 0){
|
||||
for(SysEntUser entUser : entUsers){
|
||||
entUserIds.add(entUser.getSysentuserid());
|
||||
}
|
||||
}
|
||||
|
||||
//添加清单数据
|
||||
if(null != entUserIds && entUserIds.size() > 0){
|
||||
for (String entUserId : entUserIds){
|
||||
|
||||
SysEntListWithBLOBs sysEntList = new SysEntListWithBLOBs();
|
||||
sysEntList.setSysentlistid(RandomNumber.getUUid());
|
||||
sysEntList.setSysenterpriseid(enterprises.get(0).getSysenterpriseid());
|
||||
sysEntList.setSysUserId(entUserId);
|
||||
sysEntList.setListSort(listDetail.getListSort());
|
||||
sysEntList.setListType(listDetail.getListType());
|
||||
sysEntList.setListContent(listDetail.getListContent());
|
||||
sysEntList.setCreatedby("excel");
|
||||
sysEntList.setModifiedby("excel");
|
||||
System.out.println("------------------------");
|
||||
sysEntLists.add(sysEntList);
|
||||
sysEntList.setCreatedon(new Date());
|
||||
sysEntList.setModifiedon(new Date());
|
||||
|
||||
//记录清单id 用来删除历史上传的清单
|
||||
sysUserIds.add(entUserId);
|
||||
}
|
||||
}else{
|
||||
if("公司账号".equals(listDetail.getUserType())){
|
||||
errorMsg = listDetail.getEntName()+"不存在";
|
||||
}else if("岗位账号".equals(listDetail.getUserType())){
|
||||
errorMsg = "岗位:"+listDetail.getPostName()+"不存在";
|
||||
}
|
||||
}
|
||||
}else{
|
||||
errorMsg = listDetail.getEntName()+"不存在";
|
||||
}
|
||||
return errorMsg;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 解析excel 数据
|
||||
* @param multipartFile
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Map<String,Object> getCompanyData(MultipartFile multipartFile)throws Exception{
|
||||
Map<String,Object> analysisResult = new HashMap<>();
|
||||
|
||||
//未导入行数
|
||||
List<String> excelRow = new ArrayList<>();
|
||||
//清单信息
|
||||
List<ImportListDetail> listDetails = new ArrayList<>();
|
||||
|
||||
if(null != multipartFile){
|
||||
Workbook wookbook = WorkbookFactory.create(multipartFile.getInputStream());
|
||||
Sheet sheet = wookbook.getSheetAt(0);
|
||||
|
||||
//获得表头
|
||||
Row rowHead = sheet.getRow(0);
|
||||
|
||||
System.out.println("getPhysicalNumberOfCells -> "+rowHead.getPhysicalNumberOfCells());
|
||||
//判断表头是否正确
|
||||
if(rowHead.getPhysicalNumberOfCells() == 4){
|
||||
//获得数据的总行数
|
||||
int totalRowNum = sheet.getLastRowNum();
|
||||
|
||||
if(totalRowNum > 0){
|
||||
|
||||
Boolean isSubject = true;
|
||||
|
||||
//获得所有数据
|
||||
for(int i = 1 ; i <= totalRowNum ; i++){
|
||||
//获得第i行对象
|
||||
Row row = sheet.getRow(i);
|
||||
if(null == row){
|
||||
break;
|
||||
}
|
||||
|
||||
ImportListDetail listDetail = new ImportListDetail();
|
||||
|
||||
|
||||
//企业名
|
||||
Cell cell = row.getCell((short)0);
|
||||
if(null != cell){
|
||||
String entName = cell.getStringCellValue().toString();
|
||||
if(StringUtils.isNotBlank(entName)){
|
||||
listDetail.setEntName(entName);
|
||||
}else{
|
||||
excelRow.add("请单第"+i+"行企业名为空!");
|
||||
continue;
|
||||
}
|
||||
}else{
|
||||
excelRow.add("请单第"+i+"行企业名为空!");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
cell = row.getCell((short)1);
|
||||
if(null != cell){
|
||||
String psotName = cell.getStringCellValue().toString();
|
||||
if(StringUtils.isNotBlank(psotName)){
|
||||
listDetail.setPostName(psotName);
|
||||
}else{
|
||||
excelRow.add("请单第"+i+"行岗位名为空!");
|
||||
continue;
|
||||
}
|
||||
}else{
|
||||
excelRow.add("请单第"+i+"行岗位名为空!");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
//清单类型
|
||||
cell = row.getCell((short)2);
|
||||
if(null != cell){
|
||||
String listType = cell.getStringCellValue().toString();
|
||||
if(StringUtils.isNotBlank(listType)){
|
||||
listDetail.setListType(listType);
|
||||
}else{
|
||||
excelRow.add("请单第"+i+"行清单类型为空!");
|
||||
continue;
|
||||
}
|
||||
}else{
|
||||
excelRow.add("请单第"+i+"行清单类型为空!");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
//清单内容
|
||||
cell = row.getCell((short)3);
|
||||
cell.setCellType(CellType.STRING);
|
||||
if(null != cell){
|
||||
String listContent = cell.getStringCellValue().toString();
|
||||
if(StringUtils.isNotBlank(listContent)){
|
||||
listDetail.setListContent(listContent);
|
||||
}else{
|
||||
excelRow.add("请单第"+i+"行清单内容为空!");
|
||||
continue;
|
||||
}
|
||||
}else{
|
||||
excelRow.add("请单第"+i+"行清单内容为空!");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(!EntListType.SUBJECT_LIST.getType().equals(listDetail.getListType())){
|
||||
listDetails.add(listDetail);
|
||||
}else{
|
||||
if(isSubject){
|
||||
listDetails.add(listDetail);
|
||||
isSubject = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}else{
|
||||
excelRow.add("表格格式出错!");
|
||||
}
|
||||
}
|
||||
System.out.println("数据解析完成");
|
||||
//数据
|
||||
analysisResult.put("listDetails",listDetails);
|
||||
//报错信息
|
||||
analysisResult.put("excelRow",excelRow);
|
||||
|
||||
return analysisResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 地区树形
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "地区树形", notes = "地区树形")
|
||||
@GetMapping(value = "/areaTree")
|
||||
@ResponseBody
|
||||
public MultiResult<SysOrg> areaTree(String userId)throws Exception{
|
||||
System.out.println("userId -> "+userId);
|
||||
|
||||
MultiResult<SysOrg> result = new MultiResult<>();
|
||||
|
||||
//获取用户低
|
||||
if(StringUtils.isBlank(userId)){
|
||||
userId = getUserId();
|
||||
}
|
||||
|
||||
//获取用户的地区id
|
||||
String userArea = getUserArea(userId);
|
||||
if(StringUtils.isBlank(userArea)){
|
||||
userArea = constantsConfigure.getSuperiorOrgCode();
|
||||
}
|
||||
|
||||
List<SysOrg> sysOrgs = sysOrgMapper.findUserArea(userArea);
|
||||
|
||||
if(sysOrgs.size() > 0){
|
||||
//处理树形结构
|
||||
JSONArray jsonArray = handleAreaTree(sysOrgs);
|
||||
List<SysOrg> areas = JSONArray.parseArray(JSONArray.toJSONString(jsonArray),SysOrg.class);
|
||||
result.setData(areas);
|
||||
}else{
|
||||
result.setCode(Code.NO_DATA.getCode());
|
||||
result.setMessage(Message.NO_DATA);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 地区树形结构
|
||||
* @param sysOrgs
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
private JSONArray handleAreaTree(List<SysOrg> sysOrgs)throws Exception{
|
||||
List<Map<String,Object>> data = new ArrayList<>();
|
||||
for(SysOrg sysOrg : sysOrgs){
|
||||
if(StringUtils.isBlank(sysOrg.getSuperiororgcode())){
|
||||
sysOrg.setSuperiororgcode("");
|
||||
}
|
||||
Map<String,Object> entUserMap = new HashMap<String,Object>();
|
||||
entUserMap.put("orgcode",sysOrg.getOrgcode());
|
||||
entUserMap.put("orgname",sysOrg.getOrgname());
|
||||
entUserMap.put("superiororgcode",sysOrg.getSuperiororgcode());
|
||||
|
||||
data.add(entUserMap);
|
||||
}
|
||||
JSONArray result = TypeConversion.listToTree(JSONArray.parseArray(JSON.toJSONString(data)),"orgcode","superiororgcode","children");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 定时任务测试
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "定时任务测试", notes = "定时任务测试")
|
||||
@GetMapping(value = "/taskTest")
|
||||
@ResponseBody
|
||||
public SingleResult<String> taskTest()throws Exception{
|
||||
SingleResult<String> result = new SingleResult<>();
|
||||
taskService.task();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 验证码
|
||||
* @param request
|
||||
* @param response
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "验证码", notes = "验证码")
|
||||
@GetMapping ("/generateCode")
|
||||
@ResponseBody
|
||||
public void generateCode(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
try {
|
||||
BufferedImage image = Verification.getVerify(constantsConfigure.getGenerateCodeKey(),request);
|
||||
OutputStream out = response.getOutputStream();
|
||||
ImageIO.write(image, "JPEG", out);
|
||||
System.out.println("图片=========" + image);
|
||||
out.flush();
|
||||
out.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -28,18 +28,17 @@ import com.rzyc.model.ent.InEntList;
|
|||
import com.rzyc.model.ent.SysEnterprise;
|
||||
import com.rzyc.model.user.SysUnit;
|
||||
import com.rzyc.model.user.SysUser;
|
||||
import com.rzyc.service.MobileBusinessService;
|
||||
import com.rzyc.service.PcBusinessService;
|
||||
import com.rzyc.service.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.beanutils.ConvertUtils;
|
||||
import org.apache.commons.beanutils.converters.DateConverter;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
|
@ -53,6 +52,7 @@ import javax.validation.Valid;
|
|||
import java.sql.Timestamp;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
/**
|
||||
* @author dong
|
||||
|
|
@ -62,7 +62,7 @@ import java.util.*;
|
|||
@Api(tags = "企业系统")
|
||||
@CrossOrigin("*")
|
||||
@RequestMapping("pcCompany")
|
||||
@Controller
|
||||
@RestController
|
||||
@Validated
|
||||
public class PcCompanyController extends BaseController{
|
||||
|
||||
|
|
@ -1065,7 +1065,71 @@ public class PcCompanyController extends BaseController{
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 企业注册
|
||||
* @version v1.0
|
||||
* @author dong
|
||||
* @date 2023/7/18 15:11
|
||||
*/
|
||||
@ApiOperation(value = "企业注册", notes = "企业注册")
|
||||
@PostMapping("/entRegister")
|
||||
public SingleResult<SysEnterprise> entRegister(EntRegisterDto entRegisterDto)throws Exception{
|
||||
SingleResult<SysEnterprise> result = new SingleResult<>();
|
||||
|
||||
SysEnterprise enterprise = new SysEnterprise();
|
||||
BeanUtils.copyProperties(enterprise,entRegisterDto);
|
||||
enterprise.setWorkClassId(enterprise.getBaseinclassid());
|
||||
|
||||
SysEnterprise sysEnterprise = sysEnterpriseMapper.findByEnt(enterprise.getEntname(),enterprise.getOrgpassno());
|
||||
if(null != sysEnterprise){
|
||||
if(1 == sysEnterprise.getAuditStatus()){
|
||||
result.setCode(Code.ERROR.getCode());
|
||||
result.setMessage("企业已存在,可直接登录。");
|
||||
}else{
|
||||
result.setCode(Code.ERROR.getCode());
|
||||
result.setMessage("企业审核中。");
|
||||
}
|
||||
}else{
|
||||
enterprise.setSysenterpriseid(RandomNumber.getUUid());
|
||||
getEntAreaCode(enterprise.getAreaCode(),sysEnterprise);
|
||||
sysEnterprise.setCreatedon(new Date());
|
||||
sysEnterprise.setModifiedon(new Date());
|
||||
sysEnterprise.setState("启用");
|
||||
sysEnterprise.setAuditStatus(2);
|
||||
sysEnterprise.setDynamicRiskLevel("100");//新建企业默认100分数
|
||||
sysEnterprise.setQrCode(entQrCode(sysEnterprise.getSysenterpriseid()));
|
||||
|
||||
sysEnterpriseMapper.insert(sysEnterprise);
|
||||
|
||||
|
||||
//生成行业对应的企业责任清单(不包括岗位的清单,只包括行业公共)
|
||||
SaveEntListThread saveEntListThread = new SaveEntListThread(inListItemMapper,inEntListMapper,getUserId(),sysEnterprise.getWorkClassId(),sysEnterprise.getSysenterpriseid());
|
||||
Thread thread = new Thread(saveEntListThread);
|
||||
thread.start();
|
||||
thread.join();
|
||||
|
||||
//创建多个行业岗位
|
||||
SaveIndustryPostThread saveIndustryPost = new SaveIndustryPostThread(sysEnterprise.getWorkClassId(),sysEnterprise.getSysenterpriseid(),inPostMapper,inPostItemMapper,inPostListMapper,inListItemMapper,sysEnterpriseMapper,entPostMapper, entPostDutyMapper,false);
|
||||
Thread saveIndustryPostThread = new Thread(saveIndustryPost);
|
||||
saveIndustryPostThread.start();
|
||||
|
||||
//创建法人账号,用于判断手机号重复,单加不影响,没有生成履职清单和工作职责
|
||||
CopyOnWriteArrayList copyOnWriteArrayList = new CopyOnWriteArrayList();
|
||||
String entUserId = RandomNumber.getUUid();
|
||||
String postId = RandomNumber.getUUid();
|
||||
SaveEntPostAndUserThread SaveEntPostAndUserThread = new SaveEntPostAndUserThread(sysEnterprise.getSysenterpriseid(),getUserId(),sysEnterprise.getWorkClassId(),entPostMapper,entUserMapper,constantsConfigure,sysEnterprise.getLegalrepre(),sysEnterprise.getLrlinktel(),sysEnterprise.getEntname(),entUserId,postId,copyOnWriteArrayList,inListMapper,inListItemMapper,entPostDutyMapper);
|
||||
Thread t = new Thread(SaveEntPostAndUserThread);
|
||||
|
||||
//法人履职清单和履职任务
|
||||
AssignmentTaskThread textThread = new AssignmentTaskThread(entUserId,sysEnterprise.getSysenterpriseid(),postId,entPostListMapper,entPostTaskMapper,inEntListMapper,getUserId(),inPostListMapper,inPostItemMapper,entUserMapper,entPostMapper);
|
||||
Thread ttThread=new Thread(textThread);
|
||||
ttThread.start();
|
||||
t.start();
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ onstants:
|
|||
#验证码key
|
||||
generate_code_key: GENERATE_CODE_KEY
|
||||
#企业账号默认密码
|
||||
default_passwd: csaq512000
|
||||
default_passwd: csaq513300
|
||||
#公示牌
|
||||
gsp_path: /home/rzyc/resource/inventory/gsp.xlsx
|
||||
#zip下载地址
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ onstants:
|
|||
#上传文件基础路径
|
||||
service_file_header: http://42.193.40.239/
|
||||
#父级地区id
|
||||
superior_org_code: 512000
|
||||
superior_org_code: 513300
|
||||
#动态详情基础地址
|
||||
html_header: http://42.193.40.239:7010/
|
||||
#logourl
|
||||
|
|
@ -92,7 +92,7 @@ onstants:
|
|||
#验证码key
|
||||
generate_code_key: GENERATE_CODE_KEY
|
||||
#企业账号默认密码
|
||||
default_passwd: csaq512000
|
||||
default_passwd: csaq513300
|
||||
#公示牌
|
||||
gsp_path: /mnt/rzyc/resource/inventory/gsp.xlsx
|
||||
#zip下载地址
|
||||
|
|
|
|||
112
inventory-ent/src/main/resources/application-test.yml
Normal file
112
inventory-ent/src/main/resources/application-test.yml
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
server:
|
||||
port: 7011
|
||||
|
||||
spring:
|
||||
redis:
|
||||
host: 172.27.181.247
|
||||
password: gzQdzRedis
|
||||
#host: 127.0.0.1
|
||||
# 进入哨兵项目-这个端口就不用了,除非是单体
|
||||
port: 8011
|
||||
# sentinel:
|
||||
# master: mymaster
|
||||
# nodes: 172.27.181.247:26379,172.27.181.247:26380,172.27.181.247:26381
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 8
|
||||
max-idle: 8
|
||||
min-idle: 0
|
||||
max-wait: 100
|
||||
shutdown-timeout: 50000
|
||||
servlet:
|
||||
multipart:
|
||||
enabled: true
|
||||
max-file-size: 50MB
|
||||
max-request-size: 100MB
|
||||
mvc:
|
||||
view:
|
||||
prefix: classpath:/templates/
|
||||
suffix: .html
|
||||
devtools:
|
||||
restart:
|
||||
enabled: true
|
||||
thymeleaf:
|
||||
cache: false
|
||||
resources:
|
||||
cache:
|
||||
period: 0
|
||||
application:
|
||||
name: log
|
||||
|
||||
|
||||
|
||||
|
||||
#数据库
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://172.27.181.52:3306/inventory_23?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false
|
||||
username: ENC(QE4vB4KHgFwuqi42wTs27w==)
|
||||
password: ENC(9mRKdl9UCE8tkEsoO376nx5rCx58Htk1)
|
||||
tomcat:
|
||||
max-active: 10
|
||||
min-idle: 10
|
||||
initial-size: 2
|
||||
hikari:
|
||||
minimum-idle: 3
|
||||
maximum-pool-size: 10
|
||||
max-lifetime: 30000
|
||||
connection-test-query: SELECT 1
|
||||
jackson:
|
||||
#设置json转时间时区为东八区
|
||||
time-zone: GMT+8
|
||||
|
||||
#mybatis 配置文件
|
||||
mybatis:
|
||||
type-aliases-package: com.rzyc.model
|
||||
mapper-locations: mapper/**/*.xml
|
||||
config-location: classpath:mybatis-config.xml
|
||||
|
||||
#打印sql
|
||||
logging:
|
||||
level:
|
||||
com.rzyc.mapper: debug
|
||||
|
||||
|
||||
#文件上传的配置
|
||||
onstants:
|
||||
#上传文件存放地址
|
||||
file_location: /static/resource/inventory/uploadFile/
|
||||
#上传文件公共地址
|
||||
file_header: /static/resource/inventory/uploadFile/
|
||||
#上传文件基础路径
|
||||
service_file_header: http://172.27.181.247/
|
||||
#父级地区id
|
||||
superior_org_code: 513300
|
||||
#动态详情基础地址
|
||||
html_header: http://172.27.181.247:8018/
|
||||
#logourl
|
||||
logo_url: http://172.27.181.247:8010/static/resource/inventory/citysafe_logo.png
|
||||
#政府端帮助文档url
|
||||
help_url: http://172.27.181.247:8018/appGovHelp
|
||||
#企业端帮助文档url
|
||||
ent_help_url: http://172.27.181.247:8018/appGovHelp
|
||||
#行业部门id
|
||||
unit_id: 5bd164aa-dd43-45e3-a5a2-649bb2fd9fb9
|
||||
#镇街功能区
|
||||
area_unit_id: 920184e5-0cd8-4ef5-bdc7-d992ac4f1c17
|
||||
#验证码key
|
||||
generate_code_key: GENERATE_CODE_KEY
|
||||
#企业账号默认密码
|
||||
default_passwd: csaq513300
|
||||
#公示牌
|
||||
gsp_path: /static/rzyc/resource/inventory/gsp.xlsx
|
||||
#zip下载地址
|
||||
zip_path: /static/rzyc/resource/inventory/zip
|
||||
#导出word模板路径
|
||||
word_tmp: /static/rzyc/resource/inventory/wordtmp
|
||||
|
||||
|
||||
#加密
|
||||
jasypt:
|
||||
encryptor:
|
||||
password: gzQdz
|
||||
|
|
@ -81,7 +81,7 @@ onstants:
|
|||
#上传文件基础路径
|
||||
service_file_header: http://172.27.181.247/
|
||||
#父级地区id
|
||||
superior_org_code: 512000
|
||||
superior_org_code: 513300
|
||||
#动态详情基础地址
|
||||
html_header: http://172.27.181.247:8018/
|
||||
#logourl
|
||||
|
|
@ -97,7 +97,7 @@ onstants:
|
|||
#验证码key
|
||||
generate_code_key: GENERATE_CODE_KEY
|
||||
#企业账号默认密码
|
||||
default_passwd: csaq512000
|
||||
default_passwd: csaq513300
|
||||
#公示牌
|
||||
gsp_path: /static/rzyc/resource/inventory/gsp.xlsx
|
||||
#zip下载地址
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
spring:
|
||||
profiles:
|
||||
active: yun #设定打包配置文件
|
||||
active: test #设定打包配置文件
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ package com.rzyc.advice;
|
|||
import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Profile;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
|
|
@ -25,6 +26,7 @@ import java.util.List;
|
|||
@Configuration
|
||||
@EnableSwagger2
|
||||
@EnableSwaggerBootstrapUI
|
||||
@Profile({"dev","test"})
|
||||
public class Swagger2Config {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1057,7 +1057,7 @@ public class DataController extends com.rzyc.controller.BaseController {
|
|||
System.out.println(mobile);
|
||||
|
||||
|
||||
ListPerform superPerform = listPerformMapper.findByName(unitName,"5bd164aa-dd43-45e3-a5a2-649bb2fd9fb9");
|
||||
ListPerform superPerform = listPerformMapper.findByName(unitName,"");
|
||||
if(null != superPerform){
|
||||
ListPerform listPerform = listPerformMapper.findByPerformName(postName,superPerform.getListperformid(),name);
|
||||
if(null == listPerform){
|
||||
|
|
@ -1080,6 +1080,8 @@ public class DataController extends com.rzyc.controller.BaseController {
|
|||
|
||||
SysUnit sysUnit = sysUnitMapper.findByUnitName(unitName,"f618c8e4-c0ea-426a-8f91-5ef31cf70299");
|
||||
|
||||
SysUser user = sysUserMapper.selectAdmin(mobile);
|
||||
if(null == user){
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setSysuserid(RandomNumber.getUUid());
|
||||
sysUser.setUsertype("政府用户");
|
||||
|
|
@ -1105,6 +1107,8 @@ public class DataController extends com.rzyc.controller.BaseController {
|
|||
sysUser.setCreatedon(new Date());
|
||||
sysUser.setModifiedon(new Date());
|
||||
sysUserMapper.insert(sysUser);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ import java.util.List;
|
|||
@Component
|
||||
@Slf4j
|
||||
public class JwtAuthenticationTokenFiler extends OncePerRequestFilter {
|
||||
|
||||
@Autowired
|
||||
AuthorityKeyMapper authorityKeyMapper;
|
||||
|
||||
|
|
@ -39,6 +40,7 @@ public class JwtAuthenticationTokenFiler extends OncePerRequestFilter {
|
|||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
|
||||
//获取token
|
||||
String token = request.getHeader("userToken");
|
||||
System.out.println("addr ------> "+request.getLocalAddr());
|
||||
/* if (!StringUtils.hasText(token)) {
|
||||
//放行
|
||||
filterChain.doFilter(request, response);
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ onstants:
|
|||
#验证码key
|
||||
generate_code_key: GENERATE_CODE_KEY
|
||||
#企业账号默认密码
|
||||
default_passwd: csaq512000
|
||||
default_passwd: csaq513300
|
||||
#公示牌
|
||||
gsp_path: /home/rzyc/resource/inventory/gsp.xlsx
|
||||
#zip下载地址
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ onstants:
|
|||
#验证码key
|
||||
generate_code_key: GENERATE_CODE_KEY
|
||||
#企业账号默认密码
|
||||
default_passwd: csaq512000
|
||||
default_passwd: csaq513300
|
||||
#公示牌
|
||||
gsp_path: /mnt/rzyc/resource/inventory/gsp.xlsx
|
||||
#zip下载地址
|
||||
|
|
|
|||
|
|
@ -0,0 +1,97 @@
|
|||
server:
|
||||
port: 7010
|
||||
|
||||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
enabled: true
|
||||
max-file-size: 50MB
|
||||
max-request-size: 100MB
|
||||
mvc:
|
||||
view:
|
||||
prefix: classpath:/templates/
|
||||
suffix: .html
|
||||
devtools:
|
||||
restart:
|
||||
enabled: true
|
||||
thymeleaf:
|
||||
cache: false
|
||||
resources:
|
||||
cache:
|
||||
period: 0
|
||||
application:
|
||||
name: log
|
||||
|
||||
|
||||
|
||||
|
||||
#数据库
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://172.27.181.52:3306/inventory_23?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&autoReconnect=true
|
||||
username: ENC(QE4vB4KHgFwuqi42wTs27w==)
|
||||
password: ENC(9mRKdl9UCE8tkEsoO376nx5rCx58Htk1)
|
||||
tomcat:
|
||||
max-active: 10
|
||||
min-idle: 10
|
||||
initial-size: 2
|
||||
hikari:
|
||||
minimum-idle: 3
|
||||
maximum-pool-size: 10
|
||||
max-lifetime: 30000
|
||||
connection-test-query: SELECT 1
|
||||
jackson:
|
||||
#设置json转时间时区为东八区
|
||||
time-zone: GMT+8
|
||||
|
||||
#mybatis 配置文件
|
||||
mybatis:
|
||||
type-aliases-package: com.rzyc.model
|
||||
mapper-locations: mapper/**/*.xml
|
||||
config-location: classpath:mybatis-config.xml
|
||||
|
||||
#打印sql
|
||||
logging:
|
||||
level:
|
||||
com.rzyc.mapper: debug
|
||||
|
||||
|
||||
#文件上传的配置
|
||||
onstants:
|
||||
#上传文件存放地址
|
||||
file_location: /static/resource/inventory/uploadFile/
|
||||
#上传文件公共地址
|
||||
file_header: /static/resource/inventory/uploadFile/
|
||||
#上传文件基础路径
|
||||
service_file_header: http://172.27.181.247:8010/
|
||||
#父级地区id
|
||||
superior_org_code: 513300
|
||||
#动态详情基础地址
|
||||
html_header: http://172.27.181.247:8018/
|
||||
#logourl
|
||||
logo_url: http://172.27.181.247:8010/static/resource/inventory/citysafe_logo.png
|
||||
#政府端帮助文档url
|
||||
help_url: http://172.27.181.247:8018/appGovHelp
|
||||
#企业端帮助文档url
|
||||
ent_help_url: http://172.27.181.247:8018/appGovHelp
|
||||
#行业部门id
|
||||
unit_id: 5bd164aa-dd43-45e3-a5a2-649bb2fd9fb9
|
||||
#镇街功能区
|
||||
area_unit_id: 920184e5-0cd8-4ef5-bdc7-d992ac4f1c17
|
||||
#验证码key
|
||||
generate_code_key: GENERATE_CODE_KEY
|
||||
#企业账号默认密码
|
||||
default_passwd: csaq513300
|
||||
#公示牌
|
||||
gsp_path: /static/resource/inventory/gsp.xlsx
|
||||
#zip下载地址
|
||||
zip_path: /static/resource/inventory/zip
|
||||
#导出word模板路径
|
||||
word_tmp: /static/resource/inventory/wordtmp
|
||||
|
||||
|
||||
|
||||
#加密
|
||||
jasypt:
|
||||
encryptor:
|
||||
password: gzQdz
|
||||
|
|
@ -81,7 +81,7 @@ onstants:
|
|||
#验证码key
|
||||
generate_code_key: GENERATE_CODE_KEY
|
||||
#企业账号默认密码
|
||||
default_passwd: csaq512000
|
||||
default_passwd: csaq513300
|
||||
#公示牌
|
||||
gsp_path: /static/resource/inventory/gsp.xlsx
|
||||
#zip下载地址
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
spring:
|
||||
profiles:
|
||||
active: yun #设定打包配置文件
|
||||
active: test #设定打包配置文件
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user