Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
+39
@@ -7,6 +7,7 @@ import com.mhd.bms.application.server.receiptManage.ReceiptManageApplicationServ
|
||||
import com.mhd.bms.domain.billManage.entity.BillDetail;
|
||||
import com.mhd.bms.domain.billManage.entity.BillManage;
|
||||
import com.mhd.bms.domain.billManage.repository.facade.IBillDetailService;
|
||||
import com.mhd.bms.domain.billManage.repository.facade.IBillManageService;
|
||||
import com.mhd.bms.domain.billManage.repository.mapper.BillDetailMapper;
|
||||
import com.mhd.bms.domain.billManage.repository.po.BillDetailPO;
|
||||
import com.mhd.bms.domain.billManage.repository.po.BillManagePO;
|
||||
@@ -78,6 +79,8 @@ public class BillManageApplicationService {
|
||||
private BillDetailMapper billDetailMapper;
|
||||
@Autowired
|
||||
private NcLogMapper ncLogMapper;
|
||||
@Autowired
|
||||
private IBillManageService billManageService;
|
||||
|
||||
|
||||
/**
|
||||
@@ -445,6 +448,7 @@ public class BillManageApplicationService {
|
||||
billManageDO.setReconciliationStatus(1);
|
||||
billManageDO.setCreateTime(new Date());
|
||||
billManageDO.setCreateBy(loginUser.getUserid());
|
||||
billManageDO.setSalesmanId(String.valueOf(loginUser.getUserid()));
|
||||
billManageDO.setCreateByName(loginUser.getUserPo().getUserName());
|
||||
billManageDO.setUpdateTime(new Date());
|
||||
billManageDO.setUpdateBy(loginUser.getUserid());
|
||||
@@ -466,6 +470,16 @@ public class BillManageApplicationService {
|
||||
for (BillDetailDTO billDetailDTO : billDetailDTOListNoBillingStatementId) {
|
||||
BillingStatementDTO billingStatementDTO = new BillingStatementDTO();
|
||||
BeanUtils.copyProperties(billDetailDTO, billingStatementDTO);
|
||||
|
||||
String firstSubjectCode = billDetailDTO.getFirstSubjectCode();
|
||||
Double taxRate = billDetailMapper.getTaxRate(firstSubjectCode);
|
||||
BigDecimal amount = billingStatementDTO.getBillingAmount();
|
||||
BigDecimal taxAmount = amount.divide(BigDecimal.ONE.add(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))),10, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal taxFreeFee = amount.subtract(taxAmount);
|
||||
billingStatementDTO.setTaxAmount(taxAmount);
|
||||
billingStatementDTO.setTaxFreeFee(taxFreeFee);
|
||||
billingStatementDTO.setTaxRate(taxRate);
|
||||
billingStatementDTO.setBillingAmount(amount);
|
||||
billingStatementDTO.setAccountExpenseType(billDetailDTO.getBillType());
|
||||
billingStatementDTO.setBillManageId(billManageDO.getBillManageId());
|
||||
billingStatementDTO.setBillingState(3);
|
||||
@@ -495,6 +509,31 @@ public class BillManageApplicationService {
|
||||
billingStatementApplicationService.update(billingStatementDO);
|
||||
}
|
||||
//保存账单明细
|
||||
double allTaxRate = 0.0d;
|
||||
BigDecimal allTaxAmount = BigDecimal.ZERO;
|
||||
BigDecimal allTaxFreeFee = BigDecimal.ZERO;
|
||||
for (BillDetailDTO item : billDetailDTOList) {
|
||||
String firstSubjectCode = item.getFirstSubjectCode();
|
||||
Double taxRate = billDetailMapper.getTaxRate(firstSubjectCode);
|
||||
BigDecimal amount = item.getBillingAmount();
|
||||
BigDecimal taxAmount = amount.divide(BigDecimal.ONE.add(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))),10, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal taxFreeFee = amount.subtract(taxAmount);
|
||||
item.setTaxAmount(taxAmount);
|
||||
item.setTaxFreeFee(taxFreeFee);
|
||||
item.setTaxRate(taxRate);
|
||||
allTaxRate += taxRate;
|
||||
allTaxAmount = allTaxAmount.add(taxAmount);
|
||||
allTaxFreeFee = allTaxFreeFee.add(taxFreeFee);
|
||||
}
|
||||
|
||||
BillManage billManage = billManageService.getById(billManageDO.getBillManageId());
|
||||
if (billManage != null) {
|
||||
billManage.setTaxRate(allTaxRate);
|
||||
billManage.setTaxAmount(allTaxAmount);
|
||||
billManage.setTaxFreeFee(allTaxFreeFee);
|
||||
billManage.setSalesmanId(String.valueOf(loginUser.getUserid()));
|
||||
billManageService.updateById(billManage);
|
||||
}
|
||||
Boolean flagTwo = billDetailDomainService.saveBatch(billDetailDTOList);
|
||||
//保存操作记录
|
||||
BillOperationLogDO billOperationLogDO = new BillOperationLogDO();
|
||||
|
||||
+2
@@ -585,6 +585,8 @@ public class BillingStatementApplicationService {
|
||||
此方法只进行实体返回,并不进行数据保存
|
||||
*/
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
|
||||
billingStatementDO.setAccountExpenseType(billingStatementDO.getAccountExpenseType());
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
|
||||
+2
@@ -38,4 +38,6 @@ public interface IBillDetailService extends IService<BillDetail>
|
||||
public BillDetailPO getInfo(Long billDetailId);
|
||||
|
||||
List<BillDetailPO> getDetailsByBillManageId(Long billManageId);
|
||||
|
||||
List<BillDetail> getDetailsByBillManageIdAndGroup(Long billManageId);
|
||||
}
|
||||
+5
@@ -5,6 +5,7 @@ import com.mhd.bms.domain.billManage.entity.BillDetail;
|
||||
import com.mhd.bms.domain.billManage.repository.po.BillDetailPO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -17,4 +18,8 @@ public interface BillDetailMapper extends BaseMapper<BillDetail>
|
||||
{
|
||||
|
||||
List<BillDetailPO> getDetailsByBillManageId(@Param("billManageId") Long billManageId);
|
||||
|
||||
List<BillDetail> getDetailsByBillManageIdAndGroup(@Param("billManageId") Long billManageId);
|
||||
|
||||
Double getTaxRate(@Param("code") String code);
|
||||
}
|
||||
+2
@@ -44,4 +44,6 @@ public interface BillManageMapper extends BaseMapper<BillManage>
|
||||
String getDeptName(@Param("dictCode") String dictCode);
|
||||
|
||||
String getOrgCodeNc(@Param("organizationId") Long organizationId);
|
||||
|
||||
Long getShipperId(@Param("userId") Long userId, @Param("organizationId") Long organizationId);
|
||||
}
|
||||
+5
@@ -75,4 +75,9 @@ public class BillDetailImpl extends ServiceImpl<BillDetailMapper, BillDetail> im
|
||||
public List<BillDetailPO> getDetailsByBillManageId(Long billManageId) {
|
||||
return billDetailMapper.getDetailsByBillManageId(billManageId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BillDetail> getDetailsByBillManageIdAndGroup(Long billManageId) {
|
||||
return billDetailMapper.getDetailsByBillManageIdAndGroup(billManageId);
|
||||
}
|
||||
}
|
||||
+732
-66
@@ -9,8 +9,11 @@ import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.mhd.bms.domain.billManage.entity.BillDetail;
|
||||
import com.mhd.bms.domain.billManage.entity.BillManage;
|
||||
import com.mhd.bms.domain.billManage.repository.facade.IBillDetailService;
|
||||
import com.mhd.bms.domain.billManage.repository.facade.IBillManageService;
|
||||
import com.mhd.bms.domain.billManage.repository.mapper.BillDetailMapper;
|
||||
import com.mhd.bms.domain.billManage.repository.mapper.BillManageMapper;
|
||||
import com.mhd.bms.domain.billManage.repository.po.BillManagePO;
|
||||
import com.mhd.bms.domain.billManage.repository.todo.BillManageDO;
|
||||
@@ -24,6 +27,9 @@ import com.mhd.bms.domain.ncDataPushConfig.entity.NcDataPushConfig;
|
||||
import com.mhd.bms.domain.ncDataPushConfig.repository.mapper.NcDataPushConfigMapper;
|
||||
import com.mhd.bms.domain.ncLog.entity.NcLog;
|
||||
import com.mhd.bms.domain.ncLog.repository.mapper.NcLogMapper;
|
||||
import com.mhd.bms.domain.settlementCustomers.entity.SettlementCustomers;
|
||||
import com.mhd.bms.domain.settlementCustomers.repository.facade.ISettlementCustomersService;
|
||||
import com.mhd.bms.interfaces.dto.billManage.BillDetailDTO;
|
||||
import com.mhd.bms.interfaces.dto.billManage.BillManageDTO;
|
||||
import com.mhd.common.core.domain.dto.ReconciliationDTO;
|
||||
import com.mhd.common.core.domain.dto.nc.*;
|
||||
@@ -83,6 +89,12 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
@Autowired
|
||||
private BillManageMapper billManageMapper;
|
||||
@Autowired
|
||||
private IBillDetailService billDetailService;
|
||||
@Autowired
|
||||
private IBillManageService billManageService;
|
||||
@Autowired
|
||||
private BillDetailMapper billDetailMapper;
|
||||
@Autowired
|
||||
private BmsInvoiceListMapper bmsInvoiceListMapper;
|
||||
|
||||
//nc测试环境地址
|
||||
@@ -103,6 +115,8 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
private BmsMakeOutInvoiceMapper bmsMakeOutInvoiceMapper;
|
||||
@Resource
|
||||
private BmsMakeOutInvoiceItemMapper bmsMakeOutInvoiceItemMapper;
|
||||
@Autowired
|
||||
private ISettlementCustomersService settlementCustomersService;
|
||||
/**
|
||||
* 查询账单管理列表
|
||||
*/
|
||||
@@ -177,7 +191,6 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public boolean synchronousNc_TY(String businessDocumentDetaliId) {
|
||||
BillManage reconciliation=billManageMapper.selectById(businessDocumentDetaliId);
|
||||
if(reconciliation.getSynchronousStatus()==1){
|
||||
@@ -190,11 +203,43 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
SimpleDateFormat sdf2 = new SimpleDateFormat("MM");
|
||||
String dateString = sdf.format(date);
|
||||
String invoiceId = reconciliation.getInvoiceId();
|
||||
List<BmsMakeOutInvoice> bmsMakeOutInvoices = bmsMakeOutInvoiceMapper.selectList(new LambdaQueryWrapper<BmsMakeOutInvoice>().eq(BmsMakeOutInvoice::getInvoiceId, invoiceId));
|
||||
if (bmsMakeOutInvoices != null && bmsMakeOutInvoices.size() > 0){
|
||||
int count = 0;
|
||||
for (BmsMakeOutInvoice make : bmsMakeOutInvoices) {
|
||||
count++;
|
||||
List<BillDetail> billDetails = billDetailService.getDetailsByBillManageIdAndGroup(Long.parseLong(businessDocumentDetaliId));
|
||||
|
||||
//保存税额等
|
||||
double allTaxRate = 0.0d;
|
||||
BigDecimal allTaxAmount = BigDecimal.ZERO;
|
||||
BigDecimal allTaxFreeFee = BigDecimal.ZERO;
|
||||
for (BillDetail item : billDetails) {
|
||||
String firstSubjectCode = item.getInvoiceItem();
|
||||
Double taxRate = billDetailMapper.getTaxRate(firstSubjectCode);
|
||||
BigDecimal amount = item.getBillingAmount();
|
||||
BigDecimal taxAmount = amount.divide(BigDecimal.ONE.add(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))),10, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal taxFreeFee = amount.subtract(taxAmount);
|
||||
if (item.getTaxAmount() == null) {
|
||||
item.setTaxAmount(taxAmount);
|
||||
}
|
||||
if (item.getTaxFreeFee() == null) {
|
||||
item.setTaxFreeFee(taxFreeFee);
|
||||
}
|
||||
if (item.getTaxRate() == null) {
|
||||
item.setTaxRate(taxRate);
|
||||
}
|
||||
allTaxRate += taxRate;
|
||||
allTaxAmount = allTaxAmount.add(taxAmount);
|
||||
allTaxFreeFee = allTaxFreeFee.add(taxFreeFee);
|
||||
}
|
||||
|
||||
if (reconciliation.getTaxRate() == null) {
|
||||
reconciliation.setTaxRate(allTaxRate);
|
||||
}
|
||||
if (reconciliation.getTaxAmount() == null) {
|
||||
reconciliation.setTaxAmount(allTaxAmount);
|
||||
}
|
||||
if (reconciliation.getTaxFreeFee() == null) {
|
||||
reconciliation.setTaxFreeFee(allTaxFreeFee);
|
||||
}
|
||||
|
||||
|
||||
List<Ysitem> ysitemList=new ArrayList<Ysitem>();
|
||||
String url = "";
|
||||
Long organizationId = reconciliation.getOrganizationId();
|
||||
@@ -213,8 +258,19 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
String deptName = billManageMapper.getDeptName(customerUserDept);
|
||||
String salespersonNcCode = billManageMapper.getsalespersonNcCode(salesmanId);
|
||||
String salesmanCodeNc=salespersonNcCode;
|
||||
String appointShipper=make.getActualInvoiceCustomerName();
|
||||
String actualInvoiceCustomerId = make.getActualInvoiceCustomerId();
|
||||
|
||||
Long settlementCustomersId = reconciliation.getSettlementCustomersId();
|
||||
SettlementCustomers settlementCustomers = settlementCustomersService.getById(settlementCustomersId);
|
||||
if (settlementCustomers==null){
|
||||
throw new ServiceException("结算对象未找到!");
|
||||
}
|
||||
Long settlementEntityId = settlementCustomers.getSettlementEntityId();
|
||||
Long shipperId = billManageMapper.getShipperId(settlementEntityId, organizationId);
|
||||
if (shipperId==null||shipperId==0){
|
||||
throw new ServiceException("结算对象未找到!");
|
||||
}
|
||||
String appointShipper=settlementCustomers.getSettlementEntity();
|
||||
String actualInvoiceCustomerId = String.valueOf(shipperId);
|
||||
String customerCodeNc = billManageMapper.getCustomerCodeNc(actualInvoiceCustomerId);
|
||||
String customerCodeNcJson = billManageMapper.getCustomerCodeNcJson(actualInvoiceCustomerId);
|
||||
if (customerCodeNcJson != null && !customerCodeNcJson.isEmpty()) {
|
||||
@@ -241,11 +297,10 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
String documentPreparerNcCode = billManageMapper.getDocumentPreparerNcCode(salesmanId);
|
||||
String makerCodeNc = documentPreparerNcCode;
|
||||
String settlementCurrencyNcCode = settlementCurrency;
|
||||
String invoiceNumber=make.getInvoiceNumber();
|
||||
List<BmsMakeOutInvoiceItem> bmsMakeOutInvoiceItems = bmsMakeOutInvoiceItemMapper.selectList(new LambdaQueryWrapper<BmsMakeOutInvoiceItem>().eq(BmsMakeOutInvoiceItem::getMakeId, make.getId()));
|
||||
if (bmsMakeOutInvoiceItems != null && bmsMakeOutInvoiceItems.size() > 0) {
|
||||
for (BmsMakeOutInvoiceItem item1 : bmsMakeOutInvoiceItems) {
|
||||
if(item1.getInvoiceValue().compareTo(BigDecimal.ZERO)>0){
|
||||
|
||||
if (billDetails!=null&&billDetails.size()>0){
|
||||
for (BillDetail make : billDetails) {
|
||||
if(make.getBillingAmount().compareTo(BigDecimal.ZERO)>0){
|
||||
Ysitem item=new Ysitem();
|
||||
if (deptValue != null && !deptValue.isEmpty()) {
|
||||
item.setSo_deptid(deptValue);
|
||||
@@ -263,58 +318,52 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
item.setCustomer(customerCodeNc);
|
||||
item.setObjtype("0");
|
||||
item.setDirection("1");
|
||||
String invoiceItem = item1.getInvoiceItem();
|
||||
String invoiceItem = make.getInvoiceItem();
|
||||
List<String> names = new ArrayList<>();
|
||||
List<String> nccodes = new ArrayList<>();
|
||||
if (invoiceItem != null && !invoiceItem.isEmpty()) {
|
||||
String[] items = invoiceItem.split(",");
|
||||
for (String s : items) {
|
||||
String invoiceItemName1 = billManageMapper.getInvoiceItemName(s);
|
||||
String invoiceItemNcCode1 = billManageMapper.getInvoiceItemNcCode(s);
|
||||
String invoiceItemName1 = billManageMapper.getInvoiceItemName(invoiceItem);
|
||||
String invoiceItemNcCode1 = billManageMapper.getInvoiceItemNcCode(invoiceItem);
|
||||
names.add(invoiceItemName1);
|
||||
nccodes.add(invoiceItemNcCode1);
|
||||
}
|
||||
}
|
||||
String invoiceItemName = String.join(",", names);
|
||||
String invoiceItemName = make.getInvoiceItemName();
|
||||
//item.setDef29(invoiceItemName);
|
||||
if (deptName != null && !deptName.isEmpty()) {
|
||||
item.setScomment(deptName+":应收"+appointShipper+invoiceItemName+invoiceNumber);
|
||||
item.setScomment(deptName+":应收"+appointShipper+invoiceItemName);
|
||||
} else {
|
||||
item.setScomment("业务部:应收"+appointShipper+invoiceItemName+invoiceNumber);
|
||||
item.setScomment("业务部:应收"+appointShipper+invoiceItemName);
|
||||
}
|
||||
// item.setPk_currtype("CNY");
|
||||
item.setPk_currtype(settlementCurrencyNcCode);
|
||||
item.setPurchaseorder("");
|
||||
item.setTaxrate(String.valueOf(item1.getTaxRate()));
|
||||
item.setTaxrate(String.valueOf(make.getTaxRate()));
|
||||
item.setQuantity_de("0");
|
||||
item.setMoney_de(String.valueOf(item1.getInvoiceValue()));
|
||||
item.setMoney_bal(String.valueOf(item1.getInvoiceValue()));
|
||||
BigDecimal tax_de=item1.getTaxAmount();
|
||||
BigDecimal notax_de=item1.getTaxFreeFee();
|
||||
item.setMoney_de(String.valueOf(make.getBillingAmount()));
|
||||
item.setMoney_bal(String.valueOf(make.getBillingAmount()));
|
||||
BigDecimal tax_de=make.getTaxAmount();
|
||||
BigDecimal notax_de=make.getTaxFreeFee();
|
||||
item.setNotax_de(String.valueOf(notax_de));
|
||||
item.setLocal_tax_de(String.valueOf(tax_de));
|
||||
item.setTax_de(String.valueOf(tax_de));
|
||||
item.setPrice(String.valueOf(item1.getInvoiceValue()));
|
||||
item.setTaxprice(String.valueOf(item1.getInvoiceValue()));
|
||||
item.setPrice(String.valueOf(make.getBillingAmount()));
|
||||
item.setTaxprice(String.valueOf(make.getBillingAmount()));
|
||||
//费用类别
|
||||
String feeType = item1.getFeeType();
|
||||
String feeType = make.getFeeType();
|
||||
String serviceItemsCodeNc = billManageMapper.getServiceItemsCodeNc(feeType);
|
||||
if (serviceItemsCodeNc != null && !serviceItemsCodeNc.isEmpty()) {
|
||||
item.setDef75(serviceItemsCodeNc);
|
||||
} else {
|
||||
item.setDef75("T04");
|
||||
}
|
||||
String invoiceItem1 = item1.getInvoiceItem();
|
||||
String invoiceItem1 = make.getInvoiceItem();
|
||||
if (invoiceItem1 != null && !invoiceItem1.isEmpty()) {
|
||||
String[] split = invoiceItem1.split(",");
|
||||
item.setDef29(split[0]);
|
||||
//item.setDef29(invoiceItem1);
|
||||
item.setDef29(invoiceItem1);
|
||||
}
|
||||
if (nccodes != null && !nccodes.isEmpty()&&nccodes.size()>0) {
|
||||
item.setDef29(nccodes.get(0));
|
||||
}
|
||||
item.setTaxcodeid("ZL01");
|
||||
item.setInvoiceno(invoiceNumber);
|
||||
item.setInvoiceno("");
|
||||
ysitemList.add(item);
|
||||
}
|
||||
}
|
||||
@@ -354,7 +403,7 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
billhead.setDef29(reconciliation.getBillNumber());
|
||||
billhead.setBodys(bodys);
|
||||
Ysbill bill=new Ysbill();
|
||||
bill.setId("ys"+String.valueOf(reconciliation.getBillManageId())+"_"+count);
|
||||
bill.setId("ys"+String.valueOf(reconciliation.getBillManageId())+"_"+1);
|
||||
bill.setBillhead(billhead);
|
||||
Ysufinterface ufinterface=new Ysufinterface();
|
||||
ufinterface.setAccount("NKNC");
|
||||
@@ -452,11 +501,8 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
reconciliation.setSynchronousStatus(2);
|
||||
billManageMapper.updateById(reconciliation);
|
||||
}
|
||||
|
||||
|
||||
} catch (JAXBException e) {
|
||||
reconciliation.setSynchronousStatus(2);
|
||||
billManageMapper.updateById(reconciliation);
|
||||
@@ -469,6 +515,298 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
return true;
|
||||
}
|
||||
|
||||
//按发票推送版本
|
||||
// public boolean synchronousNc_TY(String businessDocumentDetaliId) {
|
||||
// BillManage reconciliation=billManageMapper.selectById(businessDocumentDetaliId);
|
||||
// if(reconciliation.getSynchronousStatus()==1){
|
||||
// throw new ServiceException("该记录已同步,不需要再次同步");
|
||||
// }
|
||||
// try {
|
||||
// Date date = reconciliation.getCreateTime();
|
||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
// SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy");
|
||||
// SimpleDateFormat sdf2 = new SimpleDateFormat("MM");
|
||||
// String dateString = sdf.format(date);
|
||||
// String invoiceId = reconciliation.getInvoiceId();
|
||||
// List<BmsMakeOutInvoice> bmsMakeOutInvoices = bmsMakeOutInvoiceMapper.selectList(new LambdaQueryWrapper<BmsMakeOutInvoice>().eq(BmsMakeOutInvoice::getInvoiceId, invoiceId));
|
||||
// if (bmsMakeOutInvoices != null && bmsMakeOutInvoices.size() > 0){
|
||||
// int count = 0;
|
||||
// for (BmsMakeOutInvoice make : bmsMakeOutInvoices) {
|
||||
// count++;
|
||||
// List<Ysitem> ysitemList=new ArrayList<Ysitem>();
|
||||
// String url = "";
|
||||
// Long organizationId = reconciliation.getOrganizationId();
|
||||
// String organizationName = reconciliation.getOrganizationName();
|
||||
// String ncUrl = billManageMapper.getNcUrl("nc", organizationName, organizationId);
|
||||
// if (ncUrl!=null&&ncUrl!="") {
|
||||
// url = ncUrl;
|
||||
// } else {
|
||||
// reconciliation.setSynchronousStatus(2);
|
||||
// billManageMapper.updateById(reconciliation);
|
||||
// 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();
|
||||
// String actualInvoiceCustomerId = make.getActualInvoiceCustomerId();
|
||||
// String customerCodeNc = billManageMapper.getCustomerCodeNc(actualInvoiceCustomerId);
|
||||
// String customerCodeNcJson = billManageMapper.getCustomerCodeNcJson(actualInvoiceCustomerId);
|
||||
// if (customerCodeNcJson != null && !customerCodeNcJson.isEmpty()) {
|
||||
// ObjectMapper objectMapper = new ObjectMapper();
|
||||
// List<Map<String, Object>> listNc = objectMapper.readValue(
|
||||
// customerCodeNcJson,
|
||||
// new TypeReference<List<Map<String, Object>>>() {}
|
||||
// );
|
||||
// if (listNc != null && listNc.size() > 0) {
|
||||
// Map<String, Object> targetMap = listNc.stream()
|
||||
// .filter(map -> {
|
||||
// Object codeObj = map.get("code");
|
||||
// return codeObj != null && codeObj.toString().equals(reconciliation.getOrganizationId().toString());
|
||||
// })
|
||||
// .findFirst()
|
||||
// .orElse(null);
|
||||
// if (targetMap != null) {
|
||||
// customerCodeNc = (String) targetMap.get("ncCustomer");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// String settlementCurrency=reconciliation.getSettlementCurrency();
|
||||
// String orgCodeNc = billManageMapper.getOrgCodeNc(organizationId);
|
||||
// String documentPreparerNcCode = billManageMapper.getDocumentPreparerNcCode(salesmanId);
|
||||
// String makerCodeNc = documentPreparerNcCode;
|
||||
// String settlementCurrencyNcCode = settlementCurrency;
|
||||
// String invoiceNumber=make.getInvoiceNumber();
|
||||
// List<BmsMakeOutInvoiceItem> bmsMakeOutInvoiceItems = bmsMakeOutInvoiceItemMapper.selectList(new LambdaQueryWrapper<BmsMakeOutInvoiceItem>().eq(BmsMakeOutInvoiceItem::getMakeId, make.getId()));
|
||||
// if (bmsMakeOutInvoiceItems != null && bmsMakeOutInvoiceItems.size() > 0) {
|
||||
// for (BmsMakeOutInvoiceItem item1 : bmsMakeOutInvoiceItems) {
|
||||
// if(item1.getInvoiceValue().compareTo(BigDecimal.ZERO)>0){
|
||||
// Ysitem item=new Ysitem();
|
||||
// if (deptValue != null && !deptValue.isEmpty()) {
|
||||
// item.setSo_deptid(deptValue);
|
||||
// } else {
|
||||
// item.setSo_deptid("NG0408");
|
||||
// }
|
||||
// if (deptValue != null && !deptValue.isEmpty()) {
|
||||
// item.setPk_deptid(deptValue);
|
||||
// } else {
|
||||
// item.setPk_deptid("NG0408");
|
||||
// }
|
||||
// //业务员nc
|
||||
// item.setPk_psndoc(salesmanCodeNc);
|
||||
// //客户nc
|
||||
// item.setCustomer(customerCodeNc);
|
||||
// item.setObjtype("0");
|
||||
// item.setDirection("1");
|
||||
// String invoiceItem = item1.getInvoiceItem();
|
||||
// List<String> names = new ArrayList<>();
|
||||
// List<String> nccodes = new ArrayList<>();
|
||||
// if (invoiceItem != null && !invoiceItem.isEmpty()) {
|
||||
// String[] items = invoiceItem.split(",");
|
||||
// for (String s : items) {
|
||||
// String invoiceItemName1 = billManageMapper.getInvoiceItemName(s);
|
||||
// String invoiceItemNcCode1 = billManageMapper.getInvoiceItemNcCode(s);
|
||||
// names.add(invoiceItemName1);
|
||||
// nccodes.add(invoiceItemNcCode1);
|
||||
// }
|
||||
// }
|
||||
// String invoiceItemName = String.join(",", names);
|
||||
// //item.setDef29(invoiceItemName);
|
||||
// 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("");
|
||||
// item.setTaxrate(String.valueOf(item1.getTaxRate()));
|
||||
// item.setQuantity_de("0");
|
||||
// item.setMoney_de(String.valueOf(item1.getInvoiceValue()));
|
||||
// item.setMoney_bal(String.valueOf(item1.getInvoiceValue()));
|
||||
// BigDecimal tax_de=item1.getTaxAmount();
|
||||
// BigDecimal notax_de=item1.getTaxFreeFee();
|
||||
// item.setNotax_de(String.valueOf(notax_de));
|
||||
// item.setLocal_tax_de(String.valueOf(tax_de));
|
||||
// item.setTax_de(String.valueOf(tax_de));
|
||||
// item.setPrice(String.valueOf(item1.getInvoiceValue()));
|
||||
// item.setTaxprice(String.valueOf(item1.getInvoiceValue()));
|
||||
//// 费用类别
|
||||
// String feeType = item1.getFeeType();
|
||||
// String serviceItemsCodeNc = billManageMapper.getServiceItemsCodeNc(feeType);
|
||||
// if (serviceItemsCodeNc != null && !serviceItemsCodeNc.isEmpty()) {
|
||||
// item.setDef75(serviceItemsCodeNc);
|
||||
// } else {
|
||||
// item.setDef75("T04");
|
||||
// }
|
||||
// String invoiceItem1 = item1.getInvoiceItem();
|
||||
// if (invoiceItem1 != null && !invoiceItem1.isEmpty()) {
|
||||
// String[] split = invoiceItem1.split(",");
|
||||
// item.setDef29(split[0]);
|
||||
// //item.setDef29(invoiceItem1);
|
||||
// }
|
||||
// if (nccodes != null && !nccodes.isEmpty()&&nccodes.size()>0) {
|
||||
// item.setDef29(nccodes.get(0));
|
||||
// }
|
||||
// item.setTaxcodeid("ZL01");
|
||||
// item.setInvoiceno(invoiceNumber);
|
||||
// ysitemList.add(item);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// Ysbodys bodys=new Ysbodys();
|
||||
// bodys.setItem(ysitemList);
|
||||
// Ysbillhead billhead=new Ysbillhead();
|
||||
// billhead.setPk_group("CNK");
|
||||
// if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
// billhead.setPk_org(orgCodeNc);
|
||||
// billhead.setSett_org(orgCodeNc);
|
||||
// } else {
|
||||
// billhead.setPk_org("NG04");
|
||||
// billhead.setSett_org("NG04");
|
||||
// }
|
||||
// billhead.setCreationtime(dateString);
|
||||
// billhead.setCreator(makerCodeNc);
|
||||
// billhead.setPk_billtype("F0");
|
||||
// billhead.setPk_tradetype("D0");
|
||||
// billhead.setBillclass("ys");
|
||||
// billhead.setIsinit("N");
|
||||
// date=reconciliation.getCreateTime();
|
||||
// dateString = sdf.format(date);
|
||||
// billhead.setBilldate(dateString);
|
||||
// billhead.setSyscode("0");
|
||||
// billhead.setBillno("");
|
||||
// billhead.setDef59("");
|
||||
// billhead.setSrc_syscode("0");
|
||||
// billhead.setBillstatus("0");
|
||||
// billhead.setBillmaker(makerCodeNc);
|
||||
// billhead.setPk_busitype("");
|
||||
// billhead.setBillyear(sdf1.format(date));
|
||||
// billhead.setBillperiod(sdf2.format(date));
|
||||
// billhead.setEffectstatus("0");
|
||||
// billhead.setDef28("nqyw");
|
||||
// billhead.setDef29(reconciliation.getBillNumber());
|
||||
// billhead.setBodys(bodys);
|
||||
// Ysbill bill=new Ysbill();
|
||||
// bill.setId("ys"+String.valueOf(reconciliation.getBillManageId())+"_"+count);
|
||||
// bill.setBillhead(billhead);
|
||||
// Ysufinterface ufinterface=new Ysufinterface();
|
||||
// ufinterface.setAccount("NKNC");
|
||||
// ufinterface.setBilltype("F0");
|
||||
// ufinterface.setBusinessunitcode("");
|
||||
// ufinterface.setFilename("");
|
||||
// ufinterface.setIsexchange("Y");
|
||||
// if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
// ufinterface.setOrgcode(orgCodeNc);
|
||||
// ufinterface.setReceiver(orgCodeNc);
|
||||
// } else {
|
||||
// ufinterface.setOrgcode("NG04");
|
||||
// ufinterface.setReceiver("NG04");
|
||||
// }
|
||||
// ufinterface.setReplace("Y");
|
||||
// ufinterface.setRoottag("");
|
||||
// ufinterface.setSender("nqyw");
|
||||
// ufinterface.setBill(bill);
|
||||
// JAXBContext jaxbContext = JAXBContext.newInstance(Ysufinterface.class);
|
||||
// Marshaller marshaller = jaxbContext.createMarshaller();
|
||||
// marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
|
||||
// marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // 格式化输出,可选
|
||||
// StringWriter sw = new StringWriter();
|
||||
// marshaller.marshal(ufinterface, sw);
|
||||
// String xmlString = sw.toString(); // 这是要发送的XML字符串
|
||||
// System.out.println(xmlString);
|
||||
// NcLog ncLog=new NcLog();
|
||||
// ncLog.setOrderId(reconciliation.getBillManageId());
|
||||
// ncLog.setRequestBody(xmlString);
|
||||
// ncLog.setResponeBody("");
|
||||
// ncLog.setType(0L);
|
||||
// ncLog.setSendTime(new Date());
|
||||
// ncLog.setOrganizationId(reconciliation.getOrganizationId());
|
||||
// ncLog.setOrganizationName(reconciliation.getOrganizationName());
|
||||
// ncLog.setTopOrganizationId(reconciliation.getTopOrganizationId());
|
||||
// ncLogMapper.insert(ncLog);
|
||||
// reconciliation.setSynchronousStatus(1);
|
||||
// reconciliation.setSynchronousTime(new Date());
|
||||
// reconciliation.setNcId("ys"+String.valueOf(reconciliation.getBillManageId()));
|
||||
// //reconciliationMapper.updateById(reconciliation);
|
||||
// CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
// HttpPost httpPost = new HttpPost(url);
|
||||
// StringEntity postingString = new StringEntity(xmlString, "UTF-8");
|
||||
// httpPost.setEntity(postingString);
|
||||
// httpPost.setHeader("Content-type", "application/xml");
|
||||
// try {
|
||||
// CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
// String responseString = EntityUtils.toString(response.getEntity());
|
||||
// System.out.println(responseString);
|
||||
// ncLog.setResponeBody(responseString);
|
||||
// // 创建DOM解析器
|
||||
// DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
// DocumentBuilder builder = factory.newDocumentBuilder();
|
||||
// Document document = builder.parse(new InputSource(new StringReader(responseString)));
|
||||
//
|
||||
// // 获取根元素
|
||||
// Element root = document.getDocumentElement();
|
||||
//
|
||||
// // 获取ufinterface元素的属性
|
||||
// String billtype = root.getAttribute("billtype");
|
||||
// String filename = root.getAttribute("filename");
|
||||
// System.out.println("billtype: " + billtype);
|
||||
// System.out.println("filename: " + filename);
|
||||
//
|
||||
// // 获取sendresult节点
|
||||
// NodeList sendResultList = root.getElementsByTagName("sendresult");
|
||||
// if (sendResultList.getLength() > 0) {
|
||||
// Element sendResult = (Element) sendResultList.item(0);
|
||||
//
|
||||
// // 获取子元素内容
|
||||
// String bdocid = sendResult.getElementsByTagName("bdocid").item(0).getTextContent();
|
||||
// String resultcode = sendResult.getElementsByTagName("resultcode").item(0).getTextContent();
|
||||
// String content = sendResult.getElementsByTagName("content").item(0).getTextContent();
|
||||
//
|
||||
// System.out.println("bdocid: " + bdocid);
|
||||
// System.out.println("resultcode: " + resultcode);
|
||||
// System.out.println("content: " + content);
|
||||
// if(resultcode.equals("1")){
|
||||
// reconciliation.setSynchronousStatus(1);
|
||||
// }else{
|
||||
// reconciliation.setSynchronousStatus(2);
|
||||
// }
|
||||
// }
|
||||
// ncLogMapper.updateById(ncLog);
|
||||
// billManageMapper.updateById(reconciliation);
|
||||
// response.close();
|
||||
// } catch (Exception e) {
|
||||
// reconciliation.setSynchronousStatus(2);
|
||||
// billManageMapper.updateById(reconciliation);
|
||||
// e.printStackTrace();
|
||||
// } finally {
|
||||
// try {
|
||||
// httpClient.close();
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// reconciliation.setSynchronousStatus(2);
|
||||
// billManageMapper.updateById(reconciliation);
|
||||
// }
|
||||
// } catch (JAXBException e) {
|
||||
// reconciliation.setSynchronousStatus(2);
|
||||
// billManageMapper.updateById(reconciliation);
|
||||
// e.printStackTrace();
|
||||
// } catch (JsonMappingException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// } catch (JsonProcessingException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public boolean synchronousNcSK(String businessDocumentDetaliIds) {
|
||||
String [] businessDocumentDetaliIdArray=businessDocumentDetaliIds.split(",");
|
||||
@@ -500,14 +838,45 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy");
|
||||
SimpleDateFormat sdf2 = new SimpleDateFormat("MM");
|
||||
String dateString = sdf.format(date);
|
||||
String invoiceId = reconciliation.getInvoiceId();
|
||||
ReconciliationDTO makeQuery=new ReconciliationDTO();
|
||||
makeQuery.setInnerNumber(invoiceId);
|
||||
List<BmsMakeOutInvoice> bmsMakeOutInvoices = bmsMakeOutInvoiceMapper.selectList(new LambdaQueryWrapper<BmsMakeOutInvoice>().eq(BmsMakeOutInvoice::getInvoiceId, invoiceId));
|
||||
if (bmsMakeOutInvoices != null && bmsMakeOutInvoices.size() > 0) {
|
||||
int count= 0;
|
||||
for (BmsMakeOutInvoice make : bmsMakeOutInvoices) {
|
||||
count++;
|
||||
List<BillDetail> billDetails = billDetailService.list(new LambdaQueryWrapper<BillDetail>()
|
||||
.eq(BillDetail::getBillManageId, reconciliation.getBillManageId())
|
||||
.eq(BillDetail::getDelFlag, 1));
|
||||
|
||||
|
||||
//保存税额等
|
||||
double allTaxRate = 0.0d;
|
||||
BigDecimal allTaxAmount = BigDecimal.ZERO;
|
||||
BigDecimal allTaxFreeFee = BigDecimal.ZERO;
|
||||
for (BillDetail item : billDetails) {
|
||||
String firstSubjectCode = item.getInvoiceItem();
|
||||
Double taxRate = billDetailMapper.getTaxRate(firstSubjectCode);
|
||||
BigDecimal amount = item.getBillingAmount();
|
||||
BigDecimal taxAmount = amount.divide(BigDecimal.ONE.add(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))),10, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal taxFreeFee = amount.subtract(taxAmount);
|
||||
if (item.getTaxAmount() == null) {
|
||||
item.setTaxAmount(taxAmount);
|
||||
}
|
||||
if (item.getTaxFreeFee() == null) {
|
||||
item.setTaxFreeFee(taxFreeFee);
|
||||
}
|
||||
if (item.getTaxRate() == null) {
|
||||
item.setTaxRate(taxRate);
|
||||
}
|
||||
allTaxRate += taxRate;
|
||||
allTaxAmount = allTaxAmount.add(taxAmount);
|
||||
allTaxFreeFee = allTaxFreeFee.add(taxFreeFee);
|
||||
}
|
||||
|
||||
if (reconciliation.getTaxRate() == null) {
|
||||
reconciliation.setTaxRate(allTaxRate);
|
||||
}
|
||||
if (reconciliation.getTaxAmount() == null) {
|
||||
reconciliation.setTaxAmount(allTaxAmount);
|
||||
}
|
||||
if (reconciliation.getTaxFreeFee() == null) {
|
||||
reconciliation.setTaxFreeFee(allTaxFreeFee);
|
||||
}
|
||||
|
||||
List<SKitem> ysitemList=new ArrayList<SKitem>();
|
||||
ReconciliationDTO reconciliationDTO=new ReconciliationDTO();
|
||||
reconciliationDTO.setInnerNumber(reconciliation.getBillNumber());
|
||||
@@ -523,24 +892,23 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
billManageMapper.updateById(reconciliation);
|
||||
throw new ServiceException("未找到该组织的推送地址!");
|
||||
}
|
||||
List<BmsMakeOutInvoiceItem> bmsMakeOutInvoiceItems = bmsMakeOutInvoiceItemMapper.selectList(new LambdaQueryWrapper<BmsMakeOutInvoiceItem>().eq(BmsMakeOutInvoiceItem::getMakeId, make.getId()));
|
||||
String makerCodeNc = "";
|
||||
if(bmsMakeOutInvoiceItems != null && bmsMakeOutInvoiceItems.size() > 0){
|
||||
if(ObjectUtil.isNotNull(bmsMakeOutInvoiceItems)){
|
||||
if(billDetails != null && billDetails.size() > 0){
|
||||
if(ObjectUtil.isNotNull(billDetails)){
|
||||
// 汇总 list 中 invoiceValue 的总值
|
||||
BigDecimal totalInvoiceValue = bmsMakeOutInvoiceItems.stream()
|
||||
.map(BmsMakeOutInvoiceItem::getInvoiceValue)
|
||||
BigDecimal totalInvoiceValue = billDetails.stream()
|
||||
.map(BillDetail::getBillingAmount)
|
||||
.filter(java.util.Objects::nonNull)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
|
||||
// 将 feeType 用、拼接起来
|
||||
String feeTypes = bmsMakeOutInvoiceItems.stream()
|
||||
.map(BmsMakeOutInvoiceItem::getFeeType)
|
||||
String feeTypes = billDetails.stream()
|
||||
.map(BillDetail::getInvoiceItemName)
|
||||
.filter(java.util.Objects::nonNull)
|
||||
.collect(java.util.stream.Collectors.joining("、"));
|
||||
|
||||
// 按 createTime 倒序排序并获取第一条记录
|
||||
BmsMakeOutInvoiceItem firstItem = bmsMakeOutInvoiceItems.stream()
|
||||
BillDetail firstItem = billDetails.stream()
|
||||
.sorted((a, b) -> {
|
||||
if (a.getCreateTime() == null) return 1;
|
||||
if (b.getCreateTime() == null) return -1;
|
||||
@@ -554,8 +922,18 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
String deptName = billManageMapper.getDeptName(customerUserDept);
|
||||
String salespersonNcCode = billManageMapper.getsalespersonNcCode(salesmanId);
|
||||
String salesmanCodeNc=salespersonNcCode;
|
||||
String appointShipper=make.getActualInvoiceCustomerName();
|
||||
String actualInvoiceCustomerId = make.getActualInvoiceCustomerId();
|
||||
Long settlementCustomersId = reconciliation.getSettlementCustomersId();
|
||||
SettlementCustomers settlementCustomers = settlementCustomersService.getById(settlementCustomersId);
|
||||
if (settlementCustomers==null){
|
||||
throw new ServiceException("结算对象未找到!");
|
||||
}
|
||||
Long settlementEntityId = settlementCustomers.getSettlementEntityId();
|
||||
Long shipperId = billManageMapper.getShipperId(settlementEntityId, organizationId);
|
||||
if (shipperId==null||shipperId==0){
|
||||
throw new ServiceException("结算对象未找到!");
|
||||
}
|
||||
String appointShipper=settlementCustomers.getSettlementEntity();
|
||||
String actualInvoiceCustomerId = String.valueOf(shipperId);
|
||||
String customerCodeNc = billManageMapper.getCustomerCodeNc(actualInvoiceCustomerId);
|
||||
String customerCodeNcJson = billManageMapper.getCustomerCodeNcJson(actualInvoiceCustomerId);
|
||||
if (customerCodeNcJson != null && !customerCodeNcJson.isEmpty()) {
|
||||
@@ -661,7 +1039,7 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
billhead.setDef29(reconciliation.getBillNumber());
|
||||
billhead.setBodys(bodys);
|
||||
SKbill bill=new SKbill();
|
||||
bill.setId("sk"+String.valueOf(reconciliation.getBillManageId())+"_"+count);
|
||||
bill.setId("sk"+String.valueOf(reconciliation.getBillManageId())+"_"+1);
|
||||
bill.setBillhead(billhead);
|
||||
SKufinterface ufinterface=new SKufinterface();
|
||||
ufinterface.setAccount("NKNC");
|
||||
@@ -762,11 +1140,8 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
reconciliation.setSkSynchronousStatus(2);
|
||||
billManageMapper.updateById(reconciliation);
|
||||
}
|
||||
|
||||
|
||||
} catch (JAXBException e) {
|
||||
reconciliation.setSkSynchronousStatus(2);
|
||||
billManageMapper.updateById(reconciliation);
|
||||
@@ -779,6 +1154,297 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
return true;
|
||||
}
|
||||
|
||||
//按发票推送版本
|
||||
// public boolean synchronousNcSK_TY(String businessDocumentDetaliId) {
|
||||
// BillManage reconciliation=billManageMapper.selectById(businessDocumentDetaliId);
|
||||
// if(reconciliation.getSkSynchronousStatus()==1){
|
||||
// throw new ServiceException("该记录已同步,不需要再次同步");
|
||||
// }
|
||||
// try {
|
||||
// Date date = reconciliation.getCreateTime();
|
||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
// SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy");
|
||||
// SimpleDateFormat sdf2 = new SimpleDateFormat("MM");
|
||||
// String dateString = sdf.format(date);
|
||||
// String invoiceId = reconciliation.getInvoiceId();
|
||||
// ReconciliationDTO makeQuery=new ReconciliationDTO();
|
||||
// makeQuery.setInnerNumber(invoiceId);
|
||||
// List<BmsMakeOutInvoice> bmsMakeOutInvoices = bmsMakeOutInvoiceMapper.selectList(new LambdaQueryWrapper<BmsMakeOutInvoice>().eq(BmsMakeOutInvoice::getInvoiceId, invoiceId));
|
||||
// if (bmsMakeOutInvoices != null && bmsMakeOutInvoices.size() > 0) {
|
||||
// int count= 0;
|
||||
// for (BmsMakeOutInvoice make : bmsMakeOutInvoices) {
|
||||
// count++;
|
||||
// List<SKitem> ysitemList=new ArrayList<SKitem>();
|
||||
// ReconciliationDTO reconciliationDTO=new ReconciliationDTO();
|
||||
// reconciliationDTO.setInnerNumber(reconciliation.getBillNumber());
|
||||
// String url = "";
|
||||
// Long organizationId = reconciliation.getOrganizationId();
|
||||
// String orgCodeNc = billManageMapper.getOrgCodeNc(organizationId);
|
||||
// String organizationName = reconciliation.getOrganizationName();
|
||||
// String ncUrl = billManageMapper.getNcUrl("nc", organizationName, organizationId);
|
||||
// if (ncUrl!=null&&ncUrl!="") {
|
||||
// url = ncUrl;
|
||||
// } else {
|
||||
// reconciliation.setSkSynchronousStatus(2);
|
||||
// billManageMapper.updateById(reconciliation);
|
||||
// throw new ServiceException("未找到该组织的推送地址!");
|
||||
// }
|
||||
// List<BmsMakeOutInvoiceItem> bmsMakeOutInvoiceItems = bmsMakeOutInvoiceItemMapper.selectList(new LambdaQueryWrapper<BmsMakeOutInvoiceItem>().eq(BmsMakeOutInvoiceItem::getMakeId, make.getId()));
|
||||
// String makerCodeNc = "";
|
||||
// if(bmsMakeOutInvoiceItems != null && bmsMakeOutInvoiceItems.size() > 0){
|
||||
// if(ObjectUtil.isNotNull(bmsMakeOutInvoiceItems)){
|
||||
// // 汇总 list 中 invoiceValue 的总值
|
||||
// BigDecimal totalInvoiceValue = bmsMakeOutInvoiceItems.stream()
|
||||
// .map(BmsMakeOutInvoiceItem::getInvoiceValue)
|
||||
// .filter(java.util.Objects::nonNull)
|
||||
// .reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
//
|
||||
// // 将 feeType 用、拼接起来
|
||||
// String feeTypes = bmsMakeOutInvoiceItems.stream()
|
||||
// .map(BmsMakeOutInvoiceItem::getFeeType)
|
||||
// .filter(java.util.Objects::nonNull)
|
||||
// .collect(java.util.stream.Collectors.joining("、"));
|
||||
//
|
||||
// // 按 createTime 倒序排序并获取第一条记录
|
||||
// BmsMakeOutInvoiceItem firstItem = bmsMakeOutInvoiceItems.stream()
|
||||
// .sorted((a, b) -> {
|
||||
// if (a.getCreateTime() == null) return 1;
|
||||
// if (b.getCreateTime() == null) return -1;
|
||||
// return b.getCreateTime().compareTo(a.getCreateTime());
|
||||
// })
|
||||
// .findFirst()
|
||||
// .orElse(null);
|
||||
// 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();
|
||||
// String actualInvoiceCustomerId = make.getActualInvoiceCustomerId();
|
||||
// String customerCodeNc = billManageMapper.getCustomerCodeNc(actualInvoiceCustomerId);
|
||||
// String customerCodeNcJson = billManageMapper.getCustomerCodeNcJson(actualInvoiceCustomerId);
|
||||
// if (customerCodeNcJson != null && !customerCodeNcJson.isEmpty()) {
|
||||
// ObjectMapper objectMapper = new ObjectMapper();
|
||||
// List<Map<String, Object>> listNc = objectMapper.readValue(
|
||||
// customerCodeNcJson,
|
||||
// new TypeReference<List<Map<String, Object>>>() {}
|
||||
// );
|
||||
// if (listNc != null && listNc.size() > 0) {
|
||||
// Map<String, Object> targetMap = listNc.stream()
|
||||
// .filter(map -> {
|
||||
// Object codeObj = map.get("code");
|
||||
// return codeObj != null && codeObj.toString().equals(reconciliation.getOrganizationId().toString());
|
||||
// })
|
||||
// .findFirst()
|
||||
// .orElse(null);
|
||||
// if (targetMap != null) {
|
||||
// customerCodeNc = (String) targetMap.get("ncCustomer");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// String documentPreparerNcCode = billManageMapper.getDocumentPreparerNcCode(salesmanId);
|
||||
// String settlementCurrency=reconciliation.getSettlementCurrency();
|
||||
// String settlementCurrencyNcCode = settlementCurrency;
|
||||
// makerCodeNc=documentPreparerNcCode;
|
||||
// SKitem item=new SKitem();
|
||||
// if (deptValue != null && !deptValue.isEmpty()) {
|
||||
// item.setSo_deptid(deptValue);
|
||||
// } else {
|
||||
// item.setSo_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");
|
||||
// if (deptName != null && !deptName.isEmpty()) {
|
||||
// if (feeTypes != null && !feeTypes.isEmpty()) {
|
||||
// item.setScomment(deptName+":"+appointShipper+feeTypes);
|
||||
// } else {
|
||||
// item.setScomment(deptName+":"+appointShipper+feeTypes);
|
||||
// }
|
||||
// } else {
|
||||
// if (feeTypes != null && !feeTypes.isEmpty()) {
|
||||
// item.setScomment("业务部:"+appointShipper+feeTypes);
|
||||
// } else {
|
||||
// item.setScomment("业务部:"+appointShipper+feeTypes);
|
||||
// }
|
||||
// }
|
||||
// // 费用类别
|
||||
// String feeType = firstItem.getFeeType();
|
||||
// String serviceItemsCodeNc = billManageMapper.getServiceItemsCodeNc(feeType);
|
||||
// if (serviceItemsCodeNc != null && !serviceItemsCodeNc.isEmpty()) {
|
||||
// item.setDef75(serviceItemsCodeNc);
|
||||
// } else {
|
||||
// item.setDef75("T10");
|
||||
// }
|
||||
// String invoiceItem1 = firstItem.getInvoiceItem();
|
||||
// if (invoiceItem1 != null && !invoiceItem1.isEmpty()) {
|
||||
// String[] split = invoiceItem1.split(",");
|
||||
// item.setDef29(split[0]);
|
||||
// }
|
||||
// item.setPk_currtype(settlementCurrencyNcCode);
|
||||
// item.setMoney_cr(String.valueOf(totalInvoiceValue));
|
||||
// item.setMoney_bal(String.valueOf(totalInvoiceValue));
|
||||
// ysitemList.add(item);
|
||||
// }
|
||||
// }
|
||||
// SKbodys bodys=new SKbodys();
|
||||
// bodys.setItem(ysitemList);
|
||||
// SKbillhead billhead=new SKbillhead();
|
||||
// billhead.setPk_group("CNK");
|
||||
// if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
// billhead.setPk_org(orgCodeNc);
|
||||
// billhead.setSett_org(orgCodeNc);
|
||||
// } else {
|
||||
// billhead.setPk_org("NG04");
|
||||
// billhead.setSett_org("NG04");
|
||||
// }
|
||||
// billhead.setCreationtime(dateString);
|
||||
// billhead.setPk_billtype("F2");
|
||||
// billhead.setCreator(makerCodeNc);
|
||||
// billhead.setPk_tradetype("D2");
|
||||
// billhead.setBillclass("sk");
|
||||
// billhead.setBilldate(dateString);
|
||||
// billhead.setSyscode("0");
|
||||
// billhead.setBillno("");
|
||||
// billhead.setDef59("");
|
||||
// billhead.setSrc_syscode("0");
|
||||
// billhead.setBillstatus("0");
|
||||
// billhead.setBillmaker(makerCodeNc);
|
||||
// billhead.setPk_busitype("");
|
||||
// billhead.setBillyear(sdf1.format(date));
|
||||
// billhead.setBillperiod(sdf2.format(date));
|
||||
// billhead.setEffectstatus("0");
|
||||
// billhead.setDef28("nqyw");
|
||||
// billhead.setDef29(reconciliation.getBillNumber());
|
||||
// billhead.setBodys(bodys);
|
||||
// SKbill bill=new SKbill();
|
||||
// bill.setId("sk"+String.valueOf(reconciliation.getBillManageId())+"_"+count);
|
||||
// bill.setBillhead(billhead);
|
||||
// SKufinterface ufinterface=new SKufinterface();
|
||||
// ufinterface.setAccount("NKNC");
|
||||
// ufinterface.setBilltype("F2");
|
||||
// ufinterface.setBusinessunitcode("");
|
||||
// ufinterface.setFilename("");
|
||||
// ufinterface.setIsexchange("Y");
|
||||
// if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
// ufinterface.setOrgcode(orgCodeNc);
|
||||
// ufinterface.setReceiver(orgCodeNc);
|
||||
// } else {
|
||||
// ufinterface.setOrgcode("NG04");
|
||||
// ufinterface.setReceiver("NG04");
|
||||
// }
|
||||
// ufinterface.setReplace("Y");
|
||||
// ufinterface.setRoottag("");
|
||||
// ufinterface.setSender("nqyw");
|
||||
// ufinterface.setBill(bill);
|
||||
// JAXBContext jaxbContext = null;
|
||||
// //String xmlString ="<ufinterface account=\"NKNC\" billtype=\"F0\" businessunitcode=\"\" filename=\"\" groupcode=\"CNK\" isexchange=\"Y\" orgcode=\"NG10\" receiver=\"NG10\" replace=\"Y\" roottag=\"\" sender=\"NKT_MY\">";
|
||||
// jaxbContext = JAXBContext.newInstance(SKufinterface.class);
|
||||
// Marshaller marshaller = jaxbContext.createMarshaller();
|
||||
// marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
|
||||
// marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // 格式化输出,可选
|
||||
// StringWriter sw = new StringWriter();
|
||||
// marshaller.marshal(ufinterface, sw);
|
||||
// String xmlString = sw.toString(); // 这是要发送的XML字符串
|
||||
// System.out.println(xmlString);
|
||||
// NcLog ncLog=new NcLog();
|
||||
// ncLog.setOrderId(reconciliation.getBillManageId());
|
||||
// ncLog.setRequestBody(xmlString);
|
||||
// ncLog.setResponeBody("");
|
||||
// ncLog.setType(1L);
|
||||
// ncLog.setSendTime(new Date());
|
||||
// ncLog.setOrganizationId(reconciliation.getOrganizationId());
|
||||
// ncLog.setOrganizationName(reconciliation.getOrganizationName());
|
||||
// ncLog.setTopOrganizationId(reconciliation.getTopOrganizationId());
|
||||
// ncLogMapper.insert(ncLog);
|
||||
// reconciliation.setSkSynchronousStatus(1);
|
||||
// reconciliation.setSkSynchronousTime(new Date());
|
||||
// reconciliation.setSkNcId("sk"+String.valueOf(reconciliation.getBillManageId()));
|
||||
// //reconciliationMapper.updateById(reconciliation);
|
||||
// CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
// HttpPost httpPost = new HttpPost(url);
|
||||
// StringEntity postingString = new StringEntity(xmlString, "UTF-8");
|
||||
// httpPost.setEntity(postingString);
|
||||
// httpPost.setHeader("Content-type", "application/xml");
|
||||
// try {
|
||||
// CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
// String responseString = EntityUtils.toString(response.getEntity());
|
||||
// System.out.println(responseString);
|
||||
// ncLog.setResponeBody(responseString);
|
||||
// // 创建DOM解析器
|
||||
// DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
// DocumentBuilder builder = factory.newDocumentBuilder();
|
||||
// Document document = builder.parse(new InputSource(new StringReader(responseString)));
|
||||
//
|
||||
// // 获取根元素
|
||||
// Element root = document.getDocumentElement();
|
||||
//
|
||||
// // 获取ufinterface元素的属性
|
||||
// String billtype = root.getAttribute("billtype");
|
||||
// String filename = root.getAttribute("filename");
|
||||
// System.out.println("billtype: " + billtype);
|
||||
// System.out.println("filename: " + filename);
|
||||
//
|
||||
// // 获取sendresult节点
|
||||
// NodeList sendResultList = root.getElementsByTagName("sendresult");
|
||||
// if (sendResultList.getLength() > 0) {
|
||||
// Element sendResult = (Element) sendResultList.item(0);
|
||||
//
|
||||
// // 获取子元素内容
|
||||
// String bdocid = sendResult.getElementsByTagName("bdocid").item(0).getTextContent();
|
||||
// String resultcode = sendResult.getElementsByTagName("resultcode").item(0).getTextContent();
|
||||
// String content = sendResult.getElementsByTagName("content").item(0).getTextContent();
|
||||
//
|
||||
// System.out.println("bdocid: " + bdocid);
|
||||
// System.out.println("resultcode: " + resultcode);
|
||||
// System.out.println("content: " + content);
|
||||
// if(resultcode.equals("1")){
|
||||
// reconciliation.setSkSynchronousStatus(1);
|
||||
// }else{
|
||||
// reconciliation.setSkSynchronousStatus(2);
|
||||
// }
|
||||
// }
|
||||
// ncLogMapper.updateById(ncLog);
|
||||
// billManageMapper.updateById(reconciliation);
|
||||
// response.close();
|
||||
// } catch (Exception e) {
|
||||
// reconciliation.setSkSynchronousStatus(2);
|
||||
// billManageMapper.updateById(reconciliation);
|
||||
// e.printStackTrace();
|
||||
// } finally {
|
||||
// try {
|
||||
// httpClient.close();
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// } else {
|
||||
// reconciliation.setSkSynchronousStatus(2);
|
||||
// billManageMapper.updateById(reconciliation);
|
||||
// }
|
||||
// } catch (JAXBException e) {
|
||||
// reconciliation.setSkSynchronousStatus(2);
|
||||
// billManageMapper.updateById(reconciliation);
|
||||
// e.printStackTrace();
|
||||
// } catch (JsonMappingException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// } catch (JsonProcessingException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
public int editIsInvoice(String billNumber, Integer isInvoice, String invoiceId, String invoiceMakeTime,String applyNumber) {
|
||||
|
||||
@@ -264,4 +264,6 @@ public class BillManageDO extends BaseVOEntity{
|
||||
private String paymentAccountId;
|
||||
@ApiModelProperty("收款帐户名称")
|
||||
private String paymentAccountName;
|
||||
@ApiModelProperty("业务员ID")
|
||||
private String salesmanId;
|
||||
}
|
||||
+4
@@ -100,6 +100,10 @@ public class BillingStatementPO extends BaseVOEntity{
|
||||
@Excel(name = "收支类型", readConverterExp = "1=-应收,2-应付")
|
||||
private Integer accountExpenseType;
|
||||
|
||||
@ApiModelProperty("收支类型(1-应收,2-应付)")
|
||||
@Excel(name = "收支类型", readConverterExp = "1=-应收,2-应付")
|
||||
private Integer billType;
|
||||
|
||||
@ApiModelProperty("流水备注")
|
||||
@Excel(name = "流水备注")
|
||||
private String billingRemark;
|
||||
|
||||
+4
@@ -101,6 +101,10 @@ public class BillingStatementDO extends BaseVOEntity{
|
||||
@Excel(name = "收支类型", readConverterExp = "1=-应收,2-应付")
|
||||
private Integer accountExpenseType;
|
||||
|
||||
@ApiModelProperty("收支类型(1-应收,2-应付)")
|
||||
@Excel(name = "收支类型", readConverterExp = "1=-应收,2-应付")
|
||||
private Integer billType;
|
||||
|
||||
@ApiModelProperty("流水备注")
|
||||
@Excel(name = "流水备注")
|
||||
private String billingRemark;
|
||||
|
||||
+4
@@ -102,6 +102,10 @@ public class BillingStatementDTO extends BaseVOEntity{
|
||||
@Excel(name = "收支类型", readConverterExp = "1=-应收,2-应付")
|
||||
private Integer accountExpenseType;
|
||||
|
||||
@ApiModelProperty("收支类型(1-应收,2-应付)")
|
||||
@Excel(name = "收支类型", readConverterExp = "1=-应收,2-应付")
|
||||
private Integer billType;
|
||||
|
||||
@ApiModelProperty("流水备注")
|
||||
@Excel(name = "流水备注")
|
||||
private String billingRemark;
|
||||
|
||||
@@ -18,15 +18,15 @@ spring:
|
||||
discovery:
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
# server-addr: 10.33.0.129:6010
|
||||
server-addr: 10.102.192.30:6848
|
||||
server-addr: 10.33.0.129:6010
|
||||
# server-addr: 10.102.192.31:6848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
config:
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
# server-addr: 10.33.0.129:6010
|
||||
server-addr: 10.102.192.30:6848
|
||||
server-addr: 10.33.0.129:6010
|
||||
# server-addr: 10.102.192.31:6848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
||||
|
||||
@@ -27,5 +27,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND bd.bill_manage_id = #{billManageId}
|
||||
</select>
|
||||
|
||||
<select id="getDetailsByBillManageIdAndGroup" resultType="com.mhd.bms.domain.billManage.entity.BillDetail" parameterType="java.lang.Long">
|
||||
SELECT
|
||||
SUM(BILLING_AMOUNT) as BILLING_AMOUNT,
|
||||
SUM(TAX_AMOUNT) as TAX_AMOUNT,
|
||||
SUM(TAX_FREE_FEE) as TAX_FREE_FEE,
|
||||
AVG(TAX_RATE) as TAX_RATE,
|
||||
BILL_MANAGE_ID as BILL_MANAGE_ID,
|
||||
TOP_ORGANIZATION_ID as TOP_ORGANIZATION_ID,
|
||||
ORGANIZATION_NAME,
|
||||
INVOICE_ITEM,
|
||||
INVOICE_ITEM_NAME,
|
||||
FEE_TYPE,
|
||||
BILL_NUMBER
|
||||
FROM
|
||||
bill_detail
|
||||
WHERE
|
||||
del_flag = 1
|
||||
AND bill_manage_id = #{billManageId} GROUP BY INVOICE_ITEM,INVOICE_ITEM_NAME,FEE_TYPE
|
||||
</select>
|
||||
|
||||
<select id="getTaxRate" resultType="java.lang.Double" parameterType="java.lang.String">
|
||||
SELECT
|
||||
rate
|
||||
FROM
|
||||
NGWL_TEST_SYSTEM.EXPENSE_ACCOUNT
|
||||
WHERE
|
||||
del_flag = 1
|
||||
AND SUBJECT_CODE = #{code}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -162,4 +162,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
SELECT NC_CODE FROM NGWL_TEST_PRODUCT."SYS_ORGANIZATION" where DEL_FLAG = 1 and organization_id = #{organizationId} limit 1
|
||||
</select>
|
||||
|
||||
<select id="getShipperId" resultType="java.lang.Long">
|
||||
SELECT SHIPPER_ID FROM NGWL_TEST_USER."USER_SHIPPER" where DEL_FLAG = '1' and user_id = #{userId} and organization_id = #{organizationId} limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -200,10 +200,6 @@
|
||||
<if test="settlementCustomersDO.organizationId != null">
|
||||
AND (
|
||||
a.organization_id = #{settlementCustomersDO.organizationId}
|
||||
OR b.org_code LIKE concat('%"code":"', #{settlementCustomersDO.organizationId}, '"%')
|
||||
OR b.org_code LIKE concat('%code:', #{settlementCustomersDO.organizationId}, '%')
|
||||
OR b.org_code LIKE concat('%code: ', #{settlementCustomersDO.organizationId}, '%')
|
||||
OR b.org_code LIKE concat('%"code":', #{settlementCustomersDO.organizationId}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="settlementCustomersDO.topOrganizationId != null and settlementCustomersDO.topOrganizationId != ''">
|
||||
|
||||
@@ -14,18 +14,18 @@ spring:
|
||||
nacos:
|
||||
discovery:
|
||||
# server-addr: 127.0.0.1:8848
|
||||
server-addr: 10.33.0.129:6010
|
||||
# server-addr: 10.33.0.129:6010
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
# server-addr: 10.102.192.30:6848
|
||||
server-addr: 10.102.192.31:6848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
#线上正式环境
|
||||
# server-addr: 10.102.192.105:6848
|
||||
config:
|
||||
# server-addr: 127.0.0.1:8848
|
||||
server-addr: 10.33.0.129:6010
|
||||
# server-addr: 10.33.0.129:6010
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
# server-addr: 10.102.192.30:6848
|
||||
server-addr: 10.102.192.31:6848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
#线上正式环境
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<mapper namespace="com.mhd.wms.domain.reviewOrder.repository.mapper.ReviewOrderMapper">
|
||||
|
||||
<resultMap type="com.mhd.wms.domain.reviewOrder.repository.po.ReviewOrderPO" id="ReviewOrderResult">
|
||||
<result property="reviewOrderId" column="review_order_id"/>
|
||||
<id property="reviewOrderId" column="review_order_id"/>
|
||||
<result property="reviewOrderNumber" column="review_order_number"/>
|
||||
<result property="outOrderId" column="out_order_id"/>
|
||||
<result property="outOrderNumber" column="out_order_number"/>
|
||||
@@ -84,7 +84,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="reviewOrderSelectColumns">
|
||||
a.review_order_id,
|
||||
a.review_order_id AS review_order_id,
|
||||
a.review_order_number,
|
||||
a.out_order_id,
|
||||
a.out_order_number,
|
||||
|
||||
Reference in New Issue
Block a user