Commit 34436c21 by 13420

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

parents 48e2a1b2 4a2f0bd8
...@@ -10,6 +10,7 @@ import com.baosight.hggp.hg.cg.tools.HGCGTools; ...@@ -10,6 +10,7 @@ import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.cg.utils.HGCGUtils; import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant; import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils; import com.baosight.hggp.util.DateUtils;
...@@ -50,9 +51,10 @@ public class ServiceHGCG001 extends ServiceBase { ...@@ -50,9 +51,10 @@ public class ServiceHGCG001 extends ServiceBase {
CommonMethod.distinctTextField(inInfo,DdynamicEnum.INVENT_RECORD_BLOCK_ID.getBlockId()); CommonMethod.distinctTextField(inInfo,DdynamicEnum.INVENT_RECORD_BLOCK_ID.getBlockId());
CommonMethod.objConvertComboBox(resultList,inInfo,DdynamicEnum.SPEC_NAME_BLOCK_ID.getBlockId(),HGCG001.FIELD_SPEC,HGCG001.FIELD_SPEC); CommonMethod.objConvertComboBox(resultList,inInfo,DdynamicEnum.SPEC_NAME_BLOCK_ID.getBlockId(),HGCG001.FIELD_SPEC,HGCG001.FIELD_SPEC);
CommonMethod.distinctTextField(inInfo,DdynamicEnum.SPEC_NAME_BLOCK_ID.getBlockId()); CommonMethod.distinctTextField(inInfo,DdynamicEnum.SPEC_NAME_BLOCK_ID.getBlockId());
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCG001().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCG001().eiMetadata);
} catch (PlatException e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
return inInfo; return inInfo;
......
...@@ -11,6 +11,7 @@ import com.baosight.hggp.hg.cg.tools.HGCGTools; ...@@ -11,6 +11,7 @@ import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.cg.utils.HGCGUtils; import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001; import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.User; import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.BeanUtils; import com.baosight.hggp.util.BeanUtils;
...@@ -51,6 +52,7 @@ public class ServiceHGCG002A extends ServiceBase { ...@@ -51,6 +52,7 @@ public class ServiceHGCG002A extends ServiceBase {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID));
EiInfoUtils.addBlock(inInfo,"userByCompany", UserSessionUtils.getUserByCompany(UserSessionUtils.getAccountCode()), User.class); EiInfoUtils.addBlock(inInfo,"userByCompany", UserSessionUtils.getUserByCompany(UserSessionUtils.getAccountCode()), User.class);
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCG001().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCG001().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
...@@ -4,12 +4,14 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; ...@@ -4,12 +4,14 @@ 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.enums.DeleteFlagEnum; import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cg.domain.HGCG002A; import com.baosight.hggp.hg.cg.domain.HGCG002A;
import com.baosight.hggp.hg.cg.domain.HGCG003; import com.baosight.hggp.hg.cg.domain.HGCG003;
import com.baosight.hggp.hg.cg.tools.HGCGTools; import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.cg.utils.HGCGUtils; import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant; import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
...@@ -46,8 +48,9 @@ public class ServiceHGCG003 extends ServiceBase { ...@@ -46,8 +48,9 @@ public class ServiceHGCG003 extends ServiceBase {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID));
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCG003().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCG003().eiMetadata);
} catch (PlatException e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
return inInfo; return inInfo;
......
...@@ -355,4 +355,32 @@ ...@@ -355,4 +355,32 @@
</dynamic> </dynamic>
</select> </select>
<!--查询采购已审核开票金额-->
<select id="queryInvoicing" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
B.ACCOUNT_CODE as "accountCode",
B.COMPANY_CODE as "companyCode",
C.SETTLEMENT_NUMBER as "receiveNo", <!-- 收货单号 -->
SUM(C.THIS_SETTLEMENT_TAX) as "thisSettlementAmount" <!-- 金额 -->
from ${hggpSchema}.HGCW012 B
inner join ${hggpSchema}.HGCW013 C on B.ID = C.MAIN_ID
WHERE B.CONTRACT_TYPE = 1 AND B.REVIEW_STATUS = 1
<isNotEmpty prepend=" AND " property="accountCode">
B.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
B.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCodes">
B.COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
B.SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriod">
left(B.SIGNING_DATE,6) = #accountPeriod#
</isNotEmpty>
GROUP BY B.ACCOUNT_CODE, B.COMPANY_CODE, C.SETTLEMENT_NUMBER
</select>
</sqlMap> </sqlMap>
...@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.cw.tools; ...@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.cw.tools;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.cw.domain.*; import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ003; import com.baosight.hggp.hg.pz.domain.HGPZ003;
...@@ -31,11 +32,11 @@ public class HGCWTools { ...@@ -31,11 +32,11 @@ public class HGCWTools {
return DaoBase.getInstance().query("HGCW001.queryCheckList", paramMap); return DaoBase.getInstance().query("HGCW001.queryCheckList", paramMap);
} }
public static Map getMaxAccountPeriod(String companyCode) { public static HGCW001 getMaxAccountPeriod(String companyCode) {
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("companyCode", companyCode); params.put("companyCode", companyCode);
params.put("accountPeriodStatus",0); params.put("accountPeriodStatus",0);
List<Map> list = DaoBase.getInstance().query("HGCW001.getMaxAccountPeriod", params); List<HGCW001> list = DaoBase.getInstance().query("HGCW001.getMaxAccountPeriod", params);
AssertUtils.isEmpty(list, "未找到公司对应的会计期间"); AssertUtils.isEmpty(list, "未找到公司对应的会计期间");
return list.get(0); return list.get(0);
} }
...@@ -466,6 +467,19 @@ public class HGCWTools { ...@@ -466,6 +467,19 @@ public class HGCWTools {
AssertUtils.isEmpty(paramMap, "数据检查参数不能为空"); AssertUtils.isEmpty(paramMap, "数据检查参数不能为空");
return DaoBase.getInstance().query("HGCW012.queryCheckList", paramMap); return DaoBase.getInstance().query("HGCW012.queryCheckList", paramMap);
} }
/**
* 根据收货号查询
* @param receiveNo 收货单号
* @return Map
*/
public static Map getReceiveNo(String receiveNo){
AssertUtils.isEmpty(receiveNo, "发票号不能为空");
Map queryMap = new HashMap<>();
queryMap.put(HGCW012.FIELD_SETTLEMENT_NUMBER,receiveNo);
List<Map> list = DaoBase.getInstance().query(HGSqlConstant.HgCw012.INVOICING, queryMap);
return list.size() > 0 ? list.get(0) : null;
}
} }
/** /**
......
...@@ -4,12 +4,14 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; ...@@ -4,12 +4,14 @@ 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.enums.DeleteFlagEnum; import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cg.tools.HGCGTools; import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.kc.domain.HGKC001; import com.baosight.hggp.hg.kc.domain.HGKC001;
import com.baosight.hggp.hg.kc.domain.HGKC003; import com.baosight.hggp.hg.kc.domain.HGKC003;
import com.baosight.hggp.hg.kc.tools.HGKCTools; import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils; import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.*;
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;
...@@ -43,8 +45,9 @@ public class ServiceHGKC001 extends ServiceBase { ...@@ -43,8 +45,9 @@ public class ServiceHGKC001 extends ServiceBase {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID));
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC001().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC001().eiMetadata);
} catch (PlatException e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
return inInfo; return inInfo;
......
...@@ -14,6 +14,7 @@ import com.baosight.hggp.hg.kc.domain.HGKC006; ...@@ -14,6 +14,7 @@ import com.baosight.hggp.hg.kc.domain.HGKC006;
import com.baosight.hggp.hg.kc.tools.HGKCTools; import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils; import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.utils.HGUtils; import com.baosight.hggp.hg.utils.HGUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
...@@ -50,8 +51,9 @@ public class ServiceHGKC006 extends ServiceBase { ...@@ -50,8 +51,9 @@ public class ServiceHGKC006 extends ServiceBase {
CommonMethod.initBlock(inInfo, CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.WH_RECORD_BLOCK_ID),map,false Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.WH_RECORD_BLOCK_ID),map,false
); );
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC006().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC006().eiMetadata);
} catch (PlatException e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
return inInfo; return inInfo;
......
...@@ -15,6 +15,7 @@ import com.baosight.hggp.hg.kc.domain.HGKC007; ...@@ -15,6 +15,7 @@ import com.baosight.hggp.hg.kc.domain.HGKC007;
import com.baosight.hggp.hg.kc.tools.HGKCTools; import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils; import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.utils.HGUtils; import com.baosight.hggp.hg.utils.HGUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
...@@ -54,8 +55,9 @@ public class ServiceHGKC007 extends ServiceBase { ...@@ -54,8 +55,9 @@ public class ServiceHGKC007 extends ServiceBase {
CommonMethod.initBlock(inInfo, CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.WH_RECORD_BLOCK_ID),map,false Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.WH_RECORD_BLOCK_ID),map,false
); );
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC007().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC007().eiMetadata);
} catch (PlatException e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
return inInfo; return inInfo;
......
...@@ -8,6 +8,7 @@ import com.baosight.hggp.hg.kc.domain.HGKC010; ...@@ -8,6 +8,7 @@ import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.hg.pz.domain.HGPZ005; import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.domain.HGPZ007; import com.baosight.hggp.hg.pz.domain.HGPZ007;
import com.baosight.hggp.hg.sc.domain.HGSC001; import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
...@@ -46,8 +47,9 @@ public class ServiceHGKC010 extends ServiceBase { ...@@ -46,8 +47,9 @@ public class ServiceHGKC010 extends ServiceBase {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID));
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC010().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC010().eiMetadata);
} catch (PlatException e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
return inInfo; return inInfo;
......
...@@ -35,16 +35,16 @@ ...@@ -35,16 +35,16 @@
<!-- C.PRINC as "princ" 负责人 --> <!-- C.PRINC as "princ" 负责人 -->
</sql> </sql>
<sql id="authCondition"> <!--<sql id="authCondition">
<!-- 无权限时使用 --> &lt;!&ndash; 无权限时使用 &ndash;&gt;
<isNotEmpty prepend=" AND " property="authDepCode"> <isNotEmpty prepend=" AND " property="authDepCode">
A.DEP_CODE = #authDepCode# A.DEP_CODE = #authDepCode#
</isNotEmpty> </isNotEmpty>
<!-- 仅本人和部门组合 --> &lt;!&ndash; 仅本人和部门组合 &ndash;&gt;
<isEqual prepend=" AND " property="authCombination" compareValue="1"> <isEqual prepend=" AND " property="authCombination" compareValue="1">
(A.CREATED_BY = #authOnlyPeople# OR A.DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>) (A.CREATED_BY = #authOnlyPeople# OR A.DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual> </isEqual>
<!-- 仅本人或部门 --> &lt;!&ndash; 仅本人或部门 &ndash;&gt;
<isNotEqual prepend=" AND " property="authCombination" compareValue="1"> <isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople"> <isNotEmpty property="authOnlyPeople">
A.CREATED_BY = #authOnlyPeople# A.CREATED_BY = #authOnlyPeople#
...@@ -53,10 +53,9 @@ ...@@ -53,10 +53,9 @@
A.DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate> A.DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
</isNotEqual> </isNotEqual>
</sql> </sql>-->
<sql id="condition"> <sql id="condition">
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="specId"> <isNotEmpty prepend=" AND " property="specId">
A.SPEC_ID = #specId# A.SPEC_ID = #specId#
</isNotEmpty> </isNotEmpty>
...@@ -107,7 +106,6 @@ ...@@ -107,7 +106,6 @@
FROM ${hggpSchema}.HGKC010 A FROM ${hggpSchema}.HGKC010 A
INNER JOIN ${hggpSchema}.HGPZ010 B ON A.SPEC_ID = B.INVENT_RECORD_ID INNER JOIN ${hggpSchema}.HGPZ010 B ON A.SPEC_ID = B.INVENT_RECORD_ID
WHERE A.INV_QTY &lt;= B.WARN_NUM WHERE A.INV_QTY &lt;= B.WARN_NUM
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="spec"> <isNotEmpty prepend=" AND " property="spec">
A.SPEC = #spec# A.SPEC = #spec#
</isNotEmpty> </isNotEmpty>
......
...@@ -54,6 +54,7 @@ public class HGPZ007 extends DaoEPBase { ...@@ -54,6 +54,7 @@ public class HGPZ007 extends DaoEPBase {
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/ public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String QUERY = "HGPZ007.query"; public static final String QUERY = "HGPZ007.query";
public static final String QUERY_NOT_BY_ROLE = "HGPZ007.queryNotByRole";
public static final String COUNT = "HGPZ007.count"; public static final String COUNT = "HGPZ007.count";
public static final String INSERT = "HGPZ007.insert"; public static final String INSERT = "HGPZ007.insert";
public static final String UPDATE = "HGPZ007.update"; public static final String UPDATE = "HGPZ007.update";
......
...@@ -62,16 +62,16 @@ ...@@ -62,16 +62,16 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="authCondition"> <!--<sql id="authCondition">
<!-- 无权限时使用 --> &lt;!&ndash; 无权限时使用 &ndash;&gt;
<isNotEmpty prepend=" AND " property="authDepCode"> <isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode# DEP_CODE = #authDepCode#
</isNotEmpty> </isNotEmpty>
<!-- 仅本人和部门组合 --> &lt;!&ndash; 仅本人和部门组合 &ndash;&gt;
<isEqual prepend=" AND " property="authCombination" compareValue="1"> <isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>) (CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual> </isEqual>
<!-- 仅本人或部门 --> &lt;!&ndash; 仅本人或部门 &ndash;&gt;
<isNotEqual prepend=" AND " property="authCombination" compareValue="1"> <isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople"> <isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople# CREATED_BY = #authOnlyPeople#
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate> DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
</isNotEqual> </isNotEqual>
</sql> </sql>-->
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.pz.domain.HGPZ001"> resultClass="com.baosight.hggp.hg.pz.domain.HGPZ001">
...@@ -100,7 +100,6 @@ ...@@ -100,7 +100,6 @@
DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 --> DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 -->
FROM ${hggpSchema}.HGPZ001 WHERE 1=1 AND DELETE_FLAG = 0 FROM ${hggpSchema}.HGPZ001 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -115,7 +114,6 @@ ...@@ -115,7 +114,6 @@
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ001 WHERE 1=1 AND DELETE_FLAG = 0 SELECT COUNT(*) FROM ${hggpSchema}.HGPZ001 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
</select> </select>
<!-- <!--
......
...@@ -106,16 +106,16 @@ ...@@ -106,16 +106,16 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="authCondition"> <!--<sql id="authCondition">
<!-- 无权限时使用 --> &lt;!&ndash; 无权限时使用 &ndash;&gt;
<isNotEmpty prepend=" AND " property="authDepCode"> <isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode# DEP_CODE = #authDepCode#
</isNotEmpty> </isNotEmpty>
<!-- 仅本人和部门组合 --> &lt;!&ndash; 仅本人和部门组合 &ndash;&gt;
<isEqual prepend=" AND " property="authCombination" compareValue="1"> <isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>) (CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual> </isEqual>
<!-- 仅本人或部门 --> &lt;!&ndash; 仅本人或部门 &ndash;&gt;
<isNotEqual prepend=" AND " property="authCombination" compareValue="1"> <isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople"> <isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople# CREATED_BY = #authOnlyPeople#
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate> DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
</isNotEqual> </isNotEqual>
</sql> </sql>-->
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.pz.domain.HGPZ002"> resultClass="com.baosight.hggp.hg.pz.domain.HGPZ002">
...@@ -155,7 +155,6 @@ ...@@ -155,7 +155,6 @@
DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 --> DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 -->
FROM ${hggpSchema}.HGPZ002 WHERE 1=1 AND DELETE_FLAG = 0 FROM ${hggpSchema}.HGPZ002 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -170,7 +169,6 @@ ...@@ -170,7 +169,6 @@
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ002 WHERE 1=1 AND DELETE_FLAG = 0 SELECT COUNT(*) FROM ${hggpSchema}.HGPZ002 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
</select> </select>
<!-- <!--
......
...@@ -106,16 +106,16 @@ ...@@ -106,16 +106,16 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="authCondition"> <!--<sql id="authCondition">
<!-- 无权限时使用 --> &lt;!&ndash; 无权限时使用 &ndash;&gt;
<isNotEmpty prepend=" AND " property="authDepCode"> <isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode# DEP_CODE = #authDepCode#
</isNotEmpty> </isNotEmpty>
<!-- 仅本人和部门组合 --> &lt;!&ndash; 仅本人和部门组合 &ndash;&gt;
<isEqual prepend=" AND " property="authCombination" compareValue="1"> <isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>) (CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual> </isEqual>
<!-- 仅本人或部门 --> &lt;!&ndash; 仅本人或部门 &ndash;&gt;
<isNotEqual prepend=" AND " property="authCombination" compareValue="1"> <isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople"> <isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople# CREATED_BY = #authOnlyPeople#
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate> DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
</isNotEqual> </isNotEqual>
</sql> </sql>-->
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.pz.domain.HGPZ003"> resultClass="com.baosight.hggp.hg.pz.domain.HGPZ003">
...@@ -155,7 +155,6 @@ ...@@ -155,7 +155,6 @@
DELETE_FLAG as "deleteFlag" <!-- 是否删除0:否1.是 --> DELETE_FLAG as "deleteFlag" <!-- 是否删除0:否1.是 -->
FROM ${hggpSchema}.HGPZ003 WHERE 1=1 AND DELETE_FLAG = 0 FROM ${hggpSchema}.HGPZ003 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -170,7 +169,6 @@ ...@@ -170,7 +169,6 @@
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ003 WHERE 1=1 AND DELETE_FLAG = 0 SELECT COUNT(*) FROM ${hggpSchema}.HGPZ003 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
</select> </select>
<!-- <!--
......
...@@ -73,16 +73,16 @@ ...@@ -73,16 +73,16 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="authCondition"> <!--<sql id="authCondition">
<!-- 无权限时使用 --> &lt;!&ndash; 无权限时使用 &ndash;&gt;
<isNotEmpty prepend=" AND " property="authDepCode"> <isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode# DEP_CODE = #authDepCode#
</isNotEmpty> </isNotEmpty>
<!-- 仅本人和部门组合 --> &lt;!&ndash; 仅本人和部门组合 &ndash;&gt;
<isEqual prepend=" AND " property="authCombination" compareValue="1"> <isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>) (CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual> </isEqual>
<!-- 仅本人或部门 --> &lt;!&ndash; 仅本人或部门 &ndash;&gt;
<isNotEqual prepend=" AND " property="authCombination" compareValue="1"> <isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople"> <isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople# CREATED_BY = #authOnlyPeople#
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate> DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
</isNotEqual> </isNotEqual>
</sql> </sql>-->
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.pz.domain.HGPZ004"> resultClass="com.baosight.hggp.hg.pz.domain.HGPZ004">
...@@ -126,12 +126,11 @@ ...@@ -126,12 +126,11 @@
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ004 WHERE 1=1 AND DELETE_FLAG = 0 SELECT COUNT(*) FROM ${hggpSchema}.HGPZ004 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
</select> </select>
<!-- <!--
......
...@@ -62,16 +62,16 @@ ...@@ -62,16 +62,16 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="authCondition"> <!--<sql id="authCondition">
<!-- 无权限时使用 --> &lt;!&ndash; 无权限时使用 &ndash;&gt;
<isNotEmpty prepend=" AND " property="authDepCode"> <isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode# DEP_CODE = #authDepCode#
</isNotEmpty> </isNotEmpty>
<!-- 仅本人和部门组合 --> &lt;!&ndash; 仅本人和部门组合 &ndash;&gt;
<isEqual prepend=" AND " property="authCombination" compareValue="1"> <isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>) (CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual> </isEqual>
<!-- 仅本人或部门 --> &lt;!&ndash; 仅本人或部门 &ndash;&gt;
<isNotEqual prepend=" AND " property="authCombination" compareValue="1"> <isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople"> <isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople# CREATED_BY = #authOnlyPeople#
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate> DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
</isNotEqual> </isNotEqual>
</sql> </sql>-->
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.pz.domain.HGPZ006"> resultClass="com.baosight.hggp.hg.pz.domain.HGPZ006">
...@@ -100,7 +100,6 @@ ...@@ -100,7 +100,6 @@
DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 --> DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 -->
FROM ${hggpSchema}.HGPZ006 WHERE 1=1 AND DELETE_FLAG = 0 FROM ${hggpSchema}.HGPZ006 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -115,7 +114,6 @@ ...@@ -115,7 +114,6 @@
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ006 WHERE 1=1 AND DELETE_FLAG = 0 SELECT COUNT(*) FROM ${hggpSchema}.HGPZ006 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
</select> </select>
<!-- <!--
......
...@@ -70,16 +70,16 @@ ...@@ -70,16 +70,16 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="authCondition"> <!--<sql id="authCondition">
<!-- 无权限时使用 --> &lt;!&ndash; 无权限时使用 &ndash;&gt;
<isNotEmpty prepend=" AND " property="authDepCode"> <isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode# DEP_CODE = #authDepCode#
</isNotEmpty> </isNotEmpty>
<!-- 仅本人和部门组合 --> &lt;!&ndash; 仅本人和部门组合 &ndash;&gt;
<isEqual prepend=" AND " property="authCombination" compareValue="1"> <isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>) (CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual> </isEqual>
<!-- 仅本人或部门 --> &lt;!&ndash; 仅本人或部门 &ndash;&gt;
<isNotEqual prepend=" AND " property="authCombination" compareValue="1"> <isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople"> <isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople# CREATED_BY = #authOnlyPeople#
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate> DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
</isNotEqual> </isNotEqual>
</sql> </sql>-->
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.pz.domain.HGPZ007"> resultClass="com.baosight.hggp.hg.pz.domain.HGPZ007">
...@@ -110,7 +110,6 @@ ...@@ -110,7 +110,6 @@
DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 --> DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 -->
FROM ${hggpSchema}.HGPZ007 WHERE 1=1 AND DELETE_FLAG = 0 FROM ${hggpSchema}.HGPZ007 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -125,7 +124,37 @@ ...@@ -125,7 +124,37 @@
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ007 WHERE 1=1 AND DELETE_FLAG = 0 SELECT COUNT(*) FROM ${hggpSchema}.HGPZ007 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" /> </select>
<select id="queryNotByRole" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.pz.domain.HGPZ007">
SELECT
ID as "id", <!-- 主键ID -->
ACCOUNT_CODE as "accountCode", <!-- 帐套编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
WH_TYPE as "whType", <!-- 仓库类型 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
PRINC as "princ", <!-- 负责人 -->
STATUS as "status", <!-- 状态 0停用 1启用 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 -->
FROM ${hggpSchema}.HGPZ007 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME desc
</isEmpty>
</dynamic>
</select> </select>
<!-- <!--
......
...@@ -62,16 +62,16 @@ ...@@ -62,16 +62,16 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="authCondition"> <!--<sql id="authCondition">
<!-- 无权限时使用 --> &lt;!&ndash; 无权限时使用 &ndash;&gt;
<isNotEmpty prepend=" AND " property="authDepCode"> <isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode# DEP_CODE = #authDepCode#
</isNotEmpty> </isNotEmpty>
<!-- 仅本人和部门组合 --> &lt;!&ndash; 仅本人和部门组合 &ndash;&gt;
<isEqual prepend=" AND " property="authCombination" compareValue="1"> <isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>) (CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual> </isEqual>
<!-- 仅本人或部门 --> &lt;!&ndash; 仅本人或部门 &ndash;&gt;
<isNotEqual prepend=" AND " property="authCombination" compareValue="1"> <isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople"> <isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople# CREATED_BY = #authOnlyPeople#
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate> DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
</isNotEqual> </isNotEqual>
</sql> </sql>-->
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.pz.domain.HGPZ008"> resultClass="com.baosight.hggp.hg.pz.domain.HGPZ008">
...@@ -100,7 +100,6 @@ ...@@ -100,7 +100,6 @@
DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 --> DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 -->
FROM ${hggpSchema}.HGPZ008 WHERE 1=1 AND DELETE_FLAG = 0 FROM ${hggpSchema}.HGPZ008 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -115,7 +114,6 @@ ...@@ -115,7 +114,6 @@
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ008 WHERE 1=1 AND DELETE_FLAG = 0 SELECT COUNT(*) FROM ${hggpSchema}.HGPZ008 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
</select> </select>
<!-- <!--
......
...@@ -89,16 +89,16 @@ ...@@ -89,16 +89,16 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="authCondition"> <!--<sql id="authCondition">
<!-- 无权限时使用 --> &lt;!&ndash; 无权限时使用 &ndash;&gt;
<isNotEmpty prepend=" AND " property="authDepCode"> <isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode# DEP_CODE = #authDepCode#
</isNotEmpty> </isNotEmpty>
<!-- 仅本人和部门组合 --> &lt;!&ndash; 仅本人和部门组合 &ndash;&gt;
<isEqual prepend=" AND " property="authCombination" compareValue="1"> <isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>) (CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual> </isEqual>
<!-- 仅本人或部门 --> &lt;!&ndash; 仅本人或部门 &ndash;&gt;
<isNotEqual prepend=" AND " property="authCombination" compareValue="1"> <isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople"> <isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople# CREATED_BY = #authOnlyPeople#
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate> DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
</isNotEqual> </isNotEqual>
</sql> </sql>-->
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.pz.domain.HGPZ010"> resultClass="com.baosight.hggp.hg.pz.domain.HGPZ010">
...@@ -134,7 +134,6 @@ ...@@ -134,7 +134,6 @@
INVENT_TYPE_DETAIL as "inventTypeDetail" INVENT_TYPE_DETAIL as "inventTypeDetail"
FROM ${hggpSchema}.HGPZ010 WHERE 1=1 AND DELETE_FLAG = 0 FROM ${hggpSchema}.HGPZ010 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -149,7 +148,6 @@ ...@@ -149,7 +148,6 @@
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ010 WHERE 1=1 AND DELETE_FLAG = 0 SELECT COUNT(*) FROM ${hggpSchema}.HGPZ010 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
</select> </select>
<!-- <!--
......
...@@ -154,7 +154,7 @@ public class HGPZTools { ...@@ -154,7 +154,7 @@ public class HGPZTools {
AssertUtils.isEmpty(whCode, "仓库编码不能为空"); AssertUtils.isEmpty(whCode, "仓库编码不能为空");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("whCode", whCode); queryMap.put("whCode", whCode);
List<HGPZ007> results = DaoBase.getInstance().query(HGPZ007.QUERY, queryMap); List<HGPZ007> results = DaoBase.getInstance().query(HGPZ007.QUERY_NOT_BY_ROLE, queryMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0); return CollectionUtils.isEmpty(results) ? null : results.get(0);
} }
......
...@@ -5,9 +5,11 @@ import com.baosight.hggp.common.DdynamicEnum; ...@@ -5,9 +5,11 @@ import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum; import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cg.tools.HGCGTools; import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.constant.HGSqlConstant; import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.kc.tools.HGKCTools; import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.zl.domain.HGZL001; import com.baosight.hggp.hg.zl.domain.HGZL001;
import com.baosight.hggp.hg.zl.utils.HGZLUtils; import com.baosight.hggp.hg.zl.utils.HGZLUtils;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
...@@ -43,6 +45,7 @@ public class ServiceHGZL001 extends ServiceBase { ...@@ -43,6 +45,7 @@ public class ServiceHGZL001 extends ServiceBase {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_CODE_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_CODE_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID));
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGZL001().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGZL001().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<EF:EFInput cname="计划单号" blockId="inqu_status" ename="planNo" row="0" colWidth="3"/> <EF:EFInput cname="计划单号" blockId="inqu_status" ename="planNo" row="0" colWidth="3"/>
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3" <EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue=""> filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="company_code_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="状态" blockId="inqu_status" ename="status" row="0" colWidth="3" optionLabel="全部" <EF:EFSelect cname="状态" blockId="inqu_status" ename="status" row="0" colWidth="3" optionLabel="全部"
defultValue=""> defultValue="">
......
...@@ -68,7 +68,7 @@ $(function () { ...@@ -68,7 +68,7 @@ $(function () {
// 数量*单价金额 // 数量*单价金额
let totalAmount = item.purQty * item.price; let totalAmount = item.purQty * item.price;
//税额 //税额
let taxAmount = totalAmount* item.taxRate / 100; let taxAmount = totalAmount * item.taxRate / 100;
//不含税金额 //不含税金额
let amount = totalAmount - taxAmount; let amount = totalAmount - taxAmount;
//含税金额 //含税金额
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<EF:EFInput cname="计划单号" blockId="inqu_status" ename="planNo" row="0" colWidth="3"/> <EF:EFInput cname="计划单号" blockId="inqu_status" ename="planNo" row="0" colWidth="3"/>
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3" <EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue=""> filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="company_code_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="存货名称" blockId="inqu_status" ename="inventCode" row="0" colWidth="3" <EF:EFSelect cname="存货名称" blockId="inqu_status" ename="inventCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue=""> filter="contains" optionLabel="全部" defultValue="">
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="row"> <div class="row">
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3" <EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue=""> filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="company_code_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="供应商名称" blockId="inqu_status" ename="supCode" row="0" colWidth="3" <EF:EFSelect cname="供应商名称" blockId="inqu_status" ename="supCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue=""> filter="contains" optionLabel="全部" defultValue="">
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="row"> <div class="row">
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3" <EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue=""> filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="company_code_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="供应商名称" blockId="inqu_status" ename="supCode" row="0" colWidth="3" <EF:EFSelect cname="供应商名称" blockId="inqu_status" ename="supCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue=""> filter="contains" optionLabel="全部" defultValue="">
......
let WhNameGlobalData = []; let WhNameGlobalData = [];
$(function () { $(function () {
var companyCodes = __eiInfo.getBlock("companyBox_block_id").getMappedRows(); var companyCodes = __eiInfo.getBlock("roleCompany").getMappedRows();
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
pageable: { pageable: {
pageSize: 20, pageSize: 20,
...@@ -28,9 +28,9 @@ $(function () { ...@@ -28,9 +28,9 @@ $(function () {
field: "companyCode", field: "companyCode",
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < companyCodes.length; i++) { for (let i = 0; i < companyCodes.length; i++) {
if (companyCodes[i]['valueField'] === dataItem['companyCode']){ if (companyCodes[i]['companyCode'] === dataItem['companyCode']){
dataItem['companyName'] = companyCodes[i]['textField'] dataItem['companyName'] = companyCodes[i]['companyName']
return companyCodes[i]['textField']; return companyCodes[i]['companyName'];
} }
} }
return dataItem["companyCode"]; return dataItem["companyCode"];
......
...@@ -41,9 +41,9 @@ ...@@ -41,9 +41,9 @@
<EF:EFComboColumn ename="companyCode" cname="公司名称" <EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
maxLength="16" width="120" required="true" maxLength="16" readonly="false" width="200" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/> <EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="otherEnterDate" cname="单据日期" width="100" align="center" editType="date" <EF:EFColumn ename="otherEnterDate" cname="单据日期" width="100" align="center" editType="date"
......
let whNameGlobalData = []; let whNameGlobalData = [];
$(function () { $(function () {
var companyCodes = __eiInfo.getBlock("companyBox_block_id").getMappedRows(); var companyCodes = __eiInfo.getBlock("roleCompany").getMappedRows();
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
pageable: { pageable: {
pageSize: 20, pageSize: 20,
...@@ -28,9 +28,9 @@ $(function () { ...@@ -28,9 +28,9 @@ $(function () {
field: "companyCode", field: "companyCode",
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < companyCodes.length; i++) { for (let i = 0; i < companyCodes.length; i++) {
if (companyCodes[i]['valueField'] === dataItem['companyCode']){ if (companyCodes[i]['companyCode'] === dataItem['companyCode']){
dataItem['companyName'] = companyCodes[i]['textField'] dataItem['companyName'] = companyCodes[i]['companyName']
return companyCodes[i]['textField']; return companyCodes[i]['companyName'];
} }
} }
return dataItem["companyCode"]; return dataItem["companyCode"];
......
...@@ -42,9 +42,9 @@ ...@@ -42,9 +42,9 @@
<EF:EFComboColumn ename="companyCode" cname="公司名称" <EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
maxLength="16" width="120" required="true" maxLength="16" readonly="false" width="200" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/> <EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="otherOutDate" cname="单据日期" width="100" align="center" editType="date" <EF:EFColumn ename="otherOutDate" cname="单据日期" width="100" align="center" editType="date"
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3" <EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains"> filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="company_code_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="仓库名称" blockId="inqu_status" ename="whCode" row="0" colWidth="3" <EF:EFSelect cname="仓库名称" blockId="inqu_status" ename="whCode" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains"> optionLabel="全部" defultValue="" filter="contains">
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
format="yyyy-MM-dd" readonly="true"/> format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3" <EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue=""> filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="company_code_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="存货名称" blockId="inqu_status" ename="inventCode" row="0" colWidth="3" <EF:EFSelect cname="存货名称" blockId="inqu_status" ename="inventCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue=""> filter="contains" optionLabel="全部" defultValue="">
......
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