| | |
| | | |
| | | /** |
| | | * 流式附件下载接口,支持下载zip压缩包,不使用本地存储 |
| | | * @param param |
| | | * @param response |
| | | * @throws IOException |
| | | */ |
| | | @ApiOperation(value = "流式附件下载接口", notes = "使用流方式返回数据,不使用本地存储") |
| | | @PostMapping("/downloadByByte") |
| | | @GetMapping("/downloadByByte") |
| | | public void downloadByByte( |
| | | @ApiParam(value = "附件下载参数") @RequestBody AttachmentDownloadParam param, |
| | | HttpServletResponse response) throws IOException { |
| | | @ApiParam(value = "附件下载参数") @RequestParam("attachIds") String attachIds, HttpServletResponse response) throws IOException { |
| | | |
| | | // 设置文件名 |
| | | String timestamp = DateTimeUtil.format(LocalDateTime.now(), "yyyyMMdd_HHmmss"); |
| | |
| | | try { |
| | | outputStream = response.getOutputStream(); |
| | | |
| | | Boolean result = attachService.downloadByByte(param, outputStream); |
| | | Boolean result = attachService.downloadByByte(attachIds, outputStream); |
| | | if (!result) { |
| | | return; |
| | | } |
| | |
| | | <if test="attach.resultType!=null"> |
| | | and result_type = #{attach.resultType} |
| | | </if> |
| | | <if test="attach.deptList != null and attach.deptList.size > 0"> |
| | | and ba.create_dept in |
| | | <foreach collection="attach.deptList" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | </if> |
| | | and result_type in (1,2,3,4,5) |
| | | order by create_time desc,id desc |
| | | </select> |
| | |
| | | </select> |
| | | |
| | | <select id="getAttachList" resultType="org.sxkj.resource.vo.AttachVO"> |
| | | select attach.name, attach.wayline_job_id, job.name jobName |
| | | from wayline_job job |
| | | left join blade_attach attach on attach.wayline_job_id = job.job_id |
| | | left join manage_device device on attach.device_sn = device.device_sn |
| | | <where> |
| | | select |
| | | attach.* |
| | | from |
| | | blade_attach attach |
| | | <where> |
| | | <if test="attachIds!=null and attachIds.size()>0"> |
| | | and attach.id in |
| | | <foreach item="item" index="index" collection="attachIds" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="wayLineJobIds!=null and wayLineJobIds.size()>0"> |
| | | and attach.wayline_job_id in |
| | | <foreach item="item" index="index" collection="wayLineJobIds" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="startTime!=null and startTime !='' and endTime!=null and endTime !='' "> |
| | | and DATE_FORMAT(FROM_UNIXTIME(job.execute_time/1000,'%Y-%m-%d %H:%i:%s'),'%Y-%m-%d %H:%i:%s') between |
| | | #{startTime} and #{endTime} |
| | | </if> |
| | | <if test="dockSn!=null and dockSn!=''"> |
| | | and attach.device_sn = #{dockSn} |
| | | </if> |
| | | <if test="jobName!=null and jobName!=''"> |
| | | and job.name like concat('%',#{jobName},'%') |
| | | </if> |
| | | <if test="fileName!=null and fileName!=''"> |
| | | and attach.name like concat('%',#{fileName},'%') |
| | | </if> |
| | | <if test="fileType!=null and fileType!=''"> |
| | | <choose> |
| | | <when test="fileType=='visable'"> |
| | | and attach.media_category = 0 |
| | | </when> |
| | | <when test="fileType=='ir'"> |
| | | and attach.media_category = 1 |
| | | </when> |
| | | </choose> |
| | | </if> |
| | | <!-- <if test="resultType!=null and resultType!=''"> --> |
| | | <!-- and attach.result_type = #{resultType} --> |
| | | <!-- </if> --> |
| | | <if test="resultTypes!=null and resultTypes.size()>0"> |
| | | and attach.result_type in |
| | | <foreach collection="resultTypes" item="resultType" open="(" close=")" separator=","> |
| | | #{resultType} |
| | | </foreach> |
| | | </if> |
| | | AND attach.wayline_job_id IS NOT NULL |
| | | AND job.NAME IS NOT NULL |
| | | AND attach.is_deleted = 0 |
| | | </where> |
| | | </select> |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class AttachPageParam { |
| | | |
| | |
| | | */ |
| | | @ApiModelProperty(value = "附件原名") |
| | | private String originalName; |
| | | |
| | | |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | } |
| | |
| | | * @return 处理结果 |
| | | * @throws IOException IO异常 |
| | | */ |
| | | Boolean downloadByByte(AttachmentDownloadParam param, java.io.OutputStream outputStream) throws IOException; |
| | | Boolean downloadByByte(String param, java.io.OutputStream outputStream) throws IOException; |
| | | |
| | | } |
| | |
| | | |
| | | @Override |
| | | public IPage<AttachVO> selectAttachPage(IPage<AttachVO> page, AttachPageParam attach) { |
| | | List<AttachVO> attachVOS = baseMapper.selectAttachPage(page, attach); |
| | | // 创建部门 |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | attach.setDeptList(deptList); |
| | | List<AttachVO> attachVOS = baseMapper.selectAttachPage(page, attach); |
| | | return page.setRecords(attachVOS); |
| | | } |
| | | |
| | |
| | | * @throws IOException |
| | | */ |
| | | @Override |
| | | public Boolean downloadByByte(AttachmentDownloadParam param, OutputStream outputStream) throws IOException { |
| | | // 如果附件id集合并且任务id集合参数都为空,就判断起止时间是否都有为空,如果都为空,则返回错误 |
| | | param.setAreaCode(HeaderUtils.formatAreaCode(param.getAreaCode())); |
| | | if (CollectionUtils.isEmpty(param.getAttachIds())) { |
| | | // 判断起止时间是否为空 |
| | | if (StringUtils.isEmpty(param.getStartTime()) || StringUtils.isEmpty(param.getEndTime())) { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | public Boolean downloadByByte(String param, OutputStream outputStream) throws IOException { |
| | | AttachmentDownloadParam attachmentDownloadParam = new AttachmentDownloadParam(); |
| | | attachmentDownloadParam.setAttachIds(Func.toLongList(param)); |
| | | // 获取附件列表 |
| | | List<AttachVO> attachList = getAttachList(param); |
| | | List<AttachVO> attachList = getAttachList(attachmentDownloadParam); |
| | | if (CollectionUtils.isEmpty(attachList)) { |
| | | return false; |
| | | } |
| | |
| | | @ApiModelProperty(value = "区域编码") |
| | | private String areaCode; |
| | | |
| | | @ApiModelProperty(value = "机构id集合") |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | |
| | | |
| | |
| | | @ApiModelProperty(value = "删除标志(0存在 1删除)") |
| | | private Integer isDeleted; |
| | | |
| | | @ApiModelProperty(value = "部门id集合") |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | } |
| | |
| | | private Integer status; |
| | | |
| | | |
| | | @ApiModelProperty(value = "部门列表") |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | } |
| | |
| | | @ApiModelProperty(value = "反制方式:1.信号干扰/2.诱导驱离/无") |
| | | private String counterWay; |
| | | |
| | | @ApiModelProperty(value = "部门ID") |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | } |
| | |
| | | /** |
| | | * 部门id |
| | | */ |
| | | @ApiModelProperty(value = "部门id") |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | } |
| | |
| | | @ApiModelProperty(value = "经度") |
| | | private String longitude; |
| | | |
| | | @ApiModelProperty(value = "部门id") |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | |
| | | |
| | |
| | | @ApiModelProperty(value = "所属部门") |
| | | private Long belongDept; |
| | | |
| | | @ApiModelProperty(value = "部门id") |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | |
| | | |
| | |
| | | private Long belongDept; |
| | | |
| | | |
| | | @ApiModelProperty(value = "部门列表") |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | |
| | | |
| | |
| | | @Override |
| | | public List<DeviceStatisticsVO> getDeviceManufacturerStatistics() { |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | deptList.addAll(deptList); |
| | | return baseMapper.getDeviceManufacturerStatistics(deptList); |
| | | } |
| | | |
| | |
| | | @ApiModelProperty(value = "当前用户id") |
| | | private Long currentUserId; |
| | | |
| | | @ApiModelProperty(value = "部门id") |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | } |
| | |
| | | @ApiModelProperty(value = "区域名称") |
| | | private String areaName; |
| | | |
| | | @ApiModelProperty(value = "部门ID") |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | |
| | | } |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectGdFlyerPage" resultMap="gdFlyerVOResultMap"> |
| | | select * from ja_gd_flyer |
| | | select |
| | | * |
| | | from |
| | | ja_gd_flyer |
| | | <where> |
| | | is_deleted = 0 |
| | | <if test="param2.flyerName != null and param2.flyerName != ''"> |
| | |
| | | <if test="param2.skilledTaskType != null and param2.skilledTaskType != ''"> |
| | | and skilled_task_type = #{param2.skilledTaskType} |
| | | </if> |
| | | <if test="param2.deptList != null and param2.deptList.size > 0"> |
| | | AND create_dept in |
| | | <foreach collection="param2.deptList" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | // 纬度 |
| | | @ApiModelProperty(value = "纬度") |
| | | private String latitude; |
| | | |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | } |
| | |
| | | */ |
| | | package org.sxkj.gd.flyer.service.impl; |
| | | |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.sxkj.gd.flyer.entity.GdFlyerEntity; |
| | | import org.sxkj.gd.flyer.param.GdFlyerPageParam; |
| | | import org.sxkj.gd.flyer.vo.GdFlyerVO; |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.sxkj.system.cache.SysCache; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | @Override |
| | | public IPage<GdFlyerVO> selectGdFlyerPage(IPage<GdFlyerVO> page, GdFlyerPageParam gdFlyer) { |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | gdFlyer.setDeptList(deptList); |
| | | return page.setRecords(baseMapper.selectGdFlyerPage(page, gdFlyer)); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | <select id="selectGdApplicationInnovationPage" resultMap="gdApplicationInnovationResultMap"> |
| | | select * from ja_gd_application_innovation |
| | | select |
| | | * |
| | | from |
| | | ja_gd_application_innovation |
| | | <where> |
| | | and is_deleted = 0 |
| | | <if test="param2.caseName != null and param2.caseName != ''"> |
| | | and case_name like concat('%',#{param2.caseName},'%') |
| | | </if> |
| | | <if test="param2.innovationStatus != null and param2.innovationStatus != ''"> |
| | | and innovation_status = #{param2.innovationStatus} |
| | | </if> |
| | | and is_deleted = 0 |
| | | <if test="param2.deptList != null and param2.deptList.size > 0"> |
| | | and create_dept in |
| | | <foreach collection="param2.deptList" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | |
| | | |
| | | </select> |
| | | |
| | | |
| | |
| | | <if test="param.isResolved != null and param.isResolved != ''"> |
| | | AND is_resolved = #{param.isResolved} |
| | | </if> |
| | | <if test="param.deptList != null and param.deptList.size > 0"> |
| | | AND create_dept in |
| | | <foreach collection="param.deptList" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | from |
| | | ja_gd_data_objection do |
| | | left join |
| | | ja_gd_data_objection_attachment da |
| | | on do.id = da.objection_id |
| | | left join blade_dept bd on bd.id = do.create_dept |
| | | ja_gd_data_objection_attachment da |
| | | on do.id = da.objection_id |
| | | left join |
| | | blade_dept bd on bd.id = do.create_dept |
| | | <where> |
| | | do.is_deleted = 0 |
| | | <if test="param2.title != null and param2.title != ''"> |
| | |
| | | <if test="param2.objectionStatus != null and param2.objectionStatus != ''"> |
| | | and do.objection_status = #{param2.objectionStatus} |
| | | </if> |
| | | <if test="param2.deptList != null and param2.deptList.size > 0"> |
| | | and do.create_dept in |
| | | <foreach collection="param2.deptList" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | group by do.id |
| | | </select> |
| | |
| | | * |
| | | * @param page |
| | | * @param gdSupplyDemand |
| | | * @param deptIdList |
| | | * @return |
| | | */ |
| | | List<GdSupplyDemandVO> selectGdSupplyDemandPage(IPage page, @Param("param") GdSupplyDemandPageParam gdSupplyDemand, @Param("deptIdList") List<Long> deptIdList); |
| | | List<GdSupplyDemandVO> selectGdSupplyDemandPage(IPage page, @Param("param") GdSupplyDemandPageParam gdSupplyDemand); |
| | | |
| | | /** |
| | | * 列表分页 |
| | |
| | | <if test="param.demandStatus != null and param.demandStatus != ''"> |
| | | AND demand_status = #{param.demandStatus} |
| | | </if> |
| | | <if test="deptIdList != null and deptIdList.size > 0"> |
| | | <if test="param.deptList != null and param.deptList.size > 0"> |
| | | AND ( |
| | | create_dept IN |
| | | <foreach collection="deptIdList" item="deptId" open="(" separator="," close=")"> |
| | | <foreach collection="param.deptList" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | OR apply_target_dept_id IN |
| | | <foreach collection="deptIdList" item="deptId" open="(" separator="," close=")"> |
| | | <foreach collection="param.deptList" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | ) |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class GdApplicationInnovationPageParam { |
| | | |
| | |
| | | @ApiModelProperty(value = "应用创新状态(0.审核中/1.审核通过/2.审核不通过)") |
| | | private String innovationStatus; |
| | | |
| | | // |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | |
| | | @ApiModelProperty(value = "是否查询所有") |
| | | private Boolean isQueryAll = true; |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 数据评价管理表 分页查询参数 |
| | | * |
| | |
| | | @ApiModelProperty(value = "是否解决(0否 1是)") |
| | | private String isResolved; |
| | | |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | |
| | | @ApiModelProperty(value = "是否查询所有") |
| | | private Boolean isQueryAll = true; |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class GdDataObjectionPageParam { |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value = "异议状态(草稿/待处理/已反馈)") |
| | | private String objectionStatus; |
| | | |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 供需需求信息表 分页查询参数 |
| | | * |
| | |
| | | @ApiModelProperty(value = "需求状态") |
| | | private String demandStatus; |
| | | |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.sxkj.gd.orderdata.service.impl; |
| | | |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.sxkj.gd.orderdata.entity.GdApplicationInnovationEntity; |
| | | import org.sxkj.gd.orderdata.param.GdApplicationInnovationPageParam; |
| | | import org.sxkj.gd.orderdata.vo.GdApplicationInnovationVO; |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.sxkj.system.cache.SysCache; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | @Override |
| | | public IPage<GdApplicationInnovationVO> selectGdApplicationInnovationPage(IPage<GdApplicationInnovationVO> page, GdApplicationInnovationPageParam gdApplicationInnovation) { |
| | | if(gdApplicationInnovation.getIsQueryAll()){ |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | gdApplicationInnovation.setDeptList(deptList); |
| | | } |
| | | return page.setRecords(baseMapper.selectGdApplicationInnovationPage(page, gdApplicationInnovation)); |
| | | } |
| | | |
| | |
| | | */ |
| | | package org.sxkj.gd.orderdata.service.impl; |
| | | |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.sxkj.gd.orderdata.entity.GdDataEvaluationEntity; |
| | | import org.sxkj.gd.orderdata.param.GdDataEvaluationPageParam; |
| | | import org.sxkj.gd.orderdata.vo.GdDataEvaluationVO; |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.sxkj.system.cache.SysCache; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | @Override |
| | | public IPage<GdDataEvaluationVO> selectGdDataEvaluationPage(IPage<GdDataEvaluationVO> page, GdDataEvaluationPageParam gdDataEvaluation) { |
| | | if(gdDataEvaluation.getIsQueryAll()){ |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | gdDataEvaluation.setDeptList(deptList); |
| | | } |
| | | return page.setRecords(baseMapper.selectGdDataEvaluationPage(page, gdDataEvaluation)); |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public IPage<GdDataObjectionVO> selectGdDataObjectionPage(IPage<GdDataObjectionVO> page, GdDataObjectionPageParam gdDataObjection) { |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | gdDataObjection.setDeptList(deptList); |
| | | return page.setRecords(baseMapper.selectGdDataObjectionPage(page, gdDataObjection)); |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public IPage<GdSupplyDemandVO> selectGdSupplyDemandPage(IPage<GdSupplyDemandVO> page, GdSupplyDemandPageParam gdSupplyDemand) { |
| | | return page.setRecords(baseMapper.selectGdSupplyDemandPage(page, gdSupplyDemand, SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())))); |
| | | gdSupplyDemand.setDeptList(SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId()))); |
| | | return page.setRecords(baseMapper.selectGdSupplyDemandPage(page, gdSupplyDemand)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | * |
| | | * @param page |
| | | * @param gdPatrolTask |
| | | * @param deptIdList |
| | | * @return |
| | | */ |
| | | List<GdPatrolTaskVO> selectGdPatrolTaskPage(IPage page, GdPatrolTaskPageParam gdPatrolTask, List<Long> deptIdList); |
| | | List<GdPatrolTaskVO> selectGdPatrolTaskPage(IPage page, GdPatrolTaskPageParam gdPatrolTask); |
| | | |
| | | |
| | | /** |
| | |
| | | <if test="param2.taskStatus != null and param2.taskStatus != ''"> |
| | | and pt.task_status = #{param2.taskStatus} |
| | | </if> |
| | | <if test="param3 != null and param3.size > 0"> |
| | | <if test="param2.deptList != null and param2.deptList.size > 0"> |
| | | and pt.create_dept in |
| | | <foreach collection="param3" item="deptId" open="(" separator="," close=")"> |
| | | <foreach collection="param2.deptList" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | </if> |
| | |
| | | |
| | | <select id="selectGdWorkOrderPage" resultMap="gdWorkOrderResultMap"> |
| | | select |
| | | wo.id, |
| | | wo.work_order_name, |
| | | wo.work_order_code, |
| | | wo.work_order_type, |
| | | wo.device_load_demand, |
| | | wo.recommend_device_ids, |
| | | wo.work_order_status, |
| | | wo.execute_start_time, |
| | | wo.execute_end_time, |
| | | wo.service_party, |
| | | ST_AsText(wo.geom) geom, |
| | | wo.remark, |
| | | wo.area_code, |
| | | wo.create_user, |
| | | wo.create_dept, |
| | | wo.create_time, |
| | | wo.update_user, |
| | | wo.update_time, |
| | | wo.status, |
| | | wo.is_deleted, |
| | | bu.name create_user_name |
| | | wo.id, |
| | | wo.work_order_name, |
| | | wo.work_order_code, |
| | | wo.work_order_type, |
| | | wo.device_load_demand, |
| | | wo.recommend_device_ids, |
| | | wo.work_order_status, |
| | | wo.execute_start_time, |
| | | wo.execute_end_time, |
| | | wo.service_party, |
| | | ST_AsText(wo.geom) geom, |
| | | wo.remark, |
| | | wo.area_code, |
| | | wo.create_user, |
| | | wo.create_dept, |
| | | wo.create_time, |
| | | wo.update_user, |
| | | wo.update_time, |
| | | wo.status, |
| | | wo.is_deleted, |
| | | bu.name create_user_name |
| | | from ja_gd_work_order wo |
| | | left join blade_user bu on wo.create_user = bu.id |
| | | <where> |
| | | and wo.is_deleted = 0 |
| | | <if test="param2.workOrderStatus != null and param2.workOrderStatus != ''"> |
| | | and wo.work_order_status like concat(#{param2.workOrderStatus},'%') |
| | | </if> |
| | |
| | | <if test="param2.startTime != null and param2.startTime != '' and param2.endTime != null and param2.endTime != ''"> |
| | | and wo.create_time BETWEEN #{param2.startTime} AND #{param2.endTime} |
| | | </if> |
| | | and wo.is_deleted = 0 |
| | | <if test="param2.deptList != null and param2.deptList.size > 0"> |
| | | and wo.create_dept in |
| | | <foreach collection="param2.deptList" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | package org.sxkj.gd.workorder.param; |
| | | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class GdPatrolTaskPageParam { |
| | |
| | | |
| | | @ApiModelProperty(value = "结束时间") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | |
| | | @ApiModelProperty(value = "是否查询所有") |
| | | private Boolean isQueryAll = true; |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class WorkOrderPageParam { |
| | |
| | | |
| | | @ApiModelProperty(value = "结束时间") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "是否查询所有:默认true 审核方可以查询所有数据,不做机构过滤") |
| | | private Boolean isQueryAll = true; |
| | | |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.sxkj.gd.workorder.entity.GdOperationalRevenue; |
| | | import org.sxkj.gd.workorder.mapper.GdOperationalRevenueMapper; |
| | | import org.sxkj.gd.workorder.service.GdOperationalRevenueService; |
| | | import org.sxkj.gd.workorder.vo.GdOperationalRevenueVo; |
| | | import org.sxkj.system.cache.SysCache; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 运营收益Service实现类 |
| | |
| | | if (StringUtils.hasText(nickName)) { |
| | | queryWrapper.like(GdOperationalRevenue::getNickName, nickName); |
| | | } |
| | | |
| | | |
| | | // 创建部门 |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | queryWrapper.in(GdOperationalRevenue::getCreateDept, deptList); |
| | | // 按创建时间倒序 |
| | | queryWrapper.orderByDesc(GdOperationalRevenue::getCreateTime); |
| | | |
| | |
| | | @Service |
| | | public class GdPatrolTaskServiceImpl extends BaseServiceImpl<GdPatrolTaskMapper, GdPatrolTaskEntity> implements IGdPatrolTaskService { |
| | | |
| | | @Autowired |
| | | private IGdWorkOrderFlowService gdWorkOrderFlowService; |
| | | @Autowired |
| | | private IGdWorkOrderFlowService gdWorkOrderFlowService; |
| | | |
| | | // @Autowired |
| | | // private IGdWorkOrderService gdWorkOrderService; |
| | | // @Autowired |
| | | // private IGdWorkOrderService gdWorkOrderService; |
| | | @Autowired |
| | | private ISysClient sysClient; |
| | | @Autowired |
| | |
| | | private IGdManageDeviceService gdManageDeviceService; |
| | | @Override |
| | | public IPage<GdPatrolTaskVO> selectGdPatrolTaskPage(IPage<GdPatrolTaskVO> page, GdPatrolTaskPageParam gdPatrolTask) { |
| | | return page.setRecords(baseMapper.selectGdPatrolTaskPage(page, gdPatrolTask, SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())))); |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | gdPatrolTask.setDeptList(deptList); |
| | | return page.setRecords(baseMapper.selectGdPatrolTaskPage(page, gdPatrolTask)); |
| | | } |
| | | |
| | | |
| | |
| | | import org.sxkj.gd.workorder.service.IGdWorkOrderFlowService; |
| | | import org.sxkj.gd.workorder.service.IGdWorkOrderService; |
| | | import org.sxkj.gd.workorder.vo.GdWorkOrderVO; |
| | | import org.sxkj.system.cache.SysCache; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | |
| | | @Override |
| | | public IPage<GdWorkOrderVO> selectGdWorkOrderPage(IPage<GdWorkOrderVO> page, WorkOrderPageParam gdWorkOrder) { |
| | | return page.setRecords(baseMapper.selectGdWorkOrderPage(page, gdWorkOrder)); |
| | | if(gdWorkOrder.getIsQueryAll()){ |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | gdWorkOrder.setDeptList(deptList); |
| | | } |
| | | return page.setRecords(baseMapper.selectGdWorkOrderPage(page, gdWorkOrder)); |
| | | } |
| | | |
| | | |
| | |
| | | * 关联设备ID |
| | | */ |
| | | @ApiModelProperty(value = "关联设备ID") |
| | | private Long deviceId; |
| | | private String deviceId; |
| | | |
| | | @ApiModelProperty(value = "设备名称") |
| | | private String deviceName; |