소스 검색

添加部分接口

Redeem 3 주 전
부모
커밋
8cc60d112b
17개의 변경된 파일835개의 추가작업 그리고 34개의 파일을 삭제
  1. 3 4
      pom.xml
  2. 1 1
      src/main/java/com/steerinfo/baseinfo/combaseinfo/controller/ComBaseInfoController.java
  3. 2 2
      src/main/java/com/steerinfo/baseinfo/combaseinfo/mapper/ComBaseInfoMapper.xml
  4. 47 4
      src/main/java/com/steerinfo/baseinfo/meterbasemattermap/controller/MeterBaseMatterMapController.java
  5. 8 0
      src/main/java/com/steerinfo/baseinfo/meterbasemattermap/mapper/MeterBaseMatterMapMapper.java
  6. 22 2
      src/main/java/com/steerinfo/baseinfo/meterbasemattermap/mapper/MeterBaseMatterMapMapper.xml
  7. 5 0
      src/main/java/com/steerinfo/baseinfo/meterbasemattermap/service/IMeterBaseMatterMapService.java
  8. 5 0
      src/main/java/com/steerinfo/baseinfo/meterbasemattermap/service/impl/MeterBaseMatterMapServiceImpl.java
  9. 32 17
      src/main/java/com/steerinfo/baseinfo/meterbaserfidinfo/controller/MeterBaseRfidInfoController.java
  10. 3 0
      src/main/java/com/steerinfo/baseinfo/meterbaserfidinfo/mapper/MeterBaseRfidInfoMapper.xml
  11. 111 0
      src/main/java/com/steerinfo/baseinfo/metricpointlayout/controller/MetricPointLayoutController.java
  12. 9 0
      src/main/java/com/steerinfo/baseinfo/metricpointlayout/mapper/MetricPointLayoutMapper.java
  13. 342 0
      src/main/java/com/steerinfo/baseinfo/metricpointlayout/mapper/MetricPointLayoutMapper.xml
  14. 184 0
      src/main/java/com/steerinfo/baseinfo/metricpointlayout/model/MetricPointLayout.java
  15. 21 0
      src/main/java/com/steerinfo/baseinfo/metricpointlayout/service/IMetricPointLayoutService.java
  16. 34 0
      src/main/java/com/steerinfo/baseinfo/metricpointlayout/service/impl/MetricPointLayoutServiceImpl.java
  17. 6 4
      src/main/java/com/steerinfo/meterwork/meterworkdatacount/mapper/MeterWorkDataCountMapper.xml

+ 3 - 4
pom.xml

@@ -10,7 +10,7 @@
 
     <groupId>com.steerinfo</groupId>
     <artifactId>jg_wzjl_api</artifactId>
-    <version>1.0</version>
+    <version>1.1</version>
     <packaging>jar</packaging>
     <name>jg_wzjl_api</name>
     <url>http://maven.apache.org</url>
@@ -70,7 +70,6 @@
             <!-- 配置文件模版位置在 generator-maven-plugin-3.0.jar 包的主目录下 -->
             <!--<xmlProject>${project.basedir}\src\main\resources\generatorConfig.xml</xmlProject>-->
             <!-- 表生成model默认生成驼峰式:sys_user->SysUser,如果需要生成其它名字可以用逗号分隔:sys_user,User -->
-            <!--
             <plugin>
                 <groupId>com.steerinfo</groupId>
                 <artifactId>generator-maven-plugin</artifactId>
@@ -81,7 +80,8 @@
                     <user>lims</user>
                     <password>lims_2021</password>
                     <tables>
-                        <params>app_verification_code</params>
+                        <params>METER_BASE_MATTER_MAP</params>
+                        <params>METRIC_POINT_LAYOUT</params>
                     </tables>
                 </configuration>
                 <executions>
@@ -93,7 +93,6 @@
                     </execution>
                 </executions>
             </plugin>
-            -->
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>

+ 1 - 1
src/main/java/com/steerinfo/baseinfo/combaseinfo/controller/ComBaseInfoController.java

@@ -55,7 +55,7 @@ public class ComBaseInfoController extends BaseRESTfulController {
     public RESTfulResult list(@RequestParam HashMap parmas, Integer pageNum, Integer pageSize) {
         try {
             PageList<ComBaseInfo> list = comBaseInfoService.queryForPage(parmas, pageNum, pageSize);
-            Collections.reverse(list.getList());
+//            Collections.reverse(list.getList());
             return success(list);
         } catch (Exception ex) {
             ex.printStackTrace();

+ 2 - 2
src/main/java/com/steerinfo/baseinfo/combaseinfo/mapper/ComBaseInfoMapper.xml

@@ -410,12 +410,12 @@
   <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
     <include refid="select"/>
     <include refid="where"/>
-    order by  base_code desc
+    order by CREATE_TIME desc
   </select>
   <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
     <include refid="select"/>
     <include refid="whereLike"/>
-    order by  base_code desc
+    order by CREATE_TIME desc
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
     insert into COM_BASE_INFO 

+ 47 - 4
src/main/java/com/steerinfo/baseinfo/meterbasemattermap/controller/MeterBaseMatterMapController.java

@@ -1,6 +1,7 @@
 package com.steerinfo.baseinfo.meterbasemattermap.controller;
 
 import com.steerinfo.baseinfo.meterbasecar.model.MeterBaseCar;
+import com.steerinfo.baseinfo.meterbasemattermap.mapper.MeterBaseMatterMapMapper;
 import com.steerinfo.framework.controller.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageList;
@@ -20,10 +21,8 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.ArrayList;
+import java.text.SimpleDateFormat;
+import java.util.*;
 import java.math.BigDecimal;
 
 /**
@@ -46,6 +45,9 @@ public class MeterBaseMatterMapController extends BaseRESTfulController {
     @Resource
     IMeterBaseMatterMapService meterBaseMatterMapService;
 
+    @Resource
+    MeterBaseMatterMapMapper meterBaseMatterMapMapper;
+
     @ApiOperation(value="获取列表", notes="分页查询")
     @ApiImplicitParams({
         @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
@@ -75,6 +77,19 @@ public class MeterBaseMatterMapController extends BaseRESTfulController {
     //@RequiresPermissions("meterbasemattermap:create")
     @PostMapping(value = "/")
     public RESTfulResult add(@ModelAttribute MeterBaseMatterMap model){
+        if(model.getMaaterNo1() != null && model.getMaaterNo2() != null) {
+            Map<String, Object> objectObjectHashMap = new HashMap<>();
+            objectObjectHashMap.put("maaterNo1",model.getMaaterNo1());
+            objectObjectHashMap.put("maaterNo2",model.getMaaterNo2());
+            objectObjectHashMap.put("valueFlag",model.getValueFlag());
+            List<MeterBaseMatterMap> matterMaps = meterBaseMatterMapMapper.selectByParameters(objectObjectHashMap);
+            if (matterMaps.size() > 0) {
+                return failed("该映射关系已存在");
+            }
+        }
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        String al = simpleDateFormat.format(new Date());
+        model.setId(al + meterBaseMatterMapMapper.getNewId(al));
         MeterBaseMatterMap meterBaseMatterMap = meterBaseMatterMapService.add(model);
         return success(meterBaseMatterMap);
     }
@@ -130,4 +145,32 @@ public class MeterBaseMatterMapController extends BaseRESTfulController {
             return rm;
         }
     }
+
+    /**
+     * 批量作废(或逻辑删除)物料映射记录
+     * @param ids 以逗号分隔的映射编号字符串,例如 "MAP001,MAP002"
+     * @param verificationCode 验证码(可选)
+     * @return RESTfulResult
+     */
+    @ApiOperation(value="批量作废", notes="根据映射编号列表作废记录(可改为更新状态为'0'或物理删除)")
+    @ApiImplicitParam(name = "ids", value = "映射编号,多个用逗号分隔", required = true, dataType = "String")
+    @PostMapping(value = "/invalid")
+    public RESTfulResult invalid(@RequestParam String ids,
+                                 @RequestParam(required = false) String verificationCode) {
+        // 此处可添加 verificationCode 校验,根据实际需求决定
+        // 如果业务需求是逻辑删除(将 valueFlag 置为 '0'),则调用 service 更新
+        // 如果是物理删除,则调用 delete 方法
+        // 以下以逻辑删除为例(更新 valueFlag = '0')
+        String[] idArray = ids.split(",");
+        List<String> idList = Arrays.asList(idArray);
+        if (ListUtils.isNotEmpty(idList)) {
+            // 假设 service 中有 batchUpdateStatus 方法,将状态置为 '0'
+            // 如果 service 未提供,可遍历调用 update 或写批量更新
+            // 此处简化,调用已有的 delete 方法(若您需要物理删除则直接调用 delete)
+            // 但用户要求“作废”,一般建议逻辑删除,故我假设您有更新状态的方法,若没有则需新增
+            // 演示:调用 service 的 invalid 方法(您需要在 service 中实现)
+            meterBaseMatterMapService.batchInvalid(idList);
+        }
+        return success();
+    }
 }

+ 8 - 0
src/main/java/com/steerinfo/baseinfo/meterbasemattermap/mapper/MeterBaseMatterMapMapper.java

@@ -3,8 +3,16 @@ package com.steerinfo.baseinfo.meterbasemattermap.mapper;
 import com.steerinfo.baseinfo.meterbasemattermap.model.MeterBaseMatterMap;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import java.math.*;
+import java.util.List;
+
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 @Mapper
 public interface MeterBaseMatterMapMapper extends IBaseMapper<MeterBaseMatterMap, String> {
+
+    String getNewId(@Param("al") String al);
+
+    void updateStatus(@Param("idList") List<String> idList,@Param("number") String number);
+
 }

+ 22 - 2
src/main/java/com/steerinfo/baseinfo/meterbasemattermap/mapper/MeterBaseMatterMapMapper.xml

@@ -138,8 +138,9 @@
   <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
     <include refid="select"/>
     <include refid="whereLike"/>
+    ORDER BY MAP_NO
   </select>
-  <insert id="batchInsert" parameterType="java.util.List">
+    <insert id="batchInsert" parameterType="java.util.List">
     insert into METER_BASE_MATTER_MAP 
       (MAP_NO, 
       MAATER_NO1, MAATER_NO2, VALUE_FLAG
@@ -184,5 +185,24 @@
   </delete>
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-  
+  <select id="getNewId" resultType="java.lang.String" parameterType="java.lang.String">
+    SELECT
+      LPAD(
+              NVL( MAX( TO_NUMBER( SUBSTR( MAP_NO, LENGTH( MAP_NO ) - 3 ) ) ), 0 ) + 1,
+              2,
+              '0'
+      ) MAP_NO
+    FROM
+      METER_BASE_MATTER_MAP
+    WHERE
+      instr( MAP_NO, #{al} ) >0
+  </select>
+  <update id="updateStatus">
+    UPDATE METER_BASE_MATTER_MAP
+    SET VALUE_FLAG = '0'
+    WHERE MAP_NO IN
+    <foreach collection="idList" open="(" close=")" item="item" separator=",">
+      #{item}
+    </foreach>
+  </update>
 </mapper>

+ 5 - 0
src/main/java/com/steerinfo/baseinfo/meterbasemattermap/service/IMeterBaseMatterMapService.java

@@ -4,9 +4,11 @@ import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.baseinfo.meterbasemattermap.model.MeterBaseMatterMap;
 import com.steerinfo.meterwork.meterworkcaractualfirstbak.model.MeterWorkCarActualFirstBak;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.Date;
 import java.math.BigDecimal;
+import java.util.List;
 
 /**
  * MeterBaseMatterMap服务接口:
@@ -23,4 +25,7 @@ import java.math.BigDecimal;
  */
 public interface IMeterBaseMatterMapService extends IBaseService<MeterBaseMatterMap, String>{
     RESTfulResult isDoublePre(String carNo);
+
+    void batchInvalid(@Param("idList") List<String> idList);
+
 }

+ 5 - 0
src/main/java/com/steerinfo/baseinfo/meterbasemattermap/service/impl/MeterBaseMatterMapServiceImpl.java

@@ -268,4 +268,9 @@ public class MeterBaseMatterMapServiceImpl extends BaseServiceImpl<MeterBaseMatt
             return rm;
         }
     }
+
+    @Override
+    public void batchInvalid(List<String> idList) {
+        meterBaseMatterMapMapper.updateStatus(idList, "0");
+    }
 }

+ 32 - 17
src/main/java/com/steerinfo/baseinfo/meterbaserfidinfo/controller/MeterBaseRfidInfoController.java

@@ -109,25 +109,40 @@ public class MeterBaseRfidInfoController extends BaseRESTfulController {
             rm.setMessage("车号不能为空,请确认!!");
             return rm;
         }
-        HashMap<String, Object> map =new HashMap<>();
-        map.put("rfidCode",rfidCode);
-        map.put("valueFlag","0");
-        List<MeterBaseRfidInfo> models = meterBaseRfidInfoMapper.selectByMap(map);
-        if(models.size() >= 1) {
-            rm.setMessage("rfid已重复,不允许再次新增,请确认!!");
-            return rm;
+        if(model.get("rfidId") != null && !"".equals(model.get("rfidId"))) {
+            HashMap<String, Object> map =new HashMap<>();
+            map.put("rfidId",model.get("rfidId"));
+            List<MeterBaseRfidInfo> models = meterBaseRfidInfoMapper.selectByMap(map);
+            if(models.size() > 0) {
+                models.get(0).setCarNo(carNo);
+                models.get(0).setRfidCode(rfidCode);
+                meterBaseRfidInfoMapper.updateByPrimaryKey(models.get(0));
+                return success(models.get(0));
+            }else{
+                rm.setMessage("未找到记录,请重试");
+                return rm;
+            }
+
+        }else{
+            HashMap<String, Object> map =new HashMap<>();
+            map.put("rfidCode",rfidCode);
+            List<MeterBaseRfidInfo> models = meterBaseRfidInfoMapper.selectByMap(map);
+            if(models.size() >= 1) {
+                rm.setMessage("rfid已重复,不允许再次新增,请确认!!");
+                return rm;
+            }
+            HashMap<String, Object> map1 =new HashMap<>();
+            map1.put("carNo",carNo);
+            map1.put("valueFlag","0");
+            List<MeterBaseRfidInfo> models1 = meterBaseRfidInfoMapper.selectByMap(map1);
+            if(models1.size() >= 1) {
+                rm.setMessage("车号已重复,不允许再次新增,请确认!!");
+                return rm;
+            }
+            MeterBaseRfidInfo meterBaseRfidInfo = meterBaseRfidInfoService.checkAndAdd(model);
+            return success(meterBaseRfidInfo);
         }
 
-        HashMap<String, Object> map1 =new HashMap<>();
-        map1.put("carNo",carNo);
-        map1.put("valueFlag","0");
-        List<MeterBaseRfidInfo> models1 = meterBaseRfidInfoMapper.selectByMap(map1);
-        if(models1.size() >= 1) {
-            rm.setMessage("车号已重复,不允许再次新增,请确认!!");
-            return rm;
-        }
-        MeterBaseRfidInfo meterBaseRfidInfo = meterBaseRfidInfoService.checkAndAdd(model);
-        return success(meterBaseRfidInfo);
     }
 
     @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")

+ 3 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserfidinfo/mapper/MeterBaseRfidInfoMapper.xml

@@ -271,6 +271,9 @@
     <if test="rfidCode != null and rfidCode != ''">
       and RFID_CODE = #{rfidCode}
     </if>
+    <if test="rfidId != null and rfidId != ''">
+      and RFID_ID = #{rfidId}
+    </if>
     <if test="carNo != null and carNo != ''">
       and CAR_NO = #{carNo}
     </if>

+ 111 - 0
src/main/java/com/steerinfo/baseinfo/metricpointlayout/controller/MetricPointLayoutController.java

@@ -0,0 +1,111 @@
+package com.steerinfo.baseinfo.metricpointlayout.controller;
+
+import com.steerinfo.baseinfo.metricpointlayout.model.MetricPointLayout;
+import com.steerinfo.baseinfo.metricpointlayout.service.IMetricPointLayoutService;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * MetricPointLayout RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2026-07-30 10:18
+ * 类描述
+ * 修订历史:
+ * 日期:2026-07-30
+ * 作者:generator
+ * 参考:
+ * 描述:MetricPointLayout RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/metricpointlayouts")
+public class MetricPointLayoutController extends BaseRESTfulController {
+
+    @Autowired
+    IMetricPointLayoutService metricPointLayoutService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("metricpointlayout:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MetricPointLayout> list = metricPointLayoutService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("metricpointlayout:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MetricPointLayout> list = metricPointLayoutService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据MetricPointLayout对象创建")
+    @ApiImplicitParam(name = "metricPointLayout", value = "详细实体metricPointLayout", required = true, dataType = "MetricPointLayout")
+    //@RequiresPermissions("metricpointlayout:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute MetricPointLayout model){
+        model.setCreateTime(new Date());
+        model.setUpdateTime(new Date());
+        MetricPointLayout metricPointLayout = metricPointLayoutService.add(model);
+        return success(metricPointLayout);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("metricpointlayout:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        MetricPointLayout metricPointLayout = metricPointLayoutService.getById(id);
+        return success(metricPointLayout);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的metricPointLayout信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "metricPointLayout", value = "详细实体metricPointLayout", required = true, dataType = "MetricPointLayout")
+    })
+    //@RequiresPermissions("metricpointlayout:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody MetricPointLayout model){
+        model.setId(id);
+        model.setCreateTime(new Date());
+        model.setUpdateTime(new Date());
+        MetricPointLayout metricPointLayout = metricPointLayoutService.modify(model);
+        return success(metricPointLayout);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("metricpointlayout:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  metricPointLayoutService.delete(ids);
+    	}
+      return success();
+    }
+}

+ 9 - 0
src/main/java/com/steerinfo/baseinfo/metricpointlayout/mapper/MetricPointLayoutMapper.java

@@ -0,0 +1,9 @@
+package com.steerinfo.baseinfo.metricpointlayout.mapper;
+
+import com.steerinfo.baseinfo.metricpointlayout.model.MetricPointLayout;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface MetricPointLayoutMapper extends IBaseMapper<MetricPointLayout, String> {
+}

+ 342 - 0
src/main/java/com/steerinfo/baseinfo/metricpointlayout/mapper/MetricPointLayoutMapper.xml

@@ -0,0 +1,342 @@
+<?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.steerinfo.baseinfo.metricpointlayout.mapper.MetricPointLayoutMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.metricpointlayout.model.MetricPointLayout">
+    <id column="POINT_NO" jdbcType="VARCHAR" property="pointNo" />
+    <result column="POS_TOP" jdbcType="DECIMAL" property="posTop" />
+    <result column="POS_LEFT" jdbcType="DECIMAL" property="posLeft" />
+    <result column="ICON_TYPE" jdbcType="VARCHAR" property="iconType" />
+    <result column="ICON_OFFSET_TOP" jdbcType="VARCHAR" property="iconOffsetTop" />
+    <result column="ICON_OFFSET_RIGHT" jdbcType="VARCHAR" property="iconOffsetRight" />
+    <result column="SORT_ORDER" jdbcType="DECIMAL" property="sortOrder" />
+    <result column="IS_ENABLED" jdbcType="CHAR" property="isEnabled" />
+    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="columns">
+    POINT_NO, POS_TOP, POS_LEFT, ICON_TYPE, ICON_OFFSET_TOP, ICON_OFFSET_RIGHT, SORT_ORDER, 
+    IS_ENABLED, CREATE_TIME, UPDATE_TIME
+  </sql>
+  <sql id="columns_alias">
+    t.POINT_NO, t.POS_TOP, t.POS_LEFT, t.ICON_TYPE, t.ICON_OFFSET_TOP, t.ICON_OFFSET_RIGHT, 
+    t.SORT_ORDER, t.IS_ENABLED, t.CREATE_TIME, t.UPDATE_TIME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM METRIC_POINT_LAYOUT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM METRIC_POINT_LAYOUT t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="pointNo != null and pointNo != ''">
+        and POINT_NO = #{pointNo}
+      </if>
+      <if test="posTop != null">
+        and POS_TOP = #{posTop}
+      </if>
+      <if test="posLeft != null">
+        and POS_LEFT = #{posLeft}
+      </if>
+      <if test="iconType != null and iconType != ''">
+        and ICON_TYPE = #{iconType}
+      </if>
+      <if test="iconOffsetTop != null and iconOffsetTop != ''">
+        and ICON_OFFSET_TOP = #{iconOffsetTop}
+      </if>
+      <if test="iconOffsetRight != null and iconOffsetRight != ''">
+        and ICON_OFFSET_RIGHT = #{iconOffsetRight}
+      </if>
+      <if test="sortOrder != null">
+        and SORT_ORDER = #{sortOrder}
+      </if>
+      <if test="isEnabled != null">
+        and IS_ENABLED = #{isEnabled}
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="pointNo != null and pointNo != ''">
+        and POINT_NO LIKE '%${pointNo}%'
+      </if>
+      <if test="posTop != null">
+        and POS_TOP = #{posTop}
+      </if>
+      <if test="posLeft != null">
+        and POS_LEFT = #{posLeft}
+      </if>
+      <if test="iconType != null and iconType != ''">
+        and ICON_TYPE LIKE '%${iconType}%'
+      </if>
+      <if test="iconOffsetTop != null and iconOffsetTop != ''">
+        and ICON_OFFSET_TOP LIKE '%${iconOffsetTop}%'
+      </if>
+      <if test="iconOffsetRight != null and iconOffsetRight != ''">
+        and ICON_OFFSET_RIGHT LIKE '%${iconOffsetRight}%'
+      </if>
+      <if test="sortOrder != null">
+        and SORT_ORDER = #{sortOrder}
+      </if>
+      <if test="isEnabled != null">
+        and IS_ENABLED = #{isEnabled}
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from METRIC_POINT_LAYOUT
+    where POINT_NO = #{pointNo,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from METRIC_POINT_LAYOUT
+    where 1!=1 
+      <if test="posTop != null">
+        or POS_TOP = #{posTop}
+      </if>
+      <if test="posLeft != null">
+        or POS_LEFT = #{posLeft}
+      </if>
+      <if test="iconType != null and iconType != ''">
+        or ICON_TYPE = #{iconType}
+      </if>
+      <if test="iconOffsetTop != null and iconOffsetTop != ''">
+        or ICON_OFFSET_TOP = #{iconOffsetTop}
+      </if>
+      <if test="iconOffsetRight != null and iconOffsetRight != ''">
+        or ICON_OFFSET_RIGHT = #{iconOffsetRight}
+      </if>
+      <if test="sortOrder != null">
+        or SORT_ORDER = #{sortOrder}
+      </if>
+      <if test="isEnabled != null">
+        or IS_ENABLED = #{isEnabled}
+      </if>
+      <if test="createTime != null">
+        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.baseinfo.metricpointlayout.model.MetricPointLayout">
+    insert into METRIC_POINT_LAYOUT (POINT_NO, POS_TOP, POS_LEFT, 
+      ICON_TYPE, ICON_OFFSET_TOP, ICON_OFFSET_RIGHT, 
+      SORT_ORDER, IS_ENABLED, CREATE_TIME, 
+      UPDATE_TIME)
+    values (#{pointNo,jdbcType=VARCHAR}, #{posTop,jdbcType=DECIMAL}, #{posLeft,jdbcType=DECIMAL}, 
+      #{iconType,jdbcType=VARCHAR}, #{iconOffsetTop,jdbcType=VARCHAR}, #{iconOffsetRight,jdbcType=VARCHAR}, 
+      #{sortOrder,jdbcType=DECIMAL}, #{isEnabled,jdbcType=CHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.metricpointlayout.model.MetricPointLayout">
+    insert into METRIC_POINT_LAYOUT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="pointNo != null">
+        POINT_NO,
+      </if>
+      <if test="posTop != null">
+        POS_TOP,
+      </if>
+      <if test="posLeft != null">
+        POS_LEFT,
+      </if>
+      <if test="iconType != null">
+        ICON_TYPE,
+      </if>
+      <if test="iconOffsetTop != null">
+        ICON_OFFSET_TOP,
+      </if>
+      <if test="iconOffsetRight != null">
+        ICON_OFFSET_RIGHT,
+      </if>
+      <if test="sortOrder != null">
+        SORT_ORDER,
+      </if>
+      <if test="isEnabled != null">
+        IS_ENABLED,
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="pointNo != null">
+        #{pointNo,jdbcType=VARCHAR},
+      </if>
+      <if test="posTop != null">
+        #{posTop,jdbcType=DECIMAL},
+      </if>
+      <if test="posLeft != null">
+        #{posLeft,jdbcType=DECIMAL},
+      </if>
+      <if test="iconType != null">
+        #{iconType,jdbcType=VARCHAR},
+      </if>
+      <if test="iconOffsetTop != null">
+        #{iconOffsetTop,jdbcType=VARCHAR},
+      </if>
+      <if test="iconOffsetRight != null">
+        #{iconOffsetRight,jdbcType=VARCHAR},
+      </if>
+      <if test="sortOrder != null">
+        #{sortOrder,jdbcType=DECIMAL},
+      </if>
+      <if test="isEnabled != null">
+        #{isEnabled,jdbcType=CHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.metricpointlayout.model.MetricPointLayout">
+    update METRIC_POINT_LAYOUT
+    set POS_TOP = #{posTop,jdbcType=DECIMAL},
+      POS_LEFT = #{posLeft,jdbcType=DECIMAL},
+      ICON_TYPE = #{iconType,jdbcType=VARCHAR},
+      ICON_OFFSET_TOP = #{iconOffsetTop,jdbcType=VARCHAR},
+      ICON_OFFSET_RIGHT = #{iconOffsetRight,jdbcType=VARCHAR},
+      SORT_ORDER = #{sortOrder,jdbcType=DECIMAL},
+      IS_ENABLED = #{isEnabled,jdbcType=CHAR},
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}
+    where POINT_NO = #{pointNo,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.metricpointlayout.model.MetricPointLayout">
+    update METRIC_POINT_LAYOUT
+    <set>
+      <if test="posTop != null">
+        POS_TOP = #{posTop,jdbcType=DECIMAL},
+      </if>
+      <if test="posLeft != null">
+        POS_LEFT = #{posLeft,jdbcType=DECIMAL},
+      </if>
+      <if test="iconType != null">
+        ICON_TYPE = #{iconType,jdbcType=VARCHAR},
+      </if>
+      <if test="iconOffsetTop != null">
+        ICON_OFFSET_TOP = #{iconOffsetTop,jdbcType=VARCHAR},
+      </if>
+      <if test="iconOffsetRight != null">
+        ICON_OFFSET_RIGHT = #{iconOffsetRight,jdbcType=VARCHAR},
+      </if>
+      <if test="sortOrder != null">
+        SORT_ORDER = #{sortOrder,jdbcType=DECIMAL},
+      </if>
+      <if test="isEnabled != null">
+        IS_ENABLED = #{isEnabled,jdbcType=CHAR},
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where POINT_NO = #{pointNo,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where POINT_NO = #{pointNo,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into METRIC_POINT_LAYOUT 
+      (POINT_NO, 
+      POS_TOP, POS_LEFT, ICON_TYPE, 
+      ICON_OFFSET_TOP, ICON_OFFSET_RIGHT, 
+      SORT_ORDER, IS_ENABLED, CREATE_TIME, 
+      UPDATE_TIME)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.pointNo,jdbcType=VARCHAR}, 
+      #{item.posTop,jdbcType=DECIMAL}, #{item.posLeft,jdbcType=DECIMAL}, #{item.iconType,jdbcType=VARCHAR}, 
+      #{item.iconOffsetTop,jdbcType=VARCHAR}, #{item.iconOffsetRight,jdbcType=VARCHAR}, 
+      #{item.sortOrder,jdbcType=DECIMAL}, #{item.isEnabled,jdbcType=CHAR}, #{item.createTime,jdbcType=TIMESTAMP}, 
+      #{item.updateTime,jdbcType=TIMESTAMP} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update METRIC_POINT_LAYOUT
+     set
+       POINT_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
+          when #{item.pointNo,jdbcType=VARCHAR} then #{item.pointNo,jdbcType=VARCHAR}
+       </foreach>
+       ,POS_TOP=
+       <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
+          when #{item.pointNo,jdbcType=VARCHAR} then #{item.posTop,jdbcType=DECIMAL}
+       </foreach>
+       ,POS_LEFT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
+          when #{item.pointNo,jdbcType=VARCHAR} then #{item.posLeft,jdbcType=DECIMAL}
+       </foreach>
+       ,ICON_TYPE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
+          when #{item.pointNo,jdbcType=VARCHAR} then #{item.iconType,jdbcType=VARCHAR}
+       </foreach>
+       ,ICON_OFFSET_TOP=
+       <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
+          when #{item.pointNo,jdbcType=VARCHAR} then #{item.iconOffsetTop,jdbcType=VARCHAR}
+       </foreach>
+       ,ICON_OFFSET_RIGHT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
+          when #{item.pointNo,jdbcType=VARCHAR} then #{item.iconOffsetRight,jdbcType=VARCHAR}
+       </foreach>
+       ,SORT_ORDER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
+          when #{item.pointNo,jdbcType=VARCHAR} then #{item.sortOrder,jdbcType=DECIMAL}
+       </foreach>
+       ,IS_ENABLED=
+       <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
+          when #{item.pointNo,jdbcType=VARCHAR} then #{item.isEnabled,jdbcType=CHAR}
+       </foreach>
+       ,CREATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
+          when #{item.pointNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
+          when #{item.pointNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+     where POINT_NO in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.pointNo,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from METRIC_POINT_LAYOUT
+    where POINT_NO in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  
+</mapper>

+ 184 - 0
src/main/java/com/steerinfo/baseinfo/metricpointlayout/model/MetricPointLayout.java

@@ -0,0 +1,184 @@
+package com.steerinfo.baseinfo.metricpointlayout.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="称重点位布局动态配置表(支持汽车衡/轨道衡坐标与显隐控制)")
+public class MetricPointLayout implements IBasePO<String> {
+    /**
+     * 点位编号(主键,对应前端pointNo)(POINT_NO,VARCHAR,50)
+     */
+    @ApiModelProperty(value="点位编号(主键,对应前端pointNo)",required=true)
+    private String pointNo;
+
+    /**
+     * 顶部位置百分比数值(例如 71.4,前端渲染为 71.4%)(POS_TOP,DECIMAL,8)
+     */
+    @ApiModelProperty(value="顶部位置百分比数值(例如 71.4,前端渲染为 71.4%)",required=false)
+    private BigDecimal posTop;
+
+    /**
+     * 左侧位置百分比数值(例如 55.8,前端渲染为 55.8%)(POS_LEFT,DECIMAL,8)
+     */
+    @ApiModelProperty(value="左侧位置百分比数值(例如 55.8,前端渲染为 55.8%)",required=false)
+    private BigDecimal posLeft;
+
+    /**
+     * 图标类型:car(汽车衡) / train(轨道衡)(ICON_TYPE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="图标类型:car(汽车衡) / train(轨道衡)",required=false)
+    private String iconType;
+
+    /**
+     * 图标相对顶部偏移量(CSS值,如 -10px),用于微调图标位置(ICON_OFFSET_TOP,VARCHAR,20)
+     */
+    @ApiModelProperty(value="图标相对顶部偏移量(CSS值,如 -10px),用于微调图标位置",required=false)
+    private String iconOffsetTop;
+
+    /**
+     * 图标相对右侧偏移量(CSS值,如 1px),用于微调图标位置(ICON_OFFSET_RIGHT,VARCHAR,20)
+     */
+    @ApiModelProperty(value="图标相对右侧偏移量(CSS值,如 1px),用于微调图标位置",required=false)
+    private String iconOffsetRight;
+
+    /**
+     * 排序号(数值越小越靠前)(SORT_ORDER,DECIMAL,5)
+     */
+    @ApiModelProperty(value="排序号(数值越小越靠前)",required=false)
+    private Integer sortOrder;
+
+    /**
+     * 是否启用:1-显示,0-隐藏(用于屏蔽左侧点位或临时下线)(IS_ENABLED,CHAR,1)
+     */
+    @ApiModelProperty(value="是否启用:1-显示,0-隐藏(用于屏蔽左侧点位或临时下线)",required=false)
+    private String isEnabled;
+
+    /**
+     * 创建时间(CREATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="创建时间",required=true)
+    private Date createTime;
+
+    /**
+     * 最后更新时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="最后更新时间",required=true)
+    private Date updateTime;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.pointNo;
+    }
+
+    @Override
+    public void setId(String pointNo) {
+        this.pointNo = pointNo == null ? null : pointNo.trim();
+    }
+
+    public String getPointNo() {
+        return pointNo;
+    }
+
+    public void setPointNo(String pointNo) {
+        this.pointNo = pointNo == null ? null : pointNo.trim();
+    }
+
+    public BigDecimal getPosTop() {
+        return posTop;
+    }
+
+    public void setPosTop(BigDecimal posTop) {
+        this.posTop = posTop;
+    }
+
+    public BigDecimal getPosLeft() {
+        return posLeft;
+    }
+
+    public void setPosLeft(BigDecimal posLeft) {
+        this.posLeft = posLeft;
+    }
+
+    public String getIconType() {
+        return iconType;
+    }
+
+    public void setIconType(String iconType) {
+        this.iconType = iconType == null ? null : iconType.trim();
+    }
+
+    public String getIconOffsetTop() {
+        return iconOffsetTop;
+    }
+
+    public void setIconOffsetTop(String iconOffsetTop) {
+        this.iconOffsetTop = iconOffsetTop == null ? null : iconOffsetTop.trim();
+    }
+
+    public String getIconOffsetRight() {
+        return iconOffsetRight;
+    }
+
+    public void setIconOffsetRight(String iconOffsetRight) {
+        this.iconOffsetRight = iconOffsetRight == null ? null : iconOffsetRight.trim();
+    }
+
+    public Integer getSortOrder() {
+        return sortOrder;
+    }
+
+    public void setSortOrder(Integer sortOrder) {
+        this.sortOrder = sortOrder;
+    }
+
+    public String getIsEnabled() {
+        return isEnabled;
+    }
+
+    public void setIsEnabled(String isEnabled) {
+        this.isEnabled = isEnabled == null ? null : isEnabled.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", pointNo=").append(pointNo);
+        sb.append(", posTop=").append(posTop);
+        sb.append(", posLeft=").append(posLeft);
+        sb.append(", iconType=").append(iconType);
+        sb.append(", iconOffsetTop=").append(iconOffsetTop);
+        sb.append(", iconOffsetRight=").append(iconOffsetRight);
+        sb.append(", sortOrder=").append(sortOrder);
+        sb.append(", isEnabled=").append(isEnabled);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 21 - 0
src/main/java/com/steerinfo/baseinfo/metricpointlayout/service/IMetricPointLayoutService.java

@@ -0,0 +1,21 @@
+package com.steerinfo.baseinfo.metricpointlayout.service;
+
+import com.steerinfo.baseinfo.metricpointlayout.model.MetricPointLayout;
+import com.steerinfo.framework.service.IBaseService;
+
+/**
+ * MetricPointLayout服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2026-07-30 10:18
+ * 类描述
+ * 修订历史:
+ * 日期:2026-07-30
+ * 作者:generator
+ * 参考:
+ * 描述:MetricPointLayout服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IMetricPointLayoutService extends IBaseService<MetricPointLayout, String>{
+
+}

+ 34 - 0
src/main/java/com/steerinfo/baseinfo/metricpointlayout/service/impl/MetricPointLayoutServiceImpl.java

@@ -0,0 +1,34 @@
+package com.steerinfo.baseinfo.metricpointlayout.service.impl;
+
+import com.steerinfo.baseinfo.metricpointlayout.mapper.MetricPointLayoutMapper;
+import com.steerinfo.baseinfo.metricpointlayout.model.MetricPointLayout;
+import com.steerinfo.baseinfo.metricpointlayout.service.IMetricPointLayoutService;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * MetricPointLayout服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2026-07-30 10:18
+ * 类描述
+ * 修订历史:
+ * 日期:2026-07-30
+ * 作者:generator
+ * 参考:
+ * 描述:MetricPointLayout服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "metricPointLayoutService")
+public class MetricPointLayoutServiceImpl extends BaseServiceImpl<MetricPointLayout, String> implements IMetricPointLayoutService {
+
+    @Autowired
+    private MetricPointLayoutMapper metricPointLayoutMapper;
+
+    @Override
+    protected IBaseMapper<MetricPointLayout, String> getMapper() {
+        return metricPointLayoutMapper;
+    }
+}

+ 6 - 4
src/main/java/com/steerinfo/meterwork/meterworkdatacount/mapper/MeterWorkDataCountMapper.xml

@@ -454,6 +454,7 @@
         WHEN C.clean_up_weight IS NOT NULL THEN '正常皮重'
         ELSE NULL
         END AS alarmType,
+        ABS(ROUND((A.meter_weight - C.clean_up_weight) / 1000, 2)) AS deviation,
         ROUND(A.meter_weight / 1000, 2) AS meterWeight,
         null AS avgWeight,
         ROUND(C.clean_up_weight / 1000, 2) AS upWeight,
@@ -496,7 +497,7 @@
         WHERE C.car_no = A.car_no
         AND C.create_time &lt; A.create_time
         AND C.VALUE_FLAG != 0
-        AND C.prediction_Combination is null        -- 非混装/混卸
+        AND nvl(C.PREDICTION_TYPE,0) not in (6,7)        -- 非混装/混卸
         ORDER BY C.create_time DESC
         FETCH FIRST 1 ROW ONLY
         ) C
@@ -509,11 +510,12 @@
         <!-- 报警类型:0=超差,1=正常 -->
         <if test="alarmType != null and alarmType != ''">
             <if test="alarmType == 0">
-                AND deviation > (SELECT TO_NUMBER(BASE_NAME) / 1000 FROM com_base_info WHERE BASE_CODE = '001067001')
+                and C.clean_up_weight is not null
+                AND ABS(ROUND((A.meter_weight - C.clean_up_weight) / 1000, 2)) > (SELECT TO_NUMBER(BASE_NAME) / 1000 FROM com_base_info WHERE BASE_CODE = '001067001')
             </if>
             <if test="alarmType == 1">
-                AND effectiveUpWeight IS NOT NULL
-                AND deviation &lt;= (SELECT TO_NUMBER(BASE_NAME) / 1000 FROM com_base_info WHERE BASE_CODE = '001067001')
+                AND C.clean_up_weight IS NOT NULL
+                AND ABS(ROUND((A.meter_weight - C.clean_up_weight) / 1000, 2)) &lt;= (SELECT TO_NUMBER(BASE_NAME) / 1000 FROM com_base_info WHERE BASE_CODE = '001067001')
             </if>
         </if>
         <!-- 车号模糊查询 -->