Commit c114e9ca by liuyang

2024-09-11 付款单和收款单显示优化

parent a5e75cdf
......@@ -41,6 +41,8 @@ public class HGCW016 extends DaoEPBase {
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_COMPANY_CODES = "companyCodes";/*用户角色权限*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编号*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
......@@ -85,6 +87,8 @@ public class HGCW016 extends DaoEPBase {
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private String depCode = " "; /* 部门编码*/
private String projName = " "; /* 项目名称*/
private String projCode = " "; /* 项目编号*/
/**
* initialize the metadata.
......@@ -168,6 +172,13 @@ public class HGCW016 extends DaoEPBase {
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("项目编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
}
......@@ -466,6 +477,23 @@ public class HGCW016 extends DaoEPBase {
public void setDepCode(String depCode) {
this.depCode = depCode;
}
public String getProjName() {
return projName;
}
public void setProjName(String projName) {
this.projName = projName;
}
public String getProjCode() {
return projCode;
}
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the value from Map.
*
......@@ -492,6 +520,8 @@ public class HGCW016 extends DaoEPBase {
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
}
/**
......@@ -519,6 +549,8 @@ public class HGCW016 extends DaoEPBase {
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
return map;
}
......
......@@ -38,6 +38,8 @@ public class HGCW017 extends DaoEPBase {
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_COMPANY_CODES = "companyCodes";/*用户角色权限*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编号*/
public static final String COL_ID = "ID";
public static final String COL_MAIN_ID = "MAIN_ID"; /* 主表ID*/
......@@ -79,6 +81,8 @@ public class HGCW017 extends DaoEPBase {
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private String depCode = " "; /* 部门编码*/
private String projName = " "; /* 项目名称*/
private String projCode = " "; /* 项目编号*/
/**
* initialize the metadata.
......@@ -150,7 +154,13 @@ public class HGCW017 extends DaoEPBase {
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("项目编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -400,6 +410,23 @@ public class HGCW017 extends DaoEPBase {
public void setDepCode(String depCode) {
this.depCode = depCode;
}
public String getProjName() {
return projName;
}
public void setProjName(String projName) {
this.projName = projName;
}
public String getProjCode() {
return projCode;
}
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the value from Map.
*
......@@ -423,6 +450,8 @@ public class HGCW017 extends DaoEPBase {
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
}
/**
......@@ -447,6 +476,8 @@ public class HGCW017 extends DaoEPBase {
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
return map;
}
......
......@@ -130,7 +130,7 @@ public class ServiceHGCW012 extends ServiceBase {
new HashMap<String, Object>(){{
put(HGCG003B.FIELD_COMPANY_CODE, hgcw012.getCompanyCode());
put(HGCG003B.FIELD_PROJ_CODE, hgcw012.getProjCode());
put(HGCG003.FIELD_SUP_CODE, hgcw012.getPartyA());
put(HGCG003.FIELD_SUP_CODE, hgcw012.getPartyA().split("-")[0]);
put(HGCG003.FIELD_STATUS, HGConstant.CgReceiveStatus.S_5);
put(HGCG003.FIELD_IS_INVOICING, HGConstant.CgIsInvoicing.S_0);
put("isUnCancelAmount", HGConstant.CgIsInvoicing.S_0);
......@@ -275,9 +275,9 @@ public class ServiceHGCW012 extends ServiceBase {
if (StringUtils.isEmpty(mainId)) {
//先生成主表
HGCW012 hgcw012 = new HGCW012();
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgcw012.setCompanyCode(userVO.getUsercode());
hgcw012.setCompanyName(userVO.getUsername());
//UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgcw012.setCompanyCode(hgcw013List.get(0).getCompanyCode());
hgcw012.setCompanyName(hgcw013List.get(0).getCompanyName());
hgcw012.setReviewStatus(0);
hgcw012.setBillState(0);
hgcw012.setBillTybe(1);
......@@ -376,9 +376,8 @@ public class ServiceHGCW012 extends ServiceBase {
if (StringUtils.isEmpty(mainId)) {
//先生成主表
HGCW012 hgcw012 = new HGCW012();
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgcw012.setCompanyCode(userVO.getUsercode());
hgcw012.setCompanyName(userVO.getUsername());
hgcw012.setCompanyCode(hgcw013List.get(0).getCompanyCode());
hgcw012.setCompanyName(hgcw013List.get(0).getCompanyName());
hgcw012.setReviewStatus(0);
hgcw012.setBillState(0);
hgcw012.setBillTybe(1);
......@@ -480,9 +479,8 @@ public class ServiceHGCW012 extends ServiceBase {
if (StringUtils.isEmpty(mainId)) {
//先生成主表
HGCW012 hgcw012 = new HGCW012();
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgcw012.setCompanyCode(userVO.getUsercode());
hgcw012.setCompanyName(userVO.getUsername());
hgcw012.setCompanyCode(hgcw013List.get(0).getCompanyCode());
hgcw012.setCompanyName(hgcw013List.get(0).getCompanyName());
hgcw012.setReviewStatus(0);
hgcw012.setBillState(0);
hgcw012.setBillTybe(1);
......
......@@ -48,7 +48,8 @@ public class ServiceHGCW016 extends ServiceBase {
@OperationLogAnnotation(operModul = "付款单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID), null, true);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, true);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW016().eiMetadata);
} catch (Exception e) {
......@@ -178,9 +179,9 @@ public class ServiceHGCW016 extends ServiceBase {
if (StringUtils.isEmpty(mainId)) {
//先生成主表
HGCW016 hgcw016 = new HGCW016();
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
/* UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgcw016.setCompanyCode(userVO.getUsercode());
hgcw016.setCompanyName(userVO.getUsername());
hgcw016.setCompanyName(userVO.getUsername());*/
//hgcw016.setCancelStatus(1);
//hgcw016.setReviewStatus(0);
//hgcw016.setIncomeNumber(SequenceGenerator.getNextSequence(HGConstant.SequenceId.CW_COLLECTION_NO));
......@@ -198,6 +199,10 @@ public class ServiceHGCW016 extends ServiceBase {
totalContractPriceIncluding = totalContractPriceIncluding.add(remainingAmount);
}
hgcw016.setTotalContractPriceIncluding(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
hgcw016.setCompanyCode(hgcw017List.get(0).getCompanyCode());
hgcw016.setCompanyName(hgcw017List.get(0).getCompanyName());
hgcw016.setProjCode(hgcw017List.get(0).getProjCode());
hgcw016.setProjName(hgcw017List.get(0).getProjName());
hgcw016.setPartyA(hgcw017List.get(0).getPartyA());
hgcw016.setContractNumber(contractNumber.toString().substring(0, contractNumber.length() - 1));
this.add(hgcw016);
......
......@@ -38,6 +38,7 @@ public class ServiceHGCW016A extends ServiceBase {
try {
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID), null, true);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW012().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化付款单失败");
......
......@@ -29,6 +29,7 @@ public class ServiceHGCW016B extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID), null, true);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, true);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW017().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
......@@ -29,6 +29,7 @@ public class ServiceHGCW016C extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID), null, true);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, true);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW017().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
......@@ -87,7 +87,7 @@
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
PROJ_NAME like concat('%',#projName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
......
......@@ -73,7 +73,7 @@
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
PROJ_NAME like concat('%' , #projName# , '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
......
......@@ -42,7 +42,7 @@
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
PROJ_NAME like concat('%',#projName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
......
......@@ -42,7 +42,7 @@
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
PROJ_NAME like concat('%' , #projName# , '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
......
......@@ -87,6 +87,12 @@
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME like CONCAT('%',#projName#,'%')
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
......@@ -109,7 +115,9 @@
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName"
FROM ${hggpSchema}.HGCW016 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
......@@ -120,7 +128,6 @@
SIGNING_DATE desc ,ID desc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
......@@ -187,25 +194,29 @@
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCW016 (ID,
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
CONTRACT_NUMBER, <!-- 来源单号 -->
INCOME_NUMBER, <!-- 单号 -->
SIGNING_DATE, <!-- 付款日期 -->
PARTY_A, <!-- 供应商名称 -->
CANCEL_STATUS, <!-- 核销状态 -->
REVIEW_STATUS, <!-- 审批状态 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 付款总额 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #contractNumber#, #incomeNumber#, #signingDate#, #partyA#, #cancelStatus#, #reviewStatus#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
CONTRACT_NUMBER, <!-- 来源单号 -->
INCOME_NUMBER, <!-- 单号 -->
SIGNING_DATE, <!-- 付款日期 -->
PARTY_A, <!-- 供应商名称 -->
CANCEL_STATUS, <!-- 核销状态 -->
REVIEW_STATUS, <!-- 审批状态 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 付款总额 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE, <!-- 部门编码 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME <!-- 项目名称 -->
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #contractNumber#, #incomeNumber#, #signingDate#,
#partyA#, #cancelStatus#, #reviewStatus#, #totalContractPriceIncluding#, #createdBy#, #createdName#,
#createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #projCode#, #projName#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW016
</selectKey>
......
......@@ -71,6 +71,12 @@
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME like CONCAT('%',#projName#,'%')
</isNotEmpty>
</sql>
<sql id="condition">
......@@ -81,21 +87,23 @@
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW017">
SELECT
ID as "id",
MAIN_ID as "mainId", <!-- 主表ID -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 来源单号 -->
PARTY_A as "partyA", <!-- 供应商名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 收款总额 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
ID as "id",
MAIN_ID as "mainId", <!-- 主表ID -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 来源单号 -->
PARTY_A as "partyA", <!-- 供应商名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 收款总额 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName"
FROM ${hggpSchema}.HGCW017 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
......@@ -111,34 +119,36 @@
<select id="queryNoAuth" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW017">
SELECT
ID as "id",
MAIN_ID as "mainId", <!-- 主表ID -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 来源单号 -->
PARTY_A as "partyA", <!-- 供应商名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 收款总额 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
FROM ${hggpSchema}.HGCW017 WHERE 1=1
<include refid="condition_no_auth" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
SELECT
ID as "id",
MAIN_ID as "mainId", <!-- 主表ID -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 来源单号 -->
PARTY_A as "partyA", <!-- 供应商名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 收款总额 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName" <!-- 项目名称 -->
FROM ${hggpSchema}.HGCW017 WHERE 1=1
<include refid="condition_no_auth" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCW017 WHERE 1=1
......@@ -195,22 +205,26 @@
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCW017 (
MAIN_ID, <!-- 主表ID -->
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
CONTRACT_NUMBER, <!-- 来源单号 -->
PARTY_A, <!-- 供应商名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 收款总额 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#mainId#, #accountCode#, #companyCode#, #companyName#, #contractNumber#, #partyA#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
MAIN_ID, <!-- 主表ID -->
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
CONTRACT_NUMBER, <!-- 来源单号 -->
PARTY_A, <!-- 供应商名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 收款总额 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE, <!-- 部门编码 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME <!-- 项目名称 -->
)
VALUES (#mainId#, #accountCode#, #companyCode#, #companyName#, #contractNumber#, #partyA#,
#totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #depCode#, #projCode#, #projName#)
</insert>
<delete id="delete">
......@@ -221,22 +235,24 @@
<update id="update">
UPDATE ${hggpSchema}.HGCW017
SET
MAIN_ID = #mainId#, <!-- 主表ID -->
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
CONTRACT_NUMBER = #contractNumber#, <!-- 来源单号 -->
PARTY_A = #partyA#, <!-- 供应商名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#, <!-- 收款总额 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEP_CODE = #depCode# <!-- 部门编码 -->
WHERE
ID = #id#
MAIN_ID = #mainId#, <!-- 主表ID -->
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
CONTRACT_NUMBER = #contractNumber#, <!-- 来源单号 -->
PARTY_A = #partyA#, <!-- 供应商名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#, <!-- 收款总额 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
PROJ_CODE = #projCode#,
PROJ_NAME = #projName#
WHERE
ID = #id#
</update>
</sqlMap>
......@@ -935,7 +935,7 @@ public class HGCWTools {
HGCW013 hgcw013 = new HGCW013();
hgcw013.fromMap(row);
String settlementNumber = row.get("receiveNo").toString();
String partA = row.get("supCode").toString();
String partA = row.get("supCode").toString().concat("-"+row.get("supName").toString());
String remainingAmount = row.get("thisSettlementAmount").toString();
BigDecimal taxPoints = new BigDecimal("13"); // 假设这是以整数形式给出的税率,比如17表示17%
BigDecimal thisAmount = new BigDecimal(row.get("thisSettlementAmount").toString());
......
......@@ -3,6 +3,7 @@ $(function() {
var roleCompany = __eiInfo.getBlock("roleCompany").getMappedRows();
var projRecordBox = __eiInfo.getBlock("proj_record_block_id").getMappedRows();
var supRecordBox = __eiInfo.getBlock("sup_record_block_id").getMappedRows();
// 查询
$("#QUERY").on("click", function () {
......@@ -38,6 +39,19 @@ $(function() {
}
return option.values;
}
},{
field: "partyA",
template: function (item) {
let template = item.partyA;
supRecordBox.forEach(dataItem=>{
if (dataItem["valueField"] === item["partyA"]){
resultGrid.setCellValue(item,'partyA',`${dataItem["valueField"]}-${dataItem["textField"]}`);
template = `${dataItem["valueField"]}-${dataItem["textField"]}`;
return;
}
})
return template;
}
}, {
field: "receiveDate",
defaultValue: function () {
......@@ -97,7 +111,6 @@ $(function() {
}
}
if (e.field === "projCode"){
let item = e.items[0];
for (let i = 0; i < projRecordBox.length; i++) {
if (projRecordBox[i]["valueField"] === item["projCode"]){
resultGrid.setCellValue(item,'projName',projRecordBox[i]["textField"]);
......@@ -105,6 +118,7 @@ $(function() {
resultGrid.setCellValue(item,'companyCode',projRecordBox[i]["param1Field"]);
resultGrid.setCellValue(item,'companyName',projRecordBox[i]["param2Field"]);
}
continue
break;
}
}
......@@ -117,7 +131,6 @@ $(function() {
}
}
if (e.field === "companyCode"){
let item = e.items[0];
for (let i = 0; i < roleCompany.length; i++) {
if (roleCompany[i]["companyCode"] === item["companyCode"]){
resultGrid.setCellValue(item,'companyName',roleCompany[i]["companyName"]);
......
......@@ -14,11 +14,12 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3" placeholder="模糊查询项目"/>
<EF:EFDateSpan startCname="收款日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="客户名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="客户名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊查询客户"/>
<EF:EFSelect cname="核销状态" ename="inqu_status-0-cancelStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.cancelStatus"/>
......
......@@ -17,6 +17,7 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3" placeholder="模糊查询项目"/>
<EF:EFDateSpan startCname="开票日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
......@@ -40,6 +41,8 @@
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>
<EF:EFColumn ename="projCode" cname="项目编码" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="200" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisAmount" cname="本次收款金额" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
......@@ -49,8 +52,6 @@
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="partyA" cname="客户名称" width="200" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编码" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="200" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="200" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
......
$(function() {
var companyCodeBox = __eiInfo.getBlock("roleCompany").getMappedRows();
var projRecordBox = __eiInfo.getBlock("proj_record_block_id").getMappedRows();
// 查询
$("#QUERY").on("click", function () {
......@@ -39,13 +40,49 @@ $(function() {
}
return dataItem["companyCode"];
}
},
}, {
field: "projCode",
filter:function (option) {
let companyCode = option.model["companyCode"];
if (companyCode){
return _.filter(projRecordBox, function (item) {
return item["param1Field"] == companyCode;
})
}
return option.values;
}
}
],
loadComplete: function (grid) {
$("#BTN_CHOICE").on("click",choiceFunc);
$("#BTN_UPDATE").on("click",updateFunc);
$("#BTN_SUBMIT").on("click",submitFunc);
$("#BTN_WRITEOFF").on("click",writeoffFunc);
grid.dataSource.bind("change",function(e){
var item = e.items[0];
if (e.field === "projCode"){
for (let i = 0; i < projRecordBox.length; i++) {
if (projRecordBox[i]["valueField"] === item["projCode"]){
resultGrid.setCellValue(item,'projName',projRecordBox[i]["textField"]);
if (isBlank(item["companyCode"])){
resultGrid.setCellValue(item,'companyCode',projRecordBox[i]["param1Field"]);
resultGrid.setCellValue(item,'companyName',projRecordBox[i]["param2Field"]);
}
break;
}
}
loadChange(grid,e,"partyA");
}
if (e.field === "companyCode"){
for (let i = 0; i < companyCodeBox.length; i++) {
if (companyCodeBox[i]["companyCode"] === item["companyCode"]){
resultGrid.setCellValue(item,'companyName',companyCodeBox[i]["companyName"]);
break;
}
}
loadChange(grid,e,"projCode");
}
})
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
......
......@@ -14,11 +14,12 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3" placeholder="模糊查询项目"/>
<EF:EFDateSpan startCname="付款日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="供应商名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="供应商名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊查询供应商"/>
<EF:EFSelect cname="核销状态" ename="inqu_status-0-cancelStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.cancelStatus"/>
......@@ -38,6 +39,13 @@
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/>
<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="projName" cname="项目名称" hidden="true"/>
<EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="sup_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
......
......@@ -17,11 +17,12 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3" placeholder="模糊查询项目"/>
<EF:EFDateSpan startCname="付款日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="供应商名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="供应商名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊查询供应商"/>
<EF:EFSelect cname="票据类型" ename="inqu_status-0-billTybe" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.billTybe"/>
......@@ -40,6 +41,12 @@
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="thisAmount" cname="本次付款金额" width="120" enable="true" format="{0:C3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
......
......@@ -11,6 +11,13 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="projName" cname="项目名称" hidden="true"/>
<EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="sup_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
......@@ -18,7 +25,7 @@
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="contractNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="付款总额" width="120" enable="true" format="{0:N3}" editType="text"
<EF:EFColumn ename="totalContractPriceIncluding" cname="付款总额" width="120" enable="true" format="{0:C3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
......
......@@ -11,6 +11,13 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="projName" cname="项目名称" hidden="true"/>
<EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="sup_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
......
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