添加h5注册入住护理单元
This commit is contained in:
parent
c6e11e2d2f
commit
7657a7b8c6
|
@ -0,0 +1,60 @@
|
||||||
|
package com.nu.modules.nuBaseInfo.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.nu.modules.nuBaseInfo.entity.NuBaseInfo;
|
||||||
|
import com.nu.modules.nuBaseInfo.service.INuBaseInfoService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
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.factory.annotation.Autowired;
|
||||||
|
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.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 护理单元
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-04-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="护理单元")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/h5Api/nuBaseInfo")
|
||||||
|
@Slf4j
|
||||||
|
public class H5ApiBaseInfoController extends JeecgController<NuBaseInfo, INuBaseInfoService> {
|
||||||
|
@Autowired
|
||||||
|
private INuBaseInfoService nuBaseInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param nuBaseInfo
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "护理单元-分页列表查询")
|
||||||
|
@ApiOperation(value="护理单元-分页列表查询", notes="护理单元-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<NuBaseInfo>> queryPageList(NuBaseInfo nuBaseInfo, HttpServletRequest req) {
|
||||||
|
QueryWrapper<NuBaseInfo> queryWrapper = QueryGenerator.initQueryWrapper(nuBaseInfo, req.getParameterMap());
|
||||||
|
queryWrapper.in("status",0,3);//只查询未入住和退住的房间
|
||||||
|
queryWrapper.eq("area_flag","1");//只查询是护理单元你的房间
|
||||||
|
List<NuBaseInfo> pageList = nuBaseInfoService.list(queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,185 @@
|
||||||
|
package com.nu.modules.nuBaseInfo.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 com.nu.modules.nuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
||||||
|
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.nuBaseInfo.entity.NuBaseInfo;
|
||||||
|
import com.nu.modules.nuBaseInfo.service.INuBaseInfoService;
|
||||||
|
|
||||||
|
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-04-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="护理单元")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/nuBaseInfo/nuBaseInfo")
|
||||||
|
@Slf4j
|
||||||
|
public class NuBaseInfoController extends JeecgController<NuBaseInfo, INuBaseInfoService> {
|
||||||
|
@Autowired
|
||||||
|
private INuBaseInfoService nuBaseInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param nuBaseInfo
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "护理单元-分页列表查询")
|
||||||
|
@ApiOperation(value="护理单元-分页列表查询", notes="护理单元-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<NuBaseInfo>> queryPageList(NuBaseInfo nuBaseInfo,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||||
|
customeRuleMap.put("area_flag", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
|
customeRuleMap.put("status", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
|
QueryWrapper<NuBaseInfo> queryWrapper = QueryGenerator.initQueryWrapper(nuBaseInfo, req.getParameterMap(),customeRuleMap);
|
||||||
|
Page<NuBaseInfo> page = new Page<NuBaseInfo>(pageNo, pageSize);
|
||||||
|
IPage<NuBaseInfo> pageList = nuBaseInfoService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param nuBaseInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "护理单元-添加")
|
||||||
|
@ApiOperation(value="护理单元-添加", notes="护理单元-添加")
|
||||||
|
@RequiresPermissions("nuBaseInfo:nu_base_info:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody NuBaseInfo nuBaseInfo) {
|
||||||
|
nuBaseInfoService.save(nuBaseInfo);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param nuBaseInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "护理单元-编辑")
|
||||||
|
@ApiOperation(value="护理单元-编辑", notes="护理单元-编辑")
|
||||||
|
@RequiresPermissions("nuBaseInfo:nu_base_info:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody NuBaseInfo nuBaseInfo) {
|
||||||
|
nuBaseInfoService.updateById(nuBaseInfo);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "护理单元-通过id删除")
|
||||||
|
@ApiOperation(value="护理单元-通过id删除", notes="护理单元-通过id删除")
|
||||||
|
@RequiresPermissions("nuBaseInfo:nu_base_info:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
nuBaseInfoService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "护理单元-批量删除")
|
||||||
|
@ApiOperation(value="护理单元-批量删除", notes="护理单元-批量删除")
|
||||||
|
@RequiresPermissions("nuBaseInfo:nu_base_info:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.nuBaseInfoService.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<NuBaseInfo> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
NuBaseInfo nuBaseInfo = nuBaseInfoService.getById(id);
|
||||||
|
if(nuBaseInfo==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(nuBaseInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param nuBaseInfo
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("nuBaseInfo:nu_base_info:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, NuBaseInfo nuBaseInfo) {
|
||||||
|
return super.exportXls(request, nuBaseInfo, NuBaseInfo.class, "护理单元");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("nuBaseInfo:nu_base_info:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, NuBaseInfo.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.nu.modules.nuBaseInfo.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: 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;
|
||||||
|
/**区域标签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,0 +1,17 @@
|
||||||
|
package com.nu.modules.nuBaseInfo.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import com.nu.modules.nuBaseInfo.entity.NuBaseInfo;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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.nuBaseInfo.mapper.NuBaseInfoMapper">
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.nu.modules.nuBaseInfo.service;
|
||||||
|
|
||||||
|
import com.nu.modules.nuBaseInfo.entity.NuBaseInfo;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 护理单元
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-04-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface INuBaseInfoService extends IService<NuBaseInfo> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.nu.modules.nuBaseInfo.service.impl;
|
||||||
|
|
||||||
|
import com.nu.modules.nuBaseInfo.entity.NuBaseInfo;
|
||||||
|
import com.nu.modules.nuBaseInfo.mapper.NuBaseInfoMapper;
|
||||||
|
import com.nu.modules.nuBaseInfo.service.INuBaseInfoService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 护理单元
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-04-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class NuBaseInfoServiceImpl extends ServiceImpl<NuBaseInfoMapper, NuBaseInfo> implements INuBaseInfoService {
|
||||||
|
|
||||||
|
}
|
|
@ -1,31 +1,19 @@
|
||||||
package com.nu.modules.NuBizAdvisoryInfo.controller;
|
package com.nu.modules.nuBizAdvisoryInfo.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.nu.modules.nuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.nu.modules.nuBizAdvisoryInfo.service.INuBizAdvisoryInfoService;
|
||||||
import com.nu.modules.NuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
|
||||||
import com.nu.modules.NuBizAdvisoryInfo.service.INuBizAdvisoryInfoService;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.jeecg.common.api.CommonAPI;
|
import org.jeecg.common.api.CommonAPI;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
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.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.web.bind.annotation.*;
|
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: 咨询信息
|
* @Description: 咨询信息
|
|
@ -1,39 +1,25 @@
|
||||||
package com.nu.modules.NuBizAdvisoryInfo.controller;
|
package com.nu.modules.nuBizAdvisoryInfo.controller;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
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.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
import com.nu.modules.nuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
||||||
import com.nu.modules.NuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
import com.nu.modules.nuBizAdvisoryInfo.service.INuBizAdvisoryInfoService;
|
||||||
import com.nu.modules.NuBizAdvisoryInfo.service.INuBizAdvisoryInfoService;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
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.jeecg.common.system.base.controller.JeecgController;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
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 org.springframework.web.servlet.ModelAndView;
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
@ -1,13 +1,8 @@
|
||||||
package com.nu.modules.NuBizAdvisoryInfo.entity;
|
package com.nu.modules.nuBizAdvisoryInfo.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import org.jeecg.common.constant.ProvinceCityArea;
|
|
||||||
import org.jeecg.common.util.SpringContextUtils;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
@ -95,6 +90,22 @@ public class NuBizAdvisoryInfo implements Serializable {
|
||||||
@ApiModelProperty(value = "所属部门")
|
@ApiModelProperty(value = "所属部门")
|
||||||
private java.lang.String sysOrgCode;
|
private java.lang.String sysOrgCode;
|
||||||
|
|
||||||
|
/**老人姓名*/
|
||||||
|
private java.lang.String oldManName;
|
||||||
|
/**老人年龄*/
|
||||||
|
private java.lang.String oldManAge;
|
||||||
|
/**医保类型*/
|
||||||
|
@Dict(dicCode = "medical_insurance_type")
|
||||||
|
private java.lang.String medicalInsuranceType;
|
||||||
|
/**老人性别*/
|
||||||
|
@Dict(dicCode = "sex")
|
||||||
|
private java.lang.String oldManSex;
|
||||||
|
/**报销类型*/
|
||||||
|
@Dict(dicCode = "reimb_type")
|
||||||
|
private java.lang.String reimbType;
|
||||||
|
/**护理单元*/
|
||||||
|
private java.lang.String nuId;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private java.lang.String advisoryTypeName;
|
private java.lang.String advisoryTypeName;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
@ -103,5 +114,12 @@ public class NuBizAdvisoryInfo implements Serializable {
|
||||||
private java.lang.String sysOrgCodeName;
|
private java.lang.String sysOrgCodeName;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private java.lang.String statusName;
|
private java.lang.String statusName;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String oldManSexName;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String medicalInsuranceTypeName;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String reimbTypeName;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,9 +1,6 @@
|
||||||
package com.nu.modules.NuBizAdvisoryInfo.mapper;
|
package com.nu.modules.nuBizAdvisoryInfo.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import com.nu.modules.nuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import com.nu.modules.NuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.nu.modules.NuBizAdvisoryInfo.mapper.NuBizAdvisoryInfoMapper">
|
<mapper namespace="com.nu.modules.nuBizAdvisoryInfo.mapper.NuBizAdvisoryInfoMapper">
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -1,6 +1,6 @@
|
||||||
package com.nu.modules.NuBizAdvisoryInfo.service;
|
package com.nu.modules.nuBizAdvisoryInfo.service;
|
||||||
|
|
||||||
import com.nu.modules.NuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
import com.nu.modules.nuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,7 +1,7 @@
|
||||||
package com.nu.modules.NuBizAdvisoryInfo.service;
|
package com.nu.modules.nuBizAdvisoryInfo.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.nu.modules.NuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
import com.nu.modules.nuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 咨询信息
|
* @Description: 咨询信息
|
|
@ -1,15 +1,16 @@
|
||||||
package com.nu.modules.NuBizAdvisoryInfo.service.impl;
|
package com.nu.modules.nuBizAdvisoryInfo.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
|
import com.nu.modules.nuBaseInfo.entity.NuBaseInfo;
|
||||||
import com.nu.modules.NuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
import com.nu.modules.nuBaseInfo.service.INuBaseInfoService;
|
||||||
import com.nu.modules.NuBizAdvisoryInfo.mapper.NuBizAdvisoryInfoMapper;
|
import com.nu.modules.nuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
||||||
import com.nu.modules.NuBizAdvisoryInfo.service.INuBizAdvisoryInfoService;
|
import com.nu.modules.nuBizAdvisoryInfo.mapper.NuBizAdvisoryInfoMapper;
|
||||||
import com.nu.modules.NuBizAdvisoryInfo.service.ServerAdvisoryInfoService;
|
import com.nu.modules.nuBizAdvisoryInfo.service.INuBizAdvisoryInfoService;
|
||||||
|
import com.nu.modules.nuBizAdvisoryInfo.service.ServerAdvisoryInfoService;
|
||||||
import com.nu.modules.bizEmployeesInfo.entity.BizEmployeesInfo;
|
import com.nu.modules.bizEmployeesInfo.entity.BizEmployeesInfo;
|
||||||
import com.nu.modules.bizEmployeesInfo.service.IBizEmployeesInfoService;
|
import com.nu.modules.bizEmployeesInfo.service.IBizEmployeesInfoService;
|
||||||
|
import com.nu.modules.nuBizCustomerInfo.entity.NuBizCustomerInfo;
|
||||||
|
import com.nu.modules.nuBizCustomerInfo.service.INuBizCustomerInfoService;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.shiro.SecurityUtils;
|
|
||||||
import org.jeecg.common.system.vo.LoginUser;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -30,6 +31,11 @@ public class NuBizAdvisoryInfoServiceImpl extends ServiceImpl<NuBizAdvisoryInfoM
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBizEmployeesInfoService bizEmployeesInfoService;
|
private IBizEmployeesInfoService bizEmployeesInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private INuBizCustomerInfoService nuBizCustomerInfoService;
|
||||||
|
@Autowired
|
||||||
|
private INuBaseInfoService nuBaseInfoService;
|
||||||
|
|
||||||
public boolean save(NuBizAdvisoryInfo entity) {
|
public boolean save(NuBizAdvisoryInfo entity) {
|
||||||
baseMapper.insert(entity);//插入业务数据
|
baseMapper.insert(entity);//插入业务数据
|
||||||
serverAdvisoryInfoService.save(entity);//插入运维数据
|
serverAdvisoryInfoService.save(entity);//插入运维数据
|
||||||
|
@ -39,10 +45,10 @@ public class NuBizAdvisoryInfoServiceImpl extends ServiceImpl<NuBizAdvisoryInfoM
|
||||||
public boolean updateById(NuBizAdvisoryInfo entity) {
|
public boolean updateById(NuBizAdvisoryInfo entity) {
|
||||||
baseMapper.updateById(entity);//插入业务数据
|
baseMapper.updateById(entity);//插入业务数据
|
||||||
serverAdvisoryInfoService.updateById(entity);//插入运维数据
|
serverAdvisoryInfoService.updateById(entity);//插入运维数据
|
||||||
if(StringUtils.equals("2", entity.getStatus()) && StringUtils.equals("2", entity.getAdvisoryType())){//审核通过并且是要成为员工的
|
//审核通过并且是要成为员工的
|
||||||
|
if(StringUtils.equals("2", entity.getStatus()) && StringUtils.equals("2", entity.getAdvisoryType())){
|
||||||
//插入员工数据
|
//插入员工数据
|
||||||
BizEmployeesInfo bizEmployeesInfo = bizEmployeesInfoService.getById(entity.getId());
|
BizEmployeesInfo bizEmployeesInfo = bizEmployeesInfoService.getById(entity.getId());
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
||||||
if(bizEmployeesInfo == null){
|
if(bizEmployeesInfo == null){
|
||||||
bizEmployeesInfo = new BizEmployeesInfo();
|
bizEmployeesInfo = new BizEmployeesInfo();
|
||||||
bizEmployeesInfo.setName(entity.getName());
|
bizEmployeesInfo.setName(entity.getName());
|
||||||
|
@ -56,6 +62,28 @@ public class NuBizAdvisoryInfoServiceImpl extends ServiceImpl<NuBizAdvisoryInfoM
|
||||||
bizEmployeesInfo.setTel(entity.getTel());
|
bizEmployeesInfo.setTel(entity.getTel());
|
||||||
bizEmployeesInfoService.updateById(bizEmployeesInfo);
|
bizEmployeesInfoService.updateById(bizEmployeesInfo);
|
||||||
}
|
}
|
||||||
|
//审核通过并且是申请老人入住的
|
||||||
|
}else if(StringUtils.equals("2", entity.getStatus()) && StringUtils.equals("1", entity.getAdvisoryType())){
|
||||||
|
|
||||||
|
//新增老人数据
|
||||||
|
NuBizCustomerInfo nuBizCustomerInfo = new NuBizCustomerInfo();
|
||||||
|
nuBizCustomerInfo.setCustomerName(entity.getName());
|
||||||
|
nuBizCustomerInfo.setCustomerSex(entity.getOldManSex());
|
||||||
|
nuBizCustomerInfo.setCustomerAge(entity.getOldManAge());
|
||||||
|
nuBizCustomerInfo.setNuId(entity.getNuId());
|
||||||
|
nuBizCustomerInfo.setContactNumber(entity.getTel());
|
||||||
|
nuBizCustomerInfo.setMedicalType(entity.getMedicalInsuranceType());
|
||||||
|
nuBizCustomerInfo.setReimbType(entity.getReimbType());
|
||||||
|
nuBizCustomerInfo.setCurrentState("0");
|
||||||
|
nuBizCustomerInfoService.save(nuBizCustomerInfo);
|
||||||
|
|
||||||
|
//修改护理单元对应的数据
|
||||||
|
NuBaseInfo nuBaseInfo = nuBaseInfoService.getById(entity.getNuId());
|
||||||
|
nuBaseInfo.setCustomerId(nuBizCustomerInfo.getId());
|
||||||
|
nuBaseInfo.setStatus("1");
|
||||||
|
nuBaseInfoService.updateById(nuBaseInfo);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
|
@ -1,11 +1,10 @@
|
||||||
package com.nu.modules.NuBizAdvisoryInfo.service.impl;
|
package com.nu.modules.nuBizAdvisoryInfo.service.impl;
|
||||||
|
|
||||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.nu.modules.NuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
import com.nu.modules.nuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
||||||
import com.nu.modules.NuBizAdvisoryInfo.mapper.NuBizAdvisoryInfoMapper;
|
import com.nu.modules.nuBizAdvisoryInfo.mapper.NuBizAdvisoryInfoMapper;
|
||||||
import com.nu.modules.NuBizAdvisoryInfo.service.INuBizAdvisoryInfoService;
|
import com.nu.modules.nuBizAdvisoryInfo.service.ServerAdvisoryInfoService;
|
||||||
import com.nu.modules.NuBizAdvisoryInfo.service.ServerAdvisoryInfoService;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -0,0 +1,180 @@
|
||||||
|
package com.nu.modules.nuBizCustomerInfo.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.nuBizCustomerInfo.entity.NuBizCustomerInfo;
|
||||||
|
import com.nu.modules.nuBizCustomerInfo.service.INuBizCustomerInfoService;
|
||||||
|
|
||||||
|
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-04-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="客户信息")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/nuBizCustomerInfo/nuBizCustomerInfo")
|
||||||
|
@Slf4j
|
||||||
|
public class NuBizCustomerInfoController extends JeecgController<NuBizCustomerInfo, INuBizCustomerInfoService> {
|
||||||
|
@Autowired
|
||||||
|
private INuBizCustomerInfoService nuBizCustomerInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param nuBizCustomerInfo
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "客户信息-分页列表查询")
|
||||||
|
@ApiOperation(value="客户信息-分页列表查询", notes="客户信息-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<NuBizCustomerInfo>> queryPageList(NuBizCustomerInfo nuBizCustomerInfo,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<NuBizCustomerInfo> queryWrapper = QueryGenerator.initQueryWrapper(nuBizCustomerInfo, req.getParameterMap());
|
||||||
|
Page<NuBizCustomerInfo> page = new Page<NuBizCustomerInfo>(pageNo, pageSize);
|
||||||
|
IPage<NuBizCustomerInfo> pageList = nuBizCustomerInfoService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param nuBizCustomerInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "客户信息-添加")
|
||||||
|
@ApiOperation(value="客户信息-添加", notes="客户信息-添加")
|
||||||
|
@RequiresPermissions("nuBizCustomerInfo:nu_biz_customer_info:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody NuBizCustomerInfo nuBizCustomerInfo) {
|
||||||
|
nuBizCustomerInfoService.save(nuBizCustomerInfo);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param nuBizCustomerInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "客户信息-编辑")
|
||||||
|
@ApiOperation(value="客户信息-编辑", notes="客户信息-编辑")
|
||||||
|
@RequiresPermissions("nuBizCustomerInfo:nu_biz_customer_info:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody NuBizCustomerInfo nuBizCustomerInfo) {
|
||||||
|
nuBizCustomerInfoService.updateById(nuBizCustomerInfo);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "客户信息-通过id删除")
|
||||||
|
@ApiOperation(value="客户信息-通过id删除", notes="客户信息-通过id删除")
|
||||||
|
@RequiresPermissions("nuBizCustomerInfo:nu_biz_customer_info:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
nuBizCustomerInfoService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "客户信息-批量删除")
|
||||||
|
@ApiOperation(value="客户信息-批量删除", notes="客户信息-批量删除")
|
||||||
|
@RequiresPermissions("nuBizCustomerInfo:nu_biz_customer_info:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.nuBizCustomerInfoService.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<NuBizCustomerInfo> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
NuBizCustomerInfo nuBizCustomerInfo = nuBizCustomerInfoService.getById(id);
|
||||||
|
if(nuBizCustomerInfo==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(nuBizCustomerInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param nuBizCustomerInfo
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("nuBizCustomerInfo:nu_biz_customer_info:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, NuBizCustomerInfo nuBizCustomerInfo) {
|
||||||
|
return super.exportXls(request, nuBizCustomerInfo, NuBizCustomerInfo.class, "客户信息");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("nuBizCustomerInfo:nu_biz_customer_info:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, NuBizCustomerInfo.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,168 @@
|
||||||
|
package com.nu.modules.nuBizCustomerInfo.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: jeecg-boot
|
||||||
|
* @Date: 2025-04-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("nu_biz_customer_info")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="nu_biz_customer_info对象", description="客户信息")
|
||||||
|
public class NuBizCustomerInfo 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 = "护理单元")
|
||||||
|
@Dict(dicCode = "id",dicText = "nu_name",dictTable = "nu_base_info")
|
||||||
|
private java.lang.String nuId;
|
||||||
|
/**姓名*/
|
||||||
|
@Excel(name = "姓名", width = 15)
|
||||||
|
@ApiModelProperty(value = "姓名")
|
||||||
|
private java.lang.String customerName;
|
||||||
|
/**性别*/
|
||||||
|
@Excel(name = "性别", width = 15)
|
||||||
|
@ApiModelProperty(value = "性别")
|
||||||
|
@Dict(dicCode = "sex")
|
||||||
|
private java.lang.String customerSex;
|
||||||
|
/**年龄*/
|
||||||
|
@Excel(name = "年龄", width = 15)
|
||||||
|
@ApiModelProperty(value = "年龄")
|
||||||
|
private java.lang.String customerAge;
|
||||||
|
/**身份证号码*/
|
||||||
|
@Excel(name = "身份证号码", width = 15)
|
||||||
|
@ApiModelProperty(value = "身份证号码")
|
||||||
|
private java.lang.String idCard;
|
||||||
|
/**出生日期*/
|
||||||
|
@Excel(name = "出生日期", width = 15)
|
||||||
|
@ApiModelProperty(value = "出生日期")
|
||||||
|
private java.lang.String dateOfBirth;
|
||||||
|
/**民族*/
|
||||||
|
@Excel(name = "民族", width = 15)
|
||||||
|
@ApiModelProperty(value = "民族")
|
||||||
|
private java.lang.String national;
|
||||||
|
/**头像*/
|
||||||
|
@Excel(name = "头像", width = 15)
|
||||||
|
@ApiModelProperty(value = "头像")
|
||||||
|
private java.lang.String avatarPath;
|
||||||
|
/**医保类型*/
|
||||||
|
@Excel(name = "医保类型", width = 15, dicCode = "medical_insurance_type")
|
||||||
|
@Dict(dicCode = "medical_insurance_type")
|
||||||
|
@ApiModelProperty(value = "医保类型")
|
||||||
|
private java.lang.String medicalType;
|
||||||
|
/**报销类型*/
|
||||||
|
@Dict(dicCode = "reimb_type")
|
||||||
|
private java.lang.String reimbType;
|
||||||
|
/**医保卡号*/
|
||||||
|
@Excel(name = "医保卡号", width = 15)
|
||||||
|
@ApiModelProperty(value = "医保卡号")
|
||||||
|
private java.lang.String medicalCard;
|
||||||
|
/**文化程度*/
|
||||||
|
@Excel(name = "文化程度", width = 15)
|
||||||
|
@ApiModelProperty(value = "文化程度")
|
||||||
|
private java.lang.String educationLevel;
|
||||||
|
/**婚姻状况*/
|
||||||
|
@Excel(name = "婚姻状况", width = 15)
|
||||||
|
@ApiModelProperty(value = "婚姻状况")
|
||||||
|
private java.lang.String maritalStatus;
|
||||||
|
/**宗教信仰*/
|
||||||
|
@Excel(name = "宗教信仰", width = 15)
|
||||||
|
@ApiModelProperty(value = "宗教信仰")
|
||||||
|
private java.lang.String religiousBeliefs;
|
||||||
|
/**身份证正面*/
|
||||||
|
@Excel(name = "身份证正面", width = 15)
|
||||||
|
@ApiModelProperty(value = "身份证正面")
|
||||||
|
private java.lang.String frontIdCard;
|
||||||
|
/**身份证反面*/
|
||||||
|
@Excel(name = "身份证反面", width = 15)
|
||||||
|
@ApiModelProperty(value = "身份证反面")
|
||||||
|
private java.lang.String negativeIdCard;
|
||||||
|
/**户口本本人页*/
|
||||||
|
@Excel(name = "户口本本人页", width = 15)
|
||||||
|
@ApiModelProperty(value = "户口本本人页")
|
||||||
|
private java.lang.String accountBookHimself;
|
||||||
|
/**医保卡正面*/
|
||||||
|
@Excel(name = "医保卡正面", width = 15)
|
||||||
|
@ApiModelProperty(value = "医保卡正面")
|
||||||
|
private java.lang.String frontMedical;
|
||||||
|
/**医保卡反面*/
|
||||||
|
@Excel(name = "医保卡反面", width = 15)
|
||||||
|
@ApiModelProperty(value = "医保卡反面")
|
||||||
|
private java.lang.String negaticeMedical;
|
||||||
|
/**备注*/
|
||||||
|
@Excel(name = "备注", width = 15)
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private java.lang.String content;
|
||||||
|
/**当前状态 0咨询 1入住 2留床 3退住*/
|
||||||
|
@Excel(name = "当前状态 0咨询 1入住 2留床 3退住", width = 15)
|
||||||
|
@ApiModelProperty(value = "当前状态 0咨询 1入住 2留床 3退住")
|
||||||
|
@Dict(dicCode = "current_state")
|
||||||
|
private java.lang.String currentState;
|
||||||
|
/**监护人*/
|
||||||
|
@Excel(name = "监护人", width = 15)
|
||||||
|
@ApiModelProperty(value = "监护人")
|
||||||
|
private java.lang.String guardian;
|
||||||
|
/**关系*/
|
||||||
|
@Excel(name = "关系", width = 15)
|
||||||
|
@ApiModelProperty(value = "关系")
|
||||||
|
private java.lang.String relationship;
|
||||||
|
/**联系电话*/
|
||||||
|
@Excel(name = "联系电话", width = 15)
|
||||||
|
@ApiModelProperty(value = "联系电话")
|
||||||
|
private java.lang.String contactNumber;
|
||||||
|
/**家庭住址*/
|
||||||
|
@Excel(name = "家庭住址", width = 15)
|
||||||
|
@ApiModelProperty(value = "家庭住址")
|
||||||
|
private java.lang.String homeAddress;
|
||||||
|
/**是否删除 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,0 +1,17 @@
|
||||||
|
package com.nu.modules.nuBizCustomerInfo.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import com.nu.modules.nuBizCustomerInfo.entity.NuBizCustomerInfo;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 客户信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-04-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface NuBizCustomerInfoMapper extends BaseMapper<NuBizCustomerInfo> {
|
||||||
|
|
||||||
|
}
|
|
@ -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.nuBizCustomerInfo.mapper.NuBizCustomerInfoMapper">
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.nu.modules.nuBizCustomerInfo.service;
|
||||||
|
|
||||||
|
import com.nu.modules.nuBizCustomerInfo.entity.NuBizCustomerInfo;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 客户信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-04-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface INuBizCustomerInfoService extends IService<NuBizCustomerInfo> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.nu.modules.nuBizCustomerInfo.service.impl;
|
||||||
|
|
||||||
|
import com.nu.modules.nuBizCustomerInfo.entity.NuBizCustomerInfo;
|
||||||
|
import com.nu.modules.nuBizCustomerInfo.mapper.NuBizCustomerInfoMapper;
|
||||||
|
import com.nu.modules.nuBizCustomerInfo.service.INuBizCustomerInfoService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 客户信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-04-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class NuBizCustomerInfoServiceImpl extends ServiceImpl<NuBizCustomerInfoMapper, NuBizCustomerInfo> implements INuBizCustomerInfoService {
|
||||||
|
|
||||||
|
}
|
|
@ -112,6 +112,7 @@ public class ShiroConfig {
|
||||||
filterChainDefinitionMap.put("/sys/getQrcodeToken/**", "anon"); //监听扫码
|
filterChainDefinitionMap.put("/sys/getQrcodeToken/**", "anon"); //监听扫码
|
||||||
filterChainDefinitionMap.put("/sys/checkAuth", "anon"); //授权接口排除
|
filterChainDefinitionMap.put("/sys/checkAuth", "anon"); //授权接口排除
|
||||||
filterChainDefinitionMap.put("/h5Api/nuBizAdvisoryInfo/**", "anon"); //授权接口排除
|
filterChainDefinitionMap.put("/h5Api/nuBizAdvisoryInfo/**", "anon"); //授权接口排除
|
||||||
|
filterChainDefinitionMap.put("/h5Api/nuBaseInfo/**", "anon"); //授权接口排除
|
||||||
|
|
||||||
//update-begin--Author:scott Date:20221116 for:排除静态资源后缀
|
//update-begin--Author:scott Date:20221116 for:排除静态资源后缀
|
||||||
filterChainDefinitionMap.put("/", "anon");
|
filterChainDefinitionMap.put("/", "anon");
|
||||||
|
|
Loading…
Reference in New Issue