|
@@ -48,6 +48,8 @@ import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.RegexValidateUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.util.UserUtils;
|
|
|
+import com.diagbot.vo.AmendOrgVO;
|
|
|
+import com.diagbot.vo.AmendUserInfoVO;
|
|
|
import com.diagbot.vo.BaseIdVO;
|
|
|
import com.diagbot.vo.ImgVerVerVO;
|
|
|
import com.diagbot.vo.OrganizationVO;
|
|
@@ -725,6 +727,8 @@ public class UserFacade extends UserServiceImpl {
|
|
|
userMap.put("type", userInfoOrganizationsVO.getType());
|
|
|
userMap.put("position", userInfoOrganizationsVO.getPosition());
|
|
|
userMap.put("userId", userInfoOrganizationsVO.getUserId());
|
|
|
+ userMap.put("orgId", userInfoOrganizationsVO.getOrgId());
|
|
|
+ userMap.put("orgSubNum", userInfoOrganizationsVO.getOrgSubNum());
|
|
|
boolean res = updateUserInfoAll(userMap);
|
|
|
if (!res) {
|
|
|
throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
|
|
@@ -788,7 +792,7 @@ public class UserFacade extends UserServiceImpl {
|
|
|
* @param userAndOrganizationVO
|
|
|
* @return 添加用户信息和机构信息管理员
|
|
|
*/
|
|
|
- public RespDTO<UserAndOrganizationVO> addUserInfos(UserAndOrganizationVO userAndOrganizationVO) {
|
|
|
+ public RespDTO<Boolean> addUserInfos(UserAndOrganizationVO userAndOrganizationVO) {
|
|
|
// TODO 先查找机构,获取机构id,再注册用户,返回用户id, 取到用户id和 机构id ,查询用户机构关联表,在进行绑定
|
|
|
// User user = new User();
|
|
|
// 验证用户是否存在
|
|
@@ -838,12 +842,12 @@ public class UserFacade extends UserServiceImpl {
|
|
|
userOrganization.setOrganizationId(userAndOrganizationVO.getOrganizationid());// 机构id
|
|
|
userOrganization.setUserId(userId);// 用户id
|
|
|
|
|
|
- userOrganizationFacade.save(userOrganization);
|
|
|
+ res = userOrganizationFacade.save(userOrganization);
|
|
|
} else {
|
|
|
throw new CommonException(CommonErrorCode.INSERT_DATA_FAILED);
|
|
|
}
|
|
|
|
|
|
- return RespDTO.onSuc(userAndOrganizationVO);
|
|
|
+ return RespDTO.onSuc(res);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1235,6 +1239,38 @@ public class UserFacade extends UserServiceImpl {
|
|
|
ex.exportExcelNew("用户信息详情", listName, listId, list,response);
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ //超管修改用户信息
|
|
|
+ public RespDTO<Boolean> updateUserInfos(AmendUserInfoVO amendUserInfoVO) {
|
|
|
+ Map<String, Object> amendUserInfo = new HashMap<String, Object>();
|
|
|
+ amendUserInfo.put("modifier", UserUtils.getCurrentPrincipleID());
|
|
|
+ amendUserInfo.put("gmtModified", DateUtil.now());
|
|
|
+ amendUserInfo.put("email", amendUserInfoVO.getEmail());
|
|
|
+ amendUserInfo.put("userId", amendUserInfoVO.getUserId());
|
|
|
+ amendUserInfo.put("autPosition",amendUserInfoVO.getAutPosition());
|
|
|
+ amendUserInfo.put("linKman",amendUserInfoVO.getLinKman());
|
|
|
+ boolean res = updateUserInfo(amendUserInfo);
|
|
|
+ if (!res) {
|
|
|
+ throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
|
|
|
+ }
|
|
|
+ return RespDTO.onSuc(res);
|
|
|
+ }
|
|
|
+
|
|
|
+ //超管修改机构信息
|
|
|
+ public RespDTO<Boolean> updateOrganizations(AmendOrgVO amendOrgVO) {
|
|
|
+ Map<String, Object> amendOrg = new HashMap<String, Object>();
|
|
|
+ amendOrg.put("modifier", UserUtils.getCurrentPrincipleID());
|
|
|
+ amendOrg.put("gmtModified", DateUtil.now());
|
|
|
+ amendOrg.put("address", amendOrgVO.getOrgAddress());
|
|
|
+ amendOrg.put("type", amendOrgVO.getOrgType());
|
|
|
+ amendOrg.put("orgId", amendOrgVO.getOrgId());
|
|
|
+ amendOrg.put("orgSubNum", amendOrgVO.getOrgSubNum());
|
|
|
+ boolean res = updateOrganizations(amendOrg);
|
|
|
+ if (!res) {
|
|
|
+ throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
|
|
|
+ }
|
|
|
+ return RespDTO.onSuc(res);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|