Browse Source

门诊项目确认或取消

xiaochan 4 năm trước cách đây
mục cha
commit
0e7ecd18b0

+ 55 - 0
src/main/java/thyyxxk/webserver/controller/zhuyuanyiji/MenZhengXiangMuController.java

@@ -0,0 +1,55 @@
+package thyyxxk.webserver.controller.zhuyuanyiji;
+
+import org.springframework.web.bind.annotation.*;
+import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.datamodify.MzChargeDetail;
+import thyyxxk.webserver.service.zhuyuanyiji.MenZhengXiangMuServer;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 描述: 门诊项目取消或确认
+ * </p>
+ *
+ * @author xc
+ * @date 2021-10-09 15:17
+ */
+@RestController
+@RequestMapping("/menZhenXiangMu")
+public class MenZhengXiangMuController {
+    private final MenZhengXiangMuServer server;
+
+    public MenZhengXiangMuController(MenZhengXiangMuServer server) {
+        this.server = server;
+    }
+
+    @GetMapping("/getMzPatient")
+    public ResultVo<MzChargeDetail> getMzPatient(@RequestParam("patientId") String patientId,
+                                                 @RequestParam("xiangMuZhuangTai") Integer xiangMuZhuangTai,
+                                                 @RequestParam("startTime") String startTime,
+                                                 @RequestParam("endTime") String endTime,
+                                                 @RequestParam("dept") String dept) {
+        return server.getMzPatient(patientId, xiangMuZhuangTai, startTime, endTime, dept);
+    }
+
+    @GetMapping("/getFeiYongXinXi")
+    public ResultVo<List<MzChargeDetail>> getFeiYongXinXi(@RequestParam("serialNo") Integer serialNo,
+                                                          @RequestParam("patientId") String patientId,
+                                                          @RequestParam("times") Integer times) {
+        return server.getFeiYongXinXi(serialNo, patientId, times);
+    }
+
+    @GetMapping("/getMingXi")
+    public ResultVo<List<MzChargeDetail>> getMingXi(@RequestParam("patientId") String patientId,
+                                                    @RequestParam("times") Integer times,
+                                                    @RequestParam("reqNo") Integer reqNo) {
+        return server.getMingXi(patientId, times, reqNo);
+    }
+
+    @PostMapping("/queRenOrQuXiao")
+    public ResultVo<String> menZhenXiangMuQueXiaoHuoQueRen(@RequestBody MzChargeDetail mzChargeDetail) {
+        return server.menZhenXiangMuQueXiaoHuoQueRen(mzChargeDetail);
+    }
+
+}

+ 216 - 0
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyiji/MenZhengXiangMuDao.java

@@ -0,0 +1,216 @@
+package thyyxxk.webserver.dao.his.zhuyuanyiji;
+
+import org.apache.ibatis.annotations.*;
+import thyyxxk.webserver.entity.datamodify.MzChargeDetail;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 描述: 门诊项目确认或取消
+ * </p>
+ *
+ * @author xc
+ * @date 2021-10-09 15:16
+ */
+@Mapper
+public interface MenZhengXiangMuDao {
+
+    @Select("SELECT mz_patient_mi.name, " +
+            "       mz_patient_mi.sex, " +
+            "       mz_patient_mi.patient_id, " +
+            "       ic_card_no = cast(mz_patient_mi.ic_card_no as varchar(50)), " +
+            "       mz_patient_mi.birth_day, " +
+            "       mz_patient_mi.phone_no, " +
+            "       mz_patient_mi.adress  , " +
+            "       age=space(20), " +
+            "       account_balance=0.00, " +
+            "       account_status =space(2), " +
+            "       times, " +
+            "       response_type, " +
+            "       yb_flag=space(1), " +
+            "       by_flag=space(1), " +
+            "       contract_code=contract_code, " +
+            "       charge_type " +
+            "FROM mz_patient_mi " +
+            "where patient_id=#{patientId}")
+    MzChargeDetail getMzPatient(String patientId);
+
+
+    @Select("SELECT patient_id =max(a.patient_id), " +
+            "       times      =max(a.times), " +
+            "       serial_no  =a.serial_no, " +
+            "       charge_date=max(a.charge_date) " +
+            "FROM mz_receipt_serial a " +
+            "where    patient_id=#{patientId} and " +
+            "        charge_date >= #{startTime} and " +
+            "        charge_date <= #{endTime} and " +
+            "        isnull(tf_flag,'') <> '1' " +
+            "group by serial_no " +
+            "having sum(total_charge) - sum(charge10 + charge11 + charge12) > 0")
+    List<MzChargeDetail> getFeiYong(@Param("patientId") String patientId,
+                                    @Param("startTime") String startTime,
+                                    @Param("endTime") String endTime);
+
+    @Select("SELECT patient_id =max(a.patient_id),  " +
+            "       times      =max(a.times),  " +
+            "       serial_no  =a.serial_no,  " +
+            "       charge_date=max(a.charge_date),  " +
+            "       confirm_date=max(a.confirm_time)  " +
+            "FROM mz_charge_detail a ,zd_unit_code d  " +
+            "where    a.exec_dept=d.code and  " +
+            "        patient_id=#{patientId} and  " +
+            "        charge_date >= #{startTime} and  " +
+            "        charge_date <= #{endTime} and  " +
+            "        isnull(a.confirm_flag,'') in ('1','3') and  " +
+            "    (a.exec_dept=#{dept} or d.parent_code_hs=#{dept}) and  " +
+            "        a.pay_mark='0' and  " +
+            "        a.group_no='00'  " +
+            "group by serial_no")
+    List<MzChargeDetail> getYiQueRenFeiYong(@Param("patientId") String patientId,
+                                            @Param("startTime") String startTime,
+                                            @Param("endTime") String endTime,
+                                            @Param("dept") String dept);
+
+    @Select("SELECT patient_id=a.patient_id,  " +
+            "       times=a.times,  " +
+            "       receipt_no=a.receipt_no,  " +
+            "       order_no=a.order_no,  " +
+            "       item_no=a.item_no,  " +
+            "       charge_code=a.charge_item_code,  " +
+            "       charge_name=b.name,  " +
+            "       je         =round(quantity * unit_price,2),  " +
+            "       serial_no=a.serial_no,  " +
+            "       confirm_time=a.confirm_time,  " +
+            "       confirm_id=a.confirm_id,  " +
+            "       confirm_id_name = (select rtrim(name) name from a_employee_mi where a_employee_mi.code = confirm_id)," +
+            "       exec_dept=a.exec_dept,  " +
+            "       exec_dept_name = (select rtrim(name) name from zd_unit_code where zd_unit_code.code = a.exec_dept),  " +
+            "       confirm_flag=isnull(a.confirm_flag,'0'),  " +
+            "       req_no      =a.req_no  " +
+            "FROM mz_charge_detail a ,zd_charge_item b  " +
+            "where    a.serial_no       =#{serialNo} and  " +
+            "        a.pay_mark='0'    and  " +
+            "        a.charge_item_code=b.code   and  " +
+            "        isnull(a.req_no,0)=0  " +
+            "  " +
+            "union  " +
+            "  " +
+            "SELECT patient_id=a.patient_id,  " +
+            "       times     =a.times,  " +
+            "       receipt_no=a.receipt_no,  " +
+            "       order_no=a.order_no,  " +
+            "       item_no=a.item_no,  " +
+            "       charge_code=a.order_code,  " +
+            "       charge_name=b.name,  " +
+            "       je          =0.00,  " +
+            "       serial_no   =a.serial_no,  " +
+            "       confirm_time=a.confirm_time,  " +
+            "       confirm_id  =a.confirm_id, " +
+            "       confirm_id_name = (select rtrim(name) name from a_employee_mi where a_employee_mi.code = confirm_id), " +
+            "       exec_dept   =a.exec_dept,  " +
+            "       exec_dept_name = (select rtrim(name) name from zd_unit_code where zd_unit_code.code = a.exec_dept),  " +
+            "       confirm_flag=isnull(a.confirm_flag,'0'),  " +
+            "       req_no      =a.req_no  " +
+            "FROM mz_yj_req a ,jy_zd_item b  " +
+            "where    a.patient_id    =#{patientId} and  " +
+            "        a.times         =#{times} and  " +
+            "        a.pay_mark='0'    and  " +
+            "        a.order_code      =b.code   and  " +
+            "        isnull(a.req_no,0) > 0  " +
+            "union  " +
+            "  " +
+            "SELECT patient_id=a.patient_id,  " +
+            "       times     =a.times,  " +
+            "       receipt_no=a.receipt_no,  " +
+            "       order_no=a.order_no,  " +
+            "       item_no=a.item_no,  " +
+            "       charge_code=a.order_code, " +
+            "       charge_name=b.name,  " +
+            "       je          =0.00,  " +
+            "       serial_no   =a.serial_no,  " +
+            "       confirm_time=a.confirm_time,  " +
+            "       confirm_id  =a.confirm_id,  " +
+            "       confirm_id_name = (select rtrim(name) name from a_employee_mi where a_employee_mi.code = confirm_id)," +
+            "       exec_dept   =a.exec_dept,  " +
+            "       exec_dept_name = (select rtrim(name) name from zd_unit_code where zd_unit_code.code = a.exec_dept),  " +
+            "       confirm_flag=isnull(a.confirm_flag,'0'),  " +
+            "       req_no      =a.req_no  " +
+            "FROM mz_yj_req a ,jc_zd_item b  " +
+            "where    a.patient_id    =#{patientId} and  " +
+            "        a.times         =#{times} and  " +
+            "        a.pay_mark='0'    and  " +
+            "        a.order_code      =b.code   and  " +
+            "        isnull(a.req_no,0) > 0")
+    List<MzChargeDetail> getFeiYongXiangXi(@Param("serialNo") Integer serialNo,
+                                           @Param("patientId") String patientId,
+                                           @Param("times") Integer times);
+
+
+    @Select("SELECT req_no     =a.req_no,   " +
+            "       je         =sum(round(quantity * unit_price,2)),   " +
+            "       charge_date=max(a.charge_date)   " +
+            "FROM mz_charge_detail a ,zd_charge_item b   " +
+            "where    a.serial_no       =#{serialNo} and   " +
+            "        a.pay_mark='0'    and   " +
+            "        a.charge_item_code=b.code  and   " +
+            "        a.req_no > 0   " +
+            "group by a.req_no")
+    List<MzChargeDetail> piPiJingEr(@Param("serialNo") Integer serialNo);
+
+
+    @Select("SELECT patient_id=a.patient_id, " +
+            "       times=a.times, " +
+            "       receipt_no=a.receipt_no, " +
+            "       order_no=a.order_no, " +
+            "       item_no=a.item_no, " +
+            "       charge_code=a.charge_item_code, " +
+            "       charge_name=b.name, " +
+            "       je         =round(quantity * unit_price,2), " +
+            "       serial_no=a.serial_no, " +
+            "       confirm_time=a.confirm_time, " +
+            "       confirm_id=a.confirm_id, " +
+            "       exec_dept=a.exec_dept, " +
+            "       confirm_flag=a.confirm_flag, " +
+            "       req_no      =a.req_no " +
+            "FROM mz_charge_detail a ,zd_charge_item b " +
+            "where    a.patient_id     =#{patientId} and " +
+            "        a.times           =#{times} and " +
+            "        a.req_no=#{reqNo} and " +
+            "        a.pay_mark='0'    and " +
+            "        a.charge_item_code=b.code")
+    List<MzChargeDetail> getMingXi(@Param("patientId") String patientId,
+                                   @Param("times") Integer times,
+                                   @Param("reqNo") Integer reqNo);
+
+
+    @Update("<script>" +
+            "<foreach collection='list' item='item' separator=';'> " +
+            "update ${tableName} " +
+            "<set>" +
+            " confirm_flag = #{item.confirmFlag} , confirm_id =#{confirmId} , confirm_time =getdate() , exec_dept =#{execDept}" +
+            "</set>" +
+            "where " +
+            "patient_id = #{item.patientId} and times =#{item.times} and req_no =#{item.reqNo}" +
+            "</foreach>" +
+            "</script>")
+    void xiangMuQueRenHuoQuXiao(@Param("list") List<MzChargeDetail> list,
+                                @Param("confirmId") String confirmId,
+                                @Param("execDept") String execDept,
+                                @Param("tableName") String tableName);
+
+    @Insert("<script>" +
+            "insert into yj_confirm_record_log ( patient_id , times , serial_no , order_no , item_no , item_name , req_no , confirm_flag , " +
+            "confirm_id , confirm_date , charge_date , name , item_je ) values " +
+            "<foreach collection='list' item='item' separator=','>" +
+            "( #{item.patientId} , #{item.times} , #{item.serialNo} , #{item.orderNo} , #{item.itemNo} , " +
+            "#{item.chargeName} , #{item.reqNo} , #{item.confirmFlag} , #{confirmId} , getdate() , " +
+            " #{chargeDateString} , #{name} , cast(#{item.je,jdbcType=DECIMAL} as decimal(14,5)) )" +
+            "</foreach>" +
+            "</script>")
+    void insertYjConfirmRecordLog(@Param("list") List<MzChargeDetail> list,
+                                  @Param("confirmId") String confirmId,
+                                  @Param("chargeDateString") String chargeDateString,
+                                  @Param("name") String name);
+
+}

+ 469 - 0
src/main/java/thyyxxk/webserver/entity/querydata/MzChargeDetail.java

@@ -0,0 +1,469 @@
+package thyyxxk.webserver.entity.querydata;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class MzChargeDetail implements Serializable {
+
+    private static final long serialVersionUID = 871024878699575104L;
+
+    /**
+     * patientId
+     */
+    private String patientId;
+
+    /**
+     * times
+     */
+    private Integer times;
+
+    /**
+     * receiptNo
+     */
+    private Integer receiptNo;
+
+    /**
+     * orderNo
+     */
+    private Integer orderNo;
+
+    /**
+     * itemNo
+     */
+    private Integer itemNo;
+
+    /**
+     * chargeItemCode
+     */
+    private String chargeItemCode;
+
+    /**
+     * billItemCode
+     */
+    private String billItemCode;
+
+    /**
+     * quantity
+     */
+    private Double quantity;
+
+    /**
+     * unitPrice
+     */
+    private String unitPrice;
+
+    /**
+     * payMark
+     */
+    private String payMark;
+
+    /**
+     * serial
+     */
+    private String serial;
+
+    /**
+     * chargeItemType
+     */
+    private String chargeItemType;
+
+    /**
+     * countryFlag
+     */
+    private String countryFlag;
+
+    /**
+     * drugFlag
+     */
+    private String drugFlag;
+
+    /**
+     * serialNo
+     */
+    private Integer serialNo;
+
+    /**
+     * name
+     */
+    private String name;
+
+    /**
+     * chargeDate
+     */
+    private Date chargeDate;
+
+    /**
+     * confirmTime
+     */
+    private Date confirmTime;
+
+    /**
+     * groupNo
+     */
+    private String groupNo;
+
+    /**
+     * confirmId
+     */
+    private String confirmId;
+
+    /**
+     * drugWin
+     */
+    private Integer drugWin;
+
+    /**
+     * inputId
+     */
+    private String inputId;
+
+    /**
+     * inputDate
+     */
+    private Date inputDate;
+
+    /**
+     * cashierId
+     */
+    private String cashierId;
+
+    /**
+     * windowsNo
+     */
+    private String windowsNo;
+
+    /**
+     * priceId
+     */
+    private String priceId;
+
+    /**
+     * priceTime
+     */
+    private Date priceTime;
+
+    /**
+     * execDept
+     */
+    private String execDept;
+
+    /**
+     * auditCode
+     */
+    private String auditCode;
+
+    /**
+     * gongnksFlag
+     */
+    private String gongnksFlag;
+
+    /**
+     * printFlag
+     */
+    private String printFlag;
+
+    /**
+     * responseType
+     */
+    private String responseType;
+
+    /**
+     * confirmFlag
+     */
+    private Integer confirmFlag;
+
+    /**
+     * warnDept
+     */
+    private String warnDept;
+
+    /**
+     * ledYf
+     */
+    private String ledYf;
+
+    /**
+     * jzFlag
+     */
+    private String jzFlag;
+
+    /**
+     * groupOrder
+     */
+    private Integer groupOrder;
+
+    /**
+     * cashId
+     */
+    private String cashId;
+
+    /**
+     * doctorCode
+     */
+    private String doctorCode;
+
+    /**
+     * supplyCode
+     */
+    private String supplyCode;
+
+    /**
+     * frequency
+     */
+    private String frequency;
+
+    /**
+     * drugQuan
+     */
+    private Double drugQuan;
+
+    /**
+     * drugUnit
+     */
+    private String drugUnit;
+
+    /**
+     * doctorFlag
+     */
+    private String doctorFlag;
+
+    /**
+     * injectRes
+     */
+    private Double injectRes;
+
+    /**
+     * injectTimes
+     */
+    private Integer injectTimes;
+
+    /**
+     * confirmZs
+     */
+    private String confirmZs;
+
+    /**
+     * realNo
+     */
+    private Integer realNo;
+
+    /**
+     * windowsNoYf
+     */
+    private String windowsNoYf;
+
+    /**
+     * ybbxFlag
+     */
+    private String ybbxFlag;
+
+    /**
+     * tcNo
+     */
+    private String tcNo;
+
+    /**
+     * tcName
+     */
+    private String tcName;
+
+    /**
+     * detailFlag
+     */
+    private String detailFlag;
+
+    /**
+     * glPercent
+     */
+    private String glPercent;
+
+    /**
+     * orderType
+     */
+    private String orderType;
+
+    /**
+     * supplyNo
+     */
+    private String supplyNo;
+
+    /**
+     * instructionCode
+     */
+    private String instructionCode;
+
+    /**
+     * instructionText
+     */
+    private String instructionText;
+
+    /**
+     * orderDays
+     */
+    private Integer orderDays;
+
+    /**
+     * paySelf
+     */
+    private String paySelf;
+
+    /**
+     * tryFlag
+     */
+    private String tryFlag;
+
+    /**
+     * reqYj
+     */
+    private String reqYj;
+
+    /**
+     * reqNo
+     */
+    private Integer reqNo;
+
+    /**
+     * groupType
+     */
+    private String groupType;
+
+    /**
+     * orderBill
+     */
+    private Integer orderBill;
+
+    /**
+     * chargeBillCode
+     */
+    private String chargeBillCode;
+
+    /**
+     * selfFlag
+     */
+    private String selfFlag;
+
+    /**
+     * responceType
+     */
+    private String responceType;
+
+    /**
+     * decAmount
+     */
+    private String decAmount;
+
+    /**
+     * backSerial
+     */
+    private Integer backSerial;
+
+    /**
+     * inputTime
+     */
+    private Date inputTime;
+
+    /**
+     * cyMtjs
+     */
+    private Integer cyMtjs;
+
+    /**
+     * cyJsl
+     */
+    private Integer cyJsl;
+
+    /**
+     * cyZql
+     */
+    private Integer cyZql;
+
+    /**
+     * cyFj
+     */
+    private Integer cyFj;
+
+    /**
+     * cyFfcs
+     */
+    private Integer cyFfcs;
+
+    /**
+     * cyFysm
+     */
+    private Integer cyFysm;
+
+    /**
+     * supplyAmount
+     */
+    private Integer supplyAmount;
+
+    /**
+     * cyJssm
+     */
+    private String cyJssm;
+
+    /**
+     * deptNo
+     */
+    private String deptNo;
+
+    /**
+     * glPercentFt
+     */
+    private Double glPercentFt;
+
+    /**
+     * ybZfFlag
+     */
+    private String ybZfFlag;
+
+    /**
+     * origPrice
+     */
+    private String origPrice;
+
+    /**
+     * tryResult
+     */
+    private String tryResult;
+
+    /**
+     * supplyExec
+     */
+    private String supplyExec;
+
+    /**
+     * cyDj
+     */
+    private String cyDj;
+
+    /**
+     * receiveFlag
+     */
+    private String receiveFlag;
+
+    /**
+     * chequType
+     */
+    private String chequType;
+
+    /**
+     * printFlagYj
+     */
+    private String printFlagYj;
+
+    /**
+     * confirmFlagQx
+     */
+    private String confirmFlagQx;
+
+    /**
+     * groupId
+     */
+    private String groupId;
+
+
+}

+ 113 - 0
src/main/java/thyyxxk/webserver/service/zhuyuanyiji/MenZhengXiangMuServer.java

@@ -0,0 +1,113 @@
+package thyyxxk.webserver.service.zhuyuanyiji;
+
+import com.alibaba.fastjson.JSON;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import thyyxxk.webserver.config.exception.ExceptionEnum;
+import thyyxxk.webserver.dao.his.zhuyuanyiji.MenZhengXiangMuDao;
+import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.datamodify.MzChargeDetail;
+import thyyxxk.webserver.utils.ResultVoUtil;
+import thyyxxk.webserver.utils.StringUtil;
+import thyyxxk.webserver.utils.TokenUtil;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+/**
+ * <p>
+ * 描述: 门诊项目确认或取消
+ * </p>
+ *
+ * @author xc
+ * @date 2021-10-09 15:16
+ */
+@Service
+@Slf4j
+public class MenZhengXiangMuServer {
+    private final MenZhengXiangMuDao dao;
+
+    public MenZhengXiangMuServer(MenZhengXiangMuDao dao) {
+        this.dao = dao;
+    }
+
+    public ResultVo<MzChargeDetail> getMzPatient(String patientId, Integer xiangMuZhuangTai, String startTime, String endTime, String dept) {
+        if (StringUtil.isBlank(patientId)) {
+            return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "门诊号不能为空 <( ̄ ﹌  ̄)>  ");
+        }
+        MzChargeDetail mz = dao.getMzPatient(patientId);
+        log.info("查询门诊项目确认 门诊id:{},项目状态:{},开始时间:{},结束时间:{}", patientId, xiangMuZhuangTai, startTime, endTime);
+        if (mz == null) {
+            return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
+        }
+        if (xiangMuZhuangTai.equals(0)) {
+            mz.setList(dao.getFeiYong(patientId, startTime, endTime));
+        } else {
+            mz.setList(dao.getYiQueRenFeiYong(patientId, startTime, endTime, dept));
+        }
+        return ResultVoUtil.success(mz);
+    }
+
+    public ResultVo<List<MzChargeDetail>> getFeiYongXinXi(Integer serialNo, String patientId, Integer times) {
+        if (StringUtil.isBlank(patientId) || serialNo == null || times == null) {
+            return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER);
+        }
+        List<MzChargeDetail> feiYong = dao.getFeiYongXiangXi(serialNo, patientId, times);
+        List<MzChargeDetail> piPei = dao.piPiJingEr(serialNo);
+        Map<Integer, MzChargeDetail> map = piPei.stream().collect(Collectors.toMap(MzChargeDetail::getReqNo, Function.identity()));
+        log.info("csd:{}", JSON.toJSONString(map));
+        feiYong.forEach(item -> {
+            if (map.containsKey(item.getReqNo())) {
+                item.setJe(map.get(item.getReqNo()).getJe());
+            }
+        });
+        if (feiYong.isEmpty()) {
+            return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
+        }
+        return ResultVoUtil.success(feiYong);
+    }
+
+
+    public ResultVo<List<MzChargeDetail>> getMingXi(String patientId, Integer times, Integer reqNo) {
+        return ResultVoUtil.success(dao.getMingXi(patientId, times, reqNo));
+    }
+
+    /**
+     * -- 0 不操作 1 确认 3 取消
+     *
+     * @param mzChargeDetail 需要执行的数据
+     * @return 返回提示
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public ResultVo<String> menZhenXiangMuQueXiaoHuoQueRen(MzChargeDetail mzChargeDetail) {
+        List<MzChargeDetail> mz = new ArrayList<>();
+        if (mzChargeDetail.getXiangMuZhuangTai().equals(0)) {
+            mzChargeDetail.getList().forEach(item -> {
+                if (item.getConfirmFlag() == 1) {
+                    mz.add(item);
+                }
+            });
+        } else {
+            mzChargeDetail.getList().forEach(item -> {
+                if (item.getConfirmFlag() == 3) {
+                    mz.add(item);
+                }
+            });
+        }
+        if (mz.isEmpty()) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请先选择数据");
+        } else {
+            log.info("门诊项目确认或取消 操作人:{},数据:{}", TokenUtil.getTokenUserId(), JSON.toJSONString(mz));
+            dao.xiangMuQueRenHuoQuXiao(mz, TokenUtil.getTokenUserId(), mzChargeDetail.getExecDept(), "mz_charge_detail");
+            dao.xiangMuQueRenHuoQuXiao(mz, TokenUtil.getTokenUserId(), mzChargeDetail.getExecDept(), "mz_yj_req");
+            dao.insertYjConfirmRecordLog(mz, TokenUtil.getTokenUserId(), mzChargeDetail.getChargeDateString(), mzChargeDetail.getName());
+
+        }
+        return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION, "操作成功 L('ω')┘三└('ω')」");
+    }
+
+}