@@ -29,6 +29,9 @@ public class ActiveRecord extends StringPropertyUUIDEntity { | |||
@Column(name = "TYPE") | |||
private Integer type;// 类型1-本人激活 2-他人激活 | |||
@NotNull | |||
@Column(name = "ACTIVE_TYPE") | |||
private Integer activeType;// 类型1-发行激活 2-脱落激活 | |||
@NotNull | |||
@Column(name = "SOURCE_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private SourceType sourceType;//来源 |
@@ -0,0 +1,34 @@ | |||
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.valid.ErrorMsgBuilder; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class OrderAuditRequest extends AbstractSignTypeRequest<AbstractIssueResponse> { | |||
public OrderAuditRequest() { | |||
super(OrderServiceCmd.ORDERAUDIT); | |||
} | |||
@NotBlank | |||
private String orderNo; | |||
@NotNull | |||
private Boolean auditStatus; | |||
private String reason; | |||
private String staffId; | |||
public void relatedValid(ErrorMsgBuilder builder) { | |||
if (auditStatus!=null && !auditStatus) { | |||
builder.validFieldNotBlank("reason", reason); | |||
} | |||
} | |||
} |
@@ -23,6 +23,8 @@ public enum OrderServiceCmd implements SignServiceCommand { | |||
CHANGEGOODS("换货申请", ChangeGoodsRequest.class), | |||
RETURNGOODS("退货申请", ReturnGoodsRequest.class), | |||
RETURNEXAMINE("退货审核", ReturnExamineRequest.class), | |||
ORDERAUDIT("订单审核", OrderAuditRequest.class),// | |||
PUSHAGREEMENT("协议提交接口", PushAgreementRequest.class), | |||
; | |||
private final String value; |
@@ -0,0 +1,29 @@ | |||
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.valid.ErrorMsgBuilder; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class PushAgreementRequest extends AbstractSignTypeRequest<AbstractIssueResponse> { | |||
public PushAgreementRequest() { | |||
super(OrderServiceCmd.PUSHAGREEMENT); | |||
} | |||
@NotBlank | |||
private String orderNo; | |||
@NotNull | |||
private String agreementUrl; | |||
public void relatedValid(ErrorMsgBuilder builder) { | |||
} | |||
} |
@@ -157,7 +157,7 @@ public class IssueOrderManageImpl extends AbstractIawManager implements IssueOrd | |||
@Override | |||
public CheckProtocolResDTO checkProtocol(CheckProtocolReqDTO reqDto) throws ManagerException { | |||
IssueOrderinfo order = checkOrder(reqDto.getOrderNo()); | |||
IssueProduct product = issueProductRepo.findByReleaseId(order.getProtocol()); | |||
IssueProduct product = issueProductRepo.findByReleaseId(order.getProductId()); | |||
CheckProtocolResDTO res = new CheckProtocolResDTO(); | |||
//黔通签署协议 | |||
if (product.getSigningParty() == 0 && !"1".equals(order.getProtocol())) { |
@@ -107,11 +107,6 @@ public class IssueOrderQueryManageImpl extends AbstractManagewManager implements | |||
//用户信息 | |||
CustomerInfoModel customerInfoModel = setCustomerModel(issueOrderinfo, orderinfoExt); | |||
resDTO.setCustomerInfo(customerInfoModel); | |||
//车主信息:用户信息和车主信息不一致,返给前端车主信息 | |||
if (!issueOrderinfo.getCustomerName().equals(issueOrderinfo.getOwnerName())) { | |||
CarOwnerModel carOwnerModel = setCarOwnerModel(issueOrderinfo, orderinfoExt); | |||
resDTO.setCarOwnerInfo(carOwnerModel); | |||
} | |||
} else { | |||
//单位信息 | |||
UnitInfoModel unitInfoModel = setUnitInfoModel(issueOrderinfo, orderinfoExt); | |||
@@ -120,6 +115,13 @@ public class IssueOrderQueryManageImpl extends AbstractManagewManager implements | |||
AgentInfoModel agentInfoModel = setAgentInfoModel(issueOrderinfo, orderinfoExt); | |||
resDTO.setAgentInfo(agentInfoModel); | |||
} | |||
if (hasText(issueOrderinfo.getCustomerName()) && hasText(issueOrderinfo.getOwnerName())) { | |||
//车主信息:用户信息和车主信息不一致,返给前端车主信息 | |||
if (!issueOrderinfo.getCustomerName().equals(issueOrderinfo.getOwnerName())) { | |||
CarOwnerModel carOwnerModel = setCarOwnerModel(issueOrderinfo, orderinfoExt); | |||
resDTO.setCarOwnerInfo(carOwnerModel); | |||
} | |||
} | |||
//车辆信息 | |||
CarInfoModel carInfoModel = setCarInfoModel(issueOrderinfo, orderinfoExt); | |||
resDTO.setCarInfo(carInfoModel); |
@@ -21,7 +21,9 @@ import org.springframework.web.bind.annotation.RestController; | |||
import javax.annotation.Resource; | |||
import javax.validation.Valid; | |||
import java.util.ArrayList; | |||
import java.util.HashMap; | |||
import java.util.List; | |||
import java.util.Map; | |||
/** | |||
* @Author ChenChao | |||
@@ -107,4 +109,14 @@ public class MenuController extends MyValidController { | |||
response.setSystemTypeList(systemTypeList); | |||
return ApiResponse.of(response); | |||
} | |||
@ApiOperation(value = "获取所有的系统类型2") | |||
@PostMapping(value = "/systemTypeMap") | |||
public ApiResponse<Map<String, String>> systemTypeMap() { | |||
Map<String, String> map = new HashMap<>(); | |||
for (SystemType value : SystemType.values()) { | |||
map.put(value.name(),value.getName()); | |||
} | |||
return ApiResponse.of(map); | |||
} | |||
} |
@@ -0,0 +1,26 @@ | |||
package cn.com.taiji.userw.dto.system; | |||
import cn.com.taiji.core.dto.AbstractStaffBizRequestDTO; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
import javax.validation.constraints.NotBlank; | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
@ApiModel(description = "员工只用新密码修改密码") | |||
public class ChangePasswordRequestDTO extends AbstractStaffBizRequestDTO { | |||
/** 新密码*/ | |||
@ApiModelProperty(value = "新密码") | |||
@NotBlank(message = "新密码不能为空") | |||
private String newPassword; | |||
/** 确认新密码*/ | |||
@ApiModelProperty(value = "确认新密码") | |||
@NotBlank(message = "确认新密码不能为空") | |||
private String affirmNewPassword; | |||
} |
@@ -49,9 +49,9 @@ public class WxSignChannelConfigManagerImpl extends AbstractManager implements W | |||
@Override | |||
public void add(WxCarAddReqDTO reqDto) throws ManagerException { | |||
reqDto.validate(); | |||
CommonWxSignConfig byAgencyId = commonWxSignConfigRepo.findByAgencyId(reqDto.getAgencyId()); | |||
CommonWxSignConfig byAgencyId = commonWxSignConfigRepo.findByAgencyIdAndVersion(reqDto.getAgencyId(),reqDto.getVersion()); | |||
if(byAgencyId != null){ | |||
throw new ManagerException("该渠道已配置"); | |||
throw new ManagerException("该渠道版本已配置"); | |||
} | |||
CommonWxSignConfig config = copyProperties(reqDto, new CommonWxSignConfig()); | |||
commonWxSignConfigRepo.persist(config); |
@@ -23,6 +23,8 @@ public enum DataType { | |||
CHANGE_GOODS("changeGoods", IasServiceType.ORDER, OrderServiceCmd.CHANGEGOODS), | |||
RETURN_GOODS("returnGoods", IasServiceType.ORDER, OrderServiceCmd.RETURNGOODS), | |||
RETURN_EXAMINE("returnExamine", IasServiceType.ORDER, OrderServiceCmd.RETURNEXAMINE), | |||
ORDER_AUDIT("orderAudit", IasServiceType.ORDER, OrderServiceCmd.ORDERAUDIT), | |||
PUSH_AGREEMENT("pushAgreement", IasServiceType.ORDER, OrderServiceCmd.PUSHAGREEMENT), | |||
; |
@@ -0,0 +1,133 @@ | |||
package cn.com.taiji.ias.manager.order; | |||
import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||
import cn.com.taiji.core.entity.dict.issue.IssueOrderStatus; | |||
import cn.com.taiji.core.entity.dict.issue.IssueOrderStep; | |||
import cn.com.taiji.core.entity.issue.IssueOrderinfo; | |||
import cn.com.taiji.core.entity.user.Staff; | |||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.order.AbstractIssueResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.order.OrderAuditRequest; | |||
import cn.com.taiji.core.model.comm.protocol.valid.ErrorMsgBuilder; | |||
import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError; | |||
import cn.com.taiji.ias.dict.DataType; | |||
import cn.com.taiji.ias.model.ServiceLogEvent; | |||
import org.springframework.stereotype.Service; | |||
import java.util.Map; | |||
@Service | |||
public class OrderAuditManager extends AbstractOrderManager<OrderAuditRequest> { | |||
public static final String STAFF = "staff"; | |||
public OrderAuditManager() { | |||
super(DataType.ORDER_AUDIT); | |||
} | |||
@Override | |||
protected String getDataId(OrderAuditRequest req) { | |||
return ""; | |||
} | |||
@Override | |||
protected void formatValidateInternal(ErrorMsgBuilder builder, OrderAuditRequest request, | |||
ServiceLogEvent event, Map<String, Object> dataStream) throws ServiceHandleException { | |||
request.relatedValid(builder); | |||
} | |||
@Override | |||
protected void businessValidateInternal(ErrorMsgBuilder builder, OrderAuditRequest request, | |||
ServiceLogEvent event, Map<String, Object> dataStream) throws ServiceHandleException { | |||
if (hasText(request.getStaffId())) { | |||
Staff staff = staffRepo.findByStaffId(request.getStaffId()); | |||
if (staff == null) { | |||
throw GlyServiceError.FORMAT_VALIDATE_ERR.toHandleException("员工不存在"); | |||
} | |||
dataStream.put(STAFF, staff); | |||
} | |||
IssueOrderinfo order = checkOrder(request.getOrderNo()); | |||
if (!IssueOrderStatus.NORMAL.equals(order.getOrderStatus())) { | |||
throw newBusinessException("当前订单不能审核,订单状态:" + order.getOrderStatus().getStatus()); | |||
} | |||
if (!IssueOrderStep.WAITING_AUDIT.equals(order.getOrderStep())) { | |||
throw newBusinessException("当前订单步骤不能审核,订单步骤:" + order.getOrderStep().getStep()); | |||
} | |||
dataStream.put(ORDER, order); | |||
} | |||
@Override | |||
protected void persistInternal(OrderAuditRequest request, ServiceLogEvent event, | |||
Map<String, Object> dataStream) throws ServiceHandleException { | |||
IssueOrderinfo order = (IssueOrderinfo) dataStream.get(ORDER); | |||
Staff staff = (Staff) dataStream.get(STAFF); | |||
// ServiceType serviceType; | |||
// CsmsnOrderinfo order = orderInfoRepo.findByOrderNo(req.getOrderNo()); | |||
// if (req.getAuditStatus()) { | |||
// if (OrderSourceEnum.CHANNEL.equals(order.getOrderSource())){//20250115加判断条件,如果是渠道,审核通过,是待支付 | |||
// //20250408修改,线上不需要支付,审核通过直接待签约 | |||
// if (order.getPromotionModes().equals(1)) {// 线上 | |||
// order.setOrderStep(IssueOrderStep.ORDER_STEP_3.getCode());//待签约 | |||
// } else {//线下 | |||
// order.setOrderStep(IssueOrderStep.ORDER_STEP_4.getCode());//线下待支付 | |||
// } | |||
// }else { | |||
// if (order.getWhetherToMail()) { | |||
// order.setOrderStep(IssueOrderStep.ORDER_STEP_8.getCode()); | |||
// } else { | |||
// order.setOrderStep(IssueOrderStep.ORDER_STEP_10.getCode()); | |||
// } | |||
// } | |||
// serviceType = ServiceType.EXAMINATIONPASS; | |||
// } else { | |||
// order.setOrderStep(IssueOrderStep.ORDER_STEP_7.getCode()); | |||
// serviceType = ServiceType.NOEXAMINATIONPASS; | |||
// } | |||
// String staffId = req.getStaffId(); | |||
// AccountInfo staff = accountInfoRepo.findByAccount(staffId); | |||
// order.setAuditOpId(staff.getOpenId()); | |||
// order.setAuditTime(LocalDateTime.now()); | |||
// order.setArtificialStatus(1); | |||
// CsmsnOrderinfoExt ext = orderInfoExtRepo.findByOrderInfoId(order.getOrderNo()); | |||
// String auditFailureCase = hasText(ext.getAuditReason())?ext.getAuditReason():""; | |||
// ext.setAuditFailureCase(req.getReason()); | |||
// orderInfoRepo.save(order); | |||
// orderInfoExtRepo.save(ext); | |||
// // 保存业务日志 | |||
// bizServiceLog(staff.getOpenId(), serviceType, order, order.getOrderNo()); | |||
// // 20250401增加保存车型公告表 | |||
// logger.info(auditFailureCase); | |||
// if (req.getAuditStatus() && auditFailureCase.contains("申办车型未找到匹配范围")) { | |||
// logger.info("进入保存公告表"); | |||
// executor.execute(() -> { | |||
// try { | |||
// VehicleBrandInfo vehicleBrandInfo = new VehicleBrandInfo(); | |||
// vehicleBrandInfo.setVehicleType(order.getVehicleType()); | |||
// String vehicleModel = issueOrderVerificationRuleManagerImpl.extractFirstEnAlphabetNumberStr(ext.getVehicleModel()); | |||
// vehicleBrandInfo.setVehicleModel(vehicleModel); | |||
// vehicleBrandInfo.setVin(ext.getVehicleVin().substring(0,8)); | |||
// vehicleBrandInfo.setCaculateStatus(1); | |||
// Integer vehicleClass = order.getVehicleClass();//车型 | |||
// if (order.getVanType()==1){ | |||
// vehicleBrandInfo.setPassengerChargeTypeMax(vehicleClass); | |||
// vehicleBrandInfo.setPassengerChargeTypeMin(vehicleClass); | |||
// }else { | |||
// vehicleBrandInfo.setVanChargeTypeMax(vehicleClass); | |||
// vehicleBrandInfo.setVanChargeTypeMin(vehicleClass); | |||
// } | |||
// vehicleBrandInfoRepo.save(vehicleBrandInfo); | |||
// logger.info("车辆model {},车型{},vin {}",vehicleModel,vehicleClass,ext.getVehicleVin()); | |||
// } catch (Exception e){ | |||
// logger.error("审核通过,车型公告表保存失败:"+e.getMessage()); | |||
// } | |||
// }); | |||
// } | |||
} | |||
@Override | |||
protected AbstractSignTypeResponse getRes(OrderAuditRequest req, ServiceLogEvent event, | |||
Map<String, Object> dataStream) throws ServiceHandleException { | |||
AbstractIssueResponse res = new AbstractIssueResponse(); | |||
res.setReceiveTime(getReceiveTimeStr(event)); | |||
return res; | |||
} | |||
} |
@@ -320,7 +320,7 @@ public class OrderInitManager extends AbstractOrderManager<OrderInitRequest> { | |||
private IssueOrderinfo saveOrder(OrderInitRequest request, Map<String, Object> dataStream) { | |||
IssueOrderinfo order = new IssueOrderinfo(); | |||
IssueProduct product = (IssueProduct) dataStream.get(PRODUCT); | |||
Staff staff = (Staff) dataStream.get("staff"); | |||
Staff staff = (Staff) dataStream.get(STAFF); | |||
LocalDateTime now = LocalDateTime.now(); | |||
String orderNo = now.format(TimeTools.yyyyMMddHHmmss) + request.getAgentId() + (int)((Math.random() * 9 + 1) * Math.pow(10, 6)); | |||
order.setInsertTime(now); |
@@ -59,10 +59,10 @@ public class OrderPayApplyManager extends AbstractOrderManager<OrderPayApplyRequ | |||
ServiceLogEvent event, Map<String, Object> dataStream) throws ServiceHandleException { | |||
IssueOrderinfo order = checkOrder(request.getOrderNo()); | |||
if (!IssueOrderStatus.NORMAL.equals(order.getOrderStatus())) { | |||
throw newBusinessException("当前订单不能支付,订单状态" + order.getOrderStatus().getStatus()); | |||
throw newBusinessException("当前订单不能支付,订单状态:" + order.getOrderStatus().getStatus()); | |||
} | |||
if (!IssueOrderStep.VEHICLE_UPLOAD.equals(order.getOrderStep())) { | |||
throw newBusinessException("当前订单步骤不能支付,订单步骤" + order.getOrderStep().getStep()); | |||
throw newBusinessException("当前订单步骤不能支付,订单步骤:" + order.getOrderStep().getStep()); | |||
} | |||
// 查询支付单 | |||
IssueOrderPay orderPay = orderPayRepo.findById(request.getOrderPayId()).orElse(null); |
@@ -0,0 +1,59 @@ | |||
package cn.com.taiji.ias.manager.order; | |||
import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||
import cn.com.taiji.core.entity.issue.IssueOrderinfo; | |||
import cn.com.taiji.core.entity.issue.IssueProduct; | |||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.order.AbstractIssueResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.order.PushAgreementRequest; | |||
import cn.com.taiji.core.model.comm.protocol.valid.ErrorMsgBuilder; | |||
import cn.com.taiji.ias.dict.DataType; | |||
import cn.com.taiji.ias.model.ServiceLogEvent; | |||
import org.springframework.stereotype.Service; | |||
import java.util.Map; | |||
@Service | |||
public class PushAgreementManager extends AbstractOrderManager<PushAgreementRequest> { | |||
public PushAgreementManager() { | |||
super(DataType.PUSH_AGREEMENT); | |||
} | |||
@Override | |||
protected String getDataId(PushAgreementRequest req) { | |||
return ""; | |||
} | |||
@Override | |||
protected void formatValidateInternal(ErrorMsgBuilder builder, PushAgreementRequest request, | |||
ServiceLogEvent event, Map<String, Object> dataStream) throws ServiceHandleException { | |||
} | |||
@Override | |||
protected void businessValidateInternal(ErrorMsgBuilder builder, PushAgreementRequest request, | |||
ServiceLogEvent event, Map<String, Object> dataStream) throws ServiceHandleException { | |||
IssueOrderinfo order = checkOrder(request.getOrderNo()); | |||
IssueProduct product = issueProductRepo.findByReleaseId(order.getProductId()); | |||
if (product.getSigningParty().intValue() == 1) | |||
throw newBusinessException("当前产品需由黔通完成协议签署,产品编号:" + order.getProductId()); | |||
dataStream.put(ORDER, order); | |||
} | |||
@Override | |||
protected void persistInternal(PushAgreementRequest req, ServiceLogEvent event, | |||
Map<String, Object> dataStream) throws ServiceHandleException { | |||
IssueOrderinfo order = (IssueOrderinfo) dataStream.get(ORDER); | |||
order.setProtocol("1"); | |||
order.setProtocolUrl(req.getAgreementUrl()); | |||
orderInfoRepo.save(order); | |||
} | |||
@Override | |||
protected AbstractSignTypeResponse getRes(PushAgreementRequest req, ServiceLogEvent event, | |||
Map<String, Object> dataStream) throws ServiceHandleException { | |||
AbstractIssueResponse res = new AbstractIssueResponse(); | |||
res.setReceiveTime(getReceiveTimeStr(event)); | |||
return res; | |||
} | |||
} |
@@ -79,10 +79,10 @@ public class UserUploadManager extends AbstractOrderManager<UserUploadRequest> { | |||
// 校验订单 | |||
IssueOrderinfo order = checkOrder(request.getOrderNo()); | |||
if (!IssueOrderStatus.NORMAL.equals(order.getOrderStatus())) { | |||
throw newBusinessException("订单状态异常,订单状态" + order.getOrderStatus().getStatus()); | |||
throw newBusinessException("订单状态异常,订单状态:" + order.getOrderStatus().getStatus()); | |||
} | |||
if (!IssueOrderStep.ORDER_INIT.equals(order.getOrderStep()) && !IssueOrderStep.CUSTOMER_UPLOAD.equals(order.getOrderStep())) { | |||
throw newBusinessException("当前订单阶段不能上传客户信息"); | |||
throw newBusinessException("当前订单阶段不能上传客户信息:" + order.getOrderStep().getStep()); | |||
} | |||
if (!order.getUserType().equals(IdType.judgeUserType(request.getUserIdType()))) { | |||
throw newBusinessException("证件类型与订单用户类型不匹配"); |
@@ -80,11 +80,11 @@ public class VehicleUploadManager extends AbstractOrderManager<VehicleUploadRequ | |||
} | |||
// 限制可修改的阶段 | |||
if (!IssueOrderStatus.NORMAL.equals(order.getOrderStatus())) { | |||
throw newBusinessException("订单状态异常,订单状态" + order.getOrderStatus().getStatus()); | |||
throw newBusinessException("订单状态异常,订单状态:" + order.getOrderStatus().getStatus()); | |||
} | |||
if (!IssueOrderStep.CUSTOMER_UPLOAD.equals(order.getOrderStep()) && !IssueOrderStep.VEHICLE_UPLOAD.equals(order.getOrderStep()) | |||
&& !IssueOrderStep.WAITING_AUDIT.equals(order.getOrderStep())) { | |||
throw newBusinessException("当前订单阶段不能上传车辆信息"); | |||
throw newBusinessException("当前订单阶段不能上传车辆信息:" + order.getOrderStep().getStep()); | |||
} | |||
if (!Objects.equals(order.getVanType(), request.getVanType())) { | |||
throw newBusinessException("车辆类型与订单车辆类型不匹配"); |