parent
452c00f7e8
commit
e68914bd65
|
|
@ -1,8 +1,21 @@
|
|||
package com.nu.modules.advisoryinfo.api;
|
||||
|
||||
import com.nu.entity.NuBizAdvisoryInfoEntity;
|
||||
import com.nu.modules.advisoryinfo.entity.AdvisoryInfoEntity;
|
||||
|
||||
public interface IAdvisoryInfoApi {
|
||||
|
||||
AdvisoryInfoEntity getAdvisoryInfo(String tel);
|
||||
|
||||
void saveData(NuBizAdvisoryInfoEntity nuBizAdvisoryInfo);
|
||||
|
||||
void handlePlatId(NuBizAdvisoryInfoEntity nuBizAdvisoryInfo);
|
||||
|
||||
NuBizAdvisoryInfoEntity queryByOpenId(String openId);
|
||||
|
||||
NuBizAdvisoryInfoEntity queryWeixinInfo(String openId, String wechatName);
|
||||
|
||||
void editNuBizAdvisoryInfo(NuBizAdvisoryInfoEntity nuBizAdvisoryInfo);
|
||||
|
||||
String addGuardian(NuBizAdvisoryInfoEntity nuBizAdvisoryInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
package com.nu.modules.baseinfo.api;
|
||||
|
||||
import com.nu.entity.NuBaseInfoEntity;
|
||||
|
||||
public interface INuBaseInfoApi {
|
||||
NuBaseInfoEntity queryInfoByNuId(String orgCode, String nuId);
|
||||
}
|
||||
|
|
@ -16,5 +16,5 @@ public interface IOrgApplyInfoApi {
|
|||
|
||||
IPage<OrgAllInfoApiEntity> queryOrgAllInfo(Integer pageNo, Integer pageSize, String orgCode, String title);
|
||||
|
||||
List<OrgAllInfoApiEntity> getOrgByOpenId(String status,String openId,String invited);
|
||||
List<OrgAllInfoApiEntity> getOrgByOpenId(String id,String status,String openId,String invited);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,14 +9,16 @@ import java.util.Date;
|
|||
/**
|
||||
* @Description: 机构全部信息
|
||||
* @Author: zmy
|
||||
* @Date: 2025-07-09
|
||||
* @Date: 2025-07-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class OrgAllInfoApiEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**机构id*/
|
||||
/**
|
||||
* 机构id
|
||||
*/
|
||||
private String orgId;
|
||||
|
||||
/**
|
||||
|
|
@ -27,6 +29,10 @@ public class OrgAllInfoApiEntity implements Serializable {
|
|||
* 机构编码
|
||||
*/
|
||||
private String orgCode;
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String orgName;
|
||||
/**
|
||||
* 协议+域名
|
||||
*/
|
||||
|
|
@ -104,91 +110,200 @@ public class OrgAllInfoApiEntity implements Serializable {
|
|||
*/
|
||||
private String picUrl;
|
||||
|
||||
/**微信id*/
|
||||
/**
|
||||
* 微信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*/
|
||||
/**
|
||||
* 机构省份 sys_category.id
|
||||
*/
|
||||
private String orgProvince;
|
||||
/**机构城市 sys_category.id*/
|
||||
/**
|
||||
* 机构城市 sys_category.id
|
||||
*/
|
||||
private String orgCity;
|
||||
/**机构区域 sys_category.id*/
|
||||
/**
|
||||
* 机构区域 sys_category.id
|
||||
*/
|
||||
private String orgDistrict;
|
||||
/**合同附件*/
|
||||
/**
|
||||
* 合同附件
|
||||
*/
|
||||
private String contract;
|
||||
/**合同备注*/
|
||||
/**
|
||||
* 合同备注
|
||||
*/
|
||||
private String contractNote;
|
||||
/** 加盟时间*/
|
||||
/**
|
||||
* 加盟时间
|
||||
*/
|
||||
private Date franchiseTime;
|
||||
|
||||
|
||||
/** 审核状态 1申请中 2通过 3拒绝*/
|
||||
/**
|
||||
* 审核状态 1申请中 2通过 3拒绝
|
||||
*/
|
||||
private String applyStatus;
|
||||
/** 是否线上机构 0是1否*/
|
||||
/**
|
||||
* 驳回原因
|
||||
*/
|
||||
private String auditContent;
|
||||
/**
|
||||
* 是否线上机构 0是1否
|
||||
*/
|
||||
private String izOnline;
|
||||
/** 是否冻结 0是1否*/
|
||||
/**
|
||||
* 是否冻结 0是1否
|
||||
*/
|
||||
private String izFreeze;
|
||||
/**是否为被邀请 0被邀请 1主动申请*/
|
||||
/**
|
||||
* 是否为被邀请 0被邀请 1主动申请
|
||||
*/
|
||||
private java.lang.String isInvited;
|
||||
/** 入职时间*/
|
||||
/**
|
||||
* 入职时间
|
||||
*/
|
||||
private String entryTime;
|
||||
/**申请日期*/
|
||||
/**
|
||||
* 申请日期
|
||||
*/
|
||||
private String applyTime;
|
||||
/**审核日期*/
|
||||
/**
|
||||
* 审核日期
|
||||
*/
|
||||
private String auditTime;
|
||||
/**员工id*/
|
||||
/**
|
||||
* 员工id
|
||||
*/
|
||||
private String employeesId;
|
||||
|
||||
/** 员工信息*/
|
||||
/**
|
||||
* 员工信息
|
||||
*/
|
||||
private EmployeesApiEntity employeesApiEntity;
|
||||
/**
|
||||
* nuId
|
||||
*/
|
||||
private String nuId;
|
||||
/**
|
||||
* 护理单元状态
|
||||
*/
|
||||
private String nuStatus;
|
||||
/**
|
||||
* 护理单元是否可以使用
|
||||
*/
|
||||
private String nuCanUse;
|
||||
/**
|
||||
* 不可使用原因
|
||||
*/
|
||||
private String msg;
|
||||
/**
|
||||
* 护理单元名称
|
||||
*/
|
||||
private String nuName;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,4 +14,6 @@ public interface ISysConfigApi {
|
|||
void asyncApi(SysConfigEntity entity);
|
||||
|
||||
JSONObject getByKeyByDS(String ds,String key);
|
||||
|
||||
JSONObject getByKey(String key);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
package com.nu.modules.wxnotice;
|
||||
|
||||
import com.nu.entity.WxNoticeEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IWxNoticeApi {
|
||||
|
||||
void addNotice(WxNoticeEntity dto);
|
||||
|
||||
List<WxNoticeEntity> query(int pageNo, int pageSize, String openId, String clientType);
|
||||
|
||||
int unreadCount(String openId, String clientType);
|
||||
|
||||
void upRead(WxNoticeEntity dto);
|
||||
}
|
||||
|
|
@ -1,141 +0,0 @@
|
|||
package com.nu.modules.NuBizAdvisoryInfo.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nu.modules.NuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
||||
import com.nu.modules.NuBizAdvisoryInfo.service.INuBizAdvisoryInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.jeecg.common.api.CommonAPI;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 咨询信息
|
||||
* @Author: 张明远
|
||||
* @Date: 2025-04-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="咨询信息")
|
||||
@RestController
|
||||
@RequestMapping("/admin/h5Api/nuBizAdvisoryInfo")
|
||||
@Slf4j
|
||||
public class H5ApiAdvisoryInfoController extends JeecgController<NuBizAdvisoryInfo, INuBizAdvisoryInfoService> {
|
||||
@Autowired
|
||||
private INuBizAdvisoryInfoService nuBizAdvisoryInfoService;
|
||||
|
||||
@Lazy
|
||||
@Autowired
|
||||
private CommonAPI commonApi;
|
||||
|
||||
/**
|
||||
* 添加咨询信息
|
||||
*
|
||||
* @param nuBizAdvisoryInfo
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/add")
|
||||
public Result<Object> add(@RequestBody NuBizAdvisoryInfo nuBizAdvisoryInfo) {
|
||||
nuBizAdvisoryInfoService.save(nuBizAdvisoryInfo);
|
||||
nuBizAdvisoryInfoService.handlePlatId(nuBizAdvisoryInfo);
|
||||
return Result.OK(nuBizAdvisoryInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否有注册信息
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/queryByOpenId")
|
||||
public Result<NuBizAdvisoryInfo> queryByOpenId(@RequestParam(name="openId",required=true) String openId) {
|
||||
QueryWrapper<NuBizAdvisoryInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("open_id",openId);
|
||||
NuBizAdvisoryInfo nuBizAdvisoryInfo = nuBizAdvisoryInfoService.getOne(queryWrapper);
|
||||
if(nuBizAdvisoryInfo==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
if(StringUtils.isNotBlank(nuBizAdvisoryInfo.getAdvisoryType())){
|
||||
String dictText = commonApi.translateDict("advisory_type",nuBizAdvisoryInfo.getAdvisoryType());
|
||||
nuBizAdvisoryInfo.setAdvisoryTypeName(dictText);
|
||||
}
|
||||
if(StringUtils.isNotBlank(nuBizAdvisoryInfo.getSex())){
|
||||
String dictText = commonApi.translateDict("sex",nuBizAdvisoryInfo.getSex());
|
||||
nuBizAdvisoryInfo.setSexName(dictText);
|
||||
}
|
||||
if(StringUtils.isNotBlank(nuBizAdvisoryInfo.getSysOrgCode())){
|
||||
String dictText = commonApi.translateDictFromTable("sys_depart","depart_name","id",nuBizAdvisoryInfo.getSysOrgCode());
|
||||
nuBizAdvisoryInfo.setSysOrgCodeName(dictText);
|
||||
}
|
||||
if(StringUtils.isNotBlank(nuBizAdvisoryInfo.getStatus())){
|
||||
String dictText = commonApi.translateDict("advisory_approval",nuBizAdvisoryInfo.getStatus());
|
||||
nuBizAdvisoryInfo.setStatusName(dictText);
|
||||
}
|
||||
if(StringUtils.isNotBlank(nuBizAdvisoryInfo.getOldManSex())){
|
||||
String dictText = commonApi.translateDict("sex",nuBizAdvisoryInfo.getOldManSex());
|
||||
nuBizAdvisoryInfo.setOldManSexName(dictText);
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(nuBizAdvisoryInfo.getMedicalInsuranceType())){
|
||||
String dictText = commonApi.translateDict("medical_insurance_type",nuBizAdvisoryInfo.getMedicalInsuranceType());
|
||||
nuBizAdvisoryInfo.setMedicalInsuranceTypeName(dictText);
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(nuBizAdvisoryInfo.getReimbType())){
|
||||
String dictText = commonApi.translateDict("reimb_type",nuBizAdvisoryInfo.getReimbType());
|
||||
nuBizAdvisoryInfo.setReimbTypeName(dictText);
|
||||
}
|
||||
return Result.OK(nuBizAdvisoryInfo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取微信信息
|
||||
* @param openId
|
||||
* @param wechatName
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/queryWeixinInfo")
|
||||
public Result<NuBizAdvisoryInfo> queryByOpenId(@RequestParam(name="openId",required=true) String openId,@RequestParam(name="wechatName",required=false) String wechatName) {
|
||||
NuBizAdvisoryInfo nuBizAdvisoryInfo = nuBizAdvisoryInfoService.queryWeixinInfo(openId,wechatName);
|
||||
return Result.OK(nuBizAdvisoryInfo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据openId修改serverUrl
|
||||
* @param nuBizAdvisoryInfo
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="修改咨询信息", notes="修改咨询信息")
|
||||
@RequestMapping(value = "/editNuBizAdvisoryInfo", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> editNuBizAdvisoryInfo(@RequestBody NuBizAdvisoryInfo nuBizAdvisoryInfo) {
|
||||
QueryWrapper<NuBizAdvisoryInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("open_id",nuBizAdvisoryInfo.getOpenId());
|
||||
NuBizAdvisoryInfo upData = new NuBizAdvisoryInfo();
|
||||
upData.setAvatar(nuBizAdvisoryInfo.getAvatar());//改头像
|
||||
upData.setNickName(nuBizAdvisoryInfo.getNickName());//改昵称
|
||||
nuBizAdvisoryInfoService.update(upData,queryWrapper);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -107,29 +107,22 @@ public class NuBizAdvisoryInfo implements Serializable {
|
|||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**老人姓名*/
|
||||
private String oldManName;
|
||||
/**老人年龄*/
|
||||
private String oldManAge;
|
||||
/**医保类型*/
|
||||
@Dict(dicCode = "medical_insurance_type")
|
||||
private String medicalInsuranceType;
|
||||
/**老人性别*/
|
||||
@Dict(dicCode = "sex")
|
||||
private String oldManSex;
|
||||
/**报销类型*/
|
||||
@Dict(dicCode = "reimb_type")
|
||||
private String reimbType;
|
||||
/**护理单元*/
|
||||
private String nuId;
|
||||
/**是否入住0否 1是(是否入住过)*/
|
||||
@ApiModelProperty(value = "是否入住0否 1是(是否入住过)")
|
||||
private String izCheckIn;
|
||||
|
||||
private String izYg;//是否是员工 0否 1是
|
||||
private String izJs;//是否是家属 0否 1是
|
||||
private String izJg;//是否是机构 0否 1是
|
||||
|
||||
/**身份证号*/
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
/**家庭住址*/
|
||||
@ApiModelProperty(value = "家庭住址")
|
||||
private String homeAddress;
|
||||
|
||||
/**工作单位*/
|
||||
@ApiModelProperty(value = "工作单位")
|
||||
private String workUnit;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String advisoryTypeName;
|
||||
@TableField(exist = false)
|
||||
|
|
@ -138,13 +131,6 @@ public class NuBizAdvisoryInfo implements Serializable {
|
|||
private String sysOrgCodeName;
|
||||
@TableField(exist = false)
|
||||
private String statusName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String oldManSexName;
|
||||
@TableField(exist = false)
|
||||
private String medicalInsuranceTypeName;
|
||||
@TableField(exist = false)
|
||||
private String reimbTypeName;
|
||||
@TableField(exist = false)
|
||||
private String token;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,11 +11,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
*/
|
||||
public interface INuBizAdvisoryInfoService extends IService<NuBizAdvisoryInfo> {
|
||||
|
||||
NuBizAdvisoryInfo queryWeixinInfo(String openId, String wechatName);
|
||||
|
||||
NuBizAdvisoryInfo getUserByTel(String mobile);
|
||||
|
||||
NuBizAdvisoryInfo findByOpenId(String openId);
|
||||
|
||||
void handlePlatId(NuBizAdvisoryInfo nuBizAdvisoryInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,29 +1,26 @@
|
|||
package com.nu.modules.NuBizAdvisoryInfo.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.entity.NuBizAdvisoryInfoEntity;
|
||||
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.api.CommonAPI;
|
||||
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.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 咨询信息
|
||||
|
|
@ -36,9 +33,12 @@ public class NuBizAdvisoryInfoServiceImpl extends ServiceImpl<NuBizAdvisoryInfoM
|
|||
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private CommonAPI commonApi;
|
||||
|
||||
@Override
|
||||
public NuBizAdvisoryInfo queryWeixinInfo(String openId, String wechatName) {
|
||||
public NuBizAdvisoryInfoEntity queryWeixinInfo(String openId, String wechatName) {
|
||||
QueryWrapper<NuBizAdvisoryInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("open_id", openId);
|
||||
queryWrapper.eq(StringUtils.isNotBlank(wechatName), "wechat_name", wechatName);
|
||||
|
|
@ -71,7 +71,50 @@ public class NuBizAdvisoryInfoServiceImpl extends ServiceImpl<NuBizAdvisoryInfoM
|
|||
String token = userInfo(nuBizAdvisoryInfo);
|
||||
nuBizAdvisoryInfo.setToken(token);
|
||||
}
|
||||
return nuBizAdvisoryInfo;
|
||||
NuBizAdvisoryInfoEntity result = new NuBizAdvisoryInfoEntity();
|
||||
BeanUtils.copyProperties(nuBizAdvisoryInfo,result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editNuBizAdvisoryInfo(NuBizAdvisoryInfoEntity advisoryInfoDto) {
|
||||
UpdateWrapper<NuBizAdvisoryInfo> uw = new UpdateWrapper<>();
|
||||
uw.eq("open_id",advisoryInfoDto.getOpenId());
|
||||
NuBizAdvisoryInfo upData = new NuBizAdvisoryInfo();
|
||||
upData.setAvatar(advisoryInfoDto.getAvatar());//改头像
|
||||
upData.setNickName(advisoryInfoDto.getNickName());//改昵称
|
||||
upData.setName(advisoryInfoDto.getName());//咨询人姓名
|
||||
upData.setIdCard(advisoryInfoDto.getIdCard());//身份证号
|
||||
upData.setTel(advisoryInfoDto.getTel());//电话号
|
||||
upData.setHomeAddress(advisoryInfoDto.getHomeAddress());//家庭住址
|
||||
upData.setWorkUnit(advisoryInfoDto.getWorkUnit());//工作单位
|
||||
baseMapper.update(upData,uw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String addGuardian(NuBizAdvisoryInfoEntity advisoryInfoDto) {
|
||||
QueryWrapper<NuBizAdvisoryInfo> qw = new QueryWrapper<>();
|
||||
qw.eq("open_id",advisoryInfoDto.getOpenId());
|
||||
NuBizAdvisoryInfo one = baseMapper.selectOne(qw);
|
||||
|
||||
NuBizAdvisoryInfo advisoryInfo = new NuBizAdvisoryInfo();
|
||||
BeanUtils.copyProperties(advisoryInfoDto,advisoryInfo);
|
||||
if(one == null){
|
||||
baseMapper.insert(advisoryInfo);
|
||||
return advisoryInfo.getId();
|
||||
}else{
|
||||
UpdateWrapper<NuBizAdvisoryInfo> uw = new UpdateWrapper<>();
|
||||
uw.eq("open_id",advisoryInfoDto.getOpenId());
|
||||
NuBizAdvisoryInfo upData = new NuBizAdvisoryInfo();
|
||||
upData.setName(advisoryInfoDto.getName());//咨询人姓名
|
||||
upData.setIdCard(advisoryInfoDto.getIdCard());//身份证号
|
||||
upData.setTel(advisoryInfoDto.getTel());//电话号
|
||||
upData.setHomeAddress(advisoryInfoDto.getHomeAddress());//家庭住址
|
||||
upData.setWorkUnit(advisoryInfoDto.getWorkUnit());//工作单位
|
||||
upData.setIzJs("1");
|
||||
baseMapper.update(upData,uw);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -102,7 +145,9 @@ public class NuBizAdvisoryInfoServiceImpl extends ServiceImpl<NuBizAdvisoryInfoM
|
|||
}
|
||||
|
||||
@Override
|
||||
public void handlePlatId(NuBizAdvisoryInfo nuBizAdvisoryInfo) {
|
||||
public void handlePlatId(NuBizAdvisoryInfoEntity nuBizAdvisoryInfo) {
|
||||
NuBizAdvisoryInfo advisoryInfo = new NuBizAdvisoryInfo();
|
||||
BeanUtils.copyProperties(nuBizAdvisoryInfo,advisoryInfo);
|
||||
QueryWrapper<NuBizAdvisoryInfo> qw = new QueryWrapper<>();
|
||||
qw.orderByDesc("plat_id");
|
||||
qw.last("limit 1");
|
||||
|
|
@ -110,14 +155,43 @@ public class NuBizAdvisoryInfoServiceImpl extends ServiceImpl<NuBizAdvisoryInfoM
|
|||
if (info.getPlatId() == null) {
|
||||
System.out.println(LocalDate.now().format(DateTimeFormatter.ofPattern("yyMM")) + "000001");
|
||||
System.out.println(Long.parseLong(LocalDate.now().format(DateTimeFormatter.ofPattern("yyMM")) + "000001"));
|
||||
nuBizAdvisoryInfo.setPlatId(Long.parseLong(LocalDate.now().format(DateTimeFormatter.ofPattern("yyMM")) + "000001"));
|
||||
System.out.println(nuBizAdvisoryInfo.getPlatId());
|
||||
advisoryInfo.setPlatId(Long.parseLong(LocalDate.now().format(DateTimeFormatter.ofPattern("yyMM")) + "000001"));
|
||||
System.out.println(advisoryInfo.getPlatId());
|
||||
} else {
|
||||
String maxPlatId = info.getPlatId() + "";
|
||||
long num = Long.parseLong(maxPlatId.substring(4));
|
||||
nuBizAdvisoryInfo.setPlatId(Long.parseLong(LocalDate.now().format(DateTimeFormatter.ofPattern("yyMM")) + String.format("%06d", num + 1)));
|
||||
advisoryInfo.setPlatId(Long.parseLong(LocalDate.now().format(DateTimeFormatter.ofPattern("yyMM")) + String.format("%06d", num + 1)));
|
||||
}
|
||||
baseMapper.updateById(nuBizAdvisoryInfo);
|
||||
baseMapper.updateById(advisoryInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NuBizAdvisoryInfoEntity queryByOpenId(String openId) {
|
||||
QueryWrapper<NuBizAdvisoryInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("open_id",openId);
|
||||
NuBizAdvisoryInfo nuBizAdvisoryInfo = baseMapper.selectOne(queryWrapper);
|
||||
if(nuBizAdvisoryInfo==null) {
|
||||
return null;
|
||||
}
|
||||
if(StringUtils.isNotBlank(nuBizAdvisoryInfo.getAdvisoryType())){
|
||||
String dictText = commonApi.translateDict("advisory_type",nuBizAdvisoryInfo.getAdvisoryType());
|
||||
nuBizAdvisoryInfo.setAdvisoryTypeName(dictText);
|
||||
}
|
||||
if(StringUtils.isNotBlank(nuBizAdvisoryInfo.getSex())){
|
||||
String dictText = commonApi.translateDict("sex",nuBizAdvisoryInfo.getSex());
|
||||
nuBizAdvisoryInfo.setSexName(dictText);
|
||||
}
|
||||
if(StringUtils.isNotBlank(nuBizAdvisoryInfo.getSysOrgCode())){
|
||||
String dictText = commonApi.translateDictFromTable("sys_depart","depart_name","id",nuBizAdvisoryInfo.getSysOrgCode());
|
||||
nuBizAdvisoryInfo.setSysOrgCodeName(dictText);
|
||||
}
|
||||
if(StringUtils.isNotBlank(nuBizAdvisoryInfo.getStatus())){
|
||||
String dictText = commonApi.translateDict("advisory_approval",nuBizAdvisoryInfo.getStatus());
|
||||
nuBizAdvisoryInfo.setStatusName(dictText);
|
||||
}
|
||||
NuBizAdvisoryInfoEntity result = new NuBizAdvisoryInfoEntity();
|
||||
BeanUtils.copyProperties(nuBizAdvisoryInfo,result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -133,4 +207,13 @@ public class NuBizAdvisoryInfoServiceImpl extends ServiceImpl<NuBizAdvisoryInfoM
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveData(NuBizAdvisoryInfoEntity nuBizAdvisoryInfo) {
|
||||
NuBizAdvisoryInfo advisoryInfo = new NuBizAdvisoryInfo();
|
||||
BeanUtils.copyProperties(nuBizAdvisoryInfo,advisoryInfo);
|
||||
baseMapper.insert(advisoryInfo);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,98 @@
|
|||
package com.nu.modules.baseinfo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_base_info")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_base_info对象", description="护理单元")
|
||||
public class NuBaseInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**ID*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "ID")
|
||||
private java.lang.String id;
|
||||
/**护理单元名称*/
|
||||
@Excel(name = "护理单元名称", width = 15)
|
||||
@ApiModelProperty(value = "护理单元名称")
|
||||
private java.lang.String nuName;
|
||||
/**护理单元编码*/
|
||||
@Excel(name = "护理单元编码", width = 15)
|
||||
@ApiModelProperty(value = "护理单元编码")
|
||||
private java.lang.String nuId;
|
||||
/**区域标签ID*/
|
||||
@Excel(name = "区域标签ID", width = 15, dicCode = "nu_type")
|
||||
@Dict(dicCode = "nu_type")
|
||||
@ApiModelProperty(value = "区域标签ID")
|
||||
private java.lang.String areaFlag;
|
||||
/**使用状态 0未使用 1占用 2入住 3退住 4留床*/
|
||||
@Excel(name = "使用状态 0未使用 1占用 2入住 3退住 4留床", width = 15, dicCode = "nu_status")
|
||||
@Dict(dicCode = "nu_status")
|
||||
@ApiModelProperty(value = "使用状态 0未使用 1占用 2入住 3退住 4留床")
|
||||
private java.lang.String status;
|
||||
/**客户*/
|
||||
@Excel(name = "客户", width = 15)
|
||||
@ApiModelProperty(value = "客户")
|
||||
private java.lang.String customerId;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
@Excel(name = "是否删除 0未删除 1删除", width = 15)
|
||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
||||
@TableLogic
|
||||
private java.lang.String delFlag;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@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 createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@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 updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
/**是否已同步0已同步 1未同步*/
|
||||
@ApiModelProperty(value = "是否已同步0已同步 1未同步")
|
||||
private java.lang.String izSync;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String deviceId;//摄像头 ID
|
||||
@TableField(exist = false)
|
||||
private String deviceName;//摄像头名称
|
||||
@TableField(exist = false)
|
||||
private String deviceStatus;//摄像头状态
|
||||
@TableField(exist = false)
|
||||
private String deviceMac;//摄像头状态
|
||||
|
||||
@TableField(exist = false)
|
||||
private int streamType;
|
||||
@TableField(exist = false)
|
||||
private String deviceIndex;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.baseinfo.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.baseinfo.entity.NuBaseInfo;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface NuBaseInfoMapper extends BaseMapper<NuBaseInfo> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.baseinfo.mapper.NuBaseInfoMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.baseinfo.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.baseinfo.entity.NuBaseInfo;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface INuBaseInfoService extends IService<NuBaseInfo> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package com.nu.modules.baseinfo.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.entity.NuBaseInfoEntity;
|
||||
import com.nu.modules.baseinfo.api.INuBaseInfoApi;
|
||||
import com.nu.modules.baseinfo.entity.NuBaseInfo;
|
||||
import com.nu.modules.baseinfo.mapper.NuBaseInfoMapper;
|
||||
import com.nu.modules.baseinfo.service.INuBaseInfoService;
|
||||
import com.nu.modules.sysconfig.ISysConfigApi;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class NuBaseInfoServiceImpl extends ServiceImpl<NuBaseInfoMapper, NuBaseInfo> implements INuBaseInfoService, INuBaseInfoApi {
|
||||
|
||||
@Autowired
|
||||
private ISysConfigApi sysConfigApi;
|
||||
|
||||
@Override
|
||||
@DS("#orgCode")
|
||||
public NuBaseInfoEntity queryInfoByNuId(String orgCode, String nuId) {
|
||||
|
||||
QueryWrapper<NuBaseInfo> qw = new QueryWrapper<>();
|
||||
qw.eq("nu_id", nuId);
|
||||
qw.eq("del_flag", "0");
|
||||
NuBaseInfo nuBaseInfo = baseMapper.selectOne(qw);
|
||||
if (nuBaseInfo == null) {
|
||||
return null;
|
||||
} else {
|
||||
NuBaseInfoEntity result = new NuBaseInfoEntity();
|
||||
BeanUtils.copyProperties(nuBaseInfo, result);
|
||||
|
||||
//支付是否可用
|
||||
com.alibaba.fastjson.JSONObject sysParams = sysConfigApi.getByKey("wechat_pay_enabled");
|
||||
Boolean wechatPayEnabled = sysParams.getBoolean("configValue");
|
||||
if (!wechatPayEnabled) {
|
||||
result.setWechatPayEnabled(false);
|
||||
} else {
|
||||
result.setWechatPayEnabled(true);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -176,6 +176,8 @@ public class OrgAllInfo implements Serializable {
|
|||
|
||||
/** 审核状态 1申请中 2通过 3拒绝*/
|
||||
private String applyStatus;
|
||||
/** 驳回原因*/
|
||||
private String auditContent;
|
||||
/** 是否线上机构 0是1否*/
|
||||
private String izOnline;
|
||||
/** 是否冻结 0是1否*/
|
||||
|
|
|
|||
|
|
@ -20,5 +20,5 @@ 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("openId") String openId, @Param("status") String status, @Param("invited") String invited);
|
||||
IPage<OrgAllInfo> getOrgByOpenId(IPage<OrgAllInfo> page, @Param("id") String id, @Param("openId") String openId, @Param("status") String status, @Param("invited") String invited);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
d.iz_directive_main,
|
||||
d.iz_elder_tag_main,
|
||||
d.media_url,
|
||||
d.payable_amount,
|
||||
o.open_id,
|
||||
o.wechat_name,
|
||||
o.tel,
|
||||
|
|
@ -84,6 +85,7 @@
|
|||
eo.employees_id,
|
||||
eo.org_code,
|
||||
eo.status AS applyStatus,
|
||||
eo.audit_content,
|
||||
eo.iz_online,
|
||||
eo.iz_freeze,
|
||||
eo.is_invited,
|
||||
|
|
@ -107,6 +109,9 @@
|
|||
<if test="invited !=null and invited != ''">
|
||||
and eo.is_invited = #{invited}
|
||||
</if>
|
||||
<if test="id !=null and id != ''">
|
||||
and eo.id = #{id}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test='status != null and status == "2"'>
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
|
|||
|
||||
@Override
|
||||
public IPage<OrgAllInfo> getOrgByOpenId(IPage<OrgAllInfo> page, String openId) {
|
||||
return baseMapper.getOrgByOpenId(page, openId,"2",null);
|
||||
return baseMapper.getOrgByOpenId(page, null, openId, "2", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -368,9 +368,9 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<OrgAllInfoApiEntity> getOrgByOpenId(String status,String openId,String invited) {
|
||||
public List<OrgAllInfoApiEntity> getOrgByOpenId(String id, String status, String openId, String invited) {
|
||||
IPage<OrgAllInfo> page = new Page<>(1, -1);
|
||||
IPage<OrgAllInfo> r_ = baseMapper.getOrgByOpenId(page, openId,status,invited);
|
||||
IPage<OrgAllInfo> r_ = baseMapper.getOrgByOpenId(page, id, openId, status, invited);
|
||||
List<OrgAllInfo> records = r_.getRecords();
|
||||
List<OrgAllInfoApiEntity> result = BeanUtil.copyToList(records, OrgAllInfoApiEntity.class);
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -139,4 +139,10 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getByKey(String key) {
|
||||
JSONObject result = getJsonObject(key);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,180 @@
|
|||
package com.nu.modules.wxnotice.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
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 org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nu.modules.wxnotice.entity.WxNotice;
|
||||
import com.nu.modules.wxnotice.service.IWxNoticeService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
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.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
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-09-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="小程序消息通知")
|
||||
@RestController
|
||||
@RequestMapping("/wxnotice/wxNotice")
|
||||
@Slf4j
|
||||
public class WxNoticeController extends JeecgController<WxNotice, IWxNoticeService> {
|
||||
@Autowired
|
||||
private IWxNoticeService wxNoticeService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param wxNotice
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "小程序消息通知-分页列表查询")
|
||||
@ApiOperation(value="小程序消息通知-分页列表查询", notes="小程序消息通知-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<WxNotice>> queryPageList(WxNotice wxNotice,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<WxNotice> queryWrapper = QueryGenerator.initQueryWrapper(wxNotice, req.getParameterMap());
|
||||
Page<WxNotice> page = new Page<WxNotice>(pageNo, pageSize);
|
||||
IPage<WxNotice> pageList = wxNoticeService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param wxNotice
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "小程序消息通知-添加")
|
||||
@ApiOperation(value="小程序消息通知-添加", notes="小程序消息通知-添加")
|
||||
@RequiresPermissions("wxnotice:nu_wx_notice:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody WxNotice wxNotice) {
|
||||
wxNoticeService.save(wxNotice);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param wxNotice
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "小程序消息通知-编辑")
|
||||
@ApiOperation(value="小程序消息通知-编辑", notes="小程序消息通知-编辑")
|
||||
@RequiresPermissions("wxnotice:nu_wx_notice:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody WxNotice wxNotice) {
|
||||
wxNoticeService.updateById(wxNotice);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "小程序消息通知-通过id删除")
|
||||
@ApiOperation(value="小程序消息通知-通过id删除", notes="小程序消息通知-通过id删除")
|
||||
@RequiresPermissions("wxnotice:nu_wx_notice:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
wxNoticeService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "小程序消息通知-批量删除")
|
||||
@ApiOperation(value="小程序消息通知-批量删除", notes="小程序消息通知-批量删除")
|
||||
@RequiresPermissions("wxnotice:nu_wx_notice:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.wxNoticeService.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<WxNotice> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
WxNotice wxNotice = wxNoticeService.getById(id);
|
||||
if(wxNotice==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(wxNotice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param wxNotice
|
||||
*/
|
||||
@RequiresPermissions("wxnotice:nu_wx_notice:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, WxNotice wxNotice) {
|
||||
return super.exportXls(request, wxNotice, WxNotice.class, "小程序消息通知");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("wxnotice:nu_wx_notice:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, WxNotice.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package com.nu.modules.wxnotice.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.nu.enums.WxClientType;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 小程序消息通知
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_wx_notice")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_wx_notice对象", description="小程序消息通知")
|
||||
public class WxNotice implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**open_id微信openid*/
|
||||
@Excel(name = "open_id微信openid", width = 15)
|
||||
@ApiModelProperty(value = "open_id微信openid")
|
||||
private java.lang.String openId;
|
||||
/**机构编码*/
|
||||
@Excel(name = "机构编码", width = 15)
|
||||
@ApiModelProperty(value = "机构编码")
|
||||
private java.lang.String orgCode;
|
||||
/**通知类型 对应数据字典notice_type 在管理端能看到*/
|
||||
@Excel(name = "通知类型 对应数据字典notice_type 在管理端能看到", width = 15)
|
||||
@ApiModelProperty(value = "通知类型 对应数据字典notice_type 在管理端能看到")
|
||||
private java.lang.String type;
|
||||
/**标题*/
|
||||
@Excel(name = "标题", width = 15)
|
||||
@ApiModelProperty(value = "标题")
|
||||
private java.lang.String title;
|
||||
/**日期*/
|
||||
@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 createTime;
|
||||
/**内容*/
|
||||
@Excel(name = "内容", width = 15)
|
||||
@ApiModelProperty(value = "内容")
|
||||
private java.lang.String content;
|
||||
/**是否已读 0已读 1未读*/
|
||||
@Excel(name = "是否已读 0已读 1未读", width = 15)
|
||||
@ApiModelProperty(value = "是否已读 0已读 1未读")
|
||||
private java.lang.String izRead;
|
||||
/**扩展json字符串*/
|
||||
@Excel(name = "扩展json字符串", width = 15)
|
||||
@ApiModelProperty(value = "扩展json字符串")
|
||||
private String extend;
|
||||
/**1机构端 2员工端 3家属端*/
|
||||
@Excel(name = "1机构端 2员工端 3家属端", width = 15)
|
||||
@ApiModelProperty(value = "1机构端 2员工端 3家属端")
|
||||
private String clientType;//枚举类WxClientType
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.nu.modules.wxnotice.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.wxnotice.entity.WxNotice;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 小程序消息通知
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface WxNoticeMapper extends BaseMapper<WxNotice> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.wxnotice.mapper.WxNoticeMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.wxnotice.service;
|
||||
|
||||
import com.nu.modules.wxnotice.entity.WxNotice;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 小程序消息通知
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IWxNoticeService extends IService<WxNotice> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
package com.nu.modules.wxnotice.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.entity.WxNoticeEntity;
|
||||
import com.nu.modules.wxnotice.IWxNoticeApi;
|
||||
import com.nu.modules.wxnotice.entity.WxNotice;
|
||||
import com.nu.modules.wxnotice.mapper.WxNoticeMapper;
|
||||
import com.nu.modules.wxnotice.service.IWxNoticeService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 小程序消息通知
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class WxNoticeServiceImpl extends ServiceImpl<WxNoticeMapper, WxNotice> implements IWxNoticeService, IWxNoticeApi {
|
||||
|
||||
@Override
|
||||
public void addNotice(WxNoticeEntity dto) {
|
||||
WxNotice wxNotice = new WxNotice();
|
||||
BeanUtils.copyProperties(dto, wxNotice);
|
||||
baseMapper.insert(wxNotice);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WxNoticeEntity> query(int pageNo, int pageSize, String openId, String clientType) {
|
||||
if (StringUtils.isBlank(openId)) {
|
||||
return List.of();
|
||||
}
|
||||
Page<WxNotice> page = new Page<WxNotice>(pageNo, pageSize);
|
||||
QueryWrapper<WxNotice> qw = new QueryWrapper<>();
|
||||
qw.eq("open_id", openId);
|
||||
qw.eq("client_type", clientType);//哪个端(机构?员工?家属?)
|
||||
qw.orderByDesc("iz_read");//未读在前
|
||||
qw.orderByDesc("create_time");//按照时间倒序
|
||||
List<WxNotice> wxNotices = baseMapper.selectList(page, qw);
|
||||
List<WxNoticeEntity> result = BeanUtil.copyToList(wxNotices, WxNoticeEntity.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int unreadCount(String openId, String clientType) {
|
||||
QueryWrapper<WxNotice> qw = new QueryWrapper<>();
|
||||
qw.select("id");
|
||||
qw.eq("open_id", openId);
|
||||
qw.eq("iz_read", "1");
|
||||
qw.eq("client_type", clientType);//哪个端(机构?员工?家属?)
|
||||
List<WxNotice> wxNotices = baseMapper.selectList(qw);
|
||||
return wxNotices == null ? 0 : wxNotices.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upRead(WxNoticeEntity dto) {
|
||||
UpdateWrapper<WxNotice> uw = new UpdateWrapper<>();
|
||||
uw.in("id", dto.getId().split(","));
|
||||
WxNotice wxNotice = new WxNotice();
|
||||
wxNotice.setIzRead("0");
|
||||
baseMapper.update(wxNotice, uw);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package com.nu.mq.NuBizAdvisoryInfo.listener;
|
||||
|
||||
import com.nu.dto.NuBizAdvisoryInfoDto;
|
||||
import com.nu.entity.NuBizAdvisoryInfoEntity;
|
||||
import com.nu.modules.NuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
||||
import com.nu.modules.NuBizAdvisoryInfo.service.INuBizAdvisoryInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -15,7 +15,7 @@ public class NuBizAdvisoryInfoListener {
|
|||
@Autowired
|
||||
private INuBizAdvisoryInfoService nuBizAdvisoryInfoService;
|
||||
@RabbitListener(queues = "register.addData", errorHandler = "AdvisoryMQExceptionHandler")
|
||||
public void registerAddMessage(NuBizAdvisoryInfoDto dto) {
|
||||
public void registerAddMessage(NuBizAdvisoryInfoEntity dto) {
|
||||
try {
|
||||
System.out.println(111);
|
||||
NuBizAdvisoryInfo nuBizAdvisoryInfo = new NuBizAdvisoryInfo();
|
||||
|
|
@ -28,7 +28,7 @@ public class NuBizAdvisoryInfoListener {
|
|||
|
||||
|
||||
@RabbitListener(queues = "register.editData", errorHandler = "AdvisoryMQExceptionHandler")
|
||||
public void registerEditMessage(NuBizAdvisoryInfoDto dto) {
|
||||
public void registerEditMessage(NuBizAdvisoryInfoEntity dto) {
|
||||
try {
|
||||
NuBizAdvisoryInfo nuBizAdvisoryInfo = new NuBizAdvisoryInfo();
|
||||
BeanUtils.copyProperties(dto,nuBizAdvisoryInfo);
|
||||
|
|
|
|||
|
|
@ -1,24 +1,31 @@
|
|||
package com.nu.mq.employees.listener;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nu.dto.EmployeesApplyMQDto;
|
||||
import com.nu.dto.EmployeesStatusMQDto;
|
||||
import com.nu.entity.WxNoticeEntity;
|
||||
import com.nu.enums.WxClientType;
|
||||
import com.nu.modules.employees.entity.EmployeesOrg;
|
||||
import com.nu.modules.employees.entity.NuEmployeesAdvisoryInfo;
|
||||
import com.nu.modules.employees.service.IEmployeesOrgService;
|
||||
import com.nu.modules.employees.service.INuEmployeesAdvisoryInfoService;
|
||||
import com.nu.modules.wxnotice.IWxNoticeApi;
|
||||
import com.nu.utils.RabbitMQUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
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.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class EmployeesMQListener {
|
||||
|
|
@ -29,6 +36,10 @@ public class EmployeesMQListener {
|
|||
private INuEmployeesAdvisoryInfoService employeesAdvisoryInfoService;
|
||||
@Autowired
|
||||
private RabbitMQUtil rabbitMQUtil;
|
||||
@Autowired
|
||||
private IWxNoticeApi wxNoticeApi;
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
|
||||
/**
|
||||
* 员工-机构关系状态调整
|
||||
|
|
@ -106,14 +117,18 @@ public class EmployeesMQListener {
|
|||
key = "hldy.employees.invide"), errorHandler = "employeesMQErrorHandler")
|
||||
public void handleInvided(EmployeesApplyMQDto dto) {
|
||||
//先查询此人是否已经提交了申请信息 出现问题概率可能在1-2秒内(同时申请与邀请) 如果网络不好则大幅增加时长
|
||||
QueryWrapper<EmployeesOrg> qw = new QueryWrapper<>();
|
||||
qw.eq("employees_id", dto.getEmployeeId());
|
||||
qw.eq("org_code", dto.getOrgCode());
|
||||
qw.eq("iz_history", "1");
|
||||
EmployeesOrg one = employeesOrgService.getOne(qw);
|
||||
if (one != null) {
|
||||
rabbitMQUtil.sendToExchange("hldy.employees", dto.getOrgCode()+ "employees.cannotinvided", dto);
|
||||
return;
|
||||
{
|
||||
QueryWrapper<EmployeesOrg> qw = new QueryWrapper<>();
|
||||
qw.eq("employees_id", dto.getEmployeeId());
|
||||
qw.eq("org_code", dto.getOrgCode());
|
||||
qw.eq("status", "1");
|
||||
qw.eq("iz_history", "1");
|
||||
qw.eq("is_invited", "1");
|
||||
EmployeesOrg one = employeesOrgService.getOne(qw);
|
||||
if (one != null) {
|
||||
rabbitMQUtil.sendToExchange("hldy.employees", dto.getOrgCode() + "employees.cannotinvided", dto);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//先把之前的数据都改为历史数据
|
||||
|
|
@ -133,6 +148,24 @@ public class EmployeesMQListener {
|
|||
employeesOrg.setIzOnline("1");
|
||||
employeesOrg.setIzFreeze("0");
|
||||
employeesOrg.setIsInvited("0");
|
||||
employeesOrg.setIzHistory("1");
|
||||
employeesOrgService.save(employeesOrg);
|
||||
|
||||
//增加机构邀请员工的消息通知
|
||||
JSONObject orgInfo = sysBaseAPI.getOrgInfo(dto.getOrgCode());
|
||||
String departName = orgInfo.getString("departName");
|
||||
WxNoticeEntity wxNoticeEntity = new WxNoticeEntity();
|
||||
wxNoticeEntity.setOpenId(dto.getOpenId());
|
||||
wxNoticeEntity.setIzRead("1");
|
||||
wxNoticeEntity.setOrgCode(dto.getOrgCode());
|
||||
wxNoticeEntity.setTitle("邀请加入");
|
||||
wxNoticeEntity.setContent("您好," + departName + "邀请您加入。");
|
||||
wxNoticeEntity.setType("emp_org_invited_emp_list");
|
||||
Map<String, Object> extend = Maps.newHashMap();
|
||||
extend.put("dataId", employeesOrg.getId());
|
||||
wxNoticeEntity.setExtend(JSONObject.toJSONString(extend));
|
||||
wxNoticeEntity.setClientType(WxClientType.EMPLOYEE.getCode());
|
||||
wxNoticeApi.addNotice(wxNoticeEntity);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,143 @@
|
|||
package com.nu.modules.wechat.elder.api;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nu.entity.NuBaseInfoEntity;
|
||||
import com.nu.entity.NuBizAdvisoryInfoEntity;
|
||||
import com.nu.modules.advisoryinfo.api.IAdvisoryInfoApi;
|
||||
import com.nu.modules.baseinfo.api.INuBaseInfoApi;
|
||||
import com.nu.modules.orgapplyinfo.api.IOrgApplyInfoApi;
|
||||
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "咨询信息")
|
||||
@RestController
|
||||
@RequestMapping("/api/elderInfo")
|
||||
public class ElderApi {
|
||||
|
||||
@Autowired
|
||||
private IAdvisoryInfoApi advisoryInfoApi;
|
||||
@Autowired
|
||||
private IOrgApplyInfoApi orgApplyInfoApi;
|
||||
@Autowired
|
||||
private INuBaseInfoApi nuBaseInfoApi;
|
||||
|
||||
/**
|
||||
* 添加咨询信息
|
||||
*
|
||||
* @param nuBizAdvisoryInfo
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/add")
|
||||
public Result<Object> add(@RequestBody NuBizAdvisoryInfoEntity nuBizAdvisoryInfo) {
|
||||
advisoryInfoApi.saveData(nuBizAdvisoryInfo);
|
||||
advisoryInfoApi.handlePlatId(nuBizAdvisoryInfo);
|
||||
return Result.OK(nuBizAdvisoryInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否有注册信息
|
||||
*
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/queryByOpenId")
|
||||
public Result<NuBizAdvisoryInfoEntity> queryByOpenId(@RequestParam(name = "openId", required = true) String openId) {
|
||||
NuBizAdvisoryInfoEntity result = advisoryInfoApi.queryByOpenId(openId);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取微信信息
|
||||
*
|
||||
* @param openId
|
||||
* @param wechatName
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/queryWeixinInfo")
|
||||
public Result<NuBizAdvisoryInfoEntity> queryByOpenId(@RequestParam(name = "openId", required = true) String openId, @RequestParam(name = "wechatName", required = false) String wechatName) {
|
||||
NuBizAdvisoryInfoEntity nuBizAdvisoryInfo = advisoryInfoApi.queryWeixinInfo(openId, wechatName);
|
||||
return Result.OK(nuBizAdvisoryInfo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据openId修改serverUrl
|
||||
*
|
||||
* @param nuBizAdvisoryInfo
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "修改咨询信息", notes = "修改咨询信息")
|
||||
@RequestMapping(value = "/editNuBizAdvisoryInfo", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||
public Result<String> editNuBizAdvisoryInfo(@RequestBody NuBizAdvisoryInfoEntity nuBizAdvisoryInfo) {
|
||||
advisoryInfoApi.editNuBizAdvisoryInfo(nuBizAdvisoryInfo);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加监护人信息
|
||||
*
|
||||
* @param nuBizAdvisoryInfo
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/addGuardian")
|
||||
public Result<Object> addGuardian(@RequestBody NuBizAdvisoryInfoEntity nuBizAdvisoryInfo) {
|
||||
String id = advisoryInfoApi.addGuardian(nuBizAdvisoryInfo);
|
||||
if (StringUtils.isNotBlank(id)) {
|
||||
//如果是新增数据
|
||||
nuBizAdvisoryInfo.setId(id);
|
||||
advisoryInfoApi.handlePlatId(nuBizAdvisoryInfo);
|
||||
}
|
||||
return Result.OK(nuBizAdvisoryInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取各机构详细信息
|
||||
*
|
||||
* @param nuId 护理单元id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getOrgInfo")
|
||||
public Result<OrgAllInfoApiEntity> getModifyInfo(
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "8") Integer pageSize,
|
||||
@RequestParam(value = "nuId") String nuId) {
|
||||
if (nuId.length() < 10) {
|
||||
return Result.ok(null);
|
||||
}
|
||||
String orgCode = nuId.substring(4, 7);
|
||||
IPage<OrgAllInfoApiEntity> list = orgApplyInfoApi.queryOrgAllInfo(pageNo, pageSize, orgCode, null);
|
||||
List<OrgAllInfoApiEntity> records = list.getRecords();
|
||||
if (records == null || records.size() == 0) {
|
||||
return Result.ok(null);
|
||||
}
|
||||
OrgAllInfoApiEntity result = records.get(0);
|
||||
|
||||
NuBaseInfoEntity baseInfo = nuBaseInfoApi.queryInfoByNuId(orgCode, nuId);
|
||||
if (baseInfo == null) {
|
||||
return Result.ok(null);
|
||||
}
|
||||
result.setNuId(nuId);
|
||||
result.setNuStatus(baseInfo.getStatus());//使用状态 0未使用 1占用 2入住 3退住 4留床
|
||||
if ("0".equals(baseInfo.getStatus()) || "3".equals(baseInfo.getStatus())) {
|
||||
result.setNuCanUse("0");//可以绑定
|
||||
}else{
|
||||
result.setNuCanUse("1");//不可绑定
|
||||
result.setMsg("护理单元使用中");//不可用提示语
|
||||
}
|
||||
|
||||
if(!baseInfo.isWechatPayEnabled()){
|
||||
result.setNuCanUse("1");//微信支付关闭导致 不可绑定
|
||||
result.setMsg("护理单元维护中");//不可用提示语
|
||||
}
|
||||
result.setNuName(baseInfo.getNuName());
|
||||
return Result.OK(result);
|
||||
}
|
||||
}
|
||||
|
|
@ -110,8 +110,8 @@ public class EmployessApplyApi {
|
|||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getEmployeesOrgRela")
|
||||
public Result<List<OrgAllInfoApiEntity>> getEmployeesOrgRela(@RequestParam(value = "status", required = false) String status, @RequestParam(value = "invited",required = false) String invited, @RequestParam(value = "openId") String openId) {
|
||||
List<OrgAllInfoApiEntity> result = orgApplyInfoApi.getOrgByOpenId(status, openId, invited);
|
||||
public Result<List<OrgAllInfoApiEntity>> getEmployeesOrgRela(@RequestParam(value = "id", required = false) String id, @RequestParam(value = "status", required = false) String status, @RequestParam(value = "invited", required = false) String invited, @RequestParam(value = "openId") String openId) {
|
||||
List<OrgAllInfoApiEntity> result = orgApplyInfoApi.getOrgByOpenId(id, status, openId, invited);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,57 @@
|
|||
package com.nu.modules.wechat.notice;
|
||||
|
||||
import com.nu.entity.WxNoticeEntity;
|
||||
import com.nu.modules.wxnotice.IWxNoticeApi;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/wx/notice")
|
||||
public class WxNoticeApi {
|
||||
|
||||
@Autowired
|
||||
private IWxNoticeApi wxNoticeApi;
|
||||
|
||||
/**
|
||||
* 获取此人未读消息数量
|
||||
*
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/unreadCount")
|
||||
public Result<?> unreadCount(@RequestParam(value = "openId") String openId, @RequestParam(value = "clientType") String clientType) {
|
||||
return Result.ok(wxNoticeApi.unreadCount(openId, clientType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询消息
|
||||
*
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/query")
|
||||
public Result<?> query(@RequestParam(value = "pageNo", defaultValue = "1", required = false) int pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "-1", required = false) int pageSize,
|
||||
@RequestParam(value = "openId") String openId,
|
||||
@RequestParam(value = "clientType") String clientType) {
|
||||
|
||||
List<WxNoticeEntity> query = wxNoticeApi.query(pageNo, pageSize, openId, clientType);
|
||||
return Result.ok(query);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新已读
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/upRead")
|
||||
public Result<?> upRead(@RequestBody WxNoticeEntity dto) {
|
||||
wxNoticeApi.upRead(dto);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
|
@ -113,7 +113,7 @@ public class ShiroConfig {
|
|||
|
||||
filterChainDefinitionMap.put("/sys/dict/getDictItems/**", "anon");//获取字典数据
|
||||
filterChainDefinitionMap.put("/sys/sysDepart/queryInstitutionsList", "anon");//授权接口排除
|
||||
filterChainDefinitionMap.put("/admin/h5Api/nuBizAdvisoryInfo/**", "anon"); //授权接口排除
|
||||
filterChainDefinitionMap.put("/api/elderInfo/**", "anon"); //授权接口排除
|
||||
filterChainDefinitionMap.put("/weixin/**", "anon"); //授权接口排除
|
||||
filterChainDefinitionMap.put("/api/pad/loginApi/**", "anon"); //pad登录-信息获取接口
|
||||
filterChainDefinitionMap.put("/sys/common/open/static/**", "anon");//获取本地文件资源
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ import java.util.Date;
|
|||
public class EmployeesStatusMQDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**员工id*/
|
||||
private String employeeId;
|
||||
/**申请状态 1申请中 2通过 3驳回*/
|
||||
|
|
@ -30,5 +32,5 @@ public class EmployeesStatusMQDto implements Serializable {
|
|||
/**入职时间*/
|
||||
private Date entryTime;
|
||||
/**openId*/
|
||||
private Date openId;
|
||||
private String openId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
package com.nu.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 小程序消息通知
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class WxNoticeMQDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**open_id微信openid*/
|
||||
private String openId;
|
||||
/**机构编码*/
|
||||
private String orgCode;
|
||||
/**通知类型 对应数据字典notice_type 在管理端能看到*/
|
||||
private String type;
|
||||
/**标题*/
|
||||
private String title;
|
||||
/**日期*/
|
||||
private Date createTime;
|
||||
/**内容*/
|
||||
private String content;
|
||||
/**是否已读 0已读 1未读*/
|
||||
private String izRead;
|
||||
/**1机构端 2员工端 3家属端*/
|
||||
private String clientType;
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class NuBaseInfoEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 护理单元名称
|
||||
*/
|
||||
private String nuName;
|
||||
/**
|
||||
* 护理单元编码
|
||||
*/
|
||||
private String nuId;
|
||||
/**
|
||||
* 区域标签ID
|
||||
*/
|
||||
private String areaFlag;
|
||||
/**
|
||||
* 使用状态 0未使用 1占用 2入住 3退住 4留床
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 客户
|
||||
*/
|
||||
private String customerId;
|
||||
/**
|
||||
* 是否删除 0未删除 1删除
|
||||
*/
|
||||
private String delFlag;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
private java.util.Date createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新日期
|
||||
*/
|
||||
private java.util.Date updateTime;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
private String sysOrgCode;
|
||||
/**
|
||||
* 是否已同步0已同步 1未同步
|
||||
*/
|
||||
private String izSync;
|
||||
|
||||
private String deviceId;//摄像头 ID
|
||||
private String deviceName;//摄像头名称
|
||||
private String deviceStatus;//摄像头状态
|
||||
private String deviceMac;//摄像头状态
|
||||
|
||||
private int streamType;
|
||||
private String deviceIndex;
|
||||
|
||||
private boolean wechatPayEnabled;//微信支付功能是否已开启
|
||||
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.nu.dto;
|
||||
package com.nu.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ import java.io.Serializable;
|
|||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class NuBizAdvisoryInfoDto implements Serializable {
|
||||
public class NuBizAdvisoryInfoEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
|
|
@ -44,25 +44,30 @@ public class NuBizAdvisoryInfoDto implements Serializable {
|
|||
private java.util.Date updateTime;
|
||||
/**所属部门*/
|
||||
private String sysOrgCode;
|
||||
/**老人姓名*/
|
||||
private String oldManName;
|
||||
/**老人年龄*/
|
||||
private String oldManAge;
|
||||
/**医保类型*/
|
||||
private String medicalInsuranceType;
|
||||
/**老人性别*/
|
||||
private String oldManSex;
|
||||
/**报销类型*/
|
||||
private String reimbType;
|
||||
/**护理单元*/
|
||||
private String nuId;
|
||||
private String advisoryTypeName;
|
||||
private String sexName;
|
||||
private String sysOrgCodeName;
|
||||
private String statusName;
|
||||
private String oldManSexName;
|
||||
private String medicalInsuranceTypeName;
|
||||
private String reimbTypeName;
|
||||
/**身份证号*/
|
||||
private String idCard;
|
||||
/**家庭住址*/
|
||||
private String homeAddress;
|
||||
/**工作单位*/
|
||||
private String workUnit;
|
||||
/**头像*/
|
||||
private String avatar;
|
||||
/**昵称*/
|
||||
private String nickName;
|
||||
private String token;
|
||||
/**平台id*/
|
||||
private Long platId;
|
||||
//是否是员工 0否 1是
|
||||
private String izYg;
|
||||
//是否是家属 0否 1是
|
||||
private String izJs;
|
||||
//是否是机构 0否 1是
|
||||
private String izJg;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 小程序消息通知
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class WxNoticeEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**open_id微信openid*/
|
||||
private String openId;
|
||||
/**机构编码*/
|
||||
private String orgCode;
|
||||
/**通知类型 对应数据字典notice_type 在管理端能看到*/
|
||||
private String type;
|
||||
/**标题*/
|
||||
private String title;
|
||||
/**日期*/
|
||||
private Date createTime;
|
||||
/**内容*/
|
||||
private String content;
|
||||
/**是否已读 0已读 1未读*/
|
||||
private String izRead;
|
||||
/**扩展json字符串*/
|
||||
private String extend;
|
||||
/**1机构端 2员工端 3家属端*/
|
||||
private String clientType;
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.nu.enums;
|
||||
|
||||
/**
|
||||
* 小程序客户端类型枚举
|
||||
* 用于标识请求来源:机构端、员工端、家属端
|
||||
*/
|
||||
public enum WxClientType {
|
||||
|
||||
INSTITUTION("1", "机构端"),
|
||||
EMPLOYEE("2", "员工端"),
|
||||
ELDER("3", "家属端");
|
||||
|
||||
private final String code;
|
||||
private final String description;
|
||||
|
||||
WxClientType(String code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据 code 获取对应的枚举值
|
||||
*/
|
||||
public static WxClientType fromCode(String code) {
|
||||
if (code == null) {
|
||||
return null;
|
||||
}
|
||||
for (WxClientType type : WxClientType.values()) {
|
||||
if (type.code.equals(code)) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("未知的客户端类型 code: " + code);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查 code 是否有效
|
||||
*/
|
||||
public static boolean isValid(String code) {
|
||||
if (code == null) return false;
|
||||
for (WxClientType type : values()) {
|
||||
if (type.code.equals(code)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "WxClientType{" +
|
||||
"code='" + code + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue