修改接口
This commit is contained in:
@@ -33,18 +33,18 @@ public class CsDevModelQueryListParm {
|
||||
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private String versionNo;
|
||||
/**
|
||||
* 版本日期
|
||||
*/
|
||||
@ApiModelProperty(value = "版本日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private String versionStartDate;
|
||||
|
||||
@ApiModelProperty(value = "版本日期")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private String versionEndDate;
|
||||
// /**
|
||||
// * 版本日期
|
||||
// */
|
||||
// @ApiModelProperty(value = "版本日期")
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
// private String versionStartDate;
|
||||
//
|
||||
// @ApiModelProperty(value = "版本日期")
|
||||
// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
// private String versionEndDate;
|
||||
|
||||
@ApiModelProperty(value = "版本准确日期")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
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;
|
||||
@@ -33,7 +32,7 @@ public class CsDevModelPageVO extends BaseEntity {
|
||||
private String devType;
|
||||
@ApiModelProperty(value = "设备模板型号id名称")
|
||||
private String devName;
|
||||
@TableField(value = "模板名称")
|
||||
@ApiModelProperty(value = "模板名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
@@ -52,13 +51,13 @@ public class CsDevModelPageVO extends BaseEntity {
|
||||
/**
|
||||
* 装置模板文件路径
|
||||
*/
|
||||
@TableField(value = "file_path")
|
||||
@ApiModelProperty(value = "file_path")
|
||||
private String filePath;
|
||||
|
||||
|
||||
/**
|
||||
* 状态(0:删除 1:正常)
|
||||
*/
|
||||
@TableField(value = "status")
|
||||
@ApiModelProperty(value = "status")
|
||||
private String status;
|
||||
}
|
||||
@@ -24,8 +24,6 @@ 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
|
||||
@@ -80,14 +78,14 @@ public class DevModelController extends BaseController {
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryEquipmentByProject")
|
||||
@PostMapping("/queryDevModelOne")
|
||||
@ApiOperation("设备模板列表查询")
|
||||
@ApiImplicitParam(name = "csDevModelQueryListParm", value = "信息", required = true)
|
||||
public HttpResult<List<CsDevModelPageVO>> queryEquipmentByProject(@RequestBody CsDevModelQueryListParm csDevModelQueryListParm){
|
||||
String methodDescribe = getMethodDescribe("queryEquipmentByProject");
|
||||
public HttpResult<CsDevModelPageVO> queryDevModelOne(@RequestBody CsDevModelQueryListParm csDevModelQueryListParm){
|
||||
String methodDescribe = getMethodDescribe("queryDevModelOne");
|
||||
|
||||
List<CsDevModelPageVO> list = csDevModelService.queryList(csDevModelQueryListParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
CsDevModelPageVO csDevModelPageVO = csDevModelService.queryDevModelOne(csDevModelQueryListParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, csDevModelPageVO, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ 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:
|
||||
@@ -22,5 +20,5 @@ import java.util.List;
|
||||
public interface CsDevModelMapper extends BaseMapper<CsDevModelPO> {
|
||||
Page<CsDevModelPageVO> getPage(Page<CsDevModelPageVO> returnpage,@Param("csDevModelQueryParm") CsDevModelQueryParm csDevModelQueryParm);
|
||||
|
||||
List<CsDevModelPageVO> queryList(@Param("csDevModelQueryListParm")CsDevModelQueryListParm csDevModelQueryListParm);
|
||||
CsDevModelPageVO queryOne(@Param("csDevModelQueryListParm")CsDevModelQueryListParm csDevModelQueryListParm);
|
||||
}
|
||||
@@ -42,19 +42,19 @@
|
||||
<if test="csDevModelQueryParm.name != null and csDevModelQueryParm.name != ''">
|
||||
AND a.name = #{csDevModelQueryParm.name}
|
||||
</if>
|
||||
</select><select id="queryList" resultType="com.njcn.algorithm.pojo.vo.CsDevModelPageVO">
|
||||
</select><select id="queryOne" 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 And a.`status`='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.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.versionDate != null and csDevModelQueryListParm.versionDate != ''">
|
||||
AND a.version_date = #{csDevModelQueryListParm.versionDate }
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
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.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.po.CsDevModelPO;
|
||||
import com.njcn.algorithm.pojo.vo.CsDevModelPageVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
@@ -51,5 +52,5 @@ public interface CsDevModelService extends IService<CsDevModelPO>{
|
||||
* @Date: 2023/4/10
|
||||
* @param projectEquipmentQueryParm
|
||||
*/
|
||||
List<CsDevModelPageVO> queryList(CsDevModelQueryListParm projectEquipmentQueryParm);
|
||||
CsDevModelPageVO queryDevModelOne(CsDevModelQueryListParm projectEquipmentQueryParm);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,10 @@ 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.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.po.CsDevModelPO;
|
||||
import com.njcn.algorithm.pojo.vo.CsDevModelPageVO;
|
||||
import com.njcn.algorithm.service.CsDevModelService;
|
||||
@@ -12,8 +15,6 @@ import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
@@ -55,8 +56,9 @@ public class CsDevModelServiceImpl extends ServiceImpl<CsDevModelMapper, CsDevMo
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CsDevModelPageVO> queryList(CsDevModelQueryListParm csDevModelQueryListParm) {
|
||||
List<CsDevModelPageVO> list = this.getBaseMapper ().queryList(csDevModelQueryListParm);
|
||||
return list;
|
||||
public CsDevModelPageVO queryDevModelOne(CsDevModelQueryListParm csDevModelQueryListParm) {
|
||||
|
||||
CsDevModelPageVO result = this.getBaseMapper ().queryOne(csDevModelQueryListParm);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user