Merge branch 'master' of http://47.115.223.229:8888/yangjun/nursing_unit_java
This commit is contained in:
commit
31ee24918e
|
@ -1,5 +1,7 @@
|
||||||
package com.nu.modules.nuBizAdvisoryInfo.controller;
|
package com.nu.modules.nuBizAdvisoryInfo.controller;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONArray;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
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;
|
||||||
|
@ -86,4 +88,5 @@ public class H5ApiAdvisoryInfoController extends JeecgController<NuBizAdvisoryIn
|
||||||
}
|
}
|
||||||
return Result.OK(nuBizAdvisoryInfo);
|
return Result.OK(nuBizAdvisoryInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.nu.modules.nuBizAdvisoryInfo.entity;
|
package com.nu.modules.nuBizAdvisoryInfo.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -105,6 +106,28 @@ public class NuBizAdvisoryInfo implements Serializable {
|
||||||
private java.lang.String reimbType;
|
private java.lang.String reimbType;
|
||||||
/**护理单元*/
|
/**护理单元*/
|
||||||
private java.lang.String nuId;
|
private java.lang.String nuId;
|
||||||
|
/**民族*/
|
||||||
|
private java.lang.String national;
|
||||||
|
/**出生日期*/
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
private Date birthDate;
|
||||||
|
/**住址*/
|
||||||
|
private java.lang.String address;
|
||||||
|
/**身份证*/
|
||||||
|
private java.lang.String idCard;
|
||||||
|
/**签发机关*/
|
||||||
|
private java.lang.String issuingAuthority;
|
||||||
|
/**有效开始日期*/
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
private Date startTime;
|
||||||
|
/**有效结束日期*/
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
private Date endTime;
|
||||||
|
/**身份证正面*/
|
||||||
|
private java.lang.String cardZmPath;
|
||||||
|
/**身份证反面*/
|
||||||
|
private java.lang.String cardFmPath;
|
||||||
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private java.lang.String advisoryTypeName;
|
private java.lang.String advisoryTypeName;
|
||||||
|
|
|
@ -0,0 +1,128 @@
|
||||||
|
package com.nu.modules.nuBizCustomerInfo.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.nuBizCustomerInfo.entity.NuBizCustomerInfo;
|
||||||
|
import com.nu.modules.nuBizCustomerInfo.service.INuBizCustomerInfoService;
|
||||||
|
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.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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 客户信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-04-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="客户信息")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/h5Api/nuBizCustomerInfo")
|
||||||
|
@Slf4j
|
||||||
|
public class H5ApiCustomerInfoController 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="客户信息-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody NuBizCustomerInfo nuBizCustomerInfo) {
|
||||||
|
nuBizCustomerInfoService.save(nuBizCustomerInfo);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param nuBizCustomerInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "客户信息-编辑")
|
||||||
|
@ApiOperation(value="客户信息-编辑", notes="客户信息-编辑")
|
||||||
|
@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删除")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
nuBizCustomerInfoService.removeById(id);
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@AutoLog(value = "客户信息-退住")
|
||||||
|
@ApiOperation(value="客户信息-退住", notes="客户信息-退住")
|
||||||
|
@RequestMapping(value = "/editTuizhu", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> editTuizhu(@RequestBody NuBizCustomerInfo nuBizCustomerInfo) {
|
||||||
|
nuBizCustomerInfoService.editTuizhu(nuBizCustomerInfo);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
}
|
|
@ -50,7 +50,7 @@ public class NuBizCustomerInfo implements Serializable {
|
||||||
/**性别*/
|
/**性别*/
|
||||||
@Excel(name = "性别", width = 15)
|
@Excel(name = "性别", width = 15)
|
||||||
@ApiModelProperty(value = "性别")
|
@ApiModelProperty(value = "性别")
|
||||||
@Dict(dicCode = "sex")
|
// @Dict(dicCode = "sex")
|
||||||
private java.lang.String customerSex;
|
private java.lang.String customerSex;
|
||||||
/**年龄*/
|
/**年龄*/
|
||||||
@Excel(name = "年龄", width = 15)
|
@Excel(name = "年龄", width = 15)
|
||||||
|
@ -165,4 +165,24 @@ public class NuBizCustomerInfo implements Serializable {
|
||||||
/**所属部门*/
|
/**所属部门*/
|
||||||
@ApiModelProperty(value = "所属部门")
|
@ApiModelProperty(value = "所属部门")
|
||||||
private java.lang.String sysOrgCode;
|
private java.lang.String sysOrgCode;
|
||||||
|
|
||||||
|
/**签发机关*/
|
||||||
|
private java.lang.String issuingAuthority;
|
||||||
|
/**有效开始日期*/
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
private java.util.Date startTime;
|
||||||
|
/**有效结束日期*/
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
private java.util.Date endTime;
|
||||||
|
/**发卡日期*/
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
private java.util.Date cardIssuing;
|
||||||
|
/**血型*/
|
||||||
|
private java.lang.String bloodType;
|
||||||
|
/**兵役状况*/
|
||||||
|
private java.lang.String militaryType;
|
||||||
|
/**监护人id*/
|
||||||
|
private java.lang.String guardianId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -325,6 +325,12 @@ public class JwtUtil {
|
||||||
return returnValue;
|
return returnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getNuBizAdvisoryInfoUser(String key) {
|
||||||
|
String username = JwtUtil.getUsername(key);
|
||||||
|
//1.优先获取 SysUserCacheInfo
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
// public static void main(String[] args) {
|
// public static void main(String[] args) {
|
||||||
// String token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NjUzMzY1MTMsInVzZXJuYW1lIjoiYWRtaW4ifQ.xjhud_tWCNYBOg_aRlMgOdlZoWFFKB_givNElHNw3X0";
|
// String token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NjUzMzY1MTMsInVzZXJuYW1lIjoiYWRtaW4ifQ.xjhud_tWCNYBOg_aRlMgOdlZoWFFKB_givNElHNw3X0";
|
||||||
// System.out.println(JwtUtil.getUsername(token));
|
// System.out.println(JwtUtil.getUsername(token));
|
||||||
|
|
|
@ -77,7 +77,16 @@ public class JwtFilter extends BasicHttpAuthenticationFilter {
|
||||||
|
|
||||||
JwtToken jwtToken = new JwtToken(token);
|
JwtToken jwtToken = new JwtToken(token);
|
||||||
// 提交给realm进行登入,如果错误他会抛出异常并被捕获
|
// 提交给realm进行登入,如果错误他会抛出异常并被捕获
|
||||||
|
try {
|
||||||
getSubject(request, response).login(jwtToken);
|
getSubject(request, response).login(jwtToken);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("-------JwtFilter executeLogin error-------", e);
|
||||||
|
String username = JwtUtil.getNuBizAdvisoryInfoUser(token);
|
||||||
|
if(StringUtils.isEmpty(username)){
|
||||||
|
throw new RuntimeException("Token失效,请重新登录");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// getSubject(request, response).login(jwtToken);
|
||||||
// 如果没有抛出异常则代表登入成功,返回true
|
// 如果没有抛出异常则代表登入成功,返回true
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue