diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/orderclosedloop/appservice/IOrderClosedLoopAppService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/orderclosedloop/appservice/IOrderClosedLoopAppService.java index 0d68366d2..eb3a0b14d 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/orderclosedloop/appservice/IOrderClosedLoopAppService.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/orderclosedloop/appservice/IOrderClosedLoopAppService.java @@ -4,7 +4,6 @@ import com.healthlink.his.orderclosedloop.domain.OrderExecuteStep; import java.util.Map; import java.util.List; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.metadata.IPage; public interface IOrderClosedLoopAppService { IPage listRecords(String orderNo, String orderType, String executeStatus, Integer pageNum, Integer pageSize); Map getOrderStatus(Long orderId); @@ -14,5 +13,5 @@ public interface IOrderClosedLoopAppService { Map getStatistics(String type, String groupBy, Integer pageNum, Integer pageSize); void remindOrder(Map params); Map getTrace(Long adviceId); - Map getStatisticsWithParams(String deptId, String startDate, String endDate); + Map getStatisticsWithParams(String startDate, String endDate); } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/orderclosedloop/appservice/impl/OrderClosedLoopAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/orderclosedloop/appservice/impl/OrderClosedLoopAppServiceImpl.java index 5de244bd5..3016d3bfa 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/orderclosedloop/appservice/impl/OrderClosedLoopAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/orderclosedloop/appservice/impl/OrderClosedLoopAppServiceImpl.java @@ -7,7 +7,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.*; import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.jdbc.support.JdbcUtils; @Service public class OrderClosedLoopAppServiceImpl implements IOrderClosedLoopAppService { @Autowired private IOrderExecuteRecordService recordService; @@ -256,13 +255,9 @@ public class OrderClosedLoopAppServiceImpl implements IOrderClosedLoopAppService } @Override - public Map getStatisticsWithParams(String deptId, String startDate, String endDate) { + public Map getStatisticsWithParams(String startDate, String endDate) { Map result = new LinkedHashMap<>(); LambdaQueryWrapper w = new LambdaQueryWrapper<>(); - w.ne(OrderExecuteRecord::getExecuteStatus, "cancelled"); - if (deptId != null && !deptId.isEmpty()) { - List> deptRows = recordMapper.selectOverviewByType(); - } List records = recordService.list(w); long total = records.size(); long executing = 0; diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/orderclosedloop/controller/OrderClosedLoopController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/orderclosedloop/controller/OrderClosedLoopController.java index ce355d931..4b6996be8 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/orderclosedloop/controller/OrderClosedLoopController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/orderclosedloop/controller/OrderClosedLoopController.java @@ -5,6 +5,7 @@ import com.healthlink.his.web.orderclosedloop.appservice.IOrderClosedLoopAppServ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import java.util.Map; @Tag(name = "医嘱闭环") @RestController @RequestMapping("/api/v1/order-closed-loop") @@ -12,6 +13,7 @@ public class OrderClosedLoopController { @Autowired private IOrderClosedLoopAppService appService; @Operation(summary = "医嘱执行记录列表") + @PreAuthorize("@ss.hasPermi('inpatient:orderclosedloop:list')") @GetMapping("/list") public AjaxResult list(@RequestParam(required = false) String orderNo, @RequestParam(required = false) String orderType, @@ -22,12 +24,14 @@ public class OrderClosedLoopController { } @Operation(summary = "获取医嘱执行状态") + @PreAuthorize("@ss.hasPermi('inpatient:orderclosedloop:list')") @GetMapping("/status/{orderId}") public AjaxResult status(@PathVariable Long orderId) { return AjaxResult.success(appService.getOrderStatus(orderId)); } @Operation(summary = "执行医嘱") + @PreAuthorize("@ss.hasPermi('inpatient:orderclosedloop:edit')") @PostMapping("/execute") public AjaxResult execute(@RequestBody OrderExecuteRecord record) { appService.executeOrder(record); @@ -35,6 +39,7 @@ public class OrderClosedLoopController { } @Operation(summary = "完成医嘱") + @PreAuthorize("@ss.hasPermi('inpatient:orderclosedloop:edit')") @PostMapping("/complete") public AjaxResult complete(@RequestBody OrderExecuteRecord record) { appService.completeOrder(record); @@ -42,6 +47,7 @@ public class OrderClosedLoopController { } @Operation(summary = "取消医嘱") + @PreAuthorize("@ss.hasPermi('inpatient:orderclosedloop:edit')") @PostMapping("/cancel") public AjaxResult cancel(@RequestBody OrderExecuteRecord record) { appService.cancelOrder(record); @@ -49,6 +55,7 @@ public class OrderClosedLoopController { } @Operation(summary = "统计") + @PreAuthorize("@ss.hasPermi('inpatient:orderclosedloop:list')") @GetMapping("/statistics") public AjaxResult statistics(@RequestParam(required = false) String type, @RequestParam(required = false) String groupBy, @@ -58,6 +65,7 @@ public class OrderClosedLoopController { } @Operation(summary = "催办提醒") + @PreAuthorize("@ss.hasPermi('inpatient:orderclosedloop:edit')") @PostMapping("/remind") public AjaxResult remind(@RequestBody Map params) { appService.remindOrder(params); @@ -65,16 +73,17 @@ public class OrderClosedLoopController { } @Operation(summary = "医嘱执行追踪") + @PreAuthorize("@ss.hasPermi('inpatient:orderclosedloop:list')") @GetMapping("/trace/{adviceId}") public AjaxResult trace(@PathVariable Long adviceId) { return AjaxResult.success(appService.getTrace(adviceId)); } @Operation(summary = "执行统计") + @PreAuthorize("@ss.hasPermi('inpatient:orderclosedloop:list')") @GetMapping("/statistics/summary") - public AjaxResult statisticsSummary(@RequestParam(required = false) String deptId, - @RequestParam(required = false) String startDate, + public AjaxResult statisticsSummary(@RequestParam(required = false) String startDate, @RequestParam(required = false) String endDate) { - return AjaxResult.success(appService.getStatisticsWithParams(deptId, startDate, endDate)); + return AjaxResult.success(appService.getStatisticsWithParams(startDate, endDate)); } } diff --git a/healthlink-his-ui/src/views/inpatientDoctor/OrderExecuteTrace.vue b/healthlink-his-ui/src/views/inpatientDoctor/OrderExecuteTrace.vue index a8878c45a..c4e61fe7e 100644 --- a/healthlink-his-ui/src/views/inpatientDoctor/OrderExecuteTrace.vue +++ b/healthlink-his-ui/src/views/inpatientDoctor/OrderExecuteTrace.vue @@ -63,9 +63,6 @@ - - - @@ -126,7 +123,7 @@ const loading = ref(false) const statsLoading = ref(false) const queryParams = ref({ adviceId: '' }) const traceData = ref({}) -const statsParams = ref({ deptId: '', startDate: '', endDate: '' }) +const statsParams = ref({ startDate: '', endDate: '' }) const statsData = ref({}) function handleSearch() { @@ -147,7 +144,6 @@ function handleSearch() { function loadStats() { statsLoading.value = true const params = {} - if (statsParams.value.deptId) params.deptId = statsParams.value.deptId if (statsParams.value.startDate) params.startDate = statsParams.value.startDate if (statsParams.value.endDate) params.endDate = statsParams.value.endDate getExecuteStatistics(params).then(res => {