Browse Source

添加费用接收重算功能。

lighter 3 years ago
parent
commit
4a5efd11d1

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>web-server</artifactId>
-    <version>10.0.8</version>
+    <version>10.0.9</version>
     <name>web-server</name>
     <description>server for yibao-web</description>
     <properties>

+ 5 - 0
src/main/java/thyyxxk/webserver/controller/yibao/PatientController.java

@@ -118,4 +118,9 @@ public class PatientController {
     public ResultVo<Float> genDismissActOrder(@RequestBody Patient param) {
         return service.genDismissActOrder(param);
     }
+
+    @PostMapping("/receiveAndRecalculateCost")
+    public ResultVo<String> receiveAndRecalculateCost(@RequestBody Patient p) {
+        return service.receiveAndRecalculateCost(p);
+    }
 }

+ 25 - 0
src/main/java/thyyxxk/webserver/dao/his/yibao/PatientDao.java

@@ -391,4 +391,29 @@ public interface PatientDao {
                       @Param("responceType") String responceType,
                       @Param("ybType") String ybType,
                       @Param("treatType") String treatType);
+
+    @Update("execute zy_receive_drug #{zyh},#{times},#{zyh},#{infant} ")
+    void zyReceiveDrug(@Param("zyh") String zyh,
+                       @Param("times") int times,
+                       @Param("infant") int infant);
+
+    @Update("execute zy_receive_one #{zyh},#{times},#{zyh},#{infant} ")
+    void zyReceiveOne(@Param("zyh") String zyh,
+                      @Param("times") int times,
+                      @Param("infant") int infant);
+
+    @Update("execute dbo.zy_cngl_fyjs_list_yz #{zyh},#{times} " )
+    void zyCnglFyjsListYz(@Param("zyh") String zyh,
+                          @Param("times") int times);
+
+    @Update("update zy_detail_charge set charge_status='2' where " +
+            "inpatient_no=#{zyh} and admiss_times=#{times} and ledger_sn=#{ledger} ")
+    void updateZyDetailCharge(@Param("zyh") String zyh,
+                              @Param("times") int times,
+                              @Param("ledger") int ledger);
+
+    @Update("execute zy_calc_detail_again_new #{zyh},#{times},#{ledger},1,1")
+    void zyCalcDetailAgainNew(@Param("zyh") String zyh,
+                              @Param("times") int times,
+                              @Param("ledger") int ledger);
 }

+ 4 - 0
src/main/java/thyyxxk/webserver/entity/yibao/patient/Patient.java

@@ -105,4 +105,8 @@ public class Patient {
         }
         return null == ybTypeName ? "" : (ybTypeName).trim();
     }
+
+    public String mainInfo() {
+        return "姓名:" + name + ",住院号:" + inpatientNo + ",住院次数:" + admissTimes;
+    }
 }

+ 14 - 0
src/main/java/thyyxxk/webserver/service/yibao/PatientService.java

@@ -427,4 +427,18 @@ public class PatientService {
         }
         return ResultVoUtil.success();
     }
+
+    public ResultVo<String> receiveAndRecalculateCost(Patient p) {
+        log.info("【操作员:{}】费用接收重算:{}", TokenUtil.getTokenUserId(), p.mainInfo());
+        String zyh = p.getInpatientNo();
+        int times = p.getAdmissTimes();
+        int infant = zyh.startsWith("$") ? 1 : 0;
+        int ledger = p.getLedgerSn();
+        dao.zyReceiveDrug(zyh, times, infant);
+        dao.zyReceiveOne(zyh, times, infant);
+        dao.zyCnglFyjsListYz(zyh, times);
+        dao.updateZyDetailCharge(zyh, times, ledger);
+        dao.zyCalcDetailAgainNew(zyh, times, ledger);
+        return ResultVoUtil.success("费用接收重算成功。");
+    }
 }