New file |
| | |
| | | package com.sinata.task; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.sinata.common.utils.CollUtils; |
| | | import com.sinata.common.utils.DateUtils; |
| | | 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.enums.MedicalWasteStatusEnum; |
| | | import com.sinata.system.enums.WarningConfigTypeEnum; |
| | | import com.sinata.system.enums.WarningStatusEnum; |
| | | import com.sinata.system.service.MwCollectRecordService; |
| | | 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.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/30 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class TaskService { |
| | | private final MwWarningConfigService mwWarningConfigService; |
| | | private final MwWarningConfigItemService mwWarningConfigItemService; |
| | | private final MwCollectRecordService mwCollectRecordService; |
| | | private final MwWarningRecordService mwWarningRecordService; |
| | | |
| | | /** |
| | | * 出库超时预警 |
| | | */ |
| | | @Scheduled(cron = "${medical.crons.checkout-over-time}") |
| | | public void checkoutOverTime() { |
| | | log.info("开始执行【出库超时预警】定时任务"); |
| | | |
| | | // 获取配置 |
| | | 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 timeDistance = DateUtils.timeDistanceHour(new Date(), item.getCollectTime()); |
| | | MwWarningRecord warningRecord = new MwWarningRecord(); |
| | | warningRecord.setType(WarningConfigTypeEnum.MEDICAL_WASTE.getCode()); |
| | | warningRecord.setWarningTargetId(item.getId()); |
| | | warningRecord.setWarningTargetName(item.getMedicalWasteNumber()); |
| | | warningRecord.setDepartmentName(item.getHospitalName()); |
| | | warningRecord.setMessage(String.format("%s医废超过%d小时未出库", item.getWasteTypeStr(), configItem.getValue())); |
| | | warningRecord.setDepartmentId(item.getDepartmentId()); |
| | | warningRecord.setCurrentValue(String.valueOf(timeDistance)); |
| | | warningRecord.setNormalRange(configItem.getValue().toString()); |
| | | warningRecord.setStatus(WarningStatusEnum.UNRESOLVED.getCode()); |
| | | warningRecord.setWarnTime(new Date()); |
| | | return warningRecord; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | // 批量保存预警记录 |
| | | if (!warningRecordList.isEmpty()) { |
| | | mwWarningRecordService.saveBatch(warningRecordList); |
| | | } |
| | | } |
| | | |
| | | 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(); |
| | | } |
| | |
| | | */ |
| | | @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()); |
| | | } |
| | | } |
| | |
| | | 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 lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | 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)); |
| | | } |
| | | |
| | | @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 * * * ? |
| | | non-collect-platform: 0 0 7 * * ? |
| | | |
| | |
| | | @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; |
| | | } |
| | | |
| | | /** |
| | | * 增加 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("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; |
| | | |
| | | } |
| | |
| | | @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 = "转运箱状态不能为空") |
| | |
| | | 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; |
| | | } |
| | |
| | | @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 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; |
| | | } |
| | |
| | | @Data |
| | | @ApiModel("医院报表视图对象") |
| | | public class DepartmentReportVO { |
| | | |
| | | @ApiModelProperty("机构名称") |
| | | private String departmentName; |
| | | |
| | | @ApiModelProperty("类别") |
| | | private List<String> legend; |
| | |
| | | @ApiModelProperty("每月产废范围止") |
| | | private BigDecimal monthlyMaxWasteQuantity; |
| | | |
| | | @ApiModelProperty("法人代表") |
| | | private String legalPerson; |
| | | |
| | | @ApiModelProperty("处置单位列表") |
| | | private List<DisposalUnitVO> disposalUnitList; |
| | | |
| | |
| | | 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; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("附件列表") |
| | | private List<MwAttachmentVO> attachmentList; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | private String relation; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("添加时间") |
| | | private String createTime; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | private String relation; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | private String relation; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("关联车辆") |
| | | private List<MwTransitCarVO> carList; |
| | | |
| | | @ApiModelProperty("层级关系") |
| | | private String relation; |
| | | } |
| | | |
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; |
| | | } |
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, "防护用品使用预警"), |
| | | MEDICAL_INSTITUTION_WASTE_DAY_WARNING(7, "医疗机构产废日预警"), |
| | | MEDICAL_INSTITUTION_WASTE_MONTH_WARNING(8, "医疗机构产废月预警"), |
| | | MEDICAL_INSTITUTION_STORAGE_WARNING(9, "医疗机构存储量预警"), |
| | | TRANSIT_CAR_WARNING(10, "车辆转运异常预警"), |
| | | DISPOSAL_UNIT_STORAGE_WARNING(11, "处置单位存储量预警"); |
| | | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | * @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); |
| | | |
| | | /** |
| | | * 运输记录详情 |
| | |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | Page<MwStagingRoomVO> pageList(Page<Object> objectPage, @Param("treeCode") String treeCode); |
| | | Page<MwStagingRoomVO> pageList(Page<MwStagingRoomVO> mwStagingRoomVOPage, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 暂存间入库记录 |
| | |
| | | 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.MwProtectionEquipmentRecordVO; |
| | | import com.sinata.system.domain.vo.MwProtectionEquipmentVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 防护器具 服务类 |
| | |
| | | * @return |
| | | */ |
| | | void delete(Long id); |
| | | |
| | | /** |
| | | * 防护器具列表 |
| | | * |
| | | * @return |
| | | */ |
| | | List<MwProtectionEquipmentVO> queryList(); |
| | | } |
| | |
| | | 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; |
| | | import java.io.UnsupportedEncodingException; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-12-02 |
| | | */ |
| | | public interface MwWarningRecordService extends IService<MwWarningRecord> { |
| | | /** |
| | | * 分页查询预警记录 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwWarningRecordVO> pageList(MwWarningRecordQuery query); |
| | | |
| | | 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()) && |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | return PageDTO.of(page); |
| | | } |
| | | |
| | | /** |
| | | * 防护器具列表 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MwProtectionEquipmentVO> queryList() { |
| | | List<MwProtectionEquipment> list = list(); |
| | | return BeanUtils.copyToList(list, MwProtectionEquipmentVO.class); |
| | | } |
| | | } |
| | |
| | | if (Objects.isNull(dto.getId())) { |
| | | throw new ServiceException("暂存间id不能为空"); |
| | | } |
| | | MwStagingRoom mwStagingRoom = BeanUtils.copyBean(dto, MwStagingRoom.class); |
| | | updateById(mwStagingRoom); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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.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); |
| | | } |
| | | |
| | | @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> |
| | |
| | | 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> |
| | |
| | | <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> |
| | |
| | | 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 |
| | |
| | | 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> |
| | |
| | | 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> |
| | |
| | | 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 |
| | |
| | | <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 |
| | |
| | | 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> |
| | |
| | | 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> |