瀏覽代碼

实现司机自助注册及登录接口

BourneCao 4 年之前
父節點
當前提交
b8a152f1a6

+ 101 - 4
src/main/java/com/steerinfo/baseinfo/meterbasecussupcar/controller/MeterBaseCusSupCarController.java

@@ -1,5 +1,6 @@
 package com.steerinfo.baseinfo.meterbasecussupcar.controller;
 
+import com.alibaba.fastjson.JSONObject;
 import com.steerinfo.baseinfo.meterbaseoperationlog.mapper.MeterBaseOperationLogMapper;
 import com.steerinfo.baseinfo.meterbaseoperationlog.model.MeterBaseOperationLog;
 import com.steerinfo.framework.controller.BaseRESTfulController;
@@ -20,11 +21,9 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 import org.springframework.web.bind.annotation.*;
 
+import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.ArrayList;
+import java.util.*;
 
 /**
  * MeterBaseCusSupCar RESTful接口:
@@ -215,4 +214,102 @@ public class MeterBaseCusSupCarController extends BaseRESTfulController {
         }
         return success();
     }
+
+    @ApiOperation(value = "app自助注册", notes = "app自助注册")
+    @Transactional
+    @PostMapping(value = "/appregister")
+    public RESTfulResult appregister(@RequestBody HashMap params) {
+        try {
+            String msg = "";
+
+            // 注册sso
+
+            // 拆分司机list,新增客商车辆表
+            List<MeterBaseCusSupCar> driverList = JSONObject.parseArray(params.get("driverList").toString(), MeterBaseCusSupCar.class);
+            // 循环新增车辆
+            for (MeterBaseCusSupCar car: driverList) {
+                // 检查车辆 + 司机是否存在
+                HashMap query = new HashMap();
+                query.put("cusSupCarNo", params.get("cusSupCarNo").toString());
+                query.put("telNum", car.getTelNum());
+                query.put("validFlag", "0");
+
+                List<MeterBaseCusSupCar> list = meterBaseCusSupCarService.query(query);
+                if(list.size() == 0){
+                    // 将车辆类型,载重信息加入实体
+                    car.setCusSupCarNo(params.get("cusSupCarNo").toString());
+
+                    car.setCarTypeNo(params.get("carTypeNo").toString());
+                    car.setCarTypeName(params.get("carTypeName").toString());
+                    car.setCarCarrierWeight(new BigDecimal(params.get("carCarrierWeight").toString()));
+
+                    car.setCreateManNo("admin");
+                    car.setCreateManName("admins");
+                    car.setCreateTime(new Date());
+
+                    msg = meterBaseCusSupCarService.checkandadd(car);
+                }
+
+
+
+                if(StringUtils.isNotEmpty(msg)){
+                    break;
+                }
+            }
+
+            if (StringUtils.isNotEmpty(msg)) {
+                return failed(null, msg);
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return failed(null, "操作异常,请确认!");
+        }
+        return success();
+    }
+
+    @ApiOperation(value = "app登录", notes = "app登录")
+    @Transactional
+    @PostMapping(value = "/applogin")
+    public RESTfulResult applogin(@RequestBody HashMap params) {
+
+        String msg = "";
+        String token = "";
+
+        try {
+            if(params.get("cusSupCarNo") == null || StringUtils.isEmpty(params.get("cusSupCarNo").toString())) {
+                msg = "车号不能为空!!";
+            }
+            else if(params.get("telNum") == null || StringUtils.isEmpty(params.get("telNum").toString())) {
+                msg = "手机号不能为空!!";
+            }
+            else {
+                // 状态(0:服役;1:停役;2:删除)
+                params.put("validFlag", "0");
+
+                // 判断车号,司机手机号是否存在
+                List<MeterBaseCusSupCar> list = meterBaseCusSupCarService.query(params);
+                if(list.size() >= 1){
+                    // sso登录
+                    System.out.println(list.size());
+                    // 返回sso token
+                    token = "test token xxxxxxxxx";
+                }
+                else {
+                    msg = "没有此车号或手机号";
+                }
+            }
+
+            if (StringUtils.isNotEmpty(msg)) {
+                return failed(null, msg);
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return failed(null, "操作异常,请确认!");
+        }
+        return success(token);
+    }
 }

+ 116 - 39
src/main/java/com/steerinfo/baseinfo/meterbasecussupcar/mapper/MeterBaseCusSupCarMapper.xml

@@ -21,26 +21,30 @@
     <result column="DELETE_MAN_NO" jdbcType="VARCHAR" property="deleteManNo" />
     <result column="DELETE_MAN_NAME" jdbcType="VARCHAR" property="deleteManName" />
     <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
+    <result column="CAR_TYPE_NO" jdbcType="VARCHAR" property="carTypeNo" />
+    <result column="CAR_TYPE_NAME" jdbcType="VARCHAR" property="carTypeName" />
+    <result column="CAR_CARRIER_WEIGHT" jdbcType="DECIMAL" property="carCarrierWeight" />
   </resultMap>
   <sql id="columns">
     PK_NO, CUS_SUP_CAR_NO, MNEMONIC_CODE, DRIVER_NAME, ID_NUM, TEL_NUM, CUSTOMER_SUPPLIER_NO, 
     CUSTOMER_SUPPLIER_NAME, MEMO, VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
-    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME
+    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, 
+    CAR_TYPE_NO, CAR_TYPE_NAME, CAR_CARRIER_WEIGHT
   </sql>
   <sql id="columns_alias">
     t.PK_NO, t.CUS_SUP_CAR_NO, t.MNEMONIC_CODE, t.DRIVER_NAME, t.ID_NUM, t.TEL_NUM, t.CUSTOMER_SUPPLIER_NO, 
     t.CUSTOMER_SUPPLIER_NAME, t.MEMO, t.VALID_FLAG, t.CREATE_MAN_NO, t.CREATE_MAN_NAME, 
     t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME, t.DELETE_MAN_NO, 
-    t.DELETE_MAN_NAME, t.DELETE_TIME
+    t.DELETE_MAN_NAME, t.DELETE_TIME, t.CAR_TYPE_NO, t.CAR_TYPE_NAME, t.CAR_CARRIER_WEIGHT
   </sql>
   <sql id="select">
-    SELECT <include refid="columns"/> FROM METER_BASE_CUS_SUP_CAR
+    SELECT <include refid="columns" /> FROM METER_BASE_CUS_SUP_CAR
   </sql>
   <sql id="select_alias">
-    SELECT <include refid="columns_alias"/> FROM METER_BASE_CUS_SUP_CAR t
+    SELECT <include refid="columns_alias" /> FROM METER_BASE_CUS_SUP_CAR t
   </sql>
   <sql id="where">
-    <where>
+    <where> 
       <if test="pkNo != null and pkNo != ''">
         and PK_NO = #{pkNo}
       </if>
@@ -98,10 +102,19 @@
       <if test="deleteTime != null">
         and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
       </if>
+      <if test="carTypeNo != null and carTypeNo != ''">
+        and CAR_TYPE_NO = #{carTypeNo}
+      </if>
+      <if test="carTypeName != null and carTypeName != ''">
+        and CAR_TYPE_NAME = #{carTypeName}
+      </if>
+      <if test="carCarrierWeight != null">
+        and CAR_CARRIER_WEIGHT = #{carCarrierWeight}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
-    <where>
+    <where> 
       <if test="pkNo != null and pkNo != ''">
         and PK_NO LIKE '%${pkNo}%'
       </if>
@@ -159,6 +172,15 @@
       <if test="deleteTime != null">
         and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
       </if>
+      <if test="carTypeNo != null and carTypeNo != ''">
+        and CAR_TYPE_NO LIKE '%${carTypeNo}%'
+      </if>
+      <if test="carTypeName != null and carTypeName != ''">
+        and CAR_TYPE_NAME LIKE '%${carTypeName}%'
+      </if>
+      <if test="carCarrierWeight != null">
+        and CAR_CARRIER_WEIGHT = #{carCarrierWeight}
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
@@ -222,6 +244,15 @@
       <if test="deleteTime != null">
         or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
       </if>
+      <if test="carTypeNo != null and carTypeNo != ''">
+        or CAR_TYPE_NO = #{carTypeNo}
+      </if>
+      <if test="carTypeName != null and carTypeName != ''">
+        or CAR_TYPE_NAME = #{carTypeName}
+      </if>
+      <if test="carCarrierWeight != null">
+        or CAR_CARRIER_WEIGHT = #{carCarrierWeight}
+      </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbasecussupcar.model.MeterBaseCusSupCar">
     insert into METER_BASE_CUS_SUP_CAR (PK_NO, CUS_SUP_CAR_NO, MNEMONIC_CODE, 
@@ -230,14 +261,16 @@
       MEMO, VALID_FLAG, CREATE_MAN_NO, 
       CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, 
       UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, 
-      DELETE_MAN_NAME, DELETE_TIME)
+      DELETE_MAN_NAME, DELETE_TIME, CAR_TYPE_NO, 
+      CAR_TYPE_NAME, CAR_CARRIER_WEIGHT)
     values (#{pkNo,jdbcType=VARCHAR}, #{cusSupCarNo,jdbcType=VARCHAR}, #{mnemonicCode,jdbcType=VARCHAR}, 
       #{driverName,jdbcType=VARCHAR}, #{idNum,jdbcType=VARCHAR}, #{telNum,jdbcType=VARCHAR}, 
       #{customerSupplierNo,jdbcType=VARCHAR}, #{customerSupplierName,jdbcType=VARCHAR}, 
       #{memo,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR}, 
       #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR}, 
       #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{deleteManNo,jdbcType=VARCHAR}, 
-      #{deleteManName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP})
+      #{deleteManName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, #{carTypeNo,jdbcType=VARCHAR}, 
+      #{carTypeName,jdbcType=VARCHAR}, #{carCarrierWeight,jdbcType=DECIMAL})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbasecussupcar.model.MeterBaseCusSupCar">
     insert into METER_BASE_CUS_SUP_CAR
@@ -299,6 +332,15 @@
       <if test="deleteTime != null">
         DELETE_TIME,
       </if>
+      <if test="carTypeNo != null">
+        CAR_TYPE_NO,
+      </if>
+      <if test="carTypeName != null">
+        CAR_TYPE_NAME,
+      </if>
+      <if test="carCarrierWeight != null">
+        CAR_CARRIER_WEIGHT,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="pkNo != null">
@@ -358,6 +400,15 @@
       <if test="deleteTime != null">
         #{deleteTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="carTypeNo != null">
+        #{carTypeNo,jdbcType=VARCHAR},
+      </if>
+      <if test="carTypeName != null">
+        #{carTypeName,jdbcType=VARCHAR},
+      </if>
+      <if test="carCarrierWeight != null">
+        #{carCarrierWeight,jdbcType=DECIMAL},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbasecussupcar.model.MeterBaseCusSupCar">
@@ -379,7 +430,10 @@
       UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
       DELETE_MAN_NO = #{deleteManNo,jdbcType=VARCHAR},
       DELETE_MAN_NAME = #{deleteManName,jdbcType=VARCHAR},
-      DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP}
+      DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
+      CAR_TYPE_NO = #{carTypeNo,jdbcType=VARCHAR},
+      CAR_TYPE_NAME = #{carTypeName,jdbcType=VARCHAR},
+      CAR_CARRIER_WEIGHT = #{carCarrierWeight,jdbcType=DECIMAL}
     where PK_NO = #{pkNo,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbasecussupcar.model.MeterBaseCusSupCar">
@@ -439,22 +493,29 @@
       <if test="deleteTime != null">
         DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="carTypeNo != null">
+        CAR_TYPE_NO = #{carTypeNo,jdbcType=VARCHAR},
+      </if>
+      <if test="carTypeName != null">
+        CAR_TYPE_NAME = #{carTypeName,jdbcType=VARCHAR},
+      </if>
+      <if test="carCarrierWeight != null">
+        CAR_CARRIER_WEIGHT = #{carCarrierWeight,jdbcType=DECIMAL},
+      </if>
     </set>
     where PK_NO = #{pkNo,jdbcType=VARCHAR}
   </update>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
-    <include refid="select"/>
+    <include refid="select" />
     where PK_NO = #{pkNo,jdbcType=VARCHAR}
   </select>
   <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="where"/>
-    order by  PK_NO desc
+    <include refid="select" />
+    <include refid="where" />
   </select>
   <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="whereLike"/>
-    order by  PK_NO desc
+    <include refid="select" />
+    <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
     insert into METER_BASE_CUS_SUP_CAR 
@@ -464,7 +525,8 @@
       CUSTOMER_SUPPLIER_NAME, MEMO, VALID_FLAG, 
       CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
       UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, 
-      DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME
+      DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, 
+      CAR_TYPE_NO, CAR_TYPE_NAME, CAR_CARRIER_WEIGHT
       )
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
@@ -474,7 +536,8 @@
       #{item.customerSupplierName,jdbcType=VARCHAR}, #{item.memo,jdbcType=VARCHAR}, #{item.validFlag,jdbcType=VARCHAR}, 
       #{item.createManNo,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, 
       #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
-      #{item.deleteManNo,jdbcType=VARCHAR}, #{item.deleteManName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=TIMESTAMP}
+      #{item.deleteManNo,jdbcType=VARCHAR}, #{item.deleteManName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=TIMESTAMP}, 
+      #{item.carTypeNo,jdbcType=VARCHAR}, #{item.carTypeName,jdbcType=VARCHAR}, #{item.carCarrierWeight,jdbcType=DECIMAL}
        from dual  
    </foreach> )
   </insert>
@@ -482,93 +545,106 @@
      update METER_BASE_CUS_SUP_CAR
      set
        PK_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.pkNo,jdbcType=VARCHAR}
        </foreach>
        ,CUS_SUP_CAR_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.cusSupCarNo,jdbcType=VARCHAR}
        </foreach>
        ,MNEMONIC_CODE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.mnemonicCode,jdbcType=VARCHAR}
        </foreach>
        ,DRIVER_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.driverName,jdbcType=VARCHAR}
        </foreach>
        ,ID_NUM=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.idNum,jdbcType=VARCHAR}
        </foreach>
        ,TEL_NUM=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.telNum,jdbcType=VARCHAR}
        </foreach>
        ,CUSTOMER_SUPPLIER_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.customerSupplierNo,jdbcType=VARCHAR}
        </foreach>
        ,CUSTOMER_SUPPLIER_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.customerSupplierName,jdbcType=VARCHAR}
        </foreach>
        ,MEMO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
        </foreach>
        ,VALID_FLAG=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_MAN_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_MAN_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
        </foreach>
        ,UPDATE_MAN_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
        </foreach>
        ,UPDATE_MAN_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
        </foreach>
        ,UPDATE_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
        </foreach>
        ,DELETE_MAN_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.deleteManNo,jdbcType=VARCHAR}
        </foreach>
        ,DELETE_MAN_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.deleteManName,jdbcType=VARCHAR}
        </foreach>
        ,DELETE_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.deleteTime,jdbcType=TIMESTAMP}
        </foreach>
+       ,CAR_TYPE_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+          when #{item.pkNo,jdbcType=VARCHAR} then #{item.carTypeNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CAR_TYPE_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+          when #{item.pkNo,jdbcType=VARCHAR} then #{item.carTypeName,jdbcType=VARCHAR}
+       </foreach>
+       ,CAR_CARRIER_WEIGHT=
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+          when #{item.pkNo,jdbcType=VARCHAR} then #{item.carCarrierWeight,jdbcType=DECIMAL}
+       </foreach>
      where PK_NO in 
-     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
     #{item.pkNo,jdbcType=VARCHAR}
      </foreach> 
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from METER_BASE_CUS_SUP_CAR
     where PK_NO in 
-    <foreach collection="list" item="id" open="(" close=")" separator=",">
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
   </delete>
+
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
   <select id="GetNewID" parameterType="java.lang.String" resultType="java.lang.String">
@@ -587,4 +663,5 @@
       </if>
     </where>
   </select>
+  
 </mapper>

+ 47 - 0
src/main/java/com/steerinfo/baseinfo/meterbasecussupcar/model/MeterBaseCusSupCar.java

@@ -2,6 +2,8 @@ package com.steerinfo.baseinfo.meterbasecussupcar.model;
 
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
 import java.util.Date;
 
 public class MeterBaseCusSupCar implements IBasePO<String> {
@@ -119,6 +121,24 @@ public class MeterBaseCusSupCar implements IBasePO<String> {
     @ApiModelProperty(value="删除时间",required=false)
     private Date deleteTime;
 
+    /**
+     * 车辆类型编号(CAR_TYPE_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="车辆类型编号",required=false)
+    private String carTypeNo;
+
+    /**
+     * 车辆类型名称(CAR_TYPE_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="车辆类型名称",required=false)
+    private String carTypeName;
+
+    /**
+     * 车辆载重(CAR_CARRIER_WEIGHT,VARCHAR,30)
+     */
+    @ApiModelProperty(value="车辆载重",required=false)
+    private BigDecimal carCarrierWeight;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -283,6 +303,30 @@ public class MeterBaseCusSupCar implements IBasePO<String> {
         this.deleteTime = deleteTime;
     }
 
+    public String getCarTypeNo() {
+        return carTypeNo;
+    }
+
+    public void setCarTypeNo(String carTypeNo) {
+        this.carTypeNo = carTypeNo == null ? null : carTypeNo.trim();
+    }
+
+    public String getCarTypeName() {
+        return carTypeName;
+    }
+
+    public void setCarTypeName(String carTypeName) {
+        this.carTypeName = carTypeName == null ? null : carTypeName.trim();
+    }
+
+    public BigDecimal getCarCarrierWeight() {
+        return carCarrierWeight;
+    }
+
+    public void setCarCarrierWeight(BigDecimal carCarrierWeight) {
+        this.carCarrierWeight = carCarrierWeight == null ? null : carCarrierWeight;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -308,6 +352,9 @@ public class MeterBaseCusSupCar implements IBasePO<String> {
         sb.append(", deleteManNo=").append(deleteManNo);
         sb.append(", deleteManName=").append(deleteManName);
         sb.append(", deleteTime=").append(deleteTime);
+        sb.append(", carTypeNo=").append(carTypeNo);
+        sb.append(", carTypeName=").append(carTypeName);
+        sb.append(", carCarrierWeight=").append(carCarrierWeight);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 10 - 9
src/main/java/com/steerinfo/baseinfo/meterbasecussupcar/service/impl/MeterBaseCusSupCarServiceImpl.java

@@ -132,15 +132,16 @@ public class MeterBaseCusSupCarServiceImpl extends BaseServiceImpl<MeterBaseCusS
         if (StringUtils.isEmpty(model.getDriverName())){
             return "司机姓名不能为空!!";
         }
-        if (StringUtils.isEmpty(model.getIdNum())){
-            return "身份证号不能为空!!";
-        }
-        if (StringUtils.isEmpty(model.getCustomerSupplierNo())){
-            return "客商编号不能为空!!";
-        }
-        if (StringUtils.isEmpty(model.getCustomerSupplierName())){
-            return "客商名称不能为空!!";
-        }
+        // 20211229 by BourneCao APP自助注册不要求身份证,客商信息
+//        if (StringUtils.isEmpty(model.getIdNum())){
+//            return "身份证号不能为空!!";
+//        }
+//        if (StringUtils.isEmpty(model.getCustomerSupplierNo())){
+//            return "客商编号不能为空!!";
+//        }
+//        if (StringUtils.isEmpty(model.getCustomerSupplierName())){
+//            return "客商名称不能为空!!";
+//        }
         if(StringUtils.isEmpty(model.getPkNo())){
             model.setCreateTime(new Date());
             model.setValidFlag("0");//服役