计费单据查询单价;
This commit is contained in:
+28
-24
@@ -340,11 +340,13 @@ public class ContractManageApplicationService {
|
||||
public List<SubjectAndPriceReturn> getPrice(String documentTypeCode, String settlementCustomersCode,Long organizationId,Long topOrganizationId) {
|
||||
List<SubjectAndPriceReturn> result = new ArrayList<>();
|
||||
ContractManagePO contractManagePO = getInfoByCustomerAndOrganizationId(settlementCustomersCode, 1, topOrganizationId, organizationId);
|
||||
List<ContractManageDetailPO> detailPOS = contractManageDetailDomainService.queryListByManageId(contractManagePO.getContractManageId());
|
||||
contractManagePO.setContractManageDetailPOList(detailPOS);
|
||||
if (contractManagePO != null) {
|
||||
List<ContractManageDetailPO> contractManageDetailPOList = contractManagePO.getContractManageDetailPOList();
|
||||
if (contractManageDetailPOList != null && contractManageDetailPOList.size() > 0) {
|
||||
List<ContractManageDetailPO> contractManageDetailPOs = contractManageDetailPOList.stream()
|
||||
.filter(item -> item.getDocumentType().equals(documentTypeCode))
|
||||
.filter(item -> item.getDocumentTypeCode().equals(documentTypeCode))
|
||||
.collect(Collectors.toList());
|
||||
if (contractManageDetailPOs != null && contractManageDetailPOs.size() > 0) {
|
||||
for (ContractManageDetailPO contractManageDetailPO : contractManageDetailPOs) {
|
||||
@@ -358,28 +360,30 @@ public class ContractManageApplicationService {
|
||||
Long billingParamsId = billingParam.getBillingParamsId();
|
||||
List<Map<String, Object>> preSetRulesList = JSON.parseObject(preSetRules, new TypeReference<List<Map<String, Object>>>() {});
|
||||
List<Map<String, Object>> billingParamsList = JSON.parseObject(billingParamsJson, new TypeReference<List<Map<String, Object>>>() {});
|
||||
Map<String, Object> stringObjectMap1 = preSetRulesList.get(0);
|
||||
for (Map<String, Object> stringObjectMap : billingParamsList) {
|
||||
String fieldsName = (String) stringObjectMap.get("fieldsName");
|
||||
String isShow = (String) stringObjectMap.get("isShow");
|
||||
String isFee = (String) stringObjectMap.get("isFee");
|
||||
String isPush = (String) stringObjectMap.get("isPush");
|
||||
if ("1".equals(isFee)) {
|
||||
Integer sort = (Integer) stringObjectMap.get("sort");
|
||||
String chargingId = (String) stringObjectMap.get("chargingId");
|
||||
String fields = (String) stringObjectMap.get("fields");
|
||||
String price = (String) stringObjectMap1.get("fields" + sort);
|
||||
SubjectAndPriceReturn subjectAndPriceReturn = new SubjectAndPriceReturn();
|
||||
subjectAndPriceReturn.setName(fieldsName);
|
||||
subjectAndPriceReturn.setPrice(new BigDecimal(price));
|
||||
subjectAndPriceReturn.setChargingId(chargingId);
|
||||
subjectAndPriceReturn.setFields(fields);
|
||||
subjectAndPriceReturn.setBillingRulesId(accountingStrategyId);
|
||||
subjectAndPriceReturn.setIsShow(isShow);
|
||||
subjectAndPriceReturn.setIsFee(isFee);
|
||||
subjectAndPriceReturn.setIsPush(isPush);
|
||||
subjectAndPriceReturn.setRulesId(billingParamsId);
|
||||
result.add(subjectAndPriceReturn);
|
||||
if (preSetRulesList != null && preSetRulesList.size() > 0) {
|
||||
Map<String, Object> stringObjectMap1 = preSetRulesList.get(0);
|
||||
for (Map<String, Object> stringObjectMap : billingParamsList) {
|
||||
String fieldsName = (String) stringObjectMap.get("fieldsName");
|
||||
String isShow = (String) stringObjectMap.get("isShow");
|
||||
String isFee = (String) stringObjectMap.get("isFee");
|
||||
String isPush = (String) stringObjectMap.get("isPush");
|
||||
if ("1".equals(isFee)) {
|
||||
Integer sort = (Integer) stringObjectMap.get("sort");
|
||||
String chargingId = (String) stringObjectMap.get("chargingId");
|
||||
String fields = (String) stringObjectMap.get("fields");
|
||||
String price = (String) stringObjectMap1.get("fields" + sort);
|
||||
SubjectAndPriceReturn subjectAndPriceReturn = new SubjectAndPriceReturn();
|
||||
subjectAndPriceReturn.setName(fieldsName);
|
||||
subjectAndPriceReturn.setPrice(new BigDecimal(price));
|
||||
subjectAndPriceReturn.setChargingId(chargingId);
|
||||
subjectAndPriceReturn.setFields(fields);
|
||||
subjectAndPriceReturn.setBillingRulesId(accountingStrategyId);
|
||||
subjectAndPriceReturn.setIsShow(isShow);
|
||||
subjectAndPriceReturn.setIsFee(isFee);
|
||||
subjectAndPriceReturn.setIsPush(isPush);
|
||||
subjectAndPriceReturn.setRulesId(billingParamsId);
|
||||
result.add(subjectAndPriceReturn);
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
@@ -392,7 +396,7 @@ public class ContractManageApplicationService {
|
||||
} else {
|
||||
throw new ServiceException("合同信息不存在");
|
||||
}
|
||||
return null;
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<SubjectAndPriceReturn> getSubject(SubjectAndPriceDTO contractManageDTO) {
|
||||
|
||||
@@ -107,12 +107,12 @@
|
||||
<select id="selectCostSubject" parameterType="com.mhd.basic.domain.expenseAccount.repository.todo.ExpenseAccountDO"
|
||||
resultType="com.mhd.basic.domain.expenseAccount.repository.po.ExpenseAccountPO">
|
||||
select
|
||||
*
|
||||
from expense_account
|
||||
a.*
|
||||
from expense_account a left join service_items_manage b ON a.service_items_manage_id = b.service_items_manage_id
|
||||
where
|
||||
del_flag = 1
|
||||
and status = 1
|
||||
and first_subject_flag = 1
|
||||
a.del_flag = 1
|
||||
and a.status = 1
|
||||
and a.first_subject_flag = 1
|
||||
<include refid="common_where_two"></include>
|
||||
</select>
|
||||
<select id="selectAllCostSubject"
|
||||
@@ -149,11 +149,15 @@
|
||||
<!-- 如果 organizationId 和 topOrganizationId 都为 null,表示查询所有组织的数据(不添加组织过滤条件) -->
|
||||
<if test="expenseAccountDO.organizationId != null">
|
||||
<!-- 如果设置了 organizationId,添加 organization_id 条件 -->
|
||||
and organization_id = #{expenseAccountDO.organizationId}
|
||||
and a.organization_id = #{expenseAccountDO.organizationId}
|
||||
</if>
|
||||
<if test="expenseAccountDO.topOrganizationId != null and expenseAccountDO.organizationId == null">
|
||||
<!-- 如果设置了 topOrganizationId 但没有设置 organizationId,添加 top_organization_id 条件 -->
|
||||
and top_organization_id = #{expenseAccountDO.topOrganizationId}
|
||||
and a.top_organization_id = #{expenseAccountDO.topOrganizationId}
|
||||
</if>
|
||||
<if test="expenseAccountDO.serviceItemsCode != null and expenseAccountDO.serviceItemsCode != ''">
|
||||
<!-- 如果设置了 topOrganizationId 但没有设置 organizationId,添加 top_organization_id 条件 -->
|
||||
and b.service_items_code = #{expenseAccountDO.serviceItemsCode}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user