3 文件已重命名
31个文件已修改
5个文件已删除
23个文件已添加
| | |
| | | import com.sinata.system.domain.dto.MwProtectionEquipmentDTO; |
| | | import com.sinata.system.domain.dto.MwProtectionEquipmentRecordDTO; |
| | | import com.sinata.system.domain.query.MwProtectionEquipmentQuery; |
| | | import com.sinata.system.domain.query.MwProtectionEquipmentRecordQuery; |
| | | import com.sinata.system.domain.vo.MwProtectionEquipmentRecordVO; |
| | | import com.sinata.system.domain.vo.MwProtectionEquipmentVO; |
| | | import com.sinata.system.service.MwProtectionEquipmentService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation("删除") |
| | | public R<?> delete(@ApiParam(name = "id", value = "防护器具id", required = true) @PathVariable("id") Long id) { |
| | | mwProtectionEquipmentService.removeById(id); |
| | | mwProtectionEquipmentService.delete(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 增减记录分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/recordPage") |
| | | @ApiOperation("增减记录") |
| | | public R<PageDTO<MwProtectionEquipmentRecordVO>> recordPage(@Valid @RequestBody MwProtectionEquipmentRecordQuery query) { |
| | | return R.ok(mwProtectionEquipmentService.recordPage(query)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.web.controller.backend; |
| | | |
| | | import com.sinata.common.core.domain.R; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.dto.MwProtectionRegulationDTO; |
| | | import com.sinata.system.domain.query.MwProtectionRegulationQuery; |
| | | import com.sinata.system.domain.vo.MwProtectionRegulationVO; |
| | | import com.sinata.system.service.MwProtectionRegulationService; |
| | | 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.DeleteMapping; |
| | | 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; |
| | | |
| | | /** |
| | | * <p> |
| | | * 规章制度 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author mitao |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Validated |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = {"规章制度相关接口"}) |
| | | @RequestMapping("/backend/mwProtectionRegulation") |
| | | public class MwProtectionRegulationController { |
| | | private final MwProtectionRegulationService mwProtectionRegulationService; |
| | | |
| | | /** |
| | | * 规章制度分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/page") |
| | | @ApiOperation("规章制度分页列表") |
| | | public R<PageDTO<MwProtectionRegulationVO>> pageList(@Valid @RequestBody MwProtectionRegulationQuery query) { |
| | | return R.ok(mwProtectionRegulationService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation("详情") |
| | | public R<MwProtectionRegulationVO> detail(@ApiParam(name = "id", value = "规章制度id", required = true) @PathVariable("id") Long id) { |
| | | return R.ok(mwProtectionRegulationService.detail(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增规章制度 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增规章制度") |
| | | public R<?> add(@Valid @RequestBody MwProtectionRegulationDTO dto) { |
| | | mwProtectionRegulationService.add(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 编辑规章制度 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @PostMapping("/edit") |
| | | @ApiOperation("编辑规章制度") |
| | | public R<?> edit(@Valid @RequestBody MwProtectionRegulationDTO dto) { |
| | | mwProtectionRegulationService.edit(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation("删除") |
| | | public R<?> delete(@ApiParam(name = "id", value = "规章制度id", required = true) @PathVariable("id") Long id) { |
| | | mwProtectionRegulationService.delete(id); |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | package com.sinata.web.controller.backend; |
| | | |
| | | import com.sinata.common.core.domain.R; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.dto.MwProtectionTaskDTO; |
| | | import com.sinata.system.domain.query.MwProtectionTaskQuery; |
| | | import com.sinata.system.domain.vo.MwProtectionTaskVO; |
| | | import com.sinata.system.service.MwProtectionTaskService; |
| | | 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.DeleteMapping; |
| | | 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; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author mitao |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Validated |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = {"防护作业相关接口"}) |
| | | @RequestMapping("/backend/mwProtectionTask") |
| | | public class MwProtectionTaskController { |
| | | private final MwProtectionTaskService mwProtectionTaskService; |
| | | |
| | | /** |
| | | * 防护作业分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/page") |
| | | @ApiOperation("防护作业分页列表") |
| | | public R<PageDTO<MwProtectionTaskVO>> pageList(@Valid @RequestBody MwProtectionTaskQuery query) { |
| | | return R.ok(mwProtectionTaskService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 防护作业详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation("防护作业详情") |
| | | public R<MwProtectionTaskVO> detail(@ApiParam(name = "id", value = "防护作业id", required = true) @PathVariable("id") Long id) { |
| | | return R.ok(mwProtectionTaskService.detail(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增防护作业 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增防护作业") |
| | | public R<?> add(@Valid @RequestBody MwProtectionTaskDTO dto) { |
| | | mwProtectionTaskService.add(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 编辑防护作业 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @PostMapping("/edit") |
| | | @ApiOperation("编辑防护作业") |
| | | public R<?> edit(@Valid @RequestBody MwProtectionTaskDTO dto) { |
| | | mwProtectionTaskService.edit(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation("删除") |
| | | public R<?> delete(@ApiParam(name = "id", value = "防护作业id", required = true) @PathVariable("id") Long id) { |
| | | mwProtectionTaskService.delete(id); |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.generator.FastAutoGenerator; |
| | | import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; |
| | | import com.baomidou.mybatisplus.generator.engine.VelocityTemplateEngine; |
| | | import org.junit.jupiter.api.Test; |
| | | |
| | |
| | | builder |
| | | .author("mitao") // 作者 |
| | | //.outputDir(System.getProperty("user.dir") + "/src/main/java") // 指定输出目录 |
| | | .outputDir("F:\\喜望软件\\code\\YiFeiNN\\medicalWaste-admin\\src\\main\\java\\com\\sinata\\web\\controller\\backend") // 指定输出目录 |
| | | .outputDir("F:\\喜望软件\\code\\YiFeiNN\\medicalWaste-system\\src\\main\\java") // 指定输出目录 |
| | | .commentDate("yyyy-MM-dd")// 注释的日期 |
| | | // 修改Date类型为LocalDateTime |
| | | //.dateType(DateType.ONLY_DATE) |
| | |
| | | builder |
| | | // 在这里添加数据库表名 |
| | | //.addInclude("MW_BOX") |
| | | .addInclude("SYS_DEPARTMENT", "SYS_DEPARTMENT_INFO", "SYS_USER_DEPARTMENT")// 设置需要生成的表名,多个表之间可以用逗号隔开 |
| | | .addInclude("MW_ATTACHMENT")// 设置需要生成的表名,多个表之间可以用逗号隔开 |
| | | // .addExclude("BBZQ_USER","BBZQ_USER_LOG") |
| | | .controllerBuilder().enableRestStyle(); // controller配置策略 |
| | | //.serviceBuilder().formatServiceFileName("%sService") // service配置策略 |
| | | //.mapperBuilder().enableBaseColumnList().enableBaseResultMap().enableMapperAnnotation() // mapper配置策略 |
| | | //.entityBuilder().enableLombok().enableRemoveIsPrefix().enableTableFieldAnnotation() // 实体配置策略 |
| | | .controllerBuilder().enableRestStyle() // controller配置策略 |
| | | .serviceBuilder().formatServiceFileName("%sService") // service配置策略 |
| | | .mapperBuilder().enableBaseColumnList().enableBaseResultMap().enableMapperAnnotation() // mapper配置策略 |
| | | .entityBuilder().enableLombok().enableRemoveIsPrefix().enableTableFieldAnnotation() // 实体配置策略 |
| | | //.logicDeleteColumnName("del_flag") // 逻辑删除字段名 |
| | | //.naming(NamingStrategy.underline_to_camel) // 数据库表映射到实体的命名策略,下划线转驼峰 |
| | | //.columnNaming(NamingStrategy.underline_to_camel) // 数据库表字段映射的命名策略,下划线转驼峰 |
| | | .naming(NamingStrategy.underline_to_camel) // 数据库表映射到实体的命名策略,下划线转驼峰 |
| | | .columnNaming(NamingStrategy.underline_to_camel) // 数据库表字段映射的命名策略,下划线转驼峰 |
| | | //.superClass(BaseModel.class) |
| | | //.addTableFills( // 添加表字段填充,"create_time"自动填充为插入时间,"update_time"自动填充为修改时间 |
| | | // new Column("create_time", FieldFill.INSERT), |
| | |
| | | // new Column("update_time", FieldFill.INSERT_UPDATE), |
| | | // new Column("update_by", FieldFill.INSERT_UPDATE) |
| | | //) |
| | | //.idType(IdType.AUTO); |
| | | .idType(IdType.AUTO); |
| | | } |
| | | ) |
| | | // 模板配置 |
New file |
| | |
| | | package com.sinata.system.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 附件表 |
| | | * </p> |
| | | * |
| | | * @author mitao |
| | | * @since 2024-12-19 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("MW_ATTACHMENT") |
| | | @ApiModel(value = "MwAttachment对象", description = "附件表") |
| | | public class MwAttachment implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主键") |
| | | @TableId(value = "ID", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("文件名") |
| | | @TableField("FILE_NAME") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("链接") |
| | | @TableField("URL") |
| | | private String url; |
| | | |
| | | @ApiModelProperty("类型(1:防护器具附件 2:防护作业附件 3:规章制度附件 4:合同附件 5:检查附件") |
| | | @TableField("TYPE") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("目标类型ID") |
| | | @TableField("TARGET_ID") |
| | | private Long targetId; |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("PARTY_B_PHONE") |
| | | private String partyBPhone; |
| | | |
| | | @ApiModelProperty("合同附件 多个附件使用英文逗号拼接") |
| | | @TableField("ATTACHMENT") |
| | | private String attachment; |
| | | |
| | | @ApiModelProperty("备注") |
| | | @TableField("REMARK") |
| | | private String remark; |
| | |
| | | @TableField("REMARK") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("附件,多个使用英文逗号拼接") |
| | | @TableField("ATTACHMENT") |
| | | private String attachment; |
| | | |
| | | |
| | | } |
File was renamed from medicalWaste-system/src/main/java/com/sinata/system/domain/MwProtectionRequlation.java |
| | |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("MW_PROTECTION_REQULATION") |
| | | @ApiModel(value = "MwProtectionRequlation对象", description = "规章制度") |
| | | public class MwProtectionRequlation extends BaseModel { |
| | | @TableName("MW_PROTECTION_REGULATION") |
| | | @ApiModel(value = "MwProtectionRegulation对象", description = "规章制度") |
| | | public class MwProtectionRegulation extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty("规章制度名称") |
| | | @TableField("REGULATION_NAME") |
| | | private String regulationName; |
| | | |
| | | @ApiModelProperty("附件信息,多个附件使用英文逗号拼接") |
| | | @TableField("ATTACHMENT") |
| | | private String attachment; |
| | | |
| | | @ApiModelProperty("备注") |
| | | @TableField("REMARK") |
| | |
| | | @TableField("TASK_NAME") |
| | | private String taskName; |
| | | |
| | | @ApiModelProperty("附件信息,多个文件使用英文逗号拼接") |
| | | @TableField("ATTACHMENT") |
| | | private String attachment; |
| | | |
| | | @ApiModelProperty("备注") |
| | | @TableField("REMARK") |
| | | private String remark; |
New file |
| | |
| | | package com.sinata.system.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/19 |
| | | */ |
| | | @Data |
| | | @ApiModel("附件数据传输对象") |
| | | public class MwAttachmentDTO { |
| | | |
| | | @ApiModelProperty("文件名") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("链接") |
| | | private String url; |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author mitao |
| | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("附件,多个使用英文逗号拼接") |
| | | private String attachment; |
| | | @ApiModelProperty("附件列表") |
| | | private List<MwAttachmentDTO> attachmentList; |
| | | } |
New file |
| | |
| | | package com.sinata.system.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/19 |
| | | */ |
| | | @Data |
| | | @ApiModel("规章制度数据传输对象") |
| | | public class MwProtectionRegulationDTO { |
| | | |
| | | @ApiModelProperty("规章制度id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("区域id(处置单位id)") |
| | | @NotNull(message = "区域id不能为空") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("规章制度类型(数据字典id)") |
| | | @NotNull(message = "规章制度类型不能为空") |
| | | private Long protectionRegulationType; |
| | | |
| | | @ApiModelProperty("规章制度名称") |
| | | @NotBlank(message = "规章制度名称不能为空") |
| | | private String regulationName; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("附件列表") |
| | | private List<MwAttachmentDTO> attachmentList; |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.system.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/19 |
| | | */ |
| | | @Data |
| | | @ApiModel("防护作业数据传输对象") |
| | | public class MwProtectionTaskDTO { |
| | | |
| | | @ApiModelProperty("防护作业id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("区域id(处置单位id)") |
| | | @NotNull(message = "处置单位id不能为空") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("作业类型(数据字典id)") |
| | | @NotNull(message = "作业类型不能为空") |
| | | private Integer protectiveWorkType; |
| | | |
| | | @ApiModelProperty("防护作业名称") |
| | | @NotNull(message = "防护作业名称不能为空") |
| | | private String taskName; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("使用器具列表") |
| | | @NotEmpty(message = "使用器具列表不能为空") |
| | | private List<MwProtectionTaskEquipmentDTO> equipmentList; |
| | | |
| | | @ApiModelProperty("附件列表") |
| | | private List<MwAttachmentDTO> attachmentList; |
| | | } |
New file |
| | |
| | | package com.sinata.system.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/19 |
| | | */ |
| | | @Data |
| | | @ApiModel("防护作业使用器具数据传输对象") |
| | | public class MwProtectionTaskEquipmentDTO { |
| | | |
| | | @ApiModelProperty("防护作业id") |
| | | private Long protectionTaskId; |
| | | |
| | | @ApiModelProperty("使用量") |
| | | private Integer usageQuantity; |
| | | } |
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; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/19 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel("防护器具增减记录查询对象") |
| | | public class MwProtectionEquipmentRecordQuery extends BasePage { |
| | | private static final long serialVersionUID = -45794224029147268L; |
| | | |
| | | @ApiModelProperty("防护器具id") |
| | | private Long id; |
| | | } |
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; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/19 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel("规章制度查询数据传输对象") |
| | | public class MwProtectionRegulationQuery extends BasePage { |
| | | private static final long serialVersionUID = -7630853233273921555L; |
| | | |
| | | @ApiModelProperty("区域id(处置单位id)") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("规章制度类型(数据字典id)") |
| | | private Long protectionRegulationType; |
| | | |
| | | @ApiModelProperty("规章制度名称") |
| | | private String regulationName; |
| | | } |
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; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/19 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel("防护作业查询数据传输对象") |
| | | public class MwProtectionTaskQuery extends BasePage { |
| | | |
| | | private static final long serialVersionUID = 1061097483846037584L; |
| | | |
| | | @ApiModelProperty("机构id") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("作业类型(数据字典id)") |
| | | private Integer protectiveWorkType; |
| | | |
| | | @ApiModelProperty("防护作业名称") |
| | | private String taskName; |
| | | |
| | | @ApiModelProperty("开始时间") |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty("结束时间") |
| | | private Date endTime; |
| | | } |
New file |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/19 |
| | | */ |
| | | @Data |
| | | @ApiModel("附件视图对象") |
| | | public class MwAttachmentVO { |
| | | |
| | | @ApiModelProperty("主键") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("文件名") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("链接") |
| | | private String url; |
| | | |
| | | @ApiModelProperty("目标类型ID") |
| | | private Long targetId; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("医院名称") |
| | | private String hospitalName; |
| | | |
| | | @ApiModelProperty("设备名称") |
| | | @ApiModelProperty("器具名称") |
| | | private String equipmentName; |
| | | |
| | | @ApiModelProperty("设备编号") |
| | | @ApiModelProperty("器具编号") |
| | | private String equipmentNumber; |
| | | |
| | | @ApiModelProperty("设备状态 1:正常 2:丢失 3:损坏") |
| | | @ApiModelProperty("器具状态 1:正常 2:丢失 3:损坏") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("备注") |
New file |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/19 |
| | | */ |
| | | @Data |
| | | @ApiModel("防护器具增减记录视图对象") |
| | | public class MwProtectionEquipmentRecordVO { |
| | | |
| | | @ApiModelProperty("防护器具增减记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("防护器具id") |
| | | private Long protectionEquipmentId; |
| | | |
| | | @ApiModelProperty("库存变动数量") |
| | | private Integer changeQuantity; |
| | | |
| | | @ApiModelProperty("库存变动类型 1:增加 2:减少") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("经办人") |
| | | private String operator; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "变动时间") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("所属单位") |
| | | private String departmentName; |
| | | |
| | | @ApiModelProperty("器具类型名称") |
| | | private String protectionEquipmentTypeStr; |
| | | |
| | | @ApiModelProperty("器具名称") |
| | | private String equipmentName; |
| | | |
| | | @ApiModelProperty("库存") |
| | | private Integer stock; |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/18 |
| | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("附件,多个使用英文逗号拼接") |
| | | private String attachment; |
| | | @ApiModelProperty("附件列表") |
| | | private List<MwAttachmentVO> attachmentList; |
| | | } |
New file |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/19 |
| | | */ |
| | | @Data |
| | | @ApiModel("规章制度视图对象") |
| | | public class MwProtectionRegulationVO { |
| | | |
| | | @ApiModelProperty("规章制度id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("区域id(处置单位id)") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("单位名称") |
| | | private String departmentName; |
| | | |
| | | @ApiModelProperty("规章制度类型(数据字典id)") |
| | | private Long protectionRegulationType; |
| | | |
| | | @ApiModelProperty("规章制度类型(冗余)") |
| | | private String protectionRegulationTypeStr; |
| | | |
| | | @ApiModelProperty("规章制度名称") |
| | | private String regulationName; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("附件信息") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("新增时间") |
| | | private Date creteTime; |
| | | |
| | | @ApiModelProperty("附件列表") |
| | | private List<MwAttachmentVO> attachmentList; |
| | | } |
New file |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/19 |
| | | */ |
| | | @Data |
| | | @ApiModel("防护作业器具视图对象") |
| | | public class MwProtectionTaskEquipmentVO { |
| | | |
| | | @ApiModelProperty("器具id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("器具名称") |
| | | private String equipmentName; |
| | | |
| | | @ApiModelProperty("使用量") |
| | | private Integer usageQuantity; |
| | | } |
New file |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/19 |
| | | */ |
| | | @Data |
| | | @ApiModel("防护作业视图对象") |
| | | public class MwProtectionTaskVO { |
| | | @ApiModelProperty("防护作业id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("区域id(处置单位id)") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("单位名称") |
| | | private String departmentName; |
| | | |
| | | @ApiModelProperty("作业类型(数据字典id)") |
| | | private Integer protectiveWorkType; |
| | | |
| | | @ApiModelProperty("作业类型(冗余)") |
| | | private String protectiveWorkTypeStr; |
| | | |
| | | @ApiModelProperty("防护作业名称") |
| | | private String taskName; |
| | | |
| | | @ApiModelProperty("附件信息") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("使用器具列表") |
| | | private List<MwProtectionTaskEquipmentVO> equipmentList; |
| | | |
| | | @ApiModelProperty("附件列表") |
| | | private List<MwAttachmentVO> attachmentList; |
| | | } |
New file |
| | |
| | | package com.sinata.system.enums; |
| | | |
| | | import lombok.Getter; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum AttachmentTypeEnum { |
| | | PROTECTION_EQUIPMENT(1, "防护器具附件"), |
| | | PROTECTION_TASK(2, "防护作业附件"), |
| | | PROTECTION_REGULATION(3, "规章制度附件"), |
| | | CONTRACT(4, "合同附件"), |
| | | REGULATORY(5, "检查附件"); |
| | | |
| | | private final Integer code; |
| | | private final String desc; |
| | | |
| | | public static AttachmentTypeEnum getEnumByCode(Integer code) { |
| | | for (AttachmentTypeEnum e : AttachmentTypeEnum.values()) { |
| | | if (e.code.equals(code)) { |
| | | return e; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
File was renamed from medicalWaste-common/src/main/java/com/sinata/common/enums/BoxProcessEnum.java |
| | |
| | | package com.sinata.common.enums; |
| | | package com.sinata.system.enums; |
| | | |
| | | import lombok.Getter; |
| | | import lombok.AllArgsConstructor; |
File was renamed from medicalWaste-common/src/main/java/com/sinata/common/enums/BoxStatusEnum.java |
| | |
| | | package com.sinata.common.enums; |
| | | package com.sinata.system.enums; |
| | | |
| | | import lombok.Getter; |
| | | import lombok.AllArgsConstructor; |
New file |
| | |
| | | package com.sinata.system.mapper; |
| | | |
| | | import com.sinata.system.domain.MwAttachment; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 附件表 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author mitao |
| | | * @since 2024-12-19 |
| | | */ |
| | | @Mapper |
| | | public interface MwAttachmentMapper extends BaseMapper<MwAttachment> { |
| | | |
| | | } |
| | |
| | | import com.sinata.system.domain.MwProtectionEquipment; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.sinata.system.domain.query.MwProtectionEquipmentQuery; |
| | | import com.sinata.system.domain.vo.MwProtectionEquipmentRecordVO; |
| | | import com.sinata.system.domain.vo.MwProtectionEquipmentVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | * @return |
| | | */ |
| | | Page<MwProtectionEquipmentVO> pageList(Page<MwProtectionEquipmentVO> page, @Param("query") MwProtectionEquipmentQuery query, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 增减记录分页列表 |
| | | * |
| | | * @param page |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Page<MwProtectionEquipmentRecordVO> recordPage(Page<MwProtectionEquipmentRecordVO> page, @Param("id") Long id); |
| | | } |
New file |
| | |
| | | package com.sinata.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.sinata.system.domain.MwProtectionRegulation; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.sinata.system.domain.query.MwProtectionRegulationQuery; |
| | | import com.sinata.system.domain.vo.MwProtectionRegulationVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 规章制度 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author mitao |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Mapper |
| | | public interface MwProtectionRegulationMapper extends BaseMapper<MwProtectionRegulation> { |
| | | /** |
| | | * 规章制度分页列表 |
| | | * |
| | | * @param page |
| | | * @param query |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | Page<MwProtectionRegulationVO> pageList(Page<MwProtectionRegulationVO> page, @Param("query") MwProtectionRegulationQuery query, @Param("treeCode") String treeCode); |
| | | } |
| | |
| | | |
| | | import com.sinata.system.domain.MwProtectionTaskEquipment; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.sinata.system.domain.vo.MwProtectionTaskEquipmentVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Mapper |
| | | public interface MwProtectionTaskEquipmentMapper extends BaseMapper<MwProtectionTaskEquipment> { |
| | | |
| | | /** |
| | | * 根据任务id获取使用防护器具列表 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<MwProtectionTaskEquipmentVO> getUsageEquipmentListByTaskId(Long id); |
| | | } |
| | |
| | | package com.sinata.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.sinata.system.domain.MwProtectionTask; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.sinata.system.domain.query.MwProtectionTaskQuery; |
| | | import com.sinata.system.domain.vo.MwProtectionTaskVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Mapper |
| | | public interface MwProtectionTaskMapper extends BaseMapper<MwProtectionTask> { |
| | | |
| | | /** |
| | | * 防护作业分页列表 |
| | | * |
| | | * @param page |
| | | * @param query |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | Page<MwProtectionTaskVO> pageList(Page<MwProtectionTaskVO> page, @Param("query") MwProtectionTaskQuery query, @Param("treeCode") String treeCode); |
| | | } |
| | |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | Page<MwStagingRoomVO> pagelist(Page<Object> objectPage, @Param("treeCode") String treeCode); |
| | | Page<MwStagingRoomVO> pageList(Page<Object> objectPage, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 暂存间入库记录 |
New file |
| | |
| | | package com.sinata.system.service; |
| | | |
| | | import com.sinata.system.domain.MwAttachment; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 附件表 服务类 |
| | | * </p> |
| | | * |
| | | * @author mitao |
| | | * @since 2024-12-19 |
| | | */ |
| | | public interface MwAttachmentService extends IService<MwAttachment> { |
| | | |
| | | } |
| | |
| | | import com.sinata.system.domain.dto.MwProtectionEquipmentDTO; |
| | | import com.sinata.system.domain.dto.MwProtectionEquipmentRecordDTO; |
| | | import com.sinata.system.domain.query.MwProtectionEquipmentQuery; |
| | | import com.sinata.system.domain.query.MwProtectionEquipmentRecordQuery; |
| | | import com.sinata.system.domain.vo.MwProtectionEquipmentRecordVO; |
| | | import com.sinata.system.domain.vo.MwProtectionEquipmentVO; |
| | | |
| | | /** |
| | |
| | | * @param dto |
| | | */ |
| | | void addStock(MwProtectionEquipmentRecordDTO dto); |
| | | |
| | | /** |
| | | * 增减记录分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwProtectionEquipmentRecordVO> recordPage(MwProtectionEquipmentRecordQuery query); |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | void delete(Long id); |
| | | } |
New file |
| | |
| | | package com.sinata.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.MwProtectionRegulation; |
| | | import com.sinata.system.domain.dto.MwProtectionRegulationDTO; |
| | | import com.sinata.system.domain.query.MwProtectionRegulationQuery; |
| | | import com.sinata.system.domain.vo.MwProtectionRegulationVO; |
| | | |
| | | /** |
| | | * <p> |
| | | * 规章制度 服务类 |
| | | * </p> |
| | | * |
| | | * @author mitao |
| | | * @since 2024-12-02 |
| | | */ |
| | | public interface MwProtectionRegulationService extends IService<MwProtectionRegulation> { |
| | | /** |
| | | * 规章制度分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwProtectionRegulationVO> pageList(MwProtectionRegulationQuery query); |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | MwProtectionRegulationVO detail(Long id); |
| | | |
| | | /** |
| | | * 新增规章制度 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | void add(MwProtectionRegulationDTO dto); |
| | | |
| | | /** |
| | | * 编辑规章制度 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | void edit(MwProtectionRegulationDTO dto); |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | void delete(Long id); |
| | | } |
| | |
| | | |
| | | import com.sinata.system.domain.MwProtectionTaskEquipment; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.sinata.system.domain.vo.MwProtectionTaskEquipmentVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-12-02 |
| | | */ |
| | | public interface MwProtectionTaskEquipmentService extends IService<MwProtectionTaskEquipment> { |
| | | |
| | | /** |
| | | * 根据任务id获取使用防护器具列表 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<MwProtectionTaskEquipmentVO> getUsageEquipmentListByTaskId(Long id); |
| | | } |
| | |
| | | package com.sinata.system.service; |
| | | |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.MwProtectionTask; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.sinata.system.domain.dto.MwProtectionTaskDTO; |
| | | import com.sinata.system.domain.query.MwProtectionTaskQuery; |
| | | import com.sinata.system.domain.vo.MwProtectionTaskVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-12-02 |
| | | */ |
| | | public interface MwProtectionTaskService extends IService<MwProtectionTask> { |
| | | /** |
| | | * 防护作业分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwProtectionTaskVO> pageList(MwProtectionTaskQuery query); |
| | | |
| | | /** |
| | | * 防护作业详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | MwProtectionTaskVO detail(Long id); |
| | | |
| | | /** |
| | | * 新增防护作业 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | void add(MwProtectionTaskDTO dto); |
| | | |
| | | /** |
| | | * 编辑防护作业 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | void edit(MwProtectionTaskDTO dto); |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param id |
| | | */ |
| | | void delete(Long id); |
| | | } |
New file |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import com.sinata.system.domain.MwAttachment; |
| | | import com.sinata.system.mapper.MwAttachmentMapper; |
| | | import com.sinata.system.service.MwAttachmentService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 附件表 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author mitao |
| | | * @since 2024-12-19 |
| | | */ |
| | | @Service |
| | | public class MwAttachmentServiceImpl extends ServiceImpl<MwAttachmentMapper, MwAttachment> implements MwAttachmentService { |
| | | |
| | | } |
| | |
| | | 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.enums.BoxProcessEnum; |
| | | import com.sinata.common.enums.BoxStatusEnum; |
| | | 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.entity.PageDTO; |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.CollUtils; |
| | | import com.sinata.system.domain.MwAttachment; |
| | | import com.sinata.system.domain.MwProtectionEquipment; |
| | | import com.sinata.system.domain.MwProtectionEquipmentRecord; |
| | | import com.sinata.system.domain.dto.MwProtectionEquipmentDTO; |
| | | import com.sinata.system.domain.dto.MwProtectionEquipmentRecordDTO; |
| | | import com.sinata.system.domain.query.MwProtectionEquipmentQuery; |
| | | import com.sinata.system.domain.query.MwProtectionEquipmentRecordQuery; |
| | | import com.sinata.system.domain.vo.MwAttachmentVO; |
| | | import com.sinata.system.domain.vo.MwProtectionEquipmentRecordVO; |
| | | import com.sinata.system.domain.vo.MwProtectionEquipmentVO; |
| | | import com.sinata.system.enums.AttachmentTypeEnum; |
| | | import com.sinata.system.mapper.MwProtectionEquipmentMapper; |
| | | import com.sinata.system.service.ISysDictDataService; |
| | | import com.sinata.system.service.MwAttachmentService; |
| | | import com.sinata.system.service.MwProtectionEquipmentRecordService; |
| | | import com.sinata.system.service.MwProtectionEquipmentService; |
| | | import com.sinata.system.service.SysDepartmentService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | |
| | | private final SysDepartmentService sysDepartmentService; |
| | | private final ISysDictDataService sysDictDataService; |
| | | private final MwProtectionEquipmentRecordService mwProtectionEquipmentRecordService; |
| | | private final MwAttachmentService mwAttachmentService; |
| | | |
| | | /** |
| | | * 防护器具分页列表 |
| | |
| | | */ |
| | | @Override |
| | | public MwProtectionEquipmentVO detail(Long id) { |
| | | return BeanUtils.copyBean(this.getById(id), MwProtectionEquipmentVO.class); |
| | | MwProtectionEquipmentVO mwProtectionEquipmentVO = BeanUtils.copyBean(this.getById(id), MwProtectionEquipmentVO.class); |
| | | //查询附件列表 |
| | | List<MwAttachment> list = mwAttachmentService.lambdaQuery().eq(MwAttachment::getType, AttachmentTypeEnum.PROTECTION_EQUIPMENT.getCode()).eq(MwAttachment::getTargetId, id).list(); |
| | | mwProtectionEquipmentVO.setAttachmentList(BeanUtils.copyToList(list, MwAttachmentVO.class)); |
| | | return mwProtectionEquipmentVO; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void add(MwProtectionEquipmentDTO dto) { |
| | | MwProtectionEquipment mwProtectionEquipment = BeanUtils.copyBean(dto, MwProtectionEquipment.class); |
| | | SysDictData dictData = sysDictDataService.lambdaQuery().eq(SysDictData::getDictCode, dto.getProtectionEquipmentType()).one(); |
| | |
| | | mwProtectionEquipment.setProtectionEquipmentTypeStr(dictData.getDictLabel()); |
| | | } |
| | | save(mwProtectionEquipment); |
| | | //保存附件 |
| | | if (CollUtils.isNotEmpty(dto.getAttachmentList())) { |
| | | List<MwAttachment> mwAttachments = BeanUtils.copyToList(dto.getAttachmentList(), MwAttachment.class); |
| | | mwAttachments.forEach(attachment -> { |
| | | attachment.setTargetId(mwProtectionEquipment.getId()); |
| | | attachment.setType(AttachmentTypeEnum.PROTECTION_EQUIPMENT.getCode()); |
| | | }); |
| | | mwAttachmentService.saveBatch(mwAttachments); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void edit(MwProtectionEquipmentDTO dto) { |
| | | if (Objects.isNull(dto.getId())) { |
| | | throw new ServiceException("防护器具id不能为空"); |
| | |
| | | mwProtectionEquipment.setProtectionEquipmentTypeStr(dictData.getDictLabel()); |
| | | } |
| | | updateById(mwProtectionEquipment); |
| | | //保存附件 |
| | | if (CollUtils.isNotEmpty(dto.getAttachmentList())) { |
| | | //删除原有的附件 |
| | | mwAttachmentService.lambdaUpdate().eq(MwAttachment::getType, AttachmentTypeEnum.PROTECTION_EQUIPMENT.getCode()).eq(MwAttachment::getTargetId, dto.getId()).remove(); |
| | | List<MwAttachment> mwAttachments = BeanUtils.copyToList(dto.getAttachmentList(), MwAttachment.class); |
| | | mwAttachments.forEach(attachment -> { |
| | | attachment.setTargetId(mwProtectionEquipment.getId()); |
| | | attachment.setType(AttachmentTypeEnum.PROTECTION_EQUIPMENT.getCode()); |
| | | }); |
| | | mwAttachmentService.saveBatch(mwAttachments); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void delete(Long id) { |
| | | removeById(id); |
| | | //删除原有的附件 |
| | | mwAttachmentService.lambdaUpdate().eq(MwAttachment::getType, AttachmentTypeEnum.PROTECTION_EQUIPMENT.getCode()).eq(MwAttachment::getTargetId, id).remove(); |
| | | } |
| | | |
| | | @Override |
| | |
| | | mwProtectionEquipmentRecord.setType(1); |
| | | mwProtectionEquipmentRecordService.save(mwProtectionEquipmentRecord); |
| | | } |
| | | |
| | | /** |
| | | * 增减记录分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageDTO<MwProtectionEquipmentRecordVO> recordPage(MwProtectionEquipmentRecordQuery query) { |
| | | Page<MwProtectionEquipmentRecordVO> page = baseMapper.recordPage(new Page<>(query.getPageCurr(), query.getPageSize()), query.getId()); |
| | | return PageDTO.of(page); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | 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.entity.PageDTO; |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.CollUtils; |
| | | import com.sinata.system.domain.MwAttachment; |
| | | import com.sinata.system.domain.MwProtectionRegulation; |
| | | import com.sinata.system.domain.dto.MwProtectionRegulationDTO; |
| | | import com.sinata.system.domain.query.MwProtectionRegulationQuery; |
| | | import com.sinata.system.domain.vo.MwAttachmentVO; |
| | | import com.sinata.system.domain.vo.MwProtectionRegulationVO; |
| | | import com.sinata.system.enums.AttachmentTypeEnum; |
| | | import com.sinata.system.mapper.MwProtectionRegulationMapper; |
| | | import com.sinata.system.service.ISysDictDataService; |
| | | import com.sinata.system.service.MwAttachmentService; |
| | | import com.sinata.system.service.MwProtectionRegulationService; |
| | | import com.sinata.system.service.SysDepartmentService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | | * 规章制度 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author mitao |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class MwProtectionRegulationServiceImpl extends ServiceImpl<MwProtectionRegulationMapper, MwProtectionRegulation> implements MwProtectionRegulationService { |
| | | private final SysDepartmentService sysDepartmentService; |
| | | private final MwAttachmentService mwAttachmentService; |
| | | private final ISysDictDataService sysDictDataService; |
| | | |
| | | /** |
| | | * 规章制度分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageDTO<MwProtectionRegulationVO> pageList(MwProtectionRegulationQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCode(query.getDepartmentId()); |
| | | Page<MwProtectionRegulationVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public MwProtectionRegulationVO detail(Long id) { |
| | | MwProtectionRegulation protectionRegulation = getById(id); |
| | | MwProtectionRegulationVO mwProtectionRegulationVO = null; |
| | | if (Objects.nonNull(protectionRegulation)) { |
| | | mwProtectionRegulationVO = BeanUtils.copyBean(protectionRegulation, MwProtectionRegulationVO.class); |
| | | List<MwAttachment> list = mwAttachmentService.lambdaQuery().eq(MwAttachment::getType, AttachmentTypeEnum.PROTECTION_REGULATION.getCode()).eq(MwAttachment::getTargetId, id).list(); |
| | | mwProtectionRegulationVO.setAttachmentList(BeanUtils.copyToList(list, MwAttachmentVO.class)); |
| | | return mwProtectionRegulationVO; |
| | | } |
| | | return mwProtectionRegulationVO; |
| | | } |
| | | |
| | | /** |
| | | * 新增规章制度 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void add(MwProtectionRegulationDTO dto) { |
| | | MwProtectionRegulation mwProtectionRegulation = BeanUtils.copyBean(dto, MwProtectionRegulation.class); |
| | | SysDictData dictData = sysDictDataService.lambdaQuery().eq(SysDictData::getDictCode, dto.getProtectionRegulationType()).one(); |
| | | if (Objects.nonNull(dictData)) { |
| | | mwProtectionRegulation.setProtectionRegulationTypeStr(dictData.getDictLabel()); |
| | | } |
| | | save(mwProtectionRegulation); |
| | | if (CollUtils.isNotEmpty(dto.getAttachmentList())) { |
| | | List<MwAttachment> mwAttachments = BeanUtils.copyToList(dto.getAttachmentList(), MwAttachment.class); |
| | | mwAttachments.forEach(attachment -> { |
| | | attachment.setTargetId(mwProtectionRegulation.getId()); |
| | | attachment.setType(AttachmentTypeEnum.PROTECTION_REGULATION.getCode()); |
| | | }); |
| | | mwAttachmentService.saveBatch(mwAttachments); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 编辑规章制度 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void edit(MwProtectionRegulationDTO dto) { |
| | | if (Objects.isNull(dto.getId())) { |
| | | throw new ServiceException("规章制度id不能为空"); |
| | | } |
| | | MwProtectionRegulation mwProtectionRegulation = BeanUtils.copyBean(dto, MwProtectionRegulation.class); |
| | | SysDictData dictData = sysDictDataService.lambdaQuery().eq(SysDictData::getDictCode, dto.getProtectionRegulationType()).one(); |
| | | if (Objects.nonNull(dictData)) { |
| | | mwProtectionRegulation.setProtectionRegulationTypeStr(dictData.getDictLabel()); |
| | | } |
| | | updateById(mwProtectionRegulation); |
| | | //保存附件 |
| | | if (CollUtils.isNotEmpty(dto.getAttachmentList())) { |
| | | //删除原有的附件 |
| | | mwAttachmentService.lambdaUpdate().eq(MwAttachment::getType, AttachmentTypeEnum.PROTECTION_REGULATION.getCode()).eq(MwAttachment::getTargetId, dto.getId()).remove(); |
| | | List<MwAttachment> mwAttachments = BeanUtils.copyToList(dto.getAttachmentList(), MwAttachment.class); |
| | | mwAttachments.forEach(attachment -> { |
| | | attachment.setTargetId(mwProtectionRegulation.getId()); |
| | | attachment.setType(AttachmentTypeEnum.PROTECTION_REGULATION.getCode()); |
| | | }); |
| | | mwAttachmentService.saveBatch(mwAttachments); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void delete(Long id) { |
| | | removeById(id); |
| | | mwAttachmentService.lambdaUpdate().eq(MwAttachment::getType, AttachmentTypeEnum.PROTECTION_REGULATION.getCode()).eq(MwAttachment::getTargetId, id).remove(); |
| | | } |
| | | } |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import com.sinata.system.domain.MwProtectionTaskEquipment; |
| | | import com.sinata.system.domain.vo.MwProtectionTaskEquipmentVO; |
| | | import com.sinata.system.mapper.MwProtectionTaskEquipmentMapper; |
| | | import com.sinata.system.service.MwProtectionTaskEquipmentService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class MwProtectionTaskEquipmentServiceImpl extends ServiceImpl<MwProtectionTaskEquipmentMapper, MwProtectionTaskEquipment> implements MwProtectionTaskEquipmentService { |
| | | |
| | | /** |
| | | * 根据任务id获取使用防护器具列表 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MwProtectionTaskEquipmentVO> getUsageEquipmentListByTaskId(Long id) { |
| | | return baseMapper.getUsageEquipmentListByTaskId(id); |
| | | } |
| | | } |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import com.sinata.system.domain.MwProtectionTask; |
| | | import com.sinata.system.mapper.MwProtectionTaskMapper; |
| | | import com.sinata.system.service.MwProtectionTaskService; |
| | | 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.entity.PageDTO; |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.CollUtils; |
| | | import com.sinata.system.domain.MwAttachment; |
| | | import com.sinata.system.domain.MwProtectionTask; |
| | | import com.sinata.system.domain.MwProtectionTaskEquipment; |
| | | import com.sinata.system.domain.dto.MwProtectionTaskDTO; |
| | | import com.sinata.system.domain.query.MwProtectionTaskQuery; |
| | | import com.sinata.system.domain.vo.MwAttachmentVO; |
| | | import com.sinata.system.domain.vo.MwProtectionTaskEquipmentVO; |
| | | import com.sinata.system.domain.vo.MwProtectionTaskVO; |
| | | import com.sinata.system.enums.AttachmentTypeEnum; |
| | | import com.sinata.system.mapper.MwProtectionTaskMapper; |
| | | import com.sinata.system.service.ISysDictDataService; |
| | | import com.sinata.system.service.MwAttachmentService; |
| | | import com.sinata.system.service.MwProtectionTaskEquipmentService; |
| | | import com.sinata.system.service.MwProtectionTaskService; |
| | | import com.sinata.system.service.SysDepartmentService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class MwProtectionTaskServiceImpl extends ServiceImpl<MwProtectionTaskMapper, MwProtectionTask> implements MwProtectionTaskService { |
| | | private final SysDepartmentService sysDepartmentService; |
| | | private final MwProtectionTaskEquipmentService mwProtectionTaskEquipmentService; |
| | | private final MwAttachmentService mwAttachmentService; |
| | | private final ISysDictDataService sysDictDataService; |
| | | |
| | | /** |
| | | * 防护作业分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageDTO<MwProtectionTaskVO> pageList(MwProtectionTaskQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCode(query.getDepartmentId()); |
| | | Page<MwProtectionTaskVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | | |
| | | /** |
| | | * 防护作业详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public MwProtectionTaskVO detail(Long id) { |
| | | MwProtectionTask task = getById(id); |
| | | MwProtectionTaskVO mwProtectionTaskVO = null; |
| | | if (Objects.nonNull(task)) { |
| | | mwProtectionTaskVO = BeanUtils.copyBean(task, MwProtectionTaskVO.class); |
| | | //查询器具列表 |
| | | List<MwProtectionTaskEquipmentVO> protectionTaskEquipmentVOList = mwProtectionTaskEquipmentService.getUsageEquipmentListByTaskId(id); |
| | | mwProtectionTaskVO.setEquipmentList(protectionTaskEquipmentVOList); |
| | | //查询附件列表 |
| | | List<MwAttachment> list = mwAttachmentService.lambdaQuery().eq(MwAttachment::getType, AttachmentTypeEnum.PROTECTION_TASK.getCode()).eq(MwAttachment::getTargetId, id).list(); |
| | | mwProtectionTaskVO.setAttachmentList(BeanUtils.copyToList(list, MwAttachmentVO.class)); |
| | | return mwProtectionTaskVO; |
| | | } |
| | | return mwProtectionTaskVO; |
| | | } |
| | | |
| | | /** |
| | | * 新增防护作业 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void add(MwProtectionTaskDTO dto) { |
| | | MwProtectionTask mwProtectionTask = BeanUtils.copyBean(dto, MwProtectionTask.class); |
| | | SysDictData dictData = sysDictDataService.lambdaQuery().eq(SysDictData::getDictCode, dto.getProtectiveWorkType()).one(); |
| | | if (Objects.nonNull(dictData)) { |
| | | mwProtectionTask.setProtectiveWorkTypeStr(dictData.getDictLabel()); |
| | | } |
| | | save(mwProtectionTask); |
| | | //保存使用器具列表 |
| | | List<MwProtectionTaskEquipment> mwProtectionTaskEquipments = BeanUtils.copyToList(dto.getEquipmentList(), MwProtectionTaskEquipment.class); |
| | | mwProtectionTaskEquipments.forEach(equipment -> equipment.setProtectionTaskId(mwProtectionTask.getId())); |
| | | mwProtectionTaskEquipmentService.saveBatch(mwProtectionTaskEquipments); |
| | | //保存附件 |
| | | if (CollUtils.isNotEmpty(dto.getAttachmentList())) { |
| | | List<MwAttachment> mwAttachments = BeanUtils.copyToList(dto.getAttachmentList(), MwAttachment.class); |
| | | mwAttachments.forEach(attachment -> { |
| | | attachment.setTargetId(mwProtectionTask.getId()); |
| | | attachment.setType(AttachmentTypeEnum.PROTECTION_TASK.getCode()); |
| | | }); |
| | | mwAttachmentService.saveBatch(mwAttachments); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 编辑防护作业 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void edit(MwProtectionTaskDTO dto) { |
| | | if (Objects.isNull(dto.getId())) { |
| | | throw new ServiceException("防护作业id不能为空"); |
| | | } |
| | | MwProtectionTask mwProtectionTask = BeanUtils.copyBean(dto, MwProtectionTask.class); |
| | | SysDictData dictData = sysDictDataService.lambdaQuery().eq(SysDictData::getDictCode, dto.getProtectiveWorkType()).one(); |
| | | if (Objects.nonNull(dictData)) { |
| | | mwProtectionTask.setProtectiveWorkTypeStr(dictData.getDictLabel()); |
| | | } |
| | | updateById(mwProtectionTask); |
| | | //删除原有的使用器具 |
| | | mwProtectionTaskEquipmentService.lambdaUpdate().eq(MwProtectionTaskEquipment::getProtectionTaskId, dto.getId()).remove(); |
| | | //保存使用器具列表 |
| | | List<MwProtectionTaskEquipment> mwProtectionTaskEquipments = BeanUtils.copyToList(dto.getEquipmentList(), MwProtectionTaskEquipment.class); |
| | | mwProtectionTaskEquipments.forEach(equipment -> equipment.setProtectionTaskId(mwProtectionTask.getId())); |
| | | mwProtectionTaskEquipmentService.saveBatch(mwProtectionTaskEquipments); |
| | | //保存附件 |
| | | if (CollUtils.isNotEmpty(dto.getAttachmentList())) { |
| | | //删除原有的附件 |
| | | mwAttachmentService.lambdaUpdate().eq(MwAttachment::getType, AttachmentTypeEnum.PROTECTION_TASK.getCode()).eq(MwAttachment::getTargetId, dto.getId()).remove(); |
| | | List<MwAttachment> mwAttachments = BeanUtils.copyToList(dto.getAttachmentList(), MwAttachment.class); |
| | | mwAttachments.forEach(attachment -> { |
| | | attachment.setTargetId(mwProtectionTask.getId()); |
| | | attachment.setType(AttachmentTypeEnum.PROTECTION_TASK.getCode()); |
| | | }); |
| | | mwAttachmentService.saveBatch(mwAttachments); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param id |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void delete(Long id) { |
| | | removeById(id); |
| | | //删除使用器具 |
| | | mwProtectionTaskEquipmentService.lambdaUpdate().eq(MwProtectionTaskEquipment::getProtectionTaskId, id).remove(); |
| | | //删除附件 |
| | | mwAttachmentService.lambdaUpdate().eq(MwAttachment::getType, AttachmentTypeEnum.PROTECTION_TASK.getCode()).eq(MwAttachment::getTargetId, id).remove(); |
| | | } |
| | | } |
| | |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | Page<MwStagingRoomVO> page = baseMapper.pagelist(new Page<>(query.getPageCurr(), query.getPageSize()), treeCode); |
| | | Page<MwStagingRoomVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | | |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.system.mapper.MwAttachmentMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.system.domain.MwAttachment"> |
| | | <id column="ID" property="id" /> |
| | | <result column="FILE_NAME" property="fileName" /> |
| | | <result column="URL" property="url" /> |
| | | <result column="TYPE" property="type" /> |
| | | <result column="TARGET_ID" property="targetId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | ID, FILE_NAME, URL, TYPE, TARGET_ID |
| | | </sql> |
| | | |
| | | </mapper> |
| | |
| | | LEFT JOIN SYS_DEPARTMENT sd |
| | | ON mcr.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | mcr.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND sd.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | |
| | | LEFT JOIN SYS_USER su ON mcr.COLLECT_USER_ID = su.USER_ID |
| | | LEFT JOIN SYS_DEPARTMENT sd ON su.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | mcr.STATUS = 2 |
| | | mcr.STATUS = 2 AND mcr.DEL_FLAG = 0 |
| | | <if test="departmentId != null and departmentId != ''"> |
| | | AND mcr.DEPARTMENT_ID = #{departmentId} |
| | | </if> |
| | |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MDR.DEPARTMENT_ID |
| | | LEFT JOIN MW_TRANSIT_ROUTE_CAR MTRC ON MTRC.CAR_ID = MCR.CAR_ID |
| | | <where> |
| | | MCR.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != null"> |
| | | AND SD.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MDR.DEPARTMENT_ID |
| | | LEFT JOIN MW_TRANSIT_ROUTE_CAR MTRC ON MTRC.CAR_ID = MCR.CAR_ID |
| | | <where> |
| | | MTRC.ROUTE_ID = #{id} |
| | | MCR.DEL_FLAG = 0 AND MTRC.ROUTE_ID = #{id} |
| | | </where> |
| | | GROUP BY MTRC.ROUTE_ID |
| | | </select> |
| | |
| | | LEFT JOIN MW_CHECKOUT_RECORD MCR on MTRC.CAR_ID = MCR.CAR_ID |
| | | LEFT JOIN MW_CHECKOUT_RECORD_ITEM MCRI on MCR.ID = MCRI.CHECKOUT_RECORD_ID |
| | | LEFT JOIN MW_COLLECT_RECORD MCR2 ON MCR2.ID = MCRI.COLLECT_RECORD_ID |
| | | WHERE MTRC.ROUTE_ID = #{id} |
| | | <where> |
| | | MTRC.DEL_FLAG = 0 AND MTRC.ROUTE_ID = #{id} |
| | | </where> |
| | | GROUP BY MCR2.BOX_ID |
| | | ORDER BY latestCheckoutTime DESC |
| | | </select> |
| | |
| | | LEFT JOIN SYS_DEPARTMENT sd |
| | | ON mcr.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | mcr.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND sd.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | |
| | | ON mcr.COLLECT_USER_ID = su.USER_ID |
| | | LEFT JOIN SYS_DEPARTMENT sd ON mcr.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | mcr.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | and sd.TREE_CODE like concat(#{treeCode},'%') |
| | | </if> |
| | |
| | | ON mcr.COLLECT_USER_ID = su.USER_ID |
| | | LEFT JOIN SYS_DEPARTMENT sd ON mcr.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | mcr.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | and sd.TREE_CODE like concat(#{treeCode},'%') |
| | | </if> |
| | |
| | | FROM MW_DISPOSAL_RECORD MDR |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MDR.DEPARTMENT_ID |
| | | <where> |
| | | MDR.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode !=''"> |
| | | AND SD.TREE_CODE LIKE CONCAT(#{treeCode}, '%') |
| | | </if> |
| | |
| | | FROM MW_DISPOSAL_RECORD MDR |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MDR.DEPARTMENT_ID |
| | | <where> |
| | | MDR.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode !=''"> |
| | | AND SD.TREE_CODE LIKE CONCAT(#{treeCode}, '%') |
| | | </if> |
| | |
| | | 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}, '%') |
| | | </if> |
| | |
| | | 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.STATUS = 1 |
| | | mcr.STATUS = 1 AND mcr.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | and sd.TREE_CODE like concat(#{treeCode},'%') |
| | | </if> |
| | |
| | | LEFT JOIN SYS_DEPARTMENT sd ON mme.DEPARTMENT_ID = sd.ID |
| | | LEFT JOIN SYS_USER su ON mmer.OPERATOR_ID = su.USER_ID |
| | | <where> |
| | | mmer.DEL_FLAG = 0 |
| | | <if test="treeCode !=null and treeCode != ''"> |
| | | AND sd.TREE_CODE like concat(#{treeCode},'%') |
| | | </if> |
| | |
| | | LEFT JOIN SYS_DEPARTMENT sd ON mme.DEPARTMENT_ID = sd.ID |
| | | LEFT JOIN SYS_USER su ON mmer.OPERATOR_ID = su.USER_ID |
| | | <where> |
| | | mmer.DEL_FLAG = 0 |
| | | <if test="treeCode !=null and treeCode != ''"> |
| | | AND sd.TREE_CODE like concat(#{treeCode},'%') |
| | | </if> |
| | |
| | | LEFT JOIN MW_MICRO_EQUIPMENT mme ON mme.ID = mmer.EQUIPMENT_ID |
| | | LEFT JOIN SYS_DEPARTMENT sd ON sd.ID = mme.DEPARTMENT_ID |
| | | <where> |
| | | mmer.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND sd.TREE_CODE like concat(#{treeCode},'%') |
| | | </if> |
| | |
| | | FROM MW_PROTECTION_EQUIPMENT MPE |
| | | LEFT JOIN SYS_DEPARTMENT SD ON MPE.DEPARTMENT_ID = SD.ID |
| | | <where> |
| | | MPE.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND SD.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="recordPage" resultType="com.sinata.system.domain.vo.MwProtectionEquipmentRecordVO"> |
| | | SELECT MPER.ID, |
| | | MPER.CHANGE_QUANTITY, |
| | | MPER.TYPE, |
| | | MPER.OPERATOR, |
| | | MPER.CREATE_TIME, |
| | | MPER.REMARK, |
| | | MPE.EQUIPMENT_NAME, |
| | | MPE.STOCK, |
| | | MPE.PROTECTION_EQUIPMENT_TYPE_STR, |
| | | SD.DEPARTMENT_NAME |
| | | FROM MW_PROTECTION_EQUIPMENT_RECORD MPER |
| | | LEFT JOIN MW_PROTECTION_EQUIPMENT MPE ON MPER.PROTECTION_EQUIPMENT_ID = MPE.ID |
| | | LEFT JOIN SYS_DEPARTMENT SD ON MPE.DEPARTMENT_ID = SD.ID |
| | | <where> |
| | | MPER.DEL_FLAG = 0 AND MPER.PROTECTION_EQUIPMENT_ID = #{id} |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.system.mapper.MwProtectionRegulationMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.system.domain.MwProtectionRegulation"> |
| | | <id column="ID" property="id" /> |
| | | <result column="DEL_FLAG" property="delFlag" /> |
| | | <result column="CREATE_BY" property="createBy" /> |
| | | <result column="CREATE_TIME" property="createTime" /> |
| | | <result column="UPDATE_BY" property="updateBy" /> |
| | | <result column="UPDATE_TIME" property="updateTime" /> |
| | | <result column="DEPARTMENT_ID" property="departmentId" /> |
| | | <result column="PROTECTION_REGULATION_TYPE" property="protectionRegulationType" /> |
| | | <result column="PROTECTION_REGULATION_TYPE_STR" property="protectionRegulationTypeStr" /> |
| | | <result column="REGULATION_NAME" property="regulationName" /> |
| | | <result column="ATTACHMENT" property="attachment" /> |
| | | <result column="REMARK" property="remark" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | DEL_FLAG, |
| | | CREATE_BY, |
| | | CREATE_TIME, |
| | | UPDATE_BY, |
| | | UPDATE_TIME, |
| | | ID, DEPARTMENT_ID, PROTECTION_REGULATION_TYPE, PROTECTION_REGULATION_TYPE_STR, REGULATION_NAME, ATTACHMENT, REMARK |
| | | </sql> |
| | | <select id="pageList" resultType="com.sinata.system.domain.vo.MwProtectionRegulationVO"> |
| | | SELECT MPR.ID, |
| | | MPR.DEPARTMENT_ID, |
| | | MPR.PROTECTION_REGULATION_TYPE, |
| | | MPR.PROTECTION_REGULATION_TYPE_STR, |
| | | MPR.REGULATION_NAME, |
| | | 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 |
| | | 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> |
| | | MPR.DEL_FLAG= 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND SD.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | | <if test="query.protectionRegulationType != null"> |
| | | AND MPR.PROTECTION_REGULATION_TYPE = #{query.protectionRegulationType} |
| | | </if> |
| | | <if test="query.regulationName != null and query.regulationName != ''"> |
| | | AND MPR.REGULATION_NAME LIKE CONCAT('%',#{query.regulationName},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | ID, PROTECTION_EQUIPMENT_ID, PROTECTION_TASK_ID, USAGE_QUANTITY |
| | | </sql> |
| | | <select id="getUsageEquipmentListByTaskId" |
| | | resultType="com.sinata.system.domain.vo.MwProtectionTaskEquipmentVO"> |
| | | SELECT MPTE.ID, |
| | | MPTE.PROTECTION_EQUIPMENT_ID, |
| | | MPTE.PROTECTION_TASK_ID, |
| | | MPTE.USAGE_QUANTITY, |
| | | MPE.EQUIPMENT_NAME |
| | | FROM MW_PROTECTION_TASK_EQUIPMENT MPTE |
| | | LEFT JOIN MW_PROTECTION_EQUIPMENT MPE ON MPE.ID = MPTE.PROTECTION_EQUIPMENT_ID |
| | | WHERE MPTE.PROTECTION_TASK_ID = #{id} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | UPDATE_TIME, |
| | | ID, DEPARTMENT_ID, PROTECTIVE_WORK_TYPE, PROTECTIVE_WORK_TYPE_STR, TASK_NAME, ATTACHMENT, REMARK |
| | | </sql> |
| | | <select id="pageList" resultType="com.sinata.system.domain.vo.MwProtectionTaskVO"> |
| | | SELECT MPT.ID, |
| | | MPT.DEPARTMENT_ID, |
| | | MPT.PROTECTIVE_WORK_TYPE, |
| | | MPT.PROTECTIVE_WORK_TYPE_STR, |
| | | MPT.TASK_NAME, |
| | | MPT.REMARK, |
| | | MPT.CREATE_TIME, |
| | | SD.DEPARTMENT_NAME, |
| | | LISTAGG(MA.FILE_NAME, ',') WITHIN GROUP (ORDER BY MA.FILE_NAME) AS fileName |
| | | 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 |
| | | <where> |
| | | MPT.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND SD.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | | <if test="query.protectiveWorkType != null"> |
| | | AND MPT.PROTECTIVE_WORK_TYPE = #{query.protectiveWorkType} |
| | | </if> |
| | | <if test="query.taskName !=null and query.taskName !=''"> |
| | | AND MPT.TASK_NAME LIKE CONCAT('%',#{query.taskName},'%') |
| | | </if> |
| | | <if test="query.startTime != null and query.endTime != null"> |
| | | AND MPT.CREATE_TIME BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | UPDATE_TIME, |
| | | ID, DEPARTMENT_ID, ROOM_NAME, MAX_CAPACITY |
| | | </sql> |
| | | <select id="pagelist" resultType="com.sinata.system.domain.vo.MwStagingRoomVO"> |
| | | <select id="pageList" resultType="com.sinata.system.domain.vo.MwStagingRoomVO"> |
| | | SELECT msr.ID, |
| | | msr.DEPARTMENT_ID, |
| | | msr.ROOM_NAME, |
| | |
| | | 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}) |
| | | </if> |
| | |
| | | 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="treeCode != null and treeCode != ''"> |
| | | and sd.TREE_CODE like concat(#{treeCode},'%') |
| | | </if> |
| | |
| | | ON mcr.COLLECT_USER_ID = su.USER_ID |
| | | LEFT JOIN SYS_DEPARTMENT sd ON su.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | mcr.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | and sd.TREE_CODE like concat(#{treeCode},'%') |
| | | </if> |
| | |
| | | LEFT JOIN SYS_DEPARTMENT sd |
| | | ON mcr.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | mcr.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND sd.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | |
| | | LEFT JOIN SYS_DEPARTMENT sd |
| | | ON mcr.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | mcr.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND sd.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | |
| | | 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} |
| | | </if> |