Commit e4a25de8 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hp-smart into dev-ly

parents e5f8b3f6 0ef907ae
...@@ -32,9 +32,9 @@ public class UserSessionUtils extends UserSession { ...@@ -32,9 +32,9 @@ public class UserSessionUtils extends UserSession {
*/ */
public static User getUser() { public static User getUser() {
EiInfo eiInfo = new EiInfo(); EiInfo eiInfo = new EiInfo();
eiInfo.set("userId", UserSession.getUserId()); eiInfo.set("loginName", UserSession.getLoginName());
eiInfo.set(EiConstant.serviceName, "HPXSUser"); eiInfo.set(EiConstant.serviceName, "HPXSUser");
eiInfo.set(EiConstant.methodName, "getUser"); eiInfo.set(EiConstant.methodName, "getUserByLogin");
EiInfo outInfo = XLocalManager.call(eiInfo); EiInfo outInfo = XLocalManager.call(eiInfo);
// -1表示报错 // -1表示报错
if (outInfo.getStatus() == -1) { if (outInfo.getStatus() == -1) {
......
...@@ -6,6 +6,7 @@ import com.baosight.hpjx.core.dao.DaoUtils; ...@@ -6,6 +6,7 @@ import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.utils.Iplat4jUtils; import com.baosight.hpjx.core.utils.Iplat4jUtils;
import com.baosight.hpjx.hp.dm.domain.HPDM099; import com.baosight.hpjx.hp.dm.domain.HPDM099;
import com.baosight.hpjx.hp.xs.domain.HPXS007A; import com.baosight.hpjx.hp.xs.domain.HPXS007A;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils; import com.baosight.hpjx.util.MapUtils;
import com.baosight.iplat4j.core.ProjectInfo; import com.baosight.iplat4j.core.ProjectInfo;
...@@ -65,6 +66,7 @@ public class ServiceHPDM099 extends ServiceEPBase { ...@@ -65,6 +66,7 @@ public class ServiceHPDM099 extends ServiceEPBase {
public EiInfo upload(EiInfo inInfo) { public EiInfo upload(EiInfo inInfo) {
try { try {
HPDM099 fDm099 = MapUtils.toDaoEPBase(inInfo, HPDM099.class); HPDM099 fDm099 = MapUtils.toDaoEPBase(inInfo, HPDM099.class);
AssertUtils.isEmpty(fDm099.getDocId(), "文件ID不能为空");
fDm099.setDeleteFlag(CommonConstant.YesNo.NO_0); fDm099.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPDM099.INSERT, fDm099); DaoUtils.insert(HPDM099.INSERT, fDm099);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
......
...@@ -58,6 +58,41 @@ public class ServiceHPXSUser extends ServiceBase { ...@@ -58,6 +58,41 @@ public class ServiceHPXSUser extends ServiceBase {
return outInfo; return outInfo;
} }
/**
* 获取用户信息
*
* @param eiInfo
* @return
*/
public EiInfo getUserByLogin(EiInfo eiInfo) {
EiInfo outInfo = new EiInfo();
int status = 0;
String msg = "";
try {
String loginName = eiInfo.getString("loginName");
if (StringUtils.isNotEmpty(loginName)) {
Map map = new HashMap();
map.put("loginName", loginName);
List<User> users = dao.query("HGXSUser.query", map);
if (users != null && users.size() > 0) {
status = 1;
msg = "用户存在!";
outInfo.set("result", users.get(0));
} else {
msg = "用户信息不存在!";
}
} else {
msg = "传入用户名不能为空!";
}
outInfo.setStatus(status);
outInfo.setMsg(msg);
} catch (Exception e) {
LogUtils.setDetailMsg(outInfo, e, "平台调用用户信息异常");
}
return outInfo;
}
/** /**
* 查询用户下拉框 * 查询用户下拉框
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment