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;
...@@ -38,7 +39,7 @@ import java.util.*; ...@@ -38,7 +39,7 @@ import java.util.*;
* @date 2024年05月06日 18:22 * @date 2024年05月06日 18:22
*/ */
public class ServiceHGCW002 extends ServiceBase { public class ServiceHGCW002 extends ServiceBase {
/** /**
* 画面初始化 * 画面初始化
* *
...@@ -175,7 +176,7 @@ public class ServiceHGCW002 extends ServiceBase { ...@@ -175,7 +176,7 @@ public class ServiceHGCW002 extends ServiceBase {
public void modify(HGCW002 HGCW002) { public void modify(HGCW002 HGCW002) {
DaoUtils.update("HGCW002.update", HGCW002); DaoUtils.update("HGCW002.update", HGCW002);
} }
/** /**
* 删除操作 * 删除操作
...@@ -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;
...@@ -37,7 +39,7 @@ import java.util.Map; ...@@ -37,7 +39,7 @@ import java.util.Map;
* @date 2024年05月06日 18:22 * @date 2024年05月06日 18:22
*/ */
public class ServiceHGCW008 extends ServiceBase { public class ServiceHGCW008 extends ServiceBase {
/** /**
* 画面初始化 * 画面初始化
* *
...@@ -63,7 +65,7 @@ public class ServiceHGCW008 extends ServiceBase { ...@@ -63,7 +65,7 @@ public class ServiceHGCW008 extends ServiceBase {
} }
return outInfo; return outInfo;
} }
/** /**
* 查询操作 * 查询操作
* *
...@@ -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()));
...@@ -149,7 +152,7 @@ public class ServiceHGCW008 extends ServiceBase { ...@@ -149,7 +152,7 @@ public class ServiceHGCW008 extends ServiceBase {
public void modify(HGCW008 HGCW008) { public void modify(HGCW008 HGCW008) {
DaoUtils.update("HGCW008.update", HGCW008); DaoUtils.update("HGCW008.update", HGCW008);
} }
/** /**
* 删除操作 * 删除操作
......
...@@ -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>
...@@ -4,33 +4,33 @@ ...@@ -4,33 +4,33 @@
Version : 1.0 Version : 1.0
schema : hggp schema : hggp
tableName : HGCW008 tableName : HGCW008
ID BIGINT NOT NULL primarykey, ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR, ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR, COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR, COMPANY_NAME VARCHAR,
PROJ_CODE VARCHAR, PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR, PROJ_NAME VARCHAR,
CONTRACT_NUMBER VARCHAR, CONTRACT_NUMBER VARCHAR,
CONTRACT_NAME VARCHAR, CONTRACT_NAME VARCHAR,
SETTLEMENT_NUMBER VARCHAR, SETTLEMENT_NUMBER VARCHAR,
SETTLEMENT_TYPE TINYINT, SETTLEMENT_TYPE TINYINT,
CONTRACT_DATE VARCHAR, CONTRACT_DATE VARCHAR,
TAX_POINTS INTEGER, TAX_POINTS INTEGER,
PRICE_TAX_SEPARATION INTEGER, PRICE_TAX_SEPARATION INTEGER,
THIS_SETTLEMENT_AMOUNT DECIMAL, THIS_SETTLEMENT_AMOUNT DECIMAL,
THIS_SETTLEMENT_TAX DECIMAL, THIS_SETTLEMENT_TAX DECIMAL,
THIS_PRICE_TAX DECIMAL, THIS_PRICE_TAX DECIMAL,
TOTAL_CONTRACT_PRICE DECIMAL, TOTAL_CONTRACT_PRICE DECIMAL,
CUMULATIVE_SETTLEMENT_AMOUNT DECIMAL, CUMULATIVE_SETTLEMENT_AMOUNT DECIMAL,
CUMULATIVE_SETTLEMENT_TAX DECIMAL, CUMULATIVE_SETTLEMENT_TAX DECIMAL,
CUMULATIVE_PRICE_TAX DECIMAL, CUMULATIVE_PRICE_TAX DECIMAL,
REVIEW_STATUS TINYINT, REVIEW_STATUS TINYINT,
CREATED_BY VARCHAR NOT NULL, CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL, CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL, CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL, UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL, UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL, UPDATED_TIME VARCHAR NOT NULL,
DEP_CODE VARCHAR DEP_CODE VARCHAR
--> -->
<sqlMap namespace="HGCW008"> <sqlMap namespace="HGCW008">
...@@ -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"
...@@ -89,4 +89,4 @@ ...@@ -89,4 +89,4 @@
<script> <script>
var ctx = "${ctx}"; var ctx = "${ctx}";
</script> </script>
<script src="${ctx}/HG/CW/HGCW008A.js"></script> <script src="${ctx}/HG/CW/HGCW008A.js"></script>
\ No newline at end of file
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