Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -15,9 +15,7 @@ import javax.validation.constraints.NotBlank;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* app基础信息表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AppBaseInformationAddParm {
|
||||
|
||||
|
||||
@@ -15,9 +15,7 @@ import javax.validation.constraints.NotBlank;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 项目拓扑图关系表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AppLineTopologyDiagramAddParm {
|
||||
/**
|
||||
|
||||
@@ -15,9 +15,7 @@ import javax.validation.constraints.NotBlank;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 项目拓扑图关系表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AppLineTopologyDiagramAuditParm {
|
||||
/**
|
||||
|
||||
@@ -15,9 +15,7 @@ import javax.validation.constraints.NotBlank;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* app个人中心-设置信息
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AppPersonSetAddParm {
|
||||
|
||||
|
||||
@@ -17,9 +17,7 @@ import javax.validation.constraints.NotNull;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 项目拓扑图关系表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AppTopologyDiagramAddParm {
|
||||
|
||||
|
||||
@@ -16,9 +16,6 @@ import javax.validation.constraints.NotBlank;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 项目拓扑图关系表
|
||||
*/
|
||||
@Data
|
||||
public class AppTopologyDiagramAuditParm {
|
||||
@ApiModelProperty(value = "拓扑图id")
|
||||
|
||||
@@ -17,9 +17,7 @@ import java.util.Date;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 装置数据模板表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CsDevModelAddParm {
|
||||
|
||||
|
||||
@@ -18,9 +18,7 @@ import java.util.Date;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 装置数据模板表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CsDevModelAuditParm {
|
||||
@NotNull(message="版本id不能为空!")
|
||||
|
||||
@@ -15,9 +15,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 程序版本表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CsDevModelQueryListParm {
|
||||
|
||||
|
||||
@@ -18,9 +18,7 @@ import javax.validation.constraints.NotNull;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 程序版本表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CsDevModelQueryParm {
|
||||
|
||||
|
||||
@@ -13,9 +13,7 @@ import lombok.Data;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 数据字典表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CsDictAddParm {
|
||||
|
||||
|
||||
@@ -20,9 +20,7 @@ import java.util.Date;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 程序版本表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CsEdDataAddParm {
|
||||
|
||||
|
||||
@@ -19,9 +19,7 @@ import java.time.LocalDate;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 程序版本表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CsEdDataAuditParm {
|
||||
|
||||
|
||||
@@ -18,9 +18,7 @@ import javax.validation.constraints.NotNull;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 程序版本表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CsEdDataQueryParm {
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.njcn.algorithm.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/4/7 11:04【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
public class CsEngineeringAddParm {
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
@NotBlank(message="工程名称不能为空!")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
@NotBlank(message="用户id不能为空!")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
@ApiModelProperty(value = "省")
|
||||
@NotBlank(message="省不能为空!")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 市
|
||||
*/
|
||||
@ApiModelProperty(value = "市")
|
||||
@NotBlank(message="市不能为空!")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String description;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.njcn.algorithm.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/4/7 11:04【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
public class CsEngineeringAuditParm {
|
||||
|
||||
@NotNull(message="版本id不能为空!")
|
||||
private String id;
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
@ApiModelProperty(value = "省")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 市
|
||||
*/
|
||||
@ApiModelProperty(value = "市")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(value="0:删除 1:正常")
|
||||
private String status;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.njcn.algorithm.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/4/10 19:47【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class CsEngineeringQueryParm {
|
||||
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
@ApiModelProperty(value = "省")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 市
|
||||
*/
|
||||
@ApiModelProperty(value = "市")
|
||||
private String city;
|
||||
|
||||
}
|
||||
@@ -18,9 +18,6 @@ import java.util.Date;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 设备出厂表
|
||||
*/
|
||||
@Data
|
||||
public class CsEquipmentDeliveryAddParm{
|
||||
|
||||
|
||||
@@ -16,9 +16,6 @@ import java.util.Date;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 设备出厂表
|
||||
*/
|
||||
@Data
|
||||
public class CsEquipmentDeliveryQueryParm {
|
||||
|
||||
|
||||
@@ -16,9 +16,7 @@ import javax.validation.constraints.NotNull;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 信息反馈表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CsFeedbackQueryParm {
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
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.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
@@ -24,7 +26,7 @@ public class AppLineTopologyDiagramPO extends BaseEntity {
|
||||
/**
|
||||
* 拓扑图Id
|
||||
*/
|
||||
@MppMultiId(value = "id")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
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.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -24,7 +25,7 @@ public class AppProjectPO extends BaseEntity {
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
@MppMultiId(value = "id")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
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.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -24,7 +25,7 @@ public class AppTopologyDiagramPO extends BaseEntity {
|
||||
/**
|
||||
* 拓扑图Id
|
||||
*/
|
||||
@MppMultiId(value = "id")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
|
||||
@@ -62,7 +62,7 @@ public class CsEngineeringPO extends BaseEntity {
|
||||
* 状态(0:删除 1:正常)
|
||||
*/
|
||||
@TableField(value = "status")
|
||||
private Boolean status;
|
||||
private String status;
|
||||
|
||||
|
||||
}
|
||||
@@ -14,9 +14,7 @@ import lombok.Data;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* app基础信息表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AppBaseInformationVO extends BaseEntity {
|
||||
/**
|
||||
|
||||
@@ -14,9 +14,7 @@ import lombok.Data;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 项目拓扑图关系表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AppTopologyDiagramVO extends BaseEntity {
|
||||
/**
|
||||
|
||||
@@ -17,9 +17,7 @@ import java.time.LocalDate;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 装置数据模板表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CsDevModelPageVO extends BaseEntity {
|
||||
/**
|
||||
|
||||
@@ -14,9 +14,7 @@ import lombok.Data;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 数据字典表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CsDictVO extends BaseEntity {
|
||||
/**
|
||||
|
||||
@@ -16,9 +16,7 @@ import java.time.LocalDate;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 程序版本表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CsEdDataVO extends BaseEntity {
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.njcn.algorithm.pojo.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
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 CsEngineeringVO extends BaseEntity {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
@ApiModelProperty(value = "省")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 市
|
||||
*/
|
||||
@ApiModelProperty(value = "市")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 状态(0:删除 1:正常)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态")
|
||||
private String status;
|
||||
|
||||
|
||||
}
|
||||
@@ -18,9 +18,7 @@ import java.util.Date;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 设备出厂表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CsEquipmentDeliveryVO extends BaseEntity {
|
||||
/**
|
||||
|
||||
@@ -18,9 +18,7 @@ import java.util.List;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 信息反馈列表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CsFeedbackDetailVO {
|
||||
/**
|
||||
|
||||
@@ -16,9 +16,7 @@ import java.time.LocalDateTime;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 信息反馈列表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CsFeedbackVO {
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.njcn.algorithm.controller.project;
|
||||
|
||||
import com.njcn.algorithm.pojo.param.CsEngineeringAddParm;
|
||||
import com.njcn.algorithm.pojo.param.CsEngineeringAuditParm;
|
||||
import com.njcn.algorithm.pojo.param.CsEngineeringQueryParm;
|
||||
import com.njcn.algorithm.pojo.vo.CsEngineeringVO;
|
||||
import com.njcn.algorithm.service.CsEngineeringService;
|
||||
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 10:54【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/engineering")
|
||||
@Api(tags = " 工程管理")
|
||||
@AllArgsConstructor
|
||||
public class EngineeringController extends BaseController {
|
||||
|
||||
|
||||
private final CsEngineeringService csEngineeringService;
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/addEngineering")
|
||||
@ApiOperation("新增工程")
|
||||
@ApiImplicitParam(name = "csEngineeringAddParm", value = "新增工程参数", required = true)
|
||||
public HttpResult<Boolean> addEngineering(@Validated @RequestBody CsEngineeringAddParm csEngineeringAddParm){
|
||||
String methodDescribe = getMethodDescribe("addEngineering");
|
||||
|
||||
Boolean flag = csEngineeringService.addEngineering(csEngineeringAddParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/auditEngineering")
|
||||
@ApiOperation("修改/删除工程")
|
||||
@ApiImplicitParam(name = "csEngineeringAuditParm", value = "修改项目参数", required = true)
|
||||
public HttpResult<Boolean> auditAppProject(@Validated @RequestBody CsEngineeringAuditParm csEngineeringAuditParm){
|
||||
String methodDescribe = getMethodDescribe("auditEngineering");
|
||||
|
||||
Boolean flag = csEngineeringService.auditEngineering(csEngineeringAuditParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryEngineering")
|
||||
@ApiOperation("查询工程列表")
|
||||
@ApiImplicitParam(name = "csEngineeringQueryParm", value = "修改项目参数", required = true)
|
||||
public HttpResult<List<CsEngineeringVO>> queryEngineering(@Validated @RequestBody CsEngineeringQueryParm csEngineeringQueryParm){
|
||||
String methodDescribe = getMethodDescribe("queryEngineering");
|
||||
|
||||
List<CsEngineeringVO> csEngineeringVOList = csEngineeringService.queryEngineering(csEngineeringQueryParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, csEngineeringVOList, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@
|
||||
FROM cs_dev_model a
|
||||
LEFT JOIN sys_dict_data b ON a.dev_type = b.id
|
||||
WHERE
|
||||
1 = 1
|
||||
1 = 1 And a.`status`='1'
|
||||
<if test="csDevModelQueryParm.versionStartDate != null and csDevModelQueryParm.versionStartDate != ''">
|
||||
AND a.version_date >= #{csDevModelQueryParm.versionStartDate }
|
||||
</if>
|
||||
@@ -45,7 +45,7 @@
|
||||
FROM cs_dev_model a
|
||||
LEFT JOIN sys_dict_data b ON a.dev_type = b.id
|
||||
WHERE
|
||||
1 = 1
|
||||
1 = 1 And a.`status`='1'
|
||||
<if test="csDevModelQueryListParm.versionStartDate != null and csDevModelQueryListParm.versionStartDate != ''">
|
||||
AND a.version_date >= #{csDevModelQueryListParm.versionStartDate }
|
||||
</if>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
FROM cs_ed_data a
|
||||
LEFT JOIN sys_dict_data b ON a.dev_type = b.id
|
||||
WHERE
|
||||
1 = 1
|
||||
1 = 1 And a.`status`='1'
|
||||
<if test="csEdDataQueryParm.versionStartDate != null and csEdDataQueryParm.versionStartDate != ''">
|
||||
AND a.version_date >= #{csEdDataQueryParm.versionStartDate }
|
||||
</if>
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
package com.njcn.algorithm.service;
|
||||
|
||||
import com.njcn.algorithm.pojo.param.CsEngineeringAddParm;
|
||||
import com.njcn.algorithm.pojo.param.CsEngineeringAuditParm;
|
||||
import com.njcn.algorithm.pojo.param.CsEngineeringQueryParm;
|
||||
import com.njcn.algorithm.pojo.po.CsEngineeringPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.algorithm.pojo.vo.CsEngineeringVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
@@ -13,5 +20,22 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface CsEngineeringService extends IService<CsEngineeringPO>{
|
||||
|
||||
/**
|
||||
* @Description: 新增工程
|
||||
* @Param: [csEngineeringAddParm]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/4/10
|
||||
*/
|
||||
Boolean addEngineering(CsEngineeringAddParm csEngineeringAddParm);
|
||||
|
||||
Boolean auditEngineering(CsEngineeringAuditParm csEngineeringAuditParm);
|
||||
/**
|
||||
* @Description: 查询工程
|
||||
* @Param: [csEngineeringQueryParm]
|
||||
* @return: java.util.List<com.njcn.algorithm.pojo.vo.CsEngineeringVO>
|
||||
* @Author: clam
|
||||
* @Date: 2023/4/10
|
||||
*/
|
||||
List<CsEngineeringVO> queryEngineering(CsEngineeringQueryParm csEngineeringQueryParm);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,23 @@
|
||||
package com.njcn.algorithm.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.algorithm.mapper.CsEngineeringMapper;
|
||||
import com.njcn.algorithm.pojo.param.CsEngineeringAddParm;
|
||||
import com.njcn.algorithm.pojo.param.CsEngineeringAuditParm;
|
||||
import com.njcn.algorithm.pojo.param.CsEngineeringQueryParm;
|
||||
import com.njcn.algorithm.pojo.po.CsEngineeringPO;
|
||||
import com.njcn.algorithm.pojo.vo.CsEngineeringVO;
|
||||
import com.njcn.algorithm.service.CsEngineeringService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
@@ -17,4 +30,41 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class CsEngineeringServiceImpl extends ServiceImpl<CsEngineeringMapper, CsEngineeringPO> implements CsEngineeringService{
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public Boolean addEngineering(CsEngineeringAddParm csEngineeringAddParm) {
|
||||
CsEngineeringPO csEngineeringPO = new CsEngineeringPO ();
|
||||
BeanUtils.copyProperties (csEngineeringAddParm, csEngineeringPO);
|
||||
csEngineeringPO.setStatus ("1");
|
||||
boolean save = this.save (csEngineeringPO);
|
||||
return save;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public Boolean auditEngineering(CsEngineeringAuditParm csEngineeringAuditParm) {
|
||||
|
||||
CsEngineeringPO csEngineeringPO = new CsEngineeringPO ();
|
||||
BeanUtils.copyProperties (csEngineeringAuditParm, csEngineeringPO);
|
||||
boolean b = this.updateById (csEngineeringPO);
|
||||
return b;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CsEngineeringVO> queryEngineering(CsEngineeringQueryParm csEngineeringQueryParm) {
|
||||
List<CsEngineeringVO> csEngineeringVOList = new ArrayList<> ();
|
||||
QueryWrapper<CsEngineeringPO> queryWrapper = new QueryWrapper<> ();
|
||||
queryWrapper.eq (StringUtils.isNotBlank (csEngineeringQueryParm.getUserId ()),"user_id",csEngineeringQueryParm.getUserId ()).
|
||||
eq (StringUtils.isNotBlank (csEngineeringQueryParm.getProvince ()),"province",csEngineeringQueryParm.getProvince ()).
|
||||
eq (StringUtils.isNotBlank (csEngineeringQueryParm.getCity ()),"city",csEngineeringQueryParm.getCity ()).
|
||||
eq ("status","1" ).
|
||||
like (StringUtils.isNotBlank (csEngineeringQueryParm.getName ()),"name",csEngineeringQueryParm.getName ());
|
||||
List<CsEngineeringPO> csEngineeringPOS = this.getBaseMapper ( ).selectList (queryWrapper);
|
||||
csEngineeringVOList = csEngineeringPOS.stream ().map (temp->{
|
||||
CsEngineeringVO vo = new CsEngineeringVO();
|
||||
BeanUtils.copyProperties (temp, vo);
|
||||
return vo;
|
||||
}).collect(Collectors.toList());
|
||||
return csEngineeringVOList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.njcn.algorithm.service.CsEquipmentDeliveryService;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -32,6 +33,7 @@ import java.util.Objects;
|
||||
public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliveryMapper, CsEquipmentDeliveryPO> implements CsEquipmentDeliveryService{
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public Boolean save(CsEquipmentDeliveryAddParm csEquipmentDeliveryAddParm) {
|
||||
CsEquipmentDeliveryPO po = this.queryEquipmentPOByndid (csEquipmentDeliveryAddParm.getNdid ( ));
|
||||
if(!Objects.isNull (po)){
|
||||
@@ -46,6 +48,7 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public Boolean AuditEquipmentDelivery(String id) {
|
||||
UpdateWrapper<CsEquipmentDeliveryPO> wrapper = new UpdateWrapper();
|
||||
wrapper.eq ("id", id);
|
||||
|
||||
@@ -35,6 +35,7 @@ public class CsFeedbackChatServiceImpl extends ServiceImpl<CsFeedbackChatMapper,
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public Boolean updateChatStatus(CsFeedbackChatCheckParm csFeedbackChatCheckParm) {
|
||||
UpdateWrapper<CsFeedbackChatPO> updateWrapper = new UpdateWrapper<> ();
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public class CsFeedbackServiceImpl extends ServiceImpl<CsFeedbackMapper, CsFeedb
|
||||
csFeedbackPO.setStatus ("1");
|
||||
boolean save = this.save (csFeedbackPO);
|
||||
boolean flag= true;
|
||||
if(Objects.isNull (csFeedbackAddParm.getFiles ( ))){
|
||||
if(!Objects.isNull (csFeedbackAddParm.getFiles ( ))){
|
||||
List<CsFilePathPO> csFilePathPOS= new ArrayList<> ();
|
||||
for (int i = 0; i < csFeedbackAddParm.getFiles ( ).length; i++) {
|
||||
|
||||
@@ -90,7 +90,7 @@ public class CsFeedbackServiceImpl extends ServiceImpl<CsFeedbackMapper, CsFeedb
|
||||
ne ("user_id",temp.getUserId ()).
|
||||
eq ("chat_status","0").
|
||||
eq ("status", "1");
|
||||
int count = csFeedbackChatService.count ( );
|
||||
int count = csFeedbackChatService.count (csFeedbackChatPOQueryWrapper );
|
||||
csFeedbackVO.setChatCount (count);
|
||||
return csFeedbackVO;
|
||||
}).collect (Collectors.toList ( ));
|
||||
|
||||
@@ -47,6 +47,12 @@
|
||||
<dependency>
|
||||
<groupId>org.owasp.antisamy</groupId>
|
||||
<artifactId>antisamy</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/net.sf.json-lib/json-lib -->
|
||||
<dependency>
|
||||
|
||||
@@ -12,6 +12,8 @@ import lombok.NoArgsConstructor;
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PqsParam extends DeviceInfoParam.BusinessParam {
|
||||
@ApiModelProperty("装置id")
|
||||
private String devId;
|
||||
@ApiModelProperty("当前页码")
|
||||
private Integer pageNum;
|
||||
@ApiModelProperty("当前页条数")
|
||||
|
||||
@@ -22,10 +22,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
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 org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -118,6 +115,16 @@ public class OperationContrController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getMonthFlow")
|
||||
@ApiOperation("获取每月流量")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "实体", required = true)
|
||||
public HttpResult<List<LineFlowMealDetailVO>> getMonthFlow (@RequestBody PqsParam deviceInfoParam){
|
||||
String methodDescribe = getMethodDescribe("getMonthFlow");
|
||||
LogUtil.njcnDebug(log, "{},参数集合:{}", methodDescribe, deviceInfoParam);
|
||||
List<LineFlowMealDetailVO> result = lineService.getMonthFlow(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
|
||||
@@ -422,4 +422,6 @@ public interface LineMapper extends BaseMapper<Line> {
|
||||
|
||||
Page<LineFlowMealDetailVO> getNewDeviceRunStatistics (Page<LineFlowMealDetailVO> page,@Param("devs") List<String> list, @Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime);
|
||||
Page<LineFlowMealDetailVO> getNewDeviceFlowStatistics (Page<LineFlowMealDetailVO> page,@Param("devs") List<String> list, @Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime);
|
||||
|
||||
List<LineFlowMealDetailVO> getMonthFlow (@Param("devId") String devId,@Param("startTime") DateTime beginOfDay, @Param("endTime") DateTime endOfDay);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
<select id="getRunManageDevList" resultType="com.njcn.device.pq.pojo.vo.RunTimeVO">
|
||||
SELECT
|
||||
dev.Id as id,
|
||||
dev.Id AS id,
|
||||
area.NAME AS areaName,
|
||||
gd.NAME AS gdName,
|
||||
sub.NAME AS bdName,
|
||||
|
||||
@@ -1053,5 +1053,23 @@
|
||||
and d.com_flag = #{comFlag}
|
||||
and a.state = 1
|
||||
</select>
|
||||
<select id="getMonthFlow" resultType="com.njcn.device.pq.pojo.vo.LineFlowMealDetailVO">
|
||||
select t.*,
|
||||
(t.statisValue)/(t.flowMeal) flowProportion
|
||||
from (
|
||||
SELECT
|
||||
m.Dev_Id,
|
||||
ifnull(d.flow, (select flow from cld_flow_meal where type = 0 and flag = 1)) + ifnull(d1.flow, 0) flowMeal,
|
||||
ifnull(m.Actual_Value,0)/1024/1024 statisValue
|
||||
FROM cld_month_flow m
|
||||
LEFT JOIN cld_dev_meal c ON m.Dev_Id = c.line_id
|
||||
LEFT JOIN cld_flow_meal d ON c.Base_Meal_Id = d.id
|
||||
LEFT JOIN cld_flow_meal d1 ON c.Ream_Meal_Id = d1.id
|
||||
where m.Dev_Id = #{devId}
|
||||
and
|
||||
m.Time_Id between #{startTime} and #{endTime}
|
||||
) t
|
||||
ORDER BY flowProportion DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -208,4 +208,6 @@ public interface LineService {
|
||||
Page<TopMsgPO> dailyDeviceAbnormalStatistics(PqsParam param);
|
||||
|
||||
List<TopMsgPO> dailyDeviceAbnormal(DeviceInfoParam.BusinessParam conditionBusinessParam);
|
||||
|
||||
List<LineFlowMealDetailVO> getMonthFlow (PqsParam deviceInfoParam);
|
||||
}
|
||||
|
||||
@@ -403,6 +403,12 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
||||
return topMsgDetails;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LineFlowMealDetailVO> getMonthFlow(PqsParam deviceInfoParam) {
|
||||
List<LineFlowMealDetailVO> list = lineMapper.getMonthFlow(deviceInfoParam.getDevId(),DateUtil.beginOfDay(DateUtil.parse(deviceInfoParam.getSearchBeginTime())),DateUtil.endOfDay(DateUtil.parse(deviceInfoParam.getSearchEndTime())));
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LineFlowMealDetailVO> getDeviceRunStatistics(DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
ArrayList<LineFlowMealDetailVO> lineFlowMealDetailList = new ArrayList<>();
|
||||
|
||||
@@ -56,16 +56,6 @@
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-web</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
|
||||
Reference in New Issue
Block a user