瀏覽代碼

急门诊费用转入查询,可以通过项目名称来查询。

xiaochan 4 年之前
父節點
當前提交
6a08e9e671

+ 7 - 0
src/main/java/thyyxxk/webserver/controller/yibao/TransferInOfExpensesController.java

@@ -2,6 +2,7 @@ package thyyxxk.webserver.controller.yibao;
 
 import org.springframework.web.bind.annotation.*;
 import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.datamodify.MzChargeDetail;
 import thyyxxk.webserver.entity.datamodify.ZyDetailCharge;
 import thyyxxk.webserver.entity.yibao.ZyActpatient;
@@ -55,4 +56,10 @@ public class TransferInOfExpensesController {
     public ResultVo<String> baoCunHuanZheZhuYuanFeiYong(@RequestBody ZyActpatient param) {
         return service.baoCunHuanZheZhuYuanFeiYong(param);
     }
+
+    @GetMapping("/queryEntryName")
+    public ResultVo<List<GetDropdownBox>> queryEntryName(String pyCode) {
+        return service.queryEntryName(pyCode);
+    }
+
 }

+ 24 - 2
src/main/java/thyyxxk/webserver/dao/his/yibao/TransferInOfExpensesDao.java

@@ -2,6 +2,7 @@ package thyyxxk.webserver.dao.his.yibao;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.apache.ibatis.annotations.*;
+import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.datamodify.MzChargeDetail;
 import thyyxxk.webserver.entity.datamodify.ZyDetailCharge;
 import thyyxxk.webserver.entity.yibao.ZyActpatient;
@@ -79,12 +80,13 @@ public interface TransferInOfExpensesDao {
             "from zy_detail_charge a,yp_zd_dict b where (code=charge_code) and  order_no=6 and inpatient_no = #{inpatientNo} " +
             "<if test=\"chargeCodeMX!=null and chargeCodeMX!=''\"> " +
             "and charge_code_mx = #{chargeCodeMX} " +
-            "</if> " +
+            "</if>" +
             ") temp" +
             "</script> ")
     List<ZyDetailCharge> getZyJiMenZhenZhuangRuFeiYong(IPage<ZyDetailCharge> page,
                                                        @Param("inpatientNo") String inpatientNo,
-                                                       @Param("chargeCodeMX") String chargeCodeMX);
+                                                       @Param("chargeCodeMX") String chargeCodeMX
+    );
 
     /**
      * 删除病人通过急门诊转入的费用 数据
@@ -94,6 +96,13 @@ public interface TransferInOfExpensesDao {
     @Delete("delete zy_detail_charge where inpatient_no=#{inpatientNo} and  admiss_times =#{admissTimes} and ledger_sn=#{ledgerSn} and detail_sn=#{detailSn}")
     void shanChuFeiYong(ZyDetailCharge param);
 
+    /**
+     * 插入数据 急门诊数据转入住院费用
+     * 这上面的数据都是在前面查询找到的
+     *
+     * @param info   住院患者的信息
+     * @param zyFees 费用 list
+     */
     @Insert("<script>" +
             "insert into zy_detail_charge (inpatient_no,admiss_times,ledger_sn,detail_sn,charge_date,op_id_code, " +
             "charge_code,infant_flag,charge_status,charge_amount,charge_fee,ward_code,dept_code,order_no,ope_flag, " +
@@ -111,4 +120,17 @@ public interface TransferInOfExpensesDao {
     Integer getMaxDetailSn(@Param("inpatientNo") String inpatientNo,
                            @Param("admissTimes") Integer admissTimes);
 
+    /**
+     * 远程搜索 项目名称
+     *
+     * @param pyCode 拼音码 大写的
+     * @return 返回多个项目的名称
+     */
+    @Select("select * from (" +
+            "select code,rtrim(name)name from zd_charge_item where py_code like #{pyCode} " +
+            "union " +
+            "select code,rtrim(name)name from yp_zd_dict where py_code like #{pyCode}" +
+            ") temp")
+    List<GetDropdownBox> queryEntryName(IPage<GetDropdownBox> page, @Param("pyCode") String pyCode);
+
 }

+ 15 - 4
src/main/java/thyyxxk/webserver/service/yibao/TransferInOfExpensesService.java

@@ -10,10 +10,10 @@ import thyyxxk.webserver.constants.Capacity;
 import thyyxxk.webserver.constants.GetDateFormat;
 import thyyxxk.webserver.dao.his.yibao.TransferInOfExpensesDao;
 import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.datamodify.MzChargeDetail;
 import thyyxxk.webserver.entity.datamodify.ZyDetailCharge;
 import thyyxxk.webserver.entity.yibao.ZyActpatient;
-import thyyxxk.webserver.service.makedbzfees.MakeDbzFeesService;
 import thyyxxk.webserver.utils.ResultVoUtil;
 import thyyxxk.webserver.utils.TokenUtil;
 
@@ -34,11 +34,9 @@ import java.util.Map;
 public class TransferInOfExpensesService {
 
     private final TransferInOfExpensesDao dao;
-    private final MakeDbzFeesService makeDbzFeesService;
 
-    public TransferInOfExpensesService(TransferInOfExpensesDao dao, MakeDbzFeesService makeDbzFeesService) {
+    public TransferInOfExpensesService(TransferInOfExpensesDao dao) {
         this.dao = dao;
-        this.makeDbzFeesService = makeDbzFeesService;
     }
 
     /**
@@ -89,6 +87,8 @@ public class TransferInOfExpensesService {
     public ResultVo<Map<String, Object>> getZyJiMenZhenZhuangRuFeiYong(String inpatientNo, String chargeCodeMX, long currentPage, long pageSize) {
         log.info("查看患者是通过门急诊转入的费用项目 --> 住院号:{},收费编码:{},当前页:{},页数:{}", inpatientNo, chargeCodeMX, currentPage, pageSize);
         IPage<ZyDetailCharge> page = new Page<>(currentPage, pageSize);
+
+
         List<ZyDetailCharge> list = dao.getZyJiMenZhenZhuangRuFeiYong(page, inpatientNo, chargeCodeMX);
         Map<String, Object> map = new HashMap<>(Capacity.TWO);
         if (page.getTotal() > 0 || list.size() > 0) {
@@ -133,4 +133,15 @@ public class TransferInOfExpensesService {
         log.info("急门诊费用插入数据:{}", JSON.toJSONStringWithDateFormat(param, GetDateFormat.DATE_TIME));
         return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION, "添加成功");
     }
+
+    /**
+     * 远程搜索 项目名称
+     *
+     * @param pyCode 拼音码 大写的
+     * @return 返回多个项目的名称
+     */
+    public ResultVo<List<GetDropdownBox>> queryEntryName(String pyCode) {
+        IPage<GetDropdownBox> page = new Page<>(1, 20);
+        return ResultVoUtil.success(dao.queryEntryName(page, pyCode.toUpperCase() + "%"));
+    }
 }