dengyj 4 年 前
コミット
51ec5233cf
14 ファイル変更1215 行追加23 行削除
  1. 113 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayaiweight/controller/MeterBaseRailwayAiweightController.java
  2. 11 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayaiweight/mapper/MeterBaseRailwayAiweightMapper.java
  3. 524 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayaiweight/mapper/MeterBaseRailwayAiweightMapper.xml
  4. 289 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayaiweight/model/MeterBaseRailwayAiweight.java
  5. 25 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayaiweight/service/IMeterBaseRailwayAiweightService.java
  6. 70 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayaiweight/service/impl/MeterBaseRailwayAiweightServiceImpl.java
  7. 1 1
      src/main/java/com/steerinfo/meterwork/meterworkcaractual/mapper/MeterWorkCarActualMapper.xml
  8. 1 1
      src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/service/impl/MeterWorkCarActualFirstServiceImpl.java
  9. 18 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/controller/MeterWorkRailwayActFirstController.java
  10. 1 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/service/IMeterWorkRailwayActFirstService.java
  11. 118 21
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/service/impl/MeterWorkRailwayActFirstServiceImpl.java
  12. 18 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/controller/MeterWorkRailwayActualController.java
  13. 2 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/IMeterWorkRailwayActualService.java
  14. 24 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/impl/MeterWorkRailwayActualServiceImpl.java

+ 113 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayaiweight/controller/MeterBaseRailwayAiweightController.java

@@ -0,0 +1,113 @@
+package com.steerinfo.baseinfo.meterbaserailwayaiweight.controller;
+
+import com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight;
+import com.steerinfo.baseinfo.meterbaserailwayaiweight.service.IMeterBaseRailwayAiweightService;
+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.HashMap;
+import java.util.List;
+
+/**
+ * MeterBaseRailwayAiweight RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-05-18 09:54
+ * 类描述
+ * 修订历史:
+ * 日期:2022-05-18
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseRailwayAiweight RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/meterbaserailwayaiweights")
+public class MeterBaseRailwayAiweightController extends BaseRESTfulController {
+
+    @Autowired
+    IMeterBaseRailwayAiweightService meterBaseRailwayAiweightService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterbaserailwayaiweight:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterBaseRailwayAiweight> list = meterBaseRailwayAiweightService.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("meterbaserailwayaiweight:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterBaseRailwayAiweight> list = meterBaseRailwayAiweightService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据MeterBaseRailwayAiweight对象创建")
+    @ApiImplicitParam(name = "meterBaseRailwayAiweight", value = "详细实体meterBaseRailwayAiweight", required = true, dataType = "MeterBaseRailwayAiweight")
+    //@RequiresPermissions("meterbaserailwayaiweight:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute MeterBaseRailwayAiweight model){
+        MeterBaseRailwayAiweight meterBaseRailwayAiweight = meterBaseRailwayAiweightService.add(model);
+        return success(meterBaseRailwayAiweight);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbaserailwayaiweight:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        MeterBaseRailwayAiweight meterBaseRailwayAiweight = meterBaseRailwayAiweightService.getById(id);
+        return success(meterBaseRailwayAiweight);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的meterBaseRailwayAiweight信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "meterBaseRailwayAiweight", value = "详细实体meterBaseRailwayAiweight", required = true, dataType = "MeterBaseRailwayAiweight")
+    })
+    //@RequiresPermissions("meterbaserailwayaiweight:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody MeterBaseRailwayAiweight model){
+        model.setId(id);
+        MeterBaseRailwayAiweight meterBaseRailwayAiweight = meterBaseRailwayAiweightService.modify(model);
+        return success(meterBaseRailwayAiweight);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbaserailwayaiweight: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);
+			  meterBaseRailwayAiweightService.delete(ids);
+    	}
+      return success();
+    }
+
+    @ApiOperation(value="批量新增", notes="根据List<MeterBaseRailwayAiweight>对象批量创建")
+    @PostMapping(value = "/checkAdd")
+    public RESTfulResult checkAdd(@RequestBody List<MeterBaseRailwayAiweight> models){
+        RESTfulResult rm = meterBaseRailwayAiweightService.checkAdd(models);
+        return success(rm);
+    }
+}

+ 11 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayaiweight/mapper/MeterBaseRailwayAiweightMapper.java

@@ -0,0 +1,11 @@
+package com.steerinfo.baseinfo.meterbaserailwayaiweight.mapper;
+
+import com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import feign.Param;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface MeterBaseRailwayAiweightMapper extends IBaseMapper<MeterBaseRailwayAiweight, String> {
+    String getNewID(@Param(value="actualFirstNo") String actualFirstNo);
+}

+ 524 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayaiweight/mapper/MeterBaseRailwayAiweightMapper.xml

@@ -0,0 +1,524 @@
+<?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.meterbaserailwayaiweight.mapper.MeterBaseRailwayAiweightMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight">
+    <id column="ACTUAL_FIRST_NO" jdbcType="VARCHAR" property="actualFirstNo" />
+    <result column="RAILWAY_NO" jdbcType="VARCHAR" property="railwayNo" />
+    <result column="METER_WEIGHT" jdbcType="DECIMAL" property="meterWeight" />
+    <result column="RAILWAY_TYPE" jdbcType="VARCHAR" property="railwayType" />
+    <result column="RAILWAY_TYPE_NO" jdbcType="VARCHAR" property="railwayTypeNo" />
+    <result column="RAILWAY_TYPE_NAME" jdbcType="VARCHAR" property="railwayTypeName" />
+    <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
+    <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
+    <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
+    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo" />
+    <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="START_TIME" jdbcType="TIMESTAMP" property="startTime" />
+    <result column="END_TIME" jdbcType="TIMESTAMP" property="endTime" />
+    <result column="TERM_VALIDITY" jdbcType="DECIMAL" property="termValidity" />
+    <result column="RAILWAY_SPEED" jdbcType="DECIMAL" property="railwaySpeed" />
+  </resultMap>
+  <sql id="columns">
+    ACTUAL_FIRST_NO, RAILWAY_NO, METER_WEIGHT, RAILWAY_TYPE, RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, 
+    VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, 
+    UPDATE_TIME, START_TIME, END_TIME, TERM_VALIDITY, RAILWAY_SPEED
+  </sql>
+  <sql id="columns_alias">
+    t.ACTUAL_FIRST_NO, t.RAILWAY_NO, t.METER_WEIGHT, t.RAILWAY_TYPE, t.RAILWAY_TYPE_NO, 
+    t.RAILWAY_TYPE_NAME, t.VALUE_FLAG, t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, 
+    t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME, t.START_TIME, t.END_TIME, t.TERM_VALIDITY, 
+    t.RAILWAY_SPEED
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM METER_BASE_RAILWAY_AIWEIGHT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM METER_BASE_RAILWAY_AIWEIGHT t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="actualFirstNo != null and actualFirstNo != ''">
+        and ACTUAL_FIRST_NO = #{actualFirstNo}
+      </if>
+      <if test="railwayNo != null and railwayNo != ''">
+        and RAILWAY_NO = #{railwayNo}
+      </if>
+      <if test="meterWeight != null">
+        and METER_WEIGHT = #{meterWeight}
+      </if>
+      <if test="railwayType != null and railwayType != ''">
+        and RAILWAY_TYPE = #{railwayType}
+      </if>
+      <if test="railwayTypeNo != null and railwayTypeNo != ''">
+        and RAILWAY_TYPE_NO = #{railwayTypeNo}
+      </if>
+      <if test="railwayTypeName != null and railwayTypeName != ''">
+        and RAILWAY_TYPE_NAME = #{railwayTypeName}
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG = #{valueFlag}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        and CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        and UPDATE_MAN_NO = #{updateManNo}
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        and UPDATE_MAN_NAME = #{updateManName}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="startTime != null">
+        and TO_CHAR(START_TIME,'yyyy-MM-dd') = #{startTime}
+      </if>
+      <if test="endTime != null">
+        and TO_CHAR(END_TIME,'yyyy-MM-dd') = #{endTime}
+      </if>
+      <if test="termValidity != null">
+        and TERM_VALIDITY = #{termValidity}
+      </if>
+      <if test="railwaySpeed != null">
+        and RAILWAY_SPEED = #{railwaySpeed}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="actualFirstNo != null and actualFirstNo != ''">
+        and ACTUAL_FIRST_NO LIKE '%${actualFirstNo}%'
+      </if>
+      <if test="railwayNo != null and railwayNo != ''">
+        and RAILWAY_NO LIKE '%${railwayNo}%'
+      </if>
+      <if test="meterWeight != null">
+        and METER_WEIGHT = #{meterWeight}
+      </if>
+      <if test="railwayType != null and railwayType != ''">
+        and RAILWAY_TYPE LIKE '%${railwayType}%'
+      </if>
+      <if test="railwayTypeNo != null and railwayTypeNo != ''">
+        and RAILWAY_TYPE_NO LIKE '%${railwayTypeNo}%'
+      </if>
+      <if test="railwayTypeName != null and railwayTypeName != ''">
+        and RAILWAY_TYPE_NAME LIKE '%${railwayTypeName}%'
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG LIKE '%${valueFlag}%'
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and CREATE_MAN_NO LIKE '%${createManNo}%'
+      </if>
+      <if test="createManName != null and createManName != ''">
+        and CREATE_MAN_NAME LIKE '%${createManName}%'
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        and UPDATE_MAN_NO LIKE '%${updateManNo}%'
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        and UPDATE_MAN_NAME LIKE '%${updateManName}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="startTime != null">
+        and TO_CHAR(START_TIME,'yyyy-MM-dd') = #{startTime}
+      </if>
+      <if test="endTime != null">
+        and TO_CHAR(END_TIME,'yyyy-MM-dd') = #{endTime}
+      </if>
+      <if test="termValidity != null">
+        and TERM_VALIDITY = #{termValidity}
+      </if>
+      <if test="railwaySpeed != null">
+        and RAILWAY_SPEED = #{railwaySpeed}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from METER_BASE_RAILWAY_AIWEIGHT
+    where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from METER_BASE_RAILWAY_AIWEIGHT
+    where 1!=1 
+      <if test="railwayNo != null and railwayNo != ''">
+        or RAILWAY_NO = #{railwayNo}
+      </if>
+      <if test="meterWeight != null">
+        or METER_WEIGHT = #{meterWeight}
+      </if>
+      <if test="railwayType != null and railwayType != ''">
+        or RAILWAY_TYPE = #{railwayType}
+      </if>
+      <if test="railwayTypeNo != null and railwayTypeNo != ''">
+        or RAILWAY_TYPE_NO = #{railwayTypeNo}
+      </if>
+      <if test="railwayTypeName != null and railwayTypeName != ''">
+        or RAILWAY_TYPE_NAME = #{railwayTypeName}
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        or VALUE_FLAG = #{valueFlag}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        or CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        or CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        or UPDATE_MAN_NO = #{updateManNo}
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        or UPDATE_MAN_NAME = #{updateManName}
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      </if>
+      <if test="startTime != null">
+        or TO_CHAR(START_TIME,'yyyy-MM-dd') = '#{startTime}'
+      </if>
+      <if test="endTime != null">
+        or TO_CHAR(END_TIME,'yyyy-MM-dd') = '#{endTime}'
+      </if>
+      <if test="termValidity != null">
+        or TERM_VALIDITY = #{termValidity}
+      </if>
+      <if test="railwaySpeed != null">
+        or RAILWAY_SPEED = #{railwaySpeed}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight">
+    insert into METER_BASE_RAILWAY_AIWEIGHT (ACTUAL_FIRST_NO, RAILWAY_NO, METER_WEIGHT, 
+      RAILWAY_TYPE, RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, 
+      VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, 
+      CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, 
+      UPDATE_TIME, START_TIME, END_TIME, 
+      TERM_VALIDITY, RAILWAY_SPEED)
+    values (#{actualFirstNo,jdbcType=VARCHAR}, #{railwayNo,jdbcType=VARCHAR}, #{meterWeight,jdbcType=DECIMAL}, 
+      #{railwayType,jdbcType=VARCHAR}, #{railwayTypeNo,jdbcType=VARCHAR}, #{railwayTypeName,jdbcType=VARCHAR}, 
+      #{valueFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR}, #{updateManName,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, 
+      #{termValidity,jdbcType=DECIMAL}, #{railwaySpeed,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight">
+    insert into METER_BASE_RAILWAY_AIWEIGHT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="actualFirstNo != null">
+        ACTUAL_FIRST_NO,
+      </if>
+      <if test="railwayNo != null">
+        RAILWAY_NO,
+      </if>
+      <if test="meterWeight != null">
+        METER_WEIGHT,
+      </if>
+      <if test="railwayType != null">
+        RAILWAY_TYPE,
+      </if>
+      <if test="railwayTypeNo != null">
+        RAILWAY_TYPE_NO,
+      </if>
+      <if test="railwayTypeName != null">
+        RAILWAY_TYPE_NAME,
+      </if>
+      <if test="valueFlag != null">
+        VALUE_FLAG,
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO,
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME,
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME,
+      </if>
+      <if test="updateManNo != null">
+        UPDATE_MAN_NO,
+      </if>
+      <if test="updateManName != null">
+        UPDATE_MAN_NAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="startTime != null">
+        START_TIME,
+      </if>
+      <if test="endTime != null">
+        END_TIME,
+      </if>
+      <if test="termValidity != null">
+        TERM_VALIDITY,
+      </if>
+      <if test="railwaySpeed != null">
+        RAILWAY_SPEED,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="actualFirstNo != null">
+        #{actualFirstNo,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayNo != null">
+        #{railwayNo,jdbcType=VARCHAR},
+      </if>
+      <if test="meterWeight != null">
+        #{meterWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="railwayType != null">
+        #{railwayType,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayTypeNo != null">
+        #{railwayTypeNo,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayTypeName != null">
+        #{railwayTypeName,jdbcType=VARCHAR},
+      </if>
+      <if test="valueFlag != null">
+        #{valueFlag,jdbcType=VARCHAR},
+      </if>
+      <if test="createManNo != null">
+        #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateManNo != null">
+        #{updateManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="updateManName != null">
+        #{updateManName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="startTime != null">
+        #{startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="endTime != null">
+        #{endTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="termValidity != null">
+        #{termValidity,jdbcType=DECIMAL},
+      </if>
+      <if test="railwaySpeed != null">
+        #{railwaySpeed,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight">
+    update METER_BASE_RAILWAY_AIWEIGHT
+    set RAILWAY_NO = #{railwayNo,jdbcType=VARCHAR},
+      METER_WEIGHT = #{meterWeight,jdbcType=DECIMAL},
+      RAILWAY_TYPE = #{railwayType,jdbcType=VARCHAR},
+      RAILWAY_TYPE_NO = #{railwayTypeNo,jdbcType=VARCHAR},
+      RAILWAY_TYPE_NAME = #{railwayTypeName,jdbcType=VARCHAR},
+      VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
+      CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
+      UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      START_TIME = #{startTime,jdbcType=TIMESTAMP},
+      END_TIME = #{endTime,jdbcType=TIMESTAMP},
+      TERM_VALIDITY = #{termValidity,jdbcType=DECIMAL},
+      RAILWAY_SPEED = #{railwaySpeed,jdbcType=DECIMAL}
+    where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight">
+    update METER_BASE_RAILWAY_AIWEIGHT
+    <set>
+      <if test="railwayNo != null">
+        RAILWAY_NO = #{railwayNo,jdbcType=VARCHAR},
+      </if>
+      <if test="meterWeight != null">
+        METER_WEIGHT = #{meterWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="railwayType != null">
+        RAILWAY_TYPE = #{railwayType,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayTypeNo != null">
+        RAILWAY_TYPE_NO = #{railwayTypeNo,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayTypeName != null">
+        RAILWAY_TYPE_NAME = #{railwayTypeName,jdbcType=VARCHAR},
+      </if>
+      <if test="valueFlag != null">
+        VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateManNo != null">
+        UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="updateManName != null">
+        UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="startTime != null">
+        START_TIME = #{startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="endTime != null">
+        END_TIME = #{endTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="termValidity != null">
+        TERM_VALIDITY = #{termValidity,jdbcType=DECIMAL},
+      </if>
+      <if test="railwaySpeed != null">
+        RAILWAY_SPEED = #{railwaySpeed,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select" />
+    where ACTUAL_FIRST_NO = #{actualFirstNo,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 METER_BASE_RAILWAY_AIWEIGHT 
+      (ACTUAL_FIRST_NO, 
+      RAILWAY_NO, METER_WEIGHT, RAILWAY_TYPE, 
+      RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, 
+      VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, 
+      CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, 
+      UPDATE_TIME, START_TIME, END_TIME, 
+      TERM_VALIDITY, RAILWAY_SPEED)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.actualFirstNo,jdbcType=VARCHAR}, 
+      #{item.railwayNo,jdbcType=VARCHAR}, #{item.meterWeight,jdbcType=DECIMAL}, #{item.railwayType,jdbcType=VARCHAR}, 
+      #{item.railwayTypeNo,jdbcType=VARCHAR}, #{item.railwayTypeName,jdbcType=VARCHAR}, 
+      #{item.valueFlag,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR}, 
+      #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, 
+      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.startTime,jdbcType=TIMESTAMP}, #{item.endTime,jdbcType=TIMESTAMP}, 
+      #{item.termValidity,jdbcType=DECIMAL}, #{item.railwaySpeed,jdbcType=DECIMAL} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update METER_BASE_RAILWAY_AIWEIGHT
+     set
+       ACTUAL_FIRST_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.actualFirstNo,jdbcType=VARCHAR}
+       </foreach>
+       ,RAILWAY_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayNo,jdbcType=VARCHAR}
+       </foreach>
+       ,METER_WEIGHT=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,RAILWAY_TYPE=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayType,jdbcType=VARCHAR}
+       </foreach>
+       ,RAILWAY_TYPE_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayTypeNo,jdbcType=VARCHAR}
+       </foreach>
+       ,RAILWAY_TYPE_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayTypeName,jdbcType=VARCHAR}
+       </foreach>
+       ,VALUE_FLAG=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_MAN_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_MAN_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,START_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.startTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,END_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.endTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,TERM_VALIDITY=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.termValidity,jdbcType=DECIMAL}
+       </foreach>
+       ,RAILWAY_SPEED=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwaySpeed,jdbcType=DECIMAL}
+       </foreach>
+     where ACTUAL_FIRST_NO in 
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+    #{item.actualFirstNo,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from METER_BASE_RAILWAY_AIWEIGHT
+    where ACTUAL_FIRST_NO in 
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
+    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(actual_first_no, LENGTH(actual_first_no) - 3))),0) + 1,4,'0') actual_first_no
+    FROM meter_base_railway_aiweight where instr(actual_first_no,#{actualFirstNo, jdbcType=VARCHAR})>0
+  </select>
+</mapper>

+ 289 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayaiweight/model/MeterBaseRailwayAiweight.java

@@ -0,0 +1,289 @@
+package com.steerinfo.baseinfo.meterbaserailwayaiweight.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="AI标志皮重表")
+public class MeterBaseRailwayAiweight implements IBasePO<String> {
+    /**
+     * 主键编号(ACTUAL_FIRST_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="主键编号",required=true)
+    private String actualFirstNo;
+
+    /**
+     * 火车车厢号(RAILWAY_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="火车车厢号",required=false)
+    private String railwayNo;
+
+    /**
+     * 重量(METER_WEIGHT,DECIMAL,10)
+     */
+    @ApiModelProperty(value="重量",required=false)
+    private BigDecimal meterWeight;
+
+    /**
+     * 火车类型(RAILWAY_TYPE,VARCHAR,10)
+     */
+    @ApiModelProperty(value="火车类型",required=false)
+    private String railwayType;
+
+    /**
+     * 轨道衡类型编号(RAILWAY_TYPE_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="轨道衡类型编号",required=false)
+    private String railwayTypeNo;
+
+    /**
+     * 轨道衡类型名称(RAILWAY_TYPE_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="轨道衡类型名称",required=false)
+    private String railwayTypeName;
+
+    /**
+     * 状态(0:有效  1:无效)(VALUE_FLAG,VARCHAR,1)
+     */
+    @ApiModelProperty(value="状态(0:有效  1:无效)",required=false)
+    private String valueFlag;
+
+    /**
+     * 创建人编号(CREATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="创建人编号",required=false)
+    private String createManNo;
+
+    /**
+     * 创建人姓名(CREATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="创建人姓名",required=false)
+    private String createManName;
+
+    /**
+     * 创建时间(CREATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="创建时间",required=false)
+    private Date createTime;
+
+    /**
+     * 修改人编号(UPDATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="修改人编号",required=false)
+    private String updateManNo;
+
+    /**
+     * 修改人姓名(UPDATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="修改人姓名",required=false)
+    private String updateManName;
+
+    /**
+     * 修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 有效开始时间(START_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="有效开始时间",required=false)
+    private Date startTime;
+
+    /**
+     * 有效结束时间(END_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="有效结束时间",required=false)
+    private Date endTime;
+
+    /**
+     * 有效期(TERM_VALIDITY,DECIMAL,3)
+     */
+    @ApiModelProperty(value="有效期",required=false)
+    private Short termValidity;
+
+    /**
+     * 车速(RAILWAY_SPEED,DECIMAL,10)
+     */
+    @ApiModelProperty(value="车速",required=false)
+    private BigDecimal railwaySpeed;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.actualFirstNo;
+    }
+
+    @Override
+    public void setId(String actualFirstNo) {
+        this.actualFirstNo = actualFirstNo == null ? null : actualFirstNo.trim();
+    }
+
+    public String getActualFirstNo() {
+        return actualFirstNo;
+    }
+
+    public void setActualFirstNo(String actualFirstNo) {
+        this.actualFirstNo = actualFirstNo == null ? null : actualFirstNo.trim();
+    }
+
+    public String getRailwayNo() {
+        return railwayNo;
+    }
+
+    public void setRailwayNo(String railwayNo) {
+        this.railwayNo = railwayNo == null ? null : railwayNo.trim();
+    }
+
+    public BigDecimal getMeterWeight() {
+        return meterWeight;
+    }
+
+    public void setMeterWeight(BigDecimal meterWeight) {
+        this.meterWeight = meterWeight;
+    }
+
+    public String getRailwayType() {
+        return railwayType;
+    }
+
+    public void setRailwayType(String railwayType) {
+        this.railwayType = railwayType == null ? null : railwayType.trim();
+    }
+
+    public String getRailwayTypeNo() {
+        return railwayTypeNo;
+    }
+
+    public void setRailwayTypeNo(String railwayTypeNo) {
+        this.railwayTypeNo = railwayTypeNo == null ? null : railwayTypeNo.trim();
+    }
+
+    public String getRailwayTypeName() {
+        return railwayTypeName;
+    }
+
+    public void setRailwayTypeName(String railwayTypeName) {
+        this.railwayTypeName = railwayTypeName == null ? null : railwayTypeName.trim();
+    }
+
+    public String getValueFlag() {
+        return valueFlag;
+    }
+
+    public void setValueFlag(String valueFlag) {
+        this.valueFlag = valueFlag == null ? null : valueFlag.trim();
+    }
+
+    public String getCreateManNo() {
+        return createManNo;
+    }
+
+    public void setCreateManNo(String createManNo) {
+        this.createManNo = createManNo == null ? null : createManNo.trim();
+    }
+
+    public String getCreateManName() {
+        return createManName;
+    }
+
+    public void setCreateManName(String createManName) {
+        this.createManName = createManName == null ? null : createManName.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateManNo() {
+        return updateManNo;
+    }
+
+    public void setUpdateManNo(String updateManNo) {
+        this.updateManNo = updateManNo == null ? null : updateManNo.trim();
+    }
+
+    public String getUpdateManName() {
+        return updateManName;
+    }
+
+    public void setUpdateManName(String updateManName) {
+        this.updateManName = updateManName == null ? null : updateManName.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public Short getTermValidity() {
+        return termValidity;
+    }
+
+    public void setTermValidity(Short termValidity) {
+        this.termValidity = termValidity;
+    }
+
+    public BigDecimal getRailwaySpeed() {
+        return railwaySpeed;
+    }
+
+    public void setRailwaySpeed(BigDecimal railwaySpeed) {
+        this.railwaySpeed = railwaySpeed;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", actualFirstNo=").append(actualFirstNo);
+        sb.append(", railwayNo=").append(railwayNo);
+        sb.append(", meterWeight=").append(meterWeight);
+        sb.append(", railwayType=").append(railwayType);
+        sb.append(", railwayTypeNo=").append(railwayTypeNo);
+        sb.append(", railwayTypeName=").append(railwayTypeName);
+        sb.append(", valueFlag=").append(valueFlag);
+        sb.append(", createManNo=").append(createManNo);
+        sb.append(", createManName=").append(createManName);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateManNo=").append(updateManNo);
+        sb.append(", updateManName=").append(updateManName);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", startTime=").append(startTime);
+        sb.append(", endTime=").append(endTime);
+        sb.append(", termValidity=").append(termValidity);
+        sb.append(", railwaySpeed=").append(railwaySpeed);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 25 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayaiweight/service/IMeterBaseRailwayAiweightService.java

@@ -0,0 +1,25 @@
+package com.steerinfo.baseinfo.meterbaserailwayaiweight.service;
+
+import com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.util.List;
+
+/**
+ * MeterBaseRailwayAiweight服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-05-18 09:54
+ * 类描述
+ * 修订历史:
+ * 日期:2022-05-18
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseRailwayAiweight服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IMeterBaseRailwayAiweightService extends IBaseService<MeterBaseRailwayAiweight, String>{
+
+    RESTfulResult checkAdd(List<MeterBaseRailwayAiweight> models);
+}

+ 70 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayaiweight/service/impl/MeterBaseRailwayAiweightServiceImpl.java

@@ -0,0 +1,70 @@
+package com.steerinfo.baseinfo.meterbaserailwayaiweight.service.impl;
+
+import com.steerinfo.baseinfo.meterbaserailwayaiweight.mapper.MeterBaseRailwayAiweightMapper;
+import com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight;
+import com.steerinfo.baseinfo.meterbaserailwayaiweight.service.IMeterBaseRailwayAiweightService;
+import com.steerinfo.framework.controller.RESTfulResult;
+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;
+
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * MeterBaseRailwayAiweight服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-05-18 09:54
+ * 类描述
+ * 修订历史:
+ * 日期:2022-05-18
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseRailwayAiweight服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "meterBaseRailwayAiweightService")
+public class MeterBaseRailwayAiweightServiceImpl extends BaseServiceImpl<MeterBaseRailwayAiweight, String> implements IMeterBaseRailwayAiweightService {
+
+    @Resource
+    private MeterBaseRailwayAiweightMapper meterBaseRailwayAiweightMapper;
+
+    @Override
+    protected IBaseMapper<MeterBaseRailwayAiweight, String> getMapper() {
+        return meterBaseRailwayAiweightMapper;
+    }
+
+    @Override
+    public RESTfulResult checkAdd(List<MeterBaseRailwayAiweight> models) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+
+        try {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+            String afl = sdf.format(new Date());
+            for(MeterBaseRailwayAiweight model: models) {
+                String no = meterBaseRailwayAiweightMapper.getNewID(afl);
+                model.setActualFirstNo(sdf.format(new Date()) + no);
+                model.setValueFlag("0");
+                model.setRailwayTypeNo("001019002");
+                model.setRailwayTypeName("动态轨道衡");
+                model.setCreateManNo("admin");
+                model.setCreateManName("admins");
+                model.setCreateTime(new Date());
+                meterBaseRailwayAiweightMapper.insertSelective(model);
+            }
+            rm.setSucceed();
+            rm.setCode("200");
+            rm.setData(models);
+            rm.setMessage("操作成功!!");
+        }catch(Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作失败,请确认!!>>>" + e.getMessage());
+        }
+        return rm;
+    }
+}

+ 1 - 1
src/main/java/com/steerinfo/meterwork/meterworkcaractual/mapper/MeterWorkCarActualMapper.xml

@@ -3483,6 +3483,6 @@
     <include refid="select"/>
     <include refid="whereLike"/>
     and value_flag != '0'
-    order by actual_no desc
+    order by ACTUAL_NO desc
   </select>
 </mapper>

+ 1 - 1
src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/service/impl/MeterWorkCarActualFirstServiceImpl.java

@@ -4076,7 +4076,7 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
                 tareModel.setUpdateManName("期限皮洁净更新");
                 tareModel.setUpdateTime(new Date());
                 tareModel.setIsPreScale("1");
-                tareModel.setWeightType("2");
+                tareModel.setWeightType("1");
                 tareModel.setPredictionType("1");
                 meterWorkCarActualFirstMapper.updateByPrimaryKey(tareModel);
                 //将委托信息插入洁净数据

+ 18 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/controller/MeterWorkRailwayActFirstController.java

@@ -1073,4 +1073,22 @@ throw new MarkerMetException(500, "操作异常!!");
         }
     }
 
+    @ApiOperation(value = "批量修改静态衡列次编号", notes = "批量修改静态衡列次编号")
+    @PostMapping(value = "/batchUpdateLcNo")
+    public RESTfulResult batchUpdateLcNo(@RequestBody List<MeterWorkRailwayActFirst> models) {
+        RESTfulResult rm = failed();
+        try {
+            rm = meterWorkRailwayActFirstService.batchUpdateLcNo(models);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
 }

+ 1 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/service/IMeterWorkRailwayActFirstService.java

@@ -111,5 +111,6 @@ public interface IMeterWorkRailwayActFirstService extends IBaseService<MeterWork
     RESTfulResult doAddRailNetWf(List<MeterWorkRailwayMotorialReceived> grossModels, List<MeterWorkRailwayActFirst> tareModels);
 
     RESTfulResult selfServiceMeasurement(MeterWorkRailwayActFirst first);
+    RESTfulResult batchUpdateLcNo(List<MeterWorkRailwayActFirst> models);
 }
 

+ 118 - 21
src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/service/impl/MeterWorkRailwayActFirstServiceImpl.java

@@ -2,6 +2,7 @@ package com.steerinfo.meterwork.meterworkrailwayactfirst.service.impl;
 
 import com.google.inject.internal.cglib.proxy.$UndeclaredThrowableException;
 import com.steerinfo.baseinfo.meterbasematterinfo.mapper.MeterBaseMatterInfoMapper;
+import com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight;
 import com.steerinfo.baseinfo.meterbaserailwayhistaredata.mapper.MeterBaseRailwayHisTareDataMapper;
 import com.steerinfo.baseinfo.meterbaserailwayhistaredata.model.MeterBaseRailwayHisTareData;
 import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.mapper.MeterBaseRailwayHisTareDetailMapper;
@@ -3589,7 +3590,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
             netRail.setNetClass(two.getMeterClass());
             netRail.setNetGroup(two.getMeterGroup());
         }
-        //netRail.setNetWeight(one.getMeterBalanceWeight().subtract(two.getMeterBalanceWeight()));
+        netRail.setNetWeight(one.getMeterBalanceWeight().subtract(two.getMeterBalanceWeight()));
         netRail.setNetMode("1");
         netRail.setValueFlag("1");
         netRail.setUploadFlag("1");
@@ -3945,8 +3946,13 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     public RESTfulResult selfServiceMeasurement(MeterWorkRailwayActFirst first) {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
+
+        HashMap<String, Object> resultMap = new HashMap<>();
+        List<MeterWorkRailwayActFirst> firsts = new ArrayList<>();
+        List<MeterWorkRailwayActual> actuals = new ArrayList<>();
+
         try {
-            /*SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
             String afl = sdf.format(new Date());
             //报警信息
             MeterWorkRailwayScheduledHelp railwayHelp = new MeterWorkRailwayScheduledHelp();
@@ -3956,43 +3962,110 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
             railwayHelp.setBaseSpotName(first.getBaseSpotName());
 
             //查询车号是否为空,为空写入报警信息表
-            if(StringUtils.isEmpty(first.getRailwayNo())) {
-                railwayHelp.setHelpContent("车号为空,请联系处理");
-                meterWorkRailwayScheduledHelpService.checkAdd(railwayHelp);
-                rm.setMessage("车号为空,请确认!!");
-                return rm;
-            }else {
+            if (StringUtils.isEmpty(first.getRailwayNo())) {
+                first.setActualFirstNo(afl + meterWorkRailwayActFirstMapper.getNewID(afl));
+                first.setRailwayNo("无车号");
+                int i = meterWorkRailwayActFirstMapper.insertSelective(first);
+                if (i >= 1) {
+                    firsts.add(first);
+                    railwayHelp.setHelpContent("车号为空,请联系处理");
+                    meterWorkRailwayScheduledHelpService.checkAdd(railwayHelp);
+                    rm.setSucceed();
+                    rm.setMessage("车号为空,请联系处理");
+                    resultMap.put("firsts", firsts);
+                    resultMap.put("acutals", null);
+                    rm.setData(resultMap);
+                    return rm;
+                }
+            } else {
                 //查询根据车号查询有效的一次数据
                 HashMap<String, Object> map = new HashMap<>();
                 map.put("railwayNo", railwayNo);
                 map.put("valueFlag", "1");
                 List<MeterWorkRailwayActFirst> firstList = meterWorkRailwayActFirstMapper.selectByParameters(map);
-                if(firstList.size() >= 1) {
-                    if(acutal.)
-                    for (MeterWorkRailwayActFirst actFirst: firstList) {
+                if (firstList.size() >= 1) {
+                    if (firstList.size() == 1) {
+                        first.setActualFirstNo(afl + meterWorkRailwayActFirstMapper.getNewID(afl));
+                        meterWorkRailwayActFirstMapper.insertSelective(first);
+                        BigDecimal num = firstList.get(0).getMeterWeight().subtract(first.getMeterWeight()).abs();
+                        //洁净数据不能小于400
+                        if(num.compareTo(BigDecimal.valueOf(400)) == -1){
+                            first.setActualFirstNo(afl + meterWorkRailwayActFirstMapper.getNewID(afl));
+                            int i = meterWorkRailwayActFirstMapper.insertSelective(first);
+                            if (i >= 1) {
+                                railwayHelp.setHelpContent("计量完成,车号" + first.getRailwayNo() + "存在重量相近的一次记录,无法自动结净匹配");
+                                meterWorkRailwayScheduledHelpService.checkAdd(railwayHelp);
+                                rm.setSucceed();
+                                rm.setMessage("计量完成,车号" + first.getRailwayNo() + "存在重量相近的一次记录,无法自动结净匹配");
+                                resultMap.put("firsts", firsts);
+                                resultMap.put("actuals", null);
+                                rm.setData(resultMap);
+                                return rm;
+                            }
+                        }
+                        String Content;
+                        HashMap<String, Object> obj = new HashMap<>();
+                        if(first.getMeterWeight().compareTo(firstList.get(0).getMeterWeight()) == -1) {
+                            Content = matchPreClean(firstList.get(0), first);
+                            obj.put("actualFirst2No", first.getActualFirstNo());
+                        }else {
+                            Content = matchPreClean(first, firstList.get(0));
+                            obj.put("acutalFirst1No", first.getActualFirstNo());
+                        }
+                        railwayHelp.setHelpContent(Content);
+                        meterWorkRailwayScheduledHelpService.checkAdd(railwayHelp);
+                        rm.setSucceed();
+                        rm.setMessage(Content);
 
+                        List<MeterWorkRailwayActual> models = meterWorkRailwayActualMapper.selectByParameter(obj);
+                        if(models.size() >= 1) {
+                            actuals.add(models.get(0));
+                        }else {
+                            actuals.add(null);
+                        }
+                        resultMap.put("firsts", firsts);
+                        resultMap.put("actuals", actuals);
+                        rm.setData(resultMap);
+                        return rm;
+                    } else if (firstList.size() >= 2) {
+                        first.setActualFirstNo(afl + meterWorkRailwayActFirstMapper.getNewID(afl));
+                        int i = meterWorkRailwayActFirstMapper.insertSelective(first);
+                        if (i >= 1) {
+                            firsts.add(first);
+                            railwayHelp.setHelpContent("计量完成,车号" + first.getRailwayNo() + "存在多个委托,无法自动匹配");
+                            meterWorkRailwayScheduledHelpService.checkAdd(railwayHelp);
+                            rm.setSucceed();
+                            rm.setMessage("存在多个委托,无法自动匹配委托,自动保存一次数据成功!!");
+                            resultMap.put("firsts", firsts);
+                            resultMap.put("actuals", null);
+                            rm.setData(resultMap);
+                            return rm;
+                        }
                     }
-                }else {
+                } else {
                     first.setActualFirstNo(afl + meterWorkRailwayActFirstMapper.getNewID(afl));
                     int i = meterWorkRailwayActFirstMapper.insertSelective(first);
-                    if(i >= 1) {
-                        railwayHelp.setHelpContent("计量完成,车号京A00000无委托洁净");
+                    if (i >= 1) {
+                        firsts.add(first);
+                        railwayHelp.setHelpContent("计量完成,车号" + first.getRailwayNo() + "存在多条一次记录,无法自动匹配结净");
                         meterWorkRailwayScheduledHelpService.checkAdd(railwayHelp);
                         rm.setSucceed();
-                        rm.setMessage("自动保存一次数据成功!!");
-                        rm.setData(first);
+                        rm.setMessage("存在多条一次记录,无法自动匹配结净,自动保存一次数据成功!!");
+                        resultMap.put("firsts", firsts);
+                        resultMap.put("actuals", null);
+                        rm.setData(resultMap);
                         return rm;
                     }
                 }
-            }*/
-
-        }catch(Exception e) {
+            }
+        } catch (Exception e) {
             e.printStackTrace();
-            rm.setMessage("操作成功!!" + e.getMessage());
+            rm.setMessage("操作异常!!>>>" + e.getMessage());
         }
         return rm;
     }
 
+
     public String matchPreClean(MeterWorkRailwayActFirst grossModel, MeterWorkRailwayActFirst tareModel){
         SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
         String sfl = sdf.format(new Date());
@@ -4058,6 +4131,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
                 actualRow.setPredictionType("1");
                 actualRow.setNetWeight(grossModel.getMeterWeight().subtract(tareModel.getMeterWeight()));
                 meterWorkRailwayActualMapper.insertSelective(actualRow);
+                return "计量完成," + grossModel.getRailwayNo() + "与委托编号" + scale.getPredictionNo() +"计量结净";
             }else {
                 return grossModel.getRailwayNo() + "车号在委托信息表含有多条有效委托信息,不允许匹配委托洁净,请确认!!";
             }
@@ -4099,7 +4173,30 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
             meterWorkRailwayActualMapper.insertSelective(actualRow);
             return "计量完成,车号"+ grossModel.getRailwayNo() +"无委托洁净";
         }
-        return "";
+    }
+
+    @Override
+    public RESTfulResult batchUpdateLcNo(List<MeterWorkRailwayActFirst> models) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+        try {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddhhmmss");
+            String lcNo = sdf.format(new Date());
+            int count = 0;
+            for(MeterWorkRailwayActFirst model: models) {
+                model.setLcNo(lcNo);
+                meterWorkRailwayActFirstMapper.updateByPrimaryKeySelective(model);
+                count++;
+            }
+            rm.setSucceed();
+            rm.setCode("200");
+            rm.setData(count);
+            rm.setMessage("操作成功,总共"+ count +"条数据修改列次编号成功!!");
+        }catch(Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常!!>>>" + e.getMessage());
+        }
+        return rm;
     }
 
     public static void main(String[] args) {

+ 18 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/controller/MeterWorkRailwayActualController.java

@@ -797,4 +797,22 @@ public class MeterWorkRailwayActualController extends BaseRESTfulController {
         }
         return rm;
     }
+
+    @ApiOperation(value = "批量修改静态衡列次编号", notes = "批量修改静态衡列次编号")
+    @PostMapping(value = "/batchUpdateLcNo")
+    public RESTfulResult batchUpdateLcNo(@RequestBody List<MeterWorkRailwayActual> models) {
+        RESTfulResult rm = failed();
+        try {
+            rm = meterWorkRailwayActualService.batchUpdateLcNo(models);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
 }

+ 2 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/IMeterWorkRailwayActualService.java

@@ -87,4 +87,6 @@ public interface IMeterWorkRailwayActualService extends IBaseService<MeterWorkRa
     RESTfulResult specialRemove(HashMap map);
 
     PageList<MeterWorkRailwayActual> likeByDesc(Map<String, Object> parameters, Integer pageNum, Integer pageSize);
+
+    RESTfulResult batchUpdateLcNo(List<MeterWorkRailwayActual> models);
 }

+ 24 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/impl/MeterWorkRailwayActualServiceImpl.java

@@ -2019,4 +2019,28 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
         PageList pageInfo = new PageList(rows);
         return pageInfo;
     }
+
+    @Override
+    public RESTfulResult batchUpdateLcNo(List<MeterWorkRailwayActual> models) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+        try {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddhhmmss");
+            String lcNo = sdf.format(new Date());
+            int count = 0;
+            for(MeterWorkRailwayActual model: models) {
+                model.setLcNo(lcNo);
+                meterWorkRailwayActualMapper.updateByPrimaryKeySelective(model);
+                count++;
+            }
+            rm.setSucceed();
+            rm.setCode("200");
+            rm.setData(count);
+            rm.setMessage("操作成功,总共"+ count +"条数据修改列次编号成功!!");
+        }catch(Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常!!>>>" + e.getMessage());
+        }
+        return rm;
+    }
 }