Commit 3a1735bc by 13420

签证单,扣款单权限bug处理

parent e704d375
...@@ -3,15 +3,22 @@ package com.baosight.hggp.hg.cw.service; ...@@ -3,15 +3,22 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW004; import com.baosight.hggp.hg.cw.domain.HGCW004;
import com.baosight.hggp.hg.cw.domain.HGCW005; import com.baosight.hggp.hg.cw.domain.HGCW005;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.sb.domain.HGSB003; import com.baosight.hggp.hg.sb.domain.HGSB003;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.ErrorCodeUtils; import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
...@@ -21,6 +28,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase; ...@@ -21,6 +28,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -39,14 +47,22 @@ public class ServiceHGCW004 extends ServiceBase { ...@@ -39,14 +47,22 @@ public class ServiceHGCW004 extends ServiceBase {
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化") @OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = super.initLoad(inInfo,new HGCW004());
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID, CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID), null, false);
DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW004().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW004().eiMetadata);
} catch (PlatException e) { outInfo = super.query(inInfo, HGCW004.QUERY, new HGCW004());
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); Map<String,Object> qarma = new HashMap<>();
EiInfoUtils.addBlock(outInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID));
//角色公司
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
qarma.put(Org.FIELD_ORG_ID,roleCompanyCode);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.USER_ID_BOX_BLOCK_ID),qarma);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo,e,"初始化失败!");
} }
return inInfo; return outInfo;
} }
/** /**
...@@ -58,6 +74,10 @@ public class ServiceHGCW004 extends ServiceBase { ...@@ -58,6 +74,10 @@ public class ServiceHGCW004 extends ServiceBase {
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "查询") @OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
if (!roleCompanyCode.isEmpty()) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGCW004.FIELD_COMPANY_CODES,roleCompanyCode);
}
try { try {
inInfo = super.query(inInfo, HGCW004.QUERY, new HGCW004()); inInfo = super.query(inInfo, HGCW004.QUERY, new HGCW004());
} catch (Exception e) { } catch (Exception e) {
......
...@@ -3,13 +3,20 @@ package com.baosight.hggp.hg.cw.service; ...@@ -3,13 +3,20 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cw.domain.HGCW002; import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW004;
import com.baosight.hggp.hg.cw.domain.HGCW005; import com.baosight.hggp.hg.cw.domain.HGCW005;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.ErrorCodeUtils; import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
...@@ -38,14 +45,22 @@ public class ServiceHGCW005 extends ServiceBase { ...@@ -38,14 +45,22 @@ public class ServiceHGCW005 extends ServiceBase {
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化") @OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = super.initLoad(inInfo,new HGCW005());
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID, CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID), null, false);
DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID,DdynamicEnum.CONTRACT_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW005().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW005().eiMetadata);
} catch (PlatException e) { outInfo = super.query(inInfo, HGCW005.QUERY, new HGCW005());
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); Map<String,Object> qarma = new HashMap<>();
EiInfoUtils.addBlock(outInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID));
//角色公司
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
qarma.put(Org.FIELD_ORG_ID,roleCompanyCode);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.USER_ID_BOX_BLOCK_ID),qarma);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo,e,"初始化失败!");
} }
return inInfo; return outInfo;
} }
/** /**
...@@ -57,6 +72,10 @@ public class ServiceHGCW005 extends ServiceBase { ...@@ -57,6 +72,10 @@ public class ServiceHGCW005 extends ServiceBase {
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "查询") @OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
if (!roleCompanyCode.isEmpty()) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGCW005.FIELD_COMPANY_CODES,roleCompanyCode);
}
try { try {
inInfo = super.query(inInfo, HGCW005.QUERY, new HGCW005()); inInfo = super.query(inInfo, HGCW005.QUERY, new HGCW005());
} catch (Exception e) { } catch (Exception e) {
...@@ -65,6 +84,7 @@ public class ServiceHGCW005 extends ServiceBase { ...@@ -65,6 +84,7 @@ public class ServiceHGCW005 extends ServiceBase {
return inInfo; return inInfo;
} }
/** /**
* 新增操作 * 新增操作
* *
......
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