Your Name 3 vuotta sitten
vanhempi
commit
087d95a0ae

+ 19 - 3
pom.xml

@@ -94,8 +94,21 @@
             <artifactId>framework</artifactId>
             <version>1.0</version>
         </dependency>
-
-
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.75</version>
+        </dependency>
+        <dependency>
+            <groupId>dom4j</groupId>
+            <artifactId>dom4j</artifactId>
+            <version>1.6.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jdom</groupId>
+            <artifactId>jdom2</artifactId>
+            <version>2.0.6</version>
+        </dependency>
     </dependencies>
     <build>
         <plugins>
@@ -111,7 +124,10 @@
                     <!--包名-->
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
-                        <table>rms_car_driver</table>
+<!--                        <table>rms_car_driver</table>-->
+<!--                        <table>RMS_SHIPPER</table>-->
+<!--                        <table>RMS_CARRIER</table>-->
+                        <table>TMSTRUCK_WEIGHT_RESULT</table>
                     </tables>
                 </configuration>
                 <executions>

+ 9 - 19
src/main/java/com/steerinfo/dil/controller/TmsTruckQualityResultController.java

@@ -1,19 +1,18 @@
 package com.steerinfo.dil.controller;
 
-import com.steerinfo.dil.model.TmstruckQualityResult;
 import com.steerinfo.dil.service.impl.TmsTruckQualityService;
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 import io.swagger.annotations.ApiModelProperty;
+import org.dom4j.DocumentException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.math.BigDecimal;
-import java.util.HashMap;
-import java.util.Map;
+import java.io.IOException;
+
 
 /**
  * @author luobang
@@ -27,22 +26,13 @@ public class TmsTruckQualityResultController extends BaseRESTfulController {
     TmsTruckQualityService tmsTruckQualityService;
 
 
-
     @ApiModelProperty(value = "发送磅单号,接收质检实绩信息")
-    @PostMapping("/insertQualityResult")
+    @GetMapping("/insert")
     @Transactional
-    public RESTfulResult addQualityResult(String resultPoundNo){
-
-        //业务逻辑:xms传入磅单号
-        //将磅单号key转成质检需要的key值
-        String WzInputId =resultPoundNo;
-        //调用质检系统接口,把磅单号传入
-
-        //接收返回值。map类型,一个个get出来
-        Map<String, Object> map1 = new HashMap<>();
-//        TmstruckQualityResult tmstruckQualityResult = new TmstruckQualityResult();
-        //根据磅单号更新质检实绩
-        tmsTruckQualityService.updateQuality(map1);
+    public RESTfulResult addQualityResult() throws IOException, DocumentException {
+
+        tmsTruckQualityService.insertQualityResult();
+
         return success();
     }
 }

+ 0 - 1
src/main/java/com/steerinfo/dil/feign/TmstruckFeign.java

@@ -20,5 +20,4 @@ public interface TmstruckFeign {
 
     @PostMapping("api/logistics/TareApplyFor")
     Map<String,Object> pushWeightApply(Map<String, Object> map);
-
 }

+ 5 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckQualityResultMapper.java

@@ -10,6 +10,11 @@ import org.apache.ibatis.annotations.Mapper;
 
 @Mapper
 public interface TmstruckQualityResultMapper extends IBaseMapper<TmstruckQualityResult, BigDecimal> {
+
     int updateQuality(Map<String, Object> map1);
 
+    BigDecimal selectSamplePlaceId(String samplePlaceName);
+
+    BigDecimal Count();
+
 }

+ 5 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.java

@@ -3,6 +3,7 @@ package com.steerinfo.dil.mapper;
 import com.steerinfo.dil.model.TmstruckWeightResult;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import java.math.*;
+import java.util.List;
 import java.util.Map;
 
 import org.apache.ibatis.annotations.Mapper;
@@ -17,4 +18,8 @@ public interface TmstruckWeightResultMapper extends IBaseMapper<TmstruckWeightRe
     // 得到汽车衡id
     BigDecimal getTruckCalculateId(String resultCalculateNumber);
 
+    List<Map<String,Object>> selectWzInputId();
+
+    int updateWzInputId(String wzInputId);
+
 }

+ 3 - 3
src/main/java/com/steerinfo/dil/model/TmstruckQualityResult.java

@@ -30,7 +30,7 @@ public class TmstruckQualityResult implements IBasePO<BigDecimal> {
      * 原料扣减量(RESULT_DEDUCTION,DECIMAL,0)
      */
     @ApiModelProperty(value="原料扣减量",required=false)
-    private Short resultDeduction;
+    private BigDecimal resultDeduction;
 
     /**
      * 原料扣减说明(RESULT_DEDUCTION_DESCRIPTION,VARCHAR,50)
@@ -122,11 +122,11 @@ public class TmstruckQualityResult implements IBasePO<BigDecimal> {
         this.resultIssampling = resultIssampling == null ? null : resultIssampling.trim();
     }
 
-    public Short getResultDeduction() {
+    public BigDecimal getResultDeduction() {
         return resultDeduction;
     }
 
-    public void setResultDeduction(Short resultDeduction) {
+    public void setResultDeduction(BigDecimal resultDeduction) {
         this.resultDeduction = resultDeduction;
     }
 

+ 47 - 3
src/main/java/com/steerinfo/dil/model/TmstruckWeightResult.java

@@ -3,7 +3,6 @@ package com.steerinfo.dil.model;
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
-
 import java.math.BigDecimal;
 import java.util.Date;
 
@@ -22,9 +21,9 @@ public class TmstruckWeightResult implements IBasePO<BigDecimal> {
     private BigDecimal resultTotalId;
 
     /**
-     * 磅单号(计量单号)(RESULT_POUND_NO,VARCHAR,20)
+     * 磅单号(RESULT_POUND_NO,VARCHAR,20)
      */
-    @ApiModelProperty(value="磅单号(计量单号)",required=false)
+    @ApiModelProperty(value="磅单号",required=false)
     private String resultPoundNo;
 
     /**
@@ -111,6 +110,24 @@ public class TmstruckWeightResult implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="计皮点ID(汽车衡)",required=false)
     private BigDecimal resultTarePlaceId;
 
+    /**
+     * 物资ID(MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="物资ID",required=false)
+    private BigDecimal materialId;
+
+    /**
+     * 是否需要扣水扣杂(0:否,1:是)(ISDEDUCT,DECIMAL,38)
+     */
+    @ApiModelProperty(value="是否需要扣水扣杂(0:否,1:是)",required=false)
+    private BigDecimal isdeduct;
+
+    /**
+     * 是否完成扣水扣杂(0:否,1:是)(ISQUALITY,DECIMAL,38)
+     */
+    @ApiModelProperty(value="是否完成扣水扣杂(0:否,1:是)",required=false)
+    private BigDecimal isquality;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -259,6 +276,30 @@ public class TmstruckWeightResult implements IBasePO<BigDecimal> {
         this.resultTarePlaceId = resultTarePlaceId;
     }
 
+    public BigDecimal getMaterialId() {
+        return materialId;
+    }
+
+    public void setMaterialId(BigDecimal materialId) {
+        this.materialId = materialId;
+    }
+
+    public BigDecimal getIsdeduct() {
+        return isdeduct;
+    }
+
+    public void setIsdeduct(BigDecimal isdeduct) {
+        this.isdeduct = isdeduct;
+    }
+
+    public BigDecimal getIsquality() {
+        return isquality;
+    }
+
+    public void setIsquality(BigDecimal isquality) {
+        this.isquality = isquality;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -282,6 +323,9 @@ public class TmstruckWeightResult implements IBasePO<BigDecimal> {
         sb.append(", deleteTime=").append(deleteTime);
         sb.append(", resultGrossPlaceId=").append(resultGrossPlaceId);
         sb.append(", resultTarePlaceId=").append(resultTarePlaceId);
+        sb.append(", materialId=").append(materialId);
+        sb.append(", isdeduct=").append(isdeduct);
+        sb.append(", isquality=").append(isquality);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 3 - 3
src/main/java/com/steerinfo/dil/service/ITmsTruckQualityResultService.java

@@ -1,7 +1,9 @@
 package com.steerinfo.dil.service;
 
 import com.steerinfo.dil.model.TmstruckQualityResult;
+import org.dom4j.DocumentException;
 
+import java.io.IOException;
 import java.math.BigDecimal;
 import java.util.Map;
 
@@ -10,7 +12,5 @@ import java.util.Map;
  * @create 2021-10-27 14:27
  */
 public interface ITmsTruckQualityResultService {
-    TmstruckQualityResult selectResult(BigDecimal bigDecimal);
-
-    int updateQuality(Map<String, Object> map1);
+    int insertQualityResult() throws IOException, DocumentException;
 }

+ 93 - 7
src/main/java/com/steerinfo/dil/service/impl/TmsTruckQualityService.java

@@ -1,14 +1,28 @@
 package com.steerinfo.dil.service.impl;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.steerinfo.dil.mapper.TmstruckQualityResultMapper;
+import com.steerinfo.dil.mapper.TmstruckWeightResultMapper;
 import com.steerinfo.dil.model.TmstruckQualityResult;
 import com.steerinfo.dil.service.ITmsTruckQualityResultService;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.util.EntityUtils;
+import org.dom4j.DocumentException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import com.steerinfo.dil.util.XmlToJsonUtil;
+import java.io.IOException;
 import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
 import java.util.Map;
-
 /**
  * @author luobang
  * @create 2021-10-27 14:28
@@ -17,14 +31,86 @@ import java.util.Map;
 public class TmsTruckQualityService implements ITmsTruckQualityResultService {
     @Autowired
     TmstruckQualityResultMapper tmstruckQualityResultMapper;
+    @Autowired
+    TmstruckWeightResultMapper tmstruckWeightResultMapper;
 
     @Override
-    public TmstruckQualityResult selectResult(BigDecimal bigDecimal) {
-        return tmstruckQualityResultMapper.selectByPrimaryKey(bigDecimal);
-    }
+    public int insertQualityResult() throws IOException, DocumentException {
+        //先查出所有没有质检实绩的磅单号
+        List<Map<String,Object>>mapList=tmstruckWeightResultMapper.selectWzInputId();
+        System.out.println(mapList);
+        System.out.println(mapList);
+        if (mapList.size()!=0){
+            for (Map<String,Object> map:mapList
+            ) {
+                String  WzInputId=(String) map.get("WzInputId");
+                BigDecimal  resultTotalId= (BigDecimal) map.get("resultTotalId");
+                //		1. 创建 HttpClient 的实例
+                CloseableHttpClient httpClient = HttpClientBuilder.create().build();
+                //		2. 创建某种连接方法的实例
+                HttpGet httpGet = new HttpGet("http://172.16.33.106:40003/DG_Interface.asmx/Get_Quality_Info?WzInputId="+WzInputId);
+                //		3. 调用第一步中创建好的实例的execute方法来执行第二步中创建好的链接类实例
+                HttpResponse httpResponse = httpClient.execute(httpGet);
+                //		4. 读response获取HttpEntity
+                if (httpResponse.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
+                    HttpEntity entity = httpResponse.getEntity();
+                    System.out.println(entity);
+                //		5. 对得到后的内容进行处理
+                    String result = EntityUtils.toString(entity, "utf-8");
+                    System.out.println(result);
+                    try {
+                        JSONObject object = XmlToJsonUtil.xmlToJson(result);
+                        System.out.println("-----object------");
+                        System.out.println(object);
+                        Map<String, Object>map1 = (Map<String, Object>) object.get("JsonResult");
+                        System.out.println(map1);
+                        List mapList2= JSON.parseArray((String) map1.get("jsonResult"));
+                        List<Map<String,Object>>mapList9=mapList2;
+                        for (Map<String,Object> map3:mapList9
+                        ) {
+                            //质检说明
+                            String DeductionDescription=(String)map3.get("DEDUCT_SEASON");
+                            //铁路专用线
+                            String samplePlaceName=(String) map3.get("SAMPLE_PLACE_NAME");
+                            //查询卸货点ID
+                            BigDecimal SamplePlaceId=tmstruckQualityResultMapper.selectSamplePlaceId(samplePlaceName);
+                            //扣水扣杂量
 
-    @Override
-    public int updateQuality(Map<String, Object> map1) {
-        return tmstruckQualityResultMapper.updateQuality(map1);
+                            BigDecimal Deduction= new BigDecimal(Integer.parseInt(String.valueOf(map3.get("DEDUCT_NUMBER"))));
+                            //抽样时间
+                           Date sampleDate= new Date((String)(map3.get("SAMPLE_DATE")));
+                            //根据磅单号修改相应的质检实绩
+                            TmstruckQualityResult tmstruckQualityResult = new TmstruckQualityResult();
+                            //主键ID
+                            tmstruckQualityResult.setId(tmstruckQualityResultMapper.Count());
+                            tmstruckQualityResult.setInsertTime(new Date());
+                            tmstruckQualityResult.setInsertUsername("质检系统-物流系统");
+                            tmstruckQualityResult.setInsertUpdateRemark("原料质检实绩");
+                            //总实绩ID
+                            tmstruckQualityResult.setTotalResultId(resultTotalId);
+                            //卸货点
+                            tmstruckQualityResult.setResultSamplingPointId(SamplePlaceId);
+                            //输入抽样时间
+                            tmstruckQualityResult.setResultSamplingTime(sampleDate);
+                            //输入扣水扣杂量
+                            tmstruckQualityResult.setResultDeduction(Deduction);
+                            tmstruckQualityResult.setResultDeductionDescription(DeductionDescription);
+                            tmstruckQualityResultMapper.insertSelective(tmstruckQualityResult);
+                            //更新计重实绩表中的是否质检完成字段
+                            tmstruckWeightResultMapper.updateWzInputId(WzInputId);
+                        }
+                    } catch (DocumentException e) {
+                        e.printStackTrace();
+                    }
+
+                    EntityUtils.consume(entity);
+                } else {
+                    System.err.println(httpResponse.getStatusLine());
+                }
+//		6. 释放连接。无论执行方法是否成功,都必须释放连接
+                httpClient.close();
+            }
+        }
+        return 1;
     }
 }

+ 85 - 0
src/main/java/com/steerinfo/dil/util/XmlToJsonUtil.java

@@ -0,0 +1,85 @@
+package com.steerinfo.dil.util;
+
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import java.util.List;
+
+/**
+ * @author luobang
+ * @create 2021-11-13 10:40
+ */
+public class XmlToJsonUtil {
+        /**
+         * 将xml转换为json对象
+         */
+        public static JSONObject xmlToJson(String xml) throws DocumentException {
+            JSONObject jsonObject = new JSONObject();
+            Document document = DocumentHelper.parseText(xml);
+            //获取根节点元素对象
+            Element root = document.getRootElement();
+            iterateNodes(root, jsonObject);
+            return jsonObject;
+        }
+
+        /**
+         * 遍历元素
+         * @param node
+         * @param json
+         */
+        private static void iterateNodes(Element node, JSONObject json) {
+            //获取当前元素名称
+            String nodeName = node.getName();
+            //判断已遍历的JSON中是否已经有了该元素的名称
+            if(json.containsKey(nodeName)){
+                //该元素在同级下有多个
+                Object Object = json.get(nodeName);
+                JSONArray array = null;
+                if(Object instanceof JSONArray){
+                    array = (JSONArray) Object;
+                }else {
+                    array = new JSONArray();
+                    array.add(Object);
+                }
+                //获取该元素下所有子元素
+                List<Element> listElement = node.elements();
+                if(listElement.isEmpty()){
+                    //该元素无子元素,获取元素的值
+                    String nodeValue = node.getTextTrim();
+                    array.add(nodeValue);
+                    json.put(nodeName, array);
+                    return ;
+                }
+                //有子元素
+                JSONObject newJson = new JSONObject();
+                //遍历所有子元素
+                for(Element e:listElement){
+                    //递归
+                    iterateNodes(e,newJson);
+                }
+                array.add(newJson);
+                json.put(nodeName, array);
+                return ;
+            }
+            //该元素同级下第一次遍历
+            //获取该元素下所有子元素
+            List<Element> listElement = node.elements();
+            if(listElement.isEmpty()){
+                //该元素无子元素,获取元素的值
+                String nodeValue = node.getTextTrim();
+                json.put(nodeName, nodeValue);
+                return ;
+            }
+            //有子节点,新建一个JSONObject来存储该节点下子节点的值
+            JSONObject object = new JSONObject();
+            for(Element e:listElement){
+                //递归
+                iterateNodes(e,object);
+            }
+            json.put(nodeName, object);
+            return ;
+        }
+}

+ 11 - 2
src/main/resources/com/steerinfo/dil/mapper/TmstruckQualityResultMapper.xml

@@ -331,6 +331,7 @@
     <include refid="select"/>
     <include refid="whereLike"/>
   </select>
+
   <insert id="batchInsert" parameterType="java.util.List">
     insert into TMSTRUCK_QUALITY_RESULT 
       (RESULT_ID, 
@@ -433,7 +434,15 @@
     set
       tt.RESULT_DEDUCTION=#{deductNumber},
       tt.RESULT_DEDUCTION_DESCRIPTION=#{deductSeason},
-      tt.RESULT_SAMPLING_TIME=#{sampleDate}
-      tt.RESULT_SAMPLING_POINT_ID=#{SamplePlaceName}
+      tt.RESULT_SAMPLING_TIME=#{sampleDate},
+      tt.RESULT_SAMPLING_POINT_ID=#{SamplePlaceId}
   </update>
+
+  <select id="selectSamplePlaceId" resultType="java.math.BigDecimal">
+    select rw.WAREHOUSE_ID from RMS_WAREHOUSE rw
+    where rw.WAREHOUSE_NAME =#{samplePlaceName}
+  </select>
+  <select id="Count" resultType="java.math.BigDecimal">
+    select max(tqr.RESULT_ID)+1 from TMSTRUCK_QUALITY_RESULT tqr
+  </select>
 </mapper>

+ 162 - 104
src/main/resources/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.xml

@@ -2,45 +2,45 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.steerinfo.dil.mapper.TmstruckWeightResultMapper">
     <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckWeightResult">
-        <id column="WEIGHT_TASK_RESULT_ID" jdbcType="DECIMAL" property="weightTaskResultId"/>
-        <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId"/>
-        <result column="RESULT_POUND_NO" jdbcType="VARCHAR" property="resultPoundNo"/>
-        <result column="RESULT_GROSS_WEIGHT" jdbcType="DECIMAL" property="resultGrossWeight"/>
-        <result column="RESULT_GROSS_WEIGHT_TIME" jdbcType="TIMESTAMP" property="resultGrossWeightTime"/>
-        <result column="RESULT_TARE_WEIGHT" jdbcType="DECIMAL" property="resultTareWeight"/>
-        <result column="RESULT_TARE_WEIGHT_TIME" jdbcType="TIMESTAMP" property="resultTareWeightTime"/>
-        <result column="RESULT_NET_WEIGHT" jdbcType="DECIMAL" property="resultNetWeight"/>
-        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
-        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
-        <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername"/>
-        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
-        <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark"/>
-        <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName"/>
-        <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime"/>
-        <result column="RESULT_GROSS_PLACE_ID" jdbcType="DECIMAL" property="resultGrossPlaceId"/>
-        <result column="RESULT_TARE_PLACE_ID" jdbcType="DECIMAL" property="resultTarePlaceId"/>
+        <id column="WEIGHT_TASK_RESULT_ID" jdbcType="DECIMAL" property="weightTaskResultId" />
+        <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
+        <result column="RESULT_POUND_NO" jdbcType="VARCHAR" property="resultPoundNo" />
+        <result column="RESULT_GROSS_WEIGHT" jdbcType="DECIMAL" property="resultGrossWeight" />
+        <result column="RESULT_GROSS_WEIGHT_TIME" jdbcType="TIMESTAMP" property="resultGrossWeightTime" />
+        <result column="RESULT_TARE_WEIGHT" jdbcType="DECIMAL" property="resultTareWeight" />
+        <result column="RESULT_TARE_WEIGHT_TIME" jdbcType="TIMESTAMP" property="resultTareWeightTime" />
+        <result column="RESULT_NET_WEIGHT" jdbcType="DECIMAL" property="resultNetWeight" />
+        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+        <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+        <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+        <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName" />
+        <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
+        <result column="RESULT_GROSS_PLACE_ID" jdbcType="DECIMAL" property="resultGrossPlaceId" />
+        <result column="RESULT_TARE_PLACE_ID" jdbcType="DECIMAL" property="resultTarePlaceId" />
+        <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
+        <result column="ISDEDUCT" jdbcType="DECIMAL" property="isdeduct" />
+        <result column="ISQUALITY" jdbcType="DECIMAL" property="isquality" />
     </resultMap>
     <sql id="columns">
         WEIGHT_TASK_RESULT_ID, RESULT_TOTAL_ID, RESULT_POUND_NO, RESULT_GROSS_WEIGHT, RESULT_GROSS_WEIGHT_TIME,
-    RESULT_TARE_WEIGHT, RESULT_TARE_WEIGHT_TIME, RESULT_NET_WEIGHT, INSERT_USERNAME, 
-    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETE_NAME, DELETE_TIME, 
-    RESULT_GROSS_PLACE_ID, RESULT_TARE_PLACE_ID
+    RESULT_TARE_WEIGHT, RESULT_TARE_WEIGHT_TIME, RESULT_NET_WEIGHT, INSERT_USERNAME,
+    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETE_NAME, DELETE_TIME,
+    RESULT_GROSS_PLACE_ID, RESULT_TARE_PLACE_ID, MATERIAL_ID, ISDEDUCT, ISQUALITY
     </sql>
     <sql id="columns_alias">
         t.WEIGHT_TASK_RESULT_ID, t.RESULT_TOTAL_ID, t.RESULT_POUND_NO, t.RESULT_GROSS_WEIGHT,
-    t.RESULT_GROSS_WEIGHT_TIME, t.RESULT_TARE_WEIGHT, t.RESULT_TARE_WEIGHT_TIME, t.RESULT_NET_WEIGHT, 
-    t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, 
-    t.DELETE_NAME, t.DELETE_TIME, t.RESULT_GROSS_PLACE_ID, t.RESULT_TARE_PLACE_ID
+    t.RESULT_GROSS_WEIGHT_TIME, t.RESULT_TARE_WEIGHT, t.RESULT_TARE_WEIGHT_TIME, t.RESULT_NET_WEIGHT,
+    t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK,
+    t.DELETE_NAME, t.DELETE_TIME, t.RESULT_GROSS_PLACE_ID, t.RESULT_TARE_PLACE_ID, t.MATERIAL_ID,
+    t.ISDEDUCT, t.ISQUALITY
     </sql>
     <sql id="select">
-        SELECT
-        <include refid="columns"/>
-        FROM TMSTRUCK_WEIGHT_RESULT
+        SELECT <include refid="columns" /> FROM TMSTRUCK_WEIGHT_RESULT
     </sql>
     <sql id="select_alias">
-        SELECT
-        <include refid="columns_alias"/>
-        FROM TMSTRUCK_WEIGHT_RESULT t
+        SELECT <include refid="columns_alias" /> FROM TMSTRUCK_WEIGHT_RESULT t
     </sql>
     <sql id="where">
         <where>
@@ -95,6 +95,15 @@
             <if test="resultTarePlaceId != null">
                 and RESULT_TARE_PLACE_ID = #{resultTarePlaceId}
             </if>
+            <if test="materialId != null">
+                and MATERIAL_ID = #{materialId}
+            </if>
+            <if test="isdeduct != null">
+                and ISDEDUCT = #{isdeduct}
+            </if>
+            <if test="isquality != null">
+                and ISQUALITY = #{isquality}
+            </if>
         </where>
     </sql>
     <sql id="whereLike">
@@ -150,11 +159,19 @@
             <if test="resultTarePlaceId != null">
                 and RESULT_TARE_PLACE_ID = #{resultTarePlaceId}
             </if>
+            <if test="materialId != null">
+                and MATERIAL_ID = #{materialId}
+            </if>
+            <if test="isdeduct != null">
+                and ISDEDUCT = #{isdeduct}
+            </if>
+            <if test="isquality != null">
+                and ISQUALITY = #{isquality}
+            </if>
         </where>
     </sql>
     <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
-        delete
-        from TMSTRUCK_WEIGHT_RESULT
+        delete from TMSTRUCK_WEIGHT_RESULT
         where WEIGHT_TASK_RESULT_ID = #{weightTaskResultId,jdbcType=DECIMAL}
     </delete>
     <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
@@ -208,6 +225,15 @@
         <if test="resultTarePlaceId != null">
             or RESULT_TARE_PLACE_ID = #{resultTarePlaceId}
         </if>
+        <if test="materialId != null">
+            or MATERIAL_ID = #{materialId}
+        </if>
+        <if test="isdeduct != null">
+            or ISDEDUCT = #{isdeduct}
+        </if>
+        <if test="isquality != null">
+            or ISQUALITY = #{isquality}
+        </if>
     </delete>
     <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckWeightResult">
         insert into TMSTRUCK_WEIGHT_RESULT (WEIGHT_TASK_RESULT_ID, RESULT_TOTAL_ID,
@@ -216,18 +242,16 @@
                                             RESULT_NET_WEIGHT, INSERT_USERNAME, INSERT_TIME,
                                             UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
                                             DELETE_NAME, DELETE_TIME, RESULT_GROSS_PLACE_ID,
-                                            RESULT_TARE_PLACE_ID)
+                                            RESULT_TARE_PLACE_ID, MATERIAL_ID, ISDEDUCT,
+                                            ISQUALITY)
         values (#{weightTaskResultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL},
-                #{resultPoundNo,jdbcType=VARCHAR}, #{resultGrossWeight,jdbcType=DECIMAL},
-                #{resultGrossWeightTime,jdbcType=TIMESTAMP},
+                #{resultPoundNo,jdbcType=VARCHAR}, #{resultGrossWeight,jdbcType=DECIMAL}, #{resultGrossWeightTime,jdbcType=TIMESTAMP},
                 #{resultTareWeight,jdbcType=DECIMAL}, #{resultTareWeightTime,jdbcType=TIMESTAMP},
-                #{resultNetWeight,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR},
-                #{insertTime,jdbcType=TIMESTAMP},
-                #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
-                #{insertUpdateRemark,jdbcType=VARCHAR},
-                #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP},
-                #{resultGrossPlaceId,jdbcType=DECIMAL},
-                #{resultTarePlaceId,jdbcType=DECIMAL})
+                #{resultNetWeight,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
+                #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
+                #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, #{resultGrossPlaceId,jdbcType=DECIMAL},
+                #{resultTarePlaceId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL}, #{isdeduct,jdbcType=DECIMAL},
+                #{isquality,jdbcType=DECIMAL})
     </insert>
     <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckWeightResult">
         insert into TMSTRUCK_WEIGHT_RESULT
@@ -283,6 +307,15 @@
             <if test="resultTarePlaceId != null">
                 RESULT_TARE_PLACE_ID,
             </if>
+            <if test="materialId != null">
+                MATERIAL_ID,
+            </if>
+            <if test="isdeduct != null">
+                ISDEDUCT,
+            </if>
+            <if test="isquality != null">
+                ISQUALITY,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="weightTaskResultId != null">
@@ -336,26 +369,38 @@
             <if test="resultTarePlaceId != null">
                 #{resultTarePlaceId,jdbcType=DECIMAL},
             </if>
+            <if test="materialId != null">
+                #{materialId,jdbcType=DECIMAL},
+            </if>
+            <if test="isdeduct != null">
+                #{isdeduct,jdbcType=DECIMAL},
+            </if>
+            <if test="isquality != null">
+                #{isquality,jdbcType=DECIMAL},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckWeightResult">
         update TMSTRUCK_WEIGHT_RESULT
-        set RESULT_TOTAL_ID          = #{resultTotalId,jdbcType=DECIMAL},
-            RESULT_POUND_NO          = #{resultPoundNo,jdbcType=VARCHAR},
-            RESULT_GROSS_WEIGHT      = #{resultGrossWeight,jdbcType=DECIMAL},
+        set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+            RESULT_POUND_NO = #{resultPoundNo,jdbcType=VARCHAR},
+            RESULT_GROSS_WEIGHT = #{resultGrossWeight,jdbcType=DECIMAL},
             RESULT_GROSS_WEIGHT_TIME = #{resultGrossWeightTime,jdbcType=TIMESTAMP},
-            RESULT_TARE_WEIGHT       = #{resultTareWeight,jdbcType=DECIMAL},
-            RESULT_TARE_WEIGHT_TIME  = #{resultTareWeightTime,jdbcType=TIMESTAMP},
-            RESULT_NET_WEIGHT        = #{resultNetWeight,jdbcType=DECIMAL},
-            INSERT_USERNAME          = #{insertUsername,jdbcType=VARCHAR},
-            INSERT_TIME              = #{insertTime,jdbcType=TIMESTAMP},
-            UPDATE_USERNAME          = #{updateUsername,jdbcType=VARCHAR},
-            UPDATE_TIME              = #{updateTime,jdbcType=TIMESTAMP},
-            INSERT_UPDATE_REMARK     = #{insertUpdateRemark,jdbcType=VARCHAR},
-            DELETE_NAME              = #{deleteName,jdbcType=VARCHAR},
-            DELETE_TIME              = #{deleteTime,jdbcType=TIMESTAMP},
-            RESULT_GROSS_PLACE_ID    = #{resultGrossPlaceId,jdbcType=DECIMAL},
-            RESULT_TARE_PLACE_ID     = #{resultTarePlaceId,jdbcType=DECIMAL}
+            RESULT_TARE_WEIGHT = #{resultTareWeight,jdbcType=DECIMAL},
+            RESULT_TARE_WEIGHT_TIME = #{resultTareWeightTime,jdbcType=TIMESTAMP},
+            RESULT_NET_WEIGHT = #{resultNetWeight,jdbcType=DECIMAL},
+            INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+            INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+            UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+            UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+            INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+            DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
+            DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
+            RESULT_GROSS_PLACE_ID = #{resultGrossPlaceId,jdbcType=DECIMAL},
+            RESULT_TARE_PLACE_ID = #{resultTarePlaceId,jdbcType=DECIMAL},
+            MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+            ISDEDUCT = #{isdeduct,jdbcType=DECIMAL},
+            ISQUALITY = #{isquality,jdbcType=DECIMAL}
         where WEIGHT_TASK_RESULT_ID = #{weightTaskResultId,jdbcType=DECIMAL}
     </update>
     <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckWeightResult">
@@ -409,20 +454,29 @@
             <if test="resultTarePlaceId != null">
                 RESULT_TARE_PLACE_ID = #{resultTarePlaceId,jdbcType=DECIMAL},
             </if>
+            <if test="materialId != null">
+                MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+            </if>
+            <if test="isdeduct != null">
+                ISDEDUCT = #{isdeduct,jdbcType=DECIMAL},
+            </if>
+            <if test="isquality != null">
+                ISQUALITY = #{isquality,jdbcType=DECIMAL},
+            </if>
         </set>
         where WEIGHT_TASK_RESULT_ID = #{weightTaskResultId,jdbcType=DECIMAL}
     </update>
     <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
-        <include refid="select"/>
+        <include refid="select" />
         where WEIGHT_TASK_RESULT_ID = #{weightTaskResultId,jdbcType=DECIMAL}
     </select>
     <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-        <include refid="select"/>
-        <include refid="where"/>
+        <include refid="select" />
+        <include refid="where" />
     </select>
     <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-        <include refid="select"/>
-        <include refid="whereLike"/>
+        <include refid="select" />
+        <include refid="whereLike" />
     </select>
     <insert id="batchInsert" parameterType="java.util.List">
         insert into TMSTRUCK_WEIGHT_RESULT
@@ -434,7 +488,8 @@
         INSERT_TIME, UPDATE_USERNAME,
         UPDATE_TIME, INSERT_UPDATE_REMARK,
         DELETE_NAME, DELETE_TIME, RESULT_GROSS_PLACE_ID,
-        RESULT_TARE_PLACE_ID)
+        RESULT_TARE_PLACE_ID, MATERIAL_ID,
+        ISDEDUCT, ISQUALITY)
         ( <foreach collection="list" item="item" separator="union all">
         select
         #{item.weightTaskResultId,jdbcType=DECIMAL},
@@ -444,99 +499,94 @@
         #{item.resultNetWeight,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
         #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
         #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
-        #{item.deleteName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=TIMESTAMP},
-        #{item.resultGrossPlaceId,jdbcType=DECIMAL},
-        #{item.resultTarePlaceId,jdbcType=DECIMAL} from dual
+        #{item.deleteName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=TIMESTAMP}, #{item.resultGrossPlaceId,jdbcType=DECIMAL},
+        #{item.resultTarePlaceId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL},
+        #{item.isdeduct,jdbcType=DECIMAL}, #{item.isquality,jdbcType=DECIMAL} from dual
     </foreach> )
     </insert>
     <update id="batchUpdate" parameterType="java.util.List">
         update TMSTRUCK_WEIGHT_RESULT
         set
         WEIGHT_TASK_RESULT_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.weightTaskResultId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_TOTAL_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_POUND_NO=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultPoundNo,jdbcType=VARCHAR}
         </foreach>
         ,RESULT_GROSS_WEIGHT=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultGrossWeight,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_GROSS_WEIGHT_TIME=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultGrossWeightTime,jdbcType=TIMESTAMP}
         </foreach>
         ,RESULT_TARE_WEIGHT=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultTareWeight,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_TARE_WEIGHT_TIME=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultTareWeightTime,jdbcType=TIMESTAMP}
         </foreach>
         ,RESULT_NET_WEIGHT=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultNetWeight,jdbcType=DECIMAL}
         </foreach>
         ,INSERT_USERNAME=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
         </foreach>
         ,INSERT_TIME=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
         </foreach>
         ,UPDATE_USERNAME=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
         </foreach>
         ,UPDATE_TIME=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
         </foreach>
         ,INSERT_UPDATE_REMARK=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
         </foreach>
         ,DELETE_NAME=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
         </foreach>
         ,DELETE_TIME=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=TIMESTAMP}
         </foreach>
         ,RESULT_GROSS_PLACE_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultGrossPlaceId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_TARE_PLACE_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID"
-                 separator=" ">
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
             when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultTarePlaceId,jdbcType=DECIMAL}
         </foreach>
+        ,MATERIAL_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+            when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
+        </foreach>
+        ,ISDEDUCT=
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+            when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.isdeduct,jdbcType=DECIMAL}
+        </foreach>
+        ,ISQUALITY=
+        <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+            when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.isquality,jdbcType=DECIMAL}
+        </foreach>
         where WEIGHT_TASK_RESULT_ID in
         <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
             #{item.weightTaskResultId,jdbcType=DECIMAL}
@@ -549,12 +599,8 @@
             #{id}
         </foreach>
     </delete>
-    <!-- 友情提示!!!-->
     <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-
     <!-- 得到计重实绩主键id -->
-
-
     <!-- 得到汽车衡id -->
     <select id="getTruckCalculateId" parameterType="java.lang.String" resultType="DECIMAL">
         SELECT
@@ -572,5 +618,17 @@
         WHERE OO.ORDER_NUMBER = #{orderNumber,jdbcType=VARCHAR}
         and TWR.MATERIAL_ID=#{materialId,jdbcType=DECIMAL}
     </select>
-
+    <select id="selectWzInputId" resultType="java.util.Map">
+        select twr.RESULT_POUND_NO "WzInputId",
+               twr.RESULT_TOTAL_ID "resultTotalId"
+        from TMSTRUCK_WEIGHT_RESULT twr
+        where twr.ISDEDUCT=1
+        and
+        twr.ISQUALITY=0
+    </select>
+    <update id="updateWzInputId">
+        update TMSTRUCK_WEIGHT_RESULT twr
+        set twr.ISQUALITY=1
+        where twr.RESULT_POUND_NO=#{wzInputId}
+    </update>
 </mapper>