1、机构加盟申请

2、媒体资源管理
This commit is contained in:
1378012178@qq.com 2025-06-09 14:05:49 +08:00
parent 7d25e18967
commit 0977c946f2
32 changed files with 901 additions and 37 deletions

View File

@ -0,0 +1,14 @@
package com.nu.modules.orgapplyinfo.api;
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfoApiEntity;
import java.util.List;
public interface IOrgApplyInfoApi {
OrgApplyInfoApiEntity insert(OrgApplyInfoApiEntity orgApplyInfoApiEntity);
int updateById(OrgApplyInfoApiEntity orgApplyInfoApiEntity);
List<OrgApplyInfoApiEntity> queryAuditInfo(String tel);
}

View File

@ -0,0 +1,97 @@
package com.nu.modules.orgapplyinfo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 机构加盟申请信息表
* @Author: 张明远
* @Date: 2025-06-05
* @Version: V1.0
*/
@Data
public class OrgApplyInfoApiEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
private String id;
/**微信id*/
private String openId;
/**微信名称*/
private String wechatName;
/**联系电话*/
private String tel;
/**状态 1审核中 2审核完成 3驳回 */
private String status;
/**审核备注*/
private String content;
/**创建人*/
private String createBy;
/**创建日期*/
private Date createTime;
/**更新人*/
private String updateBy;
/**更新日期*/
private Date updateTime;
/**机构是否入驻0否 1是(是否入驻过)*/
private String izEntry;
/**咨询人姓名*/
private String name;
/**性别*/
private String sex;
/**民族*/
private String national;
/**出生日期*/
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 orgCoordinate;
/**机构负责人*/
private String orgLeader;
/**机构负责人电话*/
private String orgLeaderPhone;
/**机构楼宇牌号*/
private String orgBuildingNumber;
/**机构房屋性质*/
private String orgPropertyType;
/**机构建筑面积*/
private Double orgBuildingArea;
}

View File

@ -112,6 +112,9 @@ public class NuBizAdvisoryInfo implements Serializable {
private String reimbType;
/**护理单元*/
private String nuId;
/**是否入住0否 1是(是否入住过)*/
@ApiModelProperty(value = "是否入住0否 1是(是否入住过)")
private String izCheckIn;
@TableField(exist = false)

View File

@ -41,7 +41,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: 资源同步错误日志
* @Author: jeecg-boot
* @Author: 张明远
* @Date: 2025-05-22
* @Version: V1.0
*/

View File

@ -22,7 +22,7 @@ import lombok.experimental.Accessors;
/**
* @Description: 资源同步错误日志
* @Author: jeecg-boot
* @Author: 张明远
* @Date: 2025-05-22
* @Version: V1.0
*/

View File

@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 资源同步错误日志
* @Author: jeecg-boot
* @Author: 张明远
* @Date: 2025-05-22
* @Version: V1.0
*/

View File

@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 资源同步错误日志
* @Author: jeecg-boot
* @Author: 张明远
* @Date: 2025-05-22
* @Version: V1.0
*/

View File

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 资源同步错误日志
* @Author: jeecg-boot
* @Author: 张明远
* @Date: 2025-05-22
* @Version: V1.0
*/

View File

@ -41,7 +41,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: 媒体资源管理
* @Author: jeecg-boot
* @Author: 张明远
* @Date: 2025-05-15
* @Version: V1.0
*/

View File

@ -23,7 +23,7 @@ import lombok.experimental.Accessors;
/**
* @Description: 媒体资源管理
* @Author: jeecg-boot
* @Author: 张明远
* @Date: 2025-05-15
* @Version: V1.0
*/

View File

@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 媒体资源管理
* @Author: jeecg-boot
* @Author: 张明远
* @Date: 2025-05-15
* @Version: V1.0
*/

View File

@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 媒体资源管理
* @Author: jeecg-boot
* @Author: 张明远
* @Date: 2025-05-15
* @Version: V1.0
*/

View File

@ -20,7 +20,7 @@ import java.util.List;
/**
* @Description: 媒体资源管理
* @Author: jeecg-boot
* @Author: 张明远
* @Date: 2025-05-15
* @Version: V1.0
*/

View File

@ -0,0 +1,185 @@
package com.nu.modules.orgapplyinfo.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.orgapplyinfo.entity.OrgApplyInfo;
import com.nu.modules.orgapplyinfo.service.IOrgApplyInfoService;
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: 张明远
* @Date: 2025-06-05
* @Version: V1.0
*/
@Api(tags="机构加盟申请信息表")
@RestController
@RequestMapping("/orgapplyinfo/orgApplyInfo")
@Slf4j
public class OrgApplyInfoController extends JeecgController<OrgApplyInfo, IOrgApplyInfoService> {
@Autowired
private IOrgApplyInfoService orgApplyInfoService;
/**
* 分页列表查询
*
* @param orgApplyInfo
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "机构加盟申请信息表-分页列表查询")
@ApiOperation(value="机构加盟申请信息表-分页列表查询", notes="机构加盟申请信息表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<OrgApplyInfo>> queryPageList(OrgApplyInfo orgApplyInfo,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
// 自定义查询规则
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
// 自定义多选的查询规则为LIKE_WITH_OR
customeRuleMap.put("status", QueryRuleEnum.LIKE_WITH_OR);
customeRuleMap.put("izEntry", QueryRuleEnum.LIKE_WITH_OR);
QueryWrapper<OrgApplyInfo> queryWrapper = QueryGenerator.initQueryWrapper(orgApplyInfo, req.getParameterMap(),customeRuleMap);
Page<OrgApplyInfo> page = new Page<OrgApplyInfo>(pageNo, pageSize);
IPage<OrgApplyInfo> pageList = orgApplyInfoService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param orgApplyInfo
* @return
*/
@AutoLog(value = "机构加盟申请信息表-添加")
@ApiOperation(value="机构加盟申请信息表-添加", notes="机构加盟申请信息表-添加")
@RequiresPermissions("orgapplyinfo:nu_org_apply_info:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody OrgApplyInfo orgApplyInfo) {
orgApplyInfoService.save(orgApplyInfo);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param orgApplyInfo
* @return
*/
@AutoLog(value = "机构加盟申请信息表-编辑")
@ApiOperation(value="机构加盟申请信息表-编辑", notes="机构加盟申请信息表-编辑")
@RequiresPermissions("orgapplyinfo:nu_org_apply_info:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody OrgApplyInfo orgApplyInfo) {
orgApplyInfoService.updateById(orgApplyInfo);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "机构加盟申请信息表-通过id删除")
@ApiOperation(value="机构加盟申请信息表-通过id删除", notes="机构加盟申请信息表-通过id删除")
@RequiresPermissions("orgapplyinfo:nu_org_apply_info:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
orgApplyInfoService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "机构加盟申请信息表-批量删除")
@ApiOperation(value="机构加盟申请信息表-批量删除", notes="机构加盟申请信息表-批量删除")
@RequiresPermissions("orgapplyinfo:nu_org_apply_info:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.orgApplyInfoService.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<OrgApplyInfo> queryById(@RequestParam(name="id",required=true) String id) {
OrgApplyInfo orgApplyInfo = orgApplyInfoService.getById(id);
if(orgApplyInfo==null) {
return Result.error("未找到对应数据");
}
return Result.OK(orgApplyInfo);
}
/**
* 导出excel
*
* @param request
* @param orgApplyInfo
*/
@RequiresPermissions("orgapplyinfo:nu_org_apply_info:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, OrgApplyInfo orgApplyInfo) {
return super.exportXls(request, orgApplyInfo, OrgApplyInfo.class, "机构加盟申请信息表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("orgapplyinfo:nu_org_apply_info:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, OrgApplyInfo.class);
}
}

View File

@ -0,0 +1,180 @@
package com.nu.modules.orgapplyinfo.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 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: 张明远
* @Date: 2025-06-05
* @Version: V1.0
*/
@Data
@TableName("nu_org_apply_info")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="nu_org_apply_info对象", description="机构加盟申请信息表")
public class OrgApplyInfo implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.String id;
/**微信id*/
@Excel(name = "微信id", width = 15)
@ApiModelProperty(value = "微信id")
private java.lang.String openId;
/**微信名称*/
@Excel(name = "微信名称", width = 15)
@ApiModelProperty(value = "微信名称")
private java.lang.String wechatName;
/**联系电话*/
@Excel(name = "联系电话", width = 15)
@ApiModelProperty(value = "联系电话")
private java.lang.String tel;
/**状态 1审核中 2审核完成 3驳回 */
@Dict(dicCode = "org_apply_status")
@Excel(name = "审批状态", width = 15)
@ApiModelProperty(value = "审批状态")
private java.lang.String status;
/**审核备注*/
@Excel(name = "审核备注", width = 15)
@ApiModelProperty(value = "审核备注")
private java.lang.String content;
/**创建人*/
@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;
/**机构是否入驻0否 1是(是否入驻过)*/
@Excel(name = "机构是否入驻0否 1是(是否入驻过)", width = 15)
@ApiModelProperty(value = "机构是否入驻0否 1是(是否入驻过)")
private java.lang.String izEntry;
/**咨询人姓名*/
@Excel(name = "咨询人姓名", width = 15)
@ApiModelProperty(value = "咨询人姓名")
private java.lang.String name;
/**性别*/
@Excel(name = "性别", width = 15)
@ApiModelProperty(value = "性别")
private java.lang.String sex;
/**民族*/
@Excel(name = "民族", width = 15)
@ApiModelProperty(value = "民族")
private java.lang.String national;
/**出生日期*/
@Excel(name = "出生日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@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 birthDate;
/**住址(身份证上)*/
@Excel(name = "住址(身份证上)", width = 15)
@ApiModelProperty(value = "住址(身份证上)")
private java.lang.String idCardAddress;
/**身份证号*/
@Excel(name = "身份证号", width = 15)
@ApiModelProperty(value = "身份证号")
private java.lang.String idCard;
/**签发机关*/
@Excel(name = "签发机关", width = 15)
@ApiModelProperty(value = "签发机关")
private java.lang.String issuingAuthority;
/**有效开始日期*/
@Excel(name = "有效开始日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@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 startTime;
/**有效结束日期*/
@Excel(name = "有效结束日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@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 endTime;
/**身份证正面*/
@Excel(name = "身份证正面", width = 15)
@ApiModelProperty(value = "身份证正面")
private java.lang.String cardZmPath;
/**身份证反面*/
@Excel(name = "身份证反面", width = 15)
@ApiModelProperty(value = "身份证反面")
private java.lang.String cardFmPath;
/**营业执照照片*/
@Excel(name = "营业执照照片", width = 15)
@ApiModelProperty(value = "营业执照照片")
private java.lang.String comBusinessLicense;
/**企业名称*/
@Excel(name = "企业名称", width = 15)
@ApiModelProperty(value = "企业名称")
private java.lang.String comName;
/**企业注册地址*/
@Excel(name = "企业注册地址", width = 15)
@ApiModelProperty(value = "企业注册地址")
private java.lang.String comRegisterAddress;
/**企业信用代码*/
@Excel(name = "企业信用代码", width = 15)
@ApiModelProperty(value = "企业信用代码")
private java.lang.String comCreditCode;
/**企业法人*/
@Excel(name = "企业法人", width = 15)
@ApiModelProperty(value = "企业法人")
private java.lang.String comLegalPerson;
/**机构地址*/
@Excel(name = "机构地址", width = 15)
@ApiModelProperty(value = "机构地址")
private java.lang.String orgAddress;
/**机构位置坐标格式:经度,纬度*/
@Excel(name = "机构位置坐标格式:经度,纬度", width = 15)
@ApiModelProperty(value = "机构位置坐标格式:经度,纬度")
private java.lang.String orgCoordinate;
/**机构负责人*/
@Excel(name = "机构负责人", width = 15)
@ApiModelProperty(value = "机构负责人")
private java.lang.String orgLeader;
/**机构负责人电话*/
@Excel(name = "机构负责人电话", width = 15)
@ApiModelProperty(value = "机构负责人电话")
private java.lang.String orgLeaderPhone;
/**机构楼宇牌号*/
@Excel(name = "机构楼宇牌号", width = 15)
@ApiModelProperty(value = "机构楼宇牌号")
private java.lang.String orgBuildingNumber;
/**机构房屋性质*/
@Excel(name = "机构房屋性质", width = 15)
@ApiModelProperty(value = "机构房屋性质")
private java.lang.String orgPropertyType;
/**机构建筑面积*/
@Excel(name = "机构建筑面积", width = 15)
@ApiModelProperty(value = "机构建筑面积")
private java.lang.Double orgBuildingArea;
}

View File

@ -0,0 +1,17 @@
package com.nu.modules.orgapplyinfo.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 机构加盟申请信息表
* @Author: 张明远
* @Date: 2025-06-05
* @Version: V1.0
*/
public interface OrgApplyInfoMapper extends BaseMapper<OrgApplyInfo> {
}

View File

@ -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.orgapplyinfo.mapper.OrgApplyInfoMapper">
</mapper>

View File

@ -0,0 +1,14 @@
package com.nu.modules.orgapplyinfo.service;
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfo;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 机构加盟申请信息表
* @Author: 张明远
* @Date: 2025-06-05
* @Version: V1.0
*/
public interface IOrgApplyInfoService extends IService<OrgApplyInfo> {
}

View File

@ -0,0 +1,54 @@
package com.nu.modules.orgapplyinfo.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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 org.apache.commons.compress.utils.Lists;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/**
* @Description: 机构加盟申请信息表
* @Author: 张明远
* @Date: 2025-06-05
* @Version: V1.0
*/
@Service
public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, OrgApplyInfo> implements IOrgApplyInfoService, IOrgApplyInfoApi {
@Override
public OrgApplyInfoApiEntity insert(OrgApplyInfoApiEntity orgApplyInfoApiEntity) {
OrgApplyInfo orgApplyInfo = new OrgApplyInfo();
BeanUtils.copyProperties(orgApplyInfoApiEntity,orgApplyInfo);
baseMapper.insert(orgApplyInfo);
orgApplyInfoApiEntity.setId(orgApplyInfo.getId());
return orgApplyInfoApiEntity;
}
@Override
public int updateById(OrgApplyInfoApiEntity orgApplyInfoApiEntity) {
OrgApplyInfo orgApplyInfo = new OrgApplyInfo();
BeanUtils.copyProperties(orgApplyInfoApiEntity,orgApplyInfo);
return baseMapper.updateById(orgApplyInfo);
}
@Override
public List<OrgApplyInfoApiEntity> queryAuditInfo(String tel) {
QueryWrapper<OrgApplyInfo> qw = new QueryWrapper<>();
qw.eq("tel",tel);
// qw.in("status",new String[]{"1","3"});//审核状态为审核中驳回的
qw.orderByDesc("create_time");
List<OrgApplyInfo> list = baseMapper.selectList(qw);
List<OrgApplyInfoApiEntity> result = Lists.newArrayList();
BeanUtil.copyProperties(list,result);
return result;
}
}

View File

@ -0,0 +1,104 @@
package com.nu.ssh;
import com.nu.utils.SshService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.websocket.*;
import javax.websocket.server.PathParam;
import javax.websocket.server.ServerEndpoint;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
@ServerEndpoint("/ws/ssh/{clientId}")
@Component
public class SshWebSocket {
private static SshService sshService;
@Autowired
public void setSshService(SshService sshService) {
SshWebSocket.sshService = sshService;
}
private Session wsSession;
private OutputStream outStream;
@OnOpen
public void onOpen(Session session, @PathParam("clientId") String clientId) {
this.wsSession = session;
try {
// 创建管道输出流将SSH输出转发到WebSocket
PipedOutputStream pos = new PipedOutputStream();
this.outStream = pos;
PipedInputStream pis = new PipedInputStream(pos);
// 启动线程读取SSH输出并发送到WebSocket
new Thread(() -> {
try {
byte[] buffer = new byte[1024];
int bytesRead;
while ((bytesRead = pis.read(buffer)) != -1) {
String output = new String(buffer, 0, bytesRead);
wsSession.getBasicRemote().sendText(output);
}
} catch (IOException e) {
e.printStackTrace();
}
}).start();
} catch (IOException e) {
e.printStackTrace();
}
}
@OnMessage
public void onMessage(String message, Session session) {
try {
if (message.startsWith("connect:")) {
// 格式: connect:host:port:username:password
String[] parts = message.substring(8).split(":");
String host = parts[0];
int port = Integer.parseInt(parts[1]);
String username = parts[2];
String password = parts[3];
sshService.connect(host, port, username, password);
sshService.startShell(outStream);
session.getBasicRemote().sendText("SSH连接已建立\n");
}
else if (message.equals("disconnect")) {
sshService.disconnect();
session.getBasicRemote().sendText("SSH连接已断开\n");
}
else {
sshService.executeCommand(message);
}
} catch (Exception e) {
try {
session.getBasicRemote().sendText("错误: " + e.getMessage() + "\n");
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
@OnClose
public void onClose() {
sshService.disconnect();
}
@OnError
public void onError(Session session, Throwable error) {
error.printStackTrace();
try {
session.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}

View File

@ -21,5 +21,10 @@
<groupId>com.nursingunit.boot</groupId>
<artifactId>nursing-unit-common</artifactId>
</dependency>
<dependency>
<groupId>com.nursingunit.boot</groupId>
<artifactId>nu-admin-local-api</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
</project>

View File

@ -1,5 +1,6 @@
package com.nu.modules.documentrecognition;
import com.aliyun.sdk.service.ocr_api20210707.models.*;
import com.nu.modules.aliyun.documentrecognition.DocumentRecognitionUtils;
import org.jeecg.common.api.vo.Result;
import org.springframework.beans.factory.annotation.Value;
@ -26,12 +27,12 @@ public class DocumentRecognitionApi {
* @param file 图片文件
*/
@PostMapping("/idCard")
public Result<String> recognizeIdCard(
public Result<RecognizeIdcardResponseBody> recognizeIdCard(
@RequestParam("file") MultipartFile file) {
DocumentRecognitionUtils utils = new DocumentRecognitionUtils(accessKeyId, accessKeySecret);
try (InputStream inputStream = file.getInputStream()) {
String result = utils.recognizeIdCard(inputStream);
RecognizeIdcardResponseBody result = utils.recognizeIdCard(inputStream);
return Result.ok(result);
} catch (Exception e) {
return Result.error("身份证识别失败: " + e.getMessage());
@ -45,12 +46,12 @@ public class DocumentRecognitionApi {
* @param file 图片文件
*/
@PostMapping("/household")
public Result<String> recognizeHousehold(
public Result<RecognizeHouseholdResponseBody> recognizeHousehold(
@RequestParam("file") MultipartFile file) {
DocumentRecognitionUtils utils = new DocumentRecognitionUtils(accessKeyId, accessKeySecret);
try (InputStream inputStream = file.getInputStream()) {
String result = utils.recognizeHouseholdRegister(inputStream);
RecognizeHouseholdResponseBody result = utils.recognizeHouseholdRegister(inputStream);
return Result.ok(result);
} catch (Exception e) {
return Result.error("户口本识别失败: " + e.getMessage());
@ -64,12 +65,12 @@ public class DocumentRecognitionApi {
* @param file 图片文件
*/
@PostMapping("/bankCard")
public Result<String> recognizeBankCard(
public Result<RecognizeBankCardResponseBody> recognizeBankCard(
@RequestParam("file") MultipartFile file) {
DocumentRecognitionUtils utils = new DocumentRecognitionUtils(accessKeyId, accessKeySecret);
try (InputStream inputStream = file.getInputStream()) {
String result = utils.recognizeBankCard(inputStream);
RecognizeBankCardResponseBody result = utils.recognizeBankCard(inputStream);
return Result.ok(result);
} catch (Exception e) {
return Result.error("银行卡识别失败: " + e.getMessage());
@ -83,12 +84,12 @@ public class DocumentRecognitionApi {
* @param file 图片文件
*/
@PostMapping("/medicalCard")
public Result<String> recognizeMedicalCard(
public Result<RecognizeSocialSecurityCardVersionIIResponseBody> recognizeMedicalCard(
@RequestParam("file") MultipartFile file) {
DocumentRecognitionUtils utils = new DocumentRecognitionUtils(accessKeyId, accessKeySecret);
try (InputStream inputStream = file.getInputStream()) {
String result = utils.recognizeMedicalCard(inputStream);
RecognizeSocialSecurityCardVersionIIResponseBody result = utils.recognizeMedicalCard(inputStream);
return Result.ok(result);
} catch (Exception e) {
return Result.error("医保卡识别失败: " + e.getMessage());
@ -102,12 +103,12 @@ public class DocumentRecognitionApi {
* @param file 图片文件
*/
@PostMapping("/businessLicense")
public Result<String> recognizeBusinessLicense(
public Result<RecognizeBusinessLicenseResponseBody> recognizeBusinessLicense(
@RequestParam("file") MultipartFile file) {
DocumentRecognitionUtils utils = new DocumentRecognitionUtils(accessKeyId, accessKeySecret);
try (InputStream inputStream = file.getInputStream()) {
String result = utils.recognizeBusinessLicense(inputStream);
RecognizeBusinessLicenseResponseBody result = utils.recognizeBusinessLicense(inputStream);
return Result.ok(result);
} catch (Exception e) {
return Result.error("营业执照识别失败: " + e.getMessage());

View File

@ -0,0 +1,29 @@
package com.nu.modules.systeminfo.api;
import com.alibaba.fastjson.JSONObject;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.api.ISysBaseAPI;
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/systemInfo")
public class SystemInfoApi {
@Autowired
private ISysBaseAPI sysBaseAPI;
/**
* 根据护理单元编码查询机构信息
* @param nuCode
* @return 查询不到时返回结果为null
*/
@GetMapping("/getOrgInfoByNUCode")
public Result<JSONObject> getOrgInfoByNUCode(@RequestParam("nuCode") String nuCode){
return Result.ok(sysBaseAPI.getOrgInfoByNUCode(nuCode));
}
}

View File

@ -0,0 +1,4 @@
package com.nu.modules.systeminfo.entity;
public class OrgInfoDTO {
}

View File

@ -0,0 +1,46 @@
package com.nu.modules.wechat.orgapplyinfo.api;
import com.nu.modules.orgapplyinfo.api.IOrgApplyInfoApi;
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfoApiEntity;
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;
@RestController
@RequestMapping("/api/orgApplyInfo")
public class OrgApplyInfoApi {
@Autowired
private IOrgApplyInfoApi orgApplyInfoApi;
/**
* 新增/编辑机构加盟申请信息
* @param orgApplyInfoApiEntity
* @return
*/
@PostMapping("/save")
public Result<Object> save(@RequestBody OrgApplyInfoApiEntity orgApplyInfoApiEntity) {
if (StringUtils.isNotBlank(orgApplyInfoApiEntity.getId())) {
return Result.ok(orgApplyInfoApi.updateById(orgApplyInfoApiEntity));
} else {
return Result.ok(orgApplyInfoApi.insert(orgApplyInfoApiEntity));
}
}
/**
* 根据手机号获取加盟申请信息
*
* @param tel
* @return
*/
@GetMapping("/queryAuditInfo")
public Result<List<OrgApplyInfoApiEntity>> queryAuditInfo(@RequestParam("tel") String tel){
if(StringUtils.isBlank(tel)){
return Result.error("手机号码错误");
}
return Result.ok(orgApplyInfoApi.queryAuditInfo(tel));
}
}

View File

@ -40,6 +40,20 @@
<artifactId>jsoup</artifactId>
<version>1.15.3</version>
</dependency>
<!-- WebSocket -->
<dependency>
<groupId>javax.websocket</groupId>
<artifactId>javax.websocket-api</artifactId>
<version>1.1</version>
</dependency>
<!-- JSch for SSH -->
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.55</version>
</dependency>
</dependencies>
</project>

View File

@ -2,9 +2,8 @@ package com.nu.modules.aliyun.documentrecognition;
import com.aliyun.auth.credentials.Credential;
import com.aliyun.auth.credentials.provider.StaticCredentialProvider;
import com.aliyun.sdk.service.ocr_api20210707.*;
import com.aliyun.sdk.service.ocr_api20210707.AsyncClient;
import com.aliyun.sdk.service.ocr_api20210707.models.*;
import com.google.gson.Gson;
import darabonba.core.client.ClientOverrideConfiguration;
import java.io.InputStream;
@ -45,73 +44,77 @@ public class DocumentRecognitionUtils {
* @param inputStream 图片输入流
* @return 识别结果JSON字符串
*/
public String recognizeIdCard(InputStream inputStream) throws Exception {
public RecognizeIdcardResponseBody recognizeIdCard(InputStream inputStream) throws Exception {
RecognizeIdcardRequest request = RecognizeIdcardRequest.builder()
.body(inputStream)
.build();
CompletableFuture<RecognizeIdcardResponse> future = client.recognizeIdcard(request);
RecognizeIdcardResponse response = future.get();
return new Gson().toJson(response.getBody());
return response.getBody();
}
/**
* 识别户口本首页
*
* @param inputStream 图片输入流
* @return 识别结果JSON字符串
*/
public String recognizeHouseholdRegister(InputStream inputStream) throws Exception {
public RecognizeHouseholdResponseBody recognizeHouseholdRegister(InputStream inputStream) throws Exception {
RecognizeHouseholdRequest request = RecognizeHouseholdRequest.builder()
.body(inputStream)
.build();
CompletableFuture<RecognizeHouseholdResponse> future = client.recognizeHousehold(request);
RecognizeHouseholdResponse response = future.get();
return new Gson().toJson(response.getBody());
return response.getBody();
}
/**
* 识别银行卡
*
* @param inputStream 图片输入流
* @return 识别结果JSON字符串
*/
public String recognizeBankCard(InputStream inputStream) throws Exception {
public RecognizeBankCardResponseBody recognizeBankCard(InputStream inputStream) throws Exception {
RecognizeBankCardRequest request = RecognizeBankCardRequest.builder()
.body(inputStream)
.build();
CompletableFuture<RecognizeBankCardResponse> future = client.recognizeBankCard(request);
RecognizeBankCardResponse response = future.get();
return new Gson().toJson(response.getBody());
return response.getBody();
}
/**
* 识别医保卡
*
* @param inputStream 图片输入流
* @return 识别结果JSON字符串
*/
public String recognizeMedicalCard(InputStream inputStream) throws Exception {
public RecognizeSocialSecurityCardVersionIIResponseBody recognizeMedicalCard(InputStream inputStream) throws Exception {
RecognizeSocialSecurityCardVersionIIRequest request = RecognizeSocialSecurityCardVersionIIRequest.builder()
.body(inputStream)
.build();
CompletableFuture<RecognizeSocialSecurityCardVersionIIResponse> future = client.recognizeSocialSecurityCardVersionII(request);
RecognizeSocialSecurityCardVersionIIResponse response = future.get();
return new Gson().toJson(response.getBody());
return response.getBody();
}
/**
* 识别营业执照
*
* @param inputStream 图片输入流
* @return 识别结果JSON字符串
*/
public String recognizeBusinessLicense(InputStream inputStream) throws Exception {
public RecognizeBusinessLicenseResponseBody recognizeBusinessLicense(InputStream inputStream) throws Exception {
RecognizeBusinessLicenseRequest request = RecognizeBusinessLicenseRequest.builder()
.body(inputStream)
.build();
CompletableFuture<RecognizeBusinessLicenseResponse> future = client.recognizeBusinessLicense(request);
RecognizeBusinessLicenseResponse response = future.get();
return new Gson().toJson(response.getBody());
return response.getBody();
}
}

View File

@ -0,0 +1,54 @@
package com.nu.utils;
import com.jcraft.jsch.ChannelShell;
import com.jcraft.jsch.JSch;
import com.jcraft.jsch.JSchException;
import com.jcraft.jsch.Session;
import org.springframework.stereotype.Service;
import java.io.OutputStream;
@Service
public class SshService {
private Session session;
private ChannelShell channel;
public void connect(String host, int port, String username, String password) throws JSchException {
JSch jsch = new JSch();
session = jsch.getSession(username, host, port);
session.setPassword(password);
session.setConfig("StrictHostKeyChecking", "no");
session.connect(3000);
}
public void startShell(OutputStream outStream) throws Exception {
channel = (ChannelShell) session.openChannel("shell");
channel.setInputStream(null);
// 将命令输出重定向到输出流
channel.setOutputStream(outStream);
channel.setExtOutputStream(outStream);
channel.connect();
}
public void executeCommand(String command) throws Exception {
if (channel == null || !channel.isConnected()) {
throw new Exception("SSH连接未建立或已断开");
}
OutputStream out = channel.getOutputStream();
out.write((command + "\n").getBytes());
out.flush();
}
public void disconnect() {
if (channel != null) {
channel.disconnect();
}
if (session != null) {
session.disconnect();
}
}
}

View File

@ -549,4 +549,6 @@ public interface ISysBaseAPI extends CommonAPI {
*
*/
List<JSONObject> queryOpeDept();
JSONObject getOrgInfoByNUCode(String nuCode);
}

View File

@ -1857,18 +1857,51 @@ public class SysBaseApiImpl implements ISysBaseAPI {
public List<JSONObject> queryOpeDept() {
QueryWrapper<SysDepart> qw = new QueryWrapper<>();
qw.eq("org_category", "1");
qw.eq("del_flag","0");
qw.eq("del_flag", "0");
List<SysDepart> list = sysDepartService.list(qw);
List<JSONObject> result = Lists.newArrayList();
if (list != null && !list.isEmpty()) {
list.stream().forEach(d -> {
Map<String, Object> map = Maps.newHashMap();
map.put("code",d.getOrgCode());
map.put("name",d.getDepartName());
map.put("code", d.getOrgCode());
map.put("name", d.getDepartName());
result.add(new JSONObject(map));
});
}
return result;
}
@Override
public JSONObject getOrgInfoByNUCode(String nuCode) {
if(StringUtils.isBlank(nuCode)){
return null;
}
String orgCode = nuCode.split("-")[0];
QueryWrapper<SysDepart> qw = new QueryWrapper<>();
qw.eq("org_code", orgCode);//机构编码
qw.eq("org_category", "1");//机构类型
qw.eq("del_flag", "0");//未删除数据
SysDepart sysDepart = sysDepartService.getOne(qw);
if (sysDepart != null) {
JSONObject result = new JSONObject();
result.put("departName", sysDepart.getDepartName()); // 机构名称
result.put("orgCode", sysDepart.getOrgCode()); // 机构编码
result.put("province", sysDepart.getProvince()); // 省份
result.put("city", sysDepart.getCity()); // 城市
result.put("district", sysDepart.getDistrict()); // 区县
result.put("operationStartTime", sysDepart.getOperationStartTime()); // 运营开始时间
result.put("operationEndTime", sysDepart.getOperationEndTime()); // 运营到期时间
result.put("contractStartTime", sysDepart.getContractStartTime()); // 合同开始时间
result.put("contractEndTime", sysDepart.getContractEndTime()); // 合同到期时间
result.put("mobile", sysDepart.getMobile()); // 手机号
result.put("fax", sysDepart.getFax()); // 传真
result.put("address", sysDepart.getAddress()); // 地址
result.put("memo", sysDepart.getMemo()); // 备注
result.put("serverUrl", sysDepart.getServerUrl()); // 机构服务器后台接口地址
return result;
} else {
return null;
}
}
}

View File

@ -327,7 +327,7 @@ logging:
level:
org.flywaydb: debug
org.jeecg.modules.system.mapper: info
com.nu.modules.system.mapper: info
com.nu.modules.systeminfo.mapper: info
#swagger
knife4j:
#开启增强配置

View File

@ -326,7 +326,7 @@ logging:
level:
org.flywaydb: debug
org.jeecg.modules.system.mapper: info
com.nu.modules.system.mapper: info
com.nu.modules.systeminfo.mapper: info
#swagger
knife4j:
#开启增强配置