Jelajahi Sumber

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

lighter 3 bulan lalu
induk
melakukan
3f9cc471df

+ 5 - 5
src/main/java/thyyxxk/webserver/dao/his/executeItem/ExecuteItemDao.java

@@ -39,7 +39,7 @@ public interface ExecuteItemDao {
             "                                              isnull(yz_act_occ.dose, ''))) + rtrim( " +
             "                                      ltrim( " +
             "                                              isnull(yp_zd_unit.name, ''))), " +
-            "                yz_act_occ.order_name, " +
+            "                yz_act_occ.order_name,b.self_buy, " +
             "                yz_act_occ.frequ_code, " +
             "                yz_act_occ.print_flag, " +
             "                yz_act_occ.dept_code, " +
@@ -106,7 +106,7 @@ public interface ExecuteItemDao {
             "                                            isnull(yz_act_occ.dose, ''))) + rtrim( " +
             "                                    ltrim( " +
             "                                            isnull(yz_act_occ.dose_unit, ''))), " +
-            "                yz_act_occ.order_name, " +
+            "                yz_act_occ.order_name,b.self_buy, " +
             "                yz_act_occ.frequ_code, " +
             "                yz_act_occ.print_flag, " +
             "                yz_act_occ.dept_code, " +
@@ -174,7 +174,7 @@ public interface ExecuteItemDao {
             " yz_act_occ.print_flag, " +
             " yz_act_occ.dept_code, " +
             " yz_act_occ.ward_code, " +
-            " mini_unit   = (select name from yp_zd_unit a where a.code =b.mini_unit), " +
+            " mini_unit   = (select name from yp_zd_unit a where a.code =b.mini_unit),b.self_buy, " +
             " zb = ''  " +
             " FROM " +
             " yz_act_occ, " +
@@ -241,7 +241,7 @@ public interface ExecuteItemDao {
             "                                when yz_act_occ.parent_no is not null" +
             "                                    then ' --' + yz_act_occ.order_name + '(' + yz_act_occ.specification + ')'" +
             "                                else yz_act_occ.order_name + '(' + yz_act_occ.specification + ')' end," +
-            "                yz_act_occ.frequ_code," +
+            "                yz_act_occ.frequ_code,b.self_buy," +
             "                yz_act_occ.print_flag," +
             "                yz_act_occ.dept_code," +
             "                yz_act_occ.ward_code," +
@@ -308,7 +308,7 @@ public interface ExecuteItemDao {
             "                                when yz_act_occ.parent_no is not null" +
             "                                    then ' --' + yz_act_occ.order_name + '(' + yz_act_occ.specification + ')'" +
             "                                else yz_act_occ.order_name + '(' + yz_act_occ.specification + ')' end," +
-            "                yz_act_occ.frequ_code," +
+            "                yz_act_occ.frequ_code,b.self_buy," +
             "                yz_act_occ.print_flag," +
             "                yz_act_occ.dept_code," +
             "                yz_act_occ.ward_code," +

+ 2 - 0
src/main/java/thyyxxk/webserver/dao/his/executeItem/YzYpZyOrderDao.java

@@ -61,5 +61,7 @@ public interface YzYpZyOrderDao extends BaseMapper<YzYpZyOrder> {
           "</foreach>" +
           "</script>")
   int batchInsertData(List<YzYpZyOrder> list);
+
+
 }
 

+ 2 - 0
src/main/java/thyyxxk/webserver/entity/executeItem/ExecuteItemData.java

@@ -51,5 +51,7 @@ public class ExecuteItemData {
     private String zb;
     //只显示床号 住院号 姓名
     private Integer showFlag = 1;
+    // 医嘱标志
+    private String selfBuy;
 
 }

+ 3 - 9
src/main/java/thyyxxk/webserver/service/executeItem/GenerateYzService.java

@@ -27,10 +27,7 @@ import thyyxxk.webserver.entity.medicaladvice.medicamanage.drugmanage.PageClassE
 import thyyxxk.webserver.entity.medicine.YpZdDictVo;
 import thyyxxk.webserver.entity.medicine.YpZdGroupName;
 import thyyxxk.webserver.service.medicaladvice.common.MedicalCommonService;
-import thyyxxk.webserver.utils.AssertUtil;
-import thyyxxk.webserver.utils.CommonUtil;
-import thyyxxk.webserver.utils.ResultVoUtil;
-import thyyxxk.webserver.utils.TokenUtil;
+import thyyxxk.webserver.utils.*;
 
 import javax.annotation.Resource;
 import java.lang.reflect.Field;
@@ -194,10 +191,7 @@ public class GenerateYzService {
         }
         if(CollUtil.isNotEmpty(param.getYzYpZyOrders())){
             log.info("最终生成的药品医嘱:{}",param.getYzYpZyOrders());
-            List<List<YzYpZyOrder>> tempYpZyOrder = CollUtil.split(param.getYzYpZyOrders(), 50);
-            for(List<YzYpZyOrder> temp : tempYpZyOrder){
-                yzYpZyOrderDao.batchInsertData(temp);
-            }
+            yzYpZyOrderDao.insert(param.getYzYpZyOrders());
         }
         //修改状态
         if(CollUtil.isNotEmpty(param.getUpdateStatusYzActOrders())) {
@@ -831,7 +825,7 @@ public class GenerateYzService {
                 .infantFlag(zyActpatient.getInpatientNo().contains("$") ? "1" : "0")
                 .name(zyActpatient.getName())
                 //默认给1
-                .statusFlag("1")
+                .statusFlag(PageClassEnum.JSY.getCode().equals(yzActOrder.getSelfBuy()) ? "3" : "1")
                 .wardCode(zyActpatient.getWardCode())
                 .retprice(ypZdDictVo.getPackRetprice())
                 .serial(ypZdDictVo.getSerial())