Merge remote-tracking branch 'origin/master'
# Conflicts:
# medicalWaste-system/src/main/java/com/sinata/system/mapper/MwCollectRecordMapper.java
# medicalWaste-system/src/main/java/com/sinata/system/service/MwCheckoutRecordService.java
# medicalWaste-system/src/main/java/com/sinata/system/service/impl/MwCollectRecordServiceImpl.java
New file |
| | |
| | | package com.sinata.task; |
| | | |
| | | import com.sinata.system.domain.MwWarningRecord; |
| | | import com.sinata.system.enums.WarningStatusEnum; |
| | | import com.sinata.system.service.MwCollectRecordService; |
| | | import com.sinata.system.service.MwContractService; |
| | | import com.sinata.system.service.MwProtectionEquipmentRecordService; |
| | | import com.sinata.system.service.MwProtectionEquipmentService; |
| | | import com.sinata.system.service.MwStaffService; |
| | | import com.sinata.system.service.MwStagingRoomService; |
| | | import com.sinata.system.service.MwWarningConfigItemService; |
| | | import com.sinata.system.service.MwWarningConfigService; |
| | | import com.sinata.system.service.MwWarningRecordService; |
| | | import com.sinata.system.service.biz.TaskService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.jetbrains.annotations.NotNull; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/30 |
| | | */ |
| | | @Component |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class WarningTask { |
| | | private final MwWarningConfigService mwWarningConfigService; |
| | | private final MwWarningConfigItemService mwWarningConfigItemService; |
| | | private final MwCollectRecordService mwCollectRecordService; |
| | | private final MwWarningRecordService mwWarningRecordService; |
| | | private final MwStagingRoomService mwStagingRoomService; |
| | | private final MwContractService mwContractService; |
| | | private final MwStaffService mwStaffService; |
| | | private final MwProtectionEquipmentService mwProtectionEquipmentService; |
| | | private final MwProtectionEquipmentRecordService mwProtectionEquipmentRecordService; |
| | | private final TaskService taskService; |
| | | |
| | | /** |
| | | * 出库超时预警 |
| | | */ |
| | | @Scheduled(cron = "${medical.crons.checkout-over-time}") |
| | | public void checkoutOverTime() { |
| | | log.info("开始执行【出库超时预警】定时任务"); |
| | | taskService.checkoutOverTime(); |
| | | log.info("定时任务【出库超时预警】执行完毕"); |
| | | } |
| | | |
| | | /** |
| | | * 封装预警记录 |
| | | * |
| | | * @param id |
| | | * @param warningTargetName |
| | | * @param departmentName |
| | | * @param message |
| | | * @param departmentId |
| | | * @param currentValue |
| | | * @param normalRange |
| | | * @return |
| | | */ |
| | | @NotNull |
| | | private static MwWarningRecord getMwWarningRecord(Integer type, Long id, String warningTargetName, String departmentName, String message, Long departmentId, String currentValue, String normalRange) { |
| | | MwWarningRecord warningRecord = new MwWarningRecord(); |
| | | warningRecord.setType(type); |
| | | warningRecord.setWarningTargetId(id); |
| | | warningRecord.setWarningTargetName(warningTargetName); |
| | | warningRecord.setDepartmentName(departmentName); |
| | | warningRecord.setMessage(message); |
| | | warningRecord.setDepartmentId(departmentId); |
| | | warningRecord.setCurrentValue(currentValue); |
| | | warningRecord.setNormalRange(normalRange); |
| | | warningRecord.setStatus(WarningStatusEnum.UNRESOLVED.getCode()); |
| | | warningRecord.setWarnTime(new Date()); |
| | | return warningRecord; |
| | | } |
| | | |
| | | /** |
| | | * 暂存间使用率预警 |
| | | */ |
| | | @Scheduled(cron = "${medical.crons.staging-room-capacity}") |
| | | public void stagingRoomStorage() { |
| | | log.info("开始执行【暂存间使用率预警】定时任务"); |
| | | taskService.stagingRoomStorage(); |
| | | log.info("定时任务【暂存间使用率预警】执行完毕"); |
| | | } |
| | | |
| | | /** |
| | | * 合同到期预警 |
| | | */ |
| | | @Scheduled(cron = "${medical.crons.contract-expire}") |
| | | public void contractExpire() { |
| | | log.info("开始执行【合同到期预警】定时任务"); |
| | | taskService.contractExpire(); |
| | | log.info("定时任务【合同到期预警】执行完毕"); |
| | | } |
| | | |
| | | /** |
| | | * 健康记录预警、人员记录预警 |
| | | */ |
| | | @Scheduled(cron = "${medical.crons.health-vaccine-record}") |
| | | public void healthRecord() { |
| | | log.info("开始执行【健康记录预警】【人员记录预警】定时任务"); |
| | | taskService.healthRecord(); |
| | | log.info("定时任务【健康记录预警】【人员记录预警】执行完毕"); |
| | | } |
| | | |
| | | /** |
| | | * 防护用品使用预警 防护用品库存预警 |
| | | */ |
| | | @Scheduled(cron = "${medical.crons.protection-equipment-use-stock}") |
| | | public void protectionEquipmentUse() { |
| | | log.info("开始执行【防护用品使用预警】【防护用品库存预警】定时任务"); |
| | | taskService.protectionEquipmentUse(); |
| | | log.info("定时任务【防护用品使用预警】【防护用品库存预警】执行完毕"); |
| | | } |
| | | |
| | | /** |
| | | * 医疗机构产废日预警 |
| | | */ |
| | | @Scheduled(cron = "${medical.crons.medical-institution-waste-day}") |
| | | public void medicalInstitutionWasteDay() { |
| | | log.info("开始执行【医疗机构产废日预警】定时任务"); |
| | | taskService.medicalInstitutionWasteDay(); |
| | | log.info("定时任务【医疗机构产废日预警】执行完毕"); |
| | | } |
| | | |
| | | /** |
| | | * 医疗机构产废月预警 |
| | | */ |
| | | @Scheduled(cron = "${medical.crons.medical-institution-waste-month}") |
| | | public void medicalInstitutionWasteMonth() { |
| | | log.info("开始执行【医疗机构产废月预警】定时任务"); |
| | | taskService.medicalInstitutionWasteMonth(); |
| | | log.info("定时任务【医疗机构产废月预警】执行完毕"); |
| | | } |
| | | |
| | | /** |
| | | * 医疗机构存储量 |
| | | */ |
| | | @Scheduled(cron = "${medical.crons.medical-institution-waste-storage}") |
| | | public void medicalInstitutionStorage() { |
| | | log.info("开始执行【医疗机构存储量】定时任务"); |
| | | taskService.medicalInstitutionStorage(); |
| | | log.info("定时任务【医疗机构存储量】执行完毕"); |
| | | } |
| | | |
| | | /** |
| | | * 车辆转运异常预警 |
| | | */ |
| | | @Scheduled(cron = "${medical.crons.transit-car}") |
| | | public void transitCar() { |
| | | log.info("开始执行【车辆转运异常预警】定时任务"); |
| | | taskService.transitCar(); |
| | | log.info("定时任务【车辆转运异常预警】执行完毕"); |
| | | } |
| | | |
| | | @Scheduled(cron = "${medical.crons.disposal-unit-storage}") |
| | | public void disposalUnitStorage() { |
| | | log.info("开始执行【处置单位存储量预警】定时任务"); |
| | | taskService.disposalUnitStorage(); |
| | | log.info("定时任务【处置单位存储量预警】执行完毕"); |
| | | } |
| | | } |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | |
| | | import javax.validation.Valid; |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @ApiOperation("批量修改转运箱状态") |
| | | @PostMapping("/editBatch") |
| | | public R<?> editBatch(@Valid @RequestBody List<MwBoxDTO> dtoList) { |
| | | public R<?> editBatch(@Valid @RequestBody MwBoxDTO dtoList) { |
| | | boxService.editBatch(dtoList); |
| | | return R.ok(); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("批量删除") |
| | | @PostMapping("/delBatch") |
| | | public R<?> delBatch(@ApiParam(name = "idList", value = "转运箱id列表", required = true, allowMultiple = true) @NotEmpty(message = "转运箱列表不能为空") @RequestBody List<Long> idList) { |
| | | @ApiImplicitParam(name = "idStr", value = "转运箱id字符串,多个用逗号分隔", required = true) |
| | | public R<?> delBatch(@RequestParam @NotEmpty(message = "转运箱id字符串不能为空") String idStr) { |
| | | List<Long> idList = Arrays.stream(idStr.split(",")).map(Long::valueOf).collect(Collectors.toList()); |
| | | boxService.removeByIds(idList); |
| | | return R.ok(); |
| | | } |
| | |
| | | import com.sinata.system.domain.dto.MwMicroEquipmentRecordDTO; |
| | | import com.sinata.system.domain.query.MwMicroEquipmentRecordQuery; |
| | | import com.sinata.system.domain.query.MwMicroEquipmentStaticsQuery; |
| | | import com.sinata.system.domain.vo.DepartmentReportVO; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentRecordVO; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentStaticsTitleVO; |
| | | import com.sinata.system.service.MwMicroEquipmentRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | * @author mitao |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Api(tags = {"设备使用记录相关接口"}) |
| | | @Api(tags = {"小型微波设备使用记录相关接口"}) |
| | | @Validated |
| | | @RequiredArgsConstructor |
| | | @RestController |
| | |
| | | return R.ok(mwMicroEquipmentRecordService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 设备使用记录详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation("设备使用记录详情") |
| | | @GetMapping("/{id}") |
| | | public R<MwMicroEquipmentRecordVO> detail(@ApiParam(name = "id", value = "设备id", required = true) @PathVariable("id") Long id) { |
| | | return R.ok(mwMicroEquipmentRecordService.detail(id)); |
| | | } |
| | | /** |
| | | * 导出设备使用记录 |
| | | * |
| | |
| | | */ |
| | | @ApiOperation("处置分析数据") |
| | | @PostMapping("/statics/data") |
| | | public R<List<List<String>>> staticsData(@Valid @RequestBody MwMicroEquipmentStaticsQuery query) { |
| | | public R<DepartmentReportVO> staticsData(@Valid @RequestBody MwMicroEquipmentStaticsQuery query) { |
| | | return R.ok(mwMicroEquipmentRecordService.getStaticsData(query)); |
| | | } |
| | | |
| | | /** |
| | | * 处置分析导出 |
| | | * |
| | |
| | | */ |
| | | @ApiOperation("处置分析导出") |
| | | @PostMapping("/statics/export") |
| | | public void export(@Valid @RequestBody MwMicroEquipmentStaticsQuery query, HttpServletResponse response) { |
| | | public void export(@RequestBody MwMicroEquipmentStaticsQuery query, HttpServletResponse response) { |
| | | try { |
| | | mwMicroEquipmentRecordService.staticsExport(query, response); |
| | | } catch (IOException e) { |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | return R.ok(mwProtectionEquipmentService.recordPage(query)); |
| | | } |
| | | |
| | | /** |
| | | * 防护器具列表 |
| | | * |
| | | * @return |
| | | */ |
| | | @ApiOperation("防护器具列表") |
| | | @GetMapping("/list") |
| | | public R<List<MwProtectionEquipmentVO>> queryList() { |
| | | return R.ok(mwProtectionEquipmentService.queryList()); |
| | | } |
| | | } |
| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 暂存间待处理医废分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @ApiOperation("暂存间待处理医废分页列表") |
| | | @PostMapping("/temporarilyStoredMedicalWaste") |
| | | public R<PageDTO<MwStorageRecordVO>> temporarilyStoredMedicalWaste(@Valid @RequestBody StorageRecordQuery query) { |
| | | return R.ok(mwStagingRoomService.temporarilyStoredMedicalWaste(query)); |
| | | } |
| | | } |
| | |
| | | package com.sinata.web.controller.backend; |
| | | |
| | | import com.sinata.common.core.domain.R; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.query.MwWarningRecordQuery; |
| | | import com.sinata.system.domain.vo.MwWarningRecordVO; |
| | | import com.sinata.system.service.MwWarningRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author mitao |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Validated |
| | | @RestController |
| | | @Api(tags = "预警记录相关接口") |
| | | @RequiredArgsConstructor |
| | | @RequestMapping("/backend/mwWarningRecord") |
| | | public class MwWarningRecordController { |
| | | private final MwWarningRecordService mwWarningRecordService; |
| | | |
| | | /** |
| | | * 预警信息分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @ApiOperation("预警信息分页列表") |
| | | @PostMapping("/page") |
| | | public R<PageDTO<MwWarningRecordVO>> pageList(@Valid @RequestBody MwWarningRecordQuery query) { |
| | | return R.ok(mwWarningRecordService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 解除预警 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation("解除预警") |
| | | @GetMapping("/relieve/{id}") |
| | | public R<?> relieve(@ApiParam(name = "id", value = "预警记录id", required = true) @PathVariable("id") Long id) { |
| | | mwWarningRecordService.relieve(id); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation("预警信息导出") |
| | | @PostMapping("/export") |
| | | public void export(@RequestBody MwWarningRecordQuery query) { |
| | | try { |
| | | mwWarningRecordService.export(query); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | @RestController |
| | | @Api(tags = {"统计分析相关接口"}) |
| | | @RequiredArgsConstructor |
| | | @RequestMapping("/statics") |
| | | @RequestMapping("/backend/statics") |
| | | public class StaticsController { |
| | | private final StaticsService staticsService; |
| | | |
| | |
| | | import com.sinata.common.core.domain.R; |
| | | import com.sinata.common.core.domain.entity.SysDictData; |
| | | import com.sinata.common.core.page.TableDataInfo; |
| | | import com.sinata.common.entity.BasePage; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.common.enums.BusinessType; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.common.utils.poi.ExcelUtil; |
| | | import com.sinata.system.domain.dto.SysDictDataDTO; |
| | | import com.sinata.system.domain.query.KeyWordQuery; |
| | | import com.sinata.system.domain.vo.SysDictDataVO; |
| | | import com.sinata.system.service.ISysDictDataService; |
| | | import com.sinata.system.service.ISysDictTypeService; |
| | |
| | | */ |
| | | @ApiOperation("数据字典分页列表") |
| | | @PostMapping("/page") |
| | | public R<PageDTO<SysDictDataVO>> page(@Valid @RequestBody BasePage page) { |
| | | return R.ok(dictDataService.pageList(page)); |
| | | public R<PageDTO<SysDictDataVO>> page(@Valid @RequestBody KeyWordQuery query) { |
| | | return R.ok(dictDataService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | |
| | | public R<List<SysDictDataVO>> workTypeList() { |
| | | return R.ok(dictDataService.workTypeList()); |
| | | } |
| | | |
| | | /** |
| | | * 医疗机构级别 |
| | | * |
| | | * @return |
| | | */ |
| | | @ApiOperation("医疗机构级别") |
| | | @GetMapping("/institutionLevelList") |
| | | public R<List<SysDictDataVO>> institutionLevelList() { |
| | | return R.ok(dictDataService.institutionLevelList()); |
| | | } |
| | | |
| | | /** |
| | | * 医疗机构性质 |
| | | * |
| | | * @return |
| | | */ |
| | | @ApiOperation("医疗机构性质") |
| | | @GetMapping("/institutionTypeList") |
| | | public R<List<SysDictDataVO>> institutionTypeList() { |
| | | return R.ok(dictDataService.institutionTypeList()); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:dict:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysDictData dictData) |
| | |
| | | import com.sinata.common.enums.BusinessType; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.service.ISysMenuService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 菜单信息 |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Api(tags = {"菜单相关接口"}) |
| | | @RestController |
| | | @RequestMapping("/system/menu") |
| | | @RequestMapping("/backend/system/menu") |
| | | public class SysMenuController extends BaseController |
| | | { |
| | | @Autowired |
| | | private ISysMenuService menuService; |
| | | |
| | | @ApiOperation("菜单权限(有层级)") |
| | | @GetMapping("/levelList") |
| | | public AjaxResult levelList() { |
| | | // 获取当前角色的菜单列表 |
| | | List<SysMenu> menus = menuService.selectList(); |
| | | if (menus.size() == 0) { |
| | | return AjaxResult.success(new ArrayList<>()); |
| | | } |
| | | // 第三级 |
| | | List<SysMenu> s3 = menus.stream().filter(e -> e.getMenuType().equals("F")).collect(Collectors.toList()); |
| | | // 第二级 |
| | | List<SysMenu> s2 = menus.stream().filter(e -> e.getMenuType().equals("C")).collect(Collectors.toList()); |
| | | // 第一级 |
| | | List<SysMenu> s1 = menus.stream().filter(e -> e.getMenuType().equals("M")).collect(Collectors.toList()); |
| | | |
| | | for (SysMenu menu : s2) { |
| | | List<SysMenu> collect = s3.stream().filter(e -> e.getParentId().equals(menu.getMenuId())).collect(Collectors.toList()); |
| | | menu.setChildren(collect); |
| | | } |
| | | for (SysMenu menu : s1) { |
| | | List<SysMenu> collect = s2.stream().filter(e -> e.getParentId().equals(menu.getMenuId())).collect(Collectors.toList()); |
| | | menu.setChildren(collect); |
| | | } |
| | | |
| | | return AjaxResult.success(s1); |
| | | } |
| | | /** |
| | | * 获取菜单列表 |
| | | */ |
| | |
| | | import com.sinata.system.service.ISysRoleService; |
| | | import com.sinata.system.service.ISysUserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 角色信息 |
| | |
| | | |
| | | @ApiOperation("批量删除") |
| | | @PostMapping("/deleteBatch") |
| | | public R<?> deleteBatch(@ApiParam(name = "roleIds", value = "角色id列表", required = true) @NotEmpty(message = "角色id列表不能为空") @RequestBody List<Long> roleIds) { |
| | | roleService.removeBatchByIds(roleIds); |
| | | @ApiImplicitParam(name = "roleIdStr", value = "角色id字符串,多个用逗号分隔", required = true) |
| | | public R<?> deleteBatch(@RequestParam @NotBlank(message = "角色id字符串不能为空") String roleIdStr) { |
| | | List<Long> idList = Arrays.stream(roleIdStr.split(",")).map(Long::valueOf).collect(Collectors.toList()); |
| | | roleService.removeBatchByIds(idList); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | */ |
| | | @ApiOperation("获取当前登录用户可管理角色列表") |
| | | @GetMapping("/manageRoleList") |
| | | public List<SysRoleVO> getManageRoleList() { |
| | | return roleService.getManageRoleList(getLoginUser()); |
| | | public R<List<SysRoleVO>> getManageRoleList() { |
| | | return R.ok(roleService.getManageRoleList(getLoginUser())); |
| | | } |
| | | |
| | | @ApiOperation("角色列表") |
| | | @GetMapping("/list") |
| | | public R<List<SysRoleVO>> queryList() { |
| | | return R.ok(roleService.queryList()); |
| | | } |
| | | @PreAuthorize("@ss.hasPermi('system:role:list')") |
| | | @GetMapping("/list") |
| | | //@GetMapping("/list") |
| | | public TableDataInfo list(SysRole role) |
| | | { |
| | | startPage(); |
| | |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | */ |
| | | @ApiOperation("批量删除") |
| | | @PostMapping("/delBatch") |
| | | @ApiImplicitParam(name = "userIds", value = "用户id列表", required = true, allowMultiple = true) |
| | | public R<?> delBatch(@RequestBody List<Long> userIds) { |
| | | @ApiImplicitParam(name = "userIdStr", value = "用户id字符串列表", required = true) |
| | | public R<?> delBatch(@RequestParam String userIdStr) { |
| | | List<Long> userIds = Arrays.stream(userIdStr.split(",")).map(Long::valueOf).collect(Collectors.toList()); |
| | | userService.delBatch(userIds); |
| | | return R.ok(); |
| | | } |
| | |
| | | debug: false |
| | | loginTemplateCode: SMS_246140477 |
| | | auditTemplateCode: SMS_476730213 |
| | | |
| | | medical: |
| | | crons: |
| | | checkout-over-time: 0 0/60 * * * ? # 每小时执行一次 |
| | | staging-room-capacity: 0 * */3 * * ? # 每三小时执行一次 |
| | | contract-expire: 0 0 0 * * ? # 每日0点执行 |
| | | health-vaccine-record: 0 0 1 * * ? # 每日1点执行 |
| | | protection-equipment-use-stock: 0 0 2 * * ? # 每日2点执行 |
| | | medical-institution-waste-day: 0 0 3 * * ? # 每日3点执行 |
| | | medical-institution-waste-month: 0 30 0 1 * ? # 每月1日0点30分执行 |
| | | medical-institution-waste-storage: 0 0 4 * * ? # 每日4点执行 |
| | | transit-car: 0 0 0/1 * * ? # 每小时执行一次 |
| | | disposal-unit-storage: 0 0 5 * * ? |
| | | |
| | |
| | | @TableField("DEPARTMENT_ID") |
| | | private Long departmentId; |
| | | |
| | | /** |
| | | * 层级关系 |
| | | */ |
| | | @TableField("RELATION") |
| | | private String relation; |
| | | |
| | | |
| | | public SysUser() |
| | | { |
| | | |
| | | } |
| | | |
| | | public String getRelation() { |
| | | return relation; |
| | | } |
| | | |
| | | public void setRelation(String relation) { |
| | | this.relation = relation; |
| | | } |
| | | |
| | | public String getOpenId() { |
| | | return openId; |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 计算小时差 |
| | | * |
| | | * @param endDate |
| | | * @param startTime |
| | | * @return |
| | | */ |
| | | public static long timeDistanceHour(Date endDate, Date startTime) { |
| | | long nd = 1000 * 24 * 60 * 60; |
| | | long nh = 1000 * 60 * 60; |
| | | long diff = endDate.getTime() - startTime.getTime(); |
| | | long hour = diff % nd / nh; |
| | | return hour; |
| | | } |
| | | |
| | | /** |
| | | * 计算天数差 |
| | | * |
| | | * @param endDate |
| | | * @param startTime |
| | | * @return |
| | | */ |
| | | public static long timeDistanceDay(Date endDate, Date startTime) { |
| | | long nd = 1000 * 24 * 60 * 60; |
| | | long diff = endDate.getTime() - startTime.getTime(); |
| | | long day = diff / nd; |
| | | return day; |
| | | } |
| | | |
| | | /** |
| | | * 增加 LocalDateTime ==> Date |
| | | */ |
| | | public static Date toDate(LocalDateTime temporalAccessor) |
New file |
| | |
| | | package com.sinata.system.annotation; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/30 |
| | | */ |
| | | |
| | | import java.lang.annotation.Documented; |
| | | import java.lang.annotation.ElementType; |
| | | import java.lang.annotation.Retention; |
| | | import java.lang.annotation.RetentionPolicy; |
| | | import java.lang.annotation.Target; |
| | | |
| | | /** |
| | | * 指定枚举自定义类的注解 |
| | | */ |
| | | @Target({ElementType.FIELD}) |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | | @Documented |
| | | public @interface FastExcel { |
| | | /** |
| | | * 控件类型 |
| | | * |
| | | * @return |
| | | */ |
| | | Class<? extends Enum> type(); |
| | | } |
New file |
| | |
| | | package com.sinata.system.conveter; |
| | | |
| | | import cn.idev.excel.converters.Converter; |
| | | import cn.idev.excel.enums.CellDataTypeEnum; |
| | | import cn.idev.excel.metadata.GlobalConfiguration; |
| | | import cn.idev.excel.metadata.data.WriteCellData; |
| | | import cn.idev.excel.metadata.property.ExcelContentProperty; |
| | | import com.sinata.system.annotation.FastExcel; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.lang.reflect.Method; |
| | | |
| | | /** |
| | | * 通用枚举转换器 |
| | | */ |
| | | public class EConverter implements Converter<Integer> { |
| | | @Override |
| | | public Class supportJavaTypeKey() { |
| | | //指定转换器接收参数类型 |
| | | return Integer.class; |
| | | } |
| | | |
| | | @Override |
| | | public CellDataTypeEnum supportExcelTypeKey() { |
| | | //指定返回的参数类型 |
| | | return CellDataTypeEnum.STRING; |
| | | } |
| | | |
| | | @Override |
| | | public WriteCellData<?> convertToExcelData(Integer value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception { |
| | | //value:状态码 contentProperty:字段属性 globalConfiguration:全局配置 |
| | | //获取字段属性中的注解 |
| | | Field field = contentProperty.getField(); |
| | | //获取该字段所属枚举 |
| | | FastExcel fastExcel = field.getAnnotation(FastExcel.class); |
| | | //获取注解中的枚举信息 |
| | | Class<? extends Enum> type = fastExcel.type(); |
| | | //获取枚举类的方法名 “getEnumByCode”就是自己编写的函数,Integer.class 指定入参类型 |
| | | Method codeOf = type.getMethod("getEnumByCode", Integer.class); |
| | | //反射执行方法,此方法得到的是一个枚举实例(具体得到什么,结合自身项目) |
| | | Object invoke = codeOf.invoke(type, value); |
| | | //枚举实例调用getname方法,得到name的值 |
| | | Method getDesc = invoke.getClass().getMethod("getDesc"); |
| | | String name = String.valueOf(getDesc.invoke(invoke)); |
| | | //将转换的值进行返回 |
| | | return new WriteCellData(name); |
| | | } |
| | | } |
| | |
| | | @TableField("REMARK") |
| | | private String remark; |
| | | |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @TableField("RELATION") |
| | | private String relation; |
| | | } |
| | |
| | | @TableField("REMARK") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @TableField("RELATION") |
| | | private String relation; |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("REMARK") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @TableField("RELATION") |
| | | private String relation; |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("REMARK") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @TableField("RELATION") |
| | | private String relation; |
| | | |
| | | } |
| | |
| | | @TableField("REMARK") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @TableField("RELATION") |
| | | private String relation; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.sinata.common.entity.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Setter |
| | | @TableName("MW_PROTECTION_TASK_EQUIPMENT") |
| | | @ApiModel(value = "MwProtectionTaskEquipment对象", description = "防护作业防护器具关系") |
| | | public class MwProtectionTaskEquipment extends BaseModel { |
| | | public class MwProtectionTaskEquipment implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @TableField("MAX_CAPACITY") |
| | | private Integer maxCapacity; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @TableField("RELATION") |
| | | private String relation; |
| | | |
| | | } |
| | |
| | | @TableField("REMARK") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @TableField("RELATION") |
| | | private String relation; |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("REMARK") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @TableField("RELATION") |
| | | private String relation; |
| | | |
| | | } |
| | |
| | | import com.sinata.common.entity.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.Date; |
| | | |
| | |
| | | * @author mitao |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Builder |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @TableName("MW_WARNING_RECORD") |
| | | @ApiModel(value = "MwWarningRecord对象", description = "预警记录表") |
| | | public class MwWarningRecord extends BaseModel { |
| | |
| | | @TableField("WARNING_TARGET_NAME") |
| | | private String warningTargetName; |
| | | |
| | | @ApiModelProperty("预警类型 预警类型 1:出库超时预警 2:暂存间使用率预警 3:合同到期预警 4:健康记录预警 " + |
| | | "5:疫苗记录预警 6:防护用品使用预警 7:医疗机构产废日预警 8:医疗机构产废月预警 " + |
| | | "9:医疗机构存储量预警 10:车辆转运异常预警 11:处置单位存储量预警") |
| | | @ApiModelProperty("预警类型 1:出库超时预警 2:暂存间使用率预警 3:合同到期预警 4:健康记录预警 " + |
| | | "5:疫苗记录预警 6:防护用品使用预警 7:防护用品库存预警 8:医疗机构产废日预警 " + |
| | | "9:医疗机构产废月预警 10:医疗机构存储量预警 11:车辆转运异常预警 12:处置单位存储量预警") |
| | | @TableField("TYPE") |
| | | private Integer type; |
| | | |
| | |
| | | @TableField("ORG_CODE") |
| | | private String orgCode; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @TableField("RELATION") |
| | | private String relation; |
| | | |
| | | @ApiModelProperty("单位地址") |
| | | @TableField("ADDRESS") |
| | | private String address; |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.sinata.common.entity.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @TableName("SYS_USER_DEPARTMENT") |
| | | @ApiModel(value = "SysUserDepartment对象", description = "用户区域关系") |
| | | public class SysUserDepartment extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | public class SysUserDepartment { |
| | | |
| | | @ApiModelProperty("用户区域关系表id") |
| | | @TableId(value = "ID", type = IdType.AUTO) |
| | |
| | | @ApiModel("处置单位数据传输对象") |
| | | public class DisposalUnitDTO extends RegulatoryUnitDTO { |
| | | |
| | | @ApiModelProperty("法人代表") |
| | | private String legalPerson; |
| | | |
| | | @ApiModelProperty("医疗废物处置许可证号") |
| | | private String disposalLicenseNumber; |
| | | |
| | | @ApiModelProperty("许可证图片") |
| | | private String disposalLicenseImage; |
| | | |
| | |
| | | @ApiModelProperty("机构性质(数据字典id)") |
| | | private Long institutionType; |
| | | |
| | | @ApiModelProperty("法人代表") |
| | | private String legalPerson; |
| | | |
| | | @ApiModelProperty("每日产废范围起") |
| | | private BigDecimal dailyMinWasteQuantity; |
| | | |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author mitao |
| | |
| | | public class MwBoxDTO { |
| | | |
| | | @ApiModelProperty("转运箱id") |
| | | @NotNull(message = "转运箱id不能为空") |
| | | private Long id; |
| | | @NotEmpty(message = "转运箱id不能为空") |
| | | private List<Long> idList; |
| | | |
| | | @ApiModelProperty("转运箱状态 1:正常 2:丢失 3:破坏") |
| | | @NotNull(message = "转运箱状态不能为空") |
| | |
| | | package com.sinata.system.domain.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | |
| | | @ApiModelProperty("合同生效日期") |
| | | @NotNull(message = "合同生效日期不能为空") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date effectiveDate; |
| | | |
| | | @ApiModelProperty("合同终止日期") |
| | | @NotNull(message = "合同终止日期不能为空") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date terminationDate; |
| | | |
| | | @ApiModelProperty("甲方名称") |
| | |
| | | |
| | | @ApiModelProperty("附件列表") |
| | | private List<MwAttachmentDTO> attachmentList; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @NotBlank(message = "层级关系不能为空") |
| | | private String relation; |
| | | } |
| | |
| | | public class MwMicroEquipmentDTO { |
| | | |
| | | @ApiModelProperty(value = "小型微波设备id", notes = "新增不传,编辑必传") |
| | | @NotNull(message = "设备id不能为空") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("区域id(医院)") |
| | |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @NotBlank(message = "层级关系不能为空") |
| | | private String relation; |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | @ApiModelProperty("附件列表") |
| | | private List<MwAttachmentDTO> attachmentList; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @NotBlank(message = "层级关系不能为空") |
| | | private String relation; |
| | | } |
| | |
| | | @ApiModelProperty("附件列表") |
| | | private List<MwAttachmentDTO> attachmentList; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @NotBlank(message = "层级关系不能为空") |
| | | private String relation; |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | |
| | | |
| | | @ApiModelProperty("附件列表") |
| | | private List<MwAttachmentDTO> attachmentList; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @NotBlank(message = "层级关系不能为空") |
| | | private String relation; |
| | | } |
| | |
| | | @ApiModel("防护作业使用器具数据传输对象") |
| | | public class MwProtectionTaskEquipmentDTO { |
| | | |
| | | @ApiModelProperty("防护作业id") |
| | | private Long protectionTaskId; |
| | | @ApiModelProperty("防护器具id") |
| | | private Long protectionEquipmentId; |
| | | |
| | | @ApiModelProperty("使用量") |
| | | private Integer usageQuantity; |
| | |
| | | @ApiModelProperty("最大容量(箱)") |
| | | @NotNull(message = "最大容量不能为空") |
| | | private Integer maxCapacity; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @NotBlank(message = "层级关系不能为空") |
| | | private String relation; |
| | | } |
| | |
| | | package com.sinata.system.domain.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("车辆id") |
| | | @NotNull(message = "车辆id不能为空") |
| | | private Long carId; |
| | | |
| | | @ApiModelProperty("年检日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date inspectionDate; |
| | | |
| | | @ApiModelProperty("下次年检到期日") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date nextInspectionDate; |
| | | |
| | | @ApiModelProperty("检验机构名称") |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @NotBlank(message = "层级关系不能为空") |
| | | private String relation; |
| | | |
| | | } |
| | |
| | | package com.sinata.system.domain.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | private Long carId; |
| | | |
| | | @ApiModelProperty("保养日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date maintenanceDate; |
| | | |
| | | @ApiModelProperty("保养项目") |
| | |
| | | @ApiModelProperty("关联车辆") |
| | | @NotEmpty(message = "关联车辆不能为空") |
| | | private List<Long> carIdList; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @NotBlank(message = "层级关系不能为空") |
| | | private String relation; |
| | | } |
| | |
| | | @ApiModelProperty("医废类型") |
| | | private Long wasteType; |
| | | |
| | | @ApiModelProperty("医废类型名称") |
| | | private String wasteTypeStr; |
| | | |
| | | @ApiModelProperty("预警值") |
| | | private Integer value; |
| | | |
| | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @NotBlank(message = "层级关系不能为空") |
| | | private String relation; |
| | | |
| | | |
| | | } |
| | |
| | | @NotBlank(message = "区域名称不能为空") |
| | | @Length(max = 20, message = "区域名称长度不能超过20个字符") |
| | | private String departmentName; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @NotBlank(message = "层级关系不能为空") |
| | | private String relation; |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | private String roleName; |
| | | |
| | | @ApiModelProperty(value = "可管理角色", notes = "使用英文逗号拼接") |
| | | @NotBlank(message = "可管理角色不能为空") |
| | | private String manageRoleStr; |
| | | private String manageRoleIdStr; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("菜单id列表") |
| | | @NotEmpty(message = "菜单id列表不能为空") |
| | | private List<Long> menuIds; |
| | | } |
| | |
| | | @ApiModelProperty("角色id") |
| | | @NotNull(message = "角色id不能为空") |
| | | private Long roleId; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | @NotBlank(message = "层级关系不能为空") |
| | | private String relation; |
| | | } |
New file |
| | |
| | | package com.sinata.system.domain.query; |
| | | |
| | | import com.sinata.common.entity.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/30 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel("预警信息查询数据传输对象") |
| | | public class MwWarningRecordQuery extends BasePage { |
| | | |
| | | private static final long serialVersionUID = 5651690991680404403L; |
| | | @ApiModelProperty("机构id") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("预警类型") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("预警状态") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("预警时间段-开始") |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty("预警时间段-结束") |
| | | private Date endTime; |
| | | |
| | | @ApiModelProperty("记录id列表 导出多选") |
| | | private List<Long> idList; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("入库时间-结束") |
| | | private Date collectTimeEnd; |
| | | |
| | | @ApiModelProperty("医废状态 1:暂存中 2:运输中 3:已接收 4:已处置") |
| | | private Integer status; |
| | | } |
| | |
| | | @Data |
| | | @ApiModel("医院报表视图对象") |
| | | public class DepartmentReportVO { |
| | | |
| | | @ApiModelProperty("机构名称") |
| | | private String departmentName; |
| | | |
| | | @ApiModelProperty("设备名称") |
| | | private String equipmentName; |
| | | |
| | | @ApiModelProperty("类别") |
| | | private List<String> legend; |
| | |
| | | @ApiModelProperty("每月产废范围止") |
| | | private BigDecimal monthlyMaxWasteQuantity; |
| | | |
| | | @ApiModelProperty("法人代表") |
| | | private String legalPerson; |
| | | |
| | | @ApiModelProperty("处置单位列表") |
| | | private List<DisposalUnitVO> disposalUnitList; |
| | | |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import cn.idev.excel.annotation.ExcelIgnore; |
| | | import cn.idev.excel.annotation.ExcelProperty; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | private static final long serialVersionUID = -851971023455890457L; |
| | | |
| | | @ApiModelProperty("记录id") |
| | | @ExcelIgnore |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("出库时间") |
| | |
| | | private Date checkoutTime; |
| | | |
| | | @ApiModelProperty("区域id") |
| | | @ExcelIgnore |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("医院名称") |
| | |
| | | private String licensePlateNumber; |
| | | |
| | | @ApiModelProperty("转运线路") |
| | | @ExcelIgnore |
| | | private String routeName; |
| | | |
| | | } |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import cn.idev.excel.annotation.ExcelIgnore; |
| | | import cn.idev.excel.annotation.ExcelProperty; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | public class MwCollectRecordVO { |
| | | |
| | | @ApiModelProperty("收集记录id") |
| | | @ExcelIgnore |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("区域id") |
| | | @ExcelIgnore |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("医院名称") |
| | |
| | | private String hospitalName; |
| | | |
| | | @ApiModelProperty("暂存间id") |
| | | @ExcelIgnore |
| | | private Long stagingRoomId; |
| | | |
| | | @ApiModelProperty("医废编号") |
| | |
| | | private String medicalWasteNumber; |
| | | |
| | | @ApiModelProperty("转运箱id") |
| | | @ExcelIgnore |
| | | private Long boxId; |
| | | |
| | | @ApiModelProperty("箱子编号") |
| | |
| | | private BigDecimal weight; |
| | | |
| | | @ApiModelProperty("出库人员id") |
| | | @ExcelIgnore |
| | | private Long checkoutUserId; |
| | | |
| | | @ApiModelProperty("出库人员姓名") |
| | | @ExcelIgnore |
| | | private String checkoutUserName; |
| | | |
| | | @ApiModelProperty("出库时间") |
| | | @ExcelIgnore |
| | | private Date checkoutTime; |
| | | |
| | | @ApiModelProperty("医废状态 1:暂存中 2:运输中 3:已接收 4:已处置") |
| | |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("封箱时间") |
| | | @ExcelIgnore |
| | | private Date boxTime; |
| | | |
| | | @ApiModelProperty("收集人id") |
| | | @ExcelIgnore |
| | | private Long collectUserId; |
| | | |
| | | @ApiModelProperty("收集人姓名") |
New file |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/31 |
| | | */ |
| | | @Data |
| | | @ApiModel("收集记录预警视图对象") |
| | | public class MwCollectRecordWarningVO { |
| | | |
| | | @ApiModelProperty("收集记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("区域id") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("医院名称") |
| | | private String hospitalName; |
| | | |
| | | @ApiModelProperty("总重量") |
| | | private BigDecimal totalWeight; |
| | | |
| | | @ApiModelProperty("收集时间") |
| | | private Date collectTime; |
| | | |
| | | @ApiModelProperty("每日产废范围起") |
| | | private BigDecimal dailyMinWasteQuantity; |
| | | |
| | | @ApiModelProperty("每日产废范围止") |
| | | private BigDecimal dailyMaxWasteQuantity; |
| | | |
| | | @ApiModelProperty("每月产废范围起") |
| | | private BigDecimal monthlyMinWasteQuantity; |
| | | |
| | | @ApiModelProperty("每月产废范围止") |
| | | private BigDecimal monthlyMaxWasteQuantity; |
| | | |
| | | @ApiModelProperty("医废最大存储量") |
| | | private BigDecimal maximumStorageCapacity; |
| | | } |
| | |
| | | @ApiModelProperty("附件列表") |
| | | private List<MwAttachmentVO> attachmentList; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | private String relation; |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/31 |
| | | */ |
| | | @Data |
| | | @ApiModel("处置单位储量预警视图对象") |
| | | public class MwDisposalRecordWarningVO { |
| | | |
| | | @ApiModelProperty("当前存储量") |
| | | private BigDecimal currentStorage; |
| | | |
| | | @ApiModelProperty("最大存储量") |
| | | private BigDecimal maximumStorageCapacity; |
| | | |
| | | @ApiModelProperty("区域id") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("处置单位名称") |
| | | private String disposalUnitName; |
| | | |
| | | } |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author mitao |
| | |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("医废列表") |
| | | private List<MwStorageRecordVO> medicalWasteList; |
| | | } |
| | | |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | @Data |
| | | @ApiModel("处置分析视图对象") |
| | | public class MwMicroEquipmentStaticsVO { |
| | | |
| | | @ApiModelProperty("袋数") |
| | | private Integer bagNum; |
| | | |
| | | @ApiModelProperty("总重量") |
| | | private BigDecimal totalWeight; |
| | | |
| | | @ApiModelProperty("重量") |
| | | private BigDecimal weight; |
| | | |
| | | @ApiModelProperty("使用时间") |
| | | private Date useTime; |
| | | |
| | | @ApiModelProperty("医废类型") |
| | | private Long wasteType; |
| | | } |
| | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | private String relation; |
| | | |
| | | } |
| | |
| | | private Long protectionEquipmentType; |
| | | |
| | | @ApiModelProperty("器具类型名称") |
| | | private Long protectionEquipmentTypeStr; |
| | | private String protectionEquipmentTypeStr; |
| | | |
| | | @ApiModelProperty("器具名称") |
| | | private String equipmentName; |
| | |
| | | |
| | | @ApiModelProperty("附件列表") |
| | | private List<MwAttachmentVO> attachmentList; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | private String relation; |
| | | } |
| | |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("新增时间") |
| | | private Date creteTime; |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("附件列表") |
| | | private List<MwAttachmentVO> attachmentList; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | private String relation; |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Data |
| | | @ApiModel("防护作业视图对象") |
| | | public class MwProtectionTaskVO { |
| | | |
| | | @ApiModelProperty("防护作业id") |
| | | private Long id; |
| | | |
| | |
| | | |
| | | @ApiModelProperty("附件列表") |
| | | private List<MwAttachmentVO> attachmentList; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | private String relation; |
| | | |
| | | @ApiModelProperty(value = "作业时间") |
| | | private Date createTime; |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/12 |
| | |
| | | @ApiModelProperty("未使用数量") |
| | | private Integer unused; |
| | | |
| | | @ApiModelProperty("使用率") |
| | | private BigDecimal useRate; |
| | | |
| | | @ApiModelProperty("添加时间") |
| | | private String createTime; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | private String relation; |
| | | } |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import cn.idev.excel.annotation.ExcelIgnore; |
| | | import cn.idev.excel.annotation.ExcelProperty; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | @Data |
| | | @ApiModel("暂存间入库视图对象") |
| | | public class MwStorageRecordVO { |
| | | |
| | | @ApiModelProperty("收集记录id") |
| | | @ExcelIgnore |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("区域id") |
| | | @ExcelIgnore |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("医院名称") |
| | |
| | | private String hospitalName; |
| | | |
| | | @ApiModelProperty("暂存间id") |
| | | @ExcelIgnore |
| | | private Long stagingRoomId; |
| | | |
| | | @ApiModelProperty("暂存间名称") |
| | |
| | | private String medicalWasteNumber; |
| | | |
| | | @ApiModelProperty("转运箱id") |
| | | @ExcelIgnore |
| | | private Long boxId; |
| | | |
| | | @ApiModelProperty("箱子编号") |
| | | @ExcelProperty(value = "箱子编号", index = 5) |
| | | private String boxNumber; |
| | | |
| | | @ApiModelProperty("袋数") |
| | | @ExcelIgnore |
| | | private Integer bagNum; |
| | | |
| | | @ApiModelProperty("医废类型(数据字典id)") |
| | | private Integer wasteType; |
| | |
| | | private BigDecimal weight; |
| | | |
| | | @ApiModelProperty("出库人员id") |
| | | @ExcelIgnore |
| | | private Long checkoutUserId; |
| | | |
| | | @ApiModelProperty("出库人员姓名") |
| | | @ExcelIgnore |
| | | private String checkoutUserName; |
| | | |
| | | @ApiModelProperty("出库时间") |
| | | @ExcelIgnore |
| | | private Date checkoutTime; |
| | | |
| | | @ApiModelProperty("医废状态 1:暂存中 2:运输中 3:已接收 4:已处置") |
| | |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("封箱时间") |
| | | @ExcelIgnore |
| | | private Date boxTime; |
| | | |
| | | @ApiModelProperty("收集人id") |
| | | @ExcelIgnore |
| | | private Long collectUserId; |
| | | |
| | | @ApiModelProperty("入库人员") |
| | |
| | | @ApiModelProperty("入库时间") |
| | | @ExcelProperty(value = "入库时间", index = 1) |
| | | private Date collectTime; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | private String relation; |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/31 |
| | | */ |
| | | @Data |
| | | @ApiModel("转运车辆预警视图对象") |
| | | public class MwTransitCarWarningVO { |
| | | |
| | | @ApiModelProperty("车辆id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("区域id(处置单位id)") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("处置单位") |
| | | private String departmentName; |
| | | |
| | | @ApiModelProperty("车牌号") |
| | | private String licensePlateNumber; |
| | | |
| | | @ApiModelProperty("最大载重") |
| | | private BigDecimal maximumLoad; |
| | | |
| | | @ApiModelProperty("当前载重") |
| | | private BigDecimal currentLoad; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("关联车辆") |
| | | private List<MwTransitCarVO> carList; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | private String relation; |
| | | } |
| | | |
| | |
| | | @ApiModelProperty("医废类型") |
| | | private Long wasteType; |
| | | |
| | | @ApiModelProperty("医废类型名称") |
| | | private String wasteTypeStr; |
| | | |
| | | @ApiModelProperty("预警值") |
| | | private Integer value; |
| | | |
New file |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import cn.idev.excel.annotation.ExcelProperty; |
| | | import com.sinata.system.annotation.FastExcel; |
| | | import com.sinata.system.conveter.EConverter; |
| | | import com.sinata.system.enums.WarningStatusEnum; |
| | | import com.sinata.system.enums.WarningTypeEnum; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/30 |
| | | */ |
| | | @Data |
| | | @ApiModel("预警信息视图对象") |
| | | public class MwWarningRecordVO { |
| | | |
| | | @ApiModelProperty("预警记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("预警时间") |
| | | @ExcelProperty(value = "预警时间", index = 1) |
| | | private Date warnTime; |
| | | |
| | | @ApiModelProperty("预警对象id") |
| | | private Long warningTargetId; |
| | | |
| | | @ApiModelProperty("预警对象") |
| | | @ExcelProperty(value = "预警对象", index = 2) |
| | | private String warningTargetName; |
| | | |
| | | @ApiModelProperty("预警类型 1:出库超时预警;2:暂存间使用率预警;3:合同到期预警;4:健康记录预警;5:疫苗记录预警;6:防护用品使用预警;7:医疗机构产废日预警;8:医疗机构产废月预警;9:医疗机构存储量预警;10:车辆转运异常预警;11:处置单位存储量预警") |
| | | @ExcelProperty(value = "预警类型", index = 3, converter = EConverter.class) |
| | | @FastExcel(type = WarningTypeEnum.class) |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("预警消息") |
| | | @ExcelProperty(value = "预警消息", index = 4) |
| | | private String message; |
| | | |
| | | @ApiModelProperty("预警状态 1:未解除;2:已解除") |
| | | @ExcelProperty(value = "预警状态", index = 5) |
| | | @FastExcel(type = WarningStatusEnum.class) |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("单位id") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("单位名称") |
| | | private String departmentName; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | private String relation; |
| | | |
| | | @ApiModelProperty("单位地址") |
| | | private String address; |
| | | } |
| | |
| | | @ApiModelProperty("机构编码") |
| | | private String orgCode; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | private String relation; |
| | | |
| | | @ApiModelProperty("子节点") |
| | | private List<SysDepartmentVO> children = new ArrayList<>(); |
| | | |
| | |
| | | @ApiModelProperty("可管理角色") |
| | | private String manageRoleStr; |
| | | |
| | | @ApiModelProperty("可管理角色id") |
| | | private String manageRoleIdStr; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | |
| | | @ApiModelProperty("用户id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("用户名") |
| | | @ApiModelProperty("姓名") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty("用户名") |
| | |
| | | @ApiModelProperty("账号状态 0:正常 1:停用") |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "机构id") |
| | | @ApiModelProperty(value = "区域/单位id") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty(value = "单位名称") |
| | | private String departmentName; |
| | | |
| | | @ApiModelProperty(value = "登录密码") |
| | | private String password; |
| | | |
| | | @ApiModelProperty("角色id") |
| | | private Long roleId; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | private String relation; |
| | | } |
| | |
| | | @AllArgsConstructor |
| | | public enum WarningConfigTypeEnum { |
| | | MEDICAL_WASTE(1, "医疗废物预警"), |
| | | CONTRACT(2, "合同预警"), |
| | | CONTRACT_EXPIRE(2, "合同预警"), |
| | | STAFF(3, "人员预警"), |
| | | PROTECTION_PERSONNEL(4, "职业防护预警"), |
| | | STAGING_ROOM_CAPACITY(5, "入库暂存间存储容量预警"); |
New file |
| | |
| | | package com.sinata.system.enums; |
| | | |
| | | import lombok.Getter; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum WarningStatusEnum { |
| | | UNRESOLVED(1, "未解除"), |
| | | RESOLVED(2, "已解除"); |
| | | |
| | | private final Integer code; |
| | | private final String desc; |
| | | |
| | | public static WarningStatusEnum getEnumByCode(Integer code) { |
| | | for (WarningStatusEnum e : WarningStatusEnum.values()) { |
| | | if (e.code.equals(code)) { |
| | | return e; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.system.enums; |
| | | |
| | | import lombok.Getter; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum WarningTypeEnum { |
| | | CHECKOUT_TIMEOUT_WARNING(1, "出库超时预警"), |
| | | STAGING_ROOM_USE_RATE_WARNING(2, "暂存间使用率预警"), |
| | | CONTRACT_EXPIRY_WARNING(3, "合同到期预警"), |
| | | HEALTH_RECORD_WARNING(4, "健康记录预警"), |
| | | VACCINE_RECORD_WARNING(5, "疫苗记录预警"), |
| | | PROTECTION_EQUIPMENT_USE_WARNING(6, "防护用品使用预警"), |
| | | PROTECTION_EQUIPMENT_STOCK_WARNING(7, "防护用品库存预警"), |
| | | MEDICAL_INSTITUTION_WASTE_DAY_WARNING(8, "医疗机构产废日预警"), |
| | | MEDICAL_INSTITUTION_WASTE_MONTH_WARNING(9, "医疗机构产废月预警"), |
| | | MEDICAL_INSTITUTION_STORAGE_WARNING(10, "医疗机构存储量预警"), |
| | | TRANSIT_CAR_WARNING(11, "车辆转运异常预警"), |
| | | DISPOSAL_UNIT_STORAGE_WARNING(12, "处置单位存储量预警"); |
| | | |
| | | private final Integer code; |
| | | private final String desc; |
| | | |
| | | public static WarningTypeEnum getEnumByCode(Integer code) { |
| | | for (WarningTypeEnum e : WarningTypeEnum.values()) { |
| | | if (e.code.equals(code)) { |
| | | return e; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | |
| | | import com.sinata.system.domain.vo.MwCheckoutRecordVO; |
| | | import com.sinata.system.domain.vo.MwCollectRecordVO; |
| | | import com.sinata.system.domain.vo.MwMedicalWasteBoxVO; |
| | | import com.sinata.system.domain.vo.MwTransitCarWarningVO; |
| | | import com.sinata.system.domain.vo.MwTransitRecordVO; |
| | | import com.sinata.system.domain.vo.TransformVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | Page<MwTransitRecordVO> transitPageList(Page<MwTransitRecordVO> page, @Param("query") MwTransitRecordQuery query, String treeCode); |
| | | Page<MwTransitRecordVO> transitPageList(Page<MwTransitRecordVO> page, @Param("query") MwTransitRecordQuery query, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 运输记录详情 |
| | |
| | | * @return |
| | | */ |
| | | List<MwCollectRecordVO> getRegulationReportList(@Param("query") DisposalReportQuery query, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 车辆转运异常预警 |
| | | * |
| | | * @return |
| | | */ |
| | | List<MwTransitCarWarningVO> queryWarningList(); |
| | | } |
| | |
| | | package com.sinata.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.sinata.system.domain.MwCollectRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | |
| | | import com.sinata.system.domain.query.MwCollectRecordQuery; |
| | | import com.sinata.system.domain.vo.MedicalWasteProcessVO; |
| | | import com.sinata.system.domain.vo.MwCollectRecordVO; |
| | | import com.sinata.system.domain.vo.MwCollectRecordWarningVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | */ |
| | | List<MwCollectRecordVO> getRegulationReportList(@Param("query") DisposalReportQuery query, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 获取时间类型列表 |
| | | * |
| | | * @param timeType 时间类型 1:日 2:月 |
| | | * @return |
| | | */ |
| | | List<MwCollectRecordWarningVO> queryListTimeType(Integer timeType); |
| | | |
| | | /** |
| | | * 根据医疗机构分组查询医废存储量 |
| | | * |
| | | * @return |
| | | */ |
| | | List<MwCollectRecordWarningVO> queryListGroupByDepartment(); |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 合同 Mapper 接口 |
| | |
| | | * |
| | | * @param page |
| | | * @param query |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | Page<MwContractVO> pageList(Page<MwContractVO> page, @Param("query") MwContractQuery query); |
| | | Page<MwContractVO> pageList(Page<MwContractVO> page, @Param("query") MwContractQuery query, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 查询未过期合同列表 |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | | List<MwContractVO> queryListTerminationDateBeforeNow(Date date); |
| | | } |
| | |
| | | import com.sinata.system.domain.vo.MwDisposalRecordItemVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordReportVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordWarningVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | */ |
| | | List<MwCollectRecordVO> getRegulationReportList(@Param("query") DisposalReportQuery query, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 处置单位存储量预警数据 |
| | | * |
| | | * @return |
| | | */ |
| | | List<MwDisposalRecordWarningVO> queryDisposalListByDepartment(); |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 防护器具 Mapper 接口 |
| | |
| | | * @return |
| | | */ |
| | | Page<MwProtectionEquipmentRecordVO> recordPage(Page<MwProtectionEquipmentRecordVO> page, @Param("id") Long id); |
| | | |
| | | /** |
| | | * 防护器具列表 |
| | | * |
| | | * @return |
| | | */ |
| | | List<MwProtectionEquipmentVO> queryList(); |
| | | } |
| | |
| | | package com.sinata.system.mapper; |
| | | |
| | | import com.sinata.system.domain.MwProtectionEquipmentRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.sinata.system.domain.MwProtectionEquipmentRecord; |
| | | import com.sinata.system.domain.vo.MwProtectionEquipmentRecordVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Mapper |
| | | public interface MwProtectionEquipmentRecordMapper extends BaseMapper<MwProtectionEquipmentRecord> { |
| | | |
| | | /** |
| | | * 查询指定器具一个月的使用记录 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<MwProtectionEquipmentRecordVO> findByEquipmentIdAndUsageTimeAfter(@Param("id") Long id); |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 职工 Mapper 接口 |
| | |
| | | * @return |
| | | */ |
| | | Page<MwStaffVO> pageList(Page<MwStaffVO> page, @Param("query") MwStaffQuery query, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 职工列表 |
| | | * |
| | | * @return |
| | | */ |
| | | List<MwStaffVO> queryList(); |
| | | } |
| | |
| | | /** |
| | | * 暂存间分页列表 |
| | | * |
| | | * @param objectPage |
| | | * @param mwStagingRoomVOPage |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | Page<MwStagingRoomVO> pageList(Page<Object> objectPage, @Param("treeCode") String treeCode); |
| | | Page<MwStagingRoomVO> pageList(Page<MwStagingRoomVO> mwStagingRoomVOPage, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 暂存间入库记录 |
| | |
| | | * @return |
| | | */ |
| | | List<MwCheckoutRecordVO> checkoutRecordList(@Param("query") CheckoutRecordQuery query, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 暂存间列表 |
| | | * |
| | | * @return |
| | | */ |
| | | List<MwStagingRoomVO> queryStagingRoomList(); |
| | | |
| | | /** |
| | | * 暂存间待处理医废分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Page<MwStorageRecordVO> temporarilyStoredMedicalWaste(StorageRecordQuery query); |
| | | |
| | | /** |
| | | * 根据医废查询使用列表 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<MwStorageRecordVO> queryMedicalWasteList(Long id); |
| | | } |
| | |
| | | package com.sinata.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.sinata.system.domain.MwWarningRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.sinata.system.domain.query.MwWarningRecordQuery; |
| | | import com.sinata.system.domain.vo.MwWarningRecordVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Mapper |
| | | public interface MwWarningRecordMapper extends BaseMapper<MwWarningRecord> { |
| | | /** |
| | | * 预警信息分页列表 |
| | | * |
| | | * @param page |
| | | * @param query |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | Page<MwWarningRecordVO> pageList(Page<MwWarningRecordVO> page, @Param("query") MwWarningRecordQuery query, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 预警信息列表 |
| | | * |
| | | * @param page |
| | | * @param query |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | List<MwWarningRecordVO> queryList(Page<MwWarningRecordVO> page, @Param("query") MwWarningRecordQuery query, @Param("treeCode") String treeCode); |
| | | } |
| | |
| | | List<SysMenu> selectListByRoleId(@Param("roleId") Long roleId); |
| | | |
| | | List<SysMenu> getAllInIds(@Param("menusId") List<Long> menusId); |
| | | |
| | | /** |
| | | * 菜单列表 |
| | | * |
| | | * @return |
| | | */ |
| | | List<SysMenu> selectList(); |
| | | } |
| | |
| | | * 分页查询用户 |
| | | * |
| | | * @param sysUserVOPage |
| | | * @param departmentId |
| | | * @param nickName |
| | | * @param roleId |
| | | * @return |
| | | */ |
| | | Page<SysUserVO> pageList(Page<SysUserVO> sysUserVOPage, @Param("departmentId") Long departmentId, @Param("nickName") String nickName, @Param("roleId") Long roleId, @Param("treeCode") String treeCode); |
| | | Page<SysUserVO> pageList(Page<SysUserVO> sysUserVOPage, @Param("nickName") String nickName, @Param("roleId") Long roleId, @Param("treeCode") String treeCode); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.sinata.common.core.domain.entity.SysDictData; |
| | | import com.sinata.common.entity.BasePage; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.dto.SysDictDataDTO; |
| | | import com.sinata.system.domain.query.KeyWordQuery; |
| | | import com.sinata.system.domain.vo.SysDictDataVO; |
| | | |
| | | import java.util.List; |
| | |
| | | */ |
| | | public int updateDictData(SysDictData dictData); |
| | | |
| | | PageDTO<SysDictDataVO> pageList(BasePage page); |
| | | PageDTO<SysDictDataVO> pageList(KeyWordQuery query); |
| | | |
| | | /** |
| | | * 新增 |
| | |
| | | * @return |
| | | */ |
| | | List<SysDictDataVO> workTypeList(); |
| | | |
| | | /** |
| | | * 医疗机构级别 |
| | | * |
| | | * @return |
| | | */ |
| | | List<SysDictDataVO> institutionLevelList(); |
| | | |
| | | /** |
| | | * 医疗机构性质 |
| | | * |
| | | * @return |
| | | */ |
| | | List<SysDictDataVO> institutionTypeList(); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<SysMenu> selectListByRoleId(Long roleId); |
| | | |
| | | /** |
| | | * 菜单列表 |
| | | * |
| | | * @return |
| | | */ |
| | | List<SysMenu> selectList(); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<SysMenu> roleInfoFromUserId(Long userId); |
| | | |
| | | /** |
| | | * 角色列表 |
| | | * |
| | | * @return |
| | | */ |
| | | List<SysRoleVO> queryList(); |
| | | } |
| | |
| | | package com.sinata.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.MwBox; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.sinata.system.domain.dto.MwBoxDTO; |
| | | import com.sinata.system.domain.query.MwBoxPageQuery; |
| | | import com.sinata.system.domain.vo.BoxStatisticsVO; |
| | | import com.sinata.system.domain.vo.MwBoxVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @param dtoList |
| | | * @return |
| | | */ |
| | | void editBatch(List<MwBoxDTO> dtoList); |
| | | void editBatch(MwBoxDTO dtoList); |
| | | } |
| | |
| | | import com.sinata.system.domain.vo.MwCheckoutRecordVO; |
| | | import com.sinata.system.domain.vo.MwCollectRecordVO; |
| | | import com.sinata.system.domain.vo.MwMedicalWasteBoxVO; |
| | | import com.sinata.system.domain.vo.MwTransitCarWarningVO; |
| | | import com.sinata.system.domain.vo.MwTransitRecordVO; |
| | | import com.sinata.system.domain.vo.TransformVO; |
| | | |
| | |
| | | List<CollectTotalUpDto> totalUp5(Long departmentId); |
| | | List<CollectTotalUpDto> totalUp3(LocalDate date1,LocalDate date2, Long departmentId); |
| | | List<CollectTotalUpDto> totalUp1(Long outId); |
| | | |
| | | /** |
| | | * 车辆转运异常预警 |
| | | * |
| | | * @return |
| | | */ |
| | | List<MwTransitCarWarningVO> queryWarningList(); |
| | | } |
| | |
| | | import com.sinata.system.domain.query.MwCollectRecordQuery; |
| | | import com.sinata.system.domain.vo.MedicalWasteProcessVO; |
| | | import com.sinata.system.domain.vo.MwCollectRecordVO; |
| | | import com.sinata.system.domain.vo.MwCollectRecordWarningVO; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | |
| | | * @return |
| | | */ |
| | | List<MwCollectRecordVO> getRegulationReportList(DisposalReportQuery query); |
| | | |
| | | /** |
| | | * 查询昨日产废记录 |
| | | * |
| | | * @return |
| | | */ |
| | | List<MwCollectRecordWarningVO> queryListByDay(); |
| | | |
| | | /** |
| | | * 查询上月产废记录 |
| | | * |
| | | * @return |
| | | */ |
| | | List<MwCollectRecordWarningVO> queryListByMonth(); |
| | | |
| | | /** |
| | | * @return |
| | | */ |
| | | List<MwCollectRecordWarningVO> queryListGroupByDepartment(); |
| | | } |
| | |
| | | import com.sinata.system.domain.query.MwContractQuery; |
| | | import com.sinata.system.domain.vo.MwContractVO; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 合同 服务类 |
| | |
| | | * @return |
| | | */ |
| | | void delete(Long id); |
| | | |
| | | /** |
| | | * 查询待过期合同列表 |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | | List<MwContractVO> queryListTerminationDateBeforeNow(Date date); |
| | | } |
| | |
| | | import com.sinata.system.domain.vo.MwDisposalRecordItemVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordReportVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordWarningVO; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<MwCollectRecordVO> getRegulationReportList(DisposalReportQuery query); |
| | | |
| | | /** |
| | | * 处置单位存储量预警 |
| | | * |
| | | * @return |
| | | */ |
| | | List<MwDisposalRecordWarningVO> queryDisposalListByDepartment(); |
| | | } |
| | |
| | | import com.sinata.system.domain.dto.MwMicroEquipmentRecordDTO; |
| | | import com.sinata.system.domain.query.MwMicroEquipmentRecordQuery; |
| | | import com.sinata.system.domain.query.MwMicroEquipmentStaticsQuery; |
| | | import com.sinata.system.domain.vo.DepartmentReportVO; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentRecordVO; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentStaticsTitleVO; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | PageDTO<MwMicroEquipmentRecordVO> pageList(MwMicroEquipmentRecordQuery query); |
| | | |
| | | /** |
| | | * 设备使用详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | MwMicroEquipmentRecordVO detail(Long id); |
| | | |
| | | /** |
| | | * 导出设备使用记录 |
| | |
| | | * @param query |
| | | * @return |
| | | */ |
| | | List<List<String>> getStaticsData(MwMicroEquipmentStaticsQuery query); |
| | | DepartmentReportVO getStaticsData(MwMicroEquipmentStaticsQuery query); |
| | | |
| | | /** |
| | | * 处置分析导出 |
| | |
| | | * @param response |
| | | */ |
| | | void staticsExport(MwMicroEquipmentStaticsQuery query, HttpServletResponse response) throws IOException; |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.sinata.system.domain.MwProtectionEquipmentRecord; |
| | | import com.sinata.system.domain.vo.MwProtectionEquipmentRecordVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-12-02 |
| | | */ |
| | | public interface MwProtectionEquipmentRecordService extends IService<MwProtectionEquipmentRecord> { |
| | | |
| | | /** |
| | | * 查询指定器具一个月的使用记录 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<MwProtectionEquipmentRecordVO> findByEquipmentIdAndUsageTimeAfter(Long id); |
| | | } |
| | |
| | | import com.sinata.system.domain.vo.MwProtectionEquipmentRecordVO; |
| | | import com.sinata.system.domain.vo.MwProtectionEquipmentVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 防护器具 服务类 |
| | |
| | | * @return |
| | | */ |
| | | void delete(Long id); |
| | | |
| | | /** |
| | | * 防护器具列表 |
| | | * |
| | | * @return |
| | | */ |
| | | List<MwProtectionEquipmentVO> queryList(); |
| | | } |
| | |
| | | import com.sinata.system.domain.query.MwStaffQuery; |
| | | import com.sinata.system.domain.vo.MwStaffVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 职工 服务类 |
| | |
| | | * @return |
| | | */ |
| | | void edit(MwStaffDTO dto); |
| | | |
| | | /** |
| | | * 职工列表 |
| | | * |
| | | * @return |
| | | */ |
| | | List<MwStaffVO> queryList(); |
| | | } |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @param response |
| | | */ |
| | | void checkoutRecordExport(CheckoutRecordQuery query, HttpServletResponse response) throws IOException; |
| | | |
| | | /** |
| | | * 暂存间列表 |
| | | * |
| | | * @return |
| | | */ |
| | | List<MwStagingRoomVO> queryStagingRoomList(); |
| | | |
| | | /** |
| | | * 暂存间待处理医废分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwStorageRecordVO> temporarilyStoredMedicalWaste(StorageRecordQuery query); |
| | | |
| | | /** |
| | | * 根据设备id查询医废列表 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<MwStorageRecordVO> queryMedicalWasteList(Long id); |
| | | } |
| | |
| | | package com.sinata.system.service; |
| | | |
| | | import com.sinata.system.domain.MwWarningRecord; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.MwWarningRecord; |
| | | import com.sinata.system.domain.query.MwWarningRecordQuery; |
| | | import com.sinata.system.domain.vo.MwWarningRecordVO; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-12-02 |
| | | */ |
| | | public interface MwWarningRecordService extends IService<MwWarningRecord> { |
| | | /** |
| | | * 分页查询预警记录 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwWarningRecordVO> pageList(MwWarningRecordQuery query); |
| | | |
| | | /** |
| | | * 解除 |
| | | * |
| | | * @param id |
| | | */ |
| | | void relieve(Long id); |
| | | |
| | | /** |
| | | * 导出 |
| | | * |
| | | * @param query |
| | | * @throws IOException |
| | | */ |
| | | void export(MwWarningRecordQuery query) throws IOException; |
| | | |
| | | } |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public DepartmentReportVO hospitalReport(HospitalReportQuery query) { |
| | | DepartmentReportVO vo = new DepartmentReportVO(); |
| | | SysDepartment department = sysDepartmentService.getById(query.getDepartmentId()); |
| | | if (Objects.nonNull(department)) { |
| | | vo.setDepartmentName(department.getDepartmentName()); |
| | | } |
| | | List<SysDictDataVO> wasteTypeList = sysDictDataService.medicalWasteTypeList(); |
| | | |
| | | if (CollUtils.isEmpty(wasteTypeList)) { |
| | |
| | | totalCount = totalCount.add(currentCount); |
| | | totalWeight = totalWeight.add(weight); |
| | | } |
| | | itemVO.getData().add(totalCount); |
| | | itemVO.getData().add(totalWeight); |
| | | //查询预警记录判断是否超时 |
| | | if (query.getDateType().equals(1)) { |
| | | itemVO.setOverTimeFlag("否"); |
| | | List<Long> collectIdList = collectRecordList.stream().filter(e -> finalSdf.format(e.getCollectTime()).equals(date)).map(MwCollectRecord::getId).collect(Collectors.toList()); |
| | | List<MwWarningRecord> warningRecordList = mwWarningRecordService.lambdaQuery().in(MwWarningRecord::getWarningTargetId, collectIdList).list(); |
| | | if (CollUtils.isNotEmpty(warningRecordList)) { |
| | | itemVO.setOverTimeFlag("是"); |
| | | if (CollUtils.isNotEmpty(collectIdList)) { |
| | | List<MwWarningRecord> warningRecordList = mwWarningRecordService.lambdaQuery().in(MwWarningRecord::getWarningTargetId, collectIdList).list(); |
| | | if (CollUtils.isNotEmpty(warningRecordList)) { |
| | | itemVO.setOverTimeFlag("是"); |
| | | } |
| | | } |
| | | } |
| | | list.add(itemVO); |
| | |
| | | public DepartmentReportVO transformList(TransformQuery query) { |
| | | DepartmentReportVO vo = new DepartmentReportVO(); |
| | | SysDepartment department = sysDepartmentService.getById(query.getDepartmentId()); |
| | | if (Objects.nonNull(department)) { |
| | | vo.setDepartmentName(department.getDepartmentName()); |
| | | } |
| | | SysDepartment region = sysDepartmentService.getDepartmentByParentId(department.getParentId()); |
| | | List<SysDepartment> hospitalList = sysDepartmentService.lambdaQuery().likeRight(SysDepartment::getTreeCode, region.getTreeCode()).eq(SysDepartment::getOrgType, DepartmentEnum.MEDICAL_INSTITUTION.getCode()).list(); |
| | | if (CollUtils.isNotEmpty(hospitalList)) { |
| | |
| | | */ |
| | | public DepartmentReportVO disposalReport(DisposalReportQuery query) { |
| | | DepartmentReportVO vo = new DepartmentReportVO(); |
| | | SysDepartment department = sysDepartmentService.getById(query.getDepartmentId()); |
| | | if (Objects.nonNull(department)) { |
| | | vo.setDepartmentName(department.getDepartmentName()); |
| | | } |
| | | //已接收 |
| | | List<MwDisposalRecordReportVO> receivedList = mwDisposalRecordService.disposalReceiveReport(query); |
| | | //已处置 |
| | |
| | | */ |
| | | public DepartmentReportVO regulationReport(DisposalReportQuery query) { |
| | | DepartmentReportVO vo = new DepartmentReportVO(); |
| | | SysDepartment department = sysDepartmentService.getById(query.getDepartmentId()); |
| | | if (Objects.nonNull(department)) { |
| | | vo.setDepartmentName(department.getDepartmentName()); |
| | | } |
| | | //医废产生量 |
| | | List<MwCollectRecordVO> collectRecordList = mwCollectRecordService.getRegulationReportList(query); |
| | | //医废转移量 |
| | |
| | | for (String date : dateList) { |
| | | DepartmentReportItemVO departmentReportItemVO = new DepartmentReportItemVO(); |
| | | departmentReportItemVO.setName(date); |
| | | departmentReportItemVO.setData(new ArrayList<>()); |
| | | SimpleDateFormat finalSdf = sdf; |
| | | for (SysDictData sysDictData : wasteTypeList) { |
| | | BigDecimal weight = collectRecordList.stream().filter(e -> e.getWasteType().equals(sysDictData.getDictCode()) && |
New file |
| | |
| | | package com.sinata.system.service.biz; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.sinata.common.utils.CollUtils; |
| | | import com.sinata.common.utils.DateUtils; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.domain.MwCollectRecord; |
| | | import com.sinata.system.domain.MwWarningConfig; |
| | | import com.sinata.system.domain.MwWarningConfigItem; |
| | | import com.sinata.system.domain.MwWarningRecord; |
| | | import com.sinata.system.domain.vo.MwCollectRecordWarningVO; |
| | | import com.sinata.system.domain.vo.MwContractVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordWarningVO; |
| | | import com.sinata.system.domain.vo.MwProtectionEquipmentRecordVO; |
| | | import com.sinata.system.domain.vo.MwProtectionEquipmentVO; |
| | | import com.sinata.system.domain.vo.MwStaffVO; |
| | | import com.sinata.system.domain.vo.MwStagingRoomVO; |
| | | import com.sinata.system.domain.vo.MwTransitCarWarningVO; |
| | | import com.sinata.system.enums.MedicalWasteStatusEnum; |
| | | import com.sinata.system.enums.WarningConfigTypeEnum; |
| | | import com.sinata.system.enums.WarningStatusEnum; |
| | | import com.sinata.system.enums.WarningTypeEnum; |
| | | import com.sinata.system.service.MwCheckoutRecordService; |
| | | import com.sinata.system.service.MwCollectRecordService; |
| | | import com.sinata.system.service.MwContractService; |
| | | import com.sinata.system.service.MwDisposalRecordService; |
| | | import com.sinata.system.service.MwProtectionEquipmentRecordService; |
| | | import com.sinata.system.service.MwProtectionEquipmentService; |
| | | import com.sinata.system.service.MwStaffService; |
| | | import com.sinata.system.service.MwStagingRoomService; |
| | | import com.sinata.system.service.MwWarningConfigItemService; |
| | | import com.sinata.system.service.MwWarningConfigService; |
| | | import com.sinata.system.service.MwWarningRecordService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.jetbrains.annotations.NotNull; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/31 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class TaskService { |
| | | private final MwWarningConfigService mwWarningConfigService; |
| | | private final MwWarningConfigItemService mwWarningConfigItemService; |
| | | private final MwCollectRecordService mwCollectRecordService; |
| | | private final MwWarningRecordService mwWarningRecordService; |
| | | private final MwStagingRoomService mwStagingRoomService; |
| | | private final MwContractService mwContractService; |
| | | private final MwStaffService mwStaffService; |
| | | private final MwProtectionEquipmentService mwProtectionEquipmentService; |
| | | private final MwProtectionEquipmentRecordService mwProtectionEquipmentRecordService; |
| | | private final MwCheckoutRecordService mwCheckoutRecordService; |
| | | private final MwDisposalRecordService mwDisposalRecordService; |
| | | |
| | | /** |
| | | * 出库超时预警 |
| | | */ |
| | | public void checkoutOverTime() { |
| | | // 获取配置 |
| | | MwWarningConfig config = mwWarningConfigService.getOne( |
| | | Wrappers.lambdaQuery(MwWarningConfig.class) |
| | | .eq(MwWarningConfig::getType, WarningConfigTypeEnum.MEDICAL_WASTE.getCode()) |
| | | .last("LIMIT 1") |
| | | ); |
| | | |
| | | if (Objects.isNull(config)) { |
| | | log.info("【出库超时预警】:未找到【医疗废弃物】的预警配置,跳过定时任务执行"); |
| | | return; |
| | | } |
| | | // 获取配置项 |
| | | List<MwWarningConfigItem> configItems = mwWarningConfigItemService.lambdaQuery() |
| | | .eq(MwWarningConfigItem::getConfigId, config.getId()) |
| | | .list(); |
| | | |
| | | if (CollUtils.isEmpty(configItems)) { |
| | | log.info("【出库超时预警】:未找到相关配置项,跳过定时任务执行"); |
| | | return; |
| | | } |
| | | |
| | | // 查询暂存间医废记录 |
| | | List<MwCollectRecord> collectRecordList = mwCollectRecordService.lambdaQuery() |
| | | .eq(MwCollectRecord::getStatus, MedicalWasteStatusEnum.TEMPORARILY_STORED.getCode()) |
| | | .list(); |
| | | |
| | | if (CollUtils.isEmpty(collectRecordList)) { |
| | | log.info("【出库超时预警】:没有暂存的医废记录,跳过定时任务执行"); |
| | | return; |
| | | } |
| | | |
| | | // 遍历配置项并处理预警 |
| | | for (MwWarningConfigItem configItem : configItems) { |
| | | // 过滤出需要预警的记录 |
| | | List<MwCollectRecord> recordList = collectRecordList.stream() |
| | | .filter(item -> item.getWasteType().equals(configItem.getWasteType()) && |
| | | DateUtils.timeDistanceHour(new Date(), item.getCollectTime()) > configItem.getValue()) |
| | | .collect(Collectors.toList()); |
| | | |
| | | if (CollUtils.isEmpty(recordList)) { |
| | | continue; // 如果没有需要预警的记录,则跳过 |
| | | } |
| | | |
| | | // 创建预警记录并保存 |
| | | List<MwWarningRecord> warningRecordList = recordList.stream().map(item -> { |
| | | Long id = item.getId(); |
| | | String medicalWasteNumber = item.getMedicalWasteNumber(); |
| | | String hospitalName = item.getHospitalName(); |
| | | String msg = String.format("%s医废超过%d小时未出库", item.getWasteTypeStr(), configItem.getValue()); |
| | | String currentValue = String.valueOf(DateUtils.timeDistanceHour(new Date(), item.getCollectTime())); |
| | | Long departmentId = item.getDepartmentId(); |
| | | String configValue = configItem.getValue().toString(); |
| | | return getMwWarningRecord(WarningTypeEnum.CHECKOUT_TIMEOUT_WARNING.getCode(), id, medicalWasteNumber, hospitalName, msg, departmentId, currentValue, configValue); |
| | | }).collect(Collectors.toList()); |
| | | |
| | | // 批量保存预警记录 |
| | | if (!warningRecordList.isEmpty()) { |
| | | mwWarningRecordService.saveBatch(warningRecordList); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 封装预警记录 |
| | | * |
| | | * @param id |
| | | * @param warningTargetName |
| | | * @param departmentName |
| | | * @param message |
| | | * @param departmentId |
| | | * @param currentValue |
| | | * @param normalRange |
| | | * @return |
| | | */ |
| | | @NotNull |
| | | private static MwWarningRecord getMwWarningRecord(Integer type, Long id, String warningTargetName, String departmentName, String message, Long departmentId, String currentValue, String normalRange) { |
| | | MwWarningRecord warningRecord = new MwWarningRecord(); |
| | | warningRecord.setType(type); |
| | | warningRecord.setWarningTargetId(id); |
| | | warningRecord.setWarningTargetName(warningTargetName); |
| | | warningRecord.setDepartmentName(departmentName); |
| | | warningRecord.setMessage(message); |
| | | warningRecord.setDepartmentId(departmentId); |
| | | warningRecord.setCurrentValue(currentValue); |
| | | warningRecord.setNormalRange(normalRange); |
| | | warningRecord.setStatus(WarningStatusEnum.UNRESOLVED.getCode()); |
| | | warningRecord.setWarnTime(new Date()); |
| | | return warningRecord; |
| | | } |
| | | |
| | | /** |
| | | * 暂存间使用率预警 |
| | | */ |
| | | public void stagingRoomStorage() { |
| | | //查询预警配置 |
| | | MwWarningConfig config = mwWarningConfigService.getOne( |
| | | Wrappers.lambdaQuery(MwWarningConfig.class) |
| | | .eq(MwWarningConfig::getType, WarningConfigTypeEnum.STAGING_ROOM_CAPACITY.getCode()) |
| | | .last("LIMIT 1") |
| | | ); |
| | | if (Objects.isNull(config)) { |
| | | log.info("【暂存间使用率预警】:未找到【暂存间使用率预警】的预警配置,跳过定时任务执行"); |
| | | return; |
| | | } |
| | | // 获取配置项 |
| | | List<MwWarningConfigItem> configItems = mwWarningConfigItemService.lambdaQuery() |
| | | .eq(MwWarningConfigItem::getConfigId, config.getId()).orderByDesc(MwWarningConfigItem::getValue) |
| | | .list(); |
| | | if (CollUtils.isEmpty(configItems)) { |
| | | log.info("【暂存间使用率预警】:未找到相关配置项,跳过定时任务执行"); |
| | | return; |
| | | } |
| | | List<MwStagingRoomVO> stagingRoomList = mwStagingRoomService.queryStagingRoomList(); |
| | | if (CollUtils.isEmpty(stagingRoomList)) { |
| | | log.info("【暂存间使用率预警】:暂存间列表为空,跳过定时任务执行"); |
| | | return; |
| | | } |
| | | List<MwWarningRecord> warningRecordList = new ArrayList<>(); |
| | | for (MwWarningConfigItem configItem : configItems) { |
| | | Integer configValue = configItem.getValue(); |
| | | warningRecordList.addAll(stagingRoomList.stream().filter(room -> room.getUseRate().compareTo(BigDecimal.valueOf(configValue)) >= 0).map(room -> { |
| | | Long id = room.getId(); |
| | | String roomName = room.getRoomName(); |
| | | String hospitalName = room.getHospitalName(); |
| | | String promptContent = configItem.getPromptContent(); |
| | | String msg = String.format("%s%s%s", room.getRoomName(), promptContent, configValue + "%"); |
| | | Long departmentId = room.getDepartmentId(); |
| | | String useRate = room.getUseRate().toString(); |
| | | return getMwWarningRecord(WarningTypeEnum.STAGING_ROOM_USE_RATE_WARNING.getCode(), id, roomName, hospitalName, msg, departmentId, useRate, configValue.toString()); |
| | | }).collect(Collectors.toList())); |
| | | } |
| | | //保存预警记录 |
| | | mwWarningRecordService.saveBatch(warningRecordList); |
| | | } |
| | | |
| | | /** |
| | | * 合同到期预警 |
| | | */ |
| | | public void contractExpire() { |
| | | //查询合同预警配置 |
| | | MwWarningConfig config = mwWarningConfigService.getOne( |
| | | Wrappers.lambdaQuery(MwWarningConfig.class) |
| | | .eq(MwWarningConfig::getType, WarningConfigTypeEnum.CONTRACT_EXPIRE.getCode()) |
| | | .last("LIMIT 1") |
| | | ); |
| | | if (Objects.isNull(config)) { |
| | | log.info("【合同到期预警】:未找到【合同到期预警】的预警配置,跳过定时任务执行"); |
| | | return; |
| | | } |
| | | int advanceDays = Integer.parseInt(config.getValue()); |
| | | List<MwContractVO> list = mwContractService.queryListTerminationDateBeforeNow(new Date()); |
| | | List<MwWarningRecord> warningRecordList = list.stream().filter(contract -> { |
| | | long distanceDay = DateUtils.timeDistanceDay(contract.getTerminationDate(), new Date()); |
| | | return distanceDay <= advanceDays; |
| | | }).map(contract -> { |
| | | String msg = String.format("合同【%s】即将到期", contract.getContractName()); |
| | | return getMwWarningRecord(WarningTypeEnum.CONTRACT_EXPIRY_WARNING.getCode(), contract.getId(), contract.getContractName(), |
| | | contract.getDepartmentName(), msg, contract.getDepartmentId(), |
| | | String.valueOf(DateUtils.timeDistanceDay(contract.getTerminationDate(), new Date())), config.getValue()); |
| | | }).collect(Collectors.toList()); |
| | | //保存预警记录 |
| | | mwWarningRecordService.saveBatch(warningRecordList); |
| | | } |
| | | |
| | | /** |
| | | * 健康记录预警、人员记录预警 |
| | | */ |
| | | public void healthRecord() { |
| | | //查询人员预警配置 |
| | | MwWarningConfig config = mwWarningConfigService.getOne( |
| | | Wrappers.lambdaQuery(MwWarningConfig.class) |
| | | .eq(MwWarningConfig::getType, WarningConfigTypeEnum.STAFF.getCode()) |
| | | .last("LIMIT 1")); |
| | | if (Objects.isNull(config)) { |
| | | log.info("【健康记录预警】【人员记录预警】:未找到人员预警配置,跳过定时任务执行"); |
| | | return; |
| | | } |
| | | List<MwStaffVO> list = mwStaffService.queryList(); |
| | | List<MwWarningRecord> warningRecordList = new ArrayList<>(); |
| | | if (config.getHealthFlag().equals(1)) { |
| | | warningRecordList.addAll(list.stream().filter(staff -> StringUtils.isBlank(staff.getHealthCertificate())).map(staff -> { |
| | | String msg = String.format("职工【%s】健康记录未上传", staff.getStaffName()); |
| | | return getMwWarningRecord(WarningTypeEnum.HEALTH_RECORD_WARNING.getCode(), staff.getId(), staff.getStaffName(), staff.getDepartmentName(), msg, staff.getDepartmentId(), "否", "是"); |
| | | }).collect(Collectors.toList())); |
| | | } |
| | | if (config.getVaccineFlag().equals(1)) { |
| | | warningRecordList.addAll(list.stream().filter(staff -> StringUtils.isBlank(staff.getVaccineCertificate())).map(staff -> { |
| | | String msg = String.format("职工【%s】疫苗记录未上传", staff.getStaffName()); |
| | | return getMwWarningRecord(WarningTypeEnum.VACCINE_RECORD_WARNING.getCode(), staff.getId(), staff.getStaffName(), staff.getDepartmentName(), msg, staff.getDepartmentId(), "否", "是"); |
| | | }).collect(Collectors.toList())); |
| | | } |
| | | //保存记录 |
| | | mwWarningRecordService.saveBatch(warningRecordList); |
| | | } |
| | | |
| | | /** |
| | | * 防护用品使用预警 防护用品库存预警 |
| | | */ |
| | | public void protectionEquipmentUse() { |
| | | //查询职业防护预警配置 |
| | | MwWarningConfig config = mwWarningConfigService.getOne( |
| | | Wrappers.lambdaQuery(MwWarningConfig.class) |
| | | .eq(MwWarningConfig::getType, WarningConfigTypeEnum.PROTECTION_PERSONNEL.getCode()) |
| | | .last("LIMIT 1")); |
| | | if (Objects.isNull(config)) { |
| | | log.info("【防护用品使用预警】【防护用品库存预警】:未找到职业防护预警配置,跳过定时任务执行"); |
| | | return; |
| | | } |
| | | List<MwWarningRecord> warningRecordList = new ArrayList<>(); |
| | | //查询防护设备列表 |
| | | List<MwProtectionEquipmentVO> protectionEquipmentVOList = mwProtectionEquipmentService.queryList(); |
| | | //防护器具使用预警 |
| | | if (config.getProtectionFlag().equals(1)) { |
| | | warningRecordList.addAll(protectionEquipmentVOList.stream().map(item -> { |
| | | List<MwProtectionEquipmentRecordVO> recordVOList = mwProtectionEquipmentRecordService.findByEquipmentIdAndUsageTimeAfter(item.getId()); |
| | | if (CollUtils.isEmpty(recordVOList)) { |
| | | String msg = String.format("【%s】30天没有产生使用记录", item.getEquipmentName()); |
| | | return getMwWarningRecord(WarningTypeEnum.PROTECTION_EQUIPMENT_USE_WARNING.getCode(), item.getId(), |
| | | item.getEquipmentName(), item.getDepartmentName(), msg, item.getDepartmentId(), "一个月内无使用记录", "一个月内有使用记录"); |
| | | } |
| | | return null; |
| | | }).filter(Objects::nonNull).collect(Collectors.toList())); |
| | | } |
| | | //防护器具库存预警 |
| | | warningRecordList.addAll(protectionEquipmentVOList.stream().filter(item -> item.getStock() <= Integer.parseInt(config.getValue())).map(item -> { |
| | | String msg = String.format("%s库存量低于%s", item.getEquipmentName(), config.getValue()); |
| | | return getMwWarningRecord(WarningTypeEnum.PROTECTION_EQUIPMENT_STOCK_WARNING.getCode(), item.getId(), |
| | | item.getEquipmentName(), item.getDepartmentName(), msg, item.getDepartmentId(), String.valueOf(item.getStock()), config.getValue()); |
| | | }).collect(Collectors.toList())); |
| | | //保存记录 |
| | | mwWarningRecordService.saveBatch(warningRecordList); |
| | | } |
| | | |
| | | /** |
| | | * 医疗机构产废日预警 |
| | | */ |
| | | public void medicalInstitutionWasteDay() { |
| | | //查询医废收集记录 |
| | | List<MwCollectRecordWarningVO> collectRecordVOList = mwCollectRecordService.queryListByDay(); |
| | | if (CollUtils.isNotEmpty(collectRecordVOList)) { |
| | | List<MwWarningRecord> warningRecordList = collectRecordVOList.stream().filter(item -> item.getTotalWeight().compareTo(item.getDailyMaxWasteQuantity()) > 0).map(item -> { |
| | | String msg = String.format("日产废量超过%f", item.getDailyMaxWasteQuantity()); |
| | | return getMwWarningRecord(WarningTypeEnum.MEDICAL_INSTITUTION_WASTE_DAY_WARNING.getCode(), item.getDepartmentId(), |
| | | item.getHospitalName(), item.getHospitalName(), msg, item.getDepartmentId(), item.getTotalWeight().toString(), item.getDailyMinWasteQuantity() + "-" + item.getDailyMaxWasteQuantity()); |
| | | }).collect(Collectors.toList()); |
| | | //保存预警记录 |
| | | mwWarningRecordService.saveBatch(warningRecordList); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 医疗机构产废月预警 |
| | | */ |
| | | public void medicalInstitutionWasteMonth() { |
| | | List<MwCollectRecordWarningVO> collectRecordVOList = mwCollectRecordService.queryListByMonth(); |
| | | if (CollUtils.isNotEmpty(collectRecordVOList)) { |
| | | List<MwWarningRecord> warningRecordList = collectRecordVOList.stream().filter(item -> item.getTotalWeight().compareTo(item.getDailyMaxWasteQuantity()) > 0).map(item -> { |
| | | String msg = String.format("日产废量超过%f", item.getDailyMaxWasteQuantity()); |
| | | return getMwWarningRecord(WarningTypeEnum.MEDICAL_INSTITUTION_WASTE_MONTH_WARNING.getCode(), item.getDepartmentId(), |
| | | item.getHospitalName(), item.getHospitalName(), msg, item.getDepartmentId(), item.getTotalWeight().toString(), item.getMonthlyMinWasteQuantity() + "-" + item.getMonthlyMaxWasteQuantity()); |
| | | }).collect(Collectors.toList()); |
| | | //保存预警记录 |
| | | mwWarningRecordService.saveBatch(warningRecordList); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 医疗机构存储量预警 |
| | | */ |
| | | public void medicalInstitutionStorage() { |
| | | List<MwCollectRecordWarningVO> collectRecordVOList = mwCollectRecordService.queryListGroupByDepartment(); |
| | | if (CollUtils.isNotEmpty(collectRecordVOList)) { |
| | | List<MwWarningRecord> warningRecordList = collectRecordVOList.stream().map(item -> { |
| | | if (item.getTotalWeight().compareTo(item.getMaximumStorageCapacity()) > 0) { |
| | | String msg = "医疗废物存储量超过最大值"; |
| | | return getMwWarningRecord(WarningTypeEnum.MEDICAL_INSTITUTION_STORAGE_WARNING.getCode(), item.getDepartmentId(), |
| | | item.getHospitalName(), item.getHospitalName(), msg, item.getDepartmentId(), item.getTotalWeight().toString(), item.getMaximumStorageCapacity().toString()); |
| | | } |
| | | return null; |
| | | }).filter(Objects::nonNull).collect(Collectors.toList()); |
| | | //保存预警记录 |
| | | mwWarningRecordService.saveBatch(warningRecordList); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 车辆转运异常预警 |
| | | */ |
| | | public void transitCar() { |
| | | List<MwTransitCarWarningVO> transitCarWarningVOList = mwCheckoutRecordService.queryWarningList(); |
| | | if (CollUtils.isNotEmpty(transitCarWarningVOList)) { |
| | | List<MwWarningRecord> warningRecordList = transitCarWarningVOList.stream() |
| | | .filter(item -> item.getCurrentLoad().compareTo(item.getMaximumLoad()) > 0).map(item -> { |
| | | String msg = String.format("%s转运的医废超过最大载重", item.getLicensePlateNumber()); |
| | | return getMwWarningRecord(WarningTypeEnum.TRANSIT_CAR_WARNING.getCode(), item.getId(), item.getLicensePlateNumber(), |
| | | item.getDepartmentName(), msg, item.getDepartmentId(), item.getCurrentLoad().toString(), item.getMaximumLoad().toString()); |
| | | }).collect(Collectors.toList()); |
| | | //保存预警记录 |
| | | mwWarningRecordService.saveBatch(warningRecordList); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 处置单位存储量预警 |
| | | */ |
| | | public void disposalUnitStorage() { |
| | | List<MwDisposalRecordWarningVO> disposalRecordWarningVOList = mwDisposalRecordService.queryDisposalListByDepartment(); |
| | | if (CollUtils.isNotEmpty(disposalRecordWarningVOList)) { |
| | | List<MwWarningRecord> warningRecordList = disposalRecordWarningVOList.stream().filter(item -> item.getCurrentStorage().compareTo(item.getMaximumStorageCapacity()) > 0).map(item -> { |
| | | String msg = "医疗废物存储量超过最大值"; |
| | | return getMwWarningRecord(WarningTypeEnum.DISPOSAL_UNIT_STORAGE_WARNING.getCode(), item.getDepartmentId(), item.getDisposalUnitName(), |
| | | item.getDisposalUnitName(), msg, item.getDepartmentId(), item.getCurrentStorage().toString(), item.getMaximumStorageCapacity().toString()); |
| | | }).collect(Collectors.toList()); |
| | | //保存预警记录 |
| | | mwWarningRecordService.saveBatch(warningRecordList); |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.enums.BoxProcessEnum; |
| | | import com.sinata.system.enums.BoxStatusEnum; |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.CollUtils; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.domain.MwBox; |
| | |
| | | import com.sinata.system.domain.query.MwBoxPageQuery; |
| | | import com.sinata.system.domain.vo.BoxStatisticsVO; |
| | | import com.sinata.system.domain.vo.MwBoxVO; |
| | | import com.sinata.system.enums.BoxProcessEnum; |
| | | import com.sinata.system.enums.BoxStatusEnum; |
| | | import com.sinata.system.mapper.MwBoxMapper; |
| | | import com.sinata.system.service.MwBoxService; |
| | | import org.springframework.dao.DuplicateKeyException; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void editBatch(List<MwBoxDTO> dtoList) { |
| | | List<MwBox> mwBoxes = BeanUtils.copyToList(dtoList, MwBox.class); |
| | | this.updateBatchById(mwBoxes); |
| | | public void editBatch(MwBoxDTO dto) { |
| | | List<Long> idList = dto.getIdList(); |
| | | List<MwBox> boxList = idList.stream().map(id -> { |
| | | MwBox mwBox = new MwBox(); |
| | | mwBox.setStatus(dto.getStatus()); |
| | | mwBox.setRemark(dto.getRemark()); |
| | | return mwBox; |
| | | }).collect(Collectors.toList()); |
| | | this.updateBatchById(boxList); |
| | | } |
| | | } |
| | |
| | | import com.sinata.system.domain.vo.MwCheckoutRecordVO; |
| | | import com.sinata.system.domain.vo.MwCollectRecordVO; |
| | | import com.sinata.system.domain.vo.MwMedicalWasteBoxVO; |
| | | import com.sinata.system.domain.vo.MwTransitCarWarningVO; |
| | | import com.sinata.system.domain.vo.MwTransitRecordVO; |
| | | import com.sinata.system.domain.vo.TransformVO; |
| | | import com.sinata.system.mapper.MwCheckoutRecordMapper; |
| | |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | return baseMapper.getRegulationReportList(query, treeCode); |
| | | } |
| | | |
| | | /** |
| | | * 车辆转运异常预警 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MwTransitCarWarningVO> queryWarningList() { |
| | | return baseMapper.queryWarningList(); |
| | | } |
| | | } |
| | |
| | | import com.sinata.system.domain.query.MwCollectRecordQuery; |
| | | import com.sinata.system.domain.vo.MedicalWasteProcessVO; |
| | | import com.sinata.system.domain.vo.MwCollectRecordVO; |
| | | import com.sinata.system.domain.vo.MwCollectRecordWarningVO; |
| | | import com.sinata.system.mapper.MwCollectRecordMapper; |
| | | import com.sinata.system.service.MwCollectRecordService; |
| | | import com.sinata.system.service.SysDepartmentService; |
| | |
| | | public List<CollectCarTotalUpDto> carGroup(Long carId) { |
| | | return this.baseMapper.carGroup(carId); |
| | | } |
| | | |
| | | /** |
| | | * 查询日产废记录 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MwCollectRecordWarningVO> queryListByDay() { |
| | | return baseMapper.queryListTimeType(1); |
| | | } |
| | | |
| | | /** |
| | | * 查询月产废记录 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MwCollectRecordWarningVO> queryListByMonth() { |
| | | return baseMapper.queryListTimeType(2); |
| | | } |
| | | |
| | | @Override |
| | | public List<MwCollectRecordWarningVO> queryListGroupByDepartment() { |
| | | return baseMapper.queryListGroupByDepartment(); |
| | | } |
| | | } |
| | |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.CollUtils; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.domain.MwAttachment; |
| | | import com.sinata.system.domain.MwContract; |
| | | import com.sinata.system.domain.SysDepartment; |
| | | import com.sinata.system.domain.dto.MwContractDTO; |
| | | import com.sinata.system.domain.query.MwContractQuery; |
| | | import com.sinata.system.domain.vo.MwAttachmentVO; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public PageDTO<MwContractVO> pageList(MwContractQuery query) { |
| | | if (Objects.isNull(query.getDepartmentId())) { |
| | | SysDepartment myDepartment = sysDepartmentService.getMyDepartment(); |
| | | if (Objects.isNull(myDepartment)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | query.setDepartmentId(myDepartment.getId()); |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | Page<MwContractVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query); |
| | | Page<MwContractVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | | |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void add(MwContractDTO dto) { |
| | | MwContract mwContract = BeanUtils.copyBean(dto, MwContract.class); |
| | | save(mwContract); |
| | | if (CollUtils.isNotEmpty(dto.getAttachmentList())) { |
| | | List<MwAttachment> mwAttachments = BeanUtils.copyToList(dto.getAttachmentList(), MwAttachment.class); |
| | | mwAttachments.forEach(attachment -> { |
| | |
| | | //执行删除 |
| | | removeById(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询未过期合同列表 |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MwContractVO> queryListTerminationDateBeforeNow(Date date) { |
| | | return baseMapper.queryListTerminationDateBeforeNow(date); |
| | | } |
| | | } |
| | |
| | | import com.sinata.system.domain.vo.MwDisposalRecordItemVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordReportVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordWarningVO; |
| | | import com.sinata.system.mapper.MwDisposalHandleRecordMapper; |
| | | import com.sinata.system.mapper.MwDisposalRecordMapper; |
| | | import com.sinata.system.service.MwDisposalRecordService; |
| | |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | return baseMapper.getRegulationReportList(query, treeCode); |
| | | } |
| | | |
| | | /** |
| | | * 处置单位存储量预警数据 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MwDisposalRecordWarningVO> queryDisposalListByDepartment() { |
| | | return baseMapper.queryDisposalListByDepartment(); |
| | | } |
| | | } |
| | |
| | | import com.google.common.collect.Lists; |
| | | import com.sinata.common.core.domain.entity.SysDictData; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.CollUtils; |
| | | import com.sinata.common.utils.DateUtils; |
| | | import com.sinata.common.utils.SecurityUtils; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.domain.MwCollectRecord; |
| | | import com.sinata.system.domain.MwMicroEquipment; |
| | | import com.sinata.system.domain.MwMicroEquipmentRecord; |
| | | import com.sinata.system.domain.MwMicroEquipmentRecordItem; |
| | | import com.sinata.system.domain.SysDepartment; |
| | | import com.sinata.system.domain.dto.MwMicroEquipmentRecordDTO; |
| | | import com.sinata.system.domain.query.MwMicroEquipmentRecordQuery; |
| | | import com.sinata.system.domain.query.MwMicroEquipmentStaticsQuery; |
| | | import com.sinata.system.domain.vo.DepartmentReportItemVO; |
| | | import com.sinata.system.domain.vo.DepartmentReportVO; |
| | | import com.sinata.system.domain.vo.MwCollectRecordVO; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentRecordVO; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentStaticsTitleVO; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentStaticsVO; |
| | | import com.sinata.system.domain.vo.SysDictDataVO; |
| | | import com.sinata.system.enums.MedicalWasteStatusEnum; |
| | | import com.sinata.system.mapper.MwMicroEquipmentRecordMapper; |
| | | import com.sinata.system.service.ISysDictDataService; |
| | | import com.sinata.system.service.MwCollectRecordService; |
| | | import com.sinata.system.service.MwMicroEquipmentRecordItemService; |
| | | import com.sinata.system.service.MwMicroEquipmentRecordService; |
| | | import com.sinata.system.service.MwMicroEquipmentService; |
| | | import com.sinata.system.service.MwStagingRoomService; |
| | | import com.sinata.system.service.SysDepartmentService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | private final MwCollectRecordService mwCollectRecordService; |
| | | private final MwMicroEquipmentRecordItemService mwMicroEquipmentRecordItemService; |
| | | private final ISysDictDataService sysDictDataService; |
| | | private final MwStagingRoomService mwStagingRoomService; |
| | | private final MwMicroEquipmentService mwMicroEquipmentService; |
| | | |
| | | /** |
| | | * 设备使用记录分页列表 |
| | |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | return PageDTO.of(baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode)); |
| | | } |
| | | |
| | | @Override |
| | | public MwMicroEquipmentRecordVO detail(Long id) { |
| | | MwMicroEquipmentRecordVO mwMicroEquipmentRecordVO = BeanUtils.copyBean(this.getById(id), MwMicroEquipmentRecordVO.class); |
| | | if (Objects.nonNull(mwMicroEquipmentRecordVO)) { |
| | | mwMicroEquipmentRecordVO.setMedicalWasteList(mwStagingRoomService.queryMedicalWasteList(mwMicroEquipmentRecordVO.getId())); |
| | | } |
| | | return mwMicroEquipmentRecordVO; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<List<String>> getStaticsData(MwMicroEquipmentStaticsQuery query) { |
| | | public DepartmentReportVO getStaticsData(MwMicroEquipmentStaticsQuery query) { |
| | | DepartmentReportVO vo = new DepartmentReportVO(); |
| | | SysDepartment department = sysDepartmentService.getById(query.getDepartmentId()); |
| | | if (Objects.nonNull(department)) { |
| | | vo.setDepartmentName(department.getDepartmentName()); |
| | | } |
| | | MwMicroEquipment microEquipment = mwMicroEquipmentService.getById(query.getEquipmentId()); |
| | | vo.setEquipmentName(microEquipment.getEquipmentName()); |
| | | List<SysDictDataVO> wasteTypeList = sysDictDataService.medicalWasteTypeList(); |
| | | |
| | | if (CollUtils.isEmpty(wasteTypeList)) { |
| | | return vo; |
| | | } |
| | | vo.setLegend(wasteTypeList.stream().map(SysDictDataVO::getDictLabel).collect(Collectors.toList())); |
| | | vo.getLegend().add("小计"); |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | List<SysDictData> medicalWasteTypeList = sysDictDataService.lambdaQuery().eq(SysDictData::getDictType, "medical_waste_type").list(); |
| | | |
| | | List<MwMicroEquipmentStaticsVO> staticsData = baseMapper.getStaticsData(query, treeCode); |
| | | SimpleDateFormat sdf = new SimpleDateFormat(DateUtils.YYYY_MM_DD_HH_MM_SS); |
| | | switch (query.getDateType()) { |
| | |
| | | break; |
| | | } |
| | | List<String> dateList = DateUtils.getDayBetween(query.getStartTime(), query.getEndTime(), query.getDateType()); |
| | | List<List<String>> result = new ArrayList<>(); |
| | | if (CollUtils.isNotEmpty(staticsData)) { |
| | | List<DepartmentReportItemVO> result = new ArrayList<>(); |
| | | for (String date : dateList) { |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(date); |
| | | DepartmentReportItemVO departmentReportItemVO = new DepartmentReportItemVO(); |
| | | departmentReportItemVO.setName(date); |
| | | departmentReportItemVO.setData(new ArrayList<>()); |
| | | SimpleDateFormat finalSdf = sdf; |
| | | BigDecimal totalWeight = BigDecimal.ZERO; |
| | | BigDecimal totalCount = BigDecimal.ZERO; |
| | | for (SysDictData sysDictData : medicalWasteTypeList) { |
| | | BigDecimal weight = staticsData.stream().filter(e -> e.getWasteType().equals(sysDictData.getDictCode()) |
| | | && finalSdf.format(e.getUseTime()).equals(date) |
| | | ).map(MwMicroEquipmentStaticsVO::getWeight).reduce(BigDecimal::add).orElse(BigDecimal.ZERO).setScale(2, RoundingMode.HALF_UP); |
| | | ).map(MwMicroEquipmentStaticsVO::getWeight).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(2, RoundingMode.HALF_UP); |
| | | long count = staticsData.stream().filter(e -> e.getWasteType().equals(sysDictData.getDictCode()) |
| | | && finalSdf.format(e.getUseTime()).equals(date)).count(); |
| | | list.add(weight.toString()); |
| | | list.add(String.valueOf(count)); |
| | | departmentReportItemVO.getData().add(weight); |
| | | departmentReportItemVO.getData().add(BigDecimal.valueOf(count)); |
| | | totalWeight = totalWeight.add(weight); |
| | | totalCount = totalCount.add(BigDecimal.valueOf(count)); |
| | | } |
| | | staticsData.stream().filter(e -> finalSdf.format(e.getUseTime()).equals(date)).findFirst().ifPresent(item -> { |
| | | list.add(item.getTotalWeight().toString()); |
| | | list.add(String.valueOf(item.getBagNum())); |
| | | }); |
| | | result.add(list); |
| | | departmentReportItemVO.getData().add(totalWeight); |
| | | departmentReportItemVO.getData().add(totalCount); |
| | | result.add(departmentReportItemVO); |
| | | } |
| | | vo.setList(result); |
| | | } |
| | | return result; |
| | | return vo; |
| | | } |
| | | |
| | | @Override |
| | |
| | | .head(head) |
| | | .autoCloseStream(Boolean.TRUE) |
| | | .sheet("处置分析报表") |
| | | .doWrite(getStaticsData(query)); |
| | | .doWrite(getStaticsReportData(query)); |
| | | } |
| | | |
| | | /** |
| | | * 导出报表数据 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | private List<List<Object>> getStaticsReportData(MwMicroEquipmentStaticsQuery query) { |
| | | DepartmentReportVO vo = getStaticsData(query); |
| | | if (CollUtils.isNotEmpty(vo.getList())) { |
| | | List<List<Object>> result = new ArrayList<>(); |
| | | for (DepartmentReportItemVO departmentReportItemVO : vo.getList()) { |
| | | List<Object> data = new ArrayList<>(); |
| | | data.add(departmentReportItemVO.getName()); |
| | | data.addAll(departmentReportItemVO.getData()); |
| | | result.add(data); |
| | | } |
| | | return result; |
| | | } |
| | | return CollUtils.emptyList(); |
| | | } |
| | | |
| | | /** |
| | | * 导出报表表头 |
| | | * |
| | | * @return |
| | | */ |
| | | private List<List<String>> head() { |
| | | List<SysDictData> medicalWasteTypeList = sysDictDataService.lambdaQuery().eq(SysDictData::getDictType, "medical_waste_type").list(); |
| | | List<List<String>> headTitles = Lists.newArrayList(); |
| | |
| | | headTitles.add(Lists.newArrayList("小计", "总数量")); |
| | | return headTitles; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.CollUtils; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.domain.MwMicroEquipment; |
| | | import com.sinata.system.domain.SysDepartment; |
| | |
| | | import com.sinata.system.domain.query.StorageRecordQuery; |
| | | import com.sinata.system.domain.vo.MwMedicalWasteBoxVO; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentVO; |
| | | import com.sinata.system.enums.DepartmentEnum; |
| | | import com.sinata.system.enums.MicroEquipmentStatusEnum; |
| | | import com.sinata.system.mapper.MwMicroEquipmentMapper; |
| | | import com.sinata.system.service.MwMicroEquipmentService; |
| | |
| | | @Override |
| | | public List<MwMicroEquipmentVO> getList() { |
| | | SysDepartment myDepartment = sysDepartmentService.getMyDepartment(); |
| | | if (Objects.nonNull(myDepartment)) { |
| | | //TODO 待完善 |
| | | List<MwMicroEquipment> list = this.lambdaQuery() |
| | | .eq(MwMicroEquipment::getStatus, MicroEquipmentStatusEnum.NORMAL.getCode()).list(); |
| | | return BeanUtils.copyList(list, MwMicroEquipmentVO.class); |
| | | /*if (Objects.nonNull(myDepartment)) { |
| | | if (myDepartment.getOrgType().equals(DepartmentEnum.MEDICAL_INSTITUTION.getCode())) { |
| | | List<MwMicroEquipment> list = this.lambdaQuery() |
| | | .eq(MwMicroEquipment::getStatus, MicroEquipmentStatusEnum.NORMAL.getCode()) |
| | |
| | | return BeanUtils.copyList(list, MwMicroEquipmentVO.class); |
| | | } |
| | | } |
| | | return CollUtils.emptyList(); |
| | | return CollUtils.emptyList();*/ |
| | | |
| | | } |
| | | } |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.system.domain.MwProtectionEquipmentRecord; |
| | | import com.sinata.system.domain.dto.MwProtectionEquipmentRecordDTO; |
| | | import com.sinata.system.domain.vo.MwProtectionEquipmentRecordVO; |
| | | import com.sinata.system.mapper.MwProtectionEquipmentRecordMapper; |
| | | import com.sinata.system.service.MwProtectionEquipmentRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class MwProtectionEquipmentRecordServiceImpl extends ServiceImpl<MwProtectionEquipmentRecordMapper, MwProtectionEquipmentRecord> implements MwProtectionEquipmentRecordService { |
| | | |
| | | /** |
| | | * 查询指定器具一个月的使用记录 |
| | | * |
| | | * @param id |
| | | * @param oneMonthAgo |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MwProtectionEquipmentRecordVO> findByEquipmentIdAndUsageTimeAfter(Long id) { |
| | | return baseMapper.findByEquipmentIdAndUsageTimeAfter(id); |
| | | } |
| | | } |
| | |
| | | return PageDTO.of(page); |
| | | } |
| | | |
| | | /** |
| | | * 防护器具列表 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MwProtectionEquipmentVO> queryList() { |
| | | return baseMapper.queryList(); |
| | | } |
| | | } |
| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | |
| | | } |
| | | updateById(mwStaff); |
| | | } |
| | | |
| | | /** |
| | | * 职工列表 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MwStaffVO> queryList() { |
| | | return baseMapper.queryList(); |
| | | } |
| | | } |
| | |
| | | if (Objects.isNull(dto.getId())) { |
| | | throw new ServiceException("暂存间id不能为空"); |
| | | } |
| | | MwStagingRoom mwStagingRoom = BeanUtils.copyBean(dto, MwStagingRoom.class); |
| | | updateById(mwStagingRoom); |
| | | } |
| | | |
| | | /** |
| | |
| | | response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); |
| | | FastExcel.write(response.getOutputStream(), MwCheckoutRecordVO.class).sheet("暂存间出库记录").doWrite(list); |
| | | } |
| | | |
| | | @Override |
| | | public List<MwStagingRoomVO> queryStagingRoomList() { |
| | | return baseMapper.queryStagingRoomList(); |
| | | } |
| | | |
| | | /** |
| | | * 暂存间待处理医废分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageDTO<MwStorageRecordVO> temporarilyStoredMedicalWaste(StorageRecordQuery query) { |
| | | return PageDTO.of(baseMapper.temporarilyStoredMedicalWaste(query)); |
| | | } |
| | | |
| | | /** |
| | | * 根据医废查询使用列表 |
| | | * |
| | | * @param id 微波设备id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MwStorageRecordVO> queryMedicalWasteList(Long id) { |
| | | return baseMapper.queryMedicalWasteList(id); |
| | | } |
| | | } |
| | |
| | | import com.sinata.system.domain.dto.MwWarningConfigDTO; |
| | | import com.sinata.system.domain.vo.MwWarningConfigItemVO; |
| | | import com.sinata.system.domain.vo.MwWarningConfigVO; |
| | | import com.sinata.system.domain.vo.SysDictDataVO; |
| | | import com.sinata.system.enums.WarningConfigTypeEnum; |
| | | import com.sinata.system.mapper.MwWarningConfigMapper; |
| | | import com.sinata.system.service.ISysDictDataService; |
| | | import com.sinata.system.service.MwWarningConfigItemService; |
| | | import com.sinata.system.service.MwWarningConfigService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RequiredArgsConstructor |
| | | public class MwWarningConfigServiceImpl extends ServiceImpl<MwWarningConfigMapper, MwWarningConfig> implements MwWarningConfigService { |
| | | private final MwWarningConfigItemService mwWarningConfigItemService; |
| | | |
| | | private final ISysDictDataService sysDictDataService; |
| | | /** |
| | | * 保存设置 |
| | | * |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveConfig(MwWarningConfigDTO dto) { |
| | | MwWarningConfig mwWarningConfig = lambdaQuery().eq(MwWarningConfig::getType, dto.getType()).last("limit 1").oneOpt().orElse(new MwWarningConfig()); |
| | | BeanUtils.copyProperties(dto, mwWarningConfig); |
| | | MwWarningConfig mwWarningConfig = BeanUtil.copyProperties(dto, MwWarningConfig.class); |
| | | MwWarningConfig config = lambdaQuery().eq(MwWarningConfig::getType, dto.getType()).last("limit 1").one(); |
| | | if (Objects.nonNull(config)) { |
| | | mwWarningConfig.setId(config.getId()); |
| | | } |
| | | saveOrUpdate(mwWarningConfig); |
| | | if (dto.getType().equals(WarningConfigTypeEnum.MEDICAL_WASTE.getCode()) || dto.getType().equals(WarningConfigTypeEnum.STAGING_ROOM_CAPACITY.getCode())) { |
| | | if (CollUtils.isEmpty(dto.getWarningConfigItemList())) { |
| | |
| | | //清空配置项 |
| | | mwWarningConfigItemService.lambdaUpdate().eq(MwWarningConfigItem::getConfigId, mwWarningConfig.getId()).remove(); |
| | | List<MwWarningConfigItem> mwWarningConfigItems = BeanUtil.copyToList(dto.getWarningConfigItemList(), MwWarningConfigItem.class); |
| | | mwWarningConfigItems.forEach(item -> item.setConfigId(mwWarningConfig.getId())); |
| | | mwWarningConfigItems.forEach(item -> { |
| | | item.setConfigId(mwWarningConfig.getId()); |
| | | item.setId(null); |
| | | }); |
| | | mwWarningConfigItemService.saveBatch(mwWarningConfigItems); |
| | | } |
| | | } |
| | |
| | | MwWarningConfigVO mwWarningConfigVO = null; |
| | | if (Objects.nonNull(mwWarningConfig)) { |
| | | mwWarningConfigVO = BeanUtil.copyProperties(mwWarningConfig, MwWarningConfigVO.class); |
| | | if (type.equals(WarningConfigTypeEnum.MEDICAL_WASTE.getCode()) || type.equals(WarningConfigTypeEnum.STAGING_ROOM_CAPACITY.getCode())) { |
| | | List<MwWarningConfigItem> mwWarningConfigItems = mwWarningConfigItemService.lambdaQuery().eq(MwWarningConfigItem::getConfigId, mwWarningConfig.getId()).list(); |
| | | List<MwWarningConfigItem> mwWarningConfigItems = mwWarningConfigItemService.lambdaQuery().eq(MwWarningConfigItem::getConfigId, mwWarningConfig.getId()).list(); |
| | | if (type.equals(WarningConfigTypeEnum.MEDICAL_WASTE.getCode())) { |
| | | mwWarningConfigVO.setWarningConfigItemList(BeanUtil.copyToList(mwWarningConfigItems, MwWarningConfigItemVO.class)); |
| | | if (CollUtils.isEmpty(mwWarningConfigItems)) { |
| | | List<SysDictDataVO> sysDictDataVOS = sysDictDataService.medicalWasteTypeList(); |
| | | List<MwWarningConfigItemVO> res = sysDictDataVOS.stream().map(item -> { |
| | | MwWarningConfigItemVO vo = new MwWarningConfigItemVO(); |
| | | vo.setWasteType(item.getDictCode()); |
| | | vo.setWasteTypeStr(item.getDictLabel()); |
| | | return vo; |
| | | }).collect(Collectors.toList()); |
| | | mwWarningConfigVO.setWarningConfigItemList(res); |
| | | } |
| | | |
| | | } |
| | | if (type.equals(WarningConfigTypeEnum.STAGING_ROOM_CAPACITY.getCode())) { |
| | | mwWarningConfigVO.setWarningConfigItemList(BeanUtil.copyToList(mwWarningConfigItems, MwWarningConfigItemVO.class)); |
| | | } |
| | | } |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import cn.idev.excel.FastExcel; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.domain.MwWarningRecord; |
| | | import com.sinata.system.domain.query.MwWarningRecordQuery; |
| | | import com.sinata.system.domain.vo.MwWarningRecordVO; |
| | | import com.sinata.system.enums.WarningStatusEnum; |
| | | import com.sinata.system.mapper.MwWarningRecordMapper; |
| | | import com.sinata.system.service.MwWarningRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.system.service.SysDepartmentService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class MwWarningRecordServiceImpl extends ServiceImpl<MwWarningRecordMapper, MwWarningRecord> implements MwWarningRecordService { |
| | | private final SysDepartmentService sysDepartmentService; |
| | | private final HttpServletResponse response; |
| | | |
| | | /** |
| | | * 预警信息分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageDTO<MwWarningRecordVO> pageList(MwWarningRecordQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | Page<MwWarningRecordVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | | |
| | | /** |
| | | * 解除预警 |
| | | * |
| | | * @param id |
| | | */ |
| | | @Override |
| | | public void relieve(Long id) { |
| | | lambdaUpdate().set(MwWarningRecord::getStatus, WarningStatusEnum.RESOLVED.getCode()).eq(MwWarningRecord::getId, id).update(); |
| | | } |
| | | |
| | | @Override |
| | | public void export(MwWarningRecordQuery query) throws IOException { |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return; |
| | | } |
| | | List<MwWarningRecordVO> list = baseMapper.queryList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | String fileName = URLEncoder.encode("预警信息", "UTF-8").replaceAll("\\+", "%20"); |
| | | response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); |
| | | |
| | | FastExcel.write(response.getOutputStream(), MwWarningRecordVO.class) |
| | | .sheet("预警信息") |
| | | .doWrite(list); |
| | | } |
| | | } |
| | |
| | | .like(StringUtils.isNotEmpty(query.getDepartmentName()), SysDepartment::getDepartmentName, query.getDepartmentName()) |
| | | .like(StringUtils.isNotBlank(query.getContactPerson()), SysDepartment::getContactPerson, query.getContactPerson()) |
| | | .like(StringUtils.isNotBlank(query.getContactPhone()), SysDepartment::getContactPhone, query.getContactPhone()) |
| | | .eq(SysDepartment::getOrgType, DepartmentEnum.REGULATORY_UNIT.getCode()) |
| | | .page(new Page<>(query.getPageCurr(), query.getPageSize())); |
| | | return PageDTO.of(page, RegulatoryUnitVO.class); |
| | | } |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import cn.idev.excel.util.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.common.core.domain.entity.SysDictData; |
| | | import com.sinata.common.core.domain.entity.SysDictType; |
| | | import com.sinata.common.entity.BasePage; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.DictUtils; |
| | | import com.sinata.system.domain.dto.SysDictDataDTO; |
| | | import com.sinata.system.domain.query.KeyWordQuery; |
| | | import com.sinata.system.domain.vo.SysDictDataVO; |
| | | import com.sinata.system.mapper.SysDictDataMapper; |
| | | import com.sinata.system.mapper.SysDictTypeMapper; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public PageDTO<SysDictDataVO> pageList(BasePage page) { |
| | | Page<SysDictData> result = this.lambdaQuery().page(new Page<>(page.getPageCurr(), page.getPageSize())); |
| | | public PageDTO<SysDictDataVO> pageList(KeyWordQuery query) { |
| | | Page<SysDictData> result = this.lambdaQuery().like(StringUtils.isNotBlank(query.getKeyword()), SysDictData::getDictLabel, query.getKeyword()).page(new Page<>(query.getPageCurr(), query.getPageSize())); |
| | | return PageDTO.of(result, SysDictDataVO.class); |
| | | } |
| | | |
| | |
| | | public List<SysDictDataVO> workTypeList() { |
| | | return getSysDictDataVOListByType("protective_work_type"); |
| | | } |
| | | |
| | | @Override |
| | | public List<SysDictDataVO> institutionLevelList() { |
| | | return getSysDictDataVOListByType("institution_level"); |
| | | } |
| | | |
| | | @Override |
| | | public List<SysDictDataVO> institutionTypeList() { |
| | | return getSysDictDataVOListByType("institution_type"); |
| | | } |
| | | } |
| | |
| | | public List<SysMenu> selectListByRoleId(Long roleId) { |
| | | return menuMapper.selectListByRoleId(roleId); |
| | | } |
| | | |
| | | @Override |
| | | public List<SysMenu> selectList() { |
| | | return menuMapper.selectList(); |
| | | } |
| | | } |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.common.annotation.DataScope; |
| | |
| | | if (!this.checkRoleNameUnique(sysRole)) { |
| | | throw new ServiceException("保存角色'" + sysRole.getRoleName() + "'失败,角色名称已存在"); |
| | | } |
| | | if (Objects.nonNull(sysRole.getRoleId())) { |
| | | if (Objects.isNull(sysRole.getRoleId())) { |
| | | baseMapper.insert(sysRole); |
| | | } else { |
| | | // 删除角色与菜单关联 |
| | | roleMenuMapper.deleteRoleMenuByRoleId(sysRole.getRoleId()); |
| | | baseMapper.updateById(sysRole); |
| | | } |
| | | insertRoleMenu(sysRole); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public List<SysRoleVO> getManageRoleList(LoginUser loginUser) { |
| | | List<SysRoleVO> res = CollUtils.emptyList(); |
| | | Long roleId = loginUser.getUser().getRoleId(); |
| | | SysRole role = this.getById(roleId); |
| | | if (Objects.nonNull(role)) { |
| | | List<SysRole> list = this.lambdaQuery().in(SysRole::getRoleId, Arrays.asList(role.getManageRoleIdStr().split(","))).list(); |
| | | if (CollUtils.isNotEmpty(list)) { |
| | | res = BeanUtils.copyToList(list, SysRoleVO.class); |
| | | Long userId = loginUser.getUserId(); |
| | | SysUserRole sysUserRole = userRoleMapper.selectOne(Wrappers.lambdaQuery(SysUserRole.class).eq(SysUserRole::getUserId, userId).last("LIMIT 1")); |
| | | if (Objects.nonNull(sysUserRole)) { |
| | | SysRole role = this.getById(sysUserRole.getRoleId()); |
| | | if (Objects.nonNull(role)) { |
| | | List<SysRole> list = this.lambdaQuery().in(SysRole::getRoleId, Arrays.asList(role.getManageRoleIdStr().split(","))).list(); |
| | | if (CollUtils.isNotEmpty(list)) { |
| | | res = BeanUtils.copyToList(list, SysRoleVO.class); |
| | | } |
| | | } |
| | | } |
| | | return res; |
| | |
| | | // 获取当前的权限菜单(有层级) |
| | | return this.getMenuLevelList(menusId); |
| | | } |
| | | |
| | | /** |
| | | * 角色列表 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<SysRoleVO> queryList() { |
| | | List<SysRole> list = list(); |
| | | return BeanUtils.copyToList(list, SysRoleVO.class); |
| | | } |
| | | } |
| | |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | Page<SysUserVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query.getDepartmentId(), query.getNickName(), query.getRoleId(), treeCode); |
| | | Page<SysUserVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query.getNickName(), query.getRoleId(), treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | | |
| | |
| | | <if test="query.startTime != null and query.endTime != null"> |
| | | AND MCR.CHECKOUT_TIME BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | <if test="query.wasteTypeList != null and query.wasteTypeList.size()>0"> |
| | | <if test="query.wasteTypeCodeList != null and query.wasteTypeCodeList.size()>0"> |
| | | AND MCR2.WASTE_TYPE IN |
| | | <foreach collection="query.wasteTypeList" item="wasteType" separator="," open="(" close=")"> |
| | | <foreach collection="query.wasteTypeCodeList" item="wasteType" separator="," open="(" close=")"> |
| | | #{wasteType} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="queryWarningList" resultType="com.sinata.system.domain.vo.MwTransitCarWarningVO"> |
| | | SELECT MTC.ID, |
| | | MTC.LICENSE_PLATE_NUMBER, |
| | | MTC.MAXIMUM_LOAD, |
| | | MTC.DEPARTMENT_ID, SD.DEPARTMENT_NAME, SUM(MCR.TOTAL_WEIGHT) AS currentLoad |
| | | FROM MW_TRANSIT_ROUTE_CAR MTRC |
| | | LEFT JOIN MW_CHECKOUT_RECORD MCR ON MCR.CAR_ID = MTRC.CAR_ID |
| | | LEFT JOIN MW_TRANSIT_CAR MTC ON MTC.ID = MCR.CAR_ID |
| | | LEFT JOIN MW_CHECKOUT_RECORD_ITEM MCRI ON MCRI.CHECKOUT_RECORD_ID = MCR.ID |
| | | LEFT JOIN MW_COLLECT_RECORD MCR2 ON MCR2.ID = MCRI.COLLECT_RECORD_ID |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MTC.DEPARTMENT_ID |
| | | <where> |
| | | MCR.DEL_FLAG = 0 |
| | | AND MCR2.STATUS = 2 |
| | | </where> |
| | | GROUP BY MTRC.ROUTE_ID,MTRC.CAR_ID |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | mcr.WASTE_TYPE_STR, |
| | | mcr.STAGING_ROOM_ID, |
| | | mcr.WEIGHT, |
| | | su.NICK_NAME AS COLLECT_USER_NAME |
| | | su.NICK_NAME AS COLLECT_USER_NAME, |
| | | mcr2.CHECKOUT_TIME, |
| | | su2.NICK_NAME AS DRIVER_NAME, |
| | | mcr2.HOSPITAL_SIGNATURE, |
| | | mdr.RECEIVE_TIME, |
| | | su3.NICK_NAME AS RECEIVER_NAME |
| | | su3.NICK_NAME AS RECEIVER_NAME, |
| | | mdr.DISPOSAL_UNIT_NAME, |
| | | mdr.DISPOSAL_TIME, |
| | | MDHR.DISPOSAL_TIME, |
| | | su4.NICK_NAME AS DISPOSAL_USER_NAME |
| | | FROM MW_COLLECT_RECORD mcr |
| | | LEFT JOIN SYS_USER su ON mcr.COLLECT_USER_ID = su.USER_ID |
| | | LEFT JOIN MW_CHECKOUT_RECORD_ITEM mcri ON mcr.ID = mcri.COLLECT_RECORD_ID |
| | | LEFT JOIN MW_CHECKOUT_RECORD mcr2 ON mcri.CHECKOUT_RECORD_ID = mcr2.ID |
| | | LEFT JOIN SYS_USER su2 ON su2.id = mcr2.DRIVER_ID |
| | | LEFT JOIN MW_DISPOSAL_RECORD_IMTE mdri ON mcr.ID = mdri.COLLECT_RECORD_ID |
| | | LEFT JOIN SYS_USER su2 ON su2.USER_ID = mcr2.DRIVER_ID |
| | | LEFT JOIN MW_DISPOSAL_RECORD_ITEM mdri ON mcr.ID = mdri.COLLECT_RECORD_ID |
| | | LEFT JOIN MW_DISPOSAL_RECORD mdr ON mdri.DISPOSAL_RECORD_ID = mdr.ID |
| | | LEFT JOIN SYS_USER su3 ON su3.id = mdr.RECEIVER_ID |
| | | LEFT JOIN SYS_USER su4 ON su4.id = mdr.DISPOSAL_USER_ID |
| | | LEFT JOIN MW_DISPOSAL_HANDLE_RECORD_ITEM mdhri ON mdhri.COLLECT_RECORD_ID= mcr.ID |
| | | LEFT JOIN MW_DISPOSAL_HANDLE_RECORD mdhr ON mdhr.ID= mdhri.DISPOSAL_HANDLE_RECORD_ID |
| | | LEFT JOIN SYS_USER su3 ON su3.USER_ID = mdr.RECEIVER_ID |
| | | LEFT JOIN SYS_USER su4 ON su4.USER_ID = mdr.DISPOSAL_USER_ID |
| | | <where> |
| | | mcr.ID = #{id} |
| | | </where> |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="queryListTimeType" resultType="com.sinata.system.domain.vo.MwCollectRecordWarningVO" |
| | | parameterType="java.lang.Integer"> |
| | | SELECT mcr.ID, |
| | | mcr.DEPARTMENT_ID, |
| | | mcr.HOSPITAL_NAME, |
| | | mcr.STAGING_ROOM_ID, |
| | | mcr.MEDICAL_WASTE_NUMBER, |
| | | SUM(mcr.WEIGHT) AS totalWeight, |
| | | mcr.COLLECT_TIME, |
| | | sdi.DAILY_MIN_WASTE_QUANTITY, |
| | | sdi.DAILY_MAX_WASTE_QUANTITY, |
| | | sdi.MONTHLY_MIN_WASTE_QUANTITY, |
| | | sdi.MONTHLY_MAX_WASTE_QUANTITY |
| | | FROM MW_COLLECT_RECORD mcr |
| | | LEFT JOIN SYS_DEPARTMENT sd ON mcr.DEPARTMENT_ID = sd.ID |
| | | LEFT JOIN SYS_DEPARTMENT_INFO sdi ON sdi.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | mcr.DEL_FLAG = 0 |
| | | <if test="timeType != null and timeType == 1"> |
| | | AND mcr.COLLECT_TIME BETWEEN TRUNC(TRUNC(SYSDATE - 1,'dd'), 'dd') |
| | | AND TRUNC(TRUNC(SYSDATE - 1,'dd'), 'dd') + INTERVAL '1' DAY - INTERVAL '1' SECOND |
| | | </if> |
| | | <if test="timeType != null and timeType == 2"> |
| | | AND mcr.COLLECT_TIME BETWEEN TRUNC(ADD_MONTHS(SYSDATE, -1), 'mm') |
| | | AND TRUNC(ADD_MONTHS(SYSDATE, 0), 'mm') - INTERVAL '1' SECOND |
| | | </if> |
| | | </where> |
| | | GROUP BY sd.ID |
| | | ORDER BY mcr.CREATE_TIME DESC |
| | | </select> |
| | | <select id="queryListGroupByDepartment" resultType="com.sinata.system.domain.vo.MwCollectRecordWarningVO"> |
| | | SELECT MCR.ID, |
| | | MCR.DEPARTMENT_ID, |
| | | MCR.HOSPITAL_NAME, |
| | | MCR.STAGING_ROOM_ID, |
| | | MCR.MEDICAL_WASTE_NUMBER, |
| | | MCR.BOX_ID, |
| | | MCR.BOX_NUMBER, |
| | | MCR.WASTE_TYPE, |
| | | MCR.WASTE_TYPE_STR, |
| | | SUM(MCR.WEIGHT) totalWeight, |
| | | MCR.CHECKOUT_USER_ID, |
| | | MCR.CHECKOUT_TIME, |
| | | MCR.STATUS, |
| | | MCR.BOX_TIME, |
| | | MCR.DEL_FLAG, |
| | | MCR.CREATE_BY, |
| | | MCR.CREATE_TIME, |
| | | MCR.UPDATE_BY, |
| | | MCR.UPDATE_TIME, |
| | | MCR.COLLECT_USER_ID, |
| | | MCR.COLLECT_TIME, |
| | | MCR.DISPOSAL_HANDLE_RECORD_ID, |
| | | MCR.RECEIVE_TIME, |
| | | MCR.RECEIVE_USER_ID, |
| | | MCR.DRIVER_ID, |
| | | MCR.CAR_ID, |
| | | MCR.DISPOSAL_TIME, |
| | | MCR.DISPOSAL_USER_ID, |
| | | MCR.RECEIVE_DEPARTMENT_ID, |
| | | SDI.MAXIMUM_STORAGE_CAPACITY |
| | | FROM MW_COLLECT_RECORD MCR |
| | | LEFT JOIN SYS_DEPARTMENT_INFO SDI ON SDI.DEPARTMENT_ID = MCR.DEPARTMENT_ID |
| | | <where> |
| | | MCR.DEL_FLAG = 0 |
| | | </where> |
| | | GROUP BY MCR.DEPARTMENT_ID |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | MC.PARTY_B_PHONE, |
| | | MC.REMARK, |
| | | MC.CREATE_TIME, |
| | | MC.RELATION, |
| | | SD.DEPARTMENT_NAME |
| | | FROM MW_CONTRACT MC |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MC.DEPARTMENT_ID |
| | | <where> |
| | | MC.DEL_FLAG = 0 |
| | | <if test="query.departmentId != null "> |
| | | AND MC.DEPARTMENT_ID = #{query.departmentId} |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND SD.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | | <if test="query.contractNumber != null and query.contractNumber != ''"> |
| | | AND MC.CONTRACT_NUMBER LIKE CONCAT('%',#{query.contractNumber},'%') |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="queryListTerminationDateBeforeNow" resultType="com.sinata.system.domain.vo.MwContractVO" |
| | | parameterType="java.util.Date"> |
| | | SELECT MC.ID, |
| | | MC.DEPARTMENT_ID, |
| | | MC.CONTRACT_NUMBER, |
| | | MC.CONTRACT_NAME, |
| | | MC.CONTRACT_AMOUNT, |
| | | MC.EFFECTIVE_DATE, |
| | | MC.TERMINATION_DATE, |
| | | MC.PARTY_A_NAME, |
| | | MC.PARTY_A_CONTACT, |
| | | MC.PARTY_A_PHONE, |
| | | MC.PARTY_B_NAME, |
| | | MC.PARTY_B_CONTACT, |
| | | MC.PARTY_B_PHONE, |
| | | MC.REMARK, |
| | | MC.CREATE_TIME, |
| | | MC.RELATION, |
| | | SD.DEPARTMENT_NAME |
| | | FROM MW_CONTRACT MC |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MC.DEPARTMENT_ID |
| | | <where> |
| | | MC.DEL_FLAG = 0 |
| | | <if test="date !=null"> |
| | | AND MC.TERMINATION_DATE > #{date} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="DISPOSAL_UNIT_NAME" property="disposalUnitName" /> |
| | | <result column="DISPOSAL_TIME" property="disposalTime" /> |
| | | <result column="DISPOSAL_USER_ID" property="disposalUserId" /> |
| | | <result column="DISPOSAL_RECORD_ID" property="disposalRecordId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | |
| | | MCR.WEIGHT, |
| | | MCR.WASTE_TYPE |
| | | FROM MW_DISPOSAL_HANDLE_RECORD MDHR |
| | | LEFT JOIN MW_COLLECT_RECORD MCR ON MCR.DISPOSAL_HANDLE_RECORD_ID = MDHR.ID |
| | | LEFT JOIN MW_DISPOSAL_HANDLE_RECORD_ITEM MDHRI ON MDHRI.DISPOSAL_HANDLE_RECORD_ID = MDHR.ID |
| | | LEFT JOIN MW_COLLECT_RECORD MCR ON MCR.ID = MDHRI.COLLECT_RECORD_ID |
| | | <where> |
| | | <if test="query.departmentId != null"> |
| | | AND MDHR.DEPARTMENT_ID = #{query.departmentId} |
| | |
| | | COUNT(DISTINCT MCR.BOX_NUMBER) AS totalHandledQuantity |
| | | FROM MW_DISPOSAL_RECORD MDR |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MDR.DEPARTMENT_ID |
| | | LEFT JOIN MW_DISPOSAL_HANDLE_RECORD MDHR ON MDHR.DISPOSAL_RECORD_ID = MDR.ID |
| | | LEFT JOIN MW_COLLECT_RECORD MCR ON MCR.DISPOSAL_HANDLE_RECORD_ID = MDHR.ID |
| | | LEFT JOIN MW_DISPOSAL_HANDLE_RECORD_ITEM MDHRI ON MDHRI.DISPOSAL_RECORD_ID = MDR.ID |
| | | <where> |
| | | MDR.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode !=''"> |
| | |
| | | COUNT(MCR.ID) AS bagNum, |
| | | IFNULL(SUM(MCR.WEIGHT), 0) AS weight, |
| | | MDHR.DISPOSAL_TIME |
| | | FROM MW_DISPOSAL_HANDLE_RECORD MDHR |
| | | LEFT JOIN MW_COLLECT_RECORD MCR ON MCR.DISPOSAL_HANDLE_RECORD_ID = MDHR.ID |
| | | FROM MW_DISPOSAL_HANDLE_RECORD_ITEM MDHRI |
| | | LEFT JOIN MW_COLLECT_RECORD MCR ON MCR.ID = MDHRI.COLLECT_RECORD_ID |
| | | LEFT JOIN MW_DISPOSAL_HANDLE_RECORD MDHR ON MDHR.ID= MDHRI.DISPOSAL_HANDLE_RECORD_ID |
| | | <where> |
| | | <if test="disposalRecordId != null"> |
| | | AND MDHR.DISPOSAL_RECORD_ID = #{disposalRecordId} |
| | |
| | | LEFT JOIN MW_COLLECT_RECORD MCR ON MCR.DISPOSAL_HANDLE_RECORD_ID = MDHR.ID |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MDHR.DEPARTMENT_ID |
| | | <where> |
| | | MDR.DEL_FLAG = 0 |
| | | MDHR.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND SD.TREE_CODE LIKE CONCAT(#{treeCode}, '%') |
| | | </if> |
| | | <if test="query.startTime != null and query.endTime != null"> |
| | | AND MDHR.DISPOSAL_TIME BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | <if test="query.wasteTypeList != null and query.wasteTypeList.size()>0"> |
| | | <if test="query.wasteTypeCodeList != null and query.wasteTypeCodeList.size()>0"> |
| | | AND MCR.WASTE_TYPE IN |
| | | <foreach collection="query.wasteTypeList" item="wasteType" separator="," open="(" close=")"> |
| | | <foreach collection="query.wasteTypeCodeList" item="wasteType" separator="," open="(" close=")"> |
| | | #{wasteType} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="queryDisposalListByDepartment" |
| | | resultType="com.sinata.system.domain.vo.MwDisposalRecordWarningVO"> |
| | | SELECT SUM(MDR.RECEIVE_WEIGHT) AS totalWeight, |
| | | SDI.MAXIMUM_STORAGE_CAPACITY, |
| | | MDR.DEPARTMENT_ID, |
| | | MDR.DISPOSAL_UNIT_NAME |
| | | FROM MW_COLLECT_RECORD MCR |
| | | LEFT JOIN MW_DISPOSAL_RECORD_ITEM MDRI ON MDRI.COLLECT_RECORD_ID = MCR.ID AND MCR.STATUS = 3 |
| | | LEFT JOIN MW_DISPOSAL_RECORD MDR ON MDR.ID = MDRI.DISPOSAL_RECORD_ID |
| | | LEFT JOIN SYS_DEPARTMENT_INFO SDI ON SDI.DEPARTMENT_ID = MDR.DEPARTMENT_ID |
| | | <where> |
| | | MDR.DEL_FLAG = 0 |
| | | </where> |
| | | GROUP BY MDR.DEPARTMENT_ID |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | mme.EQUIPMENT_NUMBER, |
| | | mme.STATUS, |
| | | mme.REMARK, |
| | | mme.RELATION, |
| | | SD.DEPARTMENT_NAME AS hospitalName |
| | | FROM MW_MICRO_EQUIPMENT mme |
| | | LEFT JOIN SYS_DEPARTMENT sd ON SD.ID = mme.DEPARTMENT_ID |
| | | <where> |
| | | mme.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | sd.TREE_CODE LIKE concat(#{treeCode}, '%') |
| | | AND sd.TREE_CODE LIKE concat(#{treeCode}, '%') |
| | | </if> |
| | | <if test="equipmentName != null and equipmentName != ''"> |
| | | AND mme.EQUIPMENT_NAME LIKE concat('%',#{equipmentName},'%') |
| | |
| | | SELECT MPE.ID, |
| | | MPE.DEPARTMENT_ID, |
| | | MPE.PROTECTION_EQUIPMENT_TYPE, |
| | | MPE.PROTECTION_EQUIPMENT_TYPE_STR, |
| | | MPE.EQUIPMENT_NAME, |
| | | MPE.STOCK, |
| | | MPE.REMARK, |
| | | MPE.ATTACHMENT, |
| | | MPE.DEL_FLAG, |
| | | MPE.CREATE_BY, |
| | | MPE.CREATE_TIME, |
| | | MPE.UPDATE_BY, |
| | | MPE.UPDATE_TIME, |
| | | MPE.RELATION, |
| | | SD.DEPARTMENT_NAME |
| | | FROM MW_PROTECTION_EQUIPMENT MPE |
| | | LEFT JOIN SYS_DEPARTMENT SD ON MPE.DEPARTMENT_ID = SD.ID |
| | |
| | | AND MPE.EQUIPMENT_NAME LIKE CONCAT('%',#{query.equipmentName},'%') |
| | | </if> |
| | | </where> |
| | | ORDER BY MPE.CREATE_TIME DESC |
| | | </select> |
| | | <select id="recordPage" resultType="com.sinata.system.domain.vo.MwProtectionEquipmentRecordVO"> |
| | | SELECT MPER.ID, |
| | |
| | | MPER.DEL_FLAG = 0 AND MPER.PROTECTION_EQUIPMENT_ID = #{id} |
| | | </where> |
| | | </select> |
| | | <select id="queryList" resultType="com.sinata.system.domain.vo.MwProtectionEquipmentVO"> |
| | | SELECT MPE.ID, |
| | | MPE.DEPARTMENT_ID, |
| | | MPE.PROTECTION_EQUIPMENT_TYPE, |
| | | MPE.PROTECTION_EQUIPMENT_TYPE_STR, |
| | | MPE.EQUIPMENT_NAME, |
| | | MPE.STOCK, |
| | | MPE.REMARK, |
| | | MPE.DEL_FLAG, |
| | | MPE.CREATE_BY, |
| | | MPE.CREATE_TIME, |
| | | MPE.UPDATE_BY, |
| | | MPE.UPDATE_TIME, |
| | | MPE.RELATION, |
| | | SD.DEPARTMENT_NAME |
| | | FROM MW_PROTECTION_EQUIPMENT MPE |
| | | LEFT JOIN SYS_DEPARTMENT SD ON MPE.DEPARTMENT_ID = SD.ID |
| | | <where> |
| | | MPE.DEL_FLAG = 0 |
| | | </where> |
| | | ORDER BY MPE.CREATE_TIME DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | UPDATE_TIME, |
| | | ID, PROTECTION_EQUIPMENT_ID, CHANGE_QUANTITY, TYPE, OPERATOR |
| | | </sql> |
| | | <select id="findByEquipmentIdAndUsageTimeAfter" |
| | | resultType="com.sinata.system.domain.vo.MwProtectionEquipmentRecordVO"> |
| | | SELECT MPER.ID, |
| | | MPER.PROTECTION_EQUIPMENT_ID, |
| | | MPER.CHANGE_QUANTITY, |
| | | MPER.TYPE, |
| | | MPER.OPERATOR, |
| | | MPER.CREATE_TIME, |
| | | MPER.REMARK, |
| | | MPE.EQUIPMENT_NAME, |
| | | SD.DEPARTMENT_NAME |
| | | FROM MW_PROTECTION_EQUIPMENT_RECORD MPER |
| | | LEFT JOIN MW_PROTECTION_EQUIPMENT MPE ON MPE.ID = MPER.PROTECTION_EQUIPMENT_ID |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MPE.DEPARTMENT_ID |
| | | <where> |
| | | MPE.DEL_FLAG = 0 |
| | | AND MPER.PROTECTION_EQUIPMENT_ID = #{id} |
| | | AND MPER.CREATE_TIME >= SYSDATE - INTERVAL '1' MONTH -- 最近一个月 |
| | | ORDER BY CREATE_TIME DESC |
| | | </where> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | MPR.REMARK, |
| | | MPR.CREATE_TIME, |
| | | SD.DEPARTMENT_NAME, |
| | | LISTAGG(MA.FILE_NAME, ',') WITHIN GROUP (ORDER BY MA.FILE_NAME) AS fileName |
| | | FROM MW_PROTECTION_REQULATION MPR |
| | | WM_CONCAT(MA.FILE_NAME) AS fileName, |
| | | MPR.RELATION |
| | | FROM MW_PROTECTION_REGULATION MPR |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MPR.DEPARTMENT_ID |
| | | LEFT JOIN (SELECT * FROM MW_ATTACHMENT WHERE "TYPE" = 3) MA ON MA.TARGET_ID = MPR.ID |
| | | <where> |
| | |
| | | AND MPR.REGULATION_NAME LIKE CONCAT('%',#{query.regulationName},'%') |
| | | </if> |
| | | </where> |
| | | GROUP BY MA.TARGET_ID |
| | | ORDER BY MPR.CREATE_TIME DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </sql> |
| | | <select id="getUsageEquipmentListByTaskId" |
| | | resultType="com.sinata.system.domain.vo.MwProtectionTaskEquipmentVO"> |
| | | SELECT MPTE.ID, |
| | | SELECT MPE.ID, |
| | | MPTE.PROTECTION_EQUIPMENT_ID, |
| | | MPTE.PROTECTION_TASK_ID, |
| | | MPTE.USAGE_QUANTITY, |
| | |
| | | MPT.REMARK, |
| | | MPT.CREATE_TIME, |
| | | SD.DEPARTMENT_NAME, |
| | | LISTAGG(MA.FILE_NAME, ',') WITHIN GROUP (ORDER BY MA.FILE_NAME) AS fileName |
| | | WM_CONCAT(MA.FILE_NAME) AS fileName, |
| | | MPT.RELATION |
| | | FROM MW_PROTECTION_TASK MPT |
| | | LEFT JOIN SYS_DEPARTMENT SD ON MPT.DEPARTMENT_ID = SD.ID |
| | | LEFT JOIN (SELECT * FROM MW_ATTACHMENT WHERE "TYPE" = 2) MA ON MA.TARGET_ID = MPT.ID |
| | |
| | | AND MPT.CREATE_TIME BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | </where> |
| | | GROUP BY MA.TARGET_ID |
| | | ORDER BY MPT.CREATE_TIME DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | AND MS.VACCINE_CERTIFICATE IS NULL |
| | | </if> |
| | | </where> |
| | | ORDER BY MS.CREATE_TIME DESC |
| | | </select> |
| | | <select id="queryList" resultType="com.sinata.system.domain.vo.MwStaffVO"> |
| | | SELECT MS.ID, |
| | | MS.DEPARTMENT_ID, |
| | | MS.STAFF_NAME, |
| | | MS.PHONE, |
| | | MS.HEALTH_CERTIFICATE, |
| | | MS.VACCINE_CERTIFICATE, |
| | | SD.DEPARTMENT_NAME |
| | | FROM MW_STAFF MS |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MS.DEPARTMENT_ID |
| | | <where> |
| | | MS.DEL_FLAG = 0 |
| | | </where> |
| | | ORDER BY MS.CREATE_TIME DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | msr.ROOM_NAME, |
| | | msr.MAX_CAPACITY, |
| | | msr.CREATE_TIME, |
| | | msr.RELATION, |
| | | COUNT(mr.ID) AS usedNum, |
| | | (msr.MAX_CAPACITY - COUNT(mr.ID)) AS unUsedNum, |
| | | sd.DEPARTMENT_NAME AS hospitalName |
| | | FROM MW_STAGING_ROOM msr |
| | | LEFT JOIN (SELECT ID, |
| | | BOX_ID, |
| | | STAGING_ROOM_ID |
| | | FROM MW_COLLECT_RECORD |
| | | WHERE STATUS != 4 |
| | | GROUP BY BOX_ID) mr |
| | | LEFT JOIN (SELECT ID, BOX_ID, STAGING_ROOM_ID FROM MW_COLLECT_RECORD WHERE STATUS = 1 GROUP BY BOX_ID) mr |
| | | ON msr.ID = mr.STAGING_ROOM_ID |
| | | LEFT JOIN SYS_DEPARTMENT sd ON msr.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | msr.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | sd.TREE_CODE LIKE CONCAT('%', #{tree}) |
| | | AND sd.TREE_CODE LIKE CONCAT(#{treeCode}, '%') |
| | | </if> |
| | | </where> |
| | | ORDER BY msr.CREATE_TIME DESC |
| | |
| | | </if> |
| | | <if test="query.wasteType != null"> |
| | | and mcr.WASTE_TYPE = #{query.wasteType} |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and mcr.STATUS = #{query.status} |
| | | </if> |
| | | <if test="query.collectTimeStart != null and query.collectTimeEnd != null"> |
| | | and mcr.COLLECT_TIME between #{query.collectTimeStart} and #{query.collectTimeEnd} |
| | |
| | | </where> |
| | | ORDER BY mcr.CHECKOUT_TIME DESC |
| | | </select> |
| | | <select id="queryStagingRoomList" resultType="com.sinata.system.domain.vo.MwStagingRoomVO"> |
| | | SELECT msr.ID, |
| | | msr.DEPARTMENT_ID, |
| | | msr.ROOM_NAME, |
| | | msr.MAX_CAPACITY, |
| | | msr.CREATE_TIME, |
| | | msr.RELATION, |
| | | COUNT(mr.ID) AS usedNum, |
| | | (msr.MAX_CAPACITY - COUNT(mr.ID)) AS unUsedNum, |
| | | (COUNT(mr.ID) * 1.0 / msr.MAX_CAPACITY * 100) AS useRate, |
| | | sd.DEPARTMENT_NAME AS hospitalName |
| | | FROM MW_STAGING_ROOM msr |
| | | LEFT JOIN (SELECT ID, BOX_ID, STAGING_ROOM_ID FROM MW_COLLECT_RECORD WHERE STATUS = 1 GROUP BY BOX_ID) mr |
| | | ON msr.ID = mr.STAGING_ROOM_ID |
| | | LEFT JOIN SYS_DEPARTMENT sd ON msr.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | msr.DEL_FLAG = 0 |
| | | </where> |
| | | ORDER BY msr.CREATE_TIME DESC |
| | | </select> |
| | | <select id="temporarilyStoredMedicalWaste" resultType="com.sinata.system.domain.vo.MwStorageRecordVO" |
| | | parameterType="com.sinata.system.domain.query.StorageRecordQuery"> |
| | | SELECT |
| | | mcr.BOX_ID AS id, |
| | | mcr.DEPARTMENT_ID, |
| | | mcr.HOSPITAL_NAME, |
| | | mcr.STAGING_ROOM_ID, |
| | | mcr.MEDICAL_WASTE_NUMBER, |
| | | mcr.BOX_NUMBER, |
| | | mcr.WASTE_TYPE, |
| | | mcr.WASTE_TYPE_STR, |
| | | SUM(mcr.WEIGHT) AS weight, |
| | | mcr.CHECKOUT_USER_ID, |
| | | mcr.CHECKOUT_TIME, |
| | | mcr.STATUS, |
| | | mcr.BOX_TIME, |
| | | mcr.DEL_FLAG, |
| | | mcr.CREATE_BY, |
| | | mcr.CREATE_TIME, |
| | | mcr.UPDATE_BY, |
| | | mcr.UPDATE_TIME, |
| | | mcr.COLLECT_USER_ID, |
| | | mcr.COLLECT_TIME, |
| | | msr.ROOM_NAME, |
| | | su.NICK_NAME AS COLLECT_USER_NAME, |
| | | (SELECT COUNT(*) FROM MW_COLLECT_RECORD WHERE BOX_ID = mcr.BOX_ID) bagNum |
| | | FROM MW_COLLECT_RECORD mcr |
| | | LEFT JOIN SYS_USER su |
| | | ON mcr.COLLECT_USER_ID = su.USER_ID |
| | | LEFT JOIN SYS_DEPARTMENT sd ON su.DEPARTMENT_ID = sd.ID |
| | | LEFT JOIN MW_STAGING_ROOM msr ON msr.ID = mcr.STAGING_ROOM_ID |
| | | <where> |
| | | mcr.DEL_FLAG = 0 |
| | | <if test="query.departmentId != null "> |
| | | and mcr.DEPARTMENT_ID = #{query.departmentId} |
| | | </if> |
| | | <if test="query.stagingRoomId != null and query.stagingRoomId != ''"> |
| | | and mcr.STAGING_ROOM_ID = #{query.stagingRoomId} |
| | | </if> |
| | | <if test="query.wasteType != null"> |
| | | and mcr.WASTE_TYPE = #{query.wasteType} |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and mcr.STATUS = #{query.status} |
| | | </if> |
| | | <if test="query.collectTimeStart != null and query.collectTimeEnd != null"> |
| | | and mcr.COLLECT_TIME between #{query.collectTimeStart} and #{query.collectTimeEnd} |
| | | </if> |
| | | </where> |
| | | GROUP BY mcr.BOX_ID |
| | | ORDER BY mcr.CREATE_TIME DESC |
| | | </select> |
| | | <select id="queryMedicalWasteList" resultType="com.sinata.system.domain.vo.MwStorageRecordVO" |
| | | parameterType="java.lang.Long"> |
| | | SELECT mcr.BOX_ID AS id, |
| | | mcr.DEPARTMENT_ID, |
| | | mcr.HOSPITAL_NAME, |
| | | mcr.STAGING_ROOM_ID, |
| | | mcr.MEDICAL_WASTE_NUMBER, |
| | | mcr.BOX_NUMBER, |
| | | mcr.WASTE_TYPE, |
| | | mcr.WASTE_TYPE_STR, |
| | | SUM(mcr.WEIGHT) AS weight, |
| | | mcr.CHECKOUT_USER_ID, |
| | | mcr.CHECKOUT_TIME, |
| | | mcr.STATUS, |
| | | mcr.BOX_TIME, |
| | | mcr.DEL_FLAG, |
| | | mcr.CREATE_BY, |
| | | mcr.CREATE_TIME, |
| | | mcr.UPDATE_BY, |
| | | mcr.UPDATE_TIME, |
| | | mcr.COLLECT_USER_ID, |
| | | mcr.COLLECT_TIME, |
| | | msr.ROOM_NAME, |
| | | su.NICK_NAME AS collectUserName, |
| | | (SELECT COUNT(*) FROM MW_COLLECT_RECORD WHERE BOX_ID = mcr.BOX_ID) bagNum |
| | | FROM MW_MICRO_EQUIPMENT_RECORD_ITEM mmeri |
| | | LEFT JOIN MW_COLLECT_RECORD mcr ON mcr.ID = mmeri.COLLECT_RECORD_ID |
| | | LEFT JOIN SYS_USER su ON mcr.COLLECT_USER_ID = su.USER_ID |
| | | LEFT JOIN MW_STAGING_ROOM msr ON msr.ID = mcr.STAGING_ROOM_ID |
| | | <where> |
| | | mcr.DEL_FLAG = 0 AND mmeri.EQUIPMENT_RECORD_ID =#{id} |
| | | </where> |
| | | GROUP BY mcr.BOX_ID |
| | | ORDER BY mcr.CREATE_TIME DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | MTC.CREATE_TIME, |
| | | MTC.UPDATE_BY, |
| | | MTC.UPDATE_TIME, |
| | | MTC.RELATION, |
| | | SD.DEPARTMENT_NAME AS DEPARTMENT_NAME |
| | | FROM MW_TRANSIT_CAR MTC |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MTC.DEPARTMENT_ID |
| | | <where> |
| | | MTC.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND SD.TREE_CODE = #{treeCode} |
| | | AND SD.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | | <if test="query.licensePlateNumber !=null and query.licensePlateNumber != ''"> |
| | | AND MTC.LICENSE_PLATE_NUMBER LIKE CONCAT('%',#{query.licensePlateNumber},'%') |
| | |
| | | MTC.CREATE_TIME, |
| | | MTC.UPDATE_BY, |
| | | MTC.UPDATE_TIME, |
| | | MTC.RELATION, |
| | | SD.DEPARTMENT_NAME AS DEPARTMENT_NAME |
| | | FROM MW_TRANSIT_CAR MTC |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MTC.DEPARTMENT_ID |
| | |
| | | MTR.CREATE_TIME, |
| | | MTR.HOSPITAL_QUANTITY, |
| | | MTR.REMARK, |
| | | MTR.RELATION, |
| | | SD.DEPARTMENT_NAME |
| | | FROM MW_TRANSIT_ROUTE MTR |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MTR.DEPARTMENT_ID |
| | |
| | | MTR.CREATE_TIME, |
| | | MTR.HOSPITAL_QUANTITY, |
| | | MTR.REMARK, |
| | | MTR.RELATION, |
| | | SD.DEPARTMENT_NAME |
| | | FROM MW_TRANSIT_ROUTE MTR |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MTR.DEPARTMENT_ID |
| | |
| | | UPDATE_TIME, |
| | | ID, WARN_TIME, WARNING_TARGET_ID, WARNING_TARGET_NAME, TYPE, MESSAGE, STATUS |
| | | </sql> |
| | | <select id="pageList" resultType="com.sinata.system.domain.vo.MwWarningRecordVO"> |
| | | SELECT MWR.ID, |
| | | MWR.WARN_TIME, |
| | | MWR.WARNING_TARGET_ID, |
| | | MWR.WARNING_TARGET_NAME, |
| | | MWR.TYPE, |
| | | MWR.MESSAGE, |
| | | MWR.STATUS, |
| | | MWR.DEL_FLAG, |
| | | MWR.CREATE_BY, |
| | | MWR.CREATE_TIME, |
| | | MWR.UPDATE_BY, |
| | | MWR.UPDATE_TIME, |
| | | MWR.DEPARTMENT_ID, |
| | | MWR.CURRENT_VALUE, |
| | | MWR.NORMAL_RANGE, |
| | | MWR.DEPARTMENT_NAME |
| | | FROM MW_WARNING_RECORD MWR |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MWR.DEPARTMENT_ID |
| | | <where> |
| | | MWR.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND SD.TREE_CODE LIKE CONCAT(#{treeCode}, '%') |
| | | </if> |
| | | <if test="query.type !=null"> |
| | | AND MWR.TYPE = #{query.type} |
| | | </if> |
| | | <if test="query.status != null"> |
| | | AND MWR.STATUS = #{query.status} |
| | | </if> |
| | | </where> |
| | | ORDER BY MWR.CREATE_TIME DESC |
| | | </select> |
| | | <select id="queryList" resultType="com.sinata.system.domain.vo.MwWarningRecordVO"> |
| | | SELECT MWR.ID, |
| | | MWR.WARN_TIME, |
| | | MWR.WARNING_TARGET_ID, |
| | | MWR.WARNING_TARGET_NAME, |
| | | MWR.TYPE, |
| | | MWR.MESSAGE, |
| | | MWR.STATUS, |
| | | MWR.DEL_FLAG, |
| | | MWR.CREATE_BY, |
| | | MWR.CREATE_TIME, |
| | | MWR.UPDATE_BY, |
| | | MWR.UPDATE_TIME, |
| | | MWR.DEPARTMENT_ID, |
| | | MWR.CURRENT_VALUE, |
| | | MWR.NORMAL_RANGE, |
| | | MWR.DEPARTMENT_NAME |
| | | FROM MW_WARNING_RECORD MWR |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MWR.DEPARTMENT_ID |
| | | <where> |
| | | MWR.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND SD.TREE_CODE LIKE CONCAT(#{treeCode}, '%') |
| | | </if> |
| | | <if test="query.type !=null"> |
| | | AND MWR.TYPE = #{query.type} |
| | | </if> |
| | | <if test="query.status != null"> |
| | | AND MWR.STATUS = #{query.status} |
| | | </if> |
| | | <if test="query.idList != null and query.idList.size()>0"> |
| | | AND MWR.ID IN |
| | | <foreach collection="query.idList" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY MWR.CREATE_TIME DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | LEFT JOIN SYS_DICT_DATA sdd2 |
| | | ON sdi.INSTITUTION_TYPE = sdd2.DICT_CODE |
| | | <where> |
| | | sd.ORG_TYPE = 2 |
| | | sd.DEL_FLAG =0 AND sd.ORG_TYPE = 2 |
| | | <if test="departmentName != null and departmentName != ''"> |
| | | AND sd.DEPARTMENT_NAME LIKE CONCAT('%', #{departmentName}, '%') |
| | | </if> |
| | |
| | | LEFT JOIN SYS_DEPARTMENT_INFO sdi |
| | | ON sd.ID = sdi.DEPARTMENT_ID |
| | | <where> |
| | | sd.ORG_TYPE = 3 |
| | | sd.DEL_FLAG = 0 AND sd.ORG_TYPE = 3 |
| | | <if test="departmentId != null"> |
| | | AND sd.PARENT_ID = #{departmentId} |
| | | </if> |
| | |
| | | FROM MW_TRANSIT_ROUTE_POINTS MTRP |
| | | INNER JOIN SYS_DEPARTMENT SD ON MTRP.DEPARTMENT_ID = SD.ID |
| | | <where> |
| | | SD.ORG_TYPE = 2 AND MTRP.ID = #{id} |
| | | SD.ORG_TYPE = 2 AND MTRP.ROUTE_ID = #{id} |
| | | </where> |
| | | ORDER BY MTRP.SORT_ORDER ASC |
| | | </select> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </select> |
| | | <select id="selectList" resultType="com.sinata.common.core.domain.entity.SysMenu"> |
| | | select menu_id AS menuId, |
| | | menu_name AS menuName, |
| | | parent_id AS parentId, |
| | | order_num AS orderNum, |
| | | `path` AS path, |
| | | component AS component, |
| | | `query` AS query, |
| | | is_frame AS isFrame, |
| | | is_cache AS isCache, |
| | | menu_type AS menuType, |
| | | visible AS visible, |
| | | STATUS AS STATUS, |
| | | IFNULL(perms, '') AS perms, |
| | | icon AS icon, |
| | | create_time AS createTime |
| | | from sys_menu |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <sql id="selectRoleVo"> |
| | | select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly, |
| | | r.status, r.del_flag, r.create_time, r.remark |
| | | r.status, |
| | | r.del_flag, |
| | | r.create_time, |
| | | r.remark, |
| | | r.manage_role_id_str |
| | | from sys_role r |
| | | left join sys_user_role ur on ur.role_id = r.role_id |
| | | left join sys_user u on u.user_id = ur.user_id |
| | |
| | | r.UPDATE_TIME, |
| | | r.REMARK, |
| | | r.MANAGE_ROLE_ID_STR, |
| | | -- 使用 LISTAGG 拼接可管理角色的角色ID,使用 ';' 分隔 |
| | | LISTAGG(r2.ROLE_NAME, ';') WITHIN GROUP (ORDER BY r2.ROLE_ID) AS manageRoleStr, |
| | | WM_CONCAT(r2.ROLE_NAME) AS manageRoleStr, |
| | | u.NICK_NAME |
| | | FROM |
| | | SYS_ROLE r |
| | |
| | | </where> |
| | | GROUP BY |
| | | r.ROLE_ID, r.ROLE_NAME, r.ROLE_KEY, r.ROLE_SORT, r.STATUS, r.DEL_FLAG, r.CREATE_BY, r.CREATE_TIME, r.UPDATE_BY, |
| | | r.UPDATE_TIME, r.REMARK, r.MANAGE_ROLE_ID_STR; |
| | | |
| | | r.UPDATE_TIME, r.REMARK, r.MANAGE_ROLE_ID_STR |
| | | ORDER BY r.CREATE_TIME DESC |
| | | </select> |
| | | |
| | | <insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId"> |
| | |
| | | su.USER_NAME, |
| | | su.STATUS, |
| | | sd.DEPARTMENT_NAME, |
| | | sr.ROLE_NAME |
| | | sr.ROLE_NAME, |
| | | su.DEPARTMENT_ID, |
| | | su.RELATION |
| | | FROM SYS_USER su |
| | | LEFT JOIN SYS_DEPARTMENT sd |
| | | ON su.DEPARTMENT_ID = sd.ID |
| | |
| | | LEFT JOIN SYS_ROLE sr |
| | | ON sr.ROLE_ID = sur.ROLE_ID |
| | | <where> |
| | | <if test="departmentId != null and departmentId != ''">] |
| | | sud.DEPARTMENT_ID = #{departmentId} |
| | | su.DEL_FLAG = 0 |
| | | <if test="nickName != null and nickName != ''"> |
| | | AND su.NICK_NAME LIKE CONCAT('%',#{nickName},'%') |
| | | </if> |
| | | <if test="nickName != null and nickName != ''">] |
| | | su.NICK_NAME LIKE CONCAT('%',#{nickName},'%') |
| | | </if> |
| | | <if test="roleId != null and roleId != ''">] |
| | | sur.ROLE_ID = #{roleId} |
| | | <if test="roleId != null and roleId != ''"> |
| | | AND sur.ROLE_ID = #{roleId} |
| | | </if> |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | sd.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | AND sd.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | | </where> |
| | | </select> |