Просмотр исходного кода

运输服务托运订单获取车辆运单字段修改

lengfaqiang 2 лет назад
Родитель
Сommit
99f6450638

+ 33 - 0
sckw-common/sckw-common-excel/src/main/java/com/sckw/excel/utils/ExcelUtil.java

@@ -164,6 +164,39 @@ public class ExcelUtil {
 
     }
 
+    //    private static void buildResponse(HttpServletResponse response, String fileName,HttpServletRequest request) throws UnsupportedEncodingException {
+//        response.reset();
+//        response.setContentType("application/octet-stream");
+//        response.setCharacterEncoding("utf-8");
+//        //解决不同浏览器压缩包名字含有中文时乱码的问题
+//        String agent = request.getHeader("USER-AGENT");
+//        try {
+//            if (agent.contains("MSIE") || agent.contains("Trident")) {
+//                fileName = java.net.URLEncoder.encode(fileName, "UTF-8");
+//            } else {
+//                fileName = new String(fileName.getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1);
+//            }
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//        fileName = URLEncoder.encode(fileName + "-" + DateUtil.dateToStr(LocalDate.now()), "UTF-8").replaceAll("\\+", "%20");
+//        response.setContentType("application/vnd.ms-excel");
+//        response.setCharacterEncoding("UTF-8");
+////        response.setHeader("Content-Disposition",String.format("attachment; filename=\"%s\"", fileName));
+//        response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
+//    }
+
+//    private static void buildResponse(HttpServletResponse response, String fileName, HttpServletRequest request) throws IOException {
+//        response.setContentType("application/vnd.ms-excel");
+//        response.setCharacterEncoding("utf-8");
+//        // 这里URLEncoder.encode可以防止中文乱码,所有通过后端的文件下载都可以如此处理
+//        fileName = URLEncoder.encode(fileName, "UTF-8");
+//        //建议加上该段,否则可能会出现前端无法获取Content-disposition
+//        response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
+//        response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
+////        EasyExcel.write(response.getOutputStream(), DownloadData.class).sheet("模板").doWrite(data());
+//    }
+
     /**
      * 解析表头类中的下拉注解
      *

+ 4 - 61
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/controller/ConsignOrderController.java

@@ -2,13 +2,8 @@ package com.sckw.transport.controller;
 
 import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.response.HttpResult;
-import com.sckw.excel.easyexcel.RequestHolder;
-import com.sckw.excel.utils.ExcelUtil;
 import com.sckw.transport.model.dto.OrderDto;
-import com.sckw.transport.model.param.ConsignOrderQuery;
-import com.sckw.transport.model.vo.ConsignOrderVo;
 import com.sckw.transport.service.ConsignOrderService;
-import jakarta.servlet.http.HttpServletResponse;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -18,8 +13,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.List;
-
 /**
  * @author lfdc
  * @description 托运订单controller
@@ -33,67 +26,17 @@ public class ConsignOrderController {
 
     @Autowired
     ConsignOrderService consignOrderService;
-
-    /**
-     * 托运订单首页条件查询
-     *
-     * @param query 查询参数
-     * @return
-     */
-    @RequestMapping(value = "/list", method = RequestMethod.GET)
-    public HttpResult acceptCarriageOrderList(ConsignOrderQuery query) {
-        try {
-            return consignOrderService.list(query);
-        } catch (Exception e) {
-            log.error("托运订单查询失败:{}", e.getMessage(), e);
-            return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, e.getMessage());
-        }
-    }
-
-    /**
-     * 托运订单top统计
-     *
-     * @param query
-     * @return
-     */
-    @RequestMapping(value = "/statistics", method = RequestMethod.GET)
-    public HttpResult statistics(ConsignOrderQuery query) {
-        try {
-            return consignOrderService.statistics(query);
-        } catch (Exception e) {
-            log.error("托运订单top统计失败:{}", e.getMessage(), e);
-            return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, e.getMessage());
-        }
-    }
-
-    /**
-     * 托运订单导出
-     *
-     * @param query 查询参数
-     * @return
-     */
-    @RequestMapping(value = "/export", method = RequestMethod.GET)
-    public HttpResult export(ConsignOrderQuery query) {
-        HttpServletResponse response = RequestHolder.getResponse();
-        List<ConsignOrderVo> list = consignOrderService.export(query);
-        if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
-            ExcelUtil.download(response, ConsignOrderVo.class, list);
-            return null;
-        }
-        return HttpResult.error("没有可导出的数据");
-    }
-
     /**
      * 托运订单获取车辆运单
      * @param orderDto
      * @return
      */
-    @RequestMapping(value = "getCarWaybillByOrder",method = RequestMethod.GET)
+    @RequestMapping(value = "/getCarWaybillByOrder",method = RequestMethod.GET)
     public HttpResult getCarWaybillByOrder( @Validated  @RequestBody OrderDto orderDto){
         try {
             return consignOrderService.getCarWaybillByOrder(orderDto);
         } catch (Exception e) {
-            log.error("托运订单获取车辆运单失败:订单id {},error {} ", e.getMessage(), e);
+            log.error("托运订单获取车辆运单失败:订单id {},error {} ",orderDto.getId(), e.getMessage(), e);
             return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, e.getMessage());
         }
     }
@@ -103,12 +46,12 @@ public class ConsignOrderController {
      * @param orderDto
      * @return
      */
-    @RequestMapping(value = "getCarListByOrder",method = RequestMethod.GET)
+    @RequestMapping(value = "/getCarListByOrder",method = RequestMethod.GET)
     public HttpResult getCarListByOrder(@Validated  @RequestBody OrderDto orderDto){
         try {
             return consignOrderService.getCarListByOrder(orderDto);
         } catch (Exception e) {
-            log.error("托运订单获取车辆运单失败:订单id {},error {} ", e.getMessage(), e);
+            log.error("托运订单获取车辆运单失败:订单id {},error {} ",orderDto.getId(), e.getMessage(), e);
             return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, e.getMessage());
         }
     }

+ 1 - 1
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/KwtLogisticsOrder.java

@@ -131,7 +131,7 @@ public class KwtLogisticsOrder implements Serializable {
     private BigDecimal ignoreAmount;
 
     /**
-     * 亏吨量
+     * 亏吨量(装货量-卸货量)
      */
     private BigDecimal deficitAmount;
 

+ 1 - 1
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/KwtLogisticsOrderCirculate.java

@@ -15,7 +15,7 @@ import java.util.Date;
  * @date 2023-06-26 16:06:12
  */
 @Data
-@TableName("sckw_transport.kwt_logistics_order_address")
+@TableName("sckw_transport.kwt_logistics_order_circulate")
 public class KwtLogisticsOrderCirculate implements Serializable {
     /**
      * 主键

+ 2 - 1
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/KwtWaybillOrder.java

@@ -15,7 +15,7 @@ import java.util.Date;
  * @date 2023-06-26 16:06:12
  */
 @Data
-@TableName("sckw_transport.kwt_logistics_order_address")
+@TableName("sckw_transport.kwt_waybill_order")
 public class KwtWaybillOrder implements Serializable {
     /**
      * 主键
@@ -36,6 +36,7 @@ public class KwtWaybillOrder implements Serializable {
      * 编号
      */
     private String wOrderNo;
+
     private String type;
 
     /**

+ 1 - 1
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/KwtWaybillOrderTicket.java

@@ -14,7 +14,7 @@ import java.util.Date;
  * @date 2023-06-26 16:06:12
  */
 @Data
-@TableName("sckw_transport.kwt_logistics_order_address")
+@TableName("sckw_transport.kwt_waybill_order_ticket")
 public class KwtWaybillOrderTicket implements Serializable {
     /**
      * 主键

+ 5 - 3
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/KwtWaybillOrderTrack.java

@@ -1,5 +1,6 @@
 package com.sckw.transport.model;
 
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
 
@@ -12,7 +13,7 @@ import java.util.Date;
  * @date 2023-06-26 16:06:12
  */
 @Data
-@TableName("sckw_transport.kwt_logistics_order_address")
+@TableName("sckw_transport.kwt_waybill_order_track")
 public class KwtWaybillOrderTrack implements Serializable {
     /**
      * 主键
@@ -32,7 +33,7 @@ public class KwtWaybillOrderTrack implements Serializable {
     /**
      * 用户状态(待受理、待运输、运输中、已完成、已取消)
      */
-    private Integer status;
+    private Integer status = 0;
 
     private Long createBy;
 
@@ -48,7 +49,8 @@ public class KwtWaybillOrderTrack implements Serializable {
     /**
      * 是否删除(0未删除,1删除)
      */
-    private Integer delFlag;
+    @TableLogic("0")
+    private Integer delFlag = 0;
 
     private static final long serialVersionUID = 1L;
 }

+ 1 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/CarWaybillVo.java

@@ -11,6 +11,7 @@ import lombok.experimental.Accessors;
 @Data
 @Accessors(chain = true)
 public class CarWaybillVo {
+    private String id;
 
     /**
      * 运单编号

+ 44 - 29
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/ConsignOrderService.java

@@ -80,29 +80,28 @@ public class ConsignOrderService {
 
     public HttpResult getCarWaybillByOrder(OrderDto orderDto) {
         List<CarWaybillVo> returnList = new ArrayList<>();
-        CarWaybillVo carWaybillVo = new CarWaybillVo();
         KwtLogisticsOrder order = kwtLogisticsOrderMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrder>()
-                .eq(StringUtils.isNotBlank(orderDto.getId()), KwtLogisticsOrder::getId, Long.parseLong(orderDto.getOrderNo()))
+                .eq(StringUtils.isNotBlank(orderDto.getId()), KwtLogisticsOrder::getId, Long.parseLong(orderDto.getId()))
                 .eq(StringUtils.isNotBlank(orderDto.getOrderNo()), KwtLogisticsOrder::getLOrderNo, orderDto.getOrderNo())
-                .eq(KwtLogisticsOrder::getEntId, LoginUserHolder.getEntId())
-                .eq(KwtLogisticsOrder::getDelFlag, NumberConstant.ZERO));
+                .eq(KwtLogisticsOrder::getEntId, LoginUserHolder.getEntId()));
         if (ObjectUtils.isEmpty(order)) {
             return HttpResult.ok(returnList);
         }
         List<KwtWaybillOrder> kwtWaybillOrders = kwtWaybillOrderMapper.selectList(new LambdaQueryWrapper<KwtWaybillOrder>()
                 .eq(StringUtils.isNotBlank(order.getId()), KwtWaybillOrder::getLOrderId, order.getId())
-                .eq(StringUtils.isNotBlank(orderDto.getOrderNo()), KwtWaybillOrder::getLOrderId, orderDto.getOrderNo()));
+                .eq(KwtWaybillOrder::getEntId, LoginUserHolder.getEntId()));
         if (CollectionUtils.isNotEmpty(kwtWaybillOrders)) {
             for (KwtWaybillOrder kwtWaybillOrder : kwtWaybillOrders) {
-                KwtWaybillOrderTrack kwtWaybillOrderTrack = kwtWaybillOrderTrackMapper.selectOne(new LambdaQueryWrapper<KwtWaybillOrderTrack>()
+                CarWaybillVo carWaybillVo = new CarWaybillVo();
+                KwtWaybillOrderTrack track = kwtWaybillOrderTrackMapper.selectOne(new LambdaQueryWrapper<KwtWaybillOrderTrack>()
                         .eq(StringUtils.isNotBlank(kwtWaybillOrder.getId()), KwtWaybillOrderTrack::getWOrderId, kwtWaybillOrder.getId()));
-                KwtWaybillOrderTicket loadKwtWaybillOrderTicket = kwtWaybillOrderTicketMapper.selectOne(new LambdaQueryWrapper<KwtWaybillOrderTicket>()
+                KwtWaybillOrderTicket loadTicket = kwtWaybillOrderTicketMapper.selectOne(new LambdaQueryWrapper<KwtWaybillOrderTicket>()
                         .eq(StringUtils.isNotBlank(kwtWaybillOrder.getId()), KwtWaybillOrderTicket::getWOrderId, kwtWaybillOrder.getId())
                         .eq(KwtWaybillOrderTicket::getType, NumberConstant.ONE));
-                KwtWaybillOrderTicket unloadKwtWaybillOrderTicket = kwtWaybillOrderTicketMapper.selectOne(new LambdaQueryWrapper<KwtWaybillOrderTicket>()
+                KwtWaybillOrderTicket unloadTicket = kwtWaybillOrderTicketMapper.selectOne(new LambdaQueryWrapper<KwtWaybillOrderTicket>()
                         .eq(StringUtils.isNotBlank(kwtWaybillOrder.getId()), KwtWaybillOrderTicket::getWOrderId, kwtWaybillOrder.getId())
                         .eq(KwtWaybillOrderTicket::getType, NumberConstant.TWO));
-                KwtLogisticsOrderCirculate kwtLogisticsOrderCirculate = kwtLogisticsOrderCirculateMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrderCirculate>()
+                KwtLogisticsOrderCirculate circulate = kwtLogisticsOrderCirculateMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrderCirculate>()
                         .eq(StringUtils.isNotBlank(kwtWaybillOrder.getId()), KwtLogisticsOrderCirculate::getLOrderId, kwtWaybillOrder.getId())
                         .eq(KwtLogisticsOrderCirculate::getEntId, order.getEntId()));
                 //扣亏量/吨->亏吨量-合理损耗
@@ -110,25 +109,41 @@ public class ConsignOrderService {
                 if (kwtWaybillOrder.getDeficitAmount() != null && (kwtWaybillOrder.getDeficitAmount().compareTo(new BigDecimal(NumberConstant.ZERO)) == NumberConstant.ZERO)) {
                     deduct = kwtWaybillOrder.getDeficitAmount().subtract(order.getLoss() == null ? new BigDecimal(NumberConstant.ZERO) : order.getLoss());
                 }
-                carWaybillVo.setWaybillNumber(order.getLOrderNo())
-                        .setTruckNo(kwtWaybillOrder.getTruckNo())
-                        .setStatus(kwtWaybillOrderTrack == null ? null : String.valueOf(kwtWaybillOrderTrack.getStatus()))
-                        .setWaybillType(kwtWaybillOrder.getType())
-                        //todo 调用司机服务 dubbo
-                        .setDriverName(null)
-                        //todo 取mongo
-                        .setConsignMotorcade(null)
-                        .setSendCarWeigh(kwtWaybillOrder.getEntrustAmount() == null ? null : String.valueOf(kwtWaybillOrder.getEntrustAmount()))
-                        .setSendCarDate(DateUtil.getDateTime(kwtLogisticsOrderCirculate.getEntrustDate()))
-                        .setStowageWeigh(loadKwtWaybillOrderTicket.getAmount() == null ? null : String.valueOf(loadKwtWaybillOrderTicket.getAmount()))
-                        .setStowageDate(DateUtil.getDateTime(loadKwtWaybillOrderTicket.getCreateTime()))
-                        .setUnloadDate(DateUtil.getDateTime(unloadKwtWaybillOrderTicket.getCreateTime()))
-                        .setUnloadWeigh(unloadKwtWaybillOrderTicket.getAmount() == null ? null : String.valueOf(loadKwtWaybillOrderTicket.getAmount()))
-                        /**亏吨量/吨->装货量-卸货量
-                         扣亏量/吨->亏吨量-合理损耗*/
-                        .setDefectiveWeigh(kwtWaybillOrder.getDeficitAmount() == null ? null : String.valueOf(kwtWaybillOrder.getDeficitAmount()))
-                        .setDeduct(String.valueOf(deduct))
-                        .setAppointor(remoteSystemService.queryUserCacheById(kwtWaybillOrder.getCreateBy()).getName());
+                carWaybillVo.setId(String.valueOf(kwtWaybillOrder.getId()));
+                carWaybillVo.setWaybillNumber(order.getLOrderNo());
+                carWaybillVo.setTruckNo(kwtWaybillOrder == null ? null : kwtWaybillOrder.getTruckNo());
+                carWaybillVo.setStatus(track == null ? null : String.valueOf(track.getStatus()));
+                carWaybillVo.setWaybillType(kwtWaybillOrder.getType());
+                //todo 调用司机服务 dubbo
+                carWaybillVo.setDriverName(null);
+                //todo 取mongo
+                carWaybillVo.setConsignMotorcade(null);
+                carWaybillVo.setSendCarWeigh(kwtWaybillOrder.getEntrustAmount() == null ? null : String.valueOf(kwtWaybillOrder.getEntrustAmount()));
+                if (circulate != null) {
+                    carWaybillVo.setSendCarDate(circulate.getCreateTime() == null ? null : DateUtil.getDateTime(circulate.getCreateTime()));
+                } else {
+                    carWaybillVo.setSendCarDate(null);
+                }
+                if (loadTicket != null) {
+                    carWaybillVo.setStowageWeigh(loadTicket.getAmount() == null ? null : String.valueOf(loadTicket.getAmount()));
+                    carWaybillVo.setStowageDate(loadTicket.getCreateTime() == null ? null : DateUtil.getDateTime(loadTicket.getCreateTime()));
+                } else {
+                    carWaybillVo.setSendCarWeigh(null);
+                    carWaybillVo.setStowageDate(null);
+                }
+                if (unloadTicket != null) {
+                    carWaybillVo.setUnloadWeigh(unloadTicket.getAmount() == null ? null : String.valueOf(unloadTicket.getAmount()));
+                    carWaybillVo.setUnloadDate(unloadTicket.getCreateTime() == null ? null : DateUtil.getDateTime(unloadTicket.getCreateTime()));
+                } else {
+                    carWaybillVo.setUnloadWeigh(null);
+                    carWaybillVo.setUnloadDate(null);
+                }
+                /**亏吨量/吨->装货量-卸货量
+                 扣亏量/吨->亏吨量-合理损耗*/
+                carWaybillVo.setDefectiveWeigh(kwtWaybillOrder.getDeficitAmount() == null ? null : String.valueOf(kwtWaybillOrder.getDeficitAmount()));
+                carWaybillVo.setDeduct(String.valueOf(deduct));
+                carWaybillVo.setAppointor(remoteSystemService.queryUserCacheById(kwtWaybillOrder.getCreateBy()) == null ?
+                        String.valueOf(kwtWaybillOrder.getCreateBy()) : remoteSystemService.queryUserCacheById(kwtWaybillOrder.getCreateBy()).getName());
                 returnList.add(carWaybillVo);
             }
         }
@@ -137,7 +152,7 @@ public class ConsignOrderService {
 
     public HttpResult getCarListByOrder(OrderDto orderDto) {
         KwtWaybillOrder waybillOrder = kwtWaybillOrderMapper.selectOne(new LambdaQueryWrapper<KwtWaybillOrder>()
-                .eq(KwtWaybillOrder::getId, orderDto.getId())
+                .eq(KwtWaybillOrder::getLOrderId, orderDto.getId())
                 .eq(KwtWaybillOrder::getEntId, LoginUserHolder.getEntId()));
         List<KwtLogisticsOrderCirculate> list = kwtLogisticsOrderCirculateMapper.selectList(new LambdaQueryWrapper<KwtLogisticsOrderCirculate>()
                 .eq(KwtLogisticsOrderCirculate::getLOrderId, orderDto.getId())

+ 0 - 207
sckw-modules/sckw-transport/src/main/resources/mapper/KwtWaybillOrderMapper.xml

@@ -26,211 +26,4 @@
     load_amount, deficit_amount, remark, `status`, create_by, create_time, update_by,
     update_time, del_flag
     </sql>
-    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
-        select
-        <include refid="Base_Column_List" />
-        from kwt_waybill_order
-        where id = #{id,jdbcType=BIGINT}
-    </select>
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
-        delete from kwt_waybill_order
-        where id = #{id,jdbcType=BIGINT}
-    </delete>
-    <insert id="insert" parameterType="com.sckw.transport.model.KwtWaybillOrder">
-        insert into kwt_waybill_order (id, ent_id, l_order_id,
-                                       w_order_no, truck_no, driver_id,
-                                       entrust_amount, unload_amount, load_amount,
-                                       deficit_amount, remark, `status`,
-                                       create_by, create_time, update_by,
-                                       update_time, del_flag)
-        values (#{id,jdbcType=BIGINT}, #{entId,jdbcType=BIGINT}, #{lOrderId,jdbcType=BIGINT},
-                #{wOrderNo,jdbcType=VARCHAR}, #{truckNo,jdbcType=VARCHAR}, #{driverId,jdbcType=BIGINT},
-                #{entrustAmount,jdbcType=DECIMAL}, #{unloadAmount,jdbcType=DECIMAL}, #{loadAmount,jdbcType=DECIMAL},
-                #{deficitAmount,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
-                #{createBy,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=BIGINT},
-                #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=INTEGER})
-    </insert>
-    <insert id="insertSelective" parameterType="com.sckw.transport.model.KwtWaybillOrder">
-        insert into kwt_waybill_order
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">
-                id,
-            </if>
-            <if test="entId != null">
-                ent_id,
-            </if>
-            <if test="lOrderId != null">
-                l_order_id,
-            </if>
-            <if test="wOrderNo != null">
-                w_order_no,
-            </if>
-            <if test="truckNo != null">
-                truck_no,
-            </if>
-            <if test="driverId != null">
-                driver_id,
-            </if>
-            <if test="entrustAmount != null">
-                entrust_amount,
-            </if>
-            <if test="unloadAmount != null">
-                unload_amount,
-            </if>
-            <if test="loadAmount != null">
-                load_amount,
-            </if>
-            <if test="deficitAmount != null">
-                deficit_amount,
-            </if>
-            <if test="remark != null">
-                remark,
-            </if>
-            <if test="status != null">
-                `status`,
-            </if>
-            <if test="createBy != null">
-                create_by,
-            </if>
-            <if test="createTime != null">
-                create_time,
-            </if>
-            <if test="updateBy != null">
-                update_by,
-            </if>
-            <if test="updateTime != null">
-                update_time,
-            </if>
-            <if test="delFlag != null">
-                del_flag,
-            </if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null">
-                #{id,jdbcType=BIGINT},
-            </if>
-            <if test="entId != null">
-                #{entId,jdbcType=BIGINT},
-            </if>
-            <if test="lOrderId != null">
-                #{lOrderId,jdbcType=BIGINT},
-            </if>
-            <if test="wOrderNo != null">
-                #{wOrderNo,jdbcType=VARCHAR},
-            </if>
-            <if test="truckNo != null">
-                #{truckNo,jdbcType=VARCHAR},
-            </if>
-            <if test="driverId != null">
-                #{driverId,jdbcType=BIGINT},
-            </if>
-            <if test="entrustAmount != null">
-                #{entrustAmount,jdbcType=DECIMAL},
-            </if>
-            <if test="unloadAmount != null">
-                #{unloadAmount,jdbcType=DECIMAL},
-            </if>
-            <if test="loadAmount != null">
-                #{loadAmount,jdbcType=DECIMAL},
-            </if>
-            <if test="deficitAmount != null">
-                #{deficitAmount,jdbcType=DECIMAL},
-            </if>
-            <if test="remark != null">
-                #{remark,jdbcType=VARCHAR},
-            </if>
-            <if test="status != null">
-                #{status,jdbcType=INTEGER},
-            </if>
-            <if test="createBy != null">
-                #{createBy,jdbcType=BIGINT},
-            </if>
-            <if test="createTime != null">
-                #{createTime,jdbcType=TIMESTAMP},
-            </if>
-            <if test="updateBy != null">
-                #{updateBy,jdbcType=BIGINT},
-            </if>
-            <if test="updateTime != null">
-                #{updateTime,jdbcType=TIMESTAMP},
-            </if>
-            <if test="delFlag != null">
-                #{delFlag,jdbcType=INTEGER},
-            </if>
-        </trim>
-    </insert>
-    <update id="updateByPrimaryKeySelective" parameterType="com.sckw.transport.model.KwtWaybillOrder">
-        update kwt_waybill_order
-        <set>
-            <if test="entId != null">
-                ent_id = #{entId,jdbcType=BIGINT},
-            </if>
-            <if test="lOrderId != null">
-                l_order_id = #{lOrderId,jdbcType=BIGINT},
-            </if>
-            <if test="wOrderNo != null">
-                w_order_no = #{wOrderNo,jdbcType=VARCHAR},
-            </if>
-            <if test="truckNo != null">
-                truck_no = #{truckNo,jdbcType=VARCHAR},
-            </if>
-            <if test="driverId != null">
-                driver_id = #{driverId,jdbcType=BIGINT},
-            </if>
-            <if test="entrustAmount != null">
-                entrust_amount = #{entrustAmount,jdbcType=DECIMAL},
-            </if>
-            <if test="unloadAmount != null">
-                unload_amount = #{unloadAmount,jdbcType=DECIMAL},
-            </if>
-            <if test="loadAmount != null">
-                load_amount = #{loadAmount,jdbcType=DECIMAL},
-            </if>
-            <if test="deficitAmount != null">
-                deficit_amount = #{deficitAmount,jdbcType=DECIMAL},
-            </if>
-            <if test="remark != null">
-                remark = #{remark,jdbcType=VARCHAR},
-            </if>
-            <if test="status != null">
-                `status` = #{status,jdbcType=INTEGER},
-            </if>
-            <if test="createBy != null">
-                create_by = #{createBy,jdbcType=BIGINT},
-            </if>
-            <if test="createTime != null">
-                create_time = #{createTime,jdbcType=TIMESTAMP},
-            </if>
-            <if test="updateBy != null">
-                update_by = #{updateBy,jdbcType=BIGINT},
-            </if>
-            <if test="updateTime != null">
-                update_time = #{updateTime,jdbcType=TIMESTAMP},
-            </if>
-            <if test="delFlag != null">
-                del_flag = #{delFlag,jdbcType=INTEGER},
-            </if>
-        </set>
-        where id = #{id,jdbcType=BIGINT}
-    </update>
-    <update id="updateByPrimaryKey" parameterType="com.sckw.transport.model.KwtWaybillOrder">
-        update kwt_waybill_order
-        set ent_id = #{entId,jdbcType=BIGINT},
-            l_order_id = #{lOrderId,jdbcType=BIGINT},
-            w_order_no = #{wOrderNo,jdbcType=VARCHAR},
-            truck_no = #{truckNo,jdbcType=VARCHAR},
-            driver_id = #{driverId,jdbcType=BIGINT},
-            entrust_amount = #{entrustAmount,jdbcType=DECIMAL},
-            unload_amount = #{unloadAmount,jdbcType=DECIMAL},
-            load_amount = #{loadAmount,jdbcType=DECIMAL},
-            deficit_amount = #{deficitAmount,jdbcType=DECIMAL},
-            remark = #{remark,jdbcType=VARCHAR},
-            `status` = #{status,jdbcType=INTEGER},
-            create_by = #{createBy,jdbcType=BIGINT},
-            create_time = #{createTime,jdbcType=TIMESTAMP},
-            update_by = #{updateBy,jdbcType=BIGINT},
-            update_time = #{updateTime,jdbcType=TIMESTAMP},
-            del_flag = #{delFlag,jdbcType=INTEGER}
-        where id = #{id,jdbcType=BIGINT}
-    </update>
 </mapper>

+ 15 - 137
sckw-modules/sckw-transport/src/main/resources/mapper/KwtWaybillOrderTrackMapper.xml

@@ -1,141 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.sckw.transport.dao.KwtWaybillOrderTrackMapper">
-  <resultMap id="BaseResultMap" type="com.sckw.transport.model.KwtWaybillOrderTrack">
-    <id column="id" jdbcType="BIGINT" property="id" />
-    <result column="w_order_id" jdbcType="BIGINT" property="wOrderId" />
-    <result column="remark" jdbcType="VARCHAR" property="remark" />
-    <result column="status" jdbcType="INTEGER" property="status" />
-    <result column="create_by" jdbcType="BIGINT" property="createBy" />
-    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
-    <result column="update_by" jdbcType="BIGINT" property="updateBy" />
-    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
-    <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
-  </resultMap>
-  <sql id="Base_Column_List">
-    id, order_id, remark, `status`, create_by, create_time, update_by, update_time, del_flag
-  </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
-    select 
-    <include refid="Base_Column_List" />
-    from kwt_waybill_order_track
-    where id = #{id,jdbcType=BIGINT}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
-    delete from kwt_waybill_order_track
-    where id = #{id,jdbcType=BIGINT}
-  </delete>
-  <insert id="insert" parameterType="com.sckw.transport.model.KwtWaybillOrderTrack">
-    insert into kwt_waybill_order_track (id, order_id, remark, 
-      `status`, create_by, create_time, 
-      update_by, update_time, del_flag
-      )
-    values (#{id,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT}, #{remark,jdbcType=VARCHAR}, 
-      #{status,jdbcType=INTEGER}, #{createBy,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{updateBy,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=INTEGER}
-      )
-  </insert>
-  <insert id="insertSelective" parameterType="com.sckw.transport.model.KwtWaybillOrderTrack">
-    insert into kwt_waybill_order_track
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
-      <if test="orderId != null">
-        order_id,
-      </if>
-      <if test="remark != null">
-        remark,
-      </if>
-      <if test="status != null">
-        `status`,
-      </if>
-      <if test="createBy != null">
-        create_by,
-      </if>
-      <if test="createTime != null">
-        create_time,
-      </if>
-      <if test="updateBy != null">
-        update_by,
-      </if>
-      <if test="updateTime != null">
-        update_time,
-      </if>
-      <if test="delFlag != null">
-        del_flag,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=BIGINT},
-      </if>
-      <if test="orderId != null">
-        #{orderId,jdbcType=BIGINT},
-      </if>
-      <if test="remark != null">
-        #{remark,jdbcType=VARCHAR},
-      </if>
-      <if test="status != null">
-        #{status,jdbcType=INTEGER},
-      </if>
-      <if test="createBy != null">
-        #{createBy,jdbcType=BIGINT},
-      </if>
-      <if test="createTime != null">
-        #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="updateBy != null">
-        #{updateBy,jdbcType=BIGINT},
-      </if>
-      <if test="updateTime != null">
-        #{updateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="delFlag != null">
-        #{delFlag,jdbcType=INTEGER},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.sckw.transport.model.KwtWaybillOrderTrack">
-    update kwt_waybill_order_track
-    <set>
-      <if test="orderId != null">
-        order_id = #{orderId,jdbcType=BIGINT},
-      </if>
-      <if test="remark != null">
-        remark = #{remark,jdbcType=VARCHAR},
-      </if>
-      <if test="status != null">
-        `status` = #{status,jdbcType=INTEGER},
-      </if>
-      <if test="createBy != null">
-        create_by = #{createBy,jdbcType=BIGINT},
-      </if>
-      <if test="createTime != null">
-        create_time = #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="updateBy != null">
-        update_by = #{updateBy,jdbcType=BIGINT},
-      </if>
-      <if test="updateTime != null">
-        update_time = #{updateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="delFlag != null">
-        del_flag = #{delFlag,jdbcType=INTEGER},
-      </if>
-    </set>
-    where id = #{id,jdbcType=BIGINT}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.sckw.transport.model.KwtWaybillOrderTrack">
-    update kwt_waybill_order_track
-    set order_id = #{orderId,jdbcType=BIGINT},
-      remark = #{remark,jdbcType=VARCHAR},
-      `status` = #{status,jdbcType=INTEGER},
-      create_by = #{createBy,jdbcType=BIGINT},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      update_by = #{updateBy,jdbcType=BIGINT},
-      update_time = #{updateTime,jdbcType=TIMESTAMP},
-      del_flag = #{delFlag,jdbcType=INTEGER}
-    where id = #{id,jdbcType=BIGINT}
-  </update>
+    <resultMap id="BaseResultMap" type="com.sckw.transport.model.KwtWaybillOrderTrack">
+        <id column="id" jdbcType="BIGINT" property="id" />
+        <result column="w_order_id" jdbcType="BIGINT" property="wOrderId" />
+        <result column="remark" jdbcType="VARCHAR" property="remark" />
+        <result column="status" jdbcType="INTEGER" property="status" />
+        <result column="create_by" jdbcType="BIGINT" property="createBy" />
+        <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+        <result column="update_by" jdbcType="BIGINT" property="updateBy" />
+        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+        <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
+    </resultMap>
+    <sql id="Base_Column_List">
+        id, w_order_id, remark, `status`, create_by, create_time, update_by, update_time,
+    del_flag
+    </sql>
 </mapper>