Prechádzať zdrojové kódy

移动护理部分功能

lighter 1 mesiac pred
rodič
commit
a6d9c7107e
18 zmenil súbory, kde vykonal 332 pridanie a 30 odobranie
  1. 11 0
      src/main/java/thyyxxk/webserver/controller/inpatient/DismissController.java
  2. 11 0
      src/main/java/thyyxxk/webserver/controller/inpatient/nursemodule/PrintInfusionCardController.java
  3. 5 0
      src/main/java/thyyxxk/webserver/controller/zhuyuanyizheng/YizhuLuRuController.java
  4. 5 0
      src/main/java/thyyxxk/webserver/dao/his/executeItem/YzZyPatientFeeDao.java
  5. 109 0
      src/main/java/thyyxxk/webserver/dao/his/inpatient/nursemodule/PrintInfusionCardDao.java
  6. 2 0
      src/main/java/thyyxxk/webserver/dao/his/zygl/ZyActpatientDao.java
  7. 2 0
      src/main/java/thyyxxk/webserver/entity/executeItem/YzActOcc.java
  8. 4 0
      src/main/java/thyyxxk/webserver/entity/inpatient/nursemodule/request/InfusionInsert.java
  9. 3 0
      src/main/java/thyyxxk/webserver/entity/zhuyuanyisheng/yizhuluru/XinZhenYzActOrder.java
  10. 13 1
      src/main/java/thyyxxk/webserver/entity/zhuyuanyisheng/yizhuluru/YiZhuFeiYongChaXunTiaoJian.java
  11. 0 4
      src/main/java/thyyxxk/webserver/service/crbmanagement/CrbExService.java
  12. 8 13
      src/main/java/thyyxxk/webserver/service/executeItem/GenerateYzService.java
  13. 41 6
      src/main/java/thyyxxk/webserver/service/inpatient/DismissService.java
  14. 87 5
      src/main/java/thyyxxk/webserver/service/inpatient/nursemodule/PrintInfusionCardService.java
  15. 23 0
      src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/YiZhuLuRuServer.java
  16. 4 0
      src/main/java/thyyxxk/webserver/utils/StringUtil.java
  17. 1 1
      src/main/resources/application.yml
  18. 3 0
      update/2025-10-21.md

+ 11 - 0
src/main/java/thyyxxk/webserver/controller/inpatient/DismissController.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
 import lombok.extern.slf4j.Slf4j;
 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.entity.inpatient.dismiss.*;
 import thyyxxk.webserver.entity.inpatient.patient.Patient;
@@ -11,6 +12,7 @@ import thyyxxk.webserver.service.inpatient.DismissService;
 import thyyxxk.webserver.utils.ResultVoUtil;
 import thyyxxk.webserver.utils.TokenUtil;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -56,4 +58,13 @@ public class DismissController {
         return ResultVoUtil.success(service.executeDischarging(param));
     }
 
+    @PostMapping("/dismissFeeAnalyse")
+    public ResultVo<ReceiptEntity> dismissFeeAnalyse(@RequestBody Patient patient) {
+        ReceiptEntity entity = service.dismissFeeAnalyse(patient);
+        if (null != entity) {
+            return ResultVoUtil.success(entity);
+        }
+        return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
+    }
+
 }

+ 11 - 0
src/main/java/thyyxxk/webserver/controller/inpatient/nursemodule/PrintInfusionCardController.java

@@ -3,6 +3,7 @@ package thyyxxk.webserver.controller.inpatient.nursemodule;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.inpatient.nursemodule.request.InfusionInsert;
 import thyyxxk.webserver.entity.inpatient.nursemodule.request.UpdatePrintStatus;
 import thyyxxk.webserver.entity.inpatient.nursemodule.response.PatientBed;
 import thyyxxk.webserver.entity.inpatient.nursemodule.request.QueryInfusionCard;
@@ -36,4 +37,14 @@ public class PrintInfusionCardController {
     public ResultVo<String> updatePrintStatus(@RequestBody UpdatePrintStatus request) {
         return ResultVoUtil.success(service.updatePrintStatus(request));
     }
+
+    @PostMapping("/queryTodayInfusion")
+    public ResultVo<List<PatientInfusionInfo>> queryTodayInfusion(@RequestBody InfusionInsert params) {
+        return service.queryTodayInfusion(params);
+    }
+
+    @GetMapping("/checkInfusionByScan")
+    public ResultVo<String> checkInfusionByScan(@RequestParam("scanContent") String scanContent) {
+        return service.checkInfusionByScan(scanContent);
+    }
 }

+ 5 - 0
src/main/java/thyyxxk/webserver/controller/zhuyuanyizheng/YizhuLuRuController.java

@@ -14,6 +14,7 @@ import thyyxxk.webserver.entity.datamodify.SelectV2;
 import thyyxxk.webserver.entity.datamodify.YzActOrder;
 import thyyxxk.webserver.entity.datamodify.ZyDetailCharge;
 import thyyxxk.webserver.entity.dictionary.CodeName;
+import thyyxxk.webserver.entity.executeItem.YzZyPatientFee;
 import thyyxxk.webserver.entity.inpatient.patient.Overview;
 import thyyxxk.webserver.entity.inpatient.patient.Patient;
 import thyyxxk.webserver.entity.login.UserInfo;
@@ -307,4 +308,8 @@ public class YizhuLuRuController {
         return R.ok(ExceptionEnum.SUCCESS_AND_EL_MESSAGE);
     }
 
+    @PostMapping("/executeZlYz")
+    public ResultVo<String> executeZlYz(@RequestBody YzZyPatientFee patientFee) {
+        return server.executeZlYz(patientFee);
+    }
 }

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

@@ -83,5 +83,10 @@ public interface YzZyPatientFeeDao extends BaseMapper<YzZyPatientFee> {
             "</script>")
     int batchInsertData(List<YzZyPatientFee> list);
 
+    @Update("update yz_zy_patient_fee set op_id=#{opId},op_date=#{opDate} " +
+            "where inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} " +
+            "and act_order_no=#{actOrderNoStr} and occ_time=#{occTime}")
+    int updateExecuteInfo(YzZyPatientFee yzZyPatientFee);
+
 }
 

+ 109 - 0
src/main/java/thyyxxk/webserver/dao/his/inpatient/nursemodule/PrintInfusionCardDao.java

@@ -1,12 +1,14 @@
 package thyyxxk.webserver.dao.his.inpatient.nursemodule;
 
 import org.apache.ibatis.annotations.*;
+import thyyxxk.webserver.entity.executeItem.YzActOcc;
 import thyyxxk.webserver.entity.inpatient.nursemodule.request.InfusionInsert;
 import thyyxxk.webserver.entity.inpatient.nursemodule.response.OccCount;
 import thyyxxk.webserver.entity.inpatient.nursemodule.response.PatientBed;
 import thyyxxk.webserver.entity.inpatient.nursemodule.response.PatientBriefInfo;
 import thyyxxk.webserver.entity.inpatient.nursemodule.response.YzActOccInfusionNew;
 
+import java.util.Date;
 import java.util.List;
 
 @Mapper
@@ -29,6 +31,9 @@ public interface PrintInfusionCardDao {
     @Delete("delete from yz_act_occ_infusion_new where ward_code=#{wardCode}")
     void deleteOldInfusion(String wardCode);
 
+    @Delete("delete from yz_act_occ_infusion_new where inpatient_no=#{patNo} and admiss_times=#{times}")
+    void deleteOldInfusionByPatient(String patNo, Integer times);
+
     @Insert("insert into yz_act_occ_infusion_new(inpatient_no,admiss_times,ward_code,act_order_no,charge_code," +
             "drug_flag,specification,drug_occ,frequ_code,supply_name,start_time,end_time,drug_name,instruction," +
             "parent_no,yz_dose,yz_dose_unit,entrust) " +
@@ -147,4 +152,108 @@ public interface PrintInfusionCardDao {
 
     @Update("update yz_act_occ set print_comment=#{status} where act_order_no in (${orderNos})")
     void updateYzActOccPrintStatus(String status, String orderNos);
+
+    @Insert("insert into yz_act_occ_infusion_new(inpatient_no,admiss_times,ward_code,act_order_no, " +
+            "charge_code,drug_flag,specification,drug_occ,frequ_code,supply_name,start_time, " +
+            "end_time,drug_name,instruction,yz_dose,yz_dose_unit) " +
+            "select distinct rtrim(a.inpatient_no),a.admiss_times,b.ward_code, " +
+            "cast(cast(a.act_order_no as decimal) as varchar),rtrim(a.order_code),'i', " +
+            "rtrim(convert(varchar,a.dose))+isnull(f.name,''),a.drug_occ,rtrim(c.print_name), " +
+            "rtrim(a.supply_code),a.start_time,a.end_time, " +
+            "rtrim(a.order_name)+'('+rtrim(a.drug_specification)+')',rtrim(a.instruction),rtrim(a.dose), " +
+            "rtrim(a.dose_unit) from yz_act_order a left join yp_zd_unit f on a.dose_unit=f.code, " +
+            "yz_act_occ b,yz_order_frequency c,yz_supply_type e " +
+            "where b.inpatient_no=#{patNo} and b.admiss_times=#{times} " +
+            "and b.occ_time>=#{startTime} and b.occ_time<=#{endTime} " +
+            "and b.execute_time is null " +
+            "and isnull(b.status_flag,'')!='d' " +
+            "and a.status_flag > '1' and a.supply_code=e.supply_code " +
+            "and e.print_name!='iv' and e.class='2' " +
+            "and e.pring_flag='1' and isnull(a.parent_no,0)=0 " +
+            "and a.frequ_code=c.code and a.act_order_no=b.act_order_no ")
+    void insertInfusionByPatNo(InfusionInsert insert);
+
+    @Insert("insert into yz_act_occ_infusion_new(inpatient_no,admiss_times,ward_code,act_order_no, " +
+            "charge_code,drug_flag,specification,drug_occ,frequ_code,supply_name,start_time, " +
+            "end_time,drug_name,instruction,yz_dose,yz_dose_unit) " +
+            "select distinct rtrim(a.inpatient_no),a.admiss_times,b.ward_code, " +
+            "cast(cast(a.act_order_no as decimal) as varchar),rtrim(a.order_code),'i', " +
+            "rtrim(convert(varchar,a.dose))+isnull(f.name,''),a.drug_occ,rtrim(c.print_name), " +
+            "rtrim(a.supply_code),a.start_time,a.end_time, " +
+            "rtrim(a.order_name)+'('+rtrim(a.drug_specification)+')',rtrim(a.instruction),rtrim(a.dose), " +
+            "rtrim(a.dose_unit) from yz_act_order a left join yp_zd_unit f on a.dose_unit=f.code, " +
+            "yz_act_occ b,yz_order_frequency c,yz_supply_type e " +
+            "where b.inpatient_no=#{patNo} and b.admiss_times=#{times} " +
+            "and b.occ_time>=#{startTime} and b.occ_time<=#{endTime} " +
+            "and b.execute_time is not null and b.execute_staff is not null " +
+            "and isnull(b.status_flag,'')!='d' " +
+            "and a.status_flag > '1' and a.supply_code=e.supply_code " +
+            "and e.print_name!='iv' and e.class='2' " +
+            "and e.pring_flag='1' and isnull(a.parent_no,0)=0 " +
+            "and a.frequ_code=c.code and a.act_order_no=b.act_order_no ")
+    void insertInfusionByPatNo2(InfusionInsert insert);
+
+    @Select("SELECT distinct a.inpatient_no,a.drug_occ,b.occ_time as start_time,a.drug_name,a.frequ_code, " +
+            "a.act_order_no,a.instruction,a.specification,rtrim(b.charge_code) as chargeCode " +
+            "FROM yz_act_occ_infusion_new a,yz_act_occ b " +
+            "WHERE isnull(a.visible_flag,'0')!='1' " +
+            "and a.inpatient_no=#{patNo} and a.admiss_times=#{times} " +
+            "and b.execute_time is null " +
+            "and isnull(a.instruction,'') not like N'冲管%' " +
+            "and b.act_order_no=a.act_order_no and b.occ_time>=#{startTime} AND b.occ_time<=#{endTime} " +
+            "AND isnull(b.status_flag,'')!='d' order by a.inpatient_no,a.act_order_no")
+    List<YzActOccInfusionNew> selectMainDrugsByPatNo(InfusionInsert insert);
+
+    @Select("SELECT distinct a.inpatient_no,a.drug_occ,b.occ_time as start_time,a.drug_name,a.frequ_code, " +
+            "a.act_order_no,a.instruction,a.specification,rtrim(b.charge_code) as chargeCode " +
+            "FROM yz_act_occ_infusion_new a,yz_act_occ b " +
+            "WHERE isnull(a.visible_flag,'0')!='1' " +
+            "and a.inpatient_no=#{patNo} and a.admiss_times=#{times} " +
+            "and b.execute_time is not null and b.execute_staff is not null " +
+            "and isnull(a.instruction,'') not like N'冲管%' " +
+            "and b.act_order_no=a.act_order_no and b.occ_time>=#{startTime} AND b.occ_time<=#{endTime} " +
+            "AND isnull(b.status_flag,'')!='d' order by a.inpatient_no,a.act_order_no")
+    List<YzActOccInfusionNew> selectMainDrugsByPatNo2(InfusionInsert insert);
+
+    @Select("SELECT DISTINCT rtrim(c.print_name) as frequCode,rtrim(a.order_name) as orderName, " +
+            "specification=cast(a.dose as varchar)+isnull(e.name,''),a.drug_occ,rtrim(d.charge_code) as chargeCode, " +
+            "parentNo=cast(cast(a.parent_no as decimal) as varchar),d.occ_time as start_time, " +
+            "actOrderNo=cast(cast(a.act_order_no as decimal) as varchar),a.act_order_no as ordeNo " +
+            "FROM yz_act_order a left join yp_zd_unit e on a.dose_unit=e.code, " +
+            "yz_supply_type b,yz_order_frequency c,yz_act_occ d " +
+            "WHERE a.supply_code=b.supply_code and a.frequ_code=c.code " +
+            "and a.act_order_no=d.act_order_no and a.parent_no is not null AND a.status_flag>'1' " +
+            "and d.execute_time is null " +
+            "AND a.status_flag<='5' AND d.occ_time>=#{startTime} AND d.occ_time<=#{endTime} " +
+            "AND isnull(d.status_flag,'')!='d' AND d.inpatient_no=#{patNo} and d.admiss_times=#{times} " +
+            "order by a.act_order_no")
+    List<YzActOccInfusionNew> selectSideDrugsByPatNo(InfusionInsert insert);
+
+    @Select("SELECT DISTINCT rtrim(c.print_name) as frequCode,rtrim(a.order_name) as orderName, " +
+            "specification=cast(a.dose as varchar)+isnull(e.name,''),a.drug_occ,rtrim(d.charge_code) as chargeCode, " +
+            "parentNo=cast(cast(a.parent_no as decimal) as varchar),d.occ_time as start_time, " +
+            "actOrderNo=cast(cast(a.act_order_no as decimal) as varchar),a.act_order_no as ordeNo " +
+            "FROM yz_act_order a left join yp_zd_unit e on a.dose_unit=e.code, " +
+            "yz_supply_type b,yz_order_frequency c,yz_act_occ d " +
+            "WHERE a.supply_code=b.supply_code and a.frequ_code=c.code " +
+            "and a.act_order_no=d.act_order_no and a.parent_no is not null AND a.status_flag>'1' " +
+            "and d.execute_time is not null and d.execute_staff is not null " +
+            "AND a.status_flag<='5' AND d.occ_time>=#{startTime} AND d.occ_time<=#{endTime} " +
+            "AND isnull(d.status_flag,'')!='d' AND d.inpatient_no=#{patNo} and d.admiss_times=#{times} " +
+            "order by a.act_order_no")
+    List<YzActOccInfusionNew> selectSideDrugsByPatNo2(InfusionInsert insert);
+
+    @Select("select rtrim(charge_code) as chargeCode,drug_quan,execute_staff,execute_time " +
+            "from yz_act_occ where inpatient_no=#{patNo} and act_order_no=#{actOrderNo} " +
+            "and occ_time=#{occTime} " +
+            "union all " +
+            "select rtrim(charge_code) as chargeCode,drug_quan,execute_staff,execute_time " +
+            "from yz_act_occ where inpatient_no=#{patNo} and parent_no=#{actOrderNo} " +
+            "and occ_time=#{occTime} and act_order_no>0")
+    List<YzActOcc> getInfusionDrugsByScan(String patNo, String actOrderNo, Date occTime);
+
+    @Update("update yz_act_occ set execute_staff=#{staff},execute_time=getdate() " +
+            "where inpatient_no=#{patNo} and occ_time=#{occTime} and " +
+            "(act_order_no=#{actOrderNo} or parent_no=#{actOrderNo})")
+    int updateExecutor(String patNo, String actOrderNo, Date occTime, String staff);
 }

+ 2 - 0
src/main/java/thyyxxk/webserver/dao/his/zygl/ZyActpatientDao.java

@@ -73,6 +73,8 @@ public interface ZyActpatientDao {
             ") ")
     int insertZyActpatient(ZyActpatient zyActpatient);
 
+    @Select("select * from zy_actpatient where inpatient_no=#{inpatientNo}")
+    ZyActpatient getByInpatientNo(String inpatientNo);
 
     /**
      * 根据住院号查询在院记录数

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

@@ -114,6 +114,8 @@ public class YzActOcc  {
     private String ydPageNo;
     /** 没使用*/
     private String printCommentBq;
+    private String executeStaff;
+    private Date executeTime;
 
     public String getActOrderNoStr() {
         if(actOrderNo != null){

+ 4 - 0
src/main/java/thyyxxk/webserver/entity/inpatient/nursemodule/request/InfusionInsert.java

@@ -10,4 +10,8 @@ public class InfusionInsert {
     private String bedNos;
     private String startTime;
     private String endTime;
+
+    private String patNo;
+    private Integer times;
+    private String executedFlag;
 }

+ 3 - 0
src/main/java/thyyxxk/webserver/entity/zhuyuanyisheng/yizhuluru/XinZhenYzActOrder.java

@@ -3,6 +3,7 @@ package thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
+import thyyxxk.webserver.entity.executeItem.YzZyPatientFee;
 
 import java.math.BigDecimal;
 import java.util.Date;
@@ -389,6 +390,8 @@ public class XinZhenYzActOrder {
 
     private List<XinZhenYzActOrder> children;
 
+    private List<YzZyPatientFee> zlChildren;
+
     private String orderGroup;
 
     private String executer1;

+ 13 - 1
src/main/java/thyyxxk/webserver/entity/zhuyuanyisheng/yizhuluru/YiZhuFeiYongChaXunTiaoJian.java

@@ -35,8 +35,16 @@ public class YiZhuFeiYongChaXunTiaoJian {
      */
     private String actOrderNoStr;
 
+    private String orderName;
+
     private String parentNoStr;
 
+    private Boolean needZlChildren;
+
+    public boolean needZlChildren() {
+        return null != needZlChildren && needZlChildren;
+    }
+
     public BigDecimal getActOrderNo() {
         if (StringUtil.notBlank(actOrderNoStr)) {
             return new BigDecimal(actOrderNoStr).abs();
@@ -57,7 +65,7 @@ public class YiZhuFeiYongChaXunTiaoJian {
         qw.eq("a.inpatient_no", patNo)
                 .eq("a.admiss_times", times);
 
-        if (StringUtil.notBlank(startTime)) {
+        if (StringUtil.notBlank(startTime) && !needZlChildren()) {
             qw.ge("a.order_time", startTime)
                     .le("a.order_time", endTime);
         }
@@ -78,6 +86,10 @@ public class YiZhuFeiYongChaXunTiaoJian {
             }
         }
 
+        if (StringUtil.notBlank(orderName)) {
+            qw.like("a.order_name", orderName);
+        }
+
         qw.orderByAsc("a.act_order_no");
         return qw;
     }

+ 0 - 4
src/main/java/thyyxxk/webserver/service/crbmanagement/CrbExService.java

@@ -174,10 +174,6 @@ public class CrbExService {
         return "";
     }
 
-    private boolean isNumeric(String str) {
-        return str.matches("-?[0-9]+(\\.[0-9]+)?");
-    }
-
     private String makeJyValue(List<JyDetailItem> items) {
         if (ListUtil.notBlank(items)) {
             StringBuilder sb = new StringBuilder();

+ 8 - 13
src/main/java/thyyxxk/webserver/service/executeItem/GenerateYzService.java

@@ -9,6 +9,7 @@ import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ReflectUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -29,7 +30,6 @@ import thyyxxk.webserver.entity.medicine.YpZdGroupName;
 import thyyxxk.webserver.service.medicaladvice.common.MedicalCommonService;
 import thyyxxk.webserver.utils.*;
 
-import javax.annotation.Resource;
 import java.lang.reflect.Field;
 import java.math.BigDecimal;
 import java.util.ArrayList;
@@ -46,19 +46,14 @@ import java.util.stream.Collectors;
  */
 @Service
 @Slf4j
+@RequiredArgsConstructor
 public class GenerateYzService {
-    @Resource
-    private GenerateYzDao dao;
-    @Resource
-    private YzActOccDao yzActOccDao;
-    @Resource
-    private YzYpZyOrderDao yzYpZyOrderDao;
-    @Resource
-    private YzZyPatientFeeDao yzZyPatientFeeDao;
-    @Resource
-    private MedicalCommonService medicalCommonService;
-    @Resource
-    YpZdGroupNameDao ypZdGroupNameDao;
+    private final GenerateYzDao dao;
+    private final YzActOccDao yzActOccDao;
+    private final YzYpZyOrderDao yzYpZyOrderDao;
+    private final YzZyPatientFeeDao yzZyPatientFeeDao;
+    private final MedicalCommonService medicalCommonService;
+    private final YpZdGroupNameDao ypZdGroupNameDao;
 
     private static final String prefixWeek = "week";
     private static final String prefixDay = "day";

+ 41 - 6
src/main/java/thyyxxk/webserver/service/inpatient/DismissService.java

@@ -30,6 +30,7 @@ import thyyxxk.webserver.entity.medicalinsurance.injury.InjuryCareQualification;
 import thyyxxk.webserver.http.drg.DrgWebApi;
 import thyyxxk.webserver.service.externalhttp.SiInjuryFeeUpld;
 import thyyxxk.webserver.service.externalhttp.SiZySrvc;
+import thyyxxk.webserver.service.hutoolcache.ZyBillItemCache;
 import thyyxxk.webserver.utils.DateUtil;
 import thyyxxk.webserver.utils.DecimalUtil;
 import thyyxxk.webserver.utils.IdCardUtil;
@@ -39,12 +40,7 @@ import thyyxxk.webserver.utils.StringUtil;
 import thyyxxk.webserver.utils.TokenUtil;
 
 import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
+import java.util.*;
 
 /**
  * @author dj
@@ -58,6 +54,7 @@ public class DismissService {
     private final SiInjuryFeeUpld injuryFeeUpld;
     private final RestTemplate template;
     private final DrgWebApi drgWebApi;
+    private final ZyBillItemCache zyBillItemCache;
 
     @Value("${si-zy-fee-url}")
     private String siZyFeeUrl;
@@ -415,6 +412,44 @@ public class DismissService {
         return 1;
     }
 
+    public ReceiptEntity dismissFeeAnalyse(Patient patient) {
+        Date enddate = DateUtil.parse("2999-12-31 23:59:59");
+        ReceiptEntity entity = dismissFeeAnalyse(patient.getInpatientNo(), patient.getAdmissTimes(),
+                patient.getLedgerSn(), patient.getAdmissDate(), enddate);
+        if (null != entity.getAdult()) {
+            LinkedHashMap<String, String> transAdultFeeMap = new LinkedHashMap<>();
+            transAdultFeeMap.put("总费用", entity.getAdult().remove("total"));
+            for (Map.Entry<String, String> entry : entity.getAdult().entrySet()) {
+                transferFeeMap(transAdultFeeMap, entry);
+            }
+            entity.setAdult(transAdultFeeMap);
+        }
+        if (null != entity.getInfant()) {
+            LinkedHashMap<String, String> transInfantFeeMap = new LinkedHashMap<>();
+            transInfantFeeMap.put("总费用", entity.getInfant().remove("total"));
+            for (Map.Entry<String, String> entry : entity.getInfant().entrySet()) {
+                transferFeeMap(transInfantFeeMap, entry);
+            }
+            entity.setInfant(transInfantFeeMap);
+        }
+        return entity;
+    }
+
+    private void transferFeeMap(Map<String, String> resultFeeMap, Map.Entry<String, String> sourceFeeEntry) {
+        if (BigDecimal.ZERO.compareTo(new BigDecimal(sourceFeeEntry.getValue())) != 0) {
+            if (sourceFeeEntry.getKey().equals("total")) {
+                resultFeeMap.put("总费用", sourceFeeEntry.getValue());
+                return;
+            }
+            ZyBillItemCache.ZyBillItem bill = zyBillItemCache.get(sourceFeeEntry.getKey());
+            if (null == bill) {
+                bill = new ZyBillItemCache.ZyBillItem();
+                bill.setName("未知");
+            }
+            resultFeeMap.put(bill.getName(), sourceFeeEntry.getValue());
+        }
+    }
+
     private ReceiptEntity dismissFeeAnalyse(String patNo, int times, int ledgerSn, Date begntime, Date endtime) {
         Map<String, String> ledgerMap = initReceiptMap();
         Map<String, String> infantMap = initReceiptMap();

+ 87 - 5
src/main/java/thyyxxk/webserver/service/inpatient/nursemodule/PrintInfusionCardService.java

@@ -6,6 +6,7 @@ import org.springframework.stereotype.Service;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.dao.his.inpatient.nursemodule.PrintInfusionCardDao;
 import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.executeItem.YzActOcc;
 import thyyxxk.webserver.entity.inpatient.nursemodule.request.CardType;
 import thyyxxk.webserver.entity.inpatient.nursemodule.request.InfusionInsert;
 import thyyxxk.webserver.entity.inpatient.nursemodule.request.UpdatePrintStatus;
@@ -13,11 +14,11 @@ import thyyxxk.webserver.entity.inpatient.nursemodule.response.*;
 import thyyxxk.webserver.entity.inpatient.nursemodule.request.QueryInfusionCard;
 import thyyxxk.webserver.utils.DateUtil;
 import thyyxxk.webserver.utils.ResultVoUtil;
+import thyyxxk.webserver.utils.StringUtil;
+import thyyxxk.webserver.utils.TokenUtil;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.math.BigDecimal;
+import java.util.*;
 
 @Slf4j
 @Service
@@ -136,7 +137,8 @@ public class PrintInfusionCardService {
         list.add(main);
         String prefix = "▲";
         for (YzActOccInfusionNew drug : sideDrugs) {
-            if (drug.getParentNo().equals(main.getActOrderNo())) {
+            if (drug.getParentNo().equals(main.getActOrderNo())
+                    && drug.getStartTime().equals(main.getStartTime())) {
                 drug.setDrugName(prefix + drug.getOrderName());
                 drug.setStartHour(DateUtil.formatDatetime(drug.getStartTime(), "HH:mm"));
                 list.add(drug);
@@ -188,4 +190,84 @@ public class PrintInfusionCardService {
         dao.updateYzActOccPrintStatus(status, orderNos);
         return status;
     }
+
+    public ResultVo<List<PatientInfusionInfo>> queryTodayInfusion(InfusionInsert params) {
+        String today = DateUtil.formatDate(new Date());
+        params.setStartTime(today + " 00:00:00");
+        params.setEndTime(today + " 23:59:59");
+        dao.deleteOldInfusionByPatient(params.getPatNo(), params.getTimes());
+        List<YzActOccInfusionNew> mainDrugs;
+        List<YzActOccInfusionNew> sideDrugs;
+        if (Objects.equals(params.getExecutedFlag(), "0")) {
+            dao.insertInfusionByPatNo(params);
+            mainDrugs = dao.selectMainDrugsByPatNo(params);
+            sideDrugs = dao.selectSideDrugsByPatNo(params);
+        } else {
+            dao.insertInfusionByPatNo2(params);
+            mainDrugs = dao.selectMainDrugsByPatNo2(params);
+            sideDrugs = dao.selectSideDrugsByPatNo2(params);
+        }
+
+        List<PatientInfusionInfo> response = new ArrayList<>();
+        for (YzActOccInfusionNew main : mainDrugs) {
+            PatientInfusionInfo info = new PatientInfusionInfo();
+            info.setBottleCardDrugs(fetchDrugsForBottleCard(main, sideDrugs));
+            response.add(info);
+        }
+        return ResultVoUtil.success(response);
+    }
+
+    public ResultVo<String> checkInfusionByScan(String scanContent) {
+        String[] summary = scanContent.split("\\|");
+        if (summary.length != 4) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请扫描正确的二维码!");
+        }
+        String patNo = summary[0];
+        String actOrderNo = summary[1];
+        Date occTime = DateUtil.parse(summary[2], "yyyyMMddHHmmss");
+        String drugInfo = summary[3];
+        String[] drugArr = drugInfo.split("_");
+        if (drugArr.length < 1) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请扫描正确的二维码!");
+        }
+        Map<String, BigDecimal> drugMap = new HashMap<>();
+        for (String drugItem : drugArr) {
+            String[] drugDetail = drugItem.split("\\^");
+            if (drugDetail.length != 2) {
+                return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请扫描正确的二维码!");
+            }
+            if (!StringUtil.isNumeric(drugDetail[1])) {
+                return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请扫描正确的二维码!");
+            }
+            drugMap.put(drugDetail[0], new BigDecimal(drugDetail[1]));
+        }
+
+        List<YzActOcc> drugs = dao.getInfusionDrugsByScan(patNo, actOrderNo, occTime);
+        int checkedCount = 0;
+        for (YzActOcc occ : drugs) {
+            if (StringUtil.notBlank(occ.getExecuteStaff()) && null != occ.getExecuteTime()) {
+                String executeTime = DateUtil.formatDatetime(occ.getExecuteTime());
+                return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR,
+                        "本次输液已于 <br/>" + executeTime + " <br/> 核对执行过。");
+            }
+            BigDecimal mapQuan = drugMap.get(occ.getChargeCode());
+            if (null == mapQuan) {
+                return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR, "用药与医嘱不匹配,请检查!");
+            }
+            if (mapQuan.compareTo(occ.getDrugQuan()) != 0) {
+                return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR, "用药与医嘱不匹配,请检查!");
+            }
+            checkedCount++;
+            drugMap.remove(occ.getChargeCode());
+        }
+        if (checkedCount == drugs.size() && drugMap.isEmpty()) {
+            String staff = TokenUtil.getInstance().getTokenUserId();
+            int updatedRows = dao.updateExecutor(patNo, actOrderNo, occTime, staff);
+            if (updatedRows > 0) {
+                return ResultVoUtil.success("核对执行成功。");
+            }
+            return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR, "数据库出错,核对执行失败!");
+        }
+        return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR, "用药与医嘱不匹配,请检查!");
+    }
 }

+ 23 - 0
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/YiZhuLuRuServer.java

@@ -20,6 +20,7 @@ import org.springframework.transaction.support.TransactionTemplate;
 import thyyxxk.webserver.config.envionment.YzConfig;
 import thyyxxk.webserver.config.exception.BizException;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
+import thyyxxk.webserver.dao.his.executeItem.YzZyPatientFeeDao;
 import thyyxxk.webserver.dao.his.zhuyuanyisheng.YiZhuLuRuDao;
 import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.RoleCode;
@@ -29,6 +30,7 @@ import thyyxxk.webserver.entity.datamodify.SelectV2;
 import thyyxxk.webserver.entity.datamodify.YzActOrder;
 import thyyxxk.webserver.entity.datamodify.ZyDetailCharge;
 import thyyxxk.webserver.entity.dictionary.CodeName;
+import thyyxxk.webserver.entity.executeItem.YzZyPatientFee;
 import thyyxxk.webserver.entity.inpatient.patient.Overview;
 import thyyxxk.webserver.entity.inpatient.patient.Patient;
 import thyyxxk.webserver.entity.login.UserInfo;
@@ -73,6 +75,7 @@ import java.util.stream.Collectors;
 @RequiredArgsConstructor
 public class YiZhuLuRuServer {
     private final YiZhuLuRuDao dao;
+    private final YzZyPatientFeeDao patientFeeDao;
     private final PublicServer publicServer;
     private final CaseFrontSheetMainService caseFrontSheetMainService;
     private final SqlSessionFactory sqlSessionFactory;
@@ -102,6 +105,17 @@ public class YiZhuLuRuServer {
      */
     public ResultVo<List<XinZhenYzActOrder>> huoQuYiZhuShuJu(YiZhuFeiYongChaXunTiaoJian param) {
         List<XinZhenYzActOrder> xinZhenYzActOrders = dao.selectOrderNo(param.buildQw());
+        if (param.needZlChildren()) {
+            for (XinZhenYzActOrder order : xinZhenYzActOrders) {
+                QueryWrapper<YzZyPatientFee> wrapper =  new QueryWrapper<>();
+                wrapper.eq("act_order_no", order.getActOrderNoStr());
+                wrapper.eq("inpatient_no", order.getInpatientNo());
+                wrapper.eq("admiss_times", order.getAdmissTimes());
+                wrapper.ge("occ_time", param.getStartTime());
+                wrapper.le("occ_time", param.getEndTime());
+                order.setZlChildren(patientFeeDao.selectList(wrapper));
+            }
+        }
         return ResultVoUtil.success(xinZhenYzActOrders);
     }
 
@@ -1648,6 +1662,15 @@ public class YiZhuLuRuServer {
         return rst;
     }
 
+    public ResultVo<String> executeZlYz(YzZyPatientFee order) {
+        order.setOpId(TokenUtil.getInstance().getTokenUserId());
+        order.setOpDate(new Date());
+        int updateRows = patientFeeDao.updateExecuteInfo(order);
+        if (updateRows > 0) {
+            return ResultVoUtil.success(DateUtil.formatDatetime(order.getOpDate()));
+        }
+        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "数据库出错,执行失败!");
+    }
 
     /**
      * 自费同意书

+ 4 - 0
src/main/java/thyyxxk/webserver/utils/StringUtil.java

@@ -59,6 +59,10 @@ public class StringUtil {
         return null == deptCodes ? new String[]{} : deptCodes.substring(1, deptCodes.length() - 1).replaceAll("\"", "").split(",");
     }
 
+    public static boolean isNumeric(String str) {
+        return str.matches("-?[0-9]+(\\.[0-9]+)?");
+    }
+
     public static String desensitizeName(String name) {
         if (isBlank(name) || name.length() == 1) {
             return name;

+ 1 - 1
src/main/resources/application.yml

@@ -1,3 +1,3 @@
 spring:
   profiles:
-    active: prod
+    active: dev

+ 3 - 0
update/2025-10-21.md

@@ -0,0 +1,3 @@
+```sql
+alter table yz_act_occ add execute_staff varchar(16),execute_time datetime
+```