Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
+1
@@ -475,6 +475,7 @@ public class TmsOrder implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "已收运费")
|
||||
private BigDecimal collectedFreight;
|
||||
|
||||
@ApiModelProperty(value = "未收运费")
|
||||
private BigDecimal uncollectedFreight;
|
||||
@ApiModelProperty(value = "少收运费")
|
||||
|
||||
+22
-1
@@ -2,6 +2,8 @@ package com.linke.finance.application.server.reconciliation;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyun.dingtalkworkflow_1_0.models.StartProcessInstanceResponse;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.linke.finance.domain.businessDocument.entity.BusinessDocument;
|
||||
import com.linke.finance.domain.businessDocument.service.BusinessDocumentDomainService;
|
||||
import com.linke.finance.domain.reconciliation.entity.Reconciliation;
|
||||
@@ -21,6 +23,7 @@ import com.linke.finance.infrastructure.feign.ProductServiceFeign;
|
||||
import com.linke.finance.infrastructure.feign.WlhyServiceFeign;
|
||||
import com.mhd.common.core.constant.SubjectConstants;
|
||||
import com.mhd.common.core.domain.dto.ReconciliationDTO;
|
||||
import com.mhd.common.core.domain.entity.TmsOrder;
|
||||
import com.mhd.common.core.domain.entity.Verification;
|
||||
import com.mhd.common.core.domain.po.OrganizationPo;
|
||||
import com.mhd.common.core.domain.po.UserPo;
|
||||
@@ -29,6 +32,7 @@ import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.utils.OrderSequence;
|
||||
import com.mhd.common.core.utils.StringUtils;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.utils.sms.Result;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
@@ -156,8 +160,25 @@ public class ReconciliationApplicationService {
|
||||
}
|
||||
}
|
||||
return reconciliationPOS;*/
|
||||
List<ReconciliationPO> reconciliationPOS = reconciliationDomainService.queryList(reconciliationDO);
|
||||
for (ReconciliationPO reconciliationPO : reconciliationPOS) {
|
||||
String innerNumber = reconciliationPO.getInnerNumber();
|
||||
if (innerNumber != null && !innerNumber.trim().isEmpty()) {
|
||||
ReconciliationDTO reconciliationDTO = new ReconciliationDTO();
|
||||
reconciliationDTO.setInnerNumber(innerNumber);
|
||||
Result<Page<TmsOrder>> orderListByReconciliation = wlhyServiceFeign.getOrderListByReconciliation(reconciliationDTO, 1, 10);
|
||||
if (orderListByReconciliation != null && orderListByReconciliation.getResult() != null) {
|
||||
Page<TmsOrder> result = orderListByReconciliation.getResult();
|
||||
List<TmsOrder> records = result.getRecords();
|
||||
if (records != null && !records.isEmpty()) {
|
||||
TmsOrder tmsOrder = records.get(0);
|
||||
reconciliationPO.setSettlementCurrency(tmsOrder.getSettlementCurrency());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return reconciliationDomainService.queryList(reconciliationDO);
|
||||
return reconciliationPOS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+166
-10
@@ -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<ReconciliationMapper, Reconc
|
||||
reconciliation.setSynchronousStatus(1);
|
||||
reconciliation.setSynchronousTime(new Date());
|
||||
reconciliation.setNcId("ys"+String.valueOf(reconciliation.getReconciliationId()));
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
//reconciliationMapper.updateById(reconciliation);
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
StringEntity postingString = new StringEntity(xmlString, "UTF-8");
|
||||
@@ -545,6 +552,42 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
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);
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
response.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -565,15 +608,20 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
R<TmsTransportNote> 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<ReconciliationMapper, Reconc
|
||||
reconciliation.setSynchronousStatus(1);
|
||||
reconciliation.setSynchronousTime(new Date());
|
||||
reconciliation.setNcId("ys"+String.valueOf(reconciliation.getReconciliationId()));
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
//reconciliationMapper.updateById(reconciliation);
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
StringEntity postingString = new StringEntity(xmlString, "UTF-8");
|
||||
@@ -687,6 +735,42 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
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);
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
response.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -836,7 +920,7 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
reconciliation.setSkSynchronousStatus(1);
|
||||
reconciliation.setSkSynchronousTime(new Date());
|
||||
reconciliation.setSkNcId("sk"+String.valueOf(reconciliation.getReconciliationId()));
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
//reconciliationMapper.updateById(reconciliation);
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
StringEntity postingString = new StringEntity(xmlString, "UTF-8");
|
||||
@@ -846,6 +930,42 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
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);
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
response.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -955,7 +1075,7 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
reconciliation.setSkSynchronousStatus(1);
|
||||
reconciliation.setSkSynchronousTime(new Date());
|
||||
reconciliation.setSkNcId("sk"+String.valueOf(reconciliation.getReconciliationId()));
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
//reconciliationMapper.updateById(reconciliation);
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
StringEntity postingString = new StringEntity(xmlString, "UTF-8");
|
||||
@@ -965,6 +1085,42 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
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);
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
response.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
+11
-1
@@ -1,6 +1,11 @@
|
||||
package com.linke.finance.infrastructure.feign;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mhd.common.core.domain.dto.ReconciliationDTO;
|
||||
import com.mhd.common.core.domain.dto.UserDriverDTO;
|
||||
import com.mhd.common.core.domain.entity.TmsOrder;
|
||||
import com.mhd.common.core.utils.sms.Result;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -16,4 +21,9 @@ public interface WlhyServiceFeign {
|
||||
*/
|
||||
@GetMapping("/ntocc/tmsOrder/getById")
|
||||
public AjaxResult getById(@RequestParam(name="id",required=true) Long id);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/ntocc/outBoundSummary/getOrderListByReconciliation")
|
||||
public Result<Page<TmsOrder>> getOrderListByReconciliation(ReconciliationDTO reconciliationDTO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize);
|
||||
}
|
||||
Reference in New Issue
Block a user