Commit 5f70e6dc by wancheng

app生产组过滤

parent 3499e141
...@@ -130,6 +130,14 @@ public enum DdynamicEnum { ...@@ -130,6 +130,14 @@ public enum DdynamicEnum {
* 编写:songx * 编写:songx
*/ */
GROUP_RECORD_BLOCK_ID("group_record_block_id","orgId","orgCname","HPXSOrg.queryGroupComboBox"), GROUP_RECORD_BLOCK_ID("group_record_block_id","orgId","orgCname","HPXSOrg.queryGroupComboBox"),
/**
* 模块:组管理
* 用途:组管理下拉框
* 编写:songx
*/
USER_GROUP_BLOCK_ID("user_group_block_id","groupCode","groupName","factoryCode","HPXSOrg.queryAppGroup"),
/** /**
* 分厂与组一起查出,用于生产任务分派 * 分厂与组一起查出,用于生产任务分派
*/ */
......
...@@ -6,6 +6,7 @@ import com.baosight.hpjx.common.InventTypeEnum; ...@@ -6,6 +6,7 @@ import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.common.ProdOrderStatusEnum; import com.baosight.hpjx.common.ProdOrderStatusEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC003; import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.kc.tools.HPKCTools; import com.baosight.hpjx.hp.kc.tools.HPKCTools;
...@@ -56,6 +57,8 @@ public class ServiceHPKC003A extends ServiceEPBase { ...@@ -56,6 +57,8 @@ public class ServiceHPKC003A extends ServiceEPBase {
try { try {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("inventTypes", new String[]{"2","3"}); queryMap.put("inventTypes", new String[]{"2","3"});
queryMap.put("userId", UserSessionUtils.getUserId());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_GROUP_BLOCK_ID), queryMap, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), queryMap, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), queryMap, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID), null, false);
......
...@@ -5,6 +5,7 @@ import com.baosight.hpjx.common.DdynamicEnum; ...@@ -5,6 +5,7 @@ import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.ProdOrderStatusEnum; import com.baosight.hpjx.common.ProdOrderStatusEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.sc.domain.HPSC005; import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005A; import com.baosight.hpjx.hp.sc.domain.HPSC005A;
...@@ -47,6 +48,8 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -47,6 +48,8 @@ public class ServiceHPSC005A extends ServiceBase {
String prodOrderNo = MapUtils.getString(queryMap, CommonConstant.Field.PROD_ORDER_NO); String prodOrderNo = MapUtils.getString(queryMap, CommonConstant.Field.PROD_ORDER_NO);
HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo); HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo);
inInfo.addBlock(CommonConstant.Field.DETAIL).addRow(dbSc005); inInfo.addBlock(CommonConstant.Field.DETAIL).addRow(dbSc005);
queryMap.put("userId", UserSessionUtils.getUserId());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_GROUP_BLOCK_ID), queryMap, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005A().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005A().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -3,10 +3,13 @@ package com.baosight.hpjx.hp.xs.service; ...@@ -3,10 +3,13 @@ package com.baosight.hpjx.hp.xs.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation; import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils; import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.ObjectUtils; import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
...@@ -51,10 +54,30 @@ public class ServiceHPXSOrg extends ServiceBase { ...@@ -51,10 +54,30 @@ public class ServiceHPXSOrg extends ServiceBase {
list.add(DdynamicEnum.GROUP_RECORD_BLOCK_ID); list.add(DdynamicEnum.GROUP_RECORD_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, queryRow, false); CommonMethod.initBlock(inInfo, list, queryRow, false);
} catch (Exception e) { } catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setMsg(inInfo, e, "查询组失败"); LogUtils.setMsg(inInfo, e, "查询组失败");
} }
return inInfo; return inInfo;
} }
/**
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "组织管理", operType = "查询", operDesc = "组下拉框")
public EiInfo queryAppGroup(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "userId", UserSessionUtils.getUserId());
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.USER_GROUP_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, queryRow, false);
} catch (Exception e) {
inInfo.setStatus(500);
LogUtils.setMsg(inInfo, e, "查询组失败");
}
return inInfo;
}
} }
...@@ -183,6 +183,17 @@ ...@@ -183,6 +183,17 @@
ORDER BY T2.LEVEL, T3.ORG_ID ORDER BY T2.LEVEL, T3.ORG_ID
</select> </select>
<select id="queryAppGroup" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select c.ORG_ID as "groupCode",c.ORG_CNAME as "groupName",c.FACTORY_CODE as "factoryCode"
from iplat.txsog02 a
join iplat.xs_user b on a.USER_ID=b.USER_ID
join iplat.txsog01 c on c.ORG_ID = a.ORG_ID and c.IS_DELETED = 0
where 1=1 and c.ORG_TYPE = 'prodGroup'
<isNotEmpty prepend=" AND " property="userId">
b.USER_ID = #userId#
</isNotEmpty>
</select>
<!-- 查询组织信息 --> <!-- 查询组织信息 -->
<select id="queryList" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ011"> <select id="queryList" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ011">
SELECT SELECT
......
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