Merge remote-tracking branch 'origin/master'
| | |
| | | import com.sinata.system.domain.query.MwMonitorDeviceQuery; |
| | | import com.sinata.system.domain.vo.MwMonitorDeviceVO; |
| | | import com.sinata.system.service.MwMonitorDeviceService; |
| | | import com.sinata.system.service.biz.MonitorDeviceApiNewService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RequestMapping("/backend/mwMonitorDevice") |
| | | public class MwMonitorDeviceController { |
| | | private final MwMonitorDeviceService mwMonitorDeviceService; |
| | | private final MonitorDeviceApiNewService monitorDeviceApiNewService; |
| | | |
| | | /** |
| | | * 监控设备分页列表 |
| | |
| | | mwMonitorDeviceService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 实时监控列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @ApiOperation("实时监控列表") |
| | | @PostMapping("/monitor/page") |
| | | public R<PageDTO<MwMonitorDeviceVO>> monitorPageList(@Valid @RequestBody MwMonitorDeviceQuery query) { |
| | | return R.ok(mwMonitorDeviceService.pageMonitorPage(query)); |
| | | } |
| | | |
| | | /** |
| | | * 获取视频服务器设备播放路径 |
| | | * |
| | | * @param id |
| | | * @param channelNum |
| | | * @return |
| | | */ |
| | | @ApiOperation("获取视频服务器设备播放路径") |
| | | @GetMapping("/getDeviceUrl") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceNumber", value = "设备编号"), |
| | | @ApiImplicitParam(name = "channelNum", value = "通道号") |
| | | }) |
| | | public R<Map<String, Object>> getDeviceUrl(String deviceNumber, Integer channelNum) { |
| | | return R.ok(monitorDeviceApiNewService.getDeviceUrl(deviceNumber, channelNum)); |
| | | } |
| | | } |
| | |
| | | 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.MwTransitRouteDTO; |
| | | import com.sinata.system.domain.query.MwTransitRouteQuery; |
| | | import com.sinata.system.domain.vo.MwTransitRouteVO; |
| | | import com.sinata.system.service.MwTransitRouteService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author mitao |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Validated |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = {"转运线路设置相关接口"}) |
| | | @RequestMapping("/backend/mwTransitRoute") |
| | | public class MwTransitRouteController { |
| | | private final MwTransitRouteService mwTransitRouteService; |
| | | |
| | | /** |
| | | * 分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @ApiOperation("分页列表") |
| | | @PostMapping("/page") |
| | | public R<PageDTO<MwTransitRouteVO>> pageList(@Valid @RequestBody MwTransitRouteQuery query) { |
| | | return R.ok(mwTransitRouteService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation("详情") |
| | | @GetMapping("/{id}") |
| | | public R<MwTransitRouteVO> detail(@ApiParam(name = "id", value = "主键ID", required = true) @PathVariable Long id) { |
| | | return R.ok(mwTransitRouteService.detail(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @ApiOperation("新增") |
| | | @PostMapping("/add") |
| | | public R<?> add(@Valid @RequestBody MwTransitRouteDTO dto) { |
| | | mwTransitRouteService.add(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @ApiOperation("编辑") |
| | | @PostMapping("/edit") |
| | | public R<?> edit(@Valid @RequestBody MwTransitRouteDTO dto) { |
| | | mwTransitRouteService.edit(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation("删除") |
| | | @DeleteMapping("/{id}") |
| | | public R<?> delete(@ApiParam(name = "id", value = "路线id", required = true) @PathVariable("id") Long id) { |
| | | mwTransitRouteService.delete(id); |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | @RequiredArgsConstructor |
| | | @RequestMapping("/backend/sysAgreement") |
| | | public class SysAgreementController { |
| | | private SysAgreementService sysAgreementService; |
| | | private final SysAgreementService sysAgreementService; |
| | | |
| | | /** |
| | | * 保存用户注册协议 |
| | |
| | | excludes: /system/notice |
| | | # 匹配链接 |
| | | urlPatterns: /system/*,/monitor/*,/tool/* |
| | | |
| | | # 阿里云对象存储 |
| | | oss: |
| | | accessKeyId: LTAI4FyQgM99x9JKDtcL3mp2 |
| | | accessKeySecret: 0qffirCRqugdtnKPvCXz36yvLmYLWX |
| | |
| | | download-endpoint: https://ja-medical-service.oss-cn-chengdu.aliyuncs.com/ |
| | | bucketName: ja-medical-service |
| | | folder: medical |
| | | |
| | | # 视频监控 |
| | | device: |
| | | baseUrl: https://video-1.scjakj.com |
| | | userName: scjakj |
| | | password: 123456 |
| | | |
| | | sms: |
| | | accessKeyId: LTAI5t9Y3BxZj1gRDZvPjuo1 |
| | | accessKeySecret: tBidUVHBfU7gYt09BbsvZjVPPcHMcx |
| | | signName: 医疗废物信息化 |
| | | connectTimeout: 30000 |
| | | readTimeout: 30000 |
| | | debug: false |
| | | loginTemplateCode: SMS_246140477 |
| | | auditTemplateCode: SMS_476730213 |
| | |
| | | excludes: /system/notice |
| | | # 匹配链接 |
| | | urlPatterns: /system/*,/monitor/*,/tool/* |
| | | |
| | | # 阿里云对象存储 |
| | | oss: |
| | | accessKeyId: LTAI4FyQgM99x9JKDtcL3mp2 |
| | | accessKeySecret: 0qffirCRqugdtnKPvCXz36yvLmYLWX |
| | | upload-endpoint: https://oss-cn-chengdu.aliyuncs.com |
| | | download-endpoint: https://ja-medical-service.oss-cn-chengdu.aliyuncs.com/ |
| | | bucketName: ja-medical-service |
| | | folder: medical |
| | | |
| | | # 视频监控 |
| | | device: |
| | | baseUrl: https://video-1.scjakj.com |
| | | userName: scjakj |
| | | password: 123456 |
| | | |
| | | sms: |
| | | accessKeyId: LTAI5t9Y3BxZj1gRDZvPjuo1 |
| | | accessKeySecret: tBidUVHBfU7gYt09BbsvZjVPPcHMcx |
| | | signName: 医疗废物信息化 |
| | | connectTimeout: 30000 |
| | | readTimeout: 30000 |
| | | debug: false |
| | | loginTemplateCode: SMS_246140477 |
| | | auditTemplateCode: SMS_476730213 |
| | |
| | | <groupId>com.aliyun.oss</groupId> |
| | | <artifactId>aliyun-sdk-oss</artifactId> |
| | | </dependency> |
| | | |
| | | <!--sms--> |
| | | <dependency> |
| | | <groupId>com.aliyun</groupId> |
| | | <artifactId>dysmsapi20170525</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
New file |
| | |
| | | package com.sinata.system.config; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | @ConfigurationProperties(prefix = "sms") |
| | | @Data |
| | | public class AliSmsConfig { |
| | | |
| | | private String accessKeyId; |
| | | |
| | | private String accessKeySecret; |
| | | |
| | | /** |
| | | * 签名 |
| | | */ |
| | | private String signName; |
| | | |
| | | /** |
| | | * 登录模板编码 |
| | | */ |
| | | private String loginTemplateCode; |
| | | /** |
| | | * 入驻审核通知模板编码 |
| | | */ |
| | | private String auditTemplateCode; |
| | | |
| | | /** |
| | | * 连接超时ms |
| | | */ |
| | | private String connectTimeout = "30000"; |
| | | |
| | | /** |
| | | * 读超时ms |
| | | */ |
| | | private String readTimeout = "30000"; |
| | | |
| | | /** |
| | | * 调试状态 |
| | | */ |
| | | private boolean debug = false; |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.system.config; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | @ConfigurationProperties(prefix = "device") |
| | | @Data |
| | | public class DeviceConfig { |
| | | |
| | | private String baseUrl; |
| | | |
| | | private String userName; |
| | | |
| | | private String password; |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.system.config; |
| | | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.http.client.ClientHttpRequestFactory; |
| | | import org.springframework.http.client.SimpleClientHttpRequestFactory; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | @Configuration |
| | | public class RestTemplateConfig { |
| | | |
| | | @Bean |
| | | public RestTemplate restTemplate(ClientHttpRequestFactory factory) { |
| | | return new RestTemplate(factory); |
| | | } |
| | | |
| | | @Bean |
| | | public ClientHttpRequestFactory simpleClientHttpRequestFactory() { |
| | | SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory(); |
| | | factory.setReadTimeout(150000); // ms |
| | | factory.setConnectTimeout(150000); // ms |
| | | return factory; |
| | | } |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.sinata.common.entity.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | |
| | | @Setter |
| | | @TableName("MW_TRANSIT_ROUTE") |
| | | @ApiModel(value = "MwTransitRoute对象", description = "转运线路") |
| | | public class MwTransitRoute { |
| | | public class MwTransitRoute extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = -4601079739505977022L; |
| | | |
| | | @ApiModelProperty("转运线路id") |
| | | @TableId(value = "ID", type = IdType.AUTO) |
| | |
| | | @TableField("ROUTE_NAME") |
| | | private String routeName; |
| | | |
| | | @ApiModelProperty("医院数量") |
| | | @TableField("HOSPITAL_QUANTITY") |
| | | private Integer hospitalQuantity; |
| | | |
| | | @ApiModelProperty("备注") |
| | | @TableField("REMARK") |
| | | private String remark; |
| | | |
| | | } |
| | |
| | | @TableId(value = "ID", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("转运线路id") |
| | | @TableField("ROUTE_ID") |
| | | private Long routeId; |
| | | |
| | | @ApiModelProperty("区域id(医院id)") |
| | | @TableField("DEPARTMENT_ID") |
| | | private Long departmentId; |
| | |
| | | @TableField("WARNING_TARGET_NAME") |
| | | private String warningTargetName; |
| | | |
| | | @ApiModelProperty("预警类型 1:医疗废物预警 2:合同预警 3:人员预警 4:职业防护预警 5:入库暂存间存储容量预警") |
| | | @ApiModelProperty("预警类型 预警类型 1:出库超时预警 2:暂存间使用率预警 3:合同到期预警 4:健康记录预警 " + |
| | | "5:疫苗记录预警 6:防护用品使用预警 7:医疗机构产废日预警 8:医疗机构产废月预警 " + |
| | | "9:医疗机构存储量预警 10:车辆转运异常预警 11:处置单位存储量预警") |
| | | @TableField("TYPE") |
| | | private Integer type; |
| | | |
| | |
| | | @TableField("STATUS") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("单位id") |
| | | @TableField("DEPARTMENT_ID") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("单位名称") |
| | | @TableField("DEPARTMENT_NAME") |
| | | private String departmentName; |
| | | |
| | | @ApiModelProperty("预警值") |
| | | @TableField("CURRENT_VALUE") |
| | | private String currentValue; |
| | | |
| | | @ApiModelProperty("正常范围") |
| | | @TableField("NORMAL_RANGE") |
| | | private String normalRange; |
| | | } |
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.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/24 |
| | | */ |
| | | @Data |
| | | @ApiModel("线路数据传输对象") |
| | | public class MwTransitRouteDTO { |
| | | |
| | | @ApiModelProperty("转运线路id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("区域id(处置单位id)") |
| | | @NotNull(message = "处置单位id不能为空") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("线路名称") |
| | | @NotBlank(message = "线路名称不能为空") |
| | | private String routeName; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("途经点") |
| | | @NotEmpty(message = "途经点不能为空") |
| | | private List<MwTransitRoutePointsDTO> hostpitalList; |
| | | |
| | | @ApiModelProperty("关联车辆") |
| | | @NotEmpty(message = "关联车辆不能为空") |
| | | private List<Long> carIdList; |
| | | } |
New file |
| | |
| | | package com.sinata.system.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/24 |
| | | */ |
| | | @Data |
| | | @ApiModel("线路途经点数据传输对象") |
| | | public class MwTransitRoutePointsDTO { |
| | | |
| | | @ApiModelProperty("区域id(医院id)") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("排序") |
| | | private Integer sortOrder; |
| | | } |
| | |
| | | @ApiModelProperty("设备名称") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("设备状态 1:在线 0:离线") |
| | | private Integer status; |
| | | |
| | | } |
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/24 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel("转运路线查询数据传输对象") |
| | | public class MwTransitRouteQuery extends BasePage { |
| | | |
| | | private static final long serialVersionUID = 1085929057879439197L; |
| | | |
| | | @ApiModelProperty("区域id") |
| | | private Long departmentId; |
| | | } |
| | |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("在线状态 1:在线 0:离线") |
| | | public Integer onlineStatus = 0; |
| | | public Integer status = 0; |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.system.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2024/12/24 |
| | | */ |
| | | @Data |
| | | @ApiModel("转运路线视图对象") |
| | | public class MwTransitRouteVO { |
| | | |
| | | @ApiModelProperty("转运线路id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("区域id(处置单位id)") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty("处置单位") |
| | | private String departmentName; |
| | | |
| | | @ApiModelProperty("线路名称") |
| | | private String routeName; |
| | | |
| | | @ApiModelProperty("医院数量") |
| | | private Integer hospitalQuantity; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("添加时间") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("途经点") |
| | | private List<MedicalInstitutionVO> hostpitalList; |
| | | |
| | | @ApiModelProperty("关联车辆") |
| | | private List<MwTransitCarVO> carList; |
| | | } |
| | | |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监控设备 Mapper 接口 |
| | |
| | | * @return |
| | | */ |
| | | Page<MwMonitorDeviceVO> pageList(Page<MwMonitorDeviceVO> page, @Param("query") MwMonitorDeviceQuery query, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 实时监控列表 |
| | | * |
| | | * @param page |
| | | * @param deviceList |
| | | * @return |
| | | */ |
| | | Page<MwMonitorDeviceVO> pageMonitorPage(Page<MwMonitorDeviceVO> page, @Param("status") Integer status, @Param("treeCode") String treeCode, @Param("deviceList") List<String> deviceList); |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 运输车辆 Mapper 接口 |
| | |
| | | * @return |
| | | */ |
| | | MwTransitCarVO detail(Long id); |
| | | |
| | | /** |
| | | * 关联车辆列表 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<MwTransitCarVO> getCarListByRouteId(@Param("id") Long id); |
| | | } |
| | |
| | | package com.sinata.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.sinata.system.domain.MwTransitRoute; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.sinata.system.domain.vo.MwTransitRouteVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Mapper |
| | | public interface MwTransitRouteMapper extends BaseMapper<MwTransitRoute> { |
| | | /** |
| | | * 分页列表 |
| | | * |
| | | * @param page |
| | | * @param treeCode |
| | | * @return |
| | | */ |
| | | Page<MwTransitRouteVO> pageList(Page<MwTransitRouteVO> page, @Param("treeCode") String treeCode); |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | MwTransitRouteVO detail(@Param("id") Long id); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | DisposalUnitVO getDisposalUnitDetailById(@Param("id") Long id); |
| | | |
| | | /** |
| | | * 路线关联医院列表 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<MedicalInstitutionVO> getHospitalListByRouteId(@Param("id") Long id); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | void edit(MwMonitorDeviceDTO dto); |
| | | |
| | | /** |
| | | * 实时监控列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwMonitorDeviceVO> pageMonitorPage(MwMonitorDeviceQuery query); |
| | | } |
| | |
| | | import com.sinata.system.domain.query.TransitCarQuery; |
| | | import com.sinata.system.domain.vo.MwTransitCarVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 运输车辆 服务类 |
| | |
| | | */ |
| | | void edit(MwTransitCarDTO dto); |
| | | |
| | | |
| | | /** |
| | | * 关联车辆列表 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<MwTransitCarVO> getCarListByRouteId(Long id); |
| | | } |
| | |
| | | package com.sinata.system.service; |
| | | |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.MwTransitRoute; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.sinata.system.domain.dto.MwTransitRouteDTO; |
| | | import com.sinata.system.domain.query.MwTransitRouteQuery; |
| | | import com.sinata.system.domain.vo.MwTransitRouteVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-12-02 |
| | | */ |
| | | public interface MwTransitRouteService extends IService<MwTransitRoute> { |
| | | /** |
| | | * 分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageDTO<MwTransitRouteVO> pageList(MwTransitRouteQuery query); |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | MwTransitRouteVO detail(Long id); |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | void add(MwTransitRouteDTO dto); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | void edit(MwTransitRouteDTO dto); |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param id |
| | | */ |
| | | void delete(Long id); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | String getTreeCodeByDepartmentId(Long departmentId); |
| | | |
| | | /** |
| | | * 路线关联医院列表 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<MedicalInstitutionVO> getHospitalListByRouteId(Long id); |
| | | } |
New file |
| | |
| | | package com.sinata.system.service.biz; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.aliyun.dysmsapi20170525.Client; |
| | | import com.aliyun.dysmsapi20170525.models.SendSmsRequest; |
| | | import com.aliyun.dysmsapi20170525.models.SendSmsResponse; |
| | | import com.aliyun.teaopenapi.models.Config; |
| | | import com.sinata.system.config.AliSmsConfig; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | |
| | | @Service |
| | | @Slf4j |
| | | public class AliSmsService { |
| | | @Resource |
| | | private AliSmsConfig aliSmsConfig; |
| | | |
| | | /** |
| | | * 发送验证码短信 |
| | | * |
| | | * @param phone 手机号 |
| | | * @param code 验证码 |
| | | * @return |
| | | */ |
| | | public boolean sendLoginCode(String phone, String code) { |
| | | |
| | | Map<String, String> param = new HashMap<>(3); |
| | | param.put("code", code); |
| | | return sendSms(phone, aliSmsConfig.getSignName(), aliSmsConfig.getLoginTemplateCode(), param); |
| | | } |
| | | |
| | | /** |
| | | * 审核结果通知短信 |
| | | * |
| | | * @param phone 手机号 |
| | | * @param result 已通过 未通过 |
| | | * @return |
| | | */ |
| | | public boolean sendAuditResult(String phone, String result) { |
| | | |
| | | Map<String, String> param = new HashMap<>(3); |
| | | param.put("code", result); |
| | | return sendSms(phone, aliSmsConfig.getSignName(), aliSmsConfig.getAuditTemplateCode(), param); |
| | | } |
| | | |
| | | /** |
| | | * 阿里发送短信 |
| | | * |
| | | * @param phone |
| | | * @param signName |
| | | * @param templateCode |
| | | * @param param |
| | | * @return |
| | | */ |
| | | private boolean sendSms(String phone, String signName, String templateCode, Map<String, String> param) { |
| | | // 可自助调整超时时间 |
| | | System.setProperty("sun.net.client.defaultConnectTimeout", aliSmsConfig.getConnectTimeout()); |
| | | System.setProperty("sun.net.client.defaultReadTimeout", aliSmsConfig.getReadTimeout()); |
| | | try { |
| | | |
| | | // 初始化请求客户端 |
| | | Client client = createClient(); |
| | | |
| | | // 构造请求对象,请填入请求参数值 |
| | | SendSmsRequest sendSmsRequest = new SendSmsRequest() |
| | | .setPhoneNumbers(phone) |
| | | .setSignName(signName) |
| | | .setTemplateCode(templateCode) |
| | | .setTemplateParam(JSON.toJSONString(param)); |
| | | if (aliSmsConfig.isDebug()) { |
| | | log.info("短信 DEBUG code= {}", param); |
| | | return true; |
| | | } |
| | | // 获取响应对象 |
| | | SendSmsResponse sendSmsResponse = client.sendSms(sendSmsRequest); |
| | | // hint 此处可能会抛出异常,注意catch |
| | | if (StringUtils.equalsIgnoreCase("ok", sendSmsResponse.getBody().getCode())) { |
| | | return true; |
| | | } else { |
| | | log.error("{}短信发送失败:{}", phone, sendSmsResponse.getBody().getMessage()); |
| | | } |
| | | } catch (Exception e) { |
| | | throw new RuntimeException("短信发送失败", e); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public Client createClient() throws Exception { |
| | | Config config = new Config() |
| | | // 配置 AccessKey ID |
| | | .setAccessKeyId(aliSmsConfig.getAccessKeyId()) |
| | | // 配置 AccessKey Secret |
| | | .setAccessKeySecret(aliSmsConfig.getAccessKeySecret()); |
| | | |
| | | // 配置 Endpoint |
| | | config.endpoint = "dysmsapi.aliyuncs.com"; |
| | | |
| | | return new Client(config); |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.system.service.biz; |
| | | |
| | | import cn.hutool.crypto.digest.DigestUtil; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.system.config.DeviceConfig; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class MonitorDeviceApiNewService { |
| | | |
| | | @Autowired |
| | | private DeviceConfig deviceConfig; |
| | | |
| | | //登录 |
| | | private final String LOGIN_URL = "/api/v1/login?username=%s&password=%s&url_token_only=%s"; |
| | | //根据状态获取视频列表 |
| | | private final String LIST_URL = "/api/v1/device/list?online=%s"; |
| | | //查询设备通道列表接口(新) |
| | | private final String channellist_URL = "/api/v1/device/channellist?serial=%s"; |
| | | //根据设备号获取视频链接 |
| | | private final String STREAM_URL = "/api/v1/stream/start?serial=%s&channel=%s"; |
| | | //查询通道录像列表接口(新) |
| | | private final String recordlist_URL = "/api/v1/playback/recordlist?serial=%s&channel=%s&starttime=%s&endtime=%s"; |
| | | //开始回放接口(新) |
| | | private final String playbackStart_URL = "/api/v1/playback/start?serial=%s&channel=%s&starttime=%s&endtime=%s"; |
| | | //回放流停止接口(新) |
| | | private final String playbackStop_URL = "/api/v1/playback/stop?streamid=%s"; |
| | | |
| | | //在线数据 |
| | | Boolean url_token_only = true; |
| | | //获取视频列表参数 |
| | | Boolean online = true;//设备是否在线 |
| | | |
| | | private final RedisTemplate<Object, Object> redisTemplate; |
| | | private final RestTemplate restTemplate; |
| | | |
| | | /** |
| | | * 登录 |
| | | * type==1 重新调起登录 |
| | | * |
| | | * @return |
| | | */ |
| | | public String getJSession(Integer type) { |
| | | String key = "monitor:device:jsession:now"; |
| | | String jsession = redisTemplate.opsForValue().get(key).toString(); |
| | | Long timeOut = 604800L; |
| | | if (jsession == null || type == 1) { |
| | | String loginUrl = String.format( |
| | | deviceConfig.getBaseUrl() + LOGIN_URL, deviceConfig.getUserName(), DigestUtil.md5Hex(deviceConfig.getPassword()), url_token_only); |
| | | log.info("视频服务器:登录接口传参数据:{}", loginUrl); |
| | | JSONObject result = restTemplate.getForObject(loginUrl, JSONObject.class); |
| | | log.info("视频服务器:登录接口返回数据:{}", result); |
| | | if (result == null) { |
| | | throw new ServiceException("视频服务器连接失败"); |
| | | } |
| | | if (result != null) { |
| | | timeOut = result.getLong("TokenTimeout");//缓存过期时间 |
| | | jsession = result.getString("URLToken");//token |
| | | } else { |
| | | throw new ServiceException("视频服务器连接失败"); |
| | | } |
| | | } |
| | | redisTemplate.opsForValue().set(key, jsession, timeOut); |
| | | return jsession; |
| | | } |
| | | |
| | | /** |
| | | * 获取设备列表 |
| | | * |
| | | * @return |
| | | */ |
| | | public List<String> getDeviceList() { |
| | | String token = getJSession(0); |
| | | HttpHeaders httpHeaders = new HttpHeaders(); |
| | | httpHeaders.add("token", token); |
| | | HttpEntity request = new HttpEntity(httpHeaders); |
| | | String completeUrl = String.format(deviceConfig.getBaseUrl() + LIST_URL, online); |
| | | try { |
| | | ResponseEntity<JSONObject> resultEntity = restTemplate.exchange(completeUrl, HttpMethod.GET, request, JSONObject.class, ""); |
| | | |
| | | if (resultEntity == null) { |
| | | throw new ServiceException("视频服务器连接失败"); |
| | | } |
| | | List<String> list = new ArrayList<>(); |
| | | JSONObject jsonBody = resultEntity.getBody(); |
| | | //log.info("视频服务器:获取设备状态接口返回数据:{}", jsonBody); |
| | | JSONArray jsonArray = jsonBody.getJSONArray("DeviceList"); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | String ID = jsonObject.getString("ID"); |
| | | list.add(ID); |
| | | } |
| | | return list; |
| | | } catch (Exception e) { |
| | | getJSession(1); |
| | | return getDeviceList(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取通道列表 |
| | | * |
| | | * @return |
| | | */ |
| | | public List<Map<String, String>> getChannelList(String serial) { |
| | | String token = getJSession(0); |
| | | HttpHeaders httpHeaders = new HttpHeaders(); |
| | | httpHeaders.add("token", token); |
| | | HttpEntity request = new HttpEntity(httpHeaders); |
| | | String completeUrl = String.format(deviceConfig.getBaseUrl() + channellist_URL, serial); |
| | | try { |
| | | ResponseEntity<JSONObject> resultEntity = restTemplate.exchange(completeUrl, HttpMethod.GET, request, JSONObject.class, ""); |
| | | |
| | | if (resultEntity == null) { |
| | | throw new ServiceException("视频服务器连接失败"); |
| | | } |
| | | List<Map<String, String>> list = new ArrayList<>(); |
| | | JSONObject jsonBody = resultEntity.getBody(); |
| | | //log.info("视频服务器:获取设备状态接口返回数据:{}", jsonBody); |
| | | JSONArray jsonArray = jsonBody.getJSONArray("ChannelList"); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | String channel = jsonObject.getString("Channel"); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("channel", channel); |
| | | list.add(map); |
| | | } |
| | | return list; |
| | | } catch (Exception e) { |
| | | getJSession(1); |
| | | return getChannelList(serial); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取设备播放路径 |
| | | * |
| | | * @param devIdno |
| | | * @return |
| | | */ |
| | | public Map<String, Object> getDeviceUrl(String devIdno, Integer channelNum) { |
| | | String token = getJSession(0); |
| | | HttpHeaders httpHeaders = new HttpHeaders(); |
| | | httpHeaders.add("token", token); |
| | | HttpEntity request = new HttpEntity(httpHeaders); |
| | | if (channelNum == null) { |
| | | channelNum = 1; |
| | | } |
| | | String completeUrl = String.format(deviceConfig.getBaseUrl() + STREAM_URL, devIdno, channelNum); |
| | | System.out.println(completeUrl); |
| | | ResponseEntity<JSONObject> resultEntity = restTemplate.exchange(completeUrl, HttpMethod.GET, request, JSONObject.class, ""); |
| | | |
| | | if (resultEntity == null) { |
| | | throw new ServiceException("视频服务器连接失败"); |
| | | } |
| | | JSONObject jsonBody = resultEntity.getBody(); |
| | | //log.info("视频服务器:获取设备状态接口返回数据:{}", jsonBody); |
| | | String flv = jsonBody.getString("FLV"); |
| | | String snapURL = jsonBody.getString("SnapURL"); |
| | | Map<String, Object> reMap = new HashMap<>(); |
| | | reMap.put("flv", flv); |
| | | reMap.put("snapURL", deviceConfig.getBaseUrl() + snapURL); |
| | | return reMap; |
| | | } |
| | | |
| | | /** |
| | | * 查询通道录像列表 |
| | | * |
| | | * @return |
| | | */ |
| | | public List<Map<String, String>> getPlaybackRecordlist(String serial, Integer channel, String starttime, String endtime) { |
| | | String token = getJSession(0); |
| | | HttpHeaders httpHeaders = new HttpHeaders(); |
| | | httpHeaders.add("token", token); |
| | | HttpEntity request = new HttpEntity(httpHeaders); |
| | | String completeUrl = String.format(deviceConfig.getBaseUrl() + recordlist_URL, serial, channel, starttime, endtime); |
| | | try { |
| | | ResponseEntity<JSONObject> resultEntity = restTemplate.exchange(completeUrl, HttpMethod.GET, request, JSONObject.class, ""); |
| | | |
| | | if (resultEntity == null) { |
| | | throw new ServiceException("视频服务器连接失败"); |
| | | } |
| | | List<Map<String, String>> list = new ArrayList<>(); |
| | | JSONObject jsonBody = resultEntity.getBody(); |
| | | //log.info("视频服务器:获取设备状态接口返回数据:{}", jsonBody); |
| | | JSONArray jsonArray = jsonBody.getJSONArray("RecordList"); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | Map<String, String> map = JSON.parseObject(jsonObject.toJSONString(), Map.class); |
| | | list.add(map); |
| | | } |
| | | return list; |
| | | } catch (Exception e) { |
| | | getJSession(1); |
| | | return null; |
| | | //return getPlaybackRecordlist(serial,channel,starttime,endtime); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 开始回放接口 |
| | | * |
| | | * @param serial |
| | | * @return |
| | | */ |
| | | public Map<String, Object> playbackStart(String serial, Integer channel, String starttime, String endtime) { |
| | | String token = getJSession(0); |
| | | HttpHeaders httpHeaders = new HttpHeaders(); |
| | | httpHeaders.add("token", token); |
| | | HttpEntity request = new HttpEntity(httpHeaders); |
| | | if (channel == null) { |
| | | channel = 1; |
| | | } |
| | | String completeUrl = String.format(deviceConfig.getBaseUrl() + playbackStart_URL, serial, channel, starttime, endtime); |
| | | System.out.println(completeUrl); |
| | | ResponseEntity<JSONObject> resultEntity = restTemplate.exchange(completeUrl, HttpMethod.GET, request, JSONObject.class, ""); |
| | | |
| | | if (resultEntity == null) { |
| | | throw new ServiceException("视频服务器连接失败"); |
| | | } |
| | | JSONObject jsonBody = resultEntity.getBody(); |
| | | //log.info("视频服务器:获取设备状态接口返回数据:{}", jsonBody); |
| | | String flv = jsonBody.getString("FLV"); |
| | | String snapURL = jsonBody.getString("SnapURL"); |
| | | String streamID = jsonBody.getString("StreamID"); |
| | | Map<String, Object> reMap = new HashMap<>(); |
| | | reMap.put("flv", flv); |
| | | reMap.put("snapURL", deviceConfig.getBaseUrl() + snapURL); |
| | | reMap.put("streamID", streamID); |
| | | return reMap; |
| | | } |
| | | |
| | | /** |
| | | * 回放流停止接口 |
| | | * |
| | | * @param streamID |
| | | * @return |
| | | */ |
| | | public Map<String, Object> playbackStop(String streamID) { |
| | | String token = getJSession(0); |
| | | HttpHeaders httpHeaders = new HttpHeaders(); |
| | | httpHeaders.add("token", token); |
| | | HttpEntity request = new HttpEntity(httpHeaders); |
| | | String completeUrl = String.format(deviceConfig.getBaseUrl() + playbackStop_URL, streamID); |
| | | System.out.println(completeUrl); |
| | | ResponseEntity<JSONObject> resultEntity = restTemplate.exchange(completeUrl, HttpMethod.GET, request, JSONObject.class, ""); |
| | | |
| | | if (resultEntity == null) { |
| | | throw new ServiceException("视频服务器连接失败"); |
| | | } |
| | | JSONObject jsonBody = resultEntity.getBody(); |
| | | //log.info("视频服务器:获取设备状态接口返回数据:{}", jsonBody); |
| | | String playbackFileURL = jsonBody.getString("PlaybackFileURL"); |
| | | Map<String, Object> reMap = new HashMap<>(); |
| | | reMap.put("playbackFileURL", playbackFileURL); |
| | | return reMap; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.domain.MwApplication; |
| | | import com.sinata.system.domain.dto.MwApplicationDTO; |
| | | import com.sinata.system.domain.query.MwApplicationQuery; |
| | |
| | | import com.sinata.system.mapper.MwApplicationMapper; |
| | | import com.sinata.system.service.MwApplicationService; |
| | | import com.sinata.system.service.SysDepartmentService; |
| | | import com.sinata.system.service.biz.AliSmsService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | @RequiredArgsConstructor |
| | | public class MwApplicationServiceImpl extends ServiceImpl<MwApplicationMapper, MwApplication> implements MwApplicationService { |
| | | private final SysDepartmentService sysDepartmentService; |
| | | private final AliSmsService aliSmsService; |
| | | |
| | | /** |
| | | * 分页列表 |
| | |
| | | @Override |
| | | public PageDTO<MwApplicationVO> pageList(MwApplicationQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | Page<MwApplicationVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | |
| | | mwApplication.setAuditStatus(dto.getAuditStatus() == 1 ? 2 : 3); |
| | | mwApplication.setAuditOpinion(dto.getAuditOpinion()); |
| | | updateById(mwApplication); |
| | | //TODO 发送短信通知 |
| | | //发送短信通知 |
| | | aliSmsService.sendAuditResult(mwApplication.getPhone(), dto.getAuditStatus() == 1 ? "已通过" : "未通过"); |
| | | } |
| | | } |
| | |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.domain.MwBusinessDevice; |
| | | import com.sinata.system.domain.dto.MwBusinessDeviceDTO; |
| | | import com.sinata.system.domain.query.MwBusinessDeviceQuery; |
| | |
| | | @Override |
| | | public PageDTO<MwBusinessDeviceVO> pageList(MwBusinessDeviceQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | Page<MwBusinessDeviceVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import cn.idev.excel.EasyExcel; |
| | | import cn.idev.excel.FastExcel; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.common.entity.PageDTO; |
| | |
| | | // 这里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(), MwCheckoutRecordExcelVO.class).sheet("转运记录").doWrite(mwCheckoutRecordExcelVOS); |
| | | FastExcel.write(response.getOutputStream(), MwCheckoutRecordExcelVO.class).sheet("转运记录").doWrite(mwCheckoutRecordExcelVOS); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public PageDTO<MwTransitRecordVO> transitPageList(MwTransitRecordQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | Page<MwTransitRecordVO> page = baseMapper.transitPageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import cn.idev.excel.EasyExcel; |
| | | import cn.idev.excel.FastExcel; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.common.entity.PageDTO; |
| | |
| | | // 这里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(), MwCollectRecordVO.class).sheet("医废收集记录").doWrite(vo); |
| | | FastExcel.write(response.getOutputStream(), MwCollectRecordVO.class).sheet("医废收集记录").doWrite(vo); |
| | | } |
| | | |
| | | @Override |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import cn.idev.excel.EasyExcel; |
| | | import cn.idev.excel.FastExcel; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | // 这里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(), MwCollectRecordVO.class).sheet("微波设备使用记录").doWrite(list); |
| | | FastExcel.write(response.getOutputStream(), MwCollectRecordVO.class).sheet("微波设备使用记录").doWrite(list); |
| | | } |
| | | |
| | | /** |
| | |
| | | String fileName = URLEncoder.encode("处置分析报表", "UTF-8").replaceAll("\\+", "%20"); |
| | | response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); |
| | | // 这里需要设置不关闭流 |
| | | EasyExcel.write(response.getOutputStream()) |
| | | FastExcel.write(response.getOutputStream()) |
| | | .head(head) |
| | | .autoCloseStream(Boolean.TRUE) |
| | | .sheet("处置分析报表") |
| | |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.domain.MwMonitorDevice; |
| | | import com.sinata.system.domain.SysDepartment; |
| | | import com.sinata.system.domain.dto.MwMonitorDeviceDTO; |
| | |
| | | import com.sinata.system.mapper.MwMonitorDeviceMapper; |
| | | import com.sinata.system.service.MwMonitorDeviceService; |
| | | import com.sinata.system.service.SysDepartmentService; |
| | | import com.sinata.system.service.biz.MonitorDeviceApiNewService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | |
| | | @RequiredArgsConstructor |
| | | public class MwMonitorDeviceServiceImpl extends ServiceImpl<MwMonitorDeviceMapper, MwMonitorDevice> implements MwMonitorDeviceService { |
| | | private final SysDepartmentService sysDepartmentService; |
| | | private final MonitorDeviceApiNewService monitorDeviceApiNewService; |
| | | |
| | | /** |
| | | * 监控设备分页列表 |
| | |
| | | @Override |
| | | public PageDTO<MwMonitorDeviceVO> pageList(MwMonitorDeviceQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | Page<MwMonitorDeviceVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | |
| | | MwMonitorDevice mwMonitorDevice = BeanUtils.copyBean(dto, MwMonitorDevice.class); |
| | | updateById(mwMonitorDevice); |
| | | } |
| | | |
| | | @Override |
| | | public PageDTO<MwMonitorDeviceVO> pageMonitorPage(MwMonitorDeviceQuery query) { |
| | | //获取视频服务器中的在线设备列表 |
| | | List<String> deviceList = monitorDeviceApiNewService.getDeviceList(); |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | Page<MwMonitorDeviceVO> page = baseMapper.pageMonitorPage(new Page<>(query.getPageCurr(), query.getPageSize()), query.getStatus(), treeCode, deviceList); |
| | | page.getRecords().stream().filter(item -> deviceList.contains(item.getDeviceNumber())).peek(item -> { |
| | | item.setStatus(1); |
| | | }); |
| | | return PageDTO.of(page); |
| | | } |
| | | } |
| | |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.CollUtils; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.domain.MwAttachment; |
| | | import com.sinata.system.domain.MwProtectionEquipment; |
| | | import com.sinata.system.domain.MwProtectionEquipmentRecord; |
| | |
| | | @Override |
| | | public PageDTO<MwProtectionEquipmentVO> pageList(MwProtectionEquipmentQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | Page<MwProtectionEquipmentVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.CollUtils; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.domain.MwAttachment; |
| | | import com.sinata.system.domain.MwProtectionRegulation; |
| | | import com.sinata.system.domain.dto.MwProtectionRegulationDTO; |
| | |
| | | @Override |
| | | public PageDTO<MwProtectionRegulationVO> pageList(MwProtectionRegulationQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | Page<MwProtectionRegulationVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.CollUtils; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.domain.MwAttachment; |
| | | import com.sinata.system.domain.MwProtectionTask; |
| | | import com.sinata.system.domain.MwProtectionTaskEquipment; |
| | |
| | | @Override |
| | | public PageDTO<MwProtectionTaskVO> pageList(MwProtectionTaskQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | Page<MwProtectionTaskVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.domain.MwStaff; |
| | | import com.sinata.system.domain.SysDepartment; |
| | | import com.sinata.system.domain.dto.MwStaffDTO; |
| | |
| | | @Override |
| | | public PageDTO<MwStaffVO> pageList(MwStaffQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | Page<MwStaffVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import cn.idev.excel.EasyExcel; |
| | | import cn.idev.excel.FastExcel; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.common.entity.PageDTO; |
| | |
| | | // 这里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); |
| | | FastExcel.write(response.getOutputStream(), MwStorageRecordVO.class).sheet("暂存间入库记录").doWrite(list); |
| | | } |
| | | |
| | | /** |
| | |
| | | // 这里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); |
| | | FastExcel.write(response.getOutputStream(), MwCheckoutRecordVO.class).sheet("暂存间出库记录").doWrite(list); |
| | | } |
| | | } |
| | |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.domain.MwTransitCar; |
| | | import com.sinata.system.domain.SysDepartment; |
| | | import com.sinata.system.domain.dto.MwTransitCarDTO; |
| | | import com.sinata.system.domain.query.TransitCarQuery; |
| | | import com.sinata.system.domain.vo.MwTransitCarVO; |
| | | import com.sinata.system.enums.DepartmentEnum; |
| | | import com.sinata.system.mapper.MwTransitCarMapper; |
| | | import com.sinata.system.service.MwTransitCarService; |
| | | import com.sinata.system.service.SysDepartmentService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public PageDTO<MwTransitCarVO> pageList(TransitCarQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | String treeCode; |
| | | if (Objects.isNull(query.getDepartmentId())) { |
| | | SysDepartment department = sysDepartmentService.getMyDepartment(); |
| | | treeCode = department.getTreeCode(); |
| | | } else { |
| | | SysDepartment department = sysDepartmentService.getById(query.getDepartmentId()); |
| | | //如果是处置单位,则获取父级部门 |
| | | if (department.getOrgType().equals(DepartmentEnum.DISPOSAL_UNIT.getCode())) { |
| | | department = sysDepartmentService.getDepartmentByParentId(department.getParentId()); |
| | | } |
| | | treeCode = department.getTreeCode(); |
| | | } |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | Page<MwTransitCarVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), query, treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | |
| | | MwTransitCar mwTransitCar = BeanUtils.copyBean(dto, MwTransitCar.class); |
| | | updateById(mwTransitCar); |
| | | } |
| | | |
| | | /** |
| | | * 关联车辆列表 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MwTransitCarVO> getCarListByRouteId(Long id) { |
| | | return baseMapper.getCarListByRouteId(id); |
| | | } |
| | | } |
| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import com.sinata.system.domain.MwTransitRoute; |
| | | import com.sinata.system.mapper.MwTransitRouteMapper; |
| | | import com.sinata.system.service.MwTransitRouteService; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.domain.MwTransitRoute; |
| | | import com.sinata.system.domain.MwTransitRouteCar; |
| | | import com.sinata.system.domain.MwTransitRoutePoints; |
| | | import com.sinata.system.domain.dto.MwTransitRouteDTO; |
| | | import com.sinata.system.domain.query.MwTransitRouteQuery; |
| | | import com.sinata.system.domain.vo.MwTransitRouteVO; |
| | | import com.sinata.system.mapper.MwTransitRouteMapper; |
| | | import com.sinata.system.service.MwTransitCarService; |
| | | import com.sinata.system.service.MwTransitRouteCarService; |
| | | import com.sinata.system.service.MwTransitRoutePointsService; |
| | | import com.sinata.system.service.MwTransitRouteService; |
| | | import com.sinata.system.service.SysDepartmentService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class MwTransitRouteServiceImpl extends ServiceImpl<MwTransitRouteMapper, MwTransitRoute> implements MwTransitRouteService { |
| | | private final SysDepartmentService sysDepartmentService; |
| | | private final MwTransitCarService mwTransitCarService; |
| | | private final MwTransitRoutePointsService mwTransitRoutePointsService; |
| | | private final MwTransitRouteCarService mwTransitRouteCarService; |
| | | |
| | | /** |
| | | * 分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageDTO<MwTransitRouteVO> pageList(MwTransitRouteQuery query) { |
| | | String treeCode = sysDepartmentService.getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | | Page<MwTransitRouteVO> page = baseMapper.pageList(new Page<>(query.getPageCurr(), query.getPageSize()), treeCode); |
| | | return PageDTO.of(page); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public MwTransitRouteVO detail(Long id) { |
| | | MwTransitRouteVO vo = baseMapper.detail(id); |
| | | //关联医院 |
| | | vo.setHostpitalList(sysDepartmentService.getHospitalListByRouteId(vo.getId())); |
| | | //关联车辆列表 |
| | | vo.setCarList(mwTransitCarService.getCarListByRouteId(vo.getId())); |
| | | return vo; |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void add(MwTransitRouteDTO dto) { |
| | | MwTransitRoute mwTransitRoute = BeanUtils.copyBean(dto, MwTransitRoute.class); |
| | | mwTransitRoute.setHospitalQuantity(dto.getHostpitalList().size()); |
| | | save(mwTransitRoute); |
| | | //关联医院 |
| | | List<MwTransitRoutePoints> mwTransitRoutePoints = BeanUtils.copyToList(dto.getHostpitalList(), MwTransitRoutePoints.class); |
| | | mwTransitRoutePoints.forEach(points -> points.setRouteId(mwTransitRoute.getId())); |
| | | mwTransitRoutePointsService.saveBatch(mwTransitRoutePoints); |
| | | //关联车辆 |
| | | List<MwTransitRouteCar> mwTransitRouteCars = dto.getCarIdList().stream().map(carId -> { |
| | | MwTransitRouteCar routeCar = new MwTransitRouteCar(); |
| | | routeCar.setRouteId(mwTransitRoute.getId()); |
| | | routeCar.setCarId(carId); |
| | | return routeCar; |
| | | }).collect(Collectors.toList()); |
| | | mwTransitRouteCarService.saveBatch(mwTransitRouteCars); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void edit(MwTransitRouteDTO dto) { |
| | | if (Objects.isNull(dto.getId())) { |
| | | throw new ServiceException("线路id不能为空"); |
| | | } |
| | | MwTransitRoute mwTransitRoute = BeanUtils.copyBean(dto, MwTransitRoute.class); |
| | | mwTransitRoute.setHospitalQuantity(dto.getHostpitalList().size()); |
| | | updateById(mwTransitRoute); |
| | | //移除关联医院 |
| | | mwTransitRoutePointsService.lambdaUpdate().eq(MwTransitRoutePoints::getRouteId, dto.getId()).remove(); |
| | | //关联医院 |
| | | List<MwTransitRoutePoints> mwTransitRoutePoints = BeanUtils.copyToList(dto.getHostpitalList(), MwTransitRoutePoints.class); |
| | | mwTransitRoutePoints.forEach(points -> points.setRouteId(mwTransitRoute.getId())); |
| | | mwTransitRoutePointsService.saveBatch(mwTransitRoutePoints); |
| | | //移除关联车辆 |
| | | mwTransitRouteCarService.lambdaUpdate().eq(MwTransitRouteCar::getRouteId, dto.getId()).remove(); |
| | | //关联车辆 |
| | | List<MwTransitRouteCar> mwTransitRouteCars = dto.getCarIdList().stream().map(carId -> { |
| | | MwTransitRouteCar routeCar = new MwTransitRouteCar(); |
| | | routeCar.setRouteId(mwTransitRoute.getId()); |
| | | routeCar.setCarId(carId); |
| | | return routeCar; |
| | | }).collect(Collectors.toList()); |
| | | mwTransitRouteCarService.saveBatch(mwTransitRouteCars); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param id |
| | | */ |
| | | @Override |
| | | public void delete(Long id) { |
| | | //移除关联医院 |
| | | mwTransitRoutePointsService.lambdaUpdate().eq(MwTransitRoutePoints::getRouteId, id).remove(); |
| | | //移除关联车辆 |
| | | mwTransitRouteCarService.lambdaUpdate().eq(MwTransitRouteCar::getRouteId, id).remove(); |
| | | removeById(id); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public PageDTO<MedicalInstitutionVO> pageMedicalList(DepartmentQuery query) { |
| | | String treeCode = getTreeCodeByDepartmentId(query.getDepartmentId()); |
| | | String treeCode; |
| | | if (Objects.isNull(query.getDepartmentId())) { |
| | | SysDepartment department = getMyDepartment(); |
| | | treeCode = department.getTreeCode(); |
| | | } else { |
| | | SysDepartment department = getById(query.getDepartmentId()); |
| | | //如果是处置单位,则获取父级部门 |
| | | if (department.getOrgType().equals(DepartmentEnum.DISPOSAL_UNIT.getCode())) { |
| | | department = getDepartmentByParentId(department.getParentId()); |
| | | } |
| | | treeCode = department.getTreeCode(); |
| | | } |
| | | if (StringUtils.isBlank(treeCode)) { |
| | | return PageDTO.empty(0L, 0L); |
| | | } |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 路线关联医院列表 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MedicalInstitutionVO> getHospitalListByRouteId(Long id) { |
| | | return baseMapper.getHospitalListByRouteId(id); |
| | | } |
| | | } |
| | |
| | | AND MMD.DEVICE_NAME LIKE CONCAT('%',#{query.deviceName},'%') |
| | | </if> |
| | | </where> |
| | | ORDER BY MMD.CREATE_TIME DESC |
| | | </select> |
| | | <select id="pageMonitorPage" resultType="com.sinata.system.domain.vo.MwMonitorDeviceVO"> |
| | | SELECT MMD.ID, |
| | | MMD.DEPARTMENT_ID, |
| | | MMD.DEVICE_NAME, |
| | | MMD.DEVICE_NUMBER, |
| | | MMD.CHANNEL_NUMBER, |
| | | MMD.AUTO_SHUTDOWN_TIME, |
| | | MMD.REMARK, |
| | | SD.DEPARTMENT_NAME |
| | | FROM MW_MONITOR_DEVICE MMD |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MMD.DEPARTMENT_ID |
| | | <where> |
| | | MMD.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND SD.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | | <if test="deviceList != null and deviceList.size() > 0"> |
| | | <if test="status != null and status == 1"> |
| | | AND MMD.DEVICE_NUMBER IN |
| | | <foreach collection="deviceList" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="status != null and status == 0"> |
| | | AND MMD.DEVICE_NUMBER NOT IN |
| | | <foreach collection="deviceList" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | </if> |
| | | </where> |
| | | ORDER BY MMD.CREATE_TIME DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | MTC.ID = #{id} |
| | | </where> |
| | | </select> |
| | | <select id="getCarListByRouteId" resultType="com.sinata.system.domain.vo.MwTransitCarVO"> |
| | | SELECT MTC.ID, |
| | | MTC.DEPARTMENT_ID, |
| | | MTC.IMAGE_URL, |
| | | MTC.LICENSE_PLATE_NUMBER, |
| | | MTC.PERSON_IN_CHARGE, |
| | | MTC.PHONE_NUMBER, |
| | | MTC.BRAND, |
| | | MTC.COLOR, |
| | | MTC.CODE, |
| | | MTC.MAXIMUM_LOAD, |
| | | MTC.REMARK, |
| | | MTC.DEL_FLAG, |
| | | MTC.CREATE_BY, |
| | | MTC.CREATE_TIME, |
| | | MTC.UPDATE_BY, |
| | | MTC.UPDATE_TIME, |
| | | SD.DEPARTMENT_NAME |
| | | FROM MW_TRANSIT_ROUTE_CAR MTRC |
| | | INNER JOIN MW_TRANSIT_CAR MTC ON MTC.ID = MTRC.CAR_ID |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MTC.DEPARTMENT_ID |
| | | <where> |
| | | MTRC.ROUTE_ID = #{id} |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | UPDATE_TIME, |
| | | ID, DEPARTMENT_ID, ROUTE_NAME |
| | | </sql> |
| | | <select id="pageList" resultType="com.sinata.system.domain.vo.MwTransitRouteVO"> |
| | | SELECT MTR.ID, |
| | | MTR.DEPARTMENT_ID, |
| | | MTR.ROUTE_NAME, |
| | | MTR.DEL_FLAG, |
| | | MTR.CREATE_TIME, |
| | | MTR.HOSPITAL_QUANTITY, |
| | | MTR.REMARK, |
| | | SD.DEPARTMENT_NAME |
| | | FROM MW_TRANSIT_ROUTE MTR |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MTR.DEPARTMENT_ID |
| | | <where> |
| | | MTR.DEL_FLAG = 0 |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | AND SD.TREE_CODE LIKE CONCAT(#{treeCode}, '%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="detail" resultType="com.sinata.system.domain.vo.MwTransitRouteVO"> |
| | | SELECT MTR.ID, |
| | | MTR.DEPARTMENT_ID, |
| | | MTR.ROUTE_NAME, |
| | | MTR.DEL_FLAG, |
| | | MTR.CREATE_TIME, |
| | | MTR.HOSPITAL_QUANTITY, |
| | | MTR.REMARK, |
| | | SD.DEPARTMENT_NAME |
| | | FROM MW_TRANSIT_ROUTE MTR |
| | | LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MTR.DEPARTMENT_ID |
| | | <where> |
| | | MTR.ID = #{id} |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | sdd.DICT_LABEL AS INSTITUTION_LEVEL_STR,sdd2.DICT_LABEL AS INSTITUTION_TYPE_STR |
| | | FROM SYS_DEPARTMENT sd |
| | | LEFT JOIN SYS_DEPARTMENT_INFO sdi |
| | | ON sd.id = sdi.DEPARTMENT_ID |
| | | ON sd.ID = sdi.DEPARTMENT_ID |
| | | LEFT JOIN SYS_DICT_DATA sdd |
| | | ON sdi.INSTITUTION_LEVEL = sdd.DICT_CODE |
| | | LEFT JOIN SYS_DICT_DATA sdd2 |
| | |
| | | sdd.DICT_LABEL AS INSTITUTION_LEVEL_STR,sdd2.DICT_LABEL AS INSTITUTION_TYPE_STR |
| | | FROM SYS_DEPARTMENT sd |
| | | LEFT JOIN SYS_DEPARTMENT_INFO sdi |
| | | ON sd.id = sdi.DEPARTMENT_ID |
| | | ON sd.ID = sdi.DEPARTMENT_ID |
| | | LEFT JOIN SYS_DICT_DATA sdd |
| | | ON sdi.INSTITUTION_LEVEL = sdd.DICT_CODE |
| | | LEFT JOIN SYS_DICT_DATA sdd2 |
| | |
| | | sdi.MAXIMUM_STORAGE_CAPACITY |
| | | FROM SYS_DEPARTMENT sd |
| | | LEFT JOIN SYS_DEPARTMENT_INFO sdi |
| | | ON sd.id = sdi.DEPARTMENT_ID |
| | | ON sd.ID = sdi.DEPARTMENT_ID |
| | | <where> |
| | | sd.ORG_TYPE = 3 AND sd.TREE_CODE LIKE CONCAT(#{treeCode}, '%') |
| | | </where> |
| | |
| | | sdi.MAXIMUM_STORAGE_CAPACITY |
| | | FROM SYS_DEPARTMENT sd |
| | | LEFT JOIN SYS_DEPARTMENT_INFO sdi |
| | | ON sd.id = sdi.DEPARTMENT_ID |
| | | ON sd.ID = sdi.DEPARTMENT_ID |
| | | <where> |
| | | sd.ORG_TYPE = 3 |
| | | <if test="departmentId != null"> |
| | |
| | | sdi.MAXIMUM_STORAGE_CAPACITY |
| | | FROM SYS_DEPARTMENT sd |
| | | LEFT JOIN SYS_DEPARTMENT_INFO sdi |
| | | ON sd.id = sdi.DEPARTMENT_ID |
| | | ON sd.ID = sdi.DEPARTMENT_ID |
| | | <where> |
| | | sd.id = #{id} |
| | | sd.ID = #{id} |
| | | </where> |
| | | </select> |
| | | <select id="getHospitalListByRouteId" resultType="com.sinata.system.domain.vo.MedicalInstitutionVO"> |
| | | SELECT SD.ID, |
| | | DEPARTMENT_NAME, |
| | | PARENT_ID, |
| | | TREE_CODE, |
| | | ORG_TYPE, |
| | | ORG_CODE, |
| | | ADDRESS, |
| | | LONGITUDE, |
| | | LATITUDE, |
| | | CONTACT_PERSON, |
| | | CONTACT_PHONE, |
| | | REMARK, |
| | | LEGAL_PERSON, |
| | | UNIFIED_SOCIAL_CREDIT_CODE, |
| | | DEL_FLAG, |
| | | CREATE_BY, |
| | | CREATE_TIME, |
| | | UPDATE_BY, |
| | | UPDATE_TIME, |
| | | REGION |
| | | FROM MW_TRANSIT_ROUTE_POINTS MTRP |
| | | INNER JOIN SYS_DEPARTMENT SD ON MTRP.DEPARTMENT_ID = SD.ID |
| | | <where> |
| | | SD.ORG_TYPE = 2 AND MTRP.ID = #{id} |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <hutool.version>5.7.17</hutool.version> |
| | | <fastexcel.version>1.0.0</fastexcel.version> |
| | | <aliyun-oss.version>3.17.4</aliyun-oss.version> |
| | | <dysmsapi.version>3.1.0</dysmsapi.version> |
| | | </properties> |
| | | |
| | | <!-- 依赖声明 --> |
| | |
| | | <artifactId>aliyun-sdk-oss</artifactId> |
| | | <version>${aliyun-oss.version}</version> |
| | | </dependency> |
| | | <!--sms--> |
| | | <dependency> |
| | | <groupId>com.aliyun</groupId> |
| | | <artifactId>dysmsapi20170525</artifactId> |
| | | <version>${dysmsapi.version}</version> |
| | | </dependency> |
| | | </dependencies> |
| | | </dependencyManagement> |
| | | |