机构流程

This commit is contained in:
1378012178@qq.com 2026-02-11 16:06:35 +08:00
parent bb31c54cc8
commit ea4e4401d1
25 changed files with 2789 additions and 1887 deletions

View File

@ -2,21 +2,31 @@ package com.nu.modules.orgapplyinfo.api;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfoApiEntity;
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
import java.util.List;
public interface IOrgApplyInfoApi {
OrgApplyInfoApiEntity insert(OrgApplyInfoApiEntity orgApplyInfoApiEntity);
OrgAllInfoApiEntity insertApply(OrgAllInfoApiEntity orgApplyInfoApiEntity);
int updateById(OrgApplyInfoApiEntity orgApplyInfoApiEntity);
OrgAllInfoApiEntity insertUpInfo(OrgAllInfoApiEntity orgApplyInfoApiEntity);
List<OrgApplyInfoApiEntity> queryAuditInfo(String openId, String id, String status);
int updateById(OrgAllInfoApiEntity orgApplyInfoApiEntity);
List<OrgAllInfoApiEntity> queryOrgHomePageList(String openId);
List<OrgAllInfoApiEntity> queryOrgHis(String openId, String optType);
IPage<OrgAllInfoApiEntity> queryOrgAllInfo(Integer pageNo, Integer pageSize, String orgCode, String title);
List<OrgAllInfoApiEntity> getOrgByOpenId(String id, String status, String openId, String invited, String izHistory);
boolean validateChanged(OrgApplyInfoApiEntity orgApplyInfoApiEntity);
boolean validateApplyChanged(OrgAllInfoApiEntity orgApplyInfoApiEntity);
boolean validateUpInfoChanged(OrgAllInfoApiEntity orgApplyInfoApiEntity);
boolean validateComNamerepet(OrgAllInfoApiEntity orgApplyInfoApiEntity);
OrgAllInfoApiEntity queryOrgInfoById(String id);
}

View File

@ -1,9 +1,15 @@
package com.nu.modules.orgapplyinfo.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
/**
@ -110,138 +116,6 @@ public class OrgAllInfoApiEntity implements Serializable {
*/
private String picUrl;
/**
* 微信id
*/
private String openId;
/**
* 微信名称
*/
private String wechatName;
/**
* 联系电话
*/
private String tel;
/**
* 咨询人姓名
*/
private String name;
/**
* 性别
*/
private String sex;
/**
* 民族
*/
private String national;
/**
* 出生日期
*/
private Date birthDate;
/**
* 住址身份证上
*/
private String idCardAddress;
/**
* 身份证号
*/
private String idCard;
/**
* 签发机关
*/
private String issuingAuthority;
/**
* 有效开始日期
*/
private Date startTime;
/**
* 有效结束日期
*/
private Date endTime;
/**
* 身份证正面
*/
private String cardZmPath;
/**
* 身份证反面
*/
private String cardFmPath;
/**
* 营业执照照片
*/
private String comBusinessLicense;
/**
* 企业名称
*/
private String comName;
/**
* 企业注册地址
*/
private String comRegisterAddress;
/**
* 企业信用代码
*/
private String comCreditCode;
/**
* 企业法人
*/
private String comLegalPerson;
/**
* 机构地址
*/
private String orgAddress;
/**
* 机构位置坐标经度
*/
private String orgCoordinateLo;
/**
* 机构位置坐标维度
*/
private String orgCoordinateLa;
/**
* 机构负责人
*/
private String orgLeader;
/**
* 机构负责人电话
*/
private String orgLeaderPhone;
/**
* 机构楼宇牌号
*/
private String orgBuildingNumber;
/**
* 机构房屋性质
*/
private String orgPropertyType;
/**
* 机构建筑面积
*/
private Double orgBuildingArea;
/**
* 机构省份 sys_category.id
*/
private String orgProvince;
/**
* 机构城市 sys_category.id
*/
private String orgCity;
/**
* 机构区域 sys_category.id
*/
private String orgDistrict;
/**
* 合同附件
*/
private String contract;
/**
* 合同备注
*/
private String contractNote;
/**
* 加盟时间
*/
private Date franchiseTime;
/**
@ -272,10 +146,6 @@ public class OrgAllInfoApiEntity implements Serializable {
* 申请日期
*/
private String applyTime;
/**
* 审核日期
*/
private String auditTime;
/**
* 员工id
*/
@ -305,12 +175,186 @@ public class OrgAllInfoApiEntity implements Serializable {
* 护理单元名称
*/
private String nuName;
/**
* 信息修改状态 没提交过修改 1修改申请中 2通过 3驳回
*/
private String modifyState;
//0历史数据 1当前数据
private String izHistory;
/**id*/
private String id;
/**pkId 同表id*/
private String pkId;
/**微信id*/
private String openId;
/**微信名称*/
private String wechatName;
/**联系电话*/
private String tel;
/**状态 1审核中 2审核完成 3驳回 */
@Dict(dicCode = "org_apply_status")
private String status;
/**变更状态 2变更完成 4变更申请中 5变更驳回 */
private java.lang.String modifyStatus;
/**审核备注*/
private String content;
/**创建人*/
private String createBy;
/**创建日期*/
private Date createTime;
/**更新人*/
private String updateBy;
/**更新日期*/
private Date updateTime;
/**机构是否入驻0否 1是(是否入驻过)*/
private String izEntry;
/**咨询人姓名*/
private String name;
/**性别*/
private String sex;
/**民族*/
private String national;
/**出生日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy年MM月dd日")
@DateTimeFormat(pattern="yyyy年MM月dd日")
private Date birthDate;
/**住址(身份证上)*/
private String idCardAddress;
/**身份证号*/
private String idCard;
/**签发机关*/
private String issuingAuthority;
/**有效开始日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy.MM.dd")
@DateTimeFormat(pattern = "yyyy.MM.dd")
private Date startTime;
/**有效结束日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy.MM.dd")
@DateTimeFormat(pattern = "yyyy.MM.dd")
private Date endTime;
/**身份证正面*/
private String cardZmPath;
/**身份证反面*/
private String cardFmPath;
/**营业执照照片*/
private String comBusinessLicense;
/**企业名称*/
private String comName;
/**企业注册地址*/
private String comRegisterAddress;
/**企业信用代码*/
private String comCreditCode;
/**企业法人*/
private String comLegalPerson;
/**机构地址*/
private String orgAddress;
/**机构位置坐标:经度*/
private String orgCoordinateLo;
/**机构位置坐标:纬度*/
private String orgCoordinateLa;
/**机构负责人*/
private String orgLeader;
/**机构负责人电话*/
private String orgLeaderPhone;
/**机构楼宇牌号*/
private String orgBuildingNumber;
/**机构房屋性质*/
private String orgPropertyType;
/**机构建筑面积*/
private Double orgBuildingArea;
/**机构省份 sys_category.id*/
@Dict(dictTable = "sys_category",dicCode = "id",dicText = "name")
private java.lang.String orgProvince;
private java.lang.String orgProvince_dictText;
/**机构城市 sys_category.id*/
@Dict(dictTable = "sys_category",dicCode = "id",dicText = "name")
private java.lang.String orgCity;
private java.lang.String orgCity_dictText;
/**机构区域 sys_category.id*/
@Dict(dictTable = "sys_category",dicCode = "id",dicText = "name")
private java.lang.String orgDistrict;
private java.lang.String orgDistrict_dictText;
private java.util.Date commitTime;//提交时间
private java.util.Date auditTime;//审核时间
/**审核人*/
@Dict(dicCode = "username" , dicText = "realname" ,dictTable = "sys_user")
@ApiModelProperty(value = "审核人")
private String auditBy;
/**操作类型 rz 入驻 bg变更*/
@Excel(name = "操作类型 rz 入驻 bg变更", width = 15)
@ApiModelProperty(value = "操作类型 rz 入驻 bg变更")
private java.lang.String optType;
/**操作类型中文名称*/
@Excel(name = "操作类型", width = 15)
@ApiModelProperty(value = "操作类型")
private java.lang.String optTypeName;
/**
* 加盟时间
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "加盟时间")
private java.util.Date franchiseTime;
/**
* 机构状态构建状态1机构加盟小程序2加盟审核管理平台3加盟合同管理平台4平台搭建运维平台5账户初始化管理平台6信息推送公众号
*/
@Dict(dicCode = "org_build_status")
@Excel(name = "机构状态构建状态1、机构加盟【小程序】2、加盟审核【管理平台】3、加盟合同【管理平台】4、平台搭建【运维平台】5、账户初始化【管理平台】6、信息推送【公众号】", width = 15)
@ApiModelProperty(value = "机构状态构建状态1、机构加盟【小程序】2、加盟审核【管理平台】3、加盟合同【管理平台】4、平台搭建【运维平台】5、账户初始化【管理平台】6、信息推送【公众号】")
private java.lang.String orgStatus;
/**
* 合同提交时间
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "合同提交时间")
private java.util.Date htCommitTime;
/**
* 合同提交人
*/
@Excel(name = "合同提交人", width = 15)
@ApiModelProperty(value = "合同提交人")
private java.lang.String htCommitBy;
/**
* 合同附件
*/
@Excel(name = "合同附件", width = 15)
@ApiModelProperty(value = "合同附件")
private java.lang.String contract;
/**
* 合同备注
*/
@Excel(name = "合同备注", width = 15)
@ApiModelProperty(value = "合同备注")
private java.lang.String contractNote;
/**
* 工单状态 0未提交 1待执行 2已回执
*/
@Dict(dicCode = "work_order_status")
private java.lang.String workOrderStatus;
/**
* 工单ID
*/
private java.lang.String workOrderId;
/**
* 回复内容
*/
private java.lang.String replyContent;
/**
* 回复附件
*/
private java.lang.String replyFile;
/**
* 回复时间
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private java.util.Date replyTime;
/**
* 回复人
*/
private java.lang.String handleBy;
}

View File

@ -1,124 +0,0 @@
package com.nu.modules.orgapplyinfo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
* @Description: 机构加盟申请信息表
* @Author: 张明远
* @Date: 2025-06-05
* @Version: V1.0
*/
@Data
public class OrgApplyInfoApiEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
private String id;
/**pkId 同表id*/
private String pkId;
/**微信id*/
private String openId;
/**微信名称*/
private String wechatName;
/**联系电话*/
private String tel;
/**状态 1审核中 2审核完成 3驳回 */
private String status;
/**变更状态 2变更完成 4变更申请中 5变更驳回 */
private java.lang.String modifyStatus;
/**审核备注*/
private String content;
/**创建人*/
private String createBy;
/**创建日期*/
private Date createTime;
/**更新人*/
private String updateBy;
/**更新日期*/
private Date updateTime;
/**机构是否入驻0否 1是(是否入驻过)*/
private String izEntry;
/**咨询人姓名*/
private String name;
/**性别*/
private String sex;
/**民族*/
private String national;
/**出生日期*/
@JsonFormat(pattern = "yyyy年MM月dd日")
@DateTimeFormat(pattern = "yyyy年MM月dd日")
private LocalDate birthDate;
/**住址(身份证上)*/
private String idCardAddress;
/**身份证号*/
private String idCard;
/**签发机关*/
private String issuingAuthority;
/**有效开始日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy.MM.dd")
@DateTimeFormat(pattern = "yyyy.MM.dd")
private Date startTime;
/**有效结束日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy.MM.dd")
@DateTimeFormat(pattern = "yyyy.MM.dd")
private Date endTime;
/**身份证正面*/
private String cardZmPath;
/**身份证反面*/
private String cardFmPath;
/**营业执照照片*/
private String comBusinessLicense;
/**企业名称*/
private String comName;
/**企业注册地址*/
private String comRegisterAddress;
/**企业信用代码*/
private String comCreditCode;
/**企业法人*/
private String comLegalPerson;
/**机构地址*/
private String orgAddress;
/**机构位置坐标:经度*/
private String orgCoordinateLo;
/**机构位置坐标:纬度*/
private String orgCoordinateLa;
/**机构负责人*/
private String orgLeader;
/**机构负责人电话*/
private String orgLeaderPhone;
/**机构楼宇牌号*/
private String orgBuildingNumber;
/**机构房屋性质*/
private String orgPropertyType;
/**机构建筑面积*/
private Double orgBuildingArea;
/**机构省份 sys_category.id*/
private java.lang.String orgProvince;
private java.lang.String orgProvince_dictText;
/**机构城市 sys_category.id*/
private java.lang.String orgCity;
private java.lang.String orgCity_dictText;
/**机构区域 sys_category.id*/
private java.lang.String orgDistrict;
private java.lang.String orgDistrict_dictText;
private java.util.Date commitTime;//提交时间
private java.util.Date auditTime;//审核时间
private java.util.Date franchiseTime;//加盟时间
}

View File

@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.nu.modules.orgapplyinfo.entity.OrgAllInfo;
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
import org.apache.commons.lang.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
@ -31,6 +32,7 @@ import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@ -68,10 +70,21 @@ public class OrgApplyInfoController extends JeecgController<OrgApplyInfo, IOrgAp
//@AutoLog(value = "机构加盟申请信息表-分页列表查询")
@ApiOperation(value = "机构加盟申请信息表-分页列表查询", notes = "机构加盟申请信息表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<OrgApplyInfo>> queryPageList(OrgApplyInfo orgApplyInfo,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
public Result<IPage<OrgAllInfoApiEntity>> queryPageList(OrgApplyInfo orgApplyInfo,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
Page<OrgApplyInfo> page = new Page<OrgApplyInfo>(pageNo, pageSize);
IPage<OrgAllInfoApiEntity> pageList = orgApplyInfoService.pageList(orgApplyInfo, page);
return Result.OK(pageList);
}
@ApiOperation(value = "机构加盟申请审核-审核历史", notes = "机构加盟申请审核-审核历史")
@GetMapping(value = "/hisList")
public Result<IPage<OrgApplyInfo>> hisList(OrgApplyInfo orgApplyInfo,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
// 自定义查询规则
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
// 自定义多选的查询规则为LIKE_WITH_OR
@ -87,7 +100,6 @@ public class OrgApplyInfoController extends JeecgController<OrgApplyInfo, IOrgAp
return Result.OK(pageList);
}
/**
* 添加
*
@ -104,27 +116,43 @@ public class OrgApplyInfoController extends JeecgController<OrgApplyInfo, IOrgAp
}
/**
* 编辑审批
* 加盟审批
*
* @param orgApplyInfo
* @param dto
* @return
*/
@AutoLog(value = "机构加盟申请信息表-编辑")
@ApiOperation(value = "机构加盟申请信息表-编辑", notes = "机构加盟申请信息表-编辑")
@RequiresPermissions("orgapplyinfo:nu_org_apply_info:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody OrgApplyInfo orgApplyInfo) {
orgApplyInfoService.audit(orgApplyInfo);
@AutoLog(value = "机构加盟申请-加盟审批")
@ApiOperation(value = "机构加盟申请-加盟审批", notes = "机构加盟申请-加盟审批")
@RequestMapping(value = "/applyAudit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> applyAudit(@RequestBody OrgAllInfoApiEntity dto) {
OrgApplyInfo orgApplyInfo = new OrgApplyInfo();
BeanUtils.copyProperties(dto,orgApplyInfo);
orgApplyInfoService.applyAudit(orgApplyInfo);
return Result.OK("审核完成!");
}
/**
* 信息变更审批
*
* @param dto
* @return
*/
@AutoLog(value = "机构加盟申请-信息变更审批")
@ApiOperation(value = "机构加盟申请-信息变更审批", notes = "机构加盟申请-信息变更审批")
@RequestMapping(value = "/upInfoAudit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> upInfoAudit(@RequestBody OrgAllInfoApiEntity dto) {
OrgApplyInfo orgApplyInfo = new OrgApplyInfo();
BeanUtils.copyProperties(dto,orgApplyInfo);
orgApplyInfoService.upInfoAudit(orgApplyInfo);
return Result.OK("审核完成!");
}
@AutoLog(value = "上传合同-保存为草稿")
@ApiOperation(value = "上传合同-保存为草稿", notes = "上传合同-保存为草稿")
@RequiresPermissions("orgapplyinfo:nu_org_apply_info:edit")
@RequestMapping(value = "/editCg", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> editCg(@RequestBody OrgApplyInfo orgApplyInfo) {
orgApplyInfoService.audit(orgApplyInfo);
public Result<String> editCg(@RequestBody OrgAllInfoApiEntity orgApplyInfo) {
orgApplyInfoService.saveCg(orgApplyInfo);
return Result.OK("操作完成!");
}
@ -138,7 +166,7 @@ public class OrgApplyInfoController extends JeecgController<OrgApplyInfo, IOrgAp
@ApiOperation(value = "机构加盟申请信息表-合同上传环节-保存并提交", notes = "机构加盟申请信息表-合同上传环节-保存并提交")
@RequiresPermissions("orgapplyinfo:nu_org_apply_info:edit")
@RequestMapping(value = "/submitContract", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> submitContract(@RequestBody OrgApplyInfo orgApplyInfo) {
public Result<String> submitContract(@RequestBody OrgAllInfoApiEntity orgApplyInfo) {
orgApplyInfoService.submitContract(orgApplyInfo);
return Result.OK("提交成功!");
}

View File

@ -1,7 +1,9 @@
package com.nu.modules.orgapplyinfo.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
@ -121,6 +123,8 @@ public class OrgAllInfo implements Serializable {
/**民族*/
private String national;
/**出生日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy年MM月dd日")
@DateTimeFormat(pattern="yyyy年MM月dd日")
private Date birthDate;
/**住址(身份证上)*/
private String idCardAddress;

View File

@ -16,6 +16,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
* @Description: 机构加盟申请信息表
@ -24,7 +25,7 @@ import java.time.LocalDate;
* @Version: V1.0
*/
@Data
@TableName("nu_org_apply_info")
@TableName("nu_org_apply_info_new")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="nu_org_apply_info对象", description="机构加盟申请信息表")
@ -50,29 +51,6 @@ public class OrgApplyInfo implements Serializable {
@Excel(name = "联系电话", width = 15)
@ApiModelProperty(value = "联系电话")
private java.lang.String tel;
/**状态 1审核中 2审核完成 3驳回 */
@Dict(dicCode = "org_apply_status")
@Excel(name = "审批状态", width = 15)
@ApiModelProperty(value = "审批状态")
private java.lang.String status;
/**变更状态 0可修改 1不可修改 */
@Excel(name = "变更状态 0可修改 1不可修改", width = 15)
@ApiModelProperty(value = "变更状态 0可修改 1不可修改")
private java.lang.String modifyStatus;
/**构建状态构建状态1、机构加盟【小程序】2、加盟审核【管理平台】3、加盟合同【管理平台】4、平台搭建【运维平台】5、账户初始化【管理平台】6、信息推送【公众号】*/
@Dict(dicCode = "org_build_status")
@Excel(name = "构建状态构建状态1、机构加盟【小程序】2、加盟审核【管理平台】3、加盟合同【管理平台】4、平台搭建【运维平台】5、账户初始化【管理平台】6、信息推送【公众号】", width = 15)
@ApiModelProperty(value = "构建状态构建状态1、机构加盟【小程序】2、加盟审核【管理平台】3、加盟合同【管理平台】4、平台搭建【运维平台】5、账户初始化【管理平台】6、信息推送【公众号】")
private java.lang.String buildStatus;
//构建状态前后台处理逻辑字段
@TableField(exist = false)
private String buildStatusVal;
/**审核备注*/
@Excel(name = "审核备注", width = 15)
@ApiModelProperty(value = "审核备注")
private java.lang.String content;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
@ -89,10 +67,6 @@ public class OrgApplyInfo implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**机构是否入驻0否 1是(是否入驻过)*/
@Excel(name = "机构是否入驻0否 1是(是否入驻过)", width = 15)
@ApiModelProperty(value = "机构是否入驻0否 1是(是否入驻过)")
private java.lang.String izEntry;
/**咨询人姓名*/
@Excel(name = "咨询人姓名", width = 15)
@ApiModelProperty(value = "咨询人姓名")
@ -106,11 +80,11 @@ public class OrgApplyInfo implements Serializable {
@ApiModelProperty(value = "民族")
private java.lang.String national;
/**出生日期*/
@Excel(name = "出生日期", width = 20, format = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Excel(name = "出生日期", width = 20, format = "yyyy年MM月dd日")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy年MM月dd日")
@DateTimeFormat(pattern="yyyy年MM月dd日")
@ApiModelProperty(value = "出生日期")
private LocalDate birthDate;
private java.util.Date birthDate;
/**住址(身份证上)*/
@Excel(name = "住址(身份证上)", width = 15)
@ApiModelProperty(value = "住址(身份证上)")
@ -210,14 +184,38 @@ public class OrgApplyInfo implements Serializable {
@ApiModelProperty(value = "机构区域")
@Dict(dictTable = "sys_category",dicCode = "id",dicText = "name")
private java.lang.String orgDistrict;
/**合同附件*/
@Excel(name = "合同附件", width = 15)
@ApiModelProperty(value = "合同附件")
private java.lang.String contract;
/**合同备注*/
@Excel(name = "合同备注", width = 15)
@ApiModelProperty(value = "合同备注")
private java.lang.String contractNote;
/**状态 1审核中 2审核完成 3驳回 */
@Dict(dicCode = "org_apply_status")
@Excel(name = "审批状态", width = 15)
@ApiModelProperty(value = "审批状态")
private java.lang.String status;
/**审核备注*/
@Excel(name = "审核备注", width = 15)
@ApiModelProperty(value = "审核备注")
private java.lang.String content;
/**审核时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "审核时间")
private java.util.Date auditTime;
/**审核人*/
@Dict(dicCode = "username" , dicText = "realname" ,dictTable = "sys_user")
@ApiModelProperty(value = "审核人")
private String auditBy;
/**是否历史数据*/
@Excel(name = "是否历史数据", width = 15)
@ApiModelProperty(value = "是否历史数据")
private java.lang.String izHistory;
/**操作类型 rz 入驻 bg变更*/
@Excel(name = "操作类型 rz 入驻 bg变更", width = 15)
@ApiModelProperty(value = "操作类型 rz 入驻 bg变更")
private java.lang.String optType;
/**操作类型中文名称*/
@Excel(name = "操作类型", width = 15)
@ApiModelProperty(value = "操作类型")
private java.lang.String optTypeName;
@TableField(exist = false)
private java.lang.String orgProvince_dictText;
@TableField(exist = false)
@ -225,38 +223,16 @@ public class OrgApplyInfo implements Serializable {
@TableField(exist = false)
private java.lang.String orgDistrict_dictText;
/**提交时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "提交时间")
private java.util.Date commitTime;
/**审核时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "审核时间")
private java.util.Date auditTime;
@Dict(dicCode = "username" , dicText = "realname" ,dictTable = "sys_user")
private String auditBy;
/**加盟时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "加盟时间")
private java.util.Date franchiseTime;
private java.lang.String replyContent;
private java.lang.String replyFile;
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private java.util.Date replyTime;
private java.lang.String handleBy;
@Dict(dicCode = "work_order_status")
private java.lang.String workOrderStatus;
private java.lang.String workOrderId;
@TableField(exist = false)
private String title;
/**创建日期起始*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@TableField(exist = false)
private java.util.Date createTimeStart;
/**创建日期截止*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@TableField(exist = false)
private java.util.Date createTimeEnd;
}

View File

@ -3,7 +3,9 @@ package com.nu.modules.orgapplyinfo.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nu.modules.orgapplyinfo.entity.OrgAllInfo;
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
import org.apache.ibatis.annotations.Param;
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -21,4 +23,12 @@ public interface OrgApplyInfoMapper extends BaseMapper<OrgApplyInfo> {
IPage<OrgAllInfo> queryOrgInfo(@Param("page") IPage<OrgAllInfo> page, @Param("orgCode") String orgCode, @Param("title") String title);
IPage<OrgAllInfo> getOrgByOpenId(IPage<OrgAllInfo> page, @Param("id") String id, @Param("openId") String openId, @Param("status") String status, @Param("invited") String invited, @Param("izHistory") String izHistory);
int validateSysDepartComNamerepet(@Param("dto") OrgAllInfoApiEntity orgApplyInfoApiEntity);
int validateApplyOrgComNamerepet(@Param("dto") OrgAllInfoApiEntity orgApplyInfoApiEntity);
IPage<OrgAllInfoApiEntity> pageList(@Param("dto") OrgApplyInfo orgApplyInfo, @Param("page") Page<OrgApplyInfo> page);
List<OrgAllInfoApiEntity> orgList(@Param("dto") OrgApplyInfo orgApplyInfo);
}

View File

@ -126,6 +126,255 @@
</where>
order by eo.create_time DESC
</select>
<select id="validateSysDepartComNamerepet" resultType="java.lang.Integer">
select count(id)
from sys_depart
<where>
com_name = #{dto.comName}
<if test='dto.status!=null and dto.status != "" and dto.status.equals("4")'>
and id != #{dto.pkId}
</if>
</where>
</select>
<select id="validateApplyOrgComNamerepet" resultType="java.lang.Integer">
select count(id) from nu_org_apply_info_new
<where>
com_name = #{dto.comName}
and iz_history = 'N'
and status = '1'
</where>
</select>
<select id="pageList" resultType="com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity">
SELECT
info.id,
info.pk_id,
info.open_id,
info.wechat_name,
CASE WHEN sd.id IS NOT NULL THEN sd.tel ELSE info.tel END AS tel,
info.create_by,
info.create_time,
info.update_by,
info.update_time,
CASE WHEN sd.id IS NOT NULL THEN sd.name ELSE info.name END AS name,
CASE WHEN sd.id IS NOT NULL THEN sd.sex ELSE info.sex END AS sex,
CASE WHEN sd.id IS NOT NULL THEN sd.national ELSE info.national END AS national,
CASE WHEN sd.id IS NOT NULL THEN sd.birth_date ELSE info.birth_date END AS birth_date,
CASE WHEN sd.id IS NOT NULL THEN sd.id_card_address ELSE info.id_card_address END AS id_card_address,
CASE WHEN sd.id IS NOT NULL THEN sd.id_card ELSE info.id_card END AS id_card,
CASE WHEN sd.id IS NOT NULL THEN sd.issuing_authority ELSE info.issuing_authority END AS issuing_authority,
CASE WHEN sd.id IS NOT NULL THEN sd.start_time ELSE info.start_time END AS start_time,
CASE WHEN sd.id IS NOT NULL THEN sd.end_time ELSE info.end_time END AS end_time,
CASE WHEN sd.id IS NOT NULL THEN sd.card_zm_path ELSE info.card_zm_path END AS card_zm_path,
CASE WHEN sd.id IS NOT NULL THEN sd.card_fm_path ELSE info.card_fm_path END AS card_fm_path,
CASE WHEN sd.id IS NOT NULL THEN sd.com_business_license ELSE info.com_business_license END AS com_business_license,
CASE WHEN sd.id IS NOT NULL THEN sd.com_name ELSE info.com_name END AS com_name,
CASE WHEN sd.id IS NOT NULL THEN sd.com_register_address ELSE info.com_register_address END AS com_register_address,
CASE WHEN sd.id IS NOT NULL THEN sd.com_credit_code ELSE info.com_credit_code END AS com_credit_code,
CASE WHEN sd.id IS NOT NULL THEN sd.com_legal_person ELSE info.com_legal_person END AS com_legal_person,
CASE WHEN sd.id IS NOT NULL THEN sd.org_address ELSE info.org_address END AS org_address,
CASE WHEN sd.id IS NOT NULL THEN sd.org_coordinate_lo ELSE info.org_coordinate_lo END AS org_coordinate_lo,
CASE WHEN sd.id IS NOT NULL THEN sd.org_coordinate_la ELSE info.org_coordinate_la END AS org_coordinate_la,
CASE WHEN sd.id IS NOT NULL THEN sd.org_leader ELSE info.org_leader END AS org_leader,
CASE WHEN sd.id IS NOT NULL THEN sd.org_leader_phone ELSE info.org_leader_phone END AS org_leader_phone,
CASE WHEN sd.id IS NOT NULL THEN sd.org_building_number ELSE info.org_building_number END AS org_building_number,
CASE WHEN sd.id IS NOT NULL THEN sd.org_property_type ELSE info.org_property_type END AS org_property_type,
CASE WHEN sd.id IS NOT NULL THEN sd.org_building_area ELSE info.org_building_area END AS org_building_area,
CASE WHEN sd.id IS NOT NULL THEN sd.org_province ELSE info.org_province END AS org_province,
CASE WHEN sd.id IS NOT NULL THEN sd.org_city ELSE info.org_city END AS org_city,
CASE WHEN sd.id IS NOT NULL THEN sd.org_district ELSE info.org_district END AS org_district,
info.iz_history,
info.status,
info.opt_type,
info.opt_type_name,
info.audit_time,
info.content,
info.audit_by,
sd.parent_id,
sd.depart_name,
sd.depart_name_en,
sd.depart_name_abbr,
sd.depart_order,
sd.description,
sd.org_category,
sd.org_type,
sd.org_code,
sd.plat_type,
sd.operation_start_time,
sd.operation_end_time,
sd.contract_start_time,
sd.contract_end_time,
sd.fax,
sd.memo,
sd.del_flag,
sd.qywx_identifier,
sd.ding_identifier,
sd.tenant_id,
sd.iz_leaf,
sd.server_url,
sd.pic_url,
sd.url,
sd.payable_amount,
sd.context_path,
sd.iz_directive_main,
sd.media_url,
sd.iz_elder_tag_main,
sd.share_url,
sd.franchise_time,
sd.org_status,
sd.ht_commit_time,
sd.ht_commit_by,
sd.contract,
sd.contract_note,
sd.reply_content,
sd.reply_file,
sd.reply_time,
sd.handle_by,
sd.work_order_status,
sd.work_order_id,
sd.province,
sd.city,
sd.district,
sd.address
FROM nu_org_apply_info_new AS info
left join sys_depart sd on info.pk_id = sd.id
<where>
info.iz_history = 'N'
<if test="dto.title != null and dto.title != ''">
AND (
info.com_name LIKE CONCAT('%', #{dto.title}, '%')
OR info.org_leader LIKE CONCAT('%', #{dto.title}, '%')
OR info.org_leader_phone LIKE CONCAT('%', #{dto.title}, '%')
)
</if>
<if test="dto.createTimeStart != null">
AND info.create_time >= #{dto.createTimeStart}
</if>
<if test="dto.createTimeEnd != null">
AND info.create_time &lt;= #{dto.createTimeEnd}
</if>
<if test="dto.status != null and dto.status != ''">
AND info.status = #{dto.status}
</if>
</where>
</select>
<select id="orgList" resultType="com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity">
SELECT
info.id,
info.pk_id,
info.open_id,
info.wechat_name,
CASE WHEN sd.id IS NOT NULL THEN sd.tel ELSE info.tel END AS tel,
info.create_by,
info.create_time,
info.update_by,
info.update_time,
CASE WHEN sd.id IS NOT NULL THEN sd.name ELSE info.name END AS name,
CASE WHEN sd.id IS NOT NULL THEN sd.sex ELSE info.sex END AS sex,
CASE WHEN sd.id IS NOT NULL THEN sd.national ELSE info.national END AS national,
CASE WHEN sd.id IS NOT NULL THEN sd.birth_date ELSE info.birth_date END AS birth_date,
CASE WHEN sd.id IS NOT NULL THEN sd.id_card_address ELSE info.id_card_address END AS id_card_address,
CASE WHEN sd.id IS NOT NULL THEN sd.id_card ELSE info.id_card END AS id_card,
CASE WHEN sd.id IS NOT NULL THEN sd.issuing_authority ELSE info.issuing_authority END AS issuing_authority,
CASE WHEN sd.id IS NOT NULL THEN sd.start_time ELSE info.start_time END AS start_time,
CASE WHEN sd.id IS NOT NULL THEN sd.end_time ELSE info.end_time END AS end_time,
CASE WHEN sd.id IS NOT NULL THEN sd.card_zm_path ELSE info.card_zm_path END AS card_zm_path,
CASE WHEN sd.id IS NOT NULL THEN sd.card_fm_path ELSE info.card_fm_path END AS card_fm_path,
CASE WHEN sd.id IS NOT NULL THEN sd.com_business_license ELSE info.com_business_license END AS com_business_license,
CASE WHEN sd.id IS NOT NULL THEN sd.com_name ELSE info.com_name END AS com_name,
CASE WHEN sd.id IS NOT NULL THEN sd.com_register_address ELSE info.com_register_address END AS com_register_address,
CASE WHEN sd.id IS NOT NULL THEN sd.com_credit_code ELSE info.com_credit_code END AS com_credit_code,
CASE WHEN sd.id IS NOT NULL THEN sd.com_legal_person ELSE info.com_legal_person END AS com_legal_person,
CASE WHEN sd.id IS NOT NULL THEN sd.org_address ELSE info.org_address END AS org_address,
CASE WHEN sd.id IS NOT NULL THEN sd.org_coordinate_lo ELSE info.org_coordinate_lo END AS org_coordinate_lo,
CASE WHEN sd.id IS NOT NULL THEN sd.org_coordinate_la ELSE info.org_coordinate_la END AS org_coordinate_la,
CASE WHEN sd.id IS NOT NULL THEN sd.org_leader ELSE info.org_leader END AS org_leader,
CASE WHEN sd.id IS NOT NULL THEN sd.org_leader_phone ELSE info.org_leader_phone END AS org_leader_phone,
CASE WHEN sd.id IS NOT NULL THEN sd.org_building_number ELSE info.org_building_number END AS org_building_number,
CASE WHEN sd.id IS NOT NULL THEN sd.org_property_type ELSE info.org_property_type END AS org_property_type,
CASE WHEN sd.id IS NOT NULL THEN sd.org_building_area ELSE info.org_building_area END AS org_building_area,
CASE WHEN sd.id IS NOT NULL THEN sd.org_province ELSE info.org_province END AS org_province,
CASE WHEN sd.id IS NOT NULL THEN sd.org_city ELSE info.org_city END AS org_city,
CASE WHEN sd.id IS NOT NULL THEN sd.org_district ELSE info.org_district END AS org_district,
info.iz_history,
info.status,
info.opt_type,
info.opt_type_name,
info.audit_time,
info.content,
info.audit_by,
sd.parent_id,
sd.depart_name,
sd.depart_name_en,
sd.depart_name_abbr,
sd.depart_order,
sd.description,
sd.org_category,
sd.org_type,
sd.org_code,
sd.plat_type,
sd.operation_start_time,
sd.operation_end_time,
sd.contract_start_time,
sd.contract_end_time,
sd.fax,
sd.memo,
sd.del_flag,
sd.qywx_identifier,
sd.ding_identifier,
sd.tenant_id,
sd.iz_leaf,
sd.server_url,
sd.pic_url,
sd.url,
sd.payable_amount,
sd.context_path,
sd.iz_directive_main,
sd.media_url,
sd.iz_elder_tag_main,
sd.share_url,
sd.franchise_time,
sd.org_status,
sd.ht_commit_time,
sd.ht_commit_by,
sd.contract,
sd.contract_note,
sd.reply_content,
sd.reply_file,
sd.reply_time,
sd.handle_by,
sd.work_order_status,
sd.work_order_id,
sd.province,
sd.city,
sd.district,
sd.address
FROM nu_org_apply_info_new AS info
left join sys_depart sd on info.pk_id = sd.id
<where>
info.iz_history = 'N'
<if test="dto.title != null and dto.title != ''">
AND (
info.com_name LIKE CONCAT('%', #{dto.title}, '%')
OR info.org_leader LIKE CONCAT('%', #{dto.title}, '%')
OR info.org_leader_phone LIKE CONCAT('%', #{dto.title}, '%')
)
</if>
<if test="dto.createTimeStart != null">
AND info.create_time >= #{dto.createTimeStart}
</if>
<if test="dto.createTimeEnd != null">
AND info.create_time &lt;= #{dto.createTimeEnd}
</if>
<if test="dto.status != null and dto.status != ''">
AND info.status = #{dto.status}
</if>
<if test="dto.id != null and dto.id != ''">
AND sd.id = #{dto.id}
</if>
</where>
</select>
<!-- <choose>-->
<!-- <when test='status != null and status == "2"'>-->

View File

@ -1,7 +1,9 @@
package com.nu.modules.orgapplyinfo.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nu.modules.orgapplyinfo.entity.OrgAllInfo;
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfo;
import com.baomidou.mybatisplus.extension.service.IService;
@ -18,11 +20,17 @@ public interface IOrgApplyInfoService extends IService<OrgApplyInfo> {
List<Map<String, Object>> getModifyInfo(OrgApplyInfo orgApplyInfo);
void audit(OrgApplyInfo orgApplyInfo);
void applyAudit(OrgApplyInfo orgApplyInfo);
void submitContract(OrgApplyInfo orgApplyInfo);
void saveCg(OrgAllInfoApiEntity orgApplyInfo);
void submitContract(OrgAllInfoApiEntity orgApplyInfo);
IPage<OrgAllInfo> queryOrgInfo(IPage<OrgAllInfo> page, String orgCode, String title);
IPage<OrgAllInfo> getOrgByOpenId(IPage<OrgAllInfo> page, String openId);
IPage<OrgAllInfo> getOrgByOpenId(IPage<OrgAllInfo> page, String openId);
void upInfoAudit(OrgApplyInfo orgApplyInfo);
IPage<OrgAllInfoApiEntity> pageList(OrgApplyInfo orgApplyInfo, Page<OrgApplyInfo> page);
}

View File

@ -1,6 +1,7 @@
package com.nu.modules.orgapplyinfo.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.IdUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@ -17,19 +18,24 @@ import com.nu.modules.orgapplyinfo.api.IOrgApplyInfoApi;
import com.nu.modules.orgapplyinfo.entity.OrgAllInfo;
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfo;
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfoApiEntity;
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
import com.nu.modules.orgapplyinfo.mapper.OrgApplyInfoMapper;
import com.nu.modules.orgapplyinfo.service.IOrgApplyInfoService;
import com.nu.modules.wxnotice.IWxNoticeApi;
import com.nu.utils.DictUtils;
import com.nu.utils.RabbitMQUtil;
import org.apache.commons.compress.utils.Lists;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.system.api.ISysBaseAPI;
import org.jeecg.common.system.entity.SysDepartEntity;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.system.vo.SysDepartModel;
import org.jeecg.modules.base.service.BaseCommonService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.lang.reflect.Field;
import java.text.SimpleDateFormat;
@ -48,91 +54,207 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
private DictUtils dictUtils;
@Autowired
private RabbitMQUtil rabbitMQUtil;
@Autowired
private BaseCommonService baseCommonService;
@Autowired
private IWxNoticeApi wxNoticeApi;
@Autowired
private IEmployeesAdvisioryInfoApi employeesAdvisioryInfoApi;
@Autowired
private ISysBaseAPI sysBaseAPI;
@Override
public OrgApplyInfoApiEntity insert(OrgApplyInfoApiEntity orgApplyInfoApiEntity) {
public OrgAllInfoApiEntity insertApply(OrgAllInfoApiEntity orgApplyInfoApiEntity) {
//非第一次入驻申请 先将相同PKID都变更为历史
if (StringUtils.isNotBlank(orgApplyInfoApiEntity.getPkId())) {
OrgApplyInfo upData = new OrgApplyInfo();
upData.setIzHistory("Y");
UpdateWrapper<OrgApplyInfo> uw = new UpdateWrapper<>();
uw.eq("pk_id", orgApplyInfoApiEntity.getPkId());
baseMapper.update(upData, uw);
}
//插入新数据
String id = IdUtil.simpleUUID();
OrgApplyInfo orgApplyInfo = new OrgApplyInfo();
BeanUtils.copyProperties(orgApplyInfoApiEntity, orgApplyInfo);
orgApplyInfo.setCreateTime(new Date());
orgApplyInfo.setCommitTime(new Date());
orgApplyInfo.setAuditTime(null);
orgApplyInfo.setContent(null);
orgApplyInfo.setId(id);
//第一次入驻申请时用id作为pkid 否则入驻申请前端都会把旧的pkid传进来
if (StringUtils.isBlank(orgApplyInfo.getPkId())) {
orgApplyInfo.setPkId(id);
} else {
orgApplyInfo.setPkId(orgApplyInfoApiEntity.getPkId());
}
//机构信息
orgApplyInfo.setOpenId(orgApplyInfoApiEntity.getOpenId());//openid
orgApplyInfo.setTel(orgApplyInfoApiEntity.getTel());//联系电话
orgApplyInfo.setWechatName(orgApplyInfo.getWechatName());//微信名称空字段
orgApplyInfo.setName(orgApplyInfoApiEntity.getName());//咨询人姓名
orgApplyInfo.setSex(orgApplyInfoApiEntity.getSex());//性别
orgApplyInfo.setNational(orgApplyInfoApiEntity.getNational());//民族
orgApplyInfo.setBirthDate(orgApplyInfoApiEntity.getBirthDate());//出生日期
orgApplyInfo.setIdCardAddress(orgApplyInfoApiEntity.getIdCardAddress());//住址
orgApplyInfo.setIdCard(orgApplyInfoApiEntity.getIdCard());//身份证号
orgApplyInfo.setIssuingAuthority(orgApplyInfoApiEntity.getIssuingAuthority());//签发机关
orgApplyInfo.setStartTime(orgApplyInfoApiEntity.getStartTime());//身份证有效开始日期
orgApplyInfo.setEndTime(orgApplyInfoApiEntity.getEndTime());//身份证有效结束日期
orgApplyInfo.setCardZmPath(orgApplyInfoApiEntity.getCardZmPath());//身份证照片人像面
orgApplyInfo.setCardFmPath(orgApplyInfoApiEntity.getCardFmPath());//身份证照片国徽面
orgApplyInfo.setComBusinessLicense(orgApplyInfoApiEntity.getComBusinessLicense());//营业执照照片
orgApplyInfo.setComName(orgApplyInfoApiEntity.getComName());//企业名称
orgApplyInfo.setComRegisterAddress(orgApplyInfoApiEntity.getComRegisterAddress());//企业注册地址
orgApplyInfo.setComCreditCode(orgApplyInfoApiEntity.getComCreditCode());//企业信用代码
orgApplyInfo.setComLegalPerson(orgApplyInfoApiEntity.getComLegalPerson());//企业法人
orgApplyInfo.setOrgAddress(orgApplyInfoApiEntity.getOrgAddress());//机构地址
orgApplyInfo.setOrgCoordinateLo(orgApplyInfoApiEntity.getOrgCoordinateLo());//机构位置坐标经度
orgApplyInfo.setOrgCoordinateLa(orgApplyInfoApiEntity.getOrgCoordinateLa());//机构位置坐标维度
orgApplyInfo.setOrgLeader(orgApplyInfoApiEntity.getOrgLeader());//机构负责人
orgApplyInfo.setOrgLeaderPhone(orgApplyInfoApiEntity.getOrgLeaderPhone());//机构负责人电话
orgApplyInfo.setOrgBuildingNumber(orgApplyInfoApiEntity.getOrgBuildingNumber());//机构楼宇牌号
orgApplyInfo.setOrgPropertyType(orgApplyInfoApiEntity.getOrgPropertyType());//机构房屋性质
orgApplyInfo.setOrgBuildingArea(orgApplyInfoApiEntity.getOrgBuildingArea());//机构建筑面积
orgApplyInfo.setOrgProvince(orgApplyInfoApiEntity.getOrgProvince());//机构省份
orgApplyInfo.setOrgCity(orgApplyInfoApiEntity.getOrgCity());//机构城市
orgApplyInfo.setOrgDistrict(orgApplyInfoApiEntity.getOrgDistrict());//机构区域
//状态字段
orgApplyInfo.setIzHistory("N");//当前机构动态数据
orgApplyInfo.setStatus("1");//入驻申请
orgApplyInfo.setOptType("rz");
orgApplyInfo.setOptTypeName("入驻");
baseMapper.insert(orgApplyInfo);
orgApplyInfoApiEntity.setId(orgApplyInfo.getId());
if (StringUtils.isBlank(orgApplyInfo.getPkId())) {
orgApplyInfo.setPkId(orgApplyInfo.getId());
baseMapper.updateById(orgApplyInfo);
}
if ("4".equals(orgApplyInfo.getStatus())) {
//先将历史审核不通过的数据删除掉
baseMapper.realDelete(orgApplyInfo.getPkId());
//如果是提交机构变更 需要将对应pkid都改为 modify_status=1 不可提交修改信息
QueryWrapper<OrgApplyInfo> qw = new QueryWrapper<>();
qw.eq("pk_id", orgApplyInfo.getPkId());
// qw.eq("status", "2");
OrgApplyInfo updateData = new OrgApplyInfo();
updateData.setModifyStatus("1");
baseMapper.update(updateData, qw);
}
return orgApplyInfoApiEntity;
}
@Override
public int updateById(OrgApplyInfoApiEntity orgApplyInfoApiEntity) {
public OrgAllInfoApiEntity insertUpInfo(OrgAllInfoApiEntity orgApplyInfoApiEntity) {
//非第一次入驻申请 先将相同PKID都变更为历史
if (StringUtils.isNotBlank(orgApplyInfoApiEntity.getPkId())) {
OrgApplyInfo upData = new OrgApplyInfo();
upData.setIzHistory("Y");
UpdateWrapper<OrgApplyInfo> uw = new UpdateWrapper<>();
uw.eq("pk_id", orgApplyInfoApiEntity.getPkId());
baseMapper.update(upData, uw);
}
//插入新数据
OrgApplyInfo orgApplyInfo = new OrgApplyInfo();
orgApplyInfo.setId(IdUtil.simpleUUID());
orgApplyInfo.setPkId(orgApplyInfoApiEntity.getPkId());
//机构信息
orgApplyInfo.setOpenId(orgApplyInfoApiEntity.getOpenId());//openid
orgApplyInfo.setTel(orgApplyInfoApiEntity.getTel());//联系电话
orgApplyInfo.setWechatName(orgApplyInfo.getWechatName());//微信名称空字段
orgApplyInfo.setName(orgApplyInfoApiEntity.getName());//咨询人姓名
orgApplyInfo.setSex(orgApplyInfoApiEntity.getSex());//性别
orgApplyInfo.setNational(orgApplyInfoApiEntity.getNational());//民族
orgApplyInfo.setBirthDate(orgApplyInfoApiEntity.getBirthDate());//出生日期
orgApplyInfo.setIdCardAddress(orgApplyInfoApiEntity.getIdCardAddress());//住址
orgApplyInfo.setIdCard(orgApplyInfoApiEntity.getIdCard());//身份证号
orgApplyInfo.setIssuingAuthority(orgApplyInfoApiEntity.getIssuingAuthority());//签发机关
orgApplyInfo.setStartTime(orgApplyInfoApiEntity.getStartTime());//身份证有效开始日期
orgApplyInfo.setEndTime(orgApplyInfoApiEntity.getEndTime());//身份证有效结束日期
orgApplyInfo.setCardZmPath(orgApplyInfoApiEntity.getCardZmPath());//身份证照片人像面
orgApplyInfo.setCardFmPath(orgApplyInfoApiEntity.getCardFmPath());//身份证照片国徽面
orgApplyInfo.setComBusinessLicense(orgApplyInfoApiEntity.getComBusinessLicense());//营业执照照片
orgApplyInfo.setComName(orgApplyInfoApiEntity.getComName());//企业名称
orgApplyInfo.setComRegisterAddress(orgApplyInfoApiEntity.getComRegisterAddress());//企业注册地址
orgApplyInfo.setComCreditCode(orgApplyInfoApiEntity.getComCreditCode());//企业信用代码
orgApplyInfo.setComLegalPerson(orgApplyInfoApiEntity.getComLegalPerson());//企业法人
orgApplyInfo.setOrgAddress(orgApplyInfoApiEntity.getOrgAddress());//机构地址
orgApplyInfo.setOrgCoordinateLo(orgApplyInfoApiEntity.getOrgCoordinateLo());//机构位置坐标经度
orgApplyInfo.setOrgCoordinateLa(orgApplyInfoApiEntity.getOrgCoordinateLa());//机构位置坐标维度
orgApplyInfo.setOrgLeader(orgApplyInfoApiEntity.getOrgLeader());//机构负责人
orgApplyInfo.setOrgLeaderPhone(orgApplyInfoApiEntity.getOrgLeaderPhone());//机构负责人电话
orgApplyInfo.setOrgBuildingNumber(orgApplyInfoApiEntity.getOrgBuildingNumber());//机构楼宇牌号
orgApplyInfo.setOrgPropertyType(orgApplyInfoApiEntity.getOrgPropertyType());//机构房屋性质
orgApplyInfo.setOrgBuildingArea(orgApplyInfoApiEntity.getOrgBuildingArea());//机构建筑面积
orgApplyInfo.setOrgProvince(orgApplyInfoApiEntity.getOrgProvince());//机构省份
orgApplyInfo.setOrgCity(orgApplyInfoApiEntity.getOrgCity());//机构城市
orgApplyInfo.setOrgDistrict(orgApplyInfoApiEntity.getOrgDistrict());//机构区域
//状态字段
orgApplyInfo.setIzHistory("N");//当前机构动态数据
orgApplyInfo.setStatus("1");//变更申请
orgApplyInfo.setOptType("bg");
orgApplyInfo.setOptTypeName("变更");
baseMapper.insert(orgApplyInfo);
orgApplyInfoApiEntity.setId(orgApplyInfo.getId());
return orgApplyInfoApiEntity;
}
@Override
public int updateById(OrgAllInfoApiEntity orgApplyInfoApiEntity) {
OrgApplyInfo orgApplyInfo = new OrgApplyInfo();
BeanUtils.copyProperties(orgApplyInfoApiEntity, orgApplyInfo);
return baseMapper.updateById(orgApplyInfo);
}
@Override
public List<OrgApplyInfoApiEntity> queryAuditInfo(String openId, String id, String status) {
public List<OrgAllInfoApiEntity> queryOrgHomePageList(String openId) {
//已经申请通过的机构 查这个表是因为需要最新的机构数据 apply的数据可能是变更中的数据
SysDepartEntity queryParams = new SysDepartEntity();
queryParams.setOpenId(openId);
List<OrgAllInfoApiEntity> orgApplyInfoApiEntities = BeanUtil.copyToList(sysBaseAPI.queryAllAuditPassOrg(queryParams), OrgAllInfoApiEntity.class);
if (!CollectionUtils.isEmpty(orgApplyInfoApiEntities)) {
orgApplyInfoApiEntities.stream().forEach(item -> {
item.setPkId(item.getId());
item.setStatus("2");
});
}
//申请中或被驳回的机构
QueryWrapper<OrgApplyInfo> qw = new QueryWrapper<>();
qw.eq("open_id", openId);
if (StringUtils.isNotBlank(id)) {
qw.eq("id", id);
}
if (StringUtils.isNotBlank(status)) {
qw.in("status", status.split(","));
}
qw.eq("iz_history", "N");
qw.eq("opt_type", "rz");
qw.in("status", "1,3".split(","));
qw.orderByDesc("create_time");
List<OrgApplyInfo> list = baseMapper.selectList(qw);
List<OrgAllInfoApiEntity> applyList = BeanUtil.copyToList(baseMapper.selectList(qw), OrgAllInfoApiEntity.class);
orgApplyInfoApiEntities.addAll(applyList);
for (OrgApplyInfo par : list) {
for (OrgAllInfoApiEntity par : orgApplyInfoApiEntities) {
par.setOrgProvince_dictText(dictUtils.translateDictValue("id", "name", "sys_category", par.getOrgProvince()));
par.setOrgCity_dictText(dictUtils.translateDictValue("id", "name", "sys_category", par.getOrgCity()));
par.setOrgDistrict_dictText(dictUtils.translateDictValue("id", "name", "sys_category", par.getOrgDistrict()));
}
List<OrgApplyInfoApiEntity> result = BeanUtil.copyToList(list, OrgApplyInfoApiEntity.class);
return result;
return orgApplyInfoApiEntities;
}
/**
* 查询机构入驻/信息变更历史
*
* @param openId
* @return
*/
@Override
public List<OrgAllInfoApiEntity> queryOrgHis(String openId, String optType) {
QueryWrapper<OrgApplyInfo> qw = new QueryWrapper<>();
qw.eq("open_id", openId);
qw.in("opt_type", optType.split(","));
qw.orderByDesc("create_time");
List<OrgAllInfoApiEntity> list = BeanUtil.copyToList(baseMapper.selectList(qw), OrgAllInfoApiEntity.class);
for (OrgAllInfoApiEntity par : list) {
par.setOrgProvince_dictText(dictUtils.translateDictValue("id", "name", "sys_category", par.getOrgProvince()));
par.setOrgCity_dictText(dictUtils.translateDictValue("id", "name", "sys_category", par.getOrgCity()));
par.setOrgDistrict_dictText(dictUtils.translateDictValue("id", "name", "sys_category", par.getOrgDistrict()));
}
return list;
}
@Override
public List<Map<String, Object>> getModifyInfo(OrgApplyInfo orgApplyInfo) {
// 1. 查询数据库获取两条记录
// 1. 修改后的数据
QueryWrapper<OrgApplyInfo> qw = new QueryWrapper<>();
qw.eq("pk_id", orgApplyInfo.getPkId());
qw.orderByDesc("create_time");
qw.in("status", new String[]{"2", "4"});
List<OrgApplyInfo> list = baseMapper.selectList(qw);
qw.eq("iz_history", "N");
qw.eq("status", "1");
qw.eq("opt_type", "bg");
OrgApplyInfo modifyData = baseMapper.selectOne(qw);// 修改后的数据
if (list == null || list.size() < 2) {
return Collections.emptyList();
}
OrgApplyInfo modifyData = list.get(0); // 修改后的数据
OrgApplyInfo usingData = list.get(1); // 原始数据
OrgApplyInfo usingData = new OrgApplyInfo(); // 原始数据
SysDepartEntity sysDepartEntity = sysBaseAPI.selectDepartById(orgApplyInfo.getPkId());
BeanUtils.copyProperties(sysDepartEntity, usingData);
// 2. 准备结果列表
List<Map<String, Object>> result = new ArrayList<>();
@ -185,35 +307,244 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
}
@Override
public void audit(OrgApplyInfo orgApplyInfo) {
public void applyAudit(OrgApplyInfo orgApplyInfo) {
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//机构加盟审核时传过来的status是2/3
//机构信息变更时传过来的status是modifyPass和modifyFail
orgApplyInfo.setAuditTime(new Date());
orgApplyInfo.setAuditBy(user.getUsername());
OrgApplyInfo usedData = new OrgApplyInfo();
//机构信息变更审核通过
if ("modifyPass".equals(orgApplyInfo.getStatus())) {
orgApplyInfo.setAuditBy(user.getRealname());
//审核通过
if ("2".equals(orgApplyInfo.getStatus())) {
SysDepartEntity sysDepartEntity = new SysDepartEntity();
sysDepartEntity.setId(orgApplyInfo.getPkId());
sysDepartEntity.setDepartName(orgApplyInfo.getComName());//机构名称
sysDepartEntity.setOrgCategory("1");//类型是机构类型
sysDepartEntity.setOrgType("1");//固定写1
sysDepartEntity.setPlatType("ywjg");//平台类型是业务机构
sysDepartEntity.setDelFlag("0");//未删除
//机构信息
sysDepartEntity.setOpenId(orgApplyInfo.getOpenId());//openid
sysDepartEntity.setTel(orgApplyInfo.getTel());//联系电话
sysDepartEntity.setWechatName(orgApplyInfo.getWechatName());//微信名称空字段
sysDepartEntity.setName(orgApplyInfo.getName());//咨询人姓名
sysDepartEntity.setSex(orgApplyInfo.getSex());//性别
sysDepartEntity.setNational(orgApplyInfo.getNational());//民族
sysDepartEntity.setBirthDate(orgApplyInfo.getBirthDate());//出生日期
sysDepartEntity.setIdCardAddress(orgApplyInfo.getIdCardAddress());//住址
sysDepartEntity.setIdCard(orgApplyInfo.getIdCard());//身份证号
sysDepartEntity.setIssuingAuthority(orgApplyInfo.getIssuingAuthority());//签发机关
sysDepartEntity.setStartTime(orgApplyInfo.getStartTime());//身份证有效开始日期
sysDepartEntity.setEndTime(orgApplyInfo.getEndTime());//身份证有效结束日期
sysDepartEntity.setCardZmPath(orgApplyInfo.getCardZmPath());//身份证照片人像面
sysDepartEntity.setCardFmPath(orgApplyInfo.getCardFmPath());//身份证照片国徽面
sysDepartEntity.setComBusinessLicense(orgApplyInfo.getComBusinessLicense());//营业执照照片
sysDepartEntity.setComName(orgApplyInfo.getComName());//企业名称
sysDepartEntity.setComRegisterAddress(orgApplyInfo.getComRegisterAddress());//企业注册地址
sysDepartEntity.setComCreditCode(orgApplyInfo.getComCreditCode());//企业信用代码
sysDepartEntity.setComLegalPerson(orgApplyInfo.getComLegalPerson());//企业法人
sysDepartEntity.setOrgAddress(orgApplyInfo.getOrgAddress());//机构地址
sysDepartEntity.setOrgCoordinateLo(orgApplyInfo.getOrgCoordinateLo());//机构位置坐标经度
sysDepartEntity.setOrgCoordinateLa(orgApplyInfo.getOrgCoordinateLa());//机构位置坐标维度
sysDepartEntity.setOrgLeader(orgApplyInfo.getOrgLeader());//机构负责人
sysDepartEntity.setOrgLeaderPhone(orgApplyInfo.getOrgLeaderPhone());//机构负责人电话
sysDepartEntity.setOrgBuildingNumber(orgApplyInfo.getOrgBuildingNumber());//机构楼宇牌号
sysDepartEntity.setOrgPropertyType(orgApplyInfo.getOrgPropertyType());//机构房屋性质
sysDepartEntity.setOrgBuildingArea(orgApplyInfo.getOrgBuildingArea());//机构建筑面积
sysDepartEntity.setOrgProvince(orgApplyInfo.getOrgProvince());//机构省份
sysDepartEntity.setOrgCity(orgApplyInfo.getOrgCity());//机构城市
sysDepartEntity.setOrgDistrict(orgApplyInfo.getOrgDistrict());//机构区域
//必要字段
sysDepartEntity.setStatus("0");//不启用
sysDepartEntity.setFranchiseTime(new Date());//入驻时间
sysDepartEntity.setOrgStatus("3");//到了该上传加盟合同环节了
sysDepartEntity.setWorkOrderStatus("0");//未提交工单
sysBaseAPI.addOrg(sysDepartEntity);
//修改此用户信息咨询表iz_jg标识为Y是机构
EmployeesAdvisoryInfoEntity edEntity = new EmployeesAdvisoryInfoEntity();
edEntity.setOpenId(orgApplyInfo.getOpenId());
edEntity.setIzJg("Y");
employeesAdvisioryInfoApi.updateByOpenId(edEntity);
//发送小程序微信通知
NuWxNoticeEntity nuWxNotice = new NuWxNoticeEntity();
nuWxNotice.setOpenId(orgApplyInfo.getOpenId());
nuWxNotice.setIzRead("N");
nuWxNotice.setOrgCode(null);
nuWxNotice.setTitle("机构加盟审核");
nuWxNotice.setContent("您好,您提交的" + orgApplyInfo.getComName() + "机构加盟申请已通过");
nuWxNotice.setType("org_apply_audit_list");
nuWxNotice.setClientType(WxClientType.INSTITUTION.getCode());
wxNoticeApi.addNotice(nuWxNotice);
WxNoticeEntity wxNotice = new WxNoticeEntity();
wxNotice.setPageRoute("pages/index/index");
wxNotice.setThing2("机构加盟审核");
wxNotice.setPhrase1("审核通过");
wxNotice.setLogMainInfo("机构加盟审核");
wxNoticeApi.sendWechartMessage_SHENHE(wxNotice, nuWxNotice);
}
//审核驳回
if (StringUtils.equals("3", orgApplyInfo.getStatus())) {
//发送小程序微信通知
NuWxNoticeEntity nuWxNotice = new NuWxNoticeEntity();
nuWxNotice.setOpenId(orgApplyInfo.getOpenId());
nuWxNotice.setIzRead("N");
nuWxNotice.setOrgCode(null);
nuWxNotice.setTitle("机构加盟审核");
nuWxNotice.setContent("您好,您提交的" + orgApplyInfo.getComName() + "机构加盟申请未通过");
nuWxNotice.setType("org_apply_audit_list");
nuWxNotice.setClientType(WxClientType.INSTITUTION.getCode());
wxNoticeApi.addNotice(nuWxNotice);
WxNoticeEntity wxNotice = new WxNoticeEntity();
wxNotice.setPageRoute("pages/index/index");
wxNotice.setThing2("机构加盟审核");
wxNotice.setPhrase1("审核未通过");
wxNotice.setLogMainInfo("机构加盟审核");
wxNoticeApi.sendWechartMessage_SHENHE(wxNotice, nuWxNotice);
}
//修改数据
baseMapper.updateById(orgApplyInfo);
}
@Override
public void saveCg(OrgAllInfoApiEntity orgApplyInfo) {
SysDepartEntity sysDepartEntity = new SysDepartEntity();
sysDepartEntity.setId(orgApplyInfo.getPkId());
sysDepartEntity.setContract(orgApplyInfo.getContract());//加盟合同
sysDepartEntity.setContractNote(orgApplyInfo.getContractNote());//备注信息
sysBaseAPI.updateById(sysDepartEntity);
}
@Override
public void submitContract(OrgAllInfoApiEntity orgApplyInfo) {
//先保存数据 将构建状态置为平台搭建
SysDepartEntity sysDepartEntity = new SysDepartEntity();
sysDepartEntity.setId(orgApplyInfo.getPkId());
sysDepartEntity.setOrgStatus("4");
sysDepartEntity.setWorkOrderStatus("1");
sysDepartEntity.setContract(orgApplyInfo.getContract());//加盟合同
sysDepartEntity.setContractNote(orgApplyInfo.getContractNote());//备注信息
sysBaseAPI.updateById(sysDepartEntity);
//给运维平台推送mq 增加机构加盟后的平台搭建任务
SysDepartEntity usingData = sysBaseAPI.selectDepartById(orgApplyInfo.getPkId());
OrgApplyInfoMQDto orgApplyInfoMQDto = new OrgApplyInfoMQDto();
orgApplyInfoMQDto.setId(usingData.getId());
orgApplyInfoMQDto.setPkId(orgApplyInfo.getPkId());
orgApplyInfoMQDto.setOpenId(usingData.getOpenId());//openid
orgApplyInfoMQDto.setFranchiseTime(usingData.getFranchiseTime());
{
//从orgapply表取出入驻审批人和时间原因这条数据可能是变更的审核人
QueryWrapper<OrgApplyInfo> qw = new QueryWrapper<>();
qw.eq("pk_id", orgApplyInfo.getPkId());
qw.eq("opt_type", "rz");
qw.eq("status", "2");
OrgApplyInfo o_ = baseMapper.selectOne(qw);
//把上一条数据设置为历史数据 同时变更信息变更状态
o_.setModifyStatus("2");
o_.setStatus("0");
baseMapper.updateById(o_);
//将变更后数据设置为正在使用的数据
orgApplyInfo.setStatus("2");
orgApplyInfo.setFranchiseTime(o_.getFranchiseTime());
baseMapper.updateById(orgApplyInfo);
//将同pkid的可修改状态改为可修改
qw = new QueryWrapper<>();
qw.eq("iz_history", "N");
qw.eq("pk_id", orgApplyInfo.getPkId());
OrgApplyInfo upData_ = new OrgApplyInfo();
upData_.setModifyStatus("0");
baseMapper.update(upData_, qw);
OrgApplyInfo rzApplyInfo = baseMapper.selectOne(qw);
orgApplyInfoMQDto.setAuditBy(rzApplyInfo.getAuditBy());
orgApplyInfoMQDto.setAuditTime(rzApplyInfo.getAuditTime());
}
//基本信息
orgApplyInfoMQDto.setTel(usingData.getTel());//联系电话
orgApplyInfoMQDto.setWechatName(usingData.getWechatName());//微信名称空字段
orgApplyInfoMQDto.setName(usingData.getName());//咨询人姓名
orgApplyInfoMQDto.setSex(usingData.getSex());//性别
orgApplyInfoMQDto.setNational(usingData.getNational());//民族
orgApplyInfoMQDto.setBirthDate(usingData.getBirthDate());//出生日期
orgApplyInfoMQDto.setIdCardAddress(usingData.getIdCardAddress());//住址
orgApplyInfoMQDto.setIdCard(usingData.getIdCard());//身份证号
orgApplyInfoMQDto.setIssuingAuthority(usingData.getIssuingAuthority());//签发机关
orgApplyInfoMQDto.setStartTime(usingData.getStartTime());//身份证有效开始日期
orgApplyInfoMQDto.setEndTime(usingData.getEndTime());//身份证有效结束日期
orgApplyInfoMQDto.setCardZmPath(usingData.getCardZmPath());//身份证照片人像面
orgApplyInfoMQDto.setCardFmPath(usingData.getCardFmPath());//身份证照片国徽面
orgApplyInfoMQDto.setComBusinessLicense(usingData.getComBusinessLicense());//营业执照照片
orgApplyInfoMQDto.setComName(usingData.getComName());//企业名称
orgApplyInfoMQDto.setComRegisterAddress(usingData.getComRegisterAddress());//企业注册地址
orgApplyInfoMQDto.setComCreditCode(usingData.getComCreditCode());//企业信用代码
orgApplyInfoMQDto.setComLegalPerson(usingData.getComLegalPerson());//企业法人
orgApplyInfoMQDto.setOrgAddress(usingData.getOrgAddress());//机构地址
orgApplyInfoMQDto.setOrgCoordinateLo(usingData.getOrgCoordinateLo());//机构位置坐标经度
orgApplyInfoMQDto.setOrgCoordinateLa(usingData.getOrgCoordinateLa());//机构位置坐标维度
orgApplyInfoMQDto.setOrgLeader(usingData.getOrgLeader());//机构负责人
orgApplyInfoMQDto.setOrgLeaderPhone(usingData.getOrgLeaderPhone());//机构负责人电话
orgApplyInfoMQDto.setOrgBuildingNumber(usingData.getOrgBuildingNumber());//机构楼宇牌号
orgApplyInfoMQDto.setOrgPropertyType(usingData.getOrgPropertyType());//机构房屋性质
orgApplyInfoMQDto.setOrgBuildingArea(usingData.getOrgBuildingArea());//机构建筑面积
orgApplyInfoMQDto.setOrgProvince(usingData.getOrgProvince());//机构省份
orgApplyInfoMQDto.setOrgCity(usingData.getOrgCity());//机构城市
orgApplyInfoMQDto.setOrgDistrict(usingData.getOrgDistrict());//机构区域
//将当前操作人传给运维平台 用于记录工单提交人
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
orgApplyInfoMQDto.setOperateBy(sysUser.getRealname());
orgApplyInfoMQDto.setOperateTelephone(sysUser.getPhone());
orgApplyInfoMQDto.setOperateEmail(sysUser.getEmail());
orgApplyInfoMQDto.setAuditStatus("审核成功");
orgApplyInfoMQDto.setContract(usingData.getContract());//加盟合同
orgApplyInfoMQDto.setContractNote(usingData.getContractNote());//备注信息
//运维mq收到后 1自动创建新的机构机构附加信息 2生成运维平台工单
rabbitMQUtil.sendToExchange("hldy.orgApply.build", "hldy.orgApply.build", orgApplyInfoMQDto);
}
@Override
public IPage<OrgAllInfo> queryOrgInfo(IPage<OrgAllInfo> page, String orgCode, String title) {
return baseMapper.queryOrgInfo(page, orgCode, title);
}
@Override
public IPage<OrgAllInfo> getOrgByOpenId(IPage<OrgAllInfo> page, String openId) {
return baseMapper.getOrgByOpenId(page, null, openId, "2", null, null);
}
@Override
public void upInfoAudit(OrgApplyInfo orgApplyInfo_) {
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
QueryWrapper<OrgApplyInfo> qw = new QueryWrapper<>();
qw.eq("pk_id", orgApplyInfo_.getPkId());
qw.eq("iz_history", "N");
qw.eq("opt_type", "bg");
qw.eq("status", "1");
OrgApplyInfo orgApplyInfo = baseMapper.selectOne(qw);
orgApplyInfo.setAuditTime(new Date());
orgApplyInfo.setAuditBy(user.getRealname());
//审核通过
if ("2".equals(orgApplyInfo_.getStatus())) {
orgApplyInfo.setStatus("2");
//修改机构信息
SysDepartEntity sysDepartEntity = new SysDepartEntity();
sysDepartEntity.setId(orgApplyInfo.getPkId());
sysDepartEntity.setDepartName(orgApplyInfo.getComName());//机构名称
//机构信息
sysDepartEntity.setTel(orgApplyInfo.getTel());//联系电话
sysDepartEntity.setWechatName(orgApplyInfo.getWechatName());//微信名称空字段
sysDepartEntity.setName(orgApplyInfo.getName());//咨询人姓名
sysDepartEntity.setSex(orgApplyInfo.getSex());//性别
sysDepartEntity.setNational(orgApplyInfo.getNational());//民族
sysDepartEntity.setBirthDate(orgApplyInfo.getBirthDate());//出生日期
sysDepartEntity.setIdCardAddress(orgApplyInfo.getIdCardAddress());//住址
sysDepartEntity.setIdCard(orgApplyInfo.getIdCard());//身份证号
sysDepartEntity.setIssuingAuthority(orgApplyInfo.getIssuingAuthority());//签发机关
sysDepartEntity.setStartTime(orgApplyInfo.getStartTime());//身份证有效开始日期
sysDepartEntity.setEndTime(orgApplyInfo.getEndTime());//身份证有效结束日期
sysDepartEntity.setCardZmPath(orgApplyInfo.getCardZmPath());//身份证照片人像面
sysDepartEntity.setCardFmPath(orgApplyInfo.getCardFmPath());//身份证照片国徽面
sysDepartEntity.setComBusinessLicense(orgApplyInfo.getComBusinessLicense());//营业执照照片
sysDepartEntity.setComName(orgApplyInfo.getComName());//企业名称
sysDepartEntity.setComRegisterAddress(orgApplyInfo.getComRegisterAddress());//企业注册地址
sysDepartEntity.setComCreditCode(orgApplyInfo.getComCreditCode());//企业信用代码
sysDepartEntity.setComLegalPerson(orgApplyInfo.getComLegalPerson());//企业法人
sysDepartEntity.setOrgAddress(orgApplyInfo.getOrgAddress());//机构地址
sysDepartEntity.setOrgCoordinateLo(orgApplyInfo.getOrgCoordinateLo());//机构位置坐标经度
sysDepartEntity.setOrgCoordinateLa(orgApplyInfo.getOrgCoordinateLa());//机构位置坐标维度
sysDepartEntity.setOrgLeader(orgApplyInfo.getOrgLeader());//机构负责人
sysDepartEntity.setOrgLeaderPhone(orgApplyInfo.getOrgLeaderPhone());//机构负责人电话
sysDepartEntity.setOrgBuildingNumber(orgApplyInfo.getOrgBuildingNumber());//机构楼宇牌号
sysDepartEntity.setOrgPropertyType(orgApplyInfo.getOrgPropertyType());//机构房屋性质
sysDepartEntity.setOrgBuildingArea(orgApplyInfo.getOrgBuildingArea());//机构建筑面积
sysDepartEntity.setOrgProvince(orgApplyInfo.getOrgProvince());//机构省份
sysDepartEntity.setOrgCity(orgApplyInfo.getOrgCity());//机构城市
sysDepartEntity.setOrgDistrict(orgApplyInfo.getOrgDistrict());//机构区域
sysBaseAPI.updateById(sysDepartEntity);
//发送小程序微信通知
NuWxNoticeEntity nuWxNotice = new NuWxNoticeEntity();
nuWxNotice.setOpenId(orgApplyInfo.getOpenId());
@ -230,18 +561,11 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
wxNotice.setPhrase1("审核通过");
wxNotice.setLogMainInfo("机构信息变更审核");
wxNoticeApi.sendWechartMessage_SHENHE(wxNotice, nuWxNotice);
} else if ("modifyFail".equals(orgApplyInfo.getStatus())) {
//将同pkid的可修改状态改为可修改
QueryWrapper<OrgApplyInfo> qw = new QueryWrapper<>();
qw = new QueryWrapper<>();
qw.eq("pk_id", orgApplyInfo.getPkId());
OrgApplyInfo upData_ = new OrgApplyInfo();
upData_.setModifyStatus("0");
baseMapper.update(upData_, qw);
//将变更后数据设置为被驳回状态
orgApplyInfo.setStatus("5");
baseMapper.updateById(orgApplyInfo);
}
//审核驳回
if (StringUtils.equals("3", orgApplyInfo_.getStatus())) {
orgApplyInfo.setStatus("3");
orgApplyInfo.setContent(orgApplyInfo_.getContent());
//发送小程序微信通知
NuWxNoticeEntity nuWxNotice = new NuWxNoticeEntity();
@ -259,109 +583,16 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
wxNotice.setPhrase1("审核未通过");
wxNotice.setLogMainInfo("机构信息变更审核");
wxNoticeApi.sendWechartMessage_SHENHE(wxNotice, nuWxNotice);
} else {
//buildStatus == approvalPass时代表加盟审批通过
if ("approvalPass".equals(orgApplyInfo.getBuildStatus())) {
if ("2".equals(orgApplyInfo.getStatus()) && orgApplyInfo.getFranchiseTime() == null) {
//记录机构加盟时间
orgApplyInfo.setFranchiseTime(new Date());
}
//机构信息是否可修改状态置为可修改
orgApplyInfo.setModifyStatus("0");
//将机构的构建状态置为加盟合同
orgApplyInfo.setBuildStatus("3");
//修改此用户信息咨询表iz_jg标识为Y是机构
EmployeesAdvisoryInfoEntity edEntity = new EmployeesAdvisoryInfoEntity();
edEntity.setOpenId(orgApplyInfo.getOpenId());
edEntity.setIzJg("Y");
employeesAdvisioryInfoApi.updateByOpenId(edEntity);
//发送小程序微信通知
NuWxNoticeEntity nuWxNotice = new NuWxNoticeEntity();
nuWxNotice.setOpenId(orgApplyInfo.getOpenId());
nuWxNotice.setIzRead("N");
nuWxNotice.setOrgCode(null);
nuWxNotice.setTitle("机构加盟审核");
nuWxNotice.setContent("您好,您提交的" + orgApplyInfo.getComName() + "机构加盟申请已通过");
nuWxNotice.setType("org_apply_audit_list");
nuWxNotice.setClientType(WxClientType.INSTITUTION.getCode());
wxNoticeApi.addNotice(nuWxNotice);
WxNoticeEntity wxNotice = new WxNoticeEntity();
wxNotice.setPageRoute("pages/index/index");
wxNotice.setThing2("机构加盟审核");
wxNotice.setPhrase1("审核通过");
wxNotice.setLogMainInfo("机构加盟审核");
wxNoticeApi.sendWechartMessage_SHENHE(wxNotice, nuWxNotice);
}
//审批完成后的平台搭建流程合同上传并提交状态
if ("contractSubmit".equals(orgApplyInfo.getBuildStatus())) {
//合同上传步骤 - 保存并提交
//将buildStatus置为平台搭建状态
orgApplyInfo.setBuildStatus("4");
}
//审核驳回
if (StringUtils.equals("3", orgApplyInfo.getStatus())) {
//发送小程序微信通知
NuWxNoticeEntity nuWxNotice = new NuWxNoticeEntity();
nuWxNotice.setOpenId(orgApplyInfo.getOpenId());
nuWxNotice.setIzRead("N");
nuWxNotice.setOrgCode(null);
nuWxNotice.setTitle("机构加盟审核");
nuWxNotice.setContent("您好,您提交的" + orgApplyInfo.getComName() + "机构加盟申请未通过");
nuWxNotice.setType("org_apply_audit_list");
nuWxNotice.setClientType(WxClientType.INSTITUTION.getCode());
wxNoticeApi.addNotice(nuWxNotice);
WxNoticeEntity wxNotice = new WxNoticeEntity();
wxNotice.setPageRoute("pages/index/index");
wxNotice.setThing2("机构加盟审核");
wxNotice.setPhrase1("审核未通过");
wxNotice.setLogMainInfo("机构加盟审核");
wxNoticeApi.sendWechartMessage_SHENHE(wxNotice, nuWxNotice);
}
//机构加盟审批流程
baseMapper.updateById(orgApplyInfo);
if (StringUtils.equals("2", orgApplyInfo.getStatus()) && StringUtils.isNotBlank(orgApplyInfo.getContent())) {
UpdateWrapper<OrgApplyInfo> updateWrapper = new UpdateWrapper<>();
updateWrapper.set("content", null);
updateWrapper.eq("id", orgApplyInfo.getId());
update(updateWrapper);
}
}
}
@Override
public void submitContract(OrgApplyInfo orgApplyInfo) {
//先保存数据 将构建状态置为平台搭建
orgApplyInfo.setBuildStatus("4");
//修改数据
baseMapper.updateById(orgApplyInfo);
//给运维平台推送mq 增加机构加盟后的平台搭建任务
OrgApplyInfoMQDto orgApplyInfoMQDto = new OrgApplyInfoMQDto();
BeanUtils.copyProperties(orgApplyInfo, orgApplyInfoMQDto);
//将当前操作人传给运维平台 用于记录工单提交人
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
orgApplyInfoMQDto.setOperateBy(sysUser.getRealname());
orgApplyInfoMQDto.setOperateTelephone(sysUser.getPhone());
orgApplyInfoMQDto.setOperateEmail(sysUser.getEmail());
orgApplyInfoMQDto.setAuditStatus("审核成功");
// orgApplyInfoMQDto.setAuditBy(sysUser.getRealname());
// orgApplyInfoMQDto.setAuditTime(orgApplyInfo.getAuditTime());
//运维mq收到后 1自动创建新的机构机构附加信息 2生成运维平台工单
rabbitMQUtil.sendToExchange("hldy.orgApply.build", "hldy.orgApply.build", orgApplyInfoMQDto);
//TODO 通知运维平台去修改
}
@Override
public IPage<OrgAllInfo> queryOrgInfo(IPage<OrgAllInfo> page, String orgCode, String title) {
return baseMapper.queryOrgInfo(page, orgCode, title);
}
@Override
public IPage<OrgAllInfo> getOrgByOpenId(IPage<OrgAllInfo> page, String openId) {
return baseMapper.getOrgByOpenId(page, null, openId, "2", null, null);
public IPage<OrgAllInfoApiEntity> pageList(OrgApplyInfo orgApplyInfo, Page<OrgApplyInfo> page) {
return baseMapper.pageList(orgApplyInfo, page);
}
@Override
@ -393,63 +624,137 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
return result;
}
/**
* 验证入驻申请是否有变更
*
* @param newData
* @return
*/
@Override
public boolean validateApplyChanged(OrgAllInfoApiEntity newData) {
//入驻重复校验时 数据库中机构信息都是入驻申请信息 没有信息
QueryWrapper<OrgApplyInfo> beforeQW = new QueryWrapper<>();
beforeQW.eq("pk_id", newData.getPkId());
beforeQW.eq("iz_history", "N");
beforeQW.orderByDesc("create_time");
List<OrgApplyInfo> list = baseMapper.selectList(beforeQW);
if (CollectionUtils.isEmpty(list)) {
return true;
}
OrgApplyInfo beforeData = list.get(0);
// 显式对比需要校验变更的字段排除你列出的字段
return !(
Objects.equals(newData.getTel(), beforeData.getTel()) &&
Objects.equals(newData.getName(), beforeData.getName()) &&
Objects.equals(newData.getSex(), beforeData.getSex()) &&
Objects.equals(newData.getNational(), beforeData.getNational()) &&
Objects.equals(newData.getBirthDate(), beforeData.getBirthDate()) &&
Objects.equals(newData.getIdCardAddress(), beforeData.getIdCardAddress()) &&
Objects.equals(newData.getIdCard(), beforeData.getIdCard()) &&
Objects.equals(newData.getIssuingAuthority(), beforeData.getIssuingAuthority()) &&
Objects.equals(newData.getStartTime(), beforeData.getStartTime()) &&
Objects.equals(newData.getEndTime(), beforeData.getEndTime()) &&
Objects.equals(newData.getCardZmPath(), beforeData.getCardZmPath()) &&
Objects.equals(newData.getCardFmPath(), beforeData.getCardFmPath()) &&
Objects.equals(newData.getComBusinessLicense(), beforeData.getComBusinessLicense()) &&
Objects.equals(newData.getComName(), beforeData.getComName()) &&
Objects.equals(newData.getComRegisterAddress(), beforeData.getComRegisterAddress()) &&
Objects.equals(newData.getComCreditCode(), beforeData.getComCreditCode()) &&
Objects.equals(newData.getComLegalPerson(), beforeData.getComLegalPerson()) &&
Objects.equals(newData.getOrgAddress(), beforeData.getOrgAddress()) &&
Objects.equals(newData.getOrgCoordinateLo(), beforeData.getOrgCoordinateLo()) &&
Objects.equals(newData.getOrgCoordinateLa(), beforeData.getOrgCoordinateLa()) &&
Objects.equals(newData.getOrgLeader(), beforeData.getOrgLeader()) &&
Objects.equals(newData.getOrgLeaderPhone(), beforeData.getOrgLeaderPhone()) &&
Objects.equals(newData.getOrgBuildingNumber(), beforeData.getOrgBuildingNumber()) &&
Objects.equals(newData.getOrgPropertyType(), beforeData.getOrgPropertyType()) &&
Objects.equals(newData.getOrgBuildingArea(), beforeData.getOrgBuildingArea()) &&
Objects.equals(newData.getOrgProvince(), beforeData.getOrgProvince()) &&
Objects.equals(newData.getOrgCity(), beforeData.getOrgCity()) &&
Objects.equals(newData.getOrgDistrict(), beforeData.getOrgDistrict())
);
}
/**
* 验证是否有变化
* 跟正在使用的机构信息去比对
*
* @param newData
* @return
*/
@Override
public boolean validateUpInfoChanged(OrgAllInfoApiEntity newData) {
SysDepartEntity usingData = sysBaseAPI.selectDepartById(newData.getPkId());
// 显式对比需要校验变更的字段排除你列出的字段
return !(
Objects.equals(newData.getTel(), usingData.getTel()) &&
Objects.equals(newData.getName(), usingData.getName()) &&
Objects.equals(newData.getSex(), usingData.getSex()) &&
Objects.equals(newData.getNational(), usingData.getNational()) &&
Objects.equals(newData.getBirthDate(), usingData.getBirthDate()) &&
Objects.equals(newData.getIdCardAddress(), usingData.getIdCardAddress()) &&
Objects.equals(newData.getIdCard(), usingData.getIdCard()) &&
Objects.equals(newData.getIssuingAuthority(), usingData.getIssuingAuthority()) &&
Objects.equals(newData.getStartTime(), usingData.getStartTime()) &&
Objects.equals(newData.getEndTime(), usingData.getEndTime()) &&
Objects.equals(newData.getCardZmPath(), usingData.getCardZmPath()) &&
Objects.equals(newData.getCardFmPath(), usingData.getCardFmPath()) &&
Objects.equals(newData.getComBusinessLicense(), usingData.getComBusinessLicense()) &&
Objects.equals(newData.getComName(), usingData.getComName()) &&
Objects.equals(newData.getComRegisterAddress(), usingData.getComRegisterAddress()) &&
Objects.equals(newData.getComCreditCode(), usingData.getComCreditCode()) &&
Objects.equals(newData.getComLegalPerson(), usingData.getComLegalPerson()) &&
Objects.equals(newData.getOrgAddress(), usingData.getOrgAddress()) &&
Objects.equals(newData.getOrgCoordinateLo(), usingData.getOrgCoordinateLo()) &&
Objects.equals(newData.getOrgCoordinateLa(), usingData.getOrgCoordinateLa()) &&
Objects.equals(newData.getOrgLeader(), usingData.getOrgLeader()) &&
Objects.equals(newData.getOrgLeaderPhone(), usingData.getOrgLeaderPhone()) &&
Objects.equals(newData.getOrgBuildingNumber(), usingData.getOrgBuildingNumber()) &&
Objects.equals(newData.getOrgPropertyType(), usingData.getOrgPropertyType()) &&
Objects.equals(newData.getOrgBuildingArea(), usingData.getOrgBuildingArea()) &&
Objects.equals(newData.getOrgProvince(), usingData.getOrgProvince()) &&
Objects.equals(newData.getOrgCity(), usingData.getOrgCity()) &&
Objects.equals(newData.getOrgDistrict(), usingData.getOrgDistrict())
);
}
/**
* 验证企业名称是否已被占用
*
* @param orgApplyInfoApiEntity
* @return
*/
@Override
public boolean validateChanged(OrgApplyInfoApiEntity orgApplyInfoApiEntity) {
QueryWrapper<OrgApplyInfo> qw = new QueryWrapper<>();
qw.eq("pk_id", orgApplyInfoApiEntity.getPkId());
if ("1".equals(orgApplyInfoApiEntity.getStatus())) {
qw.eq("status", "3");
} else if ("4".equals(orgApplyInfoApiEntity.getStatus())) {
qw.eq("status", "2");
public boolean validateComNamerepet(OrgAllInfoApiEntity orgApplyInfoApiEntity) {
//检测sys_depart是否有重复名称
int sysDepartRepetCount = baseMapper.validateSysDepartComNamerepet(orgApplyInfoApiEntity);
if (sysDepartRepetCount > 0) {
return true;
}
//检测申请表
int applyOrgRepetCount = baseMapper.validateApplyOrgComNamerepet(orgApplyInfoApiEntity);
if (applyOrgRepetCount > 0) {
return true;
}
return false;
}
@Override
public OrgAllInfoApiEntity queryOrgInfoById(String id) {
OrgApplyInfo orgApplyInfo = new OrgApplyInfo();
orgApplyInfo.setId(id);
List<OrgAllInfoApiEntity> orgAllInfoApiEntities = baseMapper.orgList(orgApplyInfo);
if (CollectionUtils.isEmpty(orgAllInfoApiEntities)) {
return null;
} else {
qw.eq("status", "-1314");
OrgAllInfoApiEntity par = orgAllInfoApiEntities.get(0);
par.setOrgProvince_dictText(dictUtils.translateDictValue("id", "name", "sys_category", par.getOrgProvince()));
par.setOrgCity_dictText(dictUtils.translateDictValue("id", "name", "sys_category", par.getOrgCity()));
par.setOrgDistrict_dictText(dictUtils.translateDictValue("id", "name", "sys_category", par.getOrgDistrict()));
return orgAllInfoApiEntities.get(0);
}
OrgApplyInfo dbRecord = baseMapper.selectOne(qw);
if ("1".equals(orgApplyInfoApiEntity.getStatus())) {
if (dbRecord == null) {
return true;
}
}
OrgApplyInfo inputRecord = new OrgApplyInfo();
BeanUtils.copyProperties(orgApplyInfoApiEntity, inputRecord);
// 显式对比需要校验变更的字段排除你列出的字段
return !(
Objects.equals(dbRecord.getTel(), inputRecord.getTel()) &&
Objects.equals(dbRecord.getName(), inputRecord.getName()) &&
Objects.equals(dbRecord.getSex(), inputRecord.getSex()) &&
Objects.equals(dbRecord.getNational(), inputRecord.getNational()) &&
Objects.equals(dbRecord.getBirthDate(), inputRecord.getBirthDate()) &&
Objects.equals(dbRecord.getIdCardAddress(), inputRecord.getIdCardAddress()) &&
Objects.equals(dbRecord.getIdCard(), inputRecord.getIdCard()) &&
Objects.equals(dbRecord.getIssuingAuthority(), inputRecord.getIssuingAuthority()) &&
Objects.equals(dbRecord.getStartTime(), inputRecord.getStartTime()) &&
Objects.equals(dbRecord.getEndTime(), inputRecord.getEndTime()) &&
Objects.equals(dbRecord.getCardZmPath(), inputRecord.getCardZmPath()) &&
Objects.equals(dbRecord.getCardFmPath(), inputRecord.getCardFmPath()) &&
Objects.equals(dbRecord.getComBusinessLicense(), inputRecord.getComBusinessLicense()) &&
Objects.equals(dbRecord.getComName(), inputRecord.getComName()) &&
Objects.equals(dbRecord.getComRegisterAddress(), inputRecord.getComRegisterAddress()) &&
Objects.equals(dbRecord.getComCreditCode(), inputRecord.getComCreditCode()) &&
Objects.equals(dbRecord.getComLegalPerson(), inputRecord.getComLegalPerson()) &&
Objects.equals(dbRecord.getOrgAddress(), inputRecord.getOrgAddress()) &&
Objects.equals(dbRecord.getOrgCoordinateLo(), inputRecord.getOrgCoordinateLo()) &&
Objects.equals(dbRecord.getOrgCoordinateLa(), inputRecord.getOrgCoordinateLa()) &&
Objects.equals(dbRecord.getOrgLeader(), inputRecord.getOrgLeader()) &&
Objects.equals(dbRecord.getOrgLeaderPhone(), inputRecord.getOrgLeaderPhone()) &&
Objects.equals(dbRecord.getOrgBuildingNumber(), inputRecord.getOrgBuildingNumber()) &&
Objects.equals(dbRecord.getOrgPropertyType(), inputRecord.getOrgPropertyType()) &&
Objects.equals(dbRecord.getOrgBuildingArea(), inputRecord.getOrgBuildingArea()) &&
Objects.equals(dbRecord.getOrgProvince(), inputRecord.getOrgProvince()) &&
Objects.equals(dbRecord.getOrgCity(), inputRecord.getOrgCity()) &&
Objects.equals(dbRecord.getOrgDistrict(), inputRecord.getOrgDistrict())
);
}
}

View File

@ -69,7 +69,8 @@ public class WechatMiniController {
if (success) {
OrgApplyInfo orgApplyInfo = new OrgApplyInfo();
orgApplyInfo.setId(id);
orgApplyInfo.setBuildStatus("6");
//todo 下面一行临时注掉
// orgApplyInfo.setBuildStatus("6");
orgApplyInfoService.updateById(orgApplyInfo);
System.out.println("模板消息发送成功");

View File

@ -27,7 +27,7 @@ public class WorkOrderMQListener {
/**
* 工单回执
*/
@AutoLog(value = "工单-工单回执")
// @AutoLog(value = "工单-工单回执") 这个注解依赖上下文request对象 mq没这个对象 必须加的话就写个表插入
@RabbitListener(
bindings = @QueueBinding(
value = @Queue(name = "nu.workOrder.reply"),
@ -40,32 +40,17 @@ public class WorkOrderMQListener {
log.info("接收到工单回复");
log.info("工单回复: {}", workOrderMQDto);
OrgApplyInfo orgApplyInfo = orgApplyInfoService.getById(workOrderMQDto.getOrgId());
if(orgApplyInfo != null){
orgApplyInfo.setReplyContent(workOrderMQDto.getReplyContent());
orgApplyInfo.setReplyFile(workOrderMQDto.getReplyFile());
orgApplyInfo.setReplyTime(workOrderMQDto.getReplyTime());
orgApplyInfo.setHandleBy(workOrderMQDto.getHandleBy());
orgApplyInfo.setWorkOrderStatus("2");
orgApplyInfo.setWorkOrderId(workOrderMQDto.getId());
orgApplyInfoService.updateById(orgApplyInfo);
}
//新增机构信息如果没有
SysDepartModel sysDepartModel = sysBaseAPI.selectDepartById(workOrderMQDto.getOrgId());
if(sysDepartModel.getId() == null){
SysDepartEntity sysDepart =new SysDepartEntity();
sysDepart.setId(workOrderMQDto.getOrgId());
sysDepart.setCreateBy("admin");
sysDepart.setDepartName(workOrderMQDto.getOrgName());
sysDepart.setDepartOrder(0);
sysDepart.setOrgCategory("1");
sysDepart.setOrgType("1");
sysDepart.setDelFlag("0");
sysDepart.setIzLeaf(1);
sysDepart.setPlatType("ywjg");
sysDepart.setOrgCode(workOrderMQDto.getOrgCode());
sysBaseAPI.addOrg(sysDepart);
SysDepartEntity data = sysBaseAPI.selectDepartById(workOrderMQDto.getOrgId());
if (data != null) {
data.setReplyContent(workOrderMQDto.getReplyContent());
data.setReplyFile(workOrderMQDto.getReplyFile());
data.setReplyTime(workOrderMQDto.getReplyTime());
data.setHandleBy(workOrderMQDto.getHandleBy());
data.setWorkOrderStatus("2");
data.setWorkOrderId(workOrderMQDto.getId());
data.setOrgCode(workOrderMQDto.getOrgCode());
data.setStatus("1");
sysBaseAPI.updateById(data);
}
}

View File

@ -290,7 +290,7 @@ public class ElderApi {
@PostMapping("/addElder")
public Result<?> save(@RequestParam("ukey") String ukey, @RequestBody ElderInfoEntity elderInfoEntity) {
if (NuRedisUtils.existKey(ukey)) {
return Result.ok("重复提交");
return Result.ok("提交过于频繁,请稍后重试");
}
//长者id
String id = elderInfoEntity.getSysOrgCode() + IdUtil.simpleUUID();
@ -367,7 +367,7 @@ public class ElderApi {
}
}
if (NuRedisUtils.existKey(ukey)) {
return Result.ok("重复提交");
return Result.ok("提交过于频繁,请稍后重试");
}
elderInfoEntity.setOrgCode(elderInfoEntity.getOrgCode());
ElderInfoMQDto mqdto = new ElderInfoMQDto();

View File

@ -1,11 +1,13 @@
package com.nu.modules.wechat.orgapplyinfo.api;
import com.nu.modules.orgapplyinfo.api.IOrgApplyInfoApi;
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfoApiEntity;
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
import com.nu.utils.NuRedisUtils;
import org.apache.commons.lang.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -21,44 +23,78 @@ public class OrgApplyInfoApi {
/**
* 新增/编辑机构加盟申请信息
*
* @param orgApplyInfoApiEntity
* @param dto
* @return
*/
@AutoLog(value = "新增/编辑机构加盟申请信息")
@PostMapping("/save")
public Result<Object> save(@RequestParam("ukey") String ukey, @RequestBody OrgApplyInfoApiEntity orgApplyInfoApiEntity) {
//变更信息时 验证是否有变化 没有变化不允许提交
if ("1".equals(orgApplyInfoApiEntity.getStatus()) || "4".equals(orgApplyInfoApiEntity.getStatus())) {
if (!orgApplyInfoApi.validateChanged(orgApplyInfoApiEntity)) {
return Result.ok("未做变更");
public Result<Object> save(@RequestParam("ukey") String ukey, @RequestBody OrgAllInfoApiEntity dto) {
OrgAllInfoApiEntity orgApplyInfoApiEntity = new OrgAllInfoApiEntity();
BeanUtils.copyProperties(dto, orgApplyInfoApiEntity);
if (NuRedisUtils.existKey(ukey)) {
return Result.error("提交过于频繁,请稍后重试");
}
//验证入驻申请信息是否有变更
if ("1".equals(orgApplyInfoApiEntity.getStatus()) && StringUtils.isNotBlank(orgApplyInfoApiEntity.getPkId())) {
if (!orgApplyInfoApi.validateApplyChanged(orgApplyInfoApiEntity)) {
return Result.error("未做变更");
}
}
if (NuRedisUtils.existKey(ukey)) {
return Result.ok("重复提交");
//验证机构变更信息是否有变更
if ("4".equals(orgApplyInfoApiEntity.getStatus())) {
if (!orgApplyInfoApi.validateUpInfoChanged(orgApplyInfoApiEntity)) {
return Result.error("未做变更");
}
}
//验证企业名称是否正在被使用 或者被别人审核中排除自己
if (orgApplyInfoApi.validateComNamerepet(orgApplyInfoApiEntity)) {
return Result.error("企业名称已占用");
}
System.out.println("-----------新增/编辑机构加盟申请信息--------tel------------" + orgApplyInfoApiEntity.getTel());
if (StringUtils.isNotBlank(orgApplyInfoApiEntity.getId())) {
if (StringUtils.isNotBlank(orgApplyInfoApiEntity.getId()) && !"rz".equals(orgApplyInfoApiEntity.getOptType())) {
orgApplyInfoApi.updateById(orgApplyInfoApiEntity);
return Result.ok("保存成功!");
} else {
return Result.ok(orgApplyInfoApi.insert(orgApplyInfoApiEntity));
//入驻申请
if ("1".equals(orgApplyInfoApiEntity.getStatus())) {
return Result.ok(orgApplyInfoApi.insertApply(orgApplyInfoApiEntity));
} else {
//变更申请
return Result.ok(orgApplyInfoApi.insertUpInfo(orgApplyInfoApiEntity));
}
}
}
/**
* 根据微信号获取加盟申请信息
* 小程序-机构端-主页列表查询
* 查询已经入住机构+申请中/被驳回机构
*
* @param id nu_org_apply_info表id
* @param openId 微信openid
* @param status 审核状态
* @return 返回内容是两个表拼接的数据 status1和3就是审核中和被驳回 2时需要看orgStatus3代表刚加盟通过 还没搭建-等待管理平台上传合同 4是技术人员搭建平台中看work_order_status 1是等待搭建 2是搭建完了 但是没账号没办法登录 5是可以登录了)
*/
@GetMapping("/queryOrgHomePageList")
public Result<List<OrgAllInfoApiEntity>> queryOrgHomePageList(@RequestParam("openId") String openId) {
return Result.ok(orgApplyInfoApi.queryOrgHomePageList(openId));
}
@GetMapping("/queryOrgInfoById")
public Result<OrgAllInfoApiEntity> queryOrgInfoById(@RequestParam("id") String id) {
return Result.ok(orgApplyInfoApi.queryOrgInfoById(id));
}
/**
* 小程序-机构端-我的-机构信息
* 查询加盟/变更历史
*
* @param openId 微信openid
* @param optType 入驻rz 变更bg
* @return
*/
@GetMapping("/queryAuditInfo")
public Result<List<OrgApplyInfoApiEntity>> queryAuditInfo(@RequestParam("openId") String openId, @RequestParam(value = "id", required = false) String id, @RequestParam(value = "status", required = false) String status) {
if (StringUtils.isBlank(openId)) {
return Result.error("未填写openId");
}
return Result.ok(orgApplyInfoApi.queryAuditInfo(openId, id, status));
@GetMapping("/queryOrgHis")
public Result<List<OrgAllInfoApiEntity>> queryOrgHis(@RequestParam("openId") String openId, @RequestParam("optType") String optType) {
return Result.ok(orgApplyInfoApi.queryOrgHis(openId, optType));
}
}

View File

@ -1,6 +1,8 @@
package com.nu.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
@ -43,9 +45,9 @@ public class OrgApplyInfoMQDto implements Serializable {
*/
private String modifyStatus;
/**
* 状态构建状态1机构加盟小程序2加盟审核管理平台3加盟合同管理平台4平台搭建运维平台5账户初始化管理平台6信息推送公众号
* 构状态构建状态1机构加盟小程序2加盟审核管理平台3加盟合同管理平台4平台搭建运维平台5账户初始化管理平台6信息推送公众号
*/
private String buildStatus;
private String orgStatus;
//构建状态前后台处理逻辑字段
private String buildStatusVal;
@ -89,6 +91,8 @@ public class OrgApplyInfoMQDto implements Serializable {
/**
* 出生日期
*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy年MM月dd日")
@DateTimeFormat(pattern="yyyy年MM月dd日")
private java.util.Date birthDate;
/**
* 住址身份证上

View File

@ -1,17 +1,6 @@
package com.nu.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@ -19,48 +8,48 @@ import java.util.Date;
/**
* @Description: 工单表
* @Author: zmy
* @Date: 2025-07-08
* @Date: 2025-07-09
* @Version: V1.0
*/
@Data
public class WorkOrderMQDto implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
/**id*/
private String id;
/**区分同一工单用nu_word_order.id*/
/**区分同一工单用nu_word_order.id*/
private String pkId;
/**机构ID*/
/**机构ID*/
private String orgId;
/**机构编码(可能不存在)*/
/**机构编码(可能不存在)*/
private String orgCode;
/**机构名称*/
/**机构名称*/
private String orgName;
/**平台类型pc wechat pad*/
/**平台类型pc wechat pad*/
private String platType;
/**标题*/
/**标题*/
private String title;
/**描述*/
/**描述*/
private String content;
/**附件*/
/**附件*/
private String filePath;
/**状态 0待接收 1处理中 3已解决 4工单异常 5外部原因*/
/**状态 0待接收 1处理中 3已解决 4工单异常 5外部原因*/
private String status;
/**创建人*/
/**创建人*/
private String createBy;
/**创建时间*/
/**创建时间*/
private Date createTime;
/**回复内容*/
/**回复内容*/
private String replyContent;
/**回复附件*/
/**回复附件*/
private String replyFile;
/**回复时间*/
/**回复时间*/
private Date replyTime;
/**处理人*/
/**处理人*/
private String handleBy;
/**工单提交人联系电话*/
/**工单提交人联系电话*/
private String tel;
/**工单提交人邮件地址*/
/**工单提交人邮件地址*/
private String email;
/**状态 1平台构建*/
private String workType;

View File

@ -27,7 +27,7 @@ public class NuRedisUtils implements ApplicationContextAware {
}
if (!redisUtil.hasKey(key)) {
redisUtil.set(key, key, 15); // 过期时间
redisUtil.set(key, key, 5); // 过期时间
return false;
} else {
return true;

View File

@ -641,5 +641,9 @@ public interface ISysBaseAPI extends CommonAPI {
* @param id 部门id
* @return SysDepartModel对象
*/
SysDepartModel selectDepartById(String id);
SysDepartEntity selectDepartById(String id);
List<SysDepartEntity> queryAllAuditPassOrg(SysDepartEntity queryParams);
void updateById(SysDepartEntity sysDepartEntity);
}

View File

@ -1,9 +1,15 @@
package org.jeecg.common.system.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
/**
@ -179,6 +185,107 @@ public class SysDepartEntity implements Serializable {
*/
private String picUrl;
/**加盟时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private java.util.Date franchiseTime;
/**机构状态构建状态1、机构加盟【小程序】2、加盟审核【管理平台】3、加盟合同【管理平台】4、平台搭建【运维平台】5、账户初始化【管理平台】6、信息推送【公众号】*/
@Dict(dicCode = "org_build_status")
private java.lang.String orgStatus;
/**合同提交时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private java.util.Date htCommitTime;
/**合同提交人*/
private java.lang.String htCommitBy;
/**合同附件*/
private java.lang.String contract;
/**合同备注*/
private java.lang.String contractNote;
/**工单状态 0未提交 1待执行 2已回执*/
@Dict(dicCode = "work_order_status")
private java.lang.String workOrderStatus;
/**工单ID*/
private java.lang.String workOrderId;
/**回复内容*/
private java.lang.String replyContent;
/**回复附件*/
private java.lang.String replyFile;
/**回复时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private java.util.Date replyTime;
/**回复人*/
private java.lang.String handleBy;
/**微信id*/
private java.lang.String openId;
/**微信名称*/
private java.lang.String wechatName;
/**联系电话*/
private java.lang.String tel;
/**咨询人姓名*/
private java.lang.String name;
/**性别*/
private java.lang.String sex;
/**民族*/
private java.lang.String national;
/**出生日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy年MM月dd日")
@DateTimeFormat(pattern="yyyy年MM月dd日")
private Date birthDate;
/**住址(身份证上)*/
private java.lang.String idCardAddress;
/**身份证号*/
private java.lang.String idCard;
/**签发机关*/
private java.lang.String issuingAuthority;
/**有效开始日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
private java.util.Date startTime;
/**有效结束日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
private java.util.Date endTime;
/**身份证正面*/
private java.lang.String cardZmPath;
/**身份证反面*/
private java.lang.String cardFmPath;
/**营业执照照片*/
private java.lang.String comBusinessLicense;
/**企业名称*/
private java.lang.String comName;
/**企业注册地址*/
private java.lang.String comRegisterAddress;
/**企业信用代码*/
private java.lang.String comCreditCode;
/**企业法人*/
private java.lang.String comLegalPerson;
/**机构地址*/
private java.lang.String orgAddress;
/**机构位置坐标:经度*/
private String orgCoordinateLo;
/**机构位置坐标:纬度*/
private String orgCoordinateLa;
/**机构负责人*/
private java.lang.String orgLeader;
/**机构负责人电话*/
private java.lang.String orgLeaderPhone;
/**机构楼宇牌号*/
private java.lang.String orgBuildingNumber;
/**机构房屋性质*/
private java.lang.String orgPropertyType;
/**机构建筑面积*/
private java.lang.Double orgBuildingArea;
/**机构省份 sys_category.id*/
private java.lang.String orgProvince;
/**机构城市 sys_category.id*/
private java.lang.String orgCity;
/**机构区域 sys_category.id*/
private java.lang.String orgDistrict;
//update-begin---author:wangshuai ---date:20200308 for[JTC-119]在部门管理菜单下设置部门负责人新增字段负责人ids和旧的负责人ids
/**
* 部门负责人的ids

View File

@ -11,6 +11,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfo;
import com.nu.modules.orgapplyinfo.service.IOrgApplyInfoService;
import org.jeecg.common.system.api.ISysBaseAPI;
import org.jeecg.common.system.entity.SysDepartEntity;
import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.model.DepartIdModel;
import org.jeecg.modules.system.model.SysUserSysDepartModel;
@ -109,6 +111,9 @@ public class SysUserController {
@Autowired
private IOrgApplyInfoService orgApplyInfoService;
@Autowired
private ISysBaseAPI sysBaseAPI;
/**
* 获取租户下用户数据支持租户隔离
* @param user
@ -1920,7 +1925,7 @@ public class SysUserController {
try {
SysUser user = JSON.parseObject(jsonObject.toJSONString(), SysUser.class);
SysDepart depart = sysDepartService.getDepartById(user.getOrgCode());
SysDepart depart = sysDepartService.getDepartById(jsonObject.getString("orgId"));
if(depart == null){
return Result.error("未找到机构信息");
}
@ -1947,10 +1952,10 @@ public class SysUserController {
baseCommonService.addLog("添加用户username " +user.getUsername() ,CommonConstant.LOG_TYPE_2, 2);
//修改机构加盟申请信息
OrgApplyInfo orgApplyInfo = new OrgApplyInfo();
orgApplyInfo.setId(depart.getId());
orgApplyInfo.setBuildStatus("5");
orgApplyInfoService.updateById(orgApplyInfo);
SysDepartEntity sysDepartEntity = new SysDepartEntity();
sysDepartEntity.setId(depart.getId());
sysDepartEntity.setOrgStatus("5");
sysBaseAPI.updateById(sysDepartEntity);
result.put("message","初始化成功!账号:" + jsonObject.getString("userName") + " 密码123456");
} catch (Exception e) {

View File

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
@ -12,6 +13,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
import java.util.Objects;
@ -230,6 +232,264 @@ public class SysDepart implements Serializable {
*/
private String picUrl;
/**
* 加盟时间
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "加盟时间")
private java.util.Date franchiseTime;
/**
* 机构状态构建状态1机构加盟小程序2加盟审核管理平台3加盟合同管理平台4平台搭建运维平台5账户初始化管理平台6信息推送公众号
*/
@Dict(dicCode = "org_build_status")
@Excel(name = "机构状态构建状态1、机构加盟【小程序】2、加盟审核【管理平台】3、加盟合同【管理平台】4、平台搭建【运维平台】5、账户初始化【管理平台】6、信息推送【公众号】", width = 15)
@ApiModelProperty(value = "机构状态构建状态1、机构加盟【小程序】2、加盟审核【管理平台】3、加盟合同【管理平台】4、平台搭建【运维平台】5、账户初始化【管理平台】6、信息推送【公众号】")
private java.lang.String orgStatus;
/**
* 合同提交时间
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "合同提交时间")
private java.util.Date htCommitTime;
/**
* 合同提交人
*/
@Excel(name = "合同提交人", width = 15)
@ApiModelProperty(value = "合同提交人")
private java.lang.String htCommitBy;
/**
* 合同附件
*/
@Excel(name = "合同附件", width = 15)
@ApiModelProperty(value = "合同附件")
private java.lang.String contract;
/**
* 合同备注
*/
@Excel(name = "合同备注", width = 15)
@ApiModelProperty(value = "合同备注")
private java.lang.String contractNote;
/**
* 工单状态 0未提交 1待执行 2已回执
*/
@Dict(dicCode = "work_order_status")
private java.lang.String workOrderStatus;
/**
* 工单ID
*/
private java.lang.String workOrderId;
/**
* 回复内容
*/
private java.lang.String replyContent;
/**
* 回复附件
*/
private java.lang.String replyFile;
/**
* 回复时间
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private java.util.Date replyTime;
/**
* 回复人
*/
private java.lang.String handleBy;
/**
* 微信id
*/
@Excel(name = "微信id", width = 15)
@ApiModelProperty(value = "微信id")
private java.lang.String openId;
/**
* 微信名称
*/
@Excel(name = "微信名称", width = 15)
@ApiModelProperty(value = "微信名称")
private java.lang.String wechatName;
/**
* 联系电话
*/
@Excel(name = "联系电话", width = 15)
@ApiModelProperty(value = "联系电话")
private java.lang.String tel;
/**
* 咨询人姓名
*/
@Excel(name = "咨询人姓名", width = 15)
@ApiModelProperty(value = "咨询人姓名")
private java.lang.String name;
/**
* 性别
*/
@Excel(name = "性别", width = 15)
@ApiModelProperty(value = "性别")
private java.lang.String sex;
/**
* 民族
*/
@Excel(name = "民族", width = 15)
@ApiModelProperty(value = "民族")
private java.lang.String national;
/**
* 出生日期
*/
@Excel(name = "出生日期", width = 20, format = "yyyy年MM月dd日")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy年MM月dd日")
@DateTimeFormat(pattern="yyyy年MM月dd日")
@ApiModelProperty(value = "出生日期")
private Date birthDate;
/**
* 住址身份证上
*/
@Excel(name = "住址(身份证上)", width = 15)
@ApiModelProperty(value = "住址(身份证上)")
private java.lang.String idCardAddress;
/**
* 身份证号
*/
@Excel(name = "身份证号", width = 15)
@ApiModelProperty(value = "身份证号")
private java.lang.String idCard;
/**
* 签发机关
*/
@Excel(name = "签发机关", width = 15)
@ApiModelProperty(value = "签发机关")
private java.lang.String issuingAuthority;
/**
* 有效开始日期
*/
@Excel(name = "有效开始日期", width = 20, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "有效开始日期")
private java.util.Date startTime;
/**
* 有效结束日期
*/
@Excel(name = "有效结束日期", width = 20, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "有效结束日期")
private java.util.Date endTime;
/**
* 身份证正面
*/
@Excel(name = "身份证正面", width = 15)
@ApiModelProperty(value = "身份证正面")
private java.lang.String cardZmPath;
/**
* 身份证反面
*/
@Excel(name = "身份证反面", width = 15)
@ApiModelProperty(value = "身份证反面")
private java.lang.String cardFmPath;
/**
* 营业执照照片
*/
@Excel(name = "营业执照照片", width = 15)
@ApiModelProperty(value = "营业执照照片")
private java.lang.String comBusinessLicense;
/**
* 企业名称
*/
@Excel(name = "企业名称", width = 15)
@ApiModelProperty(value = "企业名称")
private java.lang.String comName;
/**
* 企业注册地址
*/
@Excel(name = "企业注册地址", width = 15)
@ApiModelProperty(value = "企业注册地址")
private java.lang.String comRegisterAddress;
/**
* 企业信用代码
*/
@Excel(name = "企业信用代码", width = 15)
@ApiModelProperty(value = "企业信用代码")
private java.lang.String comCreditCode;
/**
* 企业法人
*/
@Excel(name = "企业法人", width = 15)
@ApiModelProperty(value = "企业法人")
private java.lang.String comLegalPerson;
/**
* 机构地址
*/
@Excel(name = "机构地址", width = 15)
@ApiModelProperty(value = "机构地址")
private java.lang.String orgAddress;
/**
* 机构位置坐标经度
*/
@Excel(name = "机构位置坐标:经度", width = 15)
@ApiModelProperty(value = "机构位置坐标:经度")
private String orgCoordinateLo;
/**
* 机构位置坐标纬度
*/
@Excel(name = "机构位置坐标:纬度", width = 15)
@ApiModelProperty(value = "机构位置坐标:纬度")
private String orgCoordinateLa;
/**
* 机构负责人
*/
@Excel(name = "机构负责人", width = 15)
@ApiModelProperty(value = "机构负责人")
private java.lang.String orgLeader;
/**
* 机构负责人电话
*/
@Excel(name = "机构负责人电话", width = 15)
@ApiModelProperty(value = "机构负责人电话")
private java.lang.String orgLeaderPhone;
/**
* 机构楼宇牌号
*/
@Excel(name = "机构楼宇牌号", width = 15)
@ApiModelProperty(value = "机构楼宇牌号")
private java.lang.String orgBuildingNumber;
/**
* 机构房屋性质
*/
@Excel(name = "机构房屋性质", width = 15)
@ApiModelProperty(value = "机构房屋性质")
private java.lang.String orgPropertyType;
/**
* 机构建筑面积
*/
@Excel(name = "机构建筑面积", width = 15)
@ApiModelProperty(value = "机构建筑面积")
private java.lang.Double orgBuildingArea;
/**
* 机构省份 sys_category.id
*/
@Excel(name = "机构省份", width = 15)
@ApiModelProperty(value = "机构省份")
@Dict(dictTable = "sys_category", dicCode = "id", dicText = "name")
private java.lang.String orgProvince;
/**
* 机构城市 sys_category.id
*/
@Excel(name = "机构城市", width = 15)
@ApiModelProperty(value = "机构城市")
@Dict(dictTable = "sys_category", dicCode = "id", dicText = "name")
private java.lang.String orgCity;
/**
* 机构区域 sys_category.id
*/
@Excel(name = "机构区域", width = 15)
@ApiModelProperty(value = "机构区域")
@Dict(dictTable = "sys_category", dicCode = "id", dicText = "name")
private java.lang.String orgDistrict;
//update-begin---author:wangshuai ---date:20200308 for[JTC-119]在部门管理菜单下设置部门负责人新增字段负责人ids和旧的负责人ids
/**
* 部门负责人的ids
@ -243,66 +503,17 @@ public class SysDepart implements Serializable {
private String oldDirectorUserIds;
//update-end---author:wangshuai ---date:20200308 for[JTC-119]新增字段负责人ids和旧的负责人ids
/**
* 重写equals方法
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
if (!super.equals(o)) {
return false;
}
SysDepart depart = (SysDepart) o;
return Objects.equals(id, depart.id) &&
Objects.equals(parentId, depart.parentId) &&
Objects.equals(departName, depart.departName) &&
Objects.equals(departNameEn, depart.departNameEn) &&
Objects.equals(departNameAbbr, depart.departNameAbbr) &&
Objects.equals(departOrder, depart.departOrder) &&
Objects.equals(description, depart.description) &&
Objects.equals(orgCategory, depart.orgCategory) &&
Objects.equals(orgType, depart.orgType) &&
Objects.equals(orgCode, depart.orgCode) &&
Objects.equals(url, depart.url) &&
Objects.equals(contextPath, depart.contextPath) &&
Objects.equals(izDirectiveMain, depart.izDirectiveMain) &&
Objects.equals(izElderTagMain, depart.izElderTagMain) &&
Objects.equals(mediaUrl, depart.mediaUrl) &&
Objects.equals(province, depart.province) &&
Objects.equals(city, depart.city) &&
Objects.equals(district, depart.district) &&
Objects.equals(operationStartTime, depart.operationStartTime) &&
Objects.equals(operationEndTime, depart.operationEndTime) &&
Objects.equals(contractStartTime, depart.contractStartTime) &&
Objects.equals(contractEndTime, depart.contractEndTime) &&
Objects.equals(mobile, depart.mobile) &&
Objects.equals(fax, depart.fax) &&
Objects.equals(address, depart.address) &&
Objects.equals(memo, depart.memo) &&
Objects.equals(status, depart.status) &&
Objects.equals(delFlag, depart.delFlag) &&
Objects.equals(createBy, depart.createBy) &&
Objects.equals(createTime, depart.createTime) &&
Objects.equals(updateBy, depart.updateBy) &&
Objects.equals(tenantId, depart.tenantId) &&
Objects.equals(payableAmount, depart.payableAmount) &&
Objects.equals(updateTime, depart.updateTime);
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SysDepart sysDepart = (SysDepart) o;
return Objects.equals(id, sysDepart.id) && Objects.equals(parentId, sysDepart.parentId) && Objects.equals(departName, sysDepart.departName) && Objects.equals(departNameEn, sysDepart.departNameEn) && Objects.equals(departNameAbbr, sysDepart.departNameAbbr) && Objects.equals(departOrder, sysDepart.departOrder) && Objects.equals(description, sysDepart.description) && Objects.equals(orgCategory, sysDepart.orgCategory) && Objects.equals(orgType, sysDepart.orgType) && Objects.equals(orgCode, sysDepart.orgCode) && Objects.equals(url, sysDepart.url) && Objects.equals(contextPath, sysDepart.contextPath) && Objects.equals(izDirectiveMain, sysDepart.izDirectiveMain) && Objects.equals(izElderTagMain, sysDepart.izElderTagMain) && Objects.equals(mediaUrl, sysDepart.mediaUrl) && Objects.equals(province, sysDepart.province) && Objects.equals(city, sysDepart.city) && Objects.equals(district, sysDepart.district) && Objects.equals(platType, sysDepart.platType) && Objects.equals(operationStartTime, sysDepart.operationStartTime) && Objects.equals(operationEndTime, sysDepart.operationEndTime) && Objects.equals(contractStartTime, sysDepart.contractStartTime) && Objects.equals(contractEndTime, sysDepart.contractEndTime) && Objects.equals(mobile, sysDepart.mobile) && Objects.equals(fax, sysDepart.fax) && Objects.equals(address, sysDepart.address) && Objects.equals(memo, sysDepart.memo) && Objects.equals(payableAmount, sysDepart.payableAmount) && Objects.equals(status, sysDepart.status) && Objects.equals(delFlag, sysDepart.delFlag) && Objects.equals(qywxIdentifier, sysDepart.qywxIdentifier) && Objects.equals(dingIdentifier, sysDepart.dingIdentifier) && Objects.equals(createBy, sysDepart.createBy) && Objects.equals(createTime, sysDepart.createTime) && Objects.equals(updateBy, sysDepart.updateBy) && Objects.equals(updateTime, sysDepart.updateTime) && Objects.equals(tenantId, sysDepart.tenantId) && Objects.equals(izLeaf, sysDepart.izLeaf) && Objects.equals(serverUrl, sysDepart.serverUrl) && Objects.equals(shareUrl, sysDepart.shareUrl) && Objects.equals(picUrl, sysDepart.picUrl) && Objects.equals(franchiseTime, sysDepart.franchiseTime) && Objects.equals(orgStatus, sysDepart.orgStatus) && Objects.equals(htCommitTime, sysDepart.htCommitTime) && Objects.equals(htCommitBy, sysDepart.htCommitBy) && Objects.equals(contract, sysDepart.contract) && Objects.equals(contractNote, sysDepart.contractNote) && Objects.equals(workOrderStatus, sysDepart.workOrderStatus) && Objects.equals(workOrderId, sysDepart.workOrderId) && Objects.equals(replyContent, sysDepart.replyContent) && Objects.equals(replyFile, sysDepart.replyFile) && Objects.equals(replyTime, sysDepart.replyTime) && Objects.equals(handleBy, sysDepart.handleBy) && Objects.equals(openId, sysDepart.openId) && Objects.equals(wechatName, sysDepart.wechatName) && Objects.equals(tel, sysDepart.tel) && Objects.equals(name, sysDepart.name) && Objects.equals(sex, sysDepart.sex) && Objects.equals(national, sysDepart.national) && Objects.equals(birthDate, sysDepart.birthDate) && Objects.equals(idCardAddress, sysDepart.idCardAddress) && Objects.equals(idCard, sysDepart.idCard) && Objects.equals(issuingAuthority, sysDepart.issuingAuthority) && Objects.equals(startTime, sysDepart.startTime) && Objects.equals(endTime, sysDepart.endTime) && Objects.equals(cardZmPath, sysDepart.cardZmPath) && Objects.equals(cardFmPath, sysDepart.cardFmPath) && Objects.equals(comBusinessLicense, sysDepart.comBusinessLicense) && Objects.equals(comName, sysDepart.comName) && Objects.equals(comRegisterAddress, sysDepart.comRegisterAddress) && Objects.equals(comCreditCode, sysDepart.comCreditCode) && Objects.equals(comLegalPerson, sysDepart.comLegalPerson) && Objects.equals(orgAddress, sysDepart.orgAddress) && Objects.equals(orgCoordinateLo, sysDepart.orgCoordinateLo) && Objects.equals(orgCoordinateLa, sysDepart.orgCoordinateLa) && Objects.equals(orgLeader, sysDepart.orgLeader) && Objects.equals(orgLeaderPhone, sysDepart.orgLeaderPhone) && Objects.equals(orgBuildingNumber, sysDepart.orgBuildingNumber) && Objects.equals(orgPropertyType, sysDepart.orgPropertyType) && Objects.equals(orgBuildingArea, sysDepart.orgBuildingArea) && Objects.equals(orgProvince, sysDepart.orgProvince) && Objects.equals(orgCity, sysDepart.orgCity) && Objects.equals(orgDistrict, sysDepart.orgDistrict);
}
/**
* 重写hashCode方法
*/
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), id, parentId, departName,
departNameEn, departNameAbbr, departOrder, description, orgCategory,
orgType, orgCode, url, contextPath, izDirectiveMain,izElderTagMain, mediaUrl, province, city, district, operationStartTime,
operationEndTime, contractStartTime, contractEndTime, mobile, fax, address, memo, status,
delFlag, createBy, createTime, updateBy, updateTime, tenantId, payableAmount);
return Objects.hash(id, parentId, departName, departNameEn, departNameAbbr, departOrder, description, orgCategory, orgType, orgCode, url, contextPath, izDirectiveMain, izElderTagMain, mediaUrl, province, city, district, platType, operationStartTime, operationEndTime, contractStartTime, contractEndTime, mobile, fax, address, memo, payableAmount, status, delFlag, qywxIdentifier, dingIdentifier, createBy, createTime, updateBy, updateTime, tenantId, izLeaf, serverUrl, shareUrl, picUrl, franchiseTime, orgStatus, htCommitTime, htCommitBy, contract, contractNote, workOrderStatus, workOrderId, replyContent, replyFile, replyTime, handleBy, openId, wechatName, tel, name, sex, national, birthDate, idCardAddress, idCard, issuingAuthority, startTime, endTime, cardZmPath, cardFmPath, comBusinessLicense, comName, comRegisterAddress, comCreditCode, comLegalPerson, orgAddress, orgCoordinateLo, orgCoordinateLa, orgLeader, orgLeaderPhone, orgBuildingNumber, orgPropertyType, orgBuildingArea, orgProvince, orgCity, orgDistrict);
}
}

View File

@ -211,4 +211,5 @@ public class SysUser implements Serializable {
*/
@TableField(exist = false)
private boolean izBindThird;
}

View File

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.system.entity.SysDepartEntity;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.model.DepartIdModel;
import org.jeecg.modules.system.model.SysDepartTreeModel;
@ -243,4 +244,6 @@ public interface ISysDepartService extends IService<SysDepart>{
void changeDirectiveMain(String orgCode);
void changeElderTagMain(String orgCode);
List<SysDepartEntity> queryAllAuditPassOrg(SysDepartEntity queryParams);
}

View File

@ -1,7 +1,6 @@
package org.jeecg.modules.system.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.ListUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
@ -14,7 +13,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.base.Joiner;
import com.google.common.collect.Maps;
import org.apache.commons.compress.utils.Lists;
import org.apache.commons.lang3.ArrayUtils;
import org.jeecg.common.system.api.ISysBaseAPI;
import org.jeecg.common.system.entity.SysDepartEntity;
import org.jeecg.modules.message.entity.SysMessageTemplate;
@ -57,9 +55,6 @@ import org.jeecg.common.util.dynamic.db.FreemarkerParseFactory;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.firewall.SqlInjection.IDictTableWhiteListHandler;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.mapper.*;
import org.jeecg.modules.system.service.*;
import org.jetbrains.annotations.Nullable;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -73,7 +68,6 @@ import org.springframework.util.PathMatcher;
import javax.annotation.Resource;
import javax.sql.DataSource;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.sql.Connection;
@ -1970,12 +1964,24 @@ public class SysBaseApiImpl implements ISysBaseAPI {
}
@Override
public SysDepartModel selectDepartById(String id) {
public SysDepartEntity selectDepartById(String id) {
SysDepart depart = sysDepartService.getDepartById(id);
SysDepartModel sysDepartModel = new SysDepartModel();
SysDepartEntity result = new SysDepartEntity();
if (depart != null) {
BeanUtils.copyProperties(depart, sysDepartModel);
BeanUtils.copyProperties(depart, result);
}
return sysDepartModel;
return result;
}
@Override
public List<SysDepartEntity> queryAllAuditPassOrg(SysDepartEntity queryParams){
return sysDepartService.queryAllAuditPassOrg(queryParams);
}
@Override
public void updateById(SysDepartEntity sysDepartEntity) {
SysDepart sysDepart = new SysDepart();
BeanUtils.copyProperties(sysDepartEntity,sysDepart);
sysDepartService.updateById(sysDepart);
}
}