Compare commits
	
		
			8 Commits
		
	
	
		
			49a31edad2
			...
			dev
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 92f6a16106 | |||
| 71dba8bb2d | |||
| 1ab49c4178 | |||
| da9cc7cc76 | |||
| 5f51572b68 | |||
| f9edc2d15d | |||
| dd5cb05649 | |||
| 01b4d80adb | 
| @ -39,4 +39,10 @@ public interface RemoteFileService { | |||||||
|  |  | ||||||
|  |  | ||||||
|     void deleteFile(Collection<String> urls); |     void deleteFile(Collection<String> urls); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 通过ossId列表删除 | ||||||
|  |      * @param ossIds | ||||||
|  |      */ | ||||||
|  |     void deleteFileByIds(Collection<Long> ossIds); | ||||||
| } | } | ||||||
|  | |||||||
| @ -56,4 +56,9 @@ public class RemoteFileServiceMock implements RemoteFileService { | |||||||
|         log.warn("服务调用异常 -> 降级处理"); |         log.warn("服务调用异常 -> 降级处理"); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public void deleteFileByIds(Collection<Long> ossIds) { | ||||||
|  |         log.warn("服务调用异常 -> 降级处理"); | ||||||
|  |     } | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -190,4 +190,6 @@ public interface RemoteUserService { | |||||||
|     Map<Long, String> selectPostNamesByIds(List<Long> postIds); |     Map<Long, String> selectPostNamesByIds(List<Long> postIds); | ||||||
|  |  | ||||||
|     RemoteUserVo selectUserByPhonenumber(String phone); |     RemoteUserVo selectUserByPhonenumber(String phone); | ||||||
|  |  | ||||||
|  |     String getPostNameByUserId(Long userId); | ||||||
| } | } | ||||||
|  | |||||||
| @ -29,6 +29,6 @@ mybatis-plus: | |||||||
|       # 逻辑未删除值 |       # 逻辑未删除值 | ||||||
|       logicNotDeleteValue: 0 |       logicNotDeleteValue: 0 | ||||||
|       insertStrategy: NOT_NULL |       insertStrategy: NOT_NULL | ||||||
| #      updateStrategy: NOT_NULL |       updateStrategy: NOT_NULL | ||||||
|       updateStrategy: ALWAYS | #      updateStrategy: ALWAYS | ||||||
|       whereStrategy: NOT_NULL |       whereStrategy: NOT_NULL | ||||||
|  | |||||||
| @ -96,4 +96,13 @@ public class RemoteFileServiceImpl implements RemoteFileService { | |||||||
|             storage.delete(url); |             storage.delete(url); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 通过ossId列表删除 | ||||||
|  |      * @param ossIds | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public void deleteFileByIds(Collection<Long> ossIds) { | ||||||
|  |         sysOssService.deleteWithValidByIds(ossIds,false); | ||||||
|  |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -494,4 +494,9 @@ public class RemoteUserServiceImpl implements RemoteUserService { | |||||||
|         return BeanUtil.copyProperties(sysUserVo, RemoteUserVo.class); |         return BeanUtil.copyProperties(sysUserVo, RemoteUserVo.class); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public String getPostNameByUserId(Long userId) { | ||||||
|  |         return postService.selectPostNameByUserId(userId); | ||||||
|  |     } | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -2,6 +2,7 @@ package org.dromara.system.mapper; | |||||||
|  |  | ||||||
| import com.baomidou.mybatisplus.core.conditions.Wrapper; | import com.baomidou.mybatisplus.core.conditions.Wrapper; | ||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import org.apache.ibatis.annotations.Param; | ||||||
| import org.dromara.common.mybatis.annotation.DataColumn; | import org.dromara.common.mybatis.annotation.DataColumn; | ||||||
| import org.dromara.common.mybatis.annotation.DataPermission; | import org.dromara.common.mybatis.annotation.DataPermission; | ||||||
| import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
| @ -33,4 +34,10 @@ public interface SysPostMapper extends BaseMapperPlus<SysPost, SysPostVo> { | |||||||
|      */ |      */ | ||||||
|     List<SysPostVo> selectPostsByUserId(Long userId); |     List<SysPostVo> selectPostsByUserId(Long userId); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 根据用户id获取岗位名称 | ||||||
|  |      * @param userId | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     String selectPostNameByUserId(@Param("userId") Long userId); | ||||||
| } | } | ||||||
|  | |||||||
| @ -127,4 +127,11 @@ public interface ISysPostService { | |||||||
|      * @return 结果 |      * @return 结果 | ||||||
|      */ |      */ | ||||||
|     int updatePost(SysPostBo bo); |     int updatePost(SysPostBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 根据用户id获取岗位名 | ||||||
|  |      * @param userId | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     String selectPostNameByUserId(Long userId); | ||||||
| } | } | ||||||
|  | |||||||
| @ -249,4 +249,14 @@ public class SysPostServiceImpl implements ISysPostService { | |||||||
|         SysPost post = MapstructUtils.convert(bo, SysPost.class); |         SysPost post = MapstructUtils.convert(bo, SysPost.class); | ||||||
|         return baseMapper.updateById(post); |         return baseMapper.updateById(post); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 根据用户id获取岗位名 | ||||||
|  |      * @param userId | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public String selectPostNameByUserId(Long userId) { | ||||||
|  |         return baseMapper.selectPostNameByUserId(userId); | ||||||
|  |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -14,5 +14,12 @@ | |||||||
|                  left join sys_user u on u.user_id = up.user_id |                  left join sys_user u on u.user_id = up.user_id | ||||||
|         where u.user_id = #{userId} |         where u.user_id = #{userId} | ||||||
|     </select> |     </select> | ||||||
|  |     <select id="selectPostNameByUserId" resultType="java.lang.String"> | ||||||
|  |         select p.post_name | ||||||
|  |         from sys_post p | ||||||
|  |                  left join sys_user_post up on up.post_id = p.post_id | ||||||
|  |                  left join sys_user u on u.user_id = up.user_id | ||||||
|  |         where u.user_id = #{userId} | ||||||
|  |     </select> | ||||||
|  |  | ||||||
| </mapper> | </mapper> | ||||||
|  | |||||||
| @ -92,6 +92,11 @@ | |||||||
|             <groupId>org.dromara</groupId> |             <groupId>org.dromara</groupId> | ||||||
|             <artifactId>ruoyi-common-encrypt</artifactId> |             <artifactId>ruoyi-common-encrypt</artifactId> | ||||||
|         </dependency> |         </dependency> | ||||||
|  | <!--        <dependency>--> | ||||||
|  | <!--            <groupId>org.dromara</groupId>--> | ||||||
|  | <!--            <artifactId>ruoyi-workflow</artifactId>--> | ||||||
|  | <!--            <version>2.4.1</version>--> | ||||||
|  | <!--        </dependency>--> | ||||||
|  |  | ||||||
|     </dependencies> |     </dependencies> | ||||||
|  |  | ||||||
|  | |||||||
| @ -0,0 +1,71 @@ | |||||||
|  | package org.dromara.daping.controller; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import cn.dev33.satoken.annotation.SaCheckPermission; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.dromara.common.core.domain.R; | ||||||
|  | import org.dromara.common.web.core.BaseController; | ||||||
|  | import org.dromara.daping.domain.bo.GinlongBo; | ||||||
|  | import org.dromara.daping.service.IGinlongApiService; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.springframework.web.bind.annotation.GetMapping; | ||||||
|  | import org.springframework.web.bind.annotation.RequestMapping; | ||||||
|  | import org.springframework.web.bind.annotation.RestController; | ||||||
|  |  | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/ginlong/api") | ||||||
|  | public class GinlongApiController extends BaseController { | ||||||
|  |  | ||||||
|  |     private final IGinlongApiService ginlongApiService; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询手续办理清单模板列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("formalities:listOfFormalities:list") | ||||||
|  |     @GetMapping("/getPowerStationOverview") | ||||||
|  |     public R<HashMap<String,Object>> getPowerStationOverview() { | ||||||
|  |         HashMap<String, Object> map = ginlongApiService.getPowerStationOverview(); | ||||||
|  |         return R.ok(map); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询手续办理清单模板列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("formalities:listOfFormalities:list") | ||||||
|  |     @GetMapping("/getInverterListOverview") | ||||||
|  |     public R<HashMap<String,Object>> getInverterListOverview(GinlongBo bo) { | ||||||
|  |         HashMap<String, Object> map = ginlongApiService.getInverterListOverview(bo); | ||||||
|  |         return R.ok(map); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 能源收益分析 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("formalities:listOfFormalities:list") | ||||||
|  |     @GetMapping("/getStationMonthOverview") | ||||||
|  |     public R<HashMap<String,Object>> getStationMonthOverview(GinlongBo bo) { | ||||||
|  |         HashMap<String, Object> map = ginlongApiService.getStationMonthOverview(bo); | ||||||
|  |         return R.ok(map); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 告警信息 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("formalities:listOfFormalities:list") | ||||||
|  |     @GetMapping("/getAlarmListOverview") | ||||||
|  |     public R<List<HashMap<String,Object>>> getAlarmListOverview() { | ||||||
|  |         return R.ok(ginlongApiService.getAlarmListOverview()); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,14 @@ | |||||||
|  | package org.dromara.daping.domain; | ||||||
|  |  | ||||||
|  | import lombok.Data; | ||||||
|  | import org.springframework.boot.context.properties.ConfigurationProperties; | ||||||
|  | import org.springframework.stereotype.Component; | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | @Component  // 注册为Spring Bean | ||||||
|  | @ConfigurationProperties(prefix = "ginlong.api")  // 绑定配置文件中前缀为"ginlong.api"的属性 | ||||||
|  | public class GinlongApiEntity { | ||||||
|  |     private String url; | ||||||
|  |     private String key; | ||||||
|  |     private String secret; | ||||||
|  | } | ||||||
| @ -0,0 +1,38 @@ | |||||||
|  | package org.dromara.daping.domain.bo; | ||||||
|  |  | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import jakarta.validation.constraints.NotBlank; | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 测试单表业务对象 test_demo | ||||||
|  |  * | ||||||
|  |  * @author Lion Li | ||||||
|  |  * @date 2021-07-26 | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | //@EqualsAndHashCode(callSuper = true) | ||||||
|  | public class GinlongBo implements Serializable { | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 年月日 | ||||||
|  |      */ | ||||||
|  |     private Integer type; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 用户id | ||||||
|  |      */ | ||||||
|  |     private String date; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,36 @@ | |||||||
|  | package org.dromara.daping.service; | ||||||
|  |  | ||||||
|  | import org.dromara.daping.domain.bo.GinlongBo; | ||||||
|  |  | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | public interface IGinlongApiService { | ||||||
|  |  | ||||||
|  |     String test(); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询电站数据 | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     HashMap<String, Object> getPowerStationOverview(); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询逆变器数据 | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     HashMap<String, Object> getInverterListOverview(GinlongBo bo); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询能源收益分析 | ||||||
|  |      * @param bo | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     HashMap<String, Object> getStationMonthOverview(GinlongBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询全部设备报警信息 | ||||||
|  |      */ | ||||||
|  |     List<HashMap<String, Object>> getAlarmListOverview(); | ||||||
|  | } | ||||||
| @ -0,0 +1,834 @@ | |||||||
|  | package org.dromara.daping.service.impl; | ||||||
|  |  | ||||||
|  | import cn.hutool.json.JSONArray; | ||||||
|  | import cn.hutool.json.JSONObject; | ||||||
|  | import cn.hutool.json.JSONUtil; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import lombok.extern.slf4j.Slf4j; | ||||||
|  | import lombok.val; | ||||||
|  | import org.dromara.common.core.exception.ServiceException; | ||||||
|  | import org.dromara.common.redis.utils.RedisUtils; | ||||||
|  | import org.dromara.daping.domain.GinlongApiEntity; | ||||||
|  | import org.dromara.daping.domain.bo.GinlongBo; | ||||||
|  | import org.dromara.daping.service.IGinlongApiService; | ||||||
|  | import org.dromara.daping.utils.GinlongApiClient; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.data.redis.core.RedisTemplate; | ||||||
|  | import org.springframework.data.redis.core.StringRedisTemplate; | ||||||
|  | import org.springframework.scheduling.annotation.Scheduled; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
|  | import java.time.LocalDate; | ||||||
|  | import java.time.YearMonth; | ||||||
|  | import java.time.format.DateTimeFormatter; | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @Slf4j | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @Service | ||||||
|  | public class GinlongApiServiceImpl implements IGinlongApiService { | ||||||
|  |  | ||||||
|  |     @Autowired | ||||||
|  |     private GinlongApiClient apiClient; | ||||||
|  |  | ||||||
|  |     @Autowired | ||||||
|  |     private StringRedisTemplate stringRedisTemplate; | ||||||
|  |  | ||||||
|  |     public GinlongApiEntity getGinlongApiEntity(){ | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         GinlongApiEntity apiEntity = new GinlongApiEntity(); | ||||||
|  |         apiEntity.setUrl("https://api.ginlong.com:13333"); | ||||||
|  |         apiEntity.setKey("1300386381676987116"); | ||||||
|  |         apiEntity.setSecret("511045d99416484cb93acc2f16a5c149"); | ||||||
|  |  | ||||||
|  |         return apiEntity; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public String test() { | ||||||
|  | //        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(GinlongApiTest.class); | ||||||
|  |  | ||||||
|  |         // 验证GinlongApiEntity是否正确加载 | ||||||
|  |         GinlongApiEntity apiEntity = new GinlongApiEntity(); | ||||||
|  | //        GinlongApiEntity apiEntity = context.getBean(GinlongApiEntity.class); | ||||||
|  | //        System.out.println("加载的配置信息:"+apiEntity.toString()); | ||||||
|  | //        System.out.println("url: " + apiEntity.getUrl()); | ||||||
|  | //        System.out.println("key: " + apiEntity.getKey()); | ||||||
|  | //        System.out.println("secret: " + apiEntity.getSecret());  // 重点检查是否为null | ||||||
|  |  | ||||||
|  | //        apiEntity.setUrl("https://api.ginlong.com:13333"); | ||||||
|  | //        apiEntity.setKey("1300386381676987116"); | ||||||
|  | //        apiEntity.setSecret("511045d99416484cb93acc2f16a5c149"); | ||||||
|  |  | ||||||
|  |         if (apiEntity.getSecret() == null) { | ||||||
|  |             System.err.println("错误:secret未加载,请检查配置文件!"); | ||||||
|  | //            context.close(); | ||||||
|  |             return ""; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         // 调用API(原有逻辑) | ||||||
|  | //        GinlongApiClient apiClient = context.getBean(GinlongApiClient.class); | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> params = new HashMap<>(); | ||||||
|  |             params.put("pageNo", 1); | ||||||
|  |             params.put("pageSize", 100); | ||||||
|  |             params.put("nmiCode",null); | ||||||
|  |             params.put("idList",new ArrayList<>()); | ||||||
|  |             String s = apiClient.callApi("/v1/api/userStationList", params,apiEntity); | ||||||
|  |             System.out.println("!!!!     " +s); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             e.printStackTrace(); | ||||||
|  |         } finally { | ||||||
|  | //            context.close(); | ||||||
|  |         } | ||||||
|  |         return ""; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取账号下电站列表 | ||||||
|  |      * @param apiEntity | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     public String userStationList(GinlongApiEntity apiEntity){ | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> params = new HashMap<>(); | ||||||
|  |             params.put("pageNo", 1); | ||||||
|  |             params.put("pageSize", 100); | ||||||
|  |             params.put("nmiCode",null); | ||||||
|  |             params.put("idList",new ArrayList<>()); | ||||||
|  |             return apiClient.callApi("/v1/api/userStationList", params,apiEntity); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             throw new ServiceException(e.getMessage()); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取多个电站详情 | ||||||
|  |      */ | ||||||
|  |     public String stationDetailList(GinlongApiEntity apiEntity, List<Long> idList){ | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> params = new HashMap<>(); | ||||||
|  |             params.put("pageNo", 1); | ||||||
|  |             params.put("pageSize", 100); | ||||||
|  |             params.put("idList",idList); | ||||||
|  |             return apiClient.callApi("/v1/api/stationDetailList", params,apiEntity); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             throw new ServiceException(e.getMessage()); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取所有逆变器详情 | ||||||
|  |      */ | ||||||
|  |     public String inverterList(GinlongApiEntity apiEntity){ | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> params = new HashMap<>(); | ||||||
|  |             params.put("pageNo", 1); | ||||||
|  |             params.put("pageSize", 100); | ||||||
|  |             return apiClient.callApi("/v1/api/inverterList", params,apiEntity); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             throw new ServiceException(e.getMessage()); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取账号下设备报警列表 | ||||||
|  |      */ | ||||||
|  |     public String alarmList(GinlongApiEntity apiEntity){ | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> params = new HashMap<>(); | ||||||
|  |             params.put("pageNo", 1); | ||||||
|  |             params.put("pageSize", 100); | ||||||
|  |             return apiClient.callApi("/v1/api/alarmList", params,apiEntity); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             throw new ServiceException(e.getMessage()); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取单台逆变器某月的日数据 | ||||||
|  |      */ | ||||||
|  |     public String inverterMonth(GinlongApiEntity apiEntity, Long id, String date){ | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> params = new HashMap<>(); | ||||||
|  |             params.put("id", id); | ||||||
|  |             params.put("money", "元"); | ||||||
|  |             params.put("month", date); | ||||||
|  |  | ||||||
|  |             return apiClient.callApi("/v1/api/inverterMonth", params,apiEntity); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             throw new ServiceException(e.getMessage()); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |     /** | ||||||
|  |      * 获取单台逆变器某年的月数据 | ||||||
|  |      */ | ||||||
|  |     public String inverterYear(GinlongApiEntity apiEntity, Long id, String date){ | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> params = new HashMap<>(); | ||||||
|  |             params.put("id", id); | ||||||
|  |             params.put("money", "元"); | ||||||
|  |             params.put("year", date); | ||||||
|  |  | ||||||
|  |             return apiClient.callApi("/v1/api/inverterYear", params,apiEntity); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             throw new ServiceException(e.getMessage()); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取单台逆变器某日的实时数据 | ||||||
|  |      */ | ||||||
|  |     public String inverterDay(GinlongApiEntity apiEntity, Long id, String date){ | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> params = new HashMap<>(); | ||||||
|  |             params.put("id", id); | ||||||
|  |             params.put("money", "元"); | ||||||
|  |             params.put("time", date); | ||||||
|  |             params.put("timeZone", 8); | ||||||
|  |  | ||||||
|  |             return apiClient.callApi("/v1/api/inverterDay", params,apiEntity); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             throw new ServiceException(e.getMessage()); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取单个电站某日的实时数据 | ||||||
|  |      */ | ||||||
|  |     public String stationDay(GinlongApiEntity apiEntity, Long id, String date){ | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> params = new HashMap<>(); | ||||||
|  |             params.put("id", id); | ||||||
|  |             params.put("money", "CNY"); | ||||||
|  |             params.put("time", date); | ||||||
|  |             return apiClient.callApi("/v1/api/stationDay", params,apiEntity); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             throw new ServiceException(e.getMessage()); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取单个电站某月的日数据 | ||||||
|  |      */ | ||||||
|  |     public String stationMonth(GinlongApiEntity apiEntity, Long id, String date){ | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> params = new HashMap<>(); | ||||||
|  |             params.put("id", id); | ||||||
|  |             params.put("money", "CNY"); | ||||||
|  |             params.put("month", date); | ||||||
|  |             return apiClient.callApi("/v1/api/stationMonth", params,apiEntity); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             throw new ServiceException(e.getMessage()); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |     /** | ||||||
|  |      * 获取单个电站某年的月数据 | ||||||
|  |      */ | ||||||
|  |     public String stationYear(GinlongApiEntity apiEntity, Long id, String date){ | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> params = new HashMap<>(); | ||||||
|  |             params.put("id", id); | ||||||
|  |             params.put("money", "CNY"); | ||||||
|  |             params.put("year", date); | ||||||
|  |             return apiClient.callApi("/v1/api/stationYear", params,apiEntity); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             throw new ServiceException(e.getMessage()); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | //    /** | ||||||
|  | //     * 获取多个电站某日的实时数据 | ||||||
|  | //     */ | ||||||
|  | //    public String stationDayEnergyList(GinlongApiEntity apiEntity, List<Long> idList, String date){ | ||||||
|  | //        try { | ||||||
|  | //            Map<String, Object> params = new HashMap<>(); | ||||||
|  | //            params.put("idList", idList); | ||||||
|  | //            params.put("time", date); | ||||||
|  | //            return apiClient.callApi("/v1/api/stationDayEnergyList", params,apiEntity); | ||||||
|  | //        } catch (Exception e) { | ||||||
|  | //            throw new ServiceException(e.getMessage()); | ||||||
|  | //        } | ||||||
|  | //    } | ||||||
|  | //    /** | ||||||
|  | //     * 获取多个电站的月数据 | ||||||
|  | //     */ | ||||||
|  | //    public String stationMonthEnergyList(GinlongApiEntity apiEntity, List<Long> idList, String date){ | ||||||
|  | //        try { | ||||||
|  | //            Map<String, Object> params = new HashMap<>(); | ||||||
|  | //            params.put("idList", idList); | ||||||
|  | //            params.put("time", date); | ||||||
|  | //            return apiClient.callApi("/v1/api/stationMonthEnergyList", params,apiEntity); | ||||||
|  | //        } catch (Exception e) { | ||||||
|  | //            throw new ServiceException(e.getMessage()); | ||||||
|  | //        } | ||||||
|  | //    } | ||||||
|  | //    /** | ||||||
|  | //     * 获取多个电站的年数据 | ||||||
|  | //     */ | ||||||
|  | //    public String stationYearEnergyList(GinlongApiEntity apiEntity, List<Long> idList, String date){ | ||||||
|  | //        try { | ||||||
|  | //            Map<String, Object> params = new HashMap<>(); | ||||||
|  | //            params.put("idList", idList); | ||||||
|  | //            params.put("time", date); | ||||||
|  | //            return apiClient.callApi("/v1/api/stationYearEnergyList", params,apiEntity); | ||||||
|  | //        } catch (Exception e) { | ||||||
|  | //            throw new ServiceException(e.getMessage()); | ||||||
|  | //        } | ||||||
|  | //    } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取单个电站详情 | ||||||
|  |      */ | ||||||
|  |     public String stationDetail(GinlongApiEntity apiEntity, Long id){ | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> params = new HashMap<>(); | ||||||
|  |             params.put("id", id); | ||||||
|  |             return apiClient.callApi("/v1/api/stationDetail", params,apiEntity); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             throw new ServiceException(e.getMessage()); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取电站总览数据信息 | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public HashMap<String, Object> getPowerStationOverview() { | ||||||
|  |  | ||||||
|  |         HashMap<String, Object> map = new HashMap<>(); | ||||||
|  |         GinlongApiEntity apiEntity = getGinlongApiEntity(); | ||||||
|  |  | ||||||
|  |         double dayEnergy = 0.0; //今日总发电量 | ||||||
|  |  | ||||||
|  |         List<Long> idList = new ArrayList<>(); | ||||||
|  |         //使用获取账号下电站列表接口获取数据 | ||||||
|  |         String s = userStationList(apiEntity); | ||||||
|  |         String s2 = inverterList(apiEntity); | ||||||
|  |         getInverterList(s2, map); | ||||||
|  |         getUserStationList(s, idList, map); | ||||||
|  |  | ||||||
|  |         //使用获取多个电站详情接口获取数据 | ||||||
|  |         String s1 = stationDetailList(apiEntity, idList); | ||||||
|  | //        System.out.println(s1); | ||||||
|  |         getStationDetailList(s1, dayEnergy, map); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         System.out.println(map); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         return map; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private void getInverterList(String s2, HashMap<String, Object> map) { | ||||||
|  |         JSONObject jsonObject = JSONUtil.parseObj(s2); | ||||||
|  |         JSONObject data = jsonObject.getJSONObject("data"); | ||||||
|  |         JSONObject inverterStatusVo = data.getJSONObject("inverterStatusVo"); | ||||||
|  | //        Object obj = RedisUtils.getCacheObject("health"); | ||||||
|  | //        RedisUtils.getCacheObject() | ||||||
|  | //        String username = redisTemplate.get("username"); | ||||||
|  | //        Double healthOld = redisTemplate.opsForValue().get("health"); | ||||||
|  |         String healthOld = stringRedisTemplate.opsForValue().get("health"); | ||||||
|  |         map.put("healthOld", healthOld != null ? Double.parseDouble(healthOld) : 0.0); | ||||||
|  | //        if (obj != null) { | ||||||
|  | //            double healthOld = Double.parseDouble(String.valueOf(obj)); | ||||||
|  | //            // 使用 value | ||||||
|  | //            map.put("healthOld",healthOld ); | ||||||
|  | //        }else { | ||||||
|  | //            map.put("healthOld",0.0 ); | ||||||
|  | // | ||||||
|  | //        } | ||||||
|  |         if (inverterStatusVo.getInt("all") >0){ | ||||||
|  |             double health = (double) (inverterStatusVo.getInt("all") - inverterStatusVo.getInt("fault")) /inverterStatusVo.getInt("all") * 100;//健康度 | ||||||
|  |             map.put("health", health);//健康度 | ||||||
|  |         }else { | ||||||
|  |             map.put("health", 0);//健康度 | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |     private static void getInverterList1(String s2) { | ||||||
|  |         JSONObject jsonObject = JSONUtil.parseObj(s2); | ||||||
|  |         JSONObject data = jsonObject.getJSONObject("data"); | ||||||
|  |         JSONObject inverterStatusVo = data.getJSONObject("inverterStatusVo"); | ||||||
|  |         if (inverterStatusVo.getInt("all") >0){ | ||||||
|  |             double health = (double) (inverterStatusVo.getInt("all") - inverterStatusVo.getInt("fault")) /inverterStatusVo.getInt("all") * 100;//健康度 | ||||||
|  |             RedisUtils.setCacheObject("health",health); | ||||||
|  |         }else { | ||||||
|  |             RedisUtils.setCacheObject("health",0); | ||||||
|  |         } | ||||||
|  |         RedisUtils.expire("health",86400); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取逆电器数据 | ||||||
|  |      * @param bo | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public HashMap<String, Object> getInverterListOverview(GinlongBo bo) { | ||||||
|  |         HashMap<String, Object> map = new HashMap<>(); | ||||||
|  |         GinlongApiEntity apiEntity = getGinlongApiEntity(); | ||||||
|  |         String s = inverterList(apiEntity); | ||||||
|  |         JSONObject jsonObject = JSONUtil.parseObj(s); | ||||||
|  |         JSONObject data = jsonObject.getJSONObject("data"); | ||||||
|  |         JSONObject inverterStatusVo = data.getJSONObject("inverterStatusVo"); | ||||||
|  |         map.put("all",inverterStatusVo.getInt("all"));//全部 | ||||||
|  |         map.put("normal",inverterStatusVo.getInt("normal"));//正常 | ||||||
|  |         map.put("offline",inverterStatusVo.getInt("offline"));//离线 | ||||||
|  |         map.put("fault",inverterStatusVo.getInt("fault"));//异常 | ||||||
|  |         JSONObject page = data.getJSONObject("page"); | ||||||
|  |         JSONArray records = page.getJSONArray("records"); | ||||||
|  |         List<Long> ids = new ArrayList<>(); | ||||||
|  |         if (!records.isEmpty()) { | ||||||
|  |             for (Object record : records) { | ||||||
|  |                 JSONObject object = JSONUtil.parseObj(record); | ||||||
|  |                 ids.add(object.getLong("id")); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         List<HashMap<String, Object>> hashMaps = new ArrayList<>(); | ||||||
|  |         switch (bo.getType()) { | ||||||
|  |             case 1: | ||||||
|  |                 String s1 = inverterDay(apiEntity, ids.getFirst(), bo.getDate()); | ||||||
|  |                 JSONObject jsonObject1 = JSONUtil.parseObj(s1); | ||||||
|  |                 JSONArray data1 = jsonObject1.getJSONArray("data"); | ||||||
|  |                 int a = 0; | ||||||
|  |                 for (int i = 0; i < 12; i++) { | ||||||
|  |                     double count = 0.0; | ||||||
|  |                     HashMap<String, Object> map1 = new HashMap<>(); | ||||||
|  |                     String time = i*2+2<10?"0"+i*2+2:(i*2+2)+""; | ||||||
|  |                     map1.put("time", i*2<10?"0"+i*2+":00":i*2+":00"); | ||||||
|  |                     if (data1 != null && !data1.isEmpty()){ | ||||||
|  |                         for (int x = a; x < data1.size(); x++) { | ||||||
|  |                             Object obj = data1.get(x); // 通过索引获取元素 | ||||||
|  |                             JSONObject object = JSONUtil.parseObj(obj); | ||||||
|  |                             if (object.getStr("time").substring(0, 2).compareTo(time) >0){ | ||||||
|  |                                 break; | ||||||
|  |                             } | ||||||
|  |                             count += object.getDouble("pac"); | ||||||
|  |                             a++; | ||||||
|  |                         } | ||||||
|  |                         map1.put("content", count); | ||||||
|  |                         hashMaps.add(map1); | ||||||
|  |                         continue; | ||||||
|  |                     }else { | ||||||
|  |                         map1.put("content", 0); | ||||||
|  |                     } | ||||||
|  |                     hashMaps.add(map1); | ||||||
|  |                 } | ||||||
|  |                 System.out.println(hashMaps); | ||||||
|  |                 break; | ||||||
|  |             case 2: | ||||||
|  |                 String s2 = inverterMonth(apiEntity, ids.getFirst(), bo.getDate()); | ||||||
|  |                 JSONObject jsonObject2 = JSONUtil.parseObj(s2); | ||||||
|  |                 JSONArray data2 = jsonObject2.getJSONArray("data"); | ||||||
|  |                 if (data2 != null && !data2.isEmpty()){ | ||||||
|  |                     for (Object obj : data2) { | ||||||
|  |                         HashMap<String, Object> map2 = new HashMap<>(); | ||||||
|  |                         JSONObject object = JSONUtil.parseObj(obj); | ||||||
|  |                         map2.put("time", object.getStr("dateStr")); | ||||||
|  |                         map2.put("content", object.get("energy")); | ||||||
|  |                         hashMaps.add(map2); | ||||||
|  |                     } | ||||||
|  |                 }else { | ||||||
|  |                     DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM"); | ||||||
|  |                     YearMonth yearMonth = YearMonth.parse(bo.getDate(), formatter); | ||||||
|  |  | ||||||
|  |                     int year = yearMonth.getYear();  // 2025 | ||||||
|  |                     int monthValue = yearMonth.getMonthValue(); | ||||||
|  |                     int day = LocalDate.of(year, monthValue, 1).lengthOfMonth(); | ||||||
|  |                     String month = monthValue<10?"0"+monthValue:monthValue+""; | ||||||
|  |                     for (int i = 1; i <= day; i++){ | ||||||
|  |                         HashMap<String, Object> map1 = new HashMap<>(); | ||||||
|  |                         map1.put("time", i<10?month+"-0"+i:month+"-"+i); | ||||||
|  |                         map1.put("content", 0); | ||||||
|  |                         hashMaps.add(map1); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |                 break; | ||||||
|  |             case 3: | ||||||
|  |                 String s3 = inverterYear(apiEntity, ids.getFirst(), bo.getDate()); | ||||||
|  |                 JSONObject jsonObject3 = JSONUtil.parseObj(s3); | ||||||
|  |                 JSONArray data3 = jsonObject3.getJSONArray("data"); | ||||||
|  |                 System.out.println(data3); | ||||||
|  |                 if (data3 != null && !data3.isEmpty()) { | ||||||
|  |                     for (Object obj : data3) { | ||||||
|  |                         HashMap<String, Object> map3 = new HashMap<>(); | ||||||
|  |                         JSONObject object = JSONUtil.parseObj(obj); | ||||||
|  |                         map3.put("time", object.getStr("dateStr")); | ||||||
|  |                         map3.put("content", object.get("energy")); | ||||||
|  |                         hashMaps.add(map3); | ||||||
|  |                     } | ||||||
|  |                 }else { | ||||||
|  |                     for (int i = 1; i <= 12; i++){ | ||||||
|  |                         HashMap<String, Object> map1 = new HashMap<>(); | ||||||
|  |                         map1.put("time", i<10?bo.getDate()+"-0"+i:bo.getDate()+"-"+i); | ||||||
|  |                         map1.put("content", 0); | ||||||
|  |                         hashMaps.add(map1); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |                 break; | ||||||
|  |             default: | ||||||
|  |                 break; | ||||||
|  |         } | ||||||
|  |         map.put("data",hashMaps); | ||||||
|  |         System.out.println(map); | ||||||
|  |         return map; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 能源收益分析 | ||||||
|  |      * @param bo | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public HashMap<String, Object> getStationMonthOverview(GinlongBo bo) { | ||||||
|  |         HashMap<String, Object> map = new HashMap<>(); | ||||||
|  |         GinlongApiEntity apiEntity = getGinlongApiEntity(); | ||||||
|  |         List<Long> idList = new ArrayList<>(); | ||||||
|  |         //使用获取账号下电站列表接口获取数据 | ||||||
|  |         String s = userStationList(apiEntity); | ||||||
|  |         JSONObject jsonObject = JSONUtil.parseObj(s); | ||||||
|  |         JSONObject data = jsonObject.getJSONObject("data"); | ||||||
|  |         JSONObject page = data.getJSONObject("page"); | ||||||
|  |         JSONArray records = page.getJSONArray("records"); | ||||||
|  |         if (!records.isEmpty()){ | ||||||
|  |             for (Object record : records) { | ||||||
|  |                 JSONObject object = JSONUtil.parseObj(record); | ||||||
|  |                 idList.add(object.getLong("id")); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         List<HashMap<String, Object>> hashMaps = new ArrayList<>(); | ||||||
|  |         switch (bo.getType()){ | ||||||
|  |             case 1: | ||||||
|  | //                String s1 = stationDay(apiEntity, idList.getFirst(), bo.getDate()); | ||||||
|  | //                System.out.println(s1); | ||||||
|  | //                JSONObject jsonObject1 = JSONUtil.parseObj(s1); | ||||||
|  | //                JSONArray data1 = jsonObject1.getJSONArray("data"); | ||||||
|  | //                int a = 0; | ||||||
|  | //                for (int i = 0; i < 12; i++) { | ||||||
|  | //                    double count = 0.0; | ||||||
|  | //                    HashMap<String, Object> map1 = new HashMap<>(); | ||||||
|  | //                    String time = i * 2 + 2 < 10 ? "0" + i * 2 + 2 : (i * 2 + 2) + ""; | ||||||
|  | //                    map1.put("time", i * 2 < 10 ? "0" + i * 2 + ":00" : i * 2 + ":00"); | ||||||
|  | //                    if (data1 != null && !data1.isEmpty()) { | ||||||
|  | //                        for (int x = a; x < data1.size(); x++) { | ||||||
|  | //                            Object obj = data1.get(x); // 通过索引获取元素 | ||||||
|  | //                            JSONObject object = JSONUtil.parseObj(obj); | ||||||
|  | //                            if (object.getStr("timeStr").substring(0, 2).compareTo(time) > 0) { | ||||||
|  | //                                break; | ||||||
|  | //                            } | ||||||
|  | //                            count += object.getDouble("power"); | ||||||
|  | //                            a++; | ||||||
|  | //                        } | ||||||
|  | //                        map1.put("content", count); | ||||||
|  | // | ||||||
|  | //                        hashMaps.add(map1); | ||||||
|  | //                        continue; | ||||||
|  | //                    } else { | ||||||
|  | //                        map1.put("content", 0); | ||||||
|  | //                    } | ||||||
|  | //                    hashMaps.add(map1); | ||||||
|  | //                } | ||||||
|  | //                int y = 0; | ||||||
|  | //                for (Long id : idList) { | ||||||
|  | //                    String s1 = stationDay(apiEntity, id, bo.getDate()); | ||||||
|  | //                    System.out.println(s1); | ||||||
|  | //                    JSONObject jsonObject1 = JSONUtil.parseObj(s1); | ||||||
|  | //                    JSONArray data1 = jsonObject1.getJSONArray("data"); | ||||||
|  | //                    int a = 0; | ||||||
|  | //                    for (int i = 0; i < 12; i++) { | ||||||
|  | //                        double count = 0.0; | ||||||
|  | //                        HashMap<String, Object> map1 = new HashMap<>(); | ||||||
|  | //                        String time = i*2+2<10?"0"+i*2+2:(i*2+2)+""; | ||||||
|  | //                        if (y == 0){ | ||||||
|  | //                            map1.put("time", i*2<10?"0"+i*2+":00":i*2+":00"); | ||||||
|  | //                        } | ||||||
|  | //                        if (data1 != null && !data1.isEmpty()){ | ||||||
|  | //                            for (int x = a; x < data1.size(); x++) { | ||||||
|  | //                                Object obj = data1.get(x); // 通过索引获取元素 | ||||||
|  | //                                JSONObject object = JSONUtil.parseObj(obj); | ||||||
|  | //                                if (object.getStr("timeStr").substring(0, 2).compareTo(time) >0){ | ||||||
|  | //                                    break; | ||||||
|  | //                                } | ||||||
|  | //                                count += object.getDouble("power"); | ||||||
|  | //                                a++; | ||||||
|  | //                            } | ||||||
|  | //                            map1.put("content", y == 0 ?  count: (hashMaps.get(y).get(time) == null) ? 0.0 : (Double) hashMaps.get(y).get(time) + count); | ||||||
|  | // | ||||||
|  | //                            hashMaps.add(map1); | ||||||
|  | //                            continue; | ||||||
|  | //                        }else { | ||||||
|  | //                            map1.put("content", y == 0 ?  0: (hashMaps.get(y).get(time) == null) ? 0.0 : (Double) hashMaps.get(y).get(time) + 0); | ||||||
|  | //                        } | ||||||
|  | //                        hashMaps.add(map1); | ||||||
|  | //                    } | ||||||
|  | //                    y++; | ||||||
|  | //                } | ||||||
|  |                 break; | ||||||
|  |             case 2: | ||||||
|  |                 String s2 = stationMonth(apiEntity, idList.getFirst(), bo.getDate()); | ||||||
|  |                 JSONObject jsonObject2 = JSONUtil.parseObj(s2); | ||||||
|  |                 JSONArray data2 = jsonObject2.getJSONArray("data"); | ||||||
|  |  | ||||||
|  |                 if (data2 != null && !data2.isEmpty()){ | ||||||
|  |                     for (Object obj : data2) { | ||||||
|  |                         HashMap<String, Object> map1 = new HashMap<>(); | ||||||
|  |                         JSONObject object = JSONUtil.parseObj(obj); | ||||||
|  |                         map1.put("time", object.getStr("dateStr")); | ||||||
|  |                         map1.put("content", object.get("money")); | ||||||
|  |                         hashMaps.add(map1); | ||||||
|  |                     } | ||||||
|  |                 }else { | ||||||
|  |                     DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM"); | ||||||
|  |                     YearMonth yearMonth = YearMonth.parse(bo.getDate(), formatter); | ||||||
|  |  | ||||||
|  |                     int year = yearMonth.getYear();  // 2025 | ||||||
|  |                     int monthValue = yearMonth.getMonthValue(); | ||||||
|  |                     int day = LocalDate.of(year, monthValue, 1).lengthOfMonth(); | ||||||
|  |                     String month = monthValue<10?"0"+monthValue:monthValue+""; | ||||||
|  |                     for (int i = 1; i <= day; i++){ | ||||||
|  |                         HashMap<String, Object> map1 = new HashMap<>(); | ||||||
|  |                         map1.put("time", i<10?month+"-0"+i:month+"-"+i); | ||||||
|  |                         map1.put("content", 0); | ||||||
|  |                         hashMaps.add(map1); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |                 break; | ||||||
|  |  | ||||||
|  |             case 3: | ||||||
|  |                 String s3 = stationYear(apiEntity, idList.getFirst(), bo.getDate()); | ||||||
|  |                 JSONObject jsonObject3 = JSONUtil.parseObj(s3); | ||||||
|  |                 JSONArray data3 = jsonObject3.getJSONArray("data"); | ||||||
|  |                 System.out.println(data3); | ||||||
|  |                 if (data3 != null && !data3.isEmpty()) { | ||||||
|  |                     for (Object obj : data3) { | ||||||
|  |                         HashMap<String, Object> map3 = new HashMap<>(); | ||||||
|  |                         JSONObject object = JSONUtil.parseObj(obj); | ||||||
|  |                         map3.put("time", object.getStr("dateStr").substring(0, 7)); | ||||||
|  |                         map3.put("content", object.get("money")); | ||||||
|  |                         hashMaps.add(map3); | ||||||
|  |                     } | ||||||
|  |                 }else { | ||||||
|  |                     for (int i = 1; i <= 12; i++){ | ||||||
|  |                         HashMap<String, Object> map1 = new HashMap<>(); | ||||||
|  |                         map1.put("time", i<10?bo.getDate()+"-0"+i:bo.getDate()+"-"+i); | ||||||
|  |                         map1.put("content", 0); | ||||||
|  |                         hashMaps.add(map1); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |                 break; | ||||||
|  |  | ||||||
|  |             default: | ||||||
|  |                 break; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         map.put("data",hashMaps); | ||||||
|  |  | ||||||
|  |         String s2 = stationDetail(apiEntity, idList.getFirst()); | ||||||
|  |         JSONObject jsonObject2 = JSONUtil.parseObj(s2); | ||||||
|  |         JSONObject data2 = jsonObject2.getJSONObject("data"); | ||||||
|  |         map.put("allInCome",data2.get("allInCome"));//累计收益 | ||||||
|  |         map.put("monthInCome",data2.get("monthInCome"));//本月收益 | ||||||
|  |         map.put("yearInCome",data2.get("yearInCome"));//本年收益 | ||||||
|  |         map.put("price",data2.get("price"));//每度电收益 | ||||||
|  |  | ||||||
|  |         System.out.println(map); | ||||||
|  |         return map; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询全部设备报警信息 | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public List<HashMap<String, Object>> getAlarmListOverview() { | ||||||
|  |         List<HashMap<String, Object>> list = new ArrayList<>(); | ||||||
|  |         GinlongApiEntity apiEntity = getGinlongApiEntity(); | ||||||
|  |         String s = alarmList(apiEntity); | ||||||
|  |         System.out.println(s); | ||||||
|  |         JSONObject jsonObject = JSONUtil.parseObj(s); | ||||||
|  |         JSONObject data = jsonObject.getJSONObject("data"); | ||||||
|  |         JSONArray records = data.getJSONArray("records"); | ||||||
|  |         for (Object record : records) { | ||||||
|  |             HashMap<String, Object> map = new HashMap<>(); | ||||||
|  |             JSONObject obj = JSONUtil.parseObj(record); | ||||||
|  |             map.put("stationName", obj.get("stationName"));//电站名称 | ||||||
|  |             map.put("alarmLevel", obj.get("alarmLevel")); // 报警等级:1 = 提示,2 = 一般,3 = 紧急 | ||||||
|  |             map.put("alarmBeginTime", obj.get("alarmBeginTime")); //报警开始时间 | ||||||
|  |             map.put("alarmMsg", obj.get("alarmMsg")); //报警内容 | ||||||
|  |             map.put("advice", obj.get("advice")); //报警处理建议 | ||||||
|  |             map.put("state", obj.get("state")); //报警状态:0 = 未处理,1 = 已处理,2 = 已恢复 | ||||||
|  |             if ("1".equals(obj.getStr("state")) || "2".equals(obj.getStr("state"))){ | ||||||
|  |                 continue; | ||||||
|  |             } | ||||||
|  |             list.add(map); | ||||||
|  |         } | ||||||
|  |         return list; | ||||||
|  | //        return list.stream().filter(map -> { | ||||||
|  | //            Object statusObj = map.get("state"); | ||||||
|  | //            if (statusObj instanceof Integer) { | ||||||
|  | //                int status = (Integer) statusObj; | ||||||
|  | //                return status == 1 || status == 2; | ||||||
|  | //            } | ||||||
|  | //            return false; | ||||||
|  | //        }).collect(Collectors.toList()); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private void getStationDetailList(String s1, double dayEnergy, HashMap<String, Object> map) { | ||||||
|  |         JSONObject jsonObject = JSONUtil.parseObj(s1); | ||||||
|  |         String dayEnergyOld = stringRedisTemplate.opsForValue().get("dayEnergy"); | ||||||
|  |         map.put("dayEnergyOld", dayEnergyOld != null ? Double.parseDouble(dayEnergyOld) : 0.0); | ||||||
|  |         String powerStationAvoidedCo2Old = stringRedisTemplate.opsForValue().get("powerStationAvoidedCo2"); | ||||||
|  |         map.put("powerStationAvoidedCo2Old", powerStationAvoidedCo2Old != null ? Double.parseDouble(powerStationAvoidedCo2Old) : 0.0); | ||||||
|  |         JSONObject data = jsonObject.getJSONObject("data"); | ||||||
|  |         JSONArray records = data.getJSONArray("records"); | ||||||
|  |         double powerStationAvoidedCo2 = 0.0; | ||||||
|  |         for (Object record : records) { | ||||||
|  |             JSONObject object = JSONUtil.parseObj(record); | ||||||
|  |             dayEnergy += object.getDouble("dayEnergy"); | ||||||
|  |             powerStationAvoidedCo2 += object.getDouble("powerStationAvoidedCo2"); | ||||||
|  |         } | ||||||
|  |         map.put("dayEnergy", dayEnergy);//今日总发电量 | ||||||
|  |         map.put("powerStationAvoidedCo2", powerStationAvoidedCo2);//碳排放量 | ||||||
|  |     } | ||||||
|  |     private static void getStationDetailList1(String s1, double dayEnergy) { | ||||||
|  |         JSONObject jsonObject = JSONUtil.parseObj(s1); | ||||||
|  |         JSONObject data = jsonObject.getJSONObject("data"); | ||||||
|  |         JSONArray records = data.getJSONArray("records"); | ||||||
|  |         double powerStationAvoidedCo2 = 0.0; | ||||||
|  |         for (Object record : records) { | ||||||
|  |             JSONObject object = JSONUtil.parseObj(record); | ||||||
|  |             dayEnergy += object.getDouble("dayEnergy"); | ||||||
|  |             powerStationAvoidedCo2 += object.getDouble("powerStationAvoidedCo2"); | ||||||
|  |         } | ||||||
|  |         RedisUtils.setCacheObject("dayEnergy",dayEnergy);//今日总发电量 | ||||||
|  |         RedisUtils.setCacheObject("powerStationAvoidedCo2",powerStationAvoidedCo2);//碳排放量 | ||||||
|  |  | ||||||
|  |         RedisUtils.expire("dayEnergy",86400); | ||||||
|  |         RedisUtils.expire("powerStationAvoidedCo2",86400); | ||||||
|  |  | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private void getUserStationList(String s, List<Long> idList, HashMap<String, Object> map) { | ||||||
|  |         JSONObject jsonObject = JSONUtil.parseObj(s); | ||||||
|  |         double capacity = 0.0; // 总装机容量 | ||||||
|  |         int module = 0;//光伏板数量 | ||||||
|  |         double generateElectricity = 0.0;//发电效率 | ||||||
|  |         double batteryTodayDischargeEnergy = 0.0;//放电效率 | ||||||
|  |         double batteryTodayChargeEnergy = 0.0;//充电效率 | ||||||
|  |         String capacityOld = stringRedisTemplate.opsForValue().get("capacity"); | ||||||
|  |         map.put("capacityOld", capacityOld != null ? Double.parseDouble(capacityOld) : 0.0); | ||||||
|  |         String moduleOld = stringRedisTemplate.opsForValue().get("module"); | ||||||
|  |         map.put("moduleOld", moduleOld != null ? Double.parseDouble(moduleOld) : 0.0); | ||||||
|  |         String generateElectricityOld = stringRedisTemplate.opsForValue().get("generateElectricity"); | ||||||
|  |         map.put("generateElectricityOld", generateElectricityOld != null ? Double.parseDouble(generateElectricityOld) : 0.0); | ||||||
|  |         String operatingRateOld = stringRedisTemplate.opsForValue().get("operatingRate"); | ||||||
|  |         map.put("operatingRateOld", operatingRateOld != null ? Double.parseDouble(operatingRateOld) : 0.0); | ||||||
|  |  | ||||||
|  |         JSONObject data = jsonObject.getJSONObject("data"); | ||||||
|  |         JSONObject stationStatusVo = data.getJSONObject("stationStatusVo"); | ||||||
|  |         if (stationStatusVo.getInt("all") >0){ | ||||||
|  |             JSONObject page = data.getJSONObject("page"); | ||||||
|  |             JSONArray records = page.getJSONArray("records"); | ||||||
|  |             int all = stationStatusVo.getInt("all");//全部电站 | ||||||
|  |             if (!records.isEmpty()){ | ||||||
|  |                 for (Object record : records) { | ||||||
|  |                     JSONObject object = JSONUtil.parseObj(record); | ||||||
|  |                     capacity += object.getDouble("capacity"); | ||||||
|  |                     batteryTodayDischargeEnergy += object.getDouble("batteryTodayDischargeEnergy"); | ||||||
|  |                     batteryTodayChargeEnergy += object.getDouble("batteryTodayChargeEnergy"); | ||||||
|  |                     module += object.getInt("module"); | ||||||
|  |                     idList.add(object.getLong("id")); | ||||||
|  |  | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             if (batteryTodayDischargeEnergy >0){ | ||||||
|  |                 generateElectricity = (1-(batteryTodayChargeEnergy/batteryTodayDischargeEnergy))*100; | ||||||
|  |             }else { | ||||||
|  |                 generateElectricity = 0; | ||||||
|  |             } | ||||||
|  |             map.put("operatingRate", all);//电站总数 | ||||||
|  |         }else { | ||||||
|  |             map.put("operatingRate", 0.0);//运行率 | ||||||
|  |         } | ||||||
|  |         map.put("capacity", capacity);//总装机容量 | ||||||
|  |         map.put("module", module);//光伏板数量 | ||||||
|  |         map.put("generateElectricity", generateElectricity);//发电效率 | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private static void getUserStationList1(String s, List<Long> idList) { | ||||||
|  |         JSONObject jsonObject = JSONUtil.parseObj(s); | ||||||
|  |         double capacity = 0.0; // 总装机容量 | ||||||
|  |         int module = 0;//光伏板数量 | ||||||
|  |         double generateElectricity = 0.0;//发电效率 | ||||||
|  |         double batteryTodayDischargeEnergy = 0.0;//放电效率 | ||||||
|  |         double batteryTodayChargeEnergy = 0.0;//充电效率 | ||||||
|  |         JSONObject data = jsonObject.getJSONObject("data"); | ||||||
|  |         JSONObject stationStatusVo = data.getJSONObject("stationStatusVo"); | ||||||
|  |         if (stationStatusVo.getInt("all") >0){ | ||||||
|  |             JSONObject page = data.getJSONObject("page"); | ||||||
|  |             JSONArray records = page.getJSONArray("records"); | ||||||
|  |             int all = stationStatusVo.getInt("all");//全部电站 | ||||||
|  |             int normal = stationStatusVo.getInt("normal");//正常电站 | ||||||
|  |  | ||||||
|  |             if (!records.isEmpty()){ | ||||||
|  |                 for (Object record : records) { | ||||||
|  |                     JSONObject object = JSONUtil.parseObj(record); | ||||||
|  |                     capacity += object.getDouble("capacity"); | ||||||
|  |                     batteryTodayDischargeEnergy += object.getDouble("batteryTodayDischargeEnergy"); | ||||||
|  |                     batteryTodayChargeEnergy += object.getDouble("batteryTodayChargeEnergy"); | ||||||
|  |                     module += object.getInt("module"); | ||||||
|  |                     idList.add(object.getLong("id")); | ||||||
|  |  | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             if (batteryTodayDischargeEnergy >0){ | ||||||
|  |                 generateElectricity = (1-(batteryTodayChargeEnergy/batteryTodayDischargeEnergy))*100; | ||||||
|  |             }else { | ||||||
|  |                 generateElectricity = 0; | ||||||
|  |             } | ||||||
|  |             RedisUtils.setCacheObject("operatingRate",all); | ||||||
|  |         }else { | ||||||
|  |             RedisUtils.setCacheObject("operatingRate",0); | ||||||
|  |         } | ||||||
|  |         RedisUtils.setCacheObject("capacity",capacity);//总装机容量 | ||||||
|  |         RedisUtils.setCacheObject("module",module);//光伏板数量 | ||||||
|  |         RedisUtils.setCacheObject("generateElectricity",generateElectricity);//发电效率 | ||||||
|  |         RedisUtils.expire("capacity",86400); | ||||||
|  |         RedisUtils.expire("module",86400); | ||||||
|  |         RedisUtils.expire("generateElectricity",86400); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | //    @Scheduled(cron = "0 59 23 * * ?") | ||||||
|  |     @Scheduled(initialDelay = 5000) | ||||||
|  |     public void redisSetData(){ | ||||||
|  |         GinlongApiEntity apiEntity = getGinlongApiEntity(); | ||||||
|  |  | ||||||
|  |         double dayEnergy = 0.0; //今日总发电量 | ||||||
|  |  | ||||||
|  |         List<Long> idList = new ArrayList<>(); | ||||||
|  |         String s = userStationList(apiEntity); | ||||||
|  |         String s2 = inverterList(apiEntity); | ||||||
|  |         getInverterList1(s2); | ||||||
|  |         getUserStationList1(s, idList); | ||||||
|  |  | ||||||
|  |         //使用获取多个电站详情接口获取数据 | ||||||
|  |         String s1 = stationDetailList(apiEntity, idList); | ||||||
|  | //        System.out.println(s1); | ||||||
|  |         getStationDetailList1(s1, dayEnergy); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,106 @@ | |||||||
|  | package org.dromara.daping.utils; | ||||||
|  |  | ||||||
|  | import cn.hutool.crypto.digest.HMac; | ||||||
|  | import cn.hutool.crypto.digest.HmacAlgorithm; | ||||||
|  | import cn.hutool.http.HttpRequest; | ||||||
|  | import cn.hutool.http.HttpResponse; | ||||||
|  | import cn.hutool.json.JSONUtil; | ||||||
|  | import org.dromara.daping.domain.GinlongApiEntity; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.stereotype.Component; | ||||||
|  |  | ||||||
|  | import java.nio.charset.StandardCharsets; | ||||||
|  | import java.security.MessageDigest; | ||||||
|  | import java.text.SimpleDateFormat; | ||||||
|  | import java.util.*; | ||||||
|  |  | ||||||
|  | @Component | ||||||
|  | public class GinlongApiClient { | ||||||
|  |  | ||||||
|  |     private static final String CONTENT_TYPE = "application/json"; | ||||||
|  |  | ||||||
|  |     // 直接注入从配置文件绑定的实体类 | ||||||
|  |     @Autowired | ||||||
|  |     private GinlongApiEntity apiEntity; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 通用API调用方法 | ||||||
|  |      * | ||||||
|  |      * @param path      接口路径(如:/v1/api/userStationList) | ||||||
|  |      * @param params    请求参数(无参数时传null) | ||||||
|  |      * @param apiEntity | ||||||
|  |      * @return 接口返回的JSON字符串 | ||||||
|  |      * @throws Exception 可能的异常(签名失败、网络错误等) | ||||||
|  |      */ | ||||||
|  |     public String callApi(String path, Map<String, Object> params, GinlongApiEntity apiEntity) throws Exception { | ||||||
|  |         // 1. 处理请求体(转为JSON字符串) | ||||||
|  |         String body = (params != null) ? JSONUtil.toJsonStr(params) : "{}"; | ||||||
|  |         // 2. 计算Content-MD5 | ||||||
|  |         String contentMd5 = calcContentMD5(body); | ||||||
|  |         // 3. 获取GMT时间(需在当前时间±15分钟内) | ||||||
|  |         String gmtDate = getGMTDate(); | ||||||
|  |         // 4. 计算签名 | ||||||
|  |         String signature = buildSignature(path, contentMd5, gmtDate,apiEntity); | ||||||
|  |         // 5. 构建完整请求URL | ||||||
|  |         String url = apiEntity.getUrl() + path; | ||||||
|  |  | ||||||
|  |         // 6. 发送POST请求并返回结果 | ||||||
|  |         HttpResponse response = HttpRequest.post(url) | ||||||
|  |             .header("Content-Type", CONTENT_TYPE) | ||||||
|  |             .header("Content-MD5", contentMd5) | ||||||
|  |             .header("Date", gmtDate) | ||||||
|  |             .header("Authorization", "API " + apiEntity.getKey() + ":" + signature)  // 使用实体类的key | ||||||
|  |             .body(body) | ||||||
|  |             .execute(); | ||||||
|  |  | ||||||
|  |         return response.body(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 计算Content-MD5(按文档规范) | ||||||
|  |      */ | ||||||
|  |     private String calcContentMD5(String body) { | ||||||
|  |         try { | ||||||
|  |             MessageDigest md = MessageDigest.getInstance("MD5"); | ||||||
|  |             md.update(body.getBytes(StandardCharsets.UTF_8)); | ||||||
|  |             byte[] digest = md.digest(); | ||||||
|  |             return Base64.getEncoder().encodeToString(digest); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             throw new RuntimeException("计算Content-MD5失败", e); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取符合格式的GMT时间 | ||||||
|  |      */ | ||||||
|  |     private String getGMTDate() { | ||||||
|  |         //1、获取GMT时区下的当前时间; | ||||||
|  |         Calendar calendar = Calendar.getInstance(); | ||||||
|  |         //2、将当前时间按以下格式转换为字符串。 格式:EEE, d MMM yyyy HH:mm:ss 'GMT'注意:Date 时间不能超出当前时间的正负15分钟,否则会出现调用失败。 | ||||||
|  |         SimpleDateFormat sdf = new SimpleDateFormat( | ||||||
|  |             "EEE, d MMM yyyy HH:mm:ss 'GMT'", | ||||||
|  |             Locale.US | ||||||
|  |         ); | ||||||
|  |         sdf.setTimeZone(TimeZone.getTimeZone("GMT")); | ||||||
|  |         return sdf.format(calendar.getTime()); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 构建签名(按文档规范) | ||||||
|  |      */ | ||||||
|  |     private String buildSignature(String path, String contentMd5, String gmtDate, GinlongApiEntity apiEntity) { | ||||||
|  |         // 拼接签名原文 | ||||||
|  |         String signatureText = "POST" + "\n" | ||||||
|  |             + contentMd5 + "\n" | ||||||
|  |             + CONTENT_TYPE + "\n" | ||||||
|  |             + gmtDate + "\n" | ||||||
|  |             + path; | ||||||
|  |         // 计算HmacSHA1并Base64编码 | ||||||
|  |         HMac hmac = new HMac( | ||||||
|  |             HmacAlgorithm.HmacSHA1, | ||||||
|  |             apiEntity.getSecret().getBytes(StandardCharsets.UTF_8));  // 使用实体类的secret | ||||||
|  |         return hmac.digestBase64(signatureText, false); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -118,12 +118,13 @@ public class OpsInspectionNodeServiceImpl implements IOpsInspectionNodeService { | |||||||
|      */ |      */ | ||||||
|     @Override |     @Override | ||||||
|     public Boolean updateByBo(List<OpsInspectionNodeBo> bo) { |     public Boolean updateByBo(List<OpsInspectionNodeBo> bo) { | ||||||
|  |         List<OpsInspectionNode> nodes = new ArrayList<>(); | ||||||
|         for (OpsInspectionNodeBo nodeBo : bo) { |         for (OpsInspectionNodeBo nodeBo : bo) { | ||||||
|             OpsInspectionNode update = MapstructUtils.convert(nodeBo, OpsInspectionNode.class); |             OpsInspectionNode update = MapstructUtils.convert(nodeBo, OpsInspectionNode.class); | ||||||
|             validEntityBeforeSave(update); |             validEntityBeforeSave(update); | ||||||
|             baseMapper.updateById(update); |             nodes.add(update); | ||||||
|         } |         } | ||||||
|         return true; |         return baseMapper.updateBatchById(nodes); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|  | |||||||
| @ -284,13 +284,20 @@ public class OpsInspectionOrderServiceImpl implements IOpsInspectionOrderService | |||||||
|         BigDecimal bypdzs = BigDecimal.valueOf(thisMonth.size()); |         BigDecimal bypdzs = BigDecimal.valueOf(thisMonth.size()); | ||||||
|         //统计平均响应时间 |         //统计平均响应时间 | ||||||
|         Long zgxysj = 0L;//总共响应时间 |         Long zgxysj = 0L;//总共响应时间 | ||||||
|  |         Long jds = 0L;//本月接单数 有接单才有响应时间 | ||||||
|         for (OpsInspectionOrderVo orderVo : thisMonth) { |         for (OpsInspectionOrderVo orderVo : thisMonth) { | ||||||
|             if (orderVo.getGetOrderTime() != null) { |             if (orderVo.getGetOrderTime() != null) { | ||||||
|  |                 jds++; | ||||||
|                 zgxysj += orderVo.getGetOrderTime().getTime() - orderVo.getCreateTime().getTime(); |                 zgxysj += orderVo.getGetOrderTime().getTime() - orderVo.getCreateTime().getTime(); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         //平均响应时间 |         //平均响应时间 | ||||||
|         BigDecimal avg = BigDecimal.valueOf(TimeUnit.MILLISECONDS.toMinutes(zgxysj)); |         BigDecimal avg; | ||||||
|  |         if ((BigDecimal.valueOf(jds).compareTo(BigDecimal.ZERO) > 0)) { | ||||||
|  |             avg = BigDecimal.valueOf(TimeUnit.MILLISECONDS.toMinutes(zgxysj)).divide(BigDecimal.valueOf(jds), 2, RoundingMode.HALF_UP); | ||||||
|  |         }else{ | ||||||
|  |             avg = BigDecimal.ZERO; | ||||||
|  |         } | ||||||
|         //统计待接收工单 |         //统计待接收工单 | ||||||
|         int waiting = thisMonth.stream().filter(vo -> vo.getStatus().equals("2")).toList().size(); |         int waiting = thisMonth.stream().filter(vo -> vo.getStatus().equals("2")).toList().size(); | ||||||
|         //待接单数 |         //待接单数 | ||||||
| @ -334,13 +341,20 @@ public class OpsInspectionOrderServiceImpl implements IOpsInspectionOrderService | |||||||
|  |  | ||||||
|         //统计上月平均响应时间 |         //统计上月平均响应时间 | ||||||
|         zgxysj = 0L;//总共响应时间 |         zgxysj = 0L;//总共响应时间 | ||||||
|  |         jds = 0L;//本月接单数 有接单才有响应时间 | ||||||
|         for (OpsInspectionOrderVo orderVo : thisMonth) { |         for (OpsInspectionOrderVo orderVo : thisMonth) { | ||||||
|             if (orderVo.getGetOrderTime() != null) { |             if (orderVo.getGetOrderTime() != null) { | ||||||
|  |                 jds++; | ||||||
|                 zgxysj += orderVo.getGetOrderTime().getTime() - orderVo.getCreateTime().getTime(); |                 zgxysj += orderVo.getGetOrderTime().getTime() - orderVo.getCreateTime().getTime(); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         //上月平均响应时间 |         //上月平均响应时间 | ||||||
|         BigDecimal syavg = BigDecimal.valueOf(TimeUnit.MILLISECONDS.toMinutes(zgxysj)); |         BigDecimal syavg; | ||||||
|  |         if ((BigDecimal.valueOf(jds).compareTo(BigDecimal.ZERO) > 0)) { | ||||||
|  |             syavg = BigDecimal.valueOf(TimeUnit.MILLISECONDS.toMinutes(zgxysj)).divide(BigDecimal.valueOf(jds), 2, RoundingMode.HALF_UP); | ||||||
|  |         }else { | ||||||
|  |             syavg = BigDecimal.ZERO; | ||||||
|  |         } | ||||||
|  |  | ||||||
|         //获取上月所有完成数 |         //获取上月所有完成数 | ||||||
|         int sysywcs = thisMonth.stream() |         int sysywcs = thisMonth.stream() | ||||||
|  | |||||||
| @ -206,6 +206,28 @@ public class OpsInspectionTaskServiceImpl implements IOpsInspectionTaskService { | |||||||
|         if(isValid){ |         if(isValid){ | ||||||
|             //TODO 做一些业务上的校验,判断是否需要校验 |             //TODO 做一些业务上的校验,判断是否需要校验 | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         //删除任务时删除节点和节点问题 | ||||||
|  |         List<Long> problemIds = new ArrayList<>(); | ||||||
|  |         LambdaQueryWrapper<OpsInspectionTaskProblem> problemLambdaQueryWrapper = new LambdaQueryWrapper<>(); | ||||||
|  |  | ||||||
|  |         for (Long id : ids) { | ||||||
|  |             //删除节点 | ||||||
|  |             OpsInspectionTaskVo taskVo = baseMapper.selectVoById(id); | ||||||
|  |             if (taskVo!= null){ | ||||||
|  |                 if (taskVo.getNodeIds()!=null){ | ||||||
|  |                     nodeMapper.deleteByIds(Arrays.stream(taskVo.getNodeIds().split(",")).toList()); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             //删除问题 | ||||||
|  |             problemLambdaQueryWrapper.clear(); | ||||||
|  |             problemLambdaQueryWrapper.eq(OpsInspectionTaskProblem::getId, id); | ||||||
|  |             List<OpsInspectionTaskProblemVo> problemVos = problemMapper.selectVoList(problemLambdaQueryWrapper); | ||||||
|  |             if (problemVos!= null && !problemVos.isEmpty()){ | ||||||
|  |                 problemMapper.deleteByIds(problemVos); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|         return baseMapper.deleteByIds(ids) > 0; |         return baseMapper.deleteByIds(ids) > 0; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -262,7 +284,7 @@ public class OpsInspectionTaskServiceImpl implements IOpsInspectionTaskService { | |||||||
|         Date finalStartDate = startDate; |         Date finalStartDate = startDate; | ||||||
|         Date finalEndDate = endDate; |         Date finalEndDate = endDate; | ||||||
|  |  | ||||||
|         //仅统计在本月完成的巡检 |         //仅统计在指定时间段内完成的巡检任务 | ||||||
|         List<OpsInspectionTaskVo> finishList = opsInspectionTaskVos.stream() |         List<OpsInspectionTaskVo> finishList = opsInspectionTaskVos.stream() | ||||||
|             .filter(taskVo -> taskVo.getFinishTime() != null && taskVo.getStartTime() != null && taskVo.getFinishTime().before(finalEndDate) && taskVo.getStartTime().after(finalStartDate)) |             .filter(taskVo -> taskVo.getFinishTime() != null && taskVo.getStartTime() != null && taskVo.getFinishTime().before(finalEndDate) && taskVo.getStartTime().after(finalStartDate)) | ||||||
|             .filter(vo -> vo.getCreateTime().after(finalStartDate) && vo.getCreateTime().before(finalEndDate)) |             .filter(vo -> vo.getCreateTime().after(finalStartDate) && vo.getCreateTime().before(finalEndDate)) | ||||||
| @ -271,15 +293,10 @@ public class OpsInspectionTaskServiceImpl implements IOpsInspectionTaskService { | |||||||
|  |  | ||||||
|         //发现问题数 通过createTime统计 |         //发现问题数 通过createTime统计 | ||||||
|         int problemCount = 0; |         int problemCount = 0; | ||||||
| //        List<OpsInspectionTaskVo> problemList = opsInspectionTaskVos.stream() |  | ||||||
| //            .filter(taskVo -> taskVo.getCreateTime().after(finalStartDate) && taskVo.getCreateTime().before(finalEndDate)) |  | ||||||
| //            .toList(); |  | ||||||
| //        if (!problemList.isEmpty()){ |  | ||||||
| //            problemCount = problemList.size(); |  | ||||||
| //        } |  | ||||||
|         LambdaQueryWrapper<OpsInspectionTaskProblem> problemLqw = new LambdaQueryWrapper<>(); |         LambdaQueryWrapper<OpsInspectionTaskProblem> problemLqw = new LambdaQueryWrapper<>(); | ||||||
|         problemLqw.eq(OpsInspectionTaskProblem::getProjectId, projectId); |         problemLqw.eq(OpsInspectionTaskProblem::getProjectId, projectId); | ||||||
|         problemLqw.between(OpsInspectionTaskProblem::getCreateTime, finalStartDate, finalEndDate); |         problemLqw.ge(OpsInspectionTaskProblem::getCreateTime, finalStartDate); | ||||||
|  |         problemLqw.le(OpsInspectionTaskProblem::getCreateTime, finalEndDate); | ||||||
|  |  | ||||||
|         List<OpsInspectionTaskProblemVo> problemVos = problemMapper.selectVoList(problemLqw); |         List<OpsInspectionTaskProblemVo> problemVos = problemMapper.selectVoList(problemLqw); | ||||||
|         if (problemVos != null && !problemVos.isEmpty()){ |         if (problemVos != null && !problemVos.isEmpty()){ | ||||||
| @ -339,8 +356,9 @@ public class OpsInspectionTaskServiceImpl implements IOpsInspectionTaskService { | |||||||
|  |  | ||||||
|         //巡检完成率 |         //巡检完成率 | ||||||
|         BigDecimal xjwcl; |         BigDecimal xjwcl; | ||||||
|         //本月巡检数 |         //统计指定时间段内创建的巡检任务数 | ||||||
|         int byxjs = opsInspectionTaskVos.stream().filter(vo -> vo.getCreateTime().after(finalStartDate) && vo.getCreateTime().before(finalEndDate)) |         int byxjs = opsInspectionTaskVos.stream() | ||||||
|  |             .filter(vo -> !vo.getCreateTime().before(finalStartDate) && !vo.getCreateTime().after(finalEndDate)) | ||||||
|             .toList() |             .toList() | ||||||
|             .size(); |             .size(); | ||||||
|         //完成 / 巡检数 * 100 |         //完成 / 巡检数 * 100 | ||||||
|  | |||||||
| @ -1,5 +1,6 @@ | |||||||
| package org.dromara.inspection.service.impl; | package org.dromara.inspection.service.impl; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import org.apache.dubbo.config.annotation.DubboReference; | import org.apache.dubbo.config.annotation.DubboReference; | ||||||
| import org.dromara.common.core.domain.R; | import org.dromara.common.core.domain.R; | ||||||
| @ -150,6 +151,10 @@ public class OpsInspectionTestTaskServiceImpl implements IOpsInspectionTestTaskS | |||||||
|         OpsInspectionTestTask update = MapstructUtils.convert(bo, OpsInspectionTestTask.class); |         OpsInspectionTestTask update = MapstructUtils.convert(bo, OpsInspectionTestTask.class); | ||||||
|         validEntityBeforeSave(update); |         validEntityBeforeSave(update); | ||||||
|  |  | ||||||
|  |         if(update == null){ | ||||||
|  |             return R.fail(); | ||||||
|  |         } | ||||||
|  |  | ||||||
|         OpsInspectionTestTaskVo oldVo = baseMapper.selectVoById(bo.getId()); |         OpsInspectionTestTaskVo oldVo = baseMapper.selectVoById(bo.getId()); | ||||||
|  |  | ||||||
|         if (!oldVo.getStatus().equals("5") && bo.getStatus().equals("5")){ |         if (!oldVo.getStatus().equals("5") && bo.getStatus().equals("5")){ | ||||||
| @ -170,7 +175,34 @@ public class OpsInspectionTestTaskServiceImpl implements IOpsInspectionTestTaskS | |||||||
|                 return R.fail("节点尚未全部完成"); |                 return R.fail("节点尚未全部完成"); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         boolean b = baseMapper.updateById(update) > 0; |  | ||||||
|  |         // 使用 UpdateWrapper 更新包括 null 的字段 | ||||||
|  |         UpdateWrapper<OpsInspectionTestTask> updateWrapper = new UpdateWrapper<>(); | ||||||
|  |         updateWrapper.eq("id", bo.getId()); | ||||||
|  |  | ||||||
|  |         // 手动设置需要更新的字段,包括可能为 null 的字段 | ||||||
|  |         updateWrapper.set("task_name", update.getTaskName()) | ||||||
|  |             .set("test_object", update.getTestObject()) | ||||||
|  |             .set("begin_time", update.getBeginTime()) | ||||||
|  |             .set("end_time", update.getEndTime()) | ||||||
|  |             .set("time_info", update.getTimeInfo()) | ||||||
|  |             .set("person", update.getPerson()) | ||||||
|  |             .set("status", update.getStatus()) | ||||||
|  |             .set("test_plan_id", update.getTestPlanId()) | ||||||
|  |             .set("test_setting", update.getTestSetting()) | ||||||
|  |             .set("plan_begin_time", update.getPlanBeginTime()) | ||||||
|  |             .set("fail_reason", update.getFailReason()) | ||||||
|  |             .set("fail_time", update.getFailTime()) | ||||||
|  |             .set("fail_phase", update.getFailPhase()) | ||||||
|  |             .set("faile_analyze", update.getFaileAnalyze()) | ||||||
|  |             .set("faile_tips", update.getFaileTips()) | ||||||
|  |             .set("test_long_time", update.getTestLongTime()) | ||||||
|  |             .set("test_final", update.getTestFinal()) | ||||||
|  |             .set("final_info", update.getFinalInfo()) | ||||||
|  |             .set("pause_for", update.getPauseFor()) | ||||||
|  |             .set("pause_time", update.getPauseTime()); | ||||||
|  |  | ||||||
|  |         boolean b = baseMapper.update(updateWrapper) > 0; | ||||||
|         if (b){ |         if (b){ | ||||||
|             return R.ok(); |             return R.ok(); | ||||||
|         }else { |         }else { | ||||||
|  | |||||||
| @ -0,0 +1,43 @@ | |||||||
|  | package org.dromara.monitoring.config; | ||||||
|  |  | ||||||
|  | public class SnowFlakeUtil { | ||||||
|  |     // 起始时间戳 | ||||||
|  |     private static final long startTimeStamp = 1577808000000L; | ||||||
|  |     // 机器ID | ||||||
|  |     private static final long workID = 1L; | ||||||
|  |     // 数据中心ID | ||||||
|  |     private static final long dataCenterID = 1L; | ||||||
|  |     // 序列号 | ||||||
|  |     private static long sequence = 0L; | ||||||
|  |     // 数据中心ID移动位数 | ||||||
|  |     private static final long dataCenterIndex = 12L; | ||||||
|  |     // 机器ID移动位数 | ||||||
|  |     private static final long workIDIndex = 17L; | ||||||
|  |     // 时间戳移动位数 | ||||||
|  |     private static final long timeStampIndex = 22L; | ||||||
|  |     // 记录上一次时间戳 | ||||||
|  |     private static long lastTimeStamp = -1L; | ||||||
|  |     // 序列号掩码 | ||||||
|  |     private static final long sequenceMask = -1L ^ (-1L << 12); | ||||||
|  |     public synchronized static long getID() { | ||||||
|  |         long now = System.currentTimeMillis(); | ||||||
|  |         if (now < lastTimeStamp) { | ||||||
|  |             throw new RuntimeException("时钟回拨异常"); | ||||||
|  |         } | ||||||
|  |         if (now == lastTimeStamp) { | ||||||
|  |             sequence = (sequence + 1) & sequenceMask; | ||||||
|  |             if (sequence == 0L) { | ||||||
|  |                 try { | ||||||
|  |                     Thread.sleep(1L); | ||||||
|  |                 } catch (InterruptedException e) { | ||||||
|  |                     throw new RuntimeException(e); | ||||||
|  |                 } | ||||||
|  |                 now = System.currentTimeMillis(); | ||||||
|  |             } | ||||||
|  |         } else { | ||||||
|  |             sequence = 0L; | ||||||
|  |         } | ||||||
|  |         lastTimeStamp = now; | ||||||
|  |         return ((now - startTimeStamp) << timeStampIndex) | (dataCenterID << dataCenterIndex) | (workID << workIDIndex) | sequence; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,16 @@ | |||||||
|  | package org.dromara.monitoring.config; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import lombok.Data; | ||||||
|  | import org.springframework.boot.context.properties.ConfigurationProperties; | ||||||
|  | import org.springframework.stereotype.Component; | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | @Component | ||||||
|  | @ConfigurationProperties(prefix = "ys7") | ||||||
|  | public class YsDto { | ||||||
|  |     private String appKey; | ||||||
|  |     private String appSecret; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,116 @@ | |||||||
|  | package org.dromara.monitoring.controller; | ||||||
|  |  | ||||||
|  | import cn.dev33.satoken.annotation.SaCheckPermission; | ||||||
|  | import jakarta.servlet.http.HttpServletResponse; | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.dromara.common.core.domain.R; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.excel.utils.ExcelUtil; | ||||||
|  | import org.dromara.common.idempotent.annotation.RepeatSubmit; | ||||||
|  | import org.dromara.common.log.annotation.Log; | ||||||
|  | import org.dromara.common.log.enums.BusinessType; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.web.core.BaseController; | ||||||
|  | import org.dromara.monitoring.domain.bo.MonDevicePresetBo; | ||||||
|  | import org.dromara.monitoring.domain.dto.DelYzd; | ||||||
|  | import org.dromara.monitoring.domain.vo.MonDevicePresetVo; | ||||||
|  | import org.dromara.monitoring.service.IMonDevicePresetService; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 摄像头预置位 | ||||||
|  |  * 前端访问路由地址为:/camera/devicePreset | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/devicePreset") | ||||||
|  | public class MonDevicePresetController extends BaseController { | ||||||
|  |  | ||||||
|  |     private final IMonDevicePresetService monDevicePresetService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询摄像头预置位列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("camera:devicePreset:list") | ||||||
|  |     @GetMapping("/list") | ||||||
|  |     public TableDataInfo<MonDevicePresetVo> list(MonDevicePresetBo bo, PageQuery pageQuery) { | ||||||
|  |         return monDevicePresetService.queryPageList(bo, pageQuery); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 导出摄像头预置位列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("camera:devicePreset:export") | ||||||
|  |     @Log(title = "摄像头预置位", businessType = BusinessType.EXPORT) | ||||||
|  |     @PostMapping("/export") | ||||||
|  |     public void export(MonDevicePresetBo bo, HttpServletResponse response) { | ||||||
|  |         List<MonDevicePresetVo> list = monDevicePresetService.queryList(bo); | ||||||
|  |         ExcelUtil.exportExcel(list, "摄像头预置位", MonDevicePresetVo.class, response); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取摄像头预置位详细信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("camera:devicePreset:query") | ||||||
|  |     @GetMapping("/{id}") | ||||||
|  |     public R<MonDevicePresetVo> getInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                      @PathVariable("id") Long id) { | ||||||
|  |         return R.ok(monDevicePresetService.queryById(id)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增摄像头预置位 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("camera:devicePreset:add") | ||||||
|  |     @Log(title = "摄像头预置位", businessType = BusinessType.INSERT) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PostMapping() | ||||||
|  |     public R<Void> add(@Validated(AddGroup.class) @RequestBody MonDevicePresetBo bo) { | ||||||
|  |         return toAjax(monDevicePresetService.insertByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改摄像头预置位 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("camera:devicePreset:edit") | ||||||
|  |     @Log(title = "摄像头预置位", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping() | ||||||
|  |     public R<Void> edit(@Validated(EditGroup.class) @RequestBody MonDevicePresetBo bo) { | ||||||
|  |         return toAjax(monDevicePresetService.updateByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 删除摄像头预置位 | ||||||
|  |      * | ||||||
|  |      * @param | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("camera:devicePreset:remove") | ||||||
|  |     @Log(title = "摄像头预置位", businessType = BusinessType.DELETE) | ||||||
|  |     @DeleteMapping("/delYzd") | ||||||
|  |     public R<Void> remove(@RequestBody List<DelYzd> yzd) { | ||||||
|  |         return toAjax(monDevicePresetService.deleteWithValidByIds(yzd, true)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Log(title = "调用摄像头预置位", businessType = BusinessType.DELETE) | ||||||
|  |     @PostMapping("/callYzd") | ||||||
|  |     public R<Void> invoking(@RequestBody List<DelYzd> yzd) { | ||||||
|  |         return toAjax(monDevicePresetService.invoking(yzd)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,69 @@ | |||||||
|  | package org.dromara.monitoring.controller; | ||||||
|  |  | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.dromara.common.core.domain.R; | ||||||
|  | import org.dromara.common.log.annotation.Log; | ||||||
|  | import org.dromara.common.log.enums.BusinessType; | ||||||
|  | import org.dromara.monitoring.domain.dto.DelYzd; | ||||||
|  | import org.dromara.monitoring.domain.dto.MonitoringListDto; | ||||||
|  | import org.dromara.monitoring.domain.vo.MonList; | ||||||
|  | import org.dromara.monitoring.domain.vo.MonYsVo; | ||||||
|  | import org.dromara.monitoring.service.MonitoringYsService; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  |  | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/monitoriing") | ||||||
|  | /** | ||||||
|  |  * 监控管理 | ||||||
|  |  */ | ||||||
|  | public class MonitoriingYsColltroller { | ||||||
|  |  | ||||||
|  |     private final MonitoringYsService monitoringYsService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      *  获取token | ||||||
|  |      */ | ||||||
|  |     @GetMapping("/getToken") | ||||||
|  |     @Log(title = "获取莹石云token", businessType = BusinessType.INSERT) | ||||||
|  |     public R<String> getysTokenColltroller(){ | ||||||
|  |         return R.ok("ok",monitoringYsService.getYsTokenService()); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      *  获取监控列表 | ||||||
|  |      */ | ||||||
|  |     @PostMapping("/getMonitoringList") | ||||||
|  |     @Log(title = "获取监控列表", businessType = BusinessType.INSERT) | ||||||
|  |     public R<MonList> getMonitoringList(@RequestBody MonitoringListDto dto){ | ||||||
|  |         return R.ok("请求成功",monitoringYsService.getMonitoringList(dto)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      *  获取大屏项目 | ||||||
|  |      */ | ||||||
|  |     @GetMapping("/getMonitoringDp") | ||||||
|  |     @Log(title = "数据组装", businessType = BusinessType.INSERT) | ||||||
|  |     public R<MonYsVo> getMonitoringDp(){ | ||||||
|  |         return R.ok("请求成功",monitoringYsService.getMonitoringDp()); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      *  抓拍 | ||||||
|  |      */ | ||||||
|  |     @GetMapping("/capturePho") | ||||||
|  |     @Log(title = "抓拍接口:未用", businessType = BusinessType.INSERT) | ||||||
|  |     public R<String> capturePho(@RequestBody DelYzd dto){ | ||||||
|  |         return R.ok("请求成功",monitoringYsService.capturePho(dto)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     @GetMapping("/test") | ||||||
|  |     public R<Void> test(){ | ||||||
|  |         return R.ok("请求成功",monitoringYsService.test()); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,59 @@ | |||||||
|  | package org.dromara.monitoring.domain; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableId; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.checkerframework.checker.i18nformatter.qual.I18nFormat; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 设备预置点记录 mon_device_preset | ||||||
|  |  */ | ||||||
|  | @TableName("mon_device_preset") | ||||||
|  | @Data | ||||||
|  | public class MonDevicePreset { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** 预置点ID */ | ||||||
|  |     @TableId(value = "id", type = com.baomidou.mybatisplus.annotation.IdType.AUTO) | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** 设备序列号 */ | ||||||
|  |     private String deviceSerial; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** 通道号 */ | ||||||
|  |     private Integer channelNo; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** 预置点序号 */ | ||||||
|  |     private Integer PresetIndex; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** 预置点名称 */ | ||||||
|  |     private String presetName; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /**创建时间 */ | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |     /**更新时间 */ | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,43 @@ | |||||||
|  | package org.dromara.monitoring.domain; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableId; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | @TableName("mon_equipment_histroy") | ||||||
|  | /** | ||||||
|  |  * 设备点击历史记录表 mon_equipment_histroy | ||||||
|  |  */ | ||||||
|  | public class MonEquipmentHistroy { | ||||||
|  |     /** 历史id */ | ||||||
|  |     @TableId(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** 设备序列号 */ | ||||||
|  |     private String deviceSerial; | ||||||
|  |  | ||||||
|  |     /** 设备名称 */ | ||||||
|  |     private String deviceName; | ||||||
|  |  | ||||||
|  |     /** 设备型号 */ | ||||||
|  |     private String deviceType; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** 用户id */ | ||||||
|  |     private Long userId; | ||||||
|  |  | ||||||
|  |     /** 部门id */ | ||||||
|  |     private Long deptId; | ||||||
|  |  | ||||||
|  |     /** 项目id */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** 点击时间 */ | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,60 @@ | |||||||
|  | package org.dromara.monitoring.domain; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableId; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 设备列表表 mon_equipment_list | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2023-08-09 | ||||||
|  |  */ | ||||||
|  | @TableName("mon_equipment_list") | ||||||
|  | @Data | ||||||
|  | public class MonEquipmentList { | ||||||
|  |  | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** 设备序列号 */ | ||||||
|  |     private String deviceSerial; | ||||||
|  |  | ||||||
|  |     /**设备名称	 */ | ||||||
|  |     private String deviceName; | ||||||
|  |  | ||||||
|  |     /**设备型号		 */ | ||||||
|  |     private String deviceType; | ||||||
|  |  | ||||||
|  |     /**设备在线状态,1-在线;0-离线	 */ | ||||||
|  |     private Integer status; | ||||||
|  |  | ||||||
|  |     /**布撤防状态	 */ | ||||||
|  |     private Integer defence; | ||||||
|  |  | ||||||
|  |     /**固件版本号	 */ | ||||||
|  |     private String deviceVersion; | ||||||
|  |  | ||||||
|  |     /**用户添加时间	 */ | ||||||
|  |     private LocalDateTime addTime; | ||||||
|  |  | ||||||
|  |     /**设备最后更新时间	 */ | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  |     /**设备二级类目名称	 */ | ||||||
|  |     private String parentCategory; | ||||||
|  |  | ||||||
|  |     /**设备风险安全等级,0-安全;大于0,有风险,风险越高,值越大	 */ | ||||||
|  |     private Integer riskLevel; | ||||||
|  |  | ||||||
|  |     /**设备IP地址	 */ | ||||||
|  |     private String netAddress; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     private Integer total; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,52 @@ | |||||||
|  | package org.dromara.monitoring.domain.bo; | ||||||
|  |  | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import jakarta.validation.constraints.*; | ||||||
|  | import org.dromara.monitoring.domain.MonDevicePreset; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 摄像头预置位业务对象 mon_device_preset | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = MonDevicePreset.class, reverseConvertGenerate = false) | ||||||
|  | public class MonDevicePresetBo extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备序列号 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "设备序列号不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String deviceSerial; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 通道号 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "通道号不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long channelNo; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预置点序号 | ||||||
|  |      */ | ||||||
|  |     private Long presetIndex; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预置点 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "预置点不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String presetName; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,92 @@ | |||||||
|  | package org.dromara.monitoring.domain.bo; | ||||||
|  |  | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import jakarta.validation.constraints.NotBlank; | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.monitoring.domain.MonEquipmentList; | ||||||
|  |  | ||||||
|  | import java.util.Date; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 设备列业务对象 mon_equipment_list | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-25 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = MonEquipmentList.class, reverseConvertGenerate = false) | ||||||
|  | public class MonEquipmentListBo extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键 | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备序列号 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "设备序列号不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String deviceSerial; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备名称 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "设备名称不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String deviceName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备型号 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "设备型号	不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String deviceType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备在线状态,1-在线;0-离线 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "设备在线状态,1-在线;0-离线不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long status; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 布撤防状态 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "布撤防状态不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long defence; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 固件版本号 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "固件版本号	不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String deviceVersion; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 用户添加时间 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "用户添加时间不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Date addTime; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备二级类目名称 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "设备二级类目名称不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String parentCategory; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备风险安全等级,0-安全;大于0,有风险,风险越高,值越大 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "设备风险安全等级,0-安全;大于0,有风险,风险越高,值越大不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long riskLevel; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备IP地址 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "设备IP地址不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String netAddress; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,26 @@ | |||||||
|  | package org.dromara.monitoring.domain.dto; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | /** | ||||||
|  |  * 删除预置点 | ||||||
|  |  */ | ||||||
|  | public class DelYzd { | ||||||
|  |  | ||||||
|  |     private Long id; | ||||||
|  |     /** | ||||||
|  |      *  设备序列号 | ||||||
|  |      */ | ||||||
|  |     private String deviceSerial; | ||||||
|  |     /** | ||||||
|  |      *  通道号 | ||||||
|  |      */ | ||||||
|  |     private Integer channelNo  = 1; | ||||||
|  |     /** | ||||||
|  |      *  预置点序号 | ||||||
|  |      */ | ||||||
|  |     private Integer presetIndex  ; | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,31 @@ | |||||||
|  | package org.dromara.monitoring.domain.dto; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.NonNull; | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | public class MonitoringListDto { | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页页码,起始页从0开始,不超过400页 | ||||||
|  |      */ | ||||||
|  |     private Integer pageStart; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 	分页大小,默认为10,不超过50 | ||||||
|  |      */ | ||||||
|  |     private Integer pageSize; | ||||||
|  |  | ||||||
|  | //    部门id | ||||||
|  |     @NotNull(message = "部门id不能为空") | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     @NotNull(message = "是否为历史数据") | ||||||
|  |     private Boolean isflow; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,62 @@ | |||||||
|  | package org.dromara.monitoring.domain.vo; | ||||||
|  |  | ||||||
|  | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import cn.idev.excel.annotation.ExcelProperty; | ||||||
|  | import org.dromara.common.excel.annotation.ExcelDictFormat; | ||||||
|  | import org.dromara.common.excel.convert.ExcelDictConvert; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.dromara.monitoring.domain.MonDevicePreset; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.util.Date; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 摄像头预置位视图对象 mon_device_preset | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | @AutoMapper(target = MonDevicePreset.class) | ||||||
|  | public class MonDevicePresetVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "主键id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备序列号 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "设备序列号") | ||||||
|  |     private String deviceSerial; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 通道号 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "通道号") | ||||||
|  |     private Long channelNo; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预置点序号 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "预置点序号") | ||||||
|  |     private Long presetIndex; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预置点 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "预置点") | ||||||
|  |     private String presetName; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,96 @@ | |||||||
|  | package org.dromara.monitoring.domain.vo; | ||||||
|  |  | ||||||
|  | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import cn.idev.excel.annotation.ExcelProperty; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.dromara.monitoring.domain.MonEquipmentList; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.util.Date; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 设备列视图对象 mon_equipment_list | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-25 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | @AutoMapper(target = MonEquipmentList.class) | ||||||
|  | public class MonEquipmentListVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "主键") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备序列号 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "设备序列号") | ||||||
|  |     private String deviceSerial; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备名称 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "设备名称	") | ||||||
|  |     private String deviceName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备型号 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "设备型号	") | ||||||
|  |     private String deviceType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备在线状态,1-在线;0-离线 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "设备在线状态,1-在线;0-离线") | ||||||
|  |     private Long status; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 布撤防状态 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "布撤防状态") | ||||||
|  |     private Long defence; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 固件版本号 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "固件版本号	") | ||||||
|  |     private String deviceVersion; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 用户添加时间 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "用户添加时间") | ||||||
|  |     private Date addTime; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备二级类目名称 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "设备二级类目名称") | ||||||
|  |     private String parentCategory; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备风险安全等级,0-安全;大于0,有风险,风险越高,值越大 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "设备风险安全等级,0-安全;大于0,有风险,风险越高,值越大") | ||||||
|  |     private Long riskLevel; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备IP地址 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "设备IP地址") | ||||||
|  |     private String netAddress; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,11 @@ | |||||||
|  | package org.dromara.monitoring.domain.vo; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | public class MonList { | ||||||
|  |  | ||||||
|  |     private Object object; | ||||||
|  |     private Integer sum; | ||||||
|  | } | ||||||
| @ -0,0 +1,23 @@ | |||||||
|  | package org.dromara.monitoring.domain.vo; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | public class MonYsVo { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 监控总数 | ||||||
|  |      */ | ||||||
|  |     private Integer sumMon; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 在线总数 | ||||||
|  |      */ | ||||||
|  |     private Long sumOnLine; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 离线总数 | ||||||
|  |      */ | ||||||
|  |     private Long sumOffLine; | ||||||
|  | } | ||||||
| @ -0,0 +1,17 @@ | |||||||
|  | package org.dromara.monitoring.mapper; | ||||||
|  |  | ||||||
|  | import org.apache.ibatis.annotations.Mapper; | ||||||
|  | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
|  | import org.dromara.monitoring.domain.MonDevicePreset; | ||||||
|  | import org.dromara.monitoring.domain.vo.MonDevicePresetVo; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 摄像头预置位Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Mapper | ||||||
|  | public interface MonDevicePresetMapper extends BaseMapperPlus<MonDevicePreset, MonDevicePresetVo> { | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,16 @@ | |||||||
|  | package org.dromara.monitoring.mapper; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
|  | import org.dromara.monitoring.domain.MonEquipmentList; | ||||||
|  | import org.dromara.monitoring.domain.vo.MonEquipmentListVo; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 设备列Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-25 | ||||||
|  |  */ | ||||||
|  | public interface MonEquipmentListMapper extends BaseMapperPlus<MonEquipmentList, MonEquipmentListVo> { | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,27 @@ | |||||||
|  | package org.dromara.monitoring.mapper; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import org.apache.ibatis.annotations.Delete; | ||||||
|  | import org.apache.ibatis.annotations.Mapper; | ||||||
|  | import org.apache.ibatis.annotations.Param; | ||||||
|  | import org.dromara.monitoring.domain.MonEquipmentHistroy; | ||||||
|  | import org.dromara.monitoring.domain.MonEquipmentList; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | @Mapper | ||||||
|  |     public interface MonitoringYsMapper { | ||||||
|  |  | ||||||
|  |  | ||||||
|  |      Integer setSunList(); | ||||||
|  |  | ||||||
|  |     void insettList(@Param("list") List<MonEquipmentList> tempList); | ||||||
|  |  | ||||||
|  |     void insertHistroy(@Param("data") List<MonEquipmentHistroy> data); | ||||||
|  |  | ||||||
|  |     @Delete("TRUNCATE TABLE mon_equipment_list") | ||||||
|  |     void delList(); | ||||||
|  |  | ||||||
|  |     List<MonEquipmentList> selDpList(); | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,18 @@ | |||||||
|  | package org.dromara.monitoring.monEnum; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | public enum ListConstant { | ||||||
|  |     PAGESTART(0), | ||||||
|  |     pageSize(300); | ||||||
|  |  | ||||||
|  |     private Integer constant; | ||||||
|  |  | ||||||
|  |     ListConstant(Integer constant) { | ||||||
|  |         this.constant = constant; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public Integer getConstant() { | ||||||
|  |         return constant; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,26 @@ | |||||||
|  | package org.dromara.monitoring.monEnum; | ||||||
|  |  | ||||||
|  | public enum QualityEnum { | ||||||
|  |  | ||||||
|  |     FLUENCY("流畅", "0"), | ||||||
|  |     HIGHDEFINITION("高清", "1"), | ||||||
|  |     CIF("4CIF", "2"), | ||||||
|  |     CIFG("1080P", "3"); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     private String name; | ||||||
|  |  | ||||||
|  |     private String value; | ||||||
|  |  | ||||||
|  |     private QualityEnum(String name, String value) { | ||||||
|  |         this.name = name; | ||||||
|  |         this.value = value; | ||||||
|  |     } | ||||||
|  |     public String getName() { | ||||||
|  |         return name; | ||||||
|  |     } | ||||||
|  |     public String getValue() { | ||||||
|  |         return value; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,36 @@ | |||||||
|  | package org.dromara.monitoring.monEnum; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | public enum YsPort { | ||||||
|  |     ON_OFF_LINE_TOPIC_TYP("设备在线状态类型","ys.onoffline"), | ||||||
|  |     GETTOKENURLBYPOST("获取token的url","https://open.ys7.com/api/lapp/token/get"), | ||||||
|  |     GETDEVICELISTURL("获取设备列表的url","https://open.ys7.com/api/lapp/device/list"), | ||||||
|  |     UPDATEDEVICENAMEURLBYPOST("修改设备名称的url","https://open.ys7.com/api/lapp/device/name/update"), | ||||||
|  |     ADDDEVICEPRESETURLBYPOST("添加设备预置点请求地址","https://open.ys7.com/api/lapp/device/preset/add"), | ||||||
|  |     MOVEDEVICEPRESETURLBYPOST("调用设备预置点请求地址","https://open.ys7.com/api/lapp/device/preset/move"), | ||||||
|  |     DELETEDEVICEPRESETURLBYPOST("删除设备预置点请求地址","https://open.ys7.com/api/lapp/device/preset/clear"), | ||||||
|  |     CAPTUREDEVICEURLBYPOST("设备拍照请求地址","https://open.ys7.com/api/lapp/device/capture"), | ||||||
|  |     DEVICESTORAGEMEDIUM ("设备存储介质格式化接口","https://open.ys7.com/api/v3/device/format/disk"), | ||||||
|  |     STORAGEMEDIUMSTATUS ("设备存储介质状态查询接口","https://open.ys7.com/api/v3/device/format/status"); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     // 成员变量 | ||||||
|  |     private final String sitename;  // 中文名称 | ||||||
|  |     private final String site; | ||||||
|  |  | ||||||
|  |     public String getSiteName() { | ||||||
|  |         return sitename; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public String getSite() { | ||||||
|  |         return site; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     YsPort(String sitename, String site) { | ||||||
|  |         this.sitename = sitename; | ||||||
|  |         this.site = site; | ||||||
|  |     } | ||||||
|  | } | ||||||
|  |  | ||||||
| @ -0,0 +1,70 @@ | |||||||
|  | package org.dromara.monitoring.service; | ||||||
|  |  | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.monitoring.domain.bo.MonDevicePresetBo; | ||||||
|  | import org.dromara.monitoring.domain.dto.DelYzd; | ||||||
|  | import org.dromara.monitoring.domain.vo.MonDevicePresetVo; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 摄像头预置位Service接口 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | public interface IMonDevicePresetService { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询摄像头预置位 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 摄像头预置位 | ||||||
|  |      */ | ||||||
|  |     MonDevicePresetVo queryById(Long id); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询摄像头预置位列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 摄像头预置位分页列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<MonDevicePresetVo> queryPageList(MonDevicePresetBo bo, PageQuery pageQuery); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的摄像头预置位列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 摄像头预置位列表 | ||||||
|  |      */ | ||||||
|  |     List<MonDevicePresetVo> queryList(MonDevicePresetBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增摄像头预置位 | ||||||
|  |      * | ||||||
|  |      * @param bo 摄像头预置位 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(MonDevicePresetBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改摄像头预置位 | ||||||
|  |      * | ||||||
|  |      * @param bo 摄像头预置位 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(MonDevicePresetBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除摄像头预置位信息 | ||||||
|  |      * | ||||||
|  |      * @param | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(List<DelYzd> yzd, Boolean isValid); | ||||||
|  |  | ||||||
|  |     boolean invoking(List<DelYzd> yzd); | ||||||
|  | } | ||||||
| @ -0,0 +1,69 @@ | |||||||
|  | package org.dromara.monitoring.service; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.monitoring.domain.bo.MonEquipmentListBo; | ||||||
|  | import org.dromara.monitoring.domain.vo.MonEquipmentListVo; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 设备列Service接口 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-25 | ||||||
|  |  */ | ||||||
|  | public interface IMonEquipmentListService { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询设备列 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 设备列 | ||||||
|  |      */ | ||||||
|  |     MonEquipmentListVo queryById(Long id); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询设备列列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 设备列分页列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<MonEquipmentListVo> queryPageList(MonEquipmentListBo bo, PageQuery pageQuery); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的设备列列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 设备列列表 | ||||||
|  |      */ | ||||||
|  |     List<MonEquipmentListVo> queryList(MonEquipmentListBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增设备列 | ||||||
|  |      * | ||||||
|  |      * @param bo 设备列 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(MonEquipmentListBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改设备列 | ||||||
|  |      * | ||||||
|  |      * @param bo 设备列 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(MonEquipmentListBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除设备列信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  | } | ||||||
| @ -0,0 +1,20 @@ | |||||||
|  | package org.dromara.monitoring.service; | ||||||
|  |  | ||||||
|  | import org.dromara.monitoring.domain.dto.DelYzd; | ||||||
|  | import org.dromara.monitoring.domain.dto.MonitoringListDto; | ||||||
|  | import org.dromara.monitoring.domain.vo.MonList; | ||||||
|  | import org.dromara.monitoring.domain.vo.MonYsVo; | ||||||
|  |  | ||||||
|  | public interface MonitoringYsService { | ||||||
|  |  | ||||||
|  |  | ||||||
|  |      String getYsTokenService(); | ||||||
|  |  | ||||||
|  |     MonList getMonitoringList(MonitoringListDto dto); | ||||||
|  |  | ||||||
|  |     MonYsVo getMonitoringDp(); | ||||||
|  |  | ||||||
|  |     String capturePho(DelYzd dto); | ||||||
|  |  | ||||||
|  |     Void test(); | ||||||
|  | } | ||||||
| @ -0,0 +1,206 @@ | |||||||
|  | package org.dromara.monitoring.service.impl; | ||||||
|  |  | ||||||
|  | import cn.hutool.http.HttpRequest; | ||||||
|  | import cn.hutool.json.JSONObject; | ||||||
|  | import cn.hutool.json.JSONUtil; | ||||||
|  | import org.dromara.common.core.utils.MapstructUtils; | ||||||
|  | import org.dromara.common.core.utils.StringUtils; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import lombok.extern.slf4j.Slf4j; | ||||||
|  | import org.dromara.monitoring.config.SnowFlakeUtil; | ||||||
|  | import org.dromara.monitoring.domain.MonDevicePreset; | ||||||
|  | import org.dromara.monitoring.domain.bo.MonDevicePresetBo; | ||||||
|  | import org.dromara.monitoring.domain.dto.DelYzd; | ||||||
|  | import org.dromara.monitoring.domain.vo.MonDevicePresetVo; | ||||||
|  | import org.dromara.monitoring.mapper.MonDevicePresetMapper; | ||||||
|  | import org.dromara.monitoring.monEnum.YsPort; | ||||||
|  | import org.dromara.monitoring.service.IMonDevicePresetService; | ||||||
|  | import org.dromara.monitoring.service.MonitoringYsService; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.stream.Collectors; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 摄像头预置位Service业务层处理 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Slf4j | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @Service | ||||||
|  | public class MonDevicePresetServiceImpl implements IMonDevicePresetService { | ||||||
|  |  | ||||||
|  |     private final MonDevicePresetMapper baseMapper; | ||||||
|  |  | ||||||
|  |     private  final MonitoringYsService monitoringYsService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询摄像头预置位 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 摄像头预置位 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public MonDevicePresetVo queryById(Long id){ | ||||||
|  |         return baseMapper.selectVoById(id); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询摄像头预置位列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 摄像头预置位分页列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public TableDataInfo<MonDevicePresetVo> queryPageList(MonDevicePresetBo bo, PageQuery pageQuery) { | ||||||
|  |         LambdaQueryWrapper<MonDevicePreset> lqw = buildQueryWrapper(bo); | ||||||
|  |         Page<MonDevicePresetVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); | ||||||
|  |         return TableDataInfo.build(result); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的摄像头预置位列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 摄像头预置位列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public List<MonDevicePresetVo> queryList(MonDevicePresetBo bo) { | ||||||
|  |         LambdaQueryWrapper<MonDevicePreset> lqw = buildQueryWrapper(bo); | ||||||
|  |         return baseMapper.selectVoList(lqw); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private LambdaQueryWrapper<MonDevicePreset> buildQueryWrapper(MonDevicePresetBo bo) { | ||||||
|  |         Map<String, Object> params = bo.getParams(); | ||||||
|  |         LambdaQueryWrapper<MonDevicePreset> lqw = Wrappers.lambdaQuery(); | ||||||
|  |         lqw.orderByAsc(MonDevicePreset::getId); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getDeviceSerial()), MonDevicePreset::getDeviceSerial, bo.getDeviceSerial()); | ||||||
|  |         lqw.eq(bo.getChannelNo() != null, MonDevicePreset::getChannelNo, bo.getChannelNo()); | ||||||
|  |         lqw.eq(bo.getPresetIndex() != null, MonDevicePreset::getPresetIndex, bo.getPresetIndex()); | ||||||
|  |         lqw.like(StringUtils.isNotBlank(bo.getPresetName()), MonDevicePreset::getPresetName, bo.getPresetName()); | ||||||
|  |         return lqw; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增摄像头预置位 | ||||||
|  |      * | ||||||
|  |      * @param bo 摄像头预置位 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean insertByBo(MonDevicePresetBo bo) { | ||||||
|  |         MonDevicePreset add = MapstructUtils.convert(bo, MonDevicePreset.class); | ||||||
|  |         validEntityBeforeSave(add); | ||||||
|  |         String jsonStr = HttpRequest | ||||||
|  |             .post(YsPort.ADDDEVICEPRESETURLBYPOST.getSite()). | ||||||
|  |             form("accessToken",monitoringYsService.getYsTokenService()) | ||||||
|  |             .form("deviceSerial", add.getDeviceSerial()) | ||||||
|  |             .form("channelNo", add.getChannelNo()) | ||||||
|  |             .execute().body(); | ||||||
|  |         JSONObject jsonObject = JSONUtil.parseObj(jsonStr.trim()); | ||||||
|  |  | ||||||
|  |         Map page1 = JSONUtil.parseObj(jsonObject.get("data")).toBean(Map.class); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         add.setPresetIndex(Integer.parseInt(page1.get("index").toString())); | ||||||
|  |         add.setId(SnowFlakeUtil.getID()); | ||||||
|  |  | ||||||
|  |         boolean flag = baseMapper.insert(add) > 0; | ||||||
|  |         if (flag) { | ||||||
|  |             bo.setId(add.getId()); | ||||||
|  |         } | ||||||
|  |         return flag; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改摄像头预置位 | ||||||
|  |      * | ||||||
|  |      * @param bo 摄像头预置位 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean updateByBo(MonDevicePresetBo bo) { | ||||||
|  |         MonDevicePreset update = MapstructUtils.convert(bo, MonDevicePreset.class); | ||||||
|  |         String jsonStr = HttpRequest | ||||||
|  |             .post(YsPort.ADDDEVICEPRESETURLBYPOST.getSite()). | ||||||
|  |             form("accessToken",monitoringYsService.getYsTokenService()) | ||||||
|  |             .form("deviceSerial", update.getDeviceSerial()) | ||||||
|  |             .form("channelNo", update.getChannelNo()) | ||||||
|  |             .execute().body(); | ||||||
|  |         JSONObject jsonObject = JSONUtil.parseObj(jsonStr.trim()); | ||||||
|  |  | ||||||
|  |         Map page1 = JSONUtil.parseObj(jsonObject.get("data")).toBean(Map.class); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         update.setPresetIndex(Integer.parseInt(page1.get("index").toString())); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         validEntityBeforeSave(update); | ||||||
|  |         return baseMapper.updateById(update) > 0; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 保存前的数据校验 | ||||||
|  |      */ | ||||||
|  |     private void validEntityBeforeSave(MonDevicePreset entity){ | ||||||
|  |         //TODO 做一些数据校验,如唯一约束 | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除摄像头预置位信息 | ||||||
|  |      * | ||||||
|  |      * @param | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean deleteWithValidByIds(List<DelYzd> yzd, Boolean isValid) { | ||||||
|  |         if(isValid){ | ||||||
|  |             if (yzd.size() >0){ | ||||||
|  |                 yzd.stream().forEach(temp ->{ | ||||||
|  |                      HttpRequest | ||||||
|  |                         .post(YsPort.DELETEDEVICEPRESETURLBYPOST.getSite()). | ||||||
|  |                         form("accessToken",monitoringYsService.getYsTokenService()) | ||||||
|  |                         .form("deviceSerial", temp.getDeviceSerial()) | ||||||
|  |                         .form("channelNo", temp.getChannelNo()) | ||||||
|  |                         .form("index", temp.getPresetIndex()) | ||||||
|  |                         .execute().body(); | ||||||
|  |                 }); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         Collection<Long> collect = yzd.stream().map(temp -> { | ||||||
|  |             return temp.getId(); | ||||||
|  |         }).collect(Collectors.toList()); | ||||||
|  |         return baseMapper.deleteByIds(collect) > 0; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public boolean invoking(List<DelYzd> yzd) { | ||||||
|  |         try { | ||||||
|  |             yzd.stream().forEach(temp ->{{ | ||||||
|  |                 HttpRequest | ||||||
|  |                     .post(YsPort.MOVEDEVICEPRESETURLBYPOST.getSite()). | ||||||
|  |                     form("accessToken",monitoringYsService.getYsTokenService()) | ||||||
|  |                     .form("deviceSerial", temp.getDeviceSerial()) | ||||||
|  |                     .form("channelNo", temp.getChannelNo()) | ||||||
|  |                     .form("index", temp.getPresetIndex()) | ||||||
|  |                     .execute().body(); | ||||||
|  |             }}); | ||||||
|  |         }catch (Exception e) { | ||||||
|  |             return false; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         return true; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,141 @@ | |||||||
|  | package org.dromara.monitoring.service.impl; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import lombok.extern.slf4j.Slf4j; | ||||||
|  | import org.dromara.common.core.utils.MapstructUtils; | ||||||
|  | import org.dromara.common.core.utils.StringUtils; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.monitoring.domain.MonEquipmentList; | ||||||
|  | import org.dromara.monitoring.domain.bo.MonEquipmentListBo; | ||||||
|  | import org.dromara.monitoring.domain.vo.MonEquipmentListVo; | ||||||
|  | import org.dromara.monitoring.mapper.MonEquipmentListMapper; | ||||||
|  | import org.dromara.monitoring.service.IMonEquipmentListService; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 设备列Service业务层处理 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-25 | ||||||
|  |  */ | ||||||
|  | @Slf4j | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @Service | ||||||
|  | public class MonEquipmentListServiceImpl implements IMonEquipmentListService { | ||||||
|  |  | ||||||
|  |     private final MonEquipmentListMapper baseMapper; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询设备列 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 设备列 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public MonEquipmentListVo queryById(Long id){ | ||||||
|  |         return baseMapper.selectVoById(id); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询设备列列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 设备列分页列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public TableDataInfo<MonEquipmentListVo> queryPageList(MonEquipmentListBo bo, PageQuery pageQuery) { | ||||||
|  |         LambdaQueryWrapper<MonEquipmentList> lqw = buildQueryWrapper(bo); | ||||||
|  |         Page<MonEquipmentListVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); | ||||||
|  |         return TableDataInfo.build(result); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的设备列列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 设备列列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public List<MonEquipmentListVo> queryList(MonEquipmentListBo bo) { | ||||||
|  |         LambdaQueryWrapper<MonEquipmentList> lqw = buildQueryWrapper(bo); | ||||||
|  |         return baseMapper.selectVoList(lqw); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private LambdaQueryWrapper<MonEquipmentList> buildQueryWrapper(MonEquipmentListBo bo) { | ||||||
|  |         Map<String, Object> params = bo.getParams(); | ||||||
|  |         LambdaQueryWrapper<MonEquipmentList> lqw = Wrappers.lambdaQuery(); | ||||||
|  |         lqw.orderByAsc(MonEquipmentList::getId); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getDeviceSerial()), MonEquipmentList::getDeviceSerial, bo.getDeviceSerial()); | ||||||
|  |         lqw.like(StringUtils.isNotBlank(bo.getDeviceName()), MonEquipmentList::getDeviceName, bo.getDeviceName()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getDeviceType()), MonEquipmentList::getDeviceType, bo.getDeviceType()); | ||||||
|  |         lqw.eq(bo.getStatus() != null, MonEquipmentList::getStatus, bo.getStatus()); | ||||||
|  |         lqw.eq(bo.getDefence() != null, MonEquipmentList::getDefence, bo.getDefence()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getDeviceVersion()), MonEquipmentList::getDeviceVersion, bo.getDeviceVersion()); | ||||||
|  |         lqw.eq(bo.getAddTime() != null, MonEquipmentList::getAddTime, bo.getAddTime()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getParentCategory()), MonEquipmentList::getParentCategory, bo.getParentCategory()); | ||||||
|  |         lqw.eq(bo.getRiskLevel() != null, MonEquipmentList::getRiskLevel, bo.getRiskLevel()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getNetAddress()), MonEquipmentList::getNetAddress, bo.getNetAddress()); | ||||||
|  |         return lqw; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增设备列 | ||||||
|  |      * | ||||||
|  |      * @param bo 设备列 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean insertByBo(MonEquipmentListBo bo) { | ||||||
|  |         MonEquipmentList add = MapstructUtils.convert(bo, MonEquipmentList.class); | ||||||
|  |         validEntityBeforeSave(add); | ||||||
|  |         boolean flag = baseMapper.insert(add) > 0; | ||||||
|  |         if (flag) { | ||||||
|  |             bo.setId(add.getId()); | ||||||
|  |         } | ||||||
|  |         return flag; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改设备列 | ||||||
|  |      * | ||||||
|  |      * @param bo 设备列 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean updateByBo(MonEquipmentListBo bo) { | ||||||
|  |         MonEquipmentList update = MapstructUtils.convert(bo, MonEquipmentList.class); | ||||||
|  |         validEntityBeforeSave(update); | ||||||
|  |         return baseMapper.updateById(update) > 0; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 保存前的数据校验 | ||||||
|  |      */ | ||||||
|  |     private void validEntityBeforeSave(MonEquipmentList entity){ | ||||||
|  |         //TODO 做一些数据校验,如唯一约束 | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除设备列信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | ||||||
|  |         if(isValid){ | ||||||
|  |             //TODO 做一些业务上的校验,判断是否需要校验 | ||||||
|  |         } | ||||||
|  |         return baseMapper.deleteByIds(ids) > 0; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,267 @@ | |||||||
|  | package org.dromara.monitoring.service.impl; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import cn.hutool.http.HttpRequest; | ||||||
|  | import cn.hutool.json.JSONArray; | ||||||
|  | import cn.hutool.json.JSONObject; | ||||||
|  | import cn.hutool.json.JSONUtil; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import lombok.extern.slf4j.Slf4j; | ||||||
|  | import org.dromara.common.core.utils.StringUtils; | ||||||
|  | import org.dromara.common.satoken.utils.LoginHelper; | ||||||
|  | import org.dromara.monitoring.config.SnowFlakeUtil; | ||||||
|  | import org.dromara.monitoring.config.YsDto; | ||||||
|  | import org.dromara.monitoring.domain.MonEquipmentHistroy; | ||||||
|  | import org.dromara.monitoring.domain.MonEquipmentList; | ||||||
|  | import org.dromara.monitoring.domain.dto.DelYzd; | ||||||
|  | import org.dromara.monitoring.domain.dto.MonitoringListDto; | ||||||
|  | import org.dromara.monitoring.domain.vo.MonList; | ||||||
|  | import org.dromara.monitoring.domain.vo.MonYsVo; | ||||||
|  | import org.dromara.monitoring.mapper.MonitoringYsMapper; | ||||||
|  | import org.dromara.monitoring.monEnum.ListConstant; | ||||||
|  | import org.dromara.monitoring.monEnum.QualityEnum; | ||||||
|  | import org.dromara.monitoring.monEnum.YsPort; | ||||||
|  | import org.dromara.monitoring.service.MonitoringYsService; | ||||||
|  | import org.springframework.cache.annotation.Cacheable; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | import java.util.stream.Collectors; | ||||||
|  |  | ||||||
|  | @Slf4j | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @Service | ||||||
|  | public class MonitoringYsServiceImpl implements MonitoringYsService { | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     private final YsDto ysDto; | ||||||
|  |  | ||||||
|  |     private final MonitoringYsMapper monitoringYsMapper; | ||||||
|  |  | ||||||
|  |     private final String GETDEVICELISTURL = "https://open.ys7.com/api/lapp/device/list"; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     @Cacheable(cacheNames = "opsMonToken#432000s") | ||||||
|  |     public String getYsTokenService() { | ||||||
|  |  | ||||||
|  |         String jsonStr = HttpRequest.post(YsPort.GETTOKENURLBYPOST.getSite()). | ||||||
|  |             form("appKey", ysDto.getAppKey()) | ||||||
|  |             .form("appSecret", ysDto.getAppSecret()) | ||||||
|  |             .execute().body(); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         JSONObject jsonObject = JSONUtil.parseObj(jsonStr.trim()); | ||||||
|  |         String accessToken = jsonObject.getJSONObject("data").getStr("accessToken"); | ||||||
|  |         return accessToken; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public MonList getMonitoringList(MonitoringListDto dto) { | ||||||
|  |  | ||||||
|  |         MonList monList = new MonList(); | ||||||
|  |  | ||||||
|  |         if (StringUtils.isEmpty(dto.getPageSize().toString())){ | ||||||
|  |             dto.setPageSize(ListConstant.pageSize.getConstant()); | ||||||
|  |             dto.setPageStart(ListConstant.PAGESTART.getConstant()); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  | //        分页查询 | ||||||
|  |         String jsonStr = HttpRequest | ||||||
|  |             .post(YsPort.GETDEVICELISTURL.getSite()). | ||||||
|  |             form("accessToken",getYsTokenService()) | ||||||
|  |             .form("pageStart",dto.getPageStart() - 1) | ||||||
|  |             .form("pageSize",dto.getPageSize()) | ||||||
|  |             .execute().body(); | ||||||
|  |  | ||||||
|  |         JSONObject jsonObject = JSONUtil.parseObj(jsonStr.trim()); | ||||||
|  |         List<MonEquipmentList> data = (List<MonEquipmentList>)jsonObject.get("data"); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         Map page1 = JSONUtil.parseObj(jsonObject.get("page")).toBean(Map.class); | ||||||
|  |         monList.setSum(Integer.parseInt(page1.get("total").toString())); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         if(dto.getPageSize() != ListConstant.pageSize.getConstant()&& dto.getIsflow()) { | ||||||
|  |  | ||||||
|  |             List<MonEquipmentHistroy> monEquipmentHistroys = new ArrayList<MonEquipmentHistroy>(); | ||||||
|  |             data = JSONUtil.toList(data.toString(), MonEquipmentList.class); | ||||||
|  |  | ||||||
|  |             data.stream().forEach(item -> { | ||||||
|  |                 MonEquipmentHistroy monEquipmentHistroy = new MonEquipmentHistroy(); | ||||||
|  |                 monEquipmentHistroy.setId(SnowFlakeUtil.getID()); | ||||||
|  |                 monEquipmentHistroy.setDeviceSerial(item.getDeviceSerial()); | ||||||
|  |                 monEquipmentHistroy.setDeviceName(item.getDeviceName()); | ||||||
|  |                 monEquipmentHistroy.setDeviceType(item.getDeviceType()); | ||||||
|  |                 monEquipmentHistroy.setUserId(LoginHelper.getUserId()); | ||||||
|  |                 monEquipmentHistroy.setDeptId(LoginHelper.getDeptId()); | ||||||
|  |                 monEquipmentHistroy.setProjectId(dto.getProjectId()); | ||||||
|  |                 monEquipmentHistroy.setCreateTime(LocalDateTime.now()); | ||||||
|  |                 monEquipmentHistroys.add(monEquipmentHistroy); | ||||||
|  |             }); | ||||||
|  |  | ||||||
|  | //        将返回的数据列为点击数据 | ||||||
|  |             if (monEquipmentHistroys.size() > 0) { | ||||||
|  |                 monitoringYsMapper.insertHistroy(monEquipmentHistroys); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |               monList.setObject(data); | ||||||
|  |  | ||||||
|  | //        查询所有并将数据存入数据库 :先判断数据库里是否有数据 | ||||||
|  |       Integer sum =   monitoringYsMapper.setSunList(); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         if(sum != Integer.parseInt(page1.get("total").toString())){ | ||||||
|  |             monitoringYsMapper.delList(); | ||||||
|  |             insertMonitoring(Integer.parseInt(page1.get("total").toString()),1); | ||||||
|  |         } | ||||||
|  |         return monList; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public MonYsVo getMonitoringDp() { | ||||||
|  |        List<MonEquipmentList> list = monitoringYsMapper.selDpList(); | ||||||
|  |         MonYsVo monYsVo = new MonYsVo(); | ||||||
|  |         if (list.size() > 0){ | ||||||
|  |             monYsVo.setSumMon(list.size()); | ||||||
|  |             long count = list.stream().filter(item -> item.getStatus() == 1).count(); | ||||||
|  |             monYsVo.setSumOnLine(count); | ||||||
|  |             monYsVo.setSumOffLine(list.size() - count); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         return monYsVo; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public String capturePho(DelYzd dto) { | ||||||
|  |         String temp = HttpRequest | ||||||
|  |             .post(YsPort.CAPTUREDEVICEURLBYPOST.getSite()). | ||||||
|  |             form("accessToken",getYsTokenService()) | ||||||
|  |             .form("deviceSerial",dto.getDeviceSerial()) | ||||||
|  |             .form("channelNo",dto.getChannelNo()) | ||||||
|  |             .form("quality", QualityEnum.HIGHDEFINITION.getValue()) | ||||||
|  |             .execute().body(); | ||||||
|  |         JSONObject jsonObject = JSONUtil.parseObj(temp.trim()); | ||||||
|  |         Map bean = JSONUtil.parseObj(jsonObject.get("data")).toBean(Map.class); | ||||||
|  |         /**Todo 后期照片需要对接ai识别 */ | ||||||
|  |         return bean.get("picUrl").toString(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Void test() { | ||||||
|  | //        查询所有的设备 | ||||||
|  |         List<MonEquipmentList> monEquipmentList = monitoringYsMapper.selDpList(); | ||||||
|  |  | ||||||
|  |         monEquipmentList.forEach(item -> { | ||||||
|  |             serialNumber(item); | ||||||
|  |         }); | ||||||
|  |         return null; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     //格式化存储 | ||||||
|  |     public void serialNumber(MonEquipmentList equipmentList){ | ||||||
|  |  | ||||||
|  |         ArrayList<String> temp = selSTORAGEMEDIUMSTATUS(equipmentList.getDeviceSerial()); | ||||||
|  |         if (temp.size() == 0)return; | ||||||
|  |  | ||||||
|  |         temp.forEach(s -> { | ||||||
|  |             HttpRequest | ||||||
|  |                 .put(YsPort.DEVICESTORAGEMEDIUM.getSite()) | ||||||
|  |                 .header("accessToken",getYsTokenService()) | ||||||
|  |                 .form("deviceSerial",equipmentList.getDeviceSerial()) | ||||||
|  |                 .form("diskIndex",s) | ||||||
|  |                 .execute().body(); | ||||||
|  |         }); | ||||||
|  |  | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询存储状态 | ||||||
|  |      * @param deviceSerial | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     public ArrayList<String> selSTORAGEMEDIUMSTATUS(String deviceSerial){ | ||||||
|  |  | ||||||
|  |         ArrayList<String> res = new ArrayList<>(); | ||||||
|  |         String body = HttpRequest | ||||||
|  |             .get(YsPort.STORAGEMEDIUMSTATUS.getSite()) | ||||||
|  |             .header("accessToken", getYsTokenService()) | ||||||
|  |             .form("deviceSerial", deviceSerial) | ||||||
|  |             .execute().body(); | ||||||
|  |  | ||||||
|  |         JSONObject jsonObject = JSONUtil.parseObj(body.trim()); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         Map bean = JSONUtil.parseObj(jsonObject.get("data")).toBean(Map.class); | ||||||
|  |  | ||||||
|  |         if (bean.get("storageStatus") == null){return res;} | ||||||
|  |  | ||||||
|  |         JSONArray objects = JSONUtil.parseArray( bean.get("storageStatus").toString()); | ||||||
|  |  | ||||||
|  |         if (objects != null && objects.size() > 0){ | ||||||
|  |             objects.stream().forEach(temp ->{ | ||||||
|  |                 Map temoMap = JSONUtil.parseObj(temp.toString()).toBean(Map.class); | ||||||
|  |                 res.add(temoMap.get("index").toString()); | ||||||
|  |             }); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         return res; | ||||||
|  |  | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     public void insertMonitoring(Integer sum,Integer start){ | ||||||
|  |         if (sum > 50){ | ||||||
|  |             String temp = HttpRequest | ||||||
|  |                 .post(YsPort.GETDEVICELISTURL.getSite()). | ||||||
|  |                 form("accessToken",getYsTokenService()) | ||||||
|  |                 .form("pageStart",start - 1) | ||||||
|  |                 .form("pageSize",50) | ||||||
|  |                 .execute().body(); | ||||||
|  |  | ||||||
|  |             JSONObject jsonTemp = JSONUtil.parseObj(temp.trim()); | ||||||
|  |             List<MonEquipmentList> tempList = (List<MonEquipmentList>)jsonTemp.get("data"); | ||||||
|  |             tempList = JSONUtil.toList(tempList.toString(), MonEquipmentList.class); | ||||||
|  |             List<MonEquipmentList> collect = tempList.stream().map(monEquipmentList -> { | ||||||
|  |  | ||||||
|  |                 monEquipmentList.setId(SnowFlakeUtil.getID()); | ||||||
|  |                 return monEquipmentList; | ||||||
|  |             }).collect(Collectors.toList()); | ||||||
|  |  | ||||||
|  |             monitoringYsMapper.insettList(collect); | ||||||
|  |             start++; | ||||||
|  |             sum = sum - 50; | ||||||
|  |             insertMonitoring(sum,start); | ||||||
|  |         }else { | ||||||
|  |             String temp = HttpRequest | ||||||
|  |                 .post(YsPort.GETDEVICELISTURL.getSite()). | ||||||
|  |                 form("accessToken",getYsTokenService()) | ||||||
|  |                 .form("pageStart",start - 1) | ||||||
|  |                 .form("pageSize",sum) | ||||||
|  |                 .execute().body(); | ||||||
|  |  | ||||||
|  |             JSONObject jsonTemp = JSONUtil.parseObj(temp.trim()); | ||||||
|  |             List<MonEquipmentList> tempList = (List<MonEquipmentList>)jsonTemp.get("data"); | ||||||
|  |             tempList = JSONUtil.toList(tempList.toString(), MonEquipmentList.class); | ||||||
|  |             List<MonEquipmentList> collect = tempList.stream().map(monEquipmentList -> { | ||||||
|  |  | ||||||
|  |                 monEquipmentList.setId(SnowFlakeUtil.getID()); | ||||||
|  |                 return monEquipmentList; | ||||||
|  |             }).collect(Collectors.toList()); | ||||||
|  |  | ||||||
|  |             monitoringYsMapper.insettList(collect); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,117 @@ | |||||||
|  | package org.dromara.personnel.controller; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import jakarta.servlet.http.HttpServletResponse; | ||||||
|  | import jakarta.validation.constraints.*; | ||||||
|  | import cn.dev33.satoken.annotation.SaCheckPermission; | ||||||
|  | import org.dromara.personnel.domain.dto.OpsBeipinBeijianDto; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsBeipinBeijianCountVo; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.dromara.common.idempotent.annotation.RepeatSubmit; | ||||||
|  | import org.dromara.common.log.annotation.Log; | ||||||
|  | import org.dromara.common.web.core.BaseController; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.core.domain.R; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.log.enums.BusinessType; | ||||||
|  | import org.dromara.common.excel.utils.ExcelUtil; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsBeipinBeijianVo; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsBeipinBeijianBo; | ||||||
|  | import org.dromara.personnel.service.IOpsBeipinBeijianService; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-备品配件 | ||||||
|  |  * 前端访问路由地址为:/personnel/beipinBeijian | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/beipinBeijian") | ||||||
|  | public class OpsBeipinBeijianController extends BaseController { | ||||||
|  |  | ||||||
|  |     private final IOpsBeipinBeijianService opsBeipinBeijianService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询运维-物资-备品配件列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:beipinBeijian:list") | ||||||
|  |     @GetMapping("/list") | ||||||
|  |     public TableDataInfo<OpsBeipinBeijianDto> list(OpsBeipinBeijianBo bo, PageQuery pageQuery) { | ||||||
|  |         return opsBeipinBeijianService.getList(bo, pageQuery); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询运维-物资-备品配件列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:beipinBeijian:list") | ||||||
|  |     @GetMapping("/getCount") | ||||||
|  |     public R<OpsBeipinBeijianCountVo> getCount(OpsBeipinBeijianBo bo) { | ||||||
|  |         return R.ok(opsBeipinBeijianService.getCount(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 导出运维-物资-备品配件列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:beipinBeijian:export") | ||||||
|  |     @Log(title = "运维-物资-备品配件", businessType = BusinessType.EXPORT) | ||||||
|  |     @PostMapping("/export") | ||||||
|  |     public void export(OpsBeipinBeijianBo bo, HttpServletResponse response) { | ||||||
|  |         List<OpsBeipinBeijianVo> list = opsBeipinBeijianService.queryList(bo); | ||||||
|  |         ExcelUtil.exportExcel(list, "运维-物资-备品配件", OpsBeipinBeijianVo.class, response); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取运维-物资-备品配件详细信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:beipinBeijian:query") | ||||||
|  |     @GetMapping("/{id}") | ||||||
|  |     public R<OpsBeipinBeijianVo> getInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                      @PathVariable("id") Long id) { | ||||||
|  |         return R.ok(opsBeipinBeijianService.queryById(id)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增运维-物资-备品配件 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:beipinBeijian:add") | ||||||
|  |     @Log(title = "运维-物资-备品配件", businessType = BusinessType.INSERT) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PostMapping() | ||||||
|  |     public R<Void> add(@Validated(AddGroup.class) @RequestBody OpsBeipinBeijianBo bo) { | ||||||
|  |         return toAjax(opsBeipinBeijianService.insertByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改运维-物资-备品配件 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:beipinBeijian:edit") | ||||||
|  |     @Log(title = "运维-物资-备品配件", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping() | ||||||
|  |     public R<Void> edit(@Validated(EditGroup.class) @RequestBody OpsBeipinBeijianBo bo) { | ||||||
|  |         return toAjax(opsBeipinBeijianService.updateByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 删除运维-物资-备品配件 | ||||||
|  |      * | ||||||
|  |      * @param ids 主键串 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:beipinBeijian:remove") | ||||||
|  |     @Log(title = "运维-物资-备品配件", businessType = BusinessType.DELETE) | ||||||
|  |     @DeleteMapping("/{ids}") | ||||||
|  |     public R<Void> remove(@NotEmpty(message = "主键不能为空") | ||||||
|  |                           @PathVariable("ids") Long[] ids) { | ||||||
|  |         return toAjax(opsBeipinBeijianService.deleteWithValidByIds(List.of(ids), true)); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,179 @@ | |||||||
|  | package org.dromara.personnel.controller; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import jakarta.servlet.http.HttpServletResponse; | ||||||
|  | import jakarta.validation.constraints.*; | ||||||
|  | import cn.dev33.satoken.annotation.SaCheckPermission; | ||||||
|  | import org.dromara.common.core.exception.ServiceException; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsCaigouPlanReq; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsCaigouPlanChanpinListVo; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsCaigouPlanChanpinVo; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsCaigouPlanCountVo; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.dromara.common.idempotent.annotation.RepeatSubmit; | ||||||
|  | import org.dromara.common.log.annotation.Log; | ||||||
|  | import org.dromara.common.web.core.BaseController; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.core.domain.R; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.log.enums.BusinessType; | ||||||
|  | import org.dromara.common.excel.utils.ExcelUtil; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsCaigouPlanVo; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsCaigouPlanBo; | ||||||
|  | import org.dromara.personnel.service.IOpsCaigouPlanService; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购计划单 | ||||||
|  |  * 前端访问路由地址为:/personnel/caigouPlan | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/caigouPlan") | ||||||
|  | public class OpsCaigouPlanController extends BaseController { | ||||||
|  |  | ||||||
|  |     private final IOpsCaigouPlanService opsCaigouPlanService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询运维-物资-采购计划单列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:caigouPlan:list") | ||||||
|  |     @GetMapping("/list") | ||||||
|  |     public TableDataInfo<OpsCaigouPlanVo> list(OpsCaigouPlanReq bo, PageQuery pageQuery) { | ||||||
|  |         return opsCaigouPlanService.queryPageList(bo, pageQuery); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 出入库表单新增修改获取产品列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:caigouPlan:list") | ||||||
|  |     @GetMapping("/getChanpinList") | ||||||
|  |     public R<List<OpsCaigouPlanChanpinListVo>> getChanpinList(OpsCaigouPlanReq bo) { | ||||||
|  |         return R.ok(opsCaigouPlanService.getChanpinList(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询运维-物资-采购计划单数量统计 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:caigouPlan:getCount") | ||||||
|  |     @GetMapping("/getCount") | ||||||
|  |     public R<List<OpsCaigouPlanCountVo>> getCount(Long projectId) { | ||||||
|  |         if (projectId == null) { | ||||||
|  |             throw new ServiceException("项目id不能为空!!!"); | ||||||
|  |         } | ||||||
|  |         return R.ok(opsCaigouPlanService.getCountVo(projectId)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询运维-物资-采购计划单年度金额 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:caigouPlan:getJinE") | ||||||
|  |     @GetMapping("/getJinE") | ||||||
|  |     public R<OpsCaigouPlanVo> getJinE(Long projectId) { | ||||||
|  |         if (projectId == null) { | ||||||
|  |             throw new ServiceException("项目id不能为空!!!"); | ||||||
|  |         } | ||||||
|  |         return R.ok(opsCaigouPlanService.getJinE(projectId)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 导出运维-物资-采购计划单列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:caigouPlan:export") | ||||||
|  |     @Log(title = "运维-物资-采购计划单", businessType = BusinessType.EXPORT) | ||||||
|  |     @PostMapping("/export") | ||||||
|  |     public void export(OpsCaigouPlanReq bo, HttpServletResponse response) { | ||||||
|  |         List<OpsCaigouPlanVo> list = opsCaigouPlanService.queryList(bo); | ||||||
|  |         ExcelUtil.exportExcel(list, "运维-物资-采购计划单", OpsCaigouPlanVo.class, response); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取运维-物资-采购计划单详细信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:caigouPlan:query") | ||||||
|  |     @GetMapping("/{id}") | ||||||
|  |     public R<OpsCaigouPlanVo> getInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                      @PathVariable("id") Long id) { | ||||||
|  |         return R.ok(opsCaigouPlanService.queryById(id)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增运维-物资-采购计划单 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:caigouPlan:add") | ||||||
|  |     @Log(title = "运维-物资-采购计划单", businessType = BusinessType.INSERT) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PostMapping() | ||||||
|  |     public R<Void> add(@Validated(AddGroup.class) @RequestBody OpsCaigouPlanBo bo) { | ||||||
|  |         return toAjax(opsCaigouPlanService.insertByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改运维-物资-采购计划单 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:caigouPlan:edit") | ||||||
|  |     @Log(title = "运维-物资-采购计划单", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping() | ||||||
|  |     public R<Void> edit(@Validated(EditGroup.class) @RequestBody OpsCaigouPlanBo bo) { | ||||||
|  |         return toAjax(opsCaigouPlanService.updateByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改运维-物资-采购计划单设置采购金额 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:caigouPlan:edit") | ||||||
|  |     @Log(title = "运维-物资-采购计划单", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping("/setJinE") | ||||||
|  |     public R<Void> setJinE(@RequestBody OpsCaigouPlanBo bo) { | ||||||
|  |         if (bo.getId() == null) { | ||||||
|  |             throw new ServiceException("id不能为空"); | ||||||
|  |         } | ||||||
|  |         if (bo.getShijiJine() == null) { | ||||||
|  |             throw new ServiceException("采购金额不能为空"); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         return toAjax(opsCaigouPlanService.setJinE(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改运维-物资-采购计划单确认采购完成 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:caigouPlan:edit") | ||||||
|  |     @Log(title = "运维-物资-采购计划单", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping("/editStatus") | ||||||
|  |     public R<Void> editStatus(@RequestBody OpsCaigouPlanBo bo) { | ||||||
|  |         if (bo.getId() == null) { | ||||||
|  |             throw new ServiceException("id不能为空"); | ||||||
|  |         } | ||||||
|  |         return toAjax(opsCaigouPlanService.editStatus(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 删除运维-物资-采购计划单 | ||||||
|  |      * | ||||||
|  |      * @param ids 主键串 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:caigouPlan:remove") | ||||||
|  |     @Log(title = "运维-物资-采购计划单", businessType = BusinessType.DELETE) | ||||||
|  |     @DeleteMapping("/{ids}") | ||||||
|  |     public R<Void> remove(@NotEmpty(message = "主键不能为空") | ||||||
|  |                           @PathVariable("ids") Long[] ids) { | ||||||
|  |         return toAjax(opsCaigouPlanService.deleteWithValidByIds(List.of(ids), true)); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,151 @@ | |||||||
|  | package org.dromara.personnel.controller; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import jakarta.servlet.http.HttpServletResponse; | ||||||
|  | import jakarta.validation.constraints.*; | ||||||
|  | import cn.dev33.satoken.annotation.SaCheckPermission; | ||||||
|  | import org.dromara.common.core.exception.ServiceException; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsChurukudanReq; | ||||||
|  | import org.dromara.personnel.domain.dto.OpsChurukudanCountDto; | ||||||
|  | import org.dromara.personnel.domain.dto.OpsChurukudanDayCountDto; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.dromara.common.idempotent.annotation.RepeatSubmit; | ||||||
|  | import org.dromara.common.log.annotation.Log; | ||||||
|  | import org.dromara.common.web.core.BaseController; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.core.domain.R; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.log.enums.BusinessType; | ||||||
|  | import org.dromara.common.excel.utils.ExcelUtil; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsChurukudanVo; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsChurukudanBo; | ||||||
|  | import org.dromara.personnel.service.IOpsChurukudanService; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-出入库单管理 | ||||||
|  |  * 前端访问路由地址为:/personnel/churukudan | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/churukudan") | ||||||
|  | public class OpsChurukudanController extends BaseController { | ||||||
|  |  | ||||||
|  |     private final IOpsChurukudanService opsChurukudanService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询运维-物资-出入库单管理列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:churukudan:list") | ||||||
|  |     @GetMapping("/list") | ||||||
|  |     public TableDataInfo<OpsChurukudanVo> list(OpsChurukudanReq bo, PageQuery pageQuery) { | ||||||
|  |         if (bo.getProjectId() == null) { | ||||||
|  |             throw new ServiceException("项目id不能为空!!!"); | ||||||
|  |         } | ||||||
|  |         return opsChurukudanService.queryPageList(bo, pageQuery); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询本月出入库类型 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:churukudan:list") | ||||||
|  |     @GetMapping("/getChuRuKuCount") | ||||||
|  |     public R<OpsChurukudanCountDto> getChuRuKuCount(OpsChurukudanReq bo) { | ||||||
|  |         if (bo.getProjectId() == null) { | ||||||
|  |             throw new ServiceException("项目id不能为空!!!"); | ||||||
|  |         } | ||||||
|  |         if (bo.getStartDate() == null || bo.getEndDate() == null) { | ||||||
|  |             throw new ServiceException("查询时间范围不能为空!!!"); | ||||||
|  |         } | ||||||
|  |         if (bo.getStartDate().isAfter(bo.getEndDate())) { | ||||||
|  |             throw new ServiceException("查询开始时间不能大于结束时间!!!"); | ||||||
|  |         } | ||||||
|  |         return R.ok(opsChurukudanService.getChuRuKuCount(bo)); | ||||||
|  |     } | ||||||
|  |     /** | ||||||
|  |      * 查询出入库月中每天的出入库数量 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:churukudan:list") | ||||||
|  |     @GetMapping("/getChuRuKuDayCount") | ||||||
|  |     public R<OpsChurukudanDayCountDto> getChuRuKuDayCount(OpsChurukudanReq bo) { | ||||||
|  |         if (bo.getProjectId() == null) { | ||||||
|  |             throw new ServiceException("项目id不能为空!!!"); | ||||||
|  |         } | ||||||
|  |         if (bo.getStartDate() == null || bo.getEndDate() == null) { | ||||||
|  |             throw new ServiceException("查询时间范围不能为空!!!"); | ||||||
|  |         } | ||||||
|  |         if (bo.getStartDate().isAfter(bo.getEndDate())) { | ||||||
|  |             throw new ServiceException("查询开始时间不能大于结束时间!!!"); | ||||||
|  |         } | ||||||
|  |         return R.ok(opsChurukudanService.getChuRuKuDayCount(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 导出运维-物资-出入库单管理列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:churukudan:export") | ||||||
|  |     @Log(title = "运维-物资-出入库单管理", businessType = BusinessType.EXPORT) | ||||||
|  |     @PostMapping("/export") | ||||||
|  |     public void export(OpsChurukudanReq bo, HttpServletResponse response) { | ||||||
|  |         if (bo.getProjectId() == null) { | ||||||
|  |             throw new ServiceException("项目id不能为空!!!"); | ||||||
|  |         } | ||||||
|  |         List<OpsChurukudanVo> list = opsChurukudanService.queryList(bo); | ||||||
|  |         ExcelUtil.exportExcel(list, "运维-物资-出入库单管理", OpsChurukudanVo.class, response); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取运维-物资-出入库单管理详细信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:churukudan:query") | ||||||
|  |     @GetMapping("/{id}") | ||||||
|  |     public R<OpsChurukudanVo> getInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                      @PathVariable("id") Long id) { | ||||||
|  |         return R.ok(opsChurukudanService.queryById(id)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增运维-物资-出入库单管理 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:churukudan:add") | ||||||
|  |     @Log(title = "运维-物资-出入库单管理", businessType = BusinessType.INSERT) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PostMapping() | ||||||
|  |     public R<Void> add(@Validated(AddGroup.class) @RequestBody OpsChurukudanBo bo) { | ||||||
|  |         return toAjax(opsChurukudanService.insertByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改运维-物资-出入库单管理 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:churukudan:edit") | ||||||
|  |     @Log(title = "运维-物资-出入库单管理", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping() | ||||||
|  |     public R<Void> edit(@Validated(EditGroup.class) @RequestBody OpsChurukudanBo bo) { | ||||||
|  |         return toAjax(opsChurukudanService.updateByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 删除运维-物资-出入库单管理 | ||||||
|  |      * | ||||||
|  |      * @param ids 主键串 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:churukudan:remove") | ||||||
|  |     @Log(title = "运维-物资-出入库单管理", businessType = BusinessType.DELETE) | ||||||
|  |     @DeleteMapping("/{ids}") | ||||||
|  |     public R<Void> remove(@NotEmpty(message = "主键不能为空") | ||||||
|  |                           @PathVariable("ids") Long[] ids) { | ||||||
|  |         return toAjax(opsChurukudanService.deleteWithValidByIds(List.of(ids), true)); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -81,6 +81,16 @@ public class OpsSchedulingController extends BaseController { | |||||||
|         return R.ok(opsSchedulingService.queryById(id)); |         return R.ok(opsSchedulingService.queryById(id)); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增运维-人员排班 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("personnel:scheduling:add") | ||||||
|  |     @Log(title = "运维-人员排班", businessType = BusinessType.INSERT) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PostMapping("/all") | ||||||
|  |     public R<Void> addAll(@Validated(AddGroup.class) @RequestBody OpsSchedulingBo bo) { | ||||||
|  |         return toAjax(opsSchedulingService.insertByBo(bo)); | ||||||
|  |     } | ||||||
|     /** |     /** | ||||||
|      * 新增运维-人员排班 |      * 新增运维-人员排班 | ||||||
|      */ |      */ | ||||||
| @ -89,7 +99,7 @@ public class OpsSchedulingController extends BaseController { | |||||||
|     @RepeatSubmit() |     @RepeatSubmit() | ||||||
|     @PostMapping() |     @PostMapping() | ||||||
|     public R<Void> add(@Validated(AddGroup.class) @RequestBody OpsSchedulingBo bo) { |     public R<Void> add(@Validated(AddGroup.class) @RequestBody OpsSchedulingBo bo) { | ||||||
|         return toAjax(opsSchedulingService.insertByBo(bo)); |         return toAjax(opsSchedulingService.insertOneByBo(bo)); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|  | |||||||
| @ -0,0 +1,131 @@ | |||||||
|  | package org.dromara.personnel.controller; | ||||||
|  |  | ||||||
|  | import java.io.IOException; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import jakarta.servlet.http.HttpServletResponse; | ||||||
|  | import jakarta.validation.constraints.*; | ||||||
|  | import cn.dev33.satoken.annotation.SaCheckPermission; | ||||||
|  | import org.springframework.transaction.annotation.Transactional; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.dromara.common.idempotent.annotation.RepeatSubmit; | ||||||
|  | import org.dromara.common.log.annotation.Log; | ||||||
|  | import org.dromara.common.web.core.BaseController; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.core.domain.R; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.log.enums.BusinessType; | ||||||
|  | import org.dromara.common.excel.utils.ExcelUtil; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsTenderSupplierInputVo; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsTenderSupplierInputBo; | ||||||
|  | import org.dromara.personnel.service.IOpsTenderSupplierInputService; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.springframework.web.multipart.MultipartFile; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 供应商入库 | ||||||
|  |  * 前端访问路由地址为:/personnel/tenderSupplierInput | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/tenderSupplierInput") | ||||||
|  | public class OpsTenderSupplierInputController extends BaseController { | ||||||
|  |  | ||||||
|  |     private final IOpsTenderSupplierInputService tenderSupplierInputService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询供应商入库列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("supplierInput:supplierInput:list") | ||||||
|  |     @GetMapping("/list") | ||||||
|  |     public TableDataInfo<OpsTenderSupplierInputVo> list(OpsTenderSupplierInputBo bo, PageQuery pageQuery) { | ||||||
|  |         return tenderSupplierInputService.queryPageList(bo, pageQuery); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询供应商入库列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("supplierInput:supplierInput:getList") | ||||||
|  |     @GetMapping("/getList") | ||||||
|  |     public R<List<OpsTenderSupplierInputVo>> list(OpsTenderSupplierInputBo bo) { | ||||||
|  |         return R.ok(tenderSupplierInputService.getList(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 导出供应商入库列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("supplierInput:supplierInput:export") | ||||||
|  |     @Log(title = "供应商入库", businessType = BusinessType.EXPORT) | ||||||
|  |     @PostMapping("/export") | ||||||
|  |     public void export(OpsTenderSupplierInputBo bo, HttpServletResponse response) { | ||||||
|  |         List<OpsTenderSupplierInputVo> list = tenderSupplierInputService.queryList(bo); | ||||||
|  |         ExcelUtil.exportExcel(list, "供应商入库", OpsTenderSupplierInputVo.class, response); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 导入供应商入库 入库资料文件只有导入后修改进行上传 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("supplierInput:supplierInput:import") | ||||||
|  |     @Log(title = "供应商入库", businessType = BusinessType.IMPORT) | ||||||
|  |     @PostMapping("/import") | ||||||
|  |     public R<Void> importData(Long projectId,@RequestParam("file") MultipartFile file) throws IOException { | ||||||
|  |         List<OpsTenderSupplierInputVo> tenderSupplierInputVos = ExcelUtil.importExcel(file.getInputStream(), OpsTenderSupplierInputVo.class); | ||||||
|  |  | ||||||
|  |         return toAjax(tenderSupplierInputService.importData(tenderSupplierInputVos,projectId)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取供应商入库详细信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("supplierInput:supplierInput:query") | ||||||
|  |     @GetMapping("/{id}") | ||||||
|  |     public R<OpsTenderSupplierInputVo> getInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                             @PathVariable Long id) { | ||||||
|  |         return R.ok(tenderSupplierInputService.queryById(id)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增供应商入库 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("supplierInput:supplierInput:add") | ||||||
|  |     @Log(title = "供应商入库", businessType = BusinessType.INSERT) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PostMapping() | ||||||
|  |     public R<Void> add(OpsTenderSupplierInputBo bo) { | ||||||
|  |         return toAjax(tenderSupplierInputService.insertByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改供应商入库 | ||||||
|  |      */ | ||||||
|  |     @Transactional | ||||||
|  |     @SaCheckPermission("supplierInput:supplierInput:edit") | ||||||
|  |     @Log(title = "供应商入库", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping() | ||||||
|  |     public R<Void> edit(OpsTenderSupplierInputBo bo) { | ||||||
|  |         return toAjax(tenderSupplierInputService.updateByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 删除供应商入库 | ||||||
|  |      * | ||||||
|  |      * @param ids 主键串 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("supplierInput:supplierInput:remove") | ||||||
|  |     @Log(title = "供应商入库", businessType = BusinessType.DELETE) | ||||||
|  |     @DeleteMapping("/{ids}") | ||||||
|  |     public R<Void> remove(@NotEmpty(message = "主键不能为空") | ||||||
|  |                           @PathVariable Long[] ids) { | ||||||
|  |         return toAjax(tenderSupplierInputService.deleteWithValidByIds(List.of(ids), true)); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,66 @@ | |||||||
|  | package org.dromara.personnel.domain; | ||||||
|  |  | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import com.baomidou.mybatisplus.annotation.*; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-备品配件对象 ops_beipin_beijian | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @TableName("ops_beipin_beijian") | ||||||
|  | public class OpsBeipinBeijian extends BaseEntity { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     @TableId(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备件编号 | ||||||
|  |      */ | ||||||
|  |     private String beijianNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备件名称 | ||||||
|  |      */ | ||||||
|  |     private String beijianName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备类型 | ||||||
|  |      */ | ||||||
|  |     private String shebeiType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 规格型号 | ||||||
|  |      */ | ||||||
|  |     private String guigexinghao; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 库存状态(待定) | ||||||
|  |      */ | ||||||
|  |     private String kucunStatus; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 库存数量 | ||||||
|  |      */ | ||||||
|  |     private Long kucunCount; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,130 @@ | |||||||
|  | package org.dromara.personnel.domain; | ||||||
|  |  | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import com.baomidou.mybatisplus.annotation.*; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  |  | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.Date; | ||||||
|  | import com.fasterxml.jackson.annotation.JsonFormat; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购计划单对象 ops_caigou_plan | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @TableName("ops_caigou_plan") | ||||||
|  | public class OpsCaigouPlan extends BaseEntity { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     @TableId(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 计划名称 | ||||||
|  |      */ | ||||||
|  |     private String jihuaName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 计划编号 | ||||||
|  |      */ | ||||||
|  |     private String jihuaBianhao; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 采购单位(当前登录人部门) | ||||||
|  |      */ | ||||||
|  |     private Long caigouDanwei; | ||||||
|  |     private String caigouDanweiName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经办人 | ||||||
|  |      */ | ||||||
|  |     private Long jingbanren; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经办人名称 | ||||||
|  |      */ | ||||||
|  |     private String jingbanrenName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同类型 | ||||||
|  |      */ | ||||||
|  |     private String hetonType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 采购类型 | ||||||
|  |      */ | ||||||
|  |     private String caigouType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 仓库地址 | ||||||
|  |      */ | ||||||
|  |     private String cangkuUrl; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同名称 | ||||||
|  |      */ | ||||||
|  |     private String hetonName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 供应商id | ||||||
|  |      */ | ||||||
|  |     private Long gonyingshangId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 出货时间 | ||||||
|  |      */ | ||||||
|  |     private Date chuhuoTime; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 付款条件 | ||||||
|  |      */ | ||||||
|  |     private String fukuantiaojian; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 发票开具方式 | ||||||
|  |      */ | ||||||
|  |     private String fapiaoKjfs; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 提交状态(1、草稿,2、已提交) | ||||||
|  |      */ | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 审核状态 | ||||||
|  |      */ | ||||||
|  |     private String shenheStatus; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预计金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal yujiJine; | ||||||
|  |     /** | ||||||
|  |      * 实际已采购金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal shijiJine; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 申请原因 | ||||||
|  |      */ | ||||||
|  |     private String reason; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,87 @@ | |||||||
|  | package org.dromara.personnel.domain; | ||||||
|  |  | ||||||
|  | import cn.idev.excel.annotation.ExcelProperty; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import com.baomidou.mybatisplus.annotation.*; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购申请计划-产品信息对象 ops_caigou_plan_chanpin | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @TableName("ops_caigou_plan_chanpin") | ||||||
|  | public class OpsCaigouPlanChanpin extends BaseEntity { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     @TableId(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 采购申请计划id | ||||||
|  |      */ | ||||||
|  |     private Long caigouPlanId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备类型 | ||||||
|  |      */ | ||||||
|  |     private String shebeiType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品编号 | ||||||
|  |      */ | ||||||
|  |     private String chanpinBianhao; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品名称 | ||||||
|  |      */ | ||||||
|  |     private String chanpinName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品型号 | ||||||
|  |      */ | ||||||
|  |     private String chanpinType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品单价 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal chanpinMonovalent; | ||||||
|  |     /** | ||||||
|  |      * 总价 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal totalPrice; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 购买数量 | ||||||
|  |      */ | ||||||
|  |     private Long goumaiNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单位 | ||||||
|  |      */ | ||||||
|  |     private String danwei; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 用途 | ||||||
|  |      */ | ||||||
|  |     private String yontu; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,51 @@ | |||||||
|  | package org.dromara.personnel.domain; | ||||||
|  |  | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import com.baomidou.mybatisplus.annotation.*; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购申请计划文件对象 ops_caigou_plan_files | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @TableName("ops_caigou_plan_files") | ||||||
|  | public class OpsCaigouPlanFiles extends BaseEntity { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     @TableId(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 采购申请计划id | ||||||
|  |      */ | ||||||
|  |     private Long caigouPlanId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件id | ||||||
|  |      */ | ||||||
|  |     private Long fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件地址 | ||||||
|  |      */ | ||||||
|  |     private String fileUrl; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件名称 | ||||||
|  |      */ | ||||||
|  |     private String fileName; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,81 @@ | |||||||
|  | package org.dromara.personnel.domain; | ||||||
|  |  | ||||||
|  | import jakarta.validation.constraints.NotBlank; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import com.baomidou.mybatisplus.annotation.*; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-出入库单管理对象 ops_churukudan | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @TableName("ops_churukudan") | ||||||
|  | public class OpsChurukudan extends BaseEntity { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     @TableId(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据编号 | ||||||
|  |      */ | ||||||
|  |     private String danjvNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品id | ||||||
|  |      */ | ||||||
|  |     private Long chanpinId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品名称 | ||||||
|  |      */ | ||||||
|  |     private String chanpinName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经手人id | ||||||
|  |      */ | ||||||
|  |     private Long jingshourenId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经手人 | ||||||
|  |      */ | ||||||
|  |     private String jingshourenName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 联系电话 | ||||||
|  |      */ | ||||||
|  |     private String contactNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 总数量 | ||||||
|  |      */ | ||||||
|  |     private Long zonNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 审核状态 | ||||||
|  |      */ | ||||||
|  |     private String shenheStatus; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据状态(1、出库单,2入库单) | ||||||
|  |      */ | ||||||
|  |     private String danjvType; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,188 @@ | |||||||
|  | package org.dromara.personnel.domain; | ||||||
|  |  | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import com.baomidou.mybatisplus.annotation.*; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import java.util.Date; | ||||||
|  | import com.fasterxml.jackson.annotation.JsonFormat; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 供应商入库对象 ops_tender_supplier_input | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @TableName("ops_tender_supplier_input") | ||||||
|  | public class OpsTenderSupplierInput extends BaseEntity { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * | ||||||
|  |      */ | ||||||
|  |     @TableId(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 企业登记注册类型 | ||||||
|  |      */ | ||||||
|  |     private String supplierType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 企业名称 | ||||||
|  |      */ | ||||||
|  |     private String supplierName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 企业法定代表人 | ||||||
|  |      */ | ||||||
|  |     private String supplierPerson; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 统一社会信用代码 | ||||||
|  |      */ | ||||||
|  |     private String supplierCode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 企业注册地址 | ||||||
|  |      */ | ||||||
|  |     private String supplierAddres; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 负责人姓名 | ||||||
|  |      */ | ||||||
|  |     private String personName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 负责人联系电话 | ||||||
|  |      */ | ||||||
|  |     private String personPhone; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开户行户名 | ||||||
|  |      */ | ||||||
|  |     private String bankPersonName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开户银行 | ||||||
|  |      */ | ||||||
|  |     private String bankName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开户行账号 | ||||||
|  |      */ | ||||||
|  |     private String bankAccount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 纳税规模 | ||||||
|  |      */ | ||||||
|  |     private String taxScale; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经营范围 | ||||||
|  |      */ | ||||||
|  |     private String scope; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 企业资质等级 | ||||||
|  |      */ | ||||||
|  |     private String supplierLivel; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 发证日期 | ||||||
|  |      */ | ||||||
|  |     private Date issueDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 证书有效期 | ||||||
|  |      */ | ||||||
|  |     private Date certificateValidity; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 近三年营业额 | ||||||
|  |      */ | ||||||
|  |     private String pastThreeYears; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 安全生产许可证编号 | ||||||
|  |      */ | ||||||
|  |     private String safeCode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 安全生产许可证发证日期 | ||||||
|  |      */ | ||||||
|  |     private String safeCodeData; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 安全证书有效期 | ||||||
|  |      */ | ||||||
|  |     private String safeCertificateValidity; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 注册造价工程师数量 | ||||||
|  |      */ | ||||||
|  |     private Long registeredEngineerNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 一级建造工程师数量 | ||||||
|  |      */ | ||||||
|  |     private Long firstBuildingNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 二级建造工程师数量 | ||||||
|  |      */ | ||||||
|  |     private Long secondBuildingNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 其他建造师数量 | ||||||
|  |      */ | ||||||
|  |     private Long otherBuildingNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 高级工程师数量 | ||||||
|  |      */ | ||||||
|  |     private Long seniorEngineerNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 工程师数量 | ||||||
|  |      */ | ||||||
|  |     private Long engineerNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 助理工程师数量 | ||||||
|  |      */ | ||||||
|  |     private Long assistantEngineerNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 其他人员数量 | ||||||
|  |      */ | ||||||
|  |     private Long otherPersonnelNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 存储文件ID | ||||||
|  |      */ | ||||||
|  |     private Long fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 入库资料 | ||||||
|  |      */ | ||||||
|  |     private String inputFile; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 审核状态 | ||||||
|  |      */ | ||||||
|  |     private String state; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,69 @@ | |||||||
|  | package org.dromara.personnel.domain.bo; | ||||||
|  |  | ||||||
|  | import org.dromara.personnel.domain.OpsBeipinBeijian; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import jakarta.validation.constraints.*; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-备品配件业务对象 ops_beipin_beijian | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = OpsBeipinBeijian.class, reverseConvertGenerate = false) | ||||||
|  | public class OpsBeipinBeijianBo extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备件编号 | ||||||
|  |      */ | ||||||
|  |     private String beijianNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备件名称 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "备件名称不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String beijianName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备类型 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "设备类型不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String shebeiType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 规格型号 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "规格型号不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String guigexinghao; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 库存状态(待定) | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "库存状态(待定)不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String kucunStatus; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 库存数量 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "库存数量不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long kucunCount; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,151 @@ | |||||||
|  | package org.dromara.personnel.domain.bo; | ||||||
|  |  | ||||||
|  | import org.dromara.personnel.domain.OpsCaigouPlan; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import jakarta.validation.constraints.*; | ||||||
|  |  | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.Date; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | import com.fasterxml.jackson.annotation.JsonFormat; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购计划单业务对象 ops_caigou_plan | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = OpsCaigouPlan.class, reverseConvertGenerate = false) | ||||||
|  | public class OpsCaigouPlanBo extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 计划名称 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "计划名称不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String jihuaName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 计划编号 | ||||||
|  |      */ | ||||||
|  | //    @NotBlank(message = "计划编号不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String jihuaBianhao; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 采购单位(当前登录人部门) | ||||||
|  |      */ | ||||||
|  | //    @NotNull(message = "采购单位(当前登录人部门)不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long caigouDanwei; | ||||||
|  |  | ||||||
|  |     private String caigouDanweiName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经办人 | ||||||
|  |      */ | ||||||
|  | //    @NotNull(message = "经办人不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long jingbanren; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经办人名称 | ||||||
|  |      */ | ||||||
|  | //    @NotBlank(message = "经办人名称不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String jingbanrenName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同类型 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "合同类型不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String hetonType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 采购类型 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "采购类型不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String caigouType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 仓库地址 | ||||||
|  |      */ | ||||||
|  | //    @NotBlank(message = "仓库地址不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String cangkuUrl; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同名称 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "合同名称不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String hetonName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 供应商id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "供应商id不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long gonyingshangId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 出货时间 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "出货时间不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Date chuhuoTime; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 付款条件 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "付款条件不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String fukuantiaojian; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 发票开具方式 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "发票开具方式不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String fapiaoKjfs; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 提交状态(1、草稿,2、已提交) | ||||||
|  |      */ | ||||||
|  | //    @NotBlank(message = "提交状态(1、草稿,2、已提交)不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预计金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal yujiJine; | ||||||
|  |     /** | ||||||
|  |      * 实际已采购金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal shijiJine; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 申请原因 | ||||||
|  |      */ | ||||||
|  |     private String reason; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 附件 | ||||||
|  |      */ | ||||||
|  |     private List<OpsCaigouPlanFilesBo>  opsCaigouPlanFilesBos; | ||||||
|  |     /** | ||||||
|  |      * 产品信息 | ||||||
|  |      */ | ||||||
|  |     private List<OpsCaigouPlanChanpinBo> opsCaigouPlanChanpinBos; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,92 @@ | |||||||
|  | package org.dromara.personnel.domain.bo; | ||||||
|  |  | ||||||
|  | import cn.idev.excel.annotation.ExcelProperty; | ||||||
|  | import org.dromara.personnel.domain.OpsCaigouPlanChanpin; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import jakarta.validation.constraints.*; | ||||||
|  |  | ||||||
|  | import java.math.BigDecimal; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购申请计划-产品信息业务对象 ops_caigou_plan_chanpin | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = OpsCaigouPlanChanpin.class, reverseConvertGenerate = false) | ||||||
|  | public class OpsCaigouPlanChanpinBo extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 采购申请计划id | ||||||
|  |      */ | ||||||
|  | //    @NotNull(message = "采购申请计划id不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long caigouPlanId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备类型 | ||||||
|  |      */ | ||||||
|  |     private String shebeiType; | ||||||
|  |     /** | ||||||
|  |      * 产品编号 | ||||||
|  |      */ | ||||||
|  |     private String chanpinBianhao; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品名称 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "产品名称不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String chanpinName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品型号 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "产品型号不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String chanpinType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品单价 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "产品单价不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private BigDecimal chanpinMonovalent; | ||||||
|  |     /** | ||||||
|  |      * 总价 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal totalPrice; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 购买数量 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "购买数量不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long goumaiNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单位 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "单位不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String danwei; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 用途 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "用途不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String yontu; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,53 @@ | |||||||
|  | package org.dromara.personnel.domain.bo; | ||||||
|  |  | ||||||
|  | import org.dromara.personnel.domain.OpsCaigouPlanFiles; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import jakarta.validation.constraints.*; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购申请计划文件业务对象 ops_caigou_plan_files | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = OpsCaigouPlanFiles.class, reverseConvertGenerate = false) | ||||||
|  | public class OpsCaigouPlanFilesBo extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 采购申请计划id | ||||||
|  |      */ | ||||||
|  | //    @NotNull(message = "采购申请计划id不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long caigouPlanId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "文件id不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件地址 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "文件地址不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String fileUrl; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件名称 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "文件名称不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String fileName; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,57 @@ | |||||||
|  | package org.dromara.personnel.domain.bo; | ||||||
|  |  | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import jakarta.validation.constraints.NotBlank; | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.personnel.domain.OpsCaigouPlan; | ||||||
|  |  | ||||||
|  | import java.util.Date; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购计划单业务对象 ops_caigou_plan | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = OpsCaigouPlan.class, reverseConvertGenerate = false) | ||||||
|  | public class OpsCaigouPlanReq extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 计划名称 | ||||||
|  |      */ | ||||||
|  |     private String jihuaName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 计划编号 | ||||||
|  |      */ | ||||||
|  |     private String jihuaBianhao; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 提交状态(1、草稿,2、已提交) | ||||||
|  |      */ | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,83 @@ | |||||||
|  | package org.dromara.personnel.domain.bo; | ||||||
|  |  | ||||||
|  | import org.dromara.personnel.domain.OpsChurukudan; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import jakarta.validation.constraints.*; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-出入库单管理业务对象 ops_churukudan | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = OpsChurukudan.class, reverseConvertGenerate = false) | ||||||
|  | public class OpsChurukudanBo extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据编号 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "单据编号不能为空", groups = { EditGroup.class }) | ||||||
|  |     private String danjvNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "产品不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long chanpinId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品名称 | ||||||
|  |      */ | ||||||
|  |     private String chanpinName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经手人id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "经手人id不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long jingshourenId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经手人 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "经手人不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String jingshourenName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 联系电话 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "联系电话不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String contactNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 总数量 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "总数量不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long zonNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 审核状态 | ||||||
|  |      */ | ||||||
|  |     private String shenheStatus; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据状态(1、出库单,2入库单) | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "单据状态(1、出库单,2入库单)不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String danjvType; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,57 @@ | |||||||
|  | package org.dromara.personnel.domain.bo; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDate; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-出入库单管理业务对象 ops_churukudan | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class OpsChurukudanReq implements Serializable { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据编号 | ||||||
|  |      */ | ||||||
|  |     private String danjvNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备类型 | ||||||
|  |      */ | ||||||
|  |     private String shebeiType; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 审核状态 | ||||||
|  |      */ | ||||||
|  |     private String shenheStatus; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据状态(1、出库单,2入库单) | ||||||
|  |      */ | ||||||
|  |     private String danjvType; | ||||||
|  |     /** | ||||||
|  |      * 查询开始时间 | ||||||
|  |      */ | ||||||
|  |     private LocalDate startDate; | ||||||
|  |     /** | ||||||
|  |      * | ||||||
|  |      * 查询结束时间 | ||||||
|  |      */ | ||||||
|  |     private LocalDate endDate; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,216 @@ | |||||||
|  | package org.dromara.personnel.domain.bo; | ||||||
|  |  | ||||||
|  | import org.dromara.personnel.domain.OpsTenderSupplierInput; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import jakarta.validation.constraints.*; | ||||||
|  | import java.util.Date; | ||||||
|  | import com.fasterxml.jackson.annotation.JsonFormat; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 供应商入库业务对象 ops_tender_supplier_input | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = OpsTenderSupplierInput.class, reverseConvertGenerate = false) | ||||||
|  | public class OpsTenderSupplierInputBo extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 企业登记注册类型 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "企业登记注册类型不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String supplierType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 企业名称 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "企业名称不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String supplierName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 企业法定代表人 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "企业法定代表人不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String supplierPerson; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 统一社会信用代码 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "统一社会信用代码不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String supplierCode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 企业注册地址 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "企业注册地址不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String supplierAddres; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 负责人姓名 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "负责人姓名不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String personName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 负责人联系电话 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "负责人联系电话不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String personPhone; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开户行户名 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "开户行户名不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String bankPersonName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开户银行 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "开户银行不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String bankName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开户行账号 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "开户行账号不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String bankAccount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 纳税规模 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "纳税规模不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String taxScale; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经营范围 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "经营范围不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String scope; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 企业资质等级 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "企业资质等级不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String supplierLivel; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 发证日期 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "发证日期不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Date issueDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 证书有效期 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "证书有效期不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Date certificateValidity; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 近三年营业额 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "近三年营业额不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String pastThreeYears; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 安全生产许可证编号 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "安全生产许可证编号不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String safeCode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 安全生产许可证发证日期 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "安全生产许可证发证日期不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String safeCodeData; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 安全证书有效期 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "安全证书有效期不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String safeCertificateValidity; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 注册造价工程师数量 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "注册造价工程师数量不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long registeredEngineerNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 一级建造工程师数量 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "一级建造工程师数量不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long firstBuildingNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 二级建造工程师数量 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "二级建造工程师数量不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long secondBuildingNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 其他建造师数量 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "其他建造师数量不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long otherBuildingNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 高级工程师数量 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "高级工程师数量不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long seniorEngineerNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 工程师数量 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "工程师数量不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long engineerNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 助理工程师数量 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "助理工程师数量不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long assistantEngineerNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 其他人员数量 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "其他人员数量不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long otherPersonnelNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 存储文件ID | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "存储文件ID不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 入库资料 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "入库资料不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String inputFile; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 审核状态 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "审核状态不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String state; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -12,6 +12,7 @@ import org.dromara.personnel.domain.OpsSchedulingDate; | |||||||
|  |  | ||||||
| import java.io.Serializable; | import java.io.Serializable; | ||||||
| import java.time.LocalTime; | import java.time.LocalTime; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 运维-排班时间类型业务对象 ops_scheduling_date |  * 运维-排班时间类型业务对象 ops_scheduling_date | ||||||
| @ -24,7 +25,7 @@ public class SchedulingUserTypeBo implements Serializable { | |||||||
|     /** |     /** | ||||||
|      * 运维人员id |      * 运维人员id | ||||||
|      */ |      */ | ||||||
|     private Long opsUserId; |     private List<Long> opsUserId; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 排班类型id |      * 排班类型id | ||||||
|  | |||||||
| @ -0,0 +1,76 @@ | |||||||
|  | package org.dromara.personnel.domain.dto; | ||||||
|  |  | ||||||
|  | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import cn.idev.excel.annotation.ExcelProperty; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.dromara.common.excel.annotation.ExcelDictFormat; | ||||||
|  | import org.dromara.common.excel.convert.ExcelDictConvert; | ||||||
|  | import org.dromara.personnel.domain.OpsBeipinBeijian; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-备品配件视图对象 ops_beipin_beijian | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class OpsBeipinBeijianDto implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备件编号 | ||||||
|  |      */ | ||||||
|  |     private String beijianNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备件名称 | ||||||
|  |      */ | ||||||
|  |     private String beijianName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备类型 | ||||||
|  |      */ | ||||||
|  |     private String shebeiType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 规格型号 | ||||||
|  |      */ | ||||||
|  |     private String guigexinghao; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 库存状态(待定) | ||||||
|  |      */ | ||||||
|  |     private String kucunStatus; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 入库数量 | ||||||
|  |      */ | ||||||
|  |     private Long ruKuCount; | ||||||
|  |     /** | ||||||
|  |      * 出库数量 | ||||||
|  |      */ | ||||||
|  |     private Long chuKuCount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 库存数量 | ||||||
|  |      */ | ||||||
|  |     private Long kucunCount; | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,42 @@ | |||||||
|  | package org.dromara.personnel.domain.dto; | ||||||
|  |  | ||||||
|  | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import cn.idev.excel.annotation.ExcelProperty; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.dromara.common.excel.annotation.ExcelDictFormat; | ||||||
|  | import org.dromara.common.excel.convert.ExcelDictConvert; | ||||||
|  | import org.dromara.personnel.domain.OpsChurukudan; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-出入库单管理视图对象 ops_churukudan | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class OpsChurukudanCountDto implements Serializable { | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备类型 | ||||||
|  |      */ | ||||||
|  |     private List<String> shebeiType; | ||||||
|  |     /** | ||||||
|  |      * 入库数量 | ||||||
|  |      */ | ||||||
|  |     private List<Long> rukuCounnt; | ||||||
|  |     /** | ||||||
|  |      * 出库数量 | ||||||
|  |      */ | ||||||
|  |     private List<Long> chukuCounnt; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,35 @@ | |||||||
|  | package org.dromara.personnel.domain.dto; | ||||||
|  |  | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-出入库单管理视图对象 ops_churukudan | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class OpsChurukudanDayCountDto implements Serializable { | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备类型 | ||||||
|  |      */ | ||||||
|  |     private List<String> days; | ||||||
|  |     /** | ||||||
|  |      * 入库数量 | ||||||
|  |      */ | ||||||
|  |     private List<Long> rukuCounnts; | ||||||
|  |     /** | ||||||
|  |      * 出库数量 | ||||||
|  |      */ | ||||||
|  |     private List<Long> chukuCounnts; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -11,6 +11,7 @@ import java.util.List; | |||||||
| public class SchedulingUserGroupDTO implements Serializable { | public class SchedulingUserGroupDTO implements Serializable { | ||||||
|     private Long opsUserId; // 运维人员ID |     private Long opsUserId; // 运维人员ID | ||||||
|     private String opsUserName; // 运维人员ID |     private String opsUserName; // 运维人员ID | ||||||
|  |     private String postName; | ||||||
|     /** |     /** | ||||||
|      * 总时长 |      * 总时长 | ||||||
|      */ |      */ | ||||||
|  | |||||||
| @ -10,6 +10,7 @@ import java.time.LocalDate; | |||||||
|  */ |  */ | ||||||
| @Data | @Data | ||||||
| public class UserTypePairDTO implements Serializable { | public class UserTypePairDTO implements Serializable { | ||||||
|  |     private Long id; | ||||||
|     private LocalDate schedulingDate; // 排班日期 |     private LocalDate schedulingDate; // 排班日期 | ||||||
|     private Long schedulingType; // 对应的排班类型ID |     private Long schedulingType; // 对应的排班类型ID | ||||||
|     private String schedulingTypeName; // 对应的排班类型ID |     private String schedulingTypeName; // 对应的排班类型ID | ||||||
|  | |||||||
| @ -0,0 +1,23 @@ | |||||||
|  | package org.dromara.personnel.domain.enums; | ||||||
|  |  | ||||||
|  | import lombok.Getter; | ||||||
|  |  | ||||||
|  | @Getter | ||||||
|  | public enum OpsCaigouPlanEnum { | ||||||
|  |  | ||||||
|  |     CAOGAO("草稿", "1"), | ||||||
|  |     DAISHENPI("待审批", "3"), | ||||||
|  |     SHENPIZHON("审批中", "5"), | ||||||
|  |     WEITONGUO("未通过", "7"), | ||||||
|  |     CAIGOUZHON("采购中", "9"), | ||||||
|  |     YIWANCHENG("已完成", "11"); | ||||||
|  |  | ||||||
|  |     private final String text; | ||||||
|  |  | ||||||
|  |     private final String value; | ||||||
|  |  | ||||||
|  |     OpsCaigouPlanEnum(String text, String value) { | ||||||
|  |         this.text = text; | ||||||
|  |         this.value = value; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,19 @@ | |||||||
|  | package org.dromara.personnel.domain.enums; | ||||||
|  |  | ||||||
|  | import lombok.Getter; | ||||||
|  |  | ||||||
|  | @Getter | ||||||
|  | public enum OpsChurukuEnum { | ||||||
|  |  | ||||||
|  |     CHUKU("出库", "1"), | ||||||
|  |     RUKU("入库", "2"); | ||||||
|  |  | ||||||
|  |     private final String text; | ||||||
|  |  | ||||||
|  |     private final String value; | ||||||
|  |  | ||||||
|  |     OpsChurukuEnum(String text, String value) { | ||||||
|  |         this.text = text; | ||||||
|  |         this.value = value; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,44 @@ | |||||||
|  | package org.dromara.personnel.domain.vo; | ||||||
|  |  | ||||||
|  | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import cn.idev.excel.annotation.ExcelProperty; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.dromara.common.excel.annotation.ExcelDictFormat; | ||||||
|  | import org.dromara.common.excel.convert.ExcelDictConvert; | ||||||
|  | import org.dromara.personnel.domain.OpsBeipinBeijian; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-备品配件视图对象 ops_beipin_beijian | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class OpsBeipinBeijianCountVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 总数量 | ||||||
|  |      */ | ||||||
|  |     private Long zonCount; | ||||||
|  |     /** | ||||||
|  |      * 低库存数量 | ||||||
|  |      */ | ||||||
|  |     private Long diCount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备类型数量 | ||||||
|  |      */ | ||||||
|  |     private Map<String,Long> typeCount; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,90 @@ | |||||||
|  | package org.dromara.personnel.domain.vo; | ||||||
|  |  | ||||||
|  | import org.dromara.personnel.domain.OpsBeipinBeijian; | ||||||
|  | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import cn.idev.excel.annotation.ExcelProperty; | ||||||
|  | import org.dromara.common.excel.annotation.ExcelDictFormat; | ||||||
|  | import org.dromara.common.excel.convert.ExcelDictConvert; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.util.Date; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-备品配件视图对象 ops_beipin_beijian | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | @AutoMapper(target = OpsBeipinBeijian.class) | ||||||
|  | public class OpsBeipinBeijianVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "项目id") | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备件编号 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "备件编号") | ||||||
|  |     private String beijianNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备件名称 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "备件名称") | ||||||
|  |     private String beijianName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备类型 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "设备类型") | ||||||
|  |     private String shebeiType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 规格型号 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "规格型号") | ||||||
|  |     private String guigexinghao; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 库存状态(待定) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "库存状态", converter = ExcelDictConvert.class) | ||||||
|  |     @ExcelDictFormat(readConverterExp = "待=定") | ||||||
|  |     private String kucunStatus; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 入库数量 | ||||||
|  |      */ | ||||||
|  |     private Long ruKuCount; | ||||||
|  |     /** | ||||||
|  |      * 出库数量 | ||||||
|  |      */ | ||||||
|  |     private Long chuKuCount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 库存数量 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "库存数量") | ||||||
|  |     private Long kucunCount; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,41 @@ | |||||||
|  | package org.dromara.personnel.domain.vo; | ||||||
|  |  | ||||||
|  | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import cn.idev.excel.annotation.ExcelProperty; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.dromara.personnel.domain.OpsCaigouPlanChanpin; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购申请计划-产品信息视图对象 ops_caigou_plan_chanpin | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class OpsCaigouPlanChanpinListVo implements Serializable { | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 计划名称 | ||||||
|  |      */ | ||||||
|  |     private String caigouPlanName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品名称 | ||||||
|  |      */ | ||||||
|  |     private String chanpinName; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,102 @@ | |||||||
|  | package org.dromara.personnel.domain.vo; | ||||||
|  |  | ||||||
|  | import org.dromara.personnel.domain.OpsCaigouPlanChanpin; | ||||||
|  | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import cn.idev.excel.annotation.ExcelProperty; | ||||||
|  | import org.dromara.common.excel.annotation.ExcelDictFormat; | ||||||
|  | import org.dromara.common.excel.convert.ExcelDictConvert; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.Date; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购申请计划-产品信息视图对象 ops_caigou_plan_chanpin | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | @AutoMapper(target = OpsCaigouPlanChanpin.class) | ||||||
|  | public class OpsCaigouPlanChanpinVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "项目id") | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 采购申请计划id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "采购申请计划id") | ||||||
|  |     private Long caigouPlanId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备类型 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "设备类型") | ||||||
|  |     private String shebeiType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品编号 | ||||||
|  |      */ | ||||||
|  |     private String chanpinBianhao; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品名称 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "产品名称") | ||||||
|  |     private String chanpinName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品型号 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "产品型号") | ||||||
|  |     private String chanpinType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品单价 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "产品单价") | ||||||
|  |     private BigDecimal chanpinMonovalent; | ||||||
|  |     /** | ||||||
|  |      * 总价 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal totalPrice; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 购买数量 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "购买数量") | ||||||
|  |     private Long goumaiNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单位 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "单位") | ||||||
|  |     private String danwei; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 用途 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "用途") | ||||||
|  |     private String yontu; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,37 @@ | |||||||
|  | package org.dromara.personnel.domain.vo; | ||||||
|  |  | ||||||
|  | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import cn.idev.excel.annotation.ExcelProperty; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.dromara.common.excel.annotation.ExcelDictFormat; | ||||||
|  | import org.dromara.common.excel.convert.ExcelDictConvert; | ||||||
|  | import org.dromara.personnel.domain.OpsCaigouPlan; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.Date; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购计划单视图对象 ops_caigou_plan | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class OpsCaigouPlanCountVo implements Serializable { | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 状态 | ||||||
|  |      */ | ||||||
|  |     private String planType; | ||||||
|  |     /** | ||||||
|  |      * 数量统计 | ||||||
|  |      */ | ||||||
|  |     private Long palnCount; | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,62 @@ | |||||||
|  | package org.dromara.personnel.domain.vo; | ||||||
|  |  | ||||||
|  | import org.dromara.personnel.domain.OpsCaigouPlanFiles; | ||||||
|  | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import cn.idev.excel.annotation.ExcelProperty; | ||||||
|  | import org.dromara.common.excel.annotation.ExcelDictFormat; | ||||||
|  | import org.dromara.common.excel.convert.ExcelDictConvert; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.util.Date; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购申请计划文件视图对象 ops_caigou_plan_files | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | @AutoMapper(target = OpsCaigouPlanFiles.class) | ||||||
|  | public class OpsCaigouPlanFilesVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 采购申请计划id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "采购申请计划id") | ||||||
|  |     private Long caigouPlanId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "文件id") | ||||||
|  |     private Long fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件地址 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "文件地址") | ||||||
|  |     private String fileUrl; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件名称 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "文件名称") | ||||||
|  |     private String fileName; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,167 @@ | |||||||
|  | package org.dromara.personnel.domain.vo; | ||||||
|  |  | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.Date; | ||||||
|  | import com.fasterxml.jackson.annotation.JsonFormat; | ||||||
|  | import org.dromara.personnel.domain.OpsCaigouPlan; | ||||||
|  | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import cn.idev.excel.annotation.ExcelProperty; | ||||||
|  | import org.dromara.common.excel.annotation.ExcelDictFormat; | ||||||
|  | import org.dromara.common.excel.convert.ExcelDictConvert; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsCaigouPlanChanpinBo; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsCaigouPlanFilesBo; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.util.Date; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购计划单视图对象 ops_caigou_plan | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | @AutoMapper(target = OpsCaigouPlan.class) | ||||||
|  | public class OpsCaigouPlanVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "项目id") | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 计划名称 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "计划名称") | ||||||
|  |     private String jihuaName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 计划编号 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "计划编号") | ||||||
|  |     private String jihuaBianhao; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 采购单位(当前登录人部门) | ||||||
|  |      */ | ||||||
|  |     private Long caigouDanwei; | ||||||
|  |     @ExcelProperty(value = "采购单位", converter = ExcelDictConvert.class) | ||||||
|  |     private String caigouDanweiName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经办人 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "经办人") | ||||||
|  |     private Long jingbanren; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经办人名称 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "经办人名称") | ||||||
|  |     private String jingbanrenName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同类型 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "合同类型") | ||||||
|  |     private String hetonType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 采购类型 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "采购类型") | ||||||
|  |     private String caigouType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 仓库地址 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "仓库地址") | ||||||
|  |     private String cangkuUrl; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同名称 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "合同名称") | ||||||
|  |     private String hetonName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 供应商id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "供应商id") | ||||||
|  |     private Long gonyingshangId; | ||||||
|  |     private String gonyingshangName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 出货时间 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "出货时间") | ||||||
|  |     private Date chuhuoTime; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 付款条件 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "付款条件") | ||||||
|  |     private String fukuantiaojian; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 发票开具方式 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "发票开具方式") | ||||||
|  |     private String fapiaoKjfs; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 提交状态(1、草稿,2、已提交) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "提交状态", converter = ExcelDictConvert.class) | ||||||
|  |     @ExcelDictFormat(readConverterExp = "1=、草稿,2、已提交") | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 审核状态 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "审核状态") | ||||||
|  |     private String shenheStatus; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预计金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal yujiJine; | ||||||
|  |     /** | ||||||
|  |      * 实际已采购金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal shijiJine; | ||||||
|  |  | ||||||
|  |     private Date createTime; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 申请原因 | ||||||
|  |      */ | ||||||
|  |     private String reason; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 附件 | ||||||
|  |      */ | ||||||
|  |     private List<OpsCaigouPlanFilesVo> opsCaigouPlanFilesVos; | ||||||
|  |     /** | ||||||
|  |      * 产品信息 | ||||||
|  |      */ | ||||||
|  |     private List<OpsCaigouPlanChanpinVo> opsCaigouPlanChanpinVos; | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,35 @@ | |||||||
|  | package org.dromara.personnel.domain.vo; | ||||||
|  |  | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-出入库单管理视图对象 ops_churukudan | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class OpsChurukudanCountVo implements Serializable { | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备类型 | ||||||
|  |      */ | ||||||
|  |     private String shebeiType; | ||||||
|  |     /** | ||||||
|  |      * 入库数量 | ||||||
|  |      */ | ||||||
|  |     private Long rukuCounnt; | ||||||
|  |     /** | ||||||
|  |      * 出库数量 | ||||||
|  |      */ | ||||||
|  |     private Long chukuCounnt; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,34 @@ | |||||||
|  | package org.dromara.personnel.domain.vo; | ||||||
|  |  | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-出入库单管理视图对象 ops_churukudan | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class OpsChurukudanDayCountVo implements Serializable { | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设备类型 | ||||||
|  |      */ | ||||||
|  |     private String statDay; | ||||||
|  |     /** | ||||||
|  |      * 入库数量 | ||||||
|  |      */ | ||||||
|  |     private Long rukuCounnt; | ||||||
|  |     /** | ||||||
|  |      * 出库数量 | ||||||
|  |      */ | ||||||
|  |     private Long chukuCounnt; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,93 @@ | |||||||
|  | package org.dromara.personnel.domain.vo; | ||||||
|  |  | ||||||
|  | import org.dromara.personnel.domain.OpsChurukudan; | ||||||
|  | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import cn.idev.excel.annotation.ExcelProperty; | ||||||
|  | import org.dromara.common.excel.annotation.ExcelDictFormat; | ||||||
|  | import org.dromara.common.excel.convert.ExcelDictConvert; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.util.Date; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-出入库单管理视图对象 ops_churukudan | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | @AutoMapper(target = OpsChurukudan.class) | ||||||
|  | public class OpsChurukudanVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据编号 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "单据编号") | ||||||
|  |     private String danjvNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 产品id | ||||||
|  |      */ | ||||||
|  |     private Long chanpinId; | ||||||
|  |     /** | ||||||
|  |      * 产品名称 | ||||||
|  |      */ | ||||||
|  |     private String chanpinName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经手人id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "经手人id") | ||||||
|  |     private Long jingshourenId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经手人 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "经手人") | ||||||
|  |     private String jingshourenName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 联系电话 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "联系电话") | ||||||
|  |     private String contactNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 总数量 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "总数量") | ||||||
|  |     private Long zonNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 审核状态 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "审核状态") | ||||||
|  |     private String shenheStatus; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据状态(1、出库单,2入库单) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "单据状态", converter = ExcelDictConvert.class) | ||||||
|  |     @ExcelDictFormat(readConverterExp = "1=、出库单,2入库单") | ||||||
|  |     private String danjvType; | ||||||
|  |  | ||||||
|  |     private Date updateTime; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,226 @@ | |||||||
|  | package org.dromara.personnel.domain.vo; | ||||||
|  |  | ||||||
|  | import java.util.Date; | ||||||
|  | import com.fasterxml.jackson.annotation.JsonFormat; | ||||||
|  | import org.dromara.personnel.domain.OpsTenderSupplierInput; | ||||||
|  | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import cn.idev.excel.annotation.ExcelProperty; | ||||||
|  | import org.dromara.common.excel.annotation.ExcelDictFormat; | ||||||
|  | import org.dromara.common.excel.convert.ExcelDictConvert; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.util.Date; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 供应商入库视图对象 ops_tender_supplier_input | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | @AutoMapper(target = OpsTenderSupplierInput.class) | ||||||
|  | public class OpsTenderSupplierInputVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "项目id") | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 企业登记注册类型 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "企业登记注册类型") | ||||||
|  |     private String supplierType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 企业名称 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "企业名称") | ||||||
|  |     private String supplierName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 企业法定代表人 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "企业法定代表人") | ||||||
|  |     private String supplierPerson; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 统一社会信用代码 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "统一社会信用代码") | ||||||
|  |     private String supplierCode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 企业注册地址 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "企业注册地址") | ||||||
|  |     private String supplierAddres; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 负责人姓名 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "负责人姓名") | ||||||
|  |     private String personName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 负责人联系电话 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "负责人联系电话") | ||||||
|  |     private String personPhone; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开户行户名 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "开户行户名") | ||||||
|  |     private String bankPersonName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开户银行 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "开户银行") | ||||||
|  |     private String bankName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开户行账号 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "开户行账号") | ||||||
|  |     private String bankAccount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 纳税规模 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "纳税规模") | ||||||
|  |     private String taxScale; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经营范围 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "经营范围") | ||||||
|  |     private String scope; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 企业资质等级 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "企业资质等级") | ||||||
|  |     private String supplierLivel; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 发证日期 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "发证日期") | ||||||
|  |     private Date issueDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 证书有效期 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "证书有效期") | ||||||
|  |     private Date certificateValidity; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 近三年营业额 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "近三年营业额") | ||||||
|  |     private String pastThreeYears; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 安全生产许可证编号 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "安全生产许可证编号") | ||||||
|  |     private String safeCode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 安全生产许可证发证日期 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "安全生产许可证发证日期") | ||||||
|  |     private String safeCodeData; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 安全证书有效期 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "安全证书有效期") | ||||||
|  |     private String safeCertificateValidity; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 注册造价工程师数量 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "注册造价工程师数量") | ||||||
|  |     private Long registeredEngineerNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 一级建造工程师数量 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "一级建造工程师数量") | ||||||
|  |     private Long firstBuildingNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 二级建造工程师数量 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "二级建造工程师数量") | ||||||
|  |     private Long secondBuildingNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 其他建造师数量 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "其他建造师数量") | ||||||
|  |     private Long otherBuildingNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 高级工程师数量 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "高级工程师数量") | ||||||
|  |     private Long seniorEngineerNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 工程师数量 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "工程师数量") | ||||||
|  |     private Long engineerNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 助理工程师数量 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "助理工程师数量") | ||||||
|  |     private Long assistantEngineerNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 其他人员数量 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "其他人员数量") | ||||||
|  |     private Long otherPersonnelNumber; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 存储文件ID | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "存储文件ID") | ||||||
|  |     private Long fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 入库资料 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "入库资料") | ||||||
|  |     private String inputFile; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 审核状态 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "审核状态") | ||||||
|  |     private String state; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,15 @@ | |||||||
|  | package org.dromara.personnel.mapper; | ||||||
|  |  | ||||||
|  | import org.dromara.personnel.domain.OpsBeipinBeijian; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsBeipinBeijianVo; | ||||||
|  | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-备品配件Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface OpsBeipinBeijianMapper extends BaseMapperPlus<OpsBeipinBeijian, OpsBeipinBeijianVo> { | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,26 @@ | |||||||
|  | package org.dromara.personnel.mapper; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.core.metadata.IPage; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import org.apache.ibatis.annotations.Param; | ||||||
|  | import org.dromara.personnel.domain.OpsCaigouPlanChanpin; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsBeipinBeijianBo; | ||||||
|  | import org.dromara.personnel.domain.dto.OpsBeipinBeijianDto; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsBeipinBeijianVo; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsCaigouPlanChanpinVo; | ||||||
|  | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购申请计划-产品信息Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface OpsCaigouPlanChanpinMapper extends BaseMapperPlus<OpsCaigouPlanChanpin, OpsCaigouPlanChanpinVo> { | ||||||
|  |  | ||||||
|  |     Page<OpsBeipinBeijianDto> getBeiJianList(IPage<OpsBeipinBeijianDto> build, @Param("bo") OpsBeipinBeijianBo bo); | ||||||
|  |  | ||||||
|  |     List<OpsBeipinBeijianDto> getCount(@Param("projectId") Long projectId); | ||||||
|  | } | ||||||
| @ -0,0 +1,15 @@ | |||||||
|  | package org.dromara.personnel.mapper; | ||||||
|  |  | ||||||
|  | import org.dromara.personnel.domain.OpsCaigouPlanFiles; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsCaigouPlanFilesVo; | ||||||
|  | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购申请计划文件Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface OpsCaigouPlanFilesMapper extends BaseMapperPlus<OpsCaigouPlanFiles, OpsCaigouPlanFilesVo> { | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,24 @@ | |||||||
|  | package org.dromara.personnel.mapper; | ||||||
|  |  | ||||||
|  | import org.apache.ibatis.annotations.Param; | ||||||
|  | import org.dromara.personnel.domain.OpsCaigouPlan; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsCaigouPlanChanpinListVo; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsCaigouPlanChanpinVo; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsCaigouPlanCountVo; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsCaigouPlanVo; | ||||||
|  | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购计划单Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface OpsCaigouPlanMapper extends BaseMapperPlus<OpsCaigouPlan, OpsCaigouPlanVo> { | ||||||
|  |  | ||||||
|  |     List<OpsCaigouPlanCountVo> getCountVo(@Param("projectId") Long projectId); | ||||||
|  |  | ||||||
|  |     List<OpsCaigouPlanChanpinListVo> getChanpinList(@Param("projectId") Long projectId); | ||||||
|  | } | ||||||
| @ -0,0 +1,33 @@ | |||||||
|  | package org.dromara.personnel.mapper; | ||||||
|  |  | ||||||
|  | import org.apache.ibatis.annotations.Param; | ||||||
|  | import org.dromara.personnel.domain.OpsChurukudan; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsChurukudanReq; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsChurukudanCountVo; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsChurukudanDayCountVo; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsChurukudanVo; | ||||||
|  | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-出入库单管理Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface OpsChurukudanMapper extends BaseMapperPlus<OpsChurukudan, OpsChurukudanVo> { | ||||||
|  |  | ||||||
|  |     List<OpsChurukudanCountVo> getChuRuKuCount(@Param("bo") OpsChurukudanReq bo); | ||||||
|  |  | ||||||
|  |     List<OpsChurukudanDayCountVo> getChuRuKuDayCount(@Param("bo") OpsChurukudanReq bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询产品出入库数量和 | ||||||
|  |      * @param projectId | ||||||
|  |      * @param chanpinId | ||||||
|  |      * @param type | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     Long getChuRuKuZonCount(@Param("projectId") Long projectId, @Param("chanpinId") Long chanpinId, @Param("type") String type); | ||||||
|  | } | ||||||
| @ -0,0 +1,15 @@ | |||||||
|  | package org.dromara.personnel.mapper; | ||||||
|  |  | ||||||
|  | import org.dromara.personnel.domain.OpsTenderSupplierInput; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsTenderSupplierInputVo; | ||||||
|  | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 供应商入库Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface OpsTenderSupplierInputMapper extends BaseMapperPlus<OpsTenderSupplierInput, OpsTenderSupplierInputVo> { | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,76 @@ | |||||||
|  | package org.dromara.personnel.service; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
|  | import org.dromara.personnel.domain.OpsBeipinBeijian; | ||||||
|  | import org.dromara.personnel.domain.dto.OpsBeipinBeijianDto; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsBeipinBeijianCountVo; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsBeipinBeijianVo; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsBeipinBeijianBo; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-备品配件Service接口 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface IOpsBeipinBeijianService extends IService<OpsBeipinBeijian> { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询运维-物资-备品配件 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 运维-物资-备品配件 | ||||||
|  |      */ | ||||||
|  |     OpsBeipinBeijianVo queryById(Long id); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询运维-物资-备品配件列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 运维-物资-备品配件分页列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<OpsBeipinBeijianVo> queryPageList(OpsBeipinBeijianBo bo, PageQuery pageQuery); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的运维-物资-备品配件列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 运维-物资-备品配件列表 | ||||||
|  |      */ | ||||||
|  |     List<OpsBeipinBeijianVo> queryList(OpsBeipinBeijianBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增运维-物资-备品配件 | ||||||
|  |      * | ||||||
|  |      * @param bo 运维-物资-备品配件 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(OpsBeipinBeijianBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改运维-物资-备品配件 | ||||||
|  |      * | ||||||
|  |      * @param bo 运维-物资-备品配件 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(OpsBeipinBeijianBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除运维-物资-备品配件信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  |  | ||||||
|  |     TableDataInfo<OpsBeipinBeijianDto> getList(OpsBeipinBeijianBo bo, PageQuery pageQuery); | ||||||
|  |  | ||||||
|  |     OpsBeipinBeijianCountVo getCount(OpsBeipinBeijianBo bo); | ||||||
|  | } | ||||||
| @ -0,0 +1,88 @@ | |||||||
|  | package org.dromara.personnel.service; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.core.metadata.IPage; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
|  | import org.apache.ibatis.annotations.Param; | ||||||
|  | import org.dromara.personnel.domain.OpsCaigouPlanChanpin; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsBeipinBeijianBo; | ||||||
|  | import org.dromara.personnel.domain.dto.OpsBeipinBeijianDto; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsBeipinBeijianVo; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsCaigouPlanChanpinVo; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsCaigouPlanChanpinBo; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购申请计划-产品信息Service接口 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface IOpsCaigouPlanChanpinService extends IService<OpsCaigouPlanChanpin> { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询运维-物资-采购申请计划-产品信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 运维-物资-采购申请计划-产品信息 | ||||||
|  |      */ | ||||||
|  |     OpsCaigouPlanChanpinVo queryById(Long id); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询运维-物资-采购申请计划-产品信息列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 运维-物资-采购申请计划-产品信息分页列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<OpsCaigouPlanChanpinVo> queryPageList(OpsCaigouPlanChanpinBo bo, PageQuery pageQuery); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的运维-物资-采购申请计划-产品信息列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 运维-物资-采购申请计划-产品信息列表 | ||||||
|  |      */ | ||||||
|  |     List<OpsCaigouPlanChanpinVo> queryList(OpsCaigouPlanChanpinBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增运维-物资-采购申请计划-产品信息 | ||||||
|  |      * | ||||||
|  |      * @param bo 运维-物资-采购申请计划-产品信息 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(OpsCaigouPlanChanpinBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改运维-物资-采购申请计划-产品信息 | ||||||
|  |      * | ||||||
|  |      * @param bo 运维-物资-采购申请计划-产品信息 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(OpsCaigouPlanChanpinBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除运维-物资-采购申请计划-产品信息信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 根据采购计划id获取产品信息 | ||||||
|  |      * @param id | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     List<OpsCaigouPlanChanpinVo> getVoByCaiGouPlanId(Long caigouId); | ||||||
|  |  | ||||||
|  |     Page<OpsBeipinBeijianDto> getBeiJianList(IPage<OpsBeipinBeijianDto> build, OpsBeipinBeijianBo bo); | ||||||
|  |  | ||||||
|  |     List<OpsBeipinBeijianDto> getCount(OpsBeipinBeijianBo bo); | ||||||
|  | } | ||||||
| @ -0,0 +1,77 @@ | |||||||
|  | package org.dromara.personnel.service; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
|  | import org.dromara.personnel.domain.OpsCaigouPlanFiles; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsCaigouPlanFilesVo; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsCaigouPlanFilesBo; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购申请计划文件Service接口 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface IOpsCaigouPlanFilesService extends IService<OpsCaigouPlanFiles> { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询运维-物资-采购申请计划文件 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 运维-物资-采购申请计划文件 | ||||||
|  |      */ | ||||||
|  |     OpsCaigouPlanFilesVo queryById(Long id); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询运维-物资-采购申请计划文件列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 运维-物资-采购申请计划文件分页列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<OpsCaigouPlanFilesVo> queryPageList(OpsCaigouPlanFilesBo bo, PageQuery pageQuery); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的运维-物资-采购申请计划文件列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 运维-物资-采购申请计划文件列表 | ||||||
|  |      */ | ||||||
|  |     List<OpsCaigouPlanFilesVo> queryList(OpsCaigouPlanFilesBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增运维-物资-采购申请计划文件 | ||||||
|  |      * | ||||||
|  |      * @param bo 运维-物资-采购申请计划文件 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(OpsCaigouPlanFilesBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改运维-物资-采购申请计划文件 | ||||||
|  |      * | ||||||
|  |      * @param bo 运维-物资-采购申请计划文件 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(OpsCaigouPlanFilesBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除运维-物资-采购申请计划文件信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 根据采购计划id获取采购计划附件数据 | ||||||
|  |      * @param id | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     List<OpsCaigouPlanFilesVo> getVoByCaiGouPlanId(Long caigouId); | ||||||
|  | } | ||||||
| @ -0,0 +1,110 @@ | |||||||
|  | package org.dromara.personnel.service; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
|  | import org.dromara.common.core.domain.R; | ||||||
|  | import org.dromara.personnel.domain.OpsCaigouPlan; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsCaigouPlanReq; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsCaigouPlanChanpinListVo; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsCaigouPlanChanpinVo; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsCaigouPlanCountVo; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsCaigouPlanVo; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsCaigouPlanBo; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-采购计划单Service接口 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface IOpsCaigouPlanService extends IService<OpsCaigouPlan> { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询运维-物资-采购计划单 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 运维-物资-采购计划单 | ||||||
|  |      */ | ||||||
|  |     OpsCaigouPlanVo queryById(Long id); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询运维-物资-采购计划单列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 运维-物资-采购计划单分页列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<OpsCaigouPlanVo> queryPageList(OpsCaigouPlanReq bo, PageQuery pageQuery); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的运维-物资-采购计划单列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 运维-物资-采购计划单列表 | ||||||
|  |      */ | ||||||
|  |     List<OpsCaigouPlanVo> queryList(OpsCaigouPlanReq bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增运维-物资-采购计划单 | ||||||
|  |      * | ||||||
|  |      * @param bo 运维-物资-采购计划单 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(OpsCaigouPlanBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改运维-物资-采购计划单 | ||||||
|  |      * | ||||||
|  |      * @param bo 运维-物资-采购计划单 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(OpsCaigouPlanBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除运维-物资-采购计划单信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 统计各个状态数量 | ||||||
|  |      * @param projectId | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     List<OpsCaigouPlanCountVo> getCountVo(Long projectId); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 填写修改实际采购金额 | ||||||
|  |      * @param bo | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     Boolean setJinE(OpsCaigouPlanBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取本年度金额统计 | ||||||
|  |      * @param projectId | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     OpsCaigouPlanVo getJinE(Long projectId); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 确认采购单完成 | ||||||
|  |      * @param bo | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     Boolean editStatus(OpsCaigouPlanBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 出入库表单新增修改获取产品列表 | ||||||
|  |      * @param bo | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     List<OpsCaigouPlanChanpinListVo> getChanpinList(OpsCaigouPlanReq bo); | ||||||
|  | } | ||||||
| @ -0,0 +1,87 @@ | |||||||
|  | package org.dromara.personnel.service; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
|  | import org.dromara.personnel.domain.OpsChurukudan; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsChurukudanReq; | ||||||
|  | import org.dromara.personnel.domain.dto.OpsChurukudanCountDto; | ||||||
|  | import org.dromara.personnel.domain.dto.OpsChurukudanDayCountDto; | ||||||
|  | import org.dromara.personnel.domain.vo.OpsChurukudanVo; | ||||||
|  | import org.dromara.personnel.domain.bo.OpsChurukudanBo; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 运维-物资-出入库单管理Service接口 | ||||||
|  |  * | ||||||
|  |  * @author LionLi | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface IOpsChurukudanService extends IService<OpsChurukudan> { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询运维-物资-出入库单管理 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 运维-物资-出入库单管理 | ||||||
|  |      */ | ||||||
|  |     OpsChurukudanVo queryById(Long id); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询运维-物资-出入库单管理列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 运维-物资-出入库单管理分页列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<OpsChurukudanVo> queryPageList(OpsChurukudanReq bo, PageQuery pageQuery); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的运维-物资-出入库单管理列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 运维-物资-出入库单管理列表 | ||||||
|  |      */ | ||||||
|  |     List<OpsChurukudanVo> queryList(OpsChurukudanReq bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增运维-物资-出入库单管理 | ||||||
|  |      * | ||||||
|  |      * @param bo 运维-物资-出入库单管理 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(OpsChurukudanBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改运维-物资-出入库单管理 | ||||||
|  |      * | ||||||
|  |      * @param bo 运维-物资-出入库单管理 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(OpsChurukudanBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除运维-物资-出入库单管理信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询本月出入库类型 | ||||||
|  |      * @param bo | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     OpsChurukudanCountDto getChuRuKuCount(OpsChurukudanReq bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询出入库月中每天的出入库数量 | ||||||
|  |      * @param bo | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     OpsChurukudanDayCountDto getChuRuKuDayCount(OpsChurukudanReq bo); | ||||||
|  | } | ||||||
| @ -1,5 +1,6 @@ | |||||||
| package org.dromara.personnel.service; | package org.dromara.personnel.service; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
| import org.dromara.personnel.domain.OpsEquipment; | import org.dromara.personnel.domain.OpsEquipment; | ||||||
| import org.dromara.personnel.domain.vo.OpsEquipmentVo; | import org.dromara.personnel.domain.vo.OpsEquipmentVo; | ||||||
| import org.dromara.personnel.domain.bo.OpsEquipmentBo; | import org.dromara.personnel.domain.bo.OpsEquipmentBo; | ||||||
| @ -15,7 +16,7 @@ import java.util.List; | |||||||
|  * @author LionLi |  * @author LionLi | ||||||
|  * @date 2025-09-19 |  * @date 2025-09-19 | ||||||
|  */ |  */ | ||||||
| public interface IOpsEquipmentService { | public interface IOpsEquipmentService extends IService<OpsEquipment> { | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 查询运维-设备 |      * 查询运维-设备 | ||||||
|  | |||||||
| @ -1,5 +1,6 @@ | |||||||
| package org.dromara.personnel.service; | package org.dromara.personnel.service; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
| import org.dromara.personnel.domain.OpsSchedulingDate; | import org.dromara.personnel.domain.OpsSchedulingDate; | ||||||
| import org.dromara.personnel.domain.vo.OpsSchedulingDateVo; | import org.dromara.personnel.domain.vo.OpsSchedulingDateVo; | ||||||
| import org.dromara.personnel.domain.bo.OpsSchedulingDateBo; | import org.dromara.personnel.domain.bo.OpsSchedulingDateBo; | ||||||
| @ -15,7 +16,7 @@ import java.util.List; | |||||||
|  * @author LionLi |  * @author LionLi | ||||||
|  * @date 2025-09-19 |  * @date 2025-09-19 | ||||||
|  */ |  */ | ||||||
| public interface IOpsSchedulingDateService { | public interface IOpsSchedulingDateService extends IService<OpsSchedulingDate> { | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 查询运维-排班时间类型 |      * 查询运维-排班时间类型 | ||||||
|  | |||||||
| @ -1,5 +1,7 @@ | |||||||
| package org.dromara.personnel.service; | package org.dromara.personnel.service; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
|  | import org.dromara.personnel.domain.OpsScheduling; | ||||||
| import org.dromara.personnel.domain.bo.OpsSchedulingReq; | import org.dromara.personnel.domain.bo.OpsSchedulingReq; | ||||||
| import org.dromara.personnel.domain.dto.SchedulingUserGroupDTO; | import org.dromara.personnel.domain.dto.SchedulingUserGroupDTO; | ||||||
| import org.dromara.personnel.domain.vo.OpsSchedulingVo; | import org.dromara.personnel.domain.vo.OpsSchedulingVo; | ||||||
| @ -16,7 +18,7 @@ import java.util.List; | |||||||
|  * @author LionLi |  * @author LionLi | ||||||
|  * @date 2025-09-19 |  * @date 2025-09-19 | ||||||
|  */ |  */ | ||||||
| public interface IOpsSchedulingService { | public interface IOpsSchedulingService extends IService<OpsScheduling> { | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 查询运维-人员排班 |      * 查询运维-人员排班 | ||||||
| @ -76,4 +78,6 @@ public interface IOpsSchedulingService { | |||||||
|     List<SchedulingUserGroupDTO> getRiLiList(OpsSchedulingReq req); |     List<SchedulingUserGroupDTO> getRiLiList(OpsSchedulingReq req); | ||||||
|  |  | ||||||
|     Boolean allEdit(OpsSchedulingBo bo); |     Boolean allEdit(OpsSchedulingBo bo); | ||||||
|  |  | ||||||
|  |     Boolean insertOneByBo(OpsSchedulingBo bo); | ||||||
| } | } | ||||||
|  | |||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user
	