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

Merge branch 'master' of https://git.steerinfo.com/caol/jg_wzjl_api.git

duyong 4 лет назад
Родитель
Сommit
68eaa43ea4

+ 8 - 0
src/main/java/com/steerinfo/baseinfo/meterbasecar/controller/MeterBaseCarController.java

@@ -8,6 +8,8 @@ import com.steerinfo.baseinfo.meterbasecussupcar.model.MeterBaseCusSupCar;
 import com.steerinfo.baseinfo.meterbasedriver.mapper.MeterBaseDriverMapper;
 import com.steerinfo.baseinfo.meterbasedriver.mapper.MeterBaseDriverMapper;
 import com.steerinfo.baseinfo.meterbasedriver.model.MeterBaseDriver;
 import com.steerinfo.baseinfo.meterbasedriver.model.MeterBaseDriver;
 import com.steerinfo.baseinfo.meterbasedriver.service.IMeterBaseDriverService;
 import com.steerinfo.baseinfo.meterbasedriver.service.IMeterBaseDriverService;
+import com.steerinfo.baseinfo.meterbasespecialunit.mapper.MeterBaseSpecialUnitMapper;
+import com.steerinfo.baseinfo.meterbasespecialunit.model.MeterBaseSpecialUnit;
 import com.steerinfo.baseinfo.meterbasetravellingmerchant.mapper.MeterBaseTravellingMerchantMapper;
 import com.steerinfo.baseinfo.meterbasetravellingmerchant.mapper.MeterBaseTravellingMerchantMapper;
 import com.steerinfo.baseinfo.meterbasetravellingmerchant.model.MeterBaseTravellingMerchant;
 import com.steerinfo.baseinfo.meterbasetravellingmerchant.model.MeterBaseTravellingMerchant;
 import com.steerinfo.baseinfo.meterbaseverificationcode.mapper.MeterBaseVerificationCodeMapper;
 import com.steerinfo.baseinfo.meterbaseverificationcode.mapper.MeterBaseVerificationCodeMapper;
@@ -26,6 +28,7 @@ import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.crypto.hash.Hash;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
@@ -57,6 +60,9 @@ public class MeterBaseCarController extends BaseRESTfulController {
     @Autowired
     @Autowired
     IMeterBaseCarService meterBaseCarService;
     IMeterBaseCarService meterBaseCarService;
 
 
+    @Resource
+    MeterBaseSpecialUnitMapper meterBaseSpecialUnitMapper;
+
     @Autowired
     @Autowired
     IMeterBaseDriverService meterBaseDriverService;
     IMeterBaseDriverService meterBaseDriverService;
 
 
@@ -226,10 +232,12 @@ public class MeterBaseCarController extends BaseRESTfulController {
 
 
                 // 车辆表已存在车辆信息时,跳过
                 // 车辆表已存在车辆信息时,跳过
                 if (queryList01.size()+queryList02.size() == 0) {
                 if (queryList01.size()+queryList02.size() == 0) {
+
                     // 新增车辆
                     // 新增车辆
                     MeterBaseCar car = new MeterBaseCar();
                     MeterBaseCar car = new MeterBaseCar();
                     car.setCarNo(params.get("carNo").toString());
                     car.setCarNo(params.get("carNo").toString());
                     car.setValidFlag("0");
                     car.setValidFlag("0");
+                    car.setIsSpecialunit(params.get("isSpecialunit").toString());
                     car.setCarTypeNo(params.get("carTypeNo").toString());
                     car.setCarTypeNo(params.get("carTypeNo").toString());
                     car.setCarTypeName(params.get("carTypeName").toString());
                     car.setCarTypeName(params.get("carTypeName").toString());
                     if (params.get("carCarrierWeight") != null) {
                     if (params.get("carCarrierWeight") != null) {

+ 73 - 48
src/main/java/com/steerinfo/baseinfo/meterbasecar/mapper/MeterBaseCarMapper.xml

@@ -32,6 +32,7 @@
     <result column="FILLING_USER" jdbcType="VARCHAR" property="fillingUser" />
     <result column="FILLING_USER" jdbcType="VARCHAR" property="fillingUser" />
     <result column="IS_INSURANCE" jdbcType="VARCHAR" property="isInsurance" />
     <result column="IS_INSURANCE" jdbcType="VARCHAR" property="isInsurance" />
     <result column="OTHER_INSURANCE" jdbcType="VARCHAR" property="otherInsurance" />
     <result column="OTHER_INSURANCE" jdbcType="VARCHAR" property="otherInsurance" />
+    <result column="IS_SPECIALUNIT" jdbcType="VARCHAR" property="isSpecialunit" />
   </resultMap>
   </resultMap>
   <sql id="columns">
   <sql id="columns">
     PK_NO, CAR_NO, MNEMONIC_CODE, CUSTOMER_SUPPLIER_NO, CUSTOMER_SUPPLIER_NAME, CAR_TYPE_NO, 
     PK_NO, CAR_NO, MNEMONIC_CODE, CUSTOMER_SUPPLIER_NO, CUSTOMER_SUPPLIER_NAME, CAR_TYPE_NO, 
@@ -39,7 +40,7 @@
     CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, 
     CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, 
     DELETE_MAN_NAME, DELETE_TIME, SSO_ID, VEHICLE_TYPE, BELONG_UNIT_TYPE_NO, BELONG_UNIT_TYPE_NAME, 
     DELETE_MAN_NAME, DELETE_TIME, SSO_ID, VEHICLE_TYPE, BELONG_UNIT_TYPE_NO, BELONG_UNIT_TYPE_NAME, 
     USET_DEPARTMENT, VEHICLE_IDENTIFY_NO, FILLING_DEPARTMENT, FILLING_USER, IS_INSURANCE, 
     USET_DEPARTMENT, VEHICLE_IDENTIFY_NO, FILLING_DEPARTMENT, FILLING_USER, IS_INSURANCE, 
-    OTHER_INSURANCE
+    OTHER_INSURANCE, IS_SPECIALUNIT
   </sql>
   </sql>
   <sql id="columns_alias">
   <sql id="columns_alias">
     t.PK_NO, t.CAR_NO, t.MNEMONIC_CODE, t.CUSTOMER_SUPPLIER_NO, t.CUSTOMER_SUPPLIER_NAME, 
     t.PK_NO, t.CAR_NO, t.MNEMONIC_CODE, t.CUSTOMER_SUPPLIER_NO, t.CUSTOMER_SUPPLIER_NAME, 
@@ -47,13 +48,14 @@
     t.VALID_FLAG, t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, 
     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.UPDATE_MAN_NAME, t.UPDATE_TIME, t.DELETE_MAN_NO, t.DELETE_MAN_NAME, t.DELETE_TIME, 
     t.SSO_ID, t.VEHICLE_TYPE, t.BELONG_UNIT_TYPE_NO, t.BELONG_UNIT_TYPE_NAME, t.USET_DEPARTMENT, 
     t.SSO_ID, t.VEHICLE_TYPE, t.BELONG_UNIT_TYPE_NO, t.BELONG_UNIT_TYPE_NAME, t.USET_DEPARTMENT, 
-    t.VEHICLE_IDENTIFY_NO, t.FILLING_DEPARTMENT, t.FILLING_USER, t.IS_INSURANCE, t.OTHER_INSURANCE
+    t.VEHICLE_IDENTIFY_NO, t.FILLING_DEPARTMENT, t.FILLING_USER, t.IS_INSURANCE, t.OTHER_INSURANCE, 
+    t.IS_SPECIALUNIT
   </sql>
   </sql>
   <sql id="select">
   <sql id="select">
-    SELECT <include refid="columns" /> FROM METER_BASE_CAR
+    SELECT <include refid="columns"/> FROM METER_BASE_CAR
   </sql>
   </sql>
   <sql id="select_alias">
   <sql id="select_alias">
-    SELECT <include refid="columns_alias" /> FROM METER_BASE_CAR t
+    SELECT <include refid="columns_alias"/> FROM METER_BASE_CAR t
   </sql>
   </sql>
   <sql id="where">
   <sql id="where">
     <where> 
     <where> 
@@ -147,6 +149,9 @@
       <if test="otherInsurance != null and otherInsurance != ''">
       <if test="otherInsurance != null and otherInsurance != ''">
         and OTHER_INSURANCE = #{otherInsurance}
         and OTHER_INSURANCE = #{otherInsurance}
       </if>
       </if>
+      <if test="isSpecialunit != null and isSpecialunit != ''">
+        and IS_SPECIALUNIT = #{isSpecialunit}
+      </if>
     </where>
     </where>
   </sql>
   </sql>
   <sql id="whereLike">
   <sql id="whereLike">
@@ -241,6 +246,9 @@
       <if test="otherInsurance != null and otherInsurance != ''">
       <if test="otherInsurance != null and otherInsurance != ''">
         and OTHER_INSURANCE LIKE '%${otherInsurance}%'
         and OTHER_INSURANCE LIKE '%${otherInsurance}%'
       </if>
       </if>
+      <if test="isSpecialunit != null and isSpecialunit != ''">
+        and IS_SPECIALUNIT LIKE '%${isSpecialunit}%'
+      </if>
     </where>
     </where>
   </sql>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
@@ -337,6 +345,9 @@
       <if test="otherInsurance != null and otherInsurance != ''">
       <if test="otherInsurance != null and otherInsurance != ''">
         or OTHER_INSURANCE = #{otherInsurance}
         or OTHER_INSURANCE = #{otherInsurance}
       </if>
       </if>
+      <if test="isSpecialunit != null and isSpecialunit != ''">
+        or IS_SPECIALUNIT = #{isSpecialunit}
+      </if>
   </delete>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbasecar.model.MeterBaseCar">
   <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbasecar.model.MeterBaseCar">
     insert into METER_BASE_CAR (PK_NO, CAR_NO, MNEMONIC_CODE, 
     insert into METER_BASE_CAR (PK_NO, CAR_NO, MNEMONIC_CODE, 
@@ -349,7 +360,7 @@
       SSO_ID, VEHICLE_TYPE, BELONG_UNIT_TYPE_NO, 
       SSO_ID, VEHICLE_TYPE, BELONG_UNIT_TYPE_NO, 
       BELONG_UNIT_TYPE_NAME, USET_DEPARTMENT, VEHICLE_IDENTIFY_NO, 
       BELONG_UNIT_TYPE_NAME, USET_DEPARTMENT, VEHICLE_IDENTIFY_NO, 
       FILLING_DEPARTMENT, FILLING_USER, IS_INSURANCE, 
       FILLING_DEPARTMENT, FILLING_USER, IS_INSURANCE, 
-      OTHER_INSURANCE)
+      OTHER_INSURANCE, IS_SPECIALUNIT)
     values (#{pkNo,jdbcType=VARCHAR}, #{carNo,jdbcType=VARCHAR}, #{mnemonicCode,jdbcType=VARCHAR}, 
     values (#{pkNo,jdbcType=VARCHAR}, #{carNo,jdbcType=VARCHAR}, #{mnemonicCode,jdbcType=VARCHAR}, 
       #{customerSupplierNo,jdbcType=VARCHAR}, #{customerSupplierName,jdbcType=VARCHAR}, 
       #{customerSupplierNo,jdbcType=VARCHAR}, #{customerSupplierName,jdbcType=VARCHAR}, 
       #{carTypeNo,jdbcType=VARCHAR}, #{carTypeName,jdbcType=VARCHAR}, #{carCarrierWeight,jdbcType=DECIMAL}, 
       #{carTypeNo,jdbcType=VARCHAR}, #{carTypeName,jdbcType=VARCHAR}, #{carCarrierWeight,jdbcType=DECIMAL}, 
@@ -360,7 +371,7 @@
       #{ssoId,jdbcType=VARCHAR}, #{vehicleType,jdbcType=VARCHAR}, #{belongUnitTypeNo,jdbcType=VARCHAR}, 
       #{ssoId,jdbcType=VARCHAR}, #{vehicleType,jdbcType=VARCHAR}, #{belongUnitTypeNo,jdbcType=VARCHAR}, 
       #{belongUnitTypeName,jdbcType=VARCHAR}, #{usetDepartment,jdbcType=VARCHAR}, #{vehicleIdentifyNo,jdbcType=VARCHAR}, 
       #{belongUnitTypeName,jdbcType=VARCHAR}, #{usetDepartment,jdbcType=VARCHAR}, #{vehicleIdentifyNo,jdbcType=VARCHAR}, 
       #{fillingDepartment,jdbcType=VARCHAR}, #{fillingUser,jdbcType=VARCHAR}, #{isInsurance,jdbcType=VARCHAR}, 
       #{fillingDepartment,jdbcType=VARCHAR}, #{fillingUser,jdbcType=VARCHAR}, #{isInsurance,jdbcType=VARCHAR}, 
-      #{otherInsurance,jdbcType=VARCHAR})
+      #{otherInsurance,jdbcType=VARCHAR}, #{isSpecialunit,jdbcType=VARCHAR})
   </insert>
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbasecar.model.MeterBaseCar">
   <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbasecar.model.MeterBaseCar">
     insert into METER_BASE_CAR
     insert into METER_BASE_CAR
@@ -455,6 +466,9 @@
       <if test="otherInsurance != null">
       <if test="otherInsurance != null">
         OTHER_INSURANCE,
         OTHER_INSURANCE,
       </if>
       </if>
+      <if test="isSpecialunit != null">
+        IS_SPECIALUNIT,
+      </if>
     </trim>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="pkNo != null">
       <if test="pkNo != null">
@@ -547,6 +561,9 @@
       <if test="otherInsurance != null">
       <if test="otherInsurance != null">
         #{otherInsurance,jdbcType=VARCHAR},
         #{otherInsurance,jdbcType=VARCHAR},
       </if>
       </if>
+      <if test="isSpecialunit != null">
+        #{isSpecialunit,jdbcType=VARCHAR},
+      </if>
     </trim>
     </trim>
   </insert>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbasecar.model.MeterBaseCar">
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbasecar.model.MeterBaseCar">
@@ -579,7 +596,8 @@
       FILLING_DEPARTMENT = #{fillingDepartment,jdbcType=VARCHAR},
       FILLING_DEPARTMENT = #{fillingDepartment,jdbcType=VARCHAR},
       FILLING_USER = #{fillingUser,jdbcType=VARCHAR},
       FILLING_USER = #{fillingUser,jdbcType=VARCHAR},
       IS_INSURANCE = #{isInsurance,jdbcType=VARCHAR},
       IS_INSURANCE = #{isInsurance,jdbcType=VARCHAR},
-      OTHER_INSURANCE = #{otherInsurance,jdbcType=VARCHAR}
+      OTHER_INSURANCE = #{otherInsurance,jdbcType=VARCHAR},
+      IS_SPECIALUNIT = #{isSpecialunit,jdbcType=VARCHAR}
     where PK_NO = #{pkNo,jdbcType=VARCHAR}
     where PK_NO = #{pkNo,jdbcType=VARCHAR}
   </update>
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbasecar.model.MeterBaseCar">
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbasecar.model.MeterBaseCar">
@@ -672,20 +690,23 @@
       <if test="otherInsurance != null">
       <if test="otherInsurance != null">
         OTHER_INSURANCE = #{otherInsurance,jdbcType=VARCHAR},
         OTHER_INSURANCE = #{otherInsurance,jdbcType=VARCHAR},
       </if>
       </if>
+      <if test="isSpecialunit != null">
+        IS_SPECIALUNIT = #{isSpecialunit,jdbcType=VARCHAR},
+      </if>
     </set>
     </set>
     where PK_NO = #{pkNo,jdbcType=VARCHAR}
     where PK_NO = #{pkNo,jdbcType=VARCHAR}
   </update>
   </update>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
-    <include refid="select" />
+    <include refid="select"/>
     where PK_NO = #{pkNo,jdbcType=VARCHAR}
     where PK_NO = #{pkNo,jdbcType=VARCHAR}
   </select>
   </select>
   <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
   <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select" />
-    <include refid="where" />
+    <include refid="select"/>
+    <include refid="where"/>
   </select>
   </select>
   <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
   <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select" />
-    <include refid="whereLike" />
+    <include refid="select"/>
+    <include refid="whereLike"/>
   </select>
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
   <insert id="batchInsert" parameterType="java.util.List">
     insert into METER_BASE_CAR 
     insert into METER_BASE_CAR 
@@ -700,8 +721,8 @@
       SSO_ID, VEHICLE_TYPE, BELONG_UNIT_TYPE_NO, 
       SSO_ID, VEHICLE_TYPE, BELONG_UNIT_TYPE_NO, 
       BELONG_UNIT_TYPE_NAME, USET_DEPARTMENT, 
       BELONG_UNIT_TYPE_NAME, USET_DEPARTMENT, 
       VEHICLE_IDENTIFY_NO, FILLING_DEPARTMENT, 
       VEHICLE_IDENTIFY_NO, FILLING_DEPARTMENT, 
-      FILLING_USER, IS_INSURANCE, OTHER_INSURANCE
-      )
+      FILLING_USER, IS_INSURANCE, OTHER_INSURANCE, 
+      IS_SPECIALUNIT)
     ( <foreach collection="list" item="item" separator="union all"> 
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
    select  
       #{item.pkNo,jdbcType=VARCHAR}, 
       #{item.pkNo,jdbcType=VARCHAR}, 
@@ -715,142 +736,146 @@
       #{item.ssoId,jdbcType=VARCHAR}, #{item.vehicleType,jdbcType=VARCHAR}, #{item.belongUnitTypeNo,jdbcType=VARCHAR}, 
       #{item.ssoId,jdbcType=VARCHAR}, #{item.vehicleType,jdbcType=VARCHAR}, #{item.belongUnitTypeNo,jdbcType=VARCHAR}, 
       #{item.belongUnitTypeName,jdbcType=VARCHAR}, #{item.usetDepartment,jdbcType=VARCHAR}, 
       #{item.belongUnitTypeName,jdbcType=VARCHAR}, #{item.usetDepartment,jdbcType=VARCHAR}, 
       #{item.vehicleIdentifyNo,jdbcType=VARCHAR}, #{item.fillingDepartment,jdbcType=VARCHAR}, 
       #{item.vehicleIdentifyNo,jdbcType=VARCHAR}, #{item.fillingDepartment,jdbcType=VARCHAR}, 
-      #{item.fillingUser,jdbcType=VARCHAR}, #{item.isInsurance,jdbcType=VARCHAR}, #{item.otherInsurance,jdbcType=VARCHAR}
-       from dual  
+      #{item.fillingUser,jdbcType=VARCHAR}, #{item.isInsurance,jdbcType=VARCHAR}, #{item.otherInsurance,jdbcType=VARCHAR}, 
+      #{item.isSpecialunit,jdbcType=VARCHAR} from dual  
    </foreach> )
    </foreach> )
   </insert>
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
   <update id="batchUpdate" parameterType="java.util.List">
      update METER_BASE_CAR
      update METER_BASE_CAR
      set
      set
        PK_NO=
        PK_NO=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.pkNo,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.pkNo,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,CAR_NO=
        ,CAR_NO=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.carNo,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.carNo,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,MNEMONIC_CODE=
        ,MNEMONIC_CODE=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.mnemonicCode,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.mnemonicCode,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,CUSTOMER_SUPPLIER_NO=
        ,CUSTOMER_SUPPLIER_NO=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.customerSupplierNo,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.customerSupplierNo,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,CUSTOMER_SUPPLIER_NAME=
        ,CUSTOMER_SUPPLIER_NAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.customerSupplierName,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.customerSupplierName,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,CAR_TYPE_NO=
        ,CAR_TYPE_NO=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.carTypeNo,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.carTypeNo,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,CAR_TYPE_NAME=
        ,CAR_TYPE_NAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.carTypeName,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.carTypeName,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,CAR_CARRIER_WEIGHT=
        ,CAR_CARRIER_WEIGHT=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.carCarrierWeight,jdbcType=DECIMAL}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.carCarrierWeight,jdbcType=DECIMAL}
        </foreach>
        </foreach>
        ,CAR_SELF_WEIGHT=
        ,CAR_SELF_WEIGHT=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.carSelfWeight,jdbcType=DECIMAL}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.carSelfWeight,jdbcType=DECIMAL}
        </foreach>
        </foreach>
        ,MEMO=
        ,MEMO=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,VALID_FLAG=
        ,VALID_FLAG=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,CREATE_MAN_NO=
        ,CREATE_MAN_NO=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,CREATE_MAN_NAME=
        ,CREATE_MAN_NAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,CREATE_TIME=
        ,CREATE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
        </foreach>
        </foreach>
        ,UPDATE_MAN_NO=
        ,UPDATE_MAN_NO=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,UPDATE_MAN_NAME=
        ,UPDATE_MAN_NAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,UPDATE_TIME=
        ,UPDATE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
        </foreach>
        </foreach>
        ,DELETE_MAN_NO=
        ,DELETE_MAN_NO=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.deleteManNo,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.deleteManNo,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,DELETE_MAN_NAME=
        ,DELETE_MAN_NAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.deleteManName,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.deleteManName,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,DELETE_TIME=
        ,DELETE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.deleteTime,jdbcType=TIMESTAMP}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.deleteTime,jdbcType=TIMESTAMP}
        </foreach>
        </foreach>
        ,SSO_ID=
        ,SSO_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.ssoId,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.ssoId,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,VEHICLE_TYPE=
        ,VEHICLE_TYPE=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.vehicleType,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.vehicleType,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,BELONG_UNIT_TYPE_NO=
        ,BELONG_UNIT_TYPE_NO=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.belongUnitTypeNo,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.belongUnitTypeNo,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,BELONG_UNIT_TYPE_NAME=
        ,BELONG_UNIT_TYPE_NAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.belongUnitTypeName,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.belongUnitTypeName,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,USET_DEPARTMENT=
        ,USET_DEPARTMENT=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.usetDepartment,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.usetDepartment,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,VEHICLE_IDENTIFY_NO=
        ,VEHICLE_IDENTIFY_NO=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.vehicleIdentifyNo,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.vehicleIdentifyNo,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,FILLING_DEPARTMENT=
        ,FILLING_DEPARTMENT=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.fillingDepartment,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.fillingDepartment,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,FILLING_USER=
        ,FILLING_USER=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.fillingUser,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.fillingUser,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,IS_INSURANCE=
        ,IS_INSURANCE=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.isInsurance,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.isInsurance,jdbcType=VARCHAR}
        </foreach>
        </foreach>
        ,OTHER_INSURANCE=
        ,OTHER_INSURANCE=
-       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.otherInsurance,jdbcType=VARCHAR}
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.otherInsurance,jdbcType=VARCHAR}
        </foreach>
        </foreach>
+       ,IS_SPECIALUNIT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PK_NO" close="end">
+          when #{item.pkNo,jdbcType=VARCHAR} then #{item.isSpecialunit,jdbcType=VARCHAR}
+       </foreach>
      where PK_NO in 
      where PK_NO in 
-     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
     #{item.pkNo,jdbcType=VARCHAR}
     #{item.pkNo,jdbcType=VARCHAR}
      </foreach> 
      </foreach> 
   </update>
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
   <delete id="batchDelete" parameterType="java.util.List">
     delete from METER_BASE_CAR
     delete from METER_BASE_CAR
     where PK_NO in 
     where PK_NO in 
-    <foreach close=")" collection="list" item="id" open="(" separator=",">
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
       #{id}
       #{id}
     </foreach>
     </foreach>
   </delete>
   </delete>

+ 17 - 3
src/main/java/com/steerinfo/baseinfo/meterbasecar/model/MeterBaseCar.java

@@ -3,7 +3,6 @@ package com.steerinfo.baseinfo.meterbasecar.model;
 import com.steerinfo.framework.model.IBasePO;
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
-
 import java.math.BigDecimal;
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.Date;
 
 
@@ -70,9 +69,9 @@ public class MeterBaseCar implements IBasePO<String> {
     private String memo;
     private String memo;
 
 
     /**
     /**
-     * 状态(0:服役;1:停役;2:删除)(VALID_FLAG,VARCHAR,1)
+     * 状态(0:服役;1:停役)(VALID_FLAG,VARCHAR,1)
      */
      */
-    @ApiModelProperty(value="状态(0:服役;1:停役;2:删除)",required=true)
+    @ApiModelProperty(value="状态(0:服役;1:停役)",required=true)
     private String validFlag;
     private String validFlag;
 
 
     /**
     /**
@@ -189,6 +188,12 @@ public class MeterBaseCar implements IBasePO<String> {
     @ApiModelProperty(value="其他保险项",required=false)
     @ApiModelProperty(value="其他保险项",required=false)
     private String otherInsurance;
     private String otherInsurance;
 
 
+    /**
+     * 是否特殊单位(0:非特殊  1:特殊)(IS_SPECIALUNIT,VARCHAR,1)
+     */
+    @ApiModelProperty(value="是否特殊单位(0:非特殊  1:特殊)",required=false)
+    private String isSpecialunit;
+
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
 
 
     @Override
     @Override
@@ -441,6 +446,14 @@ public class MeterBaseCar implements IBasePO<String> {
         this.otherInsurance = otherInsurance == null ? null : otherInsurance.trim();
         this.otherInsurance = otherInsurance == null ? null : otherInsurance.trim();
     }
     }
 
 
+    public String getIsSpecialunit() {
+        return isSpecialunit;
+    }
+
+    public void setIsSpecialunit(String isSpecialunit) {
+        this.isSpecialunit = isSpecialunit == null ? null : isSpecialunit.trim();
+    }
+
     @Override
     @Override
     public String toString() {
     public String toString() {
         StringBuilder sb = new StringBuilder();
         StringBuilder sb = new StringBuilder();
@@ -477,6 +490,7 @@ public class MeterBaseCar implements IBasePO<String> {
         sb.append(", fillingUser=").append(fillingUser);
         sb.append(", fillingUser=").append(fillingUser);
         sb.append(", isInsurance=").append(isInsurance);
         sb.append(", isInsurance=").append(isInsurance);
         sb.append(", otherInsurance=").append(otherInsurance);
         sb.append(", otherInsurance=").append(otherInsurance);
+        sb.append(", isSpecialunit=").append(isSpecialunit);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         sb.append("]");
         return sb.toString();
         return sb.toString();

+ 63 - 26
src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/service/impl/MeterWorkCarActualFirstServiceImpl.java

@@ -2650,6 +2650,7 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             first02.setActualFirstNo(firstNo01);
             first02.setActualFirstNo(firstNo01);
             meterWorkCarActualFirstMapper.insertSelective(first02);
             meterWorkCarActualFirstMapper.insertSelective(first02);
 
 
+            MeterWorkCarActual actualRow = new MeterWorkCarActual();
             //毛重一次
             //毛重一次
             MeterWorkCarActualFirst model01 = meterWorkCarActualFirstMapper.selectByPrimaryKey(carModel.getActualFirst1No());
             MeterWorkCarActualFirst model01 = meterWorkCarActualFirstMapper.selectByPrimaryKey(carModel.getActualFirst1No());
             //皮重一次
             //皮重一次
@@ -2695,21 +2696,30 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
                 meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(model02);
                 meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(model02);
 
 
                 MeterWorkCarActual mwca1 = meterWorkCarActualMapper.manualAddPre(first02.getActualFirstNo(), model02.getActualFirstNo(), scale.getPredictionNo());
                 MeterWorkCarActual mwca1 = meterWorkCarActualMapper.manualAddPre(first02.getActualFirstNo(), model02.getActualFirstNo(), scale.getPredictionNo());
-                BeanUtils.copyProperties(mwca1, carModel);
+                BeanUtils.copyProperties(mwca1, actualRow);
                 //保存洁净
                 //保存洁净
                 String no = meterWorkCarActualMapper.getNewID(sdf.format(new Date()));
                 String no = meterWorkCarActualMapper.getNewID(sdf.format(new Date()));
-                carModel.setActualNo(sdf.format(new Date()) + no);
-                carModel.setNetTime(new Date());
-                carModel.setNetMode(DbConstants.TYPE);
-                carModel.setNote("混装匹配洁净");
-                carModel.setNetMode("4");
-                carModel.setUploadFlag("1");
-                carModel.setValueFlag("1");
-                carModel.setIsPreScale("1");
-                carModel.setPredictionNo(scale.getPredictionNo());
-                carModel.setPredictionType("7");
-                carModel.setNetWeight(first02.getMeterWeight().subtract(model02.getMeterWeight()));
-                meterWorkCarActualMapper.insertSelective(carModel);
+                actualRow.setActualNo(sdf.format(new Date()) + no);
+                actualRow.setNetTime(new Date());
+                actualRow.setNetMode(DbConstants.TYPE);
+                actualRow.setNote("混装匹配洁净");
+                actualRow.setNetMode("4");
+                actualRow.setUploadFlag("1");
+                actualRow.setValueFlag("1");
+                actualRow.setIsPreScale("1");
+                actualRow.setNetManNo(carModel.getNetManNo());
+                actualRow.setNetManName(carModel.getNetManName());
+                actualRow.setNetSpot3No(carModel.getNetSpot3No());
+                actualRow.setNetSpot3Name(carModel.getNetSpot3Name());
+                actualRow.setCreateManName(carModel.getCreateManName());
+                actualRow.setCreateTime(carModel.getCreateTime());
+                actualRow.setUpdateManNo(carModel.getUpdateManNo());
+                actualRow.setUpdateManName(carModel.getUpdateManName());
+                actualRow.setUpdateTime(carModel.getUpdateTime());
+                actualRow.setPredictionNo(scale.getPredictionNo());
+                actualRow.setPredictionType("7");
+                actualRow.setNetWeight(first02.getMeterWeight().subtract(model02.getMeterWeight()));
+                meterWorkCarActualMapper.insertSelective(actualRow);
 
 
             } else if (first02.getWeightType().equals("1")) {         //混卸
             } else if (first02.getWeightType().equals("1")) {         //混卸
                 //修改委托状态
                 //修改委托状态
@@ -2750,22 +2760,31 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
                 meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(model01);
                 meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(model01);
 
 
                 MeterWorkCarActual mwca1 = meterWorkCarActualMapper.manualAddPre(model01.getActualFirstNo(), first02.getActualFirstNo(),  scale.getPredictionNo());
                 MeterWorkCarActual mwca1 = meterWorkCarActualMapper.manualAddPre(model01.getActualFirstNo(), first02.getActualFirstNo(),  scale.getPredictionNo());
-                BeanUtils.copyProperties(mwca1, carModel);
+                BeanUtils.copyProperties(mwca1, actualRow);
 
 
                 //保存洁净
                 //保存洁净
                 String no = meterWorkCarActualMapper.getNewID(sdf.format(new Date()));
                 String no = meterWorkCarActualMapper.getNewID(sdf.format(new Date()));
-                carModel.setActualNo(sdf.format(new Date()) + no);
-                carModel.setNetTime(new Date());
-                carModel.setNetMode(DbConstants.TYPE);
-                carModel.setNote("混卸匹配洁净");
-                carModel.setNetMode("5");
-                carModel.setUploadFlag("1");
-                carModel.setValueFlag("1");
-                carModel.setIsPreScale("1");
-                carModel.setPredictionNo(scale.getPredictionNo());
-                carModel.setPredictionType("6");
-                carModel.setNetWeight(model01.getMeterWeight().subtract(first02.getMeterWeight()));
-                meterWorkCarActualMapper.insertSelective(carModel);
+                actualRow.setActualNo(sdf.format(new Date()) + no);
+                actualRow.setNetTime(new Date());
+                actualRow.setNetMode(DbConstants.TYPE);
+                actualRow.setNote("混卸匹配洁净");
+                actualRow.setNetMode("5");
+                actualRow.setUploadFlag("1");
+                actualRow.setValueFlag("1");
+                actualRow.setIsPreScale("1");
+                actualRow.setNetManNo(carModel.getNetManNo());
+                actualRow.setNetManName(carModel.getNetManName());
+                actualRow.setNetSpot3No(carModel.getNetSpot3No());
+                actualRow.setNetSpot3Name(carModel.getNetSpot3Name());
+                actualRow.setCreateManName(carModel.getCreateManName());
+                actualRow.setCreateTime(carModel.getCreateTime());
+                actualRow.setUpdateManNo(carModel.getUpdateManNo());
+                actualRow.setUpdateManName(carModel.getUpdateManName());
+                actualRow.setUpdateTime(carModel.getUpdateTime());
+                actualRow.setPredictionNo(scale.getPredictionNo());
+                actualRow.setPredictionType("6");
+                actualRow.setNetWeight(model01.getMeterWeight().subtract(first02.getMeterWeight()));
+                meterWorkCarActualMapper.insertSelective(actualRow);
             }
             }
 
 
             //存储当前计量的数据
             //存储当前计量的数据
@@ -2928,6 +2947,15 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             actualRow1.setUploadFlag("1");
             actualRow1.setUploadFlag("1");
             actualRow1.setValueFlag("1");
             actualRow1.setValueFlag("1");
             actualRow1.setIsPreScale("1");
             actualRow1.setIsPreScale("1");
+            actualRow1.setNetManNo(two.getNetManNo());
+            actualRow1.setNetManName(two.getNetManName());
+            actualRow1.setNetSpot3No(two.getNetSpot3No());
+            actualRow1.setNetSpot3Name(two.getNetSpot3Name());
+            actualRow1.setCreateManName(two.getCreateManName());
+            actualRow1.setCreateTime(two.getCreateTime());
+            actualRow1.setUpdateManNo(two.getUpdateManNo());
+            actualRow1.setUpdateManName(two.getUpdateManName());
+            actualRow1.setUpdateTime(two.getUpdateTime());
             actualRow1.setPredictionNo(scale01.getPredictionNo());
             actualRow1.setPredictionNo(scale01.getPredictionNo());
             actualRow1.setPredictionType("5");
             actualRow1.setPredictionType("5");
             actualRow1.setPredictionCombination(scale01.getPredictionNo() + "," + scale02.getPredictionNo());
             actualRow1.setPredictionCombination(scale01.getPredictionNo() + "," + scale02.getPredictionNo());
@@ -2943,6 +2971,15 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             actualRow2.setValueFlag("1");
             actualRow2.setValueFlag("1");
             actualRow2.setUploadFlag("1");
             actualRow2.setUploadFlag("1");
             actualRow2.setIsPreScale("1");
             actualRow2.setIsPreScale("1");
+            actualRow2.setNetManNo(two.getNetManNo());
+            actualRow2.setNetManName(two.getNetManName());
+            actualRow2.setNetSpot3No(two.getNetSpot3No());
+            actualRow2.setNetSpot3Name(two.getNetSpot3Name());
+            actualRow2.setCreateManName(two.getCreateManName());
+            actualRow2.setCreateTime(two.getCreateTime());
+            actualRow2.setUpdateManNo(two.getUpdateManNo());
+            actualRow2.setUpdateManName(two.getUpdateManName());
+            actualRow2.setUpdateTime(two.getUpdateTime());
             actualRow2.setPredictionNo(scale02.getPredictionNo());
             actualRow2.setPredictionNo(scale02.getPredictionNo());
             actualRow2.setPredictionType("5");
             actualRow2.setPredictionType("5");
             actualRow2.setPredictionCombination(scale01.getPredictionNo() + "," + scale02.getPredictionNo());
             actualRow2.setPredictionCombination(scale01.getPredictionNo() + "," + scale02.getPredictionNo());

+ 84 - 31
src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/service/impl/MeterWorkRailwayActFirstServiceImpl.java

@@ -555,6 +555,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
             first02.setActualFirstNo(firstNo01);
             first02.setActualFirstNo(firstNo01);
             meterWorkRailwayActFirstMapper.insertSelective(first02);
             meterWorkRailwayActFirstMapper.insertSelective(first02);
 
 
+            MeterWorkRailwayActual actualRow = new MeterWorkRailwayActual();
             //毛重一次
             //毛重一次
             MeterWorkRailwayActFirst model01 = meterWorkRailwayActFirstMapper.selectByPrimaryKey(carModel.getActualFirst1No());
             MeterWorkRailwayActFirst model01 = meterWorkRailwayActFirstMapper.selectByPrimaryKey(carModel.getActualFirst1No());
             //皮重一次
             //皮重一次
@@ -600,21 +601,30 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
                 meterWorkRailwayActFirstMapper.updateByPrimaryKeySelective(model02);
                 meterWorkRailwayActFirstMapper.updateByPrimaryKeySelective(model02);
 
 
                 MeterWorkRailwayActual mwca1 = meterWorkRailwayActualMapper.manualAddPre(first02.getActualFirstNo(), model02.getActualFirstNo(), scale.getPredictionNo());
                 MeterWorkRailwayActual mwca1 = meterWorkRailwayActualMapper.manualAddPre(first02.getActualFirstNo(), model02.getActualFirstNo(), scale.getPredictionNo());
-                BeanUtils.copyProperties(mwca1, carModel);
+                BeanUtils.copyProperties(mwca1, actualRow);
                 //保存洁净
                 //保存洁净
                 String no = meterWorkRailwayActualMapper.getNewID(sdf.format(new Date()));
                 String no = meterWorkRailwayActualMapper.getNewID(sdf.format(new Date()));
-                carModel.setActualNo(sdf.format(new Date()) + no);
-                carModel.setNetTime(new Date());
-                carModel.setNetMode(DbConstants.TYPE);
-                carModel.setNote("混装匹配洁净");
-                carModel.setNetMode("4");
-                carModel.setUploadFlag("1");
-                carModel.setValueFlag("1");
-                carModel.setIsPreSacale("1");
-                carModel.setPredictionNo(scale.getPredictionNo());
-                carModel.setPredictionType("7");
-                carModel.setNetWeight(first02.getMeterWeight().subtract(model02.getMeterWeight()));
-                meterWorkRailwayActualMapper.insertSelective(carModel);
+                actualRow.setActualNo(sdf.format(new Date()) + no);
+                actualRow.setNetTime(new Date());
+                actualRow.setNetMode(DbConstants.TYPE);
+                actualRow.setNote("混装匹配洁净");
+                actualRow.setNetMode("4");
+                actualRow.setUploadFlag("1");
+                actualRow.setValueFlag("1");
+                actualRow.setIsPreSacale("1");
+                actualRow.setNetManNo(carModel.getNetManNo());
+                actualRow.setNetManName(carModel.getNetManName());
+                actualRow.setNetSpot3No(carModel.getNetSpot3No());
+                actualRow.setNetSpot3Name(carModel.getNetSpot3Name());
+                actualRow.setCreateManName(carModel.getCreateManName());
+                actualRow.setCreateTime(carModel.getCreateTime());
+                actualRow.setUpdateManNo(carModel.getUpdateManNo());
+                actualRow.setUpdateManName(carModel.getUpdateManName());
+                actualRow.setUpdateTime(carModel.getUpdateTime());
+                actualRow.setPredictionNo(scale.getPredictionNo());
+                actualRow.setPredictionType("7");
+                actualRow.setNetWeight(first02.getMeterWeight().subtract(model02.getMeterWeight()));
+                meterWorkRailwayActualMapper.insertSelective(actualRow);
 
 
             } else if (first02.getWeightType().equals("1")) {         //混卸
             } else if (first02.getWeightType().equals("1")) {         //混卸
                 //修改委托状态
                 //修改委托状态
@@ -655,22 +665,31 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
                 meterWorkRailwayActFirstMapper.updateByPrimaryKeySelective(model01);
                 meterWorkRailwayActFirstMapper.updateByPrimaryKeySelective(model01);
 
 
                 MeterWorkRailwayActual mwca1 = meterWorkRailwayActualMapper.manualAddPre(model01.getActualFirstNo(), first02.getActualFirstNo(),  scale.getPredictionNo());
                 MeterWorkRailwayActual mwca1 = meterWorkRailwayActualMapper.manualAddPre(model01.getActualFirstNo(), first02.getActualFirstNo(),  scale.getPredictionNo());
-                BeanUtils.copyProperties(mwca1, carModel);
+                BeanUtils.copyProperties(mwca1, actualRow);
 
 
                 //保存洁净
                 //保存洁净
                 String no = meterWorkRailwayActualMapper.getNewID(sdf.format(new Date()));
                 String no = meterWorkRailwayActualMapper.getNewID(sdf.format(new Date()));
-                carModel.setActualNo(sdf.format(new Date()) + no);
-                carModel.setNetTime(new Date());
-                carModel.setNetMode(DbConstants.TYPE);
-                carModel.setNote("混卸匹配洁净");
-                carModel.setNetMode("5");
-                carModel.setUploadFlag("1");
-                carModel.setValueFlag("1");
-                carModel.setIsPreSacale("1");
-                carModel.setPredictionNo(scale.getPredictionNo());
-                carModel.setPredictionType("6");
-                carModel.setNetWeight(model01.getMeterWeight().subtract(first02.getMeterWeight()));
-                meterWorkRailwayActualMapper.insertSelective(carModel);
+                actualRow.setActualNo(sdf.format(new Date()) + no);
+                actualRow.setNetTime(new Date());
+                actualRow.setNetMode(DbConstants.TYPE);
+                actualRow.setNote("混卸匹配洁净");
+                actualRow.setNetMode("5");
+                actualRow.setUploadFlag("1");
+                actualRow.setValueFlag("1");
+                actualRow.setIsPreSacale("1");
+                actualRow.setNetManNo(carModel.getNetManNo());
+                actualRow.setNetManName(carModel.getNetManName());
+                actualRow.setNetSpot3No(carModel.getNetSpot3No());
+                actualRow.setNetSpot3Name(carModel.getNetSpot3Name());
+                actualRow.setCreateManName(carModel.getCreateManName());
+                actualRow.setCreateTime(carModel.getCreateTime());
+                actualRow.setUpdateManNo(carModel.getUpdateManNo());
+                actualRow.setUpdateManName(carModel.getUpdateManName());
+                actualRow.setUpdateTime(carModel.getUpdateTime());
+                actualRow.setPredictionNo(scale.getPredictionNo());
+                actualRow.setPredictionType("6");
+                actualRow.setNetWeight(model01.getMeterWeight().subtract(first02.getMeterWeight()));
+                meterWorkRailwayActualMapper.insertSelective(actualRow);
             }
             }
 
 
             //存储当前计量的数据
             //存储当前计量的数据
@@ -832,6 +851,16 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
             actualRow1.setUploadFlag("1");
             actualRow1.setUploadFlag("1");
             actualRow1.setValueFlag("1");
             actualRow1.setValueFlag("1");
             actualRow1.setIsPreSacale("1");
             actualRow1.setIsPreSacale("1");
+            actualRow1.setNetManNo(two.getNetManNo());
+            actualRow1.setNetManName(two.getNetManName());
+            actualRow1.setNetSpot3No(two.getNetSpot3No());
+            actualRow1.setNetSpot3Name(two.getNetSpot3Name());
+            actualRow1.setCreateManName(two.getCreateManName());
+            actualRow1.setCreateTime(two.getCreateTime());
+            actualRow1.setUpdateManNo(two.getUpdateManNo());
+            actualRow1.setUpdateManName(two.getUpdateManName());
+            actualRow1.setUpdateTime(two.getUpdateTime());
+            actualRow1.setPredictionNo(scale01.getPredictionNo());
             actualRow1.setPredictionNo(scale01.getPredictionNo());
             actualRow1.setPredictionNo(scale01.getPredictionNo());
             actualRow1.setPredictionType("5");
             actualRow1.setPredictionType("5");
             actualRow1.setPredictionCombination(scale01.getPredictionNo() + "," + scale02.getPredictionNo());
             actualRow1.setPredictionCombination(scale01.getPredictionNo() + "," + scale02.getPredictionNo());
@@ -847,6 +876,15 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
             actualRow2.setValueFlag("1");
             actualRow2.setValueFlag("1");
             actualRow2.setUploadFlag("1");
             actualRow2.setUploadFlag("1");
             actualRow2.setIsPreSacale("1");
             actualRow2.setIsPreSacale("1");
+            actualRow2.setNetManNo(two.getNetManNo());
+            actualRow2.setNetManName(two.getNetManName());
+            actualRow2.setNetSpot3No(two.getNetSpot3No());
+            actualRow2.setNetSpot3Name(two.getNetSpot3Name());
+            actualRow2.setCreateManName(two.getCreateManName());
+            actualRow2.setCreateTime(two.getCreateTime());
+            actualRow2.setUpdateManNo(two.getUpdateManNo());
+            actualRow2.setUpdateManName(two.getUpdateManName());
+            actualRow2.setUpdateTime(two.getUpdateTime());
             actualRow2.setPredictionNo(scale02.getPredictionNo());
             actualRow2.setPredictionNo(scale02.getPredictionNo());
             actualRow2.setPredictionType("5");
             actualRow2.setPredictionType("5");
             actualRow2.setPredictionCombination(scale01.getPredictionNo() + "," + scale02.getPredictionNo());
             actualRow2.setPredictionCombination(scale01.getPredictionNo() + "," + scale02.getPredictionNo());
@@ -2167,13 +2205,28 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
             Map<String, Object> mapSearchFirst = FieldsCollector.beanToMap(searchFirst);
             Map<String, Object> mapSearchFirst = FieldsCollector.beanToMap(searchFirst);
             List<MeterWorkRailwayActFirst> searchFirstList = meterWorkRailwayActFirstMapper.selectByParameters(mapSearchFirst);
             List<MeterWorkRailwayActFirst> searchFirstList = meterWorkRailwayActFirstMapper.selectByParameters(mapSearchFirst);
             if(StringUtils.isNotEmpty(model.getPredictionNo())) {
             if(StringUtils.isNotEmpty(model.getPredictionNo())) {
-                if (searchFirstList != null && searchFirstList.size() > 1) {
+                if (searchFirstList.size() > 1) {
                     throw new MarkerMetException(500, "车号【" + model.getRailwayNo() + "】存在【" + searchFirstList.size() + "】条有效数据,不允许计量操作,请先在网页上进行作废!");
                     throw new MarkerMetException(500, "车号【" + model.getRailwayNo() + "】存在【" + searchFirstList.size() + "】条有效数据,不允许计量操作,请先在网页上进行作废!");
                 }
                 }
-                if (searchFirstList != null && searchFirstList.size() == 1) {
-                    if (!model.getPredictionNo().equals(searchFirstList.get(0).getPredictionNo())) {
-                        throw new MarkerMetException(500, "车号【" + model.getRailwayNo() + "】一次计量的预报【"
-                                + searchFirstList.get(0).getPredictionNo() + "】与当前使用的预报【" + model.getPredictionNo() + "】不一致,不允许计量操作,请先在网页上进行修改!");
+                if (searchFirstList.size() == 1) {
+                    if(StringUtils.isNotEmpty(searchFirst.getPredictionNo())){
+                        if (!model.getPredictionNo().equals(searchFirstList.get(0).getPredictionNo())) {
+                            throw new MarkerMetException(500, "车号【" + model.getRailwayNo() + "】一次计量的预报【"
+                                    + searchFirstList.get(0).getPredictionNo() + "】与当前使用的预报【" + model.getPredictionNo() + "】不一致,不允许计量操作,请先在网页上进行修改!");
+                        }
+                    }else {
+                        //判断上一次的一次计量是否匹配委托,没有委托将当前委托匹配给上一次计量数据
+                        String predictionNo01 = model.getPredictionNo();
+                        MeterWorkRailwayActFirst first01 = searchFirstList.get(0);
+                        //将委托中的编号和收发货的等数据拷贝进一次数据中
+                        MeterWorkRailwayActFirst first1 = meterWorkRailwayActFirstMapper.selectAndMatch(first01.getActualFirstNo(), predictionNo01);
+                        BeanUtils.copyProperties(first1,first01);
+
+                        first01.setValueFlag("1");
+                        first01.setUpdateTime(new Date());
+                        first01.setIsPreSacale("1");
+                        first01.setPredictionNo(predictionNo01);
+                        meterWorkRailwayActFirstMapper.updateByPrimaryKeySelective(first01);
                     }
                     }
                 }
                 }
             }
             }

+ 2 - 1
src/main/resources/log4j.properties

@@ -1,5 +1,6 @@
 ## LOG4J配置
 ## LOG4J配置
-log4j.rootCategory=INFO,stdout,file, RUNNING,errorfile
+#log4j.rootCategory=INFO,stdout,file, RUNNING,errorfile
+log4j.rootCategory=ERROR,file, RUNNING,errorfile 
 ## 控制台输出
 ## 控制台输出
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout