南歧nc65对接
This commit is contained in:
+7
@@ -162,6 +162,13 @@ public class RemoteUserFeignFallbackFactory implements FallbackFactory<UserServi
|
||||
public R<LoginUser> getUserByTopOrganizationUserPhone(@RequestBody UserDTO userDTO, String source) {
|
||||
return R.fail("获取组织用户失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult<?> getShipperSummaryData(Long userId) {
|
||||
return AjaxResult.error("查询失败" + throwable.getMessage());
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,9 +236,9 @@ public class UserDTO extends BaseVOEntity {
|
||||
@ApiModelProperty(name = "有效期管理 0-否 1-是")
|
||||
private Integer validityPeriodManagement;
|
||||
|
||||
@ApiModelProperty(name = "业务员nc编码")
|
||||
@ApiModelProperty("业务员nc编码")
|
||||
private String salespersonNcCode;
|
||||
|
||||
@ApiModelProperty(name = "制单员nc编码")
|
||||
@ApiModelProperty( "制单员nc编码")
|
||||
private String documentPreparerNcCode;
|
||||
}
|
||||
|
||||
+1
-1
@@ -191,7 +191,7 @@ public class UserShipperDTO extends UserDTO {
|
||||
@ApiModelProperty(name = "备注信息")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(name = "客户nc编码")
|
||||
@ApiModelProperty("客户nc编码")
|
||||
private String customerNcCode;
|
||||
|
||||
}
|
||||
|
||||
@@ -18,13 +18,15 @@ spring:
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 127.0.0.1:8848
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
#server-addr: mhd-nacos:8848
|
||||
server-addr: 116.204.23.92:8848
|
||||
config:
|
||||
server-addr: 127.0.0.1:8848
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
#server-addr: mhd-nacos:8848
|
||||
server-addr: 116.204.23.92:8848
|
||||
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
||||
file-extension: yml #默认properties
|
||||
# 共享配置
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
a.department_id,
|
||||
a.ding_user_id,
|
||||
a.ding_dept_id,
|
||||
a.validity_period_management
|
||||
a.validity_period_management,a.salesperson_nc_code,a.document_preparer_nc_code
|
||||
FROM `user` a
|
||||
where a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
b.monthly_settlement_flag,
|
||||
a.user_auth_status,
|
||||
b.original_receipt_flag,
|
||||
b.freight_node
|
||||
b.freight_node,b.customer_nc_code
|
||||
FROM `user` a
|
||||
LEFT JOIN `user_shipper` b ON a.user_id = b.user_id
|
||||
left join (select user_id, GROUP_CONCAT(r.role_name separator '&') roleName
|
||||
|
||||
+22
-14
@@ -38,6 +38,7 @@ import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.UserServiceFeign;
|
||||
import com.mhd.system.api.WlhyServiceFeign;
|
||||
import com.mhd.system.api.domain.TmsTransportNote;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
@@ -409,6 +410,12 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
List<TmsOrder> list=result.getData();
|
||||
if(ObjectUtil.isNotNull(list)){
|
||||
for(TmsOrder tmsOrder:list){
|
||||
R<TmsTransportNote> ajaxResult1=wlhyServiceFeign.selectByOrderNum(tmsOrder.getGoodsNumber());
|
||||
if(ajaxResult1.getCode()==200){
|
||||
TmsTransportNote tmsTransportNote= ajaxResult1.getData();
|
||||
date=tmsTransportNote.getPaperReceiptTime();
|
||||
dateString = sdf.format(date);
|
||||
}
|
||||
AjaxResult ajaxResult=userServiceFeign.getShipperSummaryData(Long.valueOf(reconciliation.getSettlementPartyId()));
|
||||
if(ajaxResult.get("code").equals("200")){
|
||||
UserShipperPo userShipperPo= (UserShipperPo) ajaxResult.get("data");
|
||||
@@ -488,6 +495,19 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
marshaller.marshal(ufinterface, sw);
|
||||
String xmlString = sw.toString(); // 这是要发送的XML字符串
|
||||
System.out.println(xmlString);
|
||||
NcLog ncLog=new NcLog();
|
||||
ncLog.setOrderId(reconciliation.getReconciliationId());
|
||||
ncLog.setRequestBody(xmlString);
|
||||
ncLog.setResponeBody("");
|
||||
ncLog.setType(0L);
|
||||
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.getReconciliationId()));
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
StringEntity postingString = new StringEntity(xmlString, "UTF-8");
|
||||
@@ -507,19 +527,7 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
NcLog ncLog=new NcLog();
|
||||
ncLog.setOrderId(reconciliation.getReconciliationId());
|
||||
ncLog.setRequestBody(xmlString);
|
||||
ncLog.setResponeBody("");
|
||||
ncLog.setType(0L);
|
||||
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.getReconciliationId()));
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
|
||||
} catch (JAXBException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -593,7 +601,7 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
billhead.setBilldate(dateString);
|
||||
billhead.setSyscode("0");
|
||||
billhead.setBillno("");
|
||||
billhead.setDef59(reconciliation.getInnerNumber());
|
||||
billhead.setDef59("");
|
||||
billhead.setSrc_syscode("0");
|
||||
billhead.setBillstatus("0");
|
||||
billhead.setBillmaker(userPo.getDocumentPreparerNcCode());
|
||||
|
||||
+23
@@ -214,5 +214,28 @@ public class ReconciliationPO extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty(value = "申请发票单号")
|
||||
private String applyNumber;
|
||||
@ApiModelProperty("nc同步状态 0-未同步 1-已同步")
|
||||
private Integer synchronousStatus;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "nc同步时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date synchronousTime;
|
||||
|
||||
@ApiModelProperty(value = "nc唯一标识")
|
||||
private String ncId;
|
||||
|
||||
@ApiModelProperty("nc同步状态 0-未同步 1-已同步")
|
||||
private Integer skSynchronousStatus;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "nc同步时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date skSynchronousTime;
|
||||
|
||||
@ApiModelProperty(value = "nc唯一标识")
|
||||
private String skNcId;
|
||||
|
||||
}
|
||||
|
||||
+24
@@ -246,4 +246,28 @@ public class ReconciliationDO extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty(value = "申请发票单号")
|
||||
private String applyNumber;
|
||||
|
||||
@ApiModelProperty("nc同步状态 0-未同步 1-已同步")
|
||||
private Integer synchronousStatus;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "nc同步时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date synchronousTime;
|
||||
|
||||
@ApiModelProperty(value = "nc唯一标识")
|
||||
private String ncId;
|
||||
|
||||
@ApiModelProperty("nc同步状态 0-未同步 1-已同步")
|
||||
private Integer skSynchronousStatus;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "nc同步时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date skSynchronousTime;
|
||||
|
||||
@ApiModelProperty(value = "nc唯一标识")
|
||||
private String skNcId;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
a.del_flag =1
|
||||
<if test="invoiceApplyStatus != null ">
|
||||
and a.invoice_apply_status = #{invoiceApplyStatus}
|
||||
</if> <if test="synchronousStatus != null ">
|
||||
and a.synchronous_status = #{synchronousStatus}
|
||||
</if> <if test="skSynchronousStatus != null ">
|
||||
and a.sk_synchronous_status = #{skSynchronousStatus}
|
||||
</if>
|
||||
<if test="verificationMoney != null ">
|
||||
and a.verification_money = #{verificationMoney}
|
||||
|
||||
@@ -18,13 +18,13 @@ spring:
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 127.0.0.1:8848
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# 线上测试环境配置使用ip+端口号
|
||||
#server-addr: 10.33.0.129:6000
|
||||
server-addr: 10.33.0.129:6010
|
||||
config:
|
||||
server-addr: 127.0.0.1:8848
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# 线上测试环境配置使用ip+端口号
|
||||
#server-addr: 10.33.0.129:6000
|
||||
server-addr: 10.33.0.129:6010
|
||||
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
||||
file-extension: yml #默认properties
|
||||
# 共享配置
|
||||
|
||||
Reference in New Issue
Block a user