|
|
@@ -2,8 +2,14 @@ package cn.hnthyy.thmz.controller;
|
|
|
|
|
|
import cn.hnthyy.thmz.Utils.TokenUtil;
|
|
|
import cn.hnthyy.thmz.comment.UserLoginToken;
|
|
|
+import cn.hnthyy.thmz.entity.his.MzDepositFile;
|
|
|
+import cn.hnthyy.thmz.entity.his.MzyReqrec;
|
|
|
+import cn.hnthyy.thmz.entity.his.ZyDepositFile;
|
|
|
import cn.hnthyy.thmz.entity.thmz.User;
|
|
|
import cn.hnthyy.thmz.entity.zz.WxPayOrder;
|
|
|
+import cn.hnthyy.thmz.service.his.MzDepositFileService;
|
|
|
+import cn.hnthyy.thmz.service.his.MzyReqrecService;
|
|
|
+import cn.hnthyy.thmz.service.his.ZyDepositFileService;
|
|
|
import cn.hnthyy.thmz.service.thmz.PaidForZZService;
|
|
|
import cn.hnthyy.thmz.vo.PageViewVo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -22,7 +28,12 @@ import java.util.*;
|
|
|
public class PaidForZZController {
|
|
|
@Autowired
|
|
|
private PaidForZZService paidForZZService;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private MzDepositFileService mzDepositFileService;
|
|
|
+ @Autowired
|
|
|
+ private MzyReqrecService mzyReqrecService;
|
|
|
+ @Autowired
|
|
|
+ private ZyDepositFileService zyDepositFileService;
|
|
|
/**
|
|
|
* 查询自助缴费列表
|
|
|
*
|
|
|
@@ -111,6 +122,47 @@ public class PaidForZZController {
|
|
|
resultMap.put("message", "退费金额不能为空");
|
|
|
return resultMap;
|
|
|
}
|
|
|
+ if(wxPayOrder.getOrderType()==null){
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("message", "订单类型参数不能为空");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
+ if(wxPayOrder.getOrderType()==1){
|
|
|
+ MzyReqrec mzyReqrec= mzyReqrecService.queryMzyReqrecByAgtordnum(wxPayOrder.getTradeNo(),null,null);
|
|
|
+ if(mzyReqrec!=null){
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("message", "当前缴费已经成功挂号,无法退费,如需退费,请到挂号列表进行对应操作!");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
+ mzyReqrec= mzyReqrecService.queryMzyReqrecByAgtordnum(wxPayOrder.getTradeNo(),null,"mzy_reqrec_b");
|
|
|
+ if(mzyReqrec!=null){
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("message", "当前缴费已经成功挂号,无法退费,如需退费,请到挂号列表进行对应操作!");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(wxPayOrder.getOrderType()==2){
|
|
|
+ MzDepositFile mzDepositFile= mzDepositFileService.queryMzDepositFileByAgtordnum(wxPayOrder.getTradeNo(),null,null);
|
|
|
+ if(mzDepositFile!=null){
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("message", "当前缴费已经成功缴纳门诊费用,无法退费,如需退费,请到收费列表进行对应操作!");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
+ mzDepositFile= mzDepositFileService.queryMzDepositFileByAgtordnum(wxPayOrder.getTradeNo(),null,"mz_deposit_file_b");
|
|
|
+ if(mzDepositFile!=null){
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("message", "当前缴费已经成功缴纳门诊费用,无法退费,如需退费,请到收费列表进行对应操作!");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(wxPayOrder.getOrderType()==3){
|
|
|
+ ZyDepositFile zyDepositFile= zyDepositFileService.queryZyDepositFileByAgtordnum(wxPayOrder.getTradeNo(),null,null);
|
|
|
+ if(zyDepositFile!=null){
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("message", "当前缴费已经成功缴纳住院预缴金,无法退费,如需退费,请到住院鱼胶金列表进行对应操作!");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
+ }
|
|
|
User tokenUser = TokenUtil.getUser(httpServletRequest);
|
|
|
wxPayOrder.setRefundOpCode(tokenUser.getUserIdCode());
|
|
|
Map<String,Object> map= paidForZZService.refundOrder(wxPayOrder);
|