@@ -55,7 +55,7 @@ public class AssDeviceCancel extends AbstractStringPropertyUUIDEntity { | |||
/**退费*/ | |||
@Column(name = "OPERATE_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private RefundOperateType operateType;//退款方式 | |||
private RefundOperateType operateType;//退款方式,为BANK时要补充银行相关信息 | |||
@NotNull | |||
@Column(name = "REFUND_FEE") | |||
private Integer refundFee;// 退款金额,无需退款时为0 |
@@ -87,6 +87,6 @@ public class InvwCardDetails extends StringPropertyUUIDEntity { | |||
@Enumerated(EnumType.STRING) | |||
private OwnType ownType;// 产权类型 | |||
@Column(name = "SINGLE_CHIP") | |||
private Boolean singleChip; | |||
private Boolean singleChip; //单片式 | |||
} |
@@ -6,6 +6,7 @@ import cn.com.taiji.common.pub.CommonAbstract; | |||
import cn.com.taiji.common.pub.TimeTools; | |||
import cn.com.taiji.common.pub.json.JsonTools; | |||
import cn.com.taiji.core.entity.ass.AssAgencyConfig; | |||
import cn.com.taiji.core.entity.dict.issue.OrderPayStatus; | |||
import cn.com.taiji.core.entity.dict.issue.OrderType; | |||
import cn.com.taiji.core.entity.issue.IssueOrderChannelNotice; | |||
import cn.com.taiji.core.entity.issue.IssueOrderPay; | |||
@@ -60,16 +61,26 @@ public class QdCallUtil extends CommonAbstract { | |||
.setObuId(order.getObuId()) | |||
.setPlateNum(order.getVehiclePlate()) | |||
.setPlateColor(order.getVehiclePlateColor()); | |||
if (order.getActivationTime() != null){ | |||
callbackModel.setActiveTime(order.getActivationTime().format(TimeTools.ISO_LOCAL_DATE_TIME)); | |||
} | |||
List<IssueOrderPay> pays = orderPayRepo.listByOrderNo(order.getOrderNo()); | |||
List<OrderPayStatus> list = pays.stream().map(IssueOrderPay::getPayStatus).collect(Collectors.toList()); | |||
if (!isEmpty(pays)) { | |||
List<PayInfoModelQd> payInfoList = pays.stream().map(pay -> { | |||
PayInfoModelQd payInfoModelQd = new PayInfoModelQd(); | |||
payInfoModelQd.setPayTime(pay.getPayTime().format(TimeTools.ISO_LOCAL_DATE_TIME)); | |||
payInfoModelQd.setPayOrderNo(pay.getExternalOrderNo()); | |||
payInfoModelQd.setFee(pay.getFee()); | |||
return payInfoModelQd; | |||
}).collect(Collectors.toList()); | |||
callbackModel.setPayInfoList(payInfoList); | |||
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); | |||
} | |||
} | |||
AssAgencyConfig agencyConfig = assAgencyConfigRepo.findByAgencyId(order.getAgencyId()); | |||
if (agencyConfig == null || !hasText(agencyConfig.getNoticeUrl())){ |
@@ -8,7 +8,8 @@ import lombok.Setter; | |||
@Setter | |||
public class PayInfoModelQd extends BaseModel { | |||
private String payOrderNo; | |||
private String payOrderNo;//商户单号 | |||
private String externalOrderNo;//交易单号 | |||
private Long fee; | |||
private String payTime; | |||
} |
@@ -0,0 +1,30 @@ | |||
package cn.com.taiji.core.model.comm.protocol.ias.order; | |||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeRequest; | |||
import cn.com.taiji.core.model.comm.protocol.constraint.IntegerConstant; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
/** | |||
* @Author:ChenChao | |||
* @Date:2025/8/19 22:31 | |||
* @Filename:GetCarSignRequest | |||
* @description: | |||
*/ | |||
@Getter | |||
@Setter | |||
public class GetCarSignRequest extends AbstractSignTypeRequest<GetCarSignResponse> { | |||
public GetCarSignRequest() { | |||
super(OrderServiceCmd.GETCARSIGN); | |||
} | |||
@NotBlank | |||
private String orderNo; //订单编号 | |||
@NotNull | |||
@IntegerConstant(values = "1,2") | |||
private Integer signChannelType=1;// 1:微信小程序 2:支付宝小程序 | |||
@NotBlank | |||
private String subOpenId;// signChannelType=1或2时必填,填黔通微信或支付宝小程序的openId, | |||
} |
@@ -0,0 +1,52 @@ | |||
package cn.com.taiji.core.model.comm.protocol.ias.order; | |||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeResponse; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
/** | |||
* @Author:ChenChao | |||
* @Date:2025/8/19 22:31 | |||
* @Filename:GetCarSignResponse | |||
* @description: 获取签约参数响应 | |||
*/ | |||
@Getter | |||
@Setter | |||
public class GetCarSignResponse extends AbstractSignTypeResponse { | |||
private String userState;//用户签约状态 是 | |||
private String deductMode;//发起扣费方式PROACTIVE:表示用户主动发起的免密支付 AUTOPAY:表示用户无感的支付 否 | |||
private String plateNumberInfo;//车牌信息 否 | |||
//=====================前端请求微信签约参数==============参与签名字段 + | |||
private String appId;//请求appid 是 + | |||
private String mchId;//商户号 是 + | |||
private String subMchId;//子商户号 是 + | |||
private String subAppId;//子商户公众账号id 是 + | |||
private String nonceStr;//随机字符串 是 + | |||
private String signType;//签名类型 是 + | |||
private String sign;//签名 是 | |||
private String tradeScene = "HIGHWAY";//交易场景 写死 是 + | |||
private String openId;//用户标识 否 | |||
private String subOpenId;//用户子标识 是 + | |||
private String plateNumber;//车牌号 是 + | |||
private String channelType = "ETC";//通道类型 写死 ETC + | |||
private String path;//跳转路径 是 | |||
private String preopenId;//V3黄牌 签约参数 | |||
} |
@@ -15,6 +15,7 @@ public enum OrderServiceCmd implements SignServiceCommand { | |||
STATUSQUERY("状态查询", OrderStatusQueryRequest.class), | |||
PAYAPPLY("支付申请", OrderPayApplyRequest.class), | |||
PAYQUERY("支付查询", OrderPayQueryRequest.class), | |||
GETCARSIGN("获取签约参数", GetCarSignRequest.class), | |||
SIGNQUERY("签约检测", SignQueryRequest.class), | |||
TRANSACTION("事务同步", OrderTransactionRequest.class), | |||
PRODUCTQUERY("获取产品列表", ProductQueryRequest.class), |
@@ -7,7 +7,8 @@ import lombok.Setter; | |||
@Getter | |||
@Setter | |||
public class PayInfoModel extends BaseModel { | |||
private String payOrderNo; | |||
private String payOrderNo;//商户单号 | |||
private String externalOrderNo;//交易单号 | |||
private Long fee; | |||
private String payTime; | |||
} |
@@ -1,5 +1,6 @@ | |||
package cn.com.taiji.core.model.comm.protocol.ias.order; | |||
import cn.com.taiji.core.entity.dict.issue.IssueOrderStep; | |||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeResponse; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@@ -29,6 +30,8 @@ public class SignQueryResponse extends AbstractSignTypeResponse { | |||
// private String sellerId; | |||
// private String sellerAppId; | |||
private IssueOrderStep step;//订单状态 是(不是签约参数,用于通知小程序订单状态) | |||
private String userState;//用户签约状态 是 | |||
@@ -1,5 +1,6 @@ | |||
package cn.com.taiji.iaw.dto.issue.order; | |||
import cn.com.taiji.core.entity.dict.issue.IssueOrderStep; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
@@ -13,6 +14,8 @@ import lombok.Data; | |||
@Data | |||
@ApiModel(description = "签约检测响应") | |||
public class SignQueryResponseDTO { | |||
@ApiModelProperty(value = "订单阶段(通知小程序订单阶段)") | |||
private IssueOrderStep step; | |||
@ApiModelProperty(value = "用户签约状态 UNAUTHORIZED 未签约") | |||
private String userState;//用户签约状态 是 | |||
@@ -82,16 +82,16 @@ public class AppConfig extends AbstractManager { | |||
public SequenceJdbcDao sequenceJdbcDao() { | |||
return new SequenceJdbcDao(dataSource, MyFinals.SEQUENCE_NUM_TABLE, 0L); | |||
} | |||
@Bean | |||
public WebMvcConfigurer corsConfigurer() { | |||
return new WebMvcConfigurer() { | |||
@Override | |||
public void addCorsMappings(CorsRegistry registry) { | |||
registry.addMapping("/**") | |||
.allowedOrigins("*") | |||
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") | |||
.allowedHeaders("*"); | |||
} | |||
}; | |||
} | |||
// @Bean | |||
// public WebMvcConfigurer corsConfigurer() { | |||
// return new WebMvcConfigurer() { | |||
// @Override | |||
// public void addCorsMappings(CorsRegistry registry) { | |||
// registry.addMapping("/**") | |||
// .allowedOrigins("*") | |||
// .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") | |||
// .allowedHeaders("*"); | |||
// } | |||
// }; | |||
// } | |||
} |
@@ -13,7 +13,9 @@ import cn.com.taiji.core.repo.jpa.user.StaffRepo; | |||
import cn.com.taiji.core.repo.request.invw.InvwWarehousePageRequest; | |||
import cn.com.taiji.invw.dto.warehouse.*; | |||
import cn.com.taiji.invw.manager.AbstractInvwManager; | |||
import cn.com.taiji.invw.model.MyFinals; | |||
import cn.com.taiji.invw.model.warehouse.InvwWarehouseIdNameModel; | |||
import org.apache.commons.lang3.ObjectUtils; | |||
import org.springframework.beans.BeanUtils; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
@@ -21,6 +23,7 @@ import org.springframework.stereotype.Service; | |||
import java.time.LocalDateTime; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import java.util.Objects; | |||
@Service | |||
public class InvwWarehouseManagerImpl extends AbstractInvwManager implements InvwWarehouseManager { | |||
@@ -45,12 +48,15 @@ public class InvwWarehouseManagerImpl extends AbstractInvwManager implements Inv | |||
req.setInsertTimeEnd(request.getInsertTimeEnd().plusDays(1).atStartOfDay()); | |||
} | |||
Staff staff = staffRepo.findByStaffId(request.getStaffId()); | |||
if (staff == null) throw new ManagerException("员工非法!"); | |||
// 如果不是管理员,只能查询本渠道的仓库 | |||
if (!"MANAGER".equals(staff.getIdentityType())) { | |||
String agencyId = staff.getAgencyId(); | |||
if (!hasText(agencyId)) throw new ManagerException("渠道获取失败!"); | |||
req.setAgencyId(agencyId); | |||
if (staff == null) { | |||
throw new ManagerException("员工非法!"); | |||
} | |||
// 如果不是管理员,已及非黔通的只能查询本渠道的仓库 | |||
if (ObjectUtils.isNotEmpty(staff)){ | |||
req.setAgencyId(staff.getAgencyId()); | |||
if ("MANAGER".equals(staff.getIdentityType()) || MyFinals.QTZL_AGENCY_ID.equals(staff.getAgencyId())){ | |||
req.setAgencyId(null); | |||
} | |||
} | |||
return warehouseRepo.page(req).convertResult(this::convert); | |||
} | |||
@@ -146,81 +152,76 @@ public class InvwWarehouseManagerImpl extends AbstractInvwManager implements Inv | |||
if (warehouse == null) { | |||
throw new ManagerException("仓库不存在"); | |||
} | |||
//一级仓库 | |||
if (!hasText(req.getName())) { | |||
throw new ManagerException("仓库名称不能为空"); | |||
} | |||
// 一级仓库 | |||
if (warehouse.getWarehouseLevel() == 1) { | |||
if (hasText(req.getParentId()) || hasText(req.getAgencyId())) { | |||
if (!warehouse.getParentId().equals(req.getParentId()) || !warehouse.getAgencyId().equals(req.getAgencyId())) { | |||
throw new ManagerException("一级仓库只能修改仓库名称"); | |||
} | |||
if (hasText(req.getName())) { | |||
warehouse.setName(req.getName()); | |||
warehouse.setUpdateTime(LocalDateTime.now()); | |||
warehouseRepo.saveAndFlush(warehouse); | |||
} | |||
warehouse.setName(req.getName()); | |||
} else if (warehouse.getWarehouseLevel() == 2) { | |||
//二级仓库 | |||
if (hasText(req.getParentId()) || hasText(req.getAgencyId())) { | |||
//查询下级仓库 | |||
List<InvwWarehouse> warehouseList = warehouseRepo.findChiByIdAndStatus(warehouse.getId(), EnableStatus.ENABLE); | |||
if (warehouseList.size() > 0) { | |||
throw new ManagerException("该仓库有下级仓库,只能修改仓库名称"); | |||
} | |||
long obuCount = obuDetailsRepo.findCountByStoreCode(warehouse.getCode()); | |||
if (obuCount > 0) { | |||
throw new ManagerException("该仓库有设备,只能修改仓库名称"); | |||
} | |||
long cardCount = cardDetailsRepo.findCountByStoreCode(warehouse.getCode()); | |||
if (cardCount > 0) { | |||
throw new ManagerException("该仓库有设备,只能修改仓库名称"); | |||
} | |||
if (hasText(req.getParentId())) { | |||
InvwWarehouse parentWarehouse = warehouseRepo.findById(req.getParentId()).orElse(null); | |||
if (parentWarehouse == null) { | |||
throw new ManagerException("上级仓库不存在"); | |||
} | |||
warehouse.setWarehouseLevel(parentWarehouse.getWarehouseLevel() + 1); | |||
warehouse.setParentId(req.getParentId()); | |||
} | |||
if (hasText(req.getAgencyId())) { | |||
warehouse.setAgencyId(req.getAgencyId()); | |||
} | |||
// 二级仓库 | |||
boolean canModifyStructure = canModifyWarehouseStructure(warehouse.getId(), warehouse.getCode()); | |||
if (!canModifyStructure && (!warehouse.getParentId().equals(req.getParentId()) || !warehouse.getAgencyId().equals(req.getAgencyId()))) { | |||
throw new ManagerException("该仓库有下级仓库或设备,只能修改仓库名称"); | |||
} | |||
if (hasText(req.getName())) { | |||
warehouse.setName(req.getName()); | |||
if (hasText(req.getParentId())) { | |||
InvwWarehouse parentWarehouse = warehouseRepo.findById(req.getParentId()).orElseThrow(() -> new ManagerException("上级仓库不存在")); | |||
warehouse.setParentId(parentWarehouse.getId()); | |||
warehouse.setWarehouseLevel(parentWarehouse.getWarehouseLevel() + 1); | |||
} else { | |||
throw new ManagerException("上级仓库不能为空"); | |||
} | |||
if (hasText(req.getAgencyId())) { | |||
warehouse.setAgencyId(req.getAgencyId()); | |||
} | |||
warehouse.setUpdateTime(LocalDateTime.now()); | |||
warehouseRepo.saveAndFlush(warehouse); | |||
warehouse.setName(req.getName()); | |||
} else if (warehouse.getWarehouseLevel() == 3) { | |||
//三级仓库 | |||
if (hasText(req.getParentId()) || hasText(req.getChannelId())) { | |||
long obuCount = obuDetailsRepo.findCountByStoreCode(warehouse.getCode()); | |||
if (obuCount > 0) { | |||
throw new ManagerException("该仓库有设备,只能修改仓库名称"); | |||
} | |||
long cardCount = cardDetailsRepo.findCountByStoreCode(warehouse.getCode()); | |||
if (cardCount > 0) { | |||
throw new ManagerException("该仓库有设备,只能修改仓库名称"); | |||
} | |||
if (hasText(req.getParentId())) { | |||
InvwWarehouse parentWarehouse = warehouseRepo.findById(req.getParentId()).orElse(null); | |||
if (parentWarehouse == null) { | |||
throw new ManagerException("上级仓库不存在"); | |||
} | |||
warehouse.setWarehouseLevel(parentWarehouse.getWarehouseLevel() + 1); | |||
warehouse.setParentId(req.getParentId()); | |||
} | |||
warehouse.setChannelId(req.getChannelId()); | |||
// 三级仓库 | |||
if (!req.getAgencyId().equals(warehouse.getAgencyId())) { | |||
throw new ManagerException("三级仓库不能修改渠道"); | |||
} | |||
boolean canModifyStructure = canModifyWarehouseStructure(warehouse.getId(), warehouse.getCode()); | |||
if (!canModifyStructure && (!Objects.equals(warehouse.getParentId(), req.getParentId()) || | |||
!Objects.equals(warehouse.getChannelId(), req.getChannelId()))) { | |||
throw new ManagerException("该仓库有设备,只能修改仓库名称"); | |||
} | |||
if (hasText(req.getName())) { | |||
warehouse.setName(req.getName()); | |||
if (hasText(req.getParentId())) { | |||
InvwWarehouse parentWarehouse = warehouseRepo.findById(req.getParentId()).orElseThrow(() -> new ManagerException("上级仓库不存在")); | |||
warehouse.setParentId(parentWarehouse.getId()); | |||
warehouse.setWarehouseLevel(parentWarehouse.getWarehouseLevel() + 1); | |||
} | |||
warehouse.setUpdateTime(LocalDateTime.now()); | |||
warehouseRepo.saveAndFlush(warehouse); | |||
warehouse.setChannelId(req.getChannelId()); | |||
warehouse.setName(req.getName()); | |||
} | |||
warehouse.setUpdateTime(LocalDateTime.now()); | |||
warehouseRepo.saveAndFlush(warehouse); | |||
persistOperateLog(OperateType.UPDATE_WAREHOUSE, warehouse.getId(), req.getOrderSource(), findOpenIdByToken(req.getAccessToken()), "仓库修改"); | |||
} | |||
private boolean canModifyWarehouseStructure(String warehouseId, String warehouseCode) { | |||
// 检查是否有下级仓库 | |||
List<InvwWarehouse> warehouseList = warehouseRepo.findChiByIdAndStatus(warehouseId, EnableStatus.ENABLE); | |||
if (!warehouseList.isEmpty()) { | |||
return false; | |||
} | |||
// 检查设备数量 | |||
long obuCount = obuDetailsRepo.findCountByStoreCode(warehouseCode); | |||
long cardCount = cardDetailsRepo.findCountByStoreCode(warehouseCode); | |||
return obuCount == 0 && cardCount == 0; | |||
} | |||
@Override | |||
public void delete(InvwWarehouseDeleteRequestDTO req) throws ManagerException { | |||
InvwWarehouse warehouse = warehouseRepo.findByIdAndStatus(req.getId(), EnableStatus.ENABLE); |
@@ -494,6 +494,7 @@ public class StaffManagerImpl extends AbstractUserwManager implements StaffManag | |||
//设置该员工所分配的所有,授权系统 | |||
//1、获取openId | |||
AccountInfo accountInfo = accountInfoRepo.findByAccount(staff.getMobile()); | |||
staffVo.setIdNum(accountInfo.getIdNum()); | |||
//2、找到员工所分配的所有系统角色 | |||
List<UserRoleVo> userRoleVoList = null; | |||
if (accountInfo != null && accountInfo.getOpenId() != null && !accountInfo.getOpenId().trim().isEmpty()) { |
@@ -14,6 +14,7 @@ import java.util.List; | |||
public class StaffVo extends BaseModel { | |||
private String id; | |||
private String mobile;// 用户账号(手机号码) | |||
private String idNum;//员工证件号 | |||
private String staffId;// 员工工号 | |||
private String staffName;// 员工姓名 | |||
private Integer staffType;// 员工类型(默认为1) |
@@ -36,7 +36,7 @@ public class OrderCancelManager extends AbstractOrderManager<OrderCancelRequest> | |||
public static final List<IssueOrderStep> ALLOW_CANCEL_STEP = | |||
Arrays.asList(IssueOrderStep.ORDER_INIT, IssueOrderStep.CUSTOMER_UPLOAD, IssueOrderStep.VEHICLE_UPLOAD, | |||
IssueOrderStep.ORDER_PAID, IssueOrderStep.ORDER_SIGNED, IssueOrderStep.WAITING_AUDIT, | |||
IssueOrderStep.AUDIT_FAIL, IssueOrderStep.WAITING_SEND); | |||
IssueOrderStep.AUDIT_FAIL, IssueOrderStep.WAITING_SEND, IssueOrderStep.WAITING_ACTIVE); | |||
protected final String ORDERPAY = "orderPay"; | |||
@@ -79,6 +79,12 @@ public class OrderPayQueryManager extends AbstractOrderManager<OrderPayQueryRequ | |||
// detectionStatus.getValue()); | |||
} | |||
@Override | |||
protected void onSuccessInternal(OrderPayQueryRequest req, ServiceLogEvent event, Map<String, Object> dataStream) throws ServiceHandleException { | |||
IssueOrderinfo order = (IssueOrderinfo)dataStream.get(ORDER); | |||
asyCallBackQd(order, ""); | |||
} | |||
@Override | |||
protected AbstractSignTypeResponse getRes(OrderPayQueryRequest req, ServiceLogEvent event, | |||
Map<String, Object> dataStream) throws ServiceHandleException { |
@@ -4,6 +4,7 @@ import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||
import cn.com.taiji.common.pub.TimeTools; | |||
import cn.com.taiji.core.entity.dict.basic.SourceType; | |||
import cn.com.taiji.core.entity.dict.issue.IssueOrderStep; | |||
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.entity.issue.IssueOrderinfoExt; | |||
@@ -64,20 +65,26 @@ public class OrderStatusQueryManager extends AbstractOrderManager<OrderStatusQue | |||
@Override | |||
protected AbstractSignTypeResponse getRes(OrderStatusQueryRequest req, ServiceLogEvent event, | |||
Map<String, Object> dataStream) throws ServiceHandleException { | |||
OrderStatusQueryResponse res = new OrderStatusQueryResponse(); | |||
IssueOrderinfo order = (IssueOrderinfo)dataStream.get(ORDER); | |||
List<IssueOrderPay> pays = orderPayRepo.listByOrderNo(order.getOrderNo()); | |||
List<PayInfoModel> payInfoList = pays.stream().map(pay -> { | |||
PayInfoModel payInfoModel = new PayInfoModel(); | |||
if (pay.getPayTime()!=null) { | |||
payInfoModel.setPayTime(pay.getPayTime().format(TimeTools.ISO_LOCAL_DATE_TIME)); | |||
if (!isEmpty(pays)){ | |||
List<OrderPayStatus> list = pays.stream().map(IssueOrderPay::getPayStatus).collect(Collectors.toList()); | |||
boolean b = list.stream().allMatch(t -> t == OrderPayStatus.SUCCESS); | |||
if (b) { | |||
//全部支付成功,返回支付信息 | |||
List<PayInfoModel> payInfoList = pays.stream().map(pay -> { | |||
PayInfoModel payInfoModel = new PayInfoModel(); | |||
payInfoModel.setPayTime(pay.getPayTime().format(TimeTools.ISO_LOCAL_DATE_TIME)); | |||
payInfoModel.setPayOrderNo(pay.getPayOrderNo()); | |||
payInfoModel.setExternalOrderNo(pay.getExternalOrderNo()); | |||
payInfoModel.setFee(pay.getFee()); | |||
return payInfoModel; | |||
}).collect(Collectors.toList()); | |||
res.setPayInfoList(payInfoList); | |||
} | |||
payInfoModel.setPayOrderNo(pay.getExternalOrderNo()); | |||
payInfoModel.setFee(pay.getFee()); | |||
return payInfoModel; | |||
}).collect(Collectors.toList()); | |||
OrderStatusQueryResponse res = new OrderStatusQueryResponse(); | |||
res.setPayInfoList(payInfoList); | |||
} | |||
res.setOrderStep(order.getOrderStep().getCode()); | |||
res.setOrderStatus(order.getOrderStatus().getCode()); | |||
res.setCustomerName(order.getCustomerName()); |
@@ -105,6 +105,7 @@ public class SignQueryManager extends AbstractOrderManager<SignQueryRequest> { | |||
} | |||
orderInfoRepo.merge(order); | |||
} | |||
res.setStep(order.getOrderStep()); | |||
dataStream.put(RES, res); | |||
} | |||
@Override |
@@ -2,10 +2,13 @@ package cn.com.taiji.oqs.client.demo; | |||
import cn.com.taiji.common.manager.ManagerException; | |||
import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||
import cn.com.taiji.core.entity.dict.basic.SourceType; | |||
import cn.com.taiji.core.model.comm.protocol.ias.ass.ReleasePlateApplyRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.message.HltSendShortRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.message.HltSendShortResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.order.GetCustomerIdRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.order.GetCustomerIdResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.order.UserUploadRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.vaild.VehiclePlateCheckRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.vaild.VehiclePlateCheckResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ods.oqs.issue.OqsCardQueryRequest; | |||
@@ -68,4 +71,43 @@ public class OneTest extends AbstractCommManager { | |||
OqsCardQueryResponse oqsCardQueryResponse = jsonPostRepeat(request); | |||
System.out.println(oqsCardQueryResponse.toJson(true)); | |||
} | |||
@Test | |||
public void OqsCardQueryRequestTest2() throws ManagerException { | |||
UserUploadRequest request = new UserUploadRequest(); | |||
request.setCustomerIdVld("20441218"); | |||
request.setMobile("19833787623"); | |||
request.setOrderNo("20250818094233520101069987157313"); | |||
request.setUserAddress("山东省济南市历城区遥墙镇四凤闸村东组25号"); | |||
request.setUserIdNum("520403198707285409"); | |||
request.setUserIdType(101); | |||
request.setUserName("张三"); | |||
request.setUserPosImgUrl("zhywpt-issuer/20250818/h5/5f21ee5a71b64c01a49c144a_mmexport1753424081039.jpg"); | |||
request.setUserNegImgUrl("zhywpt-issuer/20250818/h5/6f216174b57b4e98982aa1d0_mmexport1753424083383.jpg"); | |||
jsonPostRepeat(request); | |||
} | |||
@Test | |||
public void tttt() throws ServiceHandleException { | |||
ReleasePlateApplyRequest request = new ReleasePlateApplyRequest(); | |||
request.setAgencyId("52010106004"); | |||
request.setApplyType(1); | |||
request.setChannelId("5201010600401140003"); | |||
request.setCustomerIdNum("350623199807072540"); | |||
request.setIsSelf(1); | |||
request.setMobile("15359873965"); | |||
request.setName("钱川"); | |||
request.setOpenId("e8a6c80903ce4b3096342369a7312bfe"); | |||
request.setSourceType(SourceType.SERVICE_HALL); | |||
request.setUserPosImagesUrl("https://qtzl.etcjz.cn/zhywpt-issuer-test/20250818/app/faf4985138b94b739c8a4247_1755481860690_pic.jpg"); | |||
request.setUserNegImagesUrl("https://qtzl.etcjz.cn/zhywpt-issuer-test/20250818/app/6f00314a492b40cfb6d0cd1b_1755481866170_pic.jpg"); | |||
request.setVehNegImgUrl("https://qtzl.etcjz.cn/zhywpt-issuer-test/20250818/app/9d212870c1d04d73a44f5486_1755481906961435.jpeg"); | |||
request.setVehPosImgUrl("https://qtzl.etcjz.cn/zhywpt-issuer-test/20250818/app/989e7cd9b9494b88a9facd84_175548190027769.jpeg"); | |||
request.setVehicleOwnerName("钱川"); | |||
request.setVehiclePlate("贵Z10020"); | |||
request.setVehiclePlateColor(0); | |||
jsonPostRepeat(request); | |||
} | |||
} |
@@ -14,6 +14,7 @@ import org.apache.commons.compress.utils.Lists; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.time.LocalDateTime; | |||
import java.util.Comparator; | |||
import java.util.List; | |||
import java.util.Map; | |||
@@ -30,6 +31,7 @@ public class CardBlackQueryManagerImpl extends AbstractManager implements CardB | |||
@Override | |||
public OqsCardBlackResponse serviceHandle(OqsCardBlackRequest req) throws ServiceHandleException { | |||
logger.info("老库、新库卡下黑查询开始{},参数{}", LocalDateTime.now(),req.toJson()); | |||
List<DsiBlackCard> dsiBlackCards = dsiBlackCardRepo.listCardBlackByStatus(req.getCardId(),1); | |||
List<QtkBlackCard> qtkBlackCards = qtkBlackCardRepo.listCardBlackByStatus(req.getCardId(),1); | |||
OqsCardBlackResponse response = getResponse(dsiBlackCards, qtkBlackCards); |
@@ -5,6 +5,7 @@ import cn.com.taiji.common.pub.TimeTools; | |||
import cn.com.taiji.core.entity.basic.*; | |||
import cn.com.taiji.core.entity.dict.basic.*; | |||
import cn.com.taiji.ods.entity.dsi.*; | |||
import org.springframework.util.StringUtils; | |||
import java.time.LocalDateTime; | |||
import java.time.format.DateTimeFormatter; | |||
@@ -130,10 +131,8 @@ public abstract class IssueCommManagerImpl { | |||
vehicleInfo.setAxisType(dsiVehicleInfo.getAxisType()); | |||
vehicleInfo.setTestRecord(dsiVehicleInfo.getTestRecord()); | |||
vehicleInfo.setFileNum(dsiVehicleInfo.getFileNum()); | |||
if (dsiVehicleInfo.getRegisteredTime().contains("T")){ | |||
vehicleInfo.setRegisteredTime(LocalDateTime.parse(dsiVehicleInfo.getRegisteredTime(), TimeTools.ISO_LOCAL_DATE_TIME)); | |||
}else { | |||
vehicleInfo.setRegisteredTime(LocalDateTime.parse(dsiVehicleInfo.getRegisteredTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); | |||
if (!StringUtils.isEmpty(dsiVehicleInfo.getRegisteredTime())){ | |||
vehicleInfo.setRegisteredTime(LocalDateTime.parse(dsiVehicleInfo.getRegisteredTime(), dsiVehicleInfo.getRegisteredTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER)); | |||
} | |||
vehicleInfo.setOwnerTel(dsiVehicleInfo.getOwnerTel()); | |||
vehicleInfo.setRegisterDate(dsiVehicleInfo.getRegisterDate()); | |||
@@ -161,8 +160,12 @@ public abstract class IssueCommManagerImpl { | |||
cardInfo.setCardBrand(dsiCardInfo.getBrand()+""); | |||
// cardInfo.setCardModel(dsiCardInfo.getModel()); | |||
cardInfo.setAgencyId(dsiCardInfo.getAgencyId()); | |||
cardInfo.setCardEnableTime(LocalDateTime.parse(dsiCardInfo.getEnableTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); | |||
cardInfo.setCardExpireTime(LocalDateTime.parse(dsiCardInfo.getExpireTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); | |||
if (!StringUtils.isEmpty(dsiCardInfo.getEnableTime())){ | |||
cardInfo.setCardEnableTime(LocalDateTime.parse(dsiCardInfo.getEnableTime(), dsiCardInfo.getEnableTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER)); | |||
} | |||
if (!StringUtils.isEmpty(dsiCardInfo.getExpireTime())){ | |||
cardInfo.setCardExpireTime(LocalDateTime.parse(dsiCardInfo.getExpireTime(), dsiCardInfo.getExpireTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER)); | |||
} | |||
cardInfo.setChannelId(dsiCardInfo.getChannelId()); | |||
cardInfo.setCardIssuedType(dsiCardInfo.getIssuedType()); | |||
// cardInfo.setCardIssuedTime(dsiCardInfo.getIssuedTime()); | |||
@@ -213,12 +216,18 @@ public abstract class IssueCommManagerImpl { | |||
obuInfo.setObuBrand(dsiOBUInfo.getBrand()+""); | |||
// obuInfo.setObuModel(dsiOBUInfo.getModel()); | |||
obuInfo.setAgencyId(dsiOBUInfo.getRegisteredChannelId().substring(0, 11)); | |||
obuInfo.setObuEnableTime(LocalDateTime.parse(dsiOBUInfo.getEnableTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); | |||
obuInfo.setObuExpireTime(LocalDateTime.parse(dsiOBUInfo.getExpireTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); | |||
if (!StringUtils.isEmpty(dsiOBUInfo.getEnableTime())){ | |||
obuInfo.setObuEnableTime(LocalDateTime.parse(dsiOBUInfo.getEnableTime(), dsiOBUInfo.getEnableTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER)); | |||
} | |||
if (!StringUtils.isEmpty(dsiOBUInfo.getExpireTime())){ | |||
obuInfo.setObuExpireTime(LocalDateTime.parse(dsiOBUInfo.getExpireTime(), dsiOBUInfo.getExpireTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER)); | |||
} | |||
obuInfo.setChannelId(dsiOBUInfo.getRegisteredChannelId()); | |||
obuInfo.setRegisteredType(dsiOBUInfo.getRegisteredType()); | |||
obuInfo.setRegisteredChannelId(dsiOBUInfo.getRegisteredChannelId()); | |||
obuInfo.setRegisteredTime(LocalDateTime.parse(dsiOBUInfo.getRegisteredTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); | |||
if (!StringUtils.isEmpty(dsiOBUInfo.getRegisteredTime())){ | |||
obuInfo.setRegisteredTime(LocalDateTime.parse(dsiOBUInfo.getRegisteredTime(), dsiOBUInfo.getRegisteredTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER)); | |||
} | |||
obuInfo.setObuStatus(ObuStatus.fromCode(dsiOBUInfo.getStatus())); | |||
// obuInfo.setInstallType(dsiOBUInfo.getInstallType()); | |||
// obuInfo.setInstallChannelId(dsiOBUInfo.getInstallChannelId()); | |||
@@ -246,7 +255,9 @@ public abstract class IssueCommManagerImpl { | |||
public static void enc(DsiBlackCard dsiBlackCard, QtkBlackCard blackCard) { | |||
blackCard.setId(dsiBlackCard.getId()); | |||
blackCard.setCardId(dsiBlackCard.getCardId()); | |||
blackCard.setCreationTime(LocalDateTime.parse(dsiBlackCard.getCreationTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); | |||
if (!StringUtils.isEmpty(dsiBlackCard.getCreationTime())){ | |||
blackCard.setCreationTime(LocalDateTime.parse(dsiBlackCard.getCreationTime(), dsiBlackCard.getCreationTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER)); | |||
} | |||
blackCard.setIssuerId(dsiBlackCard.getIssuerId()); | |||
blackCard.setStatus(dsiBlackCard.getStatus()); | |||
blackCard.setType(CardBlackType.fromCode(dsiBlackCard.getType())); | |||
@@ -259,8 +270,12 @@ public abstract class IssueCommManagerImpl { | |||
public static void enc(DsiBlackObu dsiBlackObu, QtkBlackObu blackObu) { | |||
blackObu.setId(dsiBlackObu.getId()); | |||
blackObu.setIssuerId(dsiBlackObu.getIssuerId()); | |||
blackObu.setCreationTime(LocalDateTime.parse(dsiBlackObu.getCreationTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); | |||
blackObu.setReleaseTime(LocalDateTime.parse(dsiBlackObu.getReleaseTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); | |||
if (!StringUtils.isEmpty(dsiBlackObu.getCreationTime())){ | |||
blackObu.setCreationTime(LocalDateTime.parse(dsiBlackObu.getCreationTime(), dsiBlackObu.getCreationTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER)); | |||
} | |||
if (!StringUtils.isEmpty(dsiBlackObu.getReleaseTime())){ | |||
blackObu.setReleaseTime(LocalDateTime.parse(dsiBlackObu.getReleaseTime(), dsiBlackObu.getReleaseTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER)); | |||
} | |||
blackObu.setObuId(dsiBlackObu.getObuId()); | |||
blackObu.setType(ObuBlackType.fromCode(dsiBlackObu.getType())); | |||
blackObu.setStatus(dsiBlackObu.getStatus()); |
@@ -10,6 +10,7 @@ import org.apache.commons.lang3.StringUtils; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.time.LocalDateTime; | |||
import java.util.List; | |||
@Service | |||
@@ -19,6 +20,7 @@ public class IssueOrderQueryManagerImpl extends AbstractManager implements Issu | |||
@Override | |||
public OqsIssueOrderQueryResponse serviceHandle(OqsIssueOrderQueryRequest req) { | |||
logger.info("老库、新库订单查询开始{},参数{}", LocalDateTime.now(),req.toJson()); | |||
if (!StringUtils.isEmpty(req.getVehicleId())){ | |||
return isExistNormalOrder(req); | |||
}else { |
@@ -15,6 +15,7 @@ import org.apache.commons.compress.utils.Lists; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.time.LocalDateTime; | |||
import java.util.Comparator; | |||
import java.util.List; | |||
import java.util.Map; | |||
@@ -32,7 +33,7 @@ public class ObuBlackQueryManagerImpl extends AbstractManager implements ObuBla | |||
@Override | |||
public OqsObuBlackResponse serviceHandle(OqsObuBlackRequest req) throws ServiceHandleException { | |||
logger.info("老库、新库签下黑查询开始{},参数{}", LocalDateTime.now(),req.toJson()); | |||
List<DsiBlackObu> dsiBlackObus = dsiBlackObuRepo.listObuBlackByStatus(req.getObuId(), 1); | |||
List<QtkBlackObu> qtkBlackObus = qtkBlackObuRepo.listObuBlackByStatus(req.getObuId(), 1); | |||
OqsObuBlackResponse response = getResponse(dsiBlackObus, qtkBlackObus); |
@@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import org.springframework.util.StringUtils; | |||
import java.time.LocalDateTime; | |||
import java.util.Comparator; | |||
import java.util.List; | |||
import java.util.Map; | |||
@@ -30,6 +31,7 @@ public class ObuQueryManagerImpl extends AbstractManager implements ObuQueryMan | |||
@Override | |||
public OqsObuQueryResponse serviceHandle(OqsObuQueryRequest req) { | |||
logger.info("老库、新库签查询开始{},参数{}", LocalDateTime.now(),req.toJson()); | |||
if (!StringUtils.isEmpty(req.getObuId())){ | |||
return findByObuId(req); | |||
}else if(!StringUtils.isEmpty(req.getVehicleId())){ |
@@ -15,6 +15,7 @@ import org.apache.commons.lang.StringUtils; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.time.LocalDateTime; | |||
import java.util.*; | |||
import java.util.stream.Collectors; | |||
@@ -27,6 +28,7 @@ public class UserQueryManagerImpl extends AbstractManager implements UserQueryMa | |||
@Override | |||
public OqsUserQueryResponse serviceHandle(OqsUserQueryRequest req) throws ServiceHandleException { | |||
logger.info("老库、新库用户查询开始{},参数{}", LocalDateTime.now(),req.toJson()); | |||
Result result = new Result(new DsiCustomerInfo(), new QtkCustomerInfo()); | |||
if (!StringUtils.isEmpty(req.getCustomerId())){ | |||
result = findByCustomerId(req); |
@@ -16,6 +16,7 @@ import org.springframework.stereotype.Service; | |||
import org.springframework.util.ObjectUtils; | |||
import org.springframework.util.StringUtils; | |||
import java.time.LocalDateTime; | |||
import java.util.*; | |||
import java.util.stream.Collectors; | |||
@@ -28,6 +29,7 @@ public class VehicleQueryManagerImpl extends AbstractManager implements Vehicle | |||
@Override | |||
public OqsVehicleQueryResponse serviceHandle(OqsVehicleQueryRequest req) throws ServiceHandleException { | |||
logger.info("老库、新库车辆查询开始{},参数{}", LocalDateTime.now(),req.toJson()); | |||
if (!StringUtils.isEmpty(req.getVehicleId())){ | |||
return findByVehicleId(req); | |||
} else if (!StringUtils.isEmpty(req.getVehicleVin())) { |