Browse Source

Merge branch 'dev' of http://47.101.143.145:8090/77975466/pco into dev

# Conflicts:
#	sp-server/app.pid
qzyReal 3 năm trước cách đây
mục cha
commit
070d87059b
24 tập tin đã thay đổi với 1370 bổ sung20 xóa
  1. 3 0
      app/apis/api.js
  2. 11 4
      app/pages.json
  3. 36 0
      app/pages/business-entering/business-edit.vue
  4. 37 2
      app/pages/business-entering/business-entering.vue
  5. 218 0
      app/pages/business-entering/declare-select.vue
  6. 14 0
      app/pages/declare/add.vue
  7. 7 6
      app/pages/declare/addDeclareSuccess.vue
  8. 14 0
      app/pages/disinfect/addDisinfect.vue
  9. 6 0
      app/pages/disinfect/addDisinfectSuccess.vue
  10. 11 0
      sp-admin/sa-frame/menu-list.js
  11. 1 1
      sp-admin/sa-view/tb-declare/tb-declare-add.html
  12. 124 0
      sp-admin/sa-view/tb-fee-statistics/month-statistcs.html
  13. 132 0
      sp-admin/sa-view/tb-fee-statistics/tb-fee-statistics-list.html
  14. 124 0
      sp-admin/sa-view/tb-fee-statistics/year-statistcs.html
  15. 5 0
      sp-server/src/main/java/com/pj/api/wx/service/WxService.java
  16. 1 1
      sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCar.java
  17. 24 5
      sp-server/src/main/java/com/pj/project/tb_costomer/TbCostomerService.java
  18. 127 0
      sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatistics.java
  19. 119 0
      sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsController.java
  20. 62 0
      sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsMapper.java
  21. 136 0
      sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsMapper.xml
  22. 136 0
      sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsService.java
  23. 1 1
      sp-server/src/main/java/com/pj/project4sp/admin/SpAdminMapper.java
  24. 21 0
      sp-server/src/main/java/com/pj/project4sp/admin/SpAdminService.java

+ 3 - 0
app/apis/api.js

@@ -135,5 +135,8 @@ export default {
 	},
 	uploadReport(data) {
 		return ajax.postJson('/TbBusiness/uploadReport', data)
+	},
+	getDeclareList(data){
+		return ajax.get('/api/getDeclareList', data)
 	}
 }

+ 11 - 4
app/pages.json

@@ -168,8 +168,8 @@
 		{
 			"path": "pages/declare/add",
 			"style": {
-				"navigationBarTitleText": "",
-				"navigationStyle":"custom"
+				"navigationBarTitleText": ""
+				//"navigationStyle":"custom"
 			}
 		
 		},
@@ -184,8 +184,8 @@
 		{
 			"path": "pages/disinfect/addDisinfect",
 			"style": {
-				"navigationBarTitleText": "",
-				"navigationStyle":"custom"
+				"navigationBarTitleText": ""
+				//"navigationStyle":"custom"
 			}
 		
 		},
@@ -203,6 +203,13 @@
 				"navigationBarTitleText": ""
 			}
 		
+		},
+		{
+			"path": "pages/business-entering/declare-select",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		
 		}
 		
 	],

+ 36 - 0
app/pages/business-entering/business-edit.vue

@@ -82,6 +82,14 @@
 				</view>
 			</view>
 			<view class="item">
+				<view class="l"><text style="color: red;">*</text>申报单号:</view>
+				<view class="r">
+					<u-input placeholder="申报订单号" v-model="form.declareNo" clearable readonly>
+						<text slot="suffix" style="font-size: 50rpx;" @click="selectDeclare">+</text>
+					</u-input>
+				</view>
+			</view>
+			<view class="item">
 				<view class="l"><text style="color: red;">*</text>货物:</view>
 				<view class="r">
 					<picker v-if="goods.goodsList.length>0" class="p-picker" id="hw" @change="whChange($event)"
@@ -308,6 +316,28 @@
 			}
 			this.getGoodsList();
 			this.getUnit();
+			let that=this;
+			uni.$on('getSelectDeclare', declare => {
+				that.$nextTick(() => {
+					that.form.declareNo = declare.declareNo;
+					that.form.cardNo = declare.carNo;
+					that.form.chinaCarNo = declare.chinaCarNo;
+					that.form.netWeight = declare.grossWeight;
+					let chinaCarNo = declare.chinaCarNo;
+					if (chinaCarNo) {
+						let list = [];
+						chinaCarNo.replace(",", ",").split(",").forEach(carNo => {
+							let obj = {
+								carNo: carNo
+							}
+							list.push(obj);
+							that.china.list = list;
+						})
+					}else{
+						that.china.list =[];
+					}
+				})
+			})
 		},
 		computed: {
 			totalPrice() {
@@ -331,6 +361,9 @@
 
 		},
 		methods: {
+			selectDeclare() {
+				this.$common.to('/pages/business-entering/declare-select?declareNo=' + this.form.declareNo)
+			},
 			addCar() {
 				this.china.visible = true;
 			},
@@ -642,7 +675,9 @@
 				}
 				this.form.itemJson = JSON.stringify(list);
 				this.form.peopleJson = JSON.stringify(peopleList);
+				this.form.carJson=JSON.stringify(this.china.list);
 				this.form.items = null;
+				this.form.cars=null;
 				if (this.customerId == '1') {
 					this.form.customerId = this.customer.customerList[this.customer.index].id;
 				} else {
@@ -654,6 +689,7 @@
 			},
 			saveFn() {
 				if (this.check()) {
+					
 					let obj = this.$common.removeNull(this.form);
 					this.$api.saveBusiness(obj).then(resp => {
 						if (resp.code == 200) {

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

@@ -82,6 +82,14 @@
 				</view>
 			</view>
 			<view class="item">
+				<view class="l"><text style="color: red;">*</text>申报单号:</view>
+				<view class="r">
+					<u-input placeholder="申报订单号" v-model="form.declareNo" clearable readonly>
+						<text slot="suffix" style="font-size: 50rpx;" @click="selectDeclare">+</text>
+					</u-input>
+				</view>
+			</view>
+			<view class="item">
 				<view class="l"><text style="color: red;">*</text>货物:</view>
 				<view class="r">
 					<picker v-if="goods.goodsList.length>0" class="p-picker" id="hw" @change="whChange($event)"
@@ -108,8 +116,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.cardSize">
+					<u-input type="number" placeholder="输入车辆规格" @input="handler()" v-model="form.cardSize">
 						<text slot="suffix">米</text>
 					</u-input>
 				</view>
@@ -235,6 +242,7 @@
 				form: {
 					customerId: '',
 					customerIndex: 0,
+					declareNo: '',
 					countryIndex: 0,
 					goodsIndex: 0,
 					cardNo: '',
@@ -322,7 +330,34 @@
 			this.getGoodsList();
 			this.getUnit();
 		},
+		onLoad(options) {
+			let that = this;
+			uni.$on('getSelectDeclare', declare => {
+				that.$nextTick(() => {
+					that.form.declareNo = declare.declareNo;
+					that.form.cardNo = declare.carNo;
+					that.form.chinaCarNo = declare.chinaCarNo;
+					that.form.netWeight = declare.grossWeight;
+					let chinaCarNo = declare.chinaCarNo;
+					if (chinaCarNo) {
+						let list = [];
+						chinaCarNo.replace(",", ",").split(",").forEach(carNo => {
+							let obj = {
+								carNo: carNo
+							}
+							list.push(obj);
+							that.china.list = list;
+						})
+					}else{
+						that.china.list =[];
+					}
+				})
+			})
+		},
 		methods: {
+			selectDeclare() {
+				this.$common.to('/pages/business-entering/declare-select?declareNo=' + this.form.declareNo)
+			},
 			addCar() {
 				this.china.visible = true;
 			},

+ 218 - 0
app/pages/business-entering/declare-select.vue

@@ -0,0 +1,218 @@
+<template>
+	<view>
+		<view class="box">
+			<view class="top">
+				<text class="title">申报记录</text>
+			</view>
+		</view>
+		<u-search v-if="recordItemList.length>0" placeholder="申报人" shape="square" v-model="p.declarePeople" @search="getDeclareList()" @change="getDeclareList"
+			:height="80" style="margin: 30rpx;">
+		</u-search>
+		<view class="card-box">
+			<u-radio-group v-model="p.declareNo" placement="column"  @change="onSelect">
+				<view class="card" v-for="(recordItem,index) in recordItemList" :key="index">
+					<view class="c">
+						<view class="item car-num-item">
+							<text class="car-num">申报时间:{{recordItem.createTime}}</text>
+						</view>
+						<view class="item">
+							<text class="p1">申报人:</text>
+							<text class="p2">{{recordItem.declarePeople}}</text>
+						</view>
+						<view class="item">
+							<text class="p1">申报电话:</text>
+							<text class="p2">{{recordItem.declarePhone}}</text>
+						</view>
+						<view class="item">
+							<text class="p1">产品学名:</text>
+							<text class="p2">{{recordItem.goodsName}}</text>
+						</view>
+						<view class="item">
+							<text class="p1">越南车牌:</text>
+							<text class="p2">{{recordItem.carNo}}</text>
+						</view>
+
+					</view>
+					<view class="b">
+						<u-radio :key="index" :name="recordItem.declareNo" label="选择">
+						</u-radio>
+					</view>
+				</view>
+
+			</u-radio-group>
+		</view>
+		<!-- 没有数据时显示noData -->
+		<noData v-if="recordItemList.length==0"></noData>
+		<view style="text-align: center;margin: 20rpx 0 50rpx 0;color: #007AFF;" @click="toDeclare">前往添加</view>
+		<u-loadmore v-if="recordItemList.length>0" style="margin: 30rpx;" :status="status" />
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				p:{
+					pageNo: 1,
+					pageSize: 10,
+					dataCount: 0,
+					declareNo: '',
+				},
+				status: 'loadmore',
+				recordItemList: [],
+			}
+		},
+		onLoad(options) {
+			this.p.declareNo = options.declareNo;
+		},
+		methods: {
+			toDeclare(){
+				this.$common.to('/pages/declare/add');
+			},
+			onSelect() {
+				let select = this.p.declareNo;
+				let declare = this.recordItemList.filter(obj => obj.declareNo == select).pop();
+				uni.navigateBack({
+					delta: 1,
+					success: function(resp) {
+						uni.$emit('getSelectDeclare', declare) //触发事件
+					}
+				})
+			},
+			getDeclareList() {
+				if(!this.p.declareNo){
+					this.p.declareNo='-1'
+				}
+				this.$api.getDeclareList(this.p).then(resp => {
+					this.status = 'loadmore';
+					let recordList = resp.data;
+					this.p.dataCount = resp.dataCount;
+					this.p.pageNo = resp.pageNo;
+					this.recordItemList = recordList;
+					if (this.dataCount < this.pageSize * this.pageNo) this.status = 'nomore';
+				})
+			},
+			//------------------------------------------
+			//上拉加载更多,分页模拟数据
+			onReachBottom() {
+				this.status = 'loading';
+				if (this.p.dataCount > this.p.pageSize * this.p.pageNo) {
+					this.p.pageSize = parseInt(this.p.pageSize) + 3;
+					this.getDeclareList();
+				} else {
+					this.status = 'nomore';
+				}
+			}
+		},
+		onShow() {
+			this.getDeclareList();
+		},
+	}
+</script>
+
+<style lang="scss">
+	.card-box {
+		display: flex;
+		width: 100%;
+		flex-direction: column;
+
+		.card {
+			background-color: #fff;
+			border-radius: 20rpx;
+			margin: 20rpx 20rpx 0 20rpx;
+			padding: 30rpx;
+			box-sizing: border-box;
+			display: flex;
+			flex-direction: column;
+
+			.t {
+				width: 100%;
+				display: flex;
+				align-items: center;
+				padding-bottom: 30rpx;
+				border-bottom: 1rpx solid #f5f5f5;
+
+				.icon {
+					width: 40rpx;
+					height: 40rpx;
+				}
+
+				.title {
+					font-size: 30rpx;
+					font-weight: bold;
+					margin-left: 20rpx;
+				}
+			}
+
+			.c {
+				padding: 15rpx 0 0 0;
+				display: flex;
+				flex-wrap: wrap;
+
+				//border-bottom: 1rpx solid #f5f5f5;
+				.item {
+					width: 50%;
+					padding: 20rpx 0;
+					display: flex;
+
+					.car-num {
+						background-color: #edf6ff;
+						color: #0080ff;
+						font-size: 30rpx;
+						padding: 15rpx 0;
+						text-align: center;
+						width: 100%;
+						border-radius: 10rpx;
+						font-weight: bold;
+					}
+
+					.p1 {
+						font-size: 28rpx;
+						color: #999;
+						flex: 5;
+					}
+
+					.p2 {
+						font-size: 28rpx;
+						color: #191919;
+						font-weight: bold;
+						margin-left: 20rpx;
+						flex: 7;
+					}
+				}
+
+				.car-num-item {
+					width: 100%;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+				}
+			}
+
+			.b {
+				margin-top: 20rpx;
+				display: flex;
+				width: 100%;
+				align-items: center;
+				justify-content: space-between;
+			}
+		}
+	}
+
+	.t-btn {
+		width: 400rpx;
+		margin: 0 auto 80rpx auto;
+		height: 88rpx;
+		font-weight: bold;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		border-radius: 10rpx;
+		color: #191919;
+		font-size: 28rpx;
+		background-color: #fff;
+		border: 1px solid #eee;
+	}
+
+	@import '@/common/common.scss'
+</style>

+ 14 - 0
app/pages/declare/add.vue

@@ -219,6 +219,10 @@
 		mounted() {
 			this.checkStore();
 		},
+		onBackPress() {
+			this.$common.to('/pages/index/index');
+			return true;
+		},
 		methods: {
 			createModal() {
 				return {
@@ -252,6 +256,7 @@
 			cleanFn() {
 				this.form = this.createModal();
 				this.cleanStore();
+				this.setInfo();
 			},
 			cleanStore() {
 				uni.removeStorageSync('declare')
@@ -262,6 +267,7 @@
 					count: 0,
 					cache: this.form
 				}
+				uni.setStorageSync('info',{declarePeople:this.form.declarePeople,declarePhone:this.form.declarePhone})
 				uni.setStorageSync('declare', cacheObj);
 			},
 			addStoreCount() {
@@ -271,8 +277,16 @@
 				}
 				uni.setStorageSync('declare', cacheObj);
 			},
+			setInfo(){
+				let info=uni.getStorageSync('info');
+				if(info){
+					this.form.declarePeople=info.declarePeople;
+					this.form.declarePhone=info.declarePhone
+				}
+			},
 			checkStore() {
 				let store = uni.getStorageSync('declare');
+				this.setInfo();
 				if (store && store.count == 0) {
 					let that = this;
 					let cache = store.cache;

+ 7 - 6
app/pages/declare/addDeclareSuccess.vue

@@ -3,7 +3,10 @@
 		<u-icon name="checkmark-circle-fill" color="#07c160" size="200"></u-icon>
 		<text class="text">申报信息提交成功!</text>
 		<view class="count-down-box">
-			<text @click="goback">返回</text>
+			<view @click="goDisifect" style="color: #007AFF;">消杀申报</view>
+		</view>
+		<view class="count-down-box">
+			<view @click="goback">返回</view>
 		</view>
 	</view>
 </template>
@@ -20,6 +23,9 @@
 			return true;
 		},
 		methods: {
+			goDisifect(){
+				this.$common.to('/pages/disinfect/addDisinfect');
+			},
 			goback() {
 				this.$common.to('/pages/declare/add');
 			}
@@ -49,14 +55,9 @@
 
 		.count-down-box {
 			display: flex;
-			flex: 1;
 			align-items: center;
 			justify-content: center;
 			margin-top: 30rpx;
-
-			text {
-				margin-left: 20rpx;
-			}
 		}
 	}
 </style>

+ 14 - 0
app/pages/disinfect/addDisinfect.vue

@@ -182,6 +182,10 @@
 		mounted() {
 			this.checkStore();
 		},
+		onBackPress() {
+			this.$common.to('/pages/index/index');
+			return true;
+		},
 		methods: {
 			createModal() {
 				return {
@@ -209,6 +213,7 @@
 			cleanFn() {
 				this.form = this.createModal();
 				this.cleanStore();
+				this.setInfo();
 			},
 			cleanStore() {
 				uni.removeStorageSync('disinfect')
@@ -219,6 +224,7 @@
 					count: 0,
 					cache: this.form
 				}
+				uni.setStorageSync('info',{declarePeople:this.form.declarePeople,declarePhone:this.form.declarePhone})
 				uni.setStorageSync('disinfect', cacheObj);
 			},
 			addStoreCount() {
@@ -228,7 +234,15 @@
 				}
 				uni.setStorageSync('disinfect', cacheObj);
 			},
+			setInfo(){
+				let info=uni.getStorageSync('info');
+				if(info){
+					this.form.declarePeople=info.declarePeople;
+					this.form.declarePhone=info.declarePhone
+				}
+			},
 			checkStore() {
+				this.setInfo();
 				let disinfectStore = uni.getStorageSync('disinfect');
 				if (disinfectStore && disinfectStore.count == 0) {
 					let that = this;

+ 6 - 0
app/pages/disinfect/addDisinfectSuccess.vue

@@ -3,6 +3,9 @@
 		<u-icon name="checkmark-circle-fill" color="#07c160" size="200"></u-icon>
 		<text class="text">消毒申报信息提交成功!</text>
 		<view class="count-down-box">
+			<view @click="goDeclare" style="color: #007AFF;">申报录入</view>
+		</view>
+		<view class="count-down-box">
 			<text @click="goback">返回</text>
 		</view>
 	</view>
@@ -20,6 +23,9 @@
 			return true;
 		},
 		methods: {
+			goDeclare(){
+				this.$common.to('/pages/declare/add');
+			},
 			goback() {
 				this.$common.to('/pages/disinfect/addDisinfect');
 			}

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

@@ -141,4 +141,15 @@ var menuList =	[
 			{id: 'tb-discount-add', name: '折扣管理-添加', url: 'sa-view/tb-discount/tb-discount-add.html'},
 		]
 	},
+	{
+		id: 'tb-fee-statistics',
+		name: '收费统计',
+		icon: 'el-icon-folder-opened',
+		info: '收费统计表表数据的维护',
+		childList: [
+			{id: 'tb-fee-statistics-list', name: '日统计', url: 'sa-view/tb-fee-statistics/tb-fee-statistics-list.html'},
+			{id: 'month-statistcs.html', name: '月统计', url: 'sa-view/tb-fee-statistics/month-statistcs.html'},
+			{id: 'year-statistcs.html', name: '年统计', url: 'sa-view/tb-fee-statistics/year-statistcs.html'},
+		]
+	},
 ]

+ 1 - 1
sp-admin/sa-view/tb-declare/tb-declare-add.html

@@ -86,7 +86,7 @@
 							grossWeight: '',		// 毛重 
 							num: '',		// 件数 
 							productionDate: '',		// 生产日期 
-							expirationDate: '',		// 保质期 
+							expirationDate: '',		// 保质期
 							storageMode: '',		// 储存条件 
 							productionMode: '',		// 生产方式 
 							origin: '',		// 原产国 

+ 124 - 0
sp-admin/sa-view/tb-fee-statistics/month-statistcs.html

@@ -0,0 +1,124 @@
+<!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>
+           <div class="c-item">
+                <label class="c-label">收费类型:</label>
+                <el-select v-model="p.feeType" placeholder="请选择" filterable>
+                    <el-option label="-全部-" value=""></el-option>
+                    <el-option label="核酸检测" value="1"></el-option>
+                    <el-option label="消杀作业" value="2"></el-option>
+                    <el-option label="装卸作业" value="3"></el-option>
+                    <el-option label="停车费" value="4"></el-option>
+                    <el-option label="过磅费" value="5"></el-option>
+                </el-select>
+            </div>
+            <div class="c-item">
+                <label class="c-label">日期:</label>
+                <el-date-picker type="month" value-format="yyyy-MM" v-model="p.month"></el-date-picker>
+            </div>
+            <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
+            <br/>
+        </el-form>
+        <!-- ------------- 快捷按钮 ------------- -->
+        <div class="fast-btn">
+            <el-button size="mini" type="info" @click="sa.f5()">刷新</el-button>
+        </div>
+        <!-- ------------- 数据列表 ------------- -->
+        <el-table class="data-table" ref="data-table" :data="dataList">
+            <sa-td type="selection"></sa-td>
+            <sa-td name="收费类型" prop="feeType" type="enum"
+                   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车费', 5: '过磅费', 6: '入场管理费'}"></sa-td>
+            <sa-td name="月份" prop="month" ></sa-td>
+            <sa-td name="收入(元)" prop="statisticsMoney"></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>-->
+            <!--							<el-button class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改</el-button>-->
+            <!--							<el-button class="c-btn" type="danger" icon="el-icon-delete" @click="del(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: '',		// 主键
+                feeType: '',		// 收费类型(1=核酸检测,2消杀作业,3=装卸作业,4=停车费,5=过磅费)
+                feeTypeId: '',		// 收费类型id
+                feeTypeName: '',		// 收费类型
+                itemTypeId: '',		// 业务类型id
+                itemTypeName: '',		// 业务类型
+                year: '',		// 年份
+                month: '',		// 月份
+                dayTime: '',		// 日期
+                num: '',		// 数量
+                taxMoney: '',		// 税款
+                taxRate: '',		// 税率
+                noTaxMoney: '',		// 不含税款
+                payType: '',		// 支付方式(1=微信支付)
+                pageNo: 1,		// 当前页
+                pageSize: 10,	// 页大小
+                sortType: 0		// 排序方式
+            },
+            dataCount: 0,
+            dataList: [], // 数据集合
+        },
+        methods: {
+            // 刷新
+            f5: function () {
+                sa.ajax('/TbFeeStatistics/getMonth', sa.removeNull(this.p), function (res) {
+                    this.dataList = res.data; // 数据
+                    this.dataCount = res.dataCount; // 数据总数
+                    sa.f5TableHeight();		// 刷新表格高度
+                }.bind(this));
+            },
+            // 查看
+            get: function (data) {
+                sa.showIframe('数据详情', 'tb-fee-statistics-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>

+ 132 - 0
sp-admin/sa-view/tb-fee-statistics/tb-fee-statistics-list.html

@@ -0,0 +1,132 @@
+<!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="enum" name="收费类型" v-model="p.feeType" -->
+<!--						:jv="{1: '核酸检测', 3: '装卸作业', 4: '停车费', 5: '过磅费'}" jtype="2" def="不限"></sa-item>-->
+					<div class="c-item">
+						<label class="c-label">收费类型:</label>
+						<el-select v-model="p.feeType" placeholder="请选择" filterable>
+							<el-option label="-全部-" value=""> </el-option>
+							<el-option label="核酸检测" value="1"> </el-option>
+							<el-option label="消杀作业" value="2"> </el-option>
+							<el-option label="装卸作业" value="3"> </el-option>
+							<el-option label="停车费" value="4"> </el-option>
+							<el-option label="过磅费" value="5"> </el-option>
+							<el-option label="入场管理费" value="6"> </el-option>
+						</el-select>
+					</div>
+					<div class="c-item">
+						<label class="c-label">日期:</label>
+						<el-date-picker type="date" value-format="yyyy-MM-dd" v-model="p.dayTime"></el-date-picker>
+					</div>
+					<el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
+					<br />
+				</el-form>
+				<!-- ------------- 快捷按钮 ------------- -->
+				<div class="fast-btn">
+					<el-button size="mini" type="info" @click="sa.f5()">刷新</el-button>
+				</div>
+				<!-- ------------- 数据列表 ------------- -->
+				<el-table class="data-table" ref="data-table" :data="dataList" >
+					<sa-td type="selection"></sa-td>
+					<sa-td name="收费类型" prop="feeType" type="enum"
+						   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车费', 5: '过磅费', 6: '入场管理费'}"></sa-td>
+					<sa-td name="业务类型" prop="itemTypeName" ></sa-td>
+					<sa-td name="日期" type="date" prop="dayTime" ></sa-td>
+					<sa-td name="数量" prop="num" ></sa-td>
+					<sa-td name="含税收入(元)" prop="taxMoney" ></sa-td>
+					<sa-td name="税率" prop="taxRate" ></sa-td>
+					<sa-td name="不含税收入(元)" prop="noTaxMoney" ></sa-td>
+					<sa-td name="支付方式" prop="payType" type="enum" :jv="{3: '微信支付'}"></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>-->
+<!--							<el-button class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改</el-button>-->
+<!--							<el-button class="c-btn" type="danger" icon="el-icon-delete" @click="del(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: '',		// 主键 
+						feeType: '',		// 收费类型(1=核酸检测,2消杀作业,3=装卸作业,4=停车费,5=过磅费) 
+						feeTypeId: '',		// 收费类型id 
+						feeTypeName: '',		// 收费类型 
+						itemTypeId: '',		// 业务类型id 
+						itemTypeName: '',		// 业务类型 
+						year: '',		// 年份 
+						month: '',		// 月份 
+						dayTime: '',		// 日期 
+						num: '',		// 数量 
+						taxMoney: '',		// 税款 
+						taxRate: '',		// 税率 
+						noTaxMoney: '',		// 不含税款 
+						payType: '',		// 支付方式(1=微信支付) 
+						pageNo: 1,		// 当前页 
+						pageSize: 10,	// 页大小 
+						sortType: 9		// 排序方式
+					},
+					dataCount: 0,
+					dataList: [], // 数据集合 
+				},
+				methods: {
+					// 刷新
+					f5: function() {
+						sa.ajax('/TbFeeStatistics/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-fee-statistics-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>

+ 124 - 0
sp-admin/sa-view/tb-fee-statistics/year-statistcs.html

@@ -0,0 +1,124 @@
+<!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>
+            <div class="c-item">
+                <label class="c-label">收费类型:</label>
+                <el-select v-model="p.feeType" placeholder="请选择" filterable>
+                    <el-option label="-全部-" value=""></el-option>
+                    <el-option label="核酸检测" value="1"></el-option>
+                    <el-option label="消杀作业" value="2"></el-option>
+                    <el-option label="装卸作业" value="3"></el-option>
+                    <el-option label="停车费" value="4"></el-option>
+                    <el-option label="过磅费" value="5"></el-option>
+                </el-select>
+            </div>
+            <div class="c-item">
+                <label class="c-label">日期:</label>
+                <el-date-picker type="year" value-format="yyyy" v-model="p.year"></el-date-picker>
+            </div>
+            <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
+            <br/>
+        </el-form>
+        <!-- ------------- 快捷按钮 ------------- -->
+        <div class="fast-btn">
+            <el-button size="mini" type="info" @click="sa.f5()">刷新</el-button>
+        </div>
+        <!-- ------------- 数据列表 ------------- -->
+        <el-table class="data-table" ref="data-table" :data="dataList">
+            <sa-td type="selection"></sa-td>
+            <sa-td name="收费类型" prop="feeType" type="enum"
+                   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车费', 5: '过磅费', 6: '入场管理费'}"></sa-td>
+            <sa-td name="年份" prop="year"></sa-td>
+            <sa-td name="收入(元)" prop="statisticsMoney"></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>-->
+                <!--							<el-button class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改</el-button>-->
+                <!--							<el-button class="c-btn" type="danger" icon="el-icon-delete" @click="del(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: '',		// 主键
+                feeType: '',		// 收费类型(1=核酸检测,2消杀作业,3=装卸作业,4=停车费,5=过磅费)
+                feeTypeId: '',		// 收费类型id
+                feeTypeName: '',		// 收费类型
+                itemTypeId: '',		// 业务类型id
+                itemTypeName: '',		// 业务类型
+                year: '',		// 年份
+                month: '',		// 月份
+                dayTime: '',		// 日期
+                num: '',		// 数量
+                taxMoney: '',		// 税款
+                taxRate: '',		// 税率
+                noTaxMoney: '',		// 不含税款
+                payType: '',		// 支付方式(1=微信支付)
+                pageNo: 1,		// 当前页
+                pageSize: 10,	// 页大小
+                sortType: 0		// 排序方式
+            },
+            dataCount: 0,
+            dataList: [], // 数据集合
+        },
+        methods: {
+            // 刷新
+            f5: function () {
+                sa.ajax('/TbFeeStatistics/getYear', sa.removeNull(this.p), function (res) {
+                    this.dataList = res.data; // 数据
+                    this.dataCount = res.dataCount; // 数据总数
+                    sa.f5TableHeight();		// 刷新表格高度
+                }.bind(this));
+            },
+            // 查看
+            get: function (data) {
+                sa.showIframe('数据详情', 'tb-fee-statistics-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>

+ 5 - 0
sp-server/src/main/java/com/pj/api/wx/service/WxService.java

@@ -24,6 +24,7 @@ import com.pj.project.tb_business_item.TbBusinessItem;
 import com.pj.project.tb_business_item.TbBusinessItemService;
 import com.pj.project.tb_costomer.TbCostomer;
 import com.pj.project.tb_costomer.TbCostomerService;
+import com.pj.project.tb_fee_statistics.TbFeeStatisticsService;
 import com.pj.project.tb_pay_record.TbPayRecord;
 import com.pj.project.tb_pay_record.TbPayRecordService;
 import com.pj.utils.cache.RedisUtil;
@@ -63,6 +64,8 @@ public class WxService {
     @Resource
     @Lazy
     TbBusinessItemService tbBusinessItemService;
+    @Resource
+    TbFeeStatisticsService tbFeeStatisticsService;
 
     /**
      * 统一下单接口
@@ -167,6 +170,7 @@ public class WxService {
         if (StrUtil.isNotEmpty(attachStr)) {
             Attach attach = JSONUtil.toBean(attachStr, Attach.class);
             List<PriceBO> cars = JSONUtil.toList(attach.getC(), PriceBO.class);
+            tbFeeStatisticsService.countParkFee(cars);
             for (PriceBO bo1 : cars) {
                 TbBusinessCar car = tbBusinessCarService.getById(bo1.getId());
                 BigDecimal price = bo1.getP();
@@ -180,6 +184,7 @@ public class WxService {
             String businessId = attach.getB();
             if (StrUtil.isNotEmpty(businessId)) {
                 List<TbBusinessItem> items = tbBusinessItemService.findByBusinessId(businessId);
+                tbFeeStatisticsService.countBusinessFee(items);
                 items.forEach(tbBusinessItem -> tbBusinessItem.setPayStatus(1).setPayTime(now));
                 tbBusinessItemService.updateBatchById(items);
                 TbBusiness tbBusiness = tbBusinessService.getById(businessId);

+ 1 - 1
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCar.java

@@ -43,7 +43,7 @@ public class TbBusinessCar extends Model<TbBusinessCar> implements Serializable
 	 *  
 	 */
 	@TableId(type = IdType.AUTO)
-	private Long id;
+	private String id;
 
 	/**
 	 *  

+ 24 - 5
sp-server/src/main/java/com/pj/project/tb_costomer/TbCostomerService.java

@@ -17,6 +17,7 @@ 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.admin.SpAdminService;
 import com.pj.project4sp.role.SpRole;
 import com.pj.project4sp.role.SpRoleMapper;
 import com.pj.project4sp.role4permission.SpRolePermissionMapper;
@@ -51,6 +52,8 @@ public class TbCostomerService extends ServiceImpl<TbCostomerMapper, TbCostomer>
     private TbDistrictService tbDistrictService;
     @Resource
     private SpAdminMapper spAdminMapper;
+    @Resource
+    private SpAdminService spAdminService;
 
     /**
      * 增
@@ -144,16 +147,32 @@ public class TbCostomerService extends ServiceImpl<TbCostomerMapper, TbCostomer>
 
         //审核不通过禁用用户
         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);
+        List<SpAdmin> spAdminList = spAdminMapper.getByCostomerId(costomer.getId());
+        for (SpAdmin spAdmin : spAdminList) {
+            if(spAdmin != null) {
+                spAdmin.setStatus(isBan);
+                spAdminMapper.updateCustomerAdmin(costomer.getId(), isBan);
+            }
         }
-
     }
 
     public void register(TbCostomer costomer) {
         costomer.setJudgeStatus(1).setStatus(1);
         this.add(costomer);
+
+        //新增一个默认用户账号 账号:联系人/密码:手机号后六位
+        SpAdmin spAdmin = new SpAdmin();
+        spAdmin.setId(0L);
+        spAdmin.setCustomerId(costomer.getId());
+        spAdmin.setName(costomer.getDutyPeople());
+        spAdmin.setPassword(costomer.getPhone().substring(costomer.getPhone().length()-6));
+        SoMap so = new SoMap();
+        so.put("customerId", costomer.getId());
+        List<SpRole> roleList = spRoleMapper.getList(so);
+        List<Long> roleIdList = roleList.stream().map(role -> role.getId()).collect(Collectors.toList());
+        String roleId = roleIdList.stream().map(String::valueOf).collect(Collectors.joining(","));
+        spAdmin.setRoleId(roleId);
+        spAdminService.addWhenRegister(spAdmin);
+        spAdminMapper.updateCustomerAdmin(costomer.getId(), 2);
     }
 }

+ 127 - 0
sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatistics.java

@@ -0,0 +1,127 @@
+package com.pj.project.tb_fee_statistics;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.Getter;
+import lombok.experimental.Accessors;
+
+/**
+ * Model: tb_fee_statistics -- 收费统计表
+ * @author lzm 
+ */
+@Data
+@Accessors(chain = true)
+public class TbFeeStatistics implements Serializable {
+
+	// ---------- 模块常量 ----------
+	/**
+	 * 序列化版本id 
+	 */
+	private static final long serialVersionUID = 1L;	
+	/**
+	 * 此模块对应的表名 
+	 */
+	public static final String TABLE_NAME = "tb_fee_statistics";	
+	/**
+	 * 此模块对应的权限码 
+	 */
+	public static final String PERMISSION_CODE = "tb-fee-statistics";	
+
+
+	// ---------- 表中字段 ----------
+	/**
+	 * 主键 
+	 */
+    private String id;
+
+	/**
+	 * 收费类型(1=核酸检测,2消杀作业,3=装卸作业,4=停车费,5=过磅费) 
+	 */
+    private Integer feeType;
+
+
+	/**
+	 * 业务类型id 
+	 */
+    private String itemTypeId;
+
+	/**
+	 * 业务类型 
+	 */
+    private String itemTypeName;
+
+	/**
+	 * 年份 
+	 */
+    private String year;
+
+	/**
+     * 月份
+     */
+    private String month;
+
+    /**
+     * 天
+     */
+    private String day;
+
+	/**
+	 * 日期 
+	 */
+    private Date dayTime;
+
+	/**
+	 * 数量 
+	 */
+    private Integer num = 0;
+
+	/**
+	 * 税款 
+	 */
+	public BigDecimal taxMoney = new BigDecimal(0);
+
+	/**
+	 * 税率 
+	 */
+    private BigDecimal taxRate = new BigDecimal(0);
+
+	/**
+	 * 不含税款 
+	 */
+    private BigDecimal noTaxMoney = new BigDecimal(0);
+
+	/**
+	 * 支付方式(1=微信支付) 
+	 */
+    private Integer payType;
+
+    @TableField(exist = false)
+    private BigDecimal statisticsMoney = new BigDecimal(0);
+
+    @Getter
+    @AllArgsConstructor
+    //(1=核酸检测,2=消杀作业,3=装卸作业,4=停车费,5=过磅费)
+    public static enum feeType{
+        NUCLEIC_FEE(1,"核酸检测"),
+        DISINFECT_FEE(2,"消杀作业"),
+        STEVEDORE_FEE(3,"装卸作业"),
+        PARK_FEE(4,"停车费"),
+        WEIGHT_FEE(5,"过磅费"),
+        MANAGE_FEE(6, "入场管理费");
+        private int code;
+        private String desc;
+    }
+
+
+
+
+
+	
+
+
+}

+ 119 - 0
sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsController.java

@@ -0,0 +1,119 @@
+package com.pj.project.tb_fee_statistics;
+
+import java.util.List;
+
+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_fee_statistics -- 收费统计表
+ * @author lzm 
+ */
+@RestController
+@RequestMapping("/TbFeeStatistics/")
+public class TbFeeStatisticsController {
+
+	/** 底层 Service 对象 */
+	@Autowired
+	TbFeeStatisticsService tbFeeStatisticsService;
+
+	/** 增 */  
+	@RequestMapping("add")
+	@SaCheckPermission(TbFeeStatistics.PERMISSION_CODE)
+	@Transactional(rollbackFor = Exception.class)
+	public AjaxJson add(TbFeeStatistics t){
+		tbFeeStatisticsService.add(t);
+		t = tbFeeStatisticsService.getById(SP.publicMapper.getPrimarykey());
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 删 */  
+	@RequestMapping("delete")
+	@SaCheckPermission(TbFeeStatistics.PERMISSION_CODE)
+	public AjaxJson delete(Long id){
+		int line = tbFeeStatisticsService.delete(id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 删 - 根据id列表 */  
+	@RequestMapping("deleteByIds")
+	@SaCheckPermission(TbFeeStatistics.PERMISSION_CODE)
+	public AjaxJson deleteByIds(){
+		List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class); 
+		int line = SP.publicMapper.deleteByIds(TbFeeStatistics.TABLE_NAME, ids);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 */  
+	@RequestMapping("update")
+	@SaCheckPermission(TbFeeStatistics.PERMISSION_CODE)
+	public AjaxJson update(TbFeeStatistics t){
+		int line = tbFeeStatisticsService.update(t);
+		return AjaxJson.getByLine(line);
+	}
+
+	/** 查 - 根据id */  
+	@RequestMapping("getById")
+	public AjaxJson getById(Long id){
+		TbFeeStatistics t = tbFeeStatisticsService.getById(id);
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	@RequestMapping("getList")
+	public AjaxJson getList() { 
+		SoMap so = SoMap.getRequestSoMap();
+		List<TbFeeStatistics> list = tbFeeStatisticsService.getList(so.startPage());
+		return AjaxJson.getPageData(so.getDataCount(), list);
+	}
+
+    @RequestMapping("getMonth")
+    public AjaxJson getMonth() {
+        SoMap so = SoMap.getRequestSoMap();
+        List<TbFeeStatistics> list = tbFeeStatisticsService.getMonth(so.startPage());
+        return AjaxJson.getPageData(so.getDataCount(), list);
+    }
+
+    @RequestMapping("getYear")
+    public AjaxJson getYear() {
+        SoMap so = SoMap.getRequestSoMap();
+        List<TbFeeStatistics> list = tbFeeStatisticsService.getYear(so.startPage());
+        return AjaxJson.getPageData(so.getDataCount(), list);
+    }
+	
+	
+	
+	
+	// ------------------------- 前端接口 -------------------------
+	
+	
+	/** 改 - 不传不改 [G] */
+	@RequestMapping("updateByNotNull")
+	public AjaxJson updateByNotNull(Long id){
+		AjaxError.throwBy(true, "如需正常调用此接口,请删除此行代码");
+		// 鉴别身份,是否为数据创建者 
+		long userId = SP.publicMapper.getColumnByIdToLong(TbFeeStatistics.TABLE_NAME, "user_id", id);
+		AjaxError.throwBy(userId != StpUserUtil.getLoginIdAsLong(), "此数据您无权限修改");
+		// 开始修改 (请只保留需要修改的字段)
+		SoMap so = SoMap.getRequestSoMap();
+		so.clearNotIn("id", "feeType", "feeTypeId", "feeTypeName", "itemTypeId", "itemTypeName", "year", "month", "dayTime", "num", "taxMoney", "taxRate", "noTaxMoney", "payType").clearNull().humpToLineCase();	
+		int line = SP.publicMapper.updateBySoMapById(TbFeeStatistics.TABLE_NAME, so, id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	
+	
+	
+	
+	
+
+}

+ 62 - 0
sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsMapper.java

@@ -0,0 +1,62 @@
+package com.pj.project.tb_fee_statistics;
+
+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_fee_statistics -- 收费统计表
+ * @author lzm 
+ */
+
+@Mapper
+@Repository
+public interface TbFeeStatisticsMapper  extends BaseMapper<TbFeeStatistics> {
+
+	/**
+	 * 增  
+	 * @param t 实体对象 
+	 * @return 受影响行数 
+	 */
+	int add(TbFeeStatistics t);
+
+	/**
+	 * 删  
+	 * @param id 要删除的数据id  
+	 * @return 受影响行数 
+	 */
+	int delete(Long id);	 
+
+	/** 
+	 * 改  
+	 * @param t 实体对象 
+	 * @return 受影响行数 
+	 */
+	int update(TbFeeStatistics t);
+
+	/** 
+	 * 查 - 根据id  
+	 * @param id 要查询的数据id 
+	 * @return 实体对象 
+	 */
+	TbFeeStatistics getById(Long id);	 
+
+	/**
+	 * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+	 * @param so 参数集合 
+	 * @return 数据列表 
+	 */
+	List<TbFeeStatistics> getList(SoMap so);
+
+    List<TbFeeStatistics> getMonth(SoMap so);
+
+    List<TbFeeStatistics> getYear(SoMap so);
+
+
+    TbFeeStatistics getByDayAndFeeType(@Param("day") String day, @Param("feeType")Integer feeType);
+}

+ 136 - 0
sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsMapper.xml

@@ -0,0 +1,136 @@
+<?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_fee_statistics.TbFeeStatisticsMapper">
+
+	<!-- 增 [G] -->
+	<insert id="add">
+		insert into 
+		tb_fee_statistics (id, fee_type, item_type_id, item_type_name, year, month, day_time, num, tax_money, tax_rate, no_tax_money, pay_type)
+		values (#{id}, #{feeType}, #{itemTypeId}, #{itemTypeName}, #{year}, #{month}, #{dayTime}, #{num}, #{taxMoney}, #{taxRate}, #{noTaxMoney}, #{payType})
+	</insert>
+
+	<!-- 删 -->
+	<delete id="delete">
+		delete from tb_fee_statistics 
+		where id = #{id}
+	</delete>
+
+	<!-- 改 [G] -->
+	<update id="update">
+		update tb_fee_statistics set
+		id = #{id}, 
+		fee_type = #{feeType},
+		item_type_id = #{itemTypeId}, 
+		item_type_name = #{itemTypeName}, 
+		year = #{year}, 
+		month = #{month}, 
+		day_time = #{dayTime}, 
+		num = #{num}, 
+		tax_money = #{taxMoney}, 
+		tax_rate = #{taxRate}, 
+		no_tax_money = #{noTaxMoney}, 
+		pay_type = #{payType}
+		where id = #{id}
+	</update>
+
+
+	<!-- ================================== 查询相关 ================================== -->
+	<!-- select id, fee_type, fee_type_id, fee_type_name, item_type_id, item_type_name, year, month, day_time, num, tax_money, tax_rate, no_tax_money, pay_type from tb_fee_statistics  -->
+	
+	<!-- 通用映射:手动模式 -->
+	<resultMap id="model" type="com.pj.project.tb_fee_statistics.TbFeeStatistics">
+		<result property="id" column="id" />
+		<result property="feeType" column="fee_type" />
+		<result property="itemTypeId" column="item_type_id" />
+		<result property="itemTypeName" column="item_type_name" />
+		<result property="year" column="year" />
+		<result property="month" column="month" />
+		<result property="dayTime" column="day_time" />
+		<result property="num" column="num" />
+		<result property="taxMoney" column="tax_money" />
+		<result property="taxRate" column="tax_rate" />
+		<result property="noTaxMoney" column="no_tax_money" />
+		<result property="payType" column="pay_type" />
+        <result property="statisticsMoney" column="statistics_money" />
+	</resultMap>
+	
+	<!-- 公共查询sql片段 -->
+	<sql id="select_sql">
+		select * 
+		from tb_fee_statistics 
+	</sql>
+	
+	<!-- 查 - 根据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("feeType") '> and fee_type = #{feeType} </if>
+			<if test=' this.has("itemTypeId") '> and item_type_id = #{itemTypeId} </if>
+			<if test=' this.has("itemTypeName") '> and item_type_name = #{itemTypeName} </if>
+			<if test=' this.has("year") '> and year = #{year} </if>
+			<if test=' this.has("month") '> and month = #{month} </if>
+			<if test=' this.has("dayTime") '> and day_time = #{dayTime} </if>
+			<if test=' this.has("num") '> and num = #{num} </if>
+			<if test=' this.has("taxMoney") '> and tax_money = #{taxMoney} </if>
+			<if test=' this.has("taxRate") '> and tax_rate = #{taxRate} </if>
+			<if test=' this.has("noTaxMoney") '> and no_tax_money = #{noTaxMoney} </if>
+			<if test=' this.has("payType") '> and pay_type = #{payType} </if>
+		</where>
+		order by
+		<choose>
+			<when test='sortType == 1'> id desc </when>
+			<when test='sortType == 2'> fee_type desc </when>
+			<when test='sortType == 5'> item_type_id desc </when>
+			<when test='sortType == 6'> item_type_name desc </when>
+			<when test='sortType == 7'> year desc </when>
+			<when test='sortType == 8'> month desc </when>
+			<when test='sortType == 9'> day_time desc </when>
+			<when test='sortType == 10'> num desc </when>
+			<when test='sortType == 11'> tax_money desc </when>
+			<when test='sortType == 12'> tax_rate desc </when>
+			<when test='sortType == 13'> no_tax_money desc </when>
+			<when test='sortType == 14'> pay_type desc </when>
+			<otherwise> id desc </otherwise>
+		</choose>
+	</select>
+
+    <select id="getMonth" resultMap="model">
+        select month, fee_type,  sum(num) as num, sum(tax_money) as statistics_money
+        from tb_fee_statistics
+        <where>
+            <if test=' this.has("feeType") '> and fee_type = #{feeType} </if>
+            <if test=' this.has("month") '> and month = #{month} </if>
+        </where>
+        group by month, fee_type
+        order by month desc
+    </select>
+
+    <select id="getYear" resultMap="model">
+        select year, fee_type,  sum(num) as num, sum(tax_money) as statistics_money
+        from tb_fee_statistics
+        <where>
+            <if test=' this.has("feeType") '> and fee_type = #{feeType} </if>
+            <if test=' this.has("year") '> and year = #{year} </if>
+        </where>
+        group by year, fee_type
+        order by year desc
+    </select>
+
+    <!-- 查 - 根据id -->
+    <select id="getByDayAndFeeType" resultMap="model">
+        <include refid="select_sql"></include>
+        where day_time = #{day} and fee_type = #{feeType}
+    </select>
+	
+	
+	
+	
+
+</mapper>

+ 136 - 0
sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsService.java

@@ -0,0 +1,136 @@
+package com.pj.project.tb_fee_statistics;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.pj.api.wx.bo.PriceBO;
+import com.pj.project.tb_business_item.TbBusinessItem;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Service;
+
+import com.pj.utils.sg.*;
+
+/**
+ * Service: tb_fee_statistics -- 收费统计表
+ * @author lzm 
+ */
+@Service
+public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, TbFeeStatistics> implements IService<TbFeeStatistics> {
+
+	/** 底层 Mapper 对象 */
+	@Autowired
+	TbFeeStatisticsMapper tbFeeStatisticsMapper;
+
+	/** 增 */
+	int add(TbFeeStatistics t){
+		return tbFeeStatisticsMapper.add(t);
+	}
+
+	/** 删 */
+	int delete(Long id){
+		return tbFeeStatisticsMapper.delete(id);
+	}
+
+	/** 改 */
+	int update(TbFeeStatistics t){
+		return tbFeeStatisticsMapper.update(t);
+	}
+
+	/** 查 */
+	TbFeeStatistics getById(Long id){
+		return tbFeeStatisticsMapper.getById(id);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	List<TbFeeStatistics> getList(SoMap so) {
+        return tbFeeStatisticsMapper.getList(so);
+    }
+
+    List<TbFeeStatistics> getMonth(SoMap so) {
+        return tbFeeStatisticsMapper.getMonth(so);
+    }
+
+    List<TbFeeStatistics> getYear(SoMap so) {
+        return tbFeeStatisticsMapper.getYear(so);
+    }
+
+    public TbFeeStatistics getByDayAndFeeType(String day, Integer feeType){
+//        TbFeeStatistics Fee = tbFeeStatisticsMapper.getByDayAndFeeType(Day, feeType);
+        QueryWrapper<TbFeeStatistics> qw = new QueryWrapper<>();
+        qw.eq("day", day);
+        qw.eq("fee_type", feeType);
+        return getOne(qw);
+    }
+
+    @Async
+    public void countParkFee(List<PriceBO> cars){
+        Date now = new Date();
+        String toDay = DateUtil.format(now, "yyyy-MM-dd");
+        String thisYear = StrUtil.sub(toDay, 0, 4);
+        String thisMonth = StrUtil.sub(toDay, 0, 7);
+        TbFeeStatistics parkFee = this.getByDayAndFeeType(toDay, TbFeeStatistics.feeType.PARK_FEE.getCode());
+        if(parkFee == null){
+            parkFee = new TbFeeStatistics();
+            parkFee.setTaxRate(new BigDecimal(0.09));
+        }
+        for (PriceBO bo1 : cars) {
+            BigDecimal price = bo1.getP();
+            if(price.compareTo(new BigDecimal(30)) == 0){
+                parkFee.setNum(parkFee.getNum() + 1);
+            }
+            parkFee.setTaxMoney(parkFee.getTaxMoney().add(price));
+        }
+        BigDecimal noTaxMoney = parkFee.getTaxMoney().subtract(parkFee.getTaxMoney().multiply(parkFee.getTaxRate()));
+        parkFee.setNoTaxMoney(noTaxMoney);
+        parkFee.setDayTime(now).setMonth(thisMonth).setYear(thisYear).setDay(toDay)
+                .setFeeType(TbFeeStatistics.feeType.PARK_FEE.getCode()).setItemTypeName(TbFeeStatistics.feeType.PARK_FEE.getDesc())
+                .setPayType(3);
+        this.saveOrUpdate(parkFee);
+    }
+
+    @Async
+    public void countBusinessFee(List<TbBusinessItem> items){
+        Date now = new Date();
+        String toDay = DateUtil.format(now, "yyyy-MM-dd");
+        String thisYear = StrUtil.sub(toDay, 0, 4);
+        String thisMonth = StrUtil.sub(toDay, 0, 7);
+        int feeType = -1;
+        for (TbBusinessItem item : items) {
+            String itemType = item.getItemTypeName();
+            if(itemType.contains("核酸")){
+                feeType = TbFeeStatistics.feeType.NUCLEIC_FEE.getCode();
+            } else if(itemType.contains("消毒")){
+                feeType = TbFeeStatistics.feeType.DISINFECT_FEE.getCode();
+            } else if(itemType.contains("装卸")){
+                feeType = TbFeeStatistics.feeType.STEVEDORE_FEE.getCode();
+            } else if(StrUtil.equals(itemType, "特殊车辆") || StrUtil.equals(itemType, "充电打冷") || StrUtil.equals(itemType, "汽车吊" )){
+                feeType = TbFeeStatistics.feeType.STEVEDORE_FEE.getCode();
+            } else if(itemType.contains("入场管理")){
+                feeType = TbFeeStatistics.feeType.MANAGE_FEE.getCode();
+            }
+            TbFeeStatistics businessFee = this.getByDayAndFeeType(toDay, feeType);
+            if(businessFee == null){
+                businessFee = new TbFeeStatistics();
+                businessFee.setTaxRate(new BigDecimal(0.06));
+            }
+            businessFee.setTaxMoney(businessFee.getTaxMoney().add(item.getItemPrice()));
+            businessFee.setNum(businessFee.getNum() + 1);
+            BigDecimal noTaxMoney = businessFee.getTaxMoney().subtract(businessFee.getTaxMoney().multiply(businessFee.getTaxRate()));
+            businessFee.setNoTaxMoney(noTaxMoney);
+            businessFee.setDayTime(now).setMonth(thisMonth).setYear(thisYear).setDay(toDay)
+                    .setFeeType(feeType).setItemTypeName(itemType)
+                    .setPayType(3);
+            this.saveOrUpdate(businessFee);
+        }
+    }
+
+}

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

@@ -71,5 +71,5 @@ public interface SpAdminMapper {
 
 	void updateCustomerAdmin(@Param("customerId")String customerId, @Param("status")int status);
 
-    SpAdmin getByCostomerId(@Param("customerId")String customerId);
+    List<SpAdmin> getByCostomerId(@Param("customerId")String customerId);
 }

+ 21 - 0
sp-server/src/main/java/com/pj/project4sp/admin/SpAdminService.java

@@ -48,6 +48,27 @@ public class SpAdminService {
 		// 返回主键 
 		return id;
 	}
+
+    /**
+     * h5企业注册时添加一个账号
+     * @param admin
+     * @return
+     */
+    @Transactional(rollbackFor = Exception.class, propagation=Propagation.REQUIRED)
+    public long addWhenRegister(SpAdmin admin) {
+        // 检查姓名是否合法
+        SpAdminUtil.checkAdmin(admin);
+
+        // 开始添加
+        spAdminMapper.add(admin);
+        // 获取主键
+        long id = SP.publicMapper.getPrimarykey();
+        // 更改密码(md5与明文)
+        spAdminPasswordService.updatePassword(id, admin.getPassword2());
+
+        // 返回主键
+        return id;
+    }