|
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.pj.api.pushfee.tools.EncryptTools;
|
|
|
import com.pj.api.pushfee.tools.message.api.OdsOrderPayDetailDTO;
|
|
|
import com.pj.api.pushfee.tools.message.api.OrderPayDetailMessage;
|
|
|
+import com.pj.current.config.PartConfig;
|
|
|
import com.pj.project.tb_fee_details.TbFeeDetails;
|
|
|
import com.pj.project.tb_fee_details.TbFeeDetailsService;
|
|
|
import com.pj.utils.cache.RedisUtil;
|
|
@@ -15,6 +16,7 @@ import org.springframework.stereotype.Component;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.io.IOException;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
@@ -28,6 +30,8 @@ import java.util.List;
|
|
|
public class FeeDetailSyncTask {
|
|
|
@Resource
|
|
|
TbFeeDetailsService tbFeeDetailsService;
|
|
|
+ @Resource
|
|
|
+ PartConfig partConfig;
|
|
|
|
|
|
//客户端公私钥
|
|
|
public static final String f_remotePublicKeyBase6 = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCb5yK85EKqwiQU+z1jyjOng6ecssQpEjC6STbCuSWN6KHLkijBxdqrCumXhbIyOVx4lHK9Rg5EjzlQxoaXQTgJdItaGjLC+UTE+NNAnnaFLg0x4jajNpLo473zdZxTYQaT3q/aKnTeXuKHw11PPUe4hmmfxPcdt9yJ0Iqo/XxV3QIDAQAB";
|
|
@@ -48,6 +52,9 @@ public class FeeDetailSyncTask {
|
|
|
*/
|
|
|
@Scheduled(fixedRate = 300000)
|
|
|
public void send() {
|
|
|
+// if(partConfig.isTestEnv()){
|
|
|
+// return;
|
|
|
+// }
|
|
|
Date startTime;
|
|
|
Integer timeSpan;
|
|
|
//先从redis中获取startTime
|
|
@@ -120,24 +127,26 @@ public class FeeDetailSyncTask {
|
|
|
OdsOrderPayDetailDTO opd = new OdsOrderPayDetailDTO();
|
|
|
opd.setSysId("hd").setSysName("华东场站系统").setYieldId("hd-a1").setYieldName("华东A1园区")
|
|
|
.setSyncType("insert").setBatch("1")
|
|
|
- .setDwDt("20220725").setDwTm("163206").setUniqId("YRTFHFHFHFEWWR43645757");
|
|
|
+ .setDwDt("20220725").setDwTm("163206");
|
|
|
+
|
|
|
|
|
|
String bizNo = fd.getBusinessNo();
|
|
|
if(fd.getFeeType() == TbFeeDetails.fee.PARK_FEE.getCode()){
|
|
|
bizNo = fd.getBusinessCarNo();
|
|
|
}
|
|
|
- opd.setBizNo(bizNo)
|
|
|
+ opd.setUniqId(fd.getId()).setBizNo(bizNo)
|
|
|
.setChargeItemId(fd.getFeeType()+"").setChargeItemName(TbFeeDetails.fee.getDesc(fd.getFeeType()))
|
|
|
.setBizTypeId(fd.getItemTypeId()).setBizTypeName(fd.getItemTypeName())
|
|
|
.setCarTypId(fd.getItemId()).setCarTypName(fd.getItemName())
|
|
|
.setCarNo(fd.getCarNo())
|
|
|
- .setWeight(fd.getWeight() != null ? fd.getWeight()+"": "0")
|
|
|
+ .setWeight(fd.getWeight() != null ? fd.getWeight()+"kg": "0kg")
|
|
|
.setNum(fd.getNum()+"")
|
|
|
- .setPrice(fd.getUnitPrice().toString()).setTotalPrice(fd.getItemPrice().toString())
|
|
|
- .setSettleStatusName("已结算")
|
|
|
- .setTaxRate(fd.getTaxRate().toString()).setTaxPayment(fd.getTaxPrice().toString())
|
|
|
- .setTaxAmount(fd.getItemPrice().toString()).setNoTaxAmount(fd.getNoTaxPrice().toString())
|
|
|
- .setPaymentWayName("微信支付")
|
|
|
+ .setPrice(fd.getUnitPrice().toString()+"元").setTotalPrice(fd.getItemPrice().toString()+"元")
|
|
|
+ .setSettleStatusName("已结算").setSettleStatusId(fd.getIsSettle()+"")
|
|
|
+ .setTaxRate(fd.getTaxRate().multiply(BigDecimal.valueOf(100)).toString()+"%")
|
|
|
+ .setTaxPayment(fd.getTaxPrice().toString()+"元")
|
|
|
+ .setTaxAmount(fd.getItemPrice().toString()+"元").setNoTaxAmount(fd.getNoTaxPrice().toString()+"元")
|
|
|
+ .setPaymentWayName("微信支付").setPaymentWayId(fd.getPayType()+"")
|
|
|
.setPayNo(fd.getTransactionId())
|
|
|
.setWorkNo(fd.getBusinessItemNo())
|
|
|
.setCustName(fd.getEntityName()).setPartnerName(fd.getPickCustomerName()).setAgentName(fd.getCustomerName())
|