feat: 结算单管理-修改结算单内容;发票填开-名称修改;生成预制发票校验冻结客户、智能赋码

release
liufeilong 2 years ago
parent 7d1b370e38
commit 3ca011d6d9
  1. 5
      order-management-consumer/src/main/java/com/dxhy/order/consumer/model/OderDetailInfo.java
  2. 42
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java
  3. 5
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/model/PageInvoiceReq.java
  4. 1
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/BeanTransServiceImpl.java
  5. 7
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/GenerateReadyOpenOrderServiceImpl.java
  6. 1
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/OrderInfoServiceImpl.java

@ -237,6 +237,11 @@ public class OderDetailInfo {
* 报账单号
*/
private String bzdh;
/**
* 系统来源
*/
private String xtly;
}

@ -2,6 +2,7 @@ package com.dxhy.order.consumer.modules.manager.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.dxhy.base.constant.OrderSeparationException;
import com.dxhy.base.constant.OrderSplitException;
@ -124,16 +125,43 @@ public class InvoiceServiceImpl implements InvoiceService {
List<PageInvoiceItem> pageInvoiceItemList = pageInvoiceReq.getPageInvoiceItemList();
//查询数据列表
List<CommonOrderInfo> commonOrderInfos = orderInfoService.batchQueryOrderInfoByOrderIdsAndNsrsbh(pageInvoiceItemList);
StringBuffer errorMsg = new StringBuffer();
List<Map<String,String>> consumerList = new ArrayList<>();
List<Map<String,String>> confirmList = new ArrayList<>();
commonOrderInfos.stream().forEach(f -> {
BuyerEntity buyerEntity = buyerService.queryBuyerInfoByxhfNsrsbhAndBuyerCode(f.getOrderInfo().getXhfNsrsbh(), f.getOrderInfo().getGhfId());
if(ConfigureConstant.STRING_0.equals(buyerEntity.getStatus())){
errorMsg.append("【结算单号】:").append(f.getOrderInfo().getDdh()).append(",【客户】:").append(f.getOrderInfo().getGhfMc()).append(";\r");
OrderInfo orderInfo = f.getOrderInfo();
List<OrderItemInfo> orderItemInfoList = f.getOrderItemInfo();
BuyerEntity buyerEntity = null;
if(StrUtil.isNotBlank(orderInfo.getGhfId())){
buyerEntity = buyerService.queryBuyerInfoByxhfNsrsbhAndBuyerCode(orderInfo.getXhfNsrsbh(), orderInfo.getGhfId());
if(ObjectUtil.isNull(buyerEntity)){
buyerEntity = buyerService.queryBuyerInfoByxhfNsrsbhAndBuyerCode(ConfigureConstant.STRING_1_, orderInfo.getGhfId());
}
}
if(ObjectUtil.isNotNull(buyerEntity) && ConfigureConstant.STRING_0.equals(buyerEntity.getStatus())){
Map map = new HashMap();
map.put("ddh",orderInfo.getDdh());
map.put("ghfMc",orderInfo.getGhfMc());
map.put("ghfNsrsbh",orderInfo.getGhfNsrsbh());
map.put("hsje",orderInfo.getKphjje());
consumerList.add(map);
}
orderItemInfoList.stream().forEach(item -> {
if(ConfigureConstant.STRING_1.equals(item.getZnfm())){
Map map = new HashMap();
map.put("ddh",orderInfo.getDdh());
map.put("xh",item.getSphxh());
String xmmc = item.getXmmc();
map.put("xmmc",xmmc.substring(xmmc.lastIndexOf("*")+1,xmmc.length()));
map.put("ssjc",xmmc.substring(1,xmmc.lastIndexOf("*")));
map.put("ssbm",item.getSpbm());
confirmList.add(map);
}
});
});
if(errorMsg.length()>0){
errorMsg.append("被冻结,不允许开票!");
return R.error(errorMsg.toString());
if(consumerList.size()>0){
return R.error(ConfigureConstant.STRING_9001, "校验客户提示",consumerList);
}else if((StrUtil.isBlank(pageInvoiceReq.getConfirmZnfm()) || !ConfigureConstant.STRING_0.equals(pageInvoiceReq.getConfirmZnfm())) && confirmList.size()>0){
return R.error(ConfigureConstant.STRING_9002,"请确认以下物料税收分类编码是否准确",confirmList);
}else {
commonOrderInfos.stream().forEach(f -> {
String terminalCode = simsBackService.getTerminalCode(f.getOrderInfo().getXhfNsrsbh(), f.getOrderInfo().getEntId());

@ -102,5 +102,10 @@ public class PageInvoiceReq implements Serializable {
* 待开票数据列表
*/
private List<PageInvoiceItem> pageInvoiceItemList;
/**
* 提示智能赋码(0:不提示,其他提示)
*/
private String confirmZnfm;
}

@ -141,6 +141,7 @@ public class BeanTransServiceImpl implements BeanTransService {
if (StringUtils.isNotBlank(pageOrderInfo.getEntId())) {
orderInfo.setEntId(pageOrderInfo.getEntId());
}
orderInfo.setBzdh(pageOrderInfo.getBzdh());
//判断小数点后位数,默认为8位,如果为全电,为15位
int afterPointLength = ConfigureConstant.INT_8;

@ -707,6 +707,13 @@ public class GenerateReadyOpenOrderServiceImpl implements GenerateReadyOpenOrder
orderProcessInfo.setDdly(commonOrderInfo.getProcessInfo().getDdly());
orderProcessInfo.setDdzt(commonOrderInfo.getProcessInfo().getDdzt());
orderProcessInfo.setBzdh(commonOrderInfo.getOrderInfo().getBzdh());
orderProcessInfo.setXtly("FPPAGE");
orderProcessInfo.setGsdm("");
orderProcessInfo.setBhzt(ConfigureConstant.STRING_0);
orderProcessInfo.setYzfp(ConfigureConstant.STRING_0);
orderProcessInfo.setOriginDdh(commonOrderInfo.getOrderInfo().getDdh());
orderProcessInfo.setOriginOrderId(orderInfo.getId());
//原始订单到最终订单的关系

@ -393,6 +393,7 @@ public class OrderInfoServiceImpl implements OrderInfoService {
oderDetailInfo.setCheckStatus(orderProcessInfo.getCheckStatus());
oderDetailInfo.setCheckTime(DateUtil.format(orderProcessInfo.getCheckTime(), "yyyy-MM-dd HH:mm:ss"));
oderDetailInfo.setBzdh(orderProcessInfo.getBzdh());
oderDetailInfo.setXtly(orderProcessInfo.getXtly());
return oderDetailInfo;
}

Loading…
Cancel
Save