parent
0641ae05ac
commit
89952de3a3
|
@ -0,0 +1,8 @@
|
|||
package com.nu.modules.advisoryinfo.api;
|
||||
|
||||
import com.nu.modules.advisoryinfo.entity.AdvisoryInfoEntity;
|
||||
|
||||
public interface IAdvisoryInfoApi {
|
||||
|
||||
AdvisoryInfoEntity getAdvisoryInfo(String tel);
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
package com.nu.modules.advisoryinfo.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.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 咨询信息
|
||||
* @Author: 张明远
|
||||
* @Date: 2025-04-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class AdvisoryInfoEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**平台id*/
|
||||
private Long platId;
|
||||
/**微信id*/
|
||||
private String openId;
|
||||
/**微信名称*/
|
||||
private String wechatName;
|
||||
/**咨询人姓名*/
|
||||
private String name;
|
||||
/**昵称*/
|
||||
private String nickName;
|
||||
/**头像*/
|
||||
private String avatar;
|
||||
/**性别*/
|
||||
private String sex;
|
||||
/**联系电话*/
|
||||
private String tel;
|
||||
/**咨询类型 1入住nu 2入驻机构 3我要加盟*/
|
||||
private String advisoryType;
|
||||
/**状态 1审核中 2审核完成 3驳回*/
|
||||
private String status;
|
||||
/**审核备注*/
|
||||
private String content;
|
||||
/**机构访问地址*/
|
||||
private String serverUrl;
|
||||
/**创建人*/
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
private Date updateTime;
|
||||
/**所属部门*/
|
||||
private String sysOrgCode;
|
||||
|
||||
/**老人姓名*/
|
||||
private String oldManName;
|
||||
/**老人年龄*/
|
||||
private String oldManAge;
|
||||
/**医保类型*/
|
||||
private String medicalInsuranceType;
|
||||
/**老人性别*/
|
||||
private String oldManSex;
|
||||
/**报销类型*/
|
||||
private String reimbType;
|
||||
/**护理单元*/
|
||||
private String nuId;
|
||||
/**是否入住0否 1是(是否入住过)*/
|
||||
private String izCheckIn;
|
||||
|
||||
private String izYg;//是否是员工 0否 1是
|
||||
private String izJs;//是否是家属 0否 1是
|
||||
private String izJg;//是否是机构 0否 1是
|
||||
|
||||
private String advisoryTypeName;
|
||||
private String sexName;
|
||||
private String sysOrgCodeName;
|
||||
private String statusName;
|
||||
|
||||
private String oldManSexName;
|
||||
private String medicalInsuranceTypeName;
|
||||
private String reimbTypeName;
|
||||
private String token;
|
||||
|
||||
}
|
|
@ -1,8 +1,11 @@
|
|||
package com.nu.modules.IssueInfo.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import com.nu.modules.IssueInfo.entity.IssueInfo;
|
||||
|
@ -14,6 +17,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
@ -22,126 +26,130 @@ import io.swagger.annotations.ApiOperation;
|
|||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
/**
|
||||
* @Description: 发版日志
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-07-01
|
||||
* @Date: 2025-07-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="发版日志")
|
||||
@Api(tags = "发版日志")
|
||||
@RestController
|
||||
//@RequestMapping("/IssueInfo/nuIssueInfo")
|
||||
@RequestMapping("/admin/issueInfo")
|
||||
@Slf4j
|
||||
public class IssueInfoController extends JeecgController<IssueInfo, IIssueInfoService> {
|
||||
@Autowired
|
||||
private IIssueInfoService nuIssueInfoService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuIssueInfo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "发版日志-分页列表查询")
|
||||
@ApiOperation(value="发版日志-分页列表查询", notes="发版日志-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<IssueInfo>> queryPageList(IssueInfo nuIssueInfo,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<IssueInfo> queryWrapper = QueryGenerator.initQueryWrapper(nuIssueInfo, req.getParameterMap());
|
||||
Page<IssueInfo> page = new Page<IssueInfo>(pageNo, pageSize);
|
||||
IPage<IssueInfo> pageList = nuIssueInfoService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param nuIssueInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "发版日志-添加")
|
||||
@ApiOperation(value="发版日志-添加", notes="发版日志-添加")
|
||||
@RequiresPermissions("IssueInfo:nu_issue_info:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody IssueInfo nuIssueInfo) {
|
||||
nuIssueInfoService.save(nuIssueInfo);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param nuIssueInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "发版日志-编辑")
|
||||
@ApiOperation(value="发版日志-编辑", notes="发版日志-编辑")
|
||||
@RequiresPermissions("IssueInfo:nu_issue_info:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody IssueInfo nuIssueInfo) {
|
||||
nuIssueInfoService.updateById(nuIssueInfo);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "发版日志-通过id删除")
|
||||
@ApiOperation(value="发版日志-通过id删除", notes="发版日志-通过id删除")
|
||||
@RequiresPermissions("IssueInfo:nu_issue_info:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
nuIssueInfoService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "发版日志-批量删除")
|
||||
@ApiOperation(value="发版日志-批量删除", notes="发版日志-批量删除")
|
||||
@RequiresPermissions("IssueInfo:nu_issue_info:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.nuIssueInfoService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "发版日志-通过id查询")
|
||||
@ApiOperation(value="发版日志-通过id查询", notes="发版日志-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<IssueInfo> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
IssueInfo nuIssueInfo = nuIssueInfoService.getById(id);
|
||||
if(nuIssueInfo==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuIssueInfo);
|
||||
}
|
||||
@Autowired
|
||||
private IIssueInfoService nuIssueInfoService;
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuIssueInfo
|
||||
*/
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuIssueInfo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "发版日志-分页列表查询")
|
||||
@ApiOperation(value = "发版日志-分页列表查询", notes = "发版日志-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<IssueInfo>> queryPageList(IssueInfo nuIssueInfo,
|
||||
@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
|
||||
customeRuleMap.put("issueType", QueryRuleEnum.LIKE_WITH_OR);
|
||||
QueryWrapper<IssueInfo> queryWrapper = QueryGenerator.initQueryWrapper(nuIssueInfo, req.getParameterMap(), customeRuleMap);
|
||||
Page<IssueInfo> page = new Page<IssueInfo>(pageNo, pageSize);
|
||||
IPage<IssueInfo> pageList = nuIssueInfoService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param nuIssueInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "发版日志-添加")
|
||||
@ApiOperation(value = "发版日志-添加", notes = "发版日志-添加")
|
||||
@RequiresPermissions("IssueInfo:nu_issue_info:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody IssueInfo nuIssueInfo) {
|
||||
nuIssueInfoService.save(nuIssueInfo);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param nuIssueInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "发版日志-编辑")
|
||||
@ApiOperation(value = "发版日志-编辑", notes = "发版日志-编辑")
|
||||
@RequiresPermissions("IssueInfo:nu_issue_info:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody IssueInfo nuIssueInfo) {
|
||||
nuIssueInfoService.updateById(nuIssueInfo);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "发版日志-通过id删除")
|
||||
@ApiOperation(value = "发版日志-通过id删除", notes = "发版日志-通过id删除")
|
||||
@RequiresPermissions("IssueInfo:nu_issue_info:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
||||
nuIssueInfoService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "发版日志-批量删除")
|
||||
@ApiOperation(value = "发版日志-批量删除", notes = "发版日志-批量删除")
|
||||
@RequiresPermissions("IssueInfo:nu_issue_info:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||
this.nuIssueInfoService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "发版日志-通过id查询")
|
||||
@ApiOperation(value = "发版日志-通过id查询", notes = "发版日志-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<IssueInfo> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
IssueInfo nuIssueInfo = nuIssueInfoService.getById(id);
|
||||
if (nuIssueInfo == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuIssueInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuIssueInfo
|
||||
*/
|
||||
@RequiresPermissions("IssueInfo:nu_issue_info:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, IssueInfo nuIssueInfo) {
|
||||
|
@ -149,12 +157,12 @@ public class IssueInfoController extends JeecgController<IssueInfo, IIssueInfoSe
|
|||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("IssueInfo:nu_issue_info:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.nu.modules.IssueInfo.mapper;
|
|||
|
||||
import com.nu.modules.IssueInfo.entity.IssueInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Description: 发版日志
|
||||
|
@ -11,4 +12,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface IssueInfoMapper extends BaseMapper<IssueInfo> {
|
||||
|
||||
int realDelete(@Param("id") String id);
|
||||
}
|
||||
|
|
|
@ -2,4 +2,7 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.IssueInfo.mapper.IssueInfoMapper">
|
||||
|
||||
</mapper>
|
||||
<delete id="realDelete">
|
||||
delete from nu_issue_info where id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
|
@ -11,4 +11,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
*/
|
||||
public interface IIssueInfoService extends IService<IssueInfo> {
|
||||
|
||||
IssueInfo get(String dataSourceCode, String id);
|
||||
|
||||
int realDelete(String id);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.nu.modules.IssueInfo.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nu.modules.IssueInfo.entity.IssueInfo;
|
||||
import com.nu.modules.IssueInfo.mapper.IssueInfoMapper;
|
||||
import com.nu.modules.IssueInfo.service.IIssueInfoService;
|
||||
|
@ -16,4 +18,16 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
@Service
|
||||
public class IssueInfoServiceImpl extends ServiceImpl<IssueInfoMapper, IssueInfo> implements IIssueInfoService {
|
||||
|
||||
@Override
|
||||
@DS("#dataSourceCode")
|
||||
public IssueInfo get(String dataSourceCode, String id) {
|
||||
QueryWrapper<IssueInfo> qw = new QueryWrapper<>();
|
||||
qw.eq("id",id);
|
||||
return baseMapper.selectOne(qw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int realDelete(String id) {
|
||||
return baseMapper.realDelete(id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,12 +5,15 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||
import com.nu.modules.NuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
||||
import com.nu.modules.NuBizAdvisoryInfo.mapper.NuBizAdvisoryInfoMapper;
|
||||
import com.nu.modules.NuBizAdvisoryInfo.service.INuBizAdvisoryInfoService;
|
||||
import com.nu.modules.advisoryinfo.api.IAdvisoryInfoApi;
|
||||
import com.nu.modules.advisoryinfo.entity.AdvisoryInfoEntity;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.system.util.JwtUtil;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -29,7 +32,7 @@ import java.util.List;
|
|||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class NuBizAdvisoryInfoServiceImpl extends ServiceImpl<NuBizAdvisoryInfoMapper, NuBizAdvisoryInfo> implements INuBizAdvisoryInfoService {
|
||||
public class NuBizAdvisoryInfoServiceImpl extends ServiceImpl<NuBizAdvisoryInfoMapper, NuBizAdvisoryInfo> implements INuBizAdvisoryInfoService, IAdvisoryInfoApi {
|
||||
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
|
@ -116,4 +119,18 @@ public class NuBizAdvisoryInfoServiceImpl extends ServiceImpl<NuBizAdvisoryInfoM
|
|||
}
|
||||
baseMapper.updateById(nuBizAdvisoryInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdvisoryInfoEntity getAdvisoryInfo(String tel) {
|
||||
QueryWrapper<NuBizAdvisoryInfo> qw = new QueryWrapper<>();
|
||||
qw.eq("tel", tel);
|
||||
NuBizAdvisoryInfo nuBizAdvisoryInfo = baseMapper.selectOne(qw);
|
||||
if (nuBizAdvisoryInfo != null) {
|
||||
AdvisoryInfoEntity advisoryInfoEntity = new AdvisoryInfoEntity();
|
||||
BeanUtils.copyProperties(nuBizAdvisoryInfo, advisoryInfoEntity);
|
||||
return advisoryInfoEntity;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ public class OrgApplyInfoController extends JeecgController<OrgApplyInfo, IOrgAp
|
|||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* 编辑、审批
|
||||
*
|
||||
* @param orgApplyInfo
|
||||
* @return
|
||||
|
@ -136,7 +136,22 @@ public class OrgApplyInfoController extends JeecgController<OrgApplyInfo, IOrgAp
|
|||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody OrgApplyInfo orgApplyInfo) {
|
||||
orgApplyInfoService.audit(orgApplyInfo);
|
||||
return Result.OK("编辑成功!");
|
||||
return Result.OK("保存成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 合同上传环节-保存并提交
|
||||
*
|
||||
* @param orgApplyInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "机构加盟申请信息表-合同上传环节-保存并提交")
|
||||
@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) {
|
||||
orgApplyInfoService.submitContract(orgApplyInfo);
|
||||
return Result.OK("提交成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,8 +34,8 @@ public class OrgApplyInfo implements Serializable {
|
|||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**pkId 同表id*/
|
||||
@ApiModelProperty(value = "pkId")
|
||||
/**机构ID orgId 同机构相同(申请时生成数据的id)*/
|
||||
@ApiModelProperty(value = "机构ID orgId 同机构相同(申请时生成数据的id)")
|
||||
private java.lang.String pkId;
|
||||
/**微信id*/
|
||||
@Excel(name = "微信id", width = 15)
|
||||
|
@ -55,10 +55,19 @@ public class OrgApplyInfo implements Serializable {
|
|||
@ApiModelProperty(value = "审批状态")
|
||||
private java.lang.String status;
|
||||
/**变更状态 0可修改 1不可修改 */
|
||||
@Dict(dicCode = "org_apply_status")
|
||||
@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 = "审核备注")
|
||||
|
@ -200,7 +209,14 @@ 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;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String orgProvince_dictText;
|
||||
@TableField(exist = false)
|
||||
|
|
|
@ -17,4 +17,6 @@ public interface IOrgApplyInfoService extends IService<OrgApplyInfo> {
|
|||
List<Map<String,Object>> getModifyInfo(OrgApplyInfo orgApplyInfo);
|
||||
|
||||
void audit(OrgApplyInfo orgApplyInfo);
|
||||
|
||||
void submitContract(OrgApplyInfo orgApplyInfo);
|
||||
}
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
package com.nu.modules.orgapplyinfo.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.dto.OrgApplyInfoMQDto;
|
||||
import com.nu.modules.orgapplyinfo.api.IOrgApplyInfoApi;
|
||||
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfo;
|
||||
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfoApiEntity;
|
||||
import com.nu.modules.orgapplyinfo.mapper.OrgApplyInfoMapper;
|
||||
import com.nu.modules.orgapplyinfo.service.IOrgApplyInfoService;
|
||||
import com.nu.utils.DictUtils;
|
||||
import org.apache.commons.collections.ListUtils;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import com.nu.utils.RabbitMQUtil;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -34,6 +34,8 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
|
|||
|
||||
@Autowired
|
||||
private DictUtils dictUtils;
|
||||
@Autowired
|
||||
private RabbitMQUtil rabbitMQUtil;
|
||||
|
||||
@Override
|
||||
public OrgApplyInfoApiEntity insert(OrgApplyInfoApiEntity orgApplyInfoApiEntity) {
|
||||
|
@ -164,6 +166,8 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
|
|||
|
||||
@Override
|
||||
public void audit(OrgApplyInfo orgApplyInfo) {
|
||||
//机构加盟审核时传过来的status是2/3
|
||||
//机构信息变更时传过来的status是modifyPass和modifyFail
|
||||
orgApplyInfo.setAuditTime(new Date());
|
||||
OrgApplyInfo usedData = new OrgApplyInfo();
|
||||
//机构信息变更审核通过
|
||||
|
@ -202,12 +206,51 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
|
|||
baseMapper.updateById(orgApplyInfo);
|
||||
|
||||
} else {
|
||||
if ("2".equals(orgApplyInfo.getStatus()) && orgApplyInfo.getFranchiseTime() == null) {
|
||||
orgApplyInfo.setFranchiseTime(new Date());
|
||||
//buildStatus == ‘2’时才是审批流程
|
||||
if ("2".equals(orgApplyInfo.getBuildStatus())) {
|
||||
if ("2".equals(orgApplyInfo.getStatus()) && orgApplyInfo.getFranchiseTime() == null) {
|
||||
//记录机构加盟时间
|
||||
orgApplyInfo.setFranchiseTime(new Date());
|
||||
}
|
||||
if ("2".equals(orgApplyInfo.getStatus())) {
|
||||
//机构信息是否可修改状态置为“可修改”
|
||||
orgApplyInfo.setModifyStatus("0");
|
||||
//将机构的构建状态置为“加盟合同”
|
||||
orgApplyInfo.setBuildStatus("3");
|
||||
|
||||
}
|
||||
}
|
||||
//审批完成后的平台搭建流程
|
||||
else {
|
||||
if ("contractSave".equals(orgApplyInfo.getBuildStatusVal())) {
|
||||
//合同上传步骤 - 保存为草稿 暂无特殊处理
|
||||
}
|
||||
if ("contractSubmit".equals(orgApplyInfo.getBuildStatusVal())) {
|
||||
//合同上传步骤 - 保存并提交
|
||||
//将buildStatus置为“平台搭建”状态
|
||||
orgApplyInfo.setBuildStatus("4");
|
||||
}
|
||||
}
|
||||
//机构加盟审批流程
|
||||
baseMapper.updateById(orgApplyInfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@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());
|
||||
//运维mq收到后 1、自动创建新的机构、机构附加信息 2、生成运维平台工单
|
||||
rabbitMQUtil.sendToExchange("hldy.orgApply.build", "hldy.orgApply.build", orgApplyInfoMQDto);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package com.nu.mq.IssueInfo.exceptionhandler;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.AmqpRejectAndDontRequeueException;
|
||||
import org.springframework.amqp.core.Message;
|
||||
import org.springframework.amqp.rabbit.listener.api.RabbitListenerErrorHandler;
|
||||
import org.springframework.amqp.rabbit.support.ListenerExecutionFailedException;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
@Component("issueInfoMQErrorHandler")
|
||||
public class IssueInfoMQExceptionHandler implements RabbitListenerErrorHandler {
|
||||
|
||||
@Override
|
||||
public Object handleError(Message message, org.springframework.messaging.Message<?> message1, ListenerExecutionFailedException e) {
|
||||
log.error("MQ消息处理失败 | 消息体: {} | 异常原因: {}", new String(message.getBody()), e.getCause().getMessage());
|
||||
|
||||
// 根据异常类型选择处理策略
|
||||
// if (isRetryable(e)) {
|
||||
// // 可重试异常:抛出异常触发重试
|
||||
// throw e;
|
||||
// } else {
|
||||
// 不可恢复异常:拒绝消息且不重新入队
|
||||
throw new AmqpRejectAndDontRequeueException("消息处理失败且禁止重试", e);
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.nu.mq.IssueInfo.listener;
|
||||
|
||||
import com.nu.modules.IssueInfo.entity.IssueInfo;
|
||||
import com.nu.modules.IssueInfo.service.IIssueInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.core.ExchangeTypes;
|
||||
import org.springframework.amqp.rabbit.annotation.Exchange;
|
||||
import org.springframework.amqp.rabbit.annotation.Queue;
|
||||
import org.springframework.amqp.rabbit.annotation.QueueBinding;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class IssueInfoMQListener {
|
||||
|
||||
@Autowired
|
||||
private IIssueInfoService issueInfoService;
|
||||
|
||||
@RabbitListener(bindings = @QueueBinding(value = @Queue(name = "hldy.fbrz.sync", durable = "true"),
|
||||
exchange = @Exchange(name = "hldy.fbrz.sync", type = ExchangeTypes.DIRECT),
|
||||
key = "hldy.fbrz.sync"), errorHandler = "issueInfoMQErrorHandler")
|
||||
public void handleMessage(String id) {
|
||||
IssueInfo data = issueInfoService.get("devops", id);
|
||||
//物理删除数据
|
||||
issueInfoService.realDelete(id);
|
||||
issueInfoService.save(data);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.nu.modules.pad.api;
|
||||
|
||||
import com.nu.modules.advisoryinfo.api.IAdvisoryInfoApi;
|
||||
import com.nu.modules.advisoryinfo.entity.AdvisoryInfoEntity;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/pad/loginApi")
|
||||
public class PadLoginApi {
|
||||
|
||||
@Autowired
|
||||
private IAdvisoryInfoApi advisoryInfoApi;
|
||||
|
||||
/**
|
||||
* 根据电话号获取信息
|
||||
* @param tel
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getAdvisoryInfo")
|
||||
public Result<AdvisoryInfoEntity> getAdvisoryInfo(@RequestParam("tel") String tel){
|
||||
AdvisoryInfoEntity advisoryInfo = advisoryInfoApi.getAdvisoryInfo(tel);
|
||||
return Result.ok(advisoryInfo);
|
||||
}
|
||||
}
|
|
@ -112,8 +112,9 @@ public class ShiroConfig {
|
|||
|
||||
filterChainDefinitionMap.put("/sys/dict/getDictItems/**", "anon");//获取字典数据
|
||||
filterChainDefinitionMap.put("/sys/sysDepart/queryInstitutionsList", "anon");//授权接口排除
|
||||
filterChainDefinitionMap.put("/h5Api/nuBizAdvisoryInfo/**", "anon"); //授权接口排除
|
||||
filterChainDefinitionMap.put("/admin/h5Api/nuBizAdvisoryInfo/**", "anon"); //授权接口排除
|
||||
filterChainDefinitionMap.put("/weixin/**", "anon"); //授权接口排除
|
||||
filterChainDefinitionMap.put("/api/pad/loginApi/**", "anon"); //pad登录-信息获取接口
|
||||
|
||||
|
||||
filterChainDefinitionMap.put("/sys/getLoginQrcode/**", "anon"); //登录二维码
|
||||
|
|
|
@ -0,0 +1,217 @@
|
|||
package com.nu.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 机构加盟
|
||||
* @Author: 张明远
|
||||
* @Date: 2025-07-08
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class OrgApplyInfoMQDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 机构ID orgId 同机构相同(申请时生成数据的id)
|
||||
*/
|
||||
private String pkId;
|
||||
/**
|
||||
* 微信id
|
||||
*/
|
||||
private String openId;
|
||||
/**
|
||||
* 微信名称
|
||||
*/
|
||||
private String wechatName;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String tel;
|
||||
/**
|
||||
* 状态 1审核中 2审核完成 3驳回
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 变更状态 0可修改 1不可修改
|
||||
*/
|
||||
private String modifyStatus;
|
||||
/**
|
||||
* 构建状态构建状态1、机构加盟【小程序】2、加盟审核【管理平台】3、加盟合同【管理平台】4、平台搭建【运维平台】5、账户初始化【管理平台】6、信息推送【公众号】
|
||||
*/
|
||||
private String buildStatus;
|
||||
|
||||
//构建状态前后台处理逻辑字段
|
||||
private String buildStatusVal;
|
||||
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
private java.util.Date createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新日期
|
||||
*/
|
||||
private java.util.Date updateTime;
|
||||
/**
|
||||
* 机构是否入驻0否 1是(是否入驻过)
|
||||
*/
|
||||
private String izEntry;
|
||||
/**
|
||||
* 咨询人姓名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private String sex;
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
private String national;
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
private java.util.Date birthDate;
|
||||
/**
|
||||
* 住址(身份证上)
|
||||
*/
|
||||
private String idCardAddress;
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idCard;
|
||||
/**
|
||||
* 签发机关
|
||||
*/
|
||||
private String issuingAuthority;
|
||||
/**
|
||||
* 有效开始日期
|
||||
*/
|
||||
private java.util.Date startTime;
|
||||
/**
|
||||
* 有效结束日期
|
||||
*/
|
||||
private java.util.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 java.util.Date commitTime;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private java.util.Date auditTime;
|
||||
|
||||
/**
|
||||
* 加盟时间
|
||||
*/
|
||||
private java.util.Date franchiseTime;
|
||||
|
||||
//加盟上传合同操作人姓名
|
||||
private String operateBy;
|
||||
//加盟上传合同操作人电话
|
||||
private String operateTelephone;
|
||||
//加盟上传合同操作人邮箱
|
||||
private String operateEmail;
|
||||
|
||||
|
||||
}
|
|
@ -203,7 +203,7 @@ public class SysDepart implements Serializable {
|
|||
*/
|
||||
private String serverUrl;
|
||||
/**
|
||||
* 各机构服务器后台接口地址
|
||||
* 机构图片
|
||||
*/
|
||||
private String picUrl;
|
||||
|
||||
|
|
|
@ -187,10 +187,16 @@ spring:
|
|||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# 多数据源配置
|
||||
# multi-datasource1:
|
||||
# url: jdbc:mysql://1.92.152.160:33061/nursing_unit?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
# url: jdbc:mysql://1.92.152.160:33061/nursing_unitMediaManageMQListener?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
# username: root
|
||||
# password: root
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
#运维只读账号
|
||||
devops:
|
||||
url: jdbc:mysql://192.168.2.199:3306/nu_devops?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: nudoro
|
||||
password: nudoro
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
#redis 配置
|
||||
redis:
|
||||
database: 0
|
||||
|
|
|
@ -191,6 +191,12 @@ spring:
|
|||
#username: root
|
||||
#password: root
|
||||
#driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
#运维只读账号
|
||||
devops:
|
||||
url: jdbc:mysql://mysql8-prod:3306/nu_devops?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: nudoro
|
||||
password: nudoro
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
#redis 配置
|
||||
redis:
|
||||
database: 1
|
||||
|
|
Loading…
Reference in New Issue