Commit 363e69fc by wuwenlong

Merge remote-tracking branch 'hg/dev' into dev

parents e6aa6586 06610fdf
......@@ -279,7 +279,7 @@ public enum DdynamicEnum {
put("orgType", OrgTypeEnum.COMPANY.getCode());
}}),
USER_ID_BOX_BLOCK_ID("user_block_id","loginName","userName","XSOG0801.queryUserByOrgIdBack"),
USER_ID_BOX_BLOCK_ID("user_block_id","loginName","userName","companyCode","XSOG0801.queryUserByOrgIdBack"),
/**
* 模块:工序编码
......
......@@ -45,7 +45,7 @@ public class ServiceHGSB001 extends ServiceEPBase {
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID));
//角色公司
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
qarma.put(Org.FIELD_ORG_ID,roleCompanyCode);
qarma.put(HGSB001.FIELD_COMPANY_CODES,roleCompanyCode);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.USER_ID_BOX_BLOCK_ID),qarma);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo,e,"初始化失败!");
......
......@@ -44,7 +44,7 @@ public class ServiceHGSB002 extends ServiceEPBase {
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID));
//角色公司
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
qarma.put(Org.FIELD_ORG_ID,roleCompanyCode);
qarma.put(HGSB001.FIELD_COMPANY_CODES,roleCompanyCode);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.USER_ID_BOX_BLOCK_ID),qarma);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo,e,"初始化失败");
......
......@@ -36,12 +36,12 @@ public class ServiceHGSB002A extends ServiceEPBase {
String companyCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGSB001.FIELD_COMPANY_CODE);
String groupCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGSB002A.FIELD_GROUP_CODE);
inInfo = super.query(inInfo, HGSB002A.QUERY, new HGSB002A());
Map qarma = new HashMap();
/*Map qarma = new HashMap();
Map userCompany = HGSBTools.getUserCompany();
if (!userCompany.isEmpty()) {
qarma.put(Org.FIELD_PARENT_ORG_ID,userCompany.get(HGSB002.FIELD_COMPANY_CODE));
}
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID),qarma);
}*/
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID));
//CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_CODE_BOX_BLOCK_ID),null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.DEVICE_CODE_BOX_BLOCK_ID),
new HashMap<String,Object>(){{
......
......@@ -45,7 +45,7 @@ public class ServiceHGSB003 extends ServiceEPBase {
EiInfoUtils.addBlock(outInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
//角色公司
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
qarma.put(Org.FIELD_ORG_ID,roleCompanyCode);
qarma.put(HGSB001.FIELD_COMPANY_CODES,roleCompanyCode);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.USER_ID_BOX_BLOCK_ID),qarma);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.DEVICE_CODE_BOX_BLOCK_ID));
......
......@@ -43,7 +43,7 @@ public class ServiceHGSB004 extends ServiceEPBase {
Map<String,Object> qarma = new HashMap<>();
EiInfoUtils.addBlock(outInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
qarma.put(Org.FIELD_ORG_ID,roleCompanyCode);
qarma.put(HGSB001.FIELD_COMPANY_CODES,roleCompanyCode);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.USER_ID_BOX_BLOCK_ID),qarma);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo,e,"初始化失败");
......
......@@ -41,8 +41,8 @@ public class ServiceHGSB004B extends ServiceEPBase {
Map<String,Object> qarma = new HashMap<>();
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID));
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
List<String> orgIds = HGSBTools.getRoleCompanyCode();
qarma.put(Org.FIELD_ORG_ID,orgIds);
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
qarma.put(HGSB001.FIELD_COMPANY_CODES,roleCompanyCode);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_ID_BOX_BLOCK_ID),qarma);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo,e,"初始化失败");
......
......@@ -44,8 +44,8 @@ public class ServiceHGSB005 extends ServiceEPBase {
EiInfoUtils.addBlock(outInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID));
//角色公司
List<String> orgIds = HGSBTools.getRoleCompanyCode();
qarma.put(Org.FIELD_ORG_ID,orgIds);
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
qarma.put(HGSB001.FIELD_COMPANY_CODES,roleCompanyCode);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.USER_ID_BOX_BLOCK_ID),qarma);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo,e,"初始化失败");
......
package com.baosight.hggp.hg.xs.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.xs.domain.User;
......@@ -64,6 +65,32 @@ public class ServiceHGXSUser extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "用户管理",operType = "查询",operDesc = "用户所属公司所有用户")
public EiInfo queryOrgUserBox(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put("accountCode", UserSessionUtils.getAccountCode());
Object isSplicingSymbol = queryMap.get("isSplicingSymbol");
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.USER_ID_BOX_BLOCK_ID);
if (isSplicingSymbol != null){
CommonMethod.initBlock(inInfo, list, queryMap, true);
}else {
CommonMethod.initBlock(inInfo, list, queryMap, false);
}
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询企业失败");
}
return inInfo;
}
/**
* 查询用户下拉框
*
* @param inInfo
* @return
*/
public EiInfo queryComboBox(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
......@@ -76,7 +103,7 @@ public class ServiceHGXSUser extends ServiceBase {
}
return inInfo;
}
/**
* 查询用户的企业下拉框
*
......
......@@ -137,6 +137,7 @@
t1.ORG_ID AS "orgId",
t1.ORG_ENAME AS "orgEname",
t1.ORG_CNAME AS "orgCname",
t1.COMPANY_CODE AS "companyCode",
t2.rec_create_time AS "recCreateTime",
t2.USER_ID AS userId FROM ${platSchema}.txsog01 t1 LEFT JOIN ${platSchema}.txsog02 t2 ON t1.ORG_ID = t2.ORG_ID
INNER JOIN ${platSchema}.xs_user xu ON t2.USER_ID = xu.USER_ID
......@@ -145,6 +146,12 @@
<isNotEmpty prepend="AND" property="accountCode">
t1.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend="AND" property="companyCode">
t1.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend="AND" property="companyCodes">
t1.COMPANY_CODE IN <iterate property="companyCodes" open="(" close=")" conjunction=","> #companyCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend="AND" property="orgCname">
t1.ORG_CNAME LIKE ('%$orgCname$%')
</isNotEmpty>
......
......@@ -2,6 +2,7 @@ $(function () {
var companyCodeBox = __eiInfo.getBlock("roleCompany").getMappedRows();
var groupCodeBox = __eiInfo.getBlock("group_record_block_id").getMappedRows();
var userIdBox = __eiInfo.getBlock("user_block_id").getMappedRows();
$(".row").children().attr("class", "col-md-3");
......@@ -112,7 +113,18 @@ $(function () {
},{
field: "deviceCode",
title: "设备编码",
},{
field: "deviceUserId",
title: "设备负责人",
filter: function (option) {
let companyCode = option.model['companyCode'];
if (companyCode){
return _.filter(userIdBox, function (item) {
return item["param1Field"]==companyCode;
})
}
return option.values
},
}
],
exportGrid: {
......
......@@ -4,6 +4,7 @@ $(function () {
var groupCodeBox = __eiInfo.getBlock("group_record_block_id").getMappedRows();
var userIdBox = __eiInfo.getBlock("user_block_id").getMappedRows();
$(".row").children().attr("class", "col-md-3");
$("#QUERY").on("click", query);
......@@ -128,6 +129,15 @@ $(function () {
}, {
field: "planUserId",
title: "计划人",
filter: function (option) {
let companyCode = option.model['companyCode'];
if (companyCode){
return _.filter(userIdBox, function (item) {
return item["param1Field"]==companyCode;
})
}
return option.values
},
template: function (dataItem) {
for (let i = 0; i < userIdBox.length; i++) {
if (userIdBox[i]['valueField'] === dataItem['planUserId']){
......
......@@ -111,6 +111,15 @@ $(function () {
},*/ {
field: "applyUserId",
title: "申请人",
filter: function (option) {
let companyCode = option.model['companyCode'];
if (companyCode){
return _.filter(userIdBox, function (item) {
return item["param1Field"]==companyCode;
})
}
return option.values
},
template: function (dataItem) {
for (let i = 0; i < userIdBox.length; i++) {
if (userIdBox[i]['valueField'] === dataItem['applyUserId']){
......
......@@ -93,6 +93,15 @@ $(function () {
}, {
field: "inspecUserId",
title: "点检人",
filter: function (option) {
let companyCode = option.model['companyCode'];
if (companyCode){
return _.filter(userIdBox, function (item) {
return item["param1Field"]==companyCode;
})
}
return option.values
},
template: function (dataItem) {
for (let i = 0; i < userIdBox.length; i++) {
if (userIdBox[i]['valueField'] === dataItem['inspecUserId']){
......
......@@ -84,6 +84,15 @@ $(function () {
}, {
field: "upkeepUserId",
title: "保养人",
filter: function (option) {
let companyCode = option.model['companyCode'];
if (companyCode){
return _.filter(userIdBox, function (item) {
return item["param1Field"]==companyCode;
})
}
return option.values
},
template: function (dataItem) {
for (let i = 0; i < userIdBox.length; i++) {
if (userIdBox[i]['valueField'] === dataItem['upkeepUserId']){
......
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