huminghao 1 month ago
parent
commit
ee04ded154

+ 109
- 0
gly-base-core/src/main/java/cn/com/taiji/core/entity/ass/AssSalesOrderSignOut.java View File

@@ -0,0 +1,109 @@
package cn.com.taiji.core.entity.ass;

import cn.com.taiji.core.entity.AbstractStringPropertyUUIDEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
* 售后订单表注销明细
*/

@Getter
@Setter
@Entity
@Table(name = "ASS_SALES_ORDER_SIGNOUT")
public class AssSalesOrderSignOut extends AbstractStringPropertyUUIDEntity {

/** 订单号 */
@Column(name = "ORDER_NO")
private String orderNo;

/** 是否有卡,1:有卡,0:无卡 */
@Column(name = "HAS_CARD")
private Integer hasCard;

/** 是否有签,1:有签,0:无签 */
@NotNull
@Column(name = "HAS_OBU")
private Integer hasObu;

/** 是否写卡,1:需要写卡,0:不需要 */
@NotNull
@Column(name = "COS_PROVIDER")
private Integer cosProvider;

/** 是否支付 */
@NotNull
@Column(name = "NEED_PAY")
private Integer needPay;

/** 注销原因 */
@Column(name = "SIGN_OUT_REASON")
private String signOutReason;

/** 渠道检测未通过原因 */
@Column(name = "AGENCY_REASON")
private String agencyReason;

/** 退费信息id */
@Column(name = "REFUND_INFO_ID")
private String refundInfoId;

/** 开户行名称 */
@Column(name = "BANK_NAME")
private String bankName;

/** 开户行省份 */
@Column(name = "BANK_PROVINCE")
private String bankProvince;

/** 开户行支行名称 */
@Column(name = "BANK_BRANCH_NAME")
private String bankBranchName;

/** 银行卡号 */
@Column(name = "BANK_ID_CODE")
private String bankIdCode;

/** 持卡人姓名 */
@Column(name = "USER_NAME")
private String userName;

/** 持卡人手机号 */
@Column(name = "USER_MOBILE")
private String userMobile;

/** 授权书地址 */
@Column(name = "PROXY_URL")
private String proxyUrl;

/** 身份证正面地址 */
@Column(name = "USER_POS_URL")
private String userPosUrl;

/** 身份证反面地址 */
@Column(name = "USER_NEG_URL")
private String userNegUrl;

/** 行驶证正面地址 */
@Column(name = "VEHICLE_POS_URL")
private String vehiclePosUrl;

/** 行驶证反面地址 */
@Column(name = "VEHICLE_NEG_URL")
private String vehicleNegUrl;

/** 插入时间 */
@Column(name = "INSERT_TIME")
private LocalDateTime insertTime;

/** 更新时间 */
@Column(name = "UPDATE_TIME")
private LocalDateTime updateTime;
}

+ 2
- 1
gly-base-core/src/main/java/cn/com/taiji/core/model/comm/protocol/inss/InssServiceType.java View File

@@ -4,6 +4,7 @@ import cn.com.taiji.core.manager.comm.client.CommServiceCommand;
import cn.com.taiji.core.model.comm.protocol.SignServiceCommand;
import cn.com.taiji.core.model.comm.protocol.SignServiceSystem;
import cn.com.taiji.core.model.comm.protocol.SignServiceType;
import cn.com.taiji.core.model.comm.protocol.inss.inst.InstServiceCmd;
import cn.com.taiji.core.model.comm.protocol.inss.vfj.VfjServiceCmd;
import lombok.Getter;

@@ -14,7 +15,7 @@ import java.util.regex.Pattern;
public enum InssServiceType implements SignServiceType {

VFJ("VFJ操作", "^VFJ_\\S+\\.json$", VfjServiceCmd.values()),
INST("指令接口", "^INST_\\S+\\.json$", VfjServiceCmd.values()),
INST("指令接口", "^INST_\\S+\\.json$", InstServiceCmd.values()),
;

@Getter

+ 7
- 0
gly-base-core/src/main/java/cn/com/taiji/core/repo/jpa/ass/AssSalesOrderSignOutRepo.java View File

@@ -0,0 +1,7 @@
package cn.com.taiji.core.repo.jpa.ass;

import cn.com.taiji.common.repo.jpa.AbstractJpaRepo;
import cn.com.taiji.core.entity.ass.AssSalesOrderSignOut;

public interface AssSalesOrderSignOutRepo extends AbstractJpaRepo<AssSalesOrderSignOut, String> {
}

+ 6
- 6
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/api/issue/OrderController.java View File

@@ -138,12 +138,12 @@ public class OrderController extends MyValidController {
return ApiResponse.of(msg);
}

// @ApiOperation(value = "17.发行确认收货")
// @PostMapping(value = "/returnApply")
// public ApiResponse<String> returnApply(@Valid @RequestBody returnApplyReqDTO reqDto) throws ManagerException {
// String msg = issueOrderManage.returnApply(reqDto);
// return ApiResponse.of(msg);
// }
@ApiOperation(value = "17.订单收货")
@PostMapping(value = "/orderReceiveGoods")
public ApiResponse<?> processReceiveGoods(@Valid @RequestBody OrderDetailReqDto reqDto) throws ManagerException {
issueOrderManage.orderReceiveGoods(reqDto);
return ApiResponse.success().setMessage("收货成功");
}
@ApiOperation(value = "18.订单详情")
@PostMapping(value = "/orderDetailQuery")
public ApiResponse<OrderDetailResDto> orderDetailQuery(@Valid @RequestBody OrderDetailReqDto reqDto) throws ManagerException {

+ 2
- 0
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/manager/issue/IssueOrderManage.java View File

@@ -50,4 +50,6 @@ public interface IssueOrderManage {
void agreeProtocol(AgreeProtocolReqDTO reqDto) throws ManagerException;

OrderDetailResDto orderDetailQuery(OrderDetailReqDto reqDto) throws ManagerException;

void orderReceiveGoods(OrderDetailReqDto reqDto) throws ManagerException;
}

+ 26
- 0
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/manager/issue/IssueOrderManageImpl.java View File

@@ -9,7 +9,9 @@ import cn.com.taiji.core.entity.dict.EnableStatus;
import cn.com.taiji.core.entity.dict.basic.IdType;
import cn.com.taiji.core.entity.dict.basic.SourceType;
import cn.com.taiji.core.entity.dict.basic.UserType;
import cn.com.taiji.core.entity.dict.issue.IssueOrderStep;
import cn.com.taiji.core.entity.dict.issue.OrderType;
import cn.com.taiji.core.entity.dict.issue.ShippingStatus;
import cn.com.taiji.core.entity.dict.log.OperateType;
import cn.com.taiji.core.entity.issue.*;
import cn.com.taiji.core.entity.user.AccountInfo;
@@ -28,6 +30,7 @@ import cn.com.taiji.iaw.repo.jpa.request.issue.IssueOrderaPageRequest;
import cn.com.taiji.iaw.repo.jpa.request.issue.IssueOrdermPageRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDateTime;
import java.util.HashMap;
@@ -297,6 +300,29 @@ public class IssueOrderManageImpl extends AbstractIawManager implements IssueOrd
return resDto;
}

@Transactional(rollbackFor = Exception.class)
@Override
public void orderReceiveGoods(OrderDetailReqDto reqDto) throws ManagerException {
IssueOrderinfo orderinfo = checkOrder(reqDto.getOrderNo());
if (!IssueOrderStep.WAITING_RECEIVE.equals(orderinfo.getOrderStep()) ||
!ShippingStatus.WAIT_RECEIVING.equals(orderinfo.getShippingStatus())){
throw new ManagerException("当前订单阶段{"+orderinfo.getOrderStep().getStep()+"}不可收货");
}
List<IssueOrderPost> postList = issueOrderinfoPostRepo.findByOrderNoList(reqDto.getOrderNo(), OrderType.ISSUE);
if (isEmpty(postList)) {
throw new ManagerException("当前订单没有发货,无法进行收货");
}
LocalDateTime now = LocalDateTime.now();
orderinfo.setOrderStep(IssueOrderStep.WAITING_ACTIVE);
orderinfo.setUpdateTime(now);
issueOrderinfoRepo.merge(orderinfo);

IssueOrderPost issueOrderPost = postList.get(0);
issueOrderPost.setReceivingTime(now);
issueOrderPost.setReceiveOpId(findOpenIdByToken(reqDto.getAccessToken()));
issueOrderinfoPostRepo.merge(issueOrderPost);
}

//校验发行订单是否存在
private IssueOrderinfo checkOrder(String orderNo) throws ManagerException {
IssueOrderinfo order = issueOrderinfoRepo.findByOrderNo(orderNo);

+ 1
- 19
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/manager/ass/selfService/SelfServiceManagerImpl.java View File

@@ -201,8 +201,6 @@ public class SelfServiceManagerImpl extends AbstractCommManager implements SelfS
}
return null;
}


// 获取诉求
public List<SelfServiceViewUserAppealResponseDTO> getUserAppeal(List<SelfServiceStaffRecord> listStaffRecord , List<SelfServiceUserRecord> listUserRecord){
List<SelfServiceViewUserAppealResponseDTO> userAppealResponseDTOS = new ArrayList<>();
@@ -247,21 +245,5 @@ public class SelfServiceManagerImpl extends AbstractCommManager implements SelfS
supportingMaterialsResponseDTOS.sort(Comparator.comparing(SelfServiceViewSupportingMaterialsResponseDTO::getInsertTime).reversed());
return supportingMaterialsResponseDTOS;
}
//获取最新工单号
private String queryMaxId(int num) {
// 获取当天时间
LocalDate nowDate = LocalDate.now();
System.out.println(nowDate);
DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyyMMdd");
String time = dateFormatter.format(nowDate);
// 计算最大id值
SelfServiceOrder maxOrder = orderRepo.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);
}

}

+ 4
- 0
zhywpt-service-inss/src/main/java/cn/com/taiji/inss/manager/MyCommHandleManager.java View File

@@ -5,6 +5,7 @@ import javax.annotation.PostConstruct;
import cn.com.taiji.core.model.comm.protocol.SignServiceType;
import cn.com.taiji.core.model.comm.protocol.inss.InssServiceSystem;
import cn.com.taiji.core.model.comm.protocol.inss.InssServiceType;
import cn.com.taiji.inss.manager.handler.InstServiceHandler;
import cn.com.taiji.inss.manager.handler.VfjServiceHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -21,6 +22,8 @@ import cn.com.taiji.core.manager.comm.AbstractCommHandleManager;
public class MyCommHandleManager extends AbstractCommHandleManager {
@Autowired
private VfjServiceHandler vfjServiceHandler;
@Autowired
private InstServiceHandler instServiceHandler;

public MyCommHandleManager() {
super(InssServiceSystem.INSS);
@@ -29,6 +32,7 @@ public class MyCommHandleManager extends AbstractCommHandleManager {
@PostConstruct
public void init() {
registerJsonService(vfjServiceHandler);
registerJsonService(instServiceHandler);
}

@Override

+ 2
- 0
zhywpt-service-inss/src/main/java/cn/com/taiji/inss/manager/inst/InstOnlineActiveMananger.java View File

@@ -216,6 +216,8 @@ public class InstOnlineActiveMananger extends AbstractCallBackManager {
return 14;
else if (request.getStepNo() == 11 || request.getStepNo() == 13)
return 9;
else if (request.getStepNo() == 19)
return 100;
else
return request.getStepNo() + 1;
}

Loading…
Cancel
Save