Browse Source

update join app

txf 3 years ago
parent
commit
f95a4ae680

+ 13 - 0
src/main/java/com/steerinfo/dil/mapper/TmstrainWeightResultMapper.java

@@ -0,0 +1,13 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.TmstrainWeightResult;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+
+@Mapper
+public interface TmstrainWeightResultMapper extends IBaseMapper<TmstrainWeightResult, BigDecimal> {
+    @Select("select seq_train_weight_result.nextval from dual")
+    BigDecimal selectMaxId();
+}

+ 348 - 0
src/main/java/com/steerinfo/dil/model/TmstrainWeightResult.java

@@ -0,0 +1,348 @@
+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;
+
+@ApiModel(value="火运计量实绩")
+public class TmstrainWeightResult implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(RESULT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal resultId;
+
+    /**
+     * 火运总实绩ID(RESULT_TOTAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="火运总实绩ID",required=false)
+    private BigDecimal resultTotalId;
+
+    /**
+     * 磅单号(RESULT_POUND_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="磅单号",required=false)
+    private String resultPoundNo;
+
+    /**
+     * 物资ID(MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="物资ID",required=false)
+    private BigDecimal materialId;
+
+    /**
+     * 计毛点(轨道衡ID)(RESULT_GROSS_PLACE_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="计毛点(轨道衡ID)",required=false)
+    private BigDecimal resultGrossPlaceId;
+
+    /**
+     * 毛重(保留两位小数)(RESULT_GROSS_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="毛重(保留两位小数)",required=false)
+    private BigDecimal resultGrossWeight;
+
+    /**
+     * 计毛重时间(RESULT_GROSS_WEIGHT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="计毛重时间",required=false)
+    private Date resultGrossWeightTime;
+
+    /**
+     * 计皮点(轨道衡ID)(RESULT_TARE_PLACE_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="计皮点(轨道衡ID)",required=false)
+    private BigDecimal resultTarePlaceId;
+
+    /**
+     * 皮重(保留两位小数)(RESULT_TARE_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="皮重(保留两位小数)",required=false)
+    private BigDecimal resultTareWeight;
+
+    /**
+     * 计皮重时间(RESULT_TARE_WEIGHT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="计皮重时间",required=false)
+    private Date resultTareWeightTime;
+
+    /**
+     * 净重(保留两位小数)(RESULT_NET_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="净重(保留两位小数)",required=false)
+    private BigDecimal resultNetWeight;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+
+    /**
+     * 废除人(DELETE_NAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="废除人",required=false)
+    private String deleteName;
+
+    /**
+     * 废除时间(DELETE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="废除时间",required=false)
+    private Date deleteTime;
+
+    /**
+     * 是否需要扣水扣杂(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;
+
+    /**
+     * 是否需要质检 0 不需要 1 :需要(RESULT_IS_QUALITY,DECIMAL,38)
+     */
+    @ApiModelProperty(value="是否需要质检 0 不需要 1 :需要",required=false)
+    private BigDecimal resultIsQuality;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.resultId;
+    }
+
+    @Override
+    public void setId(BigDecimal resultId) {
+        this.resultId = resultId;
+    }
+
+    public BigDecimal getResultId() {
+        return resultId;
+    }
+
+    public void setResultId(BigDecimal resultId) {
+        this.resultId = resultId;
+    }
+
+    public BigDecimal getResultTotalId() {
+        return resultTotalId;
+    }
+
+    public void setResultTotalId(BigDecimal resultTotalId) {
+        this.resultTotalId = resultTotalId;
+    }
+
+    public String getResultPoundNo() {
+        return resultPoundNo;
+    }
+
+    public void setResultPoundNo(String resultPoundNo) {
+        this.resultPoundNo = resultPoundNo == null ? null : resultPoundNo.trim();
+    }
+
+    public BigDecimal getMaterialId() {
+        return materialId;
+    }
+
+    public void setMaterialId(BigDecimal materialId) {
+        this.materialId = materialId;
+    }
+
+    public BigDecimal getResultGrossPlaceId() {
+        return resultGrossPlaceId;
+    }
+
+    public void setResultGrossPlaceId(BigDecimal resultGrossPlaceId) {
+        this.resultGrossPlaceId = resultGrossPlaceId;
+    }
+
+    public BigDecimal getResultGrossWeight() {
+        return resultGrossWeight;
+    }
+
+    public void setResultGrossWeight(BigDecimal resultGrossWeight) {
+        this.resultGrossWeight = resultGrossWeight;
+    }
+
+    public Date getResultGrossWeightTime() {
+        return resultGrossWeightTime;
+    }
+
+    public void setResultGrossWeightTime(Date resultGrossWeightTime) {
+        this.resultGrossWeightTime = resultGrossWeightTime;
+    }
+
+    public BigDecimal getResultTarePlaceId() {
+        return resultTarePlaceId;
+    }
+
+    public void setResultTarePlaceId(BigDecimal resultTarePlaceId) {
+        this.resultTarePlaceId = resultTarePlaceId;
+    }
+
+    public BigDecimal getResultTareWeight() {
+        return resultTareWeight;
+    }
+
+    public void setResultTareWeight(BigDecimal resultTareWeight) {
+        this.resultTareWeight = resultTareWeight;
+    }
+
+    public Date getResultTareWeightTime() {
+        return resultTareWeightTime;
+    }
+
+    public void setResultTareWeightTime(Date resultTareWeightTime) {
+        this.resultTareWeightTime = resultTareWeightTime;
+    }
+
+    public BigDecimal getResultNetWeight() {
+        return resultNetWeight;
+    }
+
+    public void setResultNetWeight(BigDecimal resultNetWeight) {
+        this.resultNetWeight = resultNetWeight;
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    public String getDeleteName() {
+        return deleteName;
+    }
+
+    public void setDeleteName(String deleteName) {
+        this.deleteName = deleteName == null ? null : deleteName.trim();
+    }
+
+    public Date getDeleteTime() {
+        return deleteTime;
+    }
+
+    public void setDeleteTime(Date deleteTime) {
+        this.deleteTime = deleteTime;
+    }
+
+    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;
+    }
+
+    public BigDecimal getResultIsQuality() {
+        return resultIsQuality;
+    }
+
+    public void setResultIsQuality(BigDecimal resultIsQuality) {
+        this.resultIsQuality = resultIsQuality;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", resultId=").append(resultId);
+        sb.append(", resultTotalId=").append(resultTotalId);
+        sb.append(", resultPoundNo=").append(resultPoundNo);
+        sb.append(", materialId=").append(materialId);
+        sb.append(", resultGrossPlaceId=").append(resultGrossPlaceId);
+        sb.append(", resultGrossWeight=").append(resultGrossWeight);
+        sb.append(", resultGrossWeightTime=").append(resultGrossWeightTime);
+        sb.append(", resultTarePlaceId=").append(resultTarePlaceId);
+        sb.append(", resultTareWeight=").append(resultTareWeight);
+        sb.append(", resultTareWeightTime=").append(resultTareWeightTime);
+        sb.append(", resultNetWeight=").append(resultNetWeight);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", deleteName=").append(deleteName);
+        sb.append(", deleteTime=").append(deleteTime);
+        sb.append(", isdeduct=").append(isdeduct);
+        sb.append(", isquality=").append(isquality);
+        sb.append(", resultIsQuality=").append(resultIsQuality);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 23 - 0
src/main/java/com/steerinfo/dil/service/ITmstrainWeightResultService.java

@@ -0,0 +1,23 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.dil.model.TmstrainWeightResult;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * TmstrainWeightResult服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-12-08 04:34
+ * 类描述
+ * 修订历史:
+ * 日期:2021-12-08
+ * 作者:generator
+ * 参考:
+ * 描述:TmstrainWeightResult服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ITmstrainWeightResultService{
+
+}

+ 32 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstrainWeightResultServiceImpl.java

@@ -0,0 +1,32 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.dil.model.TmstrainWeightResult;
+import com.steerinfo.dil.mapper.TmstrainWeightResultMapper;
+import com.steerinfo.dil.service.ITmstrainWeightResultService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * TmstrainWeightResult服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-12-08 04:34
+ * 类描述
+ * 修订历史:
+ * 日期:2021-12-08
+ * 作者:generator
+ * 参考:
+ * 描述:TmstrainWeightResult服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tmstrainWeightResultService")
+public class TmstrainWeightResultServiceImpl implements ITmstrainWeightResultService {
+
+    @Autowired
+    private TmstrainWeightResultMapper tmstrainWeightResultMapper;
+
+}

+ 123 - 20
src/main/java/com/steerinfo/dil/service/impl/TmstruckWeightResultServiceImpl.java

@@ -1,8 +1,10 @@
 package com.steerinfo.dil.service.impl;
 package com.steerinfo.dil.service.impl;
 
 
 import com.steerinfo.dil.feign.TmsFeign;
 import com.steerinfo.dil.feign.TmsFeign;
+import com.steerinfo.dil.mapper.TmstrainWeightResultMapper;
 import com.steerinfo.dil.mapper.TmstruckReceiptResultMapper;
 import com.steerinfo.dil.mapper.TmstruckReceiptResultMapper;
 import com.steerinfo.dil.mapper.UtilsMapper;
 import com.steerinfo.dil.mapper.UtilsMapper;
+import com.steerinfo.dil.model.TmstrainWeightResult;
 import com.steerinfo.dil.model.TmstruckReceiptResult;
 import com.steerinfo.dil.model.TmstruckReceiptResult;
 import com.steerinfo.dil.model.TmstruckWeightResult;
 import com.steerinfo.dil.model.TmstruckWeightResult;
 import com.steerinfo.dil.mapper.TmstruckWeightResultMapper;
 import com.steerinfo.dil.mapper.TmstruckWeightResultMapper;
@@ -51,6 +53,9 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
     @Autowired
     @Autowired
     TmstruckReceiptResultMapper tmstruckReceiptResultMapper;
     TmstruckReceiptResultMapper tmstruckReceiptResultMapper;
 
 
+    @Autowired
+    TmstrainWeightResultMapper tmstrainWeightResultMapper;
+
     /**
     /**
      * 接收计量实绩信息
      * 接收计量实绩信息
      *      "orderNumber":"WYSDD2021091000000002",
      *      "orderNumber":"WYSDD2021091000000002",
@@ -72,32 +77,49 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
         //遍历列表
         //遍历列表
         int count = 0;
         int count = 0;
         for (Map<String, Object> map : mapList) {
         for (Map<String, Object> map : mapList) {
-            //通过传来的运输订单号 与 物资ID查询计重实绩ID
-            Map<String, Object> stringObjectMap = tmstruckWeightResultMapper.selectTotalIdByOrderNo(map);
-            if(stringObjectMap == null){
-                throw new Exception(map.get("orderNumber") + "没有此订单信息或物资信息(" + map.get("materialId") + ")错误");
-            }
-            map.putAll(stringObjectMap);
-            TmstruckWeightResult tmstruckWeightResult = generateWeightResult(map);
-            count += tmstruckWeightResultMapper.updateByPrimaryKeySelective(tmstruckWeightResult);
-            BigDecimal orderType = DataChange.dataToBigDecimal(map.get("orderTypee"));
-            if("5678".contains(orderType.toString())){
-                if(map.get("resultTareWeightTime") != null ){
-                    //如果是采购订单 计皮后自动完成签收
-                    autoReceipt((String) map.get("orderNumber"));
-                }
+            String resultTareCalculateNumber = (String) map.get("resultTareCalculateNumber");
+            //如果计量衡名字中含有铁专线 则代表是轨道衡 走轨道衡路线
+            if(resultTareCalculateNumber.contains("铁专线")){
+                count += addTrainWeightResult(map);
+            }else {
+                //走汽车衡
+                count += addTruckWeightResult(map);
             }
             }
-            //路段顺序号+1
-            utilsService.updateOrderLineSequence(map);
-            //推送数据
-            utilsService.pushMesToWebsocket((String) stringObjectMap.get("capacityNumber"), "计量");
         }
         }
         return count;
         return count;
     }
     }
 
 
+    /**
+     * 添加汽车衡计量实绩
+     * @param map
+     * @return
+     */
+    public int addTruckWeightResult(Map<String, Object> map) throws Exception {
+        //通过传来的运输订单号 与 物资ID查询计重实绩ID
+        Map<String, Object> stringObjectMap = tmstruckWeightResultMapper.selectTotalIdByOrderNo(map);
+        if(stringObjectMap == null){
+            throw new Exception(map.get("orderNumber") + "没有此订单信息或物资信息(" + map.get("materialId") + ")错误");
+        }
+        map.putAll(stringObjectMap);
+        TmstruckWeightResult tmstruckWeightResult = generateWeightResult(map);
+        int i = tmstruckWeightResultMapper.updateByPrimaryKeySelective(tmstruckWeightResult);
+        BigDecimal orderType = DataChange.dataToBigDecimal(map.get("orderTypee"));
+        if("5678".contains(orderType.toString())){
+            if(map.get("resultTareWeightTime") != null ){
+                //如果是采购订单 计皮后自动完成签收
+                autoReceipt((String) map.get("orderNumber"));
+            }
+        }
+        //路段顺序号+1
+        utilsService.updateOrderLineSequence(map);
+        //推送数据
+        utilsService.pushMesToWebsocket((String) stringObjectMap.get("capacityNumber"), "计量");
+        return i;
+    }
+
 
 
     /**
     /**
-     * 生成计量实体类
+     * 生成汽运计量实体类
      * @param map
      * @param map
      * @return
      * @return
      */
      */
@@ -121,7 +143,7 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
                 if(tareId == null){
                 if(tareId == null){
                     throw new Exception("没有此汽车衡:" + map.get("resultTareCalculateNumber"));
                     throw new Exception("没有此汽车衡:" + map.get("resultTareCalculateNumber"));
                 }
                 }
-                tmstruckWeightResult.setResultTarePlaceId(new BigDecimal(tareId));
+                tmstruckWeightResult.setResultGrossPlaceId(new BigDecimal(tareId));
                 //设置毛重
                 //设置毛重
                 BigDecimal resultTareWeight = DataChange.dataToBigDecimal(map.get("resultTareWeight"));
                 BigDecimal resultTareWeight = DataChange.dataToBigDecimal(map.get("resultTareWeight"));
                 tmstruckWeightResult.setResultGrossWeight(resultTareWeight);
                 tmstruckWeightResult.setResultGrossWeight(resultTareWeight);
@@ -176,4 +198,85 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
         tmstruckReceiptResultMapper.updateByTotalResultId(tmstruckReceiptResult);
         tmstruckReceiptResultMapper.updateByTotalResultId(tmstruckReceiptResult);
         System.out.println(orderNumber + "收货成功");
         System.out.println(orderNumber + "收货成功");
     }
     }
+
+    /**
+     * 添加火车计量实绩
+     * @param map
+     * @return
+     */
+    public int addTrainWeightResult(Map<String, Object> map) throws Exception {
+        //通过****查询火运总实绩ID和物资ID --遗留问题
+        Map<String, Object> totalAndMaterialIdMap = null;
+        if(totalAndMaterialIdMap == null){
+            throw new Exception("没有此车皮信息");
+        }
+        TmstrainWeightResult tmstrainWeightResult = generateTrainWeightResult(map);
+        return tmstrainWeightResultMapper.insertSelective(tmstrainWeightResult);
+    }
+
+    /**
+     * 生成火运计量实体
+     * @param map
+     * @return
+     */
+    public TmstrainWeightResult generateTrainWeightResult(Map<String, Object> map) throws Exception {
+
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+        TmstrainWeightResult tmstrainWeightResult = new TmstrainWeightResult();
+        tmstrainWeightResult.setResultId(tmstrainWeightResultMapper.selectMaxId());
+        //添加火运总实绩ID
+        tmstrainWeightResult.setResultTotalId(DataChange.dataToBigDecimal(map.get("resultTotalId")));
+        //设置物资ID
+        tmstrainWeightResult.setMaterialId(DataChange.dataToBigDecimal(map.get("materialId")));
+        //如果没有计毛时间 则是第一次计量
+        String resultCrossWeightTime = (String) map.get("resultCrossWeightTime");
+        if(resultCrossWeightTime == null || resultCrossWeightTime.length() == 0){
+            //设置毛重时间
+            String firstTime = (String) map.get("resultTareWeightTime");
+            tmstrainWeightResult.setResultGrossWeightTime(sdf.parse(firstTime));
+            //添加毛重汽车衡
+            Integer tareId = tmstruckWeightResultMapper.selectTruckCalculateId((String) map.get("resultTareCalculateNumber"));
+            if(tareId == null){
+                throw new Exception("没有此汽车衡:" + map.get("resultTareCalculateNumber"));
+            }
+            tmstrainWeightResult.setResultTarePlaceId(new BigDecimal(tareId));
+            //设置毛重
+            BigDecimal resultTareWeight = DataChange.dataToBigDecimal(map.get("resultTareWeight"));
+            tmstrainWeightResult.setResultGrossWeight(resultTareWeight);
+            tmstrainWeightResult.setInsertTime(new Date());
+            tmstrainWeightResult.setInsertUsername("admin");
+        }else {
+            //设置皮重汽车衡
+            Integer tareId = tmstruckWeightResultMapper.selectTruckCalculateId((String) map.get("resultTareCalculateNumber"));
+            if(tareId == null){
+                throw new Exception("没有此皮重汽车衡:" + map.get("resultTareCalculateNumber"));
+            }
+            tmstrainWeightResult.setResultTarePlaceId(new BigDecimal(tareId));
+            //设置毛重汽车衡
+            Integer crossId = tmstruckWeightResultMapper.selectTruckCalculateId((String) map.get("resultCrossCalculateNumber"));
+            if(crossId == null){
+                throw new Exception("没有此毛重汽车衡:" + map.get("resultCrossCalculateNumber"));
+            }
+            tmstrainWeightResult.setResultGrossPlaceId(new BigDecimal(crossId));
+            //毛重
+            BigDecimal resultCrossWeight = DataChange.dataToBigDecimal(map.get("resultCrossWeight"));
+            tmstrainWeightResult.setResultGrossWeight(resultCrossWeight);
+            //皮重
+            BigDecimal resultTareWeight = DataChange.dataToBigDecimal(map.get("resultTareWeight"));
+            tmstrainWeightResult.setResultTareWeight(resultTareWeight);
+            //净重
+            tmstrainWeightResult.setResultNetWeight(DataChange.dataToBigDecimal(map.get("resultNetWeight")));
+            //设置皮重时间
+            String resultTareWeightTime = (String) map.get("resultTareWeightTime");
+            tmstrainWeightResult.setResultTareWeightTime(sdf.parse(resultTareWeightTime));
+            //设置毛重时间
+            String resultGrossWeightTime = (String) map.get("resultCrossWeightTime");
+            tmstrainWeightResult.setResultGrossWeightTime(sdf.parse(resultGrossWeightTime));
+            tmstrainWeightResult.setUpdateTime(new Date());
+            tmstrainWeightResult.setUpdateUsername("admin");
+        }
+        return tmstrainWeightResult;
+    }
+
+
 }
 }