소스 검색

Merge branch 'master' of http://47.101.143.145:8090/77975466/pco

qzyReal 3 년 전
부모
커밋
96d1fe72c6
20개의 변경된 파일796개의 추가작업 그리고 95개의 파일을 삭제
  1. 28 0
      sp-admin/sa-frame/menu-list.js
  2. 2 0
      sp-admin/sa-view-sp/sp-role/menu-setup.html
  3. 52 14
      sp-admin/sa-view/tb-item/tb-item-add.html
  4. 4 3
      sp-admin/sa-view/tb-item/tb-item-info.html
  5. 46 43
      sp-admin/sa-view/tb-item/tb-item-list.html
  6. 110 0
      sp-admin/sa-view/tb-pass-record/tb-pass-record-list.html
  7. 4 3
      sp-server/src/main/java/com/pj/constants/RoleEnum.java
  8. 10 0
      sp-server/src/main/java/com/pj/project/tb_business/TbBusinessController.java
  9. 24 0
      sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java
  10. 14 4
      sp-server/src/main/java/com/pj/project/tb_costomer/TbCostomerService.java
  11. 2 0
      sp-server/src/main/java/com/pj/project/tb_item/TbItem.java
  12. 72 26
      sp-server/src/main/java/com/pj/project/tb_item/TbItemMapper.xml
  13. 1 2
      sp-server/src/main/java/com/pj/project/tb_item_type/TbItemTypeController.java
  14. 90 0
      sp-server/src/main/java/com/pj/project/tb_pass_record/TbPassRecord.java
  15. 110 0
      sp-server/src/main/java/com/pj/project/tb_pass_record/TbPassRecordController.java
  16. 59 0
      sp-server/src/main/java/com/pj/project/tb_pass_record/TbPassRecordMapper.java
  17. 107 0
      sp-server/src/main/java/com/pj/project/tb_pass_record/TbPassRecordMapper.xml
  18. 53 0
      sp-server/src/main/java/com/pj/project/tb_pass_record/TbPassRecordService.java
  19. 2 0
      sp-server/src/main/java/com/pj/project4sp/admin/SpAdminMapper.java
  20. 6 0
      sp-server/src/main/java/com/pj/project4sp/admin/SpAdminMapper.xml

+ 28 - 0
sp-admin/sa-frame/menu-list.js

@@ -49,6 +49,7 @@ var menuList =	[
 			{id: 'tb-business-pay', name: '业务支付', url: 'sa-view/tb-business/tb-business-list.html', isShow: false},
 		]
 	},
+
 	{
 		id: 'tb-car',
 		name: '车辆管理',
@@ -59,6 +60,33 @@ var menuList =	[
 			{id: 'tb-car-add', name: '车辆-添加', url: 'sa-view/tb-car/tb-car-add.html'},
 		]
 	},
+	{
+		id: 'tb-pass-record',
+		name: '放行记录',
+		icon: 'el-icon-folder-opened',
+		info: '放行日志表数据的维护',
+		childList: [
+			{id: 'tb-pass-record-list', name: '放行记录列表', url: 'sa-view/tb-pass-record/tb-pass-record-list.html'},
+		]
+	},
+	{
+		id: 'info-setting',
+		name: '信息设置',
+		icon: 'el-icon-folder-opened',
+		info: '信息设置',
+		childList: [
+
+		]
+	},
+	{
+		id: 'tb-item',
+		name: '收费标准管理',
+		icon: 'el-icon-folder-opened',
+		info: '收费标准表数据的维护',
+		childList: [
+			{id: 'tb-item-list', name: '收费标准', url: 'sa-view/tb-item/tb-item-list.html'},
+		]
+	},
 	// {
 	// 	id: 'tb-driver',
 	// 	name: '司机管理',

+ 2 - 0
sp-admin/sa-view-sp/sp-role/menu-setup.html

@@ -163,7 +163,9 @@
 					getCurrPer(){
 						sa.ajax('/SpRolePermission/getCustomerPcCode',function(resp){
 							let cuList=resp.data;
+							console.log(cuList);
 							let menu_list=	this.filterMenu(menuList,cuList);
+							console.log(menu_list);
 							this.handler(menu_list);
 						}.bind(this))
 					},

+ 52 - 14
sp-admin/sa-view/tb-item/tb-item-add.html

@@ -28,9 +28,21 @@
 					<el-form v-if="m">
 						<sa-item type="text" name="项目编号" v-model="m.itemCode" br></sa-item>
 						<sa-item type="text" name="项目名称" v-model="m.itemName" br></sa-item>
-						<sa-item type="text" name="项目金额" v-model="m.price" br></sa-item>
-						<sa-item type="enum" name="是否必须" v-model="m.need" :jv="{1: '否', 2: '是'}" jtype="3" br></sa-item>
-						<sa-item type="text" name="创建时间" v-model="m.createTime" br></sa-item>
+						<div class="c-item">
+							<label class="c-label">项目类型:</label>
+							<el-select v-model="m.typeId" style="width: 120px;"  placeholder="请选择">
+								<el-option
+										v-for="type in itemTypeList"
+										:key="type.id"
+										:label="type.name"
+										:value="type.id">
+								</el-option>
+							</el-select>
+						</div>
+						<sa-item type="num" name="项目金额(元)" v-model="m.price" br></sa-item>
+						<sa-item type="text" name="单位" v-model="m.unit" br></sa-item>
+<!--						<sa-item type="enum" name="是否必须" v-model="m.need" :jv="{1: '否', 2: '是'}" jtype="3" br></sa-item>-->
+<!--						<sa-item type="text" name="创建时间" v-model="m.createTime" br></sa-item>-->
 						<sa-item name="" class="s-ok" br>
 							<el-button type="primary" icon="el-icon-plus" @click="ok()">保存</el-button>
 						</sa-item>
@@ -52,18 +64,28 @@
 				el: '.vue-box',
 				data: {
 					id: sa.p('id', 0),		// 获取超链接中的id参数(0=添加,非0=修改) 
-					m: null,		// 实体对象 
+					m: {
+						id: '',		// 主键
+						typeId: '',
+						typeName: '',
+						itemName: '',
+						itemCode: '',
+						price: '',
+						unit: '',
+					},		// 实体对象
+					itemTypeList: [],
 				},
 				methods: {
 					// 创建一个 默认Model 
 					createModel: function() {
 						return {
-							id: '',		// 主键 
-							itemCode: '',		// 项目编号 
-							itemName: '',		// 项目名称 
-							price: '',		// 项目金额(元) 
-							need: '',		// 是否必须(1=否,2=是) 
-							createTime: '',		// 创建时间 
+							id: '',			// 主键
+							typeId: '',		//类型id
+							typeName: '',	//类型
+							itemName: '',	//项目名
+							itemCode: '',	//项目编号
+							price: '',		//费用
+							unit: '',		//单位
 						}
 					},
 					// 提交数据 
@@ -73,10 +95,20 @@
 						// sa.checkNull(m.id, '请输入 [主键]');
 						sa.checkNull(m.itemCode, '请输入 [项目编号]');
 						sa.checkNull(m.itemName, '请输入 [项目名称]');
+						sa.checkNull(m.typeId, '请选择 [项目类型]');
 						sa.checkNull(m.price, '请输入 [项目金额]');
-						sa.checkNull(m.need, '请输入 [是否必须]');
-						sa.checkNull(m.createTime, '请输入 [创建时间]');
-				
+
+						console.log(m.typeId);
+						let typeList = this.itemTypeList;
+						let typeId = m.typeId;
+						let typeName = '';
+						for (let i in typeList) {
+							if(typeId == typeList[i].id){
+								typeName = typeList[i].name;
+								console.log("if:"+typeName);
+							}
+						}
+						m.typeName = typeName;
 						// 开始增加或修改
 						if(this.id <= 0) {	// 添加
 							sa.ajax('/TbItem/add', m, function(res){
@@ -96,9 +128,15 @@
 							parent.app.f5();		// 刷新父页面列表
 							sa.closeCurrIframe();	// 关闭本页 
 						}
-					}
+					},
+					getItemTypeList(){
+						sa.ajax('/TbItemType/getList', function(resp) {
+							this.itemTypeList = resp.data;
+						}.bind(this));
+					},
 				},
 				mounted: function(){
+					this.getItemTypeList();
 					// 初始化数据 
 					if(this.id <= 0) {	
 						this.m = this.createModel();

+ 4 - 3
sp-admin/sa-view/tb-item/tb-item-info.html

@@ -23,12 +23,13 @@
 			<div class="s-body">
 				<div class="c-panel">
 					<el-form v-if="m">
-						<sa-info type="num" name="主键" :value="m.id" br></sa-info>
+
 						<sa-info name="项目编号" br>{{m.itemCode}}</sa-info>
 						<sa-info name="项目名称" br>{{m.itemName}}</sa-info>
+						<sa-info name="项目类型" br>{{m.typeName}}</sa-info>
 						<sa-info name="项目金额" br>{{m.price}}</sa-info>
-						<sa-info type="enum" name="是否必须" :value="m.need" :jv="{1: '否', 2: '是'}" br></sa-info>
-						<sa-info name="创建时间" br>{{m.createTime}}</sa-info>
+
+
 					</el-form>
 				</div>
 			</div>

+ 46 - 43
sp-admin/sa-view/tb-item/tb-item-list.html

@@ -20,38 +20,35 @@
 				<!-- ------------- 检索参数 ------------- -->
 				<div class="c-title">检索参数</div>
 				<el-form ref="form" :model='p' @submit.native.prevent>
-					<sa-item type="num" name="主键" v-model="p.id"></sa-item>
 					<sa-item type="text" name="项目编号" v-model="p.itemCode"></sa-item>
 					<sa-item type="text" name="项目名称" v-model="p.itemName"></sa-item>
-					<sa-item type="text" name="项目金额" v-model="p.price"></sa-item>
-					<sa-item type="enum" name="是否必须" v-model="p.need" 
-						:jv="{1: '否', 2: '是'}" jtype="2" def="不限"></sa-item>
-					<sa-item type="text" name="创建时间" v-model="p.createTime"></sa-item>
+					<div class="c-item">
+						<label class="c-label">项目类型:</label>
+						<el-select v-model="p.typeId" style="width: 120px;"  placeholder="请选择">
+							<el-option
+									v-for="type in itemTypeList"
+									:key="type.id"
+									:label="type.name"
+									:value="type.id">
+							</el-option>
+						</el-select>
+					</div>
 					<el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
 					<br />
-					<sa-item name="综合排序">
-						<el-radio-group v-model="p.sortType" class="s-radio-text">
-							<el-radio :label="0">默认</el-radio>
-							<el-radio :label="1">主键</el-radio>
-							<el-radio :label="2">项目编号</el-radio>
-							<el-radio :label="3">项目名称</el-radio>
-							<el-radio :label="4">项目金额</el-radio>
-							<el-radio :label="5">是否必须</el-radio>
-							<el-radio :label="6">创建时间</el-radio>
-						</el-radio-group>
-					</sa-item>
 				</el-form>
 				<!-- ------------- 快捷按钮 ------------- -->
-				<sa-item type="fast-btn" show="add,get,delete,export,reset"></sa-item>
+				<sa-item type="fast-btn" show="add,get,delete,reset"></sa-item>
 				<!-- ------------- 数据列表 ------------- -->
 				<el-table class="data-table" ref="data-table" :data="dataList" >
 					<sa-td type="selection"></sa-td>
-					<sa-td name="主键" prop="id" type="num"></sa-td>
+<!--					<sa-td name="主键" prop="id" type="num"></sa-td>-->
 					<sa-td name="项目编号" prop="itemCode" ></sa-td>
-					<sa-td name="项目名称" prop="itemName" ></sa-td>
-					<sa-td name="项目金额" prop="price" ></sa-td>
-					<sa-td name="是否必须" prop="need" type="switch" :jv="{1: '否', 2: '是'}" @change="s => updateNeed(s.row)"></sa-td>
-					<sa-td name="创建时间" prop="createTime" ></sa-td>
+					<sa-td name="项目类型" prop="typeName" ></sa-td>
+					<sa-td name="项目名称" prop="itemName" width="300px" ></sa-td>
+					<sa-td name="项目金额(元)" prop="price" ></sa-td>
+					<sa-td name="单位" prop="unit" ></sa-td>
+<!--					<sa-td name="是否必须" prop="need" type="switch" :jv="{1: '否', 2: '是'}" @change="s => updateNeed(s.row)"></sa-td>-->
+<!--					<sa-td name="创建时间" prop="createTime" ></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>
@@ -73,18 +70,18 @@
 				el: '.vue-box',
 				data: {
 					p: { // 查询参数  
-						id: '',		// 主键 
+						id: '',		// 主键
+						typeId: '',	//类型id
 						itemCode: '',		// 项目编号 
 						itemName: '',		// 项目名称 
-						price: '',		// 项目金额(元) 
-						need: '',		// 是否必须(1=否,2=是) 
-						createTime: '',		// 创建时间 
+						price: '',		// 项目金额(元)
 						pageNo: 1,		// 当前页 
 						pageSize: 10,	// 页大小 
 						sortType: 0		// 排序方式 
 					},
 					dataCount: 0,
-					dataList: [], // 数据集合 
+					dataList: [], // 数据集合
+					itemTypeList: [],
 				},
 				methods: {
 					// 刷新
@@ -95,6 +92,11 @@
 							sa.f5TableHeight();		// 刷新表格高度 
 						}.bind(this));
 					},
+					getItemTypeList(){
+						sa.ajax('/TbItemType/getList', function(resp) {
+							this.itemTypeList = resp.data;
+						}.bind(this));
+					},
 					// 查看
 					get: function(data) {
 						sa.showIframe('数据详情', 'tb-item-info.html?id=' + data.id, '1050px', '90%');
@@ -142,25 +144,26 @@
 							}.bind(this))
 						}.bind(this));
 					},
-					// 改 - 是否必须(1=否,2=是)
-					updateNeed: function(data) {
-						// 声明变量记录是否成功 
-						var isOk = false;	
-						var oldValue = data.need;
-						var ajax = sa.ajax('/TbItem/updateNeed', {id: data.id, value: data.need}, function(res) {
-							isOk = true;
-							sa.msg('修改成功');
-						}.bind(this));
-						// 如果未能修改成功, 则回滚 
-						$.when(ajax).done(function() {
-							if(isOk == false) {
-								data.status = oldValue; 
-							}
-						})
-					},
+					// // 改 - 是否必须(1=否,2=是)
+					// updateNeed: function(data) {
+					// 	// 声明变量记录是否成功
+					// 	var isOk = false;
+					// 	var oldValue = data.need;
+					// 	var ajax = sa.ajax('/TbItem/updateNeed', {id: data.id, value: data.need}, function(res) {
+					// 		isOk = true;
+					// 		sa.msg('修改成功');
+					// 	}.bind(this));
+					// 	// 如果未能修改成功, 则回滚
+					// 	$.when(ajax).done(function() {
+					// 		if(isOk == false) {
+					// 			data.status = oldValue;
+					// 		}
+					// 	})
+					// },
 				},
 				created: function() {
 					this.f5();
+					this.getItemTypeList();
 					sa.onInputEnter();
 				}
 			})

+ 110 - 0
sp-admin/sa-view/tb-pass-record/tb-pass-record-list.html

@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>放行日志-列表</title>
+		<meta charset="utf-8">
+		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+		<!-- 所有的 css & js 资源 -->
+		<link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="https://unpkg.com/vue@2.6.10/dist/vue.js"></script>
+		<script src="https://unpkg.com/element-ui@2.13.0/lib/index.js"></script>
+		<script src="https://unpkg.com/http-vue-loader@1.4.2/src/httpVueLoader.js"></script>
+		<script src="https://unpkg.com/jquery@3.4.1/dist/jquery.js"></script>
+		<script src="https://www.layuicdn.com/layer-v3.1.1/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+	</head>
+	<body>
+		<div class="vue-box" style="display: none;" :style="'display: block;'">
+			<div class="c-panel">
+				<!-- ------------- 检索参数 ------------- -->
+				<div class="c-title">检索参数</div>
+				<el-form ref="form" :model='p' @submit.native.prevent>
+					<sa-item type="text" name="客户名称" v-model="p.customerName"></sa-item>
+					<sa-item type="text" name="车牌号" v-model="p.cardNo"></sa-item>
+<!--					<sa-item type="text" name="进境时间" v-model="p.inTime"></sa-item>-->
+<!--					<sa-item type="text" name="离境时间" v-model="p.outTime"></sa-item>-->
+<!--					<sa-item type="text" name="更新时间" v-model="p.updateTime"></sa-item>-->
+					<el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
+					<br />
+				</el-form>
+				<!-- ------------- 快捷按钮 ------------- -->
+				<sa-item type="fast-btn" show="get,reset"></sa-item>
+				<!-- ------------- 数据列表 ------------- -->
+				<el-table class="data-table" ref="data-table" :data="dataList" >
+					<sa-td type="selection"></sa-td>
+<!--					<sa-td name="主键" prop="id" type="num"></sa-td>-->
+<!--					<sa-td name="业务id" prop="businessId" ></sa-td>-->
+<!--					<sa-td name="客户id" prop="customerId" ></sa-td>-->
+					<sa-td name="客户名称" prop="customerName" ></sa-td>
+					<sa-td name="车牌号" prop="cardNo" ></sa-td>
+					<sa-td name="状态" prop="status" type="enum" :jv="{1: '未入场', 2: '已入场', 3: '已出场'}"></sa-td>
+					<sa-td name="进境时间" prop="inTime" ></sa-td>
+					<sa-td name="离境时间" prop="outTime" ></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>-->
+<!--						</template>-->
+<!--					</el-table-column>-->
+				</el-table>
+				<!-- ------------- 分页 ------------- -->
+				<sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
+			</div>
+		</div>
+		<script>
+			var app = new Vue({
+				components: {
+					"sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),  
+					"sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),		
+				},
+				el: '.vue-box',
+				data: {
+					p: { // 查询参数  
+						id: '',		// 主键 
+						businessId: '',		// 业务id 
+						customerId: '',		// 客户id 
+						customerName: '',		// 客户名称 
+						cardNo: '',		// 车牌号 
+						status: '',		// 状态(=未入场, 2=已入场, 3=已出场) 
+						inTime: '',		// 进境时间 
+						outTime: '',		// 离境时间 
+						updateTime: '',		// 更新时间 
+						pageNo: 1,		// 当前页 
+						pageSize: 10,	// 页大小 
+						sortType: 9		// 排序方式
+					},
+					dataCount: 0,
+					dataList: [], // 数据集合 
+				},
+				methods: {
+					// 刷新
+					f5: function() {
+						sa.ajax('/TbPassRecord/getList', sa.removeNull(this.p), function(res) {
+							this.dataList = res.data; // 数据
+							this.dataCount = res.dataCount; // 数据总数 
+							sa.f5TableHeight();		// 刷新表格高度 
+						}.bind(this));
+					},
+					// 查看
+					get: function(data) {
+						sa.showIframe('数据详情', 'tb-pass-record-info.html?id=' + data.id, '1050px', '90%');
+					},
+					// 查看 - 根据选中的
+					getBySelect: function(data) {
+						var selection = this.$refs['data-table'].selection;
+						if(selection.length == 0) {
+							return sa.msg('请选择一条数据')
+						}
+						this.get(selection[0]);
+					},
+
+				},
+				created: function() {
+					this.f5();
+					sa.onInputEnter();
+				}
+			})
+		</script>
+	</body>
+</html>

+ 4 - 3
sp-server/src/main/java/com/pj/constants/RoleEnum.java

@@ -3,6 +3,7 @@ package com.pj.constants;
 import com.pj.current.satoken.AuthConst;
 import com.pj.project.tb_business.TbBusiness;
 import com.pj.project.tb_costomer.TbCostomer;
+import com.pj.project.tb_pass_record.TbPassRecord;
 import lombok.AllArgsConstructor;
 import lombok.Getter;
 import org.apache.ibatis.annotations.Param;
@@ -16,11 +17,11 @@ import java.util.List;
 @AllArgsConstructor
 public enum RoleEnum {
     INPUT_ROLE("input","业务录入",
-            Arrays.asList(AuthConst.ADMIN_LIST, TbCostomer.PERMISSION_CODE, TbCostomer.PERMISSION_INFO,TbBusiness.PERMISSION_CODE,TbBusiness.PERMISSION_LIST,TbBusiness.PERMISSION_INPUT)),
+            Arrays.asList(AuthConst.ADMIN_LIST, TbPassRecord.PERMISSION_CODE,TbPassRecord.PERMISSION_LIST, TbCostomer.PERMISSION_CODE, TbCostomer.PERMISSION_INFO,TbBusiness.PERMISSION_CODE,TbBusiness.PERMISSION_LIST,TbBusiness.PERMISSION_INPUT)),
     CONFIRM_ROLE("confirm","业务确认",
-            Arrays.asList(AuthConst.ADMIN_LIST,TbCostomer.PERMISSION_CODE,TbCostomer.PERMISSION_INFO,TbBusiness.PERMISSION_CODE,TbBusiness.PERMISSION_LIST,TbBusiness.PERMISSION_CONFIRM)),
+            Arrays.asList(AuthConst.ADMIN_LIST,TbPassRecord.PERMISSION_CODE,TbPassRecord.PERMISSION_LIST,TbCostomer.PERMISSION_CODE,TbCostomer.PERMISSION_INFO,TbBusiness.PERMISSION_CODE,TbBusiness.PERMISSION_LIST,TbBusiness.PERMISSION_CONFIRM)),
     PAY_ROLE("pay","业务支付",
-            Arrays.asList(AuthConst.ADMIN_LIST,TbCostomer.PERMISSION_CODE,TbCostomer.PERMISSION_INFO,TbBusiness.PERMISSION_CODE,TbBusiness.PERMISSION_LIST,TbBusiness.PERMISSION_PAY)),
+            Arrays.asList(AuthConst.ADMIN_LIST,TbPassRecord.PERMISSION_CODE,TbPassRecord.PERMISSION_LIST,TbCostomer.PERMISSION_CODE,TbCostomer.PERMISSION_INFO,TbBusiness.PERMISSION_CODE,TbBusiness.PERMISSION_LIST,TbBusiness.PERMISSION_PAY)),
     ADMIN_ROLE("admin","管理员", Collections.emptyList()),
     SUPER_ROLE("super","超级管理员", Collections.emptyList());
     private String type;

+ 10 - 0
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessController.java

@@ -8,6 +8,8 @@ import cn.hutool.core.util.StrUtil;
 import com.pj.constants.UserTypeEnum;
 import com.pj.project.tb_business_item.TbBusinessItem;
 import com.pj.project.tb_business_item.TbBusinessItemService;
+import com.pj.project.tb_pass_record.TbPassRecord;
+import com.pj.project.tb_pass_record.TbPassRecordService;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
@@ -35,6 +37,8 @@ public class TbBusinessController {
 	TbBusinessService tbBusinessService;
 	@Resource
 	private TbBusinessItemService tbBusinessItemService;
+	@Resource
+    private TbPassRecordService tbPassRecordService;
 
 	/** 增 */  
 	@RequestMapping("add")
@@ -163,6 +167,12 @@ public class TbBusinessController {
 		TbBusiness tbBusiness=tbBusinessService.getById(id);
 		tbBusiness.setRealInTime(inTime).setInChannel(so.getString("inChannel"));
 		tbBusinessService.updateById(tbBusiness);
+
+        //更新放行记录
+        TbPassRecord record = tbPassRecordService.getByBusinessId(tbBusiness.getId());
+        record.setStatus(2).setInTime(tbBusiness.getRealInTime()).setUpdateTime(new Date());
+        tbPassRecordService.saveOrUpdate(record);
+
 		return AjaxJson.getSuccess();
 	}
 	@RequestMapping("adminOut")

+ 24 - 0
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java

@@ -35,6 +35,8 @@ import com.pj.project.tb_item.TbItem;
 import com.pj.project.tb_item.TbItemService;
 import com.pj.project.tb_item_type.TbItemType;
 import com.pj.project.tb_item_type.TbItemTypeService;
+import com.pj.project.tb_pass_record.TbPassRecord;
+import com.pj.project.tb_pass_record.TbPassRecordService;
 import com.pj.project.tb_unit.TbUnit;
 import com.pj.project.tb_unit.TbUnitService;
 import com.pj.project4sp.admin.SpAdmin;
@@ -83,6 +85,9 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
     @Resource
     private PartConfig partConfig;
 
+    @Resource
+    private TbPassRecordService tbPassRecordService;
+
 
     public TbBusiness checkCarNo(String carNo){
         QueryWrapper<TbBusiness>ew=new QueryWrapper<>();
@@ -135,6 +140,14 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         t.setItemPrice(price).setTotalMoney(price);
         this.saveOrUpdate(t);
         tbBusinessItemService.saveBatch(items);
+
+        //增加一条放行记录
+        TbPassRecord record = new TbPassRecord();
+        record.setBusinessId(t.getId()).setCustomerId(t.getCustomerId())
+                .setCardNo(t.getCardNo()).setCustomerName(t.getCustomerName())
+                .setStatus(1).setUpdateTime(new Date());
+        tbPassRecordService.saveOrUpdate(record);
+
         return AjaxJson.getSuccess();
     }
 
@@ -235,6 +248,11 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         TbBusiness tbBusiness = this.getById(id);
         tbBusiness.setRealInTime(new Date()).setInChannel(inChannel);
         this.updateById(tbBusiness);
+
+        //更新放行记录
+        TbPassRecord record = tbPassRecordService.getByBusinessId(tbBusiness.getId());
+        record.setStatus(2).setInTime(tbBusiness.getRealInTime()).setUpdateTime(new Date());
+        tbPassRecordService.saveOrUpdate(record);
     }
 
     public void adminOut(String id, Date outDayTime,String outChannel) throws Exception{
@@ -243,6 +261,12 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
 
       calculationPartMoney(tbBusiness);
       this.updateById(tbBusiness);
+
+        //更新放行记录
+        TbPassRecord record = tbPassRecordService.getByBusinessId(tbBusiness.getId());
+        record.setStatus(3).setOutTime(tbBusiness.getOutDayTime()).setUpdateTime(new Date());
+        tbPassRecordService.saveOrUpdate(record);
+
     }
     public void calculationPartMoney(TbBusiness tbBusiness)throws Exception{
         LocalDateTime inDayTime=  tbBusiness.getRealInTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();

+ 14 - 4
sp-server/src/main/java/com/pj/project/tb_costomer/TbCostomerService.java

@@ -14,6 +14,7 @@ import com.pj.constants.RoleEnum;
 import com.pj.project.tb_district.TbDistrict;
 import com.pj.project.tb_district.TbDistrictService;
 import com.pj.project4sp.SP;
+import com.pj.project4sp.admin.SpAdmin;
 import com.pj.project4sp.admin.SpAdminMapper;
 import com.pj.project4sp.role.SpRole;
 import com.pj.project4sp.role.SpRoleMapper;
@@ -111,10 +112,19 @@ public class TbCostomerService extends ServiceImpl<TbCostomerMapper, TbCostomer>
     }
 
     public void judge(String id, int status,String judgeContent) {
-      TbCostomer costomer=  this.getById(id);
-      costomer.setJudgeContent(judgeContent)
-              .setJudgeStatus(status).setJudgeTime(new Date());
-      this.updateById(costomer);
+        TbCostomer costomer=  this.getById(id);
+        costomer.setJudgeContent(judgeContent)
+            .setJudgeStatus(status).setJudgeTime(new Date());
+        this.updateById(costomer);
+
+        //审核不通过禁用用户
+        int isBan = status == 3 ? 2 : 1;//账号状态(1=正常, 2=禁用)
+        SpAdmin spAdmin = spAdminMapper.getByCostomerId(costomer.getId());
+        if(spAdmin != null) {
+            spAdmin.setStatus(isBan);
+            spAdminMapper.updateCustomerAdmin(costomer.getId(), isBan);
+        }
+
     }
 
     public void register(TbCostomer costomer) {

+ 2 - 0
sp-server/src/main/java/com/pj/project/tb_item/TbItem.java

@@ -47,6 +47,8 @@ public class TbItem extends Model<TbItem> implements Serializable {
      * 项目编号
      */
     private String itemCode;
+    private String typeName;
+
 
     /**
      * 项目名称

+ 72 - 26
sp-server/src/main/java/com/pj/project/tb_item/TbItemMapper.xml

@@ -2,45 +2,51 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.pj.project.tb_item.TbItemMapper">
 
-	<!-- 增 [G] -->
-	<insert id="add">
+    <!-- 增 [G] -->
+    <insert id="add">
 		insert into 
-		tb_item (id, item_code, item_name, price)
-		values (#{id}, #{itemCode}, #{itemName}, #{price})
+		tb_item (id, type_id, type_name, item_code, item_name, price, unit)
+		values (#{id}, #{typeId}, #{typeName}, #{itemCode}, #{itemName}, #{price}, #{unit})
 	</insert>
 
-	<!-- 删 -->
-	<delete id="delete">
-		delete from tb_item 
+    <!-- 删 -->
+    <delete id="delete">
+		delete from tb_item
 		where id = #{id}
 	</delete>
 
-	<!-- 改 [G] -->
-	<update id="update">
+    <!-- 改 [G] -->
+    <update id="update">
 		update tb_item set
-		id = #{id}, 
-		item_code = #{itemCode}, 
-		item_name = #{itemName}, 
-		price = #{price}, 
+		id = #{id},
+		type_id = #{typeId},
+		type_name = #{typeName},
+		item_code = #{itemCode},
+		item_name = #{itemName},
+		price = #{price},
+		unit = #{unit}
 		where id = #{id}
 	</update>
 
 
-	<!-- ================================== 查询相关 ================================== -->
+    <!-- ================================== 查询相关 ================================== -->
+    <!-- select id, type_id, type_name, item_code, item_name, price, unit from tb_item  -->
 
-	
-	<!-- 通用映射:手动模式 -->
-	<resultMap id="model" type="com.pj.project.tb_item.TbItem">
-		<result property="id" column="id" />
-		<result property="itemCode" column="item_code" />
-		<result property="itemName" column="item_name" />
-		<result property="price" column="price" />
-	</resultMap>
-	
-	<!-- 公共查询sql片段 -->
-	<sql id="select_sql">
+    <!-- 通用映射:手动模式 -->
+    <resultMap id="model" type="com.pj.project.tb_item.TbItem">
+        <result property="id" column="id" />
+        <result property="typeId" column="type_id" />
+        <result property="typeName" column="type_name" />
+        <result property="itemCode" column="item_code" />
+        <result property="itemName" column="item_name" />
+        <result property="price" column="price" />
+        <result property="unit" column="unit" />
+    </resultMap>
+
+    <!-- 公共查询sql片段 -->
+    <sql id="select_sql">
 		select *
-		from tb_item 
+		from tb_item
 	</sql>
 	
 	<!-- 查 - 根据id -->
@@ -79,4 +85,44 @@
 	
 	
 
+    <!-- 查 - 根据id -->
+    <select id="getById" resultMap="model">
+        <include refid="select_sql"></include>
+        where id = #{id}
+    </select>
+
+    <!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
+    <select id="getList" resultMap="model">
+        <include refid="select_sql"></include>
+        <where>
+            <if test=' this.has("id") '> and id = #{id} </if>
+            <if test=' this.has("typeId") '> and type_id = #{typeId} </if>
+            <if test=' this.has("typeName") '> and type_name = #{typeName} </if>
+            <if test=' this.has("itemCode") '> and item_code = #{itemCode} </if>
+            <if test=' this.has("itemName") '> and item_name like concat('%', #{itemName} ,'%') </if>
+            <if test=' this.has("price") '> and price = #{price} </if>
+            <if test=' this.has("unit") '> and unit = #{unit} </if>
+        </where>
+        order by
+        <choose>
+            <when test='sortType == 1'> id desc </when>
+            <when test='sortType == 2'> type_id desc </when>
+            <when test='sortType == 3'> type_name desc </when>
+            <when test='sortType == 4'> item_code desc </when>
+            <when test='sortType == 5'> item_name desc </when>
+            <when test='sortType == 6'> price desc </when>
+            <when test='sortType == 7'> unit desc </when>
+            <otherwise> id desc </otherwise>
+        </choose>
+    </select>
+
+
+
+
+
+
+
+
+
+
 </mapper>

+ 1 - 2
sp-server/src/main/java/com/pj/project/tb_item_type/TbItemTypeController.java

@@ -75,8 +75,7 @@ public class TbItemTypeController {
 		List<TbItemType> list = tbItemTypeService.getList(so.startPage());
 		return AjaxJson.getPageData(so.getDataCount(), list);
 	}
-	
-	
+
 	
 	
 	// ------------------------- 前端接口 -------------------------

+ 90 - 0
sp-server/src/main/java/com/pj/project/tb_pass_record/TbPassRecord.java

@@ -0,0 +1,90 @@
+package com.pj.project.tb_pass_record;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.pj.project.tb_item_type.TbItemType;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * Model: tb_pass_record -- 放行日志
+ * @author lzm 
+ */
+@Data
+@Accessors(chain = true)
+@TableName(TbPassRecord.TABLE_NAME)
+@EqualsAndHashCode(callSuper = false)
+public class TbPassRecord implements Serializable {
+
+	// ---------- 模块常量 ----------
+	/**
+	 * 序列化版本id 
+	 */
+	private static final long serialVersionUID = 1L;	
+	/**
+	 * 此模块对应的表名 
+	 */
+	public static final String TABLE_NAME = "tb_pass_record";	
+	/**
+	 * 此模块对应的权限码 
+	 */
+	public static final String PERMISSION_CODE = "tb-pass-record";
+    public static final String PERMISSION_LIST = "tb-pass-record-list";
+
+    // ---------- 表中字段 ----------
+	/**
+	 * 主键 
+	 */
+	private Long id;
+
+	/**
+	 * 业务id 
+	 */
+    private String businessId;
+
+	/**
+	 * 客户id 
+	 */
+    private String customerId;
+
+	/**
+	 * 客户名称 
+	 */
+    private String customerName;
+
+	/**
+	 * 车牌号 
+	 */
+    private String cardNo;
+
+	/**
+	 * 状态(=未入场, 2=已入场, 3=已出场) 
+	 */
+    private int status;
+
+	/**
+	 * 进境时间 
+	 */
+    private Date inTime;
+
+	/**
+	 * 离境时间 
+	 */
+    private Date outTime;
+
+	/**
+	 * 更新时间 
+	 */
+    private Date updateTime;
+
+
+
+
+
+	
+
+
+}

+ 110 - 0
sp-server/src/main/java/com/pj/project/tb_pass_record/TbPassRecordController.java

@@ -0,0 +1,110 @@
+package com.pj.project.tb_pass_record;
+
+import java.util.List;
+
+import com.pj.constants.UserTypeEnum;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+
+import com.pj.utils.sg.*;
+import com.pj.project4sp.SP;
+
+import com.pj.current.satoken.StpUserUtil;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+
+
+/**
+ * Controller: tb_pass_record -- 放行日志
+ * @author lzm 
+ */
+@RestController
+@RequestMapping("/TbPassRecord/")
+public class TbPassRecordController {
+
+	/** 底层 Service 对象 */
+	@Autowired
+	TbPassRecordService tbPassRecordService;
+
+	/** 增 */  
+	@RequestMapping("add")
+	@SaCheckPermission(TbPassRecord.PERMISSION_CODE)
+	@Transactional(rollbackFor = Exception.class)
+	public AjaxJson add(TbPassRecord t){
+		tbPassRecordService.add(t);
+		t = tbPassRecordService.getById(SP.publicMapper.getPrimarykey());
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 删 */  
+	@RequestMapping("delete")
+	@SaCheckPermission(TbPassRecord.PERMISSION_CODE)
+	public AjaxJson delete(Long id){
+		int line = tbPassRecordService.delete(id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 删 - 根据id列表 */  
+	@RequestMapping("deleteByIds")
+	@SaCheckPermission(TbPassRecord.PERMISSION_CODE)
+	public AjaxJson deleteByIds(){
+		List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class); 
+		int line = SP.publicMapper.deleteByIds(TbPassRecord.TABLE_NAME, ids);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 */  
+	@RequestMapping("update")
+	@SaCheckPermission(TbPassRecord.PERMISSION_CODE)
+	public AjaxJson update(TbPassRecord t){
+		int line = tbPassRecordService.update(t);
+		return AjaxJson.getByLine(line);
+	}
+
+	/** 查 - 根据id */  
+	@RequestMapping("getById")
+	public AjaxJson getById(Long id){
+		TbPassRecord t = tbPassRecordService.getById(id);
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	@RequestMapping("getList")
+	public AjaxJson getList() { 
+		SoMap so = SoMap.getRequestSoMap();
+        String currentCustomerId = StpUserUtil.getCustomerId();
+        if (!currentCustomerId.equals(UserTypeEnum.PLATFORM_ADMIN.getCustomerId())) {
+            so.put("customerId",currentCustomerId);
+        }
+		List<TbPassRecord> list = tbPassRecordService.getList(so.startPage());
+		return AjaxJson.getPageData(so.getDataCount(), list);
+	}
+	
+	
+	
+	
+	// ------------------------- 前端接口 -------------------------
+	
+	
+	/** 改 - 不传不改 [G] */
+	@RequestMapping("updateByNotNull")
+	public AjaxJson updateByNotNull(Long id){
+		AjaxError.throwBy(true, "如需正常调用此接口,请删除此行代码");
+		// 鉴别身份,是否为数据创建者 
+		long userId = SP.publicMapper.getColumnByIdToLong(TbPassRecord.TABLE_NAME, "user_id", id);
+		AjaxError.throwBy(userId != StpUserUtil.getLoginIdAsLong(), "此数据您无权限修改");
+		// 开始修改 (请只保留需要修改的字段)
+		SoMap so = SoMap.getRequestSoMap();
+		so.clearNotIn("id", "businessId", "customerId", "customerName", "cardNo", "status", "inTime", "outTime", "updateTime").clearNull().humpToLineCase();	
+		int line = SP.publicMapper.updateBySoMapById(TbPassRecord.TABLE_NAME, so, id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	
+	
+	
+	
+	
+
+}

+ 59 - 0
sp-server/src/main/java/com/pj/project/tb_pass_record/TbPassRecordMapper.java

@@ -0,0 +1,59 @@
+package com.pj.project.tb_pass_record;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import com.pj.utils.so.*;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+/**
+ * Mapper: tb_pass_record -- 放行日志
+ * @author lzm 
+ */
+
+@Mapper
+@Repository
+public interface TbPassRecordMapper extends BaseMapper<TbPassRecord> {
+
+	/**
+	 * 增  
+	 * @param t 实体对象 
+	 * @return 受影响行数 
+	 */
+	int add(TbPassRecord t);
+
+	/**
+	 * 删  
+	 * @param id 要删除的数据id  
+	 * @return 受影响行数 
+	 */
+	int delete(Long id);	 
+
+	/** 
+	 * 改  
+	 * @param t 实体对象 
+	 * @return 受影响行数 
+	 */
+	int update(TbPassRecord t);
+
+	/** 
+	 * 查 - 根据id  
+	 * @param id 要查询的数据id 
+	 * @return 实体对象 
+	 */
+	TbPassRecord getById(Long id);	 
+
+	/**
+	 * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+	 * @param so 参数集合 
+	 * @return 数据列表 
+	 */
+	List<TbPassRecord> getList(SoMap so);
+
+    TbPassRecord getByBusinessId(@Param("businessId") String businessId);
+
+
+}

+ 107 - 0
sp-server/src/main/java/com/pj/project/tb_pass_record/TbPassRecordMapper.xml

@@ -0,0 +1,107 @@
+<?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.pj.project.tb_pass_record.TbPassRecordMapper">
+
+	<!-- 增 [G] -->
+	<insert id="add">
+		insert into 
+		tb_pass_record (id, business_id, customer_id, customer_name, card_no, status, in_time, out_time, update_time)
+		values (#{id}, #{businessId}, #{customerId}, #{customerName}, #{cardNo}, #{status}, #{inTime}, #{outTime}, #{updateTime}) 
+	</insert>
+
+	<!-- 删 -->
+	<delete id="delete">
+		delete from tb_pass_record 
+		where id = #{id}
+	</delete>
+
+	<!-- 改 [G] -->
+	<update id="update">
+		update tb_pass_record set
+		id = #{id}, 
+		business_id = #{businessId}, 
+		customer_id = #{customerId}, 
+		customer_name = #{customerName}, 
+		card_no = #{cardNo}, 
+		status = #{status}, 
+		in_time = #{inTime}, 
+		out_time = #{outTime}, 
+		update_time = #{updateTime}
+		where id = #{id}
+	</update>
+
+
+	<!-- ================================== 查询相关 ================================== -->
+	<!-- select id, business_id, customer_id, customer_name, card_no, status, in_time, out_time, update_time from tb_pass_record  -->
+	
+	<!-- 通用映射:手动模式 -->
+	<resultMap id="model" type="com.pj.project.tb_pass_record.TbPassRecord">
+		<result property="id" column="id" />
+		<result property="businessId" column="business_id" />
+		<result property="customerId" column="customer_id" />
+		<result property="customerName" column="customer_name" />
+		<result property="cardNo" column="card_no" />
+		<result property="status" column="status" />
+		<result property="inTime" column="in_time" />
+		<result property="outTime" column="out_time" />
+		<result property="updateTime" column="update_time" />
+	</resultMap>
+	
+	<!-- 公共查询sql片段 -->
+	<sql id="select_sql">
+		select * 
+		from tb_pass_record 
+	</sql>
+	
+	<!-- 查 - 根据id -->
+    <select id="getById" resultMap="model">
+        <include refid="select_sql"></include>
+        where id = #{id}
+    </select>
+
+    <!-- 查 - 根据businessId -->
+    <select id="getByBusinessId" resultMap="model">
+        <include refid="select_sql"></include>
+        where business_id = #{businessId}
+    </select>
+	
+	<!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
+	<select id="getList" resultMap="model">
+		<include refid="select_sql"></include>
+		<where>
+            status != 1
+			<if test=' this.has("id") '> and id = #{id} </if>
+			<if test=' this.has("businessId") '> and business_id = #{businessId} </if>
+			<if test=' this.has("customerId") '> and customer_id = #{customerId} </if>
+			<if test=' this.has("customerName") '> and customer_name like concat('%',#{customerName},'%') </if>
+			<if test=' this.has("cardNo") '> and card_no like concat('%',#{cardNo},'%') </if>
+			<if test=' this.has("status") '> and status = #{status} </if>
+			<if test=' this.has("inTime") '> and in_time = #{inTime} </if>
+			<if test=' this.has("outTime") '> and out_time = #{outTime} </if>
+			<if test=' this.has("updateTime") '> and update_time = #{updateTime} </if>
+		</where>
+		order by
+		<choose>
+			<when test='sortType == 1'> id desc </when>
+			<when test='sortType == 2'> business_id desc </when>
+			<when test='sortType == 3'> customer_id desc </when>
+			<when test='sortType == 4'> customer_name desc </when>
+			<when test='sortType == 5'> card_no desc </when>
+			<when test='sortType == 6'> status desc </when>
+			<when test='sortType == 7'> in_time desc </when>
+			<when test='sortType == 8'> out_time desc </when>
+			<when test='sortType == 9'> update_time desc </when>
+			<otherwise> id desc </otherwise>
+		</choose>
+	</select>
+	
+	
+	
+	
+	
+	
+	
+	
+	
+
+</mapper>

+ 53 - 0
sp-server/src/main/java/com/pj/project/tb_pass_record/TbPassRecordService.java

@@ -0,0 +1,53 @@
+package com.pj.project.tb_pass_record;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * Service: tb_pass_record -- 放行日志
+ * @author lzm 
+ */
+@Service
+public class TbPassRecordService extends ServiceImpl<TbPassRecordMapper, TbPassRecord> implements IService<TbPassRecord> {
+
+	/** 底层 Mapper 对象 */
+	@Autowired
+	TbPassRecordMapper tbPassRecordMapper;
+
+	/** 增 */
+	int add(TbPassRecord t){
+		return tbPassRecordMapper.add(t);
+	}
+
+	/** 删 */
+	int delete(Long id){
+		return tbPassRecordMapper.delete(id);
+	}
+
+	/** 改 */
+	int update(TbPassRecord t){
+		return tbPassRecordMapper.update(t);
+	}
+
+	/** 查 */
+	TbPassRecord getById(Long id){
+		return tbPassRecordMapper.getById(id);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	List<TbPassRecord> getList(SoMap so) {
+		return tbPassRecordMapper.getList(so);	
+	}
+
+    public TbPassRecord getByBusinessId(String businessId){
+        return tbPassRecordMapper.getByBusinessId(businessId);
+    }
+	
+
+}

+ 2 - 0
sp-server/src/main/java/com/pj/project4sp/admin/SpAdminMapper.java

@@ -70,4 +70,6 @@ public interface SpAdminMapper {
 	void removeByCustomerId(@Param("customerId") String customerId);
 
 	void updateCustomerAdmin(@Param("customerId")String customerId, @Param("status")int status);
+
+    SpAdmin getByCostomerId(@Param("customerId")String customerId);
 }

+ 6 - 0
sp-server/src/main/java/com/pj/project4sp/admin/SpAdminMapper.xml

@@ -86,6 +86,12 @@
 		where phone = #{phone}
 	</select>
 
+    <!-- 查询,根据customerId -->
+    <select id="getByCostomerId" resultMap="model">
+        <include refid="select_sql"></include>
+        where customer_id = #{customerId}
+    </select>
+
 
 	<!-- 查询 -->
 	<select id="getList" resultMap="model">