Procházet zdrojové kódy

添加撤销所有门特处方的功能。

lighter před 4 roky
rodič
revize
948473ecf3

+ 7 - 0
src/main/java/thyyxxk/webserver/controller/markmtfees/MarkMtFeesController.java

@@ -52,6 +52,12 @@ public class MarkMtFeesController {
         return service.cssybMtPreCal(patientId, times);
     }
 
+    @GetMapping("/deleteAllMtReceipts")
+    public ResultVo<String> deleteAllMtReceipts(@RequestParam("patientId") String patientId,
+                                          @RequestParam("times") Integer times) {
+        return service.deleteAllMtReceipts(patientId, times);
+    }
+
     @PassToken
     @PostMapping("/uploadFees")
     public Map<String, Object> uploadMtFees(@RequestBody UploadMtFeeParam param) {
@@ -69,4 +75,5 @@ public class MarkMtFeesController {
     public Map<String, Object> calculateMtFees(@RequestBody UploadMtFeeParam param) {
         return service.calculateMtFees(param);
     }
+
 }

+ 4 - 0
src/main/java/thyyxxk/webserver/dao/his/markmtfees/MarkMtFeesDao.java

@@ -132,4 +132,8 @@ public interface MarkMtFeesDao {
             "(#{patientId},#{times},#{icd},#{balance},#{serialApply},#{responceType},#{hicNo},#{icdCode},#{icdName}," +
             "#{secondIcdCode},#{thirdIcdCode},#{mzSerialNo})")
     void insertNewPartInfo(MtPartInfo info);
+
+    @Delete("delete from t_mt_receipt where patient_id=#{patientId} and times=#{times}")
+    void deleteAllReceipts(@Param("patientId") String patientId,
+                           @Param("times") Integer times);
 }

+ 6 - 0
src/main/java/thyyxxk/webserver/service/markmtfees/MarkMtFeesService.java

@@ -313,6 +313,12 @@ public class MarkMtFeesService {
         return ResultVoUtil.success(map.get("data"));
     }
 
+    public ResultVo<String> deleteAllMtReceipts(String patientId, Integer times) {
+        log.info("【操作员:{}】撤销所有门特处方:门诊号:{},门诊次数:{}", TokenUtil.getTokenUserId(), patientId, times);
+        dao.deleteAllReceipts(patientId, times);
+        return ResultVoUtil.success("撤销成功。");
+    }
+
     public Map<String, Object> uploadMtFees(UploadMtFeeParam param) {
         log.info("上传门特费用:{}", param);
         Map<String, Object> resultMap = new HashMap<>(Capacity.TWO);