|
@@ -3,6 +3,7 @@ package com.diagbot.web;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
|
+import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -16,6 +17,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.diagbot.annotation.SysLogger;
|
|
import com.diagbot.annotation.SysLogger;
|
|
import com.diagbot.dto.RespDTO;
|
|
import com.diagbot.dto.RespDTO;
|
|
import com.diagbot.dto.UserInfoDTO;
|
|
import com.diagbot.dto.UserInfoDTO;
|
|
|
|
+import com.diagbot.entity.Organization;
|
|
|
|
+import com.diagbot.facade.OrganizationFacade;
|
|
import com.diagbot.facade.UserFacade;
|
|
import com.diagbot.facade.UserFacade;
|
|
import com.diagbot.util.UserUtils;
|
|
import com.diagbot.util.UserUtils;
|
|
import com.diagbot.vo.UserInfoOrganizationsVO;
|
|
import com.diagbot.vo.UserInfoOrganizationsVO;
|
|
@@ -35,6 +38,8 @@ public class UserInfoController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private UserFacade userFacade;
|
|
private UserFacade userFacade;
|
|
|
|
+ @Autowired
|
|
|
|
+ OrganizationFacade organizationFacade;
|
|
|
|
|
|
@ApiOperation(value = "分页查询获取用户信息", notes = "根据每页显示条数,默认 10,和当前页")
|
|
@ApiOperation(value = "分页查询获取用户信息", notes = "根据每页显示条数,默认 10,和当前页")
|
|
@PostMapping("/getUserInfoPag")
|
|
@PostMapping("/getUserInfoPag")
|
|
@@ -52,7 +57,7 @@ public class UserInfoController {
|
|
@PostMapping("/updateUserInfoAll")
|
|
@PostMapping("/updateUserInfoAll")
|
|
@SysLogger("updateUserInfoAll")
|
|
@SysLogger("updateUserInfoAll")
|
|
public RespDTO<UserInfoOrganizationsVO> updateUserInfoAll( UserInfoOrganizationsVO userInfo){
|
|
public RespDTO<UserInfoOrganizationsVO> updateUserInfoAll( UserInfoOrganizationsVO userInfo){
|
|
- int res= userFacade.updateUserInfoAll(userInfo);
|
|
|
|
|
|
+ int res = userFacade.updateUserInfoAll(userInfo);
|
|
|
|
|
|
return RespDTO.onSuc("修改成功"+res);
|
|
return RespDTO.onSuc("修改成功"+res);
|
|
}
|
|
}
|
|
@@ -63,11 +68,41 @@ public class UserInfoController {
|
|
public RespDTO updateDeleted(@RequestParam String userId){
|
|
public RespDTO updateDeleted(@RequestParam String userId){
|
|
Map<String,String> map = new HashMap<String, String>();
|
|
Map<String,String> map = new HashMap<String, String>();
|
|
map.put("userId", userId);
|
|
map.put("userId", userId);
|
|
- map.put("modifier",UserUtils.getCurrentPrincipleID());
|
|
|
|
|
|
+ //map.put("modifier",UserUtils.getCurrentPrincipleID());
|
|
|
|
+ map.put("modifier","5");
|
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
map.put("gmtModified",df.format(new Date()));
|
|
map.put("gmtModified",df.format(new Date()));
|
|
int res= userFacade.updateDeleted(map);
|
|
int res= userFacade.updateDeleted(map);
|
|
return RespDTO.onSuc("刪除成功"+res);
|
|
return RespDTO.onSuc("刪除成功"+res);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "模糊查询机构信息", notes = "机构信息")
|
|
|
|
+ @PostMapping("/findOrganization")
|
|
|
|
+ @SysLogger("findOrganization")
|
|
|
|
+ public RespDTO findOrganization(@RequestParam String organizationName){
|
|
|
|
+ //TODO 返回机构Id和机构
|
|
|
|
+ List<Organization> organization = organizationFacade.findOrganization(organizationName);
|
|
|
|
+
|
|
|
|
+ return RespDTO.onSuc("查询成功");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "添加构信息", notes = "机构信息")
|
|
|
|
+ @PostMapping("/addOrganization")
|
|
|
|
+ @SysLogger("addOrganization")
|
|
|
|
+ public RespDTO addOrganization(Organization organization){
|
|
|
|
+ //TODO
|
|
|
|
+
|
|
|
|
+ return RespDTO.onSuc("成功");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "添加用户信息和机构信息管理员", notes = "用户信息和机构信息的绑定")
|
|
|
|
+ @PostMapping("/addUserInfo")
|
|
|
|
+ @SysLogger("addUserInfo")
|
|
|
|
+ public RespDTO addUserInfo(@RequestParam String userId){
|
|
|
|
+ //TODO 先查找机构,获取机构id,再注册用户,返回用户id, 取到用户id和 机构id ,查询用户机构关联表,在进行绑定
|
|
|
|
+
|
|
|
|
+ return RespDTO.onSuc("成功");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|