Browse Source

医技确费接口

xiaochan 2 years ago
parent
commit
b369d7af58

+ 0 - 66
src/main/java/thyyxxk/webserver/controller/ExternalInterface/MedicalTechnologyApplicationFee.java

@@ -1,66 +0,0 @@
-package thyyxxk.webserver.controller.ExternalInterface;
-
-import com.baomidou.dynamic.datasource.annotation.DS;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.*;
-import thyyxxk.webserver.config.auth.PassToken;
-import thyyxxk.webserver.config.exception.ExceptionEnum;
-import thyyxxk.webserver.dao.his.zhuyuanyiji.QueRenYiZhuShouFeiDao;
-import thyyxxk.webserver.entity.ResultVo;
-import thyyxxk.webserver.entity.zhuyuanyisheng.jianyanjiancha.YshYjReq;
-import thyyxxk.webserver.utils.ResultVoUtil;
-import thyyxxk.webserver.utils.StringUtil;
-
-import java.util.Date;
-
-/**
- * 医技申请确费
- */
-@RestController
-@RequestMapping("/medicalTechnology")
-public class MedicalTechnologyApplicationFee {
-
-    private final QueRenYiZhuShouFeiDao dao;
-
-    public MedicalTechnologyApplicationFee(QueRenYiZhuShouFeiDao dao) {
-        this.dao = dao;
-    }
-
-    @GetMapping("/confirmFee")
-    @PassToken
-    @Transactional(rollbackFor = Exception.class)
-    @DS("dev")
-    public ResultVo<String> externalConfirmationFees(@RequestParam("confirmId") String confirmId,
-                                                     @RequestParam("reqNo") Integer reqNo,
-                                                     @RequestParam("deptCode") String deptCode) {
-        if (StringUtil.isBlank(confirmId)) {
-            return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "确认人 id 为空");
-        }
-        if (StringUtil.isBlank(deptCode)) {
-            return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "科室不能为空");
-        }
-        if (reqNo == null) {
-            return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "申请号为空");
-        }
-        YshYjReq yshYjReq = dao.selectedYshJyReqOne(reqNo);
-        if (yshYjReq == null) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "未查询到申请单");
-        }
-
-        if (StringUtil.notBlank(yshYjReq.getConfirmFlag())) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请勿重复确认");
-        }
-
-        if (dao.whetherToGenerateAConfirmationFee(yshYjReq.getActOrderNo()) == 0) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "护士未执行");
-        }
-
-        Date date = new Date();
-
-        dao.updateYshYjReqFlag(confirmId, reqNo, date, deptCode);
-        dao.confirmTheIntermediateTable(confirmId, yshYjReq.getActOrderNo(), date, deptCode);
-
-        return ResultVoUtil.success(ExceptionEnum.SUCCESS);
-    }
-
-}

+ 0 - 128
src/main/java/thyyxxk/webserver/controller/jiekou/DuiWaiJieKouController.java

@@ -1,128 +0,0 @@
-package thyyxxk.webserver.controller.jiekou;
-
-import com.alibaba.fastjson.JSON;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import thyyxxk.webserver.config.auth.PassToken;
-import thyyxxk.webserver.config.exception.ExceptionEnum;
-import thyyxxk.webserver.entity.ResultVo;
-import thyyxxk.webserver.entity.datamodify.MzChargeDetail;
-import thyyxxk.webserver.entity.jiekou.GetPatientInformationParam;
-import thyyxxk.webserver.entity.jiekou.PatientInformation;
-import thyyxxk.webserver.entity.login.UserInfo;
-import thyyxxk.webserver.service.PublicServer;
-import thyyxxk.webserver.service.jiekou.DuiWaiJieKouService;
-import thyyxxk.webserver.service.zhuyuanyiji.MenZhengXiangMuServer;
-import thyyxxk.webserver.utils.ListUtil;
-import thyyxxk.webserver.utils.ResultVoUtil;
-import thyyxxk.webserver.utils.StringUtil;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * <p>
- * 描述: 对深圳博英接口文档
- * </p>
- *
- * @author xc
- * @date 2021-07-13 08:04
- */
-@RestController
-@RequestMapping("/thyy")
-@Slf4j
-public class DuiWaiJieKouController {
-    private final DuiWaiJieKouService service;
-    private final PublicServer publicServer;
-    private final MenZhengXiangMuServer mzServer;
-
-    @Autowired
-    public DuiWaiJieKouController(DuiWaiJieKouService service, PublicServer publicServer, MenZhengXiangMuServer mzServer) {
-        this.service = service;
-        this.publicServer = publicServer;
-        this.mzServer = mzServer;
-    }
-
-
-    @PassToken
-    @PostMapping("/getPatientInformation")
-    public ResultVo<List<PatientInformation>> getPatientInformation(@RequestBody GetPatientInformationParam param) {
-        return service.getPatientInformation(param);
-    }
-
-    /**
-     * 门诊项目确认
-     *
-     * @param mz reqNos 可多个申请号 confirmId 操作人 execDept  执行科室
-     * @return 操作提示
-     */
-    @PassToken
-    @PostMapping("/mzProjectConfirm")
-    public ResultVo<String> mzProjectConfirm(@RequestBody MzChargeDetail mz) {
-        log.info("门诊项目确认接口调用:{}", JSON.toJSONString(mz));
-        if (ListUtil.isBlank(mz.getReqNos())) {
-            return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "申请号不能为空。");
-        }
-        if (StringUtil.isBlank(mz.getConfirmId())) {
-            return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "操作人不能为空");
-        }
-        UserInfo userInfo = publicServer.huoQuYuanGongXinXi(mz.getConfirmId());
-        MzChargeDetail mzChargeDetail = new MzChargeDetail();
-        mzChargeDetail.setSource("接口");
-        if (userInfo != null) {
-            if (mz.getExecDept() == null) {
-                mzChargeDetail.setExecDept(userInfo.getDeptCode());
-            } else {
-                mzChargeDetail.setExecDept(mz.getExecDept());
-            }
-            mzChargeDetail.setConfirmId(userInfo.getCode());
-        } else {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有找到对应的操作人信息。");
-        }
-        mzChargeDetail.setXiangMuZhuangTai(0);
-        for (Integer reqNo : mz.getReqNos()) {
-            if (mzChargeDetail.getList() == null) {
-                mzChargeDetail.setList(new ArrayList<>());
-            }
-            MzChargeDetail chargeDetail = new MzChargeDetail();
-            chargeDetail.setReqNo(reqNo);
-            chargeDetail.setConfirmFlag(1);
-            mzChargeDetail.getList().add(chargeDetail);
-        }
-        ResultVo<String> fanHui = mzServer.menZhenXiangMuQueXiaoHuoQueRen(mzChargeDetail);
-        if (fanHui.getCode() == 201) {
-            return ResultVoUtil.success();
-        }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, fanHui.getMessage());
-    }
-
-    @PassToken
-    @PostMapping("/mzProjectCancel")
-    public ResultVo<String> mzProjectCancel(@RequestBody MzChargeDetail mz) {
-        log.info("门诊项目确认接口调用:{}", JSON.toJSONString(mz));
-        if (ListUtil.isBlank(mz.getReqNos())) {
-            return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "申请号不能为空。");
-        }
-        MzChargeDetail mzChargeDetail = new MzChargeDetail();
-        mzChargeDetail.setSource("接口");
-        for (Integer reqNo : mz.getReqNos()) {
-            if (mzChargeDetail.getList() == null) {
-                mzChargeDetail.setList(new ArrayList<>());
-            }
-            MzChargeDetail chargeDetail = new MzChargeDetail();
-            chargeDetail.setReqNo(reqNo);
-            chargeDetail.setConfirmFlag(3);
-            mzChargeDetail.getList().add(chargeDetail);
-        }
-        ResultVo<String> fanHui = mzServer.menZhenXiangMuQueXiaoHuoQueRen(mzChargeDetail);
-        if (fanHui.getCode() == 201) {
-            return ResultVoUtil.success();
-        }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, fanHui.getMessage());
-    }
-
-}

+ 83 - 0
src/main/java/thyyxxk/webserver/controller/jiekou/MedicalTechnologyIsPaidController.java

@@ -0,0 +1,83 @@
+package thyyxxk.webserver.controller.jiekou;
+
+import lombok.extern.slf4j.Slf4j;
+import org.jetbrains.annotations.Nullable;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import thyyxxk.webserver.config.auth.PassToken;
+import thyyxxk.webserver.config.exception.ExceptionEnum;
+import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.service.jiekou.MedicalTechnologyIsPaidService;
+import thyyxxk.webserver.utils.ResultVoUtil;
+import thyyxxk.webserver.utils.StringUtil;
+
+/**
+ * <p>
+ * 描述: 对外医技确费接口
+ * </p>
+ *
+ * @author xc
+ * @date 2021-07-13 08:04
+ */
+@RestController
+@RequestMapping("/thyy/med")
+@Slf4j
+public class MedicalTechnologyIsPaidController {
+    private final MedicalTechnologyIsPaidService service;
+
+    @Autowired
+    public MedicalTechnologyIsPaidController(MedicalTechnologyIsPaidService service) {
+        this.service = service;
+    }
+
+    @GetMapping("/medConfirm")
+    @PassToken
+    public ResultVo<String> medConfirm(@RequestParam("reqNo") Integer reqNo,
+                                       @RequestParam("confirmId") String confirmId,
+                                       @RequestParam("type") Integer type) {
+        ResultVo<String> INVALID_PARAM = verify(reqNo, confirmId, type);
+        if (INVALID_PARAM != null) return INVALID_PARAM;
+
+        if (type == 1) {
+            return service.mzProject(reqNo, confirmId, "1");
+        } else if (type == 2) {
+            return service.zyProject(reqNo, confirmId, "1");
+        }
+
+        return ResultVoUtil.success(ExceptionEnum.SUCCESS);
+    }
+
+
+    @GetMapping("/medCancel")
+    @PassToken
+    public ResultVo<String> medCancel(@RequestParam("reqNo") Integer reqNo,
+                                      @RequestParam("confirmId") String confirmId,
+                                      @RequestParam("type") Integer type) {
+        ResultVo<String> INVALID_PARAM = verify(reqNo, confirmId, type);
+        if (INVALID_PARAM != null) return INVALID_PARAM;
+        if (type == 1) {
+            return service.mzProject(reqNo, confirmId, "3");
+        } else if (type == 2) {
+            return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "住院接口不提供取消接口");
+        }
+        return ResultVoUtil.success(ExceptionEnum.SUCCESS);
+    }
+
+    @Nullable
+    private static ResultVo<String> verify(Integer reqNo, String confirmId, Integer type) {
+        if (reqNo == null) {
+            return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "申请号为空");
+        }
+
+        if (StringUtil.isBlank(confirmId)) {
+            return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "确认人为空");
+        }
+
+        if (type == null) {
+            return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "类型为空");
+        }
+        return null;
+    }
+
+
+}

+ 71 - 37
src/main/java/thyyxxk/webserver/dao/his/jiekou/DuiWaiJieKouDao.java

@@ -3,8 +3,13 @@ package thyyxxk.webserver.dao.his.jiekou;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+import thyyxxk.webserver.entity.datamodify.MzChargeDetail;
 import thyyxxk.webserver.entity.jiekou.PatientInformation;
+import thyyxxk.webserver.entity.zhuyuanyisheng.jianyanjiancha.YshYjReq;
 
+import java.math.BigDecimal;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -17,41 +22,70 @@ import java.util.List;
  */
 @Mapper
 public interface DuiWaiJieKouDao {
-    /**
-     * 获取 门诊患者的信息
-     *
-     * @param patientId 门诊号
-     * @param execDept  执行科室
-     * @return 返回 多条数据
-     */
-    @Select("select a.patient_id,order_code order_id,a.patient_id inpatient_no,p_name name,birth_date birthday, " +
-            "group_name test_name, " +
-            "(select RTRIM(name) from zd_unit_code where code = req_ward) open_dpmt, " +
-            "(select RTRIM(name) from a_employee_mi where code = req_doctor) open_doc,req_date open_date,receive_flag, " +
-            "source = '门诊', rtrim(ic_card_no) card_id, " +
-            "case when sex = 1 then '男' when sex = 2 then '女' else '未知' end sex,RTRIM(adress) address,rtrim(social_no) idNumber, " +
-            "RTRIM(phone_no) phone,jy_remark LCZD,result_comment JYBS " +
-            "from mz_yj_req a left join mz_patient_mi b on (a.patient_id = b.patient_id) " +
-            "where exec_dept = #{execDept} and a.patient_id = #{patientId}")
-    List<PatientInformation> getMzPatient(@Param("patientId") String patientId,
-                                          @Param("execDept") String execDept);
-
-    /**
-     * 获取 住院患者的信息
-     *
-     * @param inpatientNo 住院号
-     * @param execDept    执行科室
-     * @return 返回信息
-     */
-    @Select("select a.inpatient_no patient_id,order_code order_id,a.inpatient_no,p_name name, " +
-            "case when sex = 1 then '男' when sex = 2 then '女' else '未知' end sex,birth_date birthday, " +
-            "home_street address,rtrim(social_no) idNumber,rtrim(home_tel) phone,order_name testName, " +
-            "(select rtrim(name)  from zd_unit_code where code = req_ward) open_dpmt, " +
-            "bed_no sickbed, " +
-            "(select rtrim(name) from a_employee_mi where code = req_doctor) open_doc, " +
-            "req_date open_date,receive_flag,source='住院',req_comment JYBS,diag_text LCZD " +
-            "from ysh_yj_req a left join a_patient_mi b on (a.inpatient_no = b.inpatient_no) " +
-            "where exec_dept = #{execDept} and a.inpatient_no = #{inpatientNo} ")
-    List<PatientInformation> getYzPatient(@Param("inpatientNo") String inpatientNo,
-                                          @Param("execDept") String execDept);
+
+    @Select("select patient_id, times, item_no, receipt_no, order_no, req_no " +
+            "from mz_yj_req " +
+            "where req_no = #{reqNo} " +
+            "order by req_no desc")
+    MzChargeDetail getFeeInfoByReqNo(Integer reqNo);
+
+
+    @Update("update mz_yj_req " +
+            "set confirm_flag = #{flag}, " +
+            "    receive_flag =#{flag}, " +
+            "    confirm_time = #{date}, " +
+            "    exec_dept    = #{dept}, " +
+            "    confirm_id   = #{userId} " +
+            "where req_no = #{reqNo}")
+    int confirmOutpatientYjReq(String flag, String userId, String dept, Date date, Integer reqNo);
+
+    @Update("update mz_charge_detail " +
+            "set confirm_flag = #{flag}, " +
+            "    receive_flag =#{flag}, " +
+            "    confirm_time = #{date}, " +
+            "    exec_dept    = #{dept}, " +
+            "    confirm_id   = #{userId} " +
+            "where patient_id = #{mz.patientId} " +
+            "  and times = #{mz.times} " +
+            "  and receipt_no = #{mz.receiptNo} " +
+            "  and order_no = #{mz.orderNo} " +
+            "  and req_no = #{mz.reqNo}")
+    int confirmOutPatientFee(@Param("flag") String flag,
+                             @Param("userId") String userId,
+                             @Param("dept") String dept,
+                             @Param("date") Date date,
+                             @Param("reqNo") Integer reqNo,
+                             @Param("mz") MzChargeDetail mz);
+
+
+    @Select("select act_order_no, confirm_flag " +
+            "from ysh_yj_req where req_no = #{reqNo}")
+    YshYjReq selectedYshJyReqOne(Integer reqNo);
+
+
+    @Select("select count(1) " +
+            "from yz_zy_patient_fee where act_order_no = #{orderNo} ")
+    int whetherToGenerateAConfirmationFee(BigDecimal orderNo);
+
+    @Update("update ysh_yj_req " +
+            "set confirm_flag = 1, " +
+            "    confirm_id   = #{confirmId}, " +
+            "    confirm_time = #{date}," +
+            "    exec_dept = #{deptCode} " +
+            "where req_no = #{reqNo} ")
+    int updateYshYjReqFlag(String confirmId,
+                           Integer reqNo,
+                           Date date,
+                           String deptCode);
+
+    @Update("update yz_zy_patient_fee " +
+            "set charge_status = '1', " +
+            "    op_id         = #{confirmId}, " +
+            "    op_date       = #{date}," +
+            "    exec_unit     = #{deptCode} " +
+            "where act_order_no = #{orderNo} ")
+    int confirmTheIntermediateTable(String confirmId,
+                                    BigDecimal orderNo,
+                                    Date date,
+                                    String deptCode);
 }

+ 4 - 2
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyiji/MenZhengXiangMuDao.java

@@ -120,7 +120,7 @@ public interface MenZhengXiangMuDao {
             ",confirm_time =getdate() , exec_dept =#{execDept},confirm_id =#{confirmId}" +
             "</when>" +
             "<otherwise>" +
-            ",confirm_time = null,confirm_id = null" + //  , exec_dept = null
+            ",confirm_time = null,confirm_id = null" +
             "</otherwise>" +
             "</choose>" +
             "</set>" +
@@ -135,7 +135,6 @@ public interface MenZhengXiangMuDao {
                                 @Param("confirmId") String confirmId,
                                 @Param("execDept") String execDept);
 
-
     @Update("<script>" +
             "<foreach collection='list' item='item' separator=';'> " +
             "update mz_yj_req " +
@@ -161,4 +160,7 @@ public interface MenZhengXiangMuDao {
                             @Param("confirmId") String confirmId,
                             @Param("execDept") String execDept);
 
+
+
+
 }

+ 0 - 32
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyiji/QueRenYiZhuShouFeiDao.java

@@ -253,36 +253,4 @@ public interface QueRenYiZhuShouFeiDao {
             @Param("list") List<String> execUnitList,
             @Param("yiQueFeiShuJu") List<Patient> yiQueFeiShuJu);
 
-
-    @Select("select act_order_no, confirm_flag " +
-            "from ysh_yj_req where req_no = #{reqNo}")
-    YshYjReq selectedYshJyReqOne(Integer reqNo);
-
-    @Update("update ysh_yj_req " +
-            "set confirm_flag = 1, " +
-            "    confirm_id   = #{confirmId}, " +
-            "    confirm_time = #{date}," +
-            "    exec_dept = #{deptCode} " +
-            "where req_no = #{reqNo} ")
-    int updateYshYjReqFlag(String confirmId,
-                           Integer reqNo,
-                           Date date,
-                           String deptCode);
-
-    @Update("update yz_zy_patient_fee " +
-            "set charge_status = '1', " +
-            "    op_id         = #{confirmId}, " +
-            "    op_date       = #{date}," +
-            "    exec_unit     = #{deptCode} " +
-            "where act_order_no = #{orderNo} ")
-    int confirmTheIntermediateTable(String confirmId,
-                                    BigDecimal orderNo,
-                                    Date date,
-                                    String deptCode);
-
-    @Select("select count(1)\n" +
-            "from yz_zy_patient_fee where act_order_no = #{orderNo} ")
-    int whetherToGenerateAConfirmationFee(BigDecimal orderNo);
-
-
 }

+ 0 - 51
src/main/java/thyyxxk/webserver/service/jiekou/DuiWaiJieKouService.java

@@ -1,51 +0,0 @@
-package thyyxxk.webserver.service.jiekou;
-
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-import thyyxxk.webserver.config.exception.ExceptionEnum;
-import thyyxxk.webserver.dao.his.jiekou.DuiWaiJieKouDao;
-import thyyxxk.webserver.entity.ResultVo;
-import thyyxxk.webserver.entity.jiekou.GetPatientInformationParam;
-import thyyxxk.webserver.entity.jiekou.PatientInformation;
-import thyyxxk.webserver.utils.ResultVoUtil;
-import thyyxxk.webserver.utils.StringUtil;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * <p>
- * 描述: 对深圳博英接口文档
- * </p>
- *
- * @author xc
- * @date 2021-07-13 08:08
- */
-@Slf4j
-@Service
-public class DuiWaiJieKouService {
-    private final DuiWaiJieKouDao dao;
-
-
-    public DuiWaiJieKouService(DuiWaiJieKouDao dao) {
-        this.dao = dao;
-    }
-
-    public ResultVo<List<PatientInformation>> getPatientInformation(GetPatientInformationParam param) {
-        log.info("查询:{}", param);
-        if (StringUtil.notBlank(param.getSource()) && param.getSource().equals("SZBY")) {
-            List<PatientInformation> list = new ArrayList<>();
-            if (param.getFlag() == 1) {
-                list = dao.getMzPatient(param.getPatient(), "2030000");
-            } else if (param.getFlag() == 2) {
-                list = dao.getYzPatient(param.getPatient(), "2030000");
-            }
-            if (list.size() > 0) {
-                return ResultVoUtil.success(list);
-            }
-        } else {
-            return ResultVoUtil.fail(ExceptionEnum.BAD_REQUEST, "未知来源。");
-        }
-        return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
-    }
-}

+ 96 - 0
src/main/java/thyyxxk/webserver/service/jiekou/MedicalTechnologyIsPaidService.java

@@ -0,0 +1,96 @@
+package thyyxxk.webserver.service.jiekou;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import thyyxxk.webserver.config.exception.BizException;
+import thyyxxk.webserver.config.exception.ExceptionEnum;
+import thyyxxk.webserver.dao.his.jiekou.DuiWaiJieKouDao;
+import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.datamodify.MzChargeDetail;
+import thyyxxk.webserver.entity.login.UserInfo;
+import thyyxxk.webserver.entity.zhuyuanyisheng.jianyanjiancha.YshYjReq;
+import thyyxxk.webserver.service.redislike.RedisLikeService;
+import thyyxxk.webserver.utils.ResultVoUtil;
+import thyyxxk.webserver.utils.StringUtil;
+
+import java.util.Date;
+
+/**
+ * <p>
+ * 描述: 对外医技确费接口
+ * </p>
+ *
+ * @author xc
+ * @date 2021-07-13 08:08
+ */
+@Slf4j
+@Service
+public class MedicalTechnologyIsPaidService {
+    private final DuiWaiJieKouDao dao;
+    private final RedisLikeService redisLikeService;
+
+    public MedicalTechnologyIsPaidService(DuiWaiJieKouDao dao, RedisLikeService redisLikeService) {
+        this.dao = dao;
+        this.redisLikeService = redisLikeService;
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    public ResultVo<String> mzProject(Integer reqNo, String confirmId, String type) {
+        MzChargeDetail mz = dao.getFeeInfoByReqNo(reqNo);
+        if (mz == null) {
+            return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "未查询到原申请。");
+        }
+        UserInfo userInfo = redisLikeService.getUserInfoByCode(confirmId);
+        if (userInfo == null) {
+            return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "未查询到确认人数据");
+        }
+
+        //  1 确认 3 取消
+        Date date = new Date();
+
+        int yjReq = dao.confirmOutpatientYjReq(type, confirmId, userInfo.getDeptCode(), date, reqNo);
+        if (yjReq == 0) {
+            return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "更新失败请联系管理员。");
+        }
+        int feeCount = dao.confirmOutPatientFee(type, confirmId, userInfo.getDeptCode(), date, reqNo, mz);
+        if (feeCount == 0) {
+            throw new BizException(ExceptionEnum.INVALID_PARAM, "更新失败请联系管理员");
+        }
+        return ResultVoUtil.success(ExceptionEnum.SUCCESS);
+    }
+
+
+    public ResultVo<String> zyProject(Integer reqNo, String confirmId, String type) {
+        YshYjReq yshYjReq = dao.selectedYshJyReqOne(reqNo);
+        if (yshYjReq == null) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "未查询到申请单");
+        }
+
+        if (StringUtil.notBlank(yshYjReq.getConfirmFlag())) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请勿重复确认");
+        }
+
+        if (dao.whetherToGenerateAConfirmationFee(yshYjReq.getActOrderNo()) == 0) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "护士未执行");
+        }
+
+        Date date = new Date();
+
+        UserInfo userInfo = redisLikeService.getUserInfoByCode(confirmId);
+        if (userInfo == null) {
+            return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "未查询到确认人数据");
+        }
+
+        int yshFlag = dao.updateYshYjReqFlag(confirmId, reqNo, date, userInfo.getDeptCode());
+        if (yshFlag == 0) {
+            return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "更新失败请联系管理员");
+        }
+        int feeCount = dao.confirmTheIntermediateTable(confirmId, yshYjReq.getActOrderNo(), date, userInfo.getDeptCode());
+        if (feeCount == 0) {
+            throw new BizException(ExceptionEnum.INVALID_PARAM, "更新失败请联系管理员");
+        }
+        return ResultVoUtil.success(ExceptionEnum.SUCCESS);
+    }
+
+}