diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/BusinessDocumentDTO.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/BusinessDocumentDTO.java index 5d2c4722b..4dde2d249 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/BusinessDocumentDTO.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/BusinessDocumentDTO.java @@ -222,4 +222,11 @@ public class BusinessDocumentDTO extends BaseVOEntity{ @ApiModelProperty(value = "合单主单单号(单据类型为2 不能为空)") private String mainOrderNumber; -} + + @ApiModelProperty("结算币种") + private String settlementCurrency; + @ApiModelProperty("业务员ID") + private String salesmanId; + @ApiModelProperty("业务员名称") + private String salesmanName; +} \ No newline at end of file diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/mapper/BillManageMapper.java b/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/mapper/BillManageMapper.java index dd9602190..09bef2af1 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/mapper/BillManageMapper.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/mapper/BillManageMapper.java @@ -33,4 +33,9 @@ public interface BillManageMapper extends BaseMapper String getNcUrl(@Param("interfaceType") String interfaceType,@Param("organizationName") String organizationName,@Param("organizationId") Long organizationId); + String getCustomerUserDept(@Param("userId") String userId); + + String getDeptValue(@Param("dictCode") String dictCode); + + String getDeptName(@Param("dictCode") String dictCode); } \ No newline at end of file diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/persistence/BillManageImpl.java b/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/persistence/BillManageImpl.java index 2200f251d..53021f493 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/persistence/BillManageImpl.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/persistence/BillManageImpl.java @@ -201,6 +201,9 @@ public class BillManageImpl extends ServiceImpl im throw new ServiceException("未找到该组织的推送地址!"); } String salesmanId = reconciliation.getSalesmanId(); + String customerUserDept = billManageMapper.getCustomerUserDept(salesmanId); + String deptValue = billManageMapper.getDeptValue(customerUserDept); + String deptName = billManageMapper.getDeptName(customerUserDept); String salespersonNcCode = billManageMapper.getsalespersonNcCode(salesmanId); String salesmanCodeNc=salespersonNcCode; String appointShipper=make.getActualInvoiceCustomerName(); @@ -218,7 +221,11 @@ public class BillManageImpl extends ServiceImpl im if(item1.getInvoiceValue().compareTo(BigDecimal.ZERO)>0){ Ysitem item=new Ysitem(); item.setSo_deptid("NG0408"); - item.setPk_deptid("NG0408"); + if (deptValue != null && !deptValue.isEmpty()) { + item.setPk_deptid(deptValue); + } else { + item.setPk_deptid("NG0408"); + } //业务员nc item.setPk_psndoc(salesmanCodeNc); //客户nc @@ -236,7 +243,11 @@ public class BillManageImpl extends ServiceImpl im } String invoiceItemName = String.join(",", names); //item.setDef29(invoiceItemName); - item.setScomment("业务部:应收"+appointShipper+invoiceItemName+invoiceNumber); + if (deptName != null && !deptName.isEmpty()) { + item.setScomment(deptName+":应收"+appointShipper+invoiceItemName+invoiceNumber); + } else { + item.setScomment("业务部:应收"+appointShipper+invoiceItemName+invoiceNumber); + } // item.setPk_currtype("CNY"); item.setPk_currtype(settlementCurrencyNcCode); item.setPurchaseorder(""); @@ -454,6 +465,9 @@ public class BillManageImpl extends ServiceImpl im .filter(java.util.Objects::nonNull) .reduce(BigDecimal.ZERO, BigDecimal::add); String salesmanId = reconciliation.getSalesmanId(); + String customerUserDept = billManageMapper.getCustomerUserDept(salesmanId); + String deptValue = billManageMapper.getDeptValue(customerUserDept); + String deptName = billManageMapper.getDeptName(customerUserDept); String salespersonNcCode = billManageMapper.getsalespersonNcCode(salesmanId); String salesmanCodeNc=salespersonNcCode; String appointShipper=make.getActualInvoiceCustomerName(); @@ -465,14 +479,22 @@ public class BillManageImpl extends ServiceImpl im makerCodeNc=documentPreparerNcCode; SKitem item=new SKitem(); item.setSo_deptid("NG0408"); - item.setPk_deptid("NG0408"); + if (deptValue != null && !deptValue.isEmpty()) { + item.setPk_deptid(deptValue); + } else { + item.setPk_deptid("NG0408"); + } item.setCheckdirection("ar"); item.setPk_psndoc(salesmanCodeNc); item.setCustomer(customerCodeNc); item.setPurchaseorder(""); item.setObjtype("0"); item.setDirection("1"); - item.setScomment("业务部:"+appointShipper+"物流费"); + if (deptName != null && !deptName.isEmpty()) { + item.setScomment(deptName+":"+appointShipper+"物流费"); + } else { + item.setScomment("业务部:"+appointShipper+"物流费"); + } item.setPk_currtype(settlementCurrencyNcCode); item.setMoney_cr(String.valueOf(totalInvoiceValue)); item.setMoney_bal(String.valueOf(totalInvoiceValue)); diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/po/BillManagePO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/po/BillManagePO.java index e1dab5fd2..2b5d178e9 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/po/BillManagePO.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/po/BillManagePO.java @@ -14,6 +14,8 @@ import java.util.List; import com.mhd.common.core.web.domain.BaseVOEntity; import org.springframework.format.annotation.DateTimeFormat; +import javax.validation.constraints.NotNull; + /** * 账单管理对象 bill_manage @@ -78,6 +80,10 @@ public class BillManagePO extends BaseVOEntity{ @Excel(name = "结算对象") private String settlementEntity; + @ApiModelProperty("结算主体id") + @NotNull(message = "结算主体不能为空") + private Long settlementEntityId; + @ApiModelProperty("账单总金额") @Excel(name = "账单总金额") private BigDecimal billTotalAmount; diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/service/BillManageDomainService.java b/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/service/BillManageDomainService.java index c9d5f5356..dd7dcbb4f 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/service/BillManageDomainService.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/service/BillManageDomainService.java @@ -178,6 +178,7 @@ public class BillManageDomainService { billManage.setBillAmount(billManage.getBillTotalAmount()); billManage.setBillAmountUnsettled(billManage.getBillTotalAmount()); boolean flag = billManageService.save(billManage); + billingStatementDTO.setBillManageId(billManage.getBillManageId()); List billDetailList = new ArrayList<>(); for (BillingStatementPO billingStatementPO : billingStatementPOS) { //生成对账单详情 diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/billingStatement/entity/BillingStatement.java b/mhd_bms/src/main/java/com/mhd/bms/domain/billingStatement/entity/BillingStatement.java index ccadc2fdf..c5586e885 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/billingStatement/entity/BillingStatement.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/billingStatement/entity/BillingStatement.java @@ -203,4 +203,6 @@ public class BillingStatement extends BaseVOEntity{ @ApiModelProperty("业务员ID") private String salesmanName; + @ApiModelProperty("账单管理id") + private Long billManageId; } \ No newline at end of file diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/billingStatement/repository/po/BillingStatementPO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/billingStatement/repository/po/BillingStatementPO.java index 49b774eb3..be62797ce 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/billingStatement/repository/po/BillingStatementPO.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/billingStatement/repository/po/BillingStatementPO.java @@ -215,5 +215,7 @@ public class BillingStatementPO extends BaseVOEntity{ @ApiModelProperty(value = "费用类别") private String feeType; private String billingStatementIdStr; + @ApiModelProperty("账单管理id") + private Long billManageId; } \ No newline at end of file diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/billingStatement/service/BillingStatementDomainService.java b/mhd_bms/src/main/java/com/mhd/bms/domain/billingStatement/service/BillingStatementDomainService.java index 0e91b484b..e83666b87 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/billingStatement/service/BillingStatementDomainService.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/billingStatement/service/BillingStatementDomainService.java @@ -264,7 +264,7 @@ public class BillingStatementDomainService { updateWrapper.set(BillingStatement::getUpdateBy,loginUser.getUserPo().getUserId()); updateWrapper.set(BillingStatement::getUpdateTime,new Date()); updateWrapper.set(BillingStatement::getUpdateByName,loginUser.getUserPo().getUserName()); - + updateWrapper.set(BillingStatement::getBillManageId,billingStatementDTO.getBillManageId()); return billingStatementService.update(updateWrapper); } diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/facade/IBmsInvoiceListService.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/facade/IBmsInvoiceListService.java index 8adfc3f4e..3918d6fa6 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/facade/IBmsInvoiceListService.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/facade/IBmsInvoiceListService.java @@ -32,6 +32,8 @@ public interface IBmsInvoiceListService extends IService { BmsInvoiceListDetailsVO details(String id); + BmsInvoiceListDetailsVO detailsByApplyNumber(String id); + void invoice(BmsInvoiceListInvoiceStateDTO tmsInvoiceListInvoiceStateDTO); Integer reject(BmsInvoiceListInvoiceStateDTO tmsInvoiceListInvoiceStateDTO); diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/mapper/BmsInvoiceListMapper.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/mapper/BmsInvoiceListMapper.java index 1f0066f7f..4004d619c 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/mapper/BmsInvoiceListMapper.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/mapper/BmsInvoiceListMapper.java @@ -34,6 +34,8 @@ public interface BmsInvoiceListMapper extends BaseMapper { /* 根据id 查询 */ public BmsInvoiceListDetailsVO getById(String id); + public BmsInvoiceListDetailsVO getByApplyNumber(@Param("applyNumber") String applyNumber); + /* 根据id 查询 */ @Select("SELECT * FROM bms_invoice_list WHERE id=#{id} and is_delete = 0") BmsInvoiceList selectById(String id); diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/persistence/BmsInvoiceListServiceImpl.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/persistence/BmsInvoiceListServiceImpl.java index 1b9a4cf00..a766acff2 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/persistence/BmsInvoiceListServiceImpl.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/persistence/BmsInvoiceListServiceImpl.java @@ -308,6 +308,30 @@ public class BmsInvoiceListServiceImpl extends ServiceImpl bmsMakeOutInvoiceList=bmsMakeOutInvoiceMapper.selectList(new QueryWrapper().lambda() + .eq(BmsMakeOutInvoice::getInvoiceId,bmsInvoiceListDetailsVO.getId()) + .eq(BmsMakeOutInvoice::getIsDelete,0)); + for (BmsMakeOutInvoice bmsMakeOutInvoice : bmsMakeOutInvoiceList) { + Long makeid = bmsMakeOutInvoice.getId(); + List bmsMakeOutInvoiceItemList = bmsMakeOutInvoiceItemMapper.selectList(new QueryWrapper().lambda().eq(BmsMakeOutInvoiceItem::getMakeId, makeid)); + bmsMakeOutInvoice.setBmsMakeOutInvoiceItems(bmsMakeOutInvoiceItemList); + } + bmsInvoiceListDetailsVO.setBmsMakeOutInvoices(bmsMakeOutInvoiceList); + return bmsInvoiceListDetailsVO; + } + /** * 开票 * @@ -832,7 +856,7 @@ public class BmsInvoiceListServiceImpl extends ServiceImpl bmsMakeOutInvoices; } \ No newline at end of file diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/vo/BmsInvoiceListVO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/vo/BmsInvoiceListVO.java index f53b7be5e..7b55a68d8 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/vo/BmsInvoiceListVO.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/vo/BmsInvoiceListVO.java @@ -185,6 +185,12 @@ public class BmsInvoiceListVO implements Serializable { @ApiModelProperty(value = "一级组织ID") private Long topOrganizationId; + @ApiModelProperty(value = "账单管理编号") + private String billNumber; + + @ApiModelProperty(value = "账单管理id") + private String billManageId; + public void setTransportationIds(String transportationIds) { this.transportationIds = transportationIds; diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/businessDocument/entity/BusinessDocument.java b/mhd_bms/src/main/java/com/mhd/bms/domain/businessDocument/entity/BusinessDocument.java index 0d0d0ad90..837c51595 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/businessDocument/entity/BusinessDocument.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/businessDocument/entity/BusinessDocument.java @@ -170,4 +170,11 @@ public class BusinessDocument extends BaseVOEntity{ @ApiModelProperty("结算方式(1-现金,2-油卡)") private Integer settlementWay; -} + @ApiModelProperty("结算币种") + private String settlementCurrency; + @ApiModelProperty("业务员ID") + private String salesmanId; + @ApiModelProperty("业务员名称") + private String salesmanName; + +} \ No newline at end of file diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/businessDocument/repository/po/BusinessDocumentPO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/businessDocument/repository/po/BusinessDocumentPO.java index 078c3dfb3..33eb7ca76 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/businessDocument/repository/po/BusinessDocumentPO.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/businessDocument/repository/po/BusinessDocumentPO.java @@ -174,4 +174,11 @@ public class BusinessDocumentPO extends BaseVOEntity{ @ApiModelProperty("重算失败原因") private String recalculateCostFailRemark; -} + + @ApiModelProperty("结算币种") + private String settlementCurrency; + @ApiModelProperty("业务员ID") + private String salesmanId; + @ApiModelProperty("业务员名称") + private String salesmanName; +} \ No newline at end of file diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/businessDocument/repository/todo/BusinessDocumentDO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/businessDocument/repository/todo/BusinessDocumentDO.java index 3e8132859..06627e5ed 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/businessDocument/repository/todo/BusinessDocumentDO.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/businessDocument/repository/todo/BusinessDocumentDO.java @@ -194,4 +194,11 @@ public class BusinessDocumentDO extends BaseVOEntity{ @ApiModelProperty("结算主体id") private Long settlementEntityId; -} + + @ApiModelProperty("结算币种") + private String settlementCurrency; + @ApiModelProperty("业务员ID") + private String salesmanId; + @ApiModelProperty("业务员名称") + private String salesmanName; +} \ No newline at end of file diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/receiptManage/repository/po/ReceiptDetailPO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/receiptManage/repository/po/ReceiptDetailPO.java index ff834b098..49f60adac 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/receiptManage/repository/po/ReceiptDetailPO.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/receiptManage/repository/po/ReceiptDetailPO.java @@ -110,6 +110,13 @@ public class ReceiptDetailPO extends BaseVOEntity{ @Excel(name = "收款卡号") private String paymentCard; + //打印户名 + private String mainName; + //打印开户银行 + private String bankDeposi; + //打印账号 + private String phone; + @ApiModelProperty("交易流水") @Excel(name = "交易流水") private String transactionFlow; @@ -139,4 +146,4 @@ public class ReceiptDetailPO extends BaseVOEntity{ @ApiModelProperty("收款来源(1-人工付款,2-线上支付)") private Integer collectionSource; -} +} \ No newline at end of file diff --git a/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/billingStatement/BillingStatementDTO.java b/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/billingStatement/BillingStatementDTO.java index 7bf6860cb..f25c650cb 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/billingStatement/BillingStatementDTO.java +++ b/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/billingStatement/BillingStatementDTO.java @@ -1,5 +1,7 @@ package com.mhd.bms.interfaces.dto.billingStatement; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; import com.mhd.bms.domain.billingStatement.repository.po.BillingStatementADDVO; import com.mhd.common.core.annotation.Excel; import lombok.Data; diff --git a/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/businessDocument/BusinessDocumentDTO.java b/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/businessDocument/BusinessDocumentDTO.java index 1a625530c..9fe8bdee5 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/businessDocument/BusinessDocumentDTO.java +++ b/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/businessDocument/BusinessDocumentDTO.java @@ -200,4 +200,11 @@ public class BusinessDocumentDTO extends BaseVOEntity{ @ApiModelProperty("结算主体id") private Long settlementEntityId; -} + + @ApiModelProperty("结算币种") + private String settlementCurrency; + @ApiModelProperty("业务员ID") + private String salesmanId; + @ApiModelProperty("业务员名称") + private String salesmanName; +} \ No newline at end of file diff --git a/mhd_bms/src/main/java/com/mhd/bms/interfaces/facadeApi/BmsInvoiceListApi.java b/mhd_bms/src/main/java/com/mhd/bms/interfaces/facadeApi/BmsInvoiceListApi.java index e0c24f1fa..cb4f790b5 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/interfaces/facadeApi/BmsInvoiceListApi.java +++ b/mhd_bms/src/main/java/com/mhd/bms/interfaces/facadeApi/BmsInvoiceListApi.java @@ -136,6 +136,32 @@ public class BmsInvoiceListApi extends BaseController { } return result; } + + + /** + * 发票详情 + * + * @param id + * @return + */ + @ApiOperation(value = "销项发票表-发票详情", notes = "销项发票表-发票详情") + @GetMapping(value = "/detailsByApplyNumber") + public Result detailsByApplyNumber(@RequestParam(name="applyNumber",required=true) String applyNumber) { + Result result = new Result(); + try { + BmsInvoiceListDetailsVO bmsInvoiceListDetailsVO = bmsInvoiceListService.detailsByApplyNumber(applyNumber); + result.setResult(bmsInvoiceListDetailsVO); + result.setSuccess(true); + result.setCode(CommonConstant.SC_OK_200); + } catch (ServiceException e) { + log.error(e.getErrorMessage()); + result.error500(e.getErrorMessage()); + } catch (Exception e) { + log.error(e.getMessage(),e); + result.error500("操作失败"); + } + return result; + } /** * 编辑 * diff --git a/mhd_bms/src/main/resources/mapper/BillManageMapper.xml b/mhd_bms/src/main/resources/mapper/BillManageMapper.xml index 87586c3f0..d7664bc8e 100644 --- a/mhd_bms/src/main/resources/mapper/BillManageMapper.xml +++ b/mhd_bms/src/main/resources/mapper/BillManageMapper.xml @@ -8,70 +8,70 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - AND date_format(create_time,'%Y-%m-%d') =]]> #{billManageDO.createTimeStart} + AND date_format(a.create_time,'%Y-%m-%d') =]]> #{billManageDO.createTimeStart} - AND date_format(create_time,'%Y-%m-%d') #{billManageDO.createTimeEnd} + AND date_format(a.create_time,'%Y-%m-%d') #{billManageDO.createTimeEnd} - AND create_by_name like concat('%', #{billManageDO.createByName}, '%') + AND a.create_by_name like concat('%', #{billManageDO.createByName}, '%') - AND organization_id = #{billManageDO.organizationId} + AND a.organization_id = #{billManageDO.organizationId} - AND top_organization_id = #{billManageDO.topOrganizationId} + AND a.top_organization_id = #{billManageDO.topOrganizationId} - AND date_format(update_time,'%Y-%m-%d') =]]> #{billManageDO.updateTimeStart} + AND date_format(a.update_time,'%Y-%m-%d') =]]> #{billManageDO.updateTimeStart} - AND date_format(update_time,'%Y-%m-%d') #{billManageDO.updateTimeEnd} + AND date_format(a.update_time,'%Y-%m-%d') #{billManageDO.updateTimeEnd} - AND update_by_name like concat('%', #{billManageDO.updateByName}, '%') + AND a.update_by_name like concat('%', #{billManageDO.updateByName}, '%') - AND bill_number like concat('%', #{billManageDO.billNumber}, '%') + AND a.bill_number like concat('%', #{billManageDO.billNumber}, '%') - AND belong_module like concat('%', #{billManageDO.belongModule}, '%') + AND a.belong_module like concat('%', #{billManageDO.belongModule}, '%') - AND settlement_entity like concat('%', #{billManageDO.settlementEntity}, '%') + AND a.settlement_entity like concat('%', #{billManageDO.settlementEntity}, '%') - AND bill_state = #{billManageDO.billState} + AND a.bill_state = #{billManageDO.billState} - AND IS_INVOICE = #{billManageDO.isInvoice} + AND a.IS_INVOICE = #{billManageDO.isInvoice} - AND reconciliation_status = #{billManageDO.reconciliationStatus} + AND a.reconciliation_status = #{billManageDO.reconciliationStatus} - AND bill_type = #{billManageDO.billType} + AND a.bill_type = #{billManageDO.billType} - AND bill_state 5 + AND a.bill_state 5 - AND bill_state = 5 + AND a.bill_state = 5 - AND bill_state = 6 + AND a.bill_state = 6 - and bill_manage_id in + and a.bill_manage_id in #{id} @@ -112,4 +112,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and interface_type = #{interfaceType} limit 1 + + + + + + \ No newline at end of file diff --git a/mhd_bms/src/main/resources/mapper/BillingStatementMapper.xml b/mhd_bms/src/main/resources/mapper/BillingStatementMapper.xml index 79565368c..a476f318f 100644 --- a/mhd_bms/src/main/resources/mapper/BillingStatementMapper.xml +++ b/mhd_bms/src/main/resources/mapper/BillingStatementMapper.xml @@ -78,16 +78,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -263,4 +259,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + \ No newline at end of file diff --git a/mhd_bms/src/main/resources/mapper/BmsInvoiceListMapper.xml b/mhd_bms/src/main/resources/mapper/BmsInvoiceListMapper.xml index 531328e44..42b7770ab 100644 --- a/mhd_bms/src/main/resources/mapper/BmsInvoiceListMapper.xml +++ b/mhd_bms/src/main/resources/mapper/BmsInvoiceListMapper.xml @@ -5,7 +5,7 @@ select FROM - bms_invoice_list a + bms_invoice_list a left join BILL_MANAGE b on a.apply_number = b.apply_number where a.is_delete = 0 @@ -22,6 +22,17 @@ where a.id = #{id} and a.is_delete = 0 group by a.id + + and a.id = #{bmsInvoiceListQueryDTO.id} and instr(a.id ,#{bmsInvoiceListQueryDTO.id}) > 0 @@ -124,6 +135,9 @@ a.invoice_code, a.tracking_number, a.apply_number, + a.company_name as companyName, + b.bill_number as billNumber, + b.bill_manage_id as billManageId, a.SETTLEMENT_CURRENCY as settlementCurrency, a.organization_id AS organizationId, a.organization_name AS organizationName, diff --git a/mhd_bms/src/main/resources/mapper/ReceiptManageMapper.xml b/mhd_bms/src/main/resources/mapper/ReceiptManageMapper.xml index faf9a34ae..951e90838 100644 --- a/mhd_bms/src/main/resources/mapper/ReceiptManageMapper.xml +++ b/mhd_bms/src/main/resources/mapper/ReceiptManageMapper.xml @@ -82,6 +82,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" b.payment_method_code, b.payment_method, b.payment_card_id, + c.main_name as mainName, + c.phone, + c.bank_deposi as bankDeposi, b.payment_card, b.transaction_flow, b.receipt_number, @@ -95,8 +98,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" FROM receipt_detail a LEFT JOIN receipt_manage b ON a.receipt_manage_id = b.receipt_manage_id + left join PAYMENT_WALLET c on b.payment_card_id = c.PAYMENT_WALLET_ID WHERE a.bill_manage_id = #{billManageId} - + \ No newline at end of file diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/mapper/ReconciliationMapper.java b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/mapper/ReconciliationMapper.java index bb185391f..292f12b8f 100644 --- a/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/mapper/ReconciliationMapper.java +++ b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/mapper/ReconciliationMapper.java @@ -44,4 +44,10 @@ public interface ReconciliationMapper extends BaseMapper String getSettlementCurrencyNcCode(@Param("settlementCurrency") String settlementCurrency); String getServiceItemsCodeNc(@Param("name") String name); + + String getCustomerUserDept(@Param("userId") String userId); + + String getDeptValue(@Param("dictCode") String dictCode); + + String getDeptName(@Param("dictCode") String dictCode); } \ No newline at end of file diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/persistence/ReconciliationImpl.java b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/persistence/ReconciliationImpl.java index dd45c7304..be126cbfc 100644 --- a/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/persistence/ReconciliationImpl.java +++ b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/persistence/ReconciliationImpl.java @@ -693,6 +693,9 @@ public class ReconciliationImpl extends ServiceImpl0){ Ysitem item=new Ysitem(); item.setSo_deptid("NG0408"); - item.setPk_deptid("NG0408"); + if (deptValue != null && !deptValue.isEmpty()) { + item.setPk_deptid(deptValue); + } else { + item.setPk_deptid("NG0408"); + } //业务员nc item.setPk_psndoc(salesmanCodeNc); //客户nc @@ -722,7 +729,11 @@ public class ReconciliationImpl extends ServiceImpl SELECT SERVICE_ITEMS_CODE_NC FROM NGWL_TEST_SYSTEM."SERVICE_ITEMS_MANAGE" where DEL_FLAG = '0' and SERVICE_ITEMS_NAME = #{name} limit 1 + + + + + + + \ No newline at end of file