计费单据查询单价;
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) {
|
||||
|
||||
Reference in New Issue
Block a user