@@ -0,0 +1,229 @@ | |||
package cn.com.taiji.core.entity.ass.etcTransaction; | |||
import cn.com.taiji.common.entity.StringPropertyUUIDEntity; | |||
import cn.com.taiji.core.entity.dict.ass.CheckStatus; | |||
import cn.com.taiji.core.entity.dict.basic.CardType; | |||
import cn.com.taiji.core.entity.dict.basic.IdType; | |||
import lombok.Data; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import javax.persistence.*; | |||
import java.time.LocalDateTime; | |||
/** | |||
* @Auther: humh | |||
* @Description: | |||
* @Date: 2025/4/22 16:22 | |||
* @email: huminghao@mail.taiji.com.cn | |||
* @version: 1.0 | |||
*/ | |||
@Getter | |||
@Setter | |||
@Entity | |||
@Table(name = "ASS_REFUND_APPLY_INFO") | |||
public class AssRefundApplyInfo extends StringPropertyUUIDEntity { | |||
/** 创建时间 */ | |||
@Column(name = "INSERT_TIME") | |||
private LocalDateTime insertTime = LocalDateTime.now(); | |||
/** 修改时间 */ | |||
@Column(name ="UPDATE_TIME") | |||
private LocalDateTime updateTime = LocalDateTime.now(); | |||
/** 工单编号ID */ | |||
@Column(name ="ORDER_ID") | |||
private String orderId; | |||
/** 发起人员工编号 */ | |||
@Column(name ="STAFF_ID") | |||
private String staffId; | |||
/** 客户姓名 */ | |||
@Column(name ="USER_NAME") | |||
private String userName; | |||
/** 客户手机号 */ | |||
@Column(name ="USER_MOBILE") | |||
private String userMobile; | |||
/** 车牌号 */ | |||
@Column(name ="VEHICLE_PLATE") | |||
private String vehiclePlate; | |||
/** 车牌颜色 */ | |||
@Column(name ="VEHICLE_PLATE_COLOR") | |||
private Integer vehiclePlateColor; | |||
/** 入口站名 */ | |||
@Column(name ="EN_STATION_NAME") | |||
private String enStationName; | |||
/** 出口站名 */ | |||
@Column(name ="EX_STATION_NAME") | |||
private String exStationName; | |||
/** 通行时间 */ | |||
@Column(name ="EX_TIME") | |||
private LocalDateTime exTime; | |||
/** 金额 */ | |||
@Column(name ="FEE") | |||
private Long fee; | |||
/** 申请理由 */ | |||
@Column(name ="REFUND_REASON") | |||
private String refundReason; | |||
/** 流水编号 */ | |||
@Column(name ="TRANSACTION_ID") | |||
private String transactionId; | |||
/** 支付凭证地址 */ | |||
@Column(name ="PAY_VOUCHER_URL") | |||
private String payVoucherUrl; | |||
/** 审核结果;0-未受理,1-已受理,2-审核通过,3-审核不通过,4-上传省中心,5-抄送部中心 */ | |||
@Column(name ="CHECK_STATUS") | |||
@Enumerated(EnumType.STRING) | |||
private CheckStatus checkStatus; | |||
/** 审核员工编号 */ | |||
@Column(name ="CHECK_STAFF_ID") | |||
private String checkStaffId; | |||
/** 审核时间 */ | |||
@Column(name ="CHECK_TIME") | |||
private LocalDateTime checkTime; | |||
/** 客户编号 */ | |||
@Column(name = "CUSTOMER_ID") | |||
private String customerId; | |||
/** etc卡号 */ | |||
@Column(name = "CARD_ID") | |||
private String cardId; | |||
/** 卡类型1-记账卡 2-储值卡 3-预存卡 */ | |||
@Column(name = "CARD_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private CardType cardType; | |||
/** 设备号 */ | |||
@Column(name = "EQUIPMENT_NO") | |||
private String equipmentNo; | |||
/** 审核意见 */ | |||
@Column(name = "CHECK_REMARK") | |||
private String checkRemark; | |||
/** 用户证件号 */ | |||
@Column(name = "USER_IDNUM") | |||
private String userIdnum; | |||
/** 用户证件类型 */ | |||
@Column(name = "USER_IDTYPE") | |||
@Enumerated(EnumType.STRING) | |||
private IdType userIdtype; | |||
/** 出口时间 */ | |||
@Column(name = "EN_TIME") | |||
private LocalDateTime enTime; | |||
/** 通行Id */ | |||
@Column(name = "PASS_ID") | |||
private String passId; | |||
/** 营改增交易编号 */ | |||
@Column(name = "YGZ_LIST_NO") | |||
private String ygzListNo; | |||
/** 支付类型,1 现金 2 其他第三方账户支付 3 银联卡支付 4 ETC支付 6 支付宝 7 微信 0 ETC支付 -1 未知 */ | |||
@Column(name = "UNION_PAY_TRANS_FLAG") | |||
private Integer unionPayTransFlag; | |||
/** 车型,1 一型客车 2 二型客车 3 三型客车 4 四型客车 11 一型货车 12 二型货车 13 三型货车 14 四型货车 15 五型货车 16 六型货车 21 一型专项作业车 22 二型专项作业车 23 三型专项作业车 24 四型专项作业车 25 五型专项作业车 26 六型专项作业车 */ | |||
@Column(name = "EX_VEH_CLASS") | |||
private Integer exVehClass; | |||
/** 流水业主单位id */ | |||
@Column(name = "OWNER_ID") | |||
private Integer ownerId; | |||
/** 流水业主单位名称 */ | |||
@Column(name = "OWNER_NAME") | |||
private String ownerName; | |||
/** 路段名称 */ | |||
@Column(name = "ROAD_NAME") | |||
private String roadName; | |||
/** 路段编号 */ | |||
@Column(name = "ROAD") | |||
private Integer road; | |||
/** 管理所名称 */ | |||
@Column(name = "MANAGE_NAME") | |||
private String manageName; | |||
/** 管理所编码 */ | |||
@Column(name = "MANAGE_UNIT") | |||
private Integer manageUnit; | |||
/** 16进制卡号 */ | |||
@Column(name = "HEX_CARD_ID") | |||
private String hexCardId; | |||
/** 单省/多省标识 */ | |||
@Column(name = "MULTI_PROVINCE") | |||
private Integer multiProvince; | |||
/** 是否存在拆分结果 */ | |||
@Column(name = "IS_FIND") | |||
private Integer isFind; | |||
/** 退费类型,1 多收退费 2 重复扣费 3 应免未免 4 其他 */ | |||
@Column(name = "REFUND_TYPE") | |||
private Integer refundType; | |||
/** 业主单位处理时限,12 普通工单 4 加急工单 */ | |||
@Column(name = "ROAD_TIME") | |||
private Integer roadTime; | |||
/** 操作类型 3 */ | |||
@Column(name = "HANDLE_TYPE") | |||
private Integer handleType; | |||
/** 操作结果 0 */ | |||
@Column(name = "HANDLE_RESULT") | |||
private Integer handleResult; | |||
/** 开户行支行名称 */ | |||
@Column(name = "BANK_BRANCH_NAME") | |||
private String bankBranchName; | |||
/** 银行卡号 */ | |||
@Column(name = "BANK_ID_CODE") | |||
private String bankIdCode; | |||
/** 上传省中心工单号 */ | |||
@Column(name = "FORM_NO") | |||
private String formNo; | |||
/** 开户行名称 */ | |||
@Column(name = "BANK_NAME") | |||
private String bankName; | |||
/** 渠道id */ | |||
@Column(name = "AGENCY_ID") | |||
private String agencyId; | |||
/** 渠道名称 */ | |||
@Column(name = "AGENCY_NAME") | |||
private String agencyName; | |||
} |
@@ -0,0 +1,55 @@ | |||
package cn.com.taiji.core.entity.dict.ass; | |||
/** | |||
* @desc : 卡类型 | |||
*/ | |||
public enum CheckStatus { | |||
NEW("未受理",0){}, | |||
CENSOR("已受理",1){}, | |||
CENSOR_APPROVE("审核通过",2){}, | |||
CENSOR_FAILED("审核不通过",3){}, | |||
UPLOAD_PROVINCE("上传省中心",4){}, | |||
UPLOAD_DEPT("抄送部中心",5){}, | |||
; | |||
private String value; | |||
private int code; | |||
private CheckStatus(String value, int code) { | |||
this.code=code; | |||
this.value=value; | |||
} | |||
public String getValue() { | |||
return value; | |||
} | |||
public void setValue(String value) { | |||
this.value = value; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public static CheckStatus getChargeCard(String value){ | |||
for (CheckStatus cardsType : CheckStatus.values()) { | |||
if (cardsType.value.equals(value)) { | |||
return cardsType; | |||
} | |||
} | |||
return null; | |||
} | |||
public static CheckStatus fromCode(Integer value){ | |||
for(CheckStatus b: CheckStatus.values()){ | |||
if(b.getCode()==value){ | |||
return b; | |||
} | |||
} | |||
return null; | |||
} | |||
} |
@@ -143,6 +143,9 @@ public enum OperateType { | |||
RELEASE_PLATE_APPLY("解除车牌占用申请"), | |||
RELEASE_PLATE_REVIEW("解除车牌审核"), | |||
//ETC通信费退费 | |||
ETC_TRANSACTION_APPLY("ETC通信费退费申请"), | |||
; | |||
private final String value; | |||
@@ -0,0 +1,24 @@ | |||
package cn.com.taiji.core.repo.jpa.ass.etcTransaction; | |||
import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | |||
import cn.com.taiji.core.entity.ass.etcTransaction.AssRefundApplyInfo; | |||
import org.springframework.data.jpa.repository.Query; | |||
import java.util.List; | |||
/** | |||
* @Auther: humh | |||
* @Description: | |||
* @Date: 2025/4/22 17:16 | |||
* @email: huminghao@mail.taiji.com.cn | |||
* @version: 1.0 | |||
*/ | |||
public interface AssRefundApplyInfoRepo extends AbstractJpaRepo<AssRefundApplyInfo, String> { | |||
@Query(" from AssRefundApplyInfo where passId = ?1 order by insertTime desc") | |||
List<AssRefundApplyInfo> queryByPassId(String passId); | |||
@Query(" from AssRefundApplyInfo where checkStatus = ?1 order by updateTime asc") | |||
List<AssRefundApplyInfo> queryByCheckStatus(Integer checkStatus); | |||
} |
@@ -0,0 +1,39 @@ | |||
package cn.com.taiji.core.repo.request.ass.etcTransaction; | |||
import cn.com.taiji.common.pub.dao.HqlBuilder; | |||
import cn.com.taiji.common.repo.request.jpa.JpaPageableDataRequest; | |||
import cn.com.taiji.core.entity.ass.etcTransaction.AssRefundApplyInfo; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
/** | |||
* @Auther: humh | |||
* @Description: | |||
* @Date: 2025/4/22 16:49 | |||
* @email: huminghao@mail.taiji.com.cn | |||
* @version: 1.0 | |||
*/ | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class AssRefundApplyInfoPageRequest extends JpaPageableDataRequest<AssRefundApplyInfo> { | |||
/** 出站名称 */ | |||
private String vehiclePlate; | |||
/** 用户编码 */ | |||
private String customerId; | |||
/** 渠道编码 */ | |||
private String agencyId; | |||
@Override | |||
public HqlBuilder toSelectHql() { | |||
HqlBuilder hql = new HqlBuilder("from " + AssRefundApplyInfo.class.getName() + " where 1=1 "); | |||
hql.append(" and customerId = :customerId ", customerId); | |||
hql.append(" and vehiclePlate = :vehiclePlate ", vehiclePlate); | |||
hql.append(" and agencyId = :agencyId ", agencyId); | |||
hql.append(" order by insertTime desc "); | |||
return hql; | |||
} | |||
} |
@@ -1,12 +1,10 @@ | |||
package cn.com.taiji.iaw.api.ass.etcTransaction; | |||
import cn.com.taiji.common.manager.ManagerException; | |||
import cn.com.taiji.common.model.dao.Pagination; | |||
import cn.com.taiji.common.web.ApiResponse; | |||
import cn.com.taiji.iaw.api.MyValidController; | |||
import cn.com.taiji.iaw.dto.ass.etcTransaction.ExportProvinceEtcTransactionFlowRequestDTO; | |||
import cn.com.taiji.iaw.dto.ass.etcTransaction.ExportProvinceEtcTransactionFlowResponseDTO; | |||
import cn.com.taiji.iaw.dto.ass.etcTransaction.QueryProvinceEtcTransactionFlowRequestDTO; | |||
import cn.com.taiji.iaw.dto.ass.etcTransaction.QueryProvinceEtcTransactionFlowResponseDTO; | |||
import cn.com.taiji.iaw.dto.ass.etcTransaction.*; | |||
import cn.com.taiji.iaw.manager.ass.etcTransaction.EtcTransactionManager; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiOperation; | |||
@@ -39,7 +37,17 @@ public class EtcTransactionController extends MyValidController { | |||
return ApiResponse.of(manager.exportProvinceEtcTransactionFlow(dto)); | |||
} | |||
@ApiOperation("通行费退费提交申请") | |||
@PostMapping("/apply") | |||
public ApiResponse<AssRefundApplyInfoApplyResponseDTO> apply(@Valid @RequestBody AssRefundApplyInfoApplyRequestDTO dto) throws ManagerException { | |||
return ApiResponse.of(manager.apply(dto)); | |||
} | |||
@ApiOperation("通行费退费申请分页查询") | |||
@PostMapping("/page") | |||
public ApiResponse<Pagination> page(@Valid @RequestBody AssRefundApplyInfoPageRequestDTO dto) throws ManagerException { | |||
return ApiResponse.of(manager.page(dto)); | |||
} | |||
@@ -0,0 +1,151 @@ | |||
package cn.com.taiji.iaw.dto.ass.etcTransaction; | |||
import cn.com.taiji.core.dto.AbstractBizRequestDTO; | |||
import cn.com.taiji.core.entity.dict.ass.CheckStatus; | |||
import cn.com.taiji.core.entity.dict.basic.CardType; | |||
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; | |||
import javax.validation.constraints.NotNull; | |||
import java.time.LocalDateTime; | |||
import java.util.List; | |||
/** | |||
* @Auther: humh | |||
* @Description: | |||
* @Date: 2025/4/22 17:05 | |||
* @email: huminghao@mail.taiji.com.cn | |||
* @version: 1.0 | |||
*/ | |||
@ApiModel(description = "通行费退费申请提交请求") | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class AssRefundApplyInfoApplyRequestDTO extends AbstractBizRequestDTO { | |||
@ApiModelProperty(value = "通行Id") | |||
@NotBlank(message = "通行Id不能为空") | |||
private String passId; | |||
@ApiModelProperty(value = "营改增交易编号") | |||
@NotBlank(message = "营改增交易编号不能为空") | |||
private String ygzListNo; | |||
@ApiModelProperty(value = "etc卡号") | |||
@NotBlank(message = "etc卡号不能为空") | |||
private String cardId; | |||
@ApiModelProperty(value = "卡类型1-记账卡 2-储值卡 3-预存卡") | |||
private CardType cardType; | |||
@ApiModelProperty(value = "车牌号") | |||
@NotBlank(message = "车牌号不能为空") | |||
private String vehiclePlate; | |||
@ApiModelProperty(value = "车牌颜色") | |||
@NotNull(message = "车牌颜色不能为空") | |||
private Integer vehiclePlateColor; | |||
@ApiModelProperty(value = "入口时间") | |||
@NotNull(message = "入口时间不能为空") | |||
private LocalDateTime enTime; | |||
@ApiModelProperty(value = "出口时间") | |||
@NotNull(message = "出口时间不能为空") | |||
private LocalDateTime exTime; | |||
@ApiModelProperty(value = "入口站名") | |||
@NotBlank(message = "入口站名不能为空") | |||
private String enStationName; | |||
@ApiModelProperty(value = "出口站名") | |||
@NotBlank(message = "出口站名不能为空") | |||
private String exStationName; | |||
@ApiModelProperty(value = "支付类型,1 现金 2 其他第三方账户支付 3 银联卡支付 4 ETC支付 6 支付宝 7 微信 0 ETC支付 -1 未知") | |||
@NotNull(message = "支付类型不能为空") | |||
private Integer unionPayTransFlag; | |||
@ApiModelProperty(value = "车型,1 一型客车 2 二型客车 3 三型客车 4 四型客车 11 一型货车 12 二型货车 13 三型货车 14 四型货车 15 五型货车 16 六型货车 21 一型专项作业车 22 二型专项作业车 23 三型专项作业车 24 四型专项作业车 25 五型专项作业车 26 六型专项作业车") | |||
@NotNull(message = "车型不能为空") | |||
private Integer exVehClass; | |||
@ApiModelProperty(value = "收费金额(分)tollAmount,需将元*100转成单位分") | |||
@NotNull(message = "收费金额不能为空") | |||
private Long fee; | |||
@ApiModelProperty(value = "流水业主单位id") | |||
@NotNull(message = "流水业主单位id不能为空") | |||
private Integer ownerId; | |||
@ApiModelProperty(value = "流水业主单位名称") | |||
@NotBlank(message = "流水业主单位名称不能为空") | |||
private String ownerName; | |||
@ApiModelProperty(value = "路段名称") | |||
@NotBlank(message = "路段名称不能为空") | |||
private String roadName; | |||
@ApiModelProperty(value = "路段编号") | |||
@NotNull(message = "路段编号不能为空") | |||
private Integer road; | |||
@ApiModelProperty(value = "管理所名称") | |||
@NotBlank(message = "管理所名称不能为空") | |||
private String manageName; | |||
@ApiModelProperty(value = "管理所编码") | |||
@NotNull(message = "管理所编码不能为空") | |||
private Integer manageUnit; | |||
@ApiModelProperty(value = "16进制卡号") | |||
@NotBlank(message = "16进制卡号不能为空") | |||
private String hexCardId; | |||
@ApiModelProperty(value = "单省/多省标识") | |||
@NotNull(message = "单省/多省标识不能为空") | |||
private Integer multiProvince; | |||
@ApiModelProperty(value = "是否存在拆分结果") | |||
@NotNull(message = "是否存在拆分结果不能为空") | |||
private Integer isFind; | |||
@ApiModelProperty(value = "退费类型,1 多收退费 2 重复扣费 3 应免未免 4 其他") | |||
@NotNull(message = "退费类型不能为空") | |||
private Integer refundType; | |||
@ApiModelProperty(value = "申请理由") | |||
@NotBlank(message = "申请理由不能为空") | |||
private String refundReason; | |||
@ApiModelProperty(value = "支付凭证地址") | |||
@NotBlank(message = "支付凭证地址不能为空") | |||
private String payVoucherUrl; | |||
@ApiModelProperty(value = "审核结果;0-待审核,1-审核中,2-退费中,3-审核通过,4-审核不通过") | |||
private CheckStatus checkStatus = CheckStatus.NEW; | |||
@ApiModelProperty(value = "设备号") | |||
private String equipmentNo; | |||
@ApiModelProperty(value = "开户行支行名称") | |||
private String bankBranchName; | |||
@ApiModelProperty(value = "银行卡号") | |||
private String bankIdCode; | |||
@ApiModelProperty(value = "省中心工单号") | |||
private String formNo; | |||
@ApiModelProperty(value = "开户行名称") | |||
private String bankName; | |||
@ApiModelProperty(value = "支付凭证") | |||
private List<String> payVoucherUrls; | |||
} |
@@ -0,0 +1,22 @@ | |||
package cn.com.taiji.iaw.dto.ass.etcTransaction; | |||
import cn.com.taiji.common.model.BaseModel; | |||
import io.swagger.annotations.ApiModel; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
/** | |||
* @Auther: humh | |||
* @Description: | |||
* @Date: 2025/4/21 14:52 | |||
* @email: huminghao@mail.taiji.com.cn | |||
* @version: 1.0 | |||
*/ | |||
@ApiModel(description = "通行费退费申请提交响应") | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class AssRefundApplyInfoApplyResponseDTO extends BaseModel { | |||
} |
@@ -0,0 +1,28 @@ | |||
package cn.com.taiji.iaw.dto.ass.etcTransaction; | |||
import cn.com.taiji.core.dto.AbstractBizPageRequestDTO; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
import java.time.LocalDateTime; | |||
/** | |||
* @Auther: humh | |||
* @Description: | |||
* @Date: 2025/4/22 17:05 | |||
* @email: huminghao@mail.taiji.com.cn | |||
* @version: 1.0 | |||
*/ | |||
@ApiModel(description = "通行费退费申请分页请求") | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class AssRefundApplyInfoPageRequestDTO extends AbstractBizPageRequestDTO { | |||
@ApiModelProperty(value = "车牌号") | |||
private String vehiclePlate; | |||
} |
@@ -23,7 +23,7 @@ import java.time.LocalDate; | |||
public class ExportProvinceEtcTransactionFlowRequestDTO extends AbstractBizRequestDTO { | |||
@ApiModelProperty(value = "车牌号") | |||
@NotBlank | |||
@NotBlank(message = "车牌号必填") | |||
private String exVehPlate; | |||
@JsonFormat(pattern = "yyyy-MM-dd") // 解析格式 |
@@ -23,7 +23,7 @@ import java.time.LocalDate; | |||
public class QueryProvinceEtcTransactionFlowRequestDTO extends AbstractBizRequestDTO { | |||
@ApiModelProperty(value = "车牌号") | |||
@NotBlank | |||
@NotBlank(message = "车牌号必填") | |||
private String exVehPlate; | |||
@JsonFormat(pattern = "yyyy-MM-dd") // 解析格式 |
@@ -1,10 +1,8 @@ | |||
package cn.com.taiji.iaw.manager.ass.etcTransaction; | |||
import cn.com.taiji.common.manager.ManagerException; | |||
import cn.com.taiji.iaw.dto.ass.etcTransaction.ExportProvinceEtcTransactionFlowRequestDTO; | |||
import cn.com.taiji.iaw.dto.ass.etcTransaction.ExportProvinceEtcTransactionFlowResponseDTO; | |||
import cn.com.taiji.iaw.dto.ass.etcTransaction.QueryProvinceEtcTransactionFlowRequestDTO; | |||
import cn.com.taiji.iaw.dto.ass.etcTransaction.QueryProvinceEtcTransactionFlowResponseDTO; | |||
import cn.com.taiji.common.model.dao.Pagination; | |||
import cn.com.taiji.iaw.dto.ass.etcTransaction.*; | |||
/** | |||
* @Auther: humh | |||
@@ -17,4 +15,8 @@ public interface EtcTransactionManager { | |||
QueryProvinceEtcTransactionFlowResponseDTO queryProvinceEtcTransactionFlow(QueryProvinceEtcTransactionFlowRequestDTO dto) throws ManagerException; | |||
ExportProvinceEtcTransactionFlowResponseDTO exportProvinceEtcTransactionFlow(ExportProvinceEtcTransactionFlowRequestDTO dto) throws ManagerException; | |||
AssRefundApplyInfoApplyResponseDTO apply(AssRefundApplyInfoApplyRequestDTO dto) throws ManagerException; | |||
Pagination page(AssRefundApplyInfoPageRequestDTO dto) throws ManagerException; | |||
} |
@@ -1,19 +1,35 @@ | |||
package cn.com.taiji.iaw.manager.ass.etcTransaction; | |||
import cn.com.taiji.common.manager.ManagerException; | |||
import cn.com.taiji.common.model.dao.Pagination; | |||
import cn.com.taiji.common.pub.BeanTools; | |||
import cn.com.taiji.common.pub.CollectionTools; | |||
import cn.com.taiji.core.entity.ass.etcTransaction.AssRefundApplyInfo; | |||
import cn.com.taiji.core.entity.basic.QtkAgency; | |||
import cn.com.taiji.core.entity.basic.QtkCardInfo; | |||
import cn.com.taiji.core.entity.basic.QtkCustomerInfo; | |||
import cn.com.taiji.core.entity.dict.BucketFileBus; | |||
import cn.com.taiji.core.entity.dict.ass.CheckStatus; | |||
import cn.com.taiji.core.entity.dict.basic.SourceType; | |||
import cn.com.taiji.core.entity.dict.log.OperateType; | |||
import cn.com.taiji.core.entity.user.Staff; | |||
import cn.com.taiji.core.manager.tools.easyExcel.EasyExcelUtil; | |||
import cn.com.taiji.core.manager.tools.minio.MinioUtil; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.GetOriginListRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.GetOriginListResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.model.GetOriginListResModel; | |||
import cn.com.taiji.iaw.dto.ass.etcTransaction.ExportProvinceEtcTransactionFlowRequestDTO; | |||
import cn.com.taiji.iaw.dto.ass.etcTransaction.ExportProvinceEtcTransactionFlowResponseDTO; | |||
import cn.com.taiji.iaw.dto.ass.etcTransaction.QueryProvinceEtcTransactionFlowRequestDTO; | |||
import cn.com.taiji.iaw.dto.ass.etcTransaction.QueryProvinceEtcTransactionFlowResponseDTO; | |||
import cn.com.taiji.core.repo.jpa.ass.etcTransaction.AssRefundApplyInfoRepo; | |||
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.user.StaffRepo; | |||
import cn.com.taiji.core.repo.request.ass.etcTransaction.AssRefundApplyInfoPageRequest; | |||
import cn.com.taiji.iaw.dto.ass.etcTransaction.*; | |||
import cn.com.taiji.iaw.manager.AbstractIawManager; | |||
import cn.com.taiji.iaw.model.MyFinals; | |||
import cn.com.taiji.iaw.model.etcTransaction.ProvinceEtcTransactionFlowExcelModel; | |||
import cn.com.taiji.iaw.tools.SourceTargetMapper; | |||
import org.apache.commons.lang.StringUtils; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
@@ -34,6 +50,16 @@ public class EtcTransactionManagerImpl extends AbstractIawManager implements Etc | |||
@Autowired | |||
private MinioUtil minioUtil; | |||
@Autowired | |||
private AssRefundApplyInfoRepo refundApplyInfoRepo; | |||
@Autowired | |||
private QtkCardInfoRepo cardInfoRepo; | |||
@Autowired | |||
private QtkAgencyRepo agencyRepo; | |||
@Autowired | |||
private QtkCustomerInfoRepo customerInfoRepo; | |||
@Autowired | |||
private StaffRepo staffRepo; | |||
@Override | |||
public QueryProvinceEtcTransactionFlowResponseDTO queryProvinceEtcTransactionFlow(QueryProvinceEtcTransactionFlowRequestDTO reqDto) throws ManagerException { | |||
@@ -72,5 +98,72 @@ public class EtcTransactionManagerImpl extends AbstractIawManager implements Etc | |||
return resDto; | |||
} | |||
@Override | |||
public Pagination page(AssRefundApplyInfoPageRequestDTO dto) throws ManagerException { | |||
AssRefundApplyInfoPageRequest pageRequest = copyProperties(dto, new AssRefundApplyInfoPageRequest()); | |||
if (SourceType.WECHAT.equals(dto.getOrderSource())){ | |||
//小程序 | |||
if (StringUtils.isEmpty(dto.getCustomerId())){ | |||
throw new ManagerException("用户编号必传!"); | |||
} | |||
}else if (SourceType.SERVICE_HALL.equals(dto.getOrderSource())){ | |||
//APP | |||
if (StringUtils.isEmpty(dto.getVehiclePlate())){ | |||
throw new ManagerException("车牌号必传!"); | |||
} | |||
Staff staff = staffRepo.findByOpenId(findOpenIdByToken(dto.getAccessToken())); | |||
if (staff == null){ | |||
throw new ManagerException("为获取到当前员工账号!"); | |||
} | |||
pageRequest.setAgencyId(staff.getAgencyId()); | |||
if ("MANAGER".equals(staff.getIdentityType()) || MyFinals.QTZL_AGENCY_ID.equals(findAgencyIdByToken(dto.getAccessToken()))){ | |||
pageRequest.setAgencyId(null); | |||
} | |||
//员工 | |||
pageRequest.setCustomerId(null); | |||
}else { | |||
throw new ManagerException("请求来源异常!"); | |||
} | |||
return refundApplyInfoRepo.page(pageRequest); | |||
} | |||
@Override | |||
public AssRefundApplyInfoApplyResponseDTO apply(AssRefundApplyInfoApplyRequestDTO dto) throws ManagerException { | |||
//校验该流水是否正在审核的申请 | |||
List<AssRefundApplyInfo> applyInfos = refundApplyInfoRepo.queryByPassId(dto.getPassId()); | |||
if (!CollectionTools.isEmpty(applyInfos)) { | |||
for (AssRefundApplyInfo applyInfo : applyInfos) { | |||
//审核结果;0-未受理,1-已受理,2-审核通过,3-审核不通过,4-上传省中心,5-抄送部中心 | |||
if (applyInfo.getCheckStatus() != CheckStatus.CENSOR_APPROVE || applyInfo.getCheckStatus() != CheckStatus.CENSOR_FAILED){ | |||
throw new ManagerException("该通行流水正在审核中,无需再次申请!"); | |||
} | |||
} | |||
} | |||
//通过cardId获取到agencyId,再根据agencyId获取到agencyName | |||
QtkCardInfo cardInfo = cardInfoRepo.findByCardId(dto.getCardId()); | |||
QtkAgency agency = agencyRepo.findByAgencyId(cardInfo.getAgencyId()); | |||
AssRefundApplyInfo refundApplyInfo = new AssRefundApplyInfo(); | |||
BeanTools.copyProperties(dto, refundApplyInfo); | |||
refundApplyInfo.setOrderId(createOrderNo(agency.getAgencyId())); | |||
refundApplyInfo.setRoadTime(12);//业主单位处理时限,12 普通工单 4 加急工单 | |||
refundApplyInfo.setHandleType(3);//操作类型固定值3 | |||
refundApplyInfo.setHandleResult(0);//工单处理结果固定值0 | |||
QtkCustomerInfo customerInfo = customerInfoRepo.findByCustomerId(cardInfo.getCustomerId()); | |||
refundApplyInfo.setCustomerId(customerInfo.getCustomerId()); | |||
refundApplyInfo.setUserName(customerInfo.getCustomerName()); | |||
refundApplyInfo.setUserMobile(customerInfo.getCustomerTel()); | |||
refundApplyInfo.setUserIdnum(customerInfo.getCustomerIdNum()); | |||
refundApplyInfo.setUserIdtype(customerInfo.getCustomerIdType()); | |||
refundApplyInfo.setAgencyId(agency.getAgencyId()); | |||
refundApplyInfo.setAgencyName(agency.getName()); | |||
if (!CollectionTools.isEmpty(dto.getPayVoucherUrls())){ | |||
refundApplyInfo.setPayVoucherUrl(dto.getPayVoucherUrls().stream().filter(url -> url != null && !url.trim().isEmpty()).collect(Collectors.joining(";"))); | |||
} | |||
refundApplyInfoRepo.save(refundApplyInfo); | |||
//记录操作日志 | |||
persistOperateLog(OperateType.ETC_TRANSACTION_APPLY, refundApplyInfo.getId(), dto.getOrderSource(), findOpenIdByToken(dto.getAccessToken()), toLogString("ETC通信费退费申请提交")); | |||
return new AssRefundApplyInfoApplyResponseDTO(); | |||
} | |||
} |
@@ -103,17 +103,17 @@ public class ProvinceEtcTransactionFlowExcelModel extends BaseModel { | |||
@ExcelProperty(value = "业主管理单位编号", index = 18) | |||
private Integer manageUnit; | |||
// @ColumnWidth(10) | |||
// @ExcelProperty(value = "16 进制卡号", index = 0) | |||
// private String hexCardId; | |||
@ColumnWidth(10) | |||
@ExcelProperty(value = "16 进制卡号", index = 19) | |||
private String hexCardId; | |||
@ColumnWidth(10) | |||
@ExcelProperty(value = "是否为多省通行(出口流水字段)", index = 19) | |||
@ExcelProperty(value = "是否为多省通行(出口流水字段)", index = 20) | |||
private Integer multiProvince; | |||
// @ColumnWidth(10) | |||
// @ExcelProperty(value = "是否已找到交易(出口流水字段)", index = 0) | |||
// private Integer isFind; | |||
@ColumnWidth(10) | |||
@ExcelProperty(value = "是否已找到交易(出口流水字段)", index = 21) | |||
private Integer isFind; | |||
// @ColumnWidth(10) | |||
// @ExcelProperty(value = "退费类型(1: 多收退费, 2: 重复扣费, 3: 应免未免, 4: 其他)", index = 0) |
@@ -96,7 +96,7 @@ public class TestProvinceServiceHandler extends AbstractCommManager { | |||
@Test | |||
public void getHandleRecords() {//2.4工单查询 | |||
public void getHandleRecords() {//2.省中心工单处理记录查询 | |||
logger.info("测试开始。。。"); | |||
GetHandleRecordsLocalRequest req = new GetHandleRecordsLocalRequest(); | |||
req.setListno("020000520101600027427420240402164015|G005652004009020101102024040216000098|2024-04-02 16:55:41.000"); | |||
@@ -113,7 +113,7 @@ public class TestProvinceServiceHandler extends AbstractCommManager { | |||
} | |||
@Test | |||
public void orderSaveAsync() {//2.4工单查询 | |||
public void orderSaveAsync() {//2.省中心工单更新 | |||
logger.info("测试开始。。。"); | |||
OrderSaveReqModel model = new OrderSaveReqModel(); | |||
model.setPassId("020000520101600027427420240402164015|G005652004009020101102024040216000098|2024-04-02 16:55:41.000"); |