bms2相关修改;
This commit is contained in:
+6
-1
@@ -891,6 +891,11 @@ public class BusinessDocumentApplicationService {
|
||||
businessDocumentDO.setEstimatedCost(billingCostPo.getComputationalCost());
|
||||
businessDocumentDO.setBillAmount(billingCostPo.getComputationalCost());//计费金额与计算金额一致
|
||||
log.info("定时任务进入BMS业务单据保存--结束");
|
||||
return businessDocumentDomainService.insert(businessDocumentDO);
|
||||
BusinessDocument businessDocument = businessDocumentDomainService.insertRetrun(businessDocumentDO);
|
||||
BusinessDocumentDTO businessDocumentDTO = new BusinessDocumentDTO();
|
||||
businessDocumentDTO.setBusinessDocumentIds(String.valueOf(businessDocument.getBusinessDocumentId()));
|
||||
this.takeEffectByIds(businessDocumentDTO);
|
||||
this.auditByIds(businessDocumentDTO);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+1
@@ -287,6 +287,7 @@ public class SettlementCustomersApplicationService {
|
||||
saveEntity.setSettlementMethodCode("monthly_settle");
|
||||
saveEntity.setMainRole(1);
|
||||
saveEntity.setCustomerTypeCode("customer"); //从货主同步过来的 默认客户
|
||||
saveEntity.setNcCode(userShipperPo.getCustomerNcCode());
|
||||
Long settlementEntityId = saveEntity.getSettlementEntityId();
|
||||
List<SettlementCustomers> settlementCustomers = settlementCustomersMapper.selectList(new LambdaQueryWrapper<SettlementCustomers>().eq(SettlementCustomers::getSettlementEntityId, settlementEntityId));
|
||||
if(settlementCustomers != null && settlementCustomers.size() > 0){
|
||||
|
||||
@@ -239,4 +239,8 @@ public class BillManage extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty("业务员ID")
|
||||
private String salesmanName;
|
||||
@ApiModelProperty("收款帐户")
|
||||
private String paymentAccountId;
|
||||
@ApiModelProperty("收款帐户名称")
|
||||
private String paymentAccountName;
|
||||
}
|
||||
@@ -257,5 +257,9 @@ public class BillManagePO extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty("业务员ID")
|
||||
private String salesmanName;
|
||||
@ApiModelProperty("收款帐户")
|
||||
private String paymentAccountId;
|
||||
@ApiModelProperty("收款帐户名称")
|
||||
private String paymentAccountName;
|
||||
private List<BillDetail> billDetailList;
|
||||
}
|
||||
+4
-1
@@ -260,5 +260,8 @@ public class BillManageDO extends BaseVOEntity{
|
||||
private String receivablePushTimeStart;
|
||||
private String paymentPushTimeEnd;
|
||||
private String paymentPushTimeStart;
|
||||
|
||||
@ApiModelProperty("收款帐户")
|
||||
private String paymentAccountId;
|
||||
@ApiModelProperty("收款帐户名称")
|
||||
private String paymentAccountName;
|
||||
}
|
||||
+21
-1
@@ -149,6 +149,8 @@ public class BillManageDomainService {
|
||||
billManage.setSettlementCustomersCode(billingStatementPOS.get(0).getSettlementCustomersCode());
|
||||
billManage.setSalesmanId(billingStatementPOS.get(0).getSalesmanId());
|
||||
billManage.setSalesmanName(billingStatementPOS.get(0).getSalesmanName());
|
||||
billManage.setPaymentAccountId(billingStatementPOS.get(0).getPaymentAccountId());
|
||||
billManage.setPaymentAccountName(billingStatementPOS.get(0).getPaymentAccountName());
|
||||
billManage.setBillRemark(billingRemark);
|
||||
//查询结算对象信息
|
||||
SettlementCustomersPO settlementCustomersPO = settlementCustomersDomainService.getInfo(billingStatementPOS.get(0).getSettlementCustomersId());
|
||||
@@ -239,6 +241,21 @@ public class BillManageDomainService {
|
||||
BillingStatementDO billingStatementDO = new BillingStatementDO();
|
||||
billingStatementDO.setBillingStatementIdSet(billingSet);
|
||||
List<BillingStatementPO> billingStatementPOS = billingStatementDomainService.queryList(billingStatementDO);
|
||||
|
||||
//获取最新一条的业务员信息
|
||||
String salesmanId = null;
|
||||
String salesmanName = null;
|
||||
if (billingStatementPOS != null && !billingStatementPOS.isEmpty()) {
|
||||
billingStatementPOS.sort((a, b) -> {
|
||||
if (a.getCreateTime() == null && b.getCreateTime() == null) return 0;
|
||||
if (a.getCreateTime() == null) return 1;
|
||||
if (b.getCreateTime() == null) return -1;
|
||||
return b.getCreateTime().compareTo(a.getCreateTime());
|
||||
});
|
||||
salesmanId = billingStatementPOS.get(0).getSalesmanId();
|
||||
salesmanName = billingStatementPOS.get(0).getSalesmanName();
|
||||
}
|
||||
|
||||
List<BillingStatementADDVO> billingStatementList = billingStatementDTO.getBillingStatementList();
|
||||
for (BillingStatementPO billingStatementPO : billingStatementPOS) {
|
||||
String billingStatementId = billingStatementPO.getBillingStatementId() == null ? "" : String.valueOf(billingStatementPO.getBillingStatementId());
|
||||
@@ -252,6 +269,10 @@ public class BillManageDomainService {
|
||||
billingStatementPO.setInvoiceItemName(billingStatementADDVO.getInvoiceItemName());
|
||||
billingStatementPO.setBillingAmount(billingStatementADDVO.getBillingAmount());
|
||||
billingStatementPO.setBillingStatementIdStr(billingStatementADDVO.getBillingStatementId());
|
||||
if (salesmanName != null && !salesmanName.isEmpty() && salesmanId != null && !salesmanId.isEmpty()) {
|
||||
billingStatementPO.setSalesmanId(salesmanId);
|
||||
billingStatementPO.setSalesmanName(salesmanName);
|
||||
}
|
||||
}
|
||||
List<BillingStatementPO> distinctList = billingStatementPOS.stream()
|
||||
.filter(Objects::nonNull)
|
||||
@@ -262,7 +283,6 @@ public class BillManageDomainService {
|
||||
))
|
||||
.values()
|
||||
.stream().collect(Collectors.toList());
|
||||
|
||||
if(billingStatementPOS==null || billingStatementPOS.size()==0){
|
||||
throw new ServiceException("所选流水信息未找到");
|
||||
}
|
||||
|
||||
@@ -205,4 +205,9 @@ public class BillingStatement extends BaseVOEntity{
|
||||
private String salesmanName;
|
||||
@ApiModelProperty("账单管理id")
|
||||
private Long billManageId;
|
||||
|
||||
@ApiModelProperty("收款帐户")
|
||||
private String paymentAccountId;
|
||||
@ApiModelProperty("收款帐户名称")
|
||||
private String paymentAccountName;
|
||||
}
|
||||
+4
-1
@@ -53,5 +53,8 @@ public class BillingStatementADDVO extends BaseVOEntity {
|
||||
private String invoiceItemName;
|
||||
@ApiModelProperty(value = "费用类别")
|
||||
private String feeType;
|
||||
|
||||
@ApiModelProperty("收款帐户")
|
||||
private String paymentAccountId;
|
||||
@ApiModelProperty("收款帐户名称")
|
||||
private String paymentAccountName;
|
||||
}
|
||||
+4
-1
@@ -217,5 +217,8 @@ public class BillingStatementPO extends BaseVOEntity{
|
||||
private String billingStatementIdStr;
|
||||
@ApiModelProperty("账单管理id")
|
||||
private Long billManageId;
|
||||
|
||||
@ApiModelProperty("收款帐户")
|
||||
private String paymentAccountId;
|
||||
@ApiModelProperty("收款帐户名称")
|
||||
private String paymentAccountName;
|
||||
}
|
||||
+4
@@ -235,4 +235,8 @@ public class BillingStatementDO extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty("业务员ID")
|
||||
private String salesmanName;
|
||||
@ApiModelProperty("收款帐户")
|
||||
private String paymentAccountId;
|
||||
@ApiModelProperty("收款帐户名称")
|
||||
private String paymentAccountName;
|
||||
}
|
||||
+3
@@ -414,6 +414,9 @@ public class BillingStatementDomainService {
|
||||
billingStatementDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
billingStatementDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
billingStatementDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
//收款帐户信息
|
||||
billingStatementDO.setPaymentAccountId(businessDocumentPO.getPaymentAccountId()); //收款帐户ID
|
||||
billingStatementDO.setPaymentAccountName(businessDocumentPO.getPaymentAccountName()); //收款帐户名称
|
||||
|
||||
BigDecimal billingAmount = billingStatementDO.getBillingAmount();
|
||||
Double taxRate = billingStatementDO.getTaxRate() != null ? billingStatementDO.getTaxRate() : 0.0;
|
||||
|
||||
@@ -178,4 +178,8 @@ public class BusinessDocument extends BaseVOEntity{
|
||||
private String salesmanName;
|
||||
@ApiModelProperty("税率")
|
||||
private String taxRate;
|
||||
@ApiModelProperty("收款帐户")
|
||||
private String paymentAccountId;
|
||||
@ApiModelProperty("收款帐户名称")
|
||||
private String paymentAccountName;
|
||||
}
|
||||
+6
-1
@@ -25,6 +25,11 @@ public interface IBusinessDocumentService extends IService<BusinessDocument>
|
||||
*/
|
||||
public Boolean insert(BusinessDocumentDO businessDocumentDO);
|
||||
|
||||
/**
|
||||
* 新增业务单据
|
||||
*/
|
||||
public BusinessDocument insertReturn(BusinessDocumentDO businessDocumentDO);
|
||||
|
||||
/**
|
||||
* 修改业务单据
|
||||
*/
|
||||
@@ -42,4 +47,4 @@ public interface IBusinessDocumentService extends IService<BusinessDocument>
|
||||
public BusinessDocumentPO getInfo(Long businessDocumentId);
|
||||
|
||||
BusinessDocumentPO queryByOriginalBusinessNumAndSubjectCode(String originalBusinessNum, String secondSubjectCode);
|
||||
}
|
||||
}
|
||||
+15
-1
@@ -44,6 +44,20 @@ public class BusinessDocumentImpl extends ServiceImpl<BusinessDocumentMapper, Bu
|
||||
return this.save(businessDocument);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务单据
|
||||
*/
|
||||
@Override
|
||||
public BusinessDocument insertReturn(BusinessDocumentDO businessDocumentDO) {
|
||||
BusinessDocument businessDocument = new BusinessDocument();
|
||||
BeanUtils.copyProperties(businessDocumentDO,businessDocument);
|
||||
boolean save = this.save(businessDocument);
|
||||
if (save){
|
||||
return businessDocument;
|
||||
}
|
||||
return businessDocument;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务单据
|
||||
*/
|
||||
@@ -93,4 +107,4 @@ public class BusinessDocumentImpl extends ServiceImpl<BusinessDocumentMapper, Bu
|
||||
BeanUtils.copyProperties(businessDocument,businessDocumentPO);
|
||||
return businessDocumentPO;
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
@@ -183,4 +183,8 @@ public class BusinessDocumentPO extends BaseVOEntity{
|
||||
private String salesmanName;
|
||||
@ApiModelProperty("税率")
|
||||
private String taxRate;
|
||||
@ApiModelProperty("收款帐户")
|
||||
private String paymentAccountId;
|
||||
@ApiModelProperty("收款帐户名称")
|
||||
private String paymentAccountName;
|
||||
}
|
||||
+4
@@ -203,4 +203,8 @@ public class BusinessDocumentDO extends BaseVOEntity{
|
||||
private String salesmanName;
|
||||
@ApiModelProperty("税率")
|
||||
private String taxRate;
|
||||
@ApiModelProperty("收款帐户")
|
||||
private String paymentAccountId;
|
||||
@ApiModelProperty("收款帐户名称")
|
||||
private String paymentAccountName;
|
||||
}
|
||||
+9
-1
@@ -50,6 +50,14 @@ public class BusinessDocumentDomainService {
|
||||
return businessDocumentService.insert(businessDocumentDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务单据
|
||||
*/
|
||||
public BusinessDocument insertRetrun(BusinessDocumentDO businessDocumentDO) {
|
||||
|
||||
return businessDocumentService.insertReturn(businessDocumentDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务单据
|
||||
*/
|
||||
@@ -193,4 +201,4 @@ public class BusinessDocumentDomainService {
|
||||
public Boolean saveOrUpdateBatch(List<BusinessDocument> businessDocumentList) {
|
||||
return businessDocumentService.saveOrUpdateBatch(businessDocumentList);
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -89,7 +89,8 @@ public class SettlementCustomers extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
@ApiModelProperty(name = "nc编码")
|
||||
private String ncCode;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -90,6 +90,7 @@ public class SettlementCustomersPO extends BaseVOEntity{
|
||||
private String projectName;
|
||||
|
||||
private String settlementObject;
|
||||
@ApiModelProperty(name = "nc编码")
|
||||
private String ncCode;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -102,6 +102,7 @@ public class SettlementCustomersDO extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
@ApiModelProperty(name = "nc编码")
|
||||
private String ncCode;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -272,4 +272,8 @@ public class BillManageDTO extends BaseVOEntity{
|
||||
private String receivablePushTimeStart;
|
||||
private String paymentPushTimeEnd;
|
||||
private String paymentPushTimeStart;
|
||||
@ApiModelProperty("收款帐户")
|
||||
private String paymentAccountId;
|
||||
@ApiModelProperty("收款帐户名称")
|
||||
private String paymentAccountName;
|
||||
}
|
||||
+4
@@ -244,6 +244,10 @@ public class BillingStatementDTO extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty("业务员ID")
|
||||
private String salesmanName;
|
||||
@ApiModelProperty("收款帐户")
|
||||
private String paymentAccountId;
|
||||
@ApiModelProperty("收款帐户名称")
|
||||
private String paymentAccountName;
|
||||
private List<BillingStatementADDVO> billingStatementList;
|
||||
|
||||
}
|
||||
+4
@@ -209,4 +209,8 @@ public class BusinessDocumentDTO extends BaseVOEntity{
|
||||
private String salesmanName;
|
||||
@ApiModelProperty("税率")
|
||||
private String taxRate;
|
||||
@ApiModelProperty("收款帐户")
|
||||
private String paymentAccountId;
|
||||
@ApiModelProperty("收款帐户名称")
|
||||
private String paymentAccountName;
|
||||
}
|
||||
+3
-2
@@ -101,5 +101,6 @@ public class SettlementCustomersDTO extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
}
|
||||
@ApiModelProperty(name = "nc编码")
|
||||
private String ncCode;
|
||||
}
|
||||
Reference in New Issue
Block a user