新增半月报功能
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
package com.njcn.access.controller;
|
||||
|
||||
import com.njcn.access.pojo.po.CsLineRunData;
|
||||
import com.njcn.access.service.ICsLineRunDataService;
|
||||
|
||||
import com.njcn.access.pojo.po.CsLineLatestData;
|
||||
import com.njcn.access.service.ICsLineLatestDataService;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
@@ -13,7 +14,6 @@ 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;
|
||||
@@ -27,26 +27,35 @@ import java.util.List;
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-06-26
|
||||
* @since 2025-07-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/csLineRunData")
|
||||
@Slf4j
|
||||
@Api(tags = "治理设备数据运行记录")
|
||||
@RestController
|
||||
@RequestMapping("/csLineLatestData")
|
||||
@Api(tags = "暂降事件")
|
||||
@AllArgsConstructor
|
||||
public class CsLineRunDataController extends BaseController {
|
||||
public class CsLineLatestDataController extends BaseController {
|
||||
|
||||
private final ICsLineRunDataService csLineRunDataService;
|
||||
private final ICsLineLatestDataService csLineLatestDataService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新增数据")
|
||||
@ApiImplicitParam(name = "list", value = "参数", required = true)
|
||||
public HttpResult<String> addData(@RequestBody @Validated List<CsLineRunData> list){
|
||||
String methodDescribe = getMethodDescribe("addData");
|
||||
csLineRunDataService.addData(list);
|
||||
@ApiOperation("新增")
|
||||
@ApiImplicitParam(name = "csLineLatestData", value = "实体", required = true)
|
||||
public HttpResult<String> addData(@RequestBody CsLineLatestData csLineLatestData) {
|
||||
String methodDescribe = getMethodDescribe("csLineLatestData");
|
||||
csLineLatestDataService.addData(csLineLatestData);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/list")
|
||||
@ApiOperation("查询")
|
||||
public HttpResult<List<CsLineLatestData>> listData() {
|
||||
String methodDescribe = getMethodDescribe("listData");
|
||||
List<CsLineLatestData> list = csLineLatestDataService.list();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.access.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.access.pojo.po.CsLineLatestData;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 治理设备模块运行状态记录表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-07-03
|
||||
*/
|
||||
public interface CsLineLatestDataMapper extends MppBaseMapper<CsLineLatestData> {
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.njcn.access.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.access.pojo.po.CsLineRunData;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 治理设备模块运行状态记录表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-06-26
|
||||
*/
|
||||
public interface CsLineRunDataMapper extends BaseMapper<CsLineRunData> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.njcn.access.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.access.pojo.po.CsLineLatestData;
|
||||
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 io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 治理设备模块运行状态记录表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-07-03
|
||||
*/
|
||||
public interface ICsLineLatestDataService extends IService<CsLineLatestData> {
|
||||
|
||||
void addData(CsLineLatestData csLineLatestData);
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.njcn.access.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.access.pojo.po.CsLineRunData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 治理设备模块运行状态记录表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-06-26
|
||||
*/
|
||||
public interface ICsLineRunDataService extends IService<CsLineRunData> {
|
||||
|
||||
void addData(List<CsLineRunData> list);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.njcn.access.service.impl;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.access.mapper.CsLineLatestDataMapper;
|
||||
import com.njcn.access.pojo.po.CsLineLatestData;
|
||||
import com.njcn.access.service.ICsLineLatestDataService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 治理设备模块运行状态记录表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-07-03
|
||||
*/
|
||||
@Service
|
||||
public class CsLineLatestDataServiceImpl extends MppServiceImpl<CsLineLatestDataMapper, CsLineLatestData> implements ICsLineLatestDataService {
|
||||
|
||||
@Override
|
||||
public void addData(CsLineLatestData csLineLatestData) {
|
||||
this.saveOrUpdateByMultiId(csLineLatestData);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.njcn.access.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.access.mapper.CsLineRunDataMapper;
|
||||
import com.njcn.access.pojo.po.CsLineRunData;
|
||||
import com.njcn.access.service.ICsLineRunDataService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 治理设备模块运行状态记录表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-06-26
|
||||
*/
|
||||
@Service
|
||||
public class CsLineRunDataServiceImpl extends ServiceImpl<CsLineRunDataMapper, CsLineRunData> implements ICsLineRunDataService {
|
||||
|
||||
@Override
|
||||
public void addData(List<CsLineRunData> list) {
|
||||
this.saveBatch(list);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user