Browse Source

Merge branch 'debug' into dev

qzyReal 3 years ago
parent
commit
7d2b3b6136

+ 0 - 2
app/pages/business-entering/business-entering.vue

@@ -640,8 +640,6 @@
 				}
 				let noNeedIds = this.noNeedIds;
 				let needIds=this.needTypeId;
-				console.log(needIds);
-				console.log(typeList);
 				for(let i in needIds){
 					if(typeList.map(obj=>obj.id).indexOf(needIds[i])==-1){
 						this.$common.toast('缺少必选业务');

+ 1 - 5
app/pages/declare/add.vue

@@ -159,7 +159,7 @@
 				</view>
 			</view>
 			<view class="item">
-				<view class="l"><text style="color: red;">*</text>商铺:</view>
+				<view class="l">商铺:</view>
 				<view class="r">
 					<u-input placeholder="商铺" @input="handler()" v-model="form.shop" />
 				</view>
@@ -473,10 +473,6 @@
 					this.$common.toast('请填写检验检疫证');
 					return;
 				}
-				if (!this.form.shop) {
-					this.$common.toast('请填写商铺');
-					return;
-				}
 				if (!this.form.productionCode) {
 					this.$common.toast('请填写生产批号');
 					return;

+ 1 - 6
app/pages/disinfect/addDisinfect.vue

@@ -65,8 +65,7 @@
 			<view class="item">
 				<view class="l"><text style="color: red;">*</text>规格:</view>
 				<view class="r">
-					<u-input type="number" placeholder="输入规格" @input="handler()" v-model="form.unit">
-						<text slot="suffix">米</text>
+					<u-input  placeholder="输入规格" @input="handler()" v-model="form.unit">
 					</u-input>
 				</view>
 			</view>
@@ -353,10 +352,6 @@
 					this.$common.toast('请填写原产地');
 					return false;
 				}
-				if (!this.$common.isNum(this.form.unit)) {
-					this.$common.toast('规格只能填写数字');
-					return false;
-				}
 				if (!this.form.pack) {
 					this.$common.toast('请填写包装');
 					return false;

+ 0 - 17
sp-admin/sa-view/tb-business/tb-business-edit.html

@@ -718,23 +718,6 @@
 							sa.error('载重只能输入数字')
 							return;
 						}
-						let checkList = this.itemTypeList;
-						let chechItem = this.checkItem;
-						for (let j in this.needTypeId) {
-							let id = this.needTypeId[j];
-							for (let i in checkList) {
-								let type = checkList[i];
-								let typeName = type.name;
-								if (id == type.id && !type.itemId && typeName !== '特殊车辆' && typeName !== '干杂货人工装卸') {
-									sa.error('选择[' + this.m.goodsName + ']时,[' + typeName + ']必选')
-									return;
-								}
-								if (!chechItem && this.m.goodsName == '干杂货') {
-									sa.error('请选择特殊车辆或干杂货人工装卸之一')
-									return;
-								}
-							}
-						}
 						let typeList = this.itemTypeList.filter(obj => obj.itemId);
 						let needIds = this.needTypeId;
 						for (let i in needIds) {

+ 1 - 1
sp-admin/sa-view/tb-notices/tb-notices-list.html

@@ -41,7 +41,7 @@
 					<sa-td name="主题" prop="text" ></sa-td>
 <!--					<sa-td name="详情内容" prop="content" type="richtext"></sa-td>-->
 					<sa-td name="类型" prop="type" type="enum" :jv="{0: '公告消息', 1: '业务消息'}"></sa-td>
-					<sa-td name="更新时间" prop="updateTime" type="datetime"></sa-td>
+					<sa-td name="通知时间" prop="updateTime" type="datetime"></sa-td>
 					<el-table-column label="操作" fixed="right"  width="240px">
 						<template slot-scope="s">
 							<el-button class="c-btn" type="success" icon="el-icon-view"  @click="get(s.row)">查看</el-button>

+ 2 - 1
sp-admin/sa-view/tb-pass-record/tb-pass-record-list.html

@@ -40,7 +40,8 @@
 					<sa-td name="入场时间" prop="inTime" ></sa-td>
 					<sa-td name="出场时间" prop="outTime" ></sa-td>
 					<sa-td name="状态" prop="status" type="enum" :jv="{1: '未入场', 2: '已入场', 3: '已出场'}"></sa-td>
-					<sa-td name="更新时间" prop="updateTime" ></sa-td>
+					<sa-td name="停车时长(分钟)" prop="partTime" ></sa-td>
+<!--					<sa-td name="更新时间" prop="updateTime" ></sa-td>-->
 <!--					<el-table-column label="操作" fixed="right"  width="240px">-->
 <!--						<template slot-scope="s">-->
 <!--							<el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>-->

+ 1 - 1
sp-server/src/main/java/com/pj/project/tb_disinfect/TbDisinfect.java

@@ -78,7 +78,7 @@ public class TbDisinfect extends Model<TbDisinfect> implements Serializable {
 	/**
 	 * 规格 
 	 */
-	private Double unit;	
+	private String unit;
 
 	/**
 	 * 包装 

+ 6 - 1
sp-server/src/main/java/com/pj/project/tb_pass_record/TbPassRecord.java

@@ -81,10 +81,15 @@ public class TbPassRecord extends Model<TbPassRecord> implements Serializable {
     private Date outTime;
 
 	/**
-	 * 更新时间 
+	 * 更新时间
 	 */
     private Date updateTime;
 
+    /**
+     * 停车时长(分)
+     */
+    private long partTime;
+
 
 
 

+ 5 - 3
sp-server/src/main/java/com/pj/project/tb_pass_record/TbPassRecordMapper.xml

@@ -5,8 +5,8 @@
 	<!-- 增 [G] -->
 	<insert id="add">
 		insert into 
-		tb_pass_record (id, business_id, customer_id, customer_name, card_no, car_country_name, status, in_time, out_time, update_time)
-		values (#{id}, #{businessId}, #{customerId}, #{customerName}, #{cardNo}, #{carCountryName}, #{status}, #{inTime}, #{outTime}, #{updateTime})
+		tb_pass_record (id, business_id, customer_id, customer_name, card_no, car_country_name, status, in_time, out_time, part_time, update_time)
+		values (#{id}, #{businessId}, #{customerId}, #{customerName}, #{cardNo}, #{carCountryName}, #{status}, #{inTime}, #{outTime}, #{partTime}, #{updateTime})
 	</insert>
 
 	<!-- 删 -->
@@ -32,7 +32,8 @@
 		car_country_name = #{carCountryName},
 		status = #{status}, 
 		in_time = #{inTime}, 
-		out_time = #{outTime}, 
+		out_time = #{outTime},
+		part_time = #{partTime},
 		update_time = #{updateTime}
 		where id = #{id}
 	</update>
@@ -52,6 +53,7 @@
 		<result property="status" column="status" />
 		<result property="inTime" column="in_time" />
 		<result property="outTime" column="out_time" />
+        <result property="partTime" column="part_time" />
 		<result property="updateTime" column="update_time" />
 	</resultMap>
 	

+ 11 - 5
sp-server/src/main/java/com/pj/project/tb_pass_record/TbPassRecordService.java

@@ -3,6 +3,8 @@ package com.pj.project.tb_pass_record;
 import java.util.Date;
 import java.util.List;
 
+import cn.hutool.core.date.DateUnit;
+import cn.hutool.core.date.DateUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -65,11 +67,15 @@ public class TbPassRecordService extends ServiceImpl<TbPassRecordMapper, TbPassR
         if(record == null)
             record = new TbPassRecord();
         record.setBusinessId(businessId)
-                .setCustomerId(customerId).setCustomerName(customerName)
-                .setCardNo(carNo).setStatus(status)
-                .setInTime(inTime).setOutTime(outTime)
-                .setCarCountryName(carCountryName)
-                .setUpdateTime(new Date());
+            .setCustomerId(customerId).setCustomerName(customerName)
+            .setCardNo(carNo).setStatus(status)
+            .setInTime(inTime).setOutTime(outTime)
+            .setCarCountryName(carCountryName)
+            .setUpdateTime(new Date());
+        if(record.getInTime() != null && record.getOutTime() != null){
+            long minutes = DateUtil.between(record.getInTime(), record.getOutTime(), DateUnit.MINUTE);
+            record.setPartTime(minutes);
+        }
         saveOrUpdate(record);
     }