| | |
| | | */ |
| | | @PostMapping("/export") |
| | | @ApiOperation("导出") |
| | | public void export(@Valid @RequestBody MwCollectRecordQuery query, HttpServletResponse response) { |
| | | public void export(@RequestBody MwCollectRecordQuery query, HttpServletResponse response) { |
| | | try { |
| | | collectRecordService.export(query, response); |
| | | } catch (IOException e) { |
| | |
| | | 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.MwMicroEquipmentDTO; |
| | | import com.sinata.system.domain.query.MwMicroEquipmentQuery; |
| | | import com.sinata.system.domain.query.StorageRecordQuery; |
| | | import com.sinata.system.domain.vo.MwMedicalWasteBoxVO; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentVO; |
| | | import com.sinata.system.service.MwMicroEquipmentService; |
| | | 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.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 |
| | | @Api(tags = {"小型微波设备管理相关接口"}) |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @RequestMapping("/backend/mwMicroEquipment") |
| | | public class MwMicroEquipmentController { |
| | | private final MwMicroEquipmentService mwMicroEquipmentService; |
| | | |
| | | /** |
| | | * 设备管理分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/page") |
| | | @ApiOperation("设备管理分页列表") |
| | | public R<PageDTO<MwMicroEquipmentVO>> pageList(@Valid @RequestBody MwMicroEquipmentQuery query) { |
| | | return R.ok(mwMicroEquipmentService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 新增设备 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增设备") |
| | | public R<?> add(@Valid @RequestBody MwMicroEquipmentDTO dto) { |
| | | mwMicroEquipmentService.add(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 编辑设备 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @PostMapping("/edit") |
| | | @ApiOperation("编辑设备") |
| | | public R<?> edit(@Valid @RequestBody MwMicroEquipmentDTO dto) { |
| | | mwMicroEquipmentService.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) { |
| | | mwMicroEquipmentService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 待处理的医废列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/storedMedicalWastePage") |
| | | @ApiOperation("待处理的医废列表") |
| | | public R<PageDTO<MwMedicalWasteBoxVO>> storedMedicalWastePage(@Valid @RequestBody StorageRecordQuery query) { |
| | | return R.ok(mwMicroEquipmentService.storedMedicalWastePage(query)); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.sinata.web.controller.backend; |
| | | |
| | | import com.sinata.common.core.domain.R; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.query.MwMicroEquipmentRecordQuery; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentRecordVO; |
| | | import com.sinata.system.service.MwMicroEquipmentRecordService; |
| | | 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; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author mitao |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Api(tags = {"设备使用记录相关接口"}) |
| | | @Validated |
| | | @RequiredArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/backend/mwMicroEquipmentRecord") |
| | | public class MwMicroEquipmentRecordController { |
| | | private final MwMicroEquipmentRecordService mwMicroEquipmentRecordService; |
| | | |
| | | @PostMapping("/page") |
| | | @ApiOperation("设备使用记录分页列表") |
| | | public R<PageDTO<MwMicroEquipmentRecordVO>> pageList(@Valid @RequestBody MwMicroEquipmentRecordQuery query) { |
| | | return R.ok(mwMicroEquipmentRecordService.pageList(query)); |
| | | } |
| | | } |
| | |
| | | import com.sinata.common.core.domain.R; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.dto.MwStagingRoomDTO; |
| | | import com.sinata.system.domain.query.CheckoutRecordQuery; |
| | | import com.sinata.system.domain.query.MwStagingRoomQuery; |
| | | import com.sinata.system.domain.query.StorageRecordQuery; |
| | | import com.sinata.system.domain.vo.MwCollectRecordVO; |
| | | import com.sinata.system.domain.vo.MwCheckoutRecordVO; |
| | | import com.sinata.system.domain.vo.MwStagingRoomVO; |
| | | import com.sinata.system.domain.vo.MwStorageRecordVO; |
| | | import com.sinata.system.service.MwStagingRoomService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @PostMapping("/storageRecord") |
| | | @ApiOperation("暂存间入库记录") |
| | | public R<PageDTO<MwCollectRecordVO>> storageRecord(@Valid @RequestBody StorageRecordQuery query) { |
| | | public R<PageDTO<MwStorageRecordVO>> storageRecord(@Valid @RequestBody StorageRecordQuery query) { |
| | | return R.ok(mwStagingRoomService.storageRecord(query)); |
| | | } |
| | | |
| | | /** |
| | | * 暂存间入库记录导出 |
| | | * |
| | | * @param query |
| | | * @param response |
| | | */ |
| | | @PostMapping("/storageRecord/export") |
| | | @ApiOperation("暂存间入库记录导出") |
| | | public void storageRecordExport(@RequestBody StorageRecordQuery query, HttpServletResponse response) { |
| | | try { |
| | | mwStagingRoomService.storageRecordExport(query, response); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 暂存间出库记录 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/checkoutRecord") |
| | | @ApiOperation("暂存间出库记录") |
| | | public R<PageDTO<MwCheckoutRecordVO>> checkoutRecord(@Valid @RequestBody CheckoutRecordQuery query) { |
| | | return R.ok(mwStagingRoomService.checkoutRecord(query)); |
| | | } |
| | | |
| | | /** |
| | | * 暂存间出库记录导出 |
| | | * |
| | | * @param query |
| | | * @param response |
| | | */ |
| | | @PostMapping("/checkoutRecord/export") |
| | | @ApiOperation("暂存间出库记录导出") |
| | | public void checkoutRecordExport(@RequestBody CheckoutRecordQuery query, HttpServletResponse response) { |
| | | try { |
| | | mwStagingRoomService.checkoutRecordExport(query, response); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | @TableField("CAR_ID") |
| | | private Long carId; |
| | | |
| | | @ApiModelProperty("箱数") |
| | | @TableField("BOX_NUM") |
| | | private Integer boxNum; |
| | | |
| | | @ApiModelProperty("袋数") |
| | | @TableField("BAG_NUM") |
| | | private Integer bagNum; |
| | | |
| | | @ApiModelProperty("总重量") |
| | | @TableField("TOTAL_WEIGHT") |
| | | private BigDecimal totalWeight; |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("CHECKOUT_TIME") |
| | | private Date checkoutTime; |
| | | |
| | | @ApiModelProperty("医废状态 1:暂存中 2:运输中 3:已接收 4:已处置") |
| | | @ApiModelProperty("医废状态 1:暂存中; 2:运输中; 3:已接收; 4:已处置;") |
| | | @TableField("STATUS") |
| | | private Integer status; |
| | | |
| | |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设备使用记录 |
| | |
| | | @TableField("EQUIPMENT_ID") |
| | | private Long equipmentId; |
| | | |
| | | @ApiModelProperty("处理箱数") |
| | | @TableField("BOX_NUM") |
| | | private Integer boxNum; |
| | | |
| | | @ApiModelProperty("处理袋数") |
| | | @TableField("BAG_NUM") |
| | | private Integer bagNum; |
| | | |
| | | @ApiModelProperty("处理重量") |
| | | @TableField("TOTAL_WEIGHT") |
| | | private BigDecimal totalWeight; |
| | | |
| | | @ApiModelProperty("操作人id") |
| | | @TableField("OPERATOR_ID") |
| | | private Long operatorId; |
| | | |
| | | @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; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/13 |
| | | */ |
| | | @Data |
| | | @ApiModel("小型微波设备数据传输对象") |
| | | public class MwMicroEquipmentDTO { |
| | | |
| | | @ApiModelProperty(value = "小型微波设备id", notes = "新增不传,编辑必传") |
| | | @NotNull(message = "设备id不能为空") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("区域id(医院)") |
| | | @NotNull(message = "医院id不能为空") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("设备名称") |
| | | @NotBlank(message = "设备名称不能为空") |
| | | private String equipmentName; |
| | | |
| | | @ApiModelProperty("设备编号") |
| | | @NotBlank(message = "设备编号不能为空") |
| | | private String equipmentNumber; |
| | | |
| | | @ApiModelProperty("设备状态 1:正常 2:丢失 3:损坏") |
| | | @NotNull(message = "设备状态不能为空") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | } |
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/13 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel("暂存间出库记录查询数据传输对象") |
| | | public class CheckoutRecordQuery extends BasePage { |
| | | |
| | | private static final long serialVersionUID = -1659680867215243893L; |
| | | |
| | | @ApiModelProperty(value = "机构id", notes = "机构id和暂存间id只需传其中一个") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty(value = "暂存间id", notes = "机构id和暂存间id只需传其中一个") |
| | | private Long stagingRoomId; |
| | | |
| | | @ApiModelProperty("出库时间-开始") |
| | | private Date checkoutTimeStart; |
| | | |
| | | @ApiModelProperty("出库时间-结束") |
| | | private Date checkoutTimeEnd; |
| | | } |
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/13 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel("设备管理查询数据传输对象") |
| | | public class MwMicroEquipmentQuery extends BasePage { |
| | | |
| | | private static final long serialVersionUID = -6729293634002785403L; |
| | | |
| | | @ApiModelProperty("机构id") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("设备名称") |
| | | private String equipmentName; |
| | | |
| | | @ApiModelProperty("设备状态 1:正常 2:丢失 3:损坏") |
| | | private Integer status; |
| | | } |
New file |
| | |
| | | package com.sinata.system.domain.query; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/13 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel("设备使用记录查询数据传输对象") |
| | | public class MwMicroEquipmentRecordQuery extends MwMicroEquipmentQuery { |
| | | private static final long serialVersionUID = 9039697918354490906L; |
| | | } |
| | |
| | | |
| | | private static final long serialVersionUID = 3037481981686862175L; |
| | | |
| | | @ApiModelProperty("机构id") |
| | | @ApiModelProperty(value = "机构id", notes = "机构id和暂存间id只需传其中一个") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("暂存间id") |
| | | @ApiModelProperty(value = "暂存间id", notes = "机构id和暂存间id只需传其中一个") |
| | | private Long stagingRoomId; |
| | | |
| | | @ApiModelProperty("医废编号") |
| | |
| | | @ApiModelProperty("医废类型") |
| | | private Integer wasteType; |
| | | |
| | | @ApiModelProperty("入库时间") |
| | | private Date collectTime; |
| | | @ApiModelProperty("入库时间-开始") |
| | | private Date collectTimeStart; |
| | | |
| | | @ApiModelProperty("入库时间-结束") |
| | | private Date collectTimeEnd; |
| | | } |
New file |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/13 |
| | | */ |
| | | @Data |
| | | @ApiModel("暂存间出库记录视图对象") |
| | | public class MwCheckoutRecordVO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -851971023455890457L; |
| | | |
| | | @ApiModelProperty("记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("出库时间") |
| | | private Date checkoutTime; |
| | | |
| | | @ApiModelProperty("区域id") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("医院名称") |
| | | @ExcelProperty(value = "医院", index = 2) |
| | | private String hospitalName; |
| | | |
| | | @ApiModelProperty("暂存间名称") |
| | | private String roomName; |
| | | |
| | | @ApiModelProperty("箱数") |
| | | private Integer boxNum; |
| | | |
| | | @ApiModelProperty("袋数") |
| | | private Integer bagNum; |
| | | |
| | | @ApiModelProperty("总重量") |
| | | private BigDecimal totalWeight; |
| | | |
| | | @ApiModelProperty("医院签名") |
| | | private String hospitalSignature; |
| | | |
| | | @ApiModelProperty("司机姓名") |
| | | private String driverName; |
| | | |
| | | @ApiModelProperty("车牌号") |
| | | private String licensePlateNumber; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("收集人姓名") |
| | | @ExcelProperty(value = "收集人", index = 7) |
| | | private Long collectUserName; |
| | | private String collectUserName; |
| | | |
| | | @ApiModelProperty("收集时间") |
| | | @ExcelProperty(value = "收集时间", index = 1) |
New file |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/13 |
| | | */ |
| | | @Data |
| | | @ApiModel("待处理医废视图对象") |
| | | public class MwMedicalWasteBoxVO { |
| | | |
| | | @ApiModelProperty("箱子id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("入库时间") |
| | | private Date collectTime; |
| | | |
| | | @ApiModelProperty("医院名称") |
| | | private String hospitalName; |
| | | |
| | | @ApiModelProperty("暂存间名称") |
| | | private String roomName; |
| | | |
| | | @ApiModelProperty("医废类型名称") |
| | | private String wasteTypeStr; |
| | | |
| | | @ApiModelProperty("箱子编号") |
| | | private String boxNumber; |
| | | |
| | | @ApiModelProperty("袋数") |
| | | private Integer bagNum; |
| | | |
| | | @ApiModelProperty("重量") |
| | | private BigDecimal totalWeight; |
| | | |
| | | @ApiModelProperty("入库人员") |
| | | private String collectUserName; |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/13 |
| | | */ |
| | | @Data |
| | | @ApiModel("设备使用记录视图对象") |
| | | public class MwMicroEquipmentRecordVO { |
| | | } |
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/13 |
| | | */ |
| | | @Data |
| | | @ApiModel("小型微波设备视图对象") |
| | | public class MwMicroEquipmentVO { |
| | | |
| | | @ApiModelProperty("小型微波设备id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("区域id(医院)") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("医院名称") |
| | | private String hospitalName; |
| | | |
| | | @ApiModelProperty("设备名称") |
| | | private String equipmentName; |
| | | |
| | | @ApiModelProperty("设备编号") |
| | | private String equipmentNumber; |
| | | |
| | | @ApiModelProperty("设备状态 1:正常 2:丢失 3:损坏") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/13 |
| | | */ |
| | | @Data |
| | | @ApiModel("暂存间入库视图对象") |
| | | public class MwStorageRecordVO { |
| | | @ApiModelProperty("收集记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("区域id") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("医院名称") |
| | | @ExcelProperty(value = "医院名称", index = 2) |
| | | private String hospitalName; |
| | | |
| | | @ApiModelProperty("暂存间id") |
| | | private Long stagingRoomId; |
| | | |
| | | @ApiModelProperty("暂存间名称") |
| | | @ExcelProperty(value = "暂存间", index = 3) |
| | | private String roomName; |
| | | |
| | | @ApiModelProperty("医废编号") |
| | | @ExcelProperty(value = "医废编号", index = 4) |
| | | private String medicalWasteNumber; |
| | | |
| | | @ApiModelProperty("转运箱id") |
| | | private Long boxId; |
| | | |
| | | @ApiModelProperty("箱子编号") |
| | | @ExcelProperty(value = "箱子编号", index = 5) |
| | | private String boxNumber; |
| | | |
| | | @ApiModelProperty("医废类型(数据字典id)") |
| | | private Integer wasteType; |
| | | |
| | | @ApiModelProperty("医废类型名称") |
| | | @ExcelProperty(value = "医废类型", index = 6) |
| | | private String wasteTypeStr; |
| | | |
| | | @ApiModelProperty("医废重量") |
| | | @ExcelProperty(value = "医废重量", index = 7) |
| | | private BigDecimal weight; |
| | | |
| | | @ApiModelProperty("出库人员id") |
| | | private Long checkoutUserId; |
| | | |
| | | @ApiModelProperty("出库人员姓名") |
| | | private String checkoutUserName; |
| | | |
| | | @ApiModelProperty("出库时间") |
| | | private Date checkoutTime; |
| | | |
| | | @ApiModelProperty("医废状态 1:暂存中 2:运输中 3:已接收 4:已处置") |
| | | @ExcelProperty(value = "医废状态", index = 8) |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("封箱时间") |
| | | private Date boxTime; |
| | | |
| | | @ApiModelProperty("收集人id") |
| | | private Long collectUserId; |
| | | |
| | | @ApiModelProperty("入库人员") |
| | | @ExcelProperty(value = "入库人员", index = 8) |
| | | private String collectUserName; |
| | | |
| | | @ApiModelProperty("入库时间") |
| | | @ExcelProperty(value = "入库时间", index = 1) |
| | | private Date collectTime; |
| | | } |
New file |
| | |
| | | package com.sinata.system.enums; |
| | | |
| | | import lombok.Getter; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum MedicalWasteStatusEnum { |
| | | TEMPORARILY_STORED(1, "暂存中"), |
| | | IN_TRANSIT(2, "运输中"), |
| | | RECEIVED(3, "已接收"), |
| | | DISPOSED(4, "已处置"); |
| | | |
| | | private final Integer code; |
| | | private final String desc; |
| | | |
| | | public static MedicalWasteStatusEnum getEnumByCode(Integer code) { |
| | | for (MedicalWasteStatusEnum e : MedicalWasteStatusEnum.values()) { |
| | | if (e.code.equals(code)) { |
| | | return e; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | |
| | | * @param query |
| | | * @return |
| | | */ |
| | | List<MwCollectRecordVO> getExportList(@Param("query") MwCollectRecordQuery query); |
| | | List<MwCollectRecordVO> getExportList(@Param("query") MwCollectRecordQuery query, @Param("treeCode") String treeCode); |
| | | } |
| | |
| | | package com.sinata.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.sinata.system.domain.MwMicroEquipment; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.sinata.system.domain.query.StorageRecordQuery; |
| | | import com.sinata.system.domain.vo.MwMedicalWasteBoxVO; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Mapper |
| | | public interface MwMicroEquipmentMapper extends BaseMapper<MwMicroEquipment> { |
| | | /** |
| | | * 设备管理分页列表 |
| | | * |
| | | * @param page |
| | | * @param equipmentName |
| | | * @param status |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | Page<MwMicroEquipmentVO> pageList(Page<MwMicroEquipmentVO> page, @Param("equipmentName") String equipmentName, @Param("status") Integer status, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 待处理的医废列表 |
| | | * |
| | | * @param page |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Page<MwMedicalWasteBoxVO> storedMedicalWastePage(Page<MwMedicalWasteBoxVO> page, @Param("query") StorageRecordQuery query, @Param("treeCode") String treeCode); |
| | | } |
| | |
| | | package com.sinata.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.sinata.system.domain.MwStagingRoom; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.sinata.system.domain.query.CheckoutRecordQuery; |
| | | import com.sinata.system.domain.query.StorageRecordQuery; |
| | | import com.sinata.system.domain.vo.MwCheckoutRecordVO; |
| | | import com.sinata.system.domain.vo.MwCollectRecordVO; |
| | | import com.sinata.system.domain.vo.MwStagingRoomVO; |
| | | import com.sinata.system.domain.vo.MwStorageRecordVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * 暂存间分页列表 |
| | | * |
| | | * @param objectPage |
| | | * @param departmentId |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | Page<MwStagingRoomVO> pagelist(Page<Object> objectPage, @Param("departmentId") Long departmentId, @Param("treeCode") String treeCode); |
| | | Page<MwStagingRoomVO> pagelist(Page<Object> objectPage, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 暂存间入库记录 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Page<MwStorageRecordVO> storageRecordPage(Page<MwCollectRecordVO> page, @Param("query") StorageRecordQuery query, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 暂存间入库记录导出 |
| | | * |
| | | * @param query |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | List<MwStorageRecordVO> storageRecordList(@Param("query") StorageRecordQuery query, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 出库记录 |
| | | * |
| | | * @param page |
| | | * @param query |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | Page<MwCheckoutRecordVO> checkoutRecordPage(Page<MwCheckoutRecordVO> page, @Param("query") CheckoutRecordQuery query, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 出库记录列表 |
| | | * |
| | | * @param query |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | List<MwCheckoutRecordVO> checkoutRecordList(@Param("query") CheckoutRecordQuery query, @Param("treeCode") String treeCode); |
| | | } |
| | |
| | | package com.sinata.system.service; |
| | | |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.MwMicroEquipmentRecord; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.sinata.system.domain.query.MwMicroEquipmentRecordQuery; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentRecordVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface MwMicroEquipmentRecordService extends IService<MwMicroEquipmentRecord> { |
| | | |
| | | PageDTO<MwMicroEquipmentRecordVO> pageList(MwMicroEquipmentRecordQuery query); |
| | | } |
| | |
| | | package com.sinata.system.service; |
| | | |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.MwMicroEquipment; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.sinata.system.domain.dto.MwMicroEquipmentDTO; |
| | | import com.sinata.system.domain.query.MwMicroEquipmentQuery; |
| | | import com.sinata.system.domain.query.StorageRecordQuery; |
| | | import com.sinata.system.domain.vo.MwMedicalWasteBoxVO; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-12-02 |
| | | */ |
| | | public interface MwMicroEquipmentService extends IService<MwMicroEquipment> { |
| | | /** |
| | | * 设备管理分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwMicroEquipmentVO> pageList(MwMicroEquipmentQuery query); |
| | | |
| | | /** |
| | | * 新增设备 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | void add(MwMicroEquipmentDTO dto); |
| | | |
| | | /** |
| | | * 编辑设备 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | void edit(MwMicroEquipmentDTO dto); |
| | | |
| | | /** |
| | | * 待处理的医废列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwMedicalWasteBoxVO> storedMedicalWastePage(StorageRecordQuery query); |
| | | } |
| | |
| | | package com.sinata.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.MwStagingRoom; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.sinata.system.domain.dto.MwStagingRoomDTO; |
| | | import com.sinata.system.domain.query.CheckoutRecordQuery; |
| | | import com.sinata.system.domain.query.MwStagingRoomQuery; |
| | | import com.sinata.system.domain.query.StorageRecordQuery; |
| | | import com.sinata.system.domain.vo.MwCollectRecordVO; |
| | | import com.sinata.system.domain.vo.MwCheckoutRecordVO; |
| | | import com.sinata.system.domain.vo.MwStagingRoomVO; |
| | | import com.sinata.system.domain.vo.MwStorageRecordVO; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwCollectRecordVO> storageRecord(StorageRecordQuery query); |
| | | PageDTO<MwStorageRecordVO> storageRecord(StorageRecordQuery query); |
| | | |
| | | /** |
| | | * 暂存间入库记录导出 |
| | | * |
| | | * @param query |
| | | * @param response |
| | | */ |
| | | void storageRecordExport(StorageRecordQuery query, HttpServletResponse response) throws IOException; |
| | | |
| | | /** |
| | | * 暂存间出库记录 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwCheckoutRecordVO> checkoutRecord(CheckoutRecordQuery query); |
| | | |
| | | /** |
| | | * 暂存间出库记录导出 |
| | | * |
| | | * @param query |
| | | * @param response |
| | | */ |
| | | void checkoutRecordExport(CheckoutRecordQuery query, HttpServletResponse response) throws IOException; |
| | | } |
| | |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | treeCode = myDepartment.getTreeCode(); |
| | | } else { |
| | | treeCode = sysDepartmentService.getById(query.getDepartmentId()).getTreeCode(); |
| | | } |
| | | Page<MwCollectRecordVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | |
| | | |
| | | @Override |
| | | public void export(MwCollectRecordQuery query, HttpServletResponse response) throws IOException { |
| | | List<MwCollectRecordVO> vo = baseMapper.getExportList(query); |
| | | String treeCode = ""; |
| | | if (Objects.isNull(query.getDepartmentId())) { |
| | | SysDepartment myDepartment = sysDepartmentService.getMyDepartment(); |
| | | if (Objects.isNull(myDepartment)) { |
| | | return; |
| | | } |
| | | treeCode = myDepartment.getTreeCode(); |
| | | } else { |
| | | treeCode = sysDepartmentService.getById(query.getDepartmentId()).getTreeCode(); |
| | | } |
| | | List<MwCollectRecordVO> vo = baseMapper.getExportList(query, treeCode); |
| | | // 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman |
| | | response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); |
| | | response.setCharacterEncoding("utf-8"); |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.MwMicroEquipmentRecord; |
| | | import com.sinata.system.domain.SysDepartment; |
| | | import com.sinata.system.domain.query.MwMicroEquipmentRecordQuery; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentRecordVO; |
| | | import com.sinata.system.mapper.MwMicroEquipmentRecordMapper; |
| | | import com.sinata.system.service.MwMicroEquipmentRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.system.service.SysDepartmentService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class MwMicroEquipmentRecordServiceImpl extends ServiceImpl<MwMicroEquipmentRecordMapper, MwMicroEquipmentRecord> implements MwMicroEquipmentRecordService { |
| | | private final SysDepartmentService sysDepartmentService; |
| | | |
| | | @Override |
| | | public PageDTO<MwMicroEquipmentRecordVO> pageList(MwMicroEquipmentRecordQuery query) { |
| | | String treeCode = ""; |
| | | if (Objects.isNull(query.getDepartmentId())) { |
| | | SysDepartment myDepartment = sysDepartmentService.getMyDepartment(); |
| | | if (Objects.isNull(myDepartment)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | treeCode = myDepartment.getTreeCode(); |
| | | } else { |
| | | treeCode = sysDepartmentService.getById(query.getDepartmentId()).getTreeCode(); |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | |
| | | 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.entity.PageDTO; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.system.domain.MwMicroEquipment; |
| | | import com.sinata.system.domain.SysDepartment; |
| | | import com.sinata.system.domain.dto.MwMicroEquipmentDTO; |
| | | import com.sinata.system.domain.query.MwMicroEquipmentQuery; |
| | | import com.sinata.system.domain.query.StorageRecordQuery; |
| | | import com.sinata.system.domain.vo.MwMedicalWasteBoxVO; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentVO; |
| | | import com.sinata.system.mapper.MwMicroEquipmentMapper; |
| | | import com.sinata.system.service.MwMicroEquipmentService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.system.service.SysDepartmentService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class MwMicroEquipmentServiceImpl extends ServiceImpl<MwMicroEquipmentMapper, MwMicroEquipment> implements MwMicroEquipmentService { |
| | | private final SysDepartmentService sysDepartmentService; |
| | | |
| | | /** |
| | | * 设备管理分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageDTO<MwMicroEquipmentVO> pageList(MwMicroEquipmentQuery query) { |
| | | String treeCode = ""; |
| | | if (Objects.isNull(query.getDepartmentId())) { |
| | | SysDepartment myDepartment = sysDepartmentService.getMyDepartment(); |
| | | if (Objects.isNull(myDepartment)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | treeCode = myDepartment.getTreeCode(); |
| | | } else { |
| | | treeCode = sysDepartmentService.getById(query.getDepartmentId()).getTreeCode(); |
| | | } |
| | | Page<MwMicroEquipmentVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query.getEquipmentName(), query.getStatus(), treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增设备 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public void add(MwMicroEquipmentDTO dto) { |
| | | MwMicroEquipment mwMicroEquipment = BeanUtils.copyBean(dto, MwMicroEquipment.class); |
| | | save(mwMicroEquipment); |
| | | } |
| | | |
| | | /** |
| | | * 编辑设备 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public void edit(MwMicroEquipmentDTO dto) { |
| | | if (Objects.isNull(dto.getId())) { |
| | | throw new RuntimeException("设备id不能为空"); |
| | | } |
| | | MwMicroEquipment mwMicroEquipment = BeanUtils.copyBean(dto, MwMicroEquipment.class); |
| | | updateById(mwMicroEquipment); |
| | | } |
| | | |
| | | /** |
| | | * 待处理的医废列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageDTO<MwMedicalWasteBoxVO> storedMedicalWastePage(StorageRecordQuery query) { |
| | | String treeCode = ""; |
| | | if (Objects.isNull(query.getDepartmentId())) { |
| | | SysDepartment myDepartment = sysDepartmentService.getMyDepartment(); |
| | | if (Objects.isNull(myDepartment)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | treeCode = myDepartment.getTreeCode(); |
| | | } else { |
| | | treeCode = sysDepartmentService.getById(query.getDepartmentId()).getTreeCode(); |
| | | } |
| | | Page<MwMedicalWasteBoxVO> page = baseMapper.storedMedicalWastePage(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | | } |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | 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.domain.MwStagingRoom; |
| | | import com.sinata.system.domain.SysDepartment; |
| | | import com.sinata.system.domain.dto.MwStagingRoomDTO; |
| | | import com.sinata.system.domain.query.CheckoutRecordQuery; |
| | | import com.sinata.system.domain.query.MwStagingRoomQuery; |
| | | import com.sinata.system.domain.query.StorageRecordQuery; |
| | | import com.sinata.system.domain.vo.MwCollectRecordVO; |
| | | import com.sinata.system.domain.vo.MwCheckoutRecordVO; |
| | | import com.sinata.system.domain.vo.MwStagingRoomVO; |
| | | import com.sinata.system.domain.vo.MwStorageRecordVO; |
| | | import com.sinata.system.mapper.MwStagingRoomMapper; |
| | | import com.sinata.system.service.MwStagingRoomService; |
| | | 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; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public PageDTO<MwStagingRoomVO> pageList(MwStagingRoomQuery query) { |
| | | String treeCode = ""; |
| | | if (Objects.nonNull(query.getDepartmentId())) { |
| | | SysDepartment department = sysDepartmentService.getById(query.getDepartmentId()); |
| | | if (Objects.isNull(department)) { |
| | | if (Objects.isNull(query.getDepartmentId())) { |
| | | SysDepartment myDepartment = sysDepartmentService.getMyDepartment(); |
| | | if (Objects.isNull(myDepartment)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | treeCode = department.getTreeCode(); |
| | | treeCode = myDepartment.getTreeCode(); |
| | | } else if (Objects.nonNull(query.getDepartmentId())) { |
| | | treeCode = sysDepartmentService.getById(query.getDepartmentId()).getTreeCode(); |
| | | } |
| | | Page<MwStagingRoomVO> page = baseMapper.pagelist(new Page<>(query.getPageCurr(), query.getPageSize()), query.getDepartmentId(), treeCode); |
| | | Page<MwStagingRoomVO> page = baseMapper.pagelist(new Page<>(query.getPageCurr(), query.getPageSize()), treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageDTO<MwCollectRecordVO> storageRecord(StorageRecordQuery query) { |
| | | return null; |
| | | public PageDTO<MwStorageRecordVO> storageRecord(StorageRecordQuery query) { |
| | | String treeCode = ""; |
| | | if (Objects.isNull(query.getDepartmentId()) && Objects.isNull(query.getStagingRoomId())) { |
| | | SysDepartment myDepartment = sysDepartmentService.getMyDepartment(); |
| | | if (Objects.isNull(myDepartment)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | treeCode = myDepartment.getTreeCode(); |
| | | } else if (Objects.nonNull(query.getDepartmentId()) && Objects.isNull(query.getStagingRoomId())) { |
| | | treeCode = sysDepartmentService.getById(query.getDepartmentId()).getTreeCode(); |
| | | } |
| | | Page<MwStorageRecordVO> page = baseMapper.storageRecordPage(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | | |
| | | /** |
| | | * 暂存间入库记录导出 |
| | | * |
| | | * @param query |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void storageRecordExport(StorageRecordQuery query, HttpServletResponse response) throws IOException { |
| | | String treeCode = ""; |
| | | if (Objects.isNull(query.getDepartmentId()) && Objects.isNull(query.getStagingRoomId())) { |
| | | SysDepartment myDepartment = sysDepartmentService.getMyDepartment(); |
| | | if (Objects.isNull(myDepartment)) { |
| | | return; |
| | | } |
| | | treeCode = myDepartment.getTreeCode(); |
| | | } else if (Objects.nonNull(query.getDepartmentId()) && Objects.isNull(query.getStagingRoomId())) { |
| | | treeCode = sysDepartmentService.getById(query.getDepartmentId()).getTreeCode(); |
| | | } |
| | | List<MwStorageRecordVO> list = baseMapper.storageRecordList(query, treeCode); |
| | | // 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman |
| | | response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系 |
| | | String fileName = URLEncoder.encode("暂存间入库记录", "UTF-8").replaceAll("\\+", "%20"); |
| | | response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); |
| | | EasyExcel.write(response.getOutputStream(), MwStorageRecordVO.class).sheet("暂存间入库记录").doWrite(list); |
| | | } |
| | | |
| | | /** |
| | | * 暂存间出库记录 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageDTO<MwCheckoutRecordVO> checkoutRecord(CheckoutRecordQuery query) { |
| | | String treeCode = ""; |
| | | if (Objects.isNull(query.getDepartmentId()) && Objects.isNull(query.getStagingRoomId())) { |
| | | SysDepartment myDepartment = sysDepartmentService.getMyDepartment(); |
| | | if (Objects.isNull(myDepartment)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | treeCode = myDepartment.getTreeCode(); |
| | | } else if (Objects.nonNull(query.getDepartmentId()) && Objects.isNull(query.getStagingRoomId())) { |
| | | treeCode = sysDepartmentService.getById(query.getDepartmentId()).getTreeCode(); |
| | | } |
| | | Page<MwCheckoutRecordVO> page = baseMapper.checkoutRecordPage(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | | |
| | | /** |
| | | * 暂存间出库记录导出 |
| | | * |
| | | * @param query |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void checkoutRecordExport(CheckoutRecordQuery query, HttpServletResponse response) throws IOException { |
| | | String treeCode = ""; |
| | | if (Objects.isNull(query.getDepartmentId()) && Objects.isNull(query.getStagingRoomId())) { |
| | | SysDepartment myDepartment = sysDepartmentService.getMyDepartment(); |
| | | if (Objects.isNull(myDepartment)) { |
| | | return; |
| | | } |
| | | treeCode = myDepartment.getTreeCode(); |
| | | } else if (Objects.nonNull(query.getDepartmentId()) && Objects.isNull(query.getStagingRoomId())) { |
| | | treeCode = sysDepartmentService.getById(query.getDepartmentId()).getTreeCode(); |
| | | } |
| | | List<MwCheckoutRecordVO> list = baseMapper.checkoutRecordList(query, treeCode); |
| | | // 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman |
| | | response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系 |
| | | String fileName = URLEncoder.encode("暂存间出库记录", "UTF-8").replaceAll("\\+", "%20"); |
| | | response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); |
| | | EasyExcel.write(response.getOutputStream(), MwCheckoutRecordVO.class).sheet("暂存间出库记录").doWrite(list); |
| | | } |
| | | } |
| | |
| | | FROM MW_COLLECT_RECORD mcr |
| | | LEFT JOIN SYS_USER su |
| | | ON mcr.COLLECT_USER_ID = su.USER_ID |
| | | LEFT JOIN SYS_DEPARTMENT sd ON su.DEPARTMENT_ID = sd.ID |
| | | LEFT JOIN SYS_DEPARTMENT sd ON mcr.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | <if test="query.departmentId != null"> |
| | | and mcr.DEPARTMENT_ID = #{query.departmentId} |
| | | </if> |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | and sd.TREE_CODE like concat(#{treeCode},'%') |
| | | </if> |
| | |
| | | FROM MW_COLLECT_RECORD mcr |
| | | LEFT JOIN SYS_USER su |
| | | ON mcr.COLLECT_USER_ID = su.USER_ID |
| | | LEFT JOIN SYS_DEPARTMENT sd ON su.DEPARTMENT_ID = sd.ID |
| | | LEFT JOIN SYS_DEPARTMENT sd ON mcr.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | <if test="query.departmentId != null"> |
| | | and mcr.DEPARTMENT_ID = #{query.departmentId} |
| | | </if> |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | and sd.TREE_CODE like concat(#{treeCode},'%') |
| | | </if> |
| | |
| | | UPDATE_TIME, |
| | | ID, DEPARTMENT_ID, EQUIPMENT_NAME, EQUIPMENT_NUMBER, STATUS, REMARK |
| | | </sql> |
| | | <select id="pageList" resultType="com.sinata.system.domain.vo.MwMicroEquipmentVO"> |
| | | SELECT mme.ID, |
| | | mme.DEPARTMENT_ID, |
| | | mme.EQUIPMENT_NAME, |
| | | mme.EQUIPMENT_NUMBER, |
| | | mme.STATUS, |
| | | mme.REMARK, |
| | | SD.DEPARTMENT_NAME AS hospitalName |
| | | FROM MW_MICRO_EQUIPMENT mme |
| | | LEFT JOIN SYS_DEPARTMENT sd ON SD.ID = mme.DEPARTMENT_ID |
| | | <where> |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | sd.TREE_CODE LIKE concat(#{treeCode}, '%') |
| | | </if> |
| | | <if test="equipmentName != null and equipmentName != ''"> |
| | | AND mme.EQUIPMENT_NAME LIKE concat('%',#{equipmentName},'%') |
| | | </if> |
| | | <if test="status!= null"> |
| | | AND mme.STATUS = #{status} |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | | <select id="storedMedicalWastePage" resultType="com.sinata.system.domain.vo.MwMedicalWasteBoxVO"> |
| | | SELECT mcr.BOX_ID AS id, |
| | | mcr.HOSPITAL_NAME, |
| | | mcr.MEDICAL_WASTE_NUMBER, |
| | | mcr.BOX_NUMBER, |
| | | mcr.WASTE_TYPE_STR, |
| | | mcr.COLLECT_TIME, |
| | | su.NICK_NAME AS COLLECT_USER_NAME, |
| | | msr.ROOM_NAME, |
| | | COUNT(*) AS bagNum, |
| | | SUM(mcr.WEIGHT) AS totalWeight |
| | | FROM MEDICAL_WASTE.MW_COLLECT_RECORD mcr |
| | | LEFT JOIN MEDICAL_WASTE.SYS_USER su |
| | | ON mcr.COLLECT_USER_ID = su.USER_ID |
| | | LEFT JOIN MEDICAL_WASTE.SYS_DEPARTMENT sd ON su.DEPARTMENT_ID = sd.ID |
| | | LEFT JOIN MEDICAL_WASTE.MW_STAGING_ROOM msr ON msr.ID = mcr.STAGING_ROOM_ID |
| | | <where> |
| | | mcr.STATUS = 1 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | and sd.TREE_CODE like concat(#{treeCode},'%') |
| | | </if> |
| | | <if test="query.stagingRoomId != null and query.stagingRoomId != ''"> |
| | | and mcr.STAGING_ROOM_ID = #{query.stagingRoomId} |
| | | </if> |
| | | <if test="query.wasteType != null"> |
| | | and mcr.WASTE_TYPE = #{query.wasteType} |
| | | </if> |
| | | <if test="query.collectTimeStart != null and query.collectTimeEnd != null"> |
| | | and mcr.COLLECT_TIME between #{query.collectTimeStart} and #{query.collectTimeEnd} |
| | | </if> |
| | | </where> |
| | | GROUP BY mcr.BOX_ID |
| | | ORDER BY mcr.CREATE_TIME DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | ON msr.ID = mr.STAGING_ROOM_ID |
| | | LEFT JOIN SYS_DEPARTMENT sd ON msr.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | <if test="departmentId != null and departmentId != ''"> |
| | | msr.DEPARTMENT_ID = #{departmentId} |
| | | </if> |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | sd.TREE_CODE LIKE CONCAT('%', #{tree}) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="storageRecordPage" resultType="com.sinata.system.domain.vo.MwStorageRecordVO"> |
| | | SELECT mcr.ID, |
| | | mcr.DEPARTMENT_ID, |
| | | mcr.HOSPITAL_NAME, |
| | | mcr.STAGING_ROOM_ID, |
| | | mcr.MEDICAL_WASTE_NUMBER, |
| | | mcr.BOX_ID, |
| | | mcr.BOX_NUMBER, |
| | | mcr.WASTE_TYPE, |
| | | mcr.WASTE_TYPE_STR, |
| | | mcr.WEIGHT, |
| | | mcr.CHECKOUT_USER_ID, |
| | | mcr.CHECKOUT_TIME, |
| | | mcr.STATUS, |
| | | mcr.BOX_TIME, |
| | | mcr.DEL_FLAG, |
| | | mcr.CREATE_BY, |
| | | mcr.CREATE_TIME, |
| | | mcr.UPDATE_BY, |
| | | mcr.UPDATE_TIME, |
| | | mcr.COLLECT_USER_ID, |
| | | mcr.COLLECT_TIME, |
| | | msr.ROOM_NAME, |
| | | su.NICK_NAME AS COLLECT_USER_NAME |
| | | FROM MW_COLLECT_RECORD mcr |
| | | LEFT JOIN SYS_USER su |
| | | ON mcr.COLLECT_USER_ID = su.USER_ID |
| | | LEFT JOIN SYS_DEPARTMENT sd ON su.DEPARTMENT_ID = sd.ID |
| | | LEFT JOIN MW_STAGING_ROOM msr ON msr.ID = mcr.STAGING_ROOM_ID |
| | | <where> |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | and sd.TREE_CODE like concat(#{treeCode},'%') |
| | | </if> |
| | | <if test="query.stagingRoomId != null and query.stagingRoomId != ''"> |
| | | and mcr.STAGING_ROOM_ID = #{query.stagingRoomId} |
| | | </if> |
| | | <if test="query.medicalWasteNumber != null and query.medicalWasteNumber != ''"> |
| | | and mcr.MEDICAL_WASTE_NUMBER like concat('%',#{query.medicalWasteNumber},'%') |
| | | </if> |
| | | <if test="query.boxNumber != null and query.boxNumber != ''"> |
| | | and mcr.BOX_NUMBER like concat('%',#{query.boxNumber},'%') |
| | | </if> |
| | | <if test="query.wasteType != null"> |
| | | and mcr.WASTE_TYPE = #{query.wasteType} |
| | | </if> |
| | | <if test="query.collectTimeStart != null and query.collectTimeEnd != null"> |
| | | and mcr.COLLECT_TIME between #{query.collectTimeStart} and #{query.collectTimeEnd} |
| | | </if> |
| | | </where> |
| | | ORDER BY mcr.CREATE_TIME DESC |
| | | </select> |
| | | <select id="storageRecordList" resultType="com.sinata.system.domain.vo.MwStorageRecordVO"> |
| | | SELECT mcr.ID, |
| | | mcr.DEPARTMENT_ID, |
| | | mcr.HOSPITAL_NAME, |
| | | mcr.STAGING_ROOM_ID, |
| | | mcr.MEDICAL_WASTE_NUMBER, |
| | | mcr.BOX_ID, |
| | | mcr.BOX_NUMBER, |
| | | mcr.WASTE_TYPE, |
| | | mcr.WASTE_TYPE_STR, |
| | | mcr.WEIGHT, |
| | | mcr.CHECKOUT_USER_ID, |
| | | mcr.CHECKOUT_TIME, |
| | | mcr.STATUS, |
| | | mcr.BOX_TIME, |
| | | mcr.DEL_FLAG, |
| | | mcr.CREATE_BY, |
| | | mcr.CREATE_TIME, |
| | | mcr.UPDATE_BY, |
| | | mcr.UPDATE_TIME, |
| | | mcr.COLLECT_USER_ID, |
| | | mcr.COLLECT_TIME, |
| | | su.NICK_NAME AS COLLECT_USER_NAME |
| | | FROM MW_COLLECT_RECORD mcr |
| | | LEFT JOIN SYS_USER su |
| | | ON mcr.COLLECT_USER_ID = su.USER_ID |
| | | LEFT JOIN SYS_DEPARTMENT sd ON su.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | and sd.TREE_CODE like concat(#{treeCode},'%') |
| | | </if> |
| | | <if test="query.stagingRoomId != null and query.stagingRoomId != ''"> |
| | | and mcr.STAGING_ROOM_ID = #{query.stagingRoomId} |
| | | </if> |
| | | <if test="query.medicalWasteNumber != null and query.medicalWasteNumber != ''"> |
| | | and mcr.MEDICAL_WASTE_NUMBER like concat('%',#{query.medicalWasteNumber},'%') |
| | | </if> |
| | | <if test="query.boxNumber != null and query.boxNumber != ''"> |
| | | and mcr.BOX_NUMBER like concat('%',#{query.boxNumber},'%') |
| | | </if> |
| | | <if test="query.wasteType != null"> |
| | | and mcr.WASTE_TYPE = #{query.wasteType} |
| | | </if> |
| | | <if test="query.collectTimeStart != null and query.collectTimeEnd != null"> |
| | | and mcr.COLLECT_TIME between #{query.collectTimeStart} and #{query.collectTimeEnd} |
| | | </if> |
| | | </where> |
| | | ORDER BY mcr.CREATE_TIME DESC |
| | | </select> |
| | | <select id="checkoutRecordPage" resultType="com.sinata.system.domain.vo.MwCheckoutRecordVO"> |
| | | SELECT mcr.ID, |
| | | mcr.CHECKOUT_TIME, |
| | | mcr.HOSPITAL_NAME, |
| | | msr.ROOM_NAME, |
| | | mcr.BOX_NUM, |
| | | mcr.BAG_NUM, |
| | | mcr.TOTAL_WEIGHT, |
| | | mcr.HOSPITAL_SIGNATURE, |
| | | su.NICK_NAME AS driverName, |
| | | LICENSE_PLATE_NUMBER |
| | | FROM MEDICAL_WASTE.MW_CHECKOUT_RECORD mcr |
| | | LEFT JOIN MEDICAL_WASTE.MW_STAGING_ROOM msr |
| | | ON mcr.STAGING_ROOM_ID = msr.ID |
| | | LEFT JOIN MEDICAL_WASTE.SYS_USER su |
| | | ON mcr.DRIVER_ID = su.USER_ID |
| | | LEFT JOIN MEDICAL_WASTE.MW_TRANSIT_CAR mtc |
| | | ON mcr.CAR_ID = mtc.ID |
| | | <where> |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND msr.DEPARTMENT_ID LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | | <if test="query.stagingRoomId !=null and query.stagingRoomId != ''"> |
| | | AND mcr.STAGING_ROOM_ID = #{query.stagingRoomId} |
| | | </if> |
| | | <if test="query.checkoutTimeStart != null and query.checkoutTimeEnd!=null"> |
| | | AND mcr.CHECKOUT_TIME BETWEEN #{query.checkoutTimeStart} AND #{query.checkoutTimeEnd} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="checkoutRecordList" resultType="com.sinata.system.domain.vo.MwCheckoutRecordVO"> |
| | | SELECT mcr.ID, |
| | | mcr.CHECKOUT_TIME, |
| | | mcr.HOSPITAL_NAME, |
| | | msr.ROOM_NAME, |
| | | mcr.BOX_NUM, |
| | | mcr.BAG_NUM, |
| | | mcr.TOTAL_WEIGHT, |
| | | mcr.HOSPITAL_SIGNATURE, |
| | | su.NICK_NAME AS driverName, |
| | | LICENSE_PLATE_NUMBER |
| | | FROM MEDICAL_WASTE.MW_CHECKOUT_RECORD mcr |
| | | LEFT JOIN MEDICAL_WASTE.MW_STAGING_ROOM msr |
| | | ON mcr.STAGING_ROOM_ID = msr.ID |
| | | LEFT JOIN MEDICAL_WASTE.SYS_USER su |
| | | ON mcr.DRIVER_ID = su.USER_ID |
| | | LEFT JOIN MEDICAL_WASTE.MW_TRANSIT_CAR mtc |
| | | ON mcr.CAR_ID = mtc.ID |
| | | <where> |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND msr.DEPARTMENT_ID LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | | <if test="query.stagingRoomId !=null and query.stagingRoomId != ''"> |
| | | AND mcr.STAGING_ROOM_ID = #{query.stagingRoomId} |
| | | </if> |
| | | <if test="query.checkoutTimeStart != null and query.checkoutTimeEnd!=null"> |
| | | AND mcr.CHECKOUT_TIME BETWEEN #{query.checkoutTimeStart} AND #{query.checkoutTimeEnd} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |