1/3 参数优化1.0

Lhxyy
wangwei 2 months ago
parent 4d7c6ff1b3
commit 8c05e1a1e2

@ -1,9 +1,11 @@
package com.glxp.mipsdl.client.lhzyy;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.glxp.mipsdl.client.CommonHttpClient;
import com.glxp.mipsdl.config.ThirdSysConfig;
import com.glxp.mipsdl.constant.ConstantType;
@ -26,6 +28,7 @@ import com.glxp.mipsdl.entity.basic.BasicUdirelEntity;
import com.glxp.mipsdl.entity.inout.IoCodeEntity;
import com.glxp.mipsdl.entity.inout.IoOrderDetailBizEntity;
import com.glxp.mipsdl.entity.inout.IoOrderEntity;
import com.glxp.mipsdl.entity.inout.IoOrderInvoiceEntity;
import com.glxp.mipsdl.entity.thrsys.ThrCorpEntity;
import com.glxp.mipsdl.entity.thrsys.ThrInvWarehouseEntity;
import com.glxp.mipsdl.entity.thrsys.ThrProductsEntity;
@ -57,6 +60,7 @@ import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
/**
*
@ -179,7 +183,7 @@ public class LhzyyClient extends CommonHttpClient {
} else if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_SP)) {
//供应商
ThrCorpEntity thrCorp = thrCorpService.getThrCorp(orderEntity.getFromCorp());
log.error("第三方系统{}",thrCorp);
log.error("第三方系统{}", thrCorp);
if (null != thrCorp) {
dsOrderRequest.setCorpId(thrCorp.getUnitId());
dsOrderRequest.setCorpName(thrCorp.getName());
@ -240,7 +244,6 @@ public class LhzyyClient extends CommonHttpClient {
setOrderDetailList(ioCodeEntities, items, detailBizEntities);
Collections.reverse(items);
//云霄使用items字段其他医院使用item字段
dsOrderRequest.setItems(items);
@ -259,26 +262,42 @@ public class LhzyyClient extends CommonHttpClient {
.eq(ThrProductsEntity::getCode, basicUdirel.getThirdId()).last("limit 1"));
item.setRegisterNo(thrProductsEntity.getRegisterNo());
}
if (StrUtil.isNotBlank(detailBizEntity.getSecSalesInvNo())){
if (StrUtil.isNotBlank(detailBizEntity.getSecSalesInvNo())) {
item.setSecSalesInvNo(detailBizEntity.getSecSalesInvNo());
}else {
} else {
item.setSecSalesInvNo("");
}
if (StrUtil.isNotBlank(detailBizEntity.getInvoiceDate())){
if (StrUtil.isNotBlank(detailBizEntity.getInvoiceDate())) {
item.setInvoiceDate(detailBizEntity.getInvoiceDate());
}else {
} else {
item.setInvoiceDate("");
}
if (StrUtil.isNotBlank(detailBizEntity.getSecSalesListNo())){
if (StrUtil.isNotBlank(detailBizEntity.getSecSalesListNo())) {
item.setSecSalesListNo(detailBizEntity.getSecSalesListNo());
}else {
} else {
item.setSecSalesListNo("");
}
if (StrUtil.isNotBlank(detailBizEntity.getFirstSalesInvNo())){
if (StrUtil.isNotBlank(detailBizEntity.getFirstSalesInvNo())) {
item.setFirstSalesInvNo(detailBizEntity.getFirstSalesInvNo());
}else {
} else {
item.setFirstSalesInvNo("");
}
String fphm = "";
String fprq = null;
List<IoOrderInvoiceEntity> invoiceList = IoOrderInvoiceEntity.builder().build()
.selectList(Wrappers.lambdaQuery(IoOrderInvoiceEntity.class).eq(IoOrderInvoiceEntity::getOrderIdFk, detailBizEntity.getOrderIdFk())
.eq(IoOrderInvoiceEntity::getBindRlFk, detailBizEntity.getBindRlFk())
.eq(StrUtil.isNotEmpty(item.getBatchNo()), IoOrderInvoiceEntity::getBatchNo, item.getBatchNo()).
groupBy(IoOrderInvoiceEntity::getInvoiceEncode));
if (CollectionUtil.isNotEmpty(invoiceList)) {
fphm = invoiceList.stream().map(IoOrderInvoiceEntity::getInvoiceEncode).collect(Collectors.joining(","));
if (invoiceList.get(0).getInvoiceDate() != null)
fprq = DateUtil.formatDateTime(invoiceList.get(0).getInvoiceDate());
}
item.setFirstSalesInvNo(fphm);
item.setSecSalesInvNo(fphm);
item.setInvoiceDate(fprq);
//封装条码信息
submitOrderUtil.setCodeList(ioCodeEntities, detailBizEntity, item);
orderDetailRequests.add(item);
@ -287,11 +306,10 @@ public class LhzyyClient extends CommonHttpClient {
@Override
public BaseResponse getInvProducts(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
return null;
return null;
}
@Override
public BaseResponse postProducts(PostThrProductsRequest postThrProductsRequest) {
return null;

Loading…
Cancel
Save