已修改87个文件
已删除5个文件
已添加23个文件
| | |
| | | <!-- </parent>--> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | <packaging>jar</packaging> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.gkhy.safePlatfrom</groupId> |
| | | <artifactId>commons</artifactId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <groupId>com.gkhy.safePlatfrom</groupId> |
| | | <artifactId>emergency-rpc-api</artifactId> |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.rpc.api; |
| | | |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.req.EmergencyExecuteNumRPCReq; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.req.EmergencyExecuteTimeRPCReq; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.resp.EmergencyExecuteNumRPCResp; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.resp.EmergencyExecuteTimeRPCResp; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface EmergencyRpcAPi { |
| | | |
| | | |
| | | SearchResultVO<EmergencyExecuteTimeRPCResp> getTimeByDeptId(EmergencyExecuteTimeRPCReq query); |
| | | |
| | | SearchResultVO<List<EmergencyExecuteTimeRPCResp>> getTimeByDeptIds(EmergencyExecuteTimeRPCReq query); |
| | | |
| | | SearchResultVO<EmergencyExecuteNumRPCResp> getNumByDeptId(EmergencyExecuteNumRPCReq query); |
| | | |
| | | SearchResultVO<List<EmergencyExecuteNumRPCResp>> getNumByDeptIds(EmergencyExecuteNumRPCReq query); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.rpc.api.model; |
| | | |
| | | |
| | | public class EmergencyDrillExecuteCountData { |
| | | |
| | | private Integer num ; |
| | | |
| | | private String name ; |
| | | |
| | | public Integer getNum() { |
| | | return num; |
| | | } |
| | | |
| | | public void setNum(Integer num) { |
| | | this.num = num; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.rpc.api.model.dto.req; |
| | | |
| | | public class EmergencyExecuteNumRPCReq { |
| | | |
| | | /** |
| | | * 1、指定年份,查该年度12个月份的 |
| | | * 2、指定年份月份,查该指定月份的 |
| | | */ |
| | | |
| | | // 部门id |
| | | private Long deptId; |
| | | |
| | | //年 |
| | | private Integer year; |
| | | |
| | | // 月 |
| | | private Integer mouth; |
| | | |
| | | public Long getDeptId() { |
| | | return deptId; |
| | | } |
| | | |
| | | public void setDeptId(Long deptId) { |
| | | this.deptId = deptId; |
| | | } |
| | | |
| | | public Integer getYear() { |
| | | return year; |
| | | } |
| | | |
| | | public void setYear(Integer year) { |
| | | this.year = year; |
| | | } |
| | | |
| | | public Integer getMouth() { |
| | | return mouth; |
| | | } |
| | | |
| | | public void setMouth(Integer mouth) { |
| | | this.mouth = mouth; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.rpc.api.model.dto.req; |
| | | |
| | | public class EmergencyExecuteTimeRPCReq { |
| | | |
| | | // 部门id |
| | | private Long deptId; |
| | | |
| | | public Long getDeptId() { |
| | | return deptId; |
| | | } |
| | | |
| | | public void setDeptId(Long deptId) { |
| | | this.deptId = deptId; |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.rpc.api.model.dto.resp; |
| | | |
| | | |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.EmergencyDrillExecuteCountData; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public class EmergencyExecuteNumRPCResp { |
| | | |
| | | // 部门id |
| | | private Long deptId; |
| | | |
| | | // 部门名称 |
| | | private String deptName; |
| | | |
| | | // 部门级别 |
| | | private Integer deptLevel; |
| | | |
| | | // 名称+数据 |
| | | private List<Map<String ,String>> data; |
| | | |
| | | public Long getDeptId() { |
| | | return deptId; |
| | | } |
| | | |
| | | public void setDeptId(Long deptId) { |
| | | this.deptId = deptId; |
| | | } |
| | | |
| | | public String getDeptName() { |
| | | return deptName; |
| | | } |
| | | |
| | | public void setDeptName(String deptName) { |
| | | this.deptName = deptName; |
| | | } |
| | | |
| | | public Integer getDeptLevel() { |
| | | return deptLevel; |
| | | } |
| | | |
| | | public void setDeptLevel(Integer deptLevel) { |
| | | this.deptLevel = deptLevel; |
| | | } |
| | | |
| | | public List<Map<String, String>> getData() { |
| | | return data; |
| | | } |
| | | |
| | | public void setData(List<Map<String, String>> data) { |
| | | this.data = data; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.rpc.api.model.dto.resp; |
| | | |
| | | |
| | | public class EmergencyExecuteTimeRPCResp { |
| | | |
| | | // 部门id |
| | | private Long deptId; |
| | | |
| | | // 部门名称 |
| | | private String deptName; |
| | | |
| | | // 部门级别 |
| | | private Integer deptLevel; |
| | | |
| | | //上次演练的时间 |
| | | private String lastTime; |
| | | |
| | | // 距离上次演练的天数 |
| | | private Integer days; |
| | | |
| | | public Long getDeptId() { |
| | | return deptId; |
| | | } |
| | | |
| | | public void setDeptId(Long deptId) { |
| | | this.deptId = deptId; |
| | | } |
| | | |
| | | public String getDeptName() { |
| | | return deptName; |
| | | } |
| | | |
| | | public void setDeptName(String deptName) { |
| | | this.deptName = deptName; |
| | | } |
| | | |
| | | public Integer getDeptLevel() { |
| | | return deptLevel; |
| | | } |
| | | |
| | | public void setDeptLevel(Integer deptLevel) { |
| | | this.deptLevel = deptLevel; |
| | | } |
| | | |
| | | public String getLastTime() { |
| | | return lastTime; |
| | | } |
| | | |
| | | public void setLastTime(String lastTime) { |
| | | this.lastTime = lastTime; |
| | | } |
| | | |
| | | public Integer getDays() { |
| | | return days; |
| | | } |
| | | |
| | | public void setDays(Integer days) { |
| | | this.days = days; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.rpc.provider; |
| | | |
| | | |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.EmergencyRpcAPi; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.req.EmergencyExecuteNumRPCReq; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.req.EmergencyExecuteTimeRPCReq; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.resp.EmergencyExecuteNumRPCResp; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.resp.EmergencyExecuteTimeRPCResp; |
| | | import com.gkhy.safePlatform.emergency.service.EmergencyCountService; |
| | | import org.apache.dubbo.config.annotation.DubboService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.util.List; |
| | | |
| | | @DubboService |
| | | public class EmergencyRpcProvider implements EmergencyRpcAPi { |
| | | |
| | | @Autowired |
| | | private EmergencyCountService emergencyCountService; |
| | | |
| | | |
| | | @Override |
| | | public SearchResultVO<EmergencyExecuteTimeRPCResp> getTimeByDeptId(EmergencyExecuteTimeRPCReq query) { |
| | | return emergencyCountService.getTimeByDeptId(query); |
| | | } |
| | | |
| | | @Override |
| | | public SearchResultVO<List<EmergencyExecuteTimeRPCResp>> getTimeByDeptIds(EmergencyExecuteTimeRPCReq query) { |
| | | return emergencyCountService.getTimeByDeptIds(query); |
| | | } |
| | | |
| | | @Override |
| | | public SearchResultVO<EmergencyExecuteNumRPCResp> getNumByDeptId(EmergencyExecuteNumRPCReq query) { |
| | | return emergencyCountService.getNumByDeptId(query); |
| | | } |
| | | |
| | | @Override |
| | | public SearchResultVO<List<EmergencyExecuteNumRPCResp>> getNumByDeptIds(EmergencyExecuteNumRPCReq query) { |
| | | return emergencyCountService.getNumByDeptIds(query); |
| | | } |
| | | } |
| | |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.resp.EmergencyDrillExecuteCountRespDTO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.resp.EmergencySuppliesCountRespDTO; |
| | | import com.gkhy.safePlatform.emergency.query.EmergencyDrillExecuteCountQuery; |
| | | import com.gkhy.safePlatform.emergency.query.EmergencySuppliesCountQuery; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.req.EmergencyExecuteNumRPCReq; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.req.EmergencyExecuteTimeRPCReq; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.resp.EmergencyExecuteNumRPCResp; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.resp.EmergencyExecuteTimeRPCResp; |
| | | import com.gkhy.safePlatform.emergency.service.EmergencyCountService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | return emergencyCountService.countEmergencySupplies(pageQuery); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 应急演练次数统计图 |
| | | */ |
| | | @RequestMapping(value = "/getNumByDeptId",method = RequestMethod.POST) |
| | | public SearchResultVO<EmergencyExecuteNumRPCResp> getNumByDeptId(@RequestBody EmergencyExecuteNumRPCReq query){ |
| | | return emergencyCountService.getNumByDeptId(query); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | APPROVE_NOT_EXIST("A1005" , "审批记录不存在"), |
| | | |
| | | YEAR_NULL("Y1001" , "年份不能为空"), |
| | | |
| | | ERROR("A3000", "未知错误"); |
| | | |
| | | private String code; |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.emergency.entity.EmergencyDrillExecuteCountData; |
| | | import com.gkhy.safePlatform.emergency.entity.EmergencyDrillExecuteInfo; |
| | | import com.gkhy.safePlatform.emergency.entity.EmergencyDrillExecuteInfoDetailDO; |
| | | import com.gkhy.safePlatform.emergency.entity.EmergencyDrillExecuteInfoPageDO; |
| | | import com.gkhy.safePlatform.emergency.entity.*; |
| | | import com.gkhy.safePlatform.emergency.query.db.EmergencyDrillExecuteDBQuery; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | List<EmergencyDrillExecuteCountData> selectByMonthAndDept(@Param("startTime") String startTime ,@Param("endTime")String endTime ,@Param("deptIds")List<Long> deptIds); |
| | | |
| | | List<EmergencyDrillExecuteCountData> selectByYearAndDept(@Param("startTime") String startTime ,@Param("endTime")String endTime ,@Param("deptIds")List<Long> deptIds); |
| | | |
| | | String selectEmergencyDrillExecuteIntervalTimeByDeptId(@Param("deptId")Long deptId); |
| | | } |
| | |
| | | |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.resp.EmergencyDrillExecuteCountRespDTO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.resp.EmergencySuppliesCountRespDTO; |
| | | import com.gkhy.safePlatform.emergency.query.EmergencyDrillExecuteCountQuery; |
| | | import com.gkhy.safePlatform.emergency.query.EmergencySuppliesCountQuery; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.req.EmergencyExecuteNumRPCReq; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.req.EmergencyExecuteTimeRPCReq; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.resp.EmergencyExecuteNumRPCResp; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.resp.EmergencyExecuteTimeRPCResp; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | ResultVO<EmergencyDrillExecuteCountRespDTO> countEmergencyDrillExecute(EmergencyDrillExecuteCountQuery query); |
| | | |
| | | ResultVO<List<EmergencySuppliesCountRespDTO>> countEmergencySupplies(PageQuery<EmergencySuppliesCountQuery> pageQuery); |
| | | |
| | | // RPC接口--1、传入部门ID,查询该部门最后一次完成应急演练的时间 |
| | | SearchResultVO<EmergencyExecuteTimeRPCResp> getTimeByDeptId(EmergencyExecuteTimeRPCReq query); |
| | | |
| | | // RPC接口--2、传入部门ID,查询该部门及其子部门的最后一次完成应急演练的时间 |
| | | SearchResultVO<List<EmergencyExecuteTimeRPCResp>> getTimeByDeptIds(EmergencyExecuteTimeRPCReq query); |
| | | |
| | | // RPC接口--3、传入部门ID和年份月份,查询该部门在指定的年份,或者指定的月份的应急演练的次数 |
| | | SearchResultVO<EmergencyExecuteNumRPCResp> getNumByDeptId(EmergencyExecuteNumRPCReq query); |
| | | |
| | | // RPC接口--4、传入部门ID和年份月份,查询该部门及其子部门,在指定的年份,或者指定的月份的应急演练的次数 |
| | | SearchResultVO<List<EmergencyExecuteNumRPCResp>> getNumByDeptIds(EmergencyExecuteNumRPCReq query); |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.emergency.entity.EmergencyDrillExecuteCountData; |
| | | import com.gkhy.safePlatform.emergency.entity.EmergencyDrillExecuteInfo; |
| | | import com.gkhy.safePlatform.emergency.entity.EmergencyDrillExecuteInfoDetailDO; |
| | | import com.gkhy.safePlatform.emergency.entity.EmergencyDrillExecuteInfoPageDO; |
| | | import com.gkhy.safePlatform.emergency.entity.*; |
| | | import com.gkhy.safePlatform.emergency.query.db.EmergencyDrillExecuteDBQuery; |
| | | |
| | | import java.util.List; |
| | |
| | | List<EmergencyDrillExecuteCountData> selectByMonthAndDept(String startTime ,String endTime ,List<Long> deptIds); |
| | | |
| | | List<EmergencyDrillExecuteCountData> selectByYearAndDept(String startTime ,String endTime ,List<Long> deptIds); |
| | | |
| | | String selectEmergencyDrillExecuteIntervalTimeByDeptId(Long deptId); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.emergency.entity.EmergencyDrillExecuteCountData; |
| | | import com.gkhy.safePlatform.emergency.entity.EmergencyDrillExecuteInfo; |
| | | import com.gkhy.safePlatform.emergency.entity.EmergencyDrillExecuteInfoDetailDO; |
| | | import com.gkhy.safePlatform.emergency.entity.EmergencyDrillExecuteInfoPageDO; |
| | | import com.gkhy.safePlatform.emergency.entity.*; |
| | | import com.gkhy.safePlatform.emergency.query.db.EmergencyDrillExecuteDBQuery; |
| | | import com.gkhy.safePlatform.emergency.repository.EmergencyDrillExecuteInfoRepository; |
| | | import com.gkhy.safePlatform.emergency.service.baseService.EmergencyDrillExecuteInfoService; |
| | |
| | | return emergencyDrillExecuteInfoRepository.selectByYearAndDept(startTime,endTime,deptIds); |
| | | } |
| | | |
| | | @Override |
| | | public String selectEmergencyDrillExecuteIntervalTimeByDeptId(Long deptId) { |
| | | return emergencyDrillExecuteInfoRepository.selectEmergencyDrillExecuteIntervalTimeByDeptId(deptId); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.AccountDepartmentService; |
| | | import com.gkhy.safePlatform.commons.enums.E; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.model.resp.DepInfoRPCRespDTO; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.exception.BusinessException; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.emergency.entity.*; |
| | | import com.gkhy.safePlatform.emergency.enums.EmergencyResultCodes; |
| | | import com.gkhy.safePlatform.emergency.excepiton.EmergencyException; |
| | | import com.gkhy.safePlatform.emergency.model.dto.resp.*; |
| | | import com.gkhy.safePlatform.emergency.query.EmergencyDrillExecuteCountQuery; |
| | | import com.gkhy.safePlatform.emergency.query.EmergencySuppliesCountQuery; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.req.EmergencyExecuteNumRPCReq; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.req.EmergencyExecuteTimeRPCReq; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.resp.EmergencyExecuteNumRPCResp; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.resp.EmergencyExecuteTimeRPCResp; |
| | | import com.gkhy.safePlatform.emergency.service.EmergencyCountService; |
| | | import com.gkhy.safePlatform.emergency.service.EmergencySuppliesService; |
| | | import com.gkhy.safePlatform.emergency.service.baseService.EmergencyDrillExecuteInfoService; |
| | | import com.gkhy.safePlatform.emergency.service.baseService.EmergencySuppliesInfoService; |
| | | import com.gkhy.safePlatform.emergency.utils.TimeUtils; |
| | | import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ; |
| | | import org.apache.dubbo.config.annotation.DubboReference; |
| | | import org.redisson.api.RedissonClient; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | @Autowired |
| | | private EmergencySuppliesInfoService emergencySuppliesInfoService; |
| | | |
| | | /** |
| | | * redisson客户端 |
| | | */ |
| | | @Autowired |
| | | private RedissonClient redissonClient; |
| | | @Override |
| | | public SearchResultVO<EmergencyExecuteTimeRPCResp> getTimeByDeptId(EmergencyExecuteTimeRPCReq query) { |
| | | EmergencyExecuteTimeRPCResp emergencyExecuteTimeRPCResp = new EmergencyExecuteTimeRPCResp(); |
| | | |
| | | // 获取id对应的部门 |
| | | DepInfoRPCRespDTO depInfoRPCRespDTO = getDepInfoByDepId(query.getDeptId()); |
| | | |
| | | emergencyExecuteTimeRPCResp.setDeptId(depInfoRPCRespDTO.getDepId()); |
| | | emergencyExecuteTimeRPCResp.setDeptName(depInfoRPCRespDTO.getDepName()); |
| | | emergencyExecuteTimeRPCResp.setDeptLevel(depInfoRPCRespDTO.getDepLevel()); |
| | | String lastTime = emergencyDrillExecuteInfoService.selectEmergencyDrillExecuteIntervalTimeByDeptId(query.getDeptId()); |
| | | emergencyExecuteTimeRPCResp.setLastTime(lastTime); |
| | | emergencyExecuteTimeRPCResp.setDays(TimeUtils.differentDays(lastTime, TimeUtils.formatDate(new Date()))); |
| | | |
| | | return new SearchResultVO<>( |
| | | false, |
| | | null, |
| | | null, |
| | | null, |
| | | 1L, |
| | | emergencyExecuteTimeRPCResp, |
| | | ResultCodes.OK |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public SearchResultVO<List<EmergencyExecuteTimeRPCResp>> getTimeByDeptIds(EmergencyExecuteTimeRPCReq query) { |
| | | List<EmergencyExecuteTimeRPCResp> list = new ArrayList<>(); |
| | | return new SearchResultVO<>( |
| | | false, |
| | | null, |
| | | null, |
| | | null, |
| | | (long) list.size(), |
| | | list, |
| | | ResultCodes.OK |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public SearchResultVO<EmergencyExecuteNumRPCResp> getNumByDeptId(EmergencyExecuteNumRPCReq query) { |
| | | if (query.getYear()==null){ |
| | | throw new EmergencyException(EmergencyResultCodes.YEAR_NULL); |
| | | } |
| | | EmergencyExecuteNumRPCResp emergencyExecuteNumRPCResp = new EmergencyExecuteNumRPCResp(); |
| | | // 获取id对应的部门 |
| | | DepInfoRPCRespDTO depInfoRPCRespDTO = getDepInfoByDepId(query.getDeptId()); |
| | | |
| | | emergencyExecuteNumRPCResp.setDeptId(depInfoRPCRespDTO.getDepId()); |
| | | emergencyExecuteNumRPCResp.setDeptName(depInfoRPCRespDTO.getDepName()); |
| | | emergencyExecuteNumRPCResp.setDeptLevel(depInfoRPCRespDTO.getDepLevel()); |
| | | |
| | | // 查到该年度对应月份的数据 |
| | | List<Map<String,String>> mapList = new ArrayList<>(); |
| | | String startTime = TimeUtils.getYearFirst(query.getYear()); |
| | | String endTime = TimeUtils.getYearLast(query.getYear()); |
| | | List<Long> deptIds = new ArrayList<>(); |
| | | deptIds.add(query.getDeptId()); |
| | | List<EmergencyDrillExecuteCountData> emergencyDrillExecuteCountDataList = emergencyDrillExecuteInfoService.selectByMonthAndDept(startTime, endTime, deptIds); |
| | | if (!emergencyDrillExecuteCountDataList.isEmpty()){ |
| | | for (EmergencyDrillExecuteCountData emergencyDrillExecuteCountData : emergencyDrillExecuteCountDataList){ |
| | | Map<String ,String> map = new HashMap<>(); |
| | | map.put("name",emergencyDrillExecuteCountData.getName()); |
| | | map.put("num",emergencyDrillExecuteCountData.getNum().toString()); |
| | | mapList.add(map); |
| | | } |
| | | } |
| | | emergencyExecuteNumRPCResp.setData(mapList); |
| | | |
| | | return new SearchResultVO<>( |
| | | false, |
| | | null, |
| | | null, |
| | | null, |
| | | 1L, |
| | | emergencyExecuteNumRPCResp, |
| | | ResultCodes.OK |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public SearchResultVO<List<EmergencyExecuteNumRPCResp>> getNumByDeptIds(EmergencyExecuteNumRPCReq query) { |
| | | return null; |
| | | } |
| | | |
| | | public DepInfoRPCRespDTO getDepInfoByDepId(Long deptId) { |
| | | DepInfoRPCRespDTO dep = new DepInfoRPCRespDTO(); |
| | | ResultVO<DepInfoRPCRespDTO> rpcResult = accountDepartmentService.getDepInfoByDepId(deptId); |
| | | if (rpcResult != null && rpcResult.getCode().equals(ResultCodes.OK.getCode())) { |
| | | if (rpcResult.getData() != null) { |
| | | dep = (DepInfoRPCRespDTO) rpcResult.getData(); |
| | | } |
| | | } else { |
| | | throw new BusinessException(ResultCodes.CLIENT_DEP_NOT_EXIST); |
| | | } |
| | | return dep; |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO<EmergencyDrillExecuteCountRespDTO> countEmergencyDrillExecute(EmergencyDrillExecuteCountQuery query) { |
| | |
| | | List<EmergencyDrillExecuteCountData> list = new ArrayList<>(); |
| | | // 获取部门id集合 |
| | | List<Long> deptIds = new ArrayList<>(); |
| | | |
| | | ResultVO<List<Long>> rpcResult = accountDepartmentService.listDepAndSubDepIds(query.getDeptId()); |
| | | deptIds.add(query.getDeptId()); |
| | | /* ResultVO<List<Long>> rpcResult = accountDepartmentService.listDepAndSubDepIds(query.getDeptId()); |
| | | if (rpcResult != null && rpcResult.getCode().equals(ResultCodes.OK.getCode())) { |
| | | if (rpcResult.getData() != null) { |
| | | deptIds = (List<Long>) rpcResult.getData(); |
| | | } |
| | | }else{ |
| | | } else { |
| | | throw new BusinessException(ResultCodes.CLIENT_DEP_NOT_EXIST); |
| | | } |
| | | }*/ |
| | | // 获取时间 |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy"); |
| | | Date date = new Date(); |
| | | int year = Integer.parseInt(sdf.format(date)); |
| | | if (query.getType()==1){ |
| | | if (query.getType() == 1) { |
| | | // 月 |
| | | String startTime = TimeUtils.getYearFirst(year); |
| | | String endTime = TimeUtils.getYearLast(year); |
| | | list = emergencyDrillExecuteInfoService.selectByMonthAndDept(startTime,endTime,deptIds); |
| | | list = emergencyDrillExecuteInfoService.selectByMonthAndDept(startTime, endTime, deptIds); |
| | | } |
| | | if (query.getType()==2){ |
| | | if (query.getType() == 2) { |
| | | // 年 |
| | | String startTime = TimeUtils.getYearFirst(year-10); |
| | | String startTime = TimeUtils.getYearFirst(year - 10); |
| | | String endTime = TimeUtils.getYearLast(year); |
| | | list = emergencyDrillExecuteInfoService.selectByYearAndDept(startTime,endTime,deptIds); |
| | | list = emergencyDrillExecuteInfoService.selectByYearAndDept(startTime, endTime, deptIds); |
| | | } |
| | | |
| | | if (!CollectionUtils.isEmpty(list)){ |
| | | List<EmergencyDrillExecuteCountDataRespDTO> dataList = BeanCopyUtils.copyBeanList(list,EmergencyDrillExecuteCountDataRespDTO.class); |
| | | if (!CollectionUtils.isEmpty(list)) { |
| | | List<EmergencyDrillExecuteCountDataRespDTO> dataList = BeanCopyUtils.copyBeanList(list, EmergencyDrillExecuteCountDataRespDTO.class); |
| | | emergencyDrillExecuteCountRespDTO.setDataList(dataList); |
| | | }else{ |
| | | } else { |
| | | emergencyDrillExecuteCountRespDTO.setDataList(new ArrayList<>()); |
| | | } |
| | | return new ResultVO<>(ResultCodes.OK,emergencyDrillExecuteCountRespDTO); |
| | | return new ResultVO<>(ResultCodes.OK, emergencyDrillExecuteCountRespDTO); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | Long pageIndex = pageQuery.getPageIndex(); |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | Page<EmergencySuppliesInfoDetailDO> page = new Page<>(pageIndex,pageSize); |
| | | List<EmergencySuppliesInfoDetailDO> emergencySuppliesInfoDetailDOList = emergencySuppliesInfoService.countEmergencySupplies(page,pageQuery.getSearchParams()); |
| | | Page<EmergencySuppliesInfoDetailDO> page = new Page<>(pageIndex, pageSize); |
| | | List<EmergencySuppliesInfoDetailDO> emergencySuppliesInfoDetailDOList = emergencySuppliesInfoService.countEmergencySupplies(page, pageQuery.getSearchParams()); |
| | | |
| | | if (!CollectionUtils.isEmpty(emergencySuppliesInfoDetailDOList)){ |
| | | for (EmergencySuppliesInfoDetailDO emergencySuppliesInfoDetailDO :emergencySuppliesInfoDetailDOList){ |
| | | if (!CollectionUtils.isEmpty(emergencySuppliesInfoDetailDOList)) { |
| | | for (EmergencySuppliesInfoDetailDO emergencySuppliesInfoDetailDO : emergencySuppliesInfoDetailDOList) { |
| | | EmergencySuppliesCountRespDTO emergencySuppliesCountRespDTO = new EmergencySuppliesCountRespDTO(); |
| | | // 名称+数量 |
| | | emergencySuppliesCountRespDTO.setName(emergencySuppliesInfoDetailDO.getName()); |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize,page.getPages(), |
| | | pageSize, page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | | ); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | Date date = new Date();//获取当前日期 |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");//格式化一下 |
| | | Calendar calendar1 = Calendar.getInstance();//获取对日期操作的类对象 |
| | | //两种写法都可以获取到前三天的日期 |
| | | calendar1.set(Calendar.DAY_OF_YEAR,calendar1.get(Calendar.DAY_OF_YEAR) -40); |
| | | //在当前时间的基础上获取前三天的日期 |
| | | // calendar1.add(Calendar.DATE, -40); |
| | | //add方法 参数也可传入 月份,获取的是前几月或后几月的日期 |
| | | //calendar1.add(Calendar.MONTH, -3); |
| | | Date today = calendar1.getTime(); |
| | | String time= sdf.format(today); |
| | | System.out.println(time); |
| | | } |
| | | } |
| | |
| | | package com.gkhy.safePlatform.emergency.utils; |
| | | |
| | | import com.gkhy.safePlatform.commons.enums.E; |
| | | |
| | | import java.text.DateFormat; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | |
| | | public class TimeUtils { |
| | | |
| | | public static String formatDate(Date date){ |
| | | public static String formatDate(Date date) { |
| | | SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String sDate = f.format(date); |
| | | return sDate; |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | String XXX= "2022-09-01"; |
| | | String EEE = formatDate(new Date()); |
| | | int a = differentDays(XXX, EEE); |
| | | System.out.println(a); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 计算两个时间的间隔 |
| | | * date2比date1多的天数 |
| | | */ |
| | | public static int differentDays(String date1, String date2) { |
| | | int days = 0; |
| | | try { |
| | | DateFormat dft = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Date star = dft.parse(date1); |
| | | Date end = dft.parse(date2);//结束时间 |
| | | Long starTime = star.getTime(); |
| | | Long endTime = end.getTime(); |
| | | Long num = endTime - starTime;//时间戳相差的毫秒数 |
| | | days = (int) (num / 24 / 60 / 60 / 1000); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return days; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取某年第一天日期 |
| | | * |
| | | * @param year 年份 |
| | | * @return Date |
| | | */ |
| | | public static String getYearFirst(int year){ |
| | | public static String getYearFirst(int year) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.clear(); |
| | | calendar.set(Calendar.YEAR, year); |
| | |
| | | |
| | | /** |
| | | * 获取某年最后一天日期 |
| | | * |
| | | * @param year 年份 |
| | | * @return Date |
| | | */ |
| | | public static String getYearLast(int year){ |
| | | public static String getYearLast(int year) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.clear(); |
| | | calendar.set(Calendar.YEAR, year); |
| | |
| | | |
| | | /** |
| | | * 获取某月第一天日期 |
| | | * |
| | | * @param month 年份 |
| | | * @return Date |
| | | */ |
| | | public static String getMonthFirst(int year ,int month){ |
| | | public static String getMonthFirst(int year, int month) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.clear(); |
| | | calendar.set(Calendar.YEAR, year); |
| | | calendar.set(Calendar.MONTH, month-1); |
| | | calendar.set(Calendar.MONTH, month - 1); |
| | | Date currYearFirst = calendar.getTime(); |
| | | return formatDate(currYearFirst); |
| | | } |
| | | |
| | | /** |
| | | * 获取某月最后一天日期 |
| | | * |
| | | * @param month 年份 |
| | | * @return Date |
| | | */ |
| | | public static String getMonthLast(int year ,int month){ |
| | | public static String getMonthLast(int year, int month) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.clear(); |
| | | calendar.set(Calendar.YEAR, year); |
| | | calendar.set(Calendar.MONTH, month-1); |
| | | calendar.set(Calendar.MONTH, month - 1); |
| | | calendar.roll(Calendar.DAY_OF_MONTH, -1); |
| | | Date currYearLast = calendar.getTime(); |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | Calendar date = Calendar.getInstance(); |
| | | int year = date.get(Calendar.YEAR); |
| | | int month = date.get(Calendar.MONTH); |
| | | System.out.println(getMonthLast(year,2)); |
| | | } |
| | | } |
| | |
| | | GROUP BY |
| | | DATE_FORMAT( a.gmt_create, '%Y' ) |
| | | </select> |
| | | |
| | | |
| | | <select id="selectEmergencyDrillExecuteIntervalTimeByDeptId" resultType="java.lang.String"> |
| | | SELECT |
| | | DATE_FORMAT( max( a.gmt_create ), '%Y-%m-%d' ) AS lastTime |
| | | FROM |
| | | `emergency_drill_execute` a |
| | | INNER JOIN emergency_drill_plan b ON a.drill_plan_id = b.id |
| | | AND b.department_id = #{deptId} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | package com.gkhy.safePlatform.equipment.controller; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.equipment.entity.*; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentInfoImportExcel; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentInfoSaveOrUpdate; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentInfoExcel; |
| | | import com.gkhy.safePlatform.equipment.utils.DateUtils; |
| | | import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; |
| | | import com.gkhy.safePlatform.equipment.utils.poihelper.ExcelLogs; |
| | | import com.gkhy.safePlatform.equipment.utils.poihelper.ExcelUtil; |
| | | import com.google.common.collect.Lists; |
| | |
| | | @Autowired |
| | | public HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | public HttpServletResponse response; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<EquipmentInfoQueryCriteria> pageQuery){ |
| | | if(pageQuery.getSearchParams().getInfoType() == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少infoType"); |
| | | } |
| | | |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.equipmentInfoService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping(value = "/addOrUpdate") |
| | | public ResultVO update(@RequestBody EquipmentInfoSaveOrUpdate infoDto) { |
| | | if(infoDto.getInfoType() == null || infoDto.getEquipmentTypeId() == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少infoType或者equipmentTypeId"); |
| | | } |
| | | if(infoDto.getInfoType() == 3){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"infoType值异常"); |
| | | } |
| | | |
| | | equipmentInfoService.addOrUpdate(infoDto); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.equipmentInfoService.removeByIds(idList); |
| | | |
| | | this.equipmentInfoService.delete(ids); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping(value = "/exportTemplate") |
| | | public void exportTemplate() throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1", "类型/类别外键"); |
| | | map.put("2", "具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施 "); |
| | | map.put("3", "名称"); |
| | | map.put("4", "位号"); |
| | | map.put("5", "用途"); |
| | | map.put("6", "型号"); |
| | | map.put("7", "单位部门外键"); |
| | | map.put("8", "设置部位"); |
| | | map.put("9", "生产日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("10", "使用期限(天)"); |
| | | map.put("11", "生命周期 1:已使用 2:库存中 3:报废"); |
| | | map.put("12", "投用日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("13", "维修状态 1:维修中 2:已修好"); |
| | | map.put("14", "停用状态 1:停用 2.在用 3.维修 4.报废"); |
| | | map.put("15", "上次检查日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("16", "上次检测日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("17", "上次保养日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("18", "下次检查日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("19", "下次检测日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("20", "下次保养日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("21", "负责人ID外键"); |
| | | map.put("22", "负责人部门外键"); |
| | | map.put("23", "供应商"); |
| | | map.put("24", "使用说明"); |
| | | map.put("25", "是否检查 1:是 2:否"); |
| | | map.put("26", "检查周期"); |
| | | map.put("27", "检查提前提醒"); |
| | | map.put("28", "是否检测 1:是 2:否"); |
| | | map.put("29", "检测周期"); |
| | | map.put("30", "检测提前提醒"); |
| | | map.put("31", "是否保养 1:是 2:否"); |
| | | map.put("32", "检查内容"); |
| | | map.put("33", "负责部门/外键"); |
| | | map.put("34", "检查指标"); |
| | | map.put("35", "预警值"); |
| | | map.put("36", "联锁值"); |
| | | map.put("37", "停用理由"); |
| | | map.put("38", "停用后措施"); |
| | | map.put("39", "实际停用日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("40", "停用提交人/外键"); |
| | | map.put("41", "停用提交日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("42", "恢复理由"); |
| | | map.put("43", "恢复填报日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("44", "实际恢复日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("45", "报废理由"); |
| | | map.put("46", "报废填报日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("47", "实际报废日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("48", "保养周期"); |
| | | String fileName = URLEncoder.encode("设备设施管理数据导入模板.xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | ExcelUtil.exportExcel(map,new ArrayList<>() , response.getOutputStream()); |
| | | response.getOutputStream().close(); |
| | | equipmentInfoService.exportTemplate(); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | @RequestMapping(value = "/importData") |
| | | public ResultVO importData(MultipartFile file) throws IOException { |
| | | String contentType = file.getContentType(); |
| | | if(!"application/vnd.ms-excel".equals(contentType) |
| | | && !"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet".equals(contentType)) { |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL, "上传的excel格式错误"); |
| | | } |
| | | |
| | | Collection<EquipmentInfoImportExcel> importExcel = ExcelUtil.importExcel(EquipmentInfoImportExcel.class, file.getInputStream(), "yyyy-MM-dd HH:mm:ss", new ExcelLogs() , 0); |
| | | |
| | | if (CollectionUtils.isEmpty(importExcel)) { |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | | List<EquipmentInfo> respList = BeanCopyUtils.copyBeanList((List<EquipmentInfoImportExcel>)importExcel, EquipmentInfo.class); |
| | | |
| | | equipmentInfoService.saveBatch(respList); |
| | | equipmentInfoService.importData(file); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping(value = "/exportData") |
| | | public void exportData(EquipmentInfoQueryCriteria queryCriteria) throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("0", "ID"); |
| | | map.put("1", "类型/类别外键"); |
| | | map.put("2", "具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施 "); |
| | | map.put("3", "名称"); |
| | | map.put("4", "位号"); |
| | | map.put("5", "用途"); |
| | | map.put("6", "型号"); |
| | | map.put("7", "单位部门外键"); |
| | | map.put("8", "设置部位"); |
| | | map.put("9", "生产日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("10", "使用期限(天)"); |
| | | map.put("11", "生命周期 1:已使用 2:库存中 3:报废"); |
| | | map.put("12", "投用日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("13", "维修状态 1:维修中 2:已修好"); |
| | | map.put("14", "停用状态 1:停用 2.在用 3.维修 4.报废"); |
| | | map.put("15", "上次检查日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("16", "上次检测日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("17", "上次保养日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("18", "下次检查日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("19", "下次检测日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("20", "下次保养日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("21", "负责人ID外键"); |
| | | map.put("22", "负责人部门外键"); |
| | | map.put("23", "供应商"); |
| | | map.put("24", "使用说明"); |
| | | map.put("25", "是否检查 1:是 2:否"); |
| | | map.put("26", "检查周期"); |
| | | map.put("27", "检查提前提醒"); |
| | | map.put("28", "是否检测 1:是 2:否"); |
| | | map.put("29", "检测周期"); |
| | | map.put("30", "检测提前提醒"); |
| | | map.put("31", "是否保养 1:是 2:否"); |
| | | map.put("32", "检查内容"); |
| | | map.put("33", "负责部门/外键"); |
| | | map.put("34", "检查指标"); |
| | | map.put("35", "预警值"); |
| | | map.put("36", "联锁值"); |
| | | map.put("37", "停用理由"); |
| | | map.put("38", "停用后措施"); |
| | | map.put("39", "实际停用日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("40", "停用提交人/外键"); |
| | | map.put("41", "停用提交日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("42", "恢复理由"); |
| | | map.put("43", "恢复填报日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("44", "实际恢复日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("45", "报废理由"); |
| | | map.put("46", "报废填报日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("47", "实际报废日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("48", "保养周期"); |
| | | |
| | | String key = DateUtils.date2String(new Date(), DateUtils.PATTERN_ALLTIME_NOSIGN) ; |
| | | String fileName = URLEncoder.encode("设备设施管理"+key+".xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | |
| | | List<EquipmentInfoExcel> respList = BeanCopyUtils.copyBeanList(equipmentInfoService.queryAll(queryCriteria), EquipmentInfoExcel.class); |
| | | |
| | | ExcelUtil.exportExcel(map,respList , response.getOutputStream(),DateUtils.PATTERN_STANDARD); |
| | | response.getOutputStream().close(); |
| | | equipmentInfoService.exportData(queryCriteria); |
| | | } |
| | | |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentTypeMng; |
| | | import com.gkhy.safePlatform.equipment.service.EquipmentTypeMngService; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.EquipmentTypeMngBaseService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentTypeMngQueryCriteria; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.stream.Collectors; |
| | | import javax.annotation.Resource; |
| | |
| | | */ |
| | | @Resource |
| | | private EquipmentTypeMngService equipmentTypeMngService; |
| | | |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private EquipmentTypeMngBaseService equipmentTypeMngBaseService; |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<EquipmentTypeMngQueryCriteria> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery); |
| | | |
| | | return this.equipmentTypeMngService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping(value = "/selectOne/{id}") |
| | | public ResultVO selectOne(@PathVariable Serializable id) { |
| | | return new ResultVO<>(ResultCodes.OK,this.equipmentTypeMngService.getById(id)); |
| | | return new ResultVO<>(ResultCodes.OK,this.equipmentTypeMngBaseService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping(value = "/addOrUpdate") |
| | | public ResultVO update(@RequestBody EquipmentTypeMng equipmentTypeMng) { |
| | | if (equipmentTypeMng.getId() == null) { |
| | | return new ResultVO<>(ResultCodes.OK,equipmentTypeMngService.save(equipmentTypeMng)); |
| | | return new ResultVO<>(ResultCodes.OK,equipmentTypeMngBaseService.save(equipmentTypeMng)); |
| | | } else { |
| | | equipmentTypeMngService.update(equipmentTypeMng,new UpdateWrapper<EquipmentTypeMng>().eq("id",equipmentTypeMng.getId())); |
| | | equipmentTypeMngBaseService.update(equipmentTypeMng,new UpdateWrapper<EquipmentTypeMng>().eq("id",equipmentTypeMng.getId())); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.equipmentTypeMngService.removeByIds(idList); |
| | | |
| | | this.equipmentTypeMngService.delete(ids); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | @Autowired |
| | | public HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | public HttpServletResponse response; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | |
| | | */ |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.keypointEquipmentInfoService.removeByIds(idList); |
| | | this.keypointEquipmentInfoService.delete(ids); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping(value = "/exportTemplate") |
| | | public void exportTemplate() throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","类型/类别外键 "); |
| | | map.put("2","装置/部位名称"); |
| | | map.put("3","所属单位部门/外键"); |
| | | map.put("4","具体位置"); |
| | | map.put("5","负责人姓名"); |
| | | map.put("6","联系人/外键"); |
| | | map.put("7","录入人/外键"); |
| | | map.put("8","责任人/外键"); |
| | | map.put("9","装置部位分类 1:关键装置 2:重点部位"); |
| | | map.put("10","检查周期"); |
| | | map.put("11","应急预案/外键"); |
| | | map.put("12","主要危险有害因素"); |
| | | map.put("13","易导致风险"); |
| | | map.put("14","应急处置措施"); |
| | | map.put("15","现场图片地址路径"); |
| | | |
| | | |
| | | String fileName = URLEncoder.encode("重点监管装置设备数据导入模板.xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | ExcelUtil.exportExcel(map,new ArrayList<>() , response.getOutputStream()); |
| | | response.getOutputStream().close(); |
| | | keypointEquipmentInfoService.exportTemplate(); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | @RequestMapping(value = "/importData") |
| | | public ResultVO importData(MultipartFile file) throws IOException { |
| | | String contentType = file.getContentType(); |
| | | if(!"application/vnd.ms-excel".equals(contentType) |
| | | && !"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet".equals(contentType)) { |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL, "上传的excel格式错误"); |
| | | } |
| | | |
| | | Collection<KeypointEquipmentInfoImportExcel> importExcel = ExcelUtil.importExcel(KeypointEquipmentInfoImportExcel.class, file.getInputStream(), "yyyy-MM-dd HH:mm:ss", new ExcelLogs() , 0); |
| | | |
| | | if (CollectionUtils.isEmpty(importExcel)) { |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | | List<KeypointEquipmentInfo> respList = BeanCopyUtils.copyBeanList((List<KeypointEquipmentInfoImportExcel>)importExcel, KeypointEquipmentInfo.class); |
| | | |
| | | keypointEquipmentInfoService.saveBatch(respList); |
| | | keypointEquipmentInfoService.importData(file); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping(value = "/exportData") |
| | | public void exportData(KeypointEquipmentInfoQueryCriteria queryCriteria) throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("0","ID"); |
| | | map.put("1","类型/类别外键"); |
| | | map.put("2","装置/部位名称"); |
| | | map.put("3","所属单位部门/外键"); |
| | | map.put("4","具体位置"); |
| | | map.put("5","负责人姓名"); |
| | | map.put("6","联系人/外键"); |
| | | map.put("7","录入人/外键"); |
| | | map.put("8","责任人/外键"); |
| | | map.put("9","装置部位分类 1:关键装置 2:重点部位"); |
| | | map.put("10","检查周期"); |
| | | map.put("11","应急预案/外键"); |
| | | map.put("12","主要危险有害因素"); |
| | | map.put("13","易导致风险"); |
| | | map.put("14","应急处置措施"); |
| | | map.put("15","现场图片地址路径"); |
| | | |
| | | String key = DateUtils.date2String(new Date(), DateUtils.PATTERN_ALLTIME_NOSIGN) ; |
| | | String fileName = URLEncoder.encode("重点监管装置设备"+key+".xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | |
| | | List<KeypointEquipmentInfoExcel> respList = BeanCopyUtils.copyBeanList(keypointEquipmentInfoService.queryAll(queryCriteria), KeypointEquipmentInfoExcel.class); |
| | | |
| | | ExcelUtil.exportExcel(map,respList , response.getOutputStream(),DateUtils.PATTERN_STANDARD); |
| | | response.getOutputStream().close(); |
| | | keypointEquipmentInfoService.exportData(queryCriteria); |
| | | } |
| | | |
| | | |
| | |
| | | package com.gkhy.safePlatform.equipment.entity; |
| | | |
| | | import java.sql.Timestamp; |
| | | import com.gkhy.safePlatform.equipment.entity.BaseDomain; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * 设备检查标准设置(EquipmentCheckStandardDetail)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-20 09:24:14 |
| | | * @since 2022-08-29 08:37:54 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("equipment_check_standard_detail") |
| | |
| | | } |
| | | |
| | | //具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施 3:重点监管装置/设备 |
| | | private Integer infoTpe; |
| | | private Integer infoTpe; |
| | | |
| | | public Integer getInfoTpe() { |
| | | return infoTpe; |
| | |
| | | this.infoTpe = infoTpe; |
| | | } |
| | | //设备ID/外键 |
| | | private Long equipmentId; |
| | | private Long equipmentId; |
| | | |
| | | public Long getEquipmentId() { |
| | | return equipmentId; |
| | |
| | | this.equipmentId = equipmentId; |
| | | } |
| | | //序号 |
| | | private String indexNum; |
| | | private String indexNum; |
| | | |
| | | public String getIndexNum() { |
| | | return indexNum; |
| | |
| | | this.indexNum = indexNum; |
| | | } |
| | | //检查内容 |
| | | private String checkContent; |
| | | private String checkContent; |
| | | |
| | | public String getCheckContent() { |
| | | return checkContent; |
| | |
| | | this.checkContent = checkContent; |
| | | } |
| | | //检查指标 |
| | | private String checkTarget; |
| | | private String checkTarget; |
| | | |
| | | public String getCheckTarget() { |
| | | return checkTarget; |
| | |
| | | this.checkTarget = checkTarget; |
| | | } |
| | | //单位 |
| | | private String unit; |
| | | private String unit; |
| | | |
| | | public String getUnit() { |
| | | return unit; |
| | |
| | | this.unit = unit; |
| | | } |
| | | //巡检部位 |
| | | private String checkPart; |
| | | private String checkPart; |
| | | |
| | | public String getCheckPart() { |
| | | return checkPart; |
| | |
| | | this.checkPart = checkPart; |
| | | } |
| | | //频次 |
| | | private String rate; |
| | | private String rate; |
| | | |
| | | public String getRate() { |
| | | return rate; |
| | |
| | | public void setRate(String rate) { |
| | | this.rate = rate; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.gkhy.safePlatform.equipment.entity; |
| | | |
| | | import java.sql.Timestamp; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.gkhy.safePlatform.equipment.entity.BaseDomain; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * 设备设施详细信息(EquipmentInfo)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-03 10:55:54 |
| | | * @since 2022-08-29 08:37:54 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("equipment_info") |
| | |
| | | } |
| | | |
| | | //类型/类别外键 |
| | | private Long equipmentTypeId; |
| | | private Long equipmentTypeId; |
| | | |
| | | public Long getEquipmentTypeId() { |
| | | return equipmentTypeId; |
| | |
| | | this.equipmentTypeId = equipmentTypeId; |
| | | } |
| | | //具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施 |
| | | private Integer infoType; |
| | | private Integer infoType; |
| | | |
| | | public Integer getInfoType() { |
| | | return infoType; |
| | |
| | | this.infoType = infoType; |
| | | } |
| | | //名称 |
| | | private String qName; |
| | | private String qName; |
| | | |
| | | public String getQName() { |
| | | return qName; |
| | |
| | | this.qName = qName; |
| | | } |
| | | //位号 |
| | | private String positionNum; |
| | | private String positionNum; |
| | | |
| | | public String getPositionNum() { |
| | | return positionNum; |
| | |
| | | this.positionNum = positionNum; |
| | | } |
| | | //用途 |
| | | private String qUsage; |
| | | private String qUsage; |
| | | |
| | | public String getQUsage() { |
| | | return qUsage; |
| | |
| | | this.qUsage = qUsage; |
| | | } |
| | | //型号 |
| | | private String model; |
| | | private String model; |
| | | |
| | | public String getModel() { |
| | | return model; |
| | |
| | | this.model = model; |
| | | } |
| | | //单位部门外键 |
| | | private Long departmentId; |
| | | private Long departmentId; |
| | | |
| | | public Long getDepartmentId() { |
| | | return departmentId; |
| | |
| | | this.departmentId = departmentId; |
| | | } |
| | | //设置部位 |
| | | private String setPart; |
| | | private String setPart; |
| | | |
| | | public String getSetPart() { |
| | | return setPart; |
| | |
| | | this.setPart = setPart; |
| | | } |
| | | //生产日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp produceTime; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp produceTime; |
| | | |
| | | public Timestamp getProduceTime() { |
| | | return produceTime; |
| | |
| | | this.produceTime = produceTime; |
| | | } |
| | | //使用期限(天) |
| | | private String useEndDay; |
| | | private String useEndDay; |
| | | |
| | | public String getUseEndDay() { |
| | | return useEndDay; |
| | |
| | | this.useEndDay = useEndDay; |
| | | } |
| | | //生命周期 1:已使用 2:库存中 3:报废 |
| | | private Integer lifeCycle; |
| | | private Integer lifeCycle; |
| | | |
| | | public Integer getLifeCycle() { |
| | | return lifeCycle; |
| | |
| | | this.lifeCycle = lifeCycle; |
| | | } |
| | | //投用日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp useDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp useDate; |
| | | |
| | | public Timestamp getUseDate() { |
| | | return useDate; |
| | |
| | | this.useDate = useDate; |
| | | } |
| | | //维修状态 1:维修中 2:已修好 |
| | | private Integer repairStatus; |
| | | private Integer repairStatus; |
| | | |
| | | public Integer getRepairStatus() { |
| | | return repairStatus; |
| | |
| | | this.repairStatus = repairStatus; |
| | | } |
| | | //停用状态 1:停用 2.在用 3.维修 4.报废 |
| | | private Integer stopStatus; |
| | | private Integer stopStatus; |
| | | |
| | | public Integer getStopStatus() { |
| | | return stopStatus; |
| | |
| | | this.stopStatus = stopStatus; |
| | | } |
| | | //上次检查日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp previousCheckDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp previousCheckDate; |
| | | |
| | | public Timestamp getPreviousCheckDate() { |
| | | return previousCheckDate; |
| | |
| | | this.previousCheckDate = previousCheckDate; |
| | | } |
| | | //上次检测日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp previousTestDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp previousTestDate; |
| | | |
| | | public Timestamp getPreviousTestDate() { |
| | | return previousTestDate; |
| | |
| | | this.previousTestDate = previousTestDate; |
| | | } |
| | | //上次保养日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp previousTakecareDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp previousTakecareDate; |
| | | |
| | | public Timestamp getPreviousTakecareDate() { |
| | | return previousTakecareDate; |
| | |
| | | this.previousTakecareDate = previousTakecareDate; |
| | | } |
| | | //下次检查日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp nextCheckDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp nextCheckDate; |
| | | |
| | | public Timestamp getNextCheckDate() { |
| | | return nextCheckDate; |
| | |
| | | this.nextCheckDate = nextCheckDate; |
| | | } |
| | | //下次检测日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp nextTestDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp nextTestDate; |
| | | |
| | | public Timestamp getNextTestDate() { |
| | | return nextTestDate; |
| | |
| | | this.nextTestDate = nextTestDate; |
| | | } |
| | | //下次保养日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp nextTakecareDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp nextTakecareDate; |
| | | |
| | | public Timestamp getNextTakecareDate() { |
| | | return nextTakecareDate; |
| | |
| | | this.nextTakecareDate = nextTakecareDate; |
| | | } |
| | | //负责人ID外键 |
| | | private Long leadingPersonId; |
| | | private Long leadingPersonId; |
| | | |
| | | public Long getLeadingPersonId() { |
| | | return leadingPersonId; |
| | |
| | | this.leadingPersonId = leadingPersonId; |
| | | } |
| | | //负责人名称 |
| | | private String leadingPersonName; |
| | | private String leadingPersonName; |
| | | |
| | | public String getLeadingPersonName() { |
| | | return leadingPersonName; |
| | |
| | | this.leadingPersonName = leadingPersonName; |
| | | } |
| | | //负责人部门外键 |
| | | private Long leadingPersonDepartmentId; |
| | | private Long leadingPersonDepartmentId; |
| | | |
| | | public Long getLeadingPersonDepartmentId() { |
| | | return leadingPersonDepartmentId; |
| | |
| | | this.leadingPersonDepartmentId = leadingPersonDepartmentId; |
| | | } |
| | | //供应商 |
| | | private String supplyName; |
| | | private String supplyName; |
| | | |
| | | public String getSupplyName() { |
| | | return supplyName; |
| | |
| | | this.supplyName = supplyName; |
| | | } |
| | | //使用说明 |
| | | private String useMemo; |
| | | private String useMemo; |
| | | |
| | | public String getUseMemo() { |
| | | return useMemo; |
| | |
| | | this.useMemo = useMemo; |
| | | } |
| | | //是否检查 1:是 2:否 |
| | | private Integer isNeedCheck; |
| | | private Integer isNeedCheck; |
| | | |
| | | public Integer getIsNeedCheck() { |
| | | return isNeedCheck; |
| | |
| | | this.isNeedCheck = isNeedCheck; |
| | | } |
| | | //检查周期 |
| | | private String checkCycle; |
| | | private String checkCycle; |
| | | |
| | | public String getCheckCycle() { |
| | | return checkCycle; |
| | |
| | | this.checkCycle = checkCycle; |
| | | } |
| | | //检查提前提醒 |
| | | private String checkWarn; |
| | | private String checkWarn; |
| | | |
| | | public String getCheckWarn() { |
| | | return checkWarn; |
| | |
| | | this.checkWarn = checkWarn; |
| | | } |
| | | //是否检测 1:是 2:否 |
| | | private Integer isNeedTest; |
| | | private Integer isNeedTest; |
| | | |
| | | public Integer getIsNeedTest() { |
| | | return isNeedTest; |
| | |
| | | this.isNeedTest = isNeedTest; |
| | | } |
| | | //检测周期 |
| | | private String testCycle; |
| | | private String testCycle; |
| | | |
| | | public String getTestCycle() { |
| | | return testCycle; |
| | |
| | | this.testCycle = testCycle; |
| | | } |
| | | //检测提前提醒 |
| | | private String testWarn; |
| | | private String testWarn; |
| | | |
| | | public String getTestWarn() { |
| | | return testWarn; |
| | |
| | | this.testWarn = testWarn; |
| | | } |
| | | //是否保养 1:是 2:否 |
| | | private Integer isNeedTakecare; |
| | | private Integer isNeedTakecare; |
| | | |
| | | public Integer getIsNeedTakecare() { |
| | | return isNeedTakecare; |
| | |
| | | this.isNeedTakecare = isNeedTakecare; |
| | | } |
| | | //检查内容 |
| | | private String checkContent; |
| | | private String checkContent; |
| | | |
| | | public String getCheckContent() { |
| | | return checkContent; |
| | |
| | | this.checkContent = checkContent; |
| | | } |
| | | //负责部门/外键 |
| | | private Long leadingDepartmentId; |
| | | private Long leadingDepartmentId; |
| | | |
| | | public Long getLeadingDepartmentId() { |
| | | return leadingDepartmentId; |
| | |
| | | this.leadingDepartmentId = leadingDepartmentId; |
| | | } |
| | | //检查指标 |
| | | private String checkPoint; |
| | | private String checkPoint; |
| | | |
| | | public String getCheckPoint() { |
| | | return checkPoint; |
| | |
| | | this.checkPoint = checkPoint; |
| | | } |
| | | //预警值 |
| | | private String alertNum; |
| | | private String alertNum; |
| | | |
| | | public String getAlertNum() { |
| | | return alertNum; |
| | |
| | | this.alertNum = alertNum; |
| | | } |
| | | //联锁值 |
| | | private String lockNum; |
| | | private String lockNum; |
| | | |
| | | public String getLockNum() { |
| | | return lockNum; |
| | |
| | | this.lockNum = lockNum; |
| | | } |
| | | //停用理由 |
| | | private String stopReason; |
| | | private String stopReason; |
| | | |
| | | public String getStopReason() { |
| | | return stopReason; |
| | |
| | | this.stopReason = stopReason; |
| | | } |
| | | //停用后措施 |
| | | private String afterStopStep; |
| | | private String afterStopStep; |
| | | |
| | | public String getAfterStopStep() { |
| | | return afterStopStep; |
| | |
| | | this.afterStopStep = afterStopStep; |
| | | } |
| | | //实际停用日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp actualStopDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp actualStopDate; |
| | | |
| | | public Timestamp getActualStopDate() { |
| | | return actualStopDate; |
| | |
| | | this.actualStopDate = actualStopDate; |
| | | } |
| | | //停用提交人/外键 |
| | | private Long stopSubmitPersonId; |
| | | private Long stopSubmitPersonId; |
| | | |
| | | public Long getStopSubmitPersonId() { |
| | | return stopSubmitPersonId; |
| | |
| | | this.stopSubmitPersonId = stopSubmitPersonId; |
| | | } |
| | | //停用提交人名称 |
| | | private String stopSubmitPersonName; |
| | | private String stopSubmitPersonName; |
| | | |
| | | public String getStopSubmitPersonName() { |
| | | return stopSubmitPersonName; |
| | |
| | | this.stopSubmitPersonName = stopSubmitPersonName; |
| | | } |
| | | //停用提交日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp stopSubmitDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp stopSubmitDate; |
| | | |
| | | public Timestamp getStopSubmitDate() { |
| | | return stopSubmitDate; |
| | |
| | | this.stopSubmitDate = stopSubmitDate; |
| | | } |
| | | //恢复理由 |
| | | private String recoveryReason; |
| | | private String recoveryReason; |
| | | |
| | | public String getRecoveryReason() { |
| | | return recoveryReason; |
| | |
| | | this.recoveryReason = recoveryReason; |
| | | } |
| | | //恢复填报日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp recoverySubmitDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp recoverySubmitDate; |
| | | |
| | | public Timestamp getRecoverySubmitDate() { |
| | | return recoverySubmitDate; |
| | |
| | | this.recoverySubmitDate = recoverySubmitDate; |
| | | } |
| | | //实际恢复日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp actualRecoveryDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp actualRecoveryDate; |
| | | |
| | | public Timestamp getActualRecoveryDate() { |
| | | return actualRecoveryDate; |
| | |
| | | this.actualRecoveryDate = actualRecoveryDate; |
| | | } |
| | | //报废理由 |
| | | private String destoryReason; |
| | | private String destoryReason; |
| | | |
| | | public String getDestoryReason() { |
| | | return destoryReason; |
| | |
| | | this.destoryReason = destoryReason; |
| | | } |
| | | //报废填报日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp destorySubmitDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp destorySubmitDate; |
| | | |
| | | public Timestamp getDestorySubmitDate() { |
| | | return destorySubmitDate; |
| | |
| | | this.destorySubmitDate = destorySubmitDate; |
| | | } |
| | | //实际报废日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp actualDestoryDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp actualDestoryDate; |
| | | |
| | | public Timestamp getActualDestoryDate() { |
| | | return actualDestoryDate; |
| | |
| | | public void setActualDestoryDate(Timestamp actualDestoryDate) { |
| | | this.actualDestoryDate = actualDestoryDate; |
| | | } |
| | | |
| | | //区域ID/外键 |
| | | private Long areaId; |
| | | |
| | | //区域名称 |
| | | private String areaName; |
| | | |
| | | //区域ID |
| | | private Long areaId; |
| | | |
| | | public Long getAreaId() { |
| | | return areaId; |
| | | } |
| | |
| | | public void setAreaId(Long areaId) { |
| | | this.areaId = areaId; |
| | | } |
| | | |
| | | //区域名称 |
| | | private String areaName; |
| | | |
| | | public String getAreaName() { |
| | | return areaName; |
| | | } |
| | |
| | | public void setAreaName(String areaName) { |
| | | this.areaName = areaName; |
| | | } |
| | | |
| | | //保养周期 |
| | | private String takecareCycle; |
| | | |
| | | //保养周期 |
| | | private String takecareCycle; |
| | | |
| | | public String getTakecareCycle() { |
| | | return takecareCycle; |
| | | } |
| | |
| | | public void setTakecareCycle(String takecareCycle) { |
| | | this.takecareCycle = takecareCycle; |
| | | } |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.gkhy.safePlatform.equipment.entity; |
| | | |
| | | import java.sql.Timestamp; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.gkhy.safePlatform.equipment.entity.BaseDomain; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * 设备维修明细(EquipmentRepairDetail)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-03 11:17:00 |
| | | * @since 2022-08-29 08:37:54 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("equipment_repair_detail") |
| | |
| | | } |
| | | |
| | | //具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施 3:重点监管装置/设备 |
| | | private Integer infoTpe; |
| | | private Integer infoTpe; |
| | | |
| | | public Integer getInfoTpe() { |
| | | return infoTpe; |
| | |
| | | this.infoTpe = infoTpe; |
| | | } |
| | | //设备ID/外键 |
| | | private Long equipmentId; |
| | | private Long equipmentId; |
| | | |
| | | public Long getEquipmentId() { |
| | | return equipmentId; |
| | |
| | | this.equipmentId = equipmentId; |
| | | } |
| | | //维修负责人/外键 |
| | | private Long repairPersonId; |
| | | private Long repairPersonId; |
| | | |
| | | public Long getRepairPersonId() { |
| | | return repairPersonId; |
| | |
| | | this.repairPersonId = repairPersonId; |
| | | } |
| | | //维修负责人名称 |
| | | private String repairPersonName; |
| | | private String repairPersonName; |
| | | |
| | | public String getRepairPersonName() { |
| | | return repairPersonName; |
| | |
| | | this.repairPersonName = repairPersonName; |
| | | } |
| | | //维修开始日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp repairStartDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp repairStartDate; |
| | | |
| | | public Timestamp getRepairStartDate() { |
| | | return repairStartDate; |
| | |
| | | this.repairStartDate = repairStartDate; |
| | | } |
| | | //维修结束日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp repairEndDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp repairEndDate; |
| | | |
| | | public Timestamp getRepairEndDate() { |
| | | return repairEndDate; |
| | |
| | | this.repairEndDate = repairEndDate; |
| | | } |
| | | //维修负责人单位/外键 |
| | | private Long repairPersonDepartmentId; |
| | | private Long repairPersonDepartmentId; |
| | | |
| | | public Long getRepairPersonDepartmentId() { |
| | | return repairPersonDepartmentId; |
| | |
| | | this.repairPersonDepartmentId = repairPersonDepartmentId; |
| | | } |
| | | //维修负责人单位名称 |
| | | private String repairPersonDepartmentName; |
| | | private String repairPersonDepartmentName; |
| | | |
| | | public String getRepairPersonDepartmentName() { |
| | | return repairPersonDepartmentName; |
| | |
| | | this.repairPersonDepartmentName = repairPersonDepartmentName; |
| | | } |
| | | //维修情况 |
| | | private String repairMemo; |
| | | private String repairMemo; |
| | | |
| | | public String getRepairMemo() { |
| | | return repairMemo; |
| | |
| | | this.repairMemo = repairMemo; |
| | | } |
| | | //维修状态 1:维修中 2:已修好 |
| | | private Integer repairStatus; |
| | | private Integer repairStatus; |
| | | |
| | | public Integer getRepairStatus() { |
| | | return repairStatus; |
| | |
| | | this.repairStatus = repairStatus; |
| | | } |
| | | //设施异常项 |
| | | private String exceptionInfo; |
| | | private String exceptionInfo; |
| | | |
| | | public String getExceptionInfo() { |
| | | return exceptionInfo; |
| | |
| | | public void setExceptionInfo(String exceptionInfo) { |
| | | this.exceptionInfo = exceptionInfo; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.gkhy.safePlatform.equipment.entity; |
| | | |
| | | import java.sql.Timestamp; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.gkhy.safePlatform.equipment.entity.BaseDomain; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * 设备保养明细(EquipmentTakecareDetail)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-03 11:14:57 |
| | | * @since 2022-08-29 08:37:54 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("equipment_takecare_detail") |
| | |
| | | } |
| | | |
| | | //具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施 3:重点监管装置/设备 |
| | | private Integer infoTpe; |
| | | private Integer infoTpe; |
| | | |
| | | public Integer getInfoTpe() { |
| | | return infoTpe; |
| | |
| | | this.infoTpe = infoTpe; |
| | | } |
| | | //设备ID/外键 |
| | | private Long equipmentId; |
| | | private Long equipmentId; |
| | | |
| | | public Long getEquipmentId() { |
| | | return equipmentId; |
| | |
| | | this.equipmentId = equipmentId; |
| | | } |
| | | //保养内容 |
| | | private String takecareMemo; |
| | | private String takecareMemo; |
| | | |
| | | public String getTakecareMemo() { |
| | | return takecareMemo; |
| | |
| | | this.takecareMemo = takecareMemo; |
| | | } |
| | | //保养负责人/外键 |
| | | private Long leadingPersonId; |
| | | private Long leadingPersonId; |
| | | |
| | | public Long getLeadingPersonId() { |
| | | return leadingPersonId; |
| | |
| | | this.leadingPersonId = leadingPersonId; |
| | | } |
| | | //保养负责人名称 |
| | | private String leadingPersonName; |
| | | private String leadingPersonName; |
| | | |
| | | public String getLeadingPersonName() { |
| | | return leadingPersonName; |
| | |
| | | this.leadingPersonName = leadingPersonName; |
| | | } |
| | | //保养日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp takecareDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp takecareDate; |
| | | |
| | | public Timestamp getTakecareDate() { |
| | | return takecareDate; |
| | |
| | | this.takecareDate = takecareDate; |
| | | } |
| | | //保养负责人单位 |
| | | private Long leadingPersonDepartmentId; |
| | | private Long leadingPersonDepartmentId; |
| | | |
| | | public Long getLeadingPersonDepartmentId() { |
| | | return leadingPersonDepartmentId; |
| | |
| | | this.leadingPersonDepartmentId = leadingPersonDepartmentId; |
| | | } |
| | | //保养负责人单位名称 |
| | | private String leadingPersonDepartmentName; |
| | | private String leadingPersonDepartmentName; |
| | | |
| | | public String getLeadingPersonDepartmentName() { |
| | | return leadingPersonDepartmentName; |
| | |
| | | public void setLeadingPersonDepartmentName(String leadingPersonDepartmentName) { |
| | | this.leadingPersonDepartmentName = leadingPersonDepartmentName; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.gkhy.safePlatform.equipment.entity; |
| | | |
| | | import java.sql.Timestamp; |
| | | import com.gkhy.safePlatform.equipment.entity.BaseDomain; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * 设备保养明细(EquipmentTakecareStardardDetail)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 15:22:05 |
| | | * @since 2022-08-29 08:37:54 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("equipment_takecare_stardard_detail") |
| | | public class EquipmentTakecareStardardDetail extends BaseDomain { |
| | | |
| | | |
| | | |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | public Long getId() { |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | //具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施 3:重点监管装置/设备 |
| | | //具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施 3:重点监管装置/设备 |
| | | private Integer infoTpe; |
| | | |
| | | |
| | | public Integer getInfoTpe() { |
| | | return infoTpe; |
| | | } |
| | |
| | | public void setInfoTpe(Integer infoTpe) { |
| | | this.infoTpe = infoTpe; |
| | | } |
| | | //设备ID/外键 |
| | | //设备ID/外键 |
| | | private Long equipmentId; |
| | | |
| | | |
| | | public Long getEquipmentId() { |
| | | return equipmentId; |
| | | } |
| | |
| | | public void setEquipmentId(Long equipmentId) { |
| | | this.equipmentId = equipmentId; |
| | | } |
| | | //文件路径 |
| | | //文件路径 |
| | | private String filePath; |
| | | |
| | | |
| | | public String getFilePath() { |
| | | return filePath; |
| | | } |
| | |
| | | public void setFilePath(String filePath) { |
| | | this.filePath = filePath; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.gkhy.safePlatform.equipment.entity; |
| | | |
| | | import java.sql.Timestamp; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.gkhy.safePlatform.equipment.entity.BaseDomain; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * 设备检测明细(EquipmentTestDetail)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-03 11:15:57 |
| | | * @since 2022-08-29 08:37:54 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("equipment_test_detail") |
| | |
| | | } |
| | | |
| | | //具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施 3:重点监管装置/设备 |
| | | private Integer infoTpe; |
| | | private Integer infoTpe; |
| | | |
| | | public Integer getInfoTpe() { |
| | | return infoTpe; |
| | |
| | | this.infoTpe = infoTpe; |
| | | } |
| | | //设备ID/外键 |
| | | private Long equipmentId; |
| | | private Long equipmentId; |
| | | |
| | | public Long getEquipmentId() { |
| | | return equipmentId; |
| | |
| | | this.equipmentId = equipmentId; |
| | | } |
| | | //检测人/外键 |
| | | private Long testPersonId; |
| | | private Long testPersonId; |
| | | |
| | | public Long getTestPersonId() { |
| | | return testPersonId; |
| | |
| | | this.testPersonId = testPersonId; |
| | | } |
| | | //检测人名称 |
| | | private String testPersonName; |
| | | private String testPersonName; |
| | | |
| | | public String getTestPersonName() { |
| | | return testPersonName; |
| | |
| | | this.testPersonName = testPersonName; |
| | | } |
| | | //检测日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp testDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp testDate; |
| | | |
| | | public Timestamp getTestDate() { |
| | | return testDate; |
| | |
| | | this.testDate = testDate; |
| | | } |
| | | //检测人单位/外键 |
| | | private Long testPersonDepartmentId; |
| | | private Long testPersonDepartmentId; |
| | | |
| | | public Long getTestPersonDepartmentId() { |
| | | return testPersonDepartmentId; |
| | |
| | | this.testPersonDepartmentId = testPersonDepartmentId; |
| | | } |
| | | //检测人单位名称 |
| | | private String testPersonDepartmentName; |
| | | private String testPersonDepartmentName; |
| | | |
| | | public String getTestPersonDepartmentName() { |
| | | return testPersonDepartmentName; |
| | |
| | | this.testPersonDepartmentName = testPersonDepartmentName; |
| | | } |
| | | //检测内容 |
| | | private String testMemo; |
| | | private String testMemo; |
| | | |
| | | public String getTestMemo() { |
| | | return testMemo; |
| | |
| | | this.testMemo = testMemo; |
| | | } |
| | | //检测结果 1:正常 2:异常 |
| | | private Integer testResult; |
| | | private Integer testResult; |
| | | |
| | | public Integer getTestResult() { |
| | | return testResult; |
| | |
| | | this.testResult = testResult; |
| | | } |
| | | //检测状态 |
| | | private String testStatus; |
| | | private String testStatus; |
| | | |
| | | public String getTestStatus() { |
| | | return testStatus; |
| | |
| | | public void setTestStatus(String testStatus) { |
| | | this.testStatus = testStatus; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.gkhy.safePlatform.equipment.entity; |
| | | |
| | | import java.sql.Timestamp; |
| | | import com.gkhy.safePlatform.equipment.entity.BaseDomain; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * 设备设施类型管理(EquipmentTypeMng)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 08:35:02 |
| | | * @since 2022-08-29 08:39:44 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("equipment_type_mng") |
| | | public class EquipmentTypeMng extends BaseDomain { |
| | | |
| | | |
| | | |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | public Long getId() { |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | //类别名称 |
| | | //类别名称 |
| | | private String typeName; |
| | | |
| | | |
| | | public String getTypeName() { |
| | | return typeName; |
| | | } |
| | |
| | | public void setTypeName(String typeName) { |
| | | this.typeName = typeName; |
| | | } |
| | | //是否为设备内容 1:是 2:否 |
| | | //是否为设备内容 1:是 2:否 |
| | | private Integer isContent; |
| | | |
| | | |
| | | public Integer getIsContent() { |
| | | return isContent; |
| | | } |
| | |
| | | public void setIsContent(Integer isContent) { |
| | | this.isContent = isContent; |
| | | } |
| | | //父级ID,如果没有父级,为0 |
| | | //父级ID,如果没有父级,为0 |
| | | private Long parentId; |
| | | |
| | | |
| | | public Long getParentId() { |
| | | return parentId; |
| | | } |
| | |
| | | public void setParentId(Long parentId) { |
| | | this.parentId = parentId; |
| | | } |
| | | //排序号 |
| | | //排序号 |
| | | private Integer sortNum; |
| | | |
| | | |
| | | public Integer getSortNum() { |
| | | return sortNum; |
| | | } |
| | |
| | | public void setSortNum(Integer sortNum) { |
| | | this.sortNum = sortNum; |
| | | } |
| | | //是否巡检 1:是 2:否 |
| | | //是否巡检 1:是 2:否 |
| | | private Integer isVisit; |
| | | |
| | | |
| | | public Integer getIsVisit() { |
| | | return isVisit; |
| | | } |
| | |
| | | public void setIsVisit(Integer isVisit) { |
| | | this.isVisit = isVisit; |
| | | } |
| | | //是否检测 1:是 2:否 |
| | | //是否检测 1:是 2:否 |
| | | private Integer isCheck; |
| | | |
| | | |
| | | public Integer getIsCheck() { |
| | | return isCheck; |
| | | } |
| | |
| | | public void setIsCheck(Integer isCheck) { |
| | | this.isCheck = isCheck; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.gkhy.safePlatform.equipment.entity; |
| | | |
| | | import java.sql.Timestamp; |
| | | import com.gkhy.safePlatform.equipment.entity.BaseDomain; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * 重点监管装置/设备 详细信息(KeypointEquipmentInfo)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-09 09:39:39 |
| | | * @since 2022-08-29 08:37:54 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("keypoint_equipment_info") |
| | |
| | | public void setScenePic(String scenePic) { |
| | | this.scenePic = scenePic; |
| | | } |
| | | |
| | | //备注 |
| | | private String memo; |
| | | |
| | |
| | | public void setMemo(String memo) { |
| | | this.memo = memo; |
| | | } |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | package com.gkhy.safePlatform.equipment.excepiton; |
| | | |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.equipment.enums.EquipmentResultCodes; |
| | | |
| | | public class EquipmentException extends RuntimeException { |
| | | private String code; |
| | | private String message; |
| | | |
| | | public EquipmentException(String message) { |
| | | super(message); |
| | | this.code = "A3000"; |
| | | } |
| | | public EquipmentException(EquipmentResultCodes error) { |
| | | super(error.getDesc()); |
| | | this.code = error.getCode(); |
| | |
| | | this.message = message; |
| | | } |
| | | |
| | | public EquipmentException(ResultCodes clientParamIllegal) { |
| | | super(clientParamIllegal.getDesc()); |
| | | this.code = clientParamIllegal.getCode(); |
| | | this.message = clientParamIllegal.getDesc(); |
| | | } |
| | | |
| | | public String getCode() { |
| | | return this.code; |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp updateTime; |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | @Query() |
| | | private Integer equipmentTypeId; |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | public Integer getEquipmentTypeId() { |
| | | return equipmentTypeId; |
| | | } |
| | |
| | | @Query() |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp updateTime; |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | |
| | | public Long getId() { |
| | |
| | | @Query() |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp updateTime; |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | |
| | | public Long getId() { |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp updateTime; |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp updateTime; |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | public void setParentId(Long parentId) { |
| | | this.parentId = parentId; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | } |
| | |
| | | public void setEquipmentTypeId(Integer equipmentTypeId) { |
| | | this.equipmentTypeId = equipmentTypeId; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | } |
| | |
| | | public interface EquipmentInfoRepository extends BaseMapper<EquipmentInfo> { |
| | | |
| | | @Select("<script> select count(1) from equipment_info m INNER JOIN \n" + |
| | | "(select a.id,max(b.takecare_date) mdate from equipment_info a INNER JOIN equipment_takecare_detail b on a.id = b.equipment_id GROUP BY b.equipment_id) n \n" + |
| | | "on m.id = n.id where DATEDIFF(NOW(),n.mdate) >m.takecare_cycle</script> ") |
| | | "(select a.id,max(b.takecare_date) mdate from equipment_info a INNER JOIN equipment_takecare_detail b on a.id = b.equipment_id WHERE a.del_flag = 0 AND b.del_flag = 0 GROUP BY b.equipment_id) n \n" + |
| | | "on m.id = n.id where DATEDIFF(NOW(),n.mdate) >m.takecare_cycle AND m.del_flag = 0</script> ") |
| | | Object countOverTime(); |
| | | } |
| | |
| | | * @author xurui |
| | | * @since 2022-07-19 15:21:54 |
| | | */ |
| | | public interface EquipmentCheckStandardDetailService extends IService<EquipmentCheckStandardDetail> { |
| | | public interface EquipmentCheckStandardDetailService { |
| | | ResultVO queryAll(PageQuery<EquipmentCheckStandardDetailQueryCriteria> pageQuery); |
| | | |
| | | List<EquipmentCheckStandardDetail> queryAll(EquipmentCheckStandardDetailQueryCriteria criteria); |
| | |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentInfoQueryCriteria; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentInfoSaveOrUpdate; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentInfoDto; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | * @author xurui |
| | | * @since 2022-07-19 14:02:50 |
| | | */ |
| | | public interface EquipmentInfoService extends IService<EquipmentInfo> { |
| | | public interface EquipmentInfoService { |
| | | ResultVO queryAll(PageQuery<EquipmentInfoQueryCriteria> pageQuery); |
| | | |
| | | List<EquipmentInfo> queryAll(EquipmentInfoQueryCriteria criteria); |
| | |
| | | Object statistics(); |
| | | |
| | | Map<Long,String> getDepName(Set<Long> collectDepIdSet); |
| | | |
| | | void importData(MultipartFile file) throws IOException; |
| | | |
| | | void delete(Long[] ids); |
| | | |
| | | void exportTemplate() throws IOException; |
| | | |
| | | void exportData(EquipmentInfoQueryCriteria queryCriteria) throws IOException; |
| | | } |
| | |
| | | * @author xurui |
| | | * @since 2022-07-19 15:10:57 |
| | | */ |
| | | public interface EquipmentRepairDetailService extends IService<EquipmentRepairDetail> { |
| | | public interface EquipmentRepairDetailService { |
| | | ResultVO queryAll(PageQuery<EquipmentRepairDetailQueryCriteria> pageQuery); |
| | | |
| | | List<EquipmentRepairDetail> queryAll(EquipmentRepairDetailQueryCriteria criteria); |
| | |
| | | * @author xurui |
| | | * @since 2022-07-19 14:40:28 |
| | | */ |
| | | public interface EquipmentTakecareDetailService extends IService<EquipmentTakecareDetail> { |
| | | public interface EquipmentTakecareDetailService { |
| | | ResultVO queryAll(PageQuery<EquipmentTakecareDetailQueryCriteria> pageQuery); |
| | | |
| | | List<EquipmentTakecareDetail> queryAll(EquipmentTakecareDetailQueryCriteria criteria); |
| | |
| | | * @author xurui |
| | | * @since 2022-07-19 15:22:05 |
| | | */ |
| | | public interface EquipmentTakecareStardardDetailService extends IService<EquipmentTakecareStardardDetail> { |
| | | public interface EquipmentTakecareStardardDetailService { |
| | | ResultVO queryAll(PageQuery<EquipmentTakecareStardardDetailQueryCriteria> pageQuery); |
| | | |
| | | List<EquipmentTakecareStardardDetail> queryAll(EquipmentTakecareStardardDetailQueryCriteria criteria); |
| | |
| | | * @author xurui |
| | | * @since 2022-07-19 15:08:23 |
| | | */ |
| | | public interface EquipmentTestDetailService extends IService<EquipmentTestDetail> { |
| | | public interface EquipmentTestDetailService { |
| | | ResultVO queryAll(PageQuery<EquipmentTestDetailQueryCriteria> pageQuery); |
| | | |
| | | List<EquipmentTestDetail> queryAll(EquipmentTestDetailQueryCriteria criteria); |
| | |
| | | * @author xurui |
| | | * @since 2022-07-19 08:35:02 |
| | | */ |
| | | public interface EquipmentTypeMngService extends IService<EquipmentTypeMng> { |
| | | public interface EquipmentTypeMngService { |
| | | ResultVO queryAll(PageQuery<EquipmentTypeMngQueryCriteria> pageQuery); |
| | | |
| | | List<EquipmentTypeMng> queryAll(EquipmentTypeMngQueryCriteria criteria); |
| | | |
| | | List<EquipmentTypeMngDto> treeData(Long parentId); |
| | | |
| | | void delete(Long[] ids); |
| | | } |
| | |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.KeypointEquipmentInfoQueryCriteria; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.KeypointEquipmentInfoDto; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | |
| | | * @author xurui |
| | | * @since 2022-07-19 13:36:27 |
| | | */ |
| | | public interface KeypointEquipmentInfoService extends IService<KeypointEquipmentInfo> { |
| | | public interface KeypointEquipmentInfoService { |
| | | ResultVO queryAll(PageQuery<KeypointEquipmentInfoQueryCriteria> pageQuery); |
| | | |
| | | List<KeypointEquipmentInfo> queryAll(KeypointEquipmentInfoQueryCriteria criteria); |
| | |
| | | KeypointEquipmentInfoDto selectOne(Serializable id); |
| | | |
| | | void addOrUpdate(KeypointEquipmentInfoDto infoDto); |
| | | |
| | | void importData(MultipartFile file) throws IOException; |
| | | |
| | | void delete(Long[] ids); |
| | | |
| | | void exportTemplate() throws IOException; |
| | | |
| | | void exportData(KeypointEquipmentInfoQueryCriteria queryCriteria) throws IOException; |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.equipment.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentCheckStandardDetail; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentCheckStandardDetailQueryCriteria; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 设备检查标准设置(EquipmentCheckStandardDetail)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 15:21:54 |
| | | */ |
| | | public interface EquipmentCheckStandardDetailBaseService extends IService<EquipmentCheckStandardDetail> { |
| | | List<EquipmentCheckStandardDetail> queryAll(EquipmentCheckStandardDetailQueryCriteria criteria); |
| | | |
| | | IPage<EquipmentCheckStandardDetail> selectPage(IPage<EquipmentCheckStandardDetail> page, QueryWrapper predicate); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.equipment.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentInfo; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentInfoQueryCriteria; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentInfoSaveOrUpdate; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentInfoDto; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | |
| | | /** |
| | | * 设备设施详细信息(EquipmentInfo)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 14:02:50 |
| | | */ |
| | | public interface EquipmentInfoBaseService extends IService<EquipmentInfo> { |
| | | List<EquipmentInfo> queryAll(EquipmentInfoQueryCriteria criteria); |
| | | |
| | | Object countOverTime(); |
| | | |
| | | IPage<EquipmentInfo> selectPage(IPage<EquipmentInfo> page, QueryWrapper predicate); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.equipment.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentRepairDetail; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentRepairDetailQueryCriteria; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 设备维修明细(EquipmentRepairDetail)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 15:10:57 |
| | | */ |
| | | public interface EquipmentRepairDetailBaseService extends IService<EquipmentRepairDetail> { |
| | | List<EquipmentRepairDetail> queryAll(EquipmentRepairDetailQueryCriteria criteria); |
| | | |
| | | IPage<EquipmentRepairDetail> selectPage(IPage<EquipmentRepairDetail> page, QueryWrapper predicate); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.equipment.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentTakecareDetail; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentTakecareDetailQueryCriteria; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 设备保养明细(EquipmentTakecareDetail)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 14:40:28 |
| | | */ |
| | | public interface EquipmentTakecareDetailBaseService extends IService<EquipmentTakecareDetail> { |
| | | List<EquipmentTakecareDetail> queryAll(EquipmentTakecareDetailQueryCriteria criteria); |
| | | |
| | | IPage<EquipmentTakecareDetail> selectPage(IPage<EquipmentTakecareDetail> page, QueryWrapper predicate); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.equipment.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentTakecareStardardDetail; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentTakecareStardardDetailQueryCriteria; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 设备保养明细(EquipmentTakecareStardardDetail)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 15:22:05 |
| | | */ |
| | | public interface EquipmentTakecareStardardDetailBaseService extends IService<EquipmentTakecareStardardDetail> { |
| | | List<EquipmentTakecareStardardDetail> queryAll(EquipmentTakecareStardardDetailQueryCriteria criteria); |
| | | |
| | | IPage<EquipmentTakecareStardardDetail> selectPage(IPage<EquipmentTakecareStardardDetail> page, QueryWrapper predicate); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.equipment.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentTestDetail; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentTestDetailQueryCriteria; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 设备检测明细(EquipmentTestDetail)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 15:08:23 |
| | | */ |
| | | public interface EquipmentTestDetailBaseService extends IService<EquipmentTestDetail> { |
| | | List<EquipmentTestDetail> queryAll(EquipmentTestDetailQueryCriteria criteria); |
| | | |
| | | IPage<EquipmentTestDetail> selectPage(IPage<EquipmentTestDetail> page, QueryWrapper predicate); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.equipment.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentTypeMng; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentTypeMngQueryCriteria; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentTypeMngDto; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 设备设施类型管理(EquipmentTypeMng)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 08:35:02 |
| | | */ |
| | | public interface EquipmentTypeMngBaseService extends IService<EquipmentTypeMng> { |
| | | List<EquipmentTypeMng> queryAll(EquipmentTypeMngQueryCriteria criteria); |
| | | |
| | | Page<EquipmentTypeMng> selectPage(Page<EquipmentTypeMng> page, QueryWrapper predicate); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.equipment.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.KeypointEquipmentInfo; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.KeypointEquipmentInfoQueryCriteria; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.KeypointEquipmentInfoDto; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 重点监管装置/设备 详细信息(KeypointEquipmentInfo)表服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 13:36:27 |
| | | */ |
| | | public interface KeypointEquipmentInfoBaseService extends IService<KeypointEquipmentInfo> { |
| | | List<KeypointEquipmentInfo> queryAll(KeypointEquipmentInfoQueryCriteria criteria); |
| | | |
| | | IPage<KeypointEquipmentInfo> selectPage(IPage<KeypointEquipmentInfo> page, QueryWrapper predicate); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.equipment.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentCheckStandardDetail; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentCheckStandardDetailQueryCriteria; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentCheckStandardDetailDto; |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentCheckStandardDetailRepository; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.EquipmentCheckStandardDetailBaseService; |
| | | import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设备检查标准设置(EquipmentCheckStandardDetail)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 15:21:54 |
| | | */ |
| | | @Service("equipmentCheckStandardDetailBaseService") |
| | | public class EquipmentCheckStandardDetailBaseServiceImpl extends ServiceImpl<EquipmentCheckStandardDetailRepository, EquipmentCheckStandardDetail> implements EquipmentCheckStandardDetailBaseService { |
| | | |
| | | @Override |
| | | public List<EquipmentCheckStandardDetail> queryAll(EquipmentCheckStandardDetailQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentCheckStandardDetail.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<EquipmentCheckStandardDetail> selectPage(IPage<EquipmentCheckStandardDetail> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page,predicate); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.equipment.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.AccountDepartmentService; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.model.resp.DepInfoRPCRespDTO; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.*; |
| | | import com.gkhy.safePlatform.equipment.excepiton.EquipmentException; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.*; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentInfoDto; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentInfoExcel; |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentInfoRepository; |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentTypeMngRepository; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.*; |
| | | import com.gkhy.safePlatform.equipment.utils.DateUtils; |
| | | import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; |
| | | import com.gkhy.safePlatform.equipment.utils.poihelper.ExcelLogs; |
| | | import com.gkhy.safePlatform.equipment.utils.poihelper.ExcelUtil; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.dubbo.config.annotation.DubboReference; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.Serializable; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 设备设施详细信息(EquipmentInfo)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 14:02:50 |
| | | */ |
| | | @Service("equipmentInfoBaseService") |
| | | public class EquipmentInfoBaseServiceImpl extends ServiceImpl<EquipmentInfoRepository, EquipmentInfo> implements EquipmentInfoBaseService { |
| | | |
| | | |
| | | @Autowired |
| | | private EquipmentInfoRepository equipmentInfoRepository; |
| | | @Override |
| | | public List<EquipmentInfo> queryAll(EquipmentInfoQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentInfo.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public Object countOverTime() { |
| | | return equipmentInfoRepository.countOverTime(); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<EquipmentInfo> selectPage(IPage<EquipmentInfo> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page,predicate); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.equipment.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentRepairDetail; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentRepairDetailQueryCriteria; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentRepairDetailDto; |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentRepairDetailRepository; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.EquipmentRepairDetailBaseService; |
| | | import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设备维修明细(EquipmentRepairDetail)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 15:10:57 |
| | | */ |
| | | @Service("equipmentRepairDetailBaseService") |
| | | public class EquipmentRepairDetailBaseServiceImpl extends ServiceImpl<EquipmentRepairDetailRepository, EquipmentRepairDetail> implements EquipmentRepairDetailBaseService { |
| | | |
| | | |
| | | @Override |
| | | public List<EquipmentRepairDetail> queryAll(EquipmentRepairDetailQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentRepairDetail.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<EquipmentRepairDetail> selectPage(IPage<EquipmentRepairDetail> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page,predicate); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.equipment.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentTakecareDetail; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentTakecareDetailQueryCriteria; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentTakecareDetailDto; |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentTakecareDetailRepository; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.EquipmentTakecareDetailBaseService; |
| | | import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设备保养明细(EquipmentTakecareDetail)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 14:40:28 |
| | | */ |
| | | @Service("equipmentTakecareDetailBaseService") |
| | | public class EquipmentTakecareDetailBaseServiceImpl extends ServiceImpl<EquipmentTakecareDetailRepository, EquipmentTakecareDetail> implements EquipmentTakecareDetailBaseService { |
| | | |
| | | @Override |
| | | public List<EquipmentTakecareDetail> queryAll(EquipmentTakecareDetailQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentTakecareDetail.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<EquipmentTakecareDetail> selectPage(IPage<EquipmentTakecareDetail> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page,predicate); |
| | | |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.equipment.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentTakecareStardardDetail; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentTakecareStardardDetailQueryCriteria; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentTakecareStardardDetailDto; |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentTakecareStardardDetailRepository; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.EquipmentTakecareStardardDetailBaseService; |
| | | import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设备保养明细(EquipmentTakecareStardardDetail)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 15:22:05 |
| | | */ |
| | | @Service("equipmentTakecareStardardDetailBaseService") |
| | | public class EquipmentTakecareStardardDetailBaseServiceImpl extends ServiceImpl<EquipmentTakecareStardardDetailRepository, EquipmentTakecareStardardDetail> implements EquipmentTakecareStardardDetailBaseService { |
| | | |
| | | @Override |
| | | public List<EquipmentTakecareStardardDetail> queryAll(EquipmentTakecareStardardDetailQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentTakecareStardardDetail.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<EquipmentTakecareStardardDetail> selectPage(IPage<EquipmentTakecareStardardDetail> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page,predicate); |
| | | |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.equipment.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentTestDetail; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentTestDetailQueryCriteria; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentTestDetailDto; |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentTestDetailRepository; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.EquipmentTestDetailBaseService; |
| | | import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设备检测明细(EquipmentTestDetail)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 15:08:23 |
| | | */ |
| | | @Service("equipmentTestDetailBaseService") |
| | | public class EquipmentTestDetailBaseServiceImpl extends ServiceImpl<EquipmentTestDetailRepository, EquipmentTestDetail> implements EquipmentTestDetailBaseService { |
| | | |
| | | @Override |
| | | public List<EquipmentTestDetail> queryAll(EquipmentTestDetailQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentTestDetail.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<EquipmentTestDetail> selectPage(IPage<EquipmentTestDetail> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page,predicate); |
| | | |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.equipment.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.OrderItem; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentTypeMng; |
| | | import com.gkhy.safePlatform.equipment.excepiton.EquipmentException; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentTypeMngQueryCriteria; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentTypeMngDto; |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentTypeMngRepository; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.EquipmentTypeMngBaseService; |
| | | import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 设备设施类型管理(EquipmentTypeMng)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 08:35:02 |
| | | */ |
| | | @Service("equipmentTypeMngBaseService") |
| | | public class EquipmentTypeMngBaseServiceImpl extends ServiceImpl<EquipmentTypeMngRepository, EquipmentTypeMng> implements EquipmentTypeMngBaseService { |
| | | |
| | | @Override |
| | | public List<EquipmentTypeMng> queryAll(EquipmentTypeMngQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentTypeMng.class, criteria).orderBy(true,true,"sort_num")); |
| | | } |
| | | |
| | | @Override |
| | | public Page<EquipmentTypeMng> selectPage(Page<EquipmentTypeMng> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page,predicate); |
| | | |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.equipment.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.equipment.entity.*; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.*; |
| | | import com.gkhy.safePlatform.equipment.repository.KeypointEquipmentInfoRepository; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.*; |
| | | import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 重点监管装置/设备 详细信息(KeypointEquipmentInfo)表服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 13:36:27 |
| | | */ |
| | | @Service("keypointEquipmentInfoBaseService") |
| | | public class KeypointEquipmentInfoBaseServiceImpl extends ServiceImpl<KeypointEquipmentInfoRepository, KeypointEquipmentInfo> implements KeypointEquipmentInfoBaseService { |
| | | |
| | | @Override |
| | | public List<KeypointEquipmentInfo> queryAll(KeypointEquipmentInfoQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(KeypointEquipmentInfo.class, criteria)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<KeypointEquipmentInfo> selectPage(IPage<KeypointEquipmentInfo> page, QueryWrapper predicate) { |
| | | return baseMapper.selectPage(page,predicate); |
| | | |
| | | } |
| | | } |
| | |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentCheckStandardDetailRepository; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentCheckStandardDetail; |
| | | import com.gkhy.safePlatform.equipment.service.EquipmentCheckStandardDetailService; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.EquipmentCheckStandardDetailBaseService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | * @since 2022-07-19 15:21:54 |
| | | */ |
| | | @Service("equipmentCheckStandardDetailService") |
| | | public class EquipmentCheckStandardDetailServiceImpl extends ServiceImpl<EquipmentCheckStandardDetailRepository, EquipmentCheckStandardDetail> implements EquipmentCheckStandardDetailService { |
| | | public class EquipmentCheckStandardDetailServiceImpl implements EquipmentCheckStandardDetailService { |
| | | |
| | | @Autowired |
| | | private EquipmentCheckStandardDetailRepository equipmentCheckStandardDetailRepository; |
| | | private EquipmentCheckStandardDetailBaseService equipmentCheckStandardDetailBaseService; |
| | | |
| | | |
| | | |
| | |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<EquipmentCheckStandardDetail> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = equipmentCheckStandardDetailBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(EquipmentCheckStandardDetail.class, pageQuery.getSearchParams())); |
| | | List<EquipmentCheckStandardDetailDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), EquipmentCheckStandardDetailDto.class); |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<EquipmentCheckStandardDetail> queryAll(EquipmentCheckStandardDetailQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentCheckStandardDetail.class, criteria)); |
| | | return equipmentCheckStandardDetailBaseService.queryAll(criteria); |
| | | } |
| | | } |
| | |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.*; |
| | | import com.gkhy.safePlatform.equipment.excepiton.EquipmentException; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.*; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentInfoDto; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentInfoExcel; |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentInfoRepository; |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentTypeMngRepository; |
| | | import com.gkhy.safePlatform.equipment.service.*; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.*; |
| | | import com.gkhy.safePlatform.equipment.utils.DateUtils; |
| | | import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; |
| | | import com.gkhy.safePlatform.equipment.utils.poihelper.ExcelLogs; |
| | | import com.gkhy.safePlatform.equipment.utils.poihelper.ExcelUtil; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.dubbo.config.annotation.DubboReference; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.Serializable; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | * @since 2022-07-19 14:02:50 |
| | | */ |
| | | @Service("equipmentInfoService") |
| | | public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoRepository, EquipmentInfo> implements EquipmentInfoService { |
| | | public class EquipmentInfoServiceImpl implements EquipmentInfoService { |
| | | |
| | | @Autowired |
| | | private EquipmentInfoRepository equipmentInfoRepository; |
| | | private EquipmentInfoBaseService equipmentInfoBaseService; |
| | | |
| | | @Autowired |
| | | private EquipmentTakecareDetailService equipmentTakecareDetailService; |
| | | private EquipmentTakecareDetailBaseService equipmentTakecareDetailBaseService; |
| | | |
| | | @Autowired |
| | | private EquipmentTestDetailService equipmentTestDetailService; |
| | | private EquipmentTestDetailBaseService equipmentTestDetailBaseService; |
| | | |
| | | @Autowired |
| | | private EquipmentRepairDetailService equipmentRepairDetailService; |
| | | private EquipmentRepairDetailBaseService equipmentRepairDetailBaseService; |
| | | |
| | | @Autowired |
| | | private EquipmentTakecareStardardDetailService equipmentTakecareStardardDetailService; |
| | | private EquipmentTakecareStardardDetailBaseService equipmentTakecareStardardDetailBaseService; |
| | | |
| | | @Autowired |
| | | private EquipmentCheckStandardDetailService equipmentCheckStandardDetailService; |
| | | private EquipmentCheckStandardDetailBaseService equipmentCheckStandardDetailBaseService; |
| | | |
| | | @DubboReference(check = false) |
| | | private AccountDepartmentService accountDepartmentService; |
| | |
| | | @Autowired |
| | | private EquipmentTypeMngRepository equipmentTypeMngRepository; |
| | | |
| | | @Autowired |
| | | public HttpServletResponse response; |
| | | |
| | | @Override |
| | | public ResultVO queryAll(PageQuery<EquipmentInfoQueryCriteria> pageQuery) { |
| | | if(pageQuery.getSearchParams().getInfoType() == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少infoType"); |
| | | } |
| | | |
| | | PageUtils.checkCheck(pageQuery); |
| | | |
| | | Long pageIndex = pageQuery.getPageIndex(); |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<EquipmentInfo> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = equipmentInfoBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(EquipmentInfo.class, pageQuery.getSearchParams())); |
| | | List<EquipmentInfoDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), EquipmentInfoDto.class); |
| | | |
| | |
| | | EquipmentTakecareDetailQueryCriteria criteria = new EquipmentTakecareDetailQueryCriteria(); |
| | | criteria.setEquipmentId(f.getId()); |
| | | criteria.setInfoTpe(pageQuery.getSearchParams().getInfoType()); |
| | | List<EquipmentTakecareDetail> takecareDetailList = equipmentTakecareDetailService.queryAll(criteria); |
| | | List<EquipmentTakecareDetail> takecareDetailList = equipmentTakecareDetailBaseService.queryAll(criteria); |
| | | f.setTakecareDetailList(takecareDetailList); |
| | | |
| | | //设备检测 |
| | | EquipmentTestDetailQueryCriteria criteria1 = new EquipmentTestDetailQueryCriteria(); |
| | | criteria1.setEquipmentId(f.getId()); |
| | | criteria1.setInfoTpe(pageQuery.getSearchParams().getInfoType()); |
| | | List<EquipmentTestDetail> testDetailList = equipmentTestDetailService.queryAll(criteria1); |
| | | List<EquipmentTestDetail> testDetailList = equipmentTestDetailBaseService.queryAll(criteria1); |
| | | f.setTestDetailList(testDetailList); |
| | | |
| | | //设备检查 TODO |
| | |
| | | EquipmentRepairDetailQueryCriteria criteria2 = new EquipmentRepairDetailQueryCriteria(); |
| | | criteria2.setEquipmentId(f.getId()); |
| | | criteria2.setInfoTpe(pageQuery.getSearchParams().getInfoType()); |
| | | List<EquipmentRepairDetail> repairDetailList = equipmentRepairDetailService.queryAll(criteria2); |
| | | List<EquipmentRepairDetail> repairDetailList = equipmentRepairDetailBaseService.queryAll(criteria2); |
| | | f.setRepaireDetailList(repairDetailList); |
| | | |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<EquipmentInfo> queryAll(EquipmentInfoQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentInfo.class, criteria)); |
| | | return equipmentInfoBaseService.queryAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | public EquipmentInfoDto selectOne(Serializable id) { |
| | | EquipmentInfo equipmentInfo = baseMapper.selectById(id); |
| | | EquipmentInfo equipmentInfo = equipmentInfoBaseService.getById(id); |
| | | if(equipmentInfo == null){ |
| | | return null; |
| | | } |
| | |
| | | EquipmentTakecareDetailQueryCriteria criteria = new EquipmentTakecareDetailQueryCriteria(); |
| | | criteria.setEquipmentId(infoDto.getId()); |
| | | criteria.setInfoTpe(infoDto.getInfoType()); |
| | | List<EquipmentTakecareDetail> takecareDetailList = equipmentTakecareDetailService.queryAll(criteria); |
| | | List<EquipmentTakecareDetail> takecareDetailList = equipmentTakecareDetailBaseService.queryAll(criteria); |
| | | infoDto.setTakecareDetailList(takecareDetailList); |
| | | |
| | | //设备检测 |
| | | EquipmentTestDetailQueryCriteria criteria1 = new EquipmentTestDetailQueryCriteria(); |
| | | criteria1.setEquipmentId(infoDto.getId()); |
| | | criteria1.setInfoTpe(infoDto.getInfoType()); |
| | | List<EquipmentTestDetail> testDetailList = equipmentTestDetailService.queryAll(criteria1); |
| | | List<EquipmentTestDetail> testDetailList = equipmentTestDetailBaseService.queryAll(criteria1); |
| | | infoDto.setTestDetailList(testDetailList); |
| | | |
| | | //设备检查 TODO |
| | |
| | | EquipmentRepairDetailQueryCriteria criteria2 = new EquipmentRepairDetailQueryCriteria(); |
| | | criteria2.setEquipmentId(infoDto.getId()); |
| | | criteria2.setInfoTpe(infoDto.getInfoType()); |
| | | List<EquipmentRepairDetail> repairDetailList = equipmentRepairDetailService.queryAll(criteria2); |
| | | List<EquipmentRepairDetail> repairDetailList = equipmentRepairDetailBaseService.queryAll(criteria2); |
| | | infoDto.setRepaireDetailList(repairDetailList); |
| | | |
| | | //检查标准 |
| | | EquipmentCheckStandardDetailQueryCriteria criteria3 = new EquipmentCheckStandardDetailQueryCriteria(); |
| | | criteria3.setEquipmentId(infoDto.getId()); |
| | | criteria3.setInfoTpe(infoDto.getInfoType()); |
| | | List<EquipmentCheckStandardDetail> checkStandardDetailList = equipmentCheckStandardDetailService.queryAll(criteria3); |
| | | List<EquipmentCheckStandardDetail> checkStandardDetailList = equipmentCheckStandardDetailBaseService.queryAll(criteria3); |
| | | infoDto.setCheckStandardeDetailList(checkStandardDetailList); |
| | | |
| | | //保养标准 |
| | | EquipmentTakecareStardardDetailQueryCriteria criteria4 = new EquipmentTakecareStardardDetailQueryCriteria(); |
| | | criteria4.setEquipmentId(infoDto.getId()); |
| | | criteria4.setInfoTpe(infoDto.getInfoType()); |
| | | List<EquipmentTakecareStardardDetail> takecareStardardDetailList = equipmentTakecareStardardDetailService.queryAll(criteria4); |
| | | List<EquipmentTakecareStardardDetail> takecareStardardDetailList = equipmentTakecareStardardDetailBaseService.queryAll(criteria4); |
| | | infoDto.setTakecareStardardeDetailList(takecareStardardDetailList); |
| | | |
| | | |
| | |
| | | |
| | | @Override |
| | | public void addOrUpdate(EquipmentInfoSaveOrUpdate infoDto) { |
| | | if(infoDto.getInfoType() == null || infoDto.getEquipmentTypeId() == null){ |
| | | throw new EquipmentException(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | if(infoDto.getInfoType() == 3){ |
| | | throw new EquipmentException(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | |
| | | EquipmentInfo equipmentInfo = BeanCopyUtils.copyBean(infoDto, EquipmentInfo.class); |
| | | //保存主数据 |
| | | if (infoDto.getId() == null) { //新增 |
| | | this.save(equipmentInfo); |
| | | equipmentInfoBaseService.save(equipmentInfo); |
| | | } else { |
| | | this.update(equipmentInfo,new UpdateWrapper<EquipmentInfo>().eq("id",infoDto.getId())); |
| | | equipmentInfoBaseService.update(equipmentInfo,new UpdateWrapper<EquipmentInfo>().eq("id",infoDto.getId())); |
| | | } |
| | | |
| | | |
| | |
| | | f.setEquipmentId(equipmentInfo.getId()); |
| | | f.setInfoTpe(equipmentInfo.getInfoType()); |
| | | }); |
| | | equipmentTakecareDetailService.saveOrUpdateBatch(takecareDetailList); |
| | | equipmentTakecareDetailBaseService.saveOrUpdateBatch(takecareDetailList); |
| | | if(StringUtils.hasText(infoDto.getDelTakecareDetails())){ |
| | | List<Long> idList = Arrays.stream(infoDto.getDelTakecareDetails().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | .collect(Collectors.toList()); |
| | | equipmentTakecareDetailService.removeByIds(idList); |
| | | |
| | | List<EquipmentTakecareDetail> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | EquipmentTakecareDetail info = new EquipmentTakecareDetail(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | equipmentTakecareDetailBaseService.updateBatchById(delList); |
| | | } |
| | | |
| | | |
| | |
| | | f.setEquipmentId(equipmentInfo.getId()); |
| | | f.setInfoTpe(equipmentInfo.getInfoType()); |
| | | }); |
| | | equipmentTestDetailService.saveOrUpdateBatch(testDetailList); |
| | | equipmentTestDetailBaseService.saveOrUpdateBatch(testDetailList); |
| | | if(StringUtils.hasText(infoDto.getDelTestDetails())){ |
| | | List<Long> idList = Arrays.stream(infoDto.getDelTestDetails().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | .collect(Collectors.toList()); |
| | | equipmentTestDetailService.removeByIds(idList); |
| | | List<EquipmentTestDetail> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | EquipmentTestDetail info = new EquipmentTestDetail(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | equipmentTestDetailBaseService.updateBatchById(delList); |
| | | } |
| | | |
| | | //设备检查 TODO |
| | |
| | | f.setEquipmentId(equipmentInfo.getId()); |
| | | f.setInfoTpe(equipmentInfo.getInfoType()); |
| | | }); |
| | | equipmentRepairDetailService.saveOrUpdateBatch(repaireDetailList); |
| | | equipmentRepairDetailBaseService.saveOrUpdateBatch(repaireDetailList); |
| | | if(StringUtils.hasText(infoDto.getDelRepaireDetails())){ |
| | | List<Long> idList = Arrays.stream(infoDto.getDelRepaireDetails().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | .collect(Collectors.toList()); |
| | | equipmentRepairDetailService.removeByIds(idList); |
| | | List<EquipmentRepairDetail> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | EquipmentRepairDetail info = new EquipmentRepairDetail(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | equipmentRepairDetailBaseService.updateBatchById(delList); |
| | | } |
| | | |
| | | //保存检查标准 |
| | |
| | | f.setEquipmentId(equipmentInfo.getId()); |
| | | f.setInfoTpe(equipmentInfo.getInfoType()); |
| | | }); |
| | | equipmentCheckStandardDetailService.saveOrUpdateBatch(checkStandardeDetailList); |
| | | equipmentCheckStandardDetailBaseService.saveOrUpdateBatch(checkStandardeDetailList); |
| | | if(StringUtils.hasText(infoDto.getDelCheckStandardeDetails())){ |
| | | List<Long> idList = Arrays.stream(infoDto.getDelCheckStandardeDetails().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | .collect(Collectors.toList()); |
| | | equipmentCheckStandardDetailService.removeByIds(idList); |
| | | List<EquipmentCheckStandardDetail> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | EquipmentCheckStandardDetail info = new EquipmentCheckStandardDetail(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | equipmentCheckStandardDetailBaseService.updateBatchById(delList); |
| | | } |
| | | |
| | | //保存保养标准 |
| | |
| | | f.setEquipmentId(equipmentInfo.getId()); |
| | | f.setInfoTpe(equipmentInfo.getInfoType()); |
| | | }); |
| | | equipmentTakecareStardardDetailService.saveOrUpdateBatch(takecareStardardeDetailList); |
| | | equipmentTakecareStardardDetailBaseService.saveOrUpdateBatch(takecareStardardeDetailList); |
| | | if(StringUtils.hasText(infoDto.getDelTakecareStardardeDetails())){ |
| | | List<Long> idList = Arrays.stream(infoDto.getDelTakecareStardardeDetails().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | .collect(Collectors.toList()); |
| | | equipmentTakecareStardardDetailService.removeByIds(idList); |
| | | List<EquipmentTakecareStardardDetail> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | EquipmentTakecareStardardDetail info = new EquipmentTakecareStardardDetail(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | equipmentTakecareStardardDetailBaseService.updateBatchById(delList); |
| | | } |
| | | |
| | | |
| | |
| | | .select("stop_status as stopStatus,count(0) as count") |
| | | .groupBy("stop_status"); |
| | | |
| | | List<Map<String, Object>> list = this.listMaps(wrapper); |
| | | List<Map<String, Object>> list = equipmentInfoBaseService.listMaps(wrapper); |
| | | |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("-1",equipmentInfoRepository.countOverTime());//超时未保养 |
| | | map.put("-1",equipmentInfoBaseService.countOverTime());//超时未保养 |
| | | return list; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("exception",e); |
| | | System.out.println("exception"+e); |
| | | } |
| | | } |
| | | }); |
| | | return depPool; |
| | | } |
| | | |
| | | @Override |
| | | public void importData(MultipartFile file) throws IOException { |
| | | String contentType = file.getContentType(); |
| | | if(!"application/vnd.ms-excel".equals(contentType) |
| | | && !"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet".equals(contentType)) { |
| | | throw new EquipmentException("上传的excel格式错误"); |
| | | } |
| | | |
| | | Collection<EquipmentInfoImportExcel> importExcel = ExcelUtil.importExcel(EquipmentInfoImportExcel.class, file.getInputStream(), "yyyy-MM-dd HH:mm:ss", new ExcelLogs() , 0); |
| | | |
| | | if (CollectionUtils.isEmpty(importExcel)) { |
| | | return ; |
| | | } |
| | | |
| | | List<EquipmentInfo> respList = BeanCopyUtils.copyBeanList((List<EquipmentInfoImportExcel>)importExcel, EquipmentInfo.class); |
| | | |
| | | equipmentInfoBaseService.saveBatch(respList); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Long[] ids) { |
| | | if(ids == null){ |
| | | throw new EquipmentException(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<EquipmentInfo> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | EquipmentInfo info = new EquipmentInfo(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | |
| | | equipmentInfoBaseService.updateBatchById(delList); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void exportTemplate() throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1", "类型/类别外键"); |
| | | map.put("2", "具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施 "); |
| | | map.put("3", "名称"); |
| | | map.put("4", "位号"); |
| | | map.put("5", "用途"); |
| | | map.put("6", "型号"); |
| | | map.put("7", "单位部门外键"); |
| | | map.put("8", "设置部位"); |
| | | map.put("9", "生产日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("10", "使用期限(天)"); |
| | | map.put("11", "生命周期 1:已使用 2:库存中 3:报废"); |
| | | map.put("12", "投用日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("13", "维修状态 1:维修中 2:已修好"); |
| | | map.put("14", "停用状态 1:停用 2.在用 3.维修 4.报废"); |
| | | map.put("15", "上次检查日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("16", "上次检测日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("17", "上次保养日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("18", "下次检查日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("19", "下次检测日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("20", "下次保养日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("21", "负责人ID外键"); |
| | | map.put("22", "负责人部门外键"); |
| | | map.put("23", "供应商"); |
| | | map.put("24", "使用说明"); |
| | | map.put("25", "是否检查 1:是 2:否"); |
| | | map.put("26", "检查周期"); |
| | | map.put("27", "检查提前提醒"); |
| | | map.put("28", "是否检测 1:是 2:否"); |
| | | map.put("29", "检测周期"); |
| | | map.put("30", "检测提前提醒"); |
| | | map.put("31", "是否保养 1:是 2:否"); |
| | | map.put("32", "检查内容"); |
| | | map.put("33", "负责部门/外键"); |
| | | map.put("34", "检查指标"); |
| | | map.put("35", "预警值"); |
| | | map.put("36", "联锁值"); |
| | | map.put("37", "停用理由"); |
| | | map.put("38", "停用后措施"); |
| | | map.put("39", "实际停用日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("40", "停用提交人/外键"); |
| | | map.put("41", "停用提交日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("42", "恢复理由"); |
| | | map.put("43", "恢复填报日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("44", "实际恢复日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("45", "报废理由"); |
| | | map.put("46", "报废填报日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("47", "实际报废日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("48", "保养周期"); |
| | | String fileName = URLEncoder.encode("设备设施管理数据导入模板.xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | ExcelUtil.exportExcel(map,new ArrayList<>() , response.getOutputStream()); |
| | | response.getOutputStream().close(); |
| | | } |
| | | |
| | | @Override |
| | | public void exportData(EquipmentInfoQueryCriteria queryCriteria) throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("0", "ID"); |
| | | map.put("1", "类型/类别外键"); |
| | | map.put("2", "具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施 "); |
| | | map.put("3", "名称"); |
| | | map.put("4", "位号"); |
| | | map.put("5", "用途"); |
| | | map.put("6", "型号"); |
| | | map.put("7", "单位部门外键"); |
| | | map.put("8", "设置部位"); |
| | | map.put("9", "生产日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("10", "使用期限(天)"); |
| | | map.put("11", "生命周期 1:已使用 2:库存中 3:报废"); |
| | | map.put("12", "投用日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("13", "维修状态 1:维修中 2:已修好"); |
| | | map.put("14", "停用状态 1:停用 2.在用 3.维修 4.报废"); |
| | | map.put("15", "上次检查日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("16", "上次检测日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("17", "上次保养日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("18", "下次检查日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("19", "下次检测日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("20", "下次保养日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("21", "负责人ID外键"); |
| | | map.put("22", "负责人部门外键"); |
| | | map.put("23", "供应商"); |
| | | map.put("24", "使用说明"); |
| | | map.put("25", "是否检查 1:是 2:否"); |
| | | map.put("26", "检查周期"); |
| | | map.put("27", "检查提前提醒"); |
| | | map.put("28", "是否检测 1:是 2:否"); |
| | | map.put("29", "检测周期"); |
| | | map.put("30", "检测提前提醒"); |
| | | map.put("31", "是否保养 1:是 2:否"); |
| | | map.put("32", "检查内容"); |
| | | map.put("33", "负责部门/外键"); |
| | | map.put("34", "检查指标"); |
| | | map.put("35", "预警值"); |
| | | map.put("36", "联锁值"); |
| | | map.put("37", "停用理由"); |
| | | map.put("38", "停用后措施"); |
| | | map.put("39", "实际停用日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("40", "停用提交人/外键"); |
| | | map.put("41", "停用提交日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("42", "恢复理由"); |
| | | map.put("43", "恢复填报日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("44", "实际恢复日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("45", "报废理由"); |
| | | map.put("46", "报废填报日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("47", "实际报废日期(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("48", "保养周期"); |
| | | |
| | | String key = DateUtils.date2String(new Date(), DateUtils.PATTERN_ALLTIME_NOSIGN) ; |
| | | String fileName = URLEncoder.encode("设备设施管理"+key+".xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | queryCriteria.setDelFlag(0); |
| | | List<EquipmentInfoExcel> respList = BeanCopyUtils.copyBeanList(this.queryAll(queryCriteria), EquipmentInfoExcel.class); |
| | | |
| | | ExcelUtil.exportExcel(map,respList , response.getOutputStream(),DateUtils.PATTERN_STANDARD); |
| | | response.getOutputStream().close(); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentRepairDetailRepository; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentRepairDetail; |
| | | import com.gkhy.safePlatform.equipment.service.EquipmentRepairDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentRepairDetail; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentRepairDetailQueryCriteria; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentRepairDetailDto; |
| | | import com.gkhy.safePlatform.equipment.service.EquipmentRepairDetailService; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.EquipmentRepairDetailBaseService; |
| | | import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @since 2022-07-19 15:10:57 |
| | | */ |
| | | @Service("equipmentRepairDetailService") |
| | | public class EquipmentRepairDetailServiceImpl extends ServiceImpl<EquipmentRepairDetailRepository, EquipmentRepairDetail> implements EquipmentRepairDetailService { |
| | | public class EquipmentRepairDetailServiceImpl implements EquipmentRepairDetailService { |
| | | |
| | | @Autowired |
| | | private EquipmentRepairDetailRepository equipmentRepairDetailRepository; |
| | | private EquipmentRepairDetailBaseService equipmentRepairDetailBaseService; |
| | | |
| | | |
| | | |
| | |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<EquipmentRepairDetail> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = equipmentRepairDetailBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(EquipmentRepairDetail.class, pageQuery.getSearchParams())); |
| | | List<EquipmentRepairDetailDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), EquipmentRepairDetailDto.class); |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<EquipmentRepairDetail> queryAll(EquipmentRepairDetailQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentRepairDetail.class, criteria)); |
| | | return equipmentRepairDetailBaseService.queryAll(criteria); |
| | | } |
| | | } |
| | |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentTakecareDetailRepository; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentTakecareDetail; |
| | | import com.gkhy.safePlatform.equipment.service.EquipmentTakecareDetailService; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.EquipmentTakecareDetailBaseService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | * @since 2022-07-19 14:40:28 |
| | | */ |
| | | @Service("equipmentTakecareDetailService") |
| | | public class EquipmentTakecareDetailServiceImpl extends ServiceImpl<EquipmentTakecareDetailRepository, EquipmentTakecareDetail> implements EquipmentTakecareDetailService { |
| | | public class EquipmentTakecareDetailServiceImpl implements EquipmentTakecareDetailService { |
| | | |
| | | @Autowired |
| | | private EquipmentTakecareDetailRepository equipmentTakecareDetailRepository; |
| | | private EquipmentTakecareDetailBaseService equipmentTakecareDetailBaseService; |
| | | |
| | | |
| | | |
| | |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<EquipmentTakecareDetail> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = equipmentTakecareDetailBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(EquipmentTakecareDetail.class, pageQuery.getSearchParams())); |
| | | List<EquipmentTakecareDetailDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), EquipmentTakecareDetailDto.class); |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<EquipmentTakecareDetail> queryAll(EquipmentTakecareDetailQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentTakecareDetail.class, criteria)); |
| | | return equipmentTakecareDetailBaseService.queryAll(criteria); |
| | | } |
| | | } |
| | |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentTakecareStardardDetailRepository; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentTakecareStardardDetail; |
| | | import com.gkhy.safePlatform.equipment.service.EquipmentTakecareStardardDetailService; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.EquipmentTakecareStardardDetailBaseService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | * @since 2022-07-19 15:22:05 |
| | | */ |
| | | @Service("equipmentTakecareStardardDetailService") |
| | | public class EquipmentTakecareStardardDetailServiceImpl extends ServiceImpl<EquipmentTakecareStardardDetailRepository, EquipmentTakecareStardardDetail> implements EquipmentTakecareStardardDetailService { |
| | | public class EquipmentTakecareStardardDetailServiceImpl implements EquipmentTakecareStardardDetailService { |
| | | |
| | | @Autowired |
| | | private EquipmentTakecareStardardDetailRepository equipmentTakecareStardardDetailRepository; |
| | | private EquipmentTakecareStardardDetailBaseService equipmentTakecareStardardDetailBaseService; |
| | | |
| | | |
| | | |
| | |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<EquipmentTakecareStardardDetail> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = equipmentTakecareStardardDetailBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(EquipmentTakecareStardardDetail.class, pageQuery.getSearchParams())); |
| | | List<EquipmentTakecareStardardDetailDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), EquipmentTakecareStardardDetailDto.class); |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<EquipmentTakecareStardardDetail> queryAll(EquipmentTakecareStardardDetailQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentTakecareStardardDetail.class, criteria)); |
| | | return equipmentTakecareStardardDetailBaseService.queryAll(criteria); |
| | | } |
| | | } |
| | |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentTestDetailRepository; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentTestDetail; |
| | | import com.gkhy.safePlatform.equipment.service.EquipmentTestDetailService; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.EquipmentTestDetailBaseService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | * @since 2022-07-19 15:08:23 |
| | | */ |
| | | @Service("equipmentTestDetailService") |
| | | public class EquipmentTestDetailServiceImpl extends ServiceImpl<EquipmentTestDetailRepository, EquipmentTestDetail> implements EquipmentTestDetailService { |
| | | public class EquipmentTestDetailServiceImpl implements EquipmentTestDetailService { |
| | | |
| | | @Autowired |
| | | private EquipmentTestDetailRepository equipmentTestDetailRepository; |
| | | private EquipmentTestDetailBaseService equipmentTestDetailBaseService; |
| | | |
| | | |
| | | |
| | |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<EquipmentTestDetail> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = equipmentTestDetailBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(EquipmentTestDetail.class, pageQuery.getSearchParams())); |
| | | List<EquipmentTestDetailDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), EquipmentTestDetailDto.class); |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<EquipmentTestDetail> queryAll(EquipmentTestDetailQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentTestDetail.class, criteria)); |
| | | return equipmentTestDetailBaseService.queryAll(criteria); |
| | | } |
| | | } |
| | |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.equipment.entity.EquipmentTypeMng; |
| | | import com.gkhy.safePlatform.equipment.excepiton.EquipmentException; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.EquipmentTypeMngQueryCriteria; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentTypeMngDto; |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentTypeMngRepository; |
| | | import com.gkhy.safePlatform.equipment.service.EquipmentTypeMngService; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.EquipmentTypeMngBaseService; |
| | | import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | * @since 2022-07-19 08:35:02 |
| | | */ |
| | | @Service("equipmentTypeMngService") |
| | | public class EquipmentTypeMngServiceImpl extends ServiceImpl<EquipmentTypeMngRepository, EquipmentTypeMng> implements EquipmentTypeMngService { |
| | | public class EquipmentTypeMngServiceImpl implements EquipmentTypeMngService { |
| | | |
| | | @Autowired |
| | | private EquipmentTypeMngRepository equipmentTypeMngRepository; |
| | | private EquipmentTypeMngBaseService equipmentTypeMngBaseService; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public ResultVO queryAll(PageQuery<EquipmentTypeMngQueryCriteria> pageQuery) { |
| | | PageUtils.checkCheck(pageQuery); |
| | | |
| | | Long pageIndex = pageQuery.getPageIndex(); |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | Page<EquipmentTypeMng> page = new Page<>(pageIndex, pageSize); |
| | | page.addOrder(OrderItem.asc("sort_num")); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = equipmentTypeMngBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(EquipmentTypeMng.class, pageQuery.getSearchParams())); |
| | | List<EquipmentTypeMngDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), EquipmentTypeMngDto.class); |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<EquipmentTypeMng> queryAll(EquipmentTypeMngQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentTypeMng.class, criteria).orderBy(true,true,"sort_num")); |
| | | return equipmentTypeMngBaseService.queryAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | return rsList; |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Long[] ids) { |
| | | if(ids == null){ |
| | | throw new EquipmentException(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<EquipmentTypeMng> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | EquipmentTypeMng info = new EquipmentTypeMng(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | equipmentTypeMngBaseService.updateBatchById(delList); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.AccountDepartmentService; |
| | | import com.gkhy.safePlatform.equipment.entity.*; |
| | | import com.gkhy.safePlatform.equipment.excepiton.EquipmentException; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.*; |
| | | import com.gkhy.safePlatform.equipment.model.dto.resp.KeypointEquipmentInfoExcel; |
| | | import com.gkhy.safePlatform.equipment.repository.EquipmentTypeMngRepository; |
| | | import com.gkhy.safePlatform.equipment.repository.KeypointEquipmentInfoRepository; |
| | | import com.gkhy.safePlatform.equipment.service.*; |
| | | import com.gkhy.safePlatform.equipment.service.baseService.*; |
| | | import com.gkhy.safePlatform.equipment.utils.DateUtils; |
| | | import com.gkhy.safePlatform.equipment.utils.poihelper.ExcelLogs; |
| | | import com.gkhy.safePlatform.equipment.utils.poihelper.ExcelUtil; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.dubbo.config.annotation.DubboReference; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.Serializable; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | * @since 2022-07-19 13:36:27 |
| | | */ |
| | | @Service("keypointEquipmentInfoService") |
| | | public class KeypointEquipmentInfoServiceImpl extends ServiceImpl<KeypointEquipmentInfoRepository, KeypointEquipmentInfo> implements KeypointEquipmentInfoService { |
| | | public class KeypointEquipmentInfoServiceImpl implements KeypointEquipmentInfoService { |
| | | |
| | | @Autowired |
| | | private KeypointEquipmentInfoRepository keypointEquipmentInfoRepository; |
| | | private KeypointEquipmentInfoBaseService keypointEquipmentInfoBaseService; |
| | | |
| | | |
| | | @Autowired |
| | | private EquipmentTakecareDetailService equipmentTakecareDetailService; |
| | | private EquipmentTakecareDetailBaseService equipmentTakecareDetailBaseService; |
| | | |
| | | @Autowired |
| | | private EquipmentTestDetailService equipmentTestDetailService; |
| | | private EquipmentTestDetailBaseService equipmentTestDetailBaseService; |
| | | |
| | | @Autowired |
| | | private EquipmentRepairDetailService equipmentRepairDetailService; |
| | | private EquipmentRepairDetailBaseService equipmentRepairDetailBaseService; |
| | | |
| | | @Autowired |
| | | private EquipmentTakecareStardardDetailService equipmentTakecareStardardDetailService; |
| | | private EquipmentTakecareStardardDetailBaseService equipmentTakecareStardardDetailBaseService; |
| | | |
| | | @Autowired |
| | | private EquipmentCheckStandardDetailService equipmentCheckStandardDetailService; |
| | | private EquipmentCheckStandardDetailBaseService equipmentCheckStandardDetailBaseService; |
| | | |
| | | @DubboReference(check = false) |
| | | private AccountDepartmentService accountDepartmentService; |
| | |
| | | |
| | | @Autowired |
| | | private EquipmentTypeMngRepository equipmentTypeMngRepository; |
| | | |
| | | @Autowired |
| | | public HttpServletResponse response; |
| | | |
| | | @Override |
| | | public ResultVO queryAll(PageQuery<KeypointEquipmentInfoQueryCriteria> pageQuery) { |
| | |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<KeypointEquipmentInfo> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | page = keypointEquipmentInfoBaseService.selectPage(page, |
| | | QueryHelpPlus.getPredicate(KeypointEquipmentInfo.class, pageQuery.getSearchParams())); |
| | | List<KeypointEquipmentInfoDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), KeypointEquipmentInfoDto.class); |
| | | |
| | |
| | | EquipmentTakecareDetailQueryCriteria criteria = new EquipmentTakecareDetailQueryCriteria(); |
| | | criteria.setEquipmentId(f.getId()); |
| | | criteria.setInfoTpe(3); |
| | | List<EquipmentTakecareDetail> takecareDetailList = equipmentTakecareDetailService.queryAll(criteria); |
| | | List<EquipmentTakecareDetail> takecareDetailList = equipmentTakecareDetailBaseService.queryAll(criteria); |
| | | f.setTakecareDetailList(takecareDetailList); |
| | | |
| | | //设备检测 |
| | | EquipmentTestDetailQueryCriteria criteria1 = new EquipmentTestDetailQueryCriteria(); |
| | | criteria1.setEquipmentId(f.getId()); |
| | | criteria1.setInfoTpe(3); |
| | | List<EquipmentTestDetail> checkDetailList = equipmentTestDetailService.queryAll(criteria1); |
| | | List<EquipmentTestDetail> checkDetailList = equipmentTestDetailBaseService.queryAll(criteria1); |
| | | f.setCheckDetailList(checkDetailList); |
| | | |
| | | //设备检查 TODO |
| | |
| | | EquipmentRepairDetailQueryCriteria criteria2 = new EquipmentRepairDetailQueryCriteria(); |
| | | criteria2.setEquipmentId(f.getId()); |
| | | criteria2.setInfoTpe(3); |
| | | List<EquipmentRepairDetail> repairDetailList = equipmentRepairDetailService.queryAll(criteria2); |
| | | List<EquipmentRepairDetail> repairDetailList = equipmentRepairDetailBaseService.queryAll(criteria2); |
| | | f.setRepaireDetailList(repairDetailList); |
| | | |
| | | // --------------------------- 获取设备设施类型管理ID----------------------- |
| | |
| | | |
| | | @Override |
| | | public List<KeypointEquipmentInfo> queryAll(KeypointEquipmentInfoQueryCriteria criteria) { |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(KeypointEquipmentInfo.class, criteria)); |
| | | return keypointEquipmentInfoBaseService.queryAll( criteria); |
| | | } |
| | | |
| | | @Override |
| | | public KeypointEquipmentInfoDto selectOne(Serializable id) { |
| | | KeypointEquipmentInfo keypointEquipmentInfo = baseMapper.selectById(id); |
| | | KeypointEquipmentInfo keypointEquipmentInfo = keypointEquipmentInfoBaseService.getById(id); |
| | | if(keypointEquipmentInfo == null){ |
| | | return null; |
| | | } |
| | |
| | | EquipmentTakecareDetailQueryCriteria criteria = new EquipmentTakecareDetailQueryCriteria(); |
| | | criteria.setEquipmentId(infoDto.getId()); |
| | | criteria.setInfoTpe(3); |
| | | List<EquipmentTakecareDetail> takecareDetailList = equipmentTakecareDetailService.queryAll(criteria); |
| | | List<EquipmentTakecareDetail> takecareDetailList = equipmentTakecareDetailBaseService.queryAll(criteria); |
| | | infoDto.setTakecareDetailList(takecareDetailList); |
| | | |
| | | //设备检测 |
| | | EquipmentTestDetailQueryCriteria criteria1 = new EquipmentTestDetailQueryCriteria(); |
| | | criteria1.setEquipmentId(infoDto.getId()); |
| | | criteria1.setInfoTpe(3); |
| | | List<EquipmentTestDetail> checkDetailList = equipmentTestDetailService.queryAll(criteria1); |
| | | List<EquipmentTestDetail> checkDetailList = equipmentTestDetailBaseService.queryAll(criteria1); |
| | | infoDto.setCheckDetailList(checkDetailList); |
| | | |
| | | //设备检查 TODO |
| | |
| | | EquipmentRepairDetailQueryCriteria criteria2 = new EquipmentRepairDetailQueryCriteria(); |
| | | criteria2.setEquipmentId(infoDto.getId()); |
| | | criteria2.setInfoTpe(3); |
| | | List<EquipmentRepairDetail> repairDetailList = equipmentRepairDetailService.queryAll(criteria2); |
| | | List<EquipmentRepairDetail> repairDetailList = equipmentRepairDetailBaseService.queryAll(criteria2); |
| | | infoDto.setRepaireDetailList(repairDetailList); |
| | | |
| | | //检查标准 |
| | | EquipmentCheckStandardDetailQueryCriteria criteria3 = new EquipmentCheckStandardDetailQueryCriteria(); |
| | | criteria3.setEquipmentId(infoDto.getId()); |
| | | criteria3.setInfoTpe(3); |
| | | List<EquipmentCheckStandardDetail> checkStandardDetailList = equipmentCheckStandardDetailService.queryAll(criteria3); |
| | | List<EquipmentCheckStandardDetail> checkStandardDetailList = equipmentCheckStandardDetailBaseService.queryAll(criteria3); |
| | | infoDto.setCheckStandardeDetailList(checkStandardDetailList); |
| | | |
| | | //保养标准 |
| | | EquipmentTakecareStardardDetailQueryCriteria criteria4 = new EquipmentTakecareStardardDetailQueryCriteria(); |
| | | criteria4.setEquipmentId(infoDto.getId()); |
| | | criteria4.setInfoTpe(3); |
| | | List<EquipmentTakecareStardardDetail> takecareStardardDetailList = equipmentTakecareStardardDetailService.queryAll(criteria4); |
| | | List<EquipmentTakecareStardardDetail> takecareStardardDetailList = equipmentTakecareStardardDetailBaseService.queryAll(criteria4); |
| | | infoDto.setTakecareStardardeDetailList(takecareStardardDetailList); |
| | | |
| | | // --------------------------- 获取部门信息----------------------- |
| | |
| | | KeypointEquipmentInfo equipmentInfo = BeanCopyUtils.copyBean(infoDto, KeypointEquipmentInfo.class); |
| | | //保存主数据 |
| | | if (infoDto.getId() == null) { //新增 |
| | | this.save(equipmentInfo); |
| | | keypointEquipmentInfoBaseService.save(equipmentInfo); |
| | | } else { |
| | | this.update(equipmentInfo,new UpdateWrapper<KeypointEquipmentInfo>().eq("id",infoDto.getId())); |
| | | keypointEquipmentInfoBaseService.update(equipmentInfo,new UpdateWrapper<KeypointEquipmentInfo>().eq("id",infoDto.getId())); |
| | | } |
| | | |
| | | |
| | |
| | | f.setEquipmentId(equipmentInfo.getId()); |
| | | f.setInfoTpe(3); |
| | | }); |
| | | equipmentTakecareDetailService.saveOrUpdateBatch(takecareDetailList); |
| | | equipmentTakecareDetailBaseService.saveOrUpdateBatch(takecareDetailList); |
| | | if(StringUtils.hasText(infoDto.getDelTakecareDetails())){ |
| | | List<Long> idList = Arrays.stream(infoDto.getDelTakecareDetails().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | .collect(Collectors.toList()); |
| | | equipmentTakecareDetailService.removeByIds(idList); |
| | | |
| | | List<EquipmentTakecareDetail> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | EquipmentTakecareDetail info = new EquipmentTakecareDetail(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | equipmentTakecareDetailBaseService.updateBatchById(delList); |
| | | } |
| | | |
| | | //保存设备检测 |
| | |
| | | f.setEquipmentId(equipmentInfo.getId()); |
| | | f.setInfoTpe(3); |
| | | }); |
| | | equipmentTestDetailService.saveOrUpdateBatch(testDetailList); |
| | | equipmentTestDetailBaseService.saveOrUpdateBatch(testDetailList); |
| | | if(StringUtils.hasText(infoDto.getDelTestDetails())){ |
| | | List<Long> idList = Arrays.stream(infoDto.getDelTestDetails().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | .collect(Collectors.toList()); |
| | | equipmentTestDetailService.removeByIds(idList); |
| | | List<EquipmentTestDetail> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | EquipmentTestDetail info = new EquipmentTestDetail(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | equipmentTestDetailBaseService.updateBatchById(delList); |
| | | |
| | | } |
| | | //设备检查 TODO |
| | | |
| | |
| | | f.setEquipmentId(equipmentInfo.getId()); |
| | | f.setInfoTpe(3); |
| | | }); |
| | | equipmentRepairDetailService.saveOrUpdateBatch(repaireDetailList); |
| | | equipmentRepairDetailBaseService.saveOrUpdateBatch(repaireDetailList); |
| | | if(StringUtils.hasText(infoDto.getDelRepaireDetails())){ |
| | | List<Long> idList = Arrays.stream(infoDto.getDelRepaireDetails().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | .collect(Collectors.toList()); |
| | | equipmentRepairDetailService.removeByIds(idList); |
| | | List<EquipmentRepairDetail> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | EquipmentRepairDetail info = new EquipmentRepairDetail(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | equipmentRepairDetailBaseService.updateBatchById(delList); |
| | | |
| | | } |
| | | //保存检查标准 |
| | | List<EquipmentCheckStandardDetail> checkStandardeDetailList = infoDto.getCheckStandardeDetailList(); |
| | |
| | | f.setEquipmentId(equipmentInfo.getId()); |
| | | f.setInfoTpe(3); |
| | | }); |
| | | equipmentCheckStandardDetailService.saveOrUpdateBatch(checkStandardeDetailList); |
| | | equipmentCheckStandardDetailBaseService.saveOrUpdateBatch(checkStandardeDetailList); |
| | | if(StringUtils.hasText(infoDto.getDelCheckStandardeDetails())){ |
| | | List<Long> idList = Arrays.stream(infoDto.getDelCheckStandardeDetails().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | .collect(Collectors.toList()); |
| | | equipmentCheckStandardDetailService.removeByIds(idList); |
| | | List<EquipmentCheckStandardDetail> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | EquipmentCheckStandardDetail info = new EquipmentCheckStandardDetail(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | equipmentCheckStandardDetailBaseService.updateBatchById(delList); |
| | | |
| | | } |
| | | //保存保养标准 |
| | | List<EquipmentTakecareStardardDetail> takecareStardardeDetailList = infoDto.getTakecareStardardeDetailList(); |
| | |
| | | f.setEquipmentId(equipmentInfo.getId()); |
| | | f.setInfoTpe(3); |
| | | }); |
| | | equipmentTakecareStardardDetailService.saveOrUpdateBatch(takecareStardardeDetailList); |
| | | equipmentTakecareStardardDetailBaseService.saveOrUpdateBatch(takecareStardardeDetailList); |
| | | if(StringUtils.hasText(infoDto.getDelTakecareStardardeDetails())){ |
| | | List<Long> idList = Arrays.stream(infoDto.getDelTakecareStardardeDetails().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | .collect(Collectors.toList()); |
| | | equipmentTakecareStardardDetailService.removeByIds(idList); |
| | | List<EquipmentTakecareStardardDetail> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | EquipmentTakecareStardardDetail info = new EquipmentTakecareStardardDetail(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | equipmentTakecareStardardDetailBaseService.updateBatchById(delList); |
| | | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void importData(MultipartFile file) throws IOException { |
| | | String contentType = file.getContentType(); |
| | | if(!"application/vnd.ms-excel".equals(contentType) |
| | | && !"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet".equals(contentType)) { |
| | | throw new EquipmentException("上传的excel格式错误"); |
| | | } |
| | | |
| | | Collection<KeypointEquipmentInfoImportExcel> importExcel = ExcelUtil.importExcel(KeypointEquipmentInfoImportExcel.class, file.getInputStream(), "yyyy-MM-dd HH:mm:ss", new ExcelLogs() , 0); |
| | | |
| | | if (CollectionUtils.isEmpty(importExcel)) { |
| | | return ; |
| | | } |
| | | |
| | | List<KeypointEquipmentInfo> respList = BeanCopyUtils.copyBeanList((List<KeypointEquipmentInfoImportExcel>)importExcel, KeypointEquipmentInfo.class); |
| | | |
| | | keypointEquipmentInfoBaseService.saveBatch(respList); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Long[] ids) { |
| | | if(ids == null){ |
| | | throw new EquipmentException(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | |
| | | List<KeypointEquipmentInfo> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | KeypointEquipmentInfo info = new KeypointEquipmentInfo(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | keypointEquipmentInfoBaseService.updateBatchById(delList); |
| | | } |
| | | |
| | | @Override |
| | | public void exportTemplate() throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","类型/类别外键 "); |
| | | map.put("2","装置/部位名称"); |
| | | map.put("3","所属单位部门/外键"); |
| | | map.put("4","具体位置"); |
| | | map.put("5","负责人姓名"); |
| | | map.put("6","联系人/外键"); |
| | | map.put("7","录入人/外键"); |
| | | map.put("8","责任人/外键"); |
| | | map.put("9","装置部位分类 1:关键装置 2:重点部位"); |
| | | map.put("10","检查周期"); |
| | | map.put("11","应急预案/外键"); |
| | | map.put("12","主要危险有害因素"); |
| | | map.put("13","易导致风险"); |
| | | map.put("14","应急处置措施"); |
| | | map.put("15","现场图片地址路径"); |
| | | |
| | | |
| | | String fileName = URLEncoder.encode("重点监管装置设备数据导入模板.xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | ExcelUtil.exportExcel(map,new ArrayList<>() , response.getOutputStream()); |
| | | response.getOutputStream().close(); |
| | | } |
| | | |
| | | @Override |
| | | public void exportData(KeypointEquipmentInfoQueryCriteria queryCriteria) throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("0","ID"); |
| | | map.put("1","类型/类别外键"); |
| | | map.put("2","装置/部位名称"); |
| | | map.put("3","所属单位部门/外键"); |
| | | map.put("4","具体位置"); |
| | | map.put("5","负责人姓名"); |
| | | map.put("6","联系人/外键"); |
| | | map.put("7","录入人/外键"); |
| | | map.put("8","责任人/外键"); |
| | | map.put("9","装置部位分类 1:关键装置 2:重点部位"); |
| | | map.put("10","检查周期"); |
| | | map.put("11","应急预案/外键"); |
| | | map.put("12","主要危险有害因素"); |
| | | map.put("13","易导致风险"); |
| | | map.put("14","应急处置措施"); |
| | | map.put("15","现场图片地址路径"); |
| | | |
| | | String key = DateUtils.date2String(new Date(), DateUtils.PATTERN_ALLTIME_NOSIGN) ; |
| | | String fileName = URLEncoder.encode("重点监管装置设备"+key+".xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | |
| | | List<KeypointEquipmentInfoExcel> respList = BeanCopyUtils.copyBeanList(this.queryAll(queryCriteria), KeypointEquipmentInfoExcel.class); |
| | | |
| | | ExcelUtil.exportExcel(map,respList , response.getOutputStream(),DateUtils.PATTERN_STANDARD); |
| | | response.getOutputStream().close(); |
| | | } |
| | | } |
| | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.examineMngService.removeByIds(idList); |
| | | |
| | | List<ExamineMng> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | ExamineMng info = new ExamineMng(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.examineMngService.updateBatchById(delList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineItem; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineTemplate; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineTemplateQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineTemplateSaveOrUpdate; |
| | | import com.gkhy.safePlatform.targetDuty.service.ExamineTemplateService; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.examineTemplateService.removeByIds(idList); |
| | | |
| | | List<ExamineTemplate> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | ExamineTemplate info = new ExamineTemplate(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.examineTemplateService.updateBatchById(delList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.rewardPunishmentDetailService.removeByIds(idList); |
| | | |
| | | List<RewardPunishmentDetail> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | RewardPunishmentDetail info = new RewardPunishmentDetail(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.rewardPunishmentDetailService.updateBatchById(delList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.rewardPunishmentStandardService.removeByIds(idList); |
| | | |
| | | List<RewardPunishmentStandard> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | RewardPunishmentStandard info = new RewardPunishmentStandard(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.rewardPunishmentStandardService.updateBatchById(delList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.targetDutySummaryService.removeByIds(idList); |
| | | |
| | | List<TargetDutySummary> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetDutySummary info = new TargetDutySummary(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.targetDutySummaryService.updateBatchById(delList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDutyWorkApproveQueryCriteria; |
| | | |
| | | import java.sql.Timestamp; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.stream.Collectors; |
| | |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.targetDutyWorkApproveService.removeByIds(idList); |
| | | |
| | | List<TargetDutyWorkApprove> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetDutyWorkApprove info = new TargetDutyWorkApprove(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.targetDutyWorkApproveService.updateBatchById(delList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | package com.gkhy.safePlatform.targetDuty.controller; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | |
| | | |
| | |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.targetDutyfileInfoService.removeByIds(idList); |
| | | |
| | | List<TargetDutyfileInfo> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetDutyfileInfo info = new TargetDutyfileInfo(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.targetDutyfileInfoService.updateBatchById(delList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.targetExamineService.removeByIds(idList); |
| | | |
| | | List<TargetExamine> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetExamine info = new TargetExamine(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.targetExamineService.updateBatchById(delList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.targetMngService.queryAll(pageQuery); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | //删除关联表数据 |
| | | this.targetDivideDetailService.remove(new QueryWrapper<TargetDivideDetail>().in("target_id",idList)); |
| | | UpdateWrapper<TargetDivideDetail> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.in("target_id",idList); |
| | | TargetDivideDetail detail = new TargetDivideDetail(); |
| | | detail.setDelFlag(1); |
| | | this.targetDivideDetailService.update(detail,updateWrapper); |
| | | |
| | | this.targetMngService.removeByIds(idList); |
| | | List<TargetMng> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetMng info = new TargetMng(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.targetMngService.updateBatchById(delList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | |
| | | System.out.println(JSONObject.toJSONString(mng)); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetTypeQueryCriteria; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.stream.Collectors; |
| | | import javax.annotation.Resource; |
| | |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.targetTypeService.removeByIds(idList); |
| | | |
| | | List<TargetType> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetType info = new TargetType(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.targetTypeService.updateBatchById(delList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * 绩效考核项目(ExamineItem)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 11:01:38 |
| | | * @since 2022-08-29 08:41:36 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("examine_item") |
| | |
| | | } |
| | | |
| | | //绩效考核模板ID/外键 |
| | | private Long examineTemplateId; |
| | | private Long examineTemplateId; |
| | | |
| | | public Long getExamineTemplateId() { |
| | | return examineTemplateId; |
| | |
| | | this.examineTemplateId = examineTemplateId; |
| | | } |
| | | //类型 |
| | | private String itemType; |
| | | private String itemType; |
| | | |
| | | public String getItemType() { |
| | | return itemType; |
| | |
| | | this.itemType = itemType; |
| | | } |
| | | //考核项目 |
| | | private String itemDetail; |
| | | private String itemDetail; |
| | | |
| | | public String getItemDetail() { |
| | | return itemDetail; |
| | |
| | | this.itemDetail = itemDetail; |
| | | } |
| | | //考核内容 |
| | | private String content; |
| | | private String content; |
| | | |
| | | public String getContent() { |
| | | return content; |
| | |
| | | this.content = content; |
| | | } |
| | | //评定标准 |
| | | private String judgeStandard; |
| | | private String judgeStandard; |
| | | |
| | | public String getJudgeStandard() { |
| | | return judgeStandard; |
| | |
| | | this.judgeStandard = judgeStandard; |
| | | } |
| | | //考核说明 |
| | | private String memo; |
| | | private String memo; |
| | | |
| | | public String getMemo() { |
| | | return memo; |
| | |
| | | public void setMemo(String memo) { |
| | | this.memo = memo; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.gkhy.safePlatform.targetDuty.entity; |
| | | |
| | | import java.sql.Timestamp; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.gkhy.safePlatform.targetDuty.entity.BaseDomain; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * 绩效考核管理-安全考核管理(ExamineMng)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-03 10:05:37 |
| | | * @since 2022-08-29 08:41:36 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("examine_mng") |
| | |
| | | } |
| | | |
| | | //绩效考核模板ID/外键 |
| | | private Long examineTemplateId; |
| | | private Long examineTemplateId; |
| | | |
| | | public Long getExamineTemplateId() { |
| | | return examineTemplateId; |
| | |
| | | this.examineTemplateId = examineTemplateId; |
| | | } |
| | | //考核标题 |
| | | private String title; |
| | | private String title; |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | |
| | | this.title = title; |
| | | } |
| | | //考核项目 |
| | | private String itemDetail; |
| | | private String itemDetail; |
| | | |
| | | public String getItemDetail() { |
| | | return itemDetail; |
| | |
| | | this.itemDetail = itemDetail; |
| | | } |
| | | //考核日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp examineDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp examineDate; |
| | | |
| | | public Timestamp getExamineDate() { |
| | | return examineDate; |
| | |
| | | this.examineDate = examineDate; |
| | | } |
| | | //总分 |
| | | private String examineTotalNumber; |
| | | private String examineTotalNumber; |
| | | |
| | | public String getExamineTotalNumber() { |
| | | return examineTotalNumber; |
| | |
| | | this.examineTotalNumber = examineTotalNumber; |
| | | } |
| | | //考核说明 |
| | | private String memo; |
| | | private String memo; |
| | | |
| | | public String getMemo() { |
| | | return memo; |
| | |
| | | this.memo = memo; |
| | | } |
| | | //考核人ID/外键 |
| | | private Long examinePersonId; |
| | | private Long examinePersonId; |
| | | |
| | | public Long getExaminePersonId() { |
| | | return examinePersonId; |
| | |
| | | this.examinePersonId = examinePersonId; |
| | | } |
| | | //考核人名称 |
| | | private String examinePersonName; |
| | | private String examinePersonName; |
| | | |
| | | public String getExaminePersonName() { |
| | | return examinePersonName; |
| | |
| | | this.examinePersonName = examinePersonName; |
| | | } |
| | | //被考核人ID/外键(可能有多个,用逗号隔开) |
| | | private String beExaminedPersonId; |
| | | private String beExaminedPersonId; |
| | | |
| | | public String getBeExaminedPersonId() { |
| | | return beExaminedPersonId; |
| | |
| | | public void setBeExaminedPersonId(String beExaminedPersonId) { |
| | | this.beExaminedPersonId = beExaminedPersonId; |
| | | } |
| | | //被考核人名称 |
| | | private String beExaminedPersonName; |
| | | //被考核人名称(可能有多个,用逗号隔开) |
| | | private String beExaminedPersonName; |
| | | |
| | | public String getBeExaminedPersonName() { |
| | | return beExaminedPersonName; |
| | |
| | | this.beExaminedPersonName = beExaminedPersonName; |
| | | } |
| | | //考核部门ID/外键(可能有多个,用逗号隔开) |
| | | private Long examineDepartmentId; |
| | | private Long examineDepartmentId; |
| | | |
| | | public Long getExamineDepartmentId() { |
| | | return examineDepartmentId; |
| | |
| | | this.examineDepartmentId = examineDepartmentId; |
| | | } |
| | | //被考核部门ID/外键 |
| | | private Long beExaminedDepartmentId; |
| | | private Long beExaminedDepartmentId; |
| | | |
| | | public Long getBeExaminedDepartmentId() { |
| | | return beExaminedDepartmentId; |
| | |
| | | this.beExaminedDepartmentId = beExaminedDepartmentId; |
| | | } |
| | | //附件 |
| | | private String extraFile; |
| | | private String extraFile; |
| | | |
| | | public String getExtraFile() { |
| | | return extraFile; |
| | |
| | | this.extraFile = extraFile; |
| | | } |
| | | //各个考核项目的具体得分,json格式。 |
| | | private String numberDetailJson; |
| | | private String numberDetailJson; |
| | | |
| | | public String getNumberDetailJson() { |
| | | return numberDetailJson; |
| | |
| | | public void setNumberDetailJson(String numberDetailJson) { |
| | | this.numberDetailJson = numberDetailJson; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.gkhy.safePlatform.targetDuty.entity; |
| | | |
| | | import java.sql.Timestamp; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.gkhy.safePlatform.targetDuty.entity.BaseDomain; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * 绩效考核管理-绩效考核标准(ExamineTemplate)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-03 09:50:44 |
| | | * @since 2022-08-29 08:41:36 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("examine_template") |
| | |
| | | } |
| | | |
| | | //标准标题 |
| | | private String title; |
| | | private String title; |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | |
| | | this.title = title; |
| | | } |
| | | //适用范围 |
| | | private String applyRange; |
| | | private String applyRange; |
| | | |
| | | public String getApplyRange() { |
| | | return applyRange; |
| | |
| | | this.applyRange = applyRange; |
| | | } |
| | | //模板分类编码 |
| | | private String templateCode; |
| | | private String templateCode; |
| | | |
| | | public String getTemplateCode() { |
| | | return templateCode; |
| | |
| | | this.templateCode = templateCode; |
| | | } |
| | | //合格分数 |
| | | private String acceptanceNumber; |
| | | private String acceptanceNumber; |
| | | |
| | | public String getAcceptanceNumber() { |
| | | return acceptanceNumber; |
| | |
| | | this.acceptanceNumber = acceptanceNumber; |
| | | } |
| | | //备注信息 |
| | | private String memo; |
| | | private String memo; |
| | | |
| | | public String getMemo() { |
| | | return memo; |
| | |
| | | this.memo = memo; |
| | | } |
| | | //设定人/外键 |
| | | private Long setPersonId; |
| | | private Long setPersonId; |
| | | |
| | | public Long getSetPersonId() { |
| | | return setPersonId; |
| | |
| | | this.setPersonId = setPersonId; |
| | | } |
| | | //设定人名称 |
| | | private String setPersonName; |
| | | private String setPersonName; |
| | | |
| | | public String getSetPersonName() { |
| | | return setPersonName; |
| | |
| | | this.setPersonName = setPersonName; |
| | | } |
| | | //设定人部门ID/外键 |
| | | private Long setPersonDepartmentId; |
| | | private Long setPersonDepartmentId; |
| | | |
| | | public Long getSetPersonDepartmentId() { |
| | | return setPersonDepartmentId; |
| | |
| | | public void setSetPersonDepartmentId(Long setPersonDepartmentId) { |
| | | this.setPersonDepartmentId = setPersonDepartmentId; |
| | | } |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp setTimem; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp setTimem; |
| | | |
| | | public Timestamp getSetTimem() { |
| | | return setTimem; |
| | |
| | | public void setSetTimem(Timestamp setTimem) { |
| | | this.setTimem = setTimem; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * 奖惩记录(RewardPunishmentDetail)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-03 10:37:54 |
| | | * @since 2022-08-29 08:41:36 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("reward_punishment_detail") |
| | |
| | | } |
| | | |
| | | //奖惩标准/外键 |
| | | private Long rewardPunishmentStandardId; |
| | | private Long rewardPunishmentStandardId; |
| | | |
| | | public Long getRewardPunishmentStandardId() { |
| | | return rewardPunishmentStandardId; |
| | |
| | | this.rewardPunishmentStandardId = rewardPunishmentStandardId; |
| | | } |
| | | //员工ID(多个用逗号隔开) |
| | | private String personId; |
| | | private String personId; |
| | | |
| | | public String getPersonId() { |
| | | return personId; |
| | |
| | | this.personId = personId; |
| | | } |
| | | //员工名(多个用逗号隔开) |
| | | private String personName; |
| | | private String personName; |
| | | |
| | | public String getPersonName() { |
| | | return personName; |
| | |
| | | this.personName = personName; |
| | | } |
| | | //备注信息 |
| | | private String memo; |
| | | private String memo; |
| | | |
| | | public String getMemo() { |
| | | return memo; |
| | |
| | | public void setMemo(String memo) { |
| | | this.memo = memo; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * (RewardPunishmentStandard)表实体类 |
| | | * 奖惩目标设定(RewardPunishmentStandard)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 10:20:10 |
| | | * @since 2022-08-29 08:41:36 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("reward_punishment_standard") |
| | |
| | | } |
| | | |
| | | //奖惩类型 1:奖励 2:惩罚 |
| | | private Integer standardType; |
| | | private Integer standardType; |
| | | |
| | | public Integer getStandardType() { |
| | | return standardType; |
| | |
| | | this.standardType = standardType; |
| | | } |
| | | //奖惩内容 |
| | | private String content; |
| | | private String content; |
| | | |
| | | public String getContent() { |
| | | return content; |
| | |
| | | this.content = content; |
| | | } |
| | | //奖惩名称 |
| | | private String qName; |
| | | private String qName; |
| | | |
| | | public String getqName() { |
| | | return qName; |
| | |
| | | } |
| | | |
| | | //依据 |
| | | private String reason; |
| | | private String reason; |
| | | |
| | | public String getReason() { |
| | | return reason; |
| | |
| | | this.reason = reason; |
| | | } |
| | | //备注信息 |
| | | private String memo; |
| | | private String memo; |
| | | |
| | | public String getMemo() { |
| | | return memo; |
| | |
| | | public void setMemo(String memo) { |
| | | this.memo = memo; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | * 目标指标分解详情(TargetDivideDetail)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-17 11:22:35 |
| | | * @since 2022-08-29 08:41:36 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("target_divide_detail") |
| | |
| | | public void setPlanDesc(String planDesc) { |
| | | this.planDesc = planDesc; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * (TargetDutySummary)表实体类 |
| | | * 目标汇总(TargetDutySummary)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-27 15:33:30 |
| | | * @since 2022-08-29 08:41:36 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("target_duty_summary") |
| | |
| | | } |
| | | |
| | | //年度 |
| | | private String year; |
| | | private String year; |
| | | |
| | | public String getYear() { |
| | | return year; |
| | |
| | | this.year = year; |
| | | } |
| | | //责任部门/外键 |
| | | private Long departmentId; |
| | | private Long departmentId; |
| | | |
| | | public Long getDepartmentId() { |
| | | return departmentId; |
| | |
| | | this.departmentId = departmentId; |
| | | } |
| | | //安全目标指标 |
| | | private String targetValue; |
| | | private String targetValue; |
| | | |
| | | public String getTargetValue() { |
| | | return targetValue; |
| | |
| | | this.targetValue = targetValue; |
| | | } |
| | | //考核指标 |
| | | private String examineValue; |
| | | private String examineValue; |
| | | |
| | | public String getExamineValue() { |
| | | return examineValue; |
| | |
| | | this.examineValue = examineValue; |
| | | } |
| | | //考核指标 1:合格 2:不合格 |
| | | private Integer examineResult; |
| | | private Integer examineResult; |
| | | |
| | | public Integer getExamineResult() { |
| | | return examineResult; |
| | |
| | | this.examineResult = examineResult; |
| | | } |
| | | //月份 |
| | | private String yiYue; |
| | | private String yiYue; |
| | | |
| | | public String getYiYue() { |
| | | return yiYue; |
| | |
| | | public void setYiYue(String yiYue) { |
| | | this.yiYue = yiYue; |
| | | } |
| | | |
| | | private String erYue; |
| | | private String erYue; |
| | | |
| | | public String getErYue() { |
| | | return erYue; |
| | |
| | | public void setErYue(String erYue) { |
| | | this.erYue = erYue; |
| | | } |
| | | |
| | | private String sanYue; |
| | | private String sanYue; |
| | | |
| | | public String getSanYue() { |
| | | return sanYue; |
| | |
| | | public void setSanYue(String sanYue) { |
| | | this.sanYue = sanYue; |
| | | } |
| | | |
| | | private String siYue; |
| | | private String siYue; |
| | | |
| | | public String getSiYue() { |
| | | return siYue; |
| | |
| | | public void setSiYue(String siYue) { |
| | | this.siYue = siYue; |
| | | } |
| | | |
| | | private String wuYue; |
| | | private String wuYue; |
| | | |
| | | public String getWuYue() { |
| | | return wuYue; |
| | |
| | | public void setWuYue(String wuYue) { |
| | | this.wuYue = wuYue; |
| | | } |
| | | |
| | | private String liuYue; |
| | | private String liuYue; |
| | | |
| | | public String getLiuYue() { |
| | | return liuYue; |
| | |
| | | public void setLiuYue(String liuYue) { |
| | | this.liuYue = liuYue; |
| | | } |
| | | |
| | | private String qiYue; |
| | | private String qiYue; |
| | | |
| | | public String getQiYue() { |
| | | return qiYue; |
| | |
| | | public void setQiYue(String qiYue) { |
| | | this.qiYue = qiYue; |
| | | } |
| | | |
| | | private String baYue; |
| | | private String baYue; |
| | | |
| | | public String getBaYue() { |
| | | return baYue; |
| | |
| | | public void setBaYue(String baYue) { |
| | | this.baYue = baYue; |
| | | } |
| | | |
| | | private String jiuYue; |
| | | private String jiuYue; |
| | | |
| | | public String getJiuYue() { |
| | | return jiuYue; |
| | |
| | | public void setJiuYue(String jiuYue) { |
| | | this.jiuYue = jiuYue; |
| | | } |
| | | |
| | | private String shiYue; |
| | | private String shiYue; |
| | | |
| | | public String getShiYue() { |
| | | return shiYue; |
| | |
| | | public void setShiYue(String shiYue) { |
| | | this.shiYue = shiYue; |
| | | } |
| | | |
| | | private String shiyiYue; |
| | | private String shiyiYue; |
| | | |
| | | public String getShiyiYue() { |
| | | return shiyiYue; |
| | |
| | | public void setShiyiYue(String shiyiYue) { |
| | | this.shiyiYue = shiyiYue; |
| | | } |
| | | |
| | | private String shierYue; |
| | | private String shierYue; |
| | | |
| | | public String getShierYue() { |
| | | return shierYue; |
| | |
| | | public void setShierYue(String shierYue) { |
| | | this.shierYue = shierYue; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | * 目标责任书(TargetDutyfileInfo)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-09 11:07:00 |
| | | * @since 2022-08-29 08:44:25 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("target_dutyfile_info") |
| | |
| | | public void setExtraFile(String extraFile) { |
| | | this.extraFile = extraFile; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | * 安全目标考核(TargetExamine)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-18 16:27:12 |
| | | * @since 2022-08-29 08:44:10 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("target_examine") |
| | |
| | | public void setExamineDate(Timestamp examineDate) { |
| | | this.examineDate = examineDate; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | * 目标指标(TargetMng)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-22 11:00:59 |
| | | * @since 2022-08-29 08:41:36 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("target_mng") |
| | | public class TargetMng extends BaseDomain { |
| | | |
| | | |
| | | |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | public Long getId() { |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | //安全目标指标 |
| | | private String qName; |
| | | //安全目标指标 |
| | | private String qName; |
| | | |
| | | public String getqName() { |
| | | return qName; |
| | |
| | | public void setqName(String qName) { |
| | | this.qName = qName; |
| | | } |
| | | //目标指标编号 |
| | | private String indexNum; |
| | | |
| | | //目标指标编号 |
| | | private String indexNum; |
| | | |
| | | public String getIndexNum() { |
| | | return indexNum; |
| | | } |
| | |
| | | public void setIndexNum(String indexNum) { |
| | | this.indexNum = indexNum; |
| | | } |
| | | //年度 |
| | | private String year; |
| | | |
| | | //年度 |
| | | private String year; |
| | | |
| | | public String getYear() { |
| | | return year; |
| | | } |
| | |
| | | public void setYear(String year) { |
| | | this.year = year; |
| | | } |
| | | //指标值 |
| | | private String value; |
| | | |
| | | //指标值 |
| | | private String value; |
| | | |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | //1:大于 2:等于 3:小于 |
| | | private Integer valueSign; |
| | | |
| | | //1:大于 2:等于 3:小于 |
| | | private Integer valueSign; |
| | | |
| | | public Integer getValueSign() { |
| | | return valueSign; |
| | | } |
| | |
| | | public void setValueSign(Integer valueSign) { |
| | | this.valueSign = valueSign; |
| | | } |
| | | //指标级别 1:公司级 2:部门分厂级 3:工段班组级 |
| | | private Integer level; |
| | | |
| | | //指标级别 1:公司级 2:部门分厂级 3:工段班组级 |
| | | private Integer level; |
| | | |
| | | public Integer getLevel() { |
| | | return level; |
| | | } |
| | |
| | | public void setLevel(Integer level) { |
| | | this.level = level; |
| | | } |
| | | //完成期限 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp completeDate; |
| | | |
| | | //完成期限 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp completeDate; |
| | | |
| | | public Timestamp getCompleteDate() { |
| | | return completeDate; |
| | | } |
| | |
| | | public void setCompleteDate(Timestamp completeDate) { |
| | | this.completeDate = completeDate; |
| | | } |
| | | //备注信息 |
| | | private String memo; |
| | | |
| | | //备注信息 |
| | | private String memo; |
| | | |
| | | public String getMemo() { |
| | | return memo; |
| | | } |
| | |
| | | public void setMemo(String memo) { |
| | | this.memo = memo; |
| | | } |
| | | //指标类型 1:年指标 2:月指标 3:半年 4:季度 |
| | | private Integer targetType; |
| | | |
| | | //指标类型 1:年指标 2:月指标 3:半年 4:季度 |
| | | private Integer targetType; |
| | | |
| | | public Integer getTargetType() { |
| | | return targetType; |
| | | } |
| | |
| | | public void setTargetType(Integer targetType) { |
| | | this.targetType = targetType; |
| | | } |
| | | //分解状态 1:已分解 2:未分解 |
| | | private Integer divideStatus; |
| | | |
| | | //分解状态 1:已分解 2:未分解 |
| | | private Integer divideStatus; |
| | | |
| | | public Integer getDivideStatus() { |
| | | return divideStatus; |
| | | } |
| | |
| | | public void setDivideStatus(Integer divideStatus) { |
| | | this.divideStatus = divideStatus; |
| | | } |
| | | //目标制定部门 |
| | | private Long makerDepartmentId; |
| | | |
| | | //目标制定部门 |
| | | private Long makerDepartmentId; |
| | | |
| | | public Long getMakerDepartmentId() { |
| | | return makerDepartmentId; |
| | | } |
| | |
| | | public void setMakerDepartmentId(Long makerDepartmentId) { |
| | | this.makerDepartmentId = makerDepartmentId; |
| | | } |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | } |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | * 目标分类(TargetType)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-08-17 10:26:39 |
| | | * @since 2022-08-29 08:43:13 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("target_type") |
| | |
| | | public void setMemo(String memo) { |
| | | this.memo = memo; |
| | | } |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | private Integer delFlag; |
| | | |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | @Query() |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp updateTime; |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | //考核部门ID/外键 |
| | | @Query() |
| | | private Long examineDepartmentId; |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | //考核部门ID/外键 |
| | | public Long getExamineDepartmentId() { |
| | | return examineDepartmentId; |
| | |
| | | //标准标题 |
| | | @Query(type = Query.Type.INNER_LIKE) |
| | | private String title; |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | //标准标题 |
| | | public String getTitle() { |
| | | return title; |
| | |
| | | //员工 |
| | | @Query() |
| | | private String personId; |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | //员工 |
| | | public String getPersonId() { |
| | | return personId; |
| | |
| | | //奖惩类型 1:奖励 2:惩罚 |
| | | @Query() |
| | | private Integer standardType; |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | //奖惩类型 1:奖励 2:惩罚 |
| | | public Integer getStandardType() { |
| | | return standardType; |
| | |
| | | private Integer divideStatus; |
| | | //关联业务类型 1:目标检查 2:目标上报 |
| | | private Integer relateType; |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | public Integer getRelateType() { |
| | | return relateType; |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Timestamp updateTime; |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | //责任部门/外键 |
| | | @Query() |
| | | private Long departmentId; |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | //年度 |
| | | public String getYear() { |
| | | return year; |
| | |
| | | @Query(type = Query.Type.BETWEEN) |
| | | private List<Timestamp> gmtCreate; |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | public Integer getRelateType() { |
| | | return relateType; |
| | | } |
| | |
| | | @Query() |
| | | private Long jobId; |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | //岗位号/外键 |
| | | public Long getJobId() { |
| | | return jobId; |
| | |
| | | @Query() |
| | | private Integer divideStatus; |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | public Integer getDivideStatus() { |
| | | return divideStatus; |
| | | } |
| | |
| | | @Query() |
| | | private Integer divideStatus; |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | public Integer getDivideStatus() { |
| | | return divideStatus; |
| | | } |
| | |
| | | @Query() |
| | | private Timestamp updateTime; |
| | | |
| | | //是否删除 0:未删除 1:删除 |
| | | @Query() |
| | | private Integer delFlag = 0; |
| | | public Integer getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Integer delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | private CommonService commonService; |
| | | |
| | | |
| | | @Override |
| | | @Override |
| | | public ResultVO queryAll(PageQuery<ExamineMngQueryCriteria> pageQuery) { |
| | | Long pageIndex = pageQuery.getPageIndex(); |
| | | Long pageSize = pageQuery.getPageSize(); |
| | |
| | | // --------------------------- 获取部门信息----------------------- |
| | | //收集所用到的部门ID |
| | | Set<Long> collectDepIdSet = new HashSet(); |
| | | respList.forEach(f -> { |
| | | respList.forEach(f->{ |
| | | collectDepIdSet.add(f.getExamineDepartmentId()); |
| | | collectDepIdSet.add(f.getBeExaminedDepartmentId()); |
| | | }); |
| | | //获取部门名集合 |
| | | Map<Long, String> depNameMap = commonService.getDepName(collectDepIdSet); |
| | | Map<Long,String> depNameMap = commonService.getDepName(collectDepIdSet); |
| | | |
| | | respList.forEach(f -> { |
| | | respList.forEach(f->{ |
| | | f.setExamineDepartmentName(depNameMap.get(f.getExamineDepartmentId())); |
| | | f.setBeExaminedDepartmentName(depNameMap.get(f.getBeExaminedDepartmentId())); |
| | | }); |
| | | |
| | | //获取打分明细 |
| | | respList.forEach(dto -> { |
| | | List<CurrentExamineDto> list = JSONObject.parseArray(dto.getNumberDetailJson(), CurrentExamineDto.class); |
| | | respList.forEach(dto->{ |
| | | List<CurrentExamineDto> list = JSONObject.parseArray( dto.getNumberDetailJson(), CurrentExamineDto.class); |
| | | List<Long> idList = list.stream().map(CurrentExamineDto::getId).collect(Collectors.toList()); |
| | | |
| | | if (!idList.isEmpty()) { |
| | | if(!idList.isEmpty()){ |
| | | List<ExamineItem> itemList = examineItemRepository.selectBatchIds(idList); |
| | | Map<Long, ExamineItem> itemMap = itemList.stream().collect( |
| | | Collectors.toMap(ExamineItem::getId, Function.identity(), (k1, k2) -> k1)); |
| | | Map<Long,ExamineItem> itemMap = itemList.stream().collect( |
| | | Collectors.toMap(ExamineItem::getId, Function.identity(),(k1, k2)->k1)); |
| | | |
| | | if (itemMap != null) { |
| | | list.forEach(f -> { |
| | | if(itemMap != null){ |
| | | list.forEach(f->{ |
| | | ExamineItem item = itemMap.get(f.getId()); |
| | | if (item != null) { |
| | | if(item != null){ |
| | | f.setItemDetail(item.getItemDetail()); |
| | | f.setContent(item.getContent()); |
| | | f.setJudgeStandard(item.getJudgeStandard()); |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, page.getPages(), |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | @Override |
| | | public ExamineMngDto selectOne(Serializable id) { |
| | | ExamineMng examineMng = this.getById(id); |
| | | if (examineMng == null) { |
| | | if(examineMng == null){ |
| | | return null; |
| | | } |
| | | |
| | | ExamineMngDto dto = BeanCopyUtils.copyBean(examineMng, ExamineMngDto.class); |
| | | if (!StringUtils.hasText(examineMng.getNumberDetailJson())) { |
| | | if(!StringUtils.hasText(examineMng.getNumberDetailJson())){ |
| | | return dto; |
| | | } |
| | | |
| | | //获取打分明细 |
| | | List<CurrentExamineDto> list = JSONObject.parseArray(examineMng.getNumberDetailJson(), CurrentExamineDto.class); |
| | | List<CurrentExamineDto> list = JSONObject.parseArray( examineMng.getNumberDetailJson(), CurrentExamineDto.class); |
| | | List<Long> idList = list.stream().map(CurrentExamineDto::getId).collect(Collectors.toList()); |
| | | |
| | | |
| | | if (!idList.isEmpty()) { |
| | | if (idList.isEmpty()){ |
| | | List<ExamineItem> itemList = examineItemRepository.selectBatchIds(idList); |
| | | Map<Long, ExamineItem> itemMap = itemList.stream().collect( |
| | | Collectors.toMap(ExamineItem::getId, Function.identity(), (k1, k2) -> k1)); |
| | | Map<Long,ExamineItem> itemMap = itemList.stream().collect( |
| | | Collectors.toMap(ExamineItem::getId, Function.identity(),(k1, k2)->k1)); |
| | | |
| | | if (itemMap != null) { |
| | | list.forEach(f -> { |
| | | if(itemMap != null){ |
| | | list.forEach(f->{ |
| | | ExamineItem item = itemMap.get(f.getId()); |
| | | if (item != null) { |
| | | if(item != null){ |
| | | f.setItemDetail(item.getItemDetail()); |
| | | f.setContent(item.getContent()); |
| | | f.setJudgeStandard(item.getJudgeStandard()); |
| | |
| | | dto.setCurrentExamineDtoList(list); |
| | | |
| | | //获取合格分数 |
| | | ExamineTemplate examineTemplate = examineTemplateRepository.selectOne(new QueryWrapper<ExamineTemplate>().eq("id", examineMng.getExamineTemplateId())); |
| | | if (examineTemplate != null) { |
| | | ExamineTemplate examineTemplate = examineTemplateRepository.selectOne(new QueryWrapper<ExamineTemplate>().eq("id",examineMng.getExamineTemplateId())); |
| | | if(examineTemplate != null){ |
| | | dto.setAcceptanceNumber(examineTemplate.getAcceptanceNumber()); |
| | | dto.setExamineTemplateName(examineTemplate.getTitle()); |
| | | } |
| | |
| | | if(StringUtils.hasText(infoDto.getDelExamineItems())){ |
| | | List<Long> idList = Arrays.stream(infoDto.getDelExamineItems().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | .collect(Collectors.toList()); |
| | | examineItemService.removeByIds(idList); |
| | | List<ExamineItem> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | ExamineItem info = new ExamineItem(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | examineItemService.updateBatchById(delList); |
| | | } |
| | | |
| | | ExamineTemplate examineTemplate = BeanCopyUtils.copyBean(infoDto, ExamineTemplate.class); |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | if(StringUtils.hasText(infoDto.getDelTargetDivideDetails())){ |
| | | List<Long> idList = Arrays.stream(infoDto.getDelTargetDivideDetails().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | .collect(Collectors.toList()); |
| | | this.removeByIds(idList); |
| | | List<TargetDivideDetail> delList = new ArrayList<>(); |
| | | idList.forEach(f->{ |
| | | TargetDivideDetail info = new TargetDivideDetail(); |
| | | info.setDelFlag(1); |
| | | info.setId(f); |
| | | delList.add(info); |
| | | }); |
| | | this.updateBatchById(delList); |
| | | } |
| | | |
| | | //保存主数据 |
| | |
| | | return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetExamine.class, criteria)); |
| | | } |
| | | |
| | | // @Override |
| | | // public void addOrUpdate(TargetExamineSaveOrUpdate infoDto) { |
| | | // |
| | | // |
| | | // if(StringUtils.hasText(infoDto.getDelIds())) { |
| | | // List<Long> idList = Arrays.stream(infoDto.getDelIds().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | // .collect(Collectors.toList()); |
| | | // this.removeByIds(idList); |
| | | // } |
| | | // |
| | | // infoDto.getExamineList().forEach(f->{ |
| | | // f.setTargetId(infoDto.getId()); |
| | | // }); |
| | | // this.saveOrUpdateBatch(infoDto.getExamineList()); |
| | | // } |
| | | } |
| | |
| | | page = baseMapper.selectPage(page, |
| | | QueryHelpPlus.getPredicate(TargetMng.class, pageQuery.getSearchParams())); |
| | | List<TargetMngDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), TargetMngDto.class); |
| | | respList.forEach(dto->{ |
| | | respList.forEach(dto -> { |
| | | // --------------------------- 获取部门信息----------------------- |
| | | dto.setMakerDepartmentName(commonService.getDepName(dto.getMakerDepartmentId())); |
| | | |
| | |
| | | // --------------------------- 获取部门信息----------------------- |
| | | //收集所用到的部门ID |
| | | Set<Long> collectDepIdSet = new HashSet(); |
| | | respList1.forEach(f->{ |
| | | respList1.forEach(f -> { |
| | | collectDepIdSet.add(f.getDutyDepartmentId()); |
| | | collectDepIdSet.add(f.getMakerDepartmentId()); |
| | | }); |
| | | //获取部门名集合 |
| | | Map<Long, String> depNameMap = commonService.getDepName(collectDepIdSet); |
| | | |
| | | respList1.forEach(f->{ |
| | | respList1.forEach(f -> { |
| | | f.setDutyDepartmentName(depNameMap.get(f.getDutyDepartmentId())); |
| | | f.setMakerDepartmentName(depNameMap.get(f.getMakerDepartmentId())); |
| | | }); |
| | |
| | | // --------------------------- 获取目标分类名称----------------------- |
| | | //收集所用到的目标分类ID |
| | | Set<Long> collectTypeSet = new HashSet(); |
| | | respList1.forEach(f->{ |
| | | respList1.forEach(f -> { |
| | | collectTypeSet.add(f.getTargetTypeId()); |
| | | }); |
| | | //获取目标分类名集合 |
| | | if(!collectTypeSet.isEmpty()){ |
| | | if (!collectTypeSet.isEmpty()) { |
| | | List<TargetType> typeList = targetTypeRepository.selectBatchIds(collectTypeSet); // TODO |
| | | Map<Long, String> typeNameMap = typeList.stream() |
| | | .collect(Collectors.toMap(TargetType::getId, TargetType::getTypeName,(k1, k2)->k1)); |
| | | .collect(Collectors.toMap(TargetType::getId, TargetType::getTypeName, (k1, k2) -> k1)); |
| | | |
| | | respList1.forEach(f->{ |
| | | respList1.forEach(f -> { |
| | | f.setTargetTypeName(typeNameMap.get(f.getDutyDepartmentId())); |
| | | }); |
| | | } |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize,page.getPages(), |
| | | pageSize, page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | @Override |
| | | public Object selectOne(Serializable id) { |
| | | TargetMng targetMng = baseMapper.selectById(id); |
| | | if(targetMng == null){ |
| | | if (targetMng == null) { |
| | | return null; |
| | | } |
| | | TargetMngDto targetMngDto = BeanCopyUtils.copyBean(targetMng, TargetMngDto.class); |
| | |
| | | // --------------------------- 获取部门信息----------------------- |
| | | //收集所用到的部门ID |
| | | Set<Long> collectDepIdSet = new HashSet(); |
| | | respList.forEach(f->{ |
| | | respList.forEach(f -> { |
| | | collectDepIdSet.add(f.getDutyDepartmentId()); |
| | | collectDepIdSet.add(f.getMakerDepartmentId()); |
| | | }); |
| | | //获取部门名集合 |
| | | Map<Long, String> depNameMap = commonService.getDepName(collectDepIdSet); |
| | | |
| | | respList.forEach(f->{ |
| | | respList.forEach(f -> { |
| | | f.setDutyDepartmentName(depNameMap.get(f.getDutyDepartmentId())); |
| | | f.setMakerDepartmentName(depNameMap.get(f.getMakerDepartmentId())); |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | // --------------------------- 获取考核结果----------------------- |
| | | //收集所用到的分解详情ID |
| | | Set<Long> collectExamResultSet = new HashSet(); |
| | | respList.forEach(f->{ |
| | | respList.forEach(f -> { |
| | | collectExamResultSet.add(f.getId()); |
| | | }); |
| | | //获取核结果集合 |
| | | if(!collectExamResultSet.isEmpty()){ |
| | | List<TargetExamine> typeList = targetExamineRepository.selectList(new QueryWrapper<TargetExamine>().in("target_divide_detail_id",collectExamResultSet)); |
| | | if (!collectExamResultSet.isEmpty()) { |
| | | List<TargetExamine> typeList = targetExamineRepository.selectList(new QueryWrapper<TargetExamine>().in("target_divide_detail_id", collectExamResultSet)); |
| | | Map<Long, TargetExamine> examResultMap = typeList.stream() |
| | | .collect(Collectors.toMap(TargetExamine::getTargetDivideDetailId, Function.identity(),(k1, k2)->k1)); |
| | | .collect(Collectors.toMap(TargetExamine::getTargetDivideDetailId, Function.identity(), (k1, k2) -> k1)); |
| | | |
| | | respList.forEach(f->{ |
| | | respList.forEach(f -> { |
| | | TargetExamine targetExamine = examResultMap.get(f.getId()); |
| | | if(targetExamine != null){ |
| | | if (targetExamine != null) { |
| | | f.setExamineResult(targetExamine.getExamineResult()); |
| | | f.setExamineDate(targetExamine.getExamineDate()); |
| | | f.setExaminePersonId(targetExamine.getExaminePersonId()); |
| | |
| | | List<TargetCheckAndSubmitDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), TargetCheckAndSubmitDto.class); |
| | | |
| | | // 判断审批人 |
| | | respList.forEach(dto->{ |
| | | respList.forEach(dto -> { |
| | | List<TargetDutyWorkApprove> list = targetDutyWorkApproveRepository.selectList( |
| | | new QueryWrapper<TargetDutyWorkApprove>().eq("del_flag",0) |
| | | .eq("relate_type",pageQuery.getSearchParams().getRelateType()) |
| | | .eq("relate_id",dto.getId()) |
| | | new QueryWrapper<TargetDutyWorkApprove>().eq("del_flag", 0) |
| | | .eq("relate_type", pageQuery.getSearchParams().getRelateType()) |
| | | .eq("relate_id", dto.getId()) |
| | | .orderByDesc("sort")); |
| | | |
| | | if (!CollectionUtils.isEmpty(list)) { |
| | |
| | | dto.setApproveStatus(list.get(0).getApproveStatus()); |
| | | dto.setApprovePersonId(list.get(0).getApprovePersonId()); |
| | | // 审批中 判断审批人是否人与当前登录人 |
| | | if (dto.getApproveStatus()!=null && dto.getApproveStatus()==2){ |
| | | if (dto.getApproveStatus() != null && dto.getApproveStatus() == 2) { |
| | | dto.setCheckApprove(dto.getApprovePersonId().equals(uid)); |
| | | } |
| | | } |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize,page.getPages(), |
| | | pageSize, page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | // 查询总数 |
| | | Integer total = 0; |
| | | // 完成数量 |
| | | Integer complete=0; |
| | | Integer complete = 0; |
| | | |
| | | // 查询目标已分解且事件类型对一个的目标 |
| | | List<TargetMng> targetMngList = targetMngRepository.selectList( |
| | | new QueryWrapper<TargetMng>() |
| | | .eq("target_type",criteria.getTargetType()) |
| | | .eq("divide_status",1) |
| | | .eq("del_flag", 0) |
| | | .eq("target_type", criteria.getTargetType()) |
| | | .eq("divide_status", 1) |
| | | ); |
| | | if (!targetMngList.isEmpty()){ |
| | | if (!targetMngList.isEmpty()) { |
| | | total = targetMngList.size(); |
| | | // 查询目标下的所有分解项 |
| | | for (TargetMng targetMng : targetMngList){ |
| | | for (TargetMng targetMng : targetMngList) { |
| | | Boolean completeFlag = true; |
| | | List<TargetDivideDetail> targetDivideDetailList = targetDivideDetailRepository.selectList( |
| | | new QueryWrapper<TargetDivideDetail>() |
| | | .eq("target_id",targetMng.getId()) |
| | | .eq("del_flag", 0) |
| | | .eq("target_id", targetMng.getId()) |
| | | ); |
| | | if (!targetDivideDetailList.isEmpty()){ |
| | | if (!targetDivideDetailList.isEmpty()) { |
| | | // 查询分解项 是否已经审核通过 |
| | | for (TargetDivideDetail targetDivideDetail :targetDivideDetailList){ |
| | | for (TargetDivideDetail targetDivideDetail : targetDivideDetailList) { |
| | | List<TargetExamine> targetExamineList = targetExamineRepository.selectList( |
| | | new QueryWrapper<TargetExamine>() |
| | | .eq("target_divide_detail_id",targetDivideDetail.getId()) |
| | | .eq("examine_result",1) |
| | | .eq("del_flag", 0) |
| | | .eq("target_divide_detail_id", targetDivideDetail.getId()) |
| | | .eq("examine_result", 1) |
| | | ); |
| | | if (targetExamineList.isEmpty()){ |
| | | completeFlag=false; |
| | | if (targetExamineList.isEmpty()) { |
| | | completeFlag = false; |
| | | } |
| | | } |
| | | } |
| | | // 该目标中有未评价的或者不合格的 |
| | | if (completeFlag){ |
| | | if (completeFlag) { |
| | | complete++; |
| | | } |
| | | } |
| | | } |
| | | //未完成数 |
| | | int noComplete = total-complete; |
| | | map.put("total",total+""); |
| | | map.put("noComplete",noComplete+""); |
| | | map.put("complete",complete+""); |
| | | int noComplete = total - complete; |
| | | map.put("total", total + ""); |
| | | map.put("noComplete", noComplete + ""); |
| | | map.put("complete", complete + ""); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, page.getPages(), |
| | | pageSize, |
| | | page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |