diff --git a/pqs-algorithm/algorithm-api/pom.xml b/pqs-algorithm/algorithm-api/pom.xml
index ea461c39d..2a9f51a6a 100644
--- a/pqs-algorithm/algorithm-api/pom.xml
+++ b/pqs-algorithm/algorithm-api/pom.xml
@@ -38,6 +38,11 @@
org.projectlombok
lombok
+
+ com.njcn
+ common-microservice
+ ${project.version}
+
diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/api/EquipmentFeignClient.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/api/EquipmentFeignClient.java
new file mode 100644
index 000000000..61f192864
--- /dev/null
+++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/api/EquipmentFeignClient.java
@@ -0,0 +1,21 @@
+package com.njcn.algorithm.api;
+
+import com.njcn.algorithm.api.fallback.EquipmentFeignClientFallbackFactory;
+import com.njcn.algorithm.pojo.vo.CsEquipmentDeliveryVO;
+import com.njcn.common.pojo.constant.ServerInfo;
+import com.njcn.common.pojo.response.HttpResult;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+/**
+ * @author xy
+ */
+@FeignClient(value = ServerInfo.ALGORITHM_BOOT, path = "/EquipmentDelivery", fallbackFactory = EquipmentFeignClientFallbackFactory.class,contextId = "EquipmentDelivery")
+public interface EquipmentFeignClient {
+
+ @PostMapping("/queryEquipmentByndid")
+ HttpResult queryEquipmentByndid(@RequestParam("ndid") String ndid);
+
+}
diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/api/fallback/EquipmentFeignClientFallbackFactory.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/api/fallback/EquipmentFeignClientFallbackFactory.java
new file mode 100644
index 000000000..d204e56fc
--- /dev/null
+++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/api/fallback/EquipmentFeignClientFallbackFactory.java
@@ -0,0 +1,36 @@
+package com.njcn.algorithm.api.fallback;
+
+import com.njcn.algorithm.api.EquipmentFeignClient;
+import com.njcn.algorithm.pojo.vo.CsEquipmentDeliveryVO;
+import com.njcn.common.pojo.enums.response.CommonResponseEnum;
+import com.njcn.common.pojo.exception.BusinessException;
+import com.njcn.common.pojo.response.HttpResult;
+import feign.hystrix.FallbackFactory;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author xy
+ */
+@Slf4j
+@Component
+public class EquipmentFeignClientFallbackFactory implements FallbackFactory {
+ @Override
+ public EquipmentFeignClient create(Throwable cause) {
+ //判断抛出异常是否为解码器抛出的业务异常
+ Enum> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
+ if (cause.getCause() instanceof BusinessException) {
+ BusinessException businessException = (BusinessException) cause.getCause();
+// exceptionEnum = UserEnumUtil.getExceptionEnum(businessException.getResult());
+ }
+ Enum> finalExceptionEnum = exceptionEnum;
+ return new EquipmentFeignClient() {
+
+ @Override
+ public HttpResult queryEquipmentByndid(String ndid) {
+ log.error("{}异常,降级处理,异常为:{}","通过ndid查询出厂设备异常",cause.toString());
+ throw new BusinessException(finalExceptionEnum);
+ }
+ };
+ }
+}
diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/enums/AlgorithmResponseEnum.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/enums/AlgorithmResponseEnum.java
index 8edbc64c4..8b6dad52f 100644
--- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/enums/AlgorithmResponseEnum.java
+++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/enums/AlgorithmResponseEnum.java
@@ -16,6 +16,8 @@ public enum AlgorithmResponseEnum {
*/
PROJECT_COMMON_ERROR("A00500","同一用户下项目名不能相同"),
DICT_DATA_ERROR("A00501","暂无此字典表类型"),
+ NDID_ERROR("A00502","存在相同的ndid"),
+
;
diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAddParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAddParm.java
new file mode 100644
index 000000000..597a6cbf1
--- /dev/null
+++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAddParm.java
@@ -0,0 +1,53 @@
+package com.njcn.algorithm.pojo.param;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/10 11:28【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+
+/**
+ * 装置数据模板表
+ */
+@Data
+public class CsDevModelAddParm {
+
+ /**
+ * 装置型号(字典数据)
+ */
+ @ApiModelProperty(value = "装置型号")
+ private String devType;
+
+ /**
+ * 版本号
+ */
+ @ApiModelProperty(value = "版本号")
+ private String versionNo;
+
+ /**
+ * 版本日期
+ */
+ @ApiModelProperty(value = "版本日期")
+ @DateTimeFormat(pattern="yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ private Date versionDate;
+
+ /**
+ * 装置模板文件路径
+ */
+ @ApiModelProperty(value = "装置模板文件路径")
+ private String filePath;
+
+
+}
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAuditParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAuditParm.java
new file mode 100644
index 000000000..c233c874c
--- /dev/null
+++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAuditParm.java
@@ -0,0 +1,60 @@
+package com.njcn.algorithm.pojo.param;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+
+/**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/10 11:28【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+
+/**
+ * 装置数据模板表
+ */
+@Data
+public class CsDevModelAuditParm {
+ @NotNull(message="版本id不能为空!")
+ private String id;
+ /**
+ * 装置型号(字典数据)
+ */
+ @ApiModelProperty(value = "装置型号")
+ private String devType;
+
+ /**
+ * 版本号
+ */
+ @ApiModelProperty(value = "版本号")
+ private String versionNo;
+
+ /**
+ * 版本日期
+ */
+ @ApiModelProperty(value = "版本日期")
+ @DateTimeFormat(pattern="yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ private Date versionDate;
+
+ /**
+ * 装置模板文件路径
+ */
+ @ApiModelProperty(value = "装置模板文件路径")
+ private String filePath;
+
+
+ @ApiModelProperty(value = "状态")
+ private String status;
+
+
+
+}
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryListParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryListParm.java
new file mode 100644
index 000000000..8fd79fad6
--- /dev/null
+++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryListParm.java
@@ -0,0 +1,48 @@
+package com.njcn.algorithm.pojo.param;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/7 11:29【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+
+/**
+ * 程序版本表
+ */
+@Data
+public class CsDevModelQueryListParm {
+
+
+ /**
+ * 装置型号(字典数据)
+ */
+ @ApiModelProperty(value = "装置型号")
+ private String devType;
+ @ApiModelProperty(value = "版本号")
+ private String versionNo;
+ /**
+ * 版本日期
+ */
+ @ApiModelProperty(value = "版本日期")
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ @DateTimeFormat(pattern="yyyy-MM-dd")
+ private String versionStartDate;
+
+ @ApiModelProperty(value = "版本日期")
+ @DateTimeFormat(pattern="yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ private String versionendDate;
+
+
+
+
+}
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryParm.java
new file mode 100644
index 000000000..246d6ba70
--- /dev/null
+++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryParm.java
@@ -0,0 +1,60 @@
+package com.njcn.algorithm.pojo.param;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+
+/**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/7 11:29【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+
+/**
+ * 程序版本表
+ */
+@Data
+public class CsDevModelQueryParm {
+
+ @NotNull(message="当前页不能为空!")
+ @Min(value = 1, message = "当前页不能为0")
+ @ApiModelProperty(value = "当前页",name = "currentPage",dataType ="Integer",required = true)
+ private Integer currentPage;
+ /**显示条数*/
+ @NotNull(message="显示条数不能为空!")
+ @ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true)
+ private Integer pageSize;
+ /**
+ * 装置型号(字典数据)
+ */
+ @ApiModelProperty(value = "装置型号")
+ private String devType;
+ @ApiModelProperty(value = "装置名称")
+ private String devName;
+
+
+ /**
+ * 版本日期
+ */
+ @ApiModelProperty(value = "版本日期")
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ @DateTimeFormat(pattern="yyyy-MM-dd")
+ private String versionStartDate;
+
+ @ApiModelProperty(value = "版本日期")
+ @DateTimeFormat(pattern="yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ private String versionendDate;
+
+
+
+
+}
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAddParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAddParm.java
new file mode 100644
index 000000000..29ec01194
--- /dev/null
+++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAddParm.java
@@ -0,0 +1,79 @@
+package com.njcn.algorithm.pojo.param;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+
+/**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/7 11:29【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+
+/**
+ * 程序版本表
+ */
+@Data
+public class CsEdDataAddParm {
+
+
+ /**
+ * 装置型号(字典数据)
+ */
+ @ApiModelProperty(value = "装置型号")
+ @NotBlank(message="装置型号不能为空!")
+ private String devType;
+
+ /**
+ * 版本号
+ */
+ @ApiModelProperty(value = "版本号")
+ @NotBlank(message="版本号不能为空!")
+ private String versionNo;
+
+ /**
+ * 版本协议
+ */
+ @ApiModelProperty(value = "版本协议")
+ @NotBlank(message="版本协议不能为空!")
+ private String versionAgreement;
+
+ /**
+ * 版本日期
+ */
+ @ApiModelProperty(value = "版本日期")
+ @DateTimeFormat(pattern="yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ private Date versionDate;
+
+ /**
+ * 描述
+ */
+ @ApiModelProperty(value = "描述")
+ private String description;
+
+ /**
+ * 版本类型
+ */
+ @ApiModelProperty(value = "版本类型")
+ @NotBlank(message="版本类型不能为空!")
+ private String versionType;
+
+ @ApiModelProperty(value = "crc信息")
+ private String crcInfo;
+
+ @ApiModelProperty(value = ".bin文件")
+ @NotNull(message="文件不能为空!")
+ private MultipartFile file;
+
+}
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAuditParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAuditParm.java
new file mode 100644
index 000000000..f1ee20530
--- /dev/null
+++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAuditParm.java
@@ -0,0 +1,74 @@
+package com.njcn.algorithm.pojo.param;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.constraints.NotNull;
+import java.time.LocalDate;
+
+/**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/7 11:29【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+
+/**
+ * 程序版本表
+ */
+@Data
+public class CsEdDataAuditParm {
+
+ @NotNull(message="版本id不能为空!")
+ private String id;
+ /**
+ * 装置型号(字典数据)
+ */
+ @ApiModelProperty(value = "装置型号")
+ private String devType;
+
+ /**
+ * 版本号
+ */
+ @ApiModelProperty(value = "版本号")
+ private String versionNo;
+
+ /**
+ * 版本协议
+ */
+ @ApiModelProperty(value = "版本协议")
+ private String versionAgreement;
+
+ /**
+ * 版本日期
+ */
+ @ApiModelProperty(value = "版本日期")
+ @DateTimeFormat(pattern="yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ private LocalDate versionDate;
+
+ /**
+ * 描述
+ */
+ @ApiModelProperty(value = "描述")
+ private String description;
+
+ /**
+ * 版本类型
+ */
+ @ApiModelProperty(value = "版本类型")
+ private String versionType;
+
+ @ApiModelProperty(value = "crc信息")
+ private String crcInfo;
+
+ @ApiModelProperty(value = ".bin文件")
+ private MultipartFile file;
+
+}
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataQueryParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataQueryParm.java
new file mode 100644
index 000000000..729c09cbd
--- /dev/null
+++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataQueryParm.java
@@ -0,0 +1,60 @@
+package com.njcn.algorithm.pojo.param;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+
+/**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/7 11:29【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+
+/**
+ * 程序版本表
+ */
+@Data
+public class CsEdDataQueryParm {
+
+ @NotNull(message="当前页不能为空!")
+ @Min(value = 1, message = "当前页不能为0")
+ @ApiModelProperty(value = "当前页",name = "currentPage",dataType ="Integer",required = true)
+ private Integer currentPage;
+ /**显示条数*/
+ @NotNull(message="显示条数不能为空!")
+ @ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true)
+ private Integer pageSize;
+ /**
+ * 装置型号(字典数据)
+ */
+ @ApiModelProperty(value = "装置型号")
+ private String devType;
+ @ApiModelProperty(value = "装置名称")
+ private String devName;
+
+
+ /**
+ * 版本日期
+ */
+ @ApiModelProperty(value = "版本日期")
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ @DateTimeFormat(pattern="yyyy-MM-dd")
+ private String versionStartDate;
+
+ @ApiModelProperty(value = "版本日期")
+ @DateTimeFormat(pattern="yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ private String versionendDate;
+
+
+
+
+}
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsFeedbackAddParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsFeedbackAddParm.java
index 91d9f474a..c0f8e5087 100644
--- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsFeedbackAddParm.java
+++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsFeedbackAddParm.java
@@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
-import javax.validation.constraints.NotNull;
+import javax.validation.constraints.NotBlank;
/**
*
@@ -25,31 +25,29 @@ public class CsFeedbackAddParm {
* 标题
*/
@ApiModelProperty(value = "标题")
- @NotNull(message="标题不能为空!")
+ @NotBlank(message="标题不能为空!")
private String title;
/**
* 描述
*/
@ApiModelProperty(value = "描述")
- @NotNull(message="描述不能为空!")
private String description;
/**
* 用户id
*/
@ApiModelProperty(value = "用户id")
- @NotNull(message="用户id不能为空!")
+ @NotBlank(message="用户id不能为空!")
private String userId;
/**
* 问题类型(字典数据)
*/
@ApiModelProperty(value = "问题类型")
- @NotNull(message="问题类型不能为空!")
+ @NotBlank(message="问题类型不能为空!")
private String type;
@ApiModelProperty(value = "拓扑图文件")
- @NotNull(message="拓扑图文件不能为空!")
private MultipartFile[] files;
}
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsDevModelPO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsDevModelPO.java
new file mode 100644
index 000000000..7f68f925c
--- /dev/null
+++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsDevModelPO.java
@@ -0,0 +1,63 @@
+package com.njcn.algorithm.pojo.po;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.njcn.db.bo.BaseEntity;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/10 11:28【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+/**
+ * 装置数据模板表
+ */
+@Data
+@TableName(value = "cs_dev_model")
+public class CsDevModelPO extends BaseEntity {
+ /**
+ * id
+ */
+ @TableId(value = "id",type = IdType.ASSIGN_UUID)
+ private String id;
+
+ /**
+ * 装置型号(字典数据)
+ */
+ @TableField(value = "dev_type")
+ private String devType;
+
+ /**
+ * 版本号
+ */
+ @TableField(value = "version_no")
+ private String versionNo;
+
+ /**
+ * 版本日期
+ */
+ @TableField(value = "version_date")
+ private Date versionDate;
+
+ /**
+ * 装置模板文件路径
+ */
+ @TableField(value = "file_path")
+ private String filePath;
+
+
+ /**
+ * 状态(0:删除 1:正常)
+ */
+ @TableField(value = "status")
+ private String status;
+}
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEdDataPO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEdDataPO.java
index 9141ec48e..d38813498 100644
--- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEdDataPO.java
+++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEdDataPO.java
@@ -1,6 +1,7 @@
package com.njcn.algorithm.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.njcn.db.bo.BaseEntity;
import lombok.Data;
@@ -11,21 +12,22 @@ import java.util.Date;
*
* Description:
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
- * Date: 2023/4/3 19:12【需求编号】
+ * Date: 2023/4/7 11:29【需求编号】
*
* @author clam
* @version V1.0.0
*/
+
/**
- * 程序版本表
- */
+ * 程序版本表
+ */
@Data
@TableName(value = "cs_ed_data")
public class CsEdDataPO extends BaseEntity {
/**
* id
*/
- @TableField(value = "id")
+ @TableId(value = "id")
private String id;
/**
@@ -43,8 +45,8 @@ public class CsEdDataPO extends BaseEntity {
/**
* 版本协议
*/
- @TableField(value = "version_agree")
- private String versionAgree;
+ @TableField(value = "version_agreement")
+ private String versionAgreement;
/**
* 版本日期
@@ -55,11 +57,11 @@ public class CsEdDataPO extends BaseEntity {
/**
* 描述
*/
- @TableField(value = "describe")
- private String describe;
+ @TableField(value = "description")
+ private String description;
/**
- * 版本类型(字典数据)
+ * 版本类型
*/
@TableField(value = "version_type")
private String versionType;
@@ -76,5 +78,4 @@ public class CsEdDataPO extends BaseEntity {
@TableField(value = "file_path")
private String filePath;
-
}
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEngineeringPO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEngineeringPO.java
new file mode 100644
index 000000000..90f41828c
--- /dev/null
+++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/po/CsEngineeringPO.java
@@ -0,0 +1,68 @@
+package com.njcn.algorithm.pojo.po;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.njcn.db.bo.BaseEntity;
+import lombok.Data;
+
+/**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/7 11:04【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+/**
+ * 工程信息表
+ */
+@Data
+@TableName(value = "cs_engineering")
+public class CsEngineeringPO extends BaseEntity {
+ /**
+ * id
+ */
+ @TableId(value = "id", type = IdType.ASSIGN_UUID)
+ private String id;
+
+ /**
+ * 工程名称
+ */
+ @TableField(value = "name")
+ private String name;
+
+ /**
+ * 用户id
+ */
+ @TableField(value = "user_id")
+ private String userId;
+
+ /**
+ * 省
+ */
+ @TableField(value = "province")
+ private String province;
+
+ /**
+ * 市
+ */
+ @TableField(value = "city")
+ private String city;
+
+ /**
+ * 描述
+ */
+ @TableField(value = "description")
+ private String description;
+
+ /**
+ * 状态(0:删除 1:正常)
+ */
+ @TableField(value = "status")
+ private Boolean status;
+
+
+}
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsDevModelPageVO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsDevModelPageVO.java
new file mode 100644
index 000000000..a71f0b27b
--- /dev/null
+++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsDevModelPageVO.java
@@ -0,0 +1,65 @@
+package com.njcn.algorithm.pojo.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.njcn.db.bo.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDate;
+
+/**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/10 11:28【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+
+/**
+ * 装置数据模板表
+ */
+@Data
+public class CsDevModelPageVO extends BaseEntity {
+ /**
+ * id
+ */
+ @ApiModelProperty(value = "id")
+ private String id;
+
+ /**
+ * 设备型号(字典数据)
+ */
+ @ApiModelProperty(value = "设备型号")
+ private String devType;
+ @ApiModelProperty(value = "设备名称")
+ private String devName;
+
+
+ /**
+ * 版本号
+ */
+ @ApiModelProperty(value = "版本号")
+ private String versionNo;
+
+
+ /**
+ * 版本日期
+ */
+ @ApiModelProperty(value = "版本日期")
+ private LocalDate versionDate;
+
+ /**
+ * 装置模板文件路径
+ */
+ @TableField(value = "file_path")
+ private String filePath;
+
+
+ /**
+ * 状态(0:删除 1:正常)
+ */
+ @TableField(value = "status")
+ private String status;
+}
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEdDataVO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEdDataVO.java
new file mode 100644
index 000000000..c53dfa1ff
--- /dev/null
+++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEdDataVO.java
@@ -0,0 +1,73 @@
+package com.njcn.algorithm.pojo.vo;
+
+import com.njcn.db.bo.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDate;
+
+/**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/7 11:29【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+
+/**
+ * 程序版本表
+ */
+@Data
+public class CsEdDataVO extends BaseEntity {
+
+ @ApiModelProperty(value = "id")
+ private String id;
+
+ /**
+ * 装置型号(字典数据)
+ */
+ @ApiModelProperty(value = "装置型号")
+ private String devType;
+ @ApiModelProperty(value = "装置名称")
+ private String devName;
+
+
+ /**
+ * 版本号
+ */
+ @ApiModelProperty(value = "版本号")
+ private String versionNo;
+
+ /**
+ * 版本协议
+ */
+ @ApiModelProperty(value = "版本协议")
+ private String versionAgreement;
+
+ /**
+ * 版本日期
+ */
+ @ApiModelProperty(value = "版本日期")
+ private LocalDate versionDate;
+
+ /**
+ * 描述
+ */
+ @ApiModelProperty(value = "描述")
+ private String description;
+
+ /**
+ * 版本类型
+ */
+ @ApiModelProperty(value = "版本类型")
+ private String versionType;
+
+ @ApiModelProperty(value = "crc信息")
+ private String crcInfo;
+
+ @ApiModelProperty(value = ".bin文件")
+ private String filePath;
+
+}
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-boot/pom.xml b/pqs-algorithm/algorithm-boot/pom.xml
index 5afd48a32..2fe984f3b 100644
--- a/pqs-algorithm/algorithm-boot/pom.xml
+++ b/pqs-algorithm/algorithm-boot/pom.xml
@@ -14,6 +14,16 @@
com.njcn
common-web
${project.version}
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ ch.qos.logback
+ logback-classic
+
+
com.njcn
@@ -91,44 +101,44 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ com.spotify
+ docker-maven-plugin
+ 1.0.0
+
+
+
+ build-image
+ ${docker.operate}
+
+ build
+
+
+
+
+
+ http://${docker.repostory}
+
+ ${docker.repostory}/${docker.registry.name}/${project.artifactId}
+
+
+ latest
+
+
+ ${docker.url}
+ ${basedir}/
+
+
+
+ /ROOT
+
+ ${project.build.directory}
+
+ ${project.build.finalName}.jar
+
+
+
+
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/DevModelController.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/DevModelController.java
new file mode 100644
index 000000000..ebac5a6fe
--- /dev/null
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/DevModelController.java
@@ -0,0 +1,95 @@
+package com.njcn.algorithm.controller.Equipment;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.njcn.algorithm.pojo.param.CsDevModelAddParm;
+import com.njcn.algorithm.pojo.param.CsDevModelAuditParm;
+import com.njcn.algorithm.pojo.param.CsDevModelQueryListParm;
+import com.njcn.algorithm.pojo.param.CsDevModelQueryParm;
+import com.njcn.algorithm.pojo.vo.CsDevModelPageVO;
+import com.njcn.algorithm.service.CsDevModelService;
+import com.njcn.common.pojo.annotation.OperateInfo;
+import com.njcn.common.pojo.enums.common.LogEnum;
+import com.njcn.common.pojo.enums.response.CommonResponseEnum;
+import com.njcn.common.pojo.response.HttpResult;
+import com.njcn.common.utils.HttpResultUtil;
+import com.njcn.web.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/3/27 15:31【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/devmodel")
+@Api(tags = "设备模板")
+@AllArgsConstructor
+public class DevModelController extends BaseController {
+
+ private final CsDevModelService csDevModelService;
+
+ @OperateInfo(info = LogEnum.BUSINESS_COMMON)
+ @PostMapping("/addDevModel")
+ @ApiOperation("新增设备模板")
+ @ApiImplicitParam(name = "csDevModelAddParm", value = "新增设备模板参数", required = true)
+ public HttpResult addDevModel(@RequestBody @Validated CsDevModelAddParm csDevModelAddParm){
+ String methodDescribe = getMethodDescribe("addDevModel");
+
+ Boolean flag = csDevModelService.addDevModel (csDevModelAddParm);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
+ }
+
+
+ @OperateInfo(info = LogEnum.BUSINESS_COMMON)
+ @PostMapping("/AuditDevModel")
+ @ApiOperation("更新/删除出厂设备")
+ @ApiImplicitParam(name = "csDevModelAuditParm", value = "更新/删除设备模板参数", required = true)
+ public HttpResult AuditDevModel(@RequestBody @Validated CsDevModelAuditParm csDevModelAuditParm ){
+ String methodDescribe = getMethodDescribe("AuditDevModel");
+
+ Boolean flag = csDevModelService.AuditDevModel(csDevModelAuditParm);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
+ }
+
+
+
+ @OperateInfo(info = LogEnum.BUSINESS_COMMON)
+ @PostMapping("/queryDevModelPage")
+ @ApiOperation("设备模板分页查询")
+ @ApiImplicitParam(name = "csDevModelQueryParm", value = "设备模板查询参数", required = true)
+ public HttpResult> queryDevModelPage(@RequestBody @Validated CsDevModelQueryParm csDevModelQueryParm ){
+ String methodDescribe = getMethodDescribe("queryDevModelPage");
+
+ IPage page = csDevModelService.queryPage (csDevModelQueryParm);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
+ }
+
+ @OperateInfo(info = LogEnum.BUSINESS_COMMON)
+ @PostMapping("/queryEquipmentByProject")
+ @ApiOperation("通过项目查询出厂设备")
+ @ApiImplicitParam(name = "csDevModelQueryListParm", value = "项目信息", required = true)
+ public HttpResult> queryEquipmentByProject(@RequestBody CsDevModelQueryListParm csDevModelQueryListParm){
+ String methodDescribe = getMethodDescribe("queryEquipmentByProject");
+
+ List list = csDevModelService.queryList(csDevModelQueryListParm);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
+ }
+
+
+
+}
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/EquipmentDeliveryController.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/EquipmentDeliveryController.java
index 0ffc69d30..629dfcfd1 100644
--- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/EquipmentDeliveryController.java
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/EquipmentDeliveryController.java
@@ -59,19 +59,10 @@ public class EquipmentDeliveryController extends BaseController {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
}
-// @OperateInfo(info = LogEnum.BUSINESS_COMMON)
-// @PostMapping("/queryEquipment")
-// @ApiOperation("项目查询")
-// @ApiImplicitParam(name = "appProjectQueryParm", value = "项目查询参数", required = true)
-// public HttpResult> queryEquipment(@Validated @RequestBody AppProjectQueryParm appProjectQueryParm){
-// String methodDescribe = getMethodDescribe("queryEquipment");
-//
-// List appProjectVOIPage = csEquipmentDeliveryService.queryEquipment (appProjectQueryParm);
-// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, appProjectVOIPage, methodDescribe);
-// }
+
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
- @PostMapping("/queryEquipmentByndid")
+ @PostMapping("/queryEquipmentByndid")
@ApiOperation("通过ndid查询出厂设备")
@ApiImplicitParam(name = "ndid", value = "网关识别码", required = true)
public HttpResult queryEquipmentByndid(@RequestParam("ndid")String ndid){
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/project/CsEdDataController.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/project/CsEdDataController.java
new file mode 100644
index 000000000..7f22b15eb
--- /dev/null
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/project/CsEdDataController.java
@@ -0,0 +1,75 @@
+package com.njcn.algorithm.controller.project;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.njcn.algorithm.pojo.param.CsEdDataAddParm;
+import com.njcn.algorithm.pojo.param.CsEdDataAuditParm;
+import com.njcn.algorithm.pojo.param.CsEdDataQueryParm;
+import com.njcn.algorithm.pojo.vo.CsEdDataVO;
+import com.njcn.algorithm.service.CsEdDataService;
+import com.njcn.common.pojo.annotation.OperateInfo;
+import com.njcn.common.pojo.enums.common.LogEnum;
+import com.njcn.common.pojo.enums.response.CommonResponseEnum;
+import com.njcn.common.pojo.response.HttpResult;
+import com.njcn.common.utils.HttpResultUtil;
+import com.njcn.web.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/4 9:02【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/edData")
+@Api(tags = "app版本信息")
+@AllArgsConstructor
+public class CsEdDataController extends BaseController {
+
+ private final CsEdDataService csEdDataService;
+
+
+ @OperateInfo(info = LogEnum.BUSINESS_COMMON)
+ @PostMapping("/addEdData")
+ @ApiOperation("新增app版本信息")
+ public HttpResult addEdData(@Validated CsEdDataAddParm csEdDataAddParm){
+ String methodDescribe = getMethodDescribe("addEdData");
+
+ boolean save = csEdDataService.addEdData (csEdDataAddParm);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, save, methodDescribe);
+ }
+
+ @OperateInfo(info = LogEnum.BUSINESS_COMMON)
+ @PostMapping("/auditEdData")
+ @ApiOperation("修改/删除app版本信息")
+ public HttpResult auditEdData(@Validated CsEdDataAuditParm csEdDataAuditParm){
+ String methodDescribe = getMethodDescribe("auditEdData");
+
+ Boolean flag = csEdDataService.auditEdData(csEdDataAuditParm);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
+ }
+
+ @OperateInfo(info = LogEnum.BUSINESS_COMMON)
+ @PostMapping("/queryEdDataPage")
+ @ApiOperation("版本信息查询")
+ @ApiImplicitParam(name = "csEdDataQueryParm", value = "查询参数", required = true)
+ public HttpResult> queryEdDataPage(@Validated @RequestBody CsEdDataQueryParm csEdDataQueryParm){
+ String methodDescribe = getMethodDescribe("queryEdDataPage");
+
+ IPage page = csEdDataService.queryEdDataPage (csEdDataQueryParm);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
+ }
+
+}
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsDevModelMapper.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsDevModelMapper.java
new file mode 100644
index 000000000..72782f51e
--- /dev/null
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsDevModelMapper.java
@@ -0,0 +1,26 @@
+package com.njcn.algorithm.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.njcn.algorithm.pojo.param.CsDevModelQueryListParm;
+import com.njcn.algorithm.pojo.param.CsDevModelQueryParm;
+import com.njcn.algorithm.pojo.po.CsDevModelPO;
+import com.njcn.algorithm.pojo.vo.CsDevModelPageVO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/10 11:28【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+public interface CsDevModelMapper extends BaseMapper {
+ Page getPage(Page returnpage,@Param("csDevModelQueryParm") CsDevModelQueryParm csDevModelQueryParm);
+
+ List queryList(@Param("csDevModelQueryListParm")CsDevModelQueryListParm csDevModelQueryListParm);
+}
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEdDataMapper.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEdDataMapper.java
index 7ca6b4a94..0af798fbd 100644
--- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEdDataMapper.java
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEdDataMapper.java
@@ -1,16 +1,20 @@
package com.njcn.algorithm.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.njcn.algorithm.pojo.param.CsEdDataQueryParm;
import com.njcn.algorithm.pojo.po.CsEdDataPO;
+import com.njcn.algorithm.pojo.vo.CsEdDataVO;
+import org.apache.ibatis.annotations.Param;
/**
- *
* Description:
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
- * Date: 2023/4/3 19:12【需求编号】
+ * Date: 2023/4/7 11:29【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface CsEdDataMapper extends BaseMapper {
+ Page getPage(Page returnpage,@Param("csEdDataQueryParm") CsEdDataQueryParm csEdDataQueryParm);
}
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEngineeringMapper.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEngineeringMapper.java
new file mode 100644
index 000000000..99bfdc157
--- /dev/null
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/CsEngineeringMapper.java
@@ -0,0 +1,16 @@
+package com.njcn.algorithm.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.njcn.algorithm.pojo.po.CsEngineeringPO;
+
+/**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/7 11:04【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+public interface CsEngineeringMapper extends BaseMapper {
+}
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsDevModelMapper.xml b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsDevModelMapper.xml
new file mode 100644
index 000000000..13be37d25
--- /dev/null
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsDevModelMapper.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, dev_type, version_no, version_date, file_path, create_by, create_time, update_by,
+ update_time, `status`
+
+
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEdDataMapper.xml b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEdDataMapper.xml
index 920dea6b6..a65dc135d 100644
--- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEdDataMapper.xml
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEdDataMapper.xml
@@ -1,26 +1,47 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- id, dev_type, version_no, version_agree, version_date, `describe`, version_type,
- `status`, file_path, create_by, create_time, update_by, update_time
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, dev_type, version_no, version_agreement, version_date, `describe`, version_type,
+ `status`, file_path, create_by, create_time, update_by, update_time
+
+
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEngineeringMapper.xml b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEngineeringMapper.xml
new file mode 100644
index 000000000..50ff003f1
--- /dev/null
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEngineeringMapper.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, `name`, user_id, province, city, description, `status`, create_by, create_time,
+ update_by, update_time
+
+
\ No newline at end of file
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsDevModelService.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsDevModelService.java
new file mode 100644
index 000000000..28d180f54
--- /dev/null
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsDevModelService.java
@@ -0,0 +1,55 @@
+package com.njcn.algorithm.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.njcn.algorithm.pojo.param.*;
+import com.njcn.algorithm.pojo.po.CsDevModelPO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.njcn.algorithm.pojo.vo.CsDevModelPageVO;
+
+import java.util.List;
+
+/**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/10 11:28【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+public interface CsDevModelService extends IService{
+
+ /**
+ * @Description: addDevModel
+ * @Param: [csDevModelAddParm]
+ * @return: java.lang.Boolean
+ * @Author: clam
+ * @Date: 2023/4/10
+ */
+ Boolean addDevModel(CsDevModelAddParm csDevModelAddParm);
+ /**
+ * @Description: AuditDevModel
+ * @Param: [csDevModelAuditParm]
+ * @return: java.lang.Boolean
+ * @Author: clam
+ * @Date: 2023/4/10
+ */
+ Boolean AuditDevModel(CsDevModelAuditParm csDevModelAuditParm);
+ /**
+ * @Description: 设备模板
+ * @Param: [csDevModelQueryParm]
+ * @return: com.baomidou.mybatisplus.core.metadata.IPage
+ * @Author: clam
+ * @Date: 2023/4/10
+ */
+ IPage queryPage(CsDevModelQueryParm csDevModelQueryParm);
+ /**
+ * @Description: queryList
+ * @Param: [projectEquipmentQueryParm]
+ * @return: java.util.List
+ * @Author: clam
+ * @Date: 2023/4/10
+ * @param projectEquipmentQueryParm
+ */
+ List queryList(CsDevModelQueryListParm projectEquipmentQueryParm);
+}
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEdDataService.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEdDataService.java
index 6c75bf149..43b87add1 100644
--- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEdDataService.java
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEdDataService.java
@@ -1,9 +1,14 @@
package com.njcn.algorithm.service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.njcn.algorithm.pojo.param.CsEdDataAddParm;
+import com.njcn.algorithm.pojo.param.CsEdDataAuditParm;
+import com.njcn.algorithm.pojo.param.CsEdDataQueryParm;
import com.njcn.algorithm.pojo.po.CsEdDataPO;
import com.baomidou.mybatisplus.extension.service.IService;
- /**
- *
+import com.njcn.algorithm.pojo.vo.CsEdDataVO;
+
+/**
* Description:
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
* Date: 2023/4/3 19:12【需求编号】
@@ -11,7 +16,31 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @author clam
* @version V1.0.0
*/
-public interface CsEdDataService extends IService{
-
+public interface CsEdDataService extends IService {
+ /**
+ * @Description: addEdData
+ * @Param: [csEdDataAddParm]
+ * @return: boolean
+ * @Author: clam
+ * @Date: 2023/4/7
+ */
+ boolean addEdData(CsEdDataAddParm csEdDataAddParm);
+ /**
+ * @Description:
+ * @Param: [csEdDataAuditParm]
+ * @return: java.lang.Boolean
+ * @Author: clam
+ * @Date: 2023/4/7
+ */
+ Boolean auditEdData(CsEdDataAuditParm csEdDataAuditParm);
+ /**
+ * @Description: queryEdDataPage
+ * @Param: [csEdDataQueryParm]
+ * @return: com.baomidou.mybatisplus.core.metadata.IPage
+ * @Author: clam
+ * @Date: 2023/4/7
+ */
+ IPage queryEdDataPage(CsEdDataQueryParm csEdDataQueryParm);
}
+
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEngineeringService.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEngineeringService.java
new file mode 100644
index 000000000..6c09eaceb
--- /dev/null
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/CsEngineeringService.java
@@ -0,0 +1,17 @@
+package com.njcn.algorithm.service;
+
+import com.njcn.algorithm.pojo.po.CsEngineeringPO;
+import com.baomidou.mybatisplus.extension.service.IService;
+ /**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/7 11:04【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+public interface CsEngineeringService extends IService{
+
+
+}
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsDevModelServiceImpl.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsDevModelServiceImpl.java
new file mode 100644
index 000000000..ab044db6f
--- /dev/null
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsDevModelServiceImpl.java
@@ -0,0 +1,62 @@
+package com.njcn.algorithm.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.njcn.algorithm.mapper.CsDevModelMapper;
+import com.njcn.algorithm.pojo.param.*;
+import com.njcn.algorithm.pojo.po.CsDevModelPO;
+import com.njcn.algorithm.pojo.vo.CsDevModelPageVO;
+import com.njcn.algorithm.service.CsDevModelService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/10 11:28【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+@Service
+public class CsDevModelServiceImpl extends ServiceImpl implements CsDevModelService{
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public Boolean addDevModel(CsDevModelAddParm csDevModelAddParm) {
+ CsDevModelPO csDevModelPO = new CsDevModelPO ();
+ BeanUtils.copyProperties (csDevModelAddParm, csDevModelPO);
+ csDevModelPO.setStatus ("1");
+ boolean save = this.save (csDevModelPO);
+
+ return save;
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public Boolean AuditDevModel(CsDevModelAuditParm csDevModelAuditParm) {
+ CsDevModelPO csDevModelPO = new CsDevModelPO ();
+ BeanUtils.copyProperties (csDevModelAuditParm, csDevModelPO);
+ boolean b = this.updateById (csDevModelPO);
+ return b;
+ }
+
+ @Override
+ public IPage queryPage(CsDevModelQueryParm csDevModelQueryParm) {
+ Page returnpage = new Page<> (csDevModelQueryParm.getCurrentPage ( ), csDevModelQueryParm.getPageSize ( ));
+
+ returnpage = this.getBaseMapper ().getPage(returnpage,csDevModelQueryParm);
+ return returnpage;
+ }
+
+ @Override
+ public List queryList(CsDevModelQueryListParm csDevModelQueryListParm) {
+ List list = this.getBaseMapper ().queryList(csDevModelQueryListParm);
+ return list;
+ }
+}
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEdDataServiceImpl.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEdDataServiceImpl.java
index 6dfcdb85c..f87de13a7 100644
--- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEdDataServiceImpl.java
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEdDataServiceImpl.java
@@ -1,12 +1,25 @@
package com.njcn.algorithm.service.impl;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.algorithm.mapper.CsEdDataMapper;
+import com.njcn.algorithm.pojo.param.CsEdDataAddParm;
+import com.njcn.algorithm.pojo.param.CsEdDataAuditParm;
+import com.njcn.algorithm.pojo.param.CsEdDataQueryParm;
import com.njcn.algorithm.pojo.po.CsEdDataPO;
+import com.njcn.algorithm.pojo.vo.CsEdDataVO;
import com.njcn.algorithm.service.CsEdDataService;
+import com.njcn.oss.constant.OssPath;
+import com.njcn.oss.utils.FileStorageUtil;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Objects;
+
/**
- *
* Description:
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
* Date: 2023/4/3 19:12【需求编号】
@@ -15,6 +28,42 @@ import org.springframework.stereotype.Service;
* @version V1.0.0
*/
@Service
-public class CsEdDataServiceImpl extends ServiceImpl implements CsEdDataService{
+@RequiredArgsConstructor
+public class CsEdDataServiceImpl extends ServiceImpl implements CsEdDataService {
+
+ private final FileStorageUtil fileStorageUtil;
+
+ @Override
+ @Transactional(rollbackFor = {Exception.class})
+ public boolean addEdData(CsEdDataAddParm csEdDataAddParm) {
+ CsEdDataPO csEdDataPO = new CsEdDataPO ();
+ BeanUtils.copyProperties (csEdDataAddParm, csEdDataPO);
+ String filePath = fileStorageUtil.uploadMultipart (csEdDataAddParm.getFile (), OssPath.EDDATA);
+ csEdDataPO.setFilePath (filePath);
+ csEdDataPO.setStatus ("1");
+ boolean save = this.save (csEdDataPO);
+ return save;
+ }
+
+ @Override
+ public Boolean auditEdData(CsEdDataAuditParm csEdDataAuditParm) {
+ CsEdDataPO csEdDataPO = new CsEdDataPO ();
+ BeanUtils.copyProperties (csEdDataAuditParm, csEdDataPO);
+ if(!Objects.isNull (csEdDataAuditParm.getFile ())){
+ String filePath = fileStorageUtil.uploadMultipart (csEdDataAuditParm.getFile (), OssPath.EDDATA);
+ csEdDataPO.setFilePath (filePath);
+ }
+ boolean b = this.updateById (csEdDataPO);
+ return b;
+ }
+
+ @Override
+ public IPage queryEdDataPage(CsEdDataQueryParm csEdDataQueryParm) {
+ Page returnpage = new Page<> (csEdDataQueryParm.getCurrentPage ( ), csEdDataQueryParm.getPageSize ( ));
+
+ returnpage = this.getBaseMapper ().getPage(returnpage,csEdDataQueryParm);
+ return returnpage;
+ }
}
+
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEngineeringServiceImpl.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEngineeringServiceImpl.java
new file mode 100644
index 000000000..42d594b79
--- /dev/null
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEngineeringServiceImpl.java
@@ -0,0 +1,20 @@
+package com.njcn.algorithm.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.njcn.algorithm.mapper.CsEngineeringMapper;
+import com.njcn.algorithm.pojo.po.CsEngineeringPO;
+import com.njcn.algorithm.service.CsEngineeringService;
+import org.springframework.stereotype.Service;
+/**
+ *
+ * Description:
+ * 接口文档访问地址:http://serverIP:port/swagger-ui.html
+ * Date: 2023/4/7 11:04【需求编号】
+ *
+ * @author clam
+ * @version V1.0.0
+ */
+@Service
+public class CsEngineeringServiceImpl extends ServiceImpl implements CsEngineeringService{
+
+}
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEquipmentDeliveryServiceImpl.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEquipmentDeliveryServiceImpl.java
index 729cc46ee..7fbeba7ac 100644
--- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEquipmentDeliveryServiceImpl.java
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsEquipmentDeliveryServiceImpl.java
@@ -5,17 +5,20 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.njcn.algorithm.enums.AlgorithmResponseEnum;
import com.njcn.algorithm.mapper.CsEquipmentDeliveryMapper;
import com.njcn.algorithm.pojo.param.CsEquipmentDeliveryAddParm;
import com.njcn.algorithm.pojo.param.ProjectEquipmentQueryParm;
import com.njcn.algorithm.pojo.po.CsEquipmentDeliveryPO;
-import com.njcn.algorithm.pojo.vo.AppProjectVO;
import com.njcn.algorithm.pojo.vo.CsEquipmentDeliveryVO;
import com.njcn.algorithm.pojo.vo.ProjectEquipmentVO;
import com.njcn.algorithm.service.CsEquipmentDeliveryService;
+import com.njcn.common.pojo.exception.BusinessException;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
+import java.util.Objects;
+
/**
*
* Description:
@@ -30,6 +33,10 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl wrapper = new QueryWrapper();
- wrapper.eq ("ndid", ndid);
- CsEquipmentDeliveryPO csEquipmentDeliveryPO = this.baseMapper.selectOne (wrapper);
+ CsEquipmentDeliveryPO csEquipmentDeliveryPO = queryEquipmentPOByndid (ndid);
+ if(Objects.isNull (csEquipmentDeliveryPO)){
+ return result;
+ }
BeanUtils.copyProperties (csEquipmentDeliveryPO,result);
return result;
}
+ public CsEquipmentDeliveryPO queryEquipmentPOByndid(String ndid) {
+ QueryWrapper wrapper = new QueryWrapper();
+ wrapper.eq ("ndid", ndid);
+ CsEquipmentDeliveryPO csEquipmentDeliveryPO = this.baseMapper.selectOne (wrapper);
+ return csEquipmentDeliveryPO;
+ }
- @Override
+ @Override
public IPage queryEquipmentByProject(ProjectEquipmentQueryParm projectEquipmentQueryParm) {
Page returnpage = new Page<> (projectEquipmentQueryParm.getCurrentPage ( ), projectEquipmentQueryParm.getPageSize ( ));
@@ -65,4 +79,5 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl list = this.baseMapper.queryProjectEquipmentVO(returnpage,projectEquipmentQueryParm);
return list;
}
+
}
diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsFeedbackServiceImpl.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsFeedbackServiceImpl.java
index ca17f763e..446deead9 100644
--- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsFeedbackServiceImpl.java
+++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/impl/CsFeedbackServiceImpl.java
@@ -25,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
+import java.util.Objects;
import java.util.stream.Collectors;
/**
@@ -50,20 +51,24 @@ public class CsFeedbackServiceImpl extends ServiceImpl csFilePathPOS= new ArrayList<> ();
- for (int i = 0; i < csFeedbackAddParm.getFiles ( ).length; i++) {
+ boolean flag= true;
+ if(Objects.isNull (csFeedbackAddParm.getFiles ( ))){
+ List csFilePathPOS= new ArrayList<> ();
+ for (int i = 0; i < csFeedbackAddParm.getFiles ( ).length; i++) {
- CsFilePathPO csFilePathPO = new CsFilePathPO ( );
- csFilePathPO.setId (csFeedbackPO.getId ());
- String filePath = fileStorageUtil.uploadMultipart (csFeedbackAddParm.getFiles ( )[i], OssPath.FEEDBACK);
- csFilePathPO.setFileName (csFeedbackAddParm.getFiles ( )[i].getOriginalFilename ( ));
- csFilePathPO.setFilePath (filePath);
- csFilePathPO.setStatus ("1");
- csFilePathPOS.add (csFilePathPO);
+ CsFilePathPO csFilePathPO = new CsFilePathPO ( );
+ csFilePathPO.setId (csFeedbackPO.getId ());
+ String filePath = fileStorageUtil.uploadMultipart (csFeedbackAddParm.getFiles ( )[i], OssPath.FEEDBACK);
+ csFilePathPO.setFileName (csFeedbackAddParm.getFiles ( )[i].getOriginalFilename ( ));
+ csFilePathPO.setFilePath (filePath);
+ csFilePathPO.setStatus ("1");
+ csFilePathPOS.add (csFilePathPO);
+ }
+ flag = csFilePathService.saveBatch (csFilePathPOS);
}
- boolean b = csFilePathService.saveBatch (csFilePathPOS);
- return save&&b;
+
+ return save&&flag;
}
@Override
@@ -101,7 +106,9 @@ public class CsFeedbackServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper();
queryWrapper.eq ("id", id).eq ("status", "1");
List list = csFilePathService.list (queryWrapper);
- List collect = list.stream ( ).map (CsFilePathPO::getFilePath).collect (Collectors.toList ( ));
+ List collect = list.stream ( ).map (temp->{
+ return fileStorageUtil.getFileUrl (temp.getFilePath ());
+ }).collect (Collectors.toList ( ));
csFeedbackDetailVO.setImageUrls (collect);
QueryWrapper csFeedbackChatPOQueryWrapper = new QueryWrapper();
csFeedbackChatPOQueryWrapper.eq ("id", id).eq ("status", "1").orderByAsc ("create_time");
diff --git a/pqs-auth/pom.xml b/pqs-auth/pom.xml
index 78b6e2a15..88cb7c86a 100644
--- a/pqs-auth/pom.xml
+++ b/pqs-auth/pom.xml
@@ -21,6 +21,16 @@
com.njcn
common-web
${project.version}
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ ch.qos.logback
+ logback-classic
+
+
com.njcn
diff --git a/pqs-common/common-core/src/main/java/com/njcn/common/pojo/constant/ServerInfo.java b/pqs-common/common-core/src/main/java/com/njcn/common/pojo/constant/ServerInfo.java
index 71a6315db..70b1641ea 100644
--- a/pqs-common/common-core/src/main/java/com/njcn/common/pojo/constant/ServerInfo.java
+++ b/pqs-common/common-core/src/main/java/com/njcn/common/pojo/constant/ServerInfo.java
@@ -25,6 +25,7 @@ public interface ServerInfo {
String QUALITY = "quality-boot";
String PROCESS = "process-boot";
String PREPARE_BOOT = "prepare-boot";
+ String ALGORITHM_BOOT = "algorithm-boot";
}
diff --git a/pqs-common/common-oss/src/main/java/com/njcn/oss/constant/OssPath.java b/pqs-common/common-oss/src/main/java/com/njcn/oss/constant/OssPath.java
index 7516e46f9..3178d68c2 100644
--- a/pqs-common/common-oss/src/main/java/com/njcn/oss/constant/OssPath.java
+++ b/pqs-common/common-oss/src/main/java/com/njcn/oss/constant/OssPath.java
@@ -57,4 +57,14 @@ public interface OssPath {
* app反馈图片
*/
String FEEDBACK = "feedBack/";
+
+ /***
+ * app版本升级文件
+ */
+ String EDDATA = "edData/";
+
+ /***
+ * 装置模板
+ */
+ String DEV_MODEL = "algorithm/devModel/";
}
diff --git a/pqs-device/pms-device/pms-device-boot/pom.xml b/pqs-device/pms-device/pms-device-boot/pom.xml
index e97f1bc61..d18e83f10 100644
--- a/pqs-device/pms-device/pms-device-boot/pom.xml
+++ b/pqs-device/pms-device/pms-device-boot/pom.xml
@@ -43,6 +43,16 @@
com.njcn
common-web
${project.version}
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ ch.qos.logback
+ logback-classic
+
+
com.njcn
diff --git a/pqs-device/pq-device/pq-device-api/pom.xml b/pqs-device/pq-device/pq-device-api/pom.xml
index 71287e8cc..5d1a712d1 100644
--- a/pqs-device/pq-device/pq-device-api/pom.xml
+++ b/pqs-device/pq-device/pq-device-api/pom.xml
@@ -26,5 +26,9 @@
com.github.jeffreyning
mybatisplus-plus
+
+ com.github.jeffreyning
+ mybatisplus-plus
+
diff --git a/pqs-device/pq-device/pq-device-api/src/main/java/com/njcn/device/pq/pojo/param/RunManageParam.java b/pqs-device/pq-device/pq-device-api/src/main/java/com/njcn/device/pq/pojo/param/RunManageParam.java
index 0cbfbdec3..101d0c0c5 100644
--- a/pqs-device/pq-device/pq-device-api/src/main/java/com/njcn/device/pq/pojo/param/RunManageParam.java
+++ b/pqs-device/pq-device/pq-device-api/src/main/java/com/njcn/device/pq/pojo/param/RunManageParam.java
@@ -72,4 +72,6 @@ public class RunManageParam extends BaseParam implements Serializable {
@ApiModelProperty(name = "runFlag", value = "终端状态")
private List runFlag;
+ @ApiModelProperty(name = "searchValue", value = "篩選數據")
+ private String searchValue;
}
diff --git a/pqs-device/pq-device/pq-device-api/src/main/java/com/njcn/device/pq/pojo/vo/RunTimeVO.java b/pqs-device/pq-device/pq-device-api/src/main/java/com/njcn/device/pq/pojo/vo/RunTimeVO.java
index adf9ccd1d..99c583483 100644
--- a/pqs-device/pq-device/pq-device-api/src/main/java/com/njcn/device/pq/pojo/vo/RunTimeVO.java
+++ b/pqs-device/pq-device/pq-device-api/src/main/java/com/njcn/device/pq/pojo/vo/RunTimeVO.java
@@ -42,7 +42,6 @@ public class RunTimeVO implements Serializable {
@ApiModelProperty(name = "loginTime",value = "投运时间")
private String loginTime;
-
@ApiModelProperty(name = "devType",value = "终端型号")
private String devType;
diff --git a/pqs-device/pq-device/pq-device-api/src/main/java/com/njcn/device/pq/pojo/vo/UserScaleVO.java b/pqs-device/pq-device/pq-device-api/src/main/java/com/njcn/device/pq/pojo/vo/UserScaleVO.java
new file mode 100644
index 000000000..418695604
--- /dev/null
+++ b/pqs-device/pq-device/pq-device-api/src/main/java/com/njcn/device/pq/pojo/vo/UserScaleVO.java
@@ -0,0 +1,36 @@
+package com.njcn.device.pq.pojo.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @version 1.0.0
+ * @author: zbj
+ * @date: 2023/04/10
+ */
+@Data
+public class UserScaleVO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 月份
+ */
+ @ApiModelProperty("月份")
+ private String timeId;
+
+ /**
+ * 累计增量
+ */
+ @ApiModelProperty("累计增量")
+ private Integer incrementNum;
+
+ /**
+ * 当月增量
+ */
+ @ApiModelProperty("当月增量")
+ private Integer monthIncrementNum;
+
+}
diff --git a/pqs-device/pq-device/pq-device-boot/pom.xml b/pqs-device/pq-device/pq-device-boot/pom.xml
index 04eeb1d14..930868d69 100644
--- a/pqs-device/pq-device/pq-device-boot/pom.xml
+++ b/pqs-device/pq-device/pq-device-boot/pom.xml
@@ -42,6 +42,16 @@
com.njcn
common-web
${project.version}
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ ch.qos.logback
+ logback-classic
+
+
com.njcn
diff --git a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/DeviceMapper.java b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/DeviceMapper.java
index 10bd0a7d3..fae5c7785 100644
--- a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/DeviceMapper.java
+++ b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/DeviceMapper.java
@@ -3,6 +3,7 @@ package com.njcn.device.pq.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.device.pq.pojo.po.Device;
+import com.njcn.device.pq.pojo.vo.LineInfluxDbOnlineVO;
import com.njcn.device.pq.pojo.vo.RunManageVO;
import com.njcn.device.pq.pojo.vo.RunTimeVO;
import org.apache.ibatis.annotations.Param;
@@ -36,24 +37,30 @@ public interface DeviceMapper extends BaseMapper {
* 获取监测点台账信息
* @param list 监测点集合
* @param comFlag 状态
- * @param runFlag 状态
+ * @param searchValue
* @return 结果
*/
- List getRunManageList(@Param("list") List list, @Param("comFlag")List comFlag, @Param("runFlag")List runFlag);
+ List getRunManageList(@Param("list") List list,
+ @Param("comFlag") List comFlag,
+ @Param("searchValue") String searchValue);
/**
* 获取监测点台账信息
* @param list 终端集合
* @param comFlag 状态
* @param runFlag 状态
+ * @param manufacturer
+ * @param searchValue
* @return 结果
*/
- List getRunManageDevList(@Param("list") List list, @Param("comFlag")List comFlag, @Param("runFlag")List runFlag);
+ List getRunManageDevList(@Param("list") List list,
+ @Param("comFlag") List comFlag,
+ @Param("runFlag") List runFlag,
+ @Param("manufacturers") List manufacturer,
+ @Param("searchValue") String searchValue);
- /**
- * 获取指定等级的装置
- * @author cdf
- * @date 2023/2/10
- */
- List getDevByGrade(@Param("devId")List devIds,@Param("lineGrade") String lineGrade);
+
+ List getOnlineEvaluate(@Param("list") List devIndexes,
+ @Param("begin") String searchBeginTime,
+ @Param("end") String searchEndTime);
}
diff --git a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/DeviceMapper.xml b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/DeviceMapper.xml
index b803a40fe..c2bfe7fcc 100644
--- a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/DeviceMapper.xml
+++ b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/DeviceMapper.xml
@@ -18,72 +18,71 @@
+
diff --git a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/service/impl/RunManageServiceImpl.java b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/service/impl/RunManageServiceImpl.java
index d85058e10..5bd425928 100644
--- a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/service/impl/RunManageServiceImpl.java
+++ b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/service/impl/RunManageServiceImpl.java
@@ -68,8 +68,6 @@ public class RunManageServiceImpl implements RunManageService {
private final LineDetailMapper lineDetailMapper;
- private final InfluxDbUtils influxDbUtils;
-
@Override
public List getLineLedger(RunManageParam runManageParam) {
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
@@ -77,8 +75,8 @@ public class RunManageServiceImpl implements RunManageService {
List generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, runManageParam.getRunFlag(), Stream.of(1).collect(Collectors.toList()));
List lineIndexes = generalDeviceDTOList.stream().flatMap(list->list.getLineIndexes().stream()).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(lineIndexes)) {
- return deviceMapper.getRunManageList(lineIndexes, runManageParam.getComFlag(), runManageParam.getRunFlag());
- }else {
+ return deviceMapper.getRunManageList(lineIndexes, runManageParam.getComFlag(),runManageParam.getSearchValue());
+ } else {
throw new BusinessException(CommonResponseEnum.FAIL);
}
}
@@ -93,19 +91,22 @@ public class RunManageServiceImpl implements RunManageService {
if (!CollectionUtils.isEmpty(generalDeviceDTOList)) {
List devIndexes = generalDeviceDTOList.stream().flatMap(list->list.getDeviceIndexes().stream()).collect(Collectors.toList());
DateFormat bf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- runManageParam.setSearchBeginTime(DateUtil.beginOfMonth(new Date()).toString(bf));
- runManageParam.setSearchEndTime(DateUtil.endOfMonth(new Date()).toString(bf));
+ runManageParam.setSearchBeginTime(bf.format(DateUtil.beginOfDay(DateUtil.parse(runManageParam.getSearchBeginTime()))));
+ runManageParam.setSearchEndTime(bf.format(DateUtil.beginOfDay(DateUtil.parse(runManageParam.getSearchEndTime()))));
+ List manuList = runManageParam.getManufacturer().stream().map(SimpleDTO::getId).collect(Collectors.toList());
if(CollectionUtil.isNotEmpty(devIndexes)){
- runManageDevList = deviceMapper.getRunManageDevList(devIndexes, runManageParam.getComFlag(), runManageParam.getRunFlag());
+ runManageDevList = deviceMapper.getRunManageDevList(devIndexes, runManageParam.getComFlag(), runManageParam.getRunFlag(),manuList,runManageParam.getSearchValue());
- StringBuilder devSql = InfluxDBCommUtils.assToInfluxParamDev(devIndexes);
- String stringBuilder = "time >= '" + runManageParam.getSearchBeginTime() + "' and " + "time <= '" + runManageParam.getSearchEndTime()+"' and "+devSql+" group by dev_id";
- //sql语句
- String sql = "SELECT MEAN(online_rate) AS online_rate FROM " + PQS_ONLINERATE + " WHERE " + stringBuilder + TIME_ZONE;
- QueryResult queryResult = influxDbUtils.query(sql);
+ List lineInfluxDbOnlineVOList = deviceMapper.getOnlineEvaluate(devIndexes,runManageParam.getSearchBeginTime(),runManageParam.getSearchEndTime());
- InfluxDBResultMapper inCn = new InfluxDBResultMapper();
- List lineInfluxDbOnlineVOList = inCn.toPOJO(queryResult,LineInfluxDbOnlineVO.class);
+// StringBuilder devSql = InfluxDBCommUtils.assToInfluxParamDev(devIndexes);
+// String stringBuilder = "time >= '" + runManageParam.getSearchBeginTime() + "' and " + "time <= '" + runManageParam.getSearchEndTime()+"' and "+devSql+" group by dev_id";
+// //sql语句
+// String sql = "SELECT MEAN(online_rate) AS online_rate FROM " + PQS_ONLINERATE + " WHERE " + stringBuilder + TIME_ZONE;
+// QueryResult queryResult = influxDbUtils.query(sql);
+//
+// InfluxDBResultMapper inCn = new InfluxDBResultMapper();
+// List lineInfluxDbOnlineVOList = inCn.toPOJO(queryResult,LineInfluxDbOnlineVO.class);
runManageDevList = runManageDevList.stream().peek(item-> lineInfluxDbOnlineVOList.stream().filter(it-> Objects.equals(item.getId(),it.getDevIndex())).findFirst().ifPresent(i->item.setOnlineEvaluate(i.getOnlineRate()))).collect(Collectors.toList());
}
}
diff --git a/pqs-energy/energy-boot/pom.xml b/pqs-energy/energy-boot/pom.xml
index 0bdd127ab..bc59987f8 100644
--- a/pqs-energy/energy-boot/pom.xml
+++ b/pqs-energy/energy-boot/pom.xml
@@ -42,6 +42,16 @@
com.njcn
common-web
${project.version}
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ ch.qos.logback
+ logback-classic
+
+
com.njcn
diff --git a/pqs-event/event-boot/pom.xml b/pqs-event/event-boot/pom.xml
index 969be891f..e7e420eb0 100644
--- a/pqs-event/event-boot/pom.xml
+++ b/pqs-event/event-boot/pom.xml
@@ -21,6 +21,16 @@
com.njcn
common-web
${project.version}
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ ch.qos.logback
+ logback-classic
+
+
com.njcn
diff --git a/pqs-harmonic/harmonic-boot/pom.xml b/pqs-harmonic/harmonic-boot/pom.xml
index e5f31837e..6d8e6d3d7 100644
--- a/pqs-harmonic/harmonic-boot/pom.xml
+++ b/pqs-harmonic/harmonic-boot/pom.xml
@@ -27,6 +27,16 @@
com.njcn
common-web
${project.version}
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ ch.qos.logback
+ logback-classic
+
+
com.njcn
diff --git a/pqs-prepare/prepare-api/pom.xml b/pqs-prepare/prepare-api/pom.xml
index 03b87c456..1c5d7c32b 100644
--- a/pqs-prepare/prepare-api/pom.xml
+++ b/pqs-prepare/prepare-api/pom.xml
@@ -33,6 +33,16 @@
com.njcn
common-web
${project.version}
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ ch.qos.logback
+ logback-classic
+
+
diff --git a/pqs-prepare/prepare-boot/pom.xml b/pqs-prepare/prepare-boot/pom.xml
index 493710416..c67febffa 100644
--- a/pqs-prepare/prepare-boot/pom.xml
+++ b/pqs-prepare/prepare-boot/pom.xml
@@ -56,6 +56,16 @@
com.njcn
common-web
${project.version}
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ ch.qos.logback
+ logback-classic
+
+
com.njcn
diff --git a/pqs-process/process-boot/pom.xml b/pqs-process/process-boot/pom.xml
index 878c50054..c438ab775 100644
--- a/pqs-process/process-boot/pom.xml
+++ b/pqs-process/process-boot/pom.xml
@@ -28,6 +28,16 @@
com.njcn
common-web
${project.version}
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ ch.qos.logback
+ logback-classic
+
+
com.njcn
diff --git a/pqs-system/system-boot/pom.xml b/pqs-system/system-boot/pom.xml
index cd7061667..d927436d1 100644
--- a/pqs-system/system-boot/pom.xml
+++ b/pqs-system/system-boot/pom.xml
@@ -30,6 +30,16 @@
com.njcn
common-web
${project.version}
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ ch.qos.logback
+ logback-classic
+
+
com.njcn
diff --git a/pqs-user/user-boot/pom.xml b/pqs-user/user-boot/pom.xml
index 9c3f01c77..5f852e016 100644
--- a/pqs-user/user-boot/pom.xml
+++ b/pqs-user/user-boot/pom.xml
@@ -38,6 +38,16 @@
com.njcn
common-web
${project.version}
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ ch.qos.logback
+ logback-classic
+
+
com.njcn
diff --git a/pqs-user/user-boot/src/main/java/com/njcn/user/controller/LargeScreenController.java b/pqs-user/user-boot/src/main/java/com/njcn/user/controller/LargeScreenController.java
new file mode 100644
index 000000000..86c1ab0bc
--- /dev/null
+++ b/pqs-user/user-boot/src/main/java/com/njcn/user/controller/LargeScreenController.java
@@ -0,0 +1,52 @@
+package com.njcn.user.controller;
+
+import com.njcn.common.pojo.annotation.OperateInfo;
+import com.njcn.common.pojo.enums.common.LogEnum;
+import com.njcn.common.pojo.enums.response.CommonResponseEnum;
+import com.njcn.common.pojo.response.HttpResult;
+import com.njcn.common.utils.HttpResultUtil;
+import com.njcn.device.pq.pojo.param.LargeScreenParam;
+import com.njcn.device.pq.pojo.vo.HomeostasisAreaVO;
+import com.njcn.device.pq.pojo.vo.UserScaleVO;
+import com.njcn.user.service.LargeScreenService;
+import com.njcn.web.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @version 1.0.0
+ * @author: zbj
+ * @date: 2023/04/10
+ */
+@Slf4j
+@Api(tags = "大屏")
+@RestController
+@RequestMapping("/largeScreen")
+@RequiredArgsConstructor
+public class LargeScreenController extends BaseController {
+
+ private final LargeScreenService largeScreenService;
+
+ /**
+ * 灿能云用户规模
+ */
+ @OperateInfo(info = LogEnum.BUSINESS_COMMON)
+ @PostMapping("/getUserScale")
+ @ApiOperation("灿能云用户规模")
+ @ApiImplicitParam(name = "largeScreenParam", value = "灿能云用户规模", required = true)
+ public HttpResult> getUserScale(@RequestBody @Validated LargeScreenParam largeScreenParam) {
+ String methodDescribe = getMethodDescribe("getUserScale");
+ List result = largeScreenService.getUserScale(largeScreenParam);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
+ }
+}
diff --git a/pqs-user/user-boot/src/main/java/com/njcn/user/mapper/LargeScreenMapper.java b/pqs-user/user-boot/src/main/java/com/njcn/user/mapper/LargeScreenMapper.java
new file mode 100644
index 000000000..4d3666d47
--- /dev/null
+++ b/pqs-user/user-boot/src/main/java/com/njcn/user/mapper/LargeScreenMapper.java
@@ -0,0 +1,18 @@
+package com.njcn.user.mapper;
+
+
+import com.njcn.device.pq.pojo.param.LargeScreenParam;
+import com.njcn.device.pq.pojo.vo.UserScaleVO;
+
+import java.util.List;
+
+/**
+ * @version 1.0.0
+ * @author: zbj
+ * @date: 2023/04/10
+ */
+public interface LargeScreenMapper {
+
+ List getUserScale (LargeScreenParam largeScreenParam);
+
+}
diff --git a/pqs-user/user-boot/src/main/java/com/njcn/user/mapper/mapping/LargeScreenMapper.xml b/pqs-user/user-boot/src/main/java/com/njcn/user/mapper/mapping/LargeScreenMapper.xml
new file mode 100644
index 000000000..8ec0b0fca
--- /dev/null
+++ b/pqs-user/user-boot/src/main/java/com/njcn/user/mapper/mapping/LargeScreenMapper.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/pqs-user/user-boot/src/main/java/com/njcn/user/service/LargeScreenService.java b/pqs-user/user-boot/src/main/java/com/njcn/user/service/LargeScreenService.java
new file mode 100644
index 000000000..c23a18e8c
--- /dev/null
+++ b/pqs-user/user-boot/src/main/java/com/njcn/user/service/LargeScreenService.java
@@ -0,0 +1,18 @@
+package com.njcn.user.service;
+
+import com.njcn.device.pq.pojo.param.LargeScreenParam;
+import com.njcn.device.pq.pojo.vo.UserScaleVO;
+
+import java.util.List;
+
+
+/**
+ * @version 1.0.0
+ * @author: zbj
+ * @date: 2023/04/10
+ */
+public interface LargeScreenService {
+
+ List getUserScale(LargeScreenParam largeScreenParam);
+
+}
diff --git a/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/LargeScreenServiceImpl.java b/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/LargeScreenServiceImpl.java
new file mode 100644
index 000000000..d7df2ed2d
--- /dev/null
+++ b/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/LargeScreenServiceImpl.java
@@ -0,0 +1,106 @@
+package com.njcn.user.service.impl;
+
+import com.njcn.device.pq.pojo.param.LargeScreenParam;
+import com.njcn.device.pq.pojo.vo.HomeostasisAreaVO;
+import com.njcn.device.pq.pojo.vo.UserScaleVO;
+import com.njcn.user.mapper.LargeScreenMapper;
+import com.njcn.user.service.LargeScreenService;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDate;
+import java.time.Year;
+import java.time.YearMonth;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * @version 1.0.0
+ * @author: zbj
+ * @date: 2023/04/10
+ */
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class LargeScreenServiceImpl implements LargeScreenService {
+
+ private final LargeScreenMapper largeScreenMapper;
+
+ /**
+ * 灿能云用户规模
+ */
+ @Override
+ public List getUserScale(LargeScreenParam largeScreenParam) {
+ //创建返回VO
+ List result = new ArrayList<>();
+
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+ //获取当前年第一天日期
+ Year year = Year.now();
+ String firstDay = year.atDay(1).format(formatter);
+ //获取当前天字符串日期
+ LocalDate today = LocalDate.now();
+ String endDay = today.format(formatter);
+ //替换属性
+ largeScreenParam.setSearchBeginTime(firstDay);
+ largeScreenParam.setSearchEndTime(endDay);
+ List list = largeScreenMapper.getUserScale(largeScreenParam);
+ //获取传入起始月结束月中所有月份
+ List monthList = selectDate(largeScreenParam.getSearchBeginTime(),
+ largeScreenParam.getSearchEndTime());
+
+ for (String s : monthList) {
+ UserScaleVO vo = new UserScaleVO();
+ vo.setTimeId(s);
+ result.add(vo);
+ }
+ //集合不为空
+ if (list.size()>0){
+ for (UserScaleVO userScaleVO : result) {
+ for (UserScaleVO scaleVO : list) {
+ if (Objects.equals(scaleVO.getTimeId(),userScaleVO.getTimeId())){
+ userScaleVO.setMonthIncrementNum(scaleVO.getMonthIncrementNum());
+ }
+ }
+ }
+ for (UserScaleVO vo : result) {
+ if (vo.getMonthIncrementNum()==null){
+ vo.setMonthIncrementNum(0);
+ }
+ }
+ int count = 0;
+ for (int i = 0; i < result.size(); i++) {
+ count = count + result.get(i).getMonthIncrementNum();
+ result.get(i).setIncrementNum(count);
+ }
+ return result;
+ }else{
+ return result;
+ }
+ }
+
+
+ /**
+ * 获取传入起始月结束月中所有月份
+ * @param startDate
+ * @param endDate
+ * @return
+ */
+ public List selectDate(String startDate, String endDate) {
+ LocalDate start = LocalDate.parse(startDate, DateTimeFormatter.ISO_LOCAL_DATE);
+ LocalDate end = LocalDate.parse(endDate, DateTimeFormatter.ISO_LOCAL_DATE);
+
+ List allMonths = new ArrayList<>();
+ YearMonth current = YearMonth.from(start);
+
+ while (!current.isAfter(YearMonth.from(end))) {
+ allMonths.add(current.format(DateTimeFormatter.ofPattern("yyyy-MM")));
+ current = current.plusMonths(1);
+ }
+ return allMonths;
+ }
+}