提交 a5f5f8b4 authored 作者: 姜武杰's avatar 姜武杰

重新拉取 v26.2-jdk17springboot3-20240912_release 分支 ,排除 v24.4_notice_20240903

......@@ -21,6 +21,8 @@ public class OpenOrderChildDTO {
private String sourceOrderNo;
@Schema(description = "源结算单编号", example = "1234", required = true)
private String sourceSettlementNo;
@ApiModelProperty(value = "订单来源", example = "1234", required = true, dataType = "String")
private Integer orderSource;
@Schema(description = "运费单价(分/吨)", example = "162", required = true)
private Integer freightPrice;
......@@ -36,6 +38,8 @@ public class OpenOrderChildDTO {
private Integer lossFee;
@Schema(description = "货损单价(分/吨)", example = "123")
private Integer lossFeePrice;
@ApiModelProperty(value = "管理费(分)", example = "123", dataType = "Integer")
private Integer invoiceServiceFee;
@Schema(description = "发货皮重(吨)")
private BigDecimal sendTare;
......@@ -61,6 +65,8 @@ public class OpenOrderChildDTO {
private BigDecimal receiveRough;
@Schema(description = "收货净重(吨)")
private BigDecimal receiveNet;
@ApiModelProperty(value = "实收净重(吨)")
private BigDecimal realNet;
@Schema(description = "备注", example = "", required = true)
private String remark;
......
package com.clx.performance.vo.pc.broker;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import javax.validation.constraints.NotNull;
@Getter
@Setter
@ToString
@NoArgsConstructor
public class TransportPayConfirmParam {
@ApiModelProperty(value = "用户编号", required = true)
@NotNull(message = "用户编号不能为空")
private String userCode;
@ApiModelProperty(value = "运单编号", required = true)
@NotNull(message = "运单编号不能为空")
String orderCode;
}
......@@ -212,9 +212,17 @@ public interface OrderChildDao extends BaseDao<OrderChildMapper, OrderChild, Int
void batchUpdateCancel(List<OrderChild> canCancelOrderChildList);
<<<<<<< HEAD
int countTakeByOrderGoodsNo(String orderGoodsNo);
int countLoadByOrderGoodsNo(String orderGoodsNo);
List<OrderChild> findListByChildNoList(List<String> childNoList);
=======
List<OrderChild> findListByChildNoList(List<String> childNoList);
int countTakeByOrderGoodsNo(String orderGoodsNo);
int countLoadByOrderGoodsNo(String orderGoodsNo);
>>>>>>> master
}
......@@ -704,6 +704,18 @@ public class OrderChildDaoImpl extends BaseDaoImpl<OrderChildMapper, OrderChild,
baseMapper.batchUpdateCancel(canCancelOrderChildList);
}
<<<<<<< HEAD
=======
@Override
public List<OrderChild> findListByChildNoList(List<String> childNoList) {
return list(lQrWrapper()
.in(OrderChild :: getChildNo, childNoList)
);
}
>>>>>>> master
@Override
public int countTakeByOrderGoodsNo(String orderGoodsNo) {
return baseMapper.countTakeByOrderGoodsNo(orderGoodsNo);
......@@ -713,6 +725,7 @@ public class OrderChildDaoImpl extends BaseDaoImpl<OrderChildMapper, OrderChild,
public int countLoadByOrderGoodsNo(String orderGoodsNo) {
return baseMapper.countLoadByOrderGoodsNo(orderGoodsNo);
}
<<<<<<< HEAD
@Override
......@@ -722,4 +735,6 @@ public class OrderChildDaoImpl extends BaseDaoImpl<OrderChildMapper, OrderChild,
);
}
=======
>>>>>>> master
}
......@@ -41,9 +41,14 @@ public class SettlementDriverDaoImpl extends BaseDaoImpl<SettlementDriverMapper,
public boolean updateInvoiceCompany(SettlementDriver item) {
return update(lUdWrapper()
.eq(SettlementDriver::getId, item.getId())
.set(SettlementDriver::getInvoiceType, item.getInvoiceType())
.set(SettlementDriver::getInvoicingCompanyId, item.getInvoicingCompanyId())
.set(SettlementDriver::getInvoicingCompanyShorterName, item.getInvoicingCompanyShorterName())
.set(SettlementDriver::getInvoicingCompanyGroupCode, item.getInvoicingCompanyGroupCode())
<<<<<<< HEAD
=======
.set(SettlementDriver::getPrepayFreightFlag, item.getPrepayFreightFlag())
>>>>>>> master
);
}
......@@ -74,7 +79,6 @@ public class SettlementDriverDaoImpl extends BaseDaoImpl<SettlementDriverMapper,
@Override
public List<SettlementDriver> listDriverConfirmSync() {
return list(lUdWrapper()
.eq(SettlementDriver::getInvoiceType, SettlementOwnerEnum.InvoiceType.ONLINE.getCode())
.eq(SettlementDriver::getStatus, SettlementDriverEnum.Status.DRIVER_UNCONFIRMED.getCode())
);
}
......
......@@ -20,9 +20,15 @@ public interface SettlementDriverDao extends BaseDao<SettlementDriverMapper, Set
boolean updatePayStatus(SettlementDriver item);
<<<<<<< HEAD
boolean updateInvoiceCompany(SettlementDriver item);
boolean updateSettleStatus(SettlementDriver item);
=======
boolean updateSettleStatus(SettlementDriver item);
boolean updateInvoiceCompany(SettlementDriver item);
>>>>>>> master
Optional<SettlementDriver> findBySettlementNo(String settlementNo);
......
......@@ -6,6 +6,7 @@ import com.clx.performance.enums.ResultEnum;
import com.clx.performance.extranal.broker.BrokerService;
import com.clx.performance.feign.BrokerFeign;
import com.clx.performance.vo.pc.broker.TransportParam;
import com.clx.performance.vo.pc.broker.TransportPayConfirmParam;
import com.clx.performance.vo.pc.broker.TransportVO;
import com.msl.common.exception.ServiceSystemException;
import com.msl.common.result.Result;
......@@ -48,7 +49,11 @@ public class BrokerServiceImpl implements BrokerService {
@Override
public void orderChildPay(String childNo) {
Result<Object> result = brokerFeign.payConfirm(childNo, settlementConfig.getBrokerUserCode());
TransportPayConfirmParam param = new TransportPayConfirmParam();
param.setOrderCode(childNo);
param.setUserCode(settlementConfig.getBrokerUserCode());
Result<Object> result = brokerFeign.payConfirm(param);
if (result.getCode() != 0) {
log.info("司机支付, childNo:{}, msg:{}", childNo, result.getMsg());
}
......
package com.clx.performance.feign;
import com.clx.performance.vo.pc.broker.TransportPayConfirmParam;
import com.clx.performance.vo.pc.broker.TransportParam;
import com.clx.performance.vo.pc.broker.TransportVO;
import com.msl.common.result.Result;
......@@ -32,7 +33,6 @@ public interface BrokerFeign {
* 司机支付
*/
@RequestMapping(value = "/broker-service/open/transport/payConfirm", method = RequestMethod.POST)
Result<Object> payConfirm(@RequestParam @NotBlank(message = "运单编号不能为空") String orderCode,
@RequestParam @NotNull(message = "userCode不能为空") String userCode);
Result<Object> payConfirm(@RequestBody TransportPayConfirmParam param);
}
......@@ -3,6 +3,8 @@ package com.clx.performance.service.impl;
import com.alibaba.druid.sql.visitor.functions.If;
import com.clx.order.enums.QuotationEnum;
import com.clx.order.vo.feign.FeignOrderInfoVO;
import com.clx.performance.config.LoadAppConfig;
import com.clx.performance.config.PerformanceSmartCompanyNoConfig;
import com.clx.performance.dao.*;
import com.clx.performance.dto.payment.PaymentDTO;
import com.clx.performance.enums.*;
......@@ -15,11 +17,15 @@ import com.clx.performance.service.*;
import com.clx.performance.service.child.OrderChildPostService;
import com.clx.performance.vo.pc.OrderChildPoundAuditDetailVO;
import com.msl.common.exception.ServiceSystemException;
import com.msl.common.open.OpenClient;
import com.msl.common.open.RequestConfig;
import com.msl.common.result.Result;
import com.msl.user.data.UserSessionData;
import com.msl.user.utils.TokenUtil;
import com.scm.lms.manage.action.LmsWeighingSignatureAction;
import com.smart.business.sdk.request.dto.WeightChildSignatureDto;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -63,6 +69,8 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
private final OcrRecognitionDao ocrRecognitionDao;
private final OrderChildPostService orderChildPostService;
private final OrderService orderService;
private final LoadAppConfig loadAppConfig;
private final PerformanceSmartCompanyNoConfig companyNoConfig;
@Override
public OrderChildPoundAuditDetailVO getPoundAuditDetail(String childNo) {
......@@ -76,6 +84,7 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
vo.setChildNo(childNo);
vo.setLoadImages(loadImages.stream().map(OrderChildImage::getImage).collect(Collectors.toList()));
vo.setUnloadImages(unloadImages.stream().map(OrderChildImage::getImage).collect(Collectors.toList()));
vo.setLoadNet(poundAuditDetail.getLoadNet());
vo.setUnloadNet(poundAuditDetail.getUnloadNet());
vo.setUnloadPoundNo(poundAuditDetail.getUnloadPoundNo());
......@@ -83,6 +92,7 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
vo.setUnloadRough(poundAuditDetail.getUnloadRough());
vo.setLoadRough(poundAuditDetail.getLoadRough());
vo.setLoadTare(poundAuditDetail.getLoadTare());
vo.setStatus(poundAuditDetail.getStatus());
vo.setRemark(poundAuditDetail.getRemark());
vo.setRejectType(poundAuditDetail.getRejectType());
......@@ -101,24 +111,68 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
vo.setCooperativeCompaniesId(orderInfo.getCooperativeCompaniesId());
vo.setCooperativeCompaniesName(orderInfo.getCooperativeCompaniesName());
//首次回显过磅电子磅单
WeightChildSignatureDto weighingSignature = getWeighingSignature(childNo,SaleBuyEnum.Type.BUY.getCode());//获取电子磅单图片 类型:1-销售,2-采购
if(Objects.nonNull(weighingSignature)){
if(vo.getUnloadTare()== null && weighingSignature.getTare()!=null){//卸车皮重
vo.setUnloadTare(weighingSignature.getTare());
}
if(vo.getUnloadRough()== null && weighingSignature.getRough()!=null){//卸车毛重
vo.setUnloadRough(weighingSignature.getRough());
}
}
return vo;
}
public WeightChildSignatureDto getWeighingSignature(String childNo,Integer type){
App app = loadAppConfig.getApp(AppEnum.UniqueIdentifier.LMS_MANAGE.getCode());//对接物流子系统配置信息
//组装配置信息
RequestConfig config = new RequestConfig()
.setAppId(app.getAppNo())
.setAppKey(app.getAppKey())
.setGatewayUrl(app.getCallback());
//通过运单号码查询电子磅单图片
LmsWeighingSignatureAction weightAction = new LmsWeighingSignatureAction();
weightAction.setChildNo(childNo);
weightAction.setCustomerRelationNo(String.valueOf(companyNoConfig.getCompanyNo()));
weightAction.setType(type);
log.info("接口请求电子磅单参数,{}",weightAction);
Result<WeightChildSignatureDto> weighSignature = OpenClient.doAction(config, weightAction);
log.info("接口请求电子磅单返回结果,{}",weighSignature);
//数据处理
if(Objects.equals(weighSignature.getCode(),0)){
WeightChildSignatureDto weighSignatures = weighSignature.getData();
return weighSignatures;
}
return new WeightChildSignatureDto();
}
@Override
@Transactional(rollbackFor = Exception.class)
public void updatePoundAudit(PoundAuditParam param) {
//运单详情
OrderChild orderChild = orderChildDao.getByChildNo(param.getChildNo()).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
BigDecimal loadNet = param.getLoadRough().subtract(param.getLoadTare());
if (loadNet.compareTo(new BigDecimal(99)) > 0) {
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_LOAD_NET_ERROR);
}
if (param.getLoadTare().compareTo(param.getLoadRough()) > 0) {
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_TRACE_GT_ROUGH);
BigDecimal loadNet = orderChild.getLoadNet();
BigDecimal unLoadNet = orderChild.getUnloadNet();
if (Objects.equals(param.getStatus(), OrderChildPoundAuditEnum.Status.APPROVED.getCode())) {
loadNet = param.getLoadRough().subtract(param.getLoadTare());
if (loadNet.compareTo(new BigDecimal(99)) > 0) {
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_LOAD_NET_ERROR);
}
if (param.getLoadTare().compareTo(param.getLoadRough()) > 0) {
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_TRACE_GT_ROUGH);
}
unLoadNet = param.getUnloadRough().subtract(param.getUnloadTare());
}
BigDecimal unLoadNet = param.getUnloadRough().subtract(param.getUnloadTare());
if(OrderChildEnum.CANCEL_lIST.contains(orderChild.getStatus())){
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_CANCELED);
}
......
......@@ -94,7 +94,6 @@ import com.purchase.manage.action.SupplyChainSupervisionLoadTruckAction;
import com.purchase.manage.dto.SupervisionLoadInfoDto;
import com.purchase.manage.dto.SupervisionLoadTruckInfoDto;
import com.scm.lms.manage.action.LmsWeighingSignatureAction;
import com.smart.business.sdk.request.dto.WeighingSignatureDto;
import com.smart.business.sdk.request.dto.WeightChildSignatureDto;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
......
......@@ -19,8 +19,13 @@ import com.clx.performance.model.settle.SettlementOwnerDetail;
import com.clx.performance.service.broker.OrderChildBrokerMqHandlerService;
import com.clx.performance.service.broker.OrderChildBrokerMqService;
import com.clx.performance.service.broker.OrderChildBrokerService;
<<<<<<< HEAD
import com.clx.performance.service.settle.SettlementPostService;
import com.clx.performance.vo.mq.broker.BrokerOrderChildDriverPayMqParam;
=======
import com.clx.performance.vo.mq.broker.BrokerOrderChildDriverPayMqParam;
import com.clx.performance.service.settle.SettlementPostService;
>>>>>>> master
import com.clx.performance.vo.mq.broker.BrokerOrderChildSyncMqParam;
import com.clx.performance.vo.mq.broker.BrokerOrderChildUpdateMqParam;
import lombok.extern.slf4j.Slf4j;
......
......@@ -260,6 +260,7 @@ public class OrderChildBrokerServiceImpl implements OrderChildBrokerService {
orderChildInfo.setSourceGoodsNo(orderChild.getOrderGoodsNo());
orderChildInfo.setSourceOrderNo(orderChild.getOrderNo());
orderChildInfo.setSourceSettlementNo(settlementOwnerDetail.getSettlementNo());
orderChildInfo.setOrderSource(orderChild.getOrderSource());
orderChildInfo.setFreight(orderChild.getFreightPrice()
.multiply(orderChild.getUnloadNet().min(orderChild.getLoadNet()))
......@@ -287,6 +288,10 @@ public class OrderChildBrokerServiceImpl implements OrderChildBrokerService {
orderChildInfo.setReceiveTare(orderChild.getUnloadTare());
orderChildInfo.setReceiveRough(orderChild.getUnloadRough());
orderChildInfo.setReceiveNet(orderChild.getUnloadNet());
orderChildInfo.setRealNet(settlementOwnerDetail.getWeight());
orderChildInfo.setInvoiceServiceFee(settlementOwnerDetail.getInvoiceServiceFee().intValue());
orderChildInfo.setInvoiceFlag(settlementOwnerDetail.getInvoiceType()==null? null
:Objects.equals(settlementOwnerDetail.getInvoiceType(),
SettlementOwnerEnum.InvoiceType.ONLINE.getCode())? 2 : 1);
......
......@@ -94,6 +94,15 @@ public class SettlementOrderChildRiskServiceImpl implements SettlementOrderChild
settlementDriverDetailDao.updateConvertOrdinary(settlementDriverDetail);
settlementOrderChildRisk.setInvoiceType(settlementOwnerDetail.getInvoiceType());
if (settlementDriver != null) {
settlementDriver.setInvoiceType(settlementDriverDetail.getInvoiceType());
settlementDriver.setInvoicingCompanyId(settlementDriverDetail.getInvoicingCompanyId());
settlementDriver.setInvoicingCompanyShorterName(settlementDriverDetail.getInvoicingCompanyShorterName());
settlementDriver.setInvoicingCompanyGroupCode(settlementDriverDetail.getInvoicingCompanyGroupCode());
settlementDriver.setPrepayFreightFlag(settlementDriverDetail.getPrepayFreightFlag());
settlementDriverDao.updateInvoiceCompany(settlementDriver);
}
}
else {
// 状态回滚
......
......@@ -30,6 +30,7 @@ import com.clx.performance.model.settle.SettlementPlatformAccount;
import com.clx.performance.param.pc.owner.*;
import com.clx.performance.service.OwnerAccountService;
import com.clx.performance.service.PlatformAccountConfigService;
import com.clx.performance.service.broker.OrderChildBrokerMqService;
import com.clx.performance.service.settle.SettlementLogService;
import com.clx.performance.service.settle.SettlementMqHandlerService;
import com.clx.performance.service.settle.SettlementOwnerService;
......@@ -99,7 +100,7 @@ public class SettlementOwnerServiceImpl implements SettlementOwnerService {
private final PlatformAccountConfigService platformAccountConfigService;
private final OrderFeign orderFeign;
private final BreakContractSettlementOwnerDao breakContractSettlementOwnerDao;
private final OrderChildBrokerMqService orderChildBrokerMqService;
@Override
......@@ -893,6 +894,10 @@ public class SettlementOwnerServiceImpl implements SettlementOwnerService {
settlementOwnerDao.saveEntity(merge);
//更新货主运单计费明细
settlementOwnerDetailDao.updateSettlementMerge(settlementNo,settlementNos);
List<SettlementOwnerDetail> settlementOwnerDetailList = settlementOwnerDetailDao.getBySettlementNo(settlementNo);
// 发送mq (运单更新)
orderChildBrokerMqService.orderChildUpdate(settlementOwnerDetailList.stream().map(item->item.getChildNo()).collect(Collectors.toList()));
}
}
......@@ -15,7 +15,13 @@ public interface SettlementPostService {
void updateInvoice(List<String> childNoList);
<<<<<<< HEAD
void riskAdd(Integer id);
void driverSettle(String childNo);
=======
void driverSettle(String childNo);
void riskAdd(Integer id);
>>>>>>> master
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论