From 815b90f47f8916f31fb4ce56dd268421c8d173fa Mon Sep 17 00:00:00 2001 From: guofeihu <3347277866@qq.com> Date: Wed, 3 Jul 2024 20:36:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=9B=91=E6=8E=A7:=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E4=B8=8B=E8=BD=BD=E3=80=81=E7=A6=BB=E7=BA=BF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AF=BC=E5=85=A5=E3=80=81=E8=A7=A3=E6=9E=90=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=8E=A5=E5=8F=A3=E5=BC=80=E5=8F=91(=E5=8F=AA?= =?UTF-8?q?=E6=98=AF=E9=A2=84=E7=95=99=E5=8F=A3=E5=AD=90)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../csdevice/pojo/param/WlRecordTemplete.java | 121 ++++++++++++++++++ .../csdevice/pojo/po/PortableOfflLog.java | 73 +++++++++++ .../equipment/PortableOfflLogController.java | 79 ++++++++++++ .../mapper/PortableOfflLogMapper.java | 24 ++++ .../mapper/mapping/PortableOfflLogMapper.xml | 11 ++ .../service/IPortableOfflLogService.java | 23 ++++ .../service/impl/CsGroupServiceImpl.java | 4 +- .../impl/PortableOfflLogServiceImpl.java | 53 ++++++++ 8 files changed, 386 insertions(+), 2 deletions(-) create mode 100644 cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/param/WlRecordTemplete.java create mode 100644 cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/po/PortableOfflLog.java create mode 100644 cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/equipment/PortableOfflLogController.java create mode 100644 cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/PortableOfflLogMapper.java create mode 100644 cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/mapping/PortableOfflLogMapper.xml create mode 100644 cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/IPortableOfflLogService.java create mode 100644 cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/PortableOfflLogServiceImpl.java diff --git a/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/param/WlRecordTemplete.java b/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/param/WlRecordTemplete.java new file mode 100644 index 0000000..d3f5123 --- /dev/null +++ b/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/param/WlRecordTemplete.java @@ -0,0 +1,121 @@ +package com.njcn.csdevice.pojo.param; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import com.njcn.db.bo.BaseEntity; +import lombok.Data; +import java.time.LocalDateTime; + +/** + *
+ * 方案、测试项表 + *
+ * + * @author xuyang + * @since 2024-04-01 + */ +@Data +public class WlRecordTemplete extends BaseEntity { + + /** + * 测试项名称 + */ + @Excel(name = "测试项名称", width = 15) + private String itemName; + + /** + * 名称 + */ + @Excel(name = "*名称", width = 15) + private String name; + + /** + * 装置网关识别码 + */ + @Excel(name = "*装置网关识别码", width = 15) + private String ndid; + + /** + * 监测点id + */ + @Excel(name = "*监测点编号", width = 15) + private String lineId; + + /** + * 统计间隔 + */ + @Excel(name = "*统计间隔", width = 15) + private String statisticalInterval; + + /** + * PT变比 + */ + @Excel(name = "*PT变比", width = 15) + private String pt; + + /** + * CT变比 + */ + @Excel(name = "*CT变比", width = 15) + private Integer ct; + + /** + * 电压等级 + */ + @Excel(name = "*电压等级", width = 15) + private String voltageLevel; + + /** + * 基准短路容量(MVA) + */ + @Excel(name = "*基准短路容量(MVA)", width = 15) + private String capacitySscb; + + /** + * 最小短路容量(MVA) + */ + @Excel(name = "*最小短路容量(MVA)", width = 15) + private String capacitySscmin; + + /** + * 供电设备容量(MVA) + */ + @Excel(name = "*供电设备容量(MVA)", width = 15) + private String capacitySt; + + /** + * 用户协议容量(MVA) + */ + @Excel(name = "*用户协议容量(MVA)", width = 15) + private String capacitySi; + + /** + * 电压接线方式(星型、角型、V型) + */ + @Excel(name = "*电压接线方式(星型、角型、V型)", width = 15) + private String volConType; + + /** + * 电流接线方式(正常、合成IB、合成IC) + */ + @Excel(name = "*电流接线方式(正常、合成IB、合成IC)", width = 15) + private String curConSel; + + /** + * 测试起始时间 + */ + @Excel(name = "*测试起始时间", width = 15) + private String startTime; + + /** + * 测试结束时间 + */ + @Excel(name = "*测试结束时间", width = 15) + private LocalDateTime endTime; + + /** + * 测试项监测位置 + */ + @Excel(name = "测试项监测位置", width = 15) + private String location; + +} diff --git a/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/po/PortableOfflLog.java b/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/po/PortableOfflLog.java new file mode 100644 index 0000000..c6ea5b7 --- /dev/null +++ b/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/po/PortableOfflLog.java @@ -0,0 +1,73 @@ +package com.njcn.csdevice.pojo.po; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.njcn.db.bo.BaseEntity; +import java.io.Serializable; +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; + +/** + *+ * + *
+ * + * @author guofeihu + * @since 2024-07-03 + */ +@Getter +@Setter +@TableName("portable_offl_log") +public class PortableOfflLog extends BaseEntity { + + private static final long serialVersionUID = 1L; + + private String logsIndex; + + /** + * 文件名称 + */ + private String name; + + /** + * 文件路径 + */ + private String dataPath; + + /** + * 0-未解析 1-解析成功 2-解析失败 3-文件不存在 + */ + private Integer state; + + /** + * 总条数 + */ + private Integer allCount; + + /** + * 入库条数 + */ + private Integer realCount; + + /** + * 创建用户 + */ + private String createBy; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 更新用户 + */ + private String updateBy; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + +} diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/equipment/PortableOfflLogController.java b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/equipment/PortableOfflLogController.java new file mode 100644 index 0000000..df9eab5 --- /dev/null +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/equipment/PortableOfflLogController.java @@ -0,0 +1,79 @@ +package com.njcn.csdevice.controller.equipment; + +import cn.afterturn.easypoi.excel.ExcelExportUtil; +import cn.afterturn.easypoi.excel.entity.ExportParams; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +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.csdevice.pojo.param.WlRecordTemplete; +import com.njcn.csdevice.pojo.po.PortableOfflLog; +import com.njcn.csdevice.service.IPortableOfflLogService; +import com.njcn.csdevice.utils.ExcelStyleUtil; +import com.njcn.poi.util.PoiUtil; +import com.njcn.web.pojo.param.BaseParam; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.web.bind.annotation.*; +import com.njcn.web.controller.BaseController; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; + +/** + *+ * 便携式基础数据导入 前端控制器 + *
+ * + * @author guofeihu + * @since 2024-07-03 + */ +@RestController +@RequestMapping("/portableOfflLog") +@Api(tags = " 出厂设备") +@AllArgsConstructor +public class PortableOfflLogController extends BaseController { + + private final IPortableOfflLogService iPortableOfflLogService; + + @ResponseBody + @ApiOperation("导出设备基础数据模板") + @GetMapping(value = "getExcelTemplate") + public HttpResult+ * 便携式基础数据导入 Mapper 接口 + *
+ * + * @author guofeihu + * @since 2024-07-03 + */ +public interface PortableOfflLogMapper extends BaseMapper+ * 便携式基础数据导入 服务类 + *
+ * + * @author guofeihu + * @since 2024-07-03 + */ +public interface IPortableOfflLogService extends IService+ * 便携式基础数据导入 服务实现类 + *
+ * + * @author guofeihu + * @since 2024-07-03 + */ +@Service +public class PortableOfflLogServiceImpl extends ServiceImpl