Browse Source

Merge branch 'master' of https://git.steerinfo.com/caol/jg_wzjl_api.git

duyong 4 năm trước cách đây
mục cha
commit
2f8718544a

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

@@ -3405,7 +3405,7 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             //判断双委托 物料相同、A委托的收货单位是B委托的发货单位 或者 B委托的收货单位是A委托的发货单位
             if(!(pts01.getMatterNo().equals(pts02.getMatterNo()) &&
                     (pts01.getReceivingUintNo().equals(pts02.getForwardingUnitNo()) ||
-                            pts02.getForwardingUnitNo().equals(pts01.getReceivingUintNo())))) {
+                            pts01.getForwardingUnitNo().equals(pts02.getReceivingUintNo())))) {
                 rm.setMessage("委托信息不符合双委托规则,请确认!!");
                 return rm;
             }

+ 166 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayscheduledhelp/controller/MeterWorkRailwayScheduledHelpController.java

@@ -0,0 +1,166 @@
+package com.steerinfo.meterwork.meterworkrailwayscheduledhelp.controller;
+
+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 com.steerinfo.meterwork.meterworkrailwayscheduledhelp.model.MeterWorkRailwayScheduledHelp;
+import com.steerinfo.meterwork.meterworkrailwayscheduledhelp.service.IMeterWorkRailwayScheduledHelpService;
+import com.steerinfo.util.StringUtils;
+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;
+
+/**
+ * MeterWorkRailwayScheduledHelp RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-05-15 11:24
+ * 类描述
+ * 修订历史:
+ * 日期:2022-05-15
+ * 作者:generator
+ * 参考:
+ * 描述:MeterWorkRailwayScheduledHelp RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/meterworkrailwayscheduledhelps")
+public class MeterWorkRailwayScheduledHelpController extends BaseRESTfulController {
+
+    @Autowired
+    IMeterWorkRailwayScheduledHelpService meterWorkRailwayScheduledHelpService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterworkrailwayscheduledhelp:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterWorkRailwayScheduledHelp> list = meterWorkRailwayScheduledHelpService.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("meterworkrailwayscheduledhelp:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterWorkRailwayScheduledHelp> list = meterWorkRailwayScheduledHelpService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据MeterWorkRailwayScheduledHelp对象创建")
+    @ApiImplicitParam(name = "meterWorkRailwayScheduledHelp", value = "详细实体meterWorkRailwayScheduledHelp", required = true, dataType = "MeterWorkRailwayScheduledHelp")
+    //@RequiresPermissions("meterworkrailwayscheduledhelp:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute MeterWorkRailwayScheduledHelp model){
+        MeterWorkRailwayScheduledHelp meterWorkRailwayScheduledHelp = meterWorkRailwayScheduledHelpService.add(model);
+        return success(meterWorkRailwayScheduledHelp);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterworkrailwayscheduledhelp:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        MeterWorkRailwayScheduledHelp meterWorkRailwayScheduledHelp = meterWorkRailwayScheduledHelpService.getById(id);
+        return success(meterWorkRailwayScheduledHelp);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的meterWorkRailwayScheduledHelp信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "meterWorkRailwayScheduledHelp", value = "详细实体meterWorkRailwayScheduledHelp", required = true, dataType = "MeterWorkRailwayScheduledHelp")
+    })
+    //@RequiresPermissions("meterworkrailwayscheduledhelp:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody MeterWorkRailwayScheduledHelp model){
+        model.setId(id);
+        MeterWorkRailwayScheduledHelp meterWorkRailwayScheduledHelp = meterWorkRailwayScheduledHelpService.modify(model);
+        return success(meterWorkRailwayScheduledHelp);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterworkrailwayscheduledhelp: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);
+			  meterWorkRailwayScheduledHelpService.delete(ids);
+    	}
+      return success();
+    }
+
+    @ApiOperation(value = "智能终端报警信息", notes = "智能终端报警信息")
+    @PostMapping(value = "/scheduledHelp")
+    public RESTfulResult scheduledHelp(@RequestBody HashMap<String, Object> param) {
+        RESTfulResult rm = failed();
+        String carNo = param.get("carNo") == null ? "":param.get("carNo").toString();
+        String baseSpotNo = param.get("baseSpotNo") == null ? "" : param.get("baseSpotNo").toString();
+        String baseSpotName = param.get("baseSpotName") == null ? "" : param.get("baseSpotName").toString();
+        String helpContent = param.get("helpContent") == null ? "" : param.get("helpContent").toString();
+        try{
+            if(com.steerinfo.util.StringUtils.isEmpty(carNo)){
+                rm.setMessage("车号不能为空,请确认!!");
+                return rm;
+            }else if(com.steerinfo.util.StringUtils.isEmpty(baseSpotNo)){
+                rm.setMessage("计量站点编号不能为空,请确认!!");
+                return rm;
+            }else if(com.steerinfo.util.StringUtils.isEmpty(baseSpotName)){
+                rm.setMessage("计量站点名称不能为空,请确认!!");
+                return rm;
+            }else if(StringUtils.isEmpty(helpContent)) {
+                rm.setMessage("报警信息不能为空,请确认!!");
+                return rm;
+            }else {
+                rm = meterWorkRailwayScheduledHelpService.scheduledHelp(carNo, baseSpotNo, baseSpotName, helpContent);
+            }
+        }catch(Exception e){
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!!");
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "智能终端报警信息确认按钮", notes = "智能终端报警信息确认按钮")
+    @PostMapping(value = "/scheduledHelpConfirm")
+    public RESTfulResult scheduledHelpConfirm(@RequestBody HashMap params) {
+        RESTfulResult rm = failed();
+        String id = params.get("helpId") == null ? "": params.get("helpId").toString();
+        String createNo = params.get("createNo") == null ? "" : params.get("createNo").toString();
+        String createName = params.get("createName") == null ? "" : params.get("createName").toString();
+        String result = params.get("result") == null ? "" : params.get("result").toString();
+        try{
+            if(com.steerinfo.util.StringUtils.isEmpty(id)){
+                rm.setMessage("远程求助ID不能为空!!");
+                return rm;
+            }else if(com.steerinfo.util.StringUtils.isEmpty(createNo)){
+                rm.setMessage("处理人编号不能为空!!");
+                return rm;
+            }else if(com.steerinfo.util.StringUtils.isEmpty(createName)){
+                rm.setMessage("处理人名称不能为空!!");
+                return rm;
+            }else{
+                rm = meterWorkRailwayScheduledHelpService.scheduledHelpConfirm(id, createNo, createName, result);
+            }
+        }catch(Exception e){
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!!");
+        }
+        return rm;
+    }
+}

+ 11 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayscheduledhelp/mapper/MeterWorkRailwayScheduledHelpMapper.java

@@ -0,0 +1,11 @@
+package com.steerinfo.meterwork.meterworkrailwayscheduledhelp.mapper;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.meterwork.meterworkrailwayscheduledhelp.model.MeterWorkRailwayScheduledHelp;
+import feign.Param;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface MeterWorkRailwayScheduledHelpMapper extends IBaseMapper<MeterWorkRailwayScheduledHelp, String> {
+    String getNewID(@Param(value = "afl") String afl);
+}

+ 446 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayscheduledhelp/mapper/MeterWorkRailwayScheduledHelpMapper.xml

@@ -0,0 +1,446 @@
+<?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.meterwork.meterworkrailwayscheduledhelp.mapper.MeterWorkRailwayScheduledHelpMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.meterwork.meterworkrailwayscheduledhelp.model.MeterWorkRailwayScheduledHelp">
+    <id column="HELP_ID" jdbcType="VARCHAR" property="helpId" />
+    <result column="RAILWAY_NO" jdbcType="VARCHAR" property="railwayNo" />
+    <result column="HELP_CONTENT" jdbcType="VARCHAR" property="helpContent" />
+    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="END_TIME" jdbcType="TIMESTAMP" property="endTime" />
+    <result column="CREATE_NO" jdbcType="VARCHAR" property="createNo" />
+    <result column="CREATE_NAME" jdbcType="VARCHAR" property="createName" />
+    <result column="RESULT" jdbcType="VARCHAR" property="result" />
+    <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
+    <result column="BASE_SPOT_NO" jdbcType="VARCHAR" property="baseSpotNo" />
+    <result column="BASE_SPOT_NAME" jdbcType="VARCHAR" property="baseSpotName" />
+    <result column="MEASURE_TASK_NUM" jdbcType="VARCHAR" property="measureTaskNum" />
+    <result column="WARM_TYPE" jdbcType="VARCHAR" property="warmType" />
+    <result column="WARM_TYPE_NAME" jdbcType="VARCHAR" property="warmTypeName" />
+  </resultMap>
+  <sql id="columns">
+    HELP_ID, RAILWAY_NO, HELP_CONTENT, CREATE_TIME, END_TIME, CREATE_NO, CREATE_NAME, 
+    RESULT, VALUE_FLAG, BASE_SPOT_NO, BASE_SPOT_NAME, MEASURE_TASK_NUM, WARM_TYPE, WARM_TYPE_NAME
+  </sql>
+  <sql id="columns_alias">
+    t.HELP_ID, t.RAILWAY_NO, t.HELP_CONTENT, t.CREATE_TIME, t.END_TIME, t.CREATE_NO, 
+    t.CREATE_NAME, t.RESULT, t.VALUE_FLAG, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.MEASURE_TASK_NUM, 
+    t.WARM_TYPE, t.WARM_TYPE_NAME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM METER_WORK_RAILWAY_SCHEDULED_HELP
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM METER_WORK_RAILWAY_SCHEDULED_HELP t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="helpId != null and helpId != ''">
+        and HELP_ID = #{helpId}
+      </if>
+      <if test="railwayNo != null and railwayNo != ''">
+        and RAILWAY_NO = #{railwayNo}
+      </if>
+      <if test="helpContent != null and helpContent != ''">
+        and HELP_CONTENT = #{helpContent}
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="endTime != null">
+        and TO_CHAR(END_TIME,'yyyy-MM-dd') = #{endTime}
+      </if>
+      <if test="createNo != null and createNo != ''">
+        and CREATE_NO = #{createNo}
+      </if>
+      <if test="createName != null and createName != ''">
+        and CREATE_NAME = #{createName}
+      </if>
+      <if test="result != null and result != ''">
+        and RESULT = #{result}
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG = #{valueFlag}
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        and BASE_SPOT_NO = #{baseSpotNo}
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        and BASE_SPOT_NAME = #{baseSpotName}
+      </if>
+      <if test="measureTaskNum != null and measureTaskNum != ''">
+        and MEASURE_TASK_NUM = #{measureTaskNum}
+      </if>
+      <if test="warmType != null and warmType != ''">
+        and WARM_TYPE = #{warmType}
+      </if>
+      <if test="warmTypeName != null and warmTypeName != ''">
+        and WARM_TYPE_NAME = #{warmTypeName}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="helpId != null and helpId != ''">
+        and HELP_ID LIKE '%${helpId}%'
+      </if>
+      <if test="railwayNo != null and railwayNo != ''">
+        and RAILWAY_NO LIKE '%${railwayNo}%'
+      </if>
+      <if test="helpContent != null and helpContent != ''">
+        and HELP_CONTENT LIKE '%${helpContent}%'
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="endTime != null">
+        and TO_CHAR(END_TIME,'yyyy-MM-dd') = #{endTime}
+      </if>
+      <if test="createNo != null and createNo != ''">
+        and CREATE_NO LIKE '%${createNo}%'
+      </if>
+      <if test="createName != null and createName != ''">
+        and CREATE_NAME LIKE '%${createName}%'
+      </if>
+      <if test="result != null and result != ''">
+        and RESULT LIKE '%${result}%'
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG LIKE '%${valueFlag}%'
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        and BASE_SPOT_NO LIKE '%${baseSpotNo}%'
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        and BASE_SPOT_NAME LIKE '%${baseSpotName}%'
+      </if>
+      <if test="measureTaskNum != null and measureTaskNum != ''">
+        and MEASURE_TASK_NUM LIKE '%${measureTaskNum}%'
+      </if>
+      <if test="warmType != null and warmType != ''">
+        and WARM_TYPE LIKE '%${warmType}%'
+      </if>
+      <if test="warmTypeName != null and warmTypeName != ''">
+        and WARM_TYPE_NAME LIKE '%${warmTypeName}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from METER_WORK_RAILWAY_SCHEDULED_HELP
+    where HELP_ID = #{helpId,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from METER_WORK_RAILWAY_SCHEDULED_HELP
+    where 1!=1 
+      <if test="railwayNo != null and railwayNo != ''">
+        or RAILWAY_NO = #{railwayNo}
+      </if>
+      <if test="helpContent != null and helpContent != ''">
+        or HELP_CONTENT = #{helpContent}
+      </if>
+      <if test="createTime != null">
+        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
+      </if>
+      <if test="endTime != null">
+        or TO_CHAR(END_TIME,'yyyy-MM-dd') = '#{endTime}'
+      </if>
+      <if test="createNo != null and createNo != ''">
+        or CREATE_NO = #{createNo}
+      </if>
+      <if test="createName != null and createName != ''">
+        or CREATE_NAME = #{createName}
+      </if>
+      <if test="result != null and result != ''">
+        or RESULT = #{result}
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        or VALUE_FLAG = #{valueFlag}
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        or BASE_SPOT_NO = #{baseSpotNo}
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        or BASE_SPOT_NAME = #{baseSpotName}
+      </if>
+      <if test="measureTaskNum != null and measureTaskNum != ''">
+        or MEASURE_TASK_NUM = #{measureTaskNum}
+      </if>
+      <if test="warmType != null and warmType != ''">
+        or WARM_TYPE = #{warmType}
+      </if>
+      <if test="warmTypeName != null and warmTypeName != ''">
+        or WARM_TYPE_NAME = #{warmTypeName}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.meterwork.meterworkrailwayscheduledhelp.model.MeterWorkRailwayScheduledHelp">
+    insert into METER_WORK_RAILWAY_SCHEDULED_HELP (HELP_ID, RAILWAY_NO, HELP_CONTENT, 
+      CREATE_TIME, END_TIME, CREATE_NO, 
+      CREATE_NAME, RESULT, VALUE_FLAG, 
+      BASE_SPOT_NO, BASE_SPOT_NAME, MEASURE_TASK_NUM, 
+      WARM_TYPE, WARM_TYPE_NAME)
+    values (#{helpId,jdbcType=VARCHAR}, #{railwayNo,jdbcType=VARCHAR}, #{helpContent,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{createNo,jdbcType=VARCHAR}, 
+      #{createName,jdbcType=VARCHAR}, #{result,jdbcType=VARCHAR}, #{valueFlag,jdbcType=VARCHAR}, 
+      #{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR}, #{measureTaskNum,jdbcType=VARCHAR}, 
+      #{warmType,jdbcType=VARCHAR}, #{warmTypeName,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkrailwayscheduledhelp.model.MeterWorkRailwayScheduledHelp">
+    insert into METER_WORK_RAILWAY_SCHEDULED_HELP
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="helpId != null">
+        HELP_ID,
+      </if>
+      <if test="railwayNo != null">
+        RAILWAY_NO,
+      </if>
+      <if test="helpContent != null">
+        HELP_CONTENT,
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME,
+      </if>
+      <if test="endTime != null">
+        END_TIME,
+      </if>
+      <if test="createNo != null">
+        CREATE_NO,
+      </if>
+      <if test="createName != null">
+        CREATE_NAME,
+      </if>
+      <if test="result != null">
+        RESULT,
+      </if>
+      <if test="valueFlag != null">
+        VALUE_FLAG,
+      </if>
+      <if test="baseSpotNo != null">
+        BASE_SPOT_NO,
+      </if>
+      <if test="baseSpotName != null">
+        BASE_SPOT_NAME,
+      </if>
+      <if test="measureTaskNum != null">
+        MEASURE_TASK_NUM,
+      </if>
+      <if test="warmType != null">
+        WARM_TYPE,
+      </if>
+      <if test="warmTypeName != null">
+        WARM_TYPE_NAME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="helpId != null">
+        #{helpId,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayNo != null">
+        #{railwayNo,jdbcType=VARCHAR},
+      </if>
+      <if test="helpContent != null">
+        #{helpContent,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="endTime != null">
+        #{endTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createNo != null">
+        #{createNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createName != null">
+        #{createName,jdbcType=VARCHAR},
+      </if>
+      <if test="result != null">
+        #{result,jdbcType=VARCHAR},
+      </if>
+      <if test="valueFlag != null">
+        #{valueFlag,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotNo != null">
+        #{baseSpotNo,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotName != null">
+        #{baseSpotName,jdbcType=VARCHAR},
+      </if>
+      <if test="measureTaskNum != null">
+        #{measureTaskNum,jdbcType=VARCHAR},
+      </if>
+      <if test="warmType != null">
+        #{warmType,jdbcType=VARCHAR},
+      </if>
+      <if test="warmTypeName != null">
+        #{warmTypeName,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.meterwork.meterworkrailwayscheduledhelp.model.MeterWorkRailwayScheduledHelp">
+    update METER_WORK_RAILWAY_SCHEDULED_HELP
+    set RAILWAY_NO = #{railwayNo,jdbcType=VARCHAR},
+      HELP_CONTENT = #{helpContent,jdbcType=VARCHAR},
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      END_TIME = #{endTime,jdbcType=TIMESTAMP},
+      CREATE_NO = #{createNo,jdbcType=VARCHAR},
+      CREATE_NAME = #{createName,jdbcType=VARCHAR},
+      RESULT = #{result,jdbcType=VARCHAR},
+      VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
+      BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
+      BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
+      MEASURE_TASK_NUM = #{measureTaskNum,jdbcType=VARCHAR},
+      WARM_TYPE = #{warmType,jdbcType=VARCHAR},
+      WARM_TYPE_NAME = #{warmTypeName,jdbcType=VARCHAR}
+    where HELP_ID = #{helpId,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkrailwayscheduledhelp.model.MeterWorkRailwayScheduledHelp">
+    update METER_WORK_RAILWAY_SCHEDULED_HELP
+    <set>
+      <if test="railwayNo != null">
+        RAILWAY_NO = #{railwayNo,jdbcType=VARCHAR},
+      </if>
+      <if test="helpContent != null">
+        HELP_CONTENT = #{helpContent,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="endTime != null">
+        END_TIME = #{endTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createNo != null">
+        CREATE_NO = #{createNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createName != null">
+        CREATE_NAME = #{createName,jdbcType=VARCHAR},
+      </if>
+      <if test="result != null">
+        RESULT = #{result,jdbcType=VARCHAR},
+      </if>
+      <if test="valueFlag != null">
+        VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotNo != null">
+        BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotName != null">
+        BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
+      </if>
+      <if test="measureTaskNum != null">
+        MEASURE_TASK_NUM = #{measureTaskNum,jdbcType=VARCHAR},
+      </if>
+      <if test="warmType != null">
+        WARM_TYPE = #{warmType,jdbcType=VARCHAR},
+      </if>
+      <if test="warmTypeName != null">
+        WARM_TYPE_NAME = #{warmTypeName,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where HELP_ID = #{helpId,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where HELP_ID = #{helpId,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_WORK_RAILWAY_SCHEDULED_HELP 
+      (HELP_ID, 
+      RAILWAY_NO, HELP_CONTENT, CREATE_TIME, 
+      END_TIME, CREATE_NO, CREATE_NAME, 
+      RESULT, VALUE_FLAG, BASE_SPOT_NO, 
+      BASE_SPOT_NAME, MEASURE_TASK_NUM, 
+      WARM_TYPE, WARM_TYPE_NAME)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.helpId,jdbcType=VARCHAR}, 
+      #{item.railwayNo,jdbcType=VARCHAR}, #{item.helpContent,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, 
+      #{item.endTime,jdbcType=TIMESTAMP}, #{item.createNo,jdbcType=VARCHAR}, #{item.createName,jdbcType=VARCHAR}, 
+      #{item.result,jdbcType=VARCHAR}, #{item.valueFlag,jdbcType=VARCHAR}, #{item.baseSpotNo,jdbcType=VARCHAR}, 
+      #{item.baseSpotName,jdbcType=VARCHAR}, #{item.measureTaskNum,jdbcType=VARCHAR}, 
+      #{item.warmType,jdbcType=VARCHAR}, #{item.warmTypeName,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update METER_WORK_RAILWAY_SCHEDULED_HELP
+     set
+       HELP_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case HELP_ID" close="end">
+          when #{item.helpId,jdbcType=VARCHAR} then #{item.helpId,jdbcType=VARCHAR}
+       </foreach>
+       ,RAILWAY_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case HELP_ID" close="end">
+          when #{item.helpId,jdbcType=VARCHAR} then #{item.railwayNo,jdbcType=VARCHAR}
+       </foreach>
+       ,HELP_CONTENT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case HELP_ID" close="end">
+          when #{item.helpId,jdbcType=VARCHAR} then #{item.helpContent,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case HELP_ID" close="end">
+          when #{item.helpId,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,END_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case HELP_ID" close="end">
+          when #{item.helpId,jdbcType=VARCHAR} then #{item.endTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,CREATE_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case HELP_ID" close="end">
+          when #{item.helpId,jdbcType=VARCHAR} then #{item.createNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case HELP_ID" close="end">
+          when #{item.helpId,jdbcType=VARCHAR} then #{item.createName,jdbcType=VARCHAR}
+       </foreach>
+       ,RESULT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case HELP_ID" close="end">
+          when #{item.helpId,jdbcType=VARCHAR} then #{item.result,jdbcType=VARCHAR}
+       </foreach>
+       ,VALUE_FLAG=
+       <foreach collection="list" item="item" index="index" separator=" " open="case HELP_ID" close="end">
+          when #{item.helpId,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
+       </foreach>
+       ,BASE_SPOT_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case HELP_ID" close="end">
+          when #{item.helpId,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
+       </foreach>
+       ,BASE_SPOT_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case HELP_ID" close="end">
+          when #{item.helpId,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
+       </foreach>
+       ,MEASURE_TASK_NUM=
+       <foreach collection="list" item="item" index="index" separator=" " open="case HELP_ID" close="end">
+          when #{item.helpId,jdbcType=VARCHAR} then #{item.measureTaskNum,jdbcType=VARCHAR}
+       </foreach>
+       ,WARM_TYPE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case HELP_ID" close="end">
+          when #{item.helpId,jdbcType=VARCHAR} then #{item.warmType,jdbcType=VARCHAR}
+       </foreach>
+       ,WARM_TYPE_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case HELP_ID" close="end">
+          when #{item.helpId,jdbcType=VARCHAR} then #{item.warmTypeName,jdbcType=VARCHAR}
+       </foreach>
+     where HELP_ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.helpId,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from METER_WORK_RAILWAY_SCHEDULED_HELP
+    where HELP_ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
+    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(HELP_ID, LENGTH(HELP_ID) - 3))),0) + 1,4,'0') HELP_ID
+    FROM meter_work_railway_scheduled_help where instr(HELP_ID,#{afl,jdbcType=VARCHAR})>0
+  </select>
+</mapper>

+ 243 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayscheduledhelp/model/MeterWorkRailwayScheduledHelp.java

@@ -0,0 +1,243 @@
+package com.steerinfo.meterwork.meterworkrailwayscheduledhelp.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+@ApiModel(value="null")
+public class MeterWorkRailwayScheduledHelp implements IBasePO<String> {
+    /**
+     * 主键(HELP_ID,VARCHAR,20)
+     */
+    @ApiModelProperty(value="主键",required=true)
+    private String helpId;
+
+    /**
+     * 车号(RAILWAY_NO,VARCHAR,11)
+     */
+    @ApiModelProperty(value="车号",required=false)
+    private String railwayNo;
+
+    /**
+     * 报警内容(HELP_CONTENT,VARCHAR,200)
+     */
+    @ApiModelProperty(value="报警内容",required=false)
+    private String helpContent;
+
+    /**
+     * 报警时间(CREATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="报警时间",required=false)
+    private Date createTime;
+
+    /**
+     * 结束时间(END_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="结束时间",required=false)
+    private Date endTime;
+
+    /**
+     * 处理人编号(CREATE_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="处理人编号",required=false)
+    private String createNo;
+
+    /**
+     * 处理人(CREATE_NAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="处理人",required=false)
+    private String createName;
+
+    /**
+     * 处理结果(RESULT,VARCHAR,100)
+     */
+    @ApiModelProperty(value="处理结果",required=false)
+    private String result;
+
+    /**
+     * 是否处理(0:未处理,1:已处理)(VALUE_FLAG,VARCHAR,1)
+     */
+    @ApiModelProperty(value="是否处理(0:未处理,1:已处理)",required=false)
+    private String valueFlag;
+
+    /**
+     * 计量站点编号(BASE_SPOT_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="计量站点编号",required=false)
+    private String baseSpotNo;
+
+    /**
+     * 计量站点名称(BASE_SPOT_NAME,VARCHAR,40)
+     */
+    @ApiModelProperty(value="计量站点名称",required=false)
+    private String baseSpotName;
+
+    /**
+     * 是否上传智能料场(MEASURE_TASK_NUM,VARCHAR,2)
+     */
+    @ApiModelProperty(value="是否上传智能料场",required=false)
+    private String measureTaskNum;
+
+    /**
+     * 报警类型(1:事后匹配报警;2:智能终端报警;3:跟车报警)(WARM_TYPE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="报警类型(1:事后匹配报警;2:智能终端报警;3:跟车报警)",required=false)
+    private String warmType;
+
+    /**
+     * 报警类型名称(WARM_TYPE_NAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="报警类型名称",required=false)
+    private String warmTypeName;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.helpId;
+    }
+
+    @Override
+    public void setId(String helpId) {
+        this.helpId = helpId == null ? null : helpId.trim();
+    }
+
+    public String getHelpId() {
+        return helpId;
+    }
+
+    public void setHelpId(String helpId) {
+        this.helpId = helpId == null ? null : helpId.trim();
+    }
+
+    public String getRailwayNo() {
+        return railwayNo;
+    }
+
+    public void setRailwayNo(String railwayNo) {
+        this.railwayNo = railwayNo == null ? null : railwayNo.trim();
+    }
+
+    public String getHelpContent() {
+        return helpContent;
+    }
+
+    public void setHelpContent(String helpContent) {
+        this.helpContent = helpContent == null ? null : helpContent.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getCreateNo() {
+        return createNo;
+    }
+
+    public void setCreateNo(String createNo) {
+        this.createNo = createNo == null ? null : createNo.trim();
+    }
+
+    public String getCreateName() {
+        return createName;
+    }
+
+    public void setCreateName(String createName) {
+        this.createName = createName == null ? null : createName.trim();
+    }
+
+    public String getResult() {
+        return result;
+    }
+
+    public void setResult(String result) {
+        this.result = result == null ? null : result.trim();
+    }
+
+    public String getValueFlag() {
+        return valueFlag;
+    }
+
+    public void setValueFlag(String valueFlag) {
+        this.valueFlag = valueFlag == null ? null : valueFlag.trim();
+    }
+
+    public String getBaseSpotNo() {
+        return baseSpotNo;
+    }
+
+    public void setBaseSpotNo(String baseSpotNo) {
+        this.baseSpotNo = baseSpotNo == null ? null : baseSpotNo.trim();
+    }
+
+    public String getBaseSpotName() {
+        return baseSpotName;
+    }
+
+    public void setBaseSpotName(String baseSpotName) {
+        this.baseSpotName = baseSpotName == null ? null : baseSpotName.trim();
+    }
+
+    public String getMeasureTaskNum() {
+        return measureTaskNum;
+    }
+
+    public void setMeasureTaskNum(String measureTaskNum) {
+        this.measureTaskNum = measureTaskNum == null ? null : measureTaskNum.trim();
+    }
+
+    public String getWarmType() {
+        return warmType;
+    }
+
+    public void setWarmType(String warmType) {
+        this.warmType = warmType == null ? null : warmType.trim();
+    }
+
+    public String getWarmTypeName() {
+        return warmTypeName;
+    }
+
+    public void setWarmTypeName(String warmTypeName) {
+        this.warmTypeName = warmTypeName == null ? null : warmTypeName.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", helpId=").append(helpId);
+        sb.append(", railwayNo=").append(railwayNo);
+        sb.append(", helpContent=").append(helpContent);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", endTime=").append(endTime);
+        sb.append(", createNo=").append(createNo);
+        sb.append(", createName=").append(createName);
+        sb.append(", result=").append(result);
+        sb.append(", valueFlag=").append(valueFlag);
+        sb.append(", baseSpotNo=").append(baseSpotNo);
+        sb.append(", baseSpotName=").append(baseSpotName);
+        sb.append(", measureTaskNum=").append(measureTaskNum);
+        sb.append(", warmType=").append(warmType);
+        sb.append(", warmTypeName=").append(warmTypeName);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 25 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayscheduledhelp/service/IMeterWorkRailwayScheduledHelpService.java

@@ -0,0 +1,25 @@
+package com.steerinfo.meterwork.meterworkrailwayscheduledhelp.service;
+
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.meterwork.meterworkrailwayscheduledhelp.model.MeterWorkRailwayScheduledHelp;
+import com.steerinfo.meterwork.meterworkscheduledhelp.model.MeterWorkScheduledHelp;
+
+/**
+ * MeterWorkRailwayScheduledHelp服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-05-15 11:24
+ * 类描述
+ * 修订历史:
+ * 日期:2022-05-15
+ * 作者:generator
+ * 参考:
+ * 描述:MeterWorkRailwayScheduledHelp服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IMeterWorkRailwayScheduledHelpService extends IBaseService<MeterWorkRailwayScheduledHelp, String>{
+    RESTfulResult scheduledHelp(String carNo, String baseSpotNo, String baseSpotName, String helpContent);
+    RESTfulResult scheduledHelpConfirm(String id, String createNo, String createName, String result);
+    RESTfulResult checkAdd(MeterWorkRailwayScheduledHelp model);
+}

+ 145 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayscheduledhelp/service/impl/MeterWorkRailwayScheduledHelpServiceImpl.java

@@ -0,0 +1,145 @@
+package com.steerinfo.meterwork.meterworkrailwayscheduledhelp.service.impl;
+
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.meterwork.except.MarkerMetException;
+import com.steerinfo.meterwork.meterworkrailwayscheduledhelp.mapper.MeterWorkRailwayScheduledHelpMapper;
+import com.steerinfo.meterwork.meterworkrailwayscheduledhelp.model.MeterWorkRailwayScheduledHelp;
+import com.steerinfo.meterwork.meterworkrailwayscheduledhelp.service.IMeterWorkRailwayScheduledHelpService;
+import com.steerinfo.meterwork.meterworkscheduledhelp.model.MeterWorkScheduledHelp;
+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.HashMap;
+import java.util.List;
+
+/**
+ * MeterWorkRailwayScheduledHelp服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-05-15 11:24
+ * 类描述
+ * 修订历史:
+ * 日期:2022-05-15
+ * 作者:generator
+ * 参考:
+ * 描述:MeterWorkRailwayScheduledHelp服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "meterWorkRailwayScheduledHelpService")
+public class MeterWorkRailwayScheduledHelpServiceImpl extends BaseServiceImpl<MeterWorkRailwayScheduledHelp, String> implements IMeterWorkRailwayScheduledHelpService {
+
+    @Resource
+    private MeterWorkRailwayScheduledHelpMapper meterWorkRailwayScheduledHelpMapper;
+
+    @Override
+    protected IBaseMapper<MeterWorkRailwayScheduledHelp, String> getMapper() {
+        return meterWorkRailwayScheduledHelpMapper;
+    }
+
+    @Override
+    public RESTfulResult scheduledHelp(String carNo, String baseSpotNo, String baseSpotName, String helpContent) {
+        RESTfulResult rm = new RESTfulResult();
+        //新建AppPhoneHelp类存储远程救助信息
+        MeterWorkRailwayScheduledHelp helpModel = new MeterWorkRailwayScheduledHelp();
+        //根据车号、电话、司机姓名获取远程求助信息
+        HashMap<String, Object> map = new HashMap<>();
+        map.put("carNo", carNo);
+        map.put("baseSpotNo", baseSpotNo);
+        map.put("baseSpotName", baseSpotName);
+        List<MeterWorkRailwayScheduledHelp> model = meterWorkRailwayScheduledHelpMapper.selectByParameters(map);
+        //若是远程求助信息里面没有求助信息,重新生成Id直接插入
+        if(model.size() >= 1){
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
+            helpModel.setHelpId(sdf.format(new Date()));
+            helpModel.setRailwayNo(carNo);
+            helpModel.setBaseSpotNo(baseSpotNo);
+            helpModel.setBaseSpotName(baseSpotName);
+            helpModel.setHelpContent(helpContent);
+            helpModel.setCreateTime(new Date());
+            helpModel.setValueFlag("0");
+            int i = meterWorkRailwayScheduledHelpMapper.insertSelective(helpModel);
+            if( i > 0){
+                rm.setSucceed();
+                rm.setMessage("数据正在处理,请等待!!");
+                rm.setCode("200");
+                rm.setData(helpModel);
+            }else{
+                rm.setMessage("操作失败");
+                rm.setCode("500");
+                rm.setFailed();
+            }
+        }else{  //若有求助信息,更新远程求助表
+            model.get(0).setHelpContent(helpContent);
+            model.get(0).setCreateTime(new Date());
+            model.get(0).setValueFlag("0");
+            int i = meterWorkRailwayScheduledHelpMapper.updateByPrimaryKeySelective(model.get(0));
+            if( i > 0){
+                rm.setSucceed();
+                rm.setMessage("数据正在处理,请等待!!");
+                rm.setCode("200");
+                rm.setData(model);
+            }else{
+                rm.setMessage("操作失败");
+                rm.setCode("500");
+                rm.setFailed();
+            }
+        }
+        return rm;
+    }
+
+    @Override
+    public RESTfulResult scheduledHelpConfirm(String id, String createNo, String createName, String result) {
+        RESTfulResult rm = new RESTfulResult();
+        MeterWorkRailwayScheduledHelp model = meterWorkRailwayScheduledHelpMapper.selectByPrimaryKey(id);
+        if(model == null){
+            rm.setMessage("根据远程求助信息ID未找到相应远程求助信息,请确认!!");
+            rm.setData(null);
+            rm.setFailed();
+        }else{
+            model.setCreateNo(createNo);
+            model.setCreateName(createName);
+            model.setEndTime(new Date());
+            model.setValueFlag("1");
+            model.setResult(result);
+            int i = meterWorkRailwayScheduledHelpMapper.updateByPrimaryKeySelective(model);
+            if( i > 0){
+                rm.setMessage("操作成功");
+                rm.setSucceed();
+            }else{
+                rm.setMessage("操作失败");
+                rm.setFailed();
+            }
+        }
+        return rm;
+    }
+
+    @Override
+    public RESTfulResult checkAdd(MeterWorkRailwayScheduledHelp model) {
+        try{
+            RESTfulResult rm = new RESTfulResult();
+            rm.setCode("200");
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+            String afl = sdf.format(new Date());
+            String no = meterWorkRailwayScheduledHelpMapper.getNewID(afl);
+            model.setHelpId(sdf.format(new Date()) + no);
+            model.setCreateTime(new Date());
+            model.setValueFlag("0");
+            meterWorkRailwayScheduledHelpMapper.insertSelective(model);
+            rm.setData(model.getHelpId());
+            rm.setMessage("成功");
+            return rm;
+        }
+        catch (MarkerMetException e){
+            RESTfulResult rm = new RESTfulResult();
+            rm.setCode("500");
+            rm.setFailed();
+            rm.setMessage(e.getMessage());
+            return rm;
+        }
+    }
+}