dengyj 3 лет назад
Родитель
Сommit
a838b2c2d2

+ 54 - 28
src/main/java/com/steerinfo/baseinfo/meterbasespotinfo/mapper/MeterBaseSpotInfoMapper.xml

@@ -33,13 +33,15 @@
     <result column="SPOT_AREA_NO" jdbcType="VARCHAR" property="spotAreaNo" />
     <result column="SPOT_AREA_NO" jdbcType="VARCHAR" property="spotAreaNo" />
     <result column="SPOT_AREA_NAME" jdbcType="VARCHAR" property="spotAreaName" />
     <result column="SPOT_AREA_NAME" jdbcType="VARCHAR" property="spotAreaName" />
     <result column="ALLOWED_TARE_WEIGHT" jdbcType="VARCHAR" property="allowedTareWeight" />
     <result column="ALLOWED_TARE_WEIGHT" jdbcType="VARCHAR" property="allowedTareWeight" />
+    <result column="SCAN_REQUIRE_VALID" jdbcType="VARCHAR" property="scanRequireValid" />
   </resultMap>
   </resultMap>
   <sql id="columns">
   <sql id="columns">
     BASE_SPOT_NO, BASE_SPOT_NAME, SPOT_TYPE_NO, SPOT_TYPE_NAME, SPOT_STATE_NO, SPOT_STATE_NAME, 
     BASE_SPOT_NO, BASE_SPOT_NAME, SPOT_TYPE_NO, SPOT_TYPE_NAME, SPOT_STATE_NO, SPOT_STATE_NAME, 
     VIDEO_IP, VIDEO_PORT, VIDEO_USER_NAME, VIDEO_PASSWORD, LED_IP, PRINTER_IP, PRINTER_NAME, 
     VIDEO_IP, VIDEO_PORT, VIDEO_USER_NAME, VIDEO_PASSWORD, LED_IP, PRINTER_IP, PRINTER_NAME, 
     COUNT_NUM, USED_NUM, CONTROL_IP, VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
     COUNT_NUM, USED_NUM, CONTROL_IP, VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
     UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, 
     UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, 
-    FLAT_COMPUTER_IP, MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME, ALLOWED_TARE_WEIGHT
+    FLAT_COMPUTER_IP, MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME, ALLOWED_TARE_WEIGHT, 
+    SCAN_REQUIRE_VALID
   </sql>
   </sql>
   <sql id="columns_alias">
   <sql id="columns_alias">
     t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.SPOT_TYPE_NO, t.SPOT_TYPE_NAME, t.SPOT_STATE_NO, 
     t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.SPOT_TYPE_NO, t.SPOT_TYPE_NAME, t.SPOT_STATE_NO, 
@@ -47,7 +49,7 @@
     t.LED_IP, t.PRINTER_IP, t.PRINTER_NAME, t.COUNT_NUM, t.USED_NUM, t.CONTROL_IP, t.VALID_FLAG, 
     t.LED_IP, t.PRINTER_IP, t.PRINTER_NAME, t.COUNT_NUM, t.USED_NUM, t.CONTROL_IP, t.VALID_FLAG, 
     t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, 
     t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, 
     t.UPDATE_TIME, t.DELETE_MAN_NO, t.DELETE_MAN_NAME, t.DELETE_TIME, t.FLAT_COMPUTER_IP, 
     t.UPDATE_TIME, t.DELETE_MAN_NO, t.DELETE_MAN_NAME, t.DELETE_TIME, t.FLAT_COMPUTER_IP, 
-    t.MES_SPOT_ID, t.SPOT_AREA_NO, t.SPOT_AREA_NAME, t.ALLOWED_TARE_WEIGHT
+    t.MES_SPOT_ID, t.SPOT_AREA_NO, t.SPOT_AREA_NAME, t.ALLOWED_TARE_WEIGHT, t.SCAN_REQUIRE_VALID
   </sql>
   </sql>
   <sql id="select">
   <sql id="select">
     SELECT <include refid="columns" /> FROM METER_BASE_SPOT_INFO
     SELECT <include refid="columns" /> FROM METER_BASE_SPOT_INFO
@@ -150,6 +152,9 @@
       <if test="allowedTareWeight != null and allowedTareWeight != ''">
       <if test="allowedTareWeight != null and allowedTareWeight != ''">
         and ALLOWED_TARE_WEIGHT = #{allowedTareWeight}
         and ALLOWED_TARE_WEIGHT = #{allowedTareWeight}
       </if>
       </if>
+      <if test="scanRequireValid != null and scanRequireValid != ''">
+        and SCAN_REQUIRE_VALID = #{scanRequireValid}
+      </if>
     </where>
     </where>
   </sql>
   </sql>
   <sql id="whereLike">
   <sql id="whereLike">
@@ -247,6 +252,9 @@
       <if test="allowedTareWeight != null and allowedTareWeight != ''">
       <if test="allowedTareWeight != null and allowedTareWeight != ''">
         and ALLOWED_TARE_WEIGHT LIKE '%${allowedTareWeight}%'
         and ALLOWED_TARE_WEIGHT LIKE '%${allowedTareWeight}%'
       </if>
       </if>
+      <if test="scanRequireValid != null and scanRequireValid != ''">
+        and SCAN_REQUIRE_VALID LIKE '%${scanRequireValid}%'
+      </if>
     </where>
     </where>
   </sql>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
@@ -346,6 +354,9 @@
       <if test="allowedTareWeight != null and allowedTareWeight != ''">
       <if test="allowedTareWeight != null and allowedTareWeight != ''">
         or ALLOWED_TARE_WEIGHT = #{allowedTareWeight}
         or ALLOWED_TARE_WEIGHT = #{allowedTareWeight}
       </if>
       </if>
+      <if test="scanRequireValid != null and scanRequireValid != ''">
+        or SCAN_REQUIRE_VALID = #{scanRequireValid}
+      </if>
   </delete>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
   <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
     insert into METER_BASE_SPOT_INFO (BASE_SPOT_NO, BASE_SPOT_NAME, SPOT_TYPE_NO, 
     insert into METER_BASE_SPOT_INFO (BASE_SPOT_NO, BASE_SPOT_NAME, SPOT_TYPE_NO, 
@@ -358,7 +369,7 @@
       UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, 
       UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, 
       DELETE_MAN_NAME, DELETE_TIME, FLAT_COMPUTER_IP, 
       DELETE_MAN_NAME, DELETE_TIME, FLAT_COMPUTER_IP, 
       MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME, 
       MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME, 
-      ALLOWED_TARE_WEIGHT)
+      ALLOWED_TARE_WEIGHT, SCAN_REQUIRE_VALID)
     values (#{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR}, #{spotTypeNo,jdbcType=VARCHAR}, 
     values (#{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR}, #{spotTypeNo,jdbcType=VARCHAR}, 
       #{spotTypeName,jdbcType=VARCHAR}, #{spotStateNo,jdbcType=VARCHAR}, #{spotStateName,jdbcType=VARCHAR}, 
       #{spotTypeName,jdbcType=VARCHAR}, #{spotStateNo,jdbcType=VARCHAR}, #{spotStateName,jdbcType=VARCHAR}, 
       #{videoIp,jdbcType=VARCHAR}, #{videoPort,jdbcType=VARCHAR}, #{videoUserName,jdbcType=VARCHAR}, 
       #{videoIp,jdbcType=VARCHAR}, #{videoPort,jdbcType=VARCHAR}, #{videoUserName,jdbcType=VARCHAR}, 
@@ -369,7 +380,7 @@
       #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{deleteManNo,jdbcType=VARCHAR}, 
       #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{deleteManNo,jdbcType=VARCHAR}, 
       #{deleteManName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, #{flatComputerIp,jdbcType=VARCHAR}, 
       #{deleteManName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, #{flatComputerIp,jdbcType=VARCHAR}, 
       #{mesSpotId,jdbcType=VARCHAR}, #{spotAreaNo,jdbcType=VARCHAR}, #{spotAreaName,jdbcType=VARCHAR}, 
       #{mesSpotId,jdbcType=VARCHAR}, #{spotAreaNo,jdbcType=VARCHAR}, #{spotAreaName,jdbcType=VARCHAR}, 
-      #{allowedTareWeight,jdbcType=VARCHAR})
+      #{allowedTareWeight,jdbcType=VARCHAR}, #{scanRequireValid,jdbcType=VARCHAR})
   </insert>
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
   <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
     insert into METER_BASE_SPOT_INFO
     insert into METER_BASE_SPOT_INFO
@@ -467,6 +478,9 @@
       <if test="allowedTareWeight != null">
       <if test="allowedTareWeight != null">
         ALLOWED_TARE_WEIGHT,
         ALLOWED_TARE_WEIGHT,
       </if>
       </if>
+      <if test="scanRequireValid != null">
+        SCAN_REQUIRE_VALID,
+      </if>
     </trim>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="baseSpotNo != null">
       <if test="baseSpotNo != null">
@@ -562,6 +576,9 @@
       <if test="allowedTareWeight != null">
       <if test="allowedTareWeight != null">
         #{allowedTareWeight,jdbcType=VARCHAR},
         #{allowedTareWeight,jdbcType=VARCHAR},
       </if>
       </if>
+      <if test="scanRequireValid != null">
+        #{scanRequireValid,jdbcType=VARCHAR},
+      </if>
     </trim>
     </trim>
   </insert>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
@@ -595,7 +612,8 @@
       MES_SPOT_ID = #{mesSpotId,jdbcType=VARCHAR},
       MES_SPOT_ID = #{mesSpotId,jdbcType=VARCHAR},
       SPOT_AREA_NO = #{spotAreaNo,jdbcType=VARCHAR},
       SPOT_AREA_NO = #{spotAreaNo,jdbcType=VARCHAR},
       SPOT_AREA_NAME = #{spotAreaName,jdbcType=VARCHAR},
       SPOT_AREA_NAME = #{spotAreaName,jdbcType=VARCHAR},
-      ALLOWED_TARE_WEIGHT = #{allowedTareWeight,jdbcType=VARCHAR}
+      ALLOWED_TARE_WEIGHT = #{allowedTareWeight,jdbcType=VARCHAR},
+      SCAN_REQUIRE_VALID = #{scanRequireValid,jdbcType=VARCHAR}
     where BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR}
     where BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR}
   </update>
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
@@ -691,6 +709,9 @@
       <if test="allowedTareWeight != null">
       <if test="allowedTareWeight != null">
         ALLOWED_TARE_WEIGHT = #{allowedTareWeight,jdbcType=VARCHAR},
         ALLOWED_TARE_WEIGHT = #{allowedTareWeight,jdbcType=VARCHAR},
       </if>
       </if>
+      <if test="scanRequireValid != null">
+        SCAN_REQUIRE_VALID = #{scanRequireValid,jdbcType=VARCHAR},
+      </if>
     </set>
     </set>
     where BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR}
     where BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR}
   </update>
   </update>
@@ -719,7 +740,8 @@
       UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, 
       UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, 
       DELETE_TIME, FLAT_COMPUTER_IP, 
       DELETE_TIME, FLAT_COMPUTER_IP, 
       MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME, 
       MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME, 
-      ALLOWED_TARE_WEIGHT)
+      ALLOWED_TARE_WEIGHT, SCAN_REQUIRE_VALID
+      )
     ( <foreach collection="list" item="item" separator="union all"> 
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
    select  
       #{item.baseSpotNo,jdbcType=VARCHAR}, 
       #{item.baseSpotNo,jdbcType=VARCHAR}, 
@@ -733,7 +755,8 @@
       #{item.updateTime,jdbcType=TIMESTAMP}, #{item.deleteManNo,jdbcType=VARCHAR}, #{item.deleteManName,jdbcType=VARCHAR}, 
       #{item.updateTime,jdbcType=TIMESTAMP}, #{item.deleteManNo,jdbcType=VARCHAR}, #{item.deleteManName,jdbcType=VARCHAR}, 
       #{item.deleteTime,jdbcType=TIMESTAMP}, #{item.flatComputerIp,jdbcType=VARCHAR}, 
       #{item.deleteTime,jdbcType=TIMESTAMP}, #{item.flatComputerIp,jdbcType=VARCHAR}, 
       #{item.mesSpotId,jdbcType=VARCHAR}, #{item.spotAreaNo,jdbcType=VARCHAR}, #{item.spotAreaName,jdbcType=VARCHAR}, 
       #{item.mesSpotId,jdbcType=VARCHAR}, #{item.spotAreaNo,jdbcType=VARCHAR}, #{item.spotAreaName,jdbcType=VARCHAR}, 
-      #{item.allowedTareWeight,jdbcType=VARCHAR} from dual  
+      #{item.allowedTareWeight,jdbcType=VARCHAR}, #{item.scanRequireValid,jdbcType=VARCHAR}
+       from dual  
    </foreach> )
    </foreach> )
   </insert>
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
   <update id="batchUpdate" parameterType="java.util.List">
@@ -863,6 +886,10 @@
        <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
        <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
           when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.allowedTareWeight,jdbcType=VARCHAR}
           when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.allowedTareWeight,jdbcType=VARCHAR}
        </foreach>
        </foreach>
+       ,SCAN_REQUIRE_VALID=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.scanRequireValid,jdbcType=VARCHAR}
+       </foreach>
      where BASE_SPOT_NO in 
      where BASE_SPOT_NO in 
      <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
      <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
     #{item.baseSpotNo,jdbcType=VARCHAR}
     #{item.baseSpotNo,jdbcType=VARCHAR}
@@ -877,8 +904,6 @@
   </delete>
   </delete>
   <!-- 友情提示!!!-->
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-  <!-- 友情提示!!!-->
-  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
   <sql id="whereOr">
   <sql id="whereOr">
     <where>
     <where>
       <if test="baseSpotNo != null and baseSpotNo != ''">
       <if test="baseSpotNo != null and baseSpotNo != ''">
@@ -984,25 +1009,25 @@
   <select id="DynamicAll" parameterType="java.util.HashMap" resultMap="BaseResultMap">
   <select id="DynamicAll" parameterType="java.util.HashMap" resultMap="BaseResultMap">
     <include refid="select"/>
     <include refid="select"/>
     where 1 = 1
     where 1 = 1
-        and spot_type_no in ('001019004', '001019002')
-        <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="spotTypeNo != null and spotTypeNo != ''">
-          and SPOT_TYPE_NO = #{spotTypeNo}
-        </if>
-        <if test="spotTypeName != null and spotTypeName != ''">
-          and SPOT_TYPE_NAME = #{spotTypeName}
-        </if>
-        <if test="spotStateNo != null and spotStateNo != ''">
-          and SPOT_STATE_NO = #{spotStateNo}
-        </if>
-        <if test="spotStateName != null and spotStateName != ''">
-          and SPOT_STATE_NAME = #{spotStateName}
-        </if>
+    and spot_type_no in ('001019004', '001019002')
+    <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="spotTypeNo != null and spotTypeNo != ''">
+      and SPOT_TYPE_NO = #{spotTypeNo}
+    </if>
+    <if test="spotTypeName != null and spotTypeName != ''">
+      and SPOT_TYPE_NAME = #{spotTypeName}
+    </if>
+    <if test="spotStateNo != null and spotStateNo != ''">
+      and SPOT_STATE_NO = #{spotStateNo}
+    </if>
+    <if test="spotStateName != null and spotStateName != ''">
+      and SPOT_STATE_NAME = #{spotStateName}
+    </if>
   </select>
   </select>
 
 
   <select id="selectcorrelation"  resultMap="BaseResultMap">
   <select id="selectcorrelation"  resultMap="BaseResultMap">
@@ -1031,4 +1056,5 @@
     select * from meter_base_spot_info
     select * from meter_base_spot_info
         where spot_type_no in ('001019003','001019005')
         where spot_type_no in ('001019003','001019005')
   </select>
   </select>
+  
 </mapper>
 </mapper>

+ 22 - 7
src/main/java/com/steerinfo/baseinfo/meterbasespotinfo/model/MeterBaseSpotInfo.java

@@ -23,25 +23,25 @@ public class MeterBaseSpotInfo implements IBasePO<String> {
     /**
     /**
      * 计量点类型编号(SPOT_TYPE_NO,VARCHAR,20)
      * 计量点类型编号(SPOT_TYPE_NO,VARCHAR,20)
      */
      */
-    @ApiModelProperty(value="计量点类型编号",required=true)
+    @ApiModelProperty(value="计量点类型编号",required=false)
     private String spotTypeNo;
     private String spotTypeNo;
 
 
     /**
     /**
      * 计量点类型名称(SPOT_TYPE_NAME,VARCHAR,30)
      * 计量点类型名称(SPOT_TYPE_NAME,VARCHAR,30)
      */
      */
-    @ApiModelProperty(value="计量点类型名称",required=true)
+    @ApiModelProperty(value="计量点类型名称",required=false)
     private String spotTypeName;
     private String spotTypeName;
 
 
     /**
     /**
      * 计量点状态编号(SPOT_STATE_NO,VARCHAR,20)
      * 计量点状态编号(SPOT_STATE_NO,VARCHAR,20)
      */
      */
-    @ApiModelProperty(value="计量点状态编号",required=true)
+    @ApiModelProperty(value="计量点状态编号",required=false)
     private String spotStateNo;
     private String spotStateNo;
 
 
     /**
     /**
      * 计量点状态名称(SPOT_STATE_NAME,VARCHAR,30)
      * 计量点状态名称(SPOT_STATE_NAME,VARCHAR,30)
      */
      */
-    @ApiModelProperty(value="计量点状态名称",required=true)
+    @ApiModelProperty(value="计量点状态名称",required=false)
     private String spotStateName;
     private String spotStateName;
 
 
     /**
     /**
@@ -113,19 +113,19 @@ public class MeterBaseSpotInfo implements IBasePO<String> {
     /**
     /**
      * 创建人编号(CREATE_MAN_NO,VARCHAR,20)
      * 创建人编号(CREATE_MAN_NO,VARCHAR,20)
      */
      */
-    @ApiModelProperty(value="创建人编号",required=true)
+    @ApiModelProperty(value="创建人编号",required=false)
     private String createManNo;
     private String createManNo;
 
 
     /**
     /**
      * 创建人姓名(CREATE_MAN_NAME,VARCHAR,30)
      * 创建人姓名(CREATE_MAN_NAME,VARCHAR,30)
      */
      */
-    @ApiModelProperty(value="创建人姓名",required=true)
+    @ApiModelProperty(value="创建人姓名",required=false)
     private String createManName;
     private String createManName;
 
 
     /**
     /**
      * 创建时间(YYYY-MM-DD HH:mm:SS)(CREATE_TIME,TIMESTAMP,7)
      * 创建时间(YYYY-MM-DD HH:mm:SS)(CREATE_TIME,TIMESTAMP,7)
      */
      */
-    @ApiModelProperty(value="创建时间(YYYY-MM-DD HH:mm:SS)",required=true)
+    @ApiModelProperty(value="创建时间(YYYY-MM-DD HH:mm:SS)",required=false)
     private Date createTime;
     private Date createTime;
 
 
     /**
     /**
@@ -194,6 +194,12 @@ public class MeterBaseSpotInfo implements IBasePO<String> {
     @ApiModelProperty(value="是否允许使用期限皮重(0不可,1可以)",required=false)
     @ApiModelProperty(value="是否允许使用期限皮重(0不可,1可以)",required=false)
     private String allowedTareWeight;
     private String allowedTareWeight;
 
 
+    /**
+     * 扫码是否需要验证(0:不需要;1:需要)(SCAN_REQUIRE_VALID,VARCHAR,1)
+     */
+    @ApiModelProperty(value="扫码是否需要验证(0:不需要;1:需要)",required=false)
+    private String scanRequireValid;
+
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
 
 
     @Override
     @Override
@@ -454,6 +460,14 @@ public class MeterBaseSpotInfo implements IBasePO<String> {
         this.allowedTareWeight = allowedTareWeight == null ? null : allowedTareWeight.trim();
         this.allowedTareWeight = allowedTareWeight == null ? null : allowedTareWeight.trim();
     }
     }
 
 
+    public String getScanRequireValid() {
+        return scanRequireValid;
+    }
+
+    public void setScanRequireValid(String scanRequireValid) {
+        this.scanRequireValid = scanRequireValid == null ? null : scanRequireValid.trim();
+    }
+
     @Override
     @Override
     public String toString() {
     public String toString() {
         StringBuilder sb = new StringBuilder();
         StringBuilder sb = new StringBuilder();
@@ -491,6 +505,7 @@ public class MeterBaseSpotInfo implements IBasePO<String> {
         sb.append(", spotAreaNo=").append(spotAreaNo);
         sb.append(", spotAreaNo=").append(spotAreaNo);
         sb.append(", spotAreaName=").append(spotAreaName);
         sb.append(", spotAreaName=").append(spotAreaName);
         sb.append(", allowedTareWeight=").append(allowedTareWeight);
         sb.append(", allowedTareWeight=").append(allowedTareWeight);
+        sb.append(", scanRequireValid=").append(scanRequireValid);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         sb.append("]");
         return sb.toString();
         return sb.toString();

+ 31 - 20
src/main/java/com/steerinfo/meterwork/meterworkcaractual/service/impl/MeterWorkCarActualServiceImpl.java

@@ -662,19 +662,29 @@ public class MeterWorkCarActualServiceImpl extends BaseServiceImpl<MeterWorkCarA
                 throw new MarkerMetException(500, "参数为空!!!");
                 throw new MarkerMetException(500, "参数为空!!!");
             }
             }
             for(MeterWorkCarActual modelTemp: models) {
             for(MeterWorkCarActual modelTemp: models) {
-                if(modelTemp.getIsPreScale().equals("1")) {
+                if(StringUtils.isNotEmpty(modelTemp.getPredictionNo())) {
                     throw new MarkerMetException(500, "请将结净数据解除委托之后在毛皮分解");
                     throw new MarkerMetException(500, "请将结净数据解除委托之后在毛皮分解");
                 }
                 }
-                if(modelTemp.getPredictionNo() != null && StringUtils.isNotEmpty(modelTemp.getPredictionNo())){
-                    PreTrackScale scaleTemp = preTrackScaleMapper.selectByPrimaryKey(modelTemp.getPredictionNo());
-                    if(scaleTemp.getValueFlag().equals("9")) {
-                        throw new MarkerMetException(500, "结净数据中包含已结算的委托!!!");
-
-                    }
-                    if(scaleTemp.getPredictionType().equals("5") || scaleTemp.getPredictionType().equals("6") || scaleTemp.getPredictionType().equals("7")){
-                        throw new MarkerMetException(500, "结净数据中包含特殊委托匹配结净的数据!!!");
-                    }
+                //毛重
+                MeterWorkCarActualFirst mwcaf1 = meterWorkCarActualFirstMapper.selectByPrimaryKey(modelTemp.getActualFirst1No());
+                if(mwcaf1 != null && StringUtils.isNotEmpty(mwcaf1.getPredictionNo())) {
+                    throw new MarkerMetException(500, "请将一次数据作业编号" +mwcaf1.getActualFirstNo() +"解除委托之后在毛皮分解");
                 }
                 }
+                //皮重
+                MeterWorkCarActualFirst mwcaf2 = meterWorkCarActualFirstMapper.selectByPrimaryKey(modelTemp.getActualFirst2No());
+                if(mwcaf2 != null && StringUtils.isNotEmpty(mwcaf2.getPredictionNo())) {
+                    throw new MarkerMetException(500, "请将一次数据作业编号"+ mwcaf2.getActualFirstNo() +"解除委托之后在毛皮分解");
+                }
+//                if(modelTemp.getPredictionNo() != null && StringUtils.isNotEmpty(modelTemp.getPredictionNo())){
+//                    PreTrackScale scaleTemp = preTrackScaleMapper.selectByPrimaryKey(modelTemp.getPredictionNo());
+//                    if(scaleTemp.getValueFlag().equals("9")) {
+//                        throw new MarkerMetException(500, "结净数据中包含已结算的委托!!!");
+//
+//                    }
+//                    if(scaleTemp.getPredictionType().equals("5") || scaleTemp.getPredictionType().equals("6") || scaleTemp.getPredictionType().equals("7")){
+//                        throw new MarkerMetException(500, "结净数据中包含特殊委托匹配结净的数据!!!");
+//                    }
+//                }
             }
             }
             String userId = "";
             String userId = "";
             String userName = "";
             String userName = "";
@@ -740,16 +750,16 @@ public class MeterWorkCarActualServiceImpl extends BaseServiceImpl<MeterWorkCarA
 //                        meterWorkPreLinkMapper.updateByPrimaryKey(mwpl);
 //                        meterWorkPreLinkMapper.updateByPrimaryKey(mwpl);
 //                    }
 //                    }
                 //修改预报
                 //修改预报
-                if (StringUtils.isNotEmpty(model.getPredictionNo())) {
-                    PreTrackScale scale = new PreTrackScale();
-                    scale.setPredictionNo(model.getPredictionNo());
-                    scale.setValueFlag("1");
-                    scale.setUploadFlag("1");
-                    scale.setUpdateTime(new Date());
-                    scale.setUpdateManNo("system");
-                    scale.setUpdateManName("计量结净数据解除操作");
-                    preTrackScaleMapper.updateByPrimaryKeySelective(scale);
-                }
+//                if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+//                    PreTrackScale scale = new PreTrackScale();
+//                    scale.setPredictionNo(model.getPredictionNo());
+//                    scale.setValueFlag("1");
+//                    scale.setUploadFlag("1");
+//                    scale.setUpdateTime(new Date());
+//                    scale.setUpdateManNo("system");
+//                    scale.setUpdateManName("计量结净数据解除操作");
+//                    preTrackScaleMapper.updateByPrimaryKeySelective(scale);
+//                }
 //                }
 //                }
                 //meterWorkCarActualMapper.deleteByPrimaryKey(model.getActualNo());
                 //meterWorkCarActualMapper.deleteByPrimaryKey(model.getActualNo());
                 MeterWorkCarActual modelTemp = meterWorkCarActualMapper.cleanPredcition(model.getActualNo());
                 MeterWorkCarActual modelTemp = meterWorkCarActualMapper.cleanPredcition(model.getActualNo());
@@ -1358,6 +1368,7 @@ public class MeterWorkCarActualServiceImpl extends BaseServiceImpl<MeterWorkCarA
             if (scale != null) {
             if (scale != null) {
                 scale.setValueFlag("2");
                 scale.setValueFlag("2");
                 scale.setUploadFlag("1");
                 scale.setUploadFlag("1");
+                scale.setPredictionType("1");
                 scale.setUpdateTime(new Date());
                 scale.setUpdateTime(new Date());
                 scale.setUpdateManNo("system");
                 scale.setUpdateManNo("system");
                 scale.setUpdateManName("计量结净数据匹配委托操作");
                 scale.setUpdateManName("计量结净数据匹配委托操作");

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

@@ -353,6 +353,15 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             int num = 0;
             int num = 0;
             if (models.size() <= 0 || models == null) {
             if (models.size() <= 0 || models == null) {
                 throw new MarkerMetException(500, "参数为空!!");
                 throw new MarkerMetException(500, "参数为空!!");
+            }else {
+                for(MeterWorkCarActualFirst model : models) {
+                    if (model.getValueFlag().equals(DbConstants.NET)) {
+                        throw new MarkerMetException(500, "已结净的数据不可再废除!!");
+                    }
+                    if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+                        throw new MarkerMetException(500, "一次数据已匹配委托,请撤销委托之后再进行作废");
+                    }
+                }
             }
             }
             String userId = "";
             String userId = "";
             String userName = "";
             String userName = "";
@@ -365,9 +374,6 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
                 userName = "system";
                 userName = "system";
             }
             }
             for (MeterWorkCarActualFirst model : models) {
             for (MeterWorkCarActualFirst model : models) {
-                if (model.getValueFlag().equals(DbConstants.NET)) {
-                    throw new MarkerMetException(500, "已结净的数据不可再废除!!");
-                }
                 ckeck(model);
                 ckeck(model);
                 model.setValueFlag(DbConstants.INVALID);
                 model.setValueFlag(DbConstants.INVALID);
                 meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(model);
                 meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(model);
@@ -385,16 +391,16 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
                 logModel.setOperationCarnNo(model.getCarNo());
                 logModel.setOperationCarnNo(model.getCarNo());
                 meterBaseOperationLogMapper.insertSelective(logModel);
                 meterBaseOperationLogMapper.insertSelective(logModel);
             }
             }
-            for (MeterWorkCarActualFirst model : models) {
-                if (StringUtils.isNotEmpty(model.getPredictionNo())
-                        && model.getPredictionNo().length() > 10) {
-                    PreTrackScale ps = new PreTrackScale();
-                    ps.setPredictionNo(model.getPredictionNo());
-                    ps.setValueFlag(DbConstants.Abolish); //没有有效的一次计量记录的时候,预报直接作废,这样检化验那边才能不影响下一车采样 2021年4月18日
-                    ps.setUploadFlag("1");
-                    this.preTrackScaleMapper.updateByPrimaryKeySelective(ps);
-                }
-            }
+//            for (MeterWorkCarActualFirst model : models) {
+//                if (StringUtils.isNotEmpty(model.getPredictionNo())
+//                        && model.getPredictionNo().length() > 10) {
+//                    PreTrackScale ps = new PreTrackScale();
+//                    ps.setPredictionNo(model.getPredictionNo());
+//                    ps.setValueFlag(DbConstants.Abolish); //没有有效的一次计量记录的时候,预报直接作废,这样检化验那边才能不影响下一车采样 2021年4月18日
+//                    ps.setUploadFlag("1");
+//                    this.preTrackScaleMapper.updateByPrimaryKeySelective(ps);
+//                }
+//            }
             /*
             /*
             // 2021年5月24日 不需要搞得这么复杂,直接干掉就可以了
             // 2021年5月24日 不需要搞得这么复杂,直接干掉就可以了
             //杨秀东新增逻辑,若预报只有一条有效的一次计量数据,则作废一次计量数据时,将预报置为未使用的状态
             //杨秀东新增逻辑,若预报只有一条有效的一次计量数据,则作废一次计量数据时,将预报置为未使用的状态
@@ -493,6 +499,12 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             int num = 0;
             int num = 0;
             if (models.size() <= 0 || models == null) {
             if (models.size() <= 0 || models == null) {
                 throw new MarkerMetException(500, "请选择需要启用的数据!!");
                 throw new MarkerMetException(500, "请选择需要启用的数据!!");
+            }else {
+                for (MeterWorkCarActualFirst model : models) {
+                    if (model.getValueFlag().equals(DbConstants.NET)) {
+                        throw new MarkerMetException(500, "计量数据已经结净,无法启用");
+                    }
+                }
             }
             }
             String userId = "";
             String userId = "";
             String userName = "";
             String userName = "";
@@ -505,9 +517,6 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
                 userName = "system";
                 userName = "system";
             }
             }
             for (MeterWorkCarActualFirst model : models) {
             for (MeterWorkCarActualFirst model : models) {
-                if (model.getValueFlag().equals(DbConstants.NET)) {
-                    throw new MarkerMetException(500, "计量数据已经结净,无法启用");
-                }
                 model.setValueFlag(DbConstants.VALID);
                 model.setValueFlag(DbConstants.VALID);
                 meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(model);
                 meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(model);
 
 
@@ -523,17 +532,16 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
                 logModel.setOperationCarnNo(model.getCarNo());
                 logModel.setOperationCarnNo(model.getCarNo());
                 meterBaseOperationLogMapper.insertSelective(logModel);
                 meterBaseOperationLogMapper.insertSelective(logModel);
 
 
-                if (StringUtils.isNotEmpty(model.getPredictionNo())
-                        && model.getPredictionNo().length() > 10) {
-                    PreTrackScale ps = new PreTrackScale();
-                    ps.setPredictionNo(model.getPredictionNo());
-                    ps.setValueFlag(DbConstants.IN); //预报调整为使用中
-                    ps.setUploadFlag("1");
-                    ps.setMeasureStation(model.getBaseSpotNo());
-                    ps.setMeasureStationName(model.getBaseSpotName());
-                    this.preTrackScaleMapper.updateByPrimaryKeySelective(ps);
-                }
-
+//                if (StringUtils.isNotEmpty(model.getPredictionNo())
+//                        && model.getPredictionNo().length() > 10) {
+//                    PreTrackScale ps = new PreTrackScale();
+//                    ps.setPredictionNo(model.getPredictionNo());
+//                    ps.setValueFlag(DbConstants.IN); //预报调整为使用中
+//                    ps.setUploadFlag("1");
+//                    ps.setMeasureStation(model.getBaseSpotNo());
+//                    ps.setMeasureStationName(model.getBaseSpotName());
+//                    this.preTrackScaleMapper.updateByPrimaryKeySelective(ps);
+//                }
                 num++;
                 num++;
             }
             }
             return num;
             return num;
@@ -778,6 +786,7 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             pts.setUpdateManName(userName);
             pts.setUpdateManName(userName);
             pts.setValueFlag(DbConstants.IN); //2021年5月24日  预报直接就写成【使用中】
             pts.setValueFlag(DbConstants.IN); //2021年5月24日  预报直接就写成【使用中】
             pts.setUploadFlag("1");
             pts.setUploadFlag("1");
+            pts.setPredictionType("1");
             pts.setMeasureStation(model.getBaseSpotNo());
             pts.setMeasureStation(model.getBaseSpotNo());
             pts.setMeasureStationName(model.getBaseSpotName());
             pts.setMeasureStationName(model.getBaseSpotName());
             preTrackScaleMapper.updateByPrimaryKeySelective(pts);
             preTrackScaleMapper.updateByPrimaryKeySelective(pts);

+ 35 - 11
src/main/java/com/steerinfo/meterwork/meterworkmonitor/mapper/MeterWorkMonitorMapper.xml

@@ -64,6 +64,7 @@
     <result column="ZERO_STATE" jdbcType="VARCHAR" property="zeroState" />
     <result column="ZERO_STATE" jdbcType="VARCHAR" property="zeroState" />
     <result column="ZERO_WEIGHT" jdbcType="DECIMAL" property="zeroWeight" />
     <result column="ZERO_WEIGHT" jdbcType="DECIMAL" property="zeroWeight" />
     <result column="IS_ZERO_STATE" jdbcType="VARCHAR" property="isZeroState" />
     <result column="IS_ZERO_STATE" jdbcType="VARCHAR" property="isZeroState" />
+    <result column="IS_VALID_SCAN" jdbcType="VARCHAR" property="isValidScan" />
   </resultMap>
   </resultMap>
   <sql id="columns">
   <sql id="columns">
     POINT_NO, POINT_NAME, VALID_WGT, VALID_CARNO, VALID_TARE_TIME, VALID_TIME_INTERVAL, 
     POINT_NO, POINT_NAME, VALID_WGT, VALID_CARNO, VALID_TARE_TIME, VALID_TIME_INTERVAL, 
@@ -76,7 +77,7 @@
     LEFT_INFRARED_RAY_STATE, RIGHT_INFRARED_RAY_STATE, AMPLIFIER_STATE, LAMP_STATE, SPOT_TYPE_NO, 
     LEFT_INFRARED_RAY_STATE, RIGHT_INFRARED_RAY_STATE, AMPLIFIER_STATE, LAMP_STATE, SPOT_TYPE_NO, 
     RED_GREEN_LIGHT_STATE, FRONT_INFRARED_RAY_STATE, REAR_INFRARED_RAY_STATE, RFID_STATE, 
     RED_GREEN_LIGHT_STATE, FRONT_INFRARED_RAY_STATE, REAR_INFRARED_RAY_STATE, RFID_STATE, 
     VALID_AREA, WEIGHT_STATUS, FERROALLOY_CONFIRM, FERROALLOY_RESULT, ZERO_STATE, ZERO_WEIGHT, 
     VALID_AREA, WEIGHT_STATUS, FERROALLOY_CONFIRM, FERROALLOY_RESULT, ZERO_STATE, ZERO_WEIGHT, 
-    IS_ZERO_STATE
+    IS_ZERO_STATE, IS_VALID_SCAN
   </sql>
   </sql>
   <sql id="columns_alias">
   <sql id="columns_alias">
     t.POINT_NO, t.POINT_NAME, t.VALID_WGT, t.VALID_CARNO, t.VALID_TARE_TIME, t.VALID_TIME_INTERVAL, 
     t.POINT_NO, t.POINT_NAME, t.VALID_WGT, t.VALID_CARNO, t.VALID_TARE_TIME, t.VALID_TIME_INTERVAL, 
@@ -90,7 +91,7 @@
     t.RIGHT_INFRARED_RAY_STATE, t.AMPLIFIER_STATE, t.LAMP_STATE, t.SPOT_TYPE_NO, t.RED_GREEN_LIGHT_STATE, 
     t.RIGHT_INFRARED_RAY_STATE, t.AMPLIFIER_STATE, t.LAMP_STATE, t.SPOT_TYPE_NO, t.RED_GREEN_LIGHT_STATE, 
     t.FRONT_INFRARED_RAY_STATE, t.REAR_INFRARED_RAY_STATE, t.RFID_STATE, t.VALID_AREA, 
     t.FRONT_INFRARED_RAY_STATE, t.REAR_INFRARED_RAY_STATE, t.RFID_STATE, t.VALID_AREA, 
     t.WEIGHT_STATUS, t.FERROALLOY_CONFIRM, t.FERROALLOY_RESULT, t.ZERO_STATE, t.ZERO_WEIGHT, 
     t.WEIGHT_STATUS, t.FERROALLOY_CONFIRM, t.FERROALLOY_RESULT, t.ZERO_STATE, t.ZERO_WEIGHT, 
-    t.IS_ZERO_STATE
+    t.IS_ZERO_STATE, t.IS_VALID_SCAN
   </sql>
   </sql>
   <sql id="select">
   <sql id="select">
     SELECT <include refid="columns" /> FROM METER_WORK_MONITOR
     SELECT <include refid="columns" /> FROM METER_WORK_MONITOR
@@ -286,6 +287,9 @@
       <if test="isZeroState != null and isZeroState != ''">
       <if test="isZeroState != null and isZeroState != ''">
         and IS_ZERO_STATE = #{isZeroState}
         and IS_ZERO_STATE = #{isZeroState}
       </if>
       </if>
+      <if test="isValidScan != null and isValidScan != ''">
+        and IS_VALID_SCAN = #{isValidScan}
+      </if>
     </where>
     </where>
   </sql>
   </sql>
   <sql id="whereLike">
   <sql id="whereLike">
@@ -476,6 +480,9 @@
       <if test="isZeroState != null and isZeroState != ''">
       <if test="isZeroState != null and isZeroState != ''">
         and IS_ZERO_STATE LIKE '%${isZeroState}%'
         and IS_ZERO_STATE LIKE '%${isZeroState}%'
       </if>
       </if>
+      <if test="isValidScan != null and isValidScan != ''">
+        and IS_VALID_SCAN LIKE '%${isValidScan}%'
+      </if>
     </where>
     </where>
   </sql>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
@@ -668,6 +675,9 @@
       <if test="isZeroState != null and isZeroState != ''">
       <if test="isZeroState != null and isZeroState != ''">
         or IS_ZERO_STATE = #{isZeroState}
         or IS_ZERO_STATE = #{isZeroState}
       </if>
       </if>
+      <if test="isValidScan != null and isValidScan != ''">
+        or IS_VALID_SCAN = #{isValidScan}
+      </if>
   </delete>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.meterwork.meterworkmonitor.model.MeterWorkMonitor">
   <insert id="insert" parameterType="com.steerinfo.meterwork.meterworkmonitor.model.MeterWorkMonitor">
     insert into METER_WORK_MONITOR (POINT_NO, POINT_NAME, VALID_WGT, 
     insert into METER_WORK_MONITOR (POINT_NO, POINT_NAME, VALID_WGT, 
@@ -690,8 +700,8 @@
       RED_GREEN_LIGHT_STATE, FRONT_INFRARED_RAY_STATE, 
       RED_GREEN_LIGHT_STATE, FRONT_INFRARED_RAY_STATE, 
       REAR_INFRARED_RAY_STATE, RFID_STATE, VALID_AREA, 
       REAR_INFRARED_RAY_STATE, RFID_STATE, VALID_AREA, 
       WEIGHT_STATUS, FERROALLOY_CONFIRM, FERROALLOY_RESULT, 
       WEIGHT_STATUS, FERROALLOY_CONFIRM, FERROALLOY_RESULT, 
-      ZERO_STATE, ZERO_WEIGHT, IS_ZERO_STATE
-      )
+      ZERO_STATE, ZERO_WEIGHT, IS_ZERO_STATE, 
+      IS_VALID_SCAN)
     values (#{pointNo,jdbcType=VARCHAR}, #{pointName,jdbcType=VARCHAR}, #{validWgt,jdbcType=VARCHAR}, 
     values (#{pointNo,jdbcType=VARCHAR}, #{pointName,jdbcType=VARCHAR}, #{validWgt,jdbcType=VARCHAR}, 
       #{validCarno,jdbcType=VARCHAR}, #{validTareTime,jdbcType=VARCHAR}, #{validTimeInterval,jdbcType=VARCHAR}, 
       #{validCarno,jdbcType=VARCHAR}, #{validTareTime,jdbcType=VARCHAR}, #{validTimeInterval,jdbcType=VARCHAR}, 
       #{validParkStatus,jdbcType=VARCHAR}, #{validExceedWgt,jdbcType=VARCHAR}, #{validPredictionDiff,jdbcType=VARCHAR}, 
       #{validParkStatus,jdbcType=VARCHAR}, #{validExceedWgt,jdbcType=VARCHAR}, #{validPredictionDiff,jdbcType=VARCHAR}, 
@@ -712,8 +722,8 @@
       #{redGreenLightState,jdbcType=VARCHAR}, #{frontInfraredRayState,jdbcType=VARCHAR}, 
       #{redGreenLightState,jdbcType=VARCHAR}, #{frontInfraredRayState,jdbcType=VARCHAR}, 
       #{rearInfraredRayState,jdbcType=VARCHAR}, #{rfidState,jdbcType=VARCHAR}, #{validArea,jdbcType=VARCHAR}, 
       #{rearInfraredRayState,jdbcType=VARCHAR}, #{rfidState,jdbcType=VARCHAR}, #{validArea,jdbcType=VARCHAR}, 
       #{weightStatus,jdbcType=VARCHAR}, #{ferroalloyConfirm,jdbcType=VARCHAR}, #{ferroalloyResult,jdbcType=VARCHAR}, 
       #{weightStatus,jdbcType=VARCHAR}, #{ferroalloyConfirm,jdbcType=VARCHAR}, #{ferroalloyResult,jdbcType=VARCHAR}, 
-      #{zeroState,jdbcType=VARCHAR}, #{zeroWeight,jdbcType=DECIMAL}, #{isZeroState,jdbcType=VARCHAR}
-      )
+      #{zeroState,jdbcType=VARCHAR}, #{zeroWeight,jdbcType=DECIMAL}, #{isZeroState,jdbcType=VARCHAR}, 
+      #{isValidScan,jdbcType=VARCHAR})
   </insert>
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkmonitor.model.MeterWorkMonitor">
   <insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkmonitor.model.MeterWorkMonitor">
     insert into METER_WORK_MONITOR
     insert into METER_WORK_MONITOR
@@ -904,6 +914,9 @@
       <if test="isZeroState != null">
       <if test="isZeroState != null">
         IS_ZERO_STATE,
         IS_ZERO_STATE,
       </if>
       </if>
+      <if test="isValidScan != null">
+        IS_VALID_SCAN,
+      </if>
     </trim>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="pointNo != null">
       <if test="pointNo != null">
@@ -1092,6 +1105,9 @@
       <if test="isZeroState != null">
       <if test="isZeroState != null">
         #{isZeroState,jdbcType=VARCHAR},
         #{isZeroState,jdbcType=VARCHAR},
       </if>
       </if>
+      <if test="isValidScan != null">
+        #{isValidScan,jdbcType=VARCHAR},
+      </if>
     </trim>
     </trim>
   </insert>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.meterwork.meterworkmonitor.model.MeterWorkMonitor">
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.meterwork.meterworkmonitor.model.MeterWorkMonitor">
@@ -1156,7 +1172,8 @@
       FERROALLOY_RESULT = #{ferroalloyResult,jdbcType=VARCHAR},
       FERROALLOY_RESULT = #{ferroalloyResult,jdbcType=VARCHAR},
       ZERO_STATE = #{zeroState,jdbcType=VARCHAR},
       ZERO_STATE = #{zeroState,jdbcType=VARCHAR},
       ZERO_WEIGHT = #{zeroWeight,jdbcType=DECIMAL},
       ZERO_WEIGHT = #{zeroWeight,jdbcType=DECIMAL},
-      IS_ZERO_STATE = #{isZeroState,jdbcType=VARCHAR}
+      IS_ZERO_STATE = #{isZeroState,jdbcType=VARCHAR},
+      IS_VALID_SCAN = #{isValidScan,jdbcType=VARCHAR}
     where POINT_NO = #{pointNo,jdbcType=VARCHAR}
     where POINT_NO = #{pointNo,jdbcType=VARCHAR}
   </update>
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkmonitor.model.MeterWorkMonitor">
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkmonitor.model.MeterWorkMonitor">
@@ -1345,6 +1362,9 @@
       <if test="isZeroState != null">
       <if test="isZeroState != null">
         IS_ZERO_STATE = #{isZeroState,jdbcType=VARCHAR},
         IS_ZERO_STATE = #{isZeroState,jdbcType=VARCHAR},
       </if>
       </if>
+      <if test="isValidScan != null">
+        IS_VALID_SCAN = #{isValidScan,jdbcType=VARCHAR},
+      </if>
     </set>
     </set>
     where POINT_NO = #{pointNo,jdbcType=VARCHAR}
     where POINT_NO = #{pointNo,jdbcType=VARCHAR}
   </update>
   </update>
@@ -1385,8 +1405,8 @@
       FRONT_INFRARED_RAY_STATE, REAR_INFRARED_RAY_STATE, 
       FRONT_INFRARED_RAY_STATE, REAR_INFRARED_RAY_STATE, 
       RFID_STATE, VALID_AREA, WEIGHT_STATUS, 
       RFID_STATE, VALID_AREA, WEIGHT_STATUS, 
       FERROALLOY_CONFIRM, FERROALLOY_RESULT, 
       FERROALLOY_CONFIRM, FERROALLOY_RESULT, 
-      ZERO_STATE, ZERO_WEIGHT, IS_ZERO_STATE
-      )
+      ZERO_STATE, ZERO_WEIGHT, IS_ZERO_STATE, 
+      IS_VALID_SCAN)
     ( <foreach collection="list" item="item" separator="union all"> 
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
    select  
       #{item.pointNo,jdbcType=VARCHAR}, 
       #{item.pointNo,jdbcType=VARCHAR}, 
@@ -1412,8 +1432,8 @@
       #{item.frontInfraredRayState,jdbcType=VARCHAR}, #{item.rearInfraredRayState,jdbcType=VARCHAR}, 
       #{item.frontInfraredRayState,jdbcType=VARCHAR}, #{item.rearInfraredRayState,jdbcType=VARCHAR}, 
       #{item.rfidState,jdbcType=VARCHAR}, #{item.validArea,jdbcType=VARCHAR}, #{item.weightStatus,jdbcType=VARCHAR}, 
       #{item.rfidState,jdbcType=VARCHAR}, #{item.validArea,jdbcType=VARCHAR}, #{item.weightStatus,jdbcType=VARCHAR}, 
       #{item.ferroalloyConfirm,jdbcType=VARCHAR}, #{item.ferroalloyResult,jdbcType=VARCHAR}, 
       #{item.ferroalloyConfirm,jdbcType=VARCHAR}, #{item.ferroalloyResult,jdbcType=VARCHAR}, 
-      #{item.zeroState,jdbcType=VARCHAR}, #{item.zeroWeight,jdbcType=DECIMAL}, #{item.isZeroState,jdbcType=VARCHAR}
-       from dual  
+      #{item.zeroState,jdbcType=VARCHAR}, #{item.zeroWeight,jdbcType=DECIMAL}, #{item.isZeroState,jdbcType=VARCHAR}, 
+      #{item.isValidScan,jdbcType=VARCHAR} from dual  
    </foreach> )
    </foreach> )
   </insert>
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
   <update id="batchUpdate" parameterType="java.util.List">
@@ -1667,6 +1687,10 @@
        <foreach close="end" collection="list" index="index" item="item" open="case POINT_NO" separator=" ">
        <foreach close="end" collection="list" index="index" item="item" open="case POINT_NO" separator=" ">
           when #{item.pointNo,jdbcType=VARCHAR} then #{item.isZeroState,jdbcType=VARCHAR}
           when #{item.pointNo,jdbcType=VARCHAR} then #{item.isZeroState,jdbcType=VARCHAR}
        </foreach>
        </foreach>
+       ,IS_VALID_SCAN=
+       <foreach close="end" collection="list" index="index" item="item" open="case POINT_NO" separator=" ">
+          when #{item.pointNo,jdbcType=VARCHAR} then #{item.isValidScan,jdbcType=VARCHAR}
+       </foreach>
      where POINT_NO in 
      where POINT_NO in 
      <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
      <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
     #{item.pointNo,jdbcType=VARCHAR}
     #{item.pointNo,jdbcType=VARCHAR}

+ 19 - 1
src/main/java/com/steerinfo/meterwork/meterworkmonitor/model/MeterWorkMonitor.java

@@ -3,6 +3,7 @@ package com.steerinfo.meterwork.meterworkmonitor.model;
 import com.steerinfo.framework.model.IBasePO;
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
+
 import java.util.Date;
 import java.util.Date;
 
 
 @ApiModel(value="计量监控表")
 @ApiModel(value="计量监控表")
@@ -379,6 +380,12 @@ public class MeterWorkMonitor implements IBasePO<String> {
     @ApiModelProperty(value="验证零点报警    0:不验证   1:验证",required=false)
     @ApiModelProperty(value="验证零点报警    0:不验证   1:验证",required=false)
     private String isZeroState;
     private String isZeroState;
 
 
+    /**
+     * 允许扫码计量(0:允许;1:不允许,数据库默认为1)(IS_VALID_SCAN,VARCHAR,1)
+     */
+    @ApiModelProperty(value="允许扫码计量(0:允许;1:不允许,数据库默认为1)",required=false)
+    private String isValidScan;
+
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
 
 
     @Override
     @Override
@@ -887,11 +894,19 @@ public class MeterWorkMonitor implements IBasePO<String> {
         this.isZeroState = isZeroState == null ? null : isZeroState.trim();
         this.isZeroState = isZeroState == null ? null : isZeroState.trim();
     }
     }
 
 
+    public String getIsValidScan() {
+        return isValidScan;
+    }
+
+    public void setIsValidScan(String isValidScan) {
+        this.isValidScan = isValidScan == null ? null : isValidScan.trim();
+    }
+
     public MeterWorkMonitor() {
     public MeterWorkMonitor() {
 
 
     }
     }
 
 
-    public MeterWorkMonitor(String pointNo, String pointName, String validWgt, String validCarno, String validTareTime, String validTimeInterval, String validParkStatus, String validExceedWgt, String validPredictionDiff, String validFlag, String validMatTime, String carMonitor, Short carMonitorLvl, String isHelp, String isTakeOver, String ledWriter, Short printNum, String collectionCode, String isOverWgt, String userNo, String monitorUserNo, String setCar, String ledKeep, String rfidCar, String photoCar, String scanCar, String editCar, String carErr, String wgtErr, Date lastTime, String stopOverTime, String msgInfo, Long wgt, String isRemote, String weighInstrumentModel, String weighInstrumentParam, String moxaIp, String moxaPort, String validLianda, String isOpenScanning, String validIsPre, String userIp, String powerState, String dvrState, String moxaState, String plcState, String leftInfraredRayState, String rightInfraredRayState, String amplifierState, String lampState, String spotTypeNo, String redGreenLightState, String frontInfraredRayState, String rearInfraredRayState, String rfidState, String validArea, String weightStatus, String ferroalloyConfirm, String ferroalloyResult, String zeroState, short zeroWeight, String isZeroState) {
+    public MeterWorkMonitor(String pointNo, String pointName, String validWgt, String validCarno, String validTareTime, String validTimeInterval, String validParkStatus, String validExceedWgt, String validPredictionDiff, String validFlag, String validMatTime, String carMonitor, Short carMonitorLvl, String isHelp, String isTakeOver, String ledWriter, Short printNum, String collectionCode, String isOverWgt, String userNo, String monitorUserNo, String setCar, String ledKeep, String rfidCar, String photoCar, String scanCar, String editCar, String carErr, String wgtErr, Date lastTime, String stopOverTime, String msgInfo, Long wgt, String isRemote, String weighInstrumentModel, String weighInstrumentParam, String moxaIp, String moxaPort, String validLianda, String isOpenScanning, String validIsPre, String userIp, String powerState, String dvrState, String moxaState, String plcState, String leftInfraredRayState, String rightInfraredRayState, String amplifierState, String lampState, String spotTypeNo, String redGreenLightState, String frontInfraredRayState, String rearInfraredRayState, String rfidState, String validArea, String weightStatus, String ferroalloyConfirm, String ferroalloyResult, String zeroState, short zeroWeight, String isZeroState, String isvalidScan) {
         this.pointNo = pointNo;
         this.pointNo = pointNo;
         this.pointName = pointName;
         this.pointName = pointName;
         this.validWgt = validWgt;
         this.validWgt = validWgt;
@@ -954,6 +969,7 @@ public class MeterWorkMonitor implements IBasePO<String> {
         this.zeroState = zeroState;
         this.zeroState = zeroState;
         this.zeroWeight = zeroWeight;
         this.zeroWeight = zeroWeight;
         this.isZeroState = isZeroState;
         this.isZeroState = isZeroState;
+        this.isValidScan = isvalidScan;
     }
     }
 
 
     public MeterWorkMonitor(MeterWorkMonitor meterWorkMonitor) {
     public MeterWorkMonitor(MeterWorkMonitor meterWorkMonitor) {
@@ -1019,6 +1035,7 @@ public class MeterWorkMonitor implements IBasePO<String> {
         this.zeroState = meterWorkMonitor.zeroState;
         this.zeroState = meterWorkMonitor.zeroState;
         this.zeroWeight = meterWorkMonitor.zeroWeight;
         this.zeroWeight = meterWorkMonitor.zeroWeight;
         this.isZeroState = meterWorkMonitor.isZeroState;
         this.isZeroState = meterWorkMonitor.isZeroState;
+        this.isValidScan = meterWorkMonitor.isValidScan;
     }
     }
 
 
     @Override
     @Override
@@ -1089,6 +1106,7 @@ public class MeterWorkMonitor implements IBasePO<String> {
         sb.append(", zeroState=").append(zeroState);
         sb.append(", zeroState=").append(zeroState);
         sb.append(", zeroWeight=").append(zeroWeight);
         sb.append(", zeroWeight=").append(zeroWeight);
         sb.append(", isZeroState=").append(isZeroState);
         sb.append(", isZeroState=").append(isZeroState);
+        sb.append(", isValidScan=").append(isValidScan);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         sb.append("]");
         return sb.toString();
         return sb.toString();

+ 5 - 2
src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/mapper/MeterWorkRailwayActFirstMapper.xml

@@ -3552,8 +3552,11 @@
       <if test="valueFlag != null and valueFlag != ''">
       <if test="valueFlag != null and valueFlag != ''">
         and  value_flag = #{valueFlag}
         and  value_flag = #{valueFlag}
       </if>
       </if>
-      <if test="startTime != null and startTime != null and endTime != '' and endTime != ''">
-        and  CREATE_TIME  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and CREATE_TIME  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+      <if test="startTime != null and startTime != ''">
+        and  CREATE_TIME  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
+      </if>
+      <if test="endTime != null and endTime != ''">
+        and CREATE_TIME  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
       </if>
       </if>
       and railway_type_no in ('001019003', '001019005')
       and railway_type_no in ('001019003', '001019005')
     </where>
     </where>

+ 29 - 28
src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/service/impl/MeterWorkRailwayActFirstServiceImpl.java

@@ -437,19 +437,19 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
             logModel.setOperationCarnNo(model.getRailwayNo());
             logModel.setOperationCarnNo(model.getRailwayNo());
             meterBaseOperationLogMapper.insertSelective(logModel);
             meterBaseOperationLogMapper.insertSelective(logModel);
 
 
-            if (model.getPredictionNo() != null && StringUtils.isNotEmpty(model.getPredictionNo())) {
-                PreRailwayScale scale = preRailwayScaleMapper.selectByPrimaryKey(model.getPredictionNo());
-                if (scale != null && StringUtils.isNotEmpty(scale.getPredictionNo())) {
-                    scale.setPredictionNo(model.getPredictionNo());
-                    scale.setUpdateTime(new Date());
-                    scale.setUpdateManName(model.getUpdateManName());
-                    scale.setUpdateManNo(model.getUpdateManNo());
-                    scale.setpValueFlag(scale.getValueFlag());
-                    scale.setValueFlag("3");
-                    scale.setUploadFlag("1");
-                    preRailwayScaleMapper.updateByPrimaryKeySelective(scale);
-                }
-            }
+//            if (model.getPredictionNo() != null && StringUtils.isNotEmpty(model.getPredictionNo())) {
+//                PreRailwayScale scale = preRailwayScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+//                if (scale != null && StringUtils.isNotEmpty(scale.getPredictionNo())) {
+//                    scale.setPredictionNo(model.getPredictionNo());
+//                    scale.setUpdateTime(new Date());
+//                    scale.setUpdateManName(model.getUpdateManName());
+//                    scale.setUpdateManNo(model.getUpdateManNo());
+//                    scale.setpValueFlag(scale.getValueFlag());
+//                    scale.setValueFlag("3");
+//                    scale.setUploadFlag("1");
+//                    preRailwayScaleMapper.updateByPrimaryKeySelective(scale);
+//                }
+//            }
             
             
             return num;
             return num;
         } catch (MarkerMetException e) {
         } catch (MarkerMetException e) {
@@ -521,21 +521,21 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
             logModel.setOperationCarnNo(model.getRailwayNo());
             logModel.setOperationCarnNo(model.getRailwayNo());
             meterBaseOperationLogMapper.insertSelective(logModel);
             meterBaseOperationLogMapper.insertSelective(logModel);
 
 
-            if (StringUtils.isNotEmpty(model.getPredictionNo())) {
-                PreRailwayScale scale = preRailwayScaleMapper.selectByPrimaryKey(model.getPredictionNo());
-                if (scale != null && StringUtils.isNotEmpty(scale.getPredictionNo())) {
-                    scale.setPredictionNo(model.getPredictionNo());
-                    scale.setUpdateTime(new Date());
-                    scale.setUpdateManName(model.getUpdateManName());
-                    scale.setUpdateManNo(model.getUpdateManNo());
-                    scale.setpValueFlag(scale.getValueFlag());
-                    scale.setValueFlag("4");
-                    scale.setUploadFlag("1");
-                    scale.setMeasureStation(model.getBaseSpotNo());
-                    scale.setMeasureStationName(model.getBaseSpotName());
-                    preRailwayScaleMapper.updateByPrimaryKeySelective(scale);
-                }
-            }
+//            if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+//                PreRailwayScale scale = preRailwayScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+//                if (scale != null && StringUtils.isNotEmpty(scale.getPredictionNo())) {
+//                    scale.setPredictionNo(model.getPredictionNo());
+//                    scale.setUpdateTime(new Date());
+//                    scale.setUpdateManName(model.getUpdateManName());
+//                    scale.setUpdateManNo(model.getUpdateManNo());
+//                    scale.setpValueFlag(scale.getValueFlag());
+//                    scale.setValueFlag("4");
+//                    scale.setUploadFlag("1");
+//                    scale.setMeasureStation(model.getBaseSpotNo());
+//                    scale.setMeasureStationName(model.getBaseSpotName());
+//                    preRailwayScaleMapper.updateByPrimaryKeySelective(scale);
+//                }
+//            }
             return num;
             return num;
         } catch (MarkerMetException e) {
         } catch (MarkerMetException e) {
             throw e;
             throw e;
@@ -3664,6 +3664,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
             prs.setValueFlag(DbConstants.IN); //使用中
             prs.setValueFlag(DbConstants.IN); //使用中
 //            prs.setValueFlag("2"); //已使用
 //            prs.setValueFlag("2"); //已使用
             prs.setUploadFlag("1");
             prs.setUploadFlag("1");
+            prs.setPredictionType("1");
             prs.setUpdateManNo(userId);
             prs.setUpdateManNo(userId);
             prs.setUpdateManName(userName);
             prs.setUpdateManName(userName);
             prs.setUpdateTime(new Date());
             prs.setUpdateTime(new Date());

+ 23 - 12
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/impl/MeterWorkRailwayActualServiceImpl.java

@@ -900,6 +900,7 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
         if (StringUtils.isNotEmpty(predictionNo)) {
         if (StringUtils.isNotEmpty(predictionNo)) {
             PreRailwayScale scale = new PreRailwayScale();
             PreRailwayScale scale = new PreRailwayScale();
             scale.setPredictionNo(predictionNo);
             scale.setPredictionNo(predictionNo);
+            scale.setPredictionType("1");
             scale.setValueFlag("2");
             scale.setValueFlag("2");
             scale.setUploadFlag("1");
             scale.setUploadFlag("1");
             scale.setUpdateTime(new Date());
             scale.setUpdateTime(new Date());
@@ -1146,6 +1147,16 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
                 if(model.getPredictionNo() != null && StringUtils.isNotEmpty(model.getPredictionNo())) {
                 if(model.getPredictionNo() != null && StringUtils.isNotEmpty(model.getPredictionNo())) {
                     throw new MarkerMetException(500, "结净数据已匹配委托,请撤销委托之后才能进行毛皮分解");
                     throw new MarkerMetException(500, "结净数据已匹配委托,请撤销委托之后才能进行毛皮分解");
                 }
                 }
+                //毛重
+                MeterWorkRailwayActFirst mwcaf1 = meterWorkRailwayActFirstMapper.selectByPrimaryKey(model.getActualFirst1No());
+                if(mwcaf1 != null && StringUtils.isNotEmpty(mwcaf1.getPredictionNo())) {
+                    throw new MarkerMetException(500, "请将一次数据作业编号" +mwcaf1.getActualFirstNo() +"解除委托之后在毛皮分解");
+                }
+                //皮重
+                MeterWorkRailwayActFirst mwcaf2 = meterWorkRailwayActFirstMapper.selectByPrimaryKey(model.getActualFirst2No());
+                if(mwcaf2 != null && StringUtils.isNotEmpty(mwcaf2.getPredictionNo())) {
+                    throw new MarkerMetException(500, "请将一次数据作业编号"+ mwcaf2.getActualFirstNo() +"解除委托之后在毛皮分解");
+                }
 //                if (StringUtils.isNotEmpty(model.getPredictionNo())) {
 //                if (StringUtils.isNotEmpty(model.getPredictionNo())) {
 //                    PreRailwayScale scaleTemp = preRailwayScaleMapper.selectByPrimaryKey(model.getPredictionNo());
 //                    PreRailwayScale scaleTemp = preRailwayScaleMapper.selectByPrimaryKey(model.getPredictionNo());
 //                    if(scaleTemp.getValueFlag().equals("9")) {
 //                    if(scaleTemp.getValueFlag().equals("9")) {
@@ -1228,18 +1239,18 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
                     }
                     }
 //                }
 //                }
 
 
-                if (StringUtils.isNotEmpty(model.getPredictionNo())) {
-                    PreRailwayScale scale = new PreRailwayScale();
-                    scale.setPredictionNo(model.getPredictionNo());
-                    scale.setValueFlag("1"); //使用中
-                    scale.setUploadFlag("1");
-//                    scale.setUpdateManNo("system");
-//                    scale.setUpdateManName("静态衡解除操作");
-                    scale.setUpdateManNo(userId);
-                    scale.setUpdateManName(userName);
-                    scale.setUpdateTime(new Date());
-                    preRailwayScaleMapper.updateByPrimaryKeySelective(scale);
-                }
+//                if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+//                    PreRailwayScale scale = new PreRailwayScale();
+//                    scale.setPredictionNo(model.getPredictionNo());
+//                    scale.setValueFlag("1"); //使用中
+//                    scale.setUploadFlag("1");
+////                    scale.setUpdateManNo("system");
+////                    scale.setUpdateManName("静态衡解除操作");
+//                    scale.setUpdateManNo(userId);
+//                    scale.setUpdateManName(userName);
+//                    scale.setUpdateTime(new Date());
+//                    preRailwayScaleMapper.updateByPrimaryKeySelective(scale);
+//                }
 //                meterWorkRailwayActualMapper.deleteByPrimaryKey(model.getActualNo());
 //                meterWorkRailwayActualMapper.deleteByPrimaryKey(model.getActualNo());
                 MeterBaseOperationLog logModel = new MeterBaseOperationLog();
                 MeterBaseOperationLog logModel = new MeterBaseOperationLog();
                 logModel.setId(PublicMethod.IdCreate(2));
                 logModel.setId(PublicMethod.IdCreate(2));

+ 5 - 1
src/main/java/com/steerinfo/meterwork/meterworkscheduledhelp/mapper/MeterWorkScheduledHelpMapper.xml

@@ -523,6 +523,7 @@
     <include refid="select"/>
     <include refid="select"/>
     where 1 = 1
     where 1 = 1
     and warm_type in ('1', '2', '3', '8')
     and warm_type in ('1', '2', '3', '8')
+    and help_content != '1'
     <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
     <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
       and  create_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and create_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
       and  create_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and create_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
     </if>
     </if>
@@ -538,7 +539,10 @@
     <include refid="select"/>
     <include refid="select"/>
     where 1 = 1
     where 1 = 1
     and warm_type in ('1', '2', '3', '8')
     and warm_type in ('1', '2', '3', '8')
-    and help_content != '正常数采识别'
+    and help_content != '1'
+    <if test="warmType != null and warmType != ''">
+      and WARM_TYPE LIKE '%${warmType}%'
+    </if>
     <if test="valueFlag != null and valueFlag != ''">
     <if test="valueFlag != null and valueFlag != ''">
       and  value_flag like '%${valueFlag}%'
       and  value_flag like '%${valueFlag}%'
     </if>
     </if>