Commit b6044c96 by 江和松

1.结算单查询权限应该都为合同的项目的部门权限,不是当前登录人的权限

parent c5a03577
...@@ -21,6 +21,7 @@ import com.baosight.hggp.util.DateUtils; ...@@ -21,6 +21,7 @@ import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
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;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
...@@ -265,9 +266,7 @@ public class ServiceHGCW002 extends ServiceBase { ...@@ -265,9 +266,7 @@ public class ServiceHGCW002 extends ServiceBase {
if (StringUtils.isNotEmpty(inInfo.getString("reviewStatus"))) { if (StringUtils.isNotEmpty(inInfo.getString("reviewStatus"))) {
map.put("reviewStatus", "3"); map.put("reviewStatus", "3");
} }
inInfo = super.query(inInfo, "HGCW002.queryContractByType", new HGCW001());
List<HGCW002> HGCW002List = dao.query("HGCW002.queryContractByType",map);
inInfo.addBlock("contract_combo_box").setRows(HGCW002List);
return inInfo; return inInfo;
} }
......
...@@ -11,6 +11,8 @@ import com.baosight.hggp.hg.cw.domain.HGCW007; ...@@ -11,6 +11,8 @@ import com.baosight.hggp.hg.cw.domain.HGCW007;
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.sb.tools.HGSBTools;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org; import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
...@@ -102,9 +104,10 @@ public class ServiceHGCW008 extends ServiceBase { ...@@ -102,9 +104,10 @@ public class ServiceHGCW008 extends ServiceBase {
HGCW008.fromMap(resultRows.get(0)); HGCW008.fromMap(resultRows.get(0));
if (HGCW008.getId() == null || HGCW008.getId() == 0) { if (HGCW008.getId() == null || HGCW008.getId() == 0) {
UserVO userVO = HGCWTools.HgCw002.getUserCompany(); UserVO userVO = HGCWTools.HgCw002.getUserCompany();
HGSC001 project = HGSCTools.Hgsc001.queryByCode(HGCW008.getProjCode());
String settlementNumber = SequenceGenerator.getNextSequence(HGConstant.SequenceId.CW_SETTLEMENT_NO); String settlementNumber = SequenceGenerator.getNextSequence(HGConstant.SequenceId.CW_SETTLEMENT_NO);
HGCW008.setCompanyCode(userVO.getUsercode()); HGCW008.setCompanyCode(project.getCompanyCode());
HGCW008.setCompanyName(userVO.getUsername()); HGCW008.setCompanyName(project.getCompanyName());
HGCW008.setSettlementNumber(settlementNumber); HGCW008.setSettlementNumber(settlementNumber);
HGCW008.setReviewStatus(2); HGCW008.setReviewStatus(2);
HGCW008.setContractDate(DateUtils.formatShort(HGCW008.getContractDate())); HGCW008.setContractDate(DateUtils.formatShort(HGCW008.getContractDate()));
......
...@@ -544,28 +544,51 @@ ...@@ -544,28 +544,51 @@
<select id="queryContractByType" parameterClass="java.util.HashMap" <select id="queryContractByType" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW002"> resultClass="com.baosight.hggp.hg.cw.domain.HGCW002">
<include refid="HGXSDataAuth.authCondition"/>
SELECT DISTINCT SELECT DISTINCT
PROJ_CODE as "projCode", <!-- 项目编码 --> a.PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> a.PROJ_NAME as "projName", <!-- 项目名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 合同号 --> a.CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
CONTRACT_NAME as "contractName", <!-- 合同名称 --> a.CONTRACT_NAME as "contractName", <!-- 合同名称 -->
TOTAL_CONTRACT_PRICE_EXCLUDING as "totalContractPriceExcluding", <!-- 合同总价(不含税) --> a.TOTAL_CONTRACT_PRICE_EXCLUDING as "totalContractPriceExcluding", <!-- 合同总价(不含税) -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 合同总价(含税) --> a.TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 合同总价(含税) -->
CONTRACT_TYPE as contractType, <!-- 合同类型;1销售合同2劳务合同3补充协议4合同外用工 --> a.CONTRACT_TYPE as contractType, <!-- 合同类型;1销售合同2劳务合同3补充协议4合同外用工 -->
PARTY_A as "partyA", <!-- 甲方名称 --> a.PARTY_A as "partyA", <!-- 甲方名称 -->
PARTY_B as "partyB" <!-- 乙方名称 --> a.PARTY_B as "partyB" <!-- 乙方名称 -->
FROM ${hggpSchema}.HGCW002 FROM ${hggpSchema}.HGCW002 a
WHERE 1=1 AND REVIEW_STATUS= 3 AND CONTRACT_TYPE IN (1,2) LEFT JOIN ${hggpSchema}.HGSC001 b on a.PROJ_CODE = b.PROJ_CODE
WHERE 1=1
AND a.REVIEW_STATUS= 3
AND a.CONTRACT_TYPE IN (1,2)
AND b.approval_status = 2
AND b.proj_status = 0
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode# a.ACCOUNT_CODE = #accountCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# a.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCodes"> <isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate> a.COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
ORDER BY CONTRACT_NUMBER <!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
b.DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(b.CREATED_BY = #authOnlyPeople# OR b.DEP_CODE IN <iterate close=")" open="(" conjunction=","
property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
b.CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty property="authDepCodes">
b.DEP_CODE IN
<iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
ORDER BY a.CONTRACT_NUMBER
</select> </select>
</sqlMap> </sqlMap>
...@@ -71,10 +71,10 @@ ...@@ -71,10 +71,10 @@
CONTRACT_DATE = #contractDate# CONTRACT_DATE = #contractDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="contractDateFrom"> <isNotEmpty prepend=" AND " property="contractDateFrom">
CONTRACT_DATE &gt;= REPLACE(#signingDateFrom#, '-', '') CONTRACT_DATE &gt;= REPLACE(#contractDateFrom#, '-', '')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="contractDateTo"> <isNotEmpty prepend=" AND " property="contractDateTo">
CONTRACT_DATE &lt;= REPLACE(#signingDateTo#, '-', '') CONTRACT_DATE &lt;= REPLACE(#contractDateTo#, '-', '')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints"> <isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints# TAX_POINTS = #taxPoints#
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc ID desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="row"> <div class="row">
<EF:EFPopupInput ename="popupInputProjCode" cname="项目编号" colWidth="4" <EF:EFPopupInput ename="popupInputProjCode" cname="项目编号" colWidth="4"
serviceName="HGCW002" methodName="queryContractByType" serviceName="HGCW002" methodName="queryContractByType"
resultId="contract_combo_box" resultId="result"
save="false" popupType="ServiceGrid" save="false" popupType="ServiceGrid"
valueField="projCode" textField="projCode" valueField="projCode" textField="projCode"
columnEnames="projCode,projName,contractNumber,contractName,totalContractPriceIncluding" columnEnames="projCode,projName,contractNumber,contractName,totalContractPriceIncluding"
......
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