From 931d63a5dab3fb7b319a68ff38176d1557f09b32 Mon Sep 17 00:00:00 2001 From: hjx <577364224@qq.com> Date: Tue, 13 Jan 2026 17:26:59 +0800 Subject: [PATCH] =?UTF-8?q?nc=E5=AF=B9=E6=8E=A5=E4=BF=AE=E6=94=B9=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=80=9A=E5=AE=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/core/domain/entity/TmsOrder.java | 1 + .../persistence/ReconciliationImpl.java | 176 +++++++++++++++++- 2 files changed, 167 insertions(+), 10 deletions(-) diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/entity/TmsOrder.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/entity/TmsOrder.java index e54c03c71..da25acc7d 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/entity/TmsOrder.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/entity/TmsOrder.java @@ -475,6 +475,7 @@ public class TmsOrder implements Serializable { @ApiModelProperty(value = "已收运费") private BigDecimal collectedFreight; + @ApiModelProperty(value = "未收运费") private BigDecimal uncollectedFreight; @ApiModelProperty(value = "少收运费") 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 403f4c91f..5809929b0 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 @@ -49,11 +49,18 @@ import org.apache.http.util.EntityUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; +import org.xml.sax.InputSource; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; import java.io.IOException; +import java.io.StringReader; import java.io.StringWriter; import java.math.BigDecimal; import java.sql.NClob; @@ -535,7 +542,7 @@ public class ReconciliationImpl extends ServiceImpl 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); + reconciliationMapper.updateById(reconciliation); response.close(); } catch (Exception e) { e.printStackTrace(); @@ -565,15 +608,20 @@ public class ReconciliationImpl extends ServiceImpl ajaxResult1=wlhyServiceFeign.selectByOrderNum(tmsOrder.getGoodsNumber()); if(ajaxResult1.getCode()==200){ TmsTransportNote tmsTransportNote= ajaxResult1.getData(); - if(ObjectUtil.isNotNull(tmsTransportNote.getIsPaper())){ - date=tmsTransportNote.getConfirmReceiptTime(); - if(null==date){ - date=new Date(); + if(ObjectUtil.isNotNull(tmsTransportNote)){ + if(ObjectUtil.isNotNull(tmsTransportNote.getIsPaper())){ + date=tmsTransportNote.getConfirmReceiptTime(); + if(null==date){ + date=new Date(); + } + dateString = sdf.format(date); + }else{ + throw new ServiceException("运单还没签收, 先签收"); } - dateString = sdf.format(date); }else{ - throw new ServiceException("运单还没签收, 先签收"); + throw new ServiceException("未查询到关联运单, 请核对"); } + } /* if(null==reconciliation.getSettlementPartyId()){ throw new ServiceException("没有结算方,请核对"); @@ -677,7 +725,7 @@ public class ReconciliationImpl extends ServiceImpl 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); + reconciliationMapper.updateById(reconciliation); response.close(); } catch (Exception e) { e.printStackTrace(); @@ -836,7 +920,7 @@ public class ReconciliationImpl extends ServiceImpl 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); + reconciliationMapper.updateById(reconciliation); response.close(); } catch (Exception e) { e.printStackTrace(); @@ -955,7 +1075,7 @@ public class ReconciliationImpl extends ServiceImpl 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); + reconciliationMapper.updateById(reconciliation); response.close(); } catch (Exception e) { e.printStackTrace();