From 5a8921b103eab47359ee7405de1b9d08c1cb3466 Mon Sep 17 00:00:00 2001 From: yinq Date: Tue, 25 Jun 2024 17:53:02 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20add=E7=94=B5=E6=B5=81=E7=94=B5?= =?UTF-8?q?=E5=8E=8B=E6=9B=B2=E7=BA=BF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EmsRecordDnbInstantController.java | 12 ++++++++++ .../record/domain/EmsRecordDnbInstant.java | 24 +++++++++---------- .../mapper/EmsRecordDnbInstantMapper.java | 7 ++++++ .../service/IEmsRecordDnbInstantService.java | 7 ++++++ .../impl/EmsRecordDnbInstantServiceImpl.java | 10 ++++++++ .../ems/record/EmsRecordDnbInstantMapper.xml | 13 ++++++++++ .../api/service/impl/ERPPortServiceImpl.java | 2 +- .../mapper/mes/base/BaseProcessInfoMapper.xml | 3 +++ 8 files changed, 65 insertions(+), 13 deletions(-) diff --git a/os-ems/src/main/java/com/os/ems/record/controller/EmsRecordDnbInstantController.java b/os-ems/src/main/java/com/os/ems/record/controller/EmsRecordDnbInstantController.java index e3a8123..e0dfa63 100644 --- a/os-ems/src/main/java/com/os/ems/record/controller/EmsRecordDnbInstantController.java +++ b/os-ems/src/main/java/com/os/ems/record/controller/EmsRecordDnbInstantController.java @@ -3,6 +3,7 @@ package com.os.ems.record.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; +import org.checkerframework.checker.units.qual.A; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -45,6 +46,17 @@ public class EmsRecordDnbInstantController extends BaseController { return getDataTable(list); } + /** + * 查询电实时数据 + * @param emsRecordDnbInstant + * @return + */ + @GetMapping("/dnbInstantList") + public AjaxResult dnbInstantList(EmsRecordDnbInstant emsRecordDnbInstant) { + List list = emsRecordDnbInstantService.selectDnbInstantList(emsRecordDnbInstant); + return success(list); + } + /** * 导出电实时数据列表 */ diff --git a/os-ems/src/main/java/com/os/ems/record/domain/EmsRecordDnbInstant.java b/os-ems/src/main/java/com/os/ems/record/domain/EmsRecordDnbInstant.java index 59d80ad..a047574 100644 --- a/os-ems/src/main/java/com/os/ems/record/domain/EmsRecordDnbInstant.java +++ b/os-ems/src/main/java/com/os/ems/record/domain/EmsRecordDnbInstant.java @@ -34,28 +34,28 @@ public class EmsRecordDnbInstant extends BaseEntity @Excel(name = "采集时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date collectTime; - /** A项电压 */ - @Excel(name = "A项电压") + /** A相电压 */ + @Excel(name = "A相电压") private BigDecimal vA; - /** B项电压 */ - @Excel(name = "B项电压") + /** B相电压 */ + @Excel(name = "B相电压") private BigDecimal vB; - /** C项电压 */ - @Excel(name = "C项电压") + /** C相电压 */ + @Excel(name = "C相电压") private BigDecimal vC; - /** A项电流 */ - @Excel(name = "A项电流") + /** A相电流 */ + @Excel(name = "A相电流") private BigDecimal iA; - /** B项电流 */ - @Excel(name = "B项电流") + /** B相电流 */ + @Excel(name = "B相电流") private BigDecimal iB; - /** C项电流 */ - @Excel(name = "C项电流") + /** C相电流 */ + @Excel(name = "C相电流") private BigDecimal iC; /** 记录时间 */ diff --git a/os-ems/src/main/java/com/os/ems/record/mapper/EmsRecordDnbInstantMapper.java b/os-ems/src/main/java/com/os/ems/record/mapper/EmsRecordDnbInstantMapper.java index 55b37d4..e139c01 100644 --- a/os-ems/src/main/java/com/os/ems/record/mapper/EmsRecordDnbInstantMapper.java +++ b/os-ems/src/main/java/com/os/ems/record/mapper/EmsRecordDnbInstantMapper.java @@ -58,4 +58,11 @@ public interface EmsRecordDnbInstantMapper * @return 结果 */ public int deleteEmsRecordDnbInstantByObjIds(Long[] objIds); + + /** + * 查询电实时数据 + * @param emsRecordDnbInstant + * @return + */ + List selectDnbInstantList(EmsRecordDnbInstant emsRecordDnbInstant); } diff --git a/os-ems/src/main/java/com/os/ems/record/service/IEmsRecordDnbInstantService.java b/os-ems/src/main/java/com/os/ems/record/service/IEmsRecordDnbInstantService.java index 769ee3f..6d559ce 100644 --- a/os-ems/src/main/java/com/os/ems/record/service/IEmsRecordDnbInstantService.java +++ b/os-ems/src/main/java/com/os/ems/record/service/IEmsRecordDnbInstantService.java @@ -58,4 +58,11 @@ public interface IEmsRecordDnbInstantService { * @return 结果 */ public int deleteEmsRecordDnbInstantByObjId(Long objId); + + /** + * 查询电实时数据 + * @param emsRecordDnbInstant + * @return + */ + List selectDnbInstantList(EmsRecordDnbInstant emsRecordDnbInstant); } diff --git a/os-ems/src/main/java/com/os/ems/record/service/impl/EmsRecordDnbInstantServiceImpl.java b/os-ems/src/main/java/com/os/ems/record/service/impl/EmsRecordDnbInstantServiceImpl.java index 284ec0f..9a8656f 100644 --- a/os-ems/src/main/java/com/os/ems/record/service/impl/EmsRecordDnbInstantServiceImpl.java +++ b/os-ems/src/main/java/com/os/ems/record/service/impl/EmsRecordDnbInstantServiceImpl.java @@ -86,4 +86,14 @@ public class EmsRecordDnbInstantServiceImpl implements IEmsRecordDnbInstantServi public int deleteEmsRecordDnbInstantByObjId(Long objId) { return emsRecordDnbInstantMapper.deleteEmsRecordDnbInstantByObjId(objId); } + + /** + * 查询电实时数据 + * @param emsRecordDnbInstant + * @return + */ + @Override + public List selectDnbInstantList(EmsRecordDnbInstant emsRecordDnbInstant) { + return emsRecordDnbInstantMapper.selectDnbInstantList(emsRecordDnbInstant); + } } diff --git a/os-ems/src/main/resources/mapper/ems/record/EmsRecordDnbInstantMapper.xml b/os-ems/src/main/resources/mapper/ems/record/EmsRecordDnbInstantMapper.xml index d5fb6e5..9979adf 100644 --- a/os-ems/src/main/resources/mapper/ems/record/EmsRecordDnbInstantMapper.xml +++ b/os-ems/src/main/resources/mapper/ems/record/EmsRecordDnbInstantMapper.xml @@ -74,6 +74,19 @@ where rdi.obj_id = #{objId} + + insert into ems_record_dnb_instant diff --git a/os-mes/src/main/java/com/os/mes/api/service/impl/ERPPortServiceImpl.java b/os-mes/src/main/java/com/os/mes/api/service/impl/ERPPortServiceImpl.java index ecfd391..a5f599f 100644 --- a/os-mes/src/main/java/com/os/mes/api/service/impl/ERPPortServiceImpl.java +++ b/os-mes/src/main/java/com/os/mes/api/service/impl/ERPPortServiceImpl.java @@ -134,7 +134,7 @@ public class ERPPortServiceImpl implements IERPPortService { HashMap returnData = (HashMap)hashMap.get("ReturnData"); HashMap data = (HashMap)returnData.get("data"); latestSalary = resultMapper.readValue(objectMapper.writeValueAsString(data), LatestSalary.class); - } catch (JsonProcessingException e) { + } catch (Exception e) { logger.warn("获取最新工资系数异常:" + requestParam + "|" + result + "|" + e); } return latestSalary; diff --git a/os-mes/src/main/resources/mapper/mes/base/BaseProcessInfoMapper.xml b/os-mes/src/main/resources/mapper/mes/base/BaseProcessInfoMapper.xml index 987f4a1..938c09d 100644 --- a/os-mes/src/main/resources/mapper/mes/base/BaseProcessInfoMapper.xml +++ b/os-mes/src/main/resources/mapper/mes/base/BaseProcessInfoMapper.xml @@ -10,6 +10,7 @@ + @@ -26,6 +27,7 @@ bpi.process_name, bpi.process_type, bpi.product_line_code, + PL.product_line_name, bpi.station_codes, bpi.capacity_day, bpi.capacity_month, @@ -35,6 +37,7 @@ bpi.update_by, bpi.update_time from base_process_info bpi + LEFT JOIN base_product_line PL ON PL.PRODUCT_LINE_CODE = bpi.product_line_code