|
|
|
@ -38,8 +38,9 @@ public class UserServerImpl implements IUserServer {
|
|
|
|
|
receiver = userDto.getReceiver();
|
|
|
|
|
String operateType = userDto.getOperateType();
|
|
|
|
|
String delType = "D";
|
|
|
|
|
// 判断操作类型
|
|
|
|
|
if (Func.isNotEmpty(operateType) && operateType.contains(delType)) {
|
|
|
|
|
// 判断操作类型 是否是删除,或者 删除标记的
|
|
|
|
|
boolean isDel = (Func.isNotEmpty(operateType) && operateType.contains(delType)) || userDto.isDelFlag();
|
|
|
|
|
if (isDel) {
|
|
|
|
|
iPowerUserService.delUserByUserName(userDto.getUserName());
|
|
|
|
|
} else {
|
|
|
|
|
iPowerUserService.register(userDto);
|
|
|
|
@ -62,6 +63,7 @@ public class UserServerImpl implements IUserServer {
|
|
|
|
|
* @return UserDto
|
|
|
|
|
*/
|
|
|
|
|
public UserDto strToUserDto(String receiveUser) {
|
|
|
|
|
final String notDelFlag = "1";
|
|
|
|
|
XmlUtil xmlParseUtil = XmlUtil.of(receiveUser);
|
|
|
|
|
Node msgIdNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/id/@extension");
|
|
|
|
|
Node receiverNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/receiver/device/id/item/@extension");
|
|
|
|
@ -73,6 +75,8 @@ public class UserServerImpl implements IUserServer {
|
|
|
|
|
Node authorIdNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/author/assignedEntity/id/item/@extension");
|
|
|
|
|
Node authorNameNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/author/assignedEntity/assignedPerson/name/item/part/@value");
|
|
|
|
|
Node telephoneNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/subject1/valueSet/valueSetItems/EMPL_TEL/@value");
|
|
|
|
|
Node delFlagNode = xmlParseUtil.getNode("/PRVS_IN000002UV01/controlActProcess/subject/registrationRequest/subject1/valueSet/valueSetItems/STATUS_CODE/@value");
|
|
|
|
|
boolean isDel = !notDelFlag.equals(delFlagNode.getNodeValue());
|
|
|
|
|
UserDto userDto = new UserDto();
|
|
|
|
|
userDto.setDeptId(deptCodeNode.getNodeValue());
|
|
|
|
|
userDto.setReceiver(receiverNode.getNodeValue());
|
|
|
|
@ -84,7 +88,8 @@ public class UserServerImpl implements IUserServer {
|
|
|
|
|
userDto.setMessageId(msgIdNode.getNodeValue());
|
|
|
|
|
userDto.setAuthorName(authorNameNode.getNodeValue());
|
|
|
|
|
userDto.setRoleId(0L);
|
|
|
|
|
userDto.setTelephone(telephoneNode!=null?telephoneNode.getNodeValue():"");
|
|
|
|
|
userDto.setTelephone(telephoneNode != null ? telephoneNode.getNodeValue() : "");
|
|
|
|
|
userDto.setDelFlag(isDel);
|
|
|
|
|
return userDto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|