Bladeren bron

Merge branch 'master' of https://172.16.32.165/lighter/web-server

lighter 1 jaar geleden
bovenliggende
commit
cee5211fc2

+ 35 - 1
src/main/java/thyyxxk/webserver/dao/his/dashboard/DashboardDao.java

@@ -10,6 +10,40 @@ import java.util.List;
 @Mapper
 public interface DashboardDao {
 
+    @Select("select                 rtrim(bed_no)       as bedNo,\n" +
+            "                       rtrim(name)         as name,\n" +
+            "                       sex                 as gender,\n" +
+            "                       rtrim(inpatient_no) as patNo,\n" +
+            "    birthDate=(select t.birth_date from a_patient_mi t where t.inpatient_no = a.inpatient_no),\n" +
+            "                       admiss_date,\n" +
+            "    convertAdmissDate=admiss_date,\n" +
+            "    physician=(select rtrim(t.name) from a_employee_mi t where t.code = a.refer_physician),\n" +
+            "                       a.med_type,\n" +
+            "    surgery=(select top 1 rtrim(op_scale) + N'级'\n" +
+            "             from op_record t\n" +
+            "             where t.inpatient_no = a.inpatient_no\n" +
+            "               and t.admiss_times = a.admiss_times\n" +
+            "               and t.status != 'd'\n" +
+            "               and datediff(day, getdate(), t.op_datetime) = 0),\n" +
+            "    nursingLevel=(select top 1 rtrim(order_name)\n" +
+            "                  from yz_act_order t\n" +
+            "                  where t.order_code in ('05298','05299','05300','05301','08879','08880','08881','08882')\n" +
+            "                    and t.group_no = '00'\n" +
+            "                    and t.status_flag in ('3', '4')\n" +
+            "                    and t.inpatient_no = a.inpatient_no\n" +
+            "                  order by t.start_time desc),\n" +
+            "    sickLevelOrderName=(select top 1 rtrim(order_name)\n" +
+            "                        from yz_act_order t\n" +
+            "                        where t.order_code in ('05887', '05888')\n" +
+            "                          and t.group_no = '00'\n" +
+            "                          and t.status_flag in ('3', '4')\n" +
+            "                          and t.inpatient_no = a.inpatient_no\n" +
+            "                        order by t.start_time desc)\n" +
+            "from zy_actpatient a where (zk_ward=#{dept} or zk_ward in " +
+            "(select small_dept from zd_dept_all t where t.dept=#{dept})) " +
+            "order by cast(bed_no as int)")
+    List<InpatientBrief> selectInpatientBrief(@Param("dept") String dept);
+
     @Select("select                 rtrim(bed_no)       as bedNo,\n" +
             "                       rtrim(name)         as name,\n" +
             "                       sex                 as gender,\n" +
@@ -42,7 +76,7 @@ public interface DashboardDao {
             "from zy_actpatient a\n" +
             "where (ward = #{dept}  or dept= #{dept}  )\n" +
             "order by cast(bed_no as int)")
-    List<InpatientBrief> selectInpatientBrief(@Param("dept") String dept);
+    List<InpatientBrief> selectInpatientBriefV2(@Param("dept") String dept);
 
 
     @Select("select count(*)\n" +

+ 9 - 4
src/main/java/thyyxxk/webserver/dao/his/inpatient/casefrontsheet/JieShouHuiZhenDao.java

@@ -2,11 +2,9 @@ package thyyxxk.webserver.dao.his.inpatient.casefrontsheet;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
-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 org.apache.ibatis.annotations.*;
 import thyyxxk.webserver.entity.casefrontsheet.JieShouHuiZhenPojo;
+import thyyxxk.webserver.entity.datamodify.YzActOrder;
 
 import java.math.BigDecimal;
 import java.util.List;
@@ -95,4 +93,11 @@ public interface JieShouHuiZhenDao {
 
     @Select("select name from zd_unit_code with(nolock) where code = #{deptCode}")
     String getDeptName(String deptCode);
+
+//    @Insert("insert into zy_detail_charge (inpatient_no, admiss_times, ledger_sn, detail_sn, charge_code, op_id_code, charge_code,\n" +
+//            "                              infant_flag, charge_status, charge_amount, charge_fee, ward_code, dept_code, order_no,\n" +
+//            "                              ope_flag, exec_unit, gen_time, charge_code_mx, serial, doctor_code, trans_flag_yb,\n" +
+//            "                              refer_physician)\n" +
+//            "values (#{yz.inpatientNo},#{yz.admissTimes} , #{} ),")
+//    void insertFees(YzActOrder yz);
 }

+ 6 - 1
src/main/java/thyyxxk/webserver/entity/datamodify/YzActOrder.java

@@ -3,6 +3,9 @@ package thyyxxk.webserver.entity.datamodify;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonInclude;
 import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+import lombok.Builder;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
@@ -22,9 +25,11 @@ import java.util.List;
  * @since 2021-03-08
  */
 @Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
 @EqualsAndHashCode(callSuper = false)
 @ApiModel(value = "YzActOrder对象")
-@Accessors(chain = true)
 @JsonInclude(JsonInclude.Include.NON_NULL)
 public class YzActOrder implements Serializable {
 

+ 12 - 7
src/main/java/thyyxxk/webserver/service/dashboard/DashboardService.java

@@ -32,6 +32,17 @@ public class DashboardService {
 
     public ResultVo<List<InpatientBrief>> selectInpatientBriefs(String deptCode) {
         List<InpatientBrief> list = dao.selectInpatientBrief(deptCode);
+        transformed(list);
+        return ResultVoUtil.success(list);
+    }
+
+    public List<InpatientBrief> selectInpatientBriefsV22(String deptCode) {
+        List<InpatientBrief> list = dao.selectInpatientBriefV2(deptCode);
+        transformed(list);
+        return list;
+    }
+
+    private void transformed(List<InpatientBrief> list) {
         list.forEach(itm -> {
             itm.setIndays(DateUtil.daysBetween(new Date(), itm.getAdmissDate()));
             itm.setMedTypeName(MedType.getName(itm.getMedType()));
@@ -45,19 +56,13 @@ public class DashboardService {
                 }
             }
         });
-        return ResultVoUtil.success(list);
-    }
-
-    public static class HuLi {
-
     }
 
     public ResultVo<JSONObject> selectInpatientBriefsV2(String deptCode) {
         JSONObject jsonObject = new JSONObject();
-        jsonObject.put("data", selectInpatientBriefs(deptCode).getData());
+        jsonObject.put("data", selectInpatientBriefsV22(deptCode));
         jsonObject.put("bedCount", dao.bedCount(deptCode));
 
-
         List<String[]> list = new ArrayList<>();
 
         list.add(new String[]{"病危", dao.criticallyIllCount(deptCode).toString()});

+ 2 - 0
src/main/java/thyyxxk/webserver/service/inpatient/casefrontsheet/JieShouHuiZhenService.java

@@ -124,6 +124,8 @@ public class JieShouHuiZhenService {
     }
 
 
+//    public void insert
+
     /**
      * @param code 医嘱编码
      * @return 返回会诊级别