设备模板接口
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
@@ -22,6 +22,8 @@ import java.time.LocalDate;
|
|||||||
@Data
|
@Data
|
||||||
public class CsEdDataVO extends BaseEntity {
|
public class CsEdDataVO extends BaseEntity {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装置型号(字典数据)
|
* 装置型号(字典数据)
|
||||||
|
|||||||
@@ -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<Boolean> 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<Boolean> 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<IPage<CsDevModelPageVO>> queryDevModelPage(@RequestBody @Validated CsDevModelQueryParm csDevModelQueryParm ){
|
||||||
|
String methodDescribe = getMethodDescribe("queryDevModelPage");
|
||||||
|
|
||||||
|
IPage<CsDevModelPageVO> 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<List<CsDevModelPageVO>> queryEquipmentByProject(@RequestBody CsDevModelQueryListParm csDevModelQueryListParm){
|
||||||
|
String methodDescribe = getMethodDescribe("queryEquipmentByProject");
|
||||||
|
|
||||||
|
List<CsDevModelPageVO> list = csDevModelService.queryList(csDevModelQueryListParm);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -59,16 +59,7 @@ public class EquipmentDeliveryController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
|
||||||
// @PostMapping("/queryEquipment")
|
|
||||||
// @ApiOperation("项目查询")
|
|
||||||
// @ApiImplicitParam(name = "appProjectQueryParm", value = "项目查询参数", required = true)
|
|
||||||
// public HttpResult<List<CsEquipmentDeliveryVO>> queryEquipment(@Validated @RequestBody AppProjectQueryParm appProjectQueryParm){
|
|
||||||
// String methodDescribe = getMethodDescribe("queryEquipment");
|
|
||||||
//
|
|
||||||
// List<CsEquipmentDeliveryVO> appProjectVOIPage = csEquipmentDeliveryService.queryEquipment (appProjectQueryParm);
|
|
||||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, appProjectVOIPage, methodDescribe);
|
|
||||||
// }
|
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/queryEquipmentByndid")
|
@PostMapping("/queryEquipmentByndid")
|
||||||
|
|||||||
@@ -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<CsDevModelPO> {
|
||||||
|
Page<CsDevModelPageVO> getPage(Page<CsDevModelPageVO> returnpage,@Param("csDevModelQueryParm") CsDevModelQueryParm csDevModelQueryParm);
|
||||||
|
|
||||||
|
List<CsDevModelPageVO> queryList(@Param("csDevModelQueryListParm")CsDevModelQueryListParm csDevModelQueryListParm);
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
<?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.CsDevModelMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.algorithm.pojo.po.CsDevModelPO">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table cs_dev_model-->
|
||||||
|
<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_date" jdbcType="TIMESTAMP" property="versionDate" />
|
||||||
|
<result column="file_path" jdbcType="VARCHAR" property="filePath" />
|
||||||
|
<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" />
|
||||||
|
<result column="status" jdbcType="BOOLEAN" property="status" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, dev_type, version_no, version_date, file_path, create_by, create_time, update_by,
|
||||||
|
update_time, `status`
|
||||||
|
</sql><select id="getPage" resultType="com.njcn.algorithm.pojo.vo.CsDevModelPageVO">
|
||||||
|
SELECT a.*,
|
||||||
|
b.code as devName
|
||||||
|
FROM cs_dev_model a
|
||||||
|
LEFT JOIN sys_dict_data b ON a.dev_type = b.id
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
<if test="csDevModelQueryParm.versionStartDate != null and csDevModelQueryParm.versionStartDate != ''">
|
||||||
|
AND a.version_date >= #{csDevModelQueryParm.versionStartDate }
|
||||||
|
</if>
|
||||||
|
<if test="csDevModelQueryParm.versionendDate != null and csDevModelQueryParm.versionendDate != ''">
|
||||||
|
AND a.version_date <= #{csDevModelQueryParm.versionendDate }
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="csDevModelQueryParm.devName != null and csDevModelQueryParm.devName != ''">
|
||||||
|
AND b.CODE LIKE concat('%',#{csDevModelQueryParm.devName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="csDevModelQueryParm.devType != null and csDevModelQueryParm.devType != ''">
|
||||||
|
AND a.dev_type = #{csDevModelQueryParm.devType}
|
||||||
|
</if>
|
||||||
|
</select><select id="queryList" resultType="com.njcn.algorithm.pojo.vo.CsDevModelPageVO">
|
||||||
|
SELECT a.*,
|
||||||
|
b.code as devName
|
||||||
|
FROM cs_dev_model a
|
||||||
|
LEFT JOIN sys_dict_data b ON a.dev_type = b.id
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
<if test="csDevModelQueryListParm.versionStartDate != null and csDevModelQueryListParm.versionStartDate != ''">
|
||||||
|
AND a.version_date >= #{csDevModelQueryListParm.versionStartDate }
|
||||||
|
</if>
|
||||||
|
<if test="csDevModelQueryListParm.versionendDate != null and csDevModelQueryListParm.versionendDate != ''">
|
||||||
|
AND a.version_date <= #{csDevModelQueryListParm.versionendDate }
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="csDevModelQueryListParm.versionNo != null and csDevModelQueryListParm.versionNo != ''">
|
||||||
|
AND a.version_no = #{csDevModelQueryListParm.versionNo}
|
||||||
|
</if>
|
||||||
|
<if test="csDevModelQueryListParm.devType != null and csDevModelQueryListParm.devType != ''">
|
||||||
|
AND a.dev_type = #{csDevModelQueryListParm.devType}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -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<CsDevModelPO>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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<com.njcn.algorithm.pojo.vo.CsDevModelPageVO>
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2023/4/10
|
||||||
|
*/
|
||||||
|
IPage<CsDevModelPageVO> queryPage(CsDevModelQueryParm csDevModelQueryParm);
|
||||||
|
/**
|
||||||
|
* @Description: queryList
|
||||||
|
* @Param: [projectEquipmentQueryParm]
|
||||||
|
* @return: java.util.List<com.njcn.algorithm.pojo.vo.CsDevModelPageVO>
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2023/4/10
|
||||||
|
* @param projectEquipmentQueryParm
|
||||||
|
*/
|
||||||
|
List<CsDevModelPageVO> queryList(CsDevModelQueryListParm projectEquipmentQueryParm);
|
||||||
|
}
|
||||||
@@ -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<CsDevModelMapper, CsDevModelPO> 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<CsDevModelPageVO> queryPage(CsDevModelQueryParm csDevModelQueryParm) {
|
||||||
|
Page<CsDevModelPageVO> returnpage = new Page<> (csDevModelQueryParm.getCurrentPage ( ), csDevModelQueryParm.getPageSize ( ));
|
||||||
|
|
||||||
|
returnpage = this.getBaseMapper ().getPage(returnpage,csDevModelQueryParm);
|
||||||
|
return returnpage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CsDevModelPageVO> queryList(CsDevModelQueryListParm csDevModelQueryListParm) {
|
||||||
|
List<CsDevModelPageVO> list = this.getBaseMapper ().queryList(csDevModelQueryListParm);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user