@@ -40,8 +40,8 @@ public class AssReimburseOrder extends StringPropertyUUIDEntity { | |||
@Column(name = "OPERATE_STAFF_ID") | |||
private String operateStaffId;// 录入员工工号 | |||
@NotBlank | |||
@Column(name = "USER_OPEN_ID") | |||
private String userOpenId;//用户编号 | |||
@Column(name = "CUSTOMER_ID") | |||
private String customerId;//用户编号 | |||
@NotBlank | |||
@Column(name = "CARD_ID") | |||
private String cardId;//卡号 |
@@ -11,17 +11,18 @@ package cn.com.taiji.core.entity.dict.ass; | |||
*/ | |||
public enum AssOrderStep { | |||
WAITING_PAY(1, "待支付"), | |||
WAITING_SIGN(2, "待签约"), | |||
WAITING_AUDIT(3, "待审核"), | |||
AUDIT_FAIL(4, "审核不通过"), | |||
WAITING_SEND(5, "待发货"), | |||
WAITING_RECEIVE(6, "待收货"), | |||
TRANS_SURE(7, "待确认流水"), | |||
REFUNDING(8, "退款中"), | |||
WAITING_UPGRADE(9, "待设备升级"), | |||
WAITING_ACTIVE(10, "待激活"), | |||
COMPLETED(11, "已完成"),//已激活, | |||
ORDER_INIT(1, "订单创建,待收集资料"), | |||
WAITING_PAY(2, "待支付"), | |||
WAITING_SIGN(3, "待签约"), | |||
WAITING_AUDIT(4, "待审核"), | |||
AUDIT_FAIL(5, "审核不通过"), | |||
WAITING_SEND(6, "待发货"), | |||
WAITING_RECEIVE(7, "待收货"), | |||
TRANS_SURE(8, "待确认流水"), | |||
REFUNDING(9, "退款中"), | |||
WAITING_UPGRADE(10, "待设备升级"), | |||
WAITING_ACTIVE(11, "待激活"), | |||
COMPLETED(12, "已完成"),//已激活, | |||
; | |||
private final Integer code; |
@@ -8,6 +8,7 @@ import javax.validation.constraints.NotNull; | |||
import javax.validation.constraints.Size; | |||
import cn.com.taiji.common.entity.StringPropertyUUIDEntity; | |||
import cn.com.taiji.core.entity.AbstractStringPropertyUUIDEntity; | |||
import cn.com.taiji.core.entity.dict.basic.*; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@@ -22,7 +23,7 @@ import lombok.Setter; | |||
@Setter | |||
@Entity | |||
@Table(name = "MANAGEW_DEVICE_QUERY_RECORD") | |||
public class DeviceQueryRecord extends StringPropertyUUIDEntity { | |||
public class DeviceQueryRecord extends AbstractStringPropertyUUIDEntity { | |||
@Column(name = "OPEN_ID") | |||
private String openId;//openId |
@@ -0,0 +1,26 @@ | |||
package cn.com.taiji.core.model.comm.protocol.ias.ass; | |||
import java.time.LocalDateTime; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import cn.com.taiji.core.model.comm.protocol.ias.AbstractIasRequest; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Setter | |||
@Getter | |||
public class ActiveCheckCanActiveRequest extends AbstractIasRequest<ActiveCheckCanActiveResponse> { | |||
public ActiveCheckCanActiveRequest() { | |||
super(AssServiceCmd.ACTIVECHECKCANACTIVE); | |||
} | |||
@NotBlank(message = "车牌号不能为空") | |||
private String vehiclePlate;//车牌号 | |||
@NotNull(message = "车牌颜色不能为空") | |||
private Integer vehiclePlateColor;//车牌颜色 | |||
@NotBlank(message = "etc卡号不能为空") | |||
private String cardId;// etc卡号 | |||
@NotBlank(message = "OBU号不能为空") | |||
private String obuId;// OBU号 | |||
} |
@@ -0,0 +1,16 @@ | |||
package cn.com.taiji.core.model.comm.protocol.ias.ass; | |||
import cn.com.taiji.core.model.comm.protocol.ias.AbstractIasResponse; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Getter | |||
@Setter | |||
public class ActiveCheckCanActiveResponse extends AbstractIasResponse { | |||
//售后订单号 | |||
private String orderNo; | |||
//状态码 1:成功 0:失败 | |||
private String code; | |||
//状态信息 | |||
private String msg; | |||
} |
@@ -0,0 +1,27 @@ | |||
package cn.com.taiji.core.model.comm.protocol.ias.ass; | |||
import java.time.LocalDateTime; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import javax.validation.constraints.Pattern; | |||
import cn.com.taiji.core.model.comm.protocol.ias.AbstractIasRequest; | |||
import cn.com.taiji.core.model.comm.protocol.valid.RegexConstant; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Setter | |||
@Getter | |||
public class ActiveCheckSendCodeRequest extends AbstractIasRequest<ActiveCheckSendCodeResponse> { | |||
public ActiveCheckSendCodeRequest() { | |||
super(AssServiceCmd.ACTIVECHECKSENDCODE); | |||
} | |||
@Pattern(regexp = RegexConstant.REGEX_MOBILE, message = "手机号格式不正确") | |||
@NotBlank(message = "手机号码不能为空") | |||
private String mobile; | |||
@NotBlank(message = "短信验证码不能为空") | |||
private String code; | |||
@NotBlank(message = "loginSource不能为空") | |||
private String loginSource; | |||
} |
@@ -0,0 +1,16 @@ | |||
package cn.com.taiji.core.model.comm.protocol.ias.ass; | |||
import cn.com.taiji.core.model.comm.protocol.ias.AbstractIasResponse; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Getter | |||
@Setter | |||
public class ActiveCheckSendCodeResponse extends AbstractIasResponse { | |||
//售后订单号 | |||
private String orderNo; | |||
//状态码 1:成功 0:失败 | |||
private String code; | |||
//状态信息 | |||
private String msg; | |||
} |
@@ -0,0 +1,24 @@ | |||
package cn.com.taiji.core.model.comm.protocol.ias.ass; | |||
import java.time.LocalDateTime; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import cn.com.taiji.core.entity.dict.basic.SourceType; | |||
import cn.com.taiji.core.model.comm.protocol.ias.AbstractIasRequest; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Setter | |||
@Getter | |||
public class ActiveQueryVehicleRequest extends AbstractIasRequest<ActiveQueryVehicleResponse> { | |||
public ActiveQueryVehicleRequest() { | |||
super(AssServiceCmd.ACTIVEQUERYVEHICLE); | |||
} | |||
@NotNull(message = "sourceType不能为空") | |||
private SourceType sourceType; | |||
private String customerId; //customerId etc用户id | |||
private String vehicleId;// 车牌id,如传输即为非本人办理 | |||
private String staffId;// staffId | |||
} |
@@ -0,0 +1,14 @@ | |||
package cn.com.taiji.core.model.comm.protocol.ias.ass; | |||
import cn.com.taiji.core.model.comm.protocol.ias.AbstractIasResponse; | |||
import cn.com.taiji.core.repo.request.managew.DeviceReactivateModel; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import java.util.List; | |||
@Getter | |||
@Setter | |||
public class ActiveQueryVehicleResponse extends AbstractIasResponse { | |||
List<DeviceReactivateModel> modelList; | |||
} |
@@ -0,0 +1,42 @@ | |||
package cn.com.taiji.core.model.comm.protocol.ias.ass; | |||
import java.time.LocalDateTime; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import cn.com.taiji.core.entity.dict.basic.SourceType; | |||
import cn.com.taiji.core.model.comm.protocol.ias.AbstractIasRequest; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Setter | |||
@Getter | |||
public class ActiveSaveRecordRequest extends AbstractIasRequest<ActiveSaveRecordResponse> { | |||
public ActiveSaveRecordRequest() { | |||
super(AssServiceCmd.ACTIVESAVERECORDS); | |||
} | |||
@NotBlank | |||
private String vehicleId;// 车牌颜色 | |||
@NotBlank | |||
private String vehiclePlate;// 车牌号码 | |||
@NotNull | |||
private Integer vehiclePlateColor;// 车牌颜色 | |||
@NotBlank | |||
private String cardId;// etc卡号 | |||
@NotBlank | |||
private String obuId;// OBU号 | |||
private String vehPosImgUrl;//行驶证正面图片地址 | |||
private String vehNegImgUrl;//行驶证反面图片地址 | |||
@NotBlank | |||
private String vehBodyUrl;//车身照 | |||
@NotBlank | |||
private String installImgUrl;//安装照 | |||
@NotNull | |||
private Integer type;// 类型1-本人激活 2-他人激活 | |||
@NotNull | |||
private Integer activeType; | |||
@NotNull | |||
private SourceType sourceType; | |||
} |
@@ -0,0 +1,14 @@ | |||
package cn.com.taiji.core.model.comm.protocol.ias.ass; | |||
import cn.com.taiji.core.model.comm.protocol.ias.AbstractIasResponse; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Getter | |||
@Setter | |||
public class ActiveSaveRecordResponse extends AbstractIasResponse { | |||
//状态码 1:成功 0:失败 | |||
private String code; | |||
//状态信息 | |||
private String msg; | |||
} |
@@ -32,6 +32,16 @@ public enum AssServiceCmd implements SignServiceCommand { | |||
// RELEASEPLATEREVIEW("解除车牌占用审批",ReleasePlateReviewRequest.class), | |||
CUSTOMERINFOCHANGE("客户信息变更申请", CustomerInfoChangeApplyRequest.class), | |||
CUSTOMERINFOCHANGEAUDIT("客户信息变更申请审核", CustomerInfoChangeAuditRequest.class), | |||
ACTIVEQUERYVEHICLE("设备激活查询可激活车辆列表", CustomerInfoChangeAuditRequest.class), | |||
ACTIVESAVERECORDS("设备激活保存记录", CustomerInfoChangeAuditRequest.class), | |||
ACTIVECHECKSENDCODE("设备激活校验验证码", CustomerInfoChangeAuditRequest.class), | |||
ACTIVECHECKCANACTIVE("设备激活是否可激活", CustomerInfoChangeAuditRequest.class), | |||
// REIMBURSEORDERINPUT("补缴订单录入", ReimburseOrderInputRequest.class), | |||
// REIMBURSEORDERCANCEL("补缴订单取消", ReimburseOrderCancelRequest.class), | |||
// REIMBURSEORDERREVIEW("补缴订单审核", ReimburseOrderReviewRequest.class), | |||
// REIMBURSEORDERQUERY("补缴订单查询", ReimburseOrderQueryRequest.class), | |||
// REIMBURSEORDERPAY("补缴订单支付", ReimburseOrderPayRequest.class), | |||
// REIMBURSEORDERPAY("补缴订单通行流水查询", ReimburseOrderPayRequest.class), | |||
; | |||
private final String value; |
@@ -47,7 +47,7 @@ public class ActiveController extends MyValidController { | |||
@ApiOperation(value = "是否可激活") | |||
@PostMapping(value = "/checkCanActive") | |||
public ApiResponse<CheckCanActiveResponse> checkCanActive(@Valid @RequestBody CheckCanActiveRequest reqDto) throws ServiceHandleException { | |||
public ApiResponse<CheckCanActiveResponse> checkCanActive(@Valid @RequestBody CheckCanActiveRequest reqDto) throws ManagerException { | |||
CheckCanActiveResponse response = manager.checkCanActive(reqDto); | |||
return ApiResponse.of(response).setMessage("操作成功"); | |||
} |
@@ -8,9 +8,8 @@ import cn.com.taiji.iaw.dto.ass.active.*; | |||
* 激活记录相关功能 | |||
*/ | |||
public interface ActiveManager { | |||
SaveRecordResponseDTO saveRecord(SaveRecordRequestDTO requestDTO) throws ManagerException; | |||
QueryVehicleResponseDTO queryVehicle(QueryVehicleRequestDTO requestDTO) throws ManagerException; | |||
ActivateDetailsResponseDTO saveRecords(ActivateDetailsRequestDTO requestDTO) throws ManagerException; | |||
void checkSendCode(CheckCodeRequest request) throws ManagerException; | |||
CheckCanActiveResponse checkCanActive(CheckCanActiveRequest request) throws ServiceHandleException; | |||
CheckCanActiveResponse checkCanActive(CheckCanActiveRequest request) throws ManagerException; | |||
} |
@@ -11,6 +11,7 @@ import cn.com.taiji.core.entity.dict.ass.AssOrderStep; | |||
import cn.com.taiji.core.entity.dict.basic.CardStatus; | |||
import cn.com.taiji.core.entity.dict.basic.ObuStatus; | |||
import cn.com.taiji.core.entity.user.Staff; | |||
import cn.com.taiji.core.model.comm.protocol.ias.ass.*; | |||
import cn.com.taiji.core.repo.jpa.user.StaffRepo; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
@@ -48,216 +49,37 @@ import cn.com.taiji.iaw.manager.AbstractCommManager; | |||
@Service | |||
public class ActiveManagerImpl extends AbstractCommManager implements ActiveManager { | |||
@Autowired | |||
private ActiveRecordRepo recordRepo; | |||
@Autowired | |||
private IssueOrderinfoRepo issueOrderinfoRepo; | |||
@Autowired | |||
private QtkVehicleInfoRepo vehicleInfoRepo; | |||
@Autowired | |||
private QtkCustomerInfoRepo customerInfoRepo; | |||
@Autowired | |||
private AssOrderinfoRepo assOrderinfoRepo; | |||
@Autowired | |||
private AssDeviceReactivateRepo deviceReactivateRepo; | |||
@Autowired | |||
private QtkCardInfoRepo cardInfoRepo; | |||
@Autowired | |||
private QtkObuInfoRepo obuInfoRepo; | |||
@Autowired | |||
private StaffRepo staffRepo; | |||
/** | |||
* 新增激活记录 | |||
*/ | |||
@Override | |||
@Transactional(rollbackFor = Exception.class) | |||
public SaveRecordResponseDTO saveRecord(SaveRecordRequestDTO requestDTO) throws ManagerException { | |||
// 查找orderInfo | |||
IssueOrderinfo orderInfo = issueOrderinfoRepo.findByOrderNo(requestDTO.getOrderNo()); | |||
AssOrderinfo assOrderinfo = new AssOrderinfo(); | |||
if (orderInfo == null){ | |||
assOrderinfo = assOrderinfoRepo.findByOrderNo(requestDTO.getOrderNo()); | |||
if (assOrderinfo == null){ | |||
throw new ManagerException("未查到订单信息!"); | |||
} | |||
} | |||
// 封装数据 | |||
ActiveRecord record = new ActiveRecord(); | |||
if (orderInfo == null){ | |||
BeanTools.copyProperties(assOrderinfo, record,"id"); | |||
}else { | |||
BeanTools.copyProperties(orderInfo, record,"id"); | |||
} | |||
BeanTools.copyProperties(requestDTO, record); | |||
record.setVehiclePlate(requestDTO.getVehiclePlate()); | |||
record.setVehiclePlateColor(requestDTO.getVehiclePlateColor()); | |||
record.setOpenId(findOpenIdByToken(requestDTO.getAccessToken())); | |||
record.setActiveTime(LocalDateTime.now()); | |||
record.setResetStatus(0); | |||
record.setCardType(requestDTO.getCardType()); | |||
record.setSourceType(requestDTO.getOrderSource()); | |||
ActiveRecord save = recordRepo.save(record); | |||
// 返回 | |||
SaveRecordResponseDTO resDTO = new SaveRecordResponseDTO(); | |||
resDTO.setId(save.getId()); | |||
return resDTO; | |||
} | |||
@Override | |||
public QueryVehicleResponseDTO queryVehicle(QueryVehicleRequestDTO requestDTO) throws ManagerException { | |||
List<DeviceReactivateModel> list = new ArrayList<>() ; | |||
QtkCustomerInfo customerInfo = customerInfoRepo.findByCustomerId(requestDTO.getCustomerId()); | |||
Staff staff = new Staff(); | |||
if (customerInfo == null){ | |||
if (requestDTO.getStaffId() == null){ | |||
throw new ManagerException("未查到客户信息!"); | |||
}else { | |||
staff = staffRepo.findByStaffId(requestDTO.getStaffId()); | |||
if (staff == null){ | |||
throw new ManagerException("未查到业务员信息!"); | |||
} | |||
} | |||
} | |||
if (requestDTO.getVehicleId().isEmpty()){ | |||
// 本人办理,查询订单表和车辆表 | |||
List<QtkVehicleInfo> vehicleInfos = vehicleInfoRepo.findByCustomerId(requestDTO.getCustomerId()); | |||
if (!vehicleInfos.isEmpty()){ | |||
for (QtkVehicleInfo vehicleInfo : vehicleInfos) { | |||
QtkCardInfo cardInfo = cardInfoRepo.findByVehicleIdAndCardStatus(vehicleInfo.getVehicleId()); | |||
QtkObuInfo obuInfo = obuInfoRepo.findByVehicleIdAndObuStatus(vehicleInfo.getVehicleId(), ObuStatus.ZC); | |||
if (cardInfo != null){ | |||
DeviceReactivateModel model = new DeviceReactivateModel(); | |||
BeanTools.copyProperties(vehicleInfo, model); | |||
model.setMobile(customerInfo.getCustomerTel()); | |||
model.setVehicleType(vehicleInfo.getType()); | |||
model.setCardId(cardInfo.getCardId()); | |||
if (obuInfo != null){ | |||
model.setObuId(obuInfo.getObuId()); | |||
} | |||
model.setActiveType(2); | |||
list.add(model); | |||
} | |||
} | |||
} | |||
List<IssueOrderinfo> orderinfos = issueOrderinfoRepo.listByCustomerId(requestDTO.getCustomerId()); | |||
if (!orderinfos.isEmpty()){ | |||
for (IssueOrderinfo orderinfo : orderinfos) { | |||
QtkVehicleInfo info = vehicleInfoRepo.findByVehicleId(orderinfo.getVehicleId()); | |||
DeviceReactivateModel model = new DeviceReactivateModel(); | |||
BeanTools.copyProperties(orderinfo, model); | |||
model.setMobile(customerInfo.getCustomerTel()); | |||
model.setVehicleType(info.getType()); | |||
model.setOrderId(orderinfo.getId()); | |||
model.setActiveType(1); | |||
list.add(model); | |||
} | |||
} | |||
}else { | |||
// 非本人办理,查询车辆信息表 | |||
QtkVehicleInfo info = vehicleInfoRepo.findByVehicleId(requestDTO.getVehicleId()); | |||
if(info == null){ | |||
throw new ManagerException("未查到车辆信息!"); | |||
} | |||
IssueOrderinfo orderinfo = issueOrderinfoRepo.findWaitingActiveByVehicleId(requestDTO.getVehicleId()); | |||
if (orderinfo != null){ // 首次激活 | |||
DeviceReactivateModel model = new DeviceReactivateModel(); | |||
BeanTools.copyProperties(orderinfo, model); | |||
if (staff != null){ | |||
if (!Objects.equals(staff.getAgencyId(), orderinfo.getAgencyId())){ | |||
return null; | |||
}else { | |||
customerInfo = customerInfoRepo.findByCustomerId(orderinfo.getCustomerId()); | |||
} | |||
} | |||
model.setMobile(customerInfo.getCustomerTel()); | |||
model.setVehicleType(info.getType()); | |||
model.setOrderId(orderinfo.getId()); | |||
model.setActiveType(1); | |||
list.add(model); | |||
} else { // 二次激活 | |||
QtkCardInfo cardInfo = cardInfoRepo.findByVehicleIdAndCardStatus(requestDTO.getVehicleId()); | |||
QtkObuInfo obuInfo = obuInfoRepo.findByVehicleIdAndObuStatus(requestDTO.getVehicleId(), ObuStatus.ZC); | |||
if (cardInfo == null || obuInfo == null){ | |||
throw new ManagerException("未查到车辆的卡签信息,无法二次激活!"); | |||
} | |||
if (staff != null){ | |||
if (!Objects.equals(staff.getAgencyId(), cardInfo.getAgencyId())){ | |||
return null; | |||
}else { | |||
customerInfo = customerInfoRepo.findByCustomerId(cardInfo.getCustomerId()); | |||
} | |||
} | |||
DeviceReactivateModel model = new DeviceReactivateModel(); | |||
BeanTools.copyProperties(info, model); | |||
model.setVehicleType(info.getType()); | |||
model.setMobile(customerInfo.getCustomerTel()); | |||
model.setActiveType(2); | |||
model.setCardId(cardInfo.getCardId()); | |||
model.setObuId(obuInfo.getObuId()); | |||
list.add(model); | |||
} | |||
} | |||
QueryVehicleResponseDTO resDTO = new QueryVehicleResponseDTO(); | |||
resDTO.setModelList(list); | |||
return resDTO; | |||
ActiveQueryVehicleRequest req = new ActiveQueryVehicleRequest(); | |||
copyProperties(requestDTO, req); | |||
req.setSourceType(requestDTO.getOrderSource()); | |||
return copyProperties(jsonPostRepeat(req), new QueryVehicleResponseDTO()); | |||
} | |||
@Override | |||
public ActivateDetailsResponseDTO saveRecords(ActivateDetailsRequestDTO requestDTO) throws ManagerException { | |||
LocalDateTime now = LocalDateTime.now(); | |||
QtkCardInfo cardInfo = cardInfoRepo.findByCardId(requestDTO.getCardId()); | |||
QtkCustomerInfo customerInfo = customerInfoRepo.findByCustomerId(cardInfo.getCustomerId()); | |||
String orderNo = createOrderNo(cardInfo.getAgencyId()); | |||
// 存售后订单 | |||
AssOrderinfo assOrderinfo = copyProperties(customerInfo, new AssOrderinfo()); | |||
BeanTools.copyProperties(requestDTO, assOrderinfo); | |||
assOrderinfo.setAgencyId(cardInfo.getAgencyId()); | |||
assOrderinfo.setChannelId(cardInfo.getChannelId()); | |||
assOrderinfo.setOrderNo(orderNo); | |||
assOrderinfo.setOpenId(findOpenIdByToken(requestDTO.getAccessToken())); | |||
assOrderinfo.setOrderType(AssOrderType.REACTIVATE); | |||
assOrderinfo.setOrderStatus(AssOrderStatus.FINISHED); | |||
assOrderinfo.setOrderStep(AssOrderStep.COMPLETED); | |||
assOrderinfo.setApplyTime(now); | |||
assOrderinfo.setInsertTime(now); | |||
assOrderinfo.setUpdateTime(now); | |||
AssOrderinfo save = assOrderinfoRepo.save(assOrderinfo); | |||
// 存二次激活记录 | |||
AssDeviceReactivate deviceReactivate = new AssDeviceReactivate(); | |||
BeanTools.copyProperties(requestDTO, deviceReactivate); | |||
deviceReactivate.setInsertTime(now); | |||
deviceReactivate.setOrderNo(orderNo); | |||
deviceReactivateRepo.persist(deviceReactivate); | |||
// 保存激活记录 | |||
SaveRecordRequestDTO saveRecordRequestDTO = new SaveRecordRequestDTO(); | |||
saveRecordRequestDTO.setOrderNo(save.getOrderNo()); | |||
BeanTools.copyProperties(requestDTO, saveRecordRequestDTO); | |||
saveRecordRequestDTO.setCardType(cardInfo.getCardTypeNew()); | |||
saveRecordRequestDTO.setVehiclePlate(requestDTO.getVehiclePlate()); | |||
saveRecordRequestDTO.setVehiclePlateColor(requestDTO.getVehiclePlateColor()); | |||
saveRecord(saveRecordRequestDTO); | |||
ActiveSaveRecordRequest req = new ActiveSaveRecordRequest(); | |||
copyProperties(requestDTO, req); | |||
req.setSourceType(requestDTO.getOrderSource()); | |||
ActiveSaveRecordResponse repeat = jsonPostRepeat(req); | |||
if (!repeat.getCode().equals("1")){ | |||
throw new ManagerException(repeat.getMsg()); | |||
} | |||
return new ActivateDetailsResponseDTO(); | |||
} | |||
@Override | |||
public void checkSendCode(CheckCodeRequest request) throws ManagerException { | |||
request.validate(); | |||
String smsCode = redisManager.get(RedisKeyGenerator.getSmsCodeKey(request.getMobile(), request.getOrderSource().name(), 4)); | |||
if (!hasText(smsCode)) | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("短信验证码已过期,请重新发送"); | |||
if (!smsCode.equals(request.getCode())) | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("短信验证码错误!"); | |||
ActiveCheckSendCodeRequest req = new ActiveCheckSendCodeRequest(); | |||
copyProperties(request, req); | |||
jsonPostRepeat(req); | |||
} | |||
@Override | |||
public CheckCanActiveResponse checkCanActive(CheckCanActiveRequest request) throws ServiceHandleException { | |||
CheckCanActiveResponse response = new CheckCanActiveResponse(); | |||
List<ActiveRecord> activeRecords = recordRepo.listByVehicleAndStatus(request.getVehiclePlate(), request.getVehiclePlateColor(), request.getCardId(), request.getObuId(),0); | |||
if (!activeRecords.isEmpty() && activeRecords.size() > 5){ | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("当前车牌号已达重置上限,请联系业务员重置!"); | |||
} | |||
return response; | |||
public CheckCanActiveResponse checkCanActive(CheckCanActiveRequest request) throws ManagerException { | |||
ActiveCheckCanActiveRequest req = new ActiveCheckCanActiveRequest(); | |||
copyProperties(request, req); | |||
ActiveCheckCanActiveResponse checkCanActiveResponse = jsonPostRepeat(req); | |||
return copyProperties(checkCanActiveResponse, new CheckCanActiveResponse()); | |||
} | |||
} |
@@ -0,0 +1,31 @@ | |||
package cn.com.taiji.ias.manager.ass.active; | |||
import java.util.List; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||
import cn.com.taiji.core.entity.managew.ActiveRecord; | |||
import cn.com.taiji.core.model.comm.protocol.ias.ass.ActiveCheckCanActiveRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.ass.ActiveCheckCanActiveResponse; | |||
import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError; | |||
import cn.com.taiji.core.repo.jpa.managew.ActiveRecordRepo; | |||
import cn.com.taiji.ias.manager.AbstractCommManager; | |||
@Service | |||
public class ActiveCheckCanActiveManager extends AbstractCommManager { | |||
@Autowired | |||
private ActiveRecordRepo recordRepo; | |||
public ActiveCheckCanActiveResponse serviceHandle(ActiveCheckCanActiveRequest req) throws ServiceHandleException { | |||
ActiveCheckCanActiveResponse response = new ActiveCheckCanActiveResponse(); | |||
List<ActiveRecord> activeRecords = recordRepo.listByVehicleAndStatus(req.getVehiclePlate(), req.getVehiclePlateColor(), req.getCardId(), req.getObuId(),0); | |||
if (!activeRecords.isEmpty() && activeRecords.size() > 5){ | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("当前车牌号已达重置上限,请联系业务员重置!"); | |||
} | |||
return response; | |||
} | |||
} |
@@ -0,0 +1,37 @@ | |||
package cn.com.taiji.ias.manager.ass.active; | |||
import cn.com.taiji.core.entity.dict.basic.SourceType; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||
import cn.com.taiji.core.manager.cache.RedisKeyGenerator; | |||
import cn.com.taiji.core.manager.cache.RedisManager; | |||
import cn.com.taiji.core.model.comm.protocol.ias.ass.ActiveCheckSendCodeRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.ass.ActiveCheckSendCodeResponse; | |||
import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError; | |||
import cn.com.taiji.ias.manager.AbstractCommManager; | |||
@Service | |||
public class ActiveCheckSendCodeManager extends AbstractCommManager { | |||
@Autowired(required = false) | |||
protected RedisManager redisManager; | |||
public ActiveCheckSendCodeResponse serviceHandle(ActiveCheckSendCodeRequest req) throws ServiceHandleException { | |||
String smsCode = redisManager.get(RedisKeyGenerator.getSmsCodeKey(req.getMobile(), SourceType.findByCode(req.getLoginSource()).name(), 4)); | |||
ActiveCheckSendCodeResponse response = new ActiveCheckSendCodeResponse(); | |||
if (!hasText(smsCode)){ | |||
response.setCode("0"); | |||
response.setMsg("短信验证码已过期,请重新发送!"); | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("短信验证码已过期,请重新发送!"); | |||
} | |||
if (!smsCode.equals(req.getCode())){ | |||
response.setCode("0"); | |||
response.setMsg("短信验证码错误!"); | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("短信验证码错误!"); | |||
} | |||
return response; | |||
} | |||
} |
@@ -0,0 +1,193 @@ | |||
package cn.com.taiji.ias.manager.ass.active; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import java.util.Objects; | |||
import cn.com.taiji.core.entity.dict.basic.SourceType; | |||
import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError; | |||
import cn.com.taiji.core.repo.jpa.ass.AssDeviceReactivateRepo; | |||
import cn.com.taiji.core.repo.jpa.ass.AssOrderinfoRepo; | |||
import cn.com.taiji.core.repo.jpa.basic.QtkObuInfoRepo; | |||
import cn.com.taiji.core.repo.jpa.basic.QtkVehicleInfoRepo; | |||
import cn.com.taiji.core.repo.jpa.issue.IssueOrderinfoRepo; | |||
import cn.com.taiji.core.repo.jpa.managew.ActiveRecordRepo; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import cn.com.taiji.common.manager.ManagerException; | |||
import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||
import cn.com.taiji.common.pub.BeanTools; | |||
import cn.com.taiji.core.entity.basic.QtkCardInfo; | |||
import cn.com.taiji.core.entity.basic.QtkCustomerInfo; | |||
import cn.com.taiji.core.entity.basic.QtkObuInfo; | |||
import cn.com.taiji.core.entity.basic.QtkVehicleInfo; | |||
import cn.com.taiji.core.entity.dict.basic.ObuStatus; | |||
import cn.com.taiji.core.entity.issue.IssueOrderinfo; | |||
import cn.com.taiji.core.entity.user.Staff; | |||
import cn.com.taiji.core.model.comm.protocol.ias.ass.ActiveQueryVehicleRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.ass.ActiveQueryVehicleResponse; | |||
import cn.com.taiji.core.repo.jpa.ass.AssReimburseOrderRepo; | |||
import cn.com.taiji.core.repo.jpa.basic.QtkCardInfoRepo; | |||
import cn.com.taiji.core.repo.jpa.basic.QtkCustomerInfoRepo; | |||
import cn.com.taiji.core.repo.jpa.dmq.EtcTransactionRepo; | |||
import cn.com.taiji.core.repo.jpa.user.StaffRepo; | |||
import cn.com.taiji.core.repo.request.managew.DeviceReactivateModel; | |||
import cn.com.taiji.ias.manager.AbstractCommManager; | |||
@Service | |||
public class ActiveQueryVehicleManager extends AbstractCommManager { | |||
@Autowired | |||
private IssueOrderinfoRepo issueOrderinfoRepo; | |||
@Autowired | |||
private QtkVehicleInfoRepo vehicleInfoRepo; | |||
@Autowired | |||
private QtkCustomerInfoRepo customerInfoRepo; | |||
@Autowired | |||
private QtkCardInfoRepo cardInfoRepo; | |||
@Autowired | |||
private QtkObuInfoRepo obuInfoRepo; | |||
@Autowired | |||
private StaffRepo staffRepo; | |||
public ActiveQueryVehicleResponse serviceHandle(ActiveQueryVehicleRequest req) throws ServiceHandleException { | |||
List<DeviceReactivateModel> list = new ArrayList<>() ; | |||
// 渠道办理 | |||
if (req.getSourceType().equals(SourceType.CHANNEL)){ | |||
if (req.getVehicleId() == null){ | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("请传入车辆ID"); | |||
} | |||
// 非本人办理,查询车辆信息表 | |||
QtkVehicleInfo info = vehicleInfoRepo.findByVehicleId(req.getVehicleId()); | |||
if(info == null){ | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("未查到车辆信息!"); | |||
} | |||
// 查询车辆的用户信息 | |||
QtkCustomerInfo customerInfo = customerInfoRepo.findByCustomerId(info.getCustomerId()); | |||
IssueOrderinfo orderinfo = issueOrderinfoRepo.findWaitingActiveByVehicleId(req.getVehicleId()); | |||
DeviceReactivateModel model = new DeviceReactivateModel(); | |||
if (orderinfo != null){ // 首次激活 | |||
BeanTools.copyProperties(orderinfo, model); | |||
model.setMobile(customerInfo.getCustomerTel()); | |||
model.setVehicleType(info.getType()); | |||
model.setOrderId(orderinfo.getId()); | |||
model.setActiveType(1); | |||
list.add(model); | |||
} else { // 二次激活 | |||
QtkCardInfo cardInfo = cardInfoRepo.findByVehicleIdAndCardStatus(req.getVehicleId()); | |||
QtkObuInfo obuInfo = obuInfoRepo.findByVehicleIdAndObuStatus(req.getVehicleId(), ObuStatus.ZC); | |||
if (cardInfo == null || obuInfo == null){ | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("未查到车辆的卡签信息,无法二次激活!"); | |||
} | |||
BeanTools.copyProperties(info, model); | |||
model.setVehicleType(info.getType()); | |||
model.setMobile(customerInfo.getCustomerTel()); | |||
model.setActiveType(2); | |||
model.setCardId(cardInfo.getCardId()); | |||
model.setObuId(obuInfo.getObuId()); | |||
list.add(model); | |||
} | |||
} | |||
// 小程序和app办理 | |||
else { | |||
if (req.getStaffId() == null && req.getCustomerId() == null){ | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("请传入用户OpenId或StaffId"); | |||
} | |||
QtkCustomerInfo customerInfo = customerInfoRepo.findByCustomerId(req.getCustomerId()); | |||
Staff staff = new Staff(); | |||
if (customerInfo == null){ | |||
if (req.getStaffId() == null){ | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("未查到客户信息!"); | |||
}else { | |||
staff = staffRepo.findByStaffId(req.getStaffId()); | |||
if (staff == null){ | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("未查到业务员信息!"); | |||
} | |||
} | |||
} | |||
if (req.getVehicleId().isEmpty()){ | |||
// 本人办理,查询订单表和车辆表 | |||
List<QtkVehicleInfo> vehicleInfos = vehicleInfoRepo.findByCustomerId(req.getCustomerId()); | |||
if (!vehicleInfos.isEmpty()){ | |||
for (QtkVehicleInfo vehicleInfo : vehicleInfos) { | |||
QtkCardInfo cardInfo = cardInfoRepo.findByVehicleIdAndCardStatus(vehicleInfo.getVehicleId()); | |||
QtkObuInfo obuInfo = obuInfoRepo.findByVehicleIdAndObuStatus(vehicleInfo.getVehicleId(), ObuStatus.ZC); | |||
if (cardInfo != null){ | |||
DeviceReactivateModel model = new DeviceReactivateModel(); | |||
BeanTools.copyProperties(vehicleInfo, model); | |||
model.setMobile(customerInfo.getCustomerTel()); | |||
model.setVehicleType(vehicleInfo.getType()); | |||
model.setCardId(cardInfo.getCardId()); | |||
if (obuInfo != null){ | |||
model.setObuId(obuInfo.getObuId()); | |||
} | |||
model.setActiveType(2); | |||
list.add(model); | |||
} | |||
} | |||
} | |||
List<IssueOrderinfo> orderinfos = issueOrderinfoRepo.listByCustomerId(req.getCustomerId()); | |||
if (!orderinfos.isEmpty()){ | |||
for (IssueOrderinfo orderinfo : orderinfos) { | |||
QtkVehicleInfo info = vehicleInfoRepo.findByVehicleId(orderinfo.getVehicleId()); | |||
DeviceReactivateModel model = new DeviceReactivateModel(); | |||
BeanTools.copyProperties(orderinfo, model); | |||
model.setMobile(customerInfo.getCustomerTel()); | |||
model.setVehicleType(info.getType()); | |||
model.setOrderId(orderinfo.getId()); | |||
model.setActiveType(1); | |||
list.add(model); | |||
} | |||
} | |||
}else { | |||
// 非本人办理,查询车辆信息表 | |||
QtkVehicleInfo info = vehicleInfoRepo.findByVehicleId(req.getVehicleId()); | |||
if(info == null){ | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("未查到车辆信息!"); | |||
} | |||
IssueOrderinfo orderinfo = issueOrderinfoRepo.findWaitingActiveByVehicleId(req.getVehicleId()); | |||
if (orderinfo != null){ // 首次激活 | |||
DeviceReactivateModel model = new DeviceReactivateModel(); | |||
BeanTools.copyProperties(orderinfo, model); | |||
if (staff != null){ | |||
if (!Objects.equals(staff.getAgencyId(), orderinfo.getAgencyId())){ | |||
return null; | |||
}else { | |||
customerInfo = customerInfoRepo.findByCustomerId(orderinfo.getCustomerId()); | |||
} | |||
} | |||
model.setMobile(customerInfo.getCustomerTel()); | |||
model.setVehicleType(info.getType()); | |||
model.setOrderId(orderinfo.getId()); | |||
model.setActiveType(1); | |||
list.add(model); | |||
} else { // 二次激活 | |||
QtkCardInfo cardInfo = cardInfoRepo.findByVehicleIdAndCardStatus(req.getVehicleId()); | |||
QtkObuInfo obuInfo = obuInfoRepo.findByVehicleIdAndObuStatus(req.getVehicleId(), ObuStatus.ZC); | |||
if (cardInfo == null || obuInfo == null){ | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("未查到车辆的卡签信息,无法二次激活!"); | |||
} | |||
if (staff != null){ | |||
if (!Objects.equals(staff.getAgencyId(), cardInfo.getAgencyId())){ | |||
return null; | |||
}else { | |||
customerInfo = customerInfoRepo.findByCustomerId(cardInfo.getCustomerId()); | |||
} | |||
} | |||
DeviceReactivateModel model = new DeviceReactivateModel(); | |||
BeanTools.copyProperties(info, model); | |||
model.setVehicleType(info.getType()); | |||
model.setMobile(customerInfo.getCustomerTel()); | |||
model.setActiveType(2); | |||
model.setCardId(cardInfo.getCardId()); | |||
model.setObuId(obuInfo.getObuId()); | |||
list.add(model); | |||
} | |||
} | |||
} | |||
ActiveQueryVehicleResponse resDTO = new ActiveQueryVehicleResponse(); | |||
resDTO.setModelList(list); | |||
return resDTO; | |||
} | |||
} |
@@ -0,0 +1,92 @@ | |||
package cn.com.taiji.ias.manager.ass.active; | |||
import java.time.LocalDateTime; | |||
import cn.com.taiji.core.entity.basic.QtkAgency; | |||
import cn.com.taiji.core.entity.user.AccountInfo; | |||
import cn.com.taiji.core.repo.jpa.user.AccountInfoRepo; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||
import cn.com.taiji.common.pub.BeanTools; | |||
import cn.com.taiji.core.entity.ass.AssDeviceReactivate; | |||
import cn.com.taiji.core.entity.ass.AssOrderinfo; | |||
import cn.com.taiji.core.entity.basic.QtkCardInfo; | |||
import cn.com.taiji.core.entity.basic.QtkCustomerInfo; | |||
import cn.com.taiji.core.entity.dict.ass.AssOrderStatus; | |||
import cn.com.taiji.core.entity.dict.ass.AssOrderStep; | |||
import cn.com.taiji.core.entity.dict.ass.AssOrderType; | |||
import cn.com.taiji.core.entity.managew.ActiveRecord; | |||
import cn.com.taiji.core.model.comm.protocol.ias.ass.ActiveSaveRecordRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.ass.ActiveSaveRecordResponse; | |||
import cn.com.taiji.core.repo.jpa.ass.AssDeviceReactivateRepo; | |||
import cn.com.taiji.core.repo.jpa.ass.AssOrderinfoRepo; | |||
import cn.com.taiji.core.repo.jpa.basic.QtkCardInfoRepo; | |||
import cn.com.taiji.core.repo.jpa.basic.QtkCustomerInfoRepo; | |||
import cn.com.taiji.core.repo.jpa.managew.ActiveRecordRepo; | |||
import cn.com.taiji.ias.manager.AbstractCommManager; | |||
@Service | |||
public class ActiveSaveRecordManager extends AbstractCommManager { | |||
@Autowired | |||
private QtkCardInfoRepo cardInfoRepo; | |||
@Autowired | |||
private QtkCustomerInfoRepo customerInfoRepo; | |||
@Autowired | |||
private AssOrderinfoRepo assOrderinfoRepo; | |||
@Autowired | |||
private AssDeviceReactivateRepo deviceReactivateRepo; | |||
@Autowired | |||
private ActiveRecordRepo recordRepo; | |||
@Autowired | |||
private AccountInfoRepo accountInfoRepo; | |||
public ActiveSaveRecordResponse serviceHandle(ActiveSaveRecordRequest req) throws ServiceHandleException { | |||
LocalDateTime now = LocalDateTime.now(); | |||
QtkCardInfo cardInfo = cardInfoRepo.findByCardId(req.getCardId()); | |||
QtkCustomerInfo customerInfo = customerInfoRepo.findByCustomerId(cardInfo.getCustomerId()); | |||
String orderNo = createOrderNo(cardInfo.getAgencyId()); | |||
AccountInfo accountInfo = accountInfoRepo.findByMobile(customerInfo.getCustomerTel()); | |||
// 存售后订单 | |||
AssOrderinfo assOrderinfo = copyProperties(customerInfo, new AssOrderinfo()); | |||
BeanTools.copyProperties(req, assOrderinfo); | |||
assOrderinfo.setAgencyId(cardInfo.getAgencyId()); | |||
assOrderinfo.setChannelId(cardInfo.getChannelId()); | |||
assOrderinfo.setOrderNo(orderNo); | |||
assOrderinfo.setOpenId(accountInfo.getOpenId()); | |||
assOrderinfo.setOrderType(AssOrderType.REACTIVATE); | |||
assOrderinfo.setOrderStatus(AssOrderStatus.FINISHED); | |||
assOrderinfo.setOrderStep(AssOrderStep.COMPLETED); | |||
assOrderinfo.setApplyTime(now); | |||
assOrderinfo.setInsertTime(now); | |||
assOrderinfo.setUpdateTime(now); | |||
AssOrderinfo save = assOrderinfoRepo.save(assOrderinfo); | |||
// 存二次激活记录 | |||
AssDeviceReactivate deviceReactivate = new AssDeviceReactivate(); | |||
BeanTools.copyProperties(req, deviceReactivate); | |||
deviceReactivate.setInsertTime(now); | |||
deviceReactivate.setOrderNo(orderNo); | |||
deviceReactivateRepo.persist(deviceReactivate); | |||
// 封装数据 | |||
ActiveRecord record = new ActiveRecord(); | |||
BeanTools.copyProperties(save, record,"id"); | |||
BeanTools.copyProperties(req, record); | |||
record.setVehiclePlate(req.getVehiclePlate()); | |||
record.setVehiclePlateColor(req.getVehiclePlateColor()); | |||
record.setActiveTime(LocalDateTime.now()); | |||
record.setResetStatus(0); | |||
record.setCardType(cardInfo.getCardTypeNew()); | |||
record.setSourceType(req.getSourceType()); | |||
recordRepo.save(record); | |||
ActiveSaveRecordResponse res = new ActiveSaveRecordResponse(); | |||
res.setCode("1"); | |||
res.setMsg("保存成功"); | |||
return res; | |||
} | |||
} |
@@ -0,0 +1,27 @@ | |||
//package cn.com.taiji.ias.manager.ass.reimburseOrder; | |||
// | |||
// | |||
//import org.springframework.beans.factory.annotation.Autowired; | |||
//import org.springframework.stereotype.Service; | |||
// | |||
//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.ReimburseOrderCancelRequest; | |||
//import cn.com.taiji.core.model.comm.protocol.ias.ass.ReimburseOrderCancelResponse; | |||
//import cn.com.taiji.core.model.comm.protocol.ias.ass.ReimburseOrderQueryResponse; | |||
//import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError; | |||
//import cn.com.taiji.core.repo.jpa.ass.AssReimburseOrderRepo; | |||
//import cn.com.taiji.core.repo.request.ass.AssReimburseOrderPageRequest; | |||
//import cn.com.taiji.ias.manager.AbstractCommManager; | |||
// | |||
//@Service | |||
//public class ReimburseOrderCancelManager extends AbstractCommManager { | |||
// @Autowired | |||
// private AssReimburseOrderRepo reimburseOrderRepo; | |||
// | |||
// public ReimburseOrderCancelResponse serviceHandle(ReimburseOrderCancelRequest req) throws ServiceHandleException { | |||
// | |||
// return null; | |||
// } | |||
// | |||
//} |
@@ -0,0 +1,84 @@ | |||
//package cn.com.taiji.ias.manager.ass.reimburseOrder; | |||
// | |||
// | |||
//import cn.com.taiji.core.entity.basic.QtkAgency; | |||
//import cn.com.taiji.core.entity.dict.AuditStatus; | |||
//import cn.com.taiji.core.entity.dmq.EtcTransaction; | |||
//import cn.com.taiji.core.entity.user.Staff; | |||
//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.QtkCustomerInfoRepo; | |||
//import cn.com.taiji.core.repo.jpa.dmq.EtcTransactionRepo; | |||
//import cn.com.taiji.core.repo.jpa.user.StaffRepo; | |||
//import org.springframework.beans.factory.annotation.Autowired; | |||
//import org.springframework.stereotype.Service; | |||
// | |||
//import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||
//import cn.com.taiji.common.pub.BeanTools; | |||
//import cn.com.taiji.core.entity.ass.AssReimburseOrder; | |||
//import cn.com.taiji.core.entity.basic.QtkCardInfo; | |||
//import cn.com.taiji.core.entity.basic.QtkCustomerInfo; | |||
//import cn.com.taiji.core.entity.dict.basic.SourceType; | |||
//import cn.com.taiji.core.model.comm.protocol.ias.ass.ReimburseOrderInputRequest; | |||
//import cn.com.taiji.core.model.comm.protocol.ias.ass.ReimburseOrderInputResponse; | |||
//import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError; | |||
//import cn.com.taiji.core.repo.jpa.ass.AssReimburseOrderRepo; | |||
//import cn.com.taiji.ias.manager.AbstractCommManager; | |||
// | |||
//import java.util.ArrayList; | |||
//import java.util.List; | |||
// | |||
//@Service | |||
//public class ReimburseOrderInputManager extends AbstractCommManager { | |||
// @Autowired | |||
// private AssReimburseOrderRepo reimburseOrderRepo; | |||
// @Autowired | |||
// private EtcTransactionRepo etcTransactionRepo; | |||
// @Autowired | |||
// private QtkCardInfoRepo cardInfoRepo; | |||
// @Autowired | |||
// private StaffRepo staffRepo; | |||
// @Autowired | |||
// private QtkCustomerInfoRepo customerInfoRepo; | |||
// | |||
// public ReimburseOrderInputResponse serviceHandle(ReimburseOrderInputRequest req) throws ServiceHandleException { | |||
// if (req.getSourceType() != SourceType.WEB){ | |||
// throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("当前渠道不可提交补缴申请单"); | |||
// } | |||
// // 查询卡信息 | |||
// QtkCardInfo cardInfo = cardInfoRepo.findByCardId(req.getCardId()); | |||
// if (cardInfo == null){ | |||
// throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("未找到该卡信息"); | |||
// } | |||
// QtkCustomerInfo customerInfo = customerInfoRepo.findByCustomerId(cardInfo.getCustomerId()); | |||
// if (customerInfo == null){ | |||
// throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("未找到该用户信息"); | |||
// } | |||
// Staff staff = staffRepo.findByStaffId(req.getOperateStaffId()); | |||
// if (staff == null) { | |||
// throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("不是员工账户"); | |||
// } | |||
// // todo 查询流水,存子表 | |||
// List<EtcTransaction> transactions = new ArrayList<>(); | |||
// if (!req.getListNos().isEmpty()){ | |||
// EtcTransaction transaction = new EtcTransaction(); | |||
// for (String listNo : req.getListNos()){ | |||
// transaction = etcTransactionRepo.findByListNo(listNo); | |||
// transactions.add(transaction); | |||
// } | |||
// } | |||
// | |||
// // 封装实体 | |||
// AssReimburseOrder order = new AssReimburseOrder(); | |||
// BeanTools.copyProperties(req, order); | |||
// order.setReimburseOrderId(createOrderNo(req.getAgentId())); | |||
// order.setStatus(AuditStatus.AUDIT); | |||
// AssReimburseOrder save = reimburseOrderRepo.save(order); | |||
// ReimburseOrderInputResponse res = new ReimburseOrderInputResponse(); | |||
// res.setCode("1"); | |||
// res.setOrderNo(save.getReimburseOrderId()); | |||
// res.setMsg("提交成功"); | |||
// return res; | |||
// } | |||
// | |||
//} |
@@ -0,0 +1,317 @@ | |||
//package cn.com.taiji.ias.manager.ass.reimburseOrder; | |||
// | |||
// | |||
//import java.io.FileNotFoundException; | |||
//import java.io.IOException; | |||
//import java.io.InputStream; | |||
//import java.net.MalformedURLException; | |||
//import java.net.URL; | |||
//import java.net.URLEncoder; | |||
//import java.time.LocalDate; | |||
//import java.time.LocalDateTime; | |||
//import java.time.format.DateTimeFormatter; | |||
//import java.util.ArrayList; | |||
//import java.util.List; | |||
// | |||
//import cn.com.taiji.core.model.comm.protocol.ias.ass.*; | |||
//import cn.com.taiji.core.repo.jpa.ass.AssReimburseOrderRepo; | |||
//import cn.com.taiji.core.repo.jpa.basic.QtkAgencyRepo; | |||
//import cn.com.taiji.core.repo.jpa.dmq.EtcTransactionRepo; | |||
//import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |||
//import org.apache.poi.ss.usermodel.*; | |||
//import org.apache.poi.xssf.usermodel.XSSFWorkbook; | |||
//import org.springframework.beans.factory.annotation.Autowired; | |||
//import org.springframework.beans.factory.annotation.Value; | |||
//import org.springframework.stereotype.Service; | |||
// | |||
//import com.google.common.collect.Lists; | |||
// | |||
//import cn.com.taiji.common.manager.ManagerException; | |||
//import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||
//import cn.com.taiji.common.model.dao.Pagination; | |||
//import cn.com.taiji.common.pub.BeanTools; | |||
//import cn.com.taiji.common.pub.StringTools; | |||
//import cn.com.taiji.core.entity.basic.QtkCardInfo; | |||
//import cn.com.taiji.core.entity.basic.QtkCustomerInfo; | |||
//import cn.com.taiji.core.entity.dict.basic.SourceType; | |||
//import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError; | |||
//import cn.com.taiji.core.repo.jpa.basic.QtkCardInfoRepo; | |||
//import cn.com.taiji.core.repo.request.ass.AssReimburseOrderPageRequest; | |||
//import cn.com.taiji.ias.manager.AbstractCommManager; | |||
// | |||
//@Service | |||
//public class ReimburseOrderManager extends AbstractCommManager { | |||
// @Autowired | |||
// private AssReimburseOrderRepo reimburseOrderRepo; | |||
// @Autowired | |||
// private EtcTransactionRepo etcTransactionRepo; | |||
// @Autowired | |||
// private QtkCardInfoRepo cardInfoRepo; | |||
// @Autowired | |||
// private QtkAgencyRepo agencyRepo; | |||
// @Autowired | |||
// private WxLoginUserUtil wxLoginUserUtil; | |||
// @Autowired | |||
// private OrderPayManager orderPayManager; | |||
// @Value("${minioDownloadUrl}") | |||
// private String minioDownloadUrl; | |||
// | |||
// public Pagination applyForm(ReimburseOrderApplyFormRequestDTO dto) throws ManagerException { | |||
// if (dto.getOrderSource() != OrderSourceEnum.WEB){ | |||
// throw new ManagerException("当前渠道不可提交补缴申请单"); | |||
// } | |||
// // 查询流水表信息 | |||
// EtcTransactionPageRequest req = copyProperties(dto, new EtcTransactionPageRequest()); | |||
// return etcTransactionRepo.page(req); | |||
// } | |||
// | |||
// public ReimburseOrderApplyResponseDTO apply(ReimburseOrderApplyRequestDTO req) throws ManagerException { | |||
// if (req.getOrderSource() != SourceType.WEB){ | |||
// throw new ManagerException("当前渠道不可提交补缴申请单"); | |||
// } | |||
// // 查询卡信息 | |||
// QtkCardInfo cardInfo = cardInfoRepo.findByCardId(req.getCardId()); | |||
// // 查询流水 | |||
// EtcTransaction transaction = new EtcTransaction(); | |||
// if (req.getListNo() != null){ | |||
// transaction = etcTransactionRepo.findByListNo(req.getListNo()); | |||
// } | |||
// Staff staff = staffRepo.findByOpenId(req.getOpenId()); | |||
// if (staff == null) { | |||
// throw new ManagerException("不是员工账户"); | |||
// } | |||
// // 封装实体 | |||
// QtkReimburseOrder order = new QtkReimburseOrder(); | |||
// BeanTools.copyProperties(transaction, order); | |||
// order.setOperateStaffId(staff.getStaffId()); | |||
// order.setCustomerId(cardInfo.getCustomerId()); | |||
// QtkCustomerInfo customerInfo = qtkCustomerInfoRepo.findByCustomerId(cardInfo.getCustomerId()); | |||
// order.setUserName(customerInfo.getCustomerName()); | |||
// order.setVehicleId(cardInfo.getVehicleId()); | |||
// order.setOrderId(queryMaxId(1)); | |||
// order.setCardId(cardInfo.getCardId()); | |||
// order.setOrderSource(req.getOrderSource().name()); | |||
// order.setAgencyId(req.getAgentId()); | |||
// Agency agency = agencyRepo.findByAgencyId(req.getAgentId()); | |||
// if (agency != null) { | |||
// order.setAgencyName(agency.getName()); | |||
// } | |||
// order.setReason(req.getReason()); | |||
// order.setReimburseFee(req.getReimburseFee()); | |||
// order.setReimburseStatus(0); | |||
// reimburseOrderRepo.persist(order); | |||
// ReimburseOrderApplyResponseDTO res = new ReimburseOrderApplyResponseDTO(); | |||
// res.setVehicleId(order.getVehicleId()); | |||
// return res; | |||
// } | |||
// | |||
// public ReimburseOrderApplyBatchResponseDTO applyBatch(ReimburseOrderApplyBatchRequestDTO req) throws ManagerException { | |||
// //解析文件 | |||
// ArrayList<ArrayList<String>> row = releaseFile(req.getExcelUrl()); | |||
// if (row.size() == 0) return null; | |||
// List<String> list = new ArrayList<>(); | |||
// //将能处理的数据封装model | |||
// List<ReimburseOrderApplyRequestDTO> models = encModel(row); | |||
// //循环处理增加 | |||
// for (ReimburseOrderApplyRequestDTO model : models){ | |||
// ReimburseOrderApplyRequestDTO dto = copyProperties(req, model); | |||
// ReimburseOrderApplyResponseDTO out = apply(dto); | |||
// list.add(out.getVehicleId()); | |||
// } | |||
// ReimburseOrderApplyBatchResponseDTO res = new ReimburseOrderApplyBatchResponseDTO(); | |||
// res.setVehicleId(list); | |||
// return res; | |||
// } | |||
// | |||
// public ReimburseOrderApplyViewResponseDTO view(ReimburseOrderApplyViewRequestDTO req) { | |||
// ReimburseOrderApplyViewResponseDTO res = new ReimburseOrderApplyViewResponseDTO(); | |||
// QtkReimburseOrder order = reimburseOrderRepo.findByOrderId(req.getOrderId()); | |||
// res.setOrder(order); | |||
// return res; | |||
// } | |||
// | |||
// public ReimburseOrderCancelResponseDTO cancel(ReimburseOrderCancelRequestDTO req) throws ManagerException { | |||
// ReimburseOrderCancelResponseDTO res = new ReimburseOrderCancelResponseDTO(); | |||
// Staff staff = staffRepo.findByOpenId(req.getOpenId()); | |||
// if (staff == null) { | |||
// throw new ManagerException("不是员工账户"); | |||
// } | |||
// for (String orderId : req.getOrderIds()){ | |||
// QtkReimburseOrder order = reimburseOrderRepo.findByOrderId(orderId); | |||
// if (order == null){ | |||
// throw new ManagerException("未查询到该条申请"); | |||
// } | |||
// if (order.getReimburseStatus() == 0){ | |||
// order.setReimburseStatus(2); | |||
// order.setClosedTime(LocalDateTime.now()); | |||
// order.setUpdateTime(LocalDateTime.now()); | |||
// order.setClosedStaffId(staff.getStaffId()); | |||
// order.setClosedReason(req.getClosedReason()); | |||
// reimburseOrderRepo.merge(order); | |||
// }else { | |||
// throw new ManagerException("存在当前不允许取消的订单"); | |||
// } | |||
// } | |||
// res.setOrderId(req.getOrderIds()); | |||
// return res; | |||
// } | |||
// | |||
// public ReimburseOrderUserPayResponseDTO userPay(ReimburseOrderUserPayRequestDTO req) throws ManagerException { | |||
// ReimburseOrderUserPayResponseDTO res = new ReimburseOrderUserPayResponseDTO(); | |||
// Integer fee = 0; | |||
// // 校验金额 | |||
// for (String orderId : req.getOrderIds()) { | |||
// QtkReimburseOrder order = reimburseOrderRepo.findByOrderId(orderId); | |||
// fee += order.getReimburseFee(); | |||
// } | |||
// if (!fee.equals(req.getReimburseFee())){ | |||
// throw new ManagerException("传入的金额与计算金额不相同!"); | |||
// } | |||
// // todo 通过fee调用支付接口 | |||
// // 新建支付单 | |||
// OrderPayAddModel payAddModel = new OrderPayAddModel(); | |||
// payAddModel.newInstance(OrderPayType.REIMBURSE_ORDER, req.getOrderIds().get(0), req.getAgentId(), Long.valueOf(fee), MyFinals.REIMBURSE_PAY_CONFIG_ID); | |||
// CsmsnOrderPay pay = orderPayManager.add(payAddModel); | |||
// // 支付支付单 | |||
// OrderPayApplyModel applyModel = new OrderPayApplyModel(); | |||
// applyModel.newInstance(pay.getId(),req.getWxOpenId(),req.getSpbillCreateIp(),req.getH5Type()); | |||
// orderPayManager.apply(applyModel); | |||
// // 查询 | |||
// List<CsmsnOrderPay> payList = orderPayManager.query(pay.getOrderId()); | |||
// if (payList != null){ | |||
// // 修改补交单状态 | |||
// for (String orderId : req.getOrderIds()){ | |||
// QtkReimburseOrder order = reimburseOrderRepo.findByOrderId(orderId); | |||
// if (order == null){ | |||
// throw new ManagerException("未查询到该条申请"); | |||
// } | |||
// if (order.getReimburseStatus() == 0){ | |||
// order.setReimburseStatus(1); | |||
// // todo 支付单号 | |||
// order.setPayOrderId(payList.get(0).getPayOrderId()); | |||
// order.setUpdateTime(LocalDateTime.now()); | |||
// reimburseOrderRepo.merge(order); | |||
// }else { | |||
// throw new ManagerException("存在当前不允许取消的订单"); | |||
// } | |||
// } | |||
// } | |||
// res.setOrderIds(req.getOrderIds()); | |||
// return res; | |||
// } | |||
// | |||
// private String queryMaxId(int num) { | |||
//// 获取当天时间 | |||
// LocalDate nowDate = LocalDate.now(); | |||
// DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyyMMdd"); | |||
// String time = dateFormatter.format(nowDate); | |||
//// 计算最大id值 | |||
// QtkReimburseOrder maxOrder = reimburseOrderRepo.getMaxId(); | |||
// if (maxOrder != null && maxOrder.getId().startsWith(time + "")) | |||
// { | |||
// String maxId = maxOrder.getId(); | |||
// num = Integer.parseInt(maxId.replace(time, "")) + 1; | |||
// String.format("%05d",num); | |||
// } | |||
// return time + String.format("%05d",num); | |||
// } | |||
// | |||
// private ArrayList<ArrayList<String>> releaseFile(String fileUrl) throws ServiceHandleException { | |||
// ArrayList<ArrayList<String>> row = new ArrayList<>(); | |||
// | |||
// if (StringTools.isEmpty(fileUrl)) { | |||
// throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("文件url不能为空"); | |||
// } | |||
// String[] split = fileUrl.split("/"); | |||
// String urlStr = ""; | |||
// String fileName = ""; | |||
// for (int i = 0; i < split.length; i++) { | |||
// if (i == 0) { | |||
// urlStr += minioDownloadUrl + "/" + split[i]; | |||
// } else if (i == split.length - 1) { | |||
// urlStr += "/" + URLEncoder.encode(split[i]).replace("+", "%20"); | |||
// String[] s = split[i].split("_", 0); | |||
// fileName = s.length == 1 ? s[0] : s[1]; | |||
// } else { | |||
// urlStr += "/" + split[i]; | |||
// | |||
// } | |||
// | |||
// } | |||
// InputStream inputStream = null; | |||
// try { | |||
// URL url = new URL(urlStr); | |||
// inputStream = url.openStream(); | |||
// } catch (MalformedURLException e) { | |||
// throw new RuntimeException(e); | |||
// } catch (IOException e) { | |||
// throw new RuntimeException(e); | |||
// } | |||
// // 获取文件名称 | |||
// System.out.println(fileName); | |||
// | |||
// try { | |||
// // 判断excel版本 | |||
// Workbook workbook = null; | |||
// if (judegExcelEdition(fileName)) { | |||
// workbook = new XSSFWorkbook(inputStream); | |||
// } else { | |||
// workbook = new HSSFWorkbook(inputStream); | |||
// } | |||
// | |||
// // 获取第一张工作表 | |||
// Sheet sheet = workbook.getSheetAt(0); | |||
// // 从第二行开始获取 getLastRowNum | |||
// for (int i = 1; i < sheet.getPhysicalNumberOfRows() - 1; i++) { | |||
// // 循环获取工作表的每一行 | |||
// Row sheetRow = sheet.getRow(i); | |||
// // 循环获取每一列 | |||
// ArrayList<String> cell = new ArrayList<>(); | |||
// for (int j = 0; j < sheetRow.getPhysicalNumberOfCells(); j++) { // | |||
// // 将每一个单元格的值装入列集合 | |||
// Cell cell2 = sheetRow.getCell(j); | |||
// cell2.setCellType(CellType.STRING); | |||
// cell.add(sheetRow.getCell(j).getStringCellValue()); | |||
// } | |||
// // 将装有每一列的集合装入大集合 | |||
// row.add(cell); | |||
// | |||
// // 关闭资源 | |||
// workbook.close(); | |||
// } | |||
// } catch (FileNotFoundException e) { | |||
// e.printStackTrace(); | |||
// System.out.println("===================未找到文件======================"); | |||
// } catch (IOException e) { | |||
// e.printStackTrace(); | |||
// System.out.println("===================上传失败======================"); | |||
// } | |||
// return row; | |||
// } | |||
// | |||
// private static boolean judegExcelEdition(String fileName) { | |||
// if (fileName.matches("^.+\\.(?i)(xls)$")) { | |||
// return false; | |||
// } else { | |||
// return true; | |||
// } | |||
// } | |||
// | |||
// private List<ReimburseOrderApplyRequestDTO> encModel(ArrayList<ArrayList<String>> row) throws ManagerException { | |||
// List<ReimburseOrderApplyRequestDTO> models = Lists.newArrayList(); | |||
// for (int i = 1; i < row.size(); i++){ | |||
// ArrayList<String> arrayList = row.get(i); | |||
// ReimburseOrderApplyRequestDTO model = new ReimburseOrderApplyRequestDTO(); | |||
// if (arrayList.get(0) == null || arrayList.get(1) == null || arrayList.get(2) == null || arrayList.get(4) == null || arrayList.get(6) == null){ | |||
// throw new ManagerException("表格格式错误或传入参数有空,请检查文件!"); | |||
// } | |||
// model.setCardId(arrayList.get(0)); | |||
// model.setVehicleId(arrayList.get(1)+"_"+arrayList.get(2)); | |||
// model.setListNo(arrayList.get(3)); | |||
// model.setReimburseFee(Integer.valueOf(arrayList.get(4))); | |||
// model.setReason(arrayList.get(5)); | |||
// models.add(model); | |||
// } | |||
// return models; | |||
// } | |||
//} |
@@ -0,0 +1,22 @@ | |||
//package cn.com.taiji.ias.manager.ass.reimburseOrder; | |||
// | |||
// | |||
//import org.springframework.beans.factory.annotation.Autowired; | |||
//import org.springframework.stereotype.Service; | |||
// | |||
//import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||
//import cn.com.taiji.core.model.comm.protocol.ias.ass.ReimburseOrderPayRequest; | |||
//import cn.com.taiji.core.model.comm.protocol.ias.ass.ReimburseOrderPayResponse; | |||
//import cn.com.taiji.core.repo.jpa.ass.AssReimburseOrderRepo; | |||
//import cn.com.taiji.ias.manager.AbstractCommManager; | |||
// | |||
//@Service | |||
//public class ReimburseOrderPayManager extends AbstractCommManager { | |||
// @Autowired | |||
// private AssReimburseOrderRepo reimburseOrderRepo; | |||
// | |||
// public ReimburseOrderPayResponse serviceHandle(ReimburseOrderPayRequest req) throws ServiceHandleException { | |||
// return null; | |||
// } | |||
// | |||
//} |
@@ -0,0 +1,35 @@ | |||
//package cn.com.taiji.ias.manager.ass.reimburseOrder; | |||
// | |||
// | |||
//import org.springframework.beans.factory.annotation.Autowired; | |||
//import org.springframework.stereotype.Service; | |||
// | |||
//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.ReimburseOrderQueryRequest; | |||
//import cn.com.taiji.core.model.comm.protocol.ias.ass.ReimburseOrderQueryResponse; | |||
//import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError; | |||
//import cn.com.taiji.core.repo.jpa.ass.AssReimburseOrderRepo; | |||
//import cn.com.taiji.core.repo.request.ass.AssReimburseOrderPageRequest; | |||
//import cn.com.taiji.ias.manager.AbstractCommManager; | |||
// | |||
//@Service | |||
//public class ReimburseOrderQueryManager extends AbstractCommManager { | |||
// @Autowired | |||
// private AssReimburseOrderRepo reimburseOrderRepo; | |||
// | |||
// public ReimburseOrderQueryResponse serviceHandle(ReimburseOrderQueryRequest req) throws ServiceHandleException { | |||
// // 如果微信登录,userId必填 | |||
// if (req.getSourceType() == SourceType.WECHAT){ | |||
// if (req.getCustomerId() == null){ | |||
// throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("请传入用户OpenId"); | |||
// } | |||
// } | |||
// // todo 渠道不知道要啥限制,先放着 | |||
// ReimburseOrderQueryResponse res = new ReimburseOrderQueryResponse(); | |||
// AssReimburseOrderPageRequest pageRequest = copyProperties(req, new AssReimburseOrderPageRequest()); | |||
// res.setPagination(reimburseOrderRepo.page(pageRequest)); | |||
// return res; | |||
// } | |||
// | |||
//} |
@@ -0,0 +1,27 @@ | |||
//package cn.com.taiji.ias.manager.ass.reimburseOrder; | |||
// | |||
// | |||
//import cn.com.taiji.core.model.comm.protocol.ias.ass.ReimburseOrderReviewRequest; | |||
//import cn.com.taiji.core.model.comm.protocol.ias.ass.ReimburseOrderReviewResponse; | |||
//import org.springframework.beans.factory.annotation.Autowired; | |||
//import org.springframework.stereotype.Service; | |||
// | |||
//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.ReimburseOrderQueryRequest; | |||
//import cn.com.taiji.core.model.comm.protocol.ias.ass.ReimburseOrderQueryResponse; | |||
//import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError; | |||
//import cn.com.taiji.core.repo.jpa.ass.AssReimburseOrderRepo; | |||
//import cn.com.taiji.core.repo.request.ass.AssReimburseOrderPageRequest; | |||
//import cn.com.taiji.ias.manager.AbstractCommManager; | |||
// | |||
//@Service | |||
//public class ReimburseOrderReviewManager extends AbstractCommManager { | |||
// @Autowired | |||
// private AssReimburseOrderRepo reimburseOrderRepo; | |||
// | |||
// public ReimburseOrderReviewResponse serviceHandle(ReimburseOrderReviewRequest req) throws ServiceHandleException { | |||
// return null; | |||
// } | |||
// | |||
//} |
@@ -12,8 +12,13 @@ import cn.com.taiji.ias.manager.ass.AssOrderAuditManager; | |||
import cn.com.taiji.ias.manager.ass.AssOrderCancelManager; | |||
import cn.com.taiji.ias.manager.ass.AssOrderPayInfoManager; | |||
import cn.com.taiji.ias.manager.ass.AssOrderSendManager; | |||
import cn.com.taiji.ias.manager.ass.active.ActiveCheckCanActiveManager; | |||
import cn.com.taiji.ias.manager.ass.active.ActiveCheckSendCodeManager; | |||
import cn.com.taiji.ias.manager.ass.active.ActiveQueryVehicleManager; | |||
import cn.com.taiji.ias.manager.ass.active.ActiveSaveRecordManager; | |||
import cn.com.taiji.ias.manager.ass.customerInfoChange.CustomerInfoChangeApplyManager; | |||
import cn.com.taiji.ias.manager.ass.device.*; | |||
import cn.com.taiji.ias.manager.ass.reimburseOrder.*; | |||
import cn.com.taiji.ias.manager.ass.releasePlate.PlateOccupyQueryManager; | |||
import cn.com.taiji.ias.manager.ass.releasePlate.ReleasePlateApplyManager; | |||
import cn.com.taiji.ias.manager.ass.releasePlate.ReleasePlateViewManager; | |||
@@ -76,6 +81,26 @@ public class AssServiceHandler extends AbstractIasServiceHandler<AssServiceCmd> | |||
private DeviceCancelPayQueryManager deviceCancelPayQueryManager; | |||
@Autowired | |||
private AssOrderSendManager assOrderSendManager; | |||
@Autowired | |||
private ActiveQueryVehicleManager activeQueryVehicleManager; | |||
@Autowired | |||
private ActiveSaveRecordManager activeSaveRecordsManager; | |||
@Autowired | |||
private ActiveCheckCanActiveManager activeCheckCanActiveManager; | |||
@Autowired | |||
private ActiveCheckSendCodeManager activeCheckSendCodeManager; | |||
// @Autowired | |||
// private ReimburseOrderQueryManager reimburseOrderQueryManager; | |||
// @Autowired | |||
// private ReimburseOrderInputManager reimburseOrderInputManager; | |||
// @Autowired | |||
// private ReimburseOrderPayManager reimburseOrderPayManager; | |||
// @Autowired | |||
// private ReimburseOrderCancelManager reimburseOrderCancelManager; | |||
// @Autowired | |||
// private ReimburseOrderReviewManager reimburseOrderReviewManager; | |||
public AssServiceHandler() { | |||
super(IasServiceType.ASS); | |||
@@ -127,6 +152,24 @@ public class AssServiceHandler extends AbstractIasServiceHandler<AssServiceCmd> | |||
return deviceCancelConfirmManager.serviceHandle((DeviceCancelConfirmRequest) request); | |||
case SENDINFO: | |||
return assOrderSendManager.serviceHandle((AssOrderSendRequest) request, jsonReq.getIfCode(), jsonReq.getReqId(), reqInfo); | |||
case ACTIVEQUERYVEHICLE: | |||
return activeQueryVehicleManager.serviceHandle((ActiveQueryVehicleRequest) request); | |||
case ACTIVESAVERECORDS: | |||
return activeSaveRecordsManager.serviceHandle((ActiveSaveRecordRequest) request); | |||
case ACTIVECHECKSENDCODE: | |||
return activeCheckSendCodeManager.serviceHandle((ActiveCheckSendCodeRequest) request); | |||
case ACTIVECHECKCANACTIVE: | |||
return activeCheckCanActiveManager.serviceHandle((ActiveCheckCanActiveRequest) request); | |||
// case REIMBURSEORDERQUERY: | |||
// return reimburseOrderQueryManager.serviceHandle((ReimburseOrderQueryRequest) request); | |||
// case REIMBURSEORDERINPUT: | |||
// return reimburseOrderInputManager.serviceHandle((ReimburseOrderInputRequest) request); | |||
// case REIMBURSEORDERREVIEW: | |||
// return reimburseOrderReviewManager.serviceHandle((ReimburseOrderReviewRequest) request); | |||
// case REIMBURSEORDERPAY: | |||
// return reimburseOrderPayManager.serviceHandle((ReimburseOrderPayRequest) request); | |||
// case REIMBURSEORDERCANCEL: | |||
// return reimburseOrderCancelManager.serviceHandle((ReimburseOrderCancelRequest) request); | |||
default: | |||
throw FileProtocolSystemError.NOT_SUPPORT.toHandleException(jsonReq.getIfCode()); | |||
} |