app版本接口
This commit is contained in:
@@ -16,6 +16,8 @@ public enum AlgorithmResponseEnum {
|
||||
*/
|
||||
PROJECT_COMMON_ERROR("A00500","同一用户下项目名不能相同"),
|
||||
DICT_DATA_ERROR("A00501","暂无此字典表类型"),
|
||||
NDID_ERROR("A00502","存在相同的ndid"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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,11 +12,12 @@ 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
|
||||
*/
|
||||
|
||||
/**
|
||||
* 程序版本表
|
||||
*/
|
||||
@@ -25,7 +27,7 @@ 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;
|
||||
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
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 = "装置型号")
|
||||
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;
|
||||
|
||||
}
|
||||
@@ -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<Boolean> 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<Boolean> 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<IPage<CsEdDataVO>> queryEdDataPage(@Validated @RequestBody CsEdDataQueryParm csEdDataQueryParm){
|
||||
String methodDescribe = getMethodDescribe("queryEdDataPage");
|
||||
|
||||
IPage<CsEdDataVO> page = csEdDataService.queryEdDataPage (csEdDataQueryParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<CsEdDataPO> {
|
||||
Page<CsEdDataVO> getPage(Page<CsEdDataVO> returnpage,@Param("csEdDataQueryParm") CsEdDataQueryParm csEdDataQueryParm);
|
||||
}
|
||||
@@ -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<CsEngineeringPO> {
|
||||
}
|
||||
@@ -7,11 +7,11 @@
|
||||
<result column="id" jdbcType="VARCHAR" property="id"/>
|
||||
<result column="dev_type" jdbcType="VARCHAR" property="devType"/>
|
||||
<result column="version_no" jdbcType="VARCHAR" property="versionNo"/>
|
||||
<result column="version_agree" jdbcType="VARCHAR" property="versionAgree" />
|
||||
<result column="version_agreement" jdbcType="VARCHAR" property="versionAgreement"/>
|
||||
<result column="version_date" jdbcType="TIMESTAMP" property="versionDate"/>
|
||||
<result column="describe" jdbcType="VARCHAR" property="describe"/>
|
||||
<result column="version_type" jdbcType="VARCHAR" property="versionType"/>
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
<result column="status" jdbcType="BOOLEAN" property="status"/>
|
||||
<result column="file_path" jdbcType="VARCHAR" property="filePath"/>
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
@@ -20,7 +20,28 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, dev_type, version_no, version_agree, version_date, `describe`, version_type,
|
||||
id, dev_type, version_no, version_agreement, version_date, `describe`, version_type,
|
||||
`status`, file_path, create_by, create_time, update_by, update_time
|
||||
</sql>
|
||||
<select id="getPage" resultType="com.njcn.algorithm.pojo.vo.CsEdDataVO">
|
||||
SELECT a.*,
|
||||
b.code as devName
|
||||
FROM cs_ed_data a
|
||||
LEFT JOIN sys_dict_data b ON a.dev_type = b.id
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="csEdDataQueryParm.versionStartDate != null and csEdDataQueryParm.versionStartDate != ''">
|
||||
AND a.version_date >= #{csEdDataQueryParm.versionStartDate }
|
||||
</if>
|
||||
<if test="csEdDataQueryParm.versionendDate != null and csEdDataQueryParm.versionendDate != ''">
|
||||
AND a.version_date <= #{csEdDataQueryParm.versionendDate }
|
||||
</if>
|
||||
|
||||
<if test="csEdDataQueryParm.devName != null and csEdDataQueryParm.devName != ''">
|
||||
AND b.CODE LIKE concat('%',#{csEdDataQueryParm.devName},'%')
|
||||
</if>
|
||||
<if test="csEdDataQueryParm.devType != null and csEdDataQueryParm.devType != ''">
|
||||
AND a.dev_type = #{csEdDataQueryParm.devType}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.algorithm.mapper.CsEngineeringMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.algorithm.pojo.po.CsEngineeringPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table cs_engineering-->
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
||||
<result column="province" jdbcType="VARCHAR" property="province" />
|
||||
<result column="city" jdbcType="VARCHAR" property="city" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="status" jdbcType="BOOLEAN" property="status" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, `name`, user_id, province, city, description, `status`, create_by, create_time,
|
||||
update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -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【需求编号】
|
||||
@@ -13,5 +18,29 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface CsEdDataService extends IService<CsEdDataPO> {
|
||||
|
||||
|
||||
/**
|
||||
* @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<com.njcn.algorithm.pojo.vo.CsEdDataVO>
|
||||
* @Author: clam
|
||||
* @Date: 2023/4/7
|
||||
*/
|
||||
IPage<CsEdDataVO> queryEdDataPage(CsEdDataQueryParm csEdDataQueryParm);
|
||||
}
|
||||
|
||||
|
||||
@@ -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<CsEngineeringPO>{
|
||||
|
||||
|
||||
}
|
||||
@@ -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
|
||||
@RequiredArgsConstructor
|
||||
public class CsEdDataServiceImpl extends ServiceImpl<CsEdDataMapper, CsEdDataPO> 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<CsEdDataVO> queryEdDataPage(CsEdDataQueryParm csEdDataQueryParm) {
|
||||
Page<CsEdDataVO> returnpage = new Page<> (csEdDataQueryParm.getCurrentPage ( ), csEdDataQueryParm.getPageSize ( ));
|
||||
|
||||
returnpage = this.getBaseMapper ().getPage(returnpage,csEdDataQueryParm);
|
||||
return returnpage;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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<CsEngineeringMapper, CsEngineeringPO> implements CsEngineeringService{
|
||||
|
||||
}
|
||||
@@ -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<CsEquipmentDeliv
|
||||
|
||||
@Override
|
||||
public Boolean save(CsEquipmentDeliveryAddParm csEquipmentDeliveryAddParm) {
|
||||
CsEquipmentDeliveryPO po = this.queryEquipmentPOByndid (csEquipmentDeliveryAddParm.getNdid ( ));
|
||||
if(!Objects.isNull (po)){
|
||||
throw new BusinessException (AlgorithmResponseEnum.NDID_ERROR);
|
||||
}
|
||||
CsEquipmentDeliveryPO csEquipmentDeliveryPO = new CsEquipmentDeliveryPO();
|
||||
|
||||
BeanUtils.copyProperties (csEquipmentDeliveryAddParm,csEquipmentDeliveryPO);
|
||||
@@ -50,11 +57,18 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
|
||||
@Override
|
||||
public CsEquipmentDeliveryVO queryEquipmentByndid(String ndid) {
|
||||
CsEquipmentDeliveryVO result = new CsEquipmentDeliveryVO();
|
||||
CsEquipmentDeliveryPO csEquipmentDeliveryPO = queryEquipmentPOByndid (ndid);
|
||||
if(Objects.isNull (csEquipmentDeliveryPO)){
|
||||
return result;
|
||||
}
|
||||
BeanUtils.copyProperties (csEquipmentDeliveryPO,result);
|
||||
return result;
|
||||
}
|
||||
public CsEquipmentDeliveryPO queryEquipmentPOByndid(String ndid) {
|
||||
QueryWrapper<CsEquipmentDeliveryPO> wrapper = new QueryWrapper();
|
||||
wrapper.eq ("ndid", ndid);
|
||||
CsEquipmentDeliveryPO csEquipmentDeliveryPO = this.baseMapper.selectOne (wrapper);
|
||||
BeanUtils.copyProperties (csEquipmentDeliveryPO,result);
|
||||
return result;
|
||||
return csEquipmentDeliveryPO;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -65,4 +79,5 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
|
||||
Page<ProjectEquipmentVO> list = this.baseMapper.queryProjectEquipmentVO(returnpage,projectEquipmentQueryParm);
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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,6 +51,8 @@ public class CsFeedbackServiceImpl extends ServiceImpl<CsFeedbackMapper, CsFeedb
|
||||
BeanUtils.copyProperties (csFeedbackAddParm, csFeedbackPO);
|
||||
csFeedbackPO.setStatus ("1");
|
||||
boolean save = this.save (csFeedbackPO);
|
||||
boolean flag= true;
|
||||
if(Objects.isNull (csFeedbackAddParm.getFiles ( ))){
|
||||
List<CsFilePathPO> csFilePathPOS= new ArrayList<> ();
|
||||
for (int i = 0; i < csFeedbackAddParm.getFiles ( ).length; i++) {
|
||||
|
||||
@@ -61,9 +64,11 @@ public class CsFeedbackServiceImpl extends ServiceImpl<CsFeedbackMapper, CsFeedb
|
||||
csFilePathPO.setStatus ("1");
|
||||
csFilePathPOS.add (csFilePathPO);
|
||||
}
|
||||
boolean b = csFilePathService.saveBatch (csFilePathPOS);
|
||||
flag = csFilePathService.saveBatch (csFilePathPOS);
|
||||
}
|
||||
|
||||
return save&&b;
|
||||
|
||||
return save&&flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -101,7 +106,9 @@ public class CsFeedbackServiceImpl extends ServiceImpl<CsFeedbackMapper, CsFeedb
|
||||
QueryWrapper<CsFilePathPO> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq ("id", id).eq ("status", "1");
|
||||
List<CsFilePathPO> list = csFilePathService.list (queryWrapper);
|
||||
List<String> collect = list.stream ( ).map (CsFilePathPO::getFilePath).collect (Collectors.toList ( ));
|
||||
List<String> collect = list.stream ( ).map (temp->{
|
||||
return fileStorageUtil.getFileUrl (temp.getFilePath ());
|
||||
}).collect (Collectors.toList ( ));
|
||||
csFeedbackDetailVO.setImageUrls (collect);
|
||||
QueryWrapper<CsFeedbackChatPO> csFeedbackChatPOQueryWrapper = new QueryWrapper();
|
||||
csFeedbackChatPOQueryWrapper.eq ("id", id).eq ("status", "1").orderByAsc ("create_time");
|
||||
|
||||
@@ -57,4 +57,9 @@ public interface OssPath {
|
||||
* app反馈图片
|
||||
*/
|
||||
String FEEDBACK = "feedBack/";
|
||||
|
||||
/***
|
||||
* app版本升级文件
|
||||
*/
|
||||
String EDDATA = "edData/";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user