|
|
@@ -8,6 +8,7 @@ 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.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.dict.basic.IdType; |
|
|
|
import cn.com.taiji.core.entity.dict.basic.UserType; |
|
|
@@ -17,7 +18,6 @@ import cn.com.taiji.core.entity.log.IasInterfaceLog; |
|
|
|
import cn.com.taiji.core.entity.user.AccountInfo; |
|
|
|
import cn.com.taiji.core.entity.user.Staff; |
|
|
|
import cn.com.taiji.core.model.comm.protocol.msgw.send.MsgwWxMpSendRequest; |
|
|
|
import cn.com.taiji.core.model.comm.protocol.msgw.send.MsgwWxMpSendResponse; |
|
|
|
import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError; |
|
|
|
import cn.com.taiji.core.repo.jpa.ass.AssDeviceCancelRepo; |
|
|
|
import cn.com.taiji.core.repo.jpa.ass.AssOrderinfoRepo; |
|
|
@@ -120,10 +120,29 @@ public class CommDeviceCancelManager extends AbstractCommManager { |
|
|
|
} |
|
|
|
|
|
|
|
// 查询正在中的订单 |
|
|
|
public void queryNormalOrder(String customerId) throws ServiceHandleException { |
|
|
|
public void handleNormalOrder(String customerId, String type) throws ServiceHandleException { |
|
|
|
List<AssOrderinfo> orders = orderInfoRepo.findByCustomerIdAndOrderTypeStatus(customerId, AssOrderType.CANCEL, AssOrderStatus.NORMAL); |
|
|
|
if (!orders.isEmpty()) { |
|
|
|
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("正在处理中,请勿重复提交!"); |
|
|
|
if("apply".equals(type)) { |
|
|
|
if (!orders.isEmpty()) { |
|
|
|
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("正在处理中,请勿重复提交!"); |
|
|
|
} |
|
|
|
}else if("query".equals(type)){ |
|
|
|
boolean isExist = false; |
|
|
|
if (!orders.isEmpty()) { |
|
|
|
for (AssOrderinfo order : orders) { |
|
|
|
if (AssOrderStep.WAITING_PAY.equals(order.getOrderStep())) { |
|
|
|
order.setOrderStatus(AssOrderStatus.CLOSE); |
|
|
|
order.setUpdateTime(LocalDateTime.now()); |
|
|
|
order.setRemark("客户未完成注销,已关闭"); |
|
|
|
order.setOrderStep(AssOrderStep.COMPLETED); |
|
|
|
} else if (AssOrderStep.WAITING_AUDIT.equals(order.getOrderStep())) { |
|
|
|
isExist = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (isExist) { |
|
|
|
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("正在处理中,请勿重复提交!"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|