ソースを参照

一级市场边民进口确认

linbl 1 年間 前
コミット
c265e3985d

+ 25 - 0
sp-core/sp-api/src/main/java/com/pj/api/dto/OrderDto.java

@@ -256,6 +256,15 @@ public class OrderDto {
     private Integer enterpriseConfirm;
 
     /**
+     * 边民进口申报确认状态(0=待确认,1=是)
+     */
+    private Integer applyConfirmStatus;
+    /**
+     * 边民进口申报确认时间
+     */
+    private Date applyConfirmTime;
+
+    /**
      * 是否接单
      */
     private String pick;
@@ -793,4 +802,20 @@ public class OrderDto {
     public void setResaleStatus(Integer resaleStatus) {
         this.resaleStatus = resaleStatus;
     }
+
+    public Integer getApplyConfirmStatus() {
+        return applyConfirmStatus;
+    }
+
+    public void setApplyConfirmStatus(Integer applyConfirmStatus) {
+        this.applyConfirmStatus = applyConfirmStatus;
+    }
+
+    public Date getApplyConfirmTime() {
+        return applyConfirmTime;
+    }
+
+    public void setApplyConfirmTime(Date applyConfirmTime) {
+        this.applyConfirmTime = applyConfirmTime;
+    }
 }

+ 9 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrder.java

@@ -251,6 +251,15 @@ public class TbOrder extends Model<TbOrder> implements Serializable {
 	private Date peopleConfirmTime;
 
 	/**
+	 * 边民进口申报确认状态(0=待确认,1=是)
+	 */
+	private Integer applyConfirmStatus;
+	/**
+	 * 边民进口申报确认时间
+	 */
+	private Date applyConfirmTime;
+
+	/**
 	 * 一级市场商户确认(0=待确认,1=是)[j]
 	 */
 	private Integer enterpriseConfirm;

+ 10 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderAppController.java

@@ -134,6 +134,16 @@ public class TbOrderAppController {
 		return AjaxJson.getPageData(Long.valueOf(list.size()), list);
 	}
 
+	@RequestMapping("confirmOrder")
+	public AjaxJson confirmOrder(@RequestParam("orderId")Long orderId, @RequestParam("confirmType")Integer confirmType) {
+		return AjaxJson.toAjax(tbOrderService.confirmOrder(orderId, confirmType));
+	}
+
+	@RequestMapping("applyOrder")
+	public AjaxJson applyOrder(@RequestParam("orderId")Long orderId) {
+		return AjaxJson.toAjax(tbOrderService.applyOrder(orderId));
+	}
+
 	/*-----           正常业务逻辑👆👆    rpc远程调用👇👇 -----*/
 
 	/** 查询当天的下单记录 */

+ 1 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderMapper.xml

@@ -85,6 +85,7 @@
 			<if test=' this.has("peopleConfirmStatus") '> and people_confirm_status = #{peopleConfirmStatus} </if>
 			<if test=' this.has("peopleConfirmType") '> and people_confirm_type = #{peopleConfirmType} </if>
 			<if test=' this.has("collageOrdersId") '> and collage_orders_id = #{collageOrdersId} </if>
+			<if test=' this.has("applyConfirmStatus") '> and apply_confirm_status = #{applyConfirmStatus} </if>
 		</where>
 		order by
 		<choose>

+ 57 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderService.java

@@ -399,8 +399,65 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 
 	}
 
+	/**
+	 *  边民确认订单
+	 * @param orderId 一级市场订单表ID
+	 */
+	public boolean confirmOrder(Long orderId, Integer confirmType){
+		// TODO: 2023/8/28 边民发起支付申请,调用银行接口:验证边民支付信息,将货款先存入银行第三方账户,并给出回执
+		// 银行返回支付回执为"交易成功"时,方法往下执行
+
+		//获取登录人
+		APPLoginUserInfo appLoginInfo = StpAPPUserUtil.getAPPLoginInfo();
+
+		LambdaUpdateWrapper<TbOrder> wrapper = new LambdaUpdateWrapper<>();
+		wrapper.set(TbOrder::getPeopleConfirmStatus, ConfirmStatus.CONFIRM_STATUS_ONE.getCode());//边民确认:1=确认
+		wrapper.set(TbOrder::getPeopleConfirmType, confirmType);//边民确认类型[1=刷脸,2=指纹]
+		wrapper.set(TbOrder::getPeopleConfirmTime, new Date());
+
+		wrapper.set(TbOrder::getUpdateBy, appLoginInfo.getLoginId());
+		wrapper.set(TbOrder::getUpdateName, appLoginInfo.getLoginName());
+		wrapper.set(TbOrder::getUpdateTime, new Date());
+
+		wrapper.eq(TbOrder::getId, orderId);
+
+		return update(wrapper);
+	}
+
+	/**
+	 *  边民进口申报确认
+	 * @param orderId 一级市场订单表ID
+	 */
+	public boolean applyOrder(Long orderId){
+		//获取登录人
+		APPLoginUserInfo appLoginInfo = StpAPPUserUtil.getAPPLoginInfo();
+
+		LambdaUpdateWrapper<TbOrder> wrapper = new LambdaUpdateWrapper<>();
+		wrapper.set(TbOrder::getApplyConfirmStatus, ConfirmStatus.CONFIRM_STATUS_ONE.getCode());//进口申报确认:1=确认
+		wrapper.set(TbOrder::getApplyConfirmTime, new Date());
 
+		wrapper.set(TbOrder::getUpdateBy, appLoginInfo.getLoginId());
+		wrapper.set(TbOrder::getUpdateName, appLoginInfo.getLoginName());
+		wrapper.set(TbOrder::getUpdateTime, new Date());
 
+		wrapper.eq(TbOrder::getId, orderId);
+
+		return update(wrapper);
+	}
+
+	// TODO: 2023/8/28 系统接收到航通接口信息:车辆已出一级市场
+	void orderFinish(){
+		//1、todo: 调用银行接口发起划扣:将边民划扣至银行第三方账户的货款,支付至外籍商户的账户
+		//收到划扣成功回执后,方法往下制行
+
+		//2、修改一级市场订单支付状态为已支付
+
+		//3、todo: 调用航通接口,发送划扣成功回执信息给航通(只发送)
+
+		//4、修改一级市场订单完成状态为已完成
+
+		//5、发送消息提醒边民,订单可以转售到二级市场
+	}
 
 	/** 远程调用  查订单 */
 	OrderDto getOrderDtoById(Long id){