Commit b6044c96 by 江和松

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

parent c5a03577
......@@ -21,6 +21,7 @@ import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
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.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -38,7 +39,7 @@ import java.util.*;
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW002 extends ServiceBase {
/**
* 画面初始化
*
......@@ -175,7 +176,7 @@ public class ServiceHGCW002 extends ServiceBase {
public void modify(HGCW002 HGCW002) {
DaoUtils.update("HGCW002.update", HGCW002);
}
/**
* 删除操作
......@@ -265,9 +266,7 @@ public class ServiceHGCW002 extends ServiceBase {
if (StringUtils.isNotEmpty(inInfo.getString("reviewStatus"))) {
map.put("reviewStatus", "3");
}
List<HGCW002> HGCW002List = dao.query("HGCW002.queryContractByType",map);
inInfo.addBlock("contract_combo_box").setRows(HGCW002List);
inInfo = super.query(inInfo, "HGCW002.queryContractByType", new HGCW001());
return inInfo;
}
......
......@@ -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.vo.UserVO;
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.Org;
import com.baosight.hggp.util.CommonMethod;
......@@ -37,7 +39,7 @@ import java.util.Map;
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW008 extends ServiceBase {
/**
* 画面初始化
*
......@@ -63,7 +65,7 @@ public class ServiceHGCW008 extends ServiceBase {
}
return outInfo;
}
/**
* 查询操作
*
......@@ -102,9 +104,10 @@ public class ServiceHGCW008 extends ServiceBase {
HGCW008.fromMap(resultRows.get(0));
if (HGCW008.getId() == null || HGCW008.getId() == 0) {
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
HGSC001 project = HGSCTools.Hgsc001.queryByCode(HGCW008.getProjCode());
String settlementNumber = SequenceGenerator.getNextSequence(HGConstant.SequenceId.CW_SETTLEMENT_NO);
HGCW008.setCompanyCode(userVO.getUsercode());
HGCW008.setCompanyName(userVO.getUsername());
HGCW008.setCompanyCode(project.getCompanyCode());
HGCW008.setCompanyName(project.getCompanyName());
HGCW008.setSettlementNumber(settlementNumber);
HGCW008.setReviewStatus(2);
HGCW008.setContractDate(DateUtils.formatShort(HGCW008.getContractDate()));
......@@ -149,7 +152,7 @@ public class ServiceHGCW008 extends ServiceBase {
public void modify(HGCW008 HGCW008) {
DaoUtils.update("HGCW008.update", HGCW008);
}
/**
* 删除操作
......
......@@ -544,28 +544,51 @@
<select id="queryContractByType" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW002">
<include refid="HGXSDataAuth.authCondition"/>
SELECT DISTINCT
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
CONTRACT_NAME as "contractName", <!-- 合同名称 -->
TOTAL_CONTRACT_PRICE_EXCLUDING as "totalContractPriceExcluding", <!-- 合同总价(不含税) -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 合同总价(含税) -->
CONTRACT_TYPE as contractType, <!-- 合同类型;1销售合同2劳务合同3补充协议4合同外用工 -->
PARTY_A as "partyA", <!-- 甲方名称 -->
PARTY_B as "partyB" <!-- 乙方名称 -->
FROM ${hggpSchema}.HGCW002
WHERE 1=1 AND REVIEW_STATUS= 3 AND CONTRACT_TYPE IN (1,2)
a.PROJ_CODE as "projCode", <!-- 项目编码 -->
a.PROJ_NAME as "projName", <!-- 项目名称 -->
a.CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
a.CONTRACT_NAME as "contractName", <!-- 合同名称 -->
a.TOTAL_CONTRACT_PRICE_EXCLUDING as "totalContractPriceExcluding", <!-- 合同总价(不含税) -->
a.TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 合同总价(含税) -->
a.CONTRACT_TYPE as contractType, <!-- 合同类型;1销售合同2劳务合同3补充协议4合同外用工 -->
a.PARTY_A as "partyA", <!-- 甲方名称 -->
a.PARTY_B as "partyB" <!-- 乙方名称 -->
FROM ${hggpSchema}.HGCW002 a
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">
ACCOUNT_CODE = #accountCode#
a.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
a.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
ORDER BY CONTRACT_NUMBER
a.COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
<!-- 无权限时使用 -->
<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>
</sqlMap>
......@@ -4,33 +4,33 @@
Version : 1.0
schema : hggp
tableName : HGCW008
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
CONTRACT_NUMBER VARCHAR,
CONTRACT_NAME VARCHAR,
SETTLEMENT_NUMBER VARCHAR,
SETTLEMENT_TYPE TINYINT,
CONTRACT_DATE VARCHAR,
TAX_POINTS INTEGER,
PRICE_TAX_SEPARATION INTEGER,
THIS_SETTLEMENT_AMOUNT DECIMAL,
THIS_SETTLEMENT_TAX DECIMAL,
THIS_PRICE_TAX DECIMAL,
TOTAL_CONTRACT_PRICE DECIMAL,
CUMULATIVE_SETTLEMENT_AMOUNT DECIMAL,
CUMULATIVE_SETTLEMENT_TAX DECIMAL,
CUMULATIVE_PRICE_TAX DECIMAL,
REVIEW_STATUS TINYINT,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
CONTRACT_NUMBER VARCHAR,
CONTRACT_NAME VARCHAR,
SETTLEMENT_NUMBER VARCHAR,
SETTLEMENT_TYPE TINYINT,
CONTRACT_DATE VARCHAR,
TAX_POINTS INTEGER,
PRICE_TAX_SEPARATION INTEGER,
THIS_SETTLEMENT_AMOUNT DECIMAL,
THIS_SETTLEMENT_TAX DECIMAL,
THIS_PRICE_TAX DECIMAL,
TOTAL_CONTRACT_PRICE DECIMAL,
CUMULATIVE_SETTLEMENT_AMOUNT DECIMAL,
CUMULATIVE_SETTLEMENT_TAX DECIMAL,
CUMULATIVE_PRICE_TAX DECIMAL,
REVIEW_STATUS TINYINT,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DEP_CODE VARCHAR
-->
<sqlMap namespace="HGCW008">
......@@ -71,10 +71,10 @@
CONTRACT_DATE = #contractDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractDateFrom">
CONTRACT_DATE &gt;= REPLACE(#signingDateFrom#, '-', '')
CONTRACT_DATE &gt;= REPLACE(#contractDateFrom#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractDateTo">
CONTRACT_DATE &lt;= REPLACE(#signingDateTo#, '-', '')
CONTRACT_DATE &lt;= REPLACE(#contractDateTo#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
......@@ -171,7 +171,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
ID desc
</isEmpty>
</dynamic>
......
......@@ -11,7 +11,7 @@
<div class="row">
<EF:EFPopupInput ename="popupInputProjCode" cname="项目编号" colWidth="4"
serviceName="HGCW002" methodName="queryContractByType"
resultId="contract_combo_box"
resultId="result"
save="false" popupType="ServiceGrid"
valueField="projCode" textField="projCode"
columnEnames="projCode,projName,contractNumber,contractName,totalContractPriceIncluding"
......@@ -89,4 +89,4 @@
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HG/CW/HGCW008A.js"></script>
\ No newline at end of file
<script src="${ctx}/HG/CW/HGCW008A.js"></script>
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