@@ -21,8 +21,8 @@ public class AssDeviceLossPageReqDTO extends AbstractStaffBizPageRequestDTO { | |||
@ApiModelProperty(value = "车牌颜色") | |||
private String vehiclePlateColor;//车牌颜色; | |||
@ApiModelProperty(value = "挂失类型 1-挂失 2-解挂") | |||
@StringConstant(values ="1, 2", message = "挂失类型只能是1或2") | |||
@ApiModelProperty(value = "挂失类型 1-挂失 2-解挂 null-全部") | |||
@StringConstant(values ="1,2", message = "挂失类型只能是1或2") | |||
private String lossType;//挂失类型; | |||
@Override |
@@ -1,7 +1,7 @@ | |||
package cn.com.taiji.managew.dto.ass; | |||
import cn.com.taiji.common.valid.ViolationValidator; | |||
import cn.com.taiji.core.dto.AbstractBizRequestDTO; | |||
import cn.com.taiji.core.dto.AbstractStaffBizRequestDTO; | |||
import cn.com.taiji.core.entity.dict.basic.SourceType; | |||
import cn.com.taiji.core.model.comm.protocol.constraint.IntegerConstant; | |||
import io.swagger.annotations.ApiModel; | |||
@@ -15,7 +15,7 @@ import javax.validation.constraints.NotNull; | |||
@ApiModel(description = "卡签挂失解挂") | |||
@Getter | |||
@Setter | |||
public class AssDeviceLossReqDTO extends AbstractBizRequestDTO { | |||
public class AssDeviceLossReqDTO extends AbstractStaffBizRequestDTO { | |||
//业务类型 1-单卡挂失 2-单签挂失 3-卡签挂失 4-单卡解挂 5-单签解挂 6-卡签解挂 | |||
@ApiModelProperty(value = "业务类型", required = true) | |||
@@ -44,10 +44,6 @@ public class AssDeviceLossReqDTO extends AbstractBizRequestDTO { | |||
@ApiModelProperty(value = "行驶证反面") | |||
private String vehNegImgUrl; | |||
//员工Id | |||
@ApiModelProperty(value = "员工Id") | |||
private String staffId; | |||
@Override | |||
protected void validate(ViolationValidator validator) { | |||
super.validate(validator); | |||
@@ -61,12 +57,8 @@ public class AssDeviceLossReqDTO extends AbstractBizRequestDTO { | |||
validator.addViolation("loginSource", "登录来源有误"); | |||
} | |||
if (getOrderSource() == SourceType.SERVICE_HALL) { | |||
validator.validFieldNotBlank("staffId", staffId); | |||
validator.validFieldNotBlank("vehPosImgUrl", vehPosImgUrl); | |||
validator.validFieldNotBlank("vehNegImgUrl", vehNegImgUrl); | |||
} | |||
if (getOrderSource() == SourceType.WEB){ | |||
validator.validFieldNotBlank("staffId", staffId); | |||
} | |||
} | |||
} |
@@ -87,12 +87,12 @@ public class AssDeviceLossManagerImpl extends AbstractManagewManager implements | |||
} | |||
logger.info("=>返回结果:订单号{},状态码{},状态信息{}",response.getOrderNo(), response.getCode(),response.getMsg()); | |||
// 保存日志操作日志 | |||
persistOperateLog(operateType, response.getOrderNo(), source, findOpenIdByToken(reqDto.getAccessToken()), "挂失解挂操作" + response.getMsg()); | |||
if (!"1".equals(response.getCode())) { | |||
throw new ManagerException("出错了", response.getMsg()); | |||
throw new ManagerException("出错了"+response.getMsg()); | |||
} | |||
// 保存日志操作日志,失败不计入日志 | |||
persistOperateLog(operateType, response.getOrderNo(), source, findOpenIdByToken(reqDto.getAccessToken()), "挂失解挂操作" + response.getMsg()); | |||
} | |||
@Override | |||
@@ -103,8 +103,9 @@ public class AssDeviceLossManagerImpl extends AbstractManagewManager implements | |||
if (hasText(reqDto.getVehiclePlate()) && hasText(reqDto.getVehiclePlateColor())) { | |||
request.setVehicleId(reqDto.getVehiclePlate() + "_" + reqDto.getVehiclePlate()); | |||
} | |||
List<AssOrderType> orderTypes = new ArrayList<>(); | |||
if (hasText(reqDto.getLossType())) { | |||
List<AssOrderType> orderTypes = new ArrayList<>(); | |||
//1-挂失,2-解挂 | |||
if ("1".equals(reqDto.getLossType())) { | |||
orderTypes.add(AssOrderType.LOSS); | |||
@@ -115,8 +116,15 @@ public class AssDeviceLossManagerImpl extends AbstractManagewManager implements | |||
orderTypes.add(AssOrderType.CARD_RELEASE_LOSS); | |||
orderTypes.add(AssOrderType.OBU_RELEASE_LOSS); | |||
} | |||
request.setOrderTypes(orderTypes); | |||
}else { | |||
orderTypes.add(AssOrderType.LOSS); | |||
orderTypes.add(AssOrderType.CARD_LOSS); | |||
orderTypes.add(AssOrderType.OBU_LOSS); | |||
orderTypes.add(AssOrderType.RELEASE_LOSS); | |||
orderTypes.add(AssOrderType.CARD_RELEASE_LOSS); | |||
orderTypes.add(AssOrderType.OBU_RELEASE_LOSS); | |||
} | |||
request.setOrderTypes(orderTypes); | |||
return orderInfoRepo.page(request).convertResult(this::toModel); | |||
} | |||
@@ -164,7 +164,11 @@ public class OrderPayApplyManager extends AbstractOrderManager<OrderPayApplyRequ | |||
v2Request.setBody(orderPay.getPayType().getValue()); | |||
v2Request.setOutTradeNo(orderPay.getPayOrderNo()); | |||
v2Request.setTotalFee(orderPay.getFee().intValue()); | |||
v2Request.setSpbillCreateIp(req.getSpbillCreateIp()); | |||
if (hasText(req.getSpbillCreateIp())) { | |||
v2Request.setSpbillCreateIp(req.getSpbillCreateIp()); | |||
}else { | |||
v2Request.setSpbillCreateIp("127.0.0.1"); | |||
} | |||
v2Request.setNotifyUrl("https://skx.mynatapp.cc/qtucpaymgt/wxv3/notify/"); | |||
v2Request.setTradeType(TradeType.valueOf(payConfig.getPayProductType())); | |||
v2Request.setOpenid(req.getSubOpenId()); |
@@ -7,11 +7,13 @@ 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.ShippingStatus; | |||
import cn.com.taiji.core.entity.issue.IssueOrderinfo; | |||
import cn.com.taiji.core.entity.issue.IssueOrderinfoExt; | |||
import cn.com.taiji.core.model.comm.protocol.ats.weiXin.*; | |||
import cn.com.taiji.core.model.comm.protocol.ias.order.SignQueryRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.order.SignQueryResponse; | |||
import cn.com.taiji.core.model.comm.protocol.valid.ErrorMsgBuilder; | |||
import cn.com.taiji.core.repo.jpa.comm.CommonWxSignConfigRepo; | |||
import cn.com.taiji.core.repo.jpa.issue.IssueOrderinfoExtRepo; | |||
import cn.com.taiji.ias.dict.DataType; | |||
import cn.com.taiji.ias.model.MyFinals; | |||
import cn.com.taiji.ias.model.ServiceLogEvent; | |||
@@ -29,6 +31,7 @@ import java.util.Map; | |||
public class SignQueryManager extends AbstractOrderManager<SignQueryRequest> { | |||
public SignQueryManager() { | |||
super(DataType.SIGN_QUERY); | |||
} | |||
@@ -62,10 +65,11 @@ public class SignQueryManager extends AbstractOrderManager<SignQueryRequest> { | |||
Map<String, Object> dataStream) throws ServiceHandleException { | |||
IssueOrderinfo order = (IssueOrderinfo) dataStream.get(ORDER); | |||
Integer vehiclePlateColor = order.getVehiclePlateColor(); | |||
IssueOrderinfoExt ext = orderInfoExtRepo.findByOrderNo(order.getOrderNo()); | |||
switch (PlateColorType.valueOfCode(vehiclePlateColor)) { | |||
case BLUE: | |||
case GREEN: | |||
carSignV2(request, order, dataStream); | |||
carSignV2(request, order, dataStream,ext); | |||
break; | |||
case YELLOW: | |||
carSignV3(request, order,dataStream); | |||
@@ -75,7 +79,7 @@ public class SignQueryManager extends AbstractOrderManager<SignQueryRequest> { | |||
} | |||
} | |||
private void carSignV2(SignQueryRequest req, IssueOrderinfo order, Map<String, Object> dataStream) throws ServiceHandleException { | |||
private void carSignV2(SignQueryRequest req, IssueOrderinfo order, Map<String, Object> dataStream,IssueOrderinfoExt ext) throws ServiceHandleException { | |||
CommonWxSignConfig signConfig = commonWxSignConfigRepo.findByAgencyIdAndVersion(order.getAgencyId(), 2); | |||
AtsVehicleUserStateRequest request = new AtsVehicleUserStateRequest(); | |||
request.setAppId(signConfig.getAppId()); | |||
@@ -101,8 +105,12 @@ public class SignQueryManager extends AbstractOrderManager<SignQueryRequest> { | |||
if (order.getOrderSource().equals(SourceType.CHANNEL)) { //渠道签约完成待激活 | |||
order.setOrderStep(IssueOrderStep.WAITING_ACTIVE); | |||
} else { | |||
order.setOrderStep(ShippingStatus.WAIT_SHIPPING.equals(order.getShippingStatus()) ? | |||
IssueOrderStep.WAITING_SEND : IssueOrderStep.WAITING_ACTIVE); | |||
if (hasText(ext.getAuditReason())) { | |||
order.setOrderStep(IssueOrderStep.WAITING_AUDIT); | |||
}else { | |||
order.setOrderStep(ShippingStatus.WAIT_SHIPPING.equals(order.getShippingStatus()) ? | |||
IssueOrderStep.WAITING_SEND : IssueOrderStep.WAITING_ACTIVE); | |||
} | |||
} | |||
dataStream.put(RES, new SignQueryResponse().setUserState(response.getUserState())); | |||
} |