BMS结算主体字段查询显示
This commit is contained in:
@@ -142,6 +142,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="contractManageDO.contractType != null">
|
<if test="contractManageDO.contractType != null">
|
||||||
and contract_type = #{contractManageDO.contractType}
|
and contract_type = #{contractManageDO.contractType}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="contractManageDO.settlementCustomers != null">
|
||||||
|
and settlement_customers like concat('%', #{contractManageDO.settlementCustomers}, '%')
|
||||||
|
</if>
|
||||||
<if test="contractManageDO.settlementCustomersCode != null">
|
<if test="contractManageDO.settlementCustomersCode != null">
|
||||||
and settlement_customers_code = #{contractManageDO.settlementCustomersCode}
|
and settlement_customers_code = #{contractManageDO.settlementCustomersCode}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
+34
-15
@@ -393,11 +393,45 @@ public class BillingStatementDomainService {
|
|||||||
*/
|
*/
|
||||||
private void handleData(BillingStatementDO billingStatementDO) {
|
private void handleData(BillingStatementDO billingStatementDO) {
|
||||||
//查询合同信息,赋值合同周期信息
|
//查询合同信息,赋值合同周期信息
|
||||||
|
//优先通过合同编号获取合同信息
|
||||||
if(StringUtils.isNotEmpty(billingStatementDO.getContractNumber())){
|
if(StringUtils.isNotEmpty(billingStatementDO.getContractNumber())){
|
||||||
AjaxResult ajaxResult = systemServiceFeign.getInfoByCode(billingStatementDO.getContractNumber());
|
AjaxResult ajaxResult = systemServiceFeign.getInfoByCode(billingStatementDO.getContractNumber());
|
||||||
if("200".equals(String.valueOf(ajaxResult.get("code")))){
|
if("200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||||
ContractManagePO contractManagePO = JSON.parseObject(JSONObject.toJSONString(ajaxResult.get("data")), ContractManagePO.class);
|
ContractManagePO contractManagePO = JSON.parseObject(JSONObject.toJSONString(ajaxResult.get("data")), ContractManagePO.class);
|
||||||
if(null != contractManagePO){
|
if(null != contractManagePO){
|
||||||
|
//根据合同判断计费流水的周期开始日期和周期结束日期
|
||||||
|
setCycleTimeByContract(billingStatementDO, contractManagePO);
|
||||||
|
billingStatementDO.setContractType(contractManagePO.getContractType());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//根据结算对象获取收支类型
|
||||||
|
if(StringUtils.isNotEmpty(billingStatementDO.getSettlementCustomersCode())){
|
||||||
|
SettlementCustomers settlementCustomers = settlementCustomersDomainService.queryByCode(billingStatementDO.getSettlementCustomersCode());
|
||||||
|
if(null != settlementCustomers){
|
||||||
|
if(settlementCustomers.getMainRole()==1){
|
||||||
|
billingStatementDO.setAccountExpenseType(1);
|
||||||
|
}else {
|
||||||
|
billingStatementDO.setAccountExpenseType(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据合同判断计费流水的周期开始日期和周期结束日期
|
||||||
|
* (1)周期开始日期:根据合同明细的计费属性判断
|
||||||
|
* - 实时计费、按天计费:周期开始日期 = 业务日期
|
||||||
|
* - 按账期计费:周期开始日期 = 业务日期
|
||||||
|
* - 按周计费:周期开始日期 = 业务日期
|
||||||
|
* (2)周期结束日期:根据合同明细的计费属性判断
|
||||||
|
* - 实时计费、按天计费:周期结束日期 = 业务日期
|
||||||
|
* - 按账期计费:周期结束日期 = 合同的出账日期(paymentDate)
|
||||||
|
* - 按周计费:周期结束日期 = 业务日期往后推一周
|
||||||
|
* @param billingStatementDO 计费流水对象
|
||||||
|
* @param contractManagePO 合同管理对象
|
||||||
|
*/
|
||||||
|
private void setCycleTimeByContract(BillingStatementDO billingStatementDO, ContractManagePO contractManagePO) {
|
||||||
//取值合同详情,对比费用科目,取值计费周期
|
//取值合同详情,对比费用科目,取值计费周期
|
||||||
if(contractManagePO.getContractManageDetailPOList()!=null && contractManagePO.getContractManageDetailPOList().size()>0){
|
if(contractManagePO.getContractManageDetailPOList()!=null && contractManagePO.getContractManageDetailPOList().size()>0){
|
||||||
List<ContractManageDetailPO> contractManageDetailPOList = contractManagePO.getContractManageDetailPOList();
|
List<ContractManageDetailPO> contractManageDetailPOList = contractManagePO.getContractManageDetailPOList();
|
||||||
@@ -428,21 +462,6 @@ public class BillingStatementDomainService {
|
|||||||
billingStatementDO.setCycleBeginTime(cycleBeginTime);
|
billingStatementDO.setCycleBeginTime(cycleBeginTime);
|
||||||
billingStatementDO.setCycleEndTime(cycleEndTime);
|
billingStatementDO.setCycleEndTime(cycleEndTime);
|
||||||
}
|
}
|
||||||
billingStatementDO.setContractType(contractManagePO.getContractType());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//根据结算对象获取收支类型
|
|
||||||
if(StringUtils.isNotEmpty(billingStatementDO.getSettlementCustomersCode())){
|
|
||||||
SettlementCustomers settlementCustomers = settlementCustomersDomainService.queryByCode(billingStatementDO.getSettlementCustomersCode());
|
|
||||||
if(null != settlementCustomers){
|
|
||||||
if(settlementCustomers.getMainRole()==1){
|
|
||||||
billingStatementDO.setAccountExpenseType(1);
|
|
||||||
}else {
|
|
||||||
billingStatementDO.setAccountExpenseType(2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user