瀏覽代碼

Merge remote-tracking branch 'origin/master'

master
qiubh 5 天之前
父節點
當前提交
6f17797872

+ 6
- 0
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/manager/issueOrder/IssueOrderQueryManageImpl.java 查看文件

@@ -6,6 +6,7 @@ import cn.com.taiji.common.model.dao.Pagination;
import cn.com.taiji.core.entity.ass.AssAgencyConfig;
import cn.com.taiji.core.entity.basic.QtkAgency;
import cn.com.taiji.core.entity.basic.QtkCardInfo;
import cn.com.taiji.core.entity.basic.QtkObuInfo;
import cn.com.taiji.core.entity.basic.QtkServiceHall;
import cn.com.taiji.core.entity.dict.basic.CardType;
import cn.com.taiji.core.entity.dict.basic.SourceType;
@@ -22,6 +23,7 @@ import cn.com.taiji.core.model.comm.protocol.ias.order.*;
import cn.com.taiji.core.repo.jpa.ass.AssAgencyConfigRepo;
import cn.com.taiji.core.repo.jpa.basic.QtkAgencyRepo;
import cn.com.taiji.core.repo.jpa.basic.QtkCardInfoRepo;
import cn.com.taiji.core.repo.jpa.basic.QtkObuInfoRepo;
import cn.com.taiji.core.repo.jpa.basic.QtkServicehallRepo;
import cn.com.taiji.core.repo.jpa.invw.InvwCardDetailsRepo;
import cn.com.taiji.core.repo.jpa.invw.InvwObuDetailsRepo;
@@ -90,6 +92,8 @@ public class IssueOrderQueryManageImpl extends AbstractManagewManager implements
private AssAgencyConfigRepo assAgencyConfigRepo;
@Autowired
private QtkCardInfoRepo qtkCardInfoRepo;
@Autowired
private QtkObuInfoRepo qtkObuInfoRepo;

@Override
public Pagination page(OrderPageReqDTO reqDto) {
@@ -385,6 +389,8 @@ public class IssueOrderQueryManageImpl extends AbstractManagewManager implements
activeInfoModel.setObuExpireTime(issueOrderinfo.getObuExpireTime());
QtkCardInfo cardInfo = qtkCardInfoRepo.findByCardId(issueOrderinfo.getCardId());
activeInfoModel.setWarrantyDate(cardInfo.getWarrantyDate());
QtkObuInfo obuInfo = qtkObuInfoRepo.findByObuId(issueOrderinfo.getObuId());
activeInfoModel.setObuWarrantyDate(obuInfo.getWarrantyDate());
return activeInfoModel;
}


+ 3
- 1
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/model/issueOrder/ActiveInfoModel.java 查看文件

@@ -38,6 +38,8 @@ public class ActiveInfoModel {
private LocalDateTime obuEnableTime;//obu启用时间
@ApiModelProperty(value = "obu到期时间")
private LocalDateTime obuExpireTime;//obu到期时间
@ApiModelProperty(value = "质保期")
@ApiModelProperty(value = "质保期")
private LocalDateTime warrantyDate;
@ApiModelProperty(value = "obu质保期")
private LocalDateTime obuWarrantyDate;
}

+ 131
- 4
zhywpt-app-managew/src/test/java/cn/com/taiji/managew/manager/TestSampleRepo.java 查看文件

@@ -2,12 +2,27 @@ package cn.com.taiji.managew.manager;


import cn.com.taiji.common.manager.ManagerException;
import cn.com.taiji.common.pub.TimeTools;
import cn.com.taiji.common.pub.json.JsonTools;
import cn.com.taiji.core.entity.basic.QtkServiceHall;
import cn.com.taiji.core.entity.basic.QtkServiceHallBak;
import cn.com.taiji.core.entity.basic.QtkServicehallLocation;
import cn.com.taiji.core.entity.basic.QtkServicehallLocationBak;
import cn.com.taiji.core.entity.dict.issue.OrderPayStatus;
import cn.com.taiji.core.entity.issue.IssueOrderPay;
import cn.com.taiji.core.entity.issue.IssueOrderinfo;
import cn.com.taiji.core.manager.tools.issue.QdCallUtil;
import cn.com.taiji.core.model.comm.protocol.SignJsonRequest;
import cn.com.taiji.core.model.comm.protocol.ats.model.CallbackModel;
import cn.com.taiji.core.model.comm.protocol.ats.model.PayInfoModelQd;
import cn.com.taiji.core.model.comm.protocol.ats.weiXin.AtsQueryPayResultV2Request;
import cn.com.taiji.core.model.comm.protocol.ats.weiXin.AtsQueryPayResultV2Response;
import cn.com.taiji.core.repo.jpa.basic.QtkServicehallBakRepo;
import cn.com.taiji.core.repo.jpa.basic.QtkServicehallLocationBakRepo;
import cn.com.taiji.core.repo.jpa.basic.QtkServicehallLocationRepo;
import cn.com.taiji.core.repo.jpa.basic.QtkServicehallRepo;
import cn.com.taiji.core.repo.jpa.issue.IssueOrderPayRepo;
import cn.com.taiji.core.repo.jpa.issue.IssueOrderinfoRepo;
import cn.com.taiji.managew.Application;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -18,7 +33,9 @@ import cn.com.taiji.managew.repo.jpa.SampleRepo;
import cn.com.taiji.managew.repo.jpa.request.SamplePageRequest1;
import cn.com.taiji.managew.repo.jpa.request.SamplePageRequest2;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

@SpringBootTest(classes = Application.class)
public class TestSampleRepo extends AbstractCommManager {
@@ -77,20 +94,130 @@ public class TestSampleRepo extends AbstractCommManager {

@Autowired
private QtkServicehallRepo qtkServicehallRepo;
@Autowired
private QtkServicehallBakRepo qtkServicehallBakRepo;
@Autowired
private QtkServicehallLocationRepo qtkServicehallLocationRepo;
@Autowired
private QtkServicehallLocationBakRepo qtkServicehallLocationBakRepo;
@Test
public void test(){
QtkServiceHall serviceHallId = qtkServicehallRepo.findByServiceHallId("5201010600401140003");
System.out.println(serviceHallId.toJson(true));
List<QtkServiceHall> all = qtkServicehallRepo.findAll();
List<QtkServiceHallBak> collect = all.stream().map(t -> {
QtkServiceHallBak qtkServiceHallBak = t.copyTo(new QtkServiceHallBak());
return qtkServiceHallBak;
}).collect(Collectors.toList());
qtkServicehallBakRepo.persistAll(collect);

}

@Autowired
private IssueOrderPayRepo orderPayRepo;

@Autowired
private IssueOrderinfoRepo issueOrderinfoRepo;
@Autowired
private IssueOrderPayRepo issueOrderPayRepo;
@Autowired
private QdCallUtil qdCallUtil;

// 通知渠道
@Test
public void te(){
List<IssueOrderPay> pays = orderPayRepo.listByOrderNo("20250701213433520101060047900994");
System.out.println(pays.toString());
// IssueOrderinfo orderinfo = issueOrderinfoRepo.findByOrderNo("20250818094233520101069987157313");
// qdCallUtil.callBackQd(orderinfo, "");
// System.out.println("通知结束");


ArrayList<String> strings = new ArrayList<>();
strings.add("20250819125314520101069983085312");
strings.add("20250819142756520101069982769829");
strings.add("20250819145320520101069985333300");
strings.add("20250819141020520101069989743065");
strings.add("20250819145943520101069987460924");
strings.add("20250819131025520101069985825276");
strings.add("20250819133204520101069981692823");
strings.add("20250819133918520101069981506822");
strings.add("20250819101831520101069982651837");
strings.add("20250819125139520101069982630176");
strings.add("20250819094822520101069985813805");
strings.add("20250819131128520101069984913148");
strings.add("20250819124434520101069981876895");
strings.add("20250819165939520101069982170803");
strings.add("20250819151715520101069988732580");
strings.add("20250818094233520101069987157313");
strings.add("20250819142307520101069982163714");
strings.add("20250819163601520101069984329487");
strings.add("20250819143812520101069988499158");
strings.add("20250819162145520101069985840495");
strings.add("20250819183537520101069982772533");
strings.add("20250819195705520101069986834491");
strings.add("20250819160655520101069981655736");
strings.add("20250819131604520101069983525713");
strings.add("20250819144920520101069982815124");



ArrayList<CallbackModel> callbackModels = new ArrayList<>();
for (String orrr : strings) {
IssueOrderinfo order = issueOrderinfoRepo.findByOrderNo(orrr);
if (order == null) continue;
List<IssueOrderPay> pays = issueOrderPayRepo.listByOrderNo(orrr);
CallbackModel callbackModel = new CallbackModel();
callbackModel.setOrderNo(order.getOrderNo())
.setOrderStep(order.getOrderStep().getCode())
.setOrderStatus(order.getOrderStatus().getCode())
.setCardId(order.getCardId())
.setObuId(order.getObuId())
.setPlateNum(order.getVehiclePlate())
.setPlateColor(order.getVehiclePlateColor());
if (order.getActivationTime() != null){
callbackModel.setActiveTime(order.getActivationTime().format(TimeTools.ISO_LOCAL_DATE_TIME));
}
List<OrderPayStatus> list = pays.stream().map(IssueOrderPay::getPayStatus).collect(Collectors.toList());

if (!isEmpty(pays)) {
boolean b = list.stream().allMatch(t -> t == OrderPayStatus.SUCCESS);
if (b) {
//全部支付成功,返回支付信息
List<PayInfoModelQd> payInfoList = pays.stream().map(pay -> {
PayInfoModelQd payInfoModelQd = new PayInfoModelQd();
payInfoModelQd.setPayTime(pay.getPayTime().format(TimeTools.ISO_LOCAL_DATE_TIME));
payInfoModelQd.setPayOrderNo(pay.getPayOrderNo());
payInfoModelQd.setExternalOrderNo(pay.getExternalOrderNo());
payInfoModelQd.setFee(pay.getFee());
return payInfoModelQd;
}).collect(Collectors.toList());
callbackModel.setPayInfoList(payInfoList);
}
}
callbackModels.add(callbackModel);
}
String jsonStr = JsonTools.asJsonStr(callbackModels);
System.out.println(jsonStr);

}

@Test
public void testRsssepo() {
SignJsonRequest signJsonRequest = new SignJsonRequest();
signJsonRequest.setAppId("52106998")
.setIfCode("ISSUES_VALID_VEHICLEPLATECHECK")
.setReqId("52106998_20250821142606150_22711")
.setEncryptType("SM4")
.setSignType("SM3")
.setTimestamp("2025-08-21T14:26:06")
.setBizContent("uB1CelotmAARNUDxbe60B7IcVO5+2i6MdCv8QWTGsvEc9O6iGD2qilFWdZf2hzUDS3emZKEmtS3FXCPeQ+P+dW" +
"YJNv9DRXx5WTkXWDlYcx5f22UBschJ0CyFjncX+HXsN0e80GBUDWzDN6WEgSIvER67e86yutb1pOCBBvwV8xMyM5CqP4RKg9" +
"dQ9Zq/m2jJee3kIIWFzLj7ZMTK+zHqlRmtAtkm5c/q4755opU/" +
"Zb6b5b4CxJN60aJfsYLYlWxa0wVRshcyVKfGvH70R/ImSFRCbovjeLmrCWyWEBKRcSM=")
.setSign(signJsonRequest.toSignContent("T1RnME5qUTJaVE5qT0RRNE5HRXdZVGszTWpOa1kyWTFNRE5pWm1ReU5qQmZNakF5TkRBeE1UVT0="));
System.out.println(signJsonRequest.toJson(true));

}





}

+ 19
- 0
zhywpt-service-ats/lib/postmsg.conf 查看文件

@@ -0,0 +1,19 @@

#********** XuanWu SDK **********

#********** Logger(depends on commons-logging) **********
sdk.logger.enable=true
# Business level logs
sdk.logger.biz.enable=true

#********** User Profiles **********
sdk.userProfiles.enable=true
sdk.userProfiles.serverUrl=http://profiles.139130.com/profiles/pub/mos/user/getUserProfiles
# Fetch interval, must be greater than 0
sdk.userProfiles.fetchIntervalSeconds=30

#********** High Availability **********
sdk.highAvailability.enable=true

#********** Performance Monitor **********
sdk.monitor.enable=false

+ 18
- 18
zhywpt-service-ats/src/main/java/cn/com/taiji/ats/manager/hltSendShort/SendShortManager.java 查看文件

@@ -86,31 +86,30 @@ public class SendShortManager {
}

public UpwardShortQueryResponse upwardShort(UpwardShortQueryRequest request) throws ServiceHandleException {
// MTReport mtReport = new MTReport();
// mtReport.setId("f97f1629be7e4363b1f109bc447ad594");
// mtReport.setBatchID("123");
// mtReport.setPhone("13888889999");
// mtReport.setMsgID("测试");
// mtReport.setCustomMsgID("13888889999");
// mtReport.setState(1);
// mtReport.setSubmitTime(1755484481);
// mtReport.setDoneTime(1755484492);
List<MTReport> list = test(request.getFetchSize());
// list.add(mtReport);
List<MTReport> list = getUpward(request.getFetchSize());
UpwardShortQueryResponse response = new UpwardShortQueryResponse();
response.setMTReports(list);
return response;
}

public List<MTReport> test(int fetchSize) {
Account account = new Account("admin@test1", "123456"); // 账号
final PostMsg pm = new PostMsg(false, 7000, 1); // 注意, 请使用单例模式, 而非每次下发new一次
pm.getCmHost().setHost("192.168.100.44", 9080); //设置网关的IP和port,用于发送信息
pm.getWsHost().setHost("192.168.100.44", 9070);
// pm.getCmHost().setHost("211.147.239.62", 9080); //设置网关的IP和port,用于发送信息
// pm.getWsHost().setHost("211.147.239.62", 9070);
// private static PostMsg pm;
// static {
// pm = new PostMsg();
// // 内网地址
// // 设置发送短信的网关
// pm.getCmHost().setHost("192.168.100.112", 8090);
// // 设置用户获取账号信息、上行、状态报告等的网关
// pm.getWsHost().setHost("192.168.100.112", 8088);
// }
public List<MTReport> getUpward(int fetchSize) {
System.out.println("-----------------------------------开始初始化------------------------------------");
Account account = new Account("QTZL20240529", "ATuwRFkX"); // 账号
PostMsg pm = new PostMsg();
pm.getCmHost().setHost("192.168.100.112", 9080);
pm.getWsHost().setHost("192.168.100.112", 8088);
MOMsg[] mos = new MOMsg[0];
List<MTReport> mtReportList = new ArrayList<>();
System.out.println("-----------------------------------开始访问------------------------------------");
try {
mos = pm.getMOMsgs(account, fetchSize);
} catch (Exception e) {
@@ -124,6 +123,7 @@ public class SendShortManager {
mtReportList.add(mtReport);
}
}
System.out.println("-----------------------------------访问结束------------------------------------");
return mtReportList;
}


Loading…
取消
儲存