| | |
| | | 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.CheckoutRecordQuery; |
| | | import com.sinata.system.domain.query.MwCheckoutRecordItemQuery; |
| | | import com.sinata.system.domain.query.MwTransitRecordQuery; |
| | | import com.sinata.system.domain.vo.MwCheckoutRecordVO; |
| | | import com.sinata.system.domain.vo.MwMedicalWasteBoxVO; |
| | | import com.sinata.system.domain.vo.MwTransitRecordVO; |
| | | import com.sinata.system.service.MwCheckoutRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author mitao |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Api(tags = {"转运记录、运输记录相关接口"}) |
| | | @Validated |
| | | @RequiredArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/backend/mwCheckoutRecord") |
| | | public class MwCheckoutRecordController { |
| | | private final MwCheckoutRecordService mwCheckoutRecordService; |
| | | |
| | | /** |
| | | * 转运记录分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/hospital/page") |
| | | @ApiOperation(value = "转运记录分页列表") |
| | | public R<PageDTO<MwCheckoutRecordVO>> pageList(@Valid @RequestBody CheckoutRecordQuery query) { |
| | | return R.ok(mwCheckoutRecordService.pageHospitalTransitList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 转运记录详情 |
| | | * |
| | | * @param departmentId |
| | | * @return |
| | | */ |
| | | @GetMapping("/hospital/detail/{departmentId}") |
| | | @ApiOperation(value = "转运记录详情") |
| | | public R<MwCheckoutRecordVO> hospitalDetail(@ApiParam(name = "id", value = "医院id", required = true) @PathVariable("departmentId") Long departmentId) { |
| | | return R.ok(mwCheckoutRecordService.hospitalDetail(departmentId)); |
| | | } |
| | | |
| | | /** |
| | | * 转运记录医废详情分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/hospital/detailPage") |
| | | @ApiOperation(value = "转运记录医废详情分页列表") |
| | | public R<PageDTO<MwMedicalWasteBoxVO>> hospitalDetailPage(@Valid @RequestBody MwCheckoutRecordItemQuery query) { |
| | | return R.ok(mwCheckoutRecordService.hospitalDetailPage(query)); |
| | | } |
| | | |
| | | /** |
| | | * 运输记录分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/transit/page") |
| | | @ApiOperation(value = "运输记录分页列表") |
| | | public R<PageDTO<MwTransitRecordVO>> transitPageList(@Valid @RequestBody MwTransitRecordQuery query) { |
| | | return R.ok(mwCheckoutRecordService.transitPageList(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.MwDisposalRecordItemQuery; |
| | | import com.sinata.system.domain.query.MwDisposalRecordQuery; |
| | | import com.sinata.system.domain.vo.DisposalRecordStaticsVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordItemVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordVO; |
| | | import com.sinata.system.service.MwDisposalRecordService; |
| | | 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 |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @RequestMapping("/backend/mwDisposalRecord") |
| | | public class MwDisposalRecordController { |
| | | private final MwDisposalRecordService mwDisposalRecordService; |
| | | |
| | | /** |
| | | * 统计数据 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/statics") |
| | | @ApiOperation(value = "统计数据") |
| | | public R<DisposalRecordStaticsVO> statics(@RequestBody MwDisposalRecordQuery query) { |
| | | return R.ok(mwDisposalRecordService.statics(query)); |
| | | } |
| | | |
| | | /** |
| | | * 处置显示分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/page") |
| | | @ApiOperation("处置显示分页列表") |
| | | public R<PageDTO<MwDisposalRecordVO>> pageList(@Valid @RequestBody MwDisposalRecordQuery query) { |
| | | return R.ok(mwDisposalRecordService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/detail") |
| | | @ApiOperation("详情") |
| | | public R<PageDTO<MwDisposalRecordItemVO>> detail(@Valid @RequestBody MwDisposalRecordItemQuery query) { |
| | | return R.ok(mwDisposalRecordService.detail(query)); |
| | | } |
| | | } |
| | |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-all</artifactId> |
| | | </dependency> |
| | | <!-- https://mvnrepository.com/artifact/com.alibaba/easyexcel --> |
| | | |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>easyexcel</artifactId> |
| | | <groupId>cn.idev.excel</groupId> |
| | | <artifactId>fastexcel</artifactId> |
| | | <version>1.0.0</version> |
| | | </dependency> |
| | | |
| | | |
| | | </dependencies> |
| | | |
| | | </project> |
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/17 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel("转运记录查询数据传输对象") |
| | | public class MwCheckoutRecordItemQuery extends BasePage { |
| | | |
| | | private static final long serialVersionUID = 7206172966772579930L; |
| | | |
| | | @ApiModelProperty("医院id") |
| | | private Long departmentId; |
| | | } |
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/17 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel("处置显示详情分页查询对象") |
| | | public class MwDisposalRecordItemQuery extends BasePage { |
| | | |
| | | private static final long serialVersionUID = -938875072103345056L; |
| | | @ApiModelProperty("处置记录id") |
| | | private Long disposalRecordId; |
| | | |
| | | } |
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/17 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel("处置显示查询数据传输对象") |
| | | public class MwDisposalRecordQuery extends BasePage { |
| | | private static final long serialVersionUID = -9048784715057781335L; |
| | | |
| | | @ApiModelProperty("机构id") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("接收时间-开始") |
| | | private Date receiveTimeStart; |
| | | |
| | | @ApiModelProperty("接收时间-结束") |
| | | private Date receiveTimeEnd; |
| | | } |
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/17 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel("运输记录查询数据传输对象") |
| | | public class MwTransitRecordQuery extends BasePage { |
| | | private static final long serialVersionUID = 3585169031300259198L; |
| | | |
| | | @ApiModelProperty("机构id") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("车牌号") |
| | | private String licensePlateNumber; |
| | | |
| | | @ApiModelProperty("状态") |
| | | private Integer status; |
| | | |
| | | @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; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/17 |
| | | */ |
| | | @Data |
| | | @ApiModel("处置显示统计视图对象") |
| | | public class DisposalRecordStaticsVO { |
| | | |
| | | @ApiModelProperty("医疗废物接收箱数") |
| | | private Integer receiveQuantity; |
| | | |
| | | @ApiModelProperty("医疗废物接口重量") |
| | | private BigDecimal receiveWeight; |
| | | |
| | | @ApiModelProperty("医疗废物卸车箱数") |
| | | private Integer unloadQuantity; |
| | | |
| | | @ApiModelProperty("医疗废物卸车重量") |
| | | private BigDecimal unloadWeight; |
| | | |
| | | @ApiModelProperty("医疗废物处置箱数") |
| | | private Integer totalHandledQuantity; |
| | | |
| | | @ApiModelProperty("医疗废物处置总量") |
| | | private BigDecimal totalHandledWeight; |
| | | } |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import cn.idev.excel.annotation.ExcelProperty; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty("车牌号") |
| | | private String licensePlateNumber; |
| | | |
| | | @ApiModelProperty("转运线路") |
| | | private String routeName; |
| | | |
| | | } |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import cn.idev.excel.annotation.ExcelProperty; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
New file |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/17 |
| | | */ |
| | | @Data |
| | | @ApiModel("处置详情视图对象") |
| | | public class MwDisposalRecordItemVO { |
| | | @ApiModelProperty("箱号") |
| | | private String boxNumber; |
| | | |
| | | @ApiModelProperty("袋数") |
| | | private Integer bagNum; |
| | | |
| | | @ApiModelProperty("重量(KG)") |
| | | private BigDecimal weight; |
| | | |
| | | @ApiModelProperty("处置时间") |
| | | private String disposalTime; |
| | | } |
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/17 |
| | | */ |
| | | @Data |
| | | @ApiModel("处置显示视图对象") |
| | | public class MwDisposalRecordVO { |
| | | |
| | | @ApiModelProperty("处置接收记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("区域id(处置单位id)") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("处置单位名称") |
| | | private String disposalUnitName; |
| | | |
| | | @ApiModelProperty("接收箱数") |
| | | private Integer receiveQuantity; |
| | | |
| | | @ApiModelProperty("接收时间") |
| | | private Date receiveTime; |
| | | |
| | | @ApiModelProperty("接收重量(kg)") |
| | | private BigDecimal receiveWeight; |
| | | |
| | | @ApiModelProperty("接收人id") |
| | | private Long receiverId; |
| | | |
| | | @ApiModelProperty("卸车数量") |
| | | private Integer unloadQuantity; |
| | | |
| | | @ApiModelProperty("卸车重量") |
| | | private BigDecimal unloadWeight; |
| | | |
| | | @ApiModelProperty("处理总数量") |
| | | private Integer totalHandledQuantity; |
| | | |
| | | @ApiModelProperty("是否处置 1:是 0:否") |
| | | private Integer disposalFlag; |
| | | |
| | | @ApiModelProperty("处理重量") |
| | | private BigDecimal totalHandledWeight; |
| | | |
| | | @ApiModelProperty("处置时间") |
| | | private Date disposalTime; |
| | | |
| | | @ApiModelProperty("处置人id") |
| | | private Long disposalUserId; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("重量") |
| | | private BigDecimal totalWeight; |
| | | |
| | | @ApiModelProperty("入库人员") |
| | | @ApiModelProperty("入库/收集人员") |
| | | private String collectUserName; |
| | | |
| | | @ApiModelProperty("最后封箱时间") |
| | | private Date boxTime; |
| | | |
| | | } |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import cn.idev.excel.annotation.ExcelProperty; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
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/17 |
| | | */ |
| | | @Data |
| | | @ApiModel("运输记录视图对象") |
| | | public class MwTransitRecordVO { |
| | | |
| | | @ApiModelProperty("车辆id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("单位名称") |
| | | private String departmentName; |
| | | |
| | | @ApiModelProperty("车牌号") |
| | | private String licensePlateNumber; |
| | | |
| | | @ApiModelProperty("司机姓名") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty("车内箱子数量") |
| | | private Integer boxNum; |
| | | |
| | | @ApiModelProperty("医废总重量") |
| | | private BigDecimal weight; |
| | | |
| | | @ApiModelProperty("运输开始时间") |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty("运输结束时间") |
| | | private Date endTime; |
| | | } |
| | |
| | | package com.sinata.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.sinata.system.domain.MwCheckoutRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.sinata.system.domain.query.CheckoutRecordQuery; |
| | | import com.sinata.system.domain.query.MwTransitRecordQuery; |
| | | import com.sinata.system.domain.vo.MwCheckoutRecordVO; |
| | | import com.sinata.system.domain.vo.MwMedicalWasteBoxVO; |
| | | import com.sinata.system.domain.vo.MwTransitRecordVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Mapper |
| | | public interface MwCheckoutRecordMapper extends BaseMapper<MwCheckoutRecord> { |
| | | /** |
| | | * 转运记录分页列表 |
| | | * |
| | | * @param page |
| | | * @param query |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | Page<MwCheckoutRecordVO> pageHospitalTransitList(Page<MwCheckoutRecordVO> page, @Param("query") CheckoutRecordQuery query, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 转运记录详情 |
| | | * |
| | | * @param departmentId |
| | | * @return |
| | | */ |
| | | MwCheckoutRecordVO hospitalDetail(Long departmentId); |
| | | |
| | | /** |
| | | * 转运记录医废详情分页列表 |
| | | * |
| | | * @param page |
| | | * @param departmentId |
| | | * @return |
| | | */ |
| | | Page<MwMedicalWasteBoxVO> hospitalDetailPage(Page<MwMedicalWasteBoxVO> page, @Param("departmentId") Long departmentId); |
| | | |
| | | /** |
| | | * 运输记录分页列表 |
| | | * |
| | | * @param page |
| | | * @param query |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | Page<MwTransitRecordVO> transitPageList(Page<MwTransitRecordVO> page, @Param("query") MwTransitRecordQuery query, String treeCode); |
| | | } |
| | |
| | | package com.sinata.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.sinata.system.domain.MwDisposalRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.sinata.system.domain.query.MwDisposalRecordQuery; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordItemVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Mapper |
| | | public interface MwDisposalRecordMapper extends BaseMapper<MwDisposalRecord> { |
| | | /** |
| | | * 统计数据 |
| | | * |
| | | * @param query |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | List<MwDisposalRecordVO> getStaticsData(@Param("query") MwDisposalRecordQuery query, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 处置显示分页列表 |
| | | * |
| | | * @param page |
| | | * @param query |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | Page<MwDisposalRecordVO> pageList(Page<MwDisposalRecordVO> page, @Param("query") MwDisposalRecordQuery query, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param page |
| | | * @param disposalRecordId |
| | | * @return |
| | | */ |
| | | Page<MwDisposalRecordItemVO> pageDetail(Page<MwDisposalRecordItemVO> page, @Param("disposalRecordId") Long disposalRecordId); |
| | | } |
| | |
| | | package com.sinata.system.service; |
| | | |
| | | import com.sinata.system.domain.MwCheckoutRecord; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.MwCheckoutRecord; |
| | | import com.sinata.system.domain.query.CheckoutRecordQuery; |
| | | import com.sinata.system.domain.query.MwCheckoutRecordItemQuery; |
| | | import com.sinata.system.domain.query.MwTransitRecordQuery; |
| | | import com.sinata.system.domain.vo.MwCheckoutRecordVO; |
| | | import com.sinata.system.domain.vo.MwMedicalWasteBoxVO; |
| | | import com.sinata.system.domain.vo.MwTransitRecordVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-12-02 |
| | | */ |
| | | public interface MwCheckoutRecordService extends IService<MwCheckoutRecord> { |
| | | /** |
| | | * 转运记录分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwCheckoutRecordVO> pageHospitalTransitList(CheckoutRecordQuery query); |
| | | |
| | | /** |
| | | * 转运记录详情 |
| | | * |
| | | * @param departmentId |
| | | * @return |
| | | */ |
| | | MwCheckoutRecordVO hospitalDetail(Long departmentId); |
| | | |
| | | /** |
| | | * 转运记录医废详情分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwMedicalWasteBoxVO> hospitalDetailPage(MwCheckoutRecordItemQuery query); |
| | | |
| | | /** |
| | | * 运输记录分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwTransitRecordVO> transitPageList(MwTransitRecordQuery query); |
| | | } |
| | |
| | | package com.sinata.system.service; |
| | | |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.MwDisposalRecord; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.sinata.system.domain.query.MwDisposalRecordItemQuery; |
| | | import com.sinata.system.domain.query.MwDisposalRecordQuery; |
| | | import com.sinata.system.domain.vo.DisposalRecordStaticsVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordItemVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-12-02 |
| | | */ |
| | | public interface MwDisposalRecordService extends IService<MwDisposalRecord> { |
| | | /** |
| | | * 统计数据 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | DisposalRecordStaticsVO statics(MwDisposalRecordQuery query); |
| | | |
| | | /** |
| | | * 处置显示分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwDisposalRecordVO> pageList(MwDisposalRecordQuery query); |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwDisposalRecordItemVO> detail(MwDisposalRecordItemQuery query); |
| | | } |
| | |
| | | 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.StringUtils; |
| | | import com.sinata.system.domain.MwCheckoutRecord; |
| | | import com.sinata.system.domain.query.CheckoutRecordQuery; |
| | | import com.sinata.system.domain.query.MwCheckoutRecordItemQuery; |
| | | import com.sinata.system.domain.query.MwTransitRecordQuery; |
| | | import com.sinata.system.domain.vo.MwCheckoutRecordVO; |
| | | import com.sinata.system.domain.vo.MwMedicalWasteBoxVO; |
| | | import com.sinata.system.domain.vo.MwTransitRecordVO; |
| | | import com.sinata.system.mapper.MwCheckoutRecordMapper; |
| | | import com.sinata.system.service.MwCheckoutRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.system.service.SysDepartmentService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class MwCheckoutRecordServiceImpl extends ServiceImpl<MwCheckoutRecordMapper, MwCheckoutRecord> implements MwCheckoutRecordService { |
| | | private final SysDepartmentService sysDepartmentService; |
| | | |
| | | /** |
| | | * 转运记录分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageDTO<MwCheckoutRecordVO> pageHospitalTransitList(CheckoutRecordQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCode(query.getDepartmentId()); |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | Page<MwCheckoutRecordVO> page = baseMapper.pageHospitalTransitList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | | |
| | | /** |
| | | * 转运记录详情 |
| | | * |
| | | * @param departmentId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public MwCheckoutRecordVO hospitalDetail(Long departmentId) { |
| | | return baseMapper.hospitalDetail(departmentId); |
| | | } |
| | | |
| | | /** |
| | | * 转运记录医废详情分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageDTO<MwMedicalWasteBoxVO> hospitalDetailPage(MwCheckoutRecordItemQuery query) { |
| | | Page<MwMedicalWasteBoxVO> page = baseMapper.hospitalDetailPage(new Page<>(query.getPageCurr(), query.getPageSize()), query.getDepartmentId()); |
| | | return PageDTO.of(page); |
| | | } |
| | | |
| | | /** |
| | | * 运输记录分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageDTO<MwTransitRecordVO> transitPageList(MwTransitRecordQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCode(query.getDepartmentId()); |
| | | Page<MwTransitRecordVO> page = baseMapper.transitPageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | | } |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import cn.idev.excel.EasyExcel; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.common.entity.PageDTO; |
| | |
| | | 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.CollUtils; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.domain.MwDisposalRecord; |
| | | import com.sinata.system.domain.query.MwDisposalRecordItemQuery; |
| | | import com.sinata.system.domain.query.MwDisposalRecordQuery; |
| | | import com.sinata.system.domain.vo.DisposalRecordStaticsVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordItemVO; |
| | | import com.sinata.system.domain.vo.MwDisposalRecordVO; |
| | | import com.sinata.system.mapper.MwDisposalRecordMapper; |
| | | import com.sinata.system.service.MwDisposalRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.system.service.SysDepartmentService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class MwDisposalRecordServiceImpl extends ServiceImpl<MwDisposalRecordMapper, MwDisposalRecord> implements MwDisposalRecordService { |
| | | private final SysDepartmentService sysDepartmentService; |
| | | |
| | | /** |
| | | * 统计数据 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public DisposalRecordStaticsVO statics(MwDisposalRecordQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCode(query.getDepartmentId()); |
| | | if (StringUtils.isNotBlank(treeCode)) { |
| | | List<MwDisposalRecordVO> disposalRecordVOList = baseMapper.getStaticsData(query, treeCode); |
| | | if (CollUtils.isNotEmpty(disposalRecordVOList)) { |
| | | DisposalRecordStaticsVO vo = new DisposalRecordStaticsVO(); |
| | | vo.setReceiveQuantity(disposalRecordVOList.stream().map(MwDisposalRecordVO::getReceiveQuantity).reduce(0, Integer::sum)); |
| | | vo.setReceiveWeight(disposalRecordVOList.stream().map(MwDisposalRecordVO::getReceiveWeight).reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | vo.setUnloadQuantity(disposalRecordVOList.stream().map(MwDisposalRecordVO::getUnloadQuantity).reduce(0, Integer::sum)); |
| | | vo.setUnloadWeight(disposalRecordVOList.stream().map(MwDisposalRecordVO::getUnloadWeight).reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | vo.setTotalHandledQuantity(disposalRecordVOList.stream().map(MwDisposalRecordVO::getTotalHandledQuantity).reduce(0, Integer::sum)); |
| | | vo.setTotalHandledWeight(disposalRecordVOList.stream().map(MwDisposalRecordVO::getTotalHandledWeight).reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | } |
| | | } |
| | | return new DisposalRecordStaticsVO(); |
| | | } |
| | | |
| | | /** |
| | | * 处置显示分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageDTO<MwDisposalRecordVO> pageList(MwDisposalRecordQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCode(query.getDepartmentId()); |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | Page<MwDisposalRecordVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageDTO<MwDisposalRecordItemVO> detail(MwDisposalRecordItemQuery query) { |
| | | Page<MwDisposalRecordItemVO> page = baseMapper.pageDetail(new Page<>(query.getPageCurr(), query.getPageSize()), query.getDisposalRecordId()); |
| | | return PageDTO.of(page); |
| | | } |
| | | } |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import cn.idev.excel.EasyExcel; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import cn.idev.excel.EasyExcel; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.common.entity.PageDTO; |
| | |
| | | UPDATE_TIME, |
| | | ID, CHECKOUT_TIME, DEPARTMENT_ID, HOSPITAL_NAME, STAGING_ROOM_ID, HOSPITAL_SIGNATURE, DRIVER_ID, CAR_ID |
| | | </sql> |
| | | <select id="pageHospitalTransitList" resultType="com.sinata.system.domain.vo.MwCheckoutRecordVO"> |
| | | SELECT mcr.ID, |
| | | mcr.CHECKOUT_TIME, |
| | | mcr.HOSPITAL_NAME, |
| | | SUM(mcr.BOX_NUM) AS boxNum, |
| | | SUM(mcr.BAG_NUM) AS bagNum, |
| | | SUM(mcr.TOTAL_WEIGHT) AS totalWeight, |
| | | su.NICK_NAME AS driverName, |
| | | mtc.LICENSE_PLATE_NUMBER |
| | | FROM MW_CHECKOUT_RECORD mcr |
| | | LEFT JOIN SYS_USER su |
| | | ON mcr.DRIVER_ID = su.USER_ID |
| | | LEFT JOIN MW_TRANSIT_CAR mtc |
| | | ON mcr.CAR_ID = mtc.ID |
| | | LEFT JOIN SYS_DEPARTMENT sd |
| | | ON mcr.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND sd.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | | <if test="query.checkoutTimeStart != null and query.checkoutTimeEnd!=null"> |
| | | AND mcr.CHECKOUT_TIME BETWEEN #{query.checkoutTimeStart} AND #{query.checkoutTimeEnd} |
| | | </if> |
| | | </where> |
| | | GROUP BY mcr.DEPARTMENT_ID |
| | | </select> |
| | | <select id="hospitalDetail" resultType="com.sinata.system.domain.vo.MwCheckoutRecordVO"> |
| | | SELECT mcr.ID, |
| | | mcr.CHECKOUT_TIME, |
| | | mcr.HOSPITAL_NAME, |
| | | SUM(mcr.BOX_NUM) AS boxNum, |
| | | SUM(mcr.BAG_NUM) AS bagNum, |
| | | SUM(mcr.TOTAL_WEIGHT) AS totalWeight, |
| | | su.NICK_NAME AS driverName, |
| | | mtc.LICENSE_PLATE_NUMBER |
| | | FROM MW_CHECKOUT_RECORD mcr |
| | | LEFT JOIN SYS_USER su |
| | | ON mcr.DRIVER_ID = su.USER_ID |
| | | LEFT JOIN MW_TRANSIT_CAR mtc |
| | | ON mcr.CAR_ID = mtc.ID |
| | | LEFT JOIN SYS_DEPARTMENT sd |
| | | ON mcr.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | mcr.DEPARTMENT_ID = #{id} |
| | | </where> |
| | | </select> |
| | | <select id="hospitalDetailPage" resultType="com.sinata.system.domain.vo.MwMedicalWasteBoxVO"> |
| | | SELECT |
| | | mcr.BOX_ID AS id, |
| | | mcr.BOX_NUMBER, |
| | | mcr.WASTE_TYPE_STR, |
| | | su.NICK_NAME AS COLLECT_USER_NAME, |
| | | COUNT(*) AS bagNum, |
| | | SUM(mcr.WEIGHT) AS totalWeight, |
| | | (SELECT MAX(mcr_inner.BOX_TIME) |
| | | FROM MW_COLLECT_RECORD mcr_inner |
| | | WHERE mcr_inner.BOX_ID = mcr.BOX_ID) AS BOX_TIME |
| | | 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="departmentId != null and departmentId != ''"> |
| | | AND mcr.DEPARTMENT_ID = #{departmentId} |
| | | </if> |
| | | </where> |
| | | GROUP BY mcr.BOX_ID |
| | | ORDER BY mcr.CREATE_TIME DESC |
| | | </select> |
| | | <select id="transitPageList" resultType="com.sinata.system.domain.vo.MwTransitRecordVO"> |
| | | SELECT MDR.DISPOSAL_UNIT_NAME, |
| | | MTC.LICENSE_PLATE_NUMBER, |
| | | SU.NICK_NAME, |
| | | SUM(MCR.BOX_NUM) AS boxNum, |
| | | SUM(MCR.TOTAL_WEIGHT) AS weight, |
| | | MIN(MCR2.BOX_TIME) AS startTime, |
| | | MDR.RECEIVE_TIME AS endTime |
| | | FROM MW_DISPOSAL_RECORD MDR |
| | | LEFT JOIN MW_DISPOSAL_RECORD_ITEM MDRI ON MDR.ID = MDRI.DISPOSAL_RECORD_ID |
| | | LEFT JOIN MW_CHECKOUT_RECORD_ITEM MCRI ON MDRI.COLLECT_RECORD_ID = MCRI.COLLECT_RECORD_ID |
| | | LEFT JOIN MW_CHECKOUT_RECORD MCR ON MCRI.CHECKOUT_RECORD_ID = MCR.ID |
| | | LEFT JOIN MW_COLLECT_RECORD MCR2 ON MCRI.COLLECT_RECORD_ID = MCR2.ID |
| | | LEFT JOIN MW_TRANSIT_CAR MTC ON MCR.CAR_ID = MTC.ID |
| | | LEFT JOIN SYS_USER SU ON MCR.DRIVER_ID = SU.USER_ID |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MDR.DEPARTMENT_ID |
| | | <where> |
| | | <if test="treeCode != null and treeCode != null"> |
| | | AND SD.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | | <if test="query.licensePlateNumber != null and query.licensePlateNumber != ''"> |
| | | AND MTC.LICENSE_PLATE_NUMBER LIKE CONCAT('%',#{query.licensePlateNumber},'%') |
| | | </if> |
| | | <if test="query.status != null"> |
| | | AND MCR2.STATUS = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and query.endTime != null"> |
| | | AND MDR.RECEIVE_TIME BETWEEN #{query.startTime} AND #{query.endTime} |
| | | </if> |
| | | </where> |
| | | GROUP BY MCR.CAR_ID |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | UPDATE_TIME, |
| | | ID, DEPARTMENT_ID, DISPOSAL_UNIT_NAME, RECEIVE_QUANTITY, RECEIVE_TIME, RECEIVE_WEIGHT, RECEIVER_ID, UNLOAD_QUANTITY, UNLOAD_WEIGHT, TOTAL_HANDLED_QUANTITY, DISPOSAL_FLAG, TOTAL_HANDLED_WEIGHT, DISPOSAL_TIME, DISPOSAL_USER_ID |
| | | </sql> |
| | | <select id="getStaticsData" resultType="com.sinata.system.domain.vo.MwDisposalRecordVO"> |
| | | SELECT MDR.* |
| | | FROM MW_DISPOSAL_RECORD MDR |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MDR.DEPARTMENT_ID |
| | | <where> |
| | | <if test="treeCode != null and treeCode !=''"> |
| | | AND SD.TREE_CODE LIKE CONCAT(#{treeCode}, '%') |
| | | </if> |
| | | <if test="query.receiveTimeStart!=null and query.receiveTimeEnd != null"> |
| | | AND MDR.RECEIVE_TIME BETWEEN #{query.receiveTimeStart} AND #{query.receiveTimeEnd} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="pageList" resultType="com.sinata.system.domain.vo.MwDisposalRecordVO"> |
| | | SELECT MDR.* |
| | | FROM MW_DISPOSAL_RECORD MDR |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MDR.DEPARTMENT_ID |
| | | <where> |
| | | <if test="treeCode != null and treeCode !=''"> |
| | | AND SD.TREE_CODE LIKE CONCAT(#{treeCode}, '%') |
| | | </if> |
| | | <if test="query.receiveTimeStart!=null and query.receiveTimeEnd != null"> |
| | | AND MDR.RECEIVE_TIME BETWEEN #{query.receiveTimeStart} AND #{query.receiveTimeEnd} |
| | | </if> |
| | | </where> |
| | | ORDER BY MDR.DISPOSAL_TIME DESC |
| | | </select> |
| | | <select id="pageDetail" resultType="com.sinata.system.domain.vo.MwDisposalRecordItemVO"> |
| | | SELECT MCR.BOX_NUMBER, |
| | | COUNT(*) AS bagNum, |
| | | IFNULL(SUM(MCR.WEIGHT), 0) AS weight, |
| | | MDR.DISPOSAL_TIME |
| | | FROM MW_DISPOSAL_RECORD MDR |
| | | LEFT JOIN MW_DISPOSAL_RECORD_ITEM MDRI ON MDR.ID = MDRI.DISPOSAL_RECORD_ID |
| | | LEFT JOIN MW_COLLECT_RECORD MCR ON MDR.ID = MDRI.COLLECT_RECORD_ID |
| | | <where> |
| | | MCR.STATUS = 4 |
| | | <if test="disposalRecordId != null"> |
| | | AND MDR.ID = #{disposalRecordId} |
| | | </if> |
| | | </where> |
| | | GROUP BY MCR.BOX_ID |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | AND mme.STATUS = #{status} |
| | | </if> |
| | | </where> |
| | | |
| | | ORDER BY mme.CREATE_TIME DESC |
| | | </select> |
| | | <select id="storedMedicalWastePage" resultType="com.sinata.system.domain.vo.MwMedicalWasteBoxVO"> |
| | | SELECT mcr.BOX_ID AS id, |
| | |
| | | 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 |
| | | FROM MW_COLLECT_RECORD mcr |
| | | LEFT JOIN 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 |
| | | 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 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | |
| | | AND mmer.USE_TIME BETWEEN #{query.useTimeStart} AND #{query.useTimeEnd} |
| | | </if> |
| | | </where> |
| | | ORDER BY mmer.USE_TIME DESC |
| | | </select> |
| | | <select id="getList" resultType="com.sinata.system.domain.vo.MwMicroEquipmentRecordVO"> |
| | | SELECT mmer.ID, |
| | |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY mmer.USE_TIME DESC |
| | | </select> |
| | | <select id="getStaticsData" resultType="com.sinata.system.domain.vo.MwMicroEquipmentStaticsVO"> |
| | | SELECT mmer.BAG_NUM, mmer.TOTAL_WEIGHT, mmer.USE_TIME, mcr.WEIGHT, mcr.WASTE_TYPE |
| | |
| | | sd.TREE_CODE LIKE CONCAT('%', #{tree}) |
| | | </if> |
| | | </where> |
| | | ORDER BY msr.CREATE_TIME DESC |
| | | </select> |
| | | <select id="storageRecordPage" resultType="com.sinata.system.domain.vo.MwStorageRecordVO"> |
| | | SELECT mcr.ID, |
| | |
| | | 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 |
| | | mtc.LICENSE_PLATE_NUMBER |
| | | FROM MW_CHECKOUT_RECORD mcr |
| | | LEFT JOIN MW_STAGING_ROOM msr |
| | | ON mcr.STAGING_ROOM_ID = msr.ID |
| | | LEFT JOIN MEDICAL_WASTE.SYS_USER su |
| | | LEFT JOIN SYS_USER su |
| | | ON mcr.DRIVER_ID = su.USER_ID |
| | | LEFT JOIN MEDICAL_WASTE.MW_TRANSIT_CAR mtc |
| | | LEFT JOIN MW_TRANSIT_CAR mtc |
| | | ON mcr.CAR_ID = mtc.ID |
| | | LEFT JOIN SYS_DEPARTMENT sd |
| | | ON mcr.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND msr.DEPARTMENT_ID LIKE CONCAT(#{treeCode},'%') |
| | | AND sd.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | | <if test="query.stagingRoomId !=null and query.stagingRoomId != ''"> |
| | | AND mcr.STAGING_ROOM_ID = #{query.stagingRoomId} |
| | |
| | | AND mcr.CHECKOUT_TIME BETWEEN #{query.checkoutTimeStart} AND #{query.checkoutTimeEnd} |
| | | </if> |
| | | </where> |
| | | ORDER BY mcr.CHECKOUT_TIME DESC |
| | | </select> |
| | | <select id="checkoutRecordList" resultType="com.sinata.system.domain.vo.MwCheckoutRecordVO"> |
| | | SELECT mcr.ID, |
| | |
| | | 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 |
| | | mtc.LICENSE_PLATE_NUMBER |
| | | FROM MW_CHECKOUT_RECORD mcr |
| | | LEFT JOIN MW_STAGING_ROOM msr |
| | | ON mcr.STAGING_ROOM_ID = msr.ID |
| | | LEFT JOIN MEDICAL_WASTE.SYS_USER su |
| | | LEFT JOIN SYS_USER su |
| | | ON mcr.DRIVER_ID = su.USER_ID |
| | | LEFT JOIN MEDICAL_WASTE.MW_TRANSIT_CAR mtc |
| | | LEFT JOIN MW_TRANSIT_CAR mtc |
| | | ON mcr.CAR_ID = mtc.ID |
| | | LEFT JOIN SYS_DEPARTMENT sd |
| | | ON mcr.DEPARTMENT_ID = sd.ID |
| | | <where> |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND msr.DEPARTMENT_ID LIKE CONCAT(#{treeCode},'%') |
| | | AND sd.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | | <if test="query.stagingRoomId !=null and query.stagingRoomId != ''"> |
| | | AND mcr.STAGING_ROOM_ID = #{query.stagingRoomId} |
| | |
| | | AND mcr.CHECKOUT_TIME BETWEEN #{query.checkoutTimeStart} AND #{query.checkoutTimeEnd} |
| | | </if> |
| | | </where> |
| | | ORDER BY mcr.CHECKOUT_TIME DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <mybatis.plus.version>3.5.2</mybatis.plus.version> |
| | | <knife4j.version>3.0.3</knife4j.version> |
| | | <hutool.version>5.7.17</hutool.version> |
| | | <easyexcel.version>4.0.3</easyexcel.version> |
| | | <fastexcel.version>1.0.0</fastexcel.version> |
| | | </properties> |
| | | |
| | | <!-- 依赖声明 --> |
| | |
| | | <artifactId>hutool-all</artifactId> |
| | | <version>${hutool.version}</version> |
| | | </dependency> |
| | | <!-- https://mvnrepository.com/artifact/com.alibaba/easyexcel --> |
| | | |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>easyexcel</artifactId> |
| | | <version>${easyexcel.version}</version> |
| | | <groupId>cn.idev.excel</groupId> |
| | | <artifactId>fastexcel</artifactId> |
| | | <version>${fastexcel.version}</version> |
| | | </dependency> |
| | | |
| | | </dependencies> |