浏览代码

多过磅费

qzyReal 2 年之前
父节点
当前提交
a45820d512
共有 77 个文件被更改,包括 3495 次插入700 次删除
  1. 20 17
      app-ui/pages/wx/pay.vue
  2. 74 48
      sp-admin/sa-frame/menu-list-sp.js
  3. 1 1
      sp-admin/sa-frame/menu-list.js
  4. 224 215
      sp-admin/sa-view-sp/console/console-main.html
  5. 6 6
      sp-admin/sa-view-sp/sp-apilog/sys-log.html
  6. 0 11
      sp-admin/sa-view/car/tb-business-car-list.html
  7. 113 0
      sp-admin/sa-view/sys-channel-application/sys-channel-application-add.html
  8. 63 0
      sp-admin/sa-view/sys-channel-application/sys-channel-application-info.html
  9. 126 0
      sp-admin/sa-view/sys-channel-application/sys-channel-application-list.html
  10. 0 10
      sp-admin/sa-view/tb-account/balance-print.html
  11. 1 1
      sp-admin/sa-view/tb-account/tb-account-list.html
  12. 28 21
      sp-admin/sa-view/tb-business-car/tb-business-car-info.html
  13. 6 0
      sp-admin/sa-view/tb-business-car/tb-business-car-list.html
  14. 9 3
      sp-admin/sa-view/tb-business/tb-car-disincle-info.html
  15. 170 0
      sp-admin/sa-view/tb-car-weight/tb-car-weight-add.html
  16. 81 0
      sp-admin/sa-view/tb-car-weight/tb-car-weight-info.html
  17. 183 0
      sp-admin/sa-view/tb-car-weight/tb-car-weight-list.html
  18. 159 0
      sp-admin/sa-view/tb-car-weight/tb-print.html
  19. 108 0
      sp-admin/sa-view/tb-channel-config/tb-channel-config-add.html
  20. 62 0
      sp-admin/sa-view/tb-channel-config/tb-channel-config-info.html
  21. 125 0
      sp-admin/sa-view/tb-channel-config/tb-channel-config-list.html
  22. 126 132
      sp-admin/sa-view/tb-charge-record/print-receipt.html
  23. 2 1
      sp-admin/sa-view/tb-fee-statistics/dayStatsPrint.html
  24. 1 1
      sp-admin/sa-view/tb-fee-statistics/monthStatsPrint.html
  25. 4 0
      sp-admin/sa-view/tb-fee-statistics/tb-fee-details-list.html
  26. 1 1
      sp-admin/sa-view/tb-fee-statistics/yearStatsPrint.html
  27. 3 2
      sp-admin/sa-view/tb-invoice-order/tb-invoice-order-list.html
  28. 1 1
      sp-admin/static/sa.js
  29. 2 2
      sp-server/src/main/java/com/pj/api/jh/service/JhService.java
  30. 4 0
      sp-server/src/main/java/com/pj/api/open/ResultJson.java
  31. 56 0
      sp-server/src/main/java/com/pj/api/open/service/CoverWeightBase64ToImageTask.java
  32. 143 10
      sp-server/src/main/java/com/pj/api/open/service/OpenService.java
  33. 30 4
      sp-server/src/main/java/com/pj/api/open/web/OpenController.java
  34. 1 1
      sp-server/src/main/java/com/pj/api/pushfee/bo/SyncBillParam.java
  35. 143 0
      sp-server/src/main/java/com/pj/api/pushfee/task/FeeDetailRefundTask.java
  36. 3 0
      sp-server/src/main/java/com/pj/api/service/ApiService.java
  37. 2 2
      sp-server/src/main/java/com/pj/api/wx/bo/Attach.java
  38. 24 0
      sp-server/src/main/java/com/pj/api/wx/bo/WBo.java
  39. 56 7
      sp-server/src/main/java/com/pj/api/wx/service/WxService.java
  40. 9 9
      sp-server/src/main/java/com/pj/constants/business/FeeTypeEnum.java
  41. 4 0
      sp-server/src/main/java/com/pj/current/config/MyConfig.java
  42. 1 1
      sp-server/src/main/java/com/pj/project/sync/request/item/IOrderItem.java
  43. 69 0
      sp-server/src/main/java/com/pj/project/sys_channel_application/SysChannelApplication.java
  44. 72 0
      sp-server/src/main/java/com/pj/project/sys_channel_application/SysChannelApplicationController.java
  45. 29 0
      sp-server/src/main/java/com/pj/project/sys_channel_application/SysChannelApplicationMapper.java
  46. 53 0
      sp-server/src/main/java/com/pj/project/sys_channel_application/SysChannelApplicationMapper.xml
  47. 48 0
      sp-server/src/main/java/com/pj/project/sys_channel_application/SysChannelApplicationService.java
  48. 45 6
      sp-server/src/main/java/com/pj/project/tb_account/AutomaticPay.java
  49. 64 56
      sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java
  50. 7 0
      sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCar.java
  51. 0 33
      sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarController.java
  52. 9 2
      sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarService.java
  53. 8 0
      sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItem.java
  54. 26 1
      sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItemController.java
  55. 8 2
      sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItemService.java
  56. 140 0
      sp-server/src/main/java/com/pj/project/tb_car_weight/TbCarWeight.java
  57. 75 0
      sp-server/src/main/java/com/pj/project/tb_car_weight/TbCarWeightController.java
  58. 29 0
      sp-server/src/main/java/com/pj/project/tb_car_weight/TbCarWeightMapper.java
  59. 90 0
      sp-server/src/main/java/com/pj/project/tb_car_weight/TbCarWeightMapper.xml
  60. 39 0
      sp-server/src/main/java/com/pj/project/tb_car_weight/TbCarWeightService.java
  61. 69 0
      sp-server/src/main/java/com/pj/project/tb_channel_config/TbChannelConfig.java
  62. 105 0
      sp-server/src/main/java/com/pj/project/tb_channel_config/TbChannelConfigController.java
  63. 56 0
      sp-server/src/main/java/com/pj/project/tb_channel_config/TbChannelConfigMapper.java
  64. 80 0
      sp-server/src/main/java/com/pj/project/tb_channel_config/TbChannelConfigMapper.xml
  65. 71 0
      sp-server/src/main/java/com/pj/project/tb_channel_config/TbChannelConfigService.java
  66. 22 6
      sp-server/src/main/java/com/pj/project/tb_charge_record/TbChargeRecord.java
  67. 14 16
      sp-server/src/main/java/com/pj/project/tb_charge_record/TbChargeRecordController.java
  68. 5 0
      sp-server/src/main/java/com/pj/project/tb_deduction_record/TbDeductionRecord.java
  69. 11 0
      sp-server/src/main/java/com/pj/project/tb_deduction_record/TbDeductionRecordService.java
  70. 1 1
      sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetails.java
  71. 1 1
      sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsMapper.xml
  72. 55 50
      sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsService.java
  73. 1 1
      sp-server/src/main/java/com/pj/project/tb_fee_details/dto/ExportFeeDetailDTO.java
  74. 1 1
      sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatistics.java
  75. 9 9
      sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsService.java
  76. 1 1
      sp-server/src/main/java/com/pj/project/tb_fee_statistics/dto/ExportDayStatsDTO.java
  77. 7 7
      sp-server/src/main/resources/application-dev.yml

+ 20 - 17
app-ui/pages/wx/pay.vue

@@ -34,22 +34,22 @@
 					</view>
 				</u-checkbox-group>
 			</view>
-			<!-- <view class="card" v-if="manager">
+			<view class="card" v-if="w">
 				<view class="title">
-					入场管理费:
+					地磅费:
 				</view>
 					<view >
 						<label class="c-item">
 							<view class="l">
-								<u-checkbox :checked="manager.id!=''" :customStyle="{marginBottom: '8px'}" :name="manager.id"
+								<u-checkbox :checked="w.id!=''" :customStyle="{marginBottom: '8px'}" :name="w.id"
 									disabled>
 								</u-checkbox>
 							</view>
-							<view class="c">{{ manager.label }}</view>
-							<view class="r">{{ manager.price }}元</view>
+							<view class="c">{{ w.label }}</view>
+							<view class="r">{{ w.price }}元</view>
 						</label>
 					</view>
-			</view> -->
+			</view>
 			<view class="card" v-if="item.itemsPrice">
 				<view class="title">
 					<u-checkbox-group placement="column" v-model="businessSelect" @change="businessChange">
@@ -138,6 +138,7 @@
 				state: '',
 				list: [],
 				cars: [],
+				w:null,
 				type: 0,
 				businessAble: true,
 				showPay: false,
@@ -192,10 +193,10 @@
 					.map(obj => obj.price).reduce(function(pre, cur) {
 						return pre + cur;
 					}, 0) : 0;
-					// let manager=this.manager;
-					// if(manager){
-					// 	itemMoney=manager.price+itemMoney;
-					// }
+					let manager=this.w;
+					if(manager){
+						itemMoney=manager.price+itemMoney;
+					}
 				return (carMoney + itemMoney).toFixed(2);
 			}
 		},
@@ -250,6 +251,7 @@
 				let businessSelect = this.businessSelect;
 				let openid = this.openid ? this.openid : uni.getStorageSync('openid')
 				let p = {
+					w:this.w,
 					b: businessSelect.length > 0 ? this.item.businessId : '',
 					c: JSON.stringify(cars.map(obj => {
 						return {
@@ -268,17 +270,17 @@
 					tradeType: "JSAPI",
 					openid: openid
 				}
-				let manager=this.manager;
-				if(manager&&manager.id){
-					p.i=JSON.stringify(manager);
-				}
-				let con = 'A1-停车费-' + carBusinessNo;
+				
+				let con = 'A1-'+carNos+'-' + carBusinessNo;
 				let tradeType = 'PORT_PARKING_FEE';
 				if (carIds.length == 0 || businessSelect.length > 0) { //交业务费
-					con = 'A1-' + this.goodsName + '-' + this.businessNos;
+					con = 'A1-' +carNos+'-'+ this.goodsName + '-' + this.businessNos;
 					tradeType = 'PORT_OPERATION_FEE';
 				}
-				p.desc = con + '-' + carNos;
+				if(p.money==p.w.price){
+					con='A1-'+carNos+'-' +'过磅费';
+				}
+				p.desc = con;
 				p.businessType = tradeType;
 				p.calculateId = this.item.calculateId;
 				this.$common.showLoading('正在请求...');
@@ -374,6 +376,7 @@
 					this.businessSelect = this.itemSelect.length == 0 ? [] : [1]
 					this.list = [];
 					this.showTips = this.cars.length == 0 && data.itemsPrice == 0;
+					this.w=data.w;
 				})
 			},
 			searchFn() {

+ 74 - 48
sp-admin/sa-frame/menu-list-sp.js

@@ -29,7 +29,7 @@ window.menuList.unshift({
 		id: 'console',
 		name: '监控中心',
 		icon: 'el-icon-view',
-		parent:true,
+		parent: true,
 		info: '对本系统的各种监控',
 		childList: [{
 				id: 'sql-console',
@@ -49,16 +49,24 @@ window.menuList.unshift({
 				url: 'sa-view-sp/sp-apilog/api-log-list.html',
 				info: '记录本系统所有的api请求'
 			},
+			{
+				id: 'sys-log',
+				name: '系统运行日志',
+				url: 'sa-view-sp/sp-apilog/sys-log.html',
+				info: '记录系统运行日志'
+			},
 		]
 	},
 
 	{
 		id: 'sp-cfg',
 		name: '系统配置',
-			parent:true,
+		parent: true,
 		icon: 'el-icon-setting',
 		info: '有关系统的一些配置',
-		childList: [{
+		childList: [
+			{id: 'tb-channel-config', name: '地磅通道维护', url: 'sa-view/tb-channel-config/tb-channel-config-list.html'},
+			{
 				id: 'sp-cfg-app',
 				name: '系统对公配置',
 				url: 'sa-view-sp/sp-cfg/app-cfg.html'
@@ -374,8 +382,7 @@ window.menuList.unshift({
 		name: '业务管理',
 		icon: 'el-icon-edit-outline',
 		parent: true,
-		childList: [
-			{
+		childList: [{
 				id: 'tb-car-disincle-list',
 				name: '业务管理',
 				url: 'sa-view/tb-business/tb-car-disincle-list.html',
@@ -421,7 +428,7 @@ window.menuList.unshift({
 						name: '装卸打印',
 						isShow: false
 					},
-					
+
 					{
 						id: 'tb-business-item-supplement',
 						name: '补录缴费',
@@ -463,6 +470,34 @@ window.menuList.unshift({
 
 		]
 	}, {
+		id: 'tb-car-weight',
+		name: '过磅记录',
+		icon: 'el-icon-folder-opened',
+		parent: true,
+		info: '表数据的维护',
+		childList: [{
+			id: 'tb-car-weight-list',
+			name: '过磅记录',
+			url: 'sa-view/tb-car-weight/tb-car-weight-list.html',
+			childList: [
+				{
+					id: 'tb-car-weight-edit',
+					name: '修改',
+					isShow: false
+				},
+				{
+					id: 'tb-car-weight-print',
+					name: '打印',
+					isShow: false
+				},
+				{
+					id: 'tb-car-weight-del',
+					name: '删除',
+					isShow: false
+				},
+				]
+		}]
+	}, {
 		id: 'tb-item-type',
 		name: '收费项管理',
 		icon: 'el-icon-notebook-2',
@@ -668,7 +703,7 @@ window.menuList.unshift({
 			},
 
 		]
-	},  {
+	}, {
 		id: 'tb-pay-record',
 		name: '支付记录',
 		icon: 'el-icon-folder-opened',
@@ -678,7 +713,7 @@ window.menuList.unshift({
 			name: '支付记录',
 			url: 'sa-view/tb-pay-record/tb-pay-record-list.html'
 		}, ]
-	},  {
+	}, {
 		id: 'tb-discount',
 		name: '折扣管理',
 		icon: 'el-icon-folder-opened',
@@ -718,8 +753,7 @@ window.menuList.unshift({
 				id: 'tb-fee-details-list',
 				name: '收费明细',
 				url: 'sa-view/tb-fee-statistics/tb-fee-details-list.html',
-				childList: [
-					{
+				childList: [{
 						id: 'tb-statistics-print',
 						name: '打印',
 						isShow: false
@@ -756,7 +790,7 @@ window.menuList.unshift({
 				id: 'tb-fee-statistics-list',
 				name: '日统计',
 				url: 'sa-view/tb-fee-statistics/tb-fee-statistics-list.html',
-				childList:[{
+				childList: [{
 					id: 'tb-fee-statistics-judge',
 					name: '审核',
 					isShow: false
@@ -799,13 +833,11 @@ window.menuList.unshift({
 		name: '预存款管理',
 		icon: 'el-icon-folder-opened',
 		parent: true,
-		childList: [
-			{
+		childList: [{
 				id: 'tb-account-list',
 				name: '企业充值',
 				url: 'sa-view/tb-account/tb-account-list.html',
-				childList: [
-					{
+				childList: [{
 						id: 'tb-account-list-add',
 						name: '充值',
 						isShow: false,
@@ -826,8 +858,7 @@ window.menuList.unshift({
 				id: 'tb-account-balance-list',
 				name: '企业余额',
 				url: 'sa-view/tb-account/tb-account-balance-list.html',
-				childList: [
-					{
+				childList: [{
 						id: 'tb-account-balance-list-export',
 						name: '导出',
 						isShow: false,
@@ -859,56 +890,51 @@ window.menuList.unshift({
 						isShow: false,
 					}
 				]
-			}, 
-		
+			},
+
 			{
 				id: 'tb-deduction-record-list',
 				name: '扣费记录',
 				url: 'sa-view/tb-deduction-record/tb-deduction-record-list.html',
-				childList: [
+				childList: [{
+						id: 'tb-deduction-record-list-review',
+						name: '复审',
+						isShow: false,
+					},
 					{
-					id: 'tb-deduction-record-list-review',
-					name: '复审',
-					isShow: false,
-				},
-				{
-					id: 'tb-deduction-record-export',
-					name: '导出',
-					isShow: false,
-				},
-				{
-					id: 'tb-deduction-record-set-error',
-					name: '设为异常单',
-					isShow: false,
-				},
+						id: 'tb-deduction-record-export',
+						name: '导出',
+						isShow: false,
+					},
+					{
+						id: 'tb-deduction-record-set-error',
+						name: '设为异常单',
+						isShow: false,
+					},
 				]
 			},
 			{
 				id: 'tb-deduction-record-error-list',
 				name: '异常订单',
 				url: 'sa-view/tb-deduction-record/tb-deduction-record-error-list.html',
-				childList: [
-					{
+				childList: [{
 					id: 'tb-deduction-record-list-refund',
 					name: '退款',
 					isShow: false,
-				},
-				]
+				}, ]
 			},
 			{
 				id: 'tb-refund-record',
 				name: '退款记录',
 				url: 'sa-view/tb-refund-record/tb-refund-record-list.html',
-				childList: [
-					{
-						id: 'tb-refund-record-export',
-						name: '导出',
-						isShow: false,
-					},
-				]
-			}, 
-		
+				childList: [{
+					id: 'tb-refund-record-export',
+					name: '导出',
+					isShow: false,
+				}, ]
+			},
+
 		],
 
 	}
-);
+);

+ 1 - 1
sp-admin/sa-frame/menu-list.js

@@ -16,5 +16,5 @@
 
 // 定义菜单列表 
 var menuList =	[
-	
+
 ]

+ 224 - 215
sp-admin/sa-view-sp/console/console-main.html

@@ -1,229 +1,238 @@
 <!DOCTYPE html>
 <html>
-<head>
-    <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="../../static/kj/element-ui/theme-chalk/index.css">
-    <link rel="stylesheet" href="../../static/sa.css">
-    <script src="../../static/kj/jquery.min.js"></script>
-    <script src="../../static/kj/layer/layer.js"></script>
-    <script src="../../static/sa.js"></script>
-    <style type="text/css">
-        .vue-box {
-            margin: 0;
-            padding: 0;
-            height: 100%;
-        }
+	<head>
+		<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="../../static/kj/element-ui/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+		<style type="text/css">
+			.vue-box {
+				margin: 0;
+				padding: 0;
+				height: 100%;
+			}
 
-        .el-card {
-            border-radius: 0px;
-            border: 1px #ddd solid;
-            margin-bottom: 14px;
-        }
+			.el-card {
+				border-radius: 0px;
+				border: 1px #ddd solid;
+				margin-bottom: 14px;
+			}
 
-        .s-row {
-            /* background-color: antiquewhite; */
-            padding: 0 14px;
-            padding-bottom: 0px;
-        }
+			.s-row {
+				/* background-color: antiquewhite; */
+				padding: 0 14px;
+				padding-bottom: 0px;
+			}
 
-        .s-row-1 {
-            padding-top: 14px;
-        }
+			.s-row-1 {
+				padding-top: 14px;
+			}
 
-        .s-row-2 {
-            /* margin-top: -10px; */
-        }
+			.s-row-2 {
+				/* margin-top: -10px; */
+			}
 
-        .s-row-2 .el-card .el-card__body {
-            height: 250px;
-        }
+			.s-row-2 .el-card .el-card__body {
+				height: 250px;
+			}
 
-        .s-row-3 .el-card {
-            /* height: 100%; */
-        }
+			.s-row-3 .el-card {
+				/* height: 100%; */
+			}
 
-        .echarts-div {
-            height: 100%;
-        }
+			.echarts-div {
+				height: 100%;
+			}
 
-        .s-row-3 .el-alert {
-            margin-bottom: 14px;
-        }
-    </style>
-</head>
-<body>
-<div class="vue-box" style="height: 980px;width: 100%;">
-    <div v-if="currentCustomerId==1">
-        <div class="s-row s-row-1">
-            <com-sta-data></com-sta-data>
-        </div>
-        <el-row :gutter="10">
-            <el-col span="12">
-                <el-card class="box-card" style="height: 600px;overflow-y: auto;">
-                    <div slot="header" class="clearfix">
-                        <span>业务类型统计</span>
-                        <div style="float: right; padding: 3px 0">
-                            <el-date-picker v-model="feeType.date" type="daterange" range-separator="至"
-                                            start-placeholder="开始日期" end-placeholder="结束日期" @change="getFeeTypeStatics">
-                            </el-date-picker>
-                        </div>
-                        <div>
-                            <el-table :data="feeType.list">
-                                <el-table-column type="index" width="50" label="序号">
-                                </el-table-column>
-                               <sa-td name="名称" prop="feeType" type="enum"
-                                      :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车业务', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业',10:'总计'}"></sa-td>
-                                <el-table-column prop="total" label="数量">
-                                </el-table-column>
-                                <el-table-column prop="price" label="金额(元)">
-                                </el-table-column>
-                            </el-table>
-                        </div>
-                    </div>
-                </el-card>
-            </el-col>
-            <el-col span="12">
-                <el-card class="box-card" style="height: 600px;overflow-y: auto;">
-                    <div slot="header" class="clearfix">
-                        <span>收费项目统计</span>
-                        <div style="float: right; padding: 3px 0">
-                            <el-date-picker v-model="itemType.date" type="daterange" range-separator="至"
-                                            start-placeholder="开始日期" end-placeholder="结束日期" @change="itemTypeStatics">
-                            </el-date-picker>
-                        </div>
-                        <div>
-                            <el-table :data="itemType.list">
-                                <el-table-column type="index" width="50" label="序号">
-                                </el-table-column>
-								<el-table-column prop="name" label="名称">
-								</el-table-column>
-                              <el-table-column prop="total" label="数量">
-                                </el-table-column>
-                                <el-table-column prop="price" label="金额(元)">
-                                </el-table-column>
-                            </el-table>
-                        </div>
-                    </div>
-                </el-card>
-            </el-col>
-        </el-row>
-    </div>
-    <div v-if="currentCustomerId!==1"
-         style="text-align: center; margin-top: 113px; font-size: 60px; letter-spacing: 30px;">
-        欢迎使用场站管理系统
-    </div>
-</div>
-<script src="../../static/kj/vue.min.js"></script>
-<script src="../../static/kj/element-ui/index.js"></script>
-<script src="../../static/kj/httpVueLoader.js"></script>
-<script src="../../static/kj/jquery.min.js"></script>
-<script src="../../static/kj/layer/layer.js"></script>
-<!-- <script src="https://unpkg.com/echarts@4.6.0/dist/echarts-en.min.js"></script> -->
-<script src="../../static/sa.js"></script>
-<script type="text/javascript">
-    var app = new Vue({
-        components: {
-            'com-sta-data': httpVueLoader('com-sta-data.vue'),
-            'com-chart-1': httpVueLoader('com-chart-1.vue'),
-            'com-chart-2': httpVueLoader('com-chart-2.vue'),
-            'com-chart-3': httpVueLoader('com-chart-3.vue'),
-            'com-stack': httpVueLoader('com-stack.vue'),
-            'com-update-log': httpVueLoader('com-update-log.vue'),
-            'com-origin': httpVueLoader('com-origin.vue'),
-			"sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
-            // 'com-intro': httpVueLoader('com-intro.vue'),
-        },
-        el: '.vue-box',
-        data: {
-            currentCustomerId: '-1',
-            timmer: null,
-            feeType: {
-                date: [new Date(), new Date()],
-                list: [],
-                p: {
-                    startDay: '',
-                    endDay: ''
-                }
-            },
-            itemType: {
-                date: [new Date(), new Date()],
-                list: [],
-                p: {
-                    startDay: '',
-                    endDay: ''
-                }
-            },
-            car: {
-                totalCar: 1,
-                inCar: 2,
-                outCar: 3,
-                weightCar: 0,
-                emptyCar: 0
-            }
-        },
-        methods: {
-            getCurrentCustomerId() {
-                sa.ajaxNoLoading('/TbCostomer/getCurrentCustomerId', function (resp) {
-                    this.currentCustomerId = resp.data;
-                }.bind(this));
-            },
-            itemTypeStatics() {
-                let days = this.itemType.date;
-                let p = this.itemType.p;
-                if (days.length == 2) {
-                    p.startDay = sa.forDate(days[0]);
-                    p.endDay = sa.forDate(days[1]);
-                }
-                sa.ajaxNoLoading('/TbFeeDetails/itemTypeStatics', sa.removeNull(p), function (resp) {
-                    this.itemType.list = resp.data;
-                }.bind(this))
-            },
-            getFeeTypeStatics() {
-                let days = this.feeType.date;
-                let p = this.feeType.p;
-                if (days.length == 2) {
-                    p.startDay = sa.forDate(days[0]);
-                    p.endDay = sa.forDate(days[1]);
-                }
-                sa.ajaxNoLoading('/TbFeeDetails/feeTypeStatics', sa.removeNull(p), function (resp) {
-					let list=resp.data;
-					for(let i in list){
-						let item=list[i];
-						if(!item.feeType){
-							item.feeType=10;
+			.s-row-3 .el-alert {
+				margin-bottom: 14px;
+			}
+		</style>
+	</head>
+	<body>
+		<div class="vue-box" style="height: 980px;width: 100%;">
+			<div v-if="currentCustomerId==1&&showStatics">
+				<div class="s-row s-row-1">
+					<com-sta-data></com-sta-data>
+				</div>
+				<el-row :gutter="10">
+					<el-col span="12">
+						<el-card class="box-card" style="height: 600px;overflow-y: auto;">
+							<div slot="header" class="clearfix">
+								<span>业务类型统计</span>
+								<div style="float: right; padding: 3px 0">
+									<el-date-picker v-model="feeType.date" type="daterange" range-separator="至"
+										start-placeholder="开始日期" end-placeholder="结束日期" @change="getFeeTypeStatics">
+									</el-date-picker>
+								</div>
+								<div>
+									<el-table :data="feeType.list">
+										<el-table-column type="index" width="50" label="序号">
+										</el-table-column>
+										<sa-td name="名称" prop="feeType" type="enum"
+											:jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车业务', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业',10:'总计'}"></sa-td>
+										<el-table-column prop="total" label="数量">
+										</el-table-column>
+										<el-table-column prop="price" label="金额(元)">
+										</el-table-column>
+									</el-table>
+								</div>
+							</div>
+						</el-card>
+					</el-col>
+					<el-col span="12">
+						<el-card class="box-card" style="height: 600px;overflow-y: auto;">
+							<div slot="header" class="clearfix">
+								<span>收费项目统计</span>
+								<div style="float: right; padding: 3px 0">
+									<el-date-picker v-model="itemType.date" type="daterange" range-separator="至"
+										start-placeholder="开始日期" end-placeholder="结束日期" @change="itemTypeStatics">
+									</el-date-picker>
+								</div>
+								<div>
+									<el-table :data="itemType.list">
+										<el-table-column type="index" width="50" label="序号">
+										</el-table-column>
+										<el-table-column prop="name" label="名称">
+										</el-table-column>
+										<el-table-column prop="total" label="数量">
+										</el-table-column>
+										<el-table-column prop="price" label="金额(元)">
+										</el-table-column>
+									</el-table>
+								</div>
+							</div>
+						</el-card>
+					</el-col>
+				</el-row>
+			</div>
+			<div v-if="currentCustomerId!==1||!showStatics"
+				style="text-align: center; margin-top: 113px; font-size: 60px; letter-spacing: 30px;">
+				欢迎使用场站管理系统
+			</div>
+		</div>
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<!-- <script src="https://unpkg.com/echarts@4.6.0/dist/echarts-en.min.js"></script> -->
+		<script src="../../static/sa.js"></script>
+		<script type="text/javascript">
+			var app = new Vue({
+				components: {
+					'com-sta-data': httpVueLoader('com-sta-data.vue'),
+					'com-chart-1': httpVueLoader('com-chart-1.vue'),
+					'com-chart-2': httpVueLoader('com-chart-2.vue'),
+					'com-chart-3': httpVueLoader('com-chart-3.vue'),
+					'com-stack': httpVueLoader('com-stack.vue'),
+					'com-update-log': httpVueLoader('com-update-log.vue'),
+					'com-origin': httpVueLoader('com-origin.vue'),
+					"sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
+					// 'com-intro': httpVueLoader('com-intro.vue'),
+				},
+				el: '.vue-box',
+				data: {
+					currentCustomerId: '-1',
+					timmer: null,
+					feeType: {
+						date: [new Date(), new Date()],
+						list: [],
+						p: {
+							startDay: '',
+							endDay: ''
 						}
+					},
+					itemType: {
+						date: [new Date(), new Date()],
+						list: [],
+						p: {
+							startDay: '',
+							endDay: ''
+						}
+					},
+					car: {
+						totalCar: 1,
+						inCar: 2,
+						outCar: 3,
+						weightCar: 0,
+						emptyCar: 0
+					},
+					showStatics:false,
+				},
+				created(){
+					this.getCurrUser();
+				},
+				methods: {
+					getCurrUser() {
+						let user = sa.$sys.getCurrUser();
+						let roleId=user.roleId;
+						this.showStatics=roleId!='233';
+					},
+					getCurrentCustomerId() {
+						sa.ajaxNoLoading('/TbCostomer/getCurrentCustomerId', function(resp) {
+							this.currentCustomerId = resp.data;
+						}.bind(this));
+					},
+					itemTypeStatics() {
+						let days = this.itemType.date;
+						let p = this.itemType.p;
+						if (days.length == 2) {
+							p.startDay = sa.forDate(days[0]);
+							p.endDay = sa.forDate(days[1]);
+						}
+						sa.ajaxNoLoading('/TbFeeDetails/itemTypeStatics', sa.removeNull(p), function(resp) {
+							this.itemType.list = resp.data;
+						}.bind(this))
+					},
+					getFeeTypeStatics() {
+						let days = this.feeType.date;
+						let p = this.feeType.p;
+						if (days.length == 2) {
+							p.startDay = sa.forDate(days[0]);
+							p.endDay = sa.forDate(days[1]);
+						}
+						sa.ajaxNoLoading('/TbFeeDetails/feeTypeStatics', sa.removeNull(p), function(resp) {
+							let list = resp.data;
+							for (let i in list) {
+								let item = list[i];
+								if (!item.feeType) {
+									item.feeType = 10;
+								}
+							}
+							this.feeType.list = list;
+						}.bind(this))
+					}
+				},
+				mounted: function() {
+					this.getFeeTypeStatics();
+					this.itemTypeStatics();
+					this.timmer = setInterval(() => {
+						this.getFeeTypeStatics();
+						this.itemTypeStatics();
+					}, 20000)
+					this.getCurrentCustomerId();
+				},
+				beforeDestroy() {
+					if (this.timmer != null) {
+						clearInterval(this.timmer);
 					}
-                    this.feeType.list = list;
-                }.bind(this))
-            }
-        },
-        mounted: function () {
-            this.getFeeTypeStatics();
-            this.itemTypeStatics();
-            this.timmer = setInterval(() => {
-                this.getFeeTypeStatics();
-                this.itemTypeStatics();
-            }, 20000)
-            this.getCurrentCustomerId();
-        },
-        beforeDestroy() {
-            if (this.timmer != null) {
-                clearInterval(this.timmer);
-            }
-        }
-    })
+				}
+			})
 
-    // 设置监听,改变窗口大小时重绘图表
-    window.myChartList = [];
-    window.onresize = function () {
-        myChartList.forEach(function (myChart) {
-            myChart.resize();
-        })
-    }
-</script>
+			// 设置监听,改变窗口大小时重绘图表
+			window.myChartList = [];
+			window.onresize = function() {
+				myChartList.forEach(function(myChart) {
+					myChart.resize();
+				})
+			}
+		</script>
 
-</body>
-</html>
+	</body>
+</html>

+ 6 - 6
sp-admin/sys-log.html → sp-admin/sa-view-sp/sp-apilog/sys-log.html

@@ -8,12 +8,12 @@
 		<!-- 所有的 css js 资源 -->
 		<link rel="stylesheet" href="static/kj/element-ui/theme-chalk/index.css">
 		<link rel="stylesheet" href="static/sa.css">
-		<script src="static/kj/vue.min.js"></script>
-		<script src="static/kj/element-ui/index.js"></script>
-		<script src="static/kj/httpVueLoader.js"></script>
-		<script src="static/kj/jquery.min.js"></script>
-		<script src="static/kj/layer/layer.js"></script>
-		<script src="static/sa.js"></script>
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
 		<style type="text/css">
 			.c-panel .c-label {
 				width: 8em;

+ 0 - 11
sp-admin/sa-view/car/tb-business-car-list.html

@@ -66,17 +66,6 @@
 						</el-select>
 					</div>
 					<div class="c-item">
-			 		<label class="c-label"><span style="color: red;">*</span>车辆规格:</label>
-						<el-input-number class="car-size" v-model="modal.form.carSize" controls-position="right"
-							:min="4.2" :max="50"></el-input-number>
-					</div>
-					<div class="c-item" v-if="modal.form.carType.indexOf('空')==-1">
-						<label class="c-label">
-							<span></span>
-							载重(kg):</label>
-						<el-input-number class="car-size" v-model="modal.form.netWeight" :min="1" :max="999999">
-						</el-input-number>
-					</div>
 				</el-form>
 				<span slot="footer" class="dialog-footer">
 					<el-button @click="modal.visible = false">取 消</el-button>

+ 113 - 0
sp-admin/sa-view/sys-channel-application/sys-channel-application-add.html

@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>-添加/修改</title>
+		<meta http-equiv="Content-Type" content="text/html; 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="../../static/kj/element-ui/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+		<style type="text/css">
+			.c-panel .el-form .c-label{width: 7em !important;}
+			.c-panel .el-form .el-input, .c-panel .el-form .el-textarea__inner{width: 250px;}
+		</style>
+	</head>
+	<body>
+		<div class="vue-box" :class="{sbot: id}" style="display: none;" :style="'display: block;'">
+			<!-- ------- 内容部分 ------- -->
+			<div class="s-body">
+				<div class="c-panel">
+                    <div class="c-title" v-if="id == 0">数据添加</div>
+					<div class="c-title" v-else>数据修改</div>
+					<el-form v-if="m">
+						<sa-item type="text" name="" v-model="m.id" br></sa-item>
+						<sa-item type="text" name="" v-model="m.sysName" br></sa-item>
+						<sa-item type="text" name="" v-model="m.lastBeatTime" 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>
+					</el-form>
+				</div>
+			</div>
+			<!-- ------- 底部按钮 ------- -->
+			<div class="s-foot">
+				<el-button type="primary" @click="ok()">确定</el-button>
+				<el-button @click="sa.closeCurrIframe()">取消</el-button>
+			</div>
+		</div>
+        <script>
+			
+			var app = new Vue({
+				components: {
+					"sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue')
+				},
+				el: '.vue-box',
+				data: {
+					id: sa.p('id', 0),		// 获取超链接中的id参数(0=添加,非0=修改) 
+					m: null,		// 实体对象 
+				},
+				methods: {
+					// 创建一个 默认Model 
+					createModel: function() {
+						return {
+							id: '',		//  
+							sysName: '',		//  
+							lastBeatTime: '',		//  
+							createTime: '',		//  
+						}
+					},
+					// 提交数据 
+					ok: function(){
+						// 表单校验 
+						let m = this.m;
+						sa.checkNull(m.id, '请输入 []');
+						sa.checkNull(m.sysName, '请输入 []');
+						sa.checkNull(m.lastBeatTime, '请输入 []');
+						sa.checkNull(m.createTime, '请输入 []');
+				
+						// 开始增加或修改
+						if(this.id <= 0) {	// 添加
+							sa.ajax('/SysChannelApplication/add', m, function(res){
+								sa.alert('增加成功', this.clean); 
+							}.bind(this));
+						} else {	// 修改
+							sa.ajax('/SysChannelApplication/update', m, function(res){
+								sa.alert('修改成功', this.clean);
+							}.bind(this));
+						}
+					},
+					// 添加/修改 完成后的动作
+					clean: function() {
+						if(this.id == 0) {
+							this.m = this.createModel();
+						} else {
+							parent.app.f5();		// 刷新父页面列表
+							sa.closeCurrIframe();	// 关闭本页 
+						}
+					}
+				},
+				mounted: function(){
+					// 初始化数据 
+					if(this.id <= 0) {	
+						this.m = this.createModel();
+					} else {	
+						sa.ajax('/SysChannelApplication/getById?id=' + this.id, function(res) {
+							this.m = res.data;
+							if(res.data == null) {
+								sa.alert('未能查找到 id=' + this.id + " 详细数据");
+							}
+						}.bind(this))
+					}
+				}
+			})
+			
+		</script>
+	</body>
+</html>

+ 63 - 0
sp-admin/sa-view/sys-channel-application/sys-channel-application-info.html

@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>-详情</title>
+		<meta http-equiv="Content-Type" content="text/html; 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="../../static/kj/element-ui/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+		<style type="text/css">
+			.c-panel .c-label{width: 8em;}
+		</style>
+	</head>
+	<body>
+		<div class="vue-box sbot" style="display: none;" :style="'display: block;'">
+			<!-- ------- 内容部分 ------- -->
+			<div class="s-body">
+				<div class="c-panel">
+					<el-form v-if="m">
+						<sa-info name="" br>{{m.id}}</sa-info>
+						<sa-info name="" br>{{m.sysName}}</sa-info>
+						<sa-info name="" br>{{m.lastBeatTime}}</sa-info>
+						<sa-info name="" br>{{m.createTime}}</sa-info>
+					</el-form>
+				</div>
+			</div>
+			<!-- ------- 底部按钮 ------- -->
+			<div class="s-foot">
+				<el-button type="success" @click="sa.closeCurrIframe()">确定</el-button>
+				<el-button @click="sa.closeCurrIframe()">取消</el-button>
+			</div>
+		</div>
+		<script>
+			var app = new Vue({
+				components: {
+					"sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue')
+				},
+				el: '.vue-box',
+				data: {
+					id: sa.p('id', 0),	// 获取数据ID 
+					m: null
+				},
+				methods: {
+				},
+				mounted: function() {
+					sa.ajax('/SysChannelApplication/getById?id=' + this.id, function(res) {
+						this.m = res.data;
+						if(res.data == null) {
+							sa.alert('未能查找到 id=' + this.id + " 详细数据");
+						}
+					}.bind(this))
+				}
+			})
+			
+		</script>
+	</body>
+</html>

+ 126 - 0
sp-admin/sa-view/sys-channel-application/sys-channel-application-list.html

@@ -0,0 +1,126 @@
+<!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="../../static/kj/element-ui/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/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 style="margin: 10px">
+					<el-button type="info" @click="sa.f5()">刷新</el-button>
+				</div>
+				<!-- ------------- 数据列表 ------------- -->
+				<el-table class="data-table" ref="data-table" :data="dataList" >
+					<sa-td type="index" name="序号"></sa-td>
+					<sa-td name="名称" prop="sysName" ></sa-td>
+					<sa-td name="上次在线时间" prop="lastBeatTime" ></sa-td>
+						<sa-td name="是否在线" prop="state" ></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>
+							<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: '',		//  
+						sysName: '',		//  
+						lastBeatTime: '',		//  
+						createTime: '',		//  
+						pageNo: 1,		// 当前页 
+						pageSize: 10,	// 页大小 
+						sortType: 0		// 排序方式 
+					},
+					dataCount: 0,
+					dataList: [], // 数据集合 
+				},
+				methods: {
+					// 刷新
+					f5: function() {
+						sa.ajax('/SysChannelApplication/getList', sa.removeNull(this.p), function(res) {
+							this.dataList = res.data; // 数据
+							this.dataCount = res.dataCount; // 数据总数 
+							sa.f5TableHeight();		// 刷新表格高度 
+						}.bind(this));
+					},
+					// 查看
+					get: function(data) {
+						sa.showIframe('数据详情', 'sys-channel-application-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]);
+					},
+					// 修改
+					update: function(data) {
+						sa.showIframe('修改数据', 'sys-channel-application-add.html?id=' + data.id, '1000px', '90%');
+					},
+					// 新增
+					add: function(data) {
+						sa.showIframe('新增数据', 'sys-channel-application-add.html?id=-1', '1000px', '90%');
+					},
+					// 删除
+					del: function(data) {
+						sa.confirm('是否删除,此操作不可撤销', function() {
+							sa.ajax('/SysChannelApplication/delete?id=' + data.id, function(res) {
+								sa.arrayDelete(this.dataList, data);
+								sa.ok('删除成功');
+								sa.f5TableHeight();		// 刷新表格高度 
+							}.bind(this))
+						}.bind(this));
+					},
+					// 批量删除
+					deleteByIds: function() {
+						// 获取选中元素的id列表 
+						let selection = this.$refs['data-table'].selection;
+						let ids = sa.getArrayField(selection, 'id');
+						if(selection.length == 0) {
+							return sa.msg('请至少选择一条数据')
+						}
+						// 提交删除 
+						sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
+							sa.ajax('/SysChannelApplication/deleteByIds', {ids: ids.join(',')}, function(res) {
+								sa.arrayDelete(this.dataList, selection);
+								sa.ok('删除成功');
+								sa.f5TableHeight();		// 刷新表格高度 
+							}.bind(this))
+						}.bind(this));
+					},
+				},
+				created: function() {
+					this.f5();
+					sa.onInputEnter();
+				}
+			})
+		</script>
+	</body>
+</html>

+ 0 - 10
sp-admin/sa-view/tb-account/balance-print.html

@@ -119,16 +119,6 @@
 								<td>{{totalErrorRefund}}</td>
 								<td>{{totalEnd}}</td>
 							</tr>
-						<!-- 	<tr style="height: 40px;padding: 0 0.5px;" v-if="index==dataList.length-1">
-								<td class="hide-border"></td>
-								<td class="hide-border"></td>
-								<td class="hide-border">统计稽核员:</td>
-								<td class="hide-border"></td>
-								<td class="hide-border">复核员:</td>
-								<td class="hide-border"></td>
-								<td class="hide-border">开单员:</td>
-								<td class="hide-border"></td>
-							</tr> -->
 						</table>
 						<div>
 							<div style="display: flex;margin-top: 15px;">

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

@@ -51,7 +51,7 @@
 					<sa-td name="企业名称" prop="customerName" width="260"></sa-td>
 					<sa-td name="联系人" prop="dutyPeople"></sa-td>
 					<sa-td name="联系电话" prop="phone"></sa-td>
-					<sa-td name="纳税识别号" prop="taxNum"></sa-td>
+					<sa-td name="纳税识别号" prop="taxNum" width="200"></sa-td>
 					<sa-td name="开户银行" prop="bank"></sa-td>
 					<sa-td name="银行账户" prop="bankAccount"></sa-td>
 					<sa-td name="余额(元)" prop="totalMoney" not="0" width="120"></sa-td>

+ 28 - 21
sp-admin/sa-view/tb-business-car/tb-business-car-info.html

@@ -57,20 +57,25 @@
 								</sa-info>
 								<sa-info name="离场通道" br>{{m.outChannel}}</sa-info>
 								<sa-info name="停车费" br>{{m.money}}元</sa-info>
+								<sa-info name="重量" br>
+									<label  v-if="m.netWeight">{{m.netWeight}}吨</label>
+									<label v-else>未过磅</label>
+								</sa-info>
 								<sa-info name="支付状态" br>{{m.payType}}</sa-info>
 								<sa-info name="出场确认说明" br v-if="m.outRemark">{{m.outRemark}}</sa-info>
 								<sa-info type="img" name="离场图片" :value="m.outImage" br></sa-info>
 							</el-col>
-							<!-- <el-col span=8 v-if="m.businessType==1">
-								<sa-info style="margin-top: 0;" type="enum" name="审核状态" :value="m.confirmJudge"
-									:jv="{0: '未审核', 1: '审核通过', 2: '审核驳回'}" br>
+							<!-- <el-col span=8>
+								<sa-info name="重量" br>
+									<label  v-if="m.netWeight">{{m.netWeight}}吨</label>
+									<label v-else>未过磅</label>
 								</sa-info>
-								<sa-info style="margin-top: 0;" name="审核人" br>
-									{{m.confirmJudgeBy}}
+								<sa-info name="过磅费" br>{{m.netweightMoney}}元</sa-info>
+								<sa-info style="margin-top: 0;" type="enum" name="审核状态" :value="m.payNetweightMoney"
+									:jv="{0: '未支付', 1: '已支付'}" br>
 								</sa-info>
-								<sa-info name="审核时间" br>{{m.confirmJudgeTime}}</sa-info>
-								<sa-info name="审核意见" br v-if="m.confirmJudgeContent">
-									{{m.confirmJudgeContent}}
+								<sa-info style="margin-top: 0;" name="支付时间" br>
+									{{m.netweightMoneyTime}}
 								</sa-info>
 							</el-col> -->
 						</el-row>
@@ -109,33 +114,35 @@
 										</el-table-column>
 										<el-table-column prop="unit" label="计费标准" width="160">
 										</el-table-column>
-										<el-table-column prop="cabinetNo" label="柜号" >
+										
+										<el-table-column prop="num" label="数量">
+										</el-table-column>
+										<el-table-column prop="total" label="合计" width="120">
+										</el-table-column>
+										<el-table-column prop="cabinetNo" label="柜号">
 										</el-table-column>
-										<el-table-column prop="cabinetType" label="取/存" >
+										<el-table-column prop="cabinetType" label="取/存">
 											<template slot-scope="s">
 												<label v-if="s.row.cabinetType==-1">-</label>
 												<label v-if="s.row.cabinetType==0">存柜</label>
 												<label v-if="s.row.cabinetType==1">取柜</label>
 											</template>
 										</el-table-column>
-										<el-table-column prop="cabinetType" label="柜状态" >
+										<el-table-column prop="cabinetType" label="柜状态">
 											<template slot-scope="s">
 												<label v-if="s.row.cabinetStatus==0">未取</label>
 												<label v-if="s.row.cabinetStatus==1">已取</label>
 											</template>
 										</el-table-column>
-										<el-table-column prop="num" label="数量">
-										</el-table-column>
 										<el-table-column prop="coldStartTime" label="开始时间" width="160">
 										</el-table-column>
-										<sa-td name="开始时间图片" width="130" prop="startImage" type="img" >
+										<sa-td name="开始时间图片" width="130" prop="startImage" type="img">
 										</sa-td>
-										<el-table-column prop="coldEndTime" label="结束时间" width="160" >
+										<el-table-column prop="coldEndTime" label="结束时间" width="160">
 										</el-table-column>
-										<sa-td name="结束时间图片" width="130" prop="endImage" type="img" >
+										<sa-td name="结束时间图片" width="130" prop="endImage" type="img">
 										</sa-td>
-										<el-table-column prop="total" label="合计" width="120">
-										</el-table-column>
+										
 										<el-table-column prop="payStatus" label="支付状态" width="100">
 											<template slot-scope="s">
 												<span v-if="s.row.itemName=='人工、机械装卸车辆'">
@@ -148,7 +155,7 @@
 												</span>
 											</template>
 										</el-table-column>
-									
+
 										<el-table-column prop="refundMoney" label="退款金额">
 										</el-table-column>
 										<el-table-column prop="payTime" label="支付时间" width="140">
@@ -164,7 +171,7 @@
 			</div>
 			<!-- ------- 底部按钮 ------- -->
 			<div class="s-foot">
-			<!-- 	<el-button v-if="sa.isAuth('tb-business-car-judge')&&m.businessType===1&&m.confirmJudge!=1"
+				<!-- 	<el-button v-if="sa.isAuth('tb-business-car-judge')&&m.businessType===1&&m.confirmJudge!=1"
 					class="c-btn" type="success" icon="el-icon" @click="pass()">审核通过</el-button>
 				<el-button v-if="sa.isAuth('tb-business-car-judge')&&m.businessType===1&&m.confirmJudge==1"
 					class="c-btn" type="warning" icon="el-icon" @click="callback()">审核驳回</el-button> -->
@@ -261,4 +268,4 @@
 			})
 		</script>
 	</body>
-</html>
+</html>

+ 6 - 0
sp-admin/sa-view/tb-business-car/tb-business-car-list.html

@@ -96,6 +96,12 @@
 							<label v-else>{{s.row.color}}</label>
 						</template>
 					</el-table-column>
+					<!-- <el-table-column label="重量(吨)">
+						<template slot-scope="s">
+							<label v-if="!s.row.netWeight">未过磅</label>
+							<label v-else>{{s.row.netWeight}}</label>
+						</template>
+					</el-table-column> -->
 					<sa-td name="入场通道" prop="inChannel" width="180"></sa-td>
 					<sa-td name="离场通道" prop="outChannel" width="180"></sa-td>
 					<el-table-column label="入场时间" width=180>

+ 9 - 3
sp-admin/sa-view/tb-business/tb-car-disincle-info.html

@@ -65,11 +65,11 @@
 												<sa-info name="业务编号" br>{{m.no}}</sa-info>
 												<sa-info name="录入时间" br>{{m.createTime}}</sa-info>
 												<!-- <sa-info name="录入人" br>{{m.createBy}}</sa-info> -->
-												<sa-info style="margin-top: 0;" type="enum" name="支付状态"
+											<!-- 	<sa-info style="margin-top: 0;" type="enum" name="支付状态"
 													:value="m.payStatus" :jv="{1: '未支付', 2: '已支付未确认', 3: '已支付'}">
-												</sa-info>
+												</sa-info> -->
 												<sa-info name="已支付金额(元)" br>{{m.payMoney}}</sa-info>
-												<sa-info name="支付时间" br>{{m.payTime}}</sa-info>
+												<sa-info name="最近支付时间" br>{{m.payTime}}</sa-info>
 												<sa-info name="发起人" br v-if="m.sendBy">{{m.sendBy}}</sa-info>
 												<sa-info name="发起时间" br v-if="m.sendTime">{{m.sendTime}}</sa-info>
 												<sa-info name="审批结果" br v-if="m.oaResult">{{m.oaResult}}</sa-info>
@@ -102,6 +102,12 @@
 									<el-table :data="m.cars" style="width: 100%">
 										<sa-td name="车牌号" prop="carNo"></sa-td>
 										<sa-td name="类型" prop="carType"></sa-td>
+										<el-table-column label="重量(吨)">
+											<template slot-scope="s">
+												<label v-if="!s.row.netWeight">未过磅</label>
+												<label v-else>{{s.row.netWeight}}</label>
+											</template>
+										</el-table-column>
 										<sa-td name="司机姓名" prop="driverName" v-if="m.goodsCode=='A10003'"></sa-td>
 										<sa-td name="司机号码" prop="driverPhone" width=130 v-if="m.goodsCode=='A10003'"></sa-td>
 										<sa-td name="入场时间" prop="realInTime" width=180></sa-td>

+ 170 - 0
sp-admin/sa-view/tb-car-weight/tb-car-weight-add.html

@@ -0,0 +1,170 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>-添加/修改</title>
+		<meta http-equiv="Content-Type" content="text/html; 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="../../static/kj/element-ui/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+		<style type="text/css">
+			.c-panel .el-form .c-label{width: 7em !important;}
+			.c-panel .el-form .el-input, .c-panel .el-form .el-textarea__inner{width: 250px;}
+		</style>
+	</head>
+	<body>
+		<div class="vue-box" :class="{sbot: id}" style="display: none;" :style="'display: block;'">
+			<!-- ------- 内容部分 ------- -->
+			<div class="s-body">
+				<div class="c-panel">
+                    <div class="c-title" v-if="id == 0">数据添加</div>
+					<div class="c-title" v-else>数据修改</div>
+					<el-form v-if="m">
+						<el-row>
+							<el-col span="12">
+								<sa-item type="text" name="编号" v-model="m.no" br disabled></sa-item>
+								<sa-item type="text" name="入场时间" v-model="m.inTime" br disabled></sa-item>
+								<sa-item type="text" name="出场时间" v-model="m.outTime" br disabled></sa-item>
+								<sa-item type="text" name="总重量(吨)" v-model="m.totalWeight" br ></sa-item>
+								<sa-item type="text" name="过磅时间" v-model="m.createTime" br disabled></sa-item>
+								<sa-item type="text" name="通道名称" v-model="m.channelName" br disabled></sa-item>
+							</el-col>
+							<el-col span="12">
+								<sa-item type="text" name="车牌号" v-model="m.carNo" br></sa-item>
+								<div class="c-item">
+								  <label class="c-label">车身重量(吨):</label>
+								  <el-input type="number" v-model="m.carWeight" @input="carChange" placeholder="车身重量"></el-input>
+								</div>
+								<div class="c-item">
+								  <label class="c-label">货物重量(吨):</label>
+								  <el-input type="number" v-model="m.goodsWeight" @input="goodsChange" placeholder="车身重量"></el-input>
+								</div>
+								<sa-item type="text" name="结算公司" v-model="m.companyName" br></sa-item>
+								<sa-item type="text" name="过磅员" v-model="m.weightPerson" br></sa-item>
+								<sa-item type="text" name="货物" v-model="m.goodsName" br></sa-item>
+							</el-col>
+						</el-row>
+						<div>
+						<sa-info type="img" name="图片" v-model="m.image" br></sa-info>
+						</div>
+						<sa-item name="" class="s-ok" br>
+							<el-button type="primary" icon="el-icon-plus" @click="ok()">保存</el-button>
+						</sa-item>
+					</el-form>
+				</div>
+			</div>
+			<!-- ------- 底部按钮 ------- -->
+			<div class="s-foot">
+				<el-button type="primary" @click="ok()">确定</el-button>
+				<el-button @click="sa.closeCurrIframe()">取消</el-button>
+			</div>
+		</div>
+        <script>
+			
+			var app = new Vue({
+				components: {
+					"sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
+					  "sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue')
+				},
+				el: '.vue-box',
+				data: {
+					id: sa.p('id', 0),		// 获取超链接中的id参数(0=添加,非0=修改) 
+					m: null,		// 实体对象 
+				},
+				methods: {
+					carChange(v){
+						let m=this.m;
+						let totalWeight=m.totalWeight;
+						if(parseFloat(v)>=parseFloat(totalWeight)){
+							m.carWeight=totalWeight;
+							v=totalWeight;
+						}
+						this.m.goodsWeight=parseFloat(parseFloat(totalWeight)-parseFloat(v)).toFixed(2);
+					},
+					goodsChange(v){
+						let m=this.m;
+						let totalWeight=m.totalWeight;
+						if(parseFloat(v)>=parseFloat(totalWeight)){
+							m.goodsWeight=totalWeight;
+							v=totalWeight;
+						}
+						this.m.carWeight=parseFloat(parseFloat(totalWeight)-parseFloat(v)).toFixed(2);
+					},
+					// 创建一个 默认Model 
+					createModel: function() {
+						return {
+							id: '',		//  
+							no: '',		// 编号 
+							carNo: '',		// 车牌号 
+							inTime: '',		// 入场时间 
+							outTime: '',		// 出场时间 
+							carWeight: '',		// 车身重量 
+							goodsWeight: '',		// 货物重量 
+							totalWeight: '',		// 总重量 
+							image: '',		// 图片 
+							channelName: '',		// 通道名称 
+							companyName: '',		// 结算公司 
+							weightTime: '',		// 过磅时间 
+							createTime: '',		// 创建时间 
+							weightPerson: '',		// 过磅员 
+							goodsName: '',		// 货物 
+						}
+					},
+					// 提交数据 
+					ok: function(){
+						// 表单校验 
+						let m = this.m;
+						sa.checkNull(m.no, '请输入 [编号]');
+						sa.checkNull(m.carNo, '请输入 [车牌号]');
+						sa.checkNull(m.inTime, '请输入 [入场时间]');
+						sa.checkNull(m.outTime, '请输入 [出场时间]');
+						sa.checkNull(m.carWeight, '请输入 [车身重量]');
+						sa.checkNull(m.goodsWeight, '请输入 [货物重量]');
+						sa.checkNull(m.totalWeight, '请输入 [总重量]');
+						sa.checkNull(m.image, '请输入 [图片]');
+						sa.checkNull(m.channelName, '请输入 [通道名称]');
+						// 开始增加或修改
+						if(this.id <= 0) {	// 添加
+							sa.ajax('/TbCarWeight/add', m, function(res){
+								sa.alert('增加成功', this.clean); 
+							}.bind(this));
+						} else {	// 修改
+							sa.ajax('/TbCarWeight/update', m, function(res){
+								sa.alert('修改成功', this.clean);
+							}.bind(this));
+						}
+					},
+					// 添加/修改 完成后的动作
+					clean: function() {
+						if(this.id == 0) {
+							this.m = this.createModel();
+						} else {
+							parent.app.f5();		// 刷新父页面列表
+							sa.closeCurrIframe();	// 关闭本页 
+						}
+					}
+				},
+				mounted: function(){
+					// 初始化数据 
+					if(this.id <= 0) {	
+						this.m = this.createModel();
+					} else {	
+						sa.ajax('/TbCarWeight/getById?id=' + this.id, function(res) {
+							this.m = res.data;
+							if(res.data == null) {
+								sa.alert('未能查找到 id=' + this.id + " 详细数据");
+							}
+						}.bind(this))
+					}
+				}
+			})
+			
+		</script>
+	</body>
+</html>

+ 81 - 0
sp-admin/sa-view/tb-car-weight/tb-car-weight-info.html

@@ -0,0 +1,81 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>-详情</title>
+		<meta http-equiv="Content-Type" content="text/html; 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="../../static/kj/element-ui/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+		<style type="text/css">
+			.c-panel .c-label {
+				width: 8em;
+			}
+		</style>
+	</head>
+	<body>
+		<div class="vue-box sbot" style="display: none;" :style="'display: block;'">
+			<!-- ------- 内容部分 ------- -->
+			<div class="s-body">
+				<div class="c-panel">
+					<el-form v-if="m">
+						<el-row>
+							<el-col :span=12>
+								<sa-info name="编号" br>{{m.no}}</sa-info>
+								<sa-info name="车牌号" br>{{m.carNo}}</sa-info>
+								<sa-info name="过磅时间" br>{{m.createTime}}</sa-info>
+								<sa-info name="入场时间" br>{{m.inTime}}</sa-info>
+								<sa-info name="出场时间" br>{{m.outTime}}</sa-info>
+								<sa-info name="总重量(吨)" br>{{m.totalWeight}}</sa-info>
+								<sa-info name="车身重量(吨)" br>{{m.carWeight}}</sa-info>
+
+							</el-col>
+							<el-col :span=12>
+								<sa-info name="货物重量(吨)" br>{{m.goodsWeight}}</sa-info>
+								<sa-info name="通道名称" br>{{m.channelName}}</sa-info>
+								<sa-info name="结算公司" br>{{m.companyName}}</sa-info>
+								<sa-info name="过磅员" br>{{m.weightPerson}}</sa-info>
+								<sa-info name="货物" br>{{m.goodsName}}</sa-info>
+							</el-col>
+							<sa-info type="img" name="图片" v-model="m.image" br></sa-info>
+						</el-row>
+
+					</el-form>
+				</div>
+			</div>
+			<!-- ------- 底部按钮 ------- -->
+			<div class="s-foot">
+				<el-button type="success" @click="sa.closeCurrIframe()">确定</el-button>
+				<el-button @click="sa.closeCurrIframe()">取消</el-button>
+			</div>
+		</div>
+		<script>
+			var app = new Vue({
+				components: {
+					"sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue')
+				},
+				el: '.vue-box',
+				data: {
+					id: sa.p('id', 0), // 获取数据ID 
+					m: null
+				},
+				methods: {},
+				mounted: function() {
+					sa.ajax('/TbCarWeight/getById?id=' + this.id, function(res) {
+						this.m = res.data;
+						if (res.data == null) {
+							sa.alert('未能查找到 id=' + this.id + " 详细数据");
+						}
+					}.bind(this))
+				}
+			})
+		</script>
+	</body>
+</html>

+ 183 - 0
sp-admin/sa-view/tb-car-weight/tb-car-weight-list.html

@@ -0,0 +1,183 @@
+<!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="../../static/kj/element-ui/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/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.carNo"></sa-item>
+					<sa-item type="text" name="编号" v-model="p.no"></sa-item>
+					<sa-item type="text" name="结算公司" v-model="p.companyName"></sa-item>
+					<div class="c-item">
+						<label class="c-label">日期范围:</label>
+						<el-date-picker size="mini" v-model="selectTime" type="daterange" unlink-panels="false"
+							range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
+							format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd">
+						</el-date-picker>
+					</div>
+
+					<el-button type="primary" @click="p.pageNo = 1; f5()">查询</el-button>
+					<el-button type="info" @click="sa.f5()">重置</el-button>
+
+				</el-form>
+				<!-- ------------- 快捷按钮 ------------- -->
+				<!-- <sa-item type="fast-btn" show="add,get,delete,export,reset"></sa-item> -->
+				<!-- ------------- 数据列表 ------------- -->
+				<el-table class="data-table" ref="data-table" :data="dataList">
+					<sa-td type="index" name="序号"></sa-td>
+					<sa-td name="编号" prop="no" width="150"></sa-td>
+					<sa-td name="车牌号" prop="carNo"></sa-td>
+					<sa-td name="货物" prop="goodsName"></sa-td>
+					<sa-td name="入场时间" prop="inTime" width="160"></sa-td>
+					<sa-td name="出场时间" prop="outTime" width="160"></sa-td>
+					<sa-td name="过磅时间" prop="createTime" width="160"></sa-td>
+					<sa-td name="车身重量(吨)" prop="carWeight" width="100"></sa-td>
+					<sa-td name="货物重量(吨)" prop="goodsWeight" width="100"></sa-td>
+					<sa-td name="总重量(吨)" prop="totalWeight" width="100"></sa-td>
+					<sa-td name="通道名称" prop="channelName" width="160"></sa-td>
+					<sa-td name="结算公司" prop="companyName"></sa-td>
+					<sa-td name="过磅员" prop="weightPerson"></sa-td>
+					<sa-td name="复核员" prop="fuhePerson"></sa-td>
+					<el-table-column label="操作" fixed="right" width="240px">
+						<template slot-scope="s">
+							<el-button class="c-btn" type="success" @click="get(s.row)">查看</el-button>
+							<el-button class="c-btn" type="success" @click="printFn(s.row)"
+								v-if="sa.isAuth('tb-car-weight-print')">打印</el-button>
+							<el-button class="c-btn" type="primary" @click="update(s.row)"
+								v-if="sa.isAuth('tb-car-weight-edit')">修改</el-button>
+							<el-button class="c-btn" type="danger" @click="del(s.row)"
+								v-if="sa.isAuth('tb-car-weight-del')">删除</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: {
+					selectTime: [],
+					p: { // 查询参数  
+						id: '', //  
+						no: '', // 编号 
+						carNo: '', // 车牌号 
+						inTime: '', // 入场时间 
+						outTime: '', // 出场时间 
+						carWeight: '', // 车身重量 
+						goodsWeight: '', // 货物重量 
+						totalWeight: '', // 总重量 
+						image: '', // 图片 
+						channelName: '', // 通道名称 
+						companyName: '', // 结算公司 
+						weightTime: '', // 过磅时间 
+						createTime: '', // 创建时间 
+						weightPerson: '', // 过磅员 
+						goodsName: '', // 货物 
+						pageNo: 1, // 当前页 
+						pageSize: 10, // 页大小 
+						sortType: 0 // 排序方式 
+					},
+					dataCount: 0,
+					dataList: [], // 数据集合 
+				},
+				methods: {
+					printFn(data) {
+						sa.showIframe('打印', 'tb-print.html?id=' + data.id, '90%', '700px');
+					},
+					// 刷新
+					f5: function() {
+						let selectTime = this.selectTime;
+						if (selectTime.length > 0) {
+							this.p.startTime = selectTime[0];
+							this.p.endTime = selectTime[1];
+						}else{
+							this.p.startTime = '';
+							this.p.endTime = '';
+						}
+						sa.ajax('/TbCarWeight/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-car-weight-info.html?id=' + data.id, '780px', '80%');
+					},
+					// 查看 - 根据选中的
+					getBySelect: function(data) {
+						var selection = this.$refs['data-table'].selection;
+						if (selection.length == 0) {
+							return sa.msg('请选择一条数据')
+						}
+						this.get(selection[0]);
+					},
+					// 修改
+					update: function(data) {
+						sa.showIframe('修改数据', 'tb-car-weight-add.html?id=' + data.id, '1000px', '90%');
+					},
+					// 新增
+					add: function(data) {
+						sa.showIframe('新增数据', 'tb-car-weight-add.html?id=-1', '1000px', '90%');
+					},
+					// 删除
+					del: function(data) {
+						sa.confirm('是否删除,此操作不可撤销', function() {
+							sa.ajax('/TbCarWeight/delete?id=' + data.id, function(res) {
+								sa.arrayDelete(this.dataList, data);
+								sa.ok('删除成功');
+								sa.f5TableHeight(); // 刷新表格高度 
+							}.bind(this))
+						}.bind(this));
+					},
+					// 批量删除
+					deleteByIds: function() {
+						// 获取选中元素的id列表 
+						let selection = this.$refs['data-table'].selection;
+						let ids = sa.getArrayField(selection, 'id');
+						if (selection.length == 0) {
+							return sa.msg('请至少选择一条数据')
+						}
+						// 提交删除 
+						sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
+							sa.ajax('/TbCarWeight/deleteByIds', {
+								ids: ids.join(',')
+							}, function(res) {
+								sa.arrayDelete(this.dataList, selection);
+								sa.ok('删除成功');
+								sa.f5TableHeight(); // 刷新表格高度 
+							}.bind(this))
+						}.bind(this));
+					},
+				},
+				created: function() {
+					this.f5();
+					sa.onInputEnter();
+				}
+			})
+		</script>
+	</body>
+</html>

+ 159 - 0
sp-admin/sa-view/tb-car-weight/tb-print.html

@@ -0,0 +1,159 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<title>打印报表</title>
+		<style type="text/css">
+			/* @page {
+				size: A4 portrait;
+				margin: 1.9cm 2.5cm 1.5cm 2.5cm;
+			} */
+
+			.print-btn {
+				color: white;
+				background: #2D8CF0;
+				border: none;
+				border-radius: 3px;
+				padding: 5px 10px;
+				font-size: 10px;
+				margin: 10px 20px;
+				cursor: pointer;
+			}
+
+			.content-box {
+				text-align: center;
+				height: 500px;
+				/* width: 794px; */
+				margin: 0 auto;
+				font-family: 黑体;
+			}
+			h1{
+				font-weight: bold;
+				font-size: 32px;
+			}
+
+			table {
+				border-collapse: collapse;
+				border-spacing: 0;
+				border-left: 1px solid #888;
+				border-top: 1px solid #888;
+				font-size: 18px;
+			}
+
+			
+			table td{ padding: 10px; border: 1px solid #000;}
+
+			
+
+			.title-top {
+				margin-top: 248px;
+			}
+		</style>
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/print/jquery-2.0.3.js" type="text/javascript"></script>
+		<script src="../../static/print/print2.js" type="text/javascript"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+	</head>
+
+	<body>
+
+		<div>
+			<div class="box">
+				<button class="print-btn" @click="printFn">打印3</button>
+				<div id="myPrintArea">
+					<div class="content-box" style="position: relative;">
+						<div class="header-title" style="text-align: center;">
+							<h1 style="font-size: 30px;">东兴口岸(二桥)跨境物流中心B区</h1>
+							<h1 style="font-size: 30px;margin-top: 20px;">过磅单</h1>
+						</div>
+							<table style="margin: 0 auto;margin-top: 20px;text-align: center;width: 900px;">
+							<tr style="padding: 0 0.5px;height: 50px;">
+								<td style="width: 21%">时间</td>
+								<td style="width: 29%">{{sa.forDate(nowDay,'yyyy-MM-dd HH:mm')}}</td>
+								<td style="width: 21%">编号</td>
+								<td >{{m.no}}</td>
+							</tr>
+							<tr style="padding: 0 0.5px;height: 50px;">
+								<td style="width: 21%">货名</td>
+								<td style="width: 29%">{{m.goodsName}}</td>
+								<td style="width: 21%">结算公司</td>
+								<td style="width: 29%">{{m.companyName}}</td>
+							</tr>
+							<tr style="padding: 0 0.5px;height: 50px;">
+								<td  colspan="2">进场</td>
+								<td  colspan="2">出场</td>
+							</tr>
+							<tr style="padding: 0 0.5px;height: 50px;">
+								<td >过磅时间</td>
+								<td >{{sa.forDate(m.inTime,'HH:mm')}}</td>
+								<td >过磅时间</td>
+								<td >{{sa.forDate(m.outTime,'HH:mm')}}</td>
+							</tr>
+							<tr style="padding: 0 0.5px;height: 50px;">
+								<td >车号</td>
+								<td >{{m.carNo}}</td>
+								<td >车号</td>
+								<td >{{m.carNo}}</td>
+							</tr>
+							<tr style="padding: 0 0.5px;height: 50px;">
+								<td >车身重量(吨)</td>
+								<td >{{m.carWeight}}</td>
+								<td >总重量 (吨)</td>
+								<td >{{m.totalWeight}}</td>
+							</tr>
+							<tr style="padding: 0 0.5px;height: 50px;">
+								<td rowspan="2">货物重量 (吨)</td>
+								<td  rowspan="2">{{m.goodsWeight}}</td>
+								<td >司磅员</td>
+								<td>{{m.weightPerson}}</td>
+							</tr>
+							<tr style="padding: 0 0.5px;height: 50px;">
+								<td >司机</td>
+								<td ></td>
+							</tr>
+						</table>
+					</div>
+				</div>
+			</div>
+		</div>
+
+		<script type="text/javascript">
+			var app = new Vue({
+				el: '.box',
+				data: {
+					nowDay:new Date(),
+					id: sa.p('id', ''),
+					dataList: [],
+					m:{}
+				},
+				methods: {
+					getDataList() {
+						sa.ajax('/TbCarWeight/getById?id=' + this.id, function(resp) {
+							this.m=resp.data;
+							console.log(this.m)
+							sa.loading("准备打印...");
+							setTimeout(() => {
+								sa.hideLoading();
+								this.printFn();
+							}, 1000)
+						}.bind(this))
+					},
+					printFn() {
+						// window.print()
+						Print('#myPrintArea', {
+							noPrint: '.noPrint'
+						});
+					}
+				},
+				mounted() {
+					this.getDataList();
+				}
+			})
+		</script>
+
+
+	</body>
+</html>

+ 108 - 0
sp-admin/sa-view/tb-channel-config/tb-channel-config-add.html

@@ -0,0 +1,108 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>-添加/修改</title>
+		<meta http-equiv="Content-Type" content="text/html; 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="../../static/kj/element-ui/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+		<style type="text/css">
+			.c-panel .el-form .c-label{width: 7em !important;}
+			.c-panel .el-form .el-input, .c-panel .el-form .el-textarea__inner{width: 250px;}
+		</style>
+	</head>
+	<body>
+		<div class="vue-box" :class="{sbot: id}" style="display: none;" :style="'display: block;'">
+			<!-- ------- 内容部分 ------- -->
+			<div class="s-body">
+				<div class="c-panel">
+                    <div class="c-title" v-if="id == 0">数据添加</div>
+					<div class="c-title" v-else>数据修改</div>
+					<el-form v-if="m">
+						<sa-item type="text" name="通道名称" v-model="m.channelName" br></sa-item>
+						<sa-item type="text" name="匹配名称" v-model="m.matchChannelName" br></sa-item>
+						<sa-item name="" class="s-ok" br>
+							<el-button type="primary" icon="el-icon-plus" @click="ok()">保存</el-button>
+						</sa-item>
+					</el-form>
+				</div>
+			</div>
+			<!-- ------- 底部按钮 ------- -->
+			<div class="s-foot">
+				<el-button type="primary" @click="ok()">确定</el-button>
+				<el-button @click="sa.closeCurrIframe()">取消</el-button>
+			</div>
+		</div>
+        <script>
+			
+			var app = new Vue({
+				components: {
+					"sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue')
+				},
+				el: '.vue-box',
+				data: {
+					id: sa.p('id', 0),		// 获取超链接中的id参数(0=添加,非0=修改) 
+					m: null,		// 实体对象 
+				},
+				methods: {
+					// 创建一个 默认Model 
+					createModel: function() {
+						return {
+							id: '',		//  
+							channelName: '',		// 通道名称 
+							matchChannelName: '',		// 匹配名称 
+							createTime: '',		//  
+						}
+					},
+					// 提交数据 
+					ok: function(){
+						// 表单校验 
+						let m = this.m;
+						sa.checkNull(m.channelName, '请输入 [通道名称]');
+						sa.checkNull(m.matchChannelName, '请输入 [匹配名称]');
+						// 开始增加或修改
+						if(this.id <= 0) {	// 添加
+							sa.ajax('/TbChannelConfig/add', m, function(res){
+								sa.alert('增加成功', this.clean); 
+							}.bind(this));
+						} else {	// 修改
+							sa.ajax('/TbChannelConfig/update', m, function(res){
+								sa.alert('修改成功', this.clean);
+							}.bind(this));
+						}
+					},
+					// 添加/修改 完成后的动作
+					clean: function() {
+						if(this.id == 0) {
+							this.m = this.createModel();
+						} else {
+							parent.app.f5();		// 刷新父页面列表
+							sa.closeCurrIframe();	// 关闭本页 
+						}
+					}
+				},
+				mounted: function(){
+					// 初始化数据 
+					if(this.id <= 0) {	
+						this.m = this.createModel();
+					} else {	
+						sa.ajax('/TbChannelConfig/getById?id=' + this.id, function(res) {
+							this.m = res.data;
+							if(res.data == null) {
+								sa.alert('未能查找到 id=' + this.id + " 详细数据");
+							}
+						}.bind(this))
+					}
+				}
+			})
+			
+		</script>
+	</body>
+</html>

+ 62 - 0
sp-admin/sa-view/tb-channel-config/tb-channel-config-info.html

@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>-详情</title>
+		<meta http-equiv="Content-Type" content="text/html; 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="../../static/kj/element-ui/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+		<style type="text/css">
+			.c-panel .c-label{width: 8em;}
+		</style>
+	</head>
+	<body>
+		<div class="vue-box sbot" style="display: none;" :style="'display: block;'">
+			<!-- ------- 内容部分 ------- -->
+			<div class="s-body">
+				<div class="c-panel">
+					<el-form v-if="m">
+						<sa-info name="通道名称" br>{{m.channelName}}</sa-info>
+						<sa-info name="匹配名称" br>{{m.matchChannelName}}</sa-info>
+						<sa-info name="创建时间" br>{{m.createTime}}</sa-info>
+					</el-form>
+				</div>
+			</div>
+			<!-- ------- 底部按钮 ------- -->
+			<div class="s-foot">
+				<el-button type="success" @click="sa.closeCurrIframe()">确定</el-button>
+				<el-button @click="sa.closeCurrIframe()">取消</el-button>
+			</div>
+		</div>
+		<script>
+			var app = new Vue({
+				components: {
+					"sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue')
+				},
+				el: '.vue-box',
+				data: {
+					id: sa.p('id', 0),	// 获取数据ID 
+					m: null
+				},
+				methods: {
+				},
+				mounted: function() {
+					sa.ajax('/TbChannelConfig/getById?id=' + this.id, function(res) {
+						this.m = res.data;
+						if(res.data == null) {
+							sa.alert('未能查找到 id=' + this.id + " 详细数据");
+						}
+					}.bind(this))
+				}
+			})
+			
+		</script>
+	</body>
+</html>

+ 125 - 0
sp-admin/sa-view/tb-channel-config/tb-channel-config-list.html

@@ -0,0 +1,125 @@
+<!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="../../static/kj/element-ui/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/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">
+				<!-- ------------- 检索参数 ------------- -->
+				<!-- ------------- 快捷按钮 ------------- -->
+				<sa-item type="fast-btn" show="add"></sa-item>
+				<!-- ------------- 数据列表 ------------- -->
+				<el-table class="data-table" ref="data-table" :data="dataList" >
+					<sa-td type="index" name="序号"></sa-td>
+					<sa-td name="通道名称" prop="channelName" ></sa-td>
+					<sa-td name="匹配名称" prop="matchChannelName" ></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>
+							<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: '',		//  
+						channelName: '',		// 通道名称 
+						matchChannelName: '',		// 匹配名称 
+						createTime: '',		//  
+						pageNo: 1,		// 当前页 
+						pageSize: 10,	// 页大小 
+						sortType: 0		// 排序方式 
+					},
+					dataCount: 0,
+					dataList: [], // 数据集合 
+				},
+				methods: {
+					// 刷新
+					f5: function() {
+						sa.ajax('/TbChannelConfig/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-channel-config-info.html?id=' + data.id, '500px', '300px');
+					},
+					// 查看 - 根据选中的
+					getBySelect: function(data) {
+						var selection = this.$refs['data-table'].selection;
+						if(selection.length == 0) {
+							return sa.msg('请选择一条数据')
+						}
+						this.get(selection[0]);
+					},
+					// 修改
+					update: function(data) {
+						sa.showIframe('修改数据', 'tb-channel-config-add.html?id=' + data.id, '500px', '300px');
+					},
+					// 新增
+					add: function(data) {
+						sa.showIframe('新增数据', 'tb-channel-config-add.html?id=-1', '500px', '300px');
+					},
+					// 删除
+					del: function(data) {
+						sa.confirm('是否删除,此操作不可撤销', function() {
+							sa.ajax('/TbChannelConfig/delete?id=' + data.id, function(res) {
+								sa.arrayDelete(this.dataList, data);
+								sa.ok('删除成功');
+								sa.f5TableHeight();		// 刷新表格高度 
+							}.bind(this))
+						}.bind(this));
+					},
+					// 批量删除
+					deleteByIds: function() {
+						// 获取选中元素的id列表 
+						let selection = this.$refs['data-table'].selection;
+						let ids = sa.getArrayField(selection, 'id');
+						if(selection.length == 0) {
+							return sa.msg('请至少选择一条数据')
+						}
+						// 提交删除 
+						sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
+							sa.ajax('/TbChannelConfig/deleteByIds', {ids: ids.join(',')}, function(res) {
+								sa.arrayDelete(this.dataList, selection);
+								sa.ok('删除成功');
+								sa.f5TableHeight();		// 刷新表格高度 
+							}.bind(this))
+						}.bind(this));
+					},
+				},
+				created: function() {
+					this.f5();
+					sa.onInputEnter();
+				}
+			})
+		</script>
+	</body>
+</html>

+ 126 - 132
sp-admin/sa-view/tb-charge-record/print-receipt.html

@@ -3,161 +3,155 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 	<head>
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-		<title>打印充值单据</title>
+		<title>打印收费明细</title>
 		<style type="text/css">
-			body {
-				left: 0px;
-				top: 0px;
-				right: 0px;
-				bottom: 0px;
-				margin: 0px;
-				font-family: Arial, Helvetica, sans-serif;
-				font-size: 12px;
-				overflow: hidden;
-				white-space: nowrap;
+			@page {
+				size: A4 portrait;
+				margin: 19mm 25mm 15mm 25mm;
+			}
+
+			.print-btn {
+				color: white;
+				background: #2D8CF0;
+				border: none;
+				border-radius: 3px;
+				padding: 5px 10px;
+				font-size: 10px;
+				margin: 10px 20px;
+				cursor: pointer;
+			}
+
+			.content-box {
+				text-align: center;
+				height: 1123px;
+				width: 794px;
+				margin: 0 auto;
+			}
+
+			table {
+				border-collapse: collapse;
+				border-spacing: 0;
+				border-left: 1px solid #888;
+				border-top: 1px solid #888;
+			}
+
+			th,
+			td {
+				border-right: 1px solid #888;
+				border-bottom: 1px solid #888;
+				word-break: break-all;
+				padding: 0 2px;
+			}
+
+			th {
+				/* font-weight: bold; */
+			}
+
+			.title-top {
+				margin-top: 248px;
+			}
+			.hide-border{
+				border-bottom-style:none;
+				border-left-style:none;
+				border-right-style: none;
+			}
+			tr td:first-child {
+			  border-left: none;
 			}
 		</style>
-		<script src="../../static/print/jquery-2.0.3.js" type="text/javascript"></script>
-		<script src="../../static/print/jquery.jPrintArea.js" type="text/javascript"></script>
+		<link rel="stylesheet" href="../../static/sa.css">
 		<script src="../../static/kj/vue.min.js"></script>
 		<script src="../../static/kj/element-ui/index.js"></script>
-		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/print/jquery-2.0.3.js" type="text/javascript"></script>
+		<script src="../../static/print/print2.js" type="text/javascript"></script>
 		<script src="../../static/kj/layer/layer.js"></script>
 		<script src="../../static/sa.js"></script>
 
 	</head>
-	<body>
-		<div class="vue-box">
-			<div>
-				<input type="button" style="background: #2d8cf0;
-					color: white;
-					padding: 3px 20px;
-					border: none;
-					cursor: pointer;
-					border-radius: 2px;
-					margin: 10px;" id="print_button" value="打印" />
-			</div>
-			<fieldset align="">
-				<legend>打印区</legend>
-				<div id="myPrintArea" style="height: 1500;">
-					<div style="text-align:center; font-size:15px;">
-						<table id="one" width="100%" style="border-collapse:collapse;border:none;">
-							<tr height="50">
-								<td style="border:solid #000 1px;text-align: left;width:15%;">制单人:</td>
-								<td style="border:solid #000 1px;text-align: left;width:35%;" colspan="3">
-									<span id="LoginName"></span>
-								</td>
-							</tr>
 
-							<tr height="50">
-								<td style="border:solid #000 1px;text-align: left;width:15%;">客户名称:</td>
-								<td style="width:35%;border:solid #000 1px;text-align: left;">
-									<span id="customerName"></span>
-								</td>
-								<td style="border:solid #000 1px;text-align: left;width:15%;">纳税识别号:</td>
-								<td style="width:35%;border:solid #000 1px;text-align: left;">
-									<span id="taxNum"></span>
-								</td>
+	<body>
+		<div>
+			<div class="box">
+				<button class="print-btn" @click="printFn">打印</button>
+				<div id="myPrintArea" style="position: relative;">
+					<div class="content-box " style="position: relative;">
+						<div class="header-title" style="text-align: center;">
+							<span
+								style="font-size: 20px;font-weight: 500;font-family: 黑体;">东兴口岸 (二桥)进口货物集散区 (A1地块) 预存款充值表</span>
+						
+						</div>
+						<table style="margin: 0 auto;text-align: center;width: 790px;margin-top: 30px;" >
+							<tr style="height: 60px;font-size:10px;">
+								<td style="width: 100px;">客户名称</td>
+								<td style="width: 290px;">{{form.customerName}}</td>
+								<td style="width: 100px;">纳税识别号</td>
+								<td style="width: 290px;">{{form.entityTaxNo}}</td>
 							</tr>
-							<tr height="50">
-								<td style="border:solid #000 1px;text-align: left;width:15%;">开户行:</td>
-								<td style="width:35%;border:solid #000 1px;text-align: left;">
-									<span id="bank"></span>
-								</td>
-								<td style="border:solid #000 1px;text-align: left;width:15%;">银行账户:</td>
-								<td style="width:35%;border:solid #000 1px;text-align: left;">
-									<span id="bankAccount"></span>
-								</td>
+							<tr style="height: 60px;font-size:10px;">
+								<td style="min-width: 30px;">付款方式</td>
+								<td>{{form.payTypeDesc}}</td>
+								<td style="min-width: 30px;">原金额(元)</td>
+								<td>{{form.beforeMoney}}</td>
 							</tr>
-							<tr height="50">
-								<td style="border:solid #000 1px;text-align: left;width:15%;">充值金额:</td>
-								<td style="width:35%;border:solid #000 1px;text-align: left;">
-									<span id="preTopupMoney"></span>
-								</td>
-								<td style="border:solid #000 1px;text-align: left;width:15%;">优惠金额:</td>
-								<td style="width:35%;border:solid #000 1px;text-align: left;">
-									<span id="discountMoney"></span>
-								</td>
+							<tr style="height: 60px;font-size:10px;">
+								<td style="min-width: 30px;">优惠金额(元)</td>
+								<td>{{form.discountMoney}}</td>
+								<td style="min-width: 30px;">充值金额(元)</td>
+								<td>{{form.preTopupMoney}}</td>
 							</tr>
-							<tr height="50">
-								<td style="border:solid #000 1px;text-align: left;width:15%;">总计充值:</td>
-								<td style="width:35%;border:solid #000 1px;text-align: left;" >
-								    <span id="totalTopupMoney"></span>
-								</td>
-								<td style="border:solid #000 1px;text-align: left;width:15%;">账户余额:</td>
-								<td style="width:35%;border:solid #000 1px;text-align: left;">
-									<span id="totalMoney"></span>
-								</td>
-								
+							<tr style="height: 60px;font-size:10px;">
+								<td style="min-width: 30px;">实际收款(元)</td>
+								<td>{{form.totalTopupMoney}}</td>
+								<td style="min-width: 30px;">账户余额(元)</td>
+								<td>{{form.totalMoney}}</td>
 							</tr>
-							<tr height="50">
-								<td style="border:solid #000 1px;text-align: left;width:15%;">经办人:</td>
-								<td style="width:35%;border:solid #000 1px;text-align: left;">
-									<span id="chargePeople"></span>
-								</td>
-								<td style="border:solid #000 1px;text-align: left;width:15%;">复核人:</td>
-								<td style="width:35%;border:solid #000 1px;text-align: left;">
-									<span id="reviewBy"></span>
-								</td>
-							<tr height="50">
-							<td style="border:solid #000 1px;text-align: left;width:15%;">充值时间:</td>
-							<td style="width:35%;border:solid #000 1px;text-align: left;" colspan="3">
-								<span id="createTime"></span>
-							</td>
+							<tr style="height: 60px;font-size:10px;">
+								<td style="min-width: 30px;">经办人</td>
+								<td>{{form.chargePeople}}</td>
+								<td style="min-width: 30px;">复核人</td>
+								<td>{{form.reviewBy}}</td>
 							</tr>
-							<tr height="50">
-								<td style="border:solid #000 1px;text-align: left;width:15%;">充值说明:</td>
-								<td style="width:35%;border:solid #000 1px;text-align: left;" colspan="3">
-									<span id="remark"></span>
-								</td>
-
+							<tr style="height: 60px;font-size:10px;">
+								<td style="min-width: 30px;">充值时间</td>
+								<td>{{form.createTime}}</td>
+								<td style="min-width: 30px;">充值说明</td>
+								<td>{{form.remark}}</td>
 							</tr>
-
 						</table>
-
-						<br /><br />
-
+						
 					</div>
-
-
 				</div>
-			</fieldset>
-
+			</div>
 		</div>
 		<script type="text/javascript">
-			$(function() {
-				$("#print_button").click(function() {
-					$("#myPrintArea").printArea();
-				});
-
-				function getUrlParam(name) {
-					var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
-					var r = window.location.search.substr(1).match(reg); //匹配目标参数
-					if (r != null) return unescape(r[2]);
-					return null; //返回参数值
-				}
-
-				var id = getUrlParam('id');
-
-				$.ajax({
-					url: sa.cfg.api_url + '/TbChargeRecord/getPrintReceiptInfo?id=' + id,
-					type: 'post',
-					beforeSend: function(xhr) {
-						xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
-						// 追加token
-						if (localStorage.tokenName) {
-							xhr.setRequestHeader(localStorage.tokenName, localStorage.tokenValue);
-						}
+			var app = new Vue({
+				el: '.box',
+				data: {
+					p: {
+						"id": sa.p('id', '')
 					},
-					success: function(data) {
-						for (let o in data.data) {
-							$('#' + o).html(data.data[o])
-						}
-						$("#myPrintArea").printArea();
+					form:{
+						customerName:''
 					}
-				});
-
-			});
+				},
+				methods: {
+					getData() {
+						sa.ajax('/TbChargeRecord/getPrintReceiptInfo?id='+this.p.id,this.p,function(resp){
+							this.form=resp.data;
+						}.bind(this))
+						
+					},
+					printFn() {
+						Print('#myPrintArea', {
+							noPrint: '.noPrint'
+						});
+					}
+				},
+				mounted() {
+					this.getData()
+					
+				}
+			})
 		</script>
 
 

+ 2 - 1
sp-admin/sa-view/tb-fee-statistics/dayStatsPrint.html

@@ -185,7 +185,8 @@
 								let item = list[i];
 								wxTotal += item.wxPrice;
 								yuePrice += item.yuePrice;
-								totalNum += item.num;
+							
+								totalNum =parseFloat(totalNum)+ parseFloat(item.num);
 								totalMoney += item.taxMoney;
 								totalTaxMoney += item.taxes;
 								totalNoTaxMoney += item.noTaxMoney;

+ 1 - 1
sp-admin/sa-view/tb-fee-statistics/monthStatsPrint.html

@@ -175,7 +175,7 @@
 								let item = list[i];
 								wxTotal += item.wxPrice;
 								yuePrice += item.yuePrice;
-								totalNum += item.num;
+								totalNum =parseFloat(totalNum)+ parseFloat(item.num);
 								totalMoney += item.taxMoney;
 								totalTaxMoney += item.taxes;
 								totalNoTaxMoney += item.noTaxMoney;

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

@@ -499,6 +499,10 @@
 
 							var beginTime = this.selectTimeRange.beginTime;
 							var endTime = this.selectTimeRange.endTime;
+							if(!beginTime&&!endTime){
+								sa.error('导出时间必选');
+								return;
+							}
 							var feeType = this.p.feeType;
 							var itemTypeName = this.p.itemTypeName;
 							if (beginTime === '' && endTime === '') {

+ 1 - 1
sp-admin/sa-view/tb-fee-statistics/yearStatsPrint.html

@@ -175,7 +175,7 @@
 								let item = list[i];
 								wxTotal += item.wxPrice;
 								yuePrice += item.yuePrice;
-								totalNum += item.num;
+								totalNum =parseFloat(totalNum)+ parseFloat(item.num);
 								totalMoney += item.taxMoney;
 								totalTaxMoney += item.taxes;
 								totalNoTaxMoney += item.noTaxMoney;

+ 3 - 2
sp-admin/sa-view/tb-invoice-order/tb-invoice-order-list.html

@@ -221,8 +221,8 @@
 							entityId: '',
 							isElec: 1,
 							totalMoney: 0,
-							customerId: '',
-							customerName: '',
+							customerId: this.applyDate.form.customerId,
+							customerName: this.applyDate.form.customerName
 						}
 						let selection = this.$refs['data-table'].selection;
 						if (selection.length == 0) {
@@ -255,6 +255,7 @@
 						this.applyDate.form.totalMoney = totalMoney;
 						this.applyDate.visible = true;
 						this.applyDate.form.ids = ids.join(',');
+						
 					},
 					changeEntity(value) {
 						let entity = this.entityList.filter(obj => obj.id == value).pop();

+ 1 - 1
sp-admin/static/sa.js

@@ -22,7 +22,7 @@ var sa = {
 		api_url: 'https://dxkaa1.gxbtka.com/pro',
 		web_url: 'http://www.baidu.com'
 	}
-	sa.cfg = cfg_test; // 最终环境 , 上线前请选择正确的环境
+	sa.cfg = cfg_dev; // 最终环境 , 上线前请选择正确的环境
 })();
 
 

+ 2 - 2
sp-server/src/main/java/com/pj/api/jh/service/JhService.java

@@ -82,10 +82,10 @@ public class JhService {
         String businessId = request.getParameter("b");
         String c = request.getParameter("c");
         String a = request.getParameter("a");
-        String i = request.getParameter("i");
+        String w = request.getParameter("w");
         String businessType = request.getParameter("businessType");
         Attach atchMap = new Attach();
-        atchMap.setC(c).setB(businessId).setA(a).setI(i);
+        atchMap.setC(c).setB(businessId).setA(a).setW(w);
         String attchStr = JSONUtil.toJsonStr(atchMap);
         TbOrder dbOrder = tbOrderService.find30Seconds(attchStr, LocalDateTime.now().minusSeconds(wxConfig.getLimitPaySeconds()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
         if (dbOrder != null && !StrUtil.equals(dbOrder.getOpenid(), openid)) {

+ 4 - 0
sp-server/src/main/java/com/pj/api/open/ResultJson.java

@@ -30,6 +30,10 @@ public class ResultJson {
     public static ResultJson success() {
         return new ResultJson(1, "ok", 1, "");
     }
+
+    public static ResultJson success(String msg) {
+        return new ResultJson(1, "ok", 1, msg);
+    }
     public static ResultJson success(String msg,String reason) {
         return new ResultJson(1, msg, 1, reason);
     }

+ 56 - 0
sp-server/src/main/java/com/pj/api/open/service/CoverWeightBase64ToImageTask.java

@@ -0,0 +1,56 @@
+package com.pj.api.open.service;
+
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.io.FileUtil;
+import cn.hutool.core.util.RandomUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import com.pj.current.config.SystemObject;
+import com.pj.current.task.Task;
+import com.pj.project.tb_business_car.TbBusinessCar;
+import com.pj.project.tb_business_car.TbBusinessCarService;
+import com.pj.project.tb_car_weight.TbCarWeight;
+import com.pj.project.tb_car_weight.TbCarWeightService;
+import com.pj.project4sp.uploadfile.UploadConfig;
+import com.pj.utils.ImageUtils;
+import lombok.extern.slf4j.Slf4j;
+
+import java.io.File;
+
+@Slf4j
+public class CoverWeightBase64ToImageTask extends Task {
+    private Long weightId;
+    private String imageData;
+
+    public CoverWeightBase64ToImageTask(String id, long delayInMilliseconds, Long weightId, String imageData) {
+        super(id, delayInMilliseconds);
+        this.imageData = imageData;
+        this.weightId = weightId;
+    }
+
+    @Override
+    public void run() {
+        if (StrUtil.isEmpty(imageData)){
+            log.error("无图片转换:{}=============",weightId);
+            return;
+        }
+        UploadConfig uploadConfig = SpringUtil.getBean(UploadConfig.class);
+        TbCarWeightService tbCarWeightService = SpringUtil.getBean(TbCarWeightService.class);
+        String flieTypeFolder = "/channel/";
+        String currDateFolder = DateUtil.today();
+        String fileName = RandomUtil.randomString(32) + ".jpg";
+        String imgFilePath = new File(uploadConfig.rootFolder).getAbsolutePath() + "/" +
+                uploadConfig.httpPrefix + flieTypeFolder + currDateFolder + "/";
+        if (!FileUtil.exist(imgFilePath)) {
+            FileUtil.mkdir(imgFilePath);
+        }
+        // 对外暴露的http路径
+        String httpUrl = SystemObject.config.getDomain() + uploadConfig.httpPrefix + flieTypeFolder + currDateFolder + "/" + fileName;
+        ImageUtils.generateImage(imageData, imgFilePath + fileName);
+        TbCarWeight carWeight = tbCarWeightService.getById(weightId);
+        if (carWeight != null) {
+            carWeight.setImage(httpUrl);
+        }
+        tbCarWeightService.updateById(carWeight);
+    }
+}

+ 143 - 10
sp-server/src/main/java/com/pj/api/open/service/OpenService.java

@@ -2,10 +2,13 @@ package com.pj.api.open.service;
 
 import cn.hutool.cache.CacheUtil;
 import cn.hutool.cache.impl.TimedCache;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.NumberUtil;
 import cn.hutool.core.util.RandomUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.json.JSONUtil;
 import cn.hutool.log.StaticLog;
+import com.alibaba.druid.sql.visitor.functions.If;
 import com.pj.api.open.ResultJson;
 import com.pj.api.open.bo.CheckCarNumberBO;
 import com.pj.api.open.bo.InRecordBO;
@@ -30,9 +33,15 @@ import com.pj.project.tb_business_item.TbBusinessItem;
 import com.pj.project.tb_business_item.TbBusinessItemService;
 import com.pj.project.tb_car.TbCar;
 import com.pj.project.tb_car.TbCarService;
+import com.pj.project.tb_car_weight.TbCarWeight;
+import com.pj.project.tb_car_weight.TbCarWeightService;
+import com.pj.project.tb_channel_config.TbChannelConfig;
+import com.pj.project.tb_channel_config.TbChannelConfigService;
 import com.pj.project.tb_deduction_bind.TbDeductionBindService;
 import com.pj.project.tb_goods.TbGoods;
 import com.pj.project.tb_goods.TbGoodsService;
+import com.pj.project.tb_item.TbItem;
+import com.pj.project.tb_item.TbItemService;
 import com.pj.project.tb_mild_car.TbMildCar;
 import com.pj.project.tb_mild_car.TbMildCarService;
 import com.pj.utils.cache.RedisUtil;
@@ -45,11 +54,10 @@ import org.springframework.transaction.annotation.Transactional;
 import javax.annotation.Resource;
 
 import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 import java.util.stream.Collectors;
 
 @Service
@@ -76,7 +84,7 @@ public class OpenService {
     @Lazy
     AutomaticPay automaticPay;
     @Resource
-    private TbDeductionBindService tbDeductionBindService;
+    private TbChannelConfigService tbChannelConfigService;
     @Resource
     private PartConfig partConfig;
     @Resource
@@ -86,6 +94,10 @@ public class OpenService {
     private TbBusinessItemService tbBusinessItemService;
     @Resource
     private SyncService syncService;
+    @Resource
+    private TbCarWeightService tbCarWeightService;
+    @Resource
+    private TbItemService tbItemService;
 
     public ResultJson checkCarNumber(CheckCarNumberBO checkCarNumberBO) {
         String carNo = checkCarNumberBO.getCarNumber();
@@ -156,6 +168,7 @@ public class OpenService {
 
     final TimedCache<String, String> IMAGE_CACHE = CacheUtil.newTimedCache(30 * 60 * 1000);
 
+
     private ResultJson handlerOut(String carNo, String channel, String image) {
         carNo = carNo.toUpperCase();
         TbBusinessCar tbBusinessCar = tbBusinessCarService.findTheLastRecord(carNo);
@@ -203,6 +216,16 @@ public class OpenService {
             return ResultJson.error("业务未审核");
         }
         if (businessList.isEmpty()) {
+            //地磅费--->无业务地磅费
+            List<TbCarWeight> carWeights = tbCarWeightService.findByBusinessCarId(tbBusinessCar.getId());
+            carWeights = carWeights.stream().filter(tbCarWeight -> tbCarWeight.getPayStatus() == 0).collect(Collectors.toList());
+            BigDecimal weightMoney = BigDecimal.ZERO;
+            if (!carWeights.isEmpty()) {
+                for (TbCarWeight carWeight : carWeights) {
+                    weightMoney = carWeight.getWeightPrice().add(weightMoney);
+                }
+            }
+            double wMoney = weightMoney.doubleValue();
             //无业务车辆===>计算停车费
             //如果已经支付过,则从支付时间算起,重新计算停车费
             Date inTime = tbBusinessCar.getRealInTime();
@@ -212,11 +235,21 @@ public class OpenService {
             IOrderPriceRes res = tbBusinessService.getPartMoney(inTime, now, carNo, tbBusinessCar.getColor());
             double dif = res.getTotalOrderPrice().subtract(tbBusinessCar.getMoney()).doubleValue();
             if (dif > 0) {
+                String desc = "请缴停车费" + dif + "元";
                 RedisUtil.setByMINUTES(channel, carNo, 5);
-                log.error("请求返回:请缴停车费:{},{}元", carNo, dif);
+                log.error("请求返回:请缴停车费,过磅费:{},{},{}元", carNo, dif, wMoney);
+                if (wMoney > 0) {
+                    desc += "过磅费:" + wMoney + "元";
+                }
                 //是否可以预充值缴费 true扣款成功 false否
-                return ResultJson.error("请缴停车费" + dif + "元");
+                return ResultJson.error(desc);
             } else {
+                if (wMoney > 0) {
+                    log.error("请求返回:过磅费:{},{},{}元", carNo, dif, wMoney);
+                    String desc = "过磅费:" + wMoney + "元";
+                    RedisUtil.setByMINUTES(channel, carNo, 5);
+                    return ResultJson.error(desc);
+                }
                 //无需交停车费,又没有支付的--->设置成免费车辆
                 if (tbBusinessCar.getPayTime() == null) {
                     tbBusinessCar.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType()).setPay(1);
@@ -248,14 +281,15 @@ public class OpenService {
             if (businessItems.isEmpty()) {
                 continue;
             }
+            boolean pay = tbBusiness.getPayMoney().doubleValue() > 0;
             //柜车、栏车 则取对应的入场和离场时间为开始结束时间
             businessItems.stream()
                     .filter(item -> StrUtil.equals(item.getItemAlias(), SystemObject.config.getCabinetCar()))
                     .forEach(item -> {
                         item.setColdStartTime(tbBusinessCar.getRealInTime()).setColdEndTime(now);
                         //堆存业务的车辆====>免停车费
-                        tbBusinessCar.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType()).setPay(1).setMoney(BigDecimal.ZERO);
-                        partMoneyRes.setTotalOrderPrice(BigDecimal.ZERO);
+                        // tbBusinessCar.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType()).setPay(1).setMoney(BigDecimal.ZERO);
+                        // partMoneyRes.setTotalOrderPrice(BigDecimal.ZERO);
                         tbBusinessItemService.updateById(item);
                     });
             TbGoods tbGoods = tbGoodsService.getById(tbBusiness.getGoodsId());
@@ -263,7 +297,6 @@ public class OpenService {
             int weiCarLeave = tbGoods.getVietnamCarLeave();
             //空车离场限制
             int emptyCarLeave = tbGoods.getChinaCarLeave();
-            boolean pay = tbBusiness.getPayMoney().doubleValue() > 0;
             //需要交业务费
             if (CarEnum.CarTypeEnum.WEIGHT_TYPE.getType().equals(carType)) {//==重车
                 if (GoodsEnum.LeaveEnum.PART_MONEY.getCode() != weiCarLeave
@@ -283,19 +316,34 @@ public class OpenService {
         if (!expenses.isEmpty()) {
             businessRes = syncService.orderPriceCal(expenses);
         }
+
         BigDecimal carMoney = partMoneyRes.getTotalOrderPrice();
         BigDecimal businessMoney = businessRes.getTotalOrderPrice();
         BigDecimal total = businessMoney.add(carMoney);
+        //地磅费
+        List<TbCarWeight> carWeights = tbCarWeightService.findByBusinessCarId(tbBusinessCar.getId());
+        //未支付的过磅费用
+        carWeights = carWeights.stream().filter(tbCarWeight -> tbCarWeight.getPayStatus() == 0).collect(Collectors.toList());
+        BigDecimal weightMoney = BigDecimal.ZERO;
+        if (!carWeights.isEmpty()) {
+            for (TbCarWeight carWeight : carWeights) {
+                weightMoney = carWeight.getWeightPrice().add(weightMoney);
+            }
+            total = total.add(weightMoney);
+        }
         if (total.doubleValue() > 0) {
             String desc = "请缴";
             if (businessMoney.doubleValue() > 0) {
                 desc += "业务费" + businessMoney.toString() + "元";
             }
+            if (weightMoney.doubleValue() > 0) {
+                desc += "过磅费" + weightMoney.toString() + "元 ";
+            }
             if (carMoney.doubleValue() > 0) {
                 desc += " 停车费" + carMoney.toString() + "元";
             }
             RedisUtil.setByMINUTES(channel, carNo, 5);
-            boolean flag = automaticPay.payBusinessAndPartMoney(businessList, tbBusinessCar, partMoneyRes,businessRes);
+            boolean flag = automaticPay.payBusinessAndPartMoney(businessList, tbBusinessCar, partMoneyRes, businessRes, carWeights);
             if (flag) {
                 log.error("预存款扣款成功,返回:{},{}", carNo, desc);
                 freeOut(tbBusinessCar, now, channel, image);
@@ -366,4 +414,89 @@ public class OpenService {
         }
     }
 
+    final TimedCache<String, String> WEIGHT_IMAGE_CACHE = CacheUtil.newTimedCache(30 * 60 * 1000);
+
+    final TimedCache<String, Integer> REQ_CACHE = CacheUtil.newTimedCache(60 * 1000);
+
+    /**
+     * @param checkCarNumberBO
+     * @return
+     */
+    public ResultJson reqWeighbridge(CheckCarNumberBO checkCarNumberBO) {
+        String carNo = checkCarNumberBO.getCarNumber();
+        String channel = checkCarNumberBO.getChannelName();
+        TbChannelConfig tbChannelConfig = tbChannelConfigService.findByName(channel);
+        if (tbChannelConfig==null){
+            StaticLog.error("通道未配置,{}", channel);
+            return ResultJson.error("通道未配置");
+        }
+        Integer weight = WEIGHT_CACHE.get(tbChannelConfig.getMatchChannelName());
+        String image = checkCarNumberBO.getImageData();
+        if (StrUtil.isNotEmpty(image)) {
+            StaticLog.error("缓存称重图片,{}", carNo);
+            WEIGHT_IMAGE_CACHE.put(carNo, image);
+        }
+        if (weight == null) {
+            log.error("车辆未过磅:{},{}", channel, carNo);
+            return ResultJson.error("请先过磅");
+        }
+        Integer hasRecord = REQ_CACHE.get(carNo, false);
+        if (hasRecord != null) {
+            log.info("重复识别,已过磅:{}", carNo);
+            return ResultJson.error("已过磅");
+        }
+        TbBusinessCar tbBusinessCar = tbBusinessCarService.findTheLastRecord(carNo);
+        //--------------------------------------------这个地方会出问题,如果车辆离场了再称重------------------
+        if (tbBusinessCar == null || tbBusinessCar.getRealOutTime() != null) {
+            log.error("未找到有效入场记录:{},{}", channel, carNo);
+            return ResultJson.error("未找到有效入场记录");
+        }
+        REQ_CACHE.put(carNo, 1);
+        Date now = new Date();
+        double weighbridge = NumberUtil.div(Double.valueOf(weight).doubleValue(), 1000, 2);
+        tbBusinessCar.setNetWeight(weighbridge + "");
+        TbItem tbItem = tbItemService.findByAliasName(SystemObject.config.getWeighbridge());
+        IOrderItem iOrderItem = new IOrderItem();
+        iOrderItem.setUniqExpenseId(tbItem.getItemCode()).setExpenseNum(weighbridge + "");
+        IOrderPriceRes res = syncService.orderPriceCal(Collections.singletonList(iOrderItem));
+        BigDecimal weightMoney = res.getTotalOrderPrice();
+        tbBusinessCar.setNetweightMoney(weightMoney.add(tbBusinessCar.getNetweightMoney()));
+        tbBusinessCarService.updateById(tbBusinessCar);
+        WEIGHT_CACHE.remove(channel);
+        TbCarWeight carWeight = new TbCarWeight();
+        String no = DateUtil.format(now, "yyyyMMddHHmm") + RandomUtil.randomLong(1000, 9999);
+        carWeight.setCarNo(carNo).setTotalWeight(BigDecimal.valueOf(weighbridge)).setCalculateId(res.getCalculateId())
+                .setChannelName(channel).setCreateTime(now).setInTime(now).setOutTime(now).setCustomerId(tbBusinessCar.getCustomerId())
+                .setBusinessCarId(tbBusinessCar.getId()).setNo(no).setWeightPrice(weightMoney);
+        tbCarWeightService.save(carWeight);
+        taskService.addTask(new CoverWeightBase64ToImageTask("=======" + carWeight.getId() + "", 2000, carWeight.getId(), WEIGHT_IMAGE_CACHE.get(carNo)));
+        WEIGHT_CACHE.remove(carNo);
+        if (tbChannelConfig.getHandlerUp()==1){
+            return ResultJson.success(tbBusinessCar.getNetWeight());
+        }else {
+            return ResultJson.error("过磅完成"+tbBusinessCar.getNetWeight());
+        }
+
+    }
+
+    private final TimedCache<String, Integer> WEIGHT_CACHE = CacheUtil.newTimedCache(120000);
+
+    /**
+     * 缓存地磅数据
+     *
+     * @param channel
+     * @param weight  kg====>
+     */
+    public void cacheWeighbridge(String channel, Integer weight) {
+        WEIGHT_CACHE.put(channel, weight);
+    }
+
+    /**
+     * 清除缓存
+     *
+     * @param channel
+     */
+    public void cleanWeighbridge(String channel) {
+        WEIGHT_CACHE.remove(channel);
+    }
 }

+ 30 - 4
sp-server/src/main/java/com/pj/api/open/web/OpenController.java

@@ -1,16 +1,15 @@
 package com.pj.api.open.web;
 
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.StrUtil;
 import cn.hutool.json.JSONUtil;
 import com.pj.api.open.ResultJson;
 import com.pj.api.open.bo.CheckCarNumberBO;
 import com.pj.api.open.bo.InRecordBO;
 import com.pj.api.open.service.OpenService;
+import com.pj.utils.sg.AjaxJson;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -52,6 +51,33 @@ public class OpenController {
 
     private ResultJson checkCarNumber(CheckCarNumberBO checkCarNumberBO) {
         log.info("check car number:{}", JSONUtil.toJsonStr(checkCarNumberBO));
+        String channelName=checkCarNumberBO.getChannelName();
+        if(StrUtil.contains(channelName,"地磅")){
+            log.info("进入称重逻辑:{},{}",channelName,checkCarNumberBO.getCarNumber());
+            //走地磅称重逻辑
+            return  openService.reqWeighbridge(checkCarNumberBO);
+        }
         return openService.checkCarNumber(checkCarNumberBO);
     }
+
+    /**
+     * 长传地磅数据
+     * @param channel
+     * @param weight
+     * @return
+     */
+    @RequestMapping("reqWeighbridge")
+    public void reqWeighbridge(@RequestParam String channel, @RequestParam Integer weight){
+        log.info("cache weighbridge:{},{}",channel,weight);
+          openService.cacheWeighbridge(channel,weight);
+    }
+
+    @RequestMapping("cleanWeighbridge")
+    public void cleanWeighbridge(@RequestParam String channel){
+        log.info("clean cache weighbridge:{}",channel);
+          openService.cleanWeighbridge(channel);
+    }
+
+
+
 }

+ 1 - 1
sp-server/src/main/java/com/pj/api/pushfee/bo/SyncBillParam.java

@@ -66,7 +66,7 @@ public class SyncBillParam {
 
     private String billStatusDesc;
 
-    private Integer quantity;
+    private String quantity;
 
     private BigDecimal price;
 

+ 143 - 0
sp-server/src/main/java/com/pj/api/pushfee/task/FeeDetailRefundTask.java

@@ -0,0 +1,143 @@
+package com.pj.api.pushfee.task;
+
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import cn.hutool.json.JSONUtil;
+import com.pj.api.pushfee.bo.SyncBillParam;
+import com.pj.api.pushfee.bo.SyncBillRequest;
+import com.pj.constants.business.FeeTypeEnum;
+import com.pj.constants.business.PartFeeEnum;
+import com.pj.constants.business.PayEnum;
+import com.pj.current.config.PushfeeConfig;
+import com.pj.current.config.SystemObject;
+import com.pj.current.task.Task;
+import com.pj.project.sync.HelpService;
+import com.pj.project.sync.bo.SyncResultBO;
+import com.pj.project.tb_costomer.TbCostomer;
+import com.pj.project.tb_costomer.TbCostomerService;
+import com.pj.project.tb_fee_details.TbFeeDetails;
+import com.pj.project.tb_fee_details.TbFeeDetailsService;
+import com.pj.project.tb_fee_item.TbFeeItem;
+import com.pj.project.tb_fee_item.TbFeeItemService;
+import com.pj.project.tb_item.TbItem;
+import com.pj.project.tb_item.TbItemService;
+import lombok.extern.slf4j.Slf4j;
+
+import java.math.BigDecimal;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Auther: lzm
+ * @Date: 2022/07/25/9:11
+ */
+@Slf4j
+public class FeeDetailRefundTask extends Task {
+
+
+    private String detailId;
+    private String syncType;
+    private PayEnum.PayType payType;
+
+    public FeeDetailRefundTask(String id, long delayInMilliseconds, String detailId, String syncType, PayEnum.PayType payType) {
+        super(id, delayInMilliseconds);
+        this.detailId = detailId;
+        this.syncType = syncType;
+        this.payType = payType;
+    }
+
+    private List<SyncBillParam> buildParams(TbFeeDetails tbFeeDetails) {
+        List<SyncBillParam> opdList = new ArrayList<>();
+        SyncBillParam opd = new SyncBillParam();
+        String itemTypeId = tbFeeDetails.getItemTypeId();
+        if (StrUtil.isEmpty(itemTypeId)) {
+            itemTypeId = PartFeeEnum.getNoByDesc(tbFeeDetails.getItemTypeName());
+        }
+        String itemId = tbFeeDetails.getItemId();
+        if (StrUtil.isEmpty(itemId)) {
+            itemId = itemTypeId;
+        }
+        String partnersName = tbFeeDetails.getPickCustomerName();
+        if (StrUtil.isNotEmpty(partnersName)) {
+            TbCostomerService tbCostomerService = SpringUtil.getBean(TbCostomerService.class);
+            TbCostomer tbCostomer = tbCostomerService.findByName(partnersName);
+            if (tbCostomer != null) {
+                opd.setPartnersId(tbCostomer.getId());
+            }
+        }
+        TbFeeItemService tbFeeItemService = SpringUtil.getBean(TbFeeItemService.class);
+        TbItemService tbItemService = SpringUtil.getBean(TbItemService.class);
+        TbFeeItem tbFeeItem = tbFeeItemService.getById(tbFeeDetails.getFeeType());
+        TbItem tbItem = tbItemService.getById(tbFeeDetails.getItemId());
+        if (tbItem != null) {
+            opd.setBizTypeNo(tbItem.getItemCode())
+                    .setGoodNo(tbItem.getItemCode()).setGoodName(tbItem.getItemName());
+        }else {
+            if (tbFeeDetails.getFeeType()==FeeTypeEnum.PARK_FEE.getCode()){
+                //停车费
+                tbItem=tbItemService.findByAliasName(SystemObject.config.getPartItemAlias());
+                opd.setBizTypeNo(tbItem.getItemCode())
+                        .setGoodNo(tbItem.getItemCode()).setGoodName(tbItem.getItemName());
+            }
+        }
+        String subBillNo = StrUtil.isEmpty(tbFeeDetails.getBusinessNo()) ? tbFeeDetails.getBusinessCarNo() : tbFeeDetails.getBusinessNo();
+        String classifyPath = tbFeeDetails.getFeeType() + "-" + itemTypeId + "-" + itemId;
+        opd.setSyncType(syncType)
+                .setSubjectNo(tbFeeDetails.getCarNo())
+                .setSubjectName(tbFeeDetails.getCarNo())
+                .setSubBillNo(subBillNo).setCalculateId(tbFeeDetails.getCalculateId())
+                .setPayStatusDesc("已支付").setPayStatus("1")
+                .setBillStatusDesc(tbFeeDetails.getItemTypeName() + tbFeeDetails.getItemName())
+                .setBillDesc(tbFeeDetails.getItemTypeName() + tbFeeDetails.getItemName())
+                .setQuantity(tbFeeDetails.getNum())
+                .setBizTypeName(tbFeeDetails.getItemTypeName())
+                .setChargeItemName(tbFeeItem.getName())
+                .setChargeItemNo(tbFeeDetails.getFeeType() + "")
+                .setClassifyPath(classifyPath)
+                .setPartnersName(partnersName)
+                .setPaidSerialNo(tbFeeDetails.getTransactionId())
+                .setPaidAmount(tbFeeDetails.getItemPrice())
+                .setRefundAmount(BigDecimal.valueOf(0))
+                .setPayTime(DateUtil.parse(tbFeeDetails.getPayTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")))
+                .setBillTime(tbFeeDetails.getCreateTime())
+                .setPrice(tbFeeDetails.getItemPrice())
+                .setActPrice(tbFeeDetails.getItemPrice())
+                .setBillStatus("已完成")
+                .setPaymentWayNo(payType.getCode() + "")
+                .setPaymentWayName(payType.getDesc());
+        log.info("基础数据:{}", JSONUtil.parseObj(opd));
+        opdList.add(opd);
+        return opdList;
+    }
+
+
+    @Override
+    public void run() {
+        PushfeeConfig pushfeeConfig = SpringUtil.getBean(PushfeeConfig.class);
+        if (!pushfeeConfig.isEnable()) {
+            log.info("系统未启用同步功能");
+            return;
+        }
+        HelpService helpService = SpringUtil.getBean(HelpService.class);
+
+        TbFeeDetailsService tbFeeDetailsService = SpringUtil.getBean(TbFeeDetailsService.class);
+        TbFeeDetails tbFeeDetails = tbFeeDetailsService.getById(detailId);
+        if (tbFeeDetails == null || tbFeeDetails.getSyncStatus() == 1) {
+            log.info("停止同步:{}", JSONUtil.toJsonStr(tbFeeDetails));
+            return;
+        }
+        List<SyncBillParam> list = buildParams(tbFeeDetails);
+        SyncBillRequest detail = new SyncBillRequest();
+        detail.setBillList(list);
+        log.info("同步订单信息:{}", JSONUtil.toJsonStr(list));
+        SyncResultBO response = helpService.req("/data/sync/bill", detail);
+        if (response.getCode() == 200) {
+            tbFeeDetails.setSyncStatus(1);
+        } else {
+            tbFeeDetails.setSyncStatus(2);
+        }
+        tbFeeDetailsService.updateById(tbFeeDetails);
+    }
+}

+ 3 - 0
sp-server/src/main/java/com/pj/api/service/ApiService.java

@@ -129,6 +129,9 @@ public class ApiService {
         //无业务车
         List<TbBusinessCar> noBusinessCarList = tbBusinessCarService.findNotPayByCarNo(carNo);
         businessCarList.addAll(noBusinessCarList);
+        //地磅未付费车
+        List<TbBusinessCar> wCarList = tbBusinessCarService.findNoPayWeightCar(carNo);
+        businessCarList.addAll(wCarList);
         return businessCarList.stream().map(tbBusinessCar -> {
             SearchBO searchBO = new SearchBO();
             searchBO.setId(tbBusinessCar.getId()).setCarNo(tbBusinessCar.getCarNo());

+ 2 - 2
sp-server/src/main/java/com/pj/api/wx/bo/Attach.java

@@ -22,8 +22,8 @@ public class Attach implements Serializable {
      */
     private String a;
     /**
-     * 入场管理
+     * 过磅
      */
-    private String i;
+    private String w;
 
 }

+ 24 - 0
sp-server/src/main/java/com/pj/api/wx/bo/WBo.java

@@ -0,0 +1,24 @@
+package com.pj.api.wx.bo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+@Data
+public class WBo implements Serializable {
+
+
+    /**
+     * price : 0.86
+     * calculateId : 1660265058912960512
+     * id : 42464
+     * label : 地磅费
+     */
+
+    private BigDecimal price;
+    private String calculateId;
+    private String id;
+    private String label;
+
+}

+ 56 - 7
sp-server/src/main/java/com/pj/api/wx/service/WxService.java

@@ -17,6 +17,7 @@ import com.pj.constants.business.CarEnum;
 import com.pj.constants.business.PayEnum;
 import com.pj.current.config.MyConfig;
 import com.pj.current.config.PartConfig;
+import com.pj.current.config.SystemObject;
 import com.pj.current.config.WxConfig;
 import com.pj.project.tb_account.AutomaticPay;
 import com.pj.project.tb_account.TbAccountService;
@@ -26,12 +27,19 @@ import com.pj.project.tb_business_car.TbBusinessCar;
 import com.pj.project.tb_business_car.TbBusinessCarService;
 import com.pj.project.tb_business_item.TbBusinessItem;
 import com.pj.project.tb_business_item.TbBusinessItemService;
+import com.pj.project.tb_car_weight.TbCarWeight;
+import com.pj.project.tb_car_weight.TbCarWeightService;
 import com.pj.project.tb_charge_record.TbChargeRecord;
+import com.pj.project.tb_costomer.TbCostomer;
+import com.pj.project.tb_costomer.TbCostomerService;
+import com.pj.project.tb_fee_details.TbFeeDetails;
 import com.pj.project.tb_fee_details.TbFeeDetailsService;
 import com.pj.project.tb_fee_statistics.TbFeeStatisticsService;
 import com.pj.project.tb_goods.TbGoods;
 import com.pj.project.tb_goods.TbGoodsService;
 import com.pj.project.tb_invoice_order.TbInvoiceOrderService;
+import com.pj.project.tb_item.TbItem;
+import com.pj.project.tb_item.TbItemService;
 import com.pj.project.tb_order.TbOrder;
 import com.pj.project.tb_order.TbOrderService;
 import com.pj.project.wx_send_msg.WxSendMsg;
@@ -87,7 +95,11 @@ public class WxService {
     @Resource
     private TbInvoiceOrderService tbInvoiceOrderService;
     @Resource
-    private AutomaticPay automaticPay;
+    private TbCostomerService tbCostomerService;
+    @Resource
+    private TbItemService tbItemService;
+    @Resource
+    private TbCarWeightService tbCarWeightService;
 
 
     /**
@@ -210,7 +222,7 @@ public class WxService {
         String outTradeNo = notifyBO.getOutTradeNo();
         if (StrUtil.isNotEmpty(RedisUtil.get(outTradeNo))) {
             log.error("========订单已处理==========:{}", outTradeNo);
-            return;
+            //  return;
         }
         RedisUtil.setByMINUTES(outTradeNo, DateUtil.now(), 10);
         TbOrder tbOrder = tbOrderService.findByOutTradeNo(outTradeNo);
@@ -220,7 +232,7 @@ public class WxService {
         }
         String payopenid = tbOrder.getOpenid();
         String total_fee = notifyBO.getTotalFee();
-        BigDecimal money = new BigDecimal(total_fee).divide(new BigDecimal(100), 2, BigDecimal.ROUND_UP);
+        BigDecimal money = new BigDecimal(total_fee).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP);
         String attachStr = tbOrder.getAttach();
         String transactionId = notifyBO.getTransactionId();
         Date now = new Date();
@@ -232,7 +244,7 @@ public class WxService {
         if (StrUtil.isNotEmpty(attachStr)) {
             Attach attach = JSONUtil.toBean(attachStr, Attach.class);
             List<PriceBO> cars = JSONUtil.toList(attach.getC(), PriceBO.class);
-            BigDecimal partMoney=BigDecimal.ZERO;
+            BigDecimal partMoney = BigDecimal.ZERO;
             for (PriceBO bo1 : cars) {
                 TbBusinessCar car = tbBusinessCarService.getById(bo1.getId());
                 BigDecimal price = bo1.getP();
@@ -240,7 +252,7 @@ public class WxService {
                     log.error("付款金额不正确:{}", JSONUtil.toJsonStr(notifyBO));
                     continue;
                 }
-                partMoney=partMoney.add(price);
+                partMoney = partMoney.add(price);
                 car.setPay(1).setMoney(price).setPayTime(payTime)
                         .setPayType(CarEnum.PayTypeEnum.HAS_PAY_TYPE.getType())
                         .setOutTradeNo(outTradeNo)
@@ -255,23 +267,60 @@ public class WxService {
             if (StrUtil.isNotEmpty(businessId)) {
                 List<String> businessIds = StrUtil.splitTrim(businessId, ",");
                 List<TbBusiness> businessList = tbBusinessService.listByIds(businessIds);
-                businessList = businessList.stream().filter(tbBusiness -> tbBusiness.getPayStatus() != PayEnum.PayStatusEnum.HAS_PAY_CONFIRM.getCode()).collect(Collectors.toList());
+                // businessList = businessList.stream().filter(tbBusiness -> tbBusiness.getPayStatus() != PayEnum.PayStatusEnum.HAS_PAY_CONFIRM.getCode()).collect(Collectors.toList());
                 businessIds = businessList.stream().map(TbBusiness::getId).collect(Collectors.toList());
                 List<TbBusinessItem> items = tbBusinessItemService.findByBusinessIdList(businessIds);
+                //这辆车的地磅费用是否支付
+                items.stream().filter(item -> StrUtil.equals(SystemObject.config.getWeighbridge(), item.getItemAlias()))
+                        .forEach(item -> {
+                            TbBusinessCar tbBusinessCar = tbBusinessCarService.getById(item.getCurrentBridgeCarId());
+                            tbBusinessCar.setPayNetweightMoney(1);
+                            tbBusinessCarService.updateById(tbBusinessCar);
+                            item.setPayStatus(0).setTotal(tbBusinessCar.getNetweightMoney());
+                        });
                 items = items.stream().filter(item -> item.getPayStatus() == 0).collect(Collectors.toList());
                 for (TbBusiness tbBusiness : businessList) {
                     tbBusiness.setPayTime(payTime).setPayType(PayEnum.PayType.WX_PAY.getCode())
                             .setConfirmInput(1).setConfirmInputTime(payTime)
-                            .setPayMoney(tbBusiness.getItemPrice()).setPayOpenid(payopenid)
+                            .setPayOpenid(payopenid)
                             .setCalculateId(tbOrder.getCalculateId())
                             .setPayNo(transactionId).setOutTradeNo(outTradeNo);
                     tbBusiness.setPayStatus(PayEnum.PayStatusEnum.HAS_PAY_CONFIRM.getCode());
+                    BigDecimal totalPrice = tbBusiness.getItemPrice();
+                    double itemPrice = items.stream().collect(Collectors.summarizingDouble(t -> t.getTotal().doubleValue())).getSum();
+                    if (totalPrice.doubleValue() > 0.6) {
+                        tbBusiness.setItemPrice(tbBusiness.getItemPrice().add(BigDecimal.valueOf(itemPrice)));
+                    } else {
+                        tbBusiness.setItemPrice(BigDecimal.valueOf(itemPrice));
+                    }
+                    tbBusiness.setPayMoney(BigDecimal.valueOf(itemPrice).add(tbBusiness.getPayMoney()));
                     tbBusinessService.updateById(tbBusiness);
                 }
                 items.forEach(tbBusinessItem -> tbBusinessItem.setPayStatus(1).setPayTime(finalPayTime).setCalculateId(tbOrder.getCalculateId()));
                 tbFeeDetailsService.chargeBusinessFee(items, transactionId, outTradeNo, payTime, PayEnum.PayType.WX_PAY);//添加items的收费明细
                 tbBusinessItemService.updateBatchById(items);
             }
+            String w = attach.getW();
+            if (StrUtil.isNotEmpty(w)) {
+                //{"price":0.86,"calculateId":"1660265058912960512","id":"42464,154","label":"地磅费"}
+                WBo bo = JSONUtil.toBean(w, WBo.class);
+                String weightIds = bo.getId();
+                List<TbCarWeight> carWeightList = tbCarWeightService.listByIds(StrUtil.splitTrim(weightIds, ","));
+                String businessCarId = carWeightList.get(0).getBusinessCarId();
+                TbBusinessCar tbBusinessCar = tbBusinessCarService.getById(businessCarId);
+                String customerid = carWeightList.get(0).getCustomerId();
+                String customerName = "";
+                TbCostomer tbCostomer = tbCostomerService.getById(customerid);
+                if (tbCostomer != null) {
+                    customerName = tbCostomer.getName();
+                }
+                TbItem tbItem = tbItemService.findByAliasName(SystemObject.config.getWeighbridge());
+                for (TbCarWeight carWeight : carWeightList) {
+                    tbFeeDetailsService.saveCarWeightDetails(transactionId,carWeight.getWeightPrice(), bo.getCalculateId(), carWeight.getNo(), tbBusinessCar, customerName, customerName, tbItem, PayEnum.PayType.WX_PAY);
+                    carWeight.setPayStatus(1).setPayTime(now).setPayType(PayEnum.PayType.PER_PAY.getCode());
+                    tbCarWeightService.updateById(carWeight);
+                }
+            }
             tbFeeStatisticsService.addOrUpdateStatistic(payTime, PayEnum.PayType.WX_PAY.getCode());//更新当前日期的日统计
         }
         tbOrder.setOrderStatus(orderStatus)

+ 9 - 9
sp-server/src/main/java/com/pj/constants/business/FeeTypeEnum.java

@@ -8,14 +8,14 @@ import java.util.*;
 @Getter
 @AllArgsConstructor
 public enum FeeTypeEnum {
-    OTHER_FEE(-1, "其他"),
-    //    NUCLEIC_FEE(1, "核酸检测"),
-//    DISINFECT_FEE(2, "消杀作业"),
+    OTHER_FEE(-1, "未知"),
+    NUCLEIC_FEE(1, "核酸检测"),
+    DISINFECT_FEE(2, "消杀作业"),
     STEVEDORE_FEE(3, "装卸作业"),
     PARK_FEE(4, "停车业务"),
-        WEIGHT_FEE(5, "过磅费"),
+    WEIGHT_FEE(5, "过磅费"),
     MANAGE_FEE(6, "入场管理费"),
-        CHARGE_FEE(7, "充电打冷作业");
+    CHARGE_FEE(7, "充电打冷作业");
     private int code;
     private String desc;
 
@@ -30,10 +30,10 @@ public enum FeeTypeEnum {
 //        }
 //        return list;
 //    }
-//    public static String getDesc(int code) {
-//      return   Arrays.stream(FeeTypeEnum.values()).filter(feeTypeEnum -> feeTypeEnum.getCode()==code)
-//                .findAny().orElse(OTHER_FEE).getDesc();
-//    }
+    public static String getDesc(int code) {
+      return   Arrays.stream(FeeTypeEnum.values()).filter(feeTypeEnum -> feeTypeEnum.getCode()==code)
+                .findAny().orElse(OTHER_FEE).getDesc();
+    }
     public static FeeTypeEnum getEnum(int code) {
         return Arrays.stream(FeeTypeEnum.values()).filter(feeTypeEnum -> feeTypeEnum.getCode() == code)
                 .findAny().orElse(OTHER_FEE);

+ 4 - 0
sp-server/src/main/java/com/pj/current/config/MyConfig.java

@@ -94,5 +94,9 @@ public class MyConfig {
      * 柜车、栏车
      */
     private String  cabinetCar;
+    /**
+     * 地磅
+     */
+    private String  weighbridge;
 
 }

+ 1 - 1
sp-server/src/main/java/com/pj/project/sync/request/item/IOrderItem.java

@@ -21,7 +21,7 @@ public class IOrderItem implements Serializable {
     /**
      * 数量
      */
-    private Integer expenseNum;
+    private String expenseNum;
 
     /**
      * 订单费项列表

+ 69 - 0
sp-server/src/main/java/com/pj/project/sys_channel_application/SysChannelApplication.java

@@ -0,0 +1,69 @@
+package com.pj.project.sys_channel_application;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.EqualsAndHashCode;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+/**
+ * Model: sys_channel_application -- 
+ * @author qzy 
+ */
+@Data
+@Accessors(chain = true)
+@TableName(SysChannelApplication.TABLE_NAME)
+@EqualsAndHashCode(callSuper = false)
+public class SysChannelApplication extends Model<SysChannelApplication> implements Serializable {
+
+	// ---------- 模块常量 ----------
+	/**
+	 * 序列化版本id 
+	 */
+	private static final long serialVersionUID = 1L;	
+	/**
+	 * 此模块对应的表名 
+	 */
+	public static final String TABLE_NAME = "sys_channel_application";	
+	/**
+	 * 此模块对应的权限码 
+	 */
+	public static final String PERMISSION_CODE = "sys-channel-application";	
+
+
+	// ---------- 表中字段 ----------
+	/**
+	 *  
+	 */
+	@TableId(type = IdType.AUTO)
+	private Long id;	
+
+	/**
+	 *  
+	 */
+	private String sysName;	
+
+	/**
+	 *  
+	 */
+	private Date lastBeatTime;
+
+	/**
+	 *  
+	 */
+	private Date createTime;
+	@TableField(exist = false)
+	private String state;
+
+
+
+
+
+	
+
+
+}

+ 72 - 0
sp-server/src/main/java/com/pj/project/sys_channel_application/SysChannelApplicationController.java

@@ -0,0 +1,72 @@
+package com.pj.project.sys_channel_application;
+
+import java.util.Date;
+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: sys_channel_application --
+ *
+ * @author qzy
+ */
+@RestController
+@RequestMapping("/SysChannelApplication/")
+public class SysChannelApplicationController {
+
+    /**
+     * 底层 Service 对象
+     */
+    @Autowired
+    SysChannelApplicationService sysChannelApplicationService;
+
+
+    /**
+     * 查 - 根据id
+     */
+    @RequestMapping("getById")
+    public AjaxJson getById(Long id) {
+        SysChannelApplication s = sysChannelApplicationService.getById(id);
+        return AjaxJson.getSuccessData(s);
+    }
+
+    /**
+     * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+     */
+    @RequestMapping("getList")
+    public AjaxJson getList() {
+        SoMap so = SoMap.getRequestSoMap();
+        List<SysChannelApplication> list = sysChannelApplicationService.getList(so.startPage());
+        long time = System.currentTimeMillis();
+        list.parallelStream().forEach(sysChannelApplication -> {
+            sysChannelApplication.setState(sysChannelApplication.getLastBeatTime().getTime() + 50000 > time ? "在线" : "离线");
+        });
+        return AjaxJson.getPageData(so.getDataCount(), list);
+    }
+
+
+    @RequestMapping("beat")
+    public void beat(String channelName) {
+        SysChannelApplication application = sysChannelApplicationService.findByName(channelName);
+        if (application == null) {
+            application = new SysChannelApplication();
+            application.setCreateTime(new Date());
+        }
+        application.setSysName(channelName).setLastBeatTime(new Date());
+        sysChannelApplicationService.saveOrUpdate(application);
+    }
+
+    // ------------------------- 前端接口 -------------------------
+
+
+}

+ 29 - 0
sp-server/src/main/java/com/pj/project/sys_channel_application/SysChannelApplicationMapper.java

@@ -0,0 +1,29 @@
+package com.pj.project.sys_channel_application;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.pj.utils.so.*;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ * Mapper: sys_channel_application -- 
+ * @author qzy 
+ */
+
+@Mapper
+@Repository
+public interface SysChannelApplicationMapper extends BaseMapper <SysChannelApplication> {
+
+
+	/**
+	 * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+	 * @param so 参数集合 
+	 * @return 数据列表 
+	 */
+	List<SysChannelApplication> getList(SoMap so);
+
+
+}

+ 53 - 0
sp-server/src/main/java/com/pj/project/sys_channel_application/SysChannelApplicationMapper.xml

@@ -0,0 +1,53 @@
+<?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.sys_channel_application.SysChannelApplicationMapper">
+
+
+
+	<!-- ================================== 查询相关 ================================== -->
+	<!-- select id, sys_name, last_beat_time, create_time from sys_channel_application  -->
+	
+	<!-- 通用映射:手动模式 -->
+	<resultMap id="model" type="com.pj.project.sys_channel_application.SysChannelApplication">
+		<result property="id" column="id" />
+		<result property="sysName" column="sys_name" />
+		<result property="lastBeatTime" column="last_beat_time" />
+		<result property="createTime" column="create_time" />
+	</resultMap>
+	
+	<!-- 公共查询sql片段 -->
+	<sql id="select_sql">
+		select * 
+		from sys_channel_application 
+	</sql>
+
+	
+	<!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [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("sysName") '> and sys_name = #{sysName} </if>
+			<if test=' this.has("lastBeatTime") '> and last_beat_time = #{lastBeatTime} </if>
+			<if test=' this.has("createTime") '> and create_time = #{createTime} </if>
+		</where>
+		order by
+		<choose>
+			<when test='sortType == 1'> id desc </when>
+			<when test='sortType == 2'> sys_name desc </when>
+			<when test='sortType == 3'> last_beat_time desc </when>
+			<when test='sortType == 4'> create_time desc </when>
+			<otherwise> id desc </otherwise>
+		</choose>
+	</select>
+	
+	
+	
+	
+	
+	
+	
+	
+	
+
+</mapper>

+ 48 - 0
sp-server/src/main/java/com/pj/project/sys_channel_application/SysChannelApplicationService.java

@@ -0,0 +1,48 @@
+package com.pj.project.sys_channel_application;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.pj.project.tb_business.TbBusiness;
+import com.pj.project.tb_business.TbBusinessMapper;
+import com.pj.utils.so.SoMap;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.pj.utils.sg.*;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * Service: sys_channel_application --
+ *
+ * @author qzy
+ */
+@Service
+@Transactional(rollbackFor = Exception.class)
+@Slf4j
+public class SysChannelApplicationService extends ServiceImpl<SysChannelApplicationMapper, SysChannelApplication> implements IService<SysChannelApplication> {
+
+    /**
+     * 底层 Mapper 对象
+     */
+    @Autowired
+    SysChannelApplicationMapper sysChannelApplicationMapper;
+
+
+    /**
+     * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+     */
+    List<SysChannelApplication> getList(SoMap so) {
+        return sysChannelApplicationMapper.getList(so);
+    }
+
+
+    public SysChannelApplication findByName(String channelName) {
+        QueryWrapper<SysChannelApplication> ew = new QueryWrapper<>();
+        ew.lambda().eq(SysChannelApplication::getSysName, channelName);
+        return getOne(ew);
+    }
+}

+ 45 - 6
sp-server/src/main/java/com/pj/project/tb_account/AutomaticPay.java

@@ -25,6 +25,8 @@ import com.pj.project.tb_business_car.TbBusinessCar;
 import com.pj.project.tb_business_car.TbBusinessCarService;
 import com.pj.project.tb_business_item.TbBusinessItem;
 import com.pj.project.tb_business_item.TbBusinessItemService;
+import com.pj.project.tb_car_weight.TbCarWeight;
+import com.pj.project.tb_car_weight.TbCarWeightService;
 import com.pj.project.tb_costomer.TbCostomer;
 import com.pj.project.tb_costomer.TbCostomerService;
 import com.pj.project.tb_deduction_bind.TbDeductionBind;
@@ -37,6 +39,7 @@ import com.pj.project.tb_goods.TbGoods;
 import com.pj.project.tb_goods.TbGoodsService;
 import com.pj.project.tb_invoice_order.TbInvoiceOrder;
 import com.pj.project.tb_invoice_order.TbInvoiceOrderService;
+import com.pj.project.tb_item.TbItem;
 import com.pj.project.tb_item.TbItemService;
 import com.pj.utils.AesUtil;
 import com.pj.utils.cache.RedisUtil;
@@ -85,6 +88,10 @@ public class AutomaticPay {
     @Resource
     private TbCostomerService tbCostomerService;
 
+    @Resource
+    private TbItemService tbItemService;
+    @Resource
+    private TbCarWeightService tbCarWeightService;
 
     /**
      * 生成扣费记录
@@ -94,21 +101,21 @@ public class AutomaticPay {
         TbDeductionRecord deductionRecord = BeanUtil.toBean(feeDetails, TbDeductionRecord.class);
         BigDecimal itemPrice = feeDetails.getItemPrice();
         String no = feeDetails.getBusinessNo();
+        String preNo = DateUtil.format(new Date(), "yyyyMMddHHmm") + RandomUtil.randomString(5);
         deductionRecord
+                .setPreOrderNum(preNo)
                 .setCustomerId(customerId)
                 .setCustomerName(customerName)
                 .setDeductMoney(itemPrice)
-                .setBusinessNo(no)
+                .setBusinessNo(no).setWeight(feeDetails.getWeight())
                 .setOriginalMoney(originalMoney).setBusinessId(feeDetails.getBusinessId())
                 .setTotalMoney(originalMoney.subtract(itemPrice)).setBusinessCarId(businessCarId)
                 .setFeeDetailsId(feeDetails.getId()).setItemName(feeDetails.getItemName())
                 .setItemTypeId(feeDetails.getItemTypeId()).setItemTypeName(feeDetails.getItemTypeName())
                 .setReviewStatus(0).setFeeType(feeTypeEnum.getCode()).setFeeTypeName(feeTypeEnum.getDesc())
                 .setCarNo(plate).setBusinessItemId(feeDetails.getBusinessItemId())
-                .setFeeDetailsId(feeDetails.getId())
-                .setBusinessNo(feeDetails.getBusinessNo());
+                .setFeeDetailsId(feeDetails.getId());
         deductionRecord.insert();
-        String preNo = DateUtil.format(new Date(), "yyyyMMddHHmm") + RandomUtil.randomString(5);
         feeDetails.setPreOrderNum(preNo);
         tbFeeDetailsService.updateById(feeDetails);
         return deductionRecord;
@@ -123,7 +130,7 @@ public class AutomaticPay {
      */
     public boolean payBusinessAndPartMoney(List<TbBusiness> businessList,
                                            TbBusinessCar tbBusinessCar,
-                                           IOrderPriceRes partMoneyRes, IOrderPriceRes businessRes) {
+                                           IOrderPriceRes partMoneyRes, IOrderPriceRes businessRes, List<TbCarWeight> carWeights) {
         Date now = new Date();
         String customerId = tbBusinessCar.getCustomerId();
         if (StrUtil.isEmpty(customerId)) {
@@ -132,12 +139,18 @@ public class AutomaticPay {
         TbAccount tbAccount = tbAccountService.getAccountByCustomerId(customerId);
         //原金额
         BigDecimal originalMoney = tbAccount.getTotalMoney();
+
         //停车费扣除
         BigDecimal partMoney = partMoneyRes.getTotalOrderPrice();
         //业务费用
         BigDecimal businessMoney = businessRes.getTotalOrderPrice();
+        //过磅费
+        BigDecimal weightMoney = BigDecimal.ZERO;
+        for (TbCarWeight carWeight : carWeights) {
+            weightMoney = weightMoney.add(carWeight.getWeightPrice());
+        }
         //总费用
-        BigDecimal totalMoney = partMoney.add(businessMoney);
+        BigDecimal totalMoney = partMoney.add(businessMoney).add(weightMoney);
         if (totalMoney.compareTo(originalMoney) > 0) {
             return false;//不够交
         }
@@ -145,6 +158,18 @@ public class AutomaticPay {
         tbAccount.setTotalMoney(balance);
         TbCostomer tbCostomer = tbCostomerService.getById(customerId);
         String customerName = tbCostomer.getName();
+        //地磅费统计
+        if (weightMoney.doubleValue() > 0) {
+            tbBusinessCar.setNetweightMoney(weightMoney).setPayNetweightMoney(1);
+            TbItem tbItem = tbItemService.findByAliasName(SystemObject.config.getWeighbridge());
+            for (TbCarWeight carWeight : carWeights) {
+                TbFeeDetails details = tbFeeDetailsService.saveCarWeightDetails("",carWeight.getWeightPrice(), carWeight.getCalculateId(), carWeight.getNo(), tbBusinessCar, customerName, customerName, tbItem, PayEnum.PayType.PER_PAY);
+                createTbDeductionRecord(details, originalMoney, BigDecimal.ZERO, customerId, customerName,
+                        tbBusinessCar.getCarNo(), tbBusinessCar.getId(), FeeTypeEnum.WEIGHT_FEE);
+                carWeight.setPayStatus(1).setPayTime(now).setPayType(PayEnum.PayType.PER_PAY.getCode());
+                tbCarWeightService.updateById(carWeight);
+            }
+        }
         //需要交停车费且未交的话
         if (tbBusinessCar.getPay() == 0 && partMoney.compareTo(BigDecimal.ZERO) > 0) {
             String businessIds = businessList.stream().filter(tbBusiness -> tbBusiness.getGoodsName().contains("停车"))
@@ -216,9 +241,23 @@ public class AutomaticPay {
                     tbBusiness.setPayMoney(tbBusiness.getPayMoney().add(partMoney)).setItemPrice(BigDecimal.ZERO);
                 }
                 item.setPayStatus(1).setPayTime(now);
+                if (StrUtil.equals(SystemObject.config.getWeighbridge(), item.getItemAlias())) {
+                    tbBusinessCar.setPayNetweightMoney(1);
+                }
                 tbBusinessItemService.updateById(item);
+                double itemPrice = items.stream().collect(Collectors.summarizingDouble(t -> t.getTotal().doubleValue())).getSum();
                 tbBusiness.setPayStatus(PayEnum.PayStatusEnum.HAS_PAY_CONFIRM.getCode()).setPayTime(now);
+                BigDecimal totalPrice = tbBusiness.getItemPrice();
+                if (totalPrice.doubleValue() > 0.6) {
+                    tbBusiness.setItemPrice(tbBusiness.getItemPrice().add(BigDecimal.valueOf(itemPrice)));
+                } else {
+                    tbBusiness.setItemPrice(BigDecimal.valueOf(itemPrice));
+                }
                 tbBusinessService.updateById(tbBusiness);
+                if (StrUtil.equals(item.getItemAlias(), SystemObject.config.getWeighbridge())) {
+                    tbBusinessCar.setNetweightMoney(item.getTotal());
+                    tbBusinessCarService.updateById(tbBusinessCar);
+                }
             }
         }
         //todo 构造统计数据

+ 64 - 56
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java

@@ -1,6 +1,7 @@
 package com.pj.project.tb_business;
 
 import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.time.LocalDateTime;
 import java.time.ZoneId;
 import java.time.format.DateTimeFormatter;
@@ -56,6 +57,8 @@ import com.pj.project.tb_business_sort.TbBusinessSort;
 import com.pj.project.tb_business_sort.TbBusinessSortService;
 import com.pj.project.tb_car.TbCar;
 import com.pj.project.tb_car.TbCarService;
+import com.pj.project.tb_car_weight.TbCarWeight;
+import com.pj.project.tb_car_weight.TbCarWeightService;
 import com.pj.project.tb_costomer.TbCostomer;
 import com.pj.project.tb_costomer.TbCostomerService;
 import com.pj.project.tb_declare.TbDeclare;
@@ -131,7 +134,8 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
     private TbItemTypeService tbItemTypeService;
     @Resource
     private TbBusinessItemService tbBusinessItemService;
-
+    @Resource
+    private TbCarWeightService tbCarWeightService;
 
     @Resource
     private PartConfig partConfig;
@@ -365,7 +369,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         TbItemFac itemFac = list.get(0);
         IOrderItem orderItem = new IOrderItem();
         String uniqueExpenseId = itemFac.getUniqueExpenseId();
-        orderItem.setUniqExpenseId(uniqueExpenseId).setExpenseNum(1);
+        orderItem.setUniqExpenseId(uniqueExpenseId).setExpenseNum("1");
         List<IFactorItem> factors = new ArrayList<>();
         for (TbItemFac fac : list) {
             String operator = fac.getOperator();
@@ -413,15 +417,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
 //        boolean needPayPartMoney = !businessList.isEmpty();
         TbBusinessCar tbBusinessCar = tbBusinessCarService.getById(businessCarId);
         String carNo = tbBusinessCar.getCarNo();
-        businessList = businessList.stream().filter(tbBusiness -> {
-            TbGoods tbGoods = tbGoodsService.getById(tbBusiness.getGoodsId());
-            Integer payStep = tbGoods.getPayStep();
-            //确认订单后方可缴费
-            return GoodsEnum.PayStep.AFTER_CONFIRM.getCode().equals(payStep) && tbBusiness.getAdminConfirmInput() == 1
-                    //或者下单后可缴费
-                    || GoodsEnum.PayStep.BEFORE_CONFIRM.getCode().equals(payStep) && tbBusiness.getAdminConfirmInput() >= 0;
-        }).collect(Collectors.toList());
-
         List<String> businessIdList = businessList.stream().map(TbBusiness::getId).collect(Collectors.toList());
         String businessIds = StrUtil.join(",", businessIdList);
         long judgeCount = businessList.stream().filter(tbBusiness -> tbBusiness.getConfirmJudge() == CarEnum.ConfirmJudgeEnum.JUDGE_PASS.getCode()).count();
@@ -492,6 +487,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         if (!items.isEmpty()) {
             //未支付的
             List<IOrderItem> expenses = new ArrayList<>();
+            //这辆车的地磅费用是否支付
             items = items.stream().filter(item -> item.getPayStatus() == 0).collect(Collectors.toList());
             for (TbBusinessItem businessItem : items) {
                 String num = businessItem.getNum();
@@ -500,7 +496,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                 String itemAlias = businessItem.getItemAlias();
                 Date startTime = businessItem.getColdStartTime();
                 Date endTime = businessItem.getColdEndTime();
-                iOrderItem.setExpenseNum(Integer.parseInt(num)).setUniqExpenseId(itemCode);
+                iOrderItem.setExpenseNum(num).setUniqExpenseId(itemCode);
                 if (StrUtil.equals(itemAlias, SystemObject.config.getColdItemAlias())) {
                     tbBusinessItemService.buildColdFceItem(businessItem, iOrderItem, startTime, endTime);
                     //充电打冷--->按小时计费
@@ -517,59 +513,77 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                     //大车头、柜车、栏车
                     tbBusinessItemService.buildDaysFceItem(businessItem, iOrderItem, startTime, endTime);
                     //不收停车费
-                    carMap.put("price", 0);
+                    //  carMap.put("price", 0);
                 }
                 expenses.add(iOrderItem);
             }
             result.put("carList", Collections.singleton(carMap));
+
             if (!expenses.isEmpty()) {
                 IOrderPriceRes orderPriceRes = syncService.orderPriceCal(expenses);
                 BigDecimal totalPrice = orderPriceRes.getTotalOrderPrice();
                 carCalculateIds.add(orderPriceRes.getCalculateId());
                 for (TbBusinessItem item : items) {
-                    BigDecimal itemPrice = item.getItemPrice().multiply(new BigDecimal(item.getNum()));
+                    BigDecimal itemPrice = item.getItemPrice().multiply(new BigDecimal(item.getNum())).setScale(2, BigDecimal.ROUND_HALF_UP);
                     itemsPrice = itemsPrice.add(itemPrice);
                     Map<String, Object> itemMap = new HashMap<>();
                     itemMap.put("id", item.getId());
                     itemMap.put("name", item.getItemName() + "(" + item.getItemTypeName() + ")");
+                    if (StrUtil.equals(SystemObject.config.getWeighbridge(), item.getItemAlias())) {
+                        itemMap.put("name", item.getItemName() + "-" + carNo + "(" + item.getItemTypeName() + ")");
+                    }
                     itemMap.put("price", itemPrice);
                     itemMap.put("pay", item.getPayStatus());
-                    orderPriceRes.getFireResult().stream().filter(priceItem -> StrUtil.equals(item.getItemCode(), priceItem.getUniqExpenseId()))
+                    orderPriceRes.getFireResult().stream()
+                            .filter(priceItem -> StrUtil.equals(item.getItemCode(), priceItem.getUniqExpenseId()))
                             .findAny().ifPresent(priceItem -> {
                         BigDecimal price = priceItem.getFirePrice().multiply(new BigDecimal(item.getNum()));
-                        //柜车、栏车只有离场才知道多少钱
-                        if (StrUtil.equals(item.getItemAlias(), SystemObject.config.getCabinetCar())) {
+                        boolean weighbridge = StrUtil.equals(item.getItemAlias(), SystemObject.config.getWeighbridge());
+                        if (weighbridge) {//地磅的,单价x重量
+                            price = priceItem.getFirePrice().multiply(BigDecimal.valueOf(item.getWeighbridge())).setScale(2, BigDecimal.ROUND_HALF_UP);
+                        }
+                        //柜车、栏车 || 过磅费 只有离场才知道多少钱
+                        if (StrUtil.equals(item.getItemAlias(), SystemObject.config.getCabinetCar())
+                        ) {
                             TbBusiness tbBusiness = this.getById(item.getBusinessId());
                             tbBusiness.setItemPrice(price);
                             item.setTotal(price);
                             tbBusinessItemService.updateById(item);
                             this.updateById(tbBusiness);
                         }
+                        if (weighbridge) {
+                            tbBusinessCar.setNetweightMoney(price);
+                            tbBusinessCarService.updateById(tbBusinessCar);
+                        }
                         itemMap.put("price", price);
                     });
                     itemList.add(itemMap);
-                    TbBusinessSort tbBusinessSort = tbBusinessSortService.findByItemTypeId(item.getItemTypeId());
-                    if (tbBusinessSort != null) {
-                        TbSortGroup sortGroup = tbSortGroupService.getById(tbBusinessSort.getGroupId());
-                        if (sortGroup.getCompletePay().equals(1) && sortGroup.getStatus().equals(1)) {
-                            List<TbBusinessSort> sorts = tbBusinessSortService.findByGroupId(sortGroup.getId());
-                            for (TbBusinessSort sort : sorts) {
-                                long count = items.stream().filter(tbBusinessItem -> StrUtil.equals(sort.getTypeId(), tbBusinessItem.getItemTypeId()))
-                                        .count();
-                                if (count == 0) {
-                                    result.put("showPay", false);
-                                }
-                            }
-                        }
-                    }
                 }
                 result.put("itemsPrice", totalPrice);
             }
+
         }
         result.put("itemList", itemList);
         result.put("calculateId", String.join(",", carCalculateIds));
         result.put("businessNo", businessList.stream().map(TbBusiness::getNo).distinct().collect(Collectors.joining("、")));
         result.put("goodsName", businessList.stream().map(TbBusiness::getGoodsName).distinct().collect(Collectors.joining("、")));
+        List<TbCarWeight> carWeights = tbCarWeightService.findByBusinessCarId(tbBusinessCar.getId());
+        //未支付的过磅费用
+        carWeights = carWeights.stream().filter(tbCarWeight -> tbCarWeight.getPayStatus() == 0).collect(Collectors.toList());
+        if (!carWeights.isEmpty()) {
+            BigDecimal total = BigDecimal.ZERO;
+            String weightIds = carWeights.stream().map(tbCarWeight -> tbCarWeight.getId().toString()).collect(Collectors.joining(","));
+            for (TbCarWeight carWeight : carWeights) {
+                total = total.add(carWeight.getWeightPrice());
+                carCalculateIds.add(carWeight.getCalculateId());
+            }
+            Map<String, Object> map = new HashMap<>();
+            map.put("id", weightIds);
+            map.put("label", "过磅费");
+            map.put("price", total);
+            result.put("w", map);
+            result.put("calculateId", String.join(",", carCalculateIds));
+        }
         return result;
     }
 
@@ -793,6 +807,9 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             itemList.add(item);
             index++;
         }
+        if (price.doubleValue() < 5) {
+            price = BigDecimal.ZERO;
+        }
         String declareNo = otherBusinessBO.getDeclareNo();
         tbBusiness.setCardSize(otherBusinessBO.getCarSize()).setNetWeight(otherBusinessBO.getNetWeight())
                 .setOperator(otherBusinessBO.getOperator()).setOperateTime(otherBusinessBO.getOperateTime())
@@ -830,8 +847,8 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                 exitBusinessList.add(tbBusiness);
                 long partBusinessCount = exitBusinessList.stream().filter(busienss -> StrUtil.equals("A10006", busienss.getGoodsCode()))
                         .count();
-                if (exitBusinessList.size()>1&&partBusinessCount>0){
-                    throw new AjaxError("车辆【"+carNo+"】录入停车业务的同时存在其他业务");
+                if (exitBusinessList.size() > 1 && partBusinessCount > 0) {
+                    throw new AjaxError("车辆【" + carNo + "】录入停车业务的同时存在其他业务");
                 }
             }
             if (!tbGoods.getName().contains("整车")) {
@@ -857,7 +874,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             db.setCarSize(car.getCarSize()).setConfirmJudge(CarEnum.ConfirmJudgeEnum.NO_JUDGE.getCode())//业务车都是未审核状态
                     .setTimeUpdate(now).setCarType(car.getCarType())
                     .setDriverName(car.getDriverName()).setDriverPhone(car.getDriverPhone())
-                    .setNetWeight(car.getNetWeight()).setColor(car.getColor())
+                    .setColor(car.getColor())
                     .setCustomerId(customerId)
                     .setNo(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmm")) + RandomUtil.randomNumbers(4));
             tbBusinessCarService.saveOrUpdate(db);
@@ -1034,6 +1051,9 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                 itemList.add(item);
                 index++;
             }
+            if (price.doubleValue() < 5) {
+                price = BigDecimal.ZERO;
+            }
             dbBusiness.setItemPrice(price).setTotalMoney(price);
             tbBusinessItemService.saveBatch(itemList);
         }
@@ -1053,8 +1073,8 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                 }
                 long partBusinessCount = exitBusinessList.stream().filter(busienss -> StrUtil.equals("A10006", busienss.getGoodsCode()))
                         .count();
-                if (exitBusinessList.size()>1&&partBusinessCount>0){
-                    throw new AjaxError("车辆【"+carNo+"】录入停车业务的同时存在其他业务");
+                if (exitBusinessList.size() > 1 && partBusinessCount > 0) {
+                    throw new AjaxError("车辆【" + carNo + "】录入停车业务的同时存在其他业务");
                 }
             }
             if (StrUtil.isNotEmpty(businessCarId)) {
@@ -1078,7 +1098,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                     relationBusinessCar.setBusinessId(dbBusiness.getId()).setBusinessCarId(otherCar.getId());
                     relationBusinessCarService.save(relationBusinessCar);
                 } else {
-                    dbBusinessCar.setNetWeight(tbBusinessCar.getNetWeight()).setNetWeight(tbBusinessCar.getNetWeight())
+                    dbBusinessCar
                             .setCarSize(tbBusinessCar.getCarSize()).setCarType(tbBusinessCar.getCarType())
                             .setConfirmJudge(CarEnum.ConfirmJudgeEnum.NO_JUDGE.getCode());
                     tbBusinessCarService.updateById(dbBusinessCar);
@@ -1090,10 +1110,10 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                     throw new AjaxError("车辆【" + carNo + "】未入场");
                 }
                 checkCar.setCarNo(carNo).setCarType(tbBusinessCar.getCarType()).setCarSize(tbBusinessCar.getCarSize())
-                        .setNetWeight(tbBusinessCar.getNetWeight()).setCustomerId(dbBusiness.getCustomerId())
+                        .setCustomerId(dbBusiness.getCustomerId())
                         .setTimeUpdate(now).setIsLock(0).setCarType(tbBusinessCar.getCarType()).setBusinessType(1)
                         .setConfirmJudge(CarEnum.ConfirmJudgeEnum.NO_JUDGE.getCode());
-                tbBusinessCarService.saveOrUpdate(checkCar);
+                tbBusinessCarService.updateById(checkCar);
                 RelationBusinessCar relationBusinessCar = new RelationBusinessCar();
                 relationBusinessCar.setBusinessId(dbBusiness.getId()).setBusinessCarId(checkCar.getId());
                 relationBusinessCarService.save(relationBusinessCar);
@@ -1527,7 +1547,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             car.setCarNo(carNo).setIsLock(0);
             car.setCarSize(car.getCarSize())
                     .setTimeUpdate(now).setCarType(car.getCarType())
-                    .setNetWeight(car.getNetWeight())
                     .setCustomerId(customerId)
                     .setNo(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmm")) + RandomUtil.randomNumbers(4));
             //新增放行记录
@@ -1669,23 +1688,12 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         String businessCarId;
         Date now = new Date();
         if (lastRecord == null || lastRecord.getRealOutTime() != null) {
-            //不存在或者已经离场
-            tbBusinessCar
-                    .setBusinessType(CarEnum.BusinessTypeEnum.BUSINESS_CAR.getType())
-                    .setCarNo(carNo).setPay(0).setIsLock(0).setPayUnloadMoney(0)
-                    .setPayType(CarEnum.PayTypeEnum.NO_PAY_TYPE.getType()).setPay(0)
-                    .setCreateTime(now).setCarType(CarEnum.CarTypeEnum.EMPTY_TYPE.getType())
-                    .setTimeUpdate(now)
-                    .setConfirmJudge(CarEnum.ConfirmJudgeEnum.NO_NEED_JUDGE.getCode())
-                    .setNo(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmm")) + RandomUtil.randomNumbers(4));
-            tbBusinessCarService.save(tbBusinessCar);
-            businessCarId = tbBusinessCar.getId();
+            throw new AjaxError("车辆未入场");
         } else {
             businessCarId = lastRecord.getId();
             lastRecord.setPayType(CarEnum.PayTypeEnum.NO_PAY_TYPE.getType())
                     .setCustomerId(tbBusiness.getCustomerId())
-                    .setCarNo(carNo).setConfirmJudge(CarEnum.ConfirmJudgeEnum.NO_JUDGE.getCode())
-                    .setPayUnloadMoney(lastRecord.getPayUnloadMoney())
+                    .setCarNo(carNo)
                     .setTimeUpdate(now)
                     .setBusinessType(CarEnum.BusinessTypeEnum.BUSINESS_CAR.getType());
             tbBusinessCarService.updateById(lastRecord);
@@ -1738,12 +1746,12 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                 if (SystemObject.config.getEveryCarPay().contains(itemName) && tbBusinessCar.getPayUnloadMoney() == 0) {
                     List<IOrderItem> expenses = new ArrayList<>();
                     IOrderItem orderItem = new IOrderItem();
-                    orderItem.setExpenseNum(Integer.parseInt(item.getNum()))
+                    orderItem.setExpenseNum(item.getNum())
                             .setUniqExpenseId(item.getItemCode());
                     expenses.add(orderItem);
                     IOrderPriceRes res = syncService.orderPriceCal(expenses);
                     BigDecimal price = res.getTotalOrderPrice();
-                    if (StrUtil.isEmpty(customerId)||tbAccount==null){
+                    if (StrUtil.isEmpty(customerId) || tbAccount == null) {
                         throw new AjaxError("未选择合作伙伴");
                     }
                     BigDecimal balance = tbAccount.getTotalMoney();
@@ -1790,7 +1798,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                     && !SystemObject.config.getEveryCarPay().contains(itemName)) {
                 List<IOrderItem> expenses = new ArrayList<>();
                 IOrderItem orderItem = new IOrderItem();
-                orderItem.setExpenseNum(Integer.parseInt(item.getNum()))
+                orderItem.setExpenseNum(item.getNum())
                         .setUniqExpenseId(item.getItemCode());
                 expenses.add(orderItem);
                 IOrderPriceRes res = syncService.orderPriceCal(expenses);

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

@@ -166,5 +166,12 @@ public class TbBusinessCar extends Model<TbBusinessCar> implements Serializable
      * 是否支付了装卸业务管理费
      */
     private int payUnloadMoney=0;
+    /**
+     * 是否支付了地磅费用
+     */
+    private int payNetweightMoney=0;
+    private Date netweightMoneyTime;
+
+    private BigDecimal netweightMoney=BigDecimal.ZERO;
 
 }

+ 0 - 33
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarController.java

@@ -191,25 +191,7 @@ public class TbBusinessCarController {
         return AjaxJson.getSuccessData(tbBusinessCarService.findNotOutCarLike(carNo));
     }
 
-    @RequestMapping("outCar")
-    public AjaxJson outCar() {
-        SoMap soMap = SoMap.getRequestSoMap();
-        String id = soMap.getString("id");
-        String outChannel = soMap.getString("outChannel");
-        Date realOutTime = soMap.getDateTime("realOutTime");
-        tbBusinessCarService.outCar(id, outChannel, realOutTime);
-        return AjaxJson.getSuccess();
-    }
 
-    @RequestMapping("inCar")
-    public AjaxJson inCar() {
-        SoMap soMap = SoMap.getRequestSoMap();
-        String id = soMap.getString("id");
-        String inChannel = soMap.getString("inChannel");
-        Date realInTime = soMap.getDateTime("realInTime");
-        tbBusinessCarService.inCar(id, inChannel, realInTime);
-        return AjaxJson.getSuccess();
-    }
 
     @RequestMapping("staticsCar")
     public AjaxJson staticsCar() {
@@ -217,21 +199,6 @@ public class TbBusinessCarController {
     }
 
 
-
-    /**
-     * 驳回
-     *
-     * @return
-     */
-    @RequestMapping("callback")
-    @SaCheckPermission(TbBusinessCar.PERMISSION__JUDGE)
-    public AjaxJson callback() {
-        SoMap soMap = SoMap.getRequestSoMap();
-        String id = soMap.getString("id");
-        String judgeContent = soMap.getString("judgeContent");
-        tbBusinessCarService.callback(id,judgeContent);
-        return AjaxJson.getSuccess();
-    }
     @RequestMapping("getListByCarId")
     public AjaxJson getListByCarId(String businessCarId) {
         return AjaxJson.getSuccessData( tbBusinessCarService.findByCarId(businessCarId));

+ 9 - 2
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarService.java

@@ -308,11 +308,10 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
                 List<TbBusinessItem> businessItemList = tbBusinessItemService.findByBusinessId(tbBusiness.getId());
                 for (TbBusinessItem tbBusinessItem : businessItemList) {
                     String aliasName = tbBusinessItem.getItemAlias();
-                    //如果是大头车,则计算业务费用===>同时免收停车费
+                    //如果是大头车,则计算业务费用===>
                     if (StrUtil.equals(SystemObject.config.getBigHeadCar(), aliasName)
                     ||StrUtil.equals(SystemObject.config.getCabinetCar(), aliasName)) {
                         tbBusinessItem.setColdStartTime(db.getRealInTime()).setColdEndTime(db.getRealOutTime());
-                        db.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType()).setPay(1).setMoney(BigDecimal.ZERO);
                         List<IOrderItem> expenses = new ArrayList<>();
                         tbBusinessItemService.buildExpenses(Collections.singletonList(tbBusinessItem), expenses);
                         if (!expenses.isEmpty()){
@@ -523,4 +522,12 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
                 .eq(TbBusinessCar::getPayType, CarEnum.PayTypeEnum.NO_PAY_TYPE.getType());
         return list(ew);
     }
+
+    public List<TbBusinessCar> findNoPayWeightCar(String carNo) {
+        QueryWrapper<TbBusinessCar> ew = new QueryWrapper<>();
+        ew.lambda().like(TbBusinessCar::getCarNo, carNo)
+                .eq(TbBusinessCar::getPayNetweightMoney,0)
+                .gt(TbBusinessCar::getNetWeight,0);
+        return list(ew);
+    }
 }

+ 8 - 0
sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItem.java

@@ -173,6 +173,14 @@ public class TbBusinessItem extends Model<TbBusinessItem> implements Serializabl
 	 *
 	 */
 	private Long parentCabinetId;
+	/**
+	 * 地磅重量
+	 */
+	private Double weighbridge=0D;
+	/**
+	 * 当前缴费车辆
+	 */
+	private String currentBridgeCarId;
 
 
 	@TableField(exist = false)

+ 26 - 1
sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItemController.java

@@ -3,9 +3,16 @@ package com.pj.project.tb_business_item;
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.util.StrUtil;
 import com.pj.constants.UserTypeEnum;
+import com.pj.current.config.SystemObject;
 import com.pj.current.satoken.StpUserUtil;
+import com.pj.project.tb_business_car.TbBusinessCar;
+import com.pj.project.tb_business_car.TbBusinessCarService;
+import com.pj.project.tb_car_weight.TbCarWeight;
+import com.pj.project.tb_car_weight.TbCarWeightService;
 import com.pj.project.tb_costomer.TbCostomer;
 import com.pj.project.tb_costomer.TbCostomerService;
+import com.pj.project.tb_item.TbItem;
+import com.pj.project.tb_item.TbItemService;
 import com.pj.utils.sg.AjaxJson;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -15,6 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
 import java.util.List;
 
 
@@ -34,6 +42,12 @@ public class TbBusinessItemController {
     TbBusinessItemService tbBusinessItemService;
     @Resource
     private TbCostomerService tbCostomerService;
+    @Resource
+    private TbBusinessCarService tbBusinessCarService;
+    @Resource
+    private TbItemService tbItemService;
+    @Resource
+    private TbCarWeightService tbCarWeightService;
 
     /**
      * 改
@@ -137,7 +151,18 @@ public class TbBusinessItemController {
 
     @RequestMapping("getByBusinessCarId")
     public AjaxJson getByBusinessCarId(@RequestParam String businessCarId) {
-        return AjaxJson.getSuccessData(tbBusinessItemService.getByBusinessCarId(businessCarId));
+        List<TbBusinessItem> list=tbBusinessItemService.getByBusinessCarId(businessCarId);
+       List<TbCarWeight> carWeights= tbCarWeightService.findByBusinessCarId(businessCarId);
+       carWeights.forEach(tbCarWeight -> {
+           TbBusinessItem item=new TbBusinessItem();
+           TbItem tbItem=tbItemService.findByAliasName(SystemObject.config.getWeighbridge());
+           item.setPayStatus(tbCarWeight.getPayStatus()).setPayTime(tbCarWeight.getPayTime())
+                   .setItemPrice(tbItem.getPrice()).setTotal(tbCarWeight.getWeightPrice())
+                   .setNum(tbCarWeight.getTotalWeight().toString()).setItemTypeName(tbItem.getTypeName()).setItemName(tbItem.getItemName())
+                   .setUnit(tbItem.getUnit()).setCabinetType(-1);
+           list.add(item);
+       });
+        return AjaxJson.getSuccessData(list);
     }
 
     @RequestMapping("export/items")

+ 8 - 2
sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItemService.java

@@ -268,6 +268,9 @@ public class TbBusinessItemService extends ServiceImpl<TbBusinessItemMapper, TbB
      */
     public List<TbBusinessItem> getByBusinessCarId(String busienssCarId) {
         List<TbBusiness> businessList = tbBusinessService.findOtherBusinessByCarId(busienssCarId);
+        if (businessList.isEmpty()){
+            return new ArrayList<>();
+        }
         return this.findByBusinessIdList(businessList.stream().map(TbBusiness::getId).collect(Collectors.toList()));
     }
 
@@ -299,7 +302,7 @@ public class TbBusinessItemService extends ServiceImpl<TbBusinessItemMapper, TbB
                 .setItemPrice(tbItem.getPrice())
                 .setUnit(tbItem.getUnit()).setNum(num)
                 .setTotal(totalPrice).setCreateTime(new Date())
-                .setTaxRate(new BigDecimal(tbItem.getTaxRate()).divide(new BigDecimal(100), 2, BigDecimal.ROUND_UP).doubleValue())
+                .setTaxRate(new BigDecimal(tbItem.getTaxRate()).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP).doubleValue())
                 .setNo(tbBusiness.getNo() + list.size() + 1)
                 .setPayType(tbItem.getPayType()).setPayTypeName(tbItem.getPayTypeName());
         this.save(tbBusinessItem);
@@ -356,7 +359,10 @@ public class TbBusinessItemService extends ServiceImpl<TbBusinessItemMapper, TbB
                     buildDaysFceItem(item, orderItem, startTime, endTime);
                 }
                 orderItem.setUniqExpenseId(item.getItemCode())
-                        .setExpenseNum(Integer.parseInt(item.getNum()));
+                        .setExpenseNum(item.getNum());
+                if (StrUtil.equals(itemAlias,SystemObject.config.getWeighbridge())){
+                    orderItem.setExpenseNum(item.getWeighbridge().toString());
+                }
                 boolean flag= orderItems.add(orderItem);
                 log.info("flag-----------:{}",flag);
             }

+ 140 - 0
sp-server/src/main/java/com/pj/project/tb_car_weight/TbCarWeight.java

@@ -0,0 +1,140 @@
+package com.pj.project.tb_car_weight;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.EqualsAndHashCode;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+/**
+ * Model: tb_car_weight -- 
+ * @author qzy 
+ */
+@Data
+@Accessors(chain = true)
+@TableName(TbCarWeight.TABLE_NAME)
+@EqualsAndHashCode(callSuper = false)
+public class TbCarWeight extends Model<TbCarWeight> implements Serializable {
+
+	// ---------- 模块常量 ----------
+	/**
+	 * 序列化版本id 
+	 */
+	private static final long serialVersionUID = 1L;	
+	/**
+	 * 此模块对应的表名 
+	 */
+	public static final String TABLE_NAME = "tb_car_weight";	
+	/**
+	 * 此模块对应的权限码 
+	 */
+	public static final String PERMISSION_CODE = "tb-car-weight";	
+	public static final String PERMISSION_CODE_EDIT = "tb-car-weight-edit";
+	public static final String PERMISSION_CODE_DEL = "tb-car-weight-del";
+
+
+	// ---------- 表中字段 ----------
+	/**
+	 *  
+	 */
+	@TableId(type = IdType.AUTO)
+	private Long id;	
+
+	/**
+	 * 编号 
+	 */
+	private String no;	
+
+	/**
+	 * 车牌号 
+	 */
+	private String carNo;	
+	private String businessCarId;
+	private String workNo;
+	private String fuhePerson;
+
+	/**
+	 * 入场时间 
+	 */
+	private Date inTime;
+
+	/**
+	 * 出场时间 
+	 */
+	private Date outTime;
+
+	/**
+	 * 车身重量 
+	 */
+	private BigDecimal carWeight=BigDecimal.ZERO;
+
+	/**
+	 * 货物重量 
+	 */
+	private BigDecimal goodsWeight=BigDecimal.ZERO;
+
+	/**
+	 * 总重量 
+	 */
+	private BigDecimal totalWeight=BigDecimal.ZERO;
+
+	private BigDecimal weightPrice=BigDecimal.ZERO;
+
+	/**
+	 * 图片 
+	 */
+	private String image;	
+
+	/**
+	 * 通道名称 
+	 */
+	private String channelName;	
+
+	/**
+	 * 结算公司 
+	 */
+	private String companyName;	
+
+	/**
+	 * 过磅时间 
+	 */
+	private Date weightTime;
+
+	/**
+	 * 创建时间 
+	 */
+	private Date createTime;
+
+	/**
+	 * 过磅员 
+	 */
+	private String weightPerson;
+
+	/**
+	 * 货物 
+	 */
+	private String goodsName;
+
+
+	/**
+	 * 计价ID
+	 */
+	private String calculateId;
+
+	private int payStatus=0;
+	private int payType;
+	private Date payTime;
+
+	private String customerId;
+	private String customerName;
+
+
+	
+
+
+}

+ 75 - 0
sp-server/src/main/java/com/pj/project/tb_car_weight/TbCarWeightController.java

@@ -0,0 +1,75 @@
+package com.pj.project.tb_car_weight;
+
+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_car_weight --
+ *
+ * @author qzy
+ */
+@RestController
+@RequestMapping("/TbCarWeight/")
+public class TbCarWeightController {
+
+    /**
+     * 底层 Service 对象
+     */
+    @Autowired
+    TbCarWeightService tbCarWeightService;
+
+
+    /**
+     * 改
+     */
+    @RequestMapping("update")
+    @SaCheckPermission(TbCarWeight.PERMISSION_CODE)
+    public AjaxJson update(TbCarWeight t) {
+        tbCarWeightService.updateById(t);
+        return AjaxJson.getSuccess();
+    }
+
+    /**
+     * 改
+     */
+    @RequestMapping("delete")
+    @SaCheckPermission(TbCarWeight.PERMISSION_CODE_DEL)
+    public AjaxJson delete() {
+        SoMap soMap = SoMap.getRequestSoMap();
+        String id = soMap.getString("id");
+        tbCarWeightService.removeById(id);
+        return AjaxJson.getSuccess();
+    }
+
+    /**
+     * 查 - 根据id
+     */
+    @RequestMapping("getById")
+    public AjaxJson getById(Long id) {
+        TbCarWeight t = tbCarWeightService.getById(id);
+        return AjaxJson.getSuccessData(t);
+    }
+
+    /**
+     * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+     */
+    @RequestMapping("getList")
+    public AjaxJson getList() {
+        SoMap so = SoMap.getRequestSoMap();
+        List<TbCarWeight> list = tbCarWeightService.getList(so.startPage());
+        return AjaxJson.getPageData(so.getDataCount(), list);
+    }
+
+
+}

+ 29 - 0
sp-server/src/main/java/com/pj/project/tb_car_weight/TbCarWeightMapper.java

@@ -0,0 +1,29 @@
+package com.pj.project.tb_car_weight;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.pj.utils.so.*;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ * Mapper: tb_car_weight -- 
+ * @author qzy 
+ */
+
+@Mapper
+@Repository
+public interface TbCarWeightMapper extends BaseMapper <TbCarWeight> {
+
+
+	/**
+	 * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+	 * @param so 参数集合 
+	 * @return 数据列表 
+	 */
+	List<TbCarWeight> getList(SoMap so);
+
+
+}

+ 90 - 0
sp-server/src/main/java/com/pj/project/tb_car_weight/TbCarWeightMapper.xml

@@ -0,0 +1,90 @@
+<?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_car_weight.TbCarWeightMapper">
+
+	<!-- ================================== 查询相关 ================================== -->
+	<!-- select id, no, car_no, in_time, out_time, car_weight, goods_weight, total_weight, image, channel_name, company_name, weight_time, create_time, weight_person, goods_name from tb_car_weight  -->
+	
+	<!-- 通用映射:手动模式 -->
+	<resultMap id="model" type="com.pj.project.tb_car_weight.TbCarWeight">
+		<result property="id" column="id" />
+		<result property="no" column="no" />
+		<result property="carNo" column="car_no" />
+		<result property="inTime" column="in_time" />
+		<result property="outTime" column="out_time" />
+		<result property="carWeight" column="car_weight" />
+		<result property="goodsWeight" column="goods_weight" />
+		<result property="totalWeight" column="total_weight" />
+		<result property="image" column="image" />
+		<result property="channelName" column="channel_name" />
+		<result property="companyName" column="company_name" />
+		<result property="weightTime" column="weight_time" />
+		<result property="createTime" column="create_time" />
+		<result property="weightPerson" column="weight_person" />
+		<result property="goodsName" column="goods_name" />
+	</resultMap>
+	
+	<!-- 公共查询sql片段 -->
+	<sql id="select_sql">
+		select * 
+		from tb_car_weight 
+	</sql>
+
+	
+	<!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
+	<select id="getList" resultType="com.pj.project.tb_car_weight.TbCarWeight">
+		<include refid="select_sql"></include>
+		<where>
+			<if test=' this.has("id") '> and id = #{id} </if>
+			<if test=' this.has("no") '> and no  like concat('%',#{no},'%')  </if>
+			<if test=' this.has("carNo") '> and car_no like concat('%',#{carNo},'%')  </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("carWeight") '> and car_weight = #{carWeight} </if>
+			<if test=' this.has("goodsWeight") '> and goods_weight = #{goodsWeight} </if>
+			<if test=' this.has("totalWeight") '> and total_weight = #{totalWeight} </if>
+			<if test=' this.has("image") '> and image = #{image} </if>
+			<if test=' this.has("channelName") '> and channel_name = #{channelName} </if>
+			<if test=' this.has("companyName") '> and company_name like concat('%', #{companyName},'%') </if>
+			<if test=' this.has("weightTime") '> and weight_time = #{weightTime} </if>
+			<if test=' this.has("createTime") '> and create_time = #{createTime} </if>
+			<if test=' this.has("weightPerson") '> and weight_person = #{weightPerson} </if>
+			<if test=' this.has("goodsName") '> and goods_name = #{goodsName} </if>
+			<if test=' this.has("startTime") '>
+				AND DATE_FORMAT( create_time, '%Y-%m-%d %H:%i:%s' ) &gt;= #{startTime}
+			  </if>
+			<if test=' this.has("endTime") '>
+				AND DATE_FORMAT( create_time, '%Y-%m-%d %H:%i:%s' ) &lt;= #{endTime}
+			</if>
+		</where>
+		order by
+		<choose>
+			<when test='sortType == 1'> id desc </when>
+			<when test='sortType == 2'> no desc </when>
+			<when test='sortType == 3'> car_no desc </when>
+			<when test='sortType == 4'> in_time desc </when>
+			<when test='sortType == 5'> out_time desc </when>
+			<when test='sortType == 6'> car_weight desc </when>
+			<when test='sortType == 7'> goods_weight desc </when>
+			<when test='sortType == 8'> total_weight desc </when>
+			<when test='sortType == 9'> image desc </when>
+			<when test='sortType == 10'> channel_name desc </when>
+			<when test='sortType == 11'> company_name desc </when>
+			<when test='sortType == 12'> weight_time desc </when>
+			<when test='sortType == 13'> create_time desc </when>
+			<when test='sortType == 14'> weight_person desc </when>
+			<when test='sortType == 15'> goods_name desc </when>
+			<otherwise> id desc </otherwise>
+		</choose>
+	</select>
+	
+	
+	
+	
+	
+	
+	
+	
+	
+
+</mapper>

+ 39 - 0
sp-server/src/main/java/com/pj/project/tb_car_weight/TbCarWeightService.java

@@ -0,0 +1,39 @@
+package com.pj.project.tb_car_weight;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.pj.project.tb_costomer.TbCostomer;
+import com.pj.project.tb_costomer.TbCostomerMapper;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.pj.utils.sg.*;
+
+/**
+ * Service: tb_car_weight -- 
+ * @author qzy 
+ */
+@Service
+public class TbCarWeightService extends ServiceImpl<TbCarWeightMapper, TbCarWeight> implements IService<TbCarWeight> {
+
+	/** 底层 Mapper 对象 */
+	@Autowired
+	TbCarWeightMapper tbCarWeightMapper;
+
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	List<TbCarWeight> getList(SoMap so) {
+		return tbCarWeightMapper.getList(so);	
+	}
+
+
+	public List<TbCarWeight> findByBusinessCarId(String tbBusinessCarId) {
+		QueryWrapper<TbCarWeight>ew=new QueryWrapper<>();
+		ew.lambda().eq(TbCarWeight::getBusinessCarId,tbBusinessCarId);
+		return list(ew);
+	}
+}

+ 69 - 0
sp-server/src/main/java/com/pj/project/tb_channel_config/TbChannelConfig.java

@@ -0,0 +1,69 @@
+package com.pj.project.tb_channel_config;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.EqualsAndHashCode;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+/**
+ * Model: tb_channel_config -- 
+ * @author qzy 
+ */
+@Data
+@Accessors(chain = true)
+@TableName(TbChannelConfig.TABLE_NAME)
+@EqualsAndHashCode(callSuper = false)
+public class TbChannelConfig extends Model<TbChannelConfig> implements Serializable {
+
+	// ---------- 模块常量 ----------
+	/**
+	 * 序列化版本id 
+	 */
+	private static final long serialVersionUID = 1L;	
+	/**
+	 * 此模块对应的表名 
+	 */
+	public static final String TABLE_NAME = "tb_channel_config";	
+	/**
+	 * 此模块对应的权限码 
+	 */
+	public static final String PERMISSION_CODE = "tb-channel-config";	
+
+
+	// ---------- 表中字段 ----------
+	/**
+	 *  
+	 */
+	@TableId(type = IdType.AUTO)
+	private Long id;	
+
+	/**
+	 * 通道名称 
+	 */
+	private String channelName;	
+
+	/**
+	 * 匹配名称 
+	 */
+	private String matchChannelName;	
+
+	/**
+	 *  
+	 */
+	private Date createTime;
+
+	private int handlerUp=1;
+
+
+
+
+
+	
+
+
+}

+ 105 - 0
sp-server/src/main/java/com/pj/project/tb_channel_config/TbChannelConfigController.java

@@ -0,0 +1,105 @@
+package com.pj.project.tb_channel_config;
+
+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_channel_config -- 
+ * @author qzy 
+ */
+@RestController
+@RequestMapping("/TbChannelConfig/")
+public class TbChannelConfigController {
+
+	/** 底层 Service 对象 */
+	@Autowired
+	TbChannelConfigService tbChannelConfigService;
+
+	/** 增 */  
+	@RequestMapping("add")
+	@SaCheckPermission(TbChannelConfig.PERMISSION_CODE)
+	@Transactional(rollbackFor = Exception.class)
+	public AjaxJson add(TbChannelConfig t){
+		tbChannelConfigService.add(t);
+		t = tbChannelConfigService.getById(SP.publicMapper.getPrimarykey());
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 删 */  
+	@RequestMapping("delete")
+	@SaCheckPermission(TbChannelConfig.PERMISSION_CODE)
+	public AjaxJson delete(Long id){
+		int line = tbChannelConfigService.delete(id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 删 - 根据id列表 */  
+	@RequestMapping("deleteByIds")
+	@SaCheckPermission(TbChannelConfig.PERMISSION_CODE)
+	public AjaxJson deleteByIds(){
+		List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class);
+		int line = SP.publicMapper.deleteByIds(TbChannelConfig.TABLE_NAME, ids);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 */  
+	@RequestMapping("update")
+	@SaCheckPermission(TbChannelConfig.PERMISSION_CODE)
+	public AjaxJson update(TbChannelConfig t){
+		int line = tbChannelConfigService.update(t);
+		return AjaxJson.getByLine(line);
+	}
+
+	/** 查 - 根据id */  
+	@RequestMapping("getById")
+	public AjaxJson getById(Long id){
+		TbChannelConfig t = tbChannelConfigService.getById(id);
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	@RequestMapping("getList")
+	public AjaxJson getList() { 
+		SoMap so = SoMap.getRequestSoMap();
+		List<TbChannelConfig> list = tbChannelConfigService.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(TbChannelConfig.TABLE_NAME, "user_id", id);
+		AjaxError.throwBy(userId != StpUserUtil.getLoginIdAsLong(), "此数据您无权限修改");
+		// 开始修改 (请只保留需要修改的字段)
+		SoMap so = SoMap.getRequestSoMap();
+		so.clearNotIn("id", "channelName", "matchChannelName", "createTime").clearNull().humpToLineCase();	
+		int line = SP.publicMapper.updateBySoMapById(TbChannelConfig.TABLE_NAME, so, id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	
+	
+	
+	
+	
+
+}

+ 56 - 0
sp-server/src/main/java/com/pj/project/tb_channel_config/TbChannelConfigMapper.java

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

+ 80 - 0
sp-server/src/main/java/com/pj/project/tb_channel_config/TbChannelConfigMapper.xml

@@ -0,0 +1,80 @@
+<?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_channel_config.TbChannelConfigMapper">
+
+	<!-- 增 [G] -->
+	<insert id="add">
+		insert into
+		tb_channel_config (id, channel_name, match_channel_name, create_time)
+		values (#{id}, #{channelName}, #{matchChannelName},now())
+	</insert>
+
+	<!-- 删 -->
+	<delete id="delete">
+		delete from tb_channel_config
+		where id = #{id}
+	</delete>
+
+	<!-- 改 [G] -->
+	<update id="update">
+		update tb_channel_config set
+		id = #{id},
+		channel_name = #{channelName},
+		match_channel_name = #{matchChannelName},
+		create_time = #{createTime}
+		where id = #{id}
+	</update>
+
+
+	<!-- ================================== 查询相关 ================================== -->
+	<!-- select id, channel_name, match_channel_name, create_time from tb_channel_config  -->
+	
+	<!-- 通用映射:手动模式 -->
+	<resultMap id="model" type="com.pj.project.tb_channel_config.TbChannelConfig">
+		<result property="id" column="id" />
+		<result property="channelName" column="channel_name" />
+		<result property="matchChannelName" column="match_channel_name" />
+		<result property="createTime" column="create_time" />
+	</resultMap>
+	
+	<!-- 公共查询sql片段 -->
+	<sql id="select_sql">
+		select * 
+		from tb_channel_config 
+	</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("channelName") '> and channel_name = #{channelName} </if>
+			<if test=' this.has("matchChannelName") '> and match_channel_name = #{matchChannelName} </if>
+			<if test=' this.has("createTime") '> and create_time = #{createTime} </if>
+		</where>
+		order by
+		<choose>
+			<when test='sortType == 1'> id desc </when>
+			<when test='sortType == 2'> channel_name desc </when>
+			<when test='sortType == 3'> match_channel_name desc </when>
+			<when test='sortType == 4'> create_time desc </when>
+			<otherwise> id desc </otherwise>
+		</choose>
+	</select>
+	
+	
+	
+	
+	
+	
+	
+	
+	
+
+</mapper>

+ 71 - 0
sp-server/src/main/java/com/pj/project/tb_channel_config/TbChannelConfigService.java

@@ -0,0 +1,71 @@
+package com.pj.project.tb_channel_config;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.pj.project.tb_charge_record.TbChargeRecord;
+import com.pj.project.tb_charge_record.TbChargeRecordMapper;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.pj.utils.sg.*;
+
+/**
+ * Service: tb_channel_config --
+ *
+ * @author qzy
+ */
+@Service
+public class TbChannelConfigService extends ServiceImpl<TbChannelConfigMapper, TbChannelConfig> implements IService<TbChannelConfig> {
+
+    /**
+     * 底层 Mapper 对象
+     */
+    @Autowired
+    TbChannelConfigMapper tbChannelConfigMapper;
+
+    /**
+     * 增
+     */
+    int add(TbChannelConfig t) {
+        return tbChannelConfigMapper.add(t);
+    }
+
+    /**
+     * 删
+     */
+    int delete(Long id) {
+        return tbChannelConfigMapper.delete(id);
+    }
+
+    /**
+     * 改
+     */
+    int update(TbChannelConfig t) {
+        return tbChannelConfigMapper.update(t);
+    }
+
+    /**
+     * 查
+     */
+    TbChannelConfig getById(Long id) {
+        return tbChannelConfigMapper.getById(id);
+    }
+
+    /**
+     * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+     */
+    List<TbChannelConfig> getList(SoMap so) {
+        return tbChannelConfigMapper.getList(so);
+    }
+
+    public TbChannelConfig findByName(String name) {
+        QueryWrapper<TbChannelConfig> ew = new QueryWrapper<>();
+        ew.lambda().eq(TbChannelConfig::getChannelName, name);
+        return getOne(ew);
+    }
+
+}

+ 22 - 6
sp-server/src/main/java/com/pj/project/tb_charge_record/TbChargeRecord.java

@@ -1,5 +1,6 @@
 package com.pj.project.tb_charge_record;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import lombok.AllArgsConstructor;
@@ -177,11 +178,21 @@ public class TbChargeRecord extends Model<TbChargeRecord> implements Serializabl
     /**
      * 类型 1=账户充值,2=账户退款,3=异常单退款
      */
-    private int type=1;
-
+    private int type = 1;
 
+    @TableField(exist = false)
+    private String entityTaxNo;
 
+    @TableField(exist = false)
+    private String payTypeDesc;
 
+    public String getPayTypeDesc() {
+        Integer payType = getPayingType();
+        if (payType != null) {
+            return PayingTypeEnum.getType(payType);
+        }
+        return payTypeDesc;
+    }
 
     @Getter
     @AllArgsConstructor
@@ -195,9 +206,9 @@ public class TbChargeRecord extends Model<TbChargeRecord> implements Serializabl
     @Getter
     @AllArgsConstructor
     public static enum TypeEunm {
-        ACCOUNT_CHARGE(1,"账户充值"),
-        ACCOUNT_REFUND(2,"账户退款"),
-        ORDER_REFUND(3,"异常单退款");
+        ACCOUNT_CHARGE(1, "账户充值"),
+        ACCOUNT_REFUND(2, "账户退款"),
+        ORDER_REFUND(3, "异常单退款");
         private int type;
         private String desc;
     }
@@ -207,7 +218,7 @@ public class TbChargeRecord extends Model<TbChargeRecord> implements Serializabl
      */
     @Getter
     @AllArgsConstructor
-    public enum PayingTypeEnum{
+    public enum PayingTypeEnum {
 
         BE_PUBLIC(1, "对公转账"),
         WE_CHAT(2, "微信支付"),
@@ -217,6 +228,11 @@ public class TbChargeRecord extends Model<TbChargeRecord> implements Serializabl
         private Integer code;
         private String desc;
 
+        public static String getType(int code) {
+            Optional<PayingTypeEnum> optionalPayingTypeEnum = Arrays.stream(PayingTypeEnum.values()).filter(payingTypeEnum -> payingTypeEnum.getCode() == code).findFirst();
+            return optionalPayingTypeEnum.isPresent() ? optionalPayingTypeEnum.get().getDesc() : "";
+        }
+
         public static List<Map<String, Object>> getList() {
             List<Map<String, Object>> list = new ArrayList<>();
             for (PayingTypeEnum tbItem : PayingTypeEnum.values()) {

+ 14 - 16
sp-server/src/main/java/com/pj/project/tb_charge_record/TbChargeRecordController.java

@@ -2,6 +2,8 @@ package com.pj.project.tb_charge_record;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import com.pj.current.satoken.StpUserUtil;
+import com.pj.project.tb_entity.TbEntity;
+import com.pj.project.tb_entity.TbEntityService;
 import com.pj.project4sp.SP;
 import com.pj.utils.AesUtil;
 import com.pj.utils.sg.AjaxError;
@@ -13,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.annotation.Resource;
 import java.util.List;
 import java.util.Map;
 
@@ -31,6 +34,8 @@ public class TbChargeRecordController {
      */
     @Autowired
     TbChargeRecordService tbChargeRecordService;
+    @Resource
+    private TbEntityService tbEntityService;
 
     /**
      * 增
@@ -102,29 +107,22 @@ public class TbChargeRecordController {
     }
 
 
-
-
     /**
      * 获取打印单据信息
+     *
      * @param id
      * @return
      */
     @RequestMapping("getPrintReceiptInfo")
     @SaCheckPermission(TbChargeRecord.PERMISSION_LIST_PRINT)
-    public  AjaxJson getPrintReceiptInfos(Long id) {
-
-        Map receipt = tbChargeRecordService.getPrintReceiptInfo(id);
-        receipt.put("preTopupMoney",AesUtil.decryptECB(AesUtil.toStr(receipt.get("preTopupMoney")),
-                AesUtil.reverse(AesUtil.toStr(receipt.get("salt")))));
-        receipt.put("totalTopupMoney",AesUtil.decryptECB(AesUtil.toStr(receipt.get("totalTopupMoney")),
-                AesUtil.reverse(AesUtil.toStr(receipt.get("salt")))));
-        receipt.put("discountMoney",AesUtil.decryptECB(AesUtil.toStr(receipt.get("discountMoney")),
-                AesUtil.reverse(AesUtil.toStr(receipt.get("salt")))));
-        receipt.put("totalMoney",AesUtil.decryptECB(AesUtil.toStr(receipt.get("totalMoney")),
-                AesUtil.reverse(AesUtil.toStr(receipt.get("accSalt")))));
-        receipt.put("LoginName",StpUserUtil.getLoginName());
-
-        return AjaxJson.getSuccessData(receipt);
+    public AjaxJson getPrintReceiptInfos(Long id) {
+        TbChargeRecord t = tbChargeRecordService.getById(id);
+        String customerName = t.getCustomerName();
+        TbEntity tbEntity = tbEntityService.findByName(customerName);
+        if (tbEntity!=null){
+            t.setEntityTaxNo(tbEntity.getTaxIdNo());
+        }
+        return AjaxJson.getSuccessData(t);
     }
 
 

+ 5 - 0
sp-server/src/main/java/com/pj/project/tb_deduction_record/TbDeductionRecord.java

@@ -215,6 +215,11 @@ public class TbDeductionRecord extends Model<TbDeductionRecord> implements Seria
      */
     @ExcelIgnore
     private String invoice;
+    /**
+     * 重量
+     */
+    @ExcelIgnore
+    private String weight;
 
 
     /**

+ 11 - 0
sp-server/src/main/java/com/pj/project/tb_deduction_record/TbDeductionRecordService.java

@@ -21,6 +21,7 @@ import com.pj.project.tb_account.TbAccount;
 import com.pj.project.tb_account.TbAccountService;
 import com.pj.project.tb_business.TbBusiness;
 import com.pj.project.tb_business.TbBusinessService;
+import com.pj.project.tb_business_car.TbBusinessCar;
 import com.pj.project.tb_business_car.TbBusinessCarService;
 import com.pj.project.tb_business_item.TbBusinessItem;
 import com.pj.project.tb_business_item.TbBusinessItemService;
@@ -82,6 +83,8 @@ public class TbDeductionRecordService extends ServiceImpl<TbDeductionRecordMappe
     private TbInvoiceOrderService tbInvoiceOrderService;
     @Resource
     private TbInvoiceInfoService tbInvoiceInfoService;
+    @Resource
+    private TbBusinessCarService tbBusinessCarService;
 
     /**
      * 增
@@ -161,6 +164,14 @@ public class TbDeductionRecordService extends ServiceImpl<TbDeductionRecordMappe
                 .setSetBy(StpUserUtil.getCreateBy())
                 .setSetTime(new Date());
         this.updateById(record);
+        if (SystemObject.config.getEveryCarPay().contains(record.getItemName())) {
+            String businessCarId = record.getBusinessCarId();
+            //如果这辆车绑定的装卸业务只有一个,则将其设置成未支付
+            TbBusinessCar tbBusinessCar = tbBusinessCarService.getById(businessCarId);
+            tbBusinessCar.setPayUnloadMoney(0).setPayTime(null);
+            tbBusinessCarService.updateById(tbBusinessCar);
+
+        }
     }
 
     public void refund(String id, BigDecimal refundMoney, String refundReason, int payingType) {

+ 1 - 1
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetails.java

@@ -170,7 +170,7 @@ public class TbFeeDetails implements Serializable {
     /**
      * 数量
      */
-    private Integer num = 0;
+    private String num;
 
     /**
      * 是否结算(0=未结算, 1=已结算)

+ 1 - 1
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsMapper.xml

@@ -64,7 +64,7 @@
     </sql>
 
     <!-- 查 - 根据id -->
-    <select id="getById" resultMap="model">
+    <select id="getById" resultType="com.pj.project.tb_fee_details.TbFeeDetails">
         <include refid="select_sql"></include>
         where id = #{id}
     </select>

+ 55 - 50
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsService.java

@@ -8,6 +8,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.stream.Collectors;
 
 import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.NumberUtil;
 import cn.hutool.core.util.RandomUtil;
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.excel.EasyExcel;
@@ -36,6 +37,8 @@ import com.pj.project.tb_business_car.TbBusinessCar;
 import com.pj.project.tb_business_car.TbBusinessCarService;
 import com.pj.project.tb_business_item.TbBusinessItem;
 import com.pj.project.tb_business_item.TbBusinessItemService;
+import com.pj.project.tb_car_weight.TbCarWeight;
+import com.pj.project.tb_car_weight.TbCarWeightService;
 import com.pj.project.tb_costomer.TbCostomer;
 import com.pj.project.tb_costomer.TbCostomerService;
 import com.pj.project.tb_deduction_bind.TbDeductionBindService;
@@ -115,6 +118,8 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
     private TbItemFacService tbItemFacService;
     @Resource
     private TbItemService tbItemService;
+    @Resource
+    private    TbCarWeightService tbCarWeightService;
 
     /**
      * 增
@@ -184,7 +189,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
         if (!cars.isEmpty()) {
             String uniqExpenseId = cars.get(0).getUniqExpenseId();
             TbItem tbItem = tbItemService.findByCode(uniqExpenseId);
-            BigDecimal taxRate = BigDecimal.valueOf(tbItem.getTaxRate()).divide(BigDecimal.valueOf(100), 2, BigDecimal.ROUND_UP);
+            BigDecimal taxRate = BigDecimal.valueOf(tbItem.getTaxRate()).divide(BigDecimal.valueOf(100), 2, BigDecimal.ROUND_HALF_UP);
             for (PriceBO bo1 : cars) {
                 //本次支付的停车费金额
                 BigDecimal payPrice = bo1.getP();
@@ -197,7 +202,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
                 TbFeeDetails in24Detail = new TbFeeDetails();
                 in24Detail.setItemName(bo1.getCarDesc());
                 //24小时内的停车费
-                in24Detail.setNum(1).setItemTypeName(PartFeeEnum.IN_24_HOURS.getDesc()).setCalculateId(bo1.getCalculateId())
+                in24Detail.setNum("1").setItemTypeName(PartFeeEnum.IN_24_HOURS.getDesc()).setCalculateId(bo1.getCalculateId()).setPayType(payType.getCode())
                         .setUnitPrice(in24Price).setItemPrice(in24Price).setModule(payType.getDesc()).setBusinessId(bo1.getBusinessId());
                 setFee(taxRate, in24Detail, car, transactionId, outTradeNo, now);
                 String type = StrUtil.isEmpty(in24Detail.getId()) ? SyncTypeEnum.INSERT.getCode() : SyncTypeEnum.UPDATE.getCode();
@@ -209,8 +214,9 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
                 if (out24Price.compareTo(BigDecimal.valueOf(0)) > 0) {
                     TbFeeDetails out24Details = new TbFeeDetails();
                     BigDecimal unitPrice = bo1.getExtraPrice();
-                    int num = out24Price.divide(unitPrice, BigDecimal.ROUND_UP, 0).intValue();
-                    out24Details.setNum(num).setItemTypeName(PartFeeEnum.OUT_24_HOURS.getDesc()).setItemName(bo1.getCarDesc())
+                    int num = out24Price.divide(unitPrice, BigDecimal.ROUND_HALF_UP, 0).intValue();
+                    out24Details.setNum(num + "").setItemTypeName(PartFeeEnum.OUT_24_HOURS.getDesc()).setItemName(bo1.getCarDesc())
+                            .setPayType(payType.getCode())
                             .setUnitPrice(unitPrice).setItemPrice(out24Price).setModule(payType.getDesc()).setBusinessId(bo1.getBusinessId());
                     setFee(taxRate, out24Details, car, transactionId, outTradeNo, now);
                     type = StrUtil.isEmpty(out24Details.getId()) ? SyncTypeEnum.INSERT.getCode() : SyncTypeEnum.UPDATE.getCode();
@@ -235,7 +241,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
                 .setCarNo(car.getCarNo())
                 .setNoTaxPrice(noTaxPrice).setTaxPrice(taxPrice)
                 .setFeeType(FeeTypeEnum.PARK_FEE.getCode()).setFeeTypeName(FeeTypeEnum.PARK_FEE.getDesc())
-                .setPayDay(toDay).setPayType(3).setCreateTime(now).setUpdateTime(now)
+                .setPayDay(toDay).setCreateTime(now).setUpdateTime(now)
                 .setIsSettle(1).setPayMode(1).setPayTime(nowStr)
                 .setTransactionId(transactionId).setOutTradeNo(outTradeNo)
                 .setBusinessCarNo(car.getNo());
@@ -278,7 +284,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
             if (StrUtil.isEmpty(carNo)) {
                 carNo = business.getChinaCarNo();
             }
-            int num = item.getTotal().divide(item.getItemPrice(), 1, BigDecimal.ROUND_UP).intValue();
+            Double num = item.getTotal().divide(item.getItemPrice(), 2, BigDecimal.ROUND_HALF_UP).doubleValue();
             TbGoods businessCfg = tbGoodsService.getById(business.getGoodsId());
             if ((GoodsEnum.LeaveEnum.APART_BUSINESS.getCode().equals(businessCfg.getChinaCarLeave()))
                     && GoodsEnum.LeaveEnum.PART_MONEY.getCode().equals(businessCfg.getVietnamCarLeave())) {
@@ -300,7 +306,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
                     .setBusinessItemNo(item.getNo()).setBusinessCarId(businessCarIds).setBusinessCarNo(businessCarNos)
                     .setCarNo(carNo).setCalculateId(item.getCalculateId())
                     .setItemPrice(item.getTotal()).setUnitPrice(item.getItemPrice()).setNoTaxPrice(noTaxPrice).setTaxPrice(taxPrice)
-                    .setFeeType(feeType).setNum(num)
+                    .setFeeType(feeType).setNum(num + "")
                     .setItemTypeId(item.getItemTypeId()).setItemTypeName(item.getItemTypeName())
                     .setItemId(item.getItemId()).setItemName(item.getItemName())
                     .setPayDay(toDay).setPayType(payType.getCode()).setCreateTime(now).setUpdateTime(now)
@@ -332,7 +338,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
         Double taxRate = item.getTaxRate();
         BigDecimal totalPrice = res.getTotalOrderPrice();
         BigDecimal itemPrice = item.getItemPrice();
-        int num = totalPrice.divide(itemPrice, 0, BigDecimal.ROUND_UP).intValue();
+        double num = totalPrice.divide(itemPrice, 2, BigDecimal.ROUND_HALF_UP).doubleValue();
         Date now = new Date();
         //添加此item的收费明细
         TbFeeDetails businessFeeDetail = new TbFeeDetails();
@@ -355,13 +361,51 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
                 .setPickCustomerName(pickCustomerName)//作业公司
                 .setCustomerName(customerName) //客户名称
                 .setIsSettle(1).setPayMode(1).setPayTime(DateUtil.now())
-                .setNum(num)
+                .setNum(num + "")
                 .setModule(PayEnum.PayType.PER_PAY.getDesc());
         this.save(businessFeeDetail);
         taskService.addTask(new FeeDetailSyncTask(RandomUtil.randomNumbers(10), 1000, businessFeeDetail.getId(), SyncTypeEnum.INSERT.getCode(), PayEnum.PayType.PER_PAY));
         return businessFeeDetail;
     }
 
+
+    public TbFeeDetails saveCarWeightDetails(String transactionId,BigDecimal totalPrice,String calculateId,String businessNo,
+                                             TbBusinessCar tbBusinessCar, String customerName, String pickCustomerName,
+                                             TbItem item,PayEnum.PayType payType) {
+        Integer feeType = FeeTypeEnum.WEIGHT_FEE.getCode();
+        double taxRate = BigDecimal.valueOf(item.getTaxRate()).divide(BigDecimal.valueOf(100), 2, BigDecimal.ROUND_HALF_UP).doubleValue();
+        BigDecimal itemPrice = item.getPrice();
+        double num = totalPrice.divide(itemPrice, 2, BigDecimal.ROUND_HALF_UP).doubleValue();
+        Date now = new Date();
+        //添加此item的收费明细
+        TbFeeDetails businessFeeDetail = new TbFeeDetails();
+        businessFeeDetail.setTaxRate(BigDecimal.valueOf(taxRate));
+        BigDecimal taxPrice = totalPrice
+                .divide(BigDecimal.valueOf(1).add(businessFeeDetail.getTaxRate()), 2, BigDecimal.ROUND_HALF_UP)
+                .multiply(businessFeeDetail.getTaxRate());
+        taxPrice = taxPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
+        BigDecimal noTaxPrice = totalPrice.subtract(taxPrice);
+        noTaxPrice = noTaxPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
+//        TbCarWeight tbCarWeight=tbCarWeightService.findByBusinessCarId(tbBusinessCar.getId());
+        businessFeeDetail.setBusinessNo(businessNo).setTransactionId(transactionId)
+                .setBusinessCarId(tbBusinessCar.getId()).setBusinessCarNo(tbBusinessCar.getNo())
+                .setCarNo(tbBusinessCar.getCarNo()).setCalculateId(calculateId)
+                .setItemPrice(totalPrice).setUnitPrice(itemPrice).setNoTaxPrice(noTaxPrice).setTaxPrice(taxPrice)
+                .setFeeType(feeType)
+                .setItemTypeId(item.getTypeId()).setItemTypeName(item.getTypeName())
+                .setItemId(item.getId()).setItemName(item.getItemName())
+                .setPayDay(DateUtil.today()).setPayType(payType.getCode()).setCreateTime(now).setUpdateTime(now)
+                .setBusinessItemId(item.getId() + "").setWeight(tbBusinessCar.getNetWeight())
+                .setPickCustomerName(pickCustomerName)//作业公司
+                .setCustomerName(customerName) //客户名称
+                .setIsSettle(1).setPayMode(1).setPayTime(DateUtil.now())
+                .setNum(num + "")
+                .setModule(payType.getDesc());
+        this.save(businessFeeDetail);
+       // taskService.addTask(new FeeDetailSyncTask(RandomUtil.randomNumbers(10), 1000, businessFeeDetail.getId(), SyncTypeEnum.INSERT.getCode(), PayEnum.PayType.PER_PAY));
+        return businessFeeDetail;
+    }
+
     public List<TbFeeDetails> savePrePayDetails(IOrderPriceRes res, List<TbBusinessItem> itemList, TbBusinessCar tbBusinessCar, TbBusiness business, String customerName, String pickCustomerName, FeeTypeEnum feeTypeEnum) {
         List<TbFeeDetails> feeDetailsList = new ArrayList<>();
         for (TbBusinessItem item : itemList) {
@@ -400,10 +444,10 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
         }
         int index = 1;
         for (TbFeeDetails feeDetails : list) {
-            TbFeeItem tbFeeItem = tbFeeItemService.getById(feeDetails.getFeeType());
+//            TbFeeItem tbFeeItem = tbFeeItemService.getById(feeDetails.getFeeType());
             ExportFeeDetailDTO detailDTO = new ExportFeeDetailDTO();
             detailDTO.setBusinessNo(feeDetails.getBusinessNo()).setCarNo(feeDetails.getCarNo())
-                    .setFeeType(tbFeeItem.getName()).setItemTypeName(feeDetails.getItemTypeName())
+                    .setFeeType(FeeTypeEnum.getDesc(feeDetails.getFeeType())).setItemTypeName(feeDetails.getItemTypeName())
                     .setItemName(feeDetails.getItemName()).setItemPrice(feeDetails.getItemPrice())
                     .setPayType(PayEnum.PayType.getDescByCode(feeDetails.getPayType())).setIndex(index++)
                     .setPayMode(PayEnum.PayType.CASH_PAY.getDesc())
@@ -711,43 +755,4 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
     }
 
 
-    public void chargeManagerFee(ManagerBO managerBO, String businessId, String transactionId, String outTradeNo, Date payTime, PayEnum.PayType wxPay) {
-        String nowStr = DateUtil.format(payTime, "yyyy-MM-dd HH:mm:ss");
-        String toDay = DateUtil.format(payTime, "yyyy-MM-dd");
-        Date now = new Date();
-        TbBusinessItem item = tbBusinessItemService.getById(managerBO.getId());
-        Integer feeType = item.getPayType();
-        Double taxRate = item.getTaxRate();
-        //添加此item的收费明细
-        TbBusiness business = tbBusinessService.getById(businessId);
-        TbFeeDetails businessFeeDetail = new TbFeeDetails();
-        businessFeeDetail.setTaxRate(BigDecimal.valueOf(taxRate));
-        BigDecimal taxPrice = item.getTotal()
-                .divide(BigDecimal.valueOf(1).add(businessFeeDetail.getTaxRate()), 2, BigDecimal.ROUND_HALF_UP)
-                .multiply(businessFeeDetail.getTaxRate());
-        taxPrice = taxPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
-        BigDecimal noTaxPrice = item.getTotal().subtract(taxPrice);
-        noTaxPrice = noTaxPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
-        String carNo = managerBO.getCarNo();
-        businessFeeDetail.setBusinessId(item.getBusinessId()).setBusinessNo(business.getNo())
-                .setBusinessItemNo(item.getNo())
-                .setBusinessCarId(managerBO.getCarId())
-                .setBusinessCarNo(carNo)
-                .setCarNo(carNo).setCalculateId(item.getCalculateId())
-                .setItemPrice(item.getTotal()).setUnitPrice(item.getItemPrice()).setNoTaxPrice(noTaxPrice).setTaxPrice(taxPrice)
-                .setFeeType(feeType)
-                .setItemTypeId(item.getItemTypeId()).setItemTypeName(item.getItemTypeName())
-                .setItemId(item.getItemId()).setItemName(item.getItemName())
-                .setPayDay(toDay).setPayType(wxPay.getCode()).setCreateTime(now).setUpdateTime(now)
-                .setBusinessItemId(item.getId() + "")
-                .setPickCustomerName(item.getPickCustomerName())
-                .setCustomerName(business.getCustomerName())
-                .setIsSettle(1).setPayMode(1).setPayTime(nowStr)
-                .setTransactionId(transactionId).setOutTradeNo(outTradeNo)
-                .setNum(Integer.valueOf(item.getNum()))
-                .setModule(wxPay.getDesc());
-        String type = StrUtil.isEmpty(businessFeeDetail.getId()) ? SyncTypeEnum.INSERT.getCode() : SyncTypeEnum.UPDATE.getCode();
-        saveOrUpdate(businessFeeDetail);
-        taskService.addTask(new FeeDetailSyncTask(RandomUtil.randomNumbers(10), 1000, businessFeeDetail.getId(), type, wxPay));
-    }
 }

+ 1 - 1
sp-server/src/main/java/com/pj/project/tb_fee_details/dto/ExportFeeDetailDTO.java

@@ -22,7 +22,7 @@ public class ExportFeeDetailDTO {
     private String itemTypeName;
     private String itemName;
     private String weight;
-    private Integer num;
+    private String num;
     private BigDecimal unitPrice;
     private BigDecimal itemPrice;
     private String settle;

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

@@ -88,7 +88,7 @@ public class TbFeeStatistics implements Serializable {
     /**
      * 数量
      */
-    private Integer num = 0;
+    private String num="0";
 
     /**
      * 含税收入

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

@@ -257,14 +257,14 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
             BigDecimal totalPrice = new BigDecimal(0);
             BigDecimal totalTaxes = new BigDecimal(0);
             BigDecimal totalNoTaxPrice = new BigDecimal(0);
-            Integer num = 0;
+            double num = 0;
             for (TbFeeDetails detail : detailsList) {
                 totalPrice = totalPrice.add(detail.getItemPrice());
                 totalTaxes = totalTaxes.add(detail.getTaxPrice());
                 totalNoTaxPrice = totalNoTaxPrice.add(detail.getNoTaxPrice());
-                num = num + detail.getNum();
+                num = num + Double.valueOf(detail.getNum());
             }
-            statistic.setTaxMoney(totalPrice).setTaxes(totalTaxes).setNoTaxMoney(totalNoTaxPrice).setNum(num);
+            statistic.setTaxMoney(totalPrice).setTaxes(totalTaxes).setNoTaxMoney(totalNoTaxPrice).setNum(num+"");
         }
         this.updateBatchById(list);
     }
@@ -343,17 +343,17 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
                             }
                             dayStatsDTO.setYuePrice(prePay);
                         }
-                        int num = 0;
+                        double num = 0;
                         BigDecimal noTaxMoney = BigDecimal.ZERO;
                         BigDecimal taxMoney = BigDecimal.ZERO;
                         BigDecimal tax = BigDecimal.ZERO;
                         for (TbFeeStatistics stats : feeTypeList) {
-                            num = num + stats.getNum();
+                            num = num + Double.valueOf(stats.getNum());
                             tax=tax.add(stats.getTaxes());
                             noTaxMoney = noTaxMoney.add(stats.getNoTaxMoney());
                             taxMoney = taxMoney.add(stats.getTaxMoney());
                         }
-                        dayStatsDTO.setTaxRate(feeTypeList.get(0).getTaxRate()).setNum(num).setNoTaxMoney(noTaxMoney).setTaxMoney(taxMoney).setTaxes(tax);
+                        dayStatsDTO.setTaxRate(feeTypeList.get(0).getTaxRate()).setNum(num+"").setNoTaxMoney(noTaxMoney).setTaxMoney(taxMoney).setTaxes(tax);
                         printList.add(dayStatsDTO);
                     });
         });
@@ -440,17 +440,17 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
                             }
                             dayStatsDTO.setYuePrice(prePay);
                         }
-                        int num = 0;
+                        double num = 0d;
                         BigDecimal noTaxMoney = BigDecimal.ZERO;
                         BigDecimal taxMoney = BigDecimal.ZERO;
                         BigDecimal tax = BigDecimal.ZERO;
                         for (TbFeeStatistics stats : feeTypeList) {
-                            num = num + stats.getNum();
+                            num = num + Double.valueOf(stats.getNum());
                             tax=tax.add(stats.getTaxes());
                             noTaxMoney = noTaxMoney.add(stats.getNoTaxMoney());
                             taxMoney = taxMoney.add(stats.getTaxMoney());
                         }
-                        dayStatsDTO.setTaxRate(feeTypeList.get(0).getTaxRate()).setNum(num).setNoTaxMoney(noTaxMoney).setTaxMoney(taxMoney).setTaxes(tax);
+                        dayStatsDTO.setTaxRate(feeTypeList.get(0).getTaxRate()).setNum(num+"").setNoTaxMoney(noTaxMoney).setTaxMoney(taxMoney).setTaxes(tax);
                         exportList.add(dayStatsDTO);
                     });
         });

+ 1 - 1
sp-server/src/main/java/com/pj/project/tb_fee_statistics/dto/ExportDayStatsDTO.java

@@ -32,7 +32,7 @@ public class ExportDayStatsDTO {
     /**
      * 数量
      */
-    private Integer num = 0;
+    private String num = "0";
 
     /**
      * 含税收入

+ 7 - 7
sp-server/src/main/resources/application-dev.yml

@@ -62,6 +62,7 @@ spring:
         heavy-condole-item-alias: heavyCondole    #集装箱吊装 (空 柜 )
         big-head-car: bigHeadCar #大头车 --->按天收费
         cabinet-car: cabinetCar #柜车、栏车
+        weigh-bridge: weighbridge #地磅
 part-config:
     base-price: 30 #基础费用
     extra-price: 10 #过夜额外收费
@@ -110,17 +111,16 @@ ocr-config:
 pushfee-config:
     enable: true
     remote-public-key-base6: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCb5yK85EKqwiQU+z1jyjOng6ecssQpEjC6STbCuSWN6KHLkijBxdqrCumXhbIyOVx4lHK9Rg5EjzlQxoaXQTgJdItaGjLC+UTE+NNAnnaFLg0x4jajNpLo473zdZxTYQaT3q/aKnTeXuKHw11PPUe4hmmfxPcdt9yJ0Iqo/XxV3QIDAQAB
-    sync-url: http://117.141.148.233:3101/gateway/
+    sync-url: https://charge.gxbtka.com/gateway
     sys-id: "0110"
-    sys-name: 东兴口岸场站系统
+    sys-name: "东兴口岸(二桥)进口货物集散区 (A1地块)"
     yield-id: 0001-a1
     yield-name: 东兴口岸场站系统-A1园区
-    start-time: 2022-08-10 00:00:00
-    #默认时间间隔为一小时
+    start-time: 2022-08-10 00:00:00  #默认时间间隔为一小时
     time-span: 3600000
-    client-public-key-base6: "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCimSu5J8apt2YR/o9joOCNdFzO3rOHcdcqnSCm1Wt19VwskTVjkKHc/CXHUoskX5vMiMiv6xPnf/lDpMO6KnCrwlVQFtbPvmnkwyUs/haW8ggR865MqDcBpdMGnuV0YJ04UXxSrOX+eu+dl91Web4/ZiRKbObOa8WhFm/Ln2QKswIDAQAB"
-    client-private-key-base6: "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKKZK7knxqm3ZhH+j2Og4I10XM7es4dx1yqdIKbVa3X1XCyRNWOQodz8JcdSiyRfm8yIyK/rE+d/+UOkw7oqcKvCVVAW1s++aeTDJSz+FpbyCBHzrkyoNwGl0wae5XRgnThRfFKs5f56752X3VZ5vj9mJEps5s5rxaEWb8ufZAqzAgMBAAECgYAmP/QaLXI9kIgxaXnfzQOmIx6GB7uh/DTKsIXy2TfbWunhDhPKJUb+jk5w0kkrOFaVSgQz5hAboG5J7GOi0sMINLb7H2WsOm3uGM/8HPZYsrNFnB8VUiD26LIZ6+HhPXfp/LN+k5eUnUlD6z/dZU1k6hJPOSFC3PyzfBWqaQMqGQJBAMVdQ9Uw+eC94qD1MSSEQZhqpfGE4vO7WrSACLFqyZrHvaIwZTjdUZRF1aMlJyT0afOkfSN/53QQEcejXMUrSBcCQQDS576SXkpdfrN2jmr9BAimi+6AP71GUgXL3O+2yRL2szLoU7GwtMREPBFw+ocnC4UN87NCYveJCzenQEt48JfFAkAqEIa0mYuoatAyng+rSMTyR0i3ASud5wCeF+vCZJAzfP7d4pKwW/tXLsspynFdXvp2A0jomAosooAnnJnZLDBhAkBzXoXm92Fip45wShPIeE5rHJzI1xUoxHGbRS50JKYVAY3VfQL0kM3ULa+0x7bq6uhL64WhyRVziAlXmlouvB2pAkEAuDvsjVhdo3uMGL7Tr+igPhajoWUTjPuAf+Od3SsqMTPFLBpbJM8ziXk39Me9S8wqgGwR3pnlC1Z6Rybgm+uy4g=="
-    server-public-key-base6: "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCb5yK85EKqwiQU+z1jyjOng6ecssQpEjC6STbCuSWN6KHLkijBxdqrCumXhbIyOVx4lHK9Rg5EjzlQxoaXQTgJdItaGjLC+UTE+NNAnnaFLg0x4jajNpLo473zdZxTYQaT3q/aKnTeXuKHw11PPUe4hmmfxPcdt9yJ0Iqo/XxV3QIDAQAB"
+    client-public-key-base6: "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7f7ySq8nAxHMiWtzOCCMqU5A32zApObtLUKiInIZAyi9gfPpwNiy038yd3Na/erGF/rV97RD5ReqHVAaqSl26A9RIlA+TeZdLYcybtLAIPd/iIwr7QS+qFB/2ierJzVWgVyLNHfrAKmU7B1TF8sxZlhpiEpCopehd381fvgXTkwIDAQAB"
+    client-private-key-base6: "MIICeQIBADANBgkqhkiG9w0BAQEFAASCAmMwggJfAgEAAoGBALt/vJKrycDEcyJa3M4IIypTkDfbMCk5u0tQqIichkDKL2B8+nA2LLTfzJ3c1r96sYX+tX3tEPlF6odUBqpKXboD1EiUD5N5l0thzJu0sAg93+IjCvtBL6oUH/aJ6snNVaBXIs0d+sAqZTsHVMXyzFmWGmISkKil6F3fzV++BdOTAgMBAAECgYEAuQET9wDMRIlSNU7EWgLLd+MWBRcgUT0moezHLmyLR3h4ANOwZHH/8MR2aDlUJ4EPkvA88jCtM9iZzcfJ/9L64HDmIff83mpdgSquJvAeGLF+FlSBv4bpFVgwqpI4HmFkHJm7Sbbt1VNQkvwIWBJQLrmcX3PFxQcoWi7aNQUv88ECQQD6Lv3f8Fc1hQG95hL+Y08fsEMsELnEdUG1iXmTz2qBCuHBWuYNi2hcstJbW1LQ2zqgGygA3gZkKx3IsJ+9LZPhAkEAv9uq1xdgHtOl/OoSIJA8AOpAHrBJylHKKw8ow8Feefy5I2fe4mMf+p1Vq7hBNnCbrYiVVxaAPRH8C2R8MsEV8wJBAORslVWqviVabG2zLHJhv/OB3sLT/pj2KmmSvJONVIO/qMH+uX9yYnYIu3G4HxQcphla0hqAnTtF9qqvQRncDGECQQCgFU8QF54JOroGNNyZNSAL92k28gsv+FzC3uw5ojANgxSLeVDc/q6hMwRXuu8W2JDdE9jgCJNJ4aa3bsm+o6OHAkEAhYs00qflVJUjN0+tnpaIUipwpMnTlC4iD9sN7MTGdWrbASQe7StlKVkDT2pvfKBw5p+jFXwVYasm6GI4609K7A=="
+    server-public-key-base6: "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCuSXMent4dXl9SE9hSUsxWre303rkguPJz+k9CqM0J6fUzYnrAfRES+Mu6xmrbpGnGe+v9ZxBH4jxGakyKLTdmuiaZC3kRDgjsPOwTtSAoAOQhj0Hw2X3obrxeqpJYwg3DQS1JWZzv7+QdVPxBkj+PAJtc1bacD1H4Kg9OyeD9XwIDAQAB"
     server-private-key-base64: "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJvnIrzkQqrCJBT7PWPKM6eDp5yyxCkSMLpJNsK5JY3oocuSKMHF2qsK6ZeFsjI5XHiUcr1GDkSPOVDGhpdBOAl0i1oaMsL5RMT400CedoUuDTHiNqM2kujjvfN1nFNhBpPer9oqdN5e4ofDXU89R7iGaZ/E9x233InQiqj9fFXdAgMBAAECgYASoeKgcaVYFCDM0yQIn5thy1XGYAUapX5mXSaqygbneWSQ2FR/qB5Ur9awEb30y682CAPYhB1jazyd30QpopVINvyhaWhgq1b/8KD92FqOg1eXxa7bTuTe8aMuKTB/ZJjEry0d5Mu3i6zYKtTSbnpnag5I3UE5awLDy7utYOoOHwJBAPtvz2ZBhtJvL3lsMgs7kGqrPqqI2LAX8J3oOCtE/6eQjQ0I5fBCybrwHp3baDrYul5KTL3kJvl4iWN/gHDi/nMCQQCeu3gzy0DVtM8M8bzFc/ZA753WRn4Z5axQa6lE7Tski8TUw4Bhbfan9E/C6l6Guo/+2hXPAE/RMcncClqeXXZvAkEAgf6FsO1x4fxABDvvB6Ws/ak5hfuoZCqMaWd1GtHah2yRsEqIbxZoq7CXc6/LDJmeiT9Ku+ZoTBSIm5uA8Vw6hwJALEbs872pmzMxYlH4Lzf2pAxzAbduK3kmhNRTRjfKfJpEUHksUYEkAZujuCI6NejKi/N3i+NxYFA8F5YHyw8VHwJAWoiYSYLSziHgDytoPKFvUp6EKLGDClhACJKc4LuaPNWICMxb5Dp88sY0NDYb4HzCyWIE5G4vbiF/K3kEEwCIVA=="
 
 oa: