Browse Source

补交费+预扣款

qzyReal 2 years ago
parent
commit
beea29613b
39 changed files with 532 additions and 402 deletions
  1. 2 2
      app-ui/utils/request.js
  2. 6 0
      sp-admin/sa-frame/menu-list-sp.js
  3. 154 0
      sp-admin/sa-view/tb-business/tb-business-item-supplement.html
  4. 55 34
      sp-admin/sa-view/tb-business/tb-car-disincle-info.html
  5. 1 1
      sp-admin/sa-view/tb-business/tb-car-disincle-list.html
  6. 6 1
      sp-admin/sa-view/tb-deduction-record/tb-deduction-record-list.html
  7. 0 3
      sp-admin/sa-view/tb-fee-statistics/detailPrint.html
  8. 0 2
      sp-server/src/main/java/com/pj/api/invoice/CallDomo.java
  9. 1 3
      sp-server/src/main/java/com/pj/api/invoice/bo/testbb.java
  10. 0 1
      sp-server/src/main/java/com/pj/api/invoice/demo.java
  11. 0 1
      sp-server/src/main/java/com/pj/api/invoice/utils/InvoiceUtils.java
  12. 1 14
      sp-server/src/main/java/com/pj/api/jh/bo/JhNotifyBO.java
  13. 24 0
      sp-server/src/main/java/com/pj/api/jh/bo/JhNotifySignBO.java
  14. 14 10
      sp-server/src/main/java/com/pj/api/jh/service/JhService.java
  15. 0 53
      sp-server/src/main/java/com/pj/api/jh/service/TestTask.java
  16. 1 1
      sp-server/src/main/java/com/pj/api/jh/utils/MerchantApiUtil.java
  17. 31 25
      sp-server/src/main/java/com/pj/api/open/service/OpenService.java
  18. 4 2
      sp-server/src/main/java/com/pj/api/wx/service/WxService.java
  19. 0 2
      sp-server/src/main/java/com/pj/current/mybatis/MybatisMapperDynamicLoader.java
  20. 0 3
      sp-server/src/main/java/com/pj/current/mybatis/MybatisStdOutImpl.java
  21. 0 1
      sp-server/src/main/java/com/pj/current/satoken/SaTokenConfigure.java
  22. 100 4
      sp-server/src/main/java/com/pj/project/tb_account/AutomaticPay.java
  23. 4 0
      sp-server/src/main/java/com/pj/project/tb_business/TbBusiness.java
  24. 14 5
      sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java
  25. 4 0
      sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCar.java
  26. 1 0
      sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItem.java
  27. 24 0
      sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItemController.java
  28. 1 21
      sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItemMapper.java
  29. 0 27
      sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItemMapper.xml
  30. 68 22
      sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItemService.java
  31. 0 1
      sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsController.java
  32. 3 2
      sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsService.java
  33. 5 80
      sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsService.java
  34. 5 0
      sp-server/src/main/java/com/pj/project/tb_item/TbItemController.java
  35. 0 1
      sp-server/src/main/java/com/pj/project/tb_item/TbItemMapper.xml
  36. 2 0
      sp-server/src/main/java/com/pj/project/tb_item/TbItemService.java
  37. 0 1
      sp-server/src/main/java/com/pj/utils/Ttime.java
  38. 1 1
      sp-server/src/main/resources/application-dev.yml
  39. 0 78
      sp-server/src/main/resources/application-pro.yml

+ 2 - 2
app-ui/utils/request.js

@@ -1,5 +1,5 @@
-// const server = 'http://127.0.0.1:8099/pro';
-const server = 'https://pco.aseanbusiness.cn/pro';
+const server = 'http://127.0.0.1:8099/pro';
+// const server = 'https://pco.aseanbusiness.cn/pro';
 
 
 // const server = 'https://dxkaa1.gxbtka.com/pro';

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

@@ -415,6 +415,12 @@ window.menuList.unshift({
 						name: '装卸打印',
 						isShow: false
 					},
+					
+					{
+						id: 'tb-business-item-supplement',
+						name: '补录缴费',
+						isShow: false
+					},
 				]
 			},
 			{

+ 154 - 0
sp-admin/sa-view/tb-business/tb-business-item-supplement.html

@@ -0,0 +1,154 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<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: 8em !important;
+			}
+
+			.c-panel .el-form .el-input,
+			.c-panel .el-form .el-textarea__inner {
+				width: 250px;
+			}
+
+			.item-num .el-input__inner {
+				width: 130px;
+				display: inline;
+			}
+		</style>
+	</head>
+	<body>
+		<div class="vue-box sbot"  style="display: none;" :style="'display: block;'">
+			<!-- ------- 内容部分 ------- -->
+			<div class="s-body">
+				<div class="c-panel">
+					<el-form>
+						<div style="margin-top: 20px;">
+							<div>
+								<div class="c-item">
+									<label class="c-label"><span style="color: red;">*</span>收费项:</label>
+									<el-select v-model="m.itemTypeId" placeholder="请选择" filterable @change="itemTypeChange">
+										<el-option :label="type.name" :value="type.id"
+											v-for="(type,index) in businessTypeList">
+										</el-option>
+									</el-select>
+									<div>
+										<label class="c-label"><span style="color: red;">*</span>收费明细:</label>
+										<el-select v-model="m.itemId" placeholder="请选择">
+											<el-option :label="detail.itemName+'('+detail.price+'/'+detail.unit+')'" :value="detail.id"
+												v-for="(detail,i) in items">
+											</el-option>
+										</el-select>
+									</div>
+									<label class="c-label" style="width: 160px;">数量:</label>
+									<el-input-number v-model="m.num" class="item-num " v-model="item.num" :step="1"
+										:min="1" :max="999">
+									</el-input-number>
+								</div>
+								<div class="c-item" v-if="totalMoney>0">
+									<label class="c-label"><span style="color: red;font-weight: 500;">总金额:¥{{totalMoney}}</span></label>
+								</div>
+							</div>
+						</div>
+					</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: {
+					m: {
+						itemTypeId: '', // 名称
+						itemId: '',
+						businessId:sa.p('id', 0),
+						num: 1,
+					}, // 实体对象
+					list: [],
+					businessTypeList :[],
+					items: [],
+				},
+				computed:{
+				 totalMoney(){
+					 let itemId=this.m.itemId;
+					 if(itemId){
+						 let items=this.items;
+						let item= items.filter(item=>item.id==itemId)[0];
+						return item.price*this.m.num;
+					 }
+					 return 0;
+				 }	
+				},
+				methods: {
+					getBusinessType() {
+						sa.ajax('/TbItemType/getList', {
+							sortType: 0,
+							pageSize: 50
+						}, function(resp) {
+							let list = resp.data;
+							this.businessTypeList = list;
+						}.bind(this))
+					},
+					itemTypeChange(itemTypeId) {
+						sa.ajax('/TbItem/getByItemTypeId', {
+							itemTypeId: itemTypeId
+						}, function(resp) {
+							let list = resp.data;
+							if (list.length > 0) {
+								this.m.itemId = list[0].id;
+							}
+							this.items = list;
+						}.bind(this))
+					},
+					// 提交数据
+					ok: function() {
+						// 表单校验
+						let m = this.m;
+						if(!m.itemTypeId){
+							sa.error('请选择收费项')
+							return;
+						}
+						if(!m.itemId){
+							sa.error('请选择收费明细')
+							return;
+						}
+						sa.confirm('是否确认添加该缴费补录?', function () {
+						   sa.ajax('/TbBusinessItem/add', m, function(res) {
+						   	sa.alert('增加成功', this.clean);
+						   }.bind(this));
+						}.bind(this));
+						
+					},
+					// 添加/修改 完成后的动作
+					clean: function() {
+						parent.app.getInfo(); // 刷新父页面列表
+						sa.closeCurrIframe();
+					}
+				},
+				mounted: function() {
+					this.getBusinessType();
+				}
+			})
+		</script>
+	</body>
+</html>

+ 55 - 34
sp-admin/sa-view/tb-business/tb-car-disincle-info.html

@@ -59,8 +59,8 @@
 												<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="支付状态" :value="m.payStatus"
-													:jv="{1: '未支付', 2: '已支付未确认', 3: '已支付'}" br>
+												<sa-info style="margin-top: 0;" type="enum" name="支付状态"
+													:value="m.payStatus" :jv="{1: '未支付', 2: '已支付未确认', 3: '已支付'}" br>
 												</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>
@@ -105,36 +105,48 @@
 							</el-collapse>
 						</el-row>
 						<el-row>
-							<el-collapse value='1'>
-								<el-collapse-item name="1">
-									<div slot="title">
-										具体业务项
-										<label
-											style="color: red; font-weight: bold;margin-left: 20px;">合计:({{m.itemPrice}}元)</label>
-									</div>
-									<el-table :data="tableData" style="width: 100%">
-										<el-table-column prop="itemTypeName" label="收费项" width="180">
-										</el-table-column>
-										<el-table-column prop="itemName" label="收费明细" width="180">
-										</el-table-column>
-										<el-table-column prop="itemPrice" label="单价">
-										</el-table-column>
-										<el-table-column prop="unit" label="计费标准">
-										</el-table-column>
-										<el-table-column prop="num" label="数量">
-										</el-table-column>
-										<el-table-column prop="total" label="合计">
-										</el-table-column>
-										<sa-td width="120" name="支付状态" prop="payStatus" type="enum"
-											:jv="{0: '未支付[#ff0000]', 1: '已支付[#005500]'}">
-										</sa-td>
-										<el-table-column prop="payTime" label="支付时间" width="150">
-										</el-table-column>
-										<el-table-column prop="remark" label="备注" width="150">
-										</el-table-column>
-									</el-table>
-								</el-collapse-item>
-							</el-collapse>
+							<div style="display: flex;margin-top: 10px;">
+								<div>
+									具体业务项
+									<label
+										style="color: red; font-weight: bold;margin-left: 20px;">合计:({{m.itemPrice}}元)
+									</label>
+								</div>
+								<div>
+									<el-button v-if="sa.isAuth('tb-business-item-supplement')" type="primary"
+										style="position: absolute;right: 40px;" @click="supplementFn">补交费
+									</el-button>
+								</div>
+							</div>
+							<el-table :data="tableData" style="width: 100%;margin-top: 20px;">
+								<el-table-column prop="itemTypeName" label="收费项" width="180">
+								</el-table-column>
+								<el-table-column prop="itemName" label="收费明细" width="180">
+								</el-table-column>
+								<el-table-column prop="itemPrice" label="单价">
+								</el-table-column>
+								<el-table-column prop="unit" label="计费标准">
+								</el-table-column>
+								<el-table-column prop="num" label="数量">
+								</el-table-column>
+								<el-table-column prop="total" label="合计">
+								</el-table-column>
+								<sa-td width="120" name="支付状态" prop="payStatus" type="enum"
+									:jv="{0: '未支付[#ff0000]', 1: '已支付[#005500]'}">
+								</sa-td>
+								<el-table-column prop="payTime" label="支付时间" width="150">
+								</el-table-column>
+								<el-table-column prop="remark" label="备注" width="150">
+								</el-table-column>
+								<el-table-column label="操作" width="100px" fixed="right">
+									<template slot-scope="s">
+										<el-button class="c-btn" type="danger"
+											v-if="sa.isAuth('tb-business-item-supplement')&&s.row.payStatus==0"
+											@click="del(s.row)">删除
+										</el-button>
+									</template>
+								</el-table-column>
+							</el-table>
 						</el-row>
 					</el-form>
 				</div>
@@ -186,8 +198,17 @@
 							form: data
 						})
 					},
-					ok() {
-
+					del(data) {
+						sa.confirm('是否确认删除该收费项?', function() {
+							sa.ajax('/TbBusinessItem/del', {
+								id: data.id
+							}, function(res) {
+								sa.alert('已删除', this.getInfo());
+							}.bind(this));
+						}.bind(this));
+					},
+					supplementFn() {
+						sa.showIframe('补交费', 'tb-business-item-supplement.html?id=' + this.m.id, '600px', '70%');
 					},
 					getInfo() {
 						sa.ajax('/TbBusiness/getOtherBusinessById?id=' + this.id, function(res) {

+ 1 - 1
sp-admin/sa-view/tb-business/tb-car-disincle-list.html

@@ -249,7 +249,7 @@
 					// 查看
 					get: function(data) {
 						this.stopTimmer();
-						sa.showIframe('数据详情', 'tb-car-disincle-info.html?id=' + data.id, '1050px', '90%');
+						sa.showIframe('数据详情', 'tb-car-disincle-info.html?id=' + data.id, '1150px', '90%');
 					},
 					add: function(data) {
 						this.stopTimmer();

+ 6 - 1
sp-admin/sa-view/tb-deduction-record/tb-deduction-record-list.html

@@ -75,7 +75,12 @@
 					<sa-td type="index" name="序号"></sa-td>
 					<sa-td name="客户名称" prop="customerName" width="150"></sa-td>
 					<sa-td name="合作伙伴" prop="pickCustomerName" width="150"></sa-td>
-					<sa-td name="业务单号" prop="businessNo" width="150"></sa-td>
+					<el-table-column label="业务单号" width="140px">
+						<template slot-scope="s">
+							<span v-if="s.row.businessNo != null && s.row.businessNo != ''">{{s.row.businessNo}}</span>
+							<span v-else>{{s.row.businessCarNo}}</span>
+						</template>
+					</el-table-column>
 					<sa-td name="车牌号" prop="carNo" width="100"></sa-td>
 					<sa-td name="收费项目" prop="feeType" type="enum"
 						   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车业务', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>

+ 0 - 3
sp-admin/sa-view/tb-fee-statistics/detailPrint.html

@@ -108,9 +108,6 @@
         feeType = feeType != '' ? feeType : null;
         var itemTypeName = getUrlParam('itemTypeName');
         itemTypeName = itemTypeName != '' ? itemTypeName : null;
-
-        console.log("beginTime" + beginTime);
-        console.log(endTime);
         $.ajax({
             url: sa.cfg.api_url + '/TbFeeDetails/prePrint',
             data: {

+ 0 - 2
sp-server/src/main/java/com/pj/api/invoice/CallDomo.java

@@ -62,7 +62,6 @@ public class CallDomo {
                 " \"funName\":\"ERPAYSAV\"" +
                 " }" +
                 "}";
-        System.out.println(httppost(url, JSONObject.parseObject(paramStr)));
     }
 
     public static JSONObject httppost(String urlString, JSONObject obj) throws Exception {
@@ -108,7 +107,6 @@ public class CallDomo {
                     reader.close();
                 }
             } catch (IOException ex) {
-                System.out.println("调用in.close Exception, url=" + urlString + ex);
             }
         }
         JSONObject jsonObj = new JSONObject();

+ 1 - 3
sp-server/src/main/java/com/pj/api/invoice/bo/testbb.java

@@ -28,9 +28,7 @@ public class testbb {
 //        String decodeStr = Base64.decodeStr(data);
 //        System.out.println(decodeStr);
         Snowflake snowflake = IdUtil.getSnowflake(1, 1);
-        for (int i = 0 ; i<10;i++){
-            System.out.println(snowflake.nextIdStr());
-        }
+
 
 
 

+ 0 - 1
sp-server/src/main/java/com/pj/api/invoice/demo.java

@@ -14,7 +14,6 @@ import java.util.Date;
 public class demo {
 
     public static void main(String[] args) {
-        System.out.println(new Date().getTime());
     }
 
 }

+ 0 - 1
sp-server/src/main/java/com/pj/api/invoice/utils/InvoiceUtils.java

@@ -169,7 +169,6 @@ public class InvoiceUtils {
                     reader.close();
                 }
             } catch (IOException ex) {
-                System.out.println("调用in.close Exception, url=" + urlString + ex);
     }
 }
         JSONObject jsonObj = new JSONObject();

+ 1 - 14
sp-server/src/main/java/com/pj/api/jh/bo/JhNotifyBO.java

@@ -7,19 +7,6 @@ import java.io.Serializable;
 
 @Data
 @Accessors(chain = true)
-public class JhNotifyBO implements Serializable {
-    private String businessMerchantNo;
-    private String orderPrice;
-    private String outTradeNo;
-    private String bankOrderNo;
-    private String productName;
-    private String productType;
-    private String tradeStatus;
-    private String successTime;
-    private String orderTime;
-    private String trxNo;
-    private String remark;
+public class JhNotifyBO extends JhNotifySignBO implements Serializable{
     private String sign;
-    private String attach;
-    private String bankTrxNo;
 }

+ 24 - 0
sp-server/src/main/java/com/pj/api/jh/bo/JhNotifySignBO.java

@@ -0,0 +1,24 @@
+package com.pj.api.jh.bo;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+@Data
+@Accessors(chain = true)
+public class JhNotifySignBO implements Serializable {
+    private String businessMerchantNo;
+    private String orderPrice;
+    private String outTradeNo;
+    private String bankOrderNo;
+    private String productName;
+    private String productType;
+    private String tradeStatus;
+    private String successTime;
+    private String orderTime;
+    private String trxNo;
+    private String remark;
+    private String attach;
+    private String bankTrxNo;
+}

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

@@ -8,6 +8,7 @@ import cn.hutool.json.JSONObject;
 import cn.hutool.json.JSONUtil;
 import cn.hutool.log.StaticLog;
 import com.pj.api.jh.bo.JhNotifyBO;
+import com.pj.api.jh.bo.JhNotifySignBO;
 import com.pj.api.jh.utils.JhHttpUtils;
 import com.pj.api.jh.utils.MerchantApiUtil;
 import com.pj.api.wx.bo.Attach;
@@ -21,6 +22,7 @@ import com.pj.current.task.TaskService;
 import com.pj.project.tb_order.TbOrder;
 import com.pj.project.tb_order.TbOrderService;
 import com.pj.project4sp.global.BusinessException;
+import com.pj.utils.sg.AjaxError;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
@@ -84,11 +86,11 @@ public class JhService {
         atchMap.setC(c).setB(businessId).setA(a);
         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)){
+        if (dbOrder != null && !StrUtil.equals(dbOrder.getOpenid(), openid)) {
             throw new Exception("其他人正在付款....");
         }
-        TbOrder successOrder=tbOrderService.findSuccessOrder(attchStr);
-        if (successOrder!=null&&StrUtil.contains(attchStr,"b")){
+        TbOrder successOrder = tbOrderService.findSuccessOrder(attchStr);
+        if (successOrder != null && StrUtil.contains(attchStr, "b")) {
             throw new Exception("业务订单已支付....");
         }
         String out_trade_no = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + RandomUtil.randomNumbers(6);
@@ -131,27 +133,25 @@ public class JhService {
                     .setOrderTime(new Date())
                     .setOutTradeNo(out_trade_no).setPrice(money);
             tbOrderService.save(tbOrder);
-           // taskService.addTask(new CheckPayStatusTask(RandomUtil.randomNumbers(12), 2000, out_trade_no));
+            // taskService.addTask(new CheckPayStatusTask(RandomUtil.randomNumbers(12), 2000, out_trade_no));
             return BeanUtil.beanToMap(object);
         }
         throw new Exception("生成订单失败");
         //  return new HashMap<>();
     }
 
-    private  String handlerDesc(String desc) {
+    private String handlerDesc(String desc) {
         if (StrUtil.isEmpty(desc)) {
             return "";
         }
         if (desc.getBytes(Charset.forName("utf-8")).length > 128) {
             desc = StrUtil.sub(desc, 0, desc.lastIndexOf("-"));
-            desc=  handlerDesc(desc);
+            desc = handlerDesc(desc);
         }
         return desc;
     }
 
 
-
-
     public Map<String, Object> buildCheckParams(String outTradeNo) {
         Map<String, Object> params = new HashMap<>();
         params.put("businessMerchantNo", jhConfig.getBusinessMerchantNo());
@@ -171,6 +171,12 @@ public class JhService {
 
     @Async
     public void notifyResult(JhNotifyBO bo) {
+        JhNotifySignBO signBO = new JhNotifyBO();
+        BeanUtil.copyProperties(bo, signBO);
+        if (!MerchantApiUtil.isRightSign(BeanUtil.beanToMap(signBO), jhConfig.getPaySecret(), bo.getSign())) {
+            log.error("无效签名:{}", JSONUtil.toJsonStr(bo));
+            return;
+        }
         String orderStatus = bo.getTradeStatus();
         if (!"SUCCESS".equals(orderStatus) && !"FINISH".equals(orderStatus)) {
             log.error("支付订单回调失败:{}", JSONUtil.toJsonStr(bo));
@@ -184,6 +190,4 @@ public class JhService {
     }
 
 
-
-
 }

+ 0 - 53
sp-server/src/main/java/com/pj/api/jh/service/TestTask.java

@@ -1,53 +0,0 @@
-package com.pj.api.jh.service;
-
-import cn.hutool.core.util.StrUtil;
-import cn.hutool.json.JSONObject;
-import cn.hutool.json.JSONUtil;
-import cn.hutool.log.StaticLog;
-import com.pj.api.wx.bo.Attach;
-import com.pj.project.tb_business.TbBusinessService;
-import com.pj.project.tb_business_car.TbBusinessCarService;
-import com.pj.project.tb_fee_details.TbFeeDetailsService;
-import com.pj.project.tb_order.TbOrder;
-import com.pj.project.tb_order.TbOrderService;
-
-import javax.annotation.Resource;
-import java.util.ArrayList;
-import java.util.List;
-
-//@Component
-//@Slf4j
-public class TestTask {
-
-    @Resource
-    private TbBusinessCarService tbBusinessCarService;
-
-    @Resource
-    private TbBusinessService tbBusinessService;
-    @Resource
-    private TbFeeDetailsService tbFeeDetailsService;
-
-
-    @Resource
-    private JhService jhService;
-
-    @Resource
-    private TbOrderService tbOrderService;
-
-    //    @Scheduled(fixedDelay = 20000)
-    public void test() {
-        List<TbOrder> orderList = tbOrderService.list();
-        List<String> bIds = new ArrayList<>();
-        orderList.stream().filter(tbOrder -> !tbOrder.getOrderStatus().equals("SUCCESS")).forEach(tbOrder -> {
-            JSONObject result = jhService.checkPayResult(tbOrder.getOutTradeNo());
-            StaticLog.error("info:{}", JSONUtil.toJsonStr(result));
-            Attach attach = JSONUtil.toBean(tbOrder.getAttach(), Attach.class);
-            StrUtil.splitTrim(attach.getB(), ",").forEach(id -> {
-                if (bIds.contains(id)) {
-                    System.out.println(id);
-                }
-                bIds.add(id);
-            });
-        });
-    }
-}

+ 1 - 1
sp-server/src/main/java/com/pj/api/jh/utils/MerchantApiUtil.java

@@ -30,7 +30,7 @@ public class MerchantApiUtil {
         if (smap.get("sign") != null) {
             smap.remove("sign");
         }
-        StringBuffer stringBuffer = new StringBuffer();
+        StringBuilder stringBuffer = new StringBuilder();
         for (Map.Entry<String, Object> m : smap.entrySet()) {
             Object value = m.getValue();
             if (value != null && StrUtil.isNotBlank(String.valueOf(value))) {

+ 31 - 25
sp-server/src/main/java/com/pj/api/open/service/OpenService.java

@@ -188,10 +188,10 @@ public class OpenService {
             }
         }
         //判断是否4.2米以下蓝色车牌===免停车费
-        if (StrUtil.isNotEmpty(tbBusinessCar.getColor())&&tbBusinessCar.getCarSize()!=null) {
+        if (StrUtil.isNotEmpty(tbBusinessCar.getColor()) && tbBusinessCar.getCarSize() != null) {
             String freeColor = partConfig.getFreeColor();
             //4.2米以下蓝色车辆
-            if (tbBusinessCar.getColor().contains(freeColor)&&tbBusinessCar.getCarSize()<=partConfig.getFreeCarLength()) {
+            if (tbBusinessCar.getColor().contains(freeColor) && tbBusinessCar.getCarSize() <= partConfig.getFreeCarLength()) {
                 log.error("请求返回【蓝牌未备案车辆,放行】:{},{}", carNo, ResultJson.success());
                 freeOut(tbBusinessCar, now, channel, image);
                 return ResultJson.success();
@@ -210,15 +210,24 @@ public class OpenService {
         String businessCarId = tbBusinessCar.getId();
         //String carNoPrefix = StrUtil.sub(carNo, 0, 1);
         String carType = tbBusinessCar.getCarType();
-        BigDecimal carMoney = new BigDecimal(0);
+        BigDecimal yueCarMoney = new BigDecimal(0);
+        BigDecimal chinaCarMoney = new BigDecimal(0);
         List<TbBusiness> businessList = tbBusinessService.findOtherBusinessByCarId(businessCarId);
+        businessList=businessList.stream().filter(tbBusiness -> tbBusiness.getPayStatus()!=TbBusiness.PayStatus.HAS_PAY_CONFIRM.getCode()).collect(Collectors.toList());
         if (businessList.isEmpty()) {//无业务车辆===>计算停车费
             //如果已经支付过,则从支付时间算起,重新计算停车费
             double dif = caulatePrice(tbBusinessCar, now);
             if (dif > 0) {
                 RedisUtil.setByMINUTES(channel, carNo, 1);
                 log.error("请求返回:请缴停车费:{},{}元", carNo, dif);
-                automaticPay.run(null, tbBusinessCar.getCarNo(), 1);
+                //是否可以预充值缴费 true扣款成功 false否
+                boolean flag = automaticPay.payPartMoney(tbBusinessCar,dif, now);
+                if (flag){
+                    tbBusinessCar.setMoney(new BigDecimal(dif));
+                    freeOut(tbBusinessCar, now, channel, image);
+                    automaticPay.unbindRun(carNo);
+                    return ResultJson.success();
+                }
                 return ResultJson.error("请缴停车费" + dif + "元");
             } else {
                 //无需交停车费,又没有支付的--->设置成免费车辆
@@ -233,22 +242,6 @@ public class OpenService {
             //1、分越重车和空车
             //空车是否收费
             //该车所有的业务都是到达卡口才进行扣费才会进入自动扣费
-            int autoPayCount = 0;
-            for (TbBusiness business : businessList) {
-                TbGoods tbGoods = tbGoodsService.getById(business.getGoodsId());
-                if (TbGoods.DeductionTypeEnum.OUT_KK.getCode().equals(tbGoods.getAutoDeductionType())) {
-                    autoPayCount++;
-                }
-            }
-            if (autoPayCount == businessList.size()) {
-                log.info("车辆到达卡口进行扣停车费和业务费:{}", carNo);
-                //自动缴费
-                // automaticPay.run(null, tbBusinessCar.getCarNo(), 3);
-                //tbDeductionBindService.autoUnbindCar(tbBusinessCar.getCarNo());
-                freeOut(tbBusinessCar, now, channel, image);
-                return ResultJson.success();
-            }
-
             if (TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType)) {
                 boolean chinaCarPay = businessList.stream().anyMatch(tbBusiness -> {
                     TbGoods tbGoods = tbGoodsService.getById(tbBusiness.getGoodsId());
@@ -259,7 +252,7 @@ public class OpenService {
                     if (dif > 0) {
                         RedisUtil.setByMINUTES(channel, carNo, 1);
                         log.error("中国车停车费:{},{}元", carNo, dif);
-                        carMoney = new BigDecimal(dif);
+                        chinaCarMoney = new BigDecimal(dif);
                         //  return ResultJson.error("请缴停车费" + dif + "元");
                     } else {
                         if (tbBusinessCar.getPayTime() == null) {
@@ -277,7 +270,7 @@ public class OpenService {
                     if (dif > 0) {
                         RedisUtil.setByMINUTES(channel, carNo, 1);
                         log.error("越南车停车费:{},{}元", carNo, dif);
-                        carMoney = new BigDecimal(dif);
+                        yueCarMoney = new BigDecimal(dif);
                         //  return ResultJson.error("请缴停车费" + dif + "元");
                     } else {
                         if (tbBusinessCar.getPayTime() == null) {
@@ -289,8 +282,12 @@ public class OpenService {
         }
         //============业务费计算是否交完
         BigDecimal businessMoney = new BigDecimal(0);
+        int autoPayCount=0;
         for (TbBusiness tbBusiness : businessList) {
             TbGoods tbGoods = tbGoodsService.getById(tbBusiness.getGoodsId());
+            if (TbGoods.DeductionTypeEnum.OUT_KK.getCode().equals(tbGoods.getAutoDeductionType())) {
+                autoPayCount++;
+            }
             int vietnamLeave = tbGoods.getVietnamCarLeave();
             int chinaCarLeave = tbGoods.getChinaCarLeave();
             boolean pay = tbBusiness.getPayMoney().doubleValue() >= tbBusiness.getItemPrice().doubleValue();
@@ -313,6 +310,17 @@ public class OpenService {
                 }
             }
         }
+        if (autoPayCount == businessList.size()&&businessMoney.intValue()>0) {
+            log.info("车辆到达卡口进行扣停车费和业务费:{}", carNo);
+            //自动缴费
+          boolean flag=  automaticPay.payBusinessAndPartMoney(businessList,businessMoney,tbBusinessCar,chinaCarMoney,yueCarMoney);
+          if (flag){
+              tbDeductionBindService.autoUnbindCar(tbBusinessCar.getCarNo());
+              freeOut(tbBusinessCar, now, channel, image);
+              return ResultJson.success();
+          }
+        }
+        BigDecimal carMoney=chinaCarMoney.add(yueCarMoney);
         BigDecimal total = businessMoney.add(carMoney);
         if (total.doubleValue() > 0) {
             String desc = "请缴";
@@ -325,8 +333,6 @@ public class OpenService {
             log.error("请求返回:{},{}", carNo, desc);
             return ResultJson.error(desc);
         }
-        //离场直接解绑
-        tbDeductionBindService.autoUnbindCar(tbBusinessCar.getCarNo());
         freeOut(tbBusinessCar, now, channel, image);
         return ResultJson.success();
     }
@@ -381,7 +387,7 @@ public class OpenService {
         if (tbBusinessCar != null) {
             String color = inRecordBO.getCarColor();
             TbMildCar tbMildCar = tbMildCarService.findByCarNo(carNo);
-            if (tbMildCar!=null){//车长
+            if (tbMildCar != null) {//车长
                 tbBusinessCar.setCarSize(tbMildCar.getCarLength());
             }
             //蓝牌 4.2米以及以下

+ 4 - 2
sp-server/src/main/java/com/pj/api/wx/service/WxService.java

@@ -218,6 +218,7 @@ public class WxService {
             log.error("========订单不存在==========:{}", outTradeNo);
             return;
         }
+        String payopenid=tbOrder.getOpenid();
         String total_fee = notifyBO.getTotalFee();
         BigDecimal money = new BigDecimal(total_fee).divide(new BigDecimal(100), 2, BigDecimal.ROUND_UP);
         String attachStr = tbOrder.getAttach();
@@ -250,9 +251,10 @@ public class WxService {
                 businessList=businessList.stream().filter(tbBusiness -> tbBusiness.getPayStatus()!=TbBusiness.PayStatus.HAS_PAY_CONFIRM.getCode()).collect(Collectors.toList());
                 businessIds=businessList.stream().map(TbBusiness::getId).collect(Collectors.toList());
                 List<TbBusinessItem> items = tbBusinessItemService.findByBusinessIdList(businessIds);
+                items=items.stream().filter(item -> item.getPayStatus()==0).collect(Collectors.toList());
                 for (TbBusiness tbBusiness : businessList) {
                     tbBusiness.setPayTime(payTime).setPayType(3).setConfirmInput(1).setConfirmInputTime(payTime)
-                            .setPayMoney(tbBusiness.getItemPrice())
+                            .setPayMoney(tbBusiness.getItemPrice()).setPayOpenid(payopenid)
                             .setPayNo(transactionId);
                     tbBusiness.setPayStatus(TbBusiness.PayStatus.HAS_PAY_CONFIRM.getCode());
                     tbBusinessService.updateById(tbBusiness);
@@ -263,7 +265,7 @@ public class WxService {
                         //
                         if (TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType) && tbGoods.getChinaCarPay() == 0
                                 || TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType) && tbGoods.getVietnamCarPay() == 0) {
-                            tbBusinessCar.setPay(1).setPayTime(finalPayTime);
+                            tbBusinessCar.setPay(1).setPayTime(finalPayTime).setPayOpenid(payopenid);
                             tbBusinessCarService.updateById(tbBusinessCar);
                         }
                     });

+ 0 - 2
sp-server/src/main/java/com/pj/current/mybatis/MybatisMapperDynamicLoader.java

@@ -54,8 +54,6 @@ public class MybatisMapperDynamicLoader implements InitializingBean, Application
                     try {
                         if (scanner.isChanged()) {
                             // System.out.println("load mapper.xml");
-                            String now = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
-                            System.out.println("mapper.xml热刷新成功,当前时间:" + now);
                             scanner.reloadXml();
                         }
                     } catch (Exception e) {

+ 0 - 3
sp-server/src/main/java/com/pj/current/mybatis/MybatisStdOutImpl.java

@@ -54,7 +54,6 @@ public class MybatisStdOutImpl implements Log {
 //			s = s.replaceAll("==>  Preparing: ", "");
 //			s = "==>  Preparing: " + s;
         }
-        System.out.println(s);
     }
 
     /**
@@ -62,12 +61,10 @@ public class MybatisStdOutImpl implements Log {
      */
     @Override
     public void trace(String s) {
-        System.out.println(s);
     }
 
     @Override
     public void warn(String s) {
-        System.out.println(s);
     }
 
 

+ 0 - 1
sp-server/src/main/java/com/pj/current/satoken/SaTokenConfigure.java

@@ -98,7 +98,6 @@ public class SaTokenConfigure implements WebMvcConfigurer {
                     if (StrUtil.equals(msg,"操作超时")){
                         return AjaxJson.getError(msg,405);
                     }
-                    System.out.println(e.getMessage());
                     return AjaxJson.getError(e.getMessage());
                 })
 

+ 100 - 4
sp-server/src/main/java/com/pj/project/tb_account/AutomaticPay.java

@@ -20,6 +20,7 @@ import com.pj.project.tb_deduction_bind.TbDeductionBindService;
 import com.pj.project.tb_deduction_record.TbDeductionRecord;
 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.TbInvoiceOrder;
@@ -27,6 +28,7 @@ import com.pj.project.tb_invoice_order.TbInvoiceOrderService;
 import com.pj.project.tb_item.TbItem;
 import com.pj.utils.AesUtil;
 import com.pj.utils.cache.RedisUtil;
+import com.pj.utils.sg.AjaxError;
 import com.pj.utils.sg.NbUtil;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.scheduling.annotation.Async;
@@ -68,7 +70,8 @@ public class AutomaticPay {
     @Resource
     @Lazy
     private TbDeductionBindService tbDeductionBindService;
-
+    @Resource
+    private TbFeeStatisticsService tbFeeStatisticsService;
     private Integer feeType;
 
 
@@ -191,7 +194,7 @@ public class AutomaticPay {
         List<TbFeeDetails> tbFeeDetailsList = tbFeeDetailsService.autoChargeBusinessFee(
                 businessItems, null, null, now);
         //生成扣费记录
-        createTbDeductionRecord(tbFeeDetailsList, tbAccount,  plate, bind.getCustomerName(), no);
+        createTbDeductionRecord(tbFeeDetailsList, tbAccount, plate, bind.getCustomerName(), no);
         //生成开票信息
         createTbInvoiceOrder(tbBusiness, cars, parkingMoneyBig, plate, bind.getCustomerId(), no, isOut);
         if (isOut) {//离场缴费
@@ -312,7 +315,7 @@ public class AutomaticPay {
      */
     public void createTbDeductionRecord(List<TbFeeDetails> tbFeeDetailsList, TbAccount tbAccount, String plate, String customerName, String no) {
         String bindIdStr = deductionBindService.getBindId(plate);
-        BigDecimal banlanc = new BigDecimal(AesUtil.decryptECB(tbAccount.getTotalMoney(),AesUtil.reverse(tbAccount.getAccSalt())));
+        BigDecimal banlanc = new BigDecimal(AesUtil.decryptECB(tbAccount.getTotalMoney(), AesUtil.reverse(tbAccount.getAccSalt())));
         for (TbFeeDetails feeDetails : tbFeeDetailsList) {
             TbDeductionRecord deductionRecord = BeanUtil.toBean(feeDetails, TbDeductionRecord.class);
             BigDecimal itemPrice = feeDetails.getItemPrice();
@@ -328,7 +331,7 @@ public class AutomaticPay {
             banlanc = banlanc.subtract(itemPrice);
             deductionRecord.setTotalMoney(banlanc.toString());
             deductionRecord.insert();
-            feeDetails.setCarNo(plate);
+//            feeDetails.setCarNo(plate);
             feeDetails.setPreOrderNum(no);
             feeDetails.setCustomerName(customerName);
             tbFeeDetailsService.updateById(feeDetails);
@@ -580,4 +583,97 @@ public class AutomaticPay {
         String key = "autoPay:" + businessId + plate;
         return key;
     }
+
+    /**
+     * 支付停车费
+     * @param tbBusinessCar
+     * @param partMoney
+     * @param now
+     * @return
+     */
+    public boolean payPartMoney(TbBusinessCar tbBusinessCar, double partMoney, Date now) {
+        String carNo = tbBusinessCar.getCarNo();
+        TbDeductionBind bind = tbDeductionBindService.getBindCarByPlate(carNo);
+        //未绑定
+        if (bind == null) {
+            return false;
+        }
+        TbAccount tbAccount = tbAccountService.getByCustomerId(bind.getCustomerId());
+        String key = AesUtil.reverse(tbAccount.getAccSalt());
+        BigDecimal balance = new BigDecimal(tbAccount.getTotalMoney());
+        //不足
+        if (balance.doubleValue() < partMoney) {
+            return false;
+        }
+        balance = balance.subtract(new BigDecimal(partMoney));
+        tbAccount.setTotalMoney(AesUtil.encryptECB(balance.toString(), key));
+        tbAccountService.updateById(tbAccount);
+        tbBusinessCar.setMoney(new BigDecimal(partMoney)).setPayType(TbBusinessCar.PayTypeEnum.HAS_PAY_TYPE.getType()).setPayTime(now);
+        List<PriceBO> priceBOList = new ArrayList<PriceBO>() {{
+            add(new PriceBO(tbBusinessCar.getId(), tbBusinessCar.getMoney()));
+        }};
+        String no = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + RandomUtil.randomNumbers(4);
+        //车辆的扣费记录
+        List<TbFeeDetails> parkFeeDetailsList = tbFeeDetailsService.chargeParkFee(
+                priceBOList, null, null, now, TbBusiness.PayType.PER_PAY);
+        this.createTbDeductionRecord(parkFeeDetailsList, tbAccount, tbBusinessCar.getCarNo(), bind.getCustomerName(), no);
+        tbFeeStatisticsService.addOrUpdateStatistic(now);//更新当前日期的日统计
+        return true;
+    }
+
+    /**
+     * 支付停车费和业务费
+     * @param businessList
+     * @param businessMoney
+     * @param tbBusinessCar
+     * @param chinaCarMoney
+     * @param yueCarMoney
+     * @return
+     */
+    public boolean payBusinessAndPartMoney(List<TbBusiness> businessList,
+                                           BigDecimal businessMoney,
+                                           TbBusinessCar tbBusinessCar,
+                                           BigDecimal chinaCarMoney,
+                                           BigDecimal yueCarMoney) {
+        Date now = new Date();
+        String carNo = tbBusinessCar.getCarNo();
+        TbDeductionBind bind = tbDeductionBindService.getBindCarByPlate(carNo);
+        //未绑定
+        if (bind == null) {
+            return false;
+        }
+        BigDecimal totalMoney = businessMoney.add(chinaCarMoney).add(yueCarMoney).add(chinaCarMoney);
+        TbAccount tbAccount = tbAccountService.getByCustomerId(bind.getCustomerId());
+        String key = AesUtil.reverse(tbAccount.getAccSalt());
+        BigDecimal balance = new BigDecimal(tbAccount.getTotalMoney());
+        //不足
+        if (balance.doubleValue() < totalMoney.doubleValue()) {
+            return false;
+        }
+        balance = balance.subtract(totalMoney);
+        tbAccount.setTotalMoney(AesUtil.encryptECB(balance.toString(), key));
+        tbAccountService.updateById(tbAccount);
+        businessList.forEach(tbBusiness -> {
+            tbBusiness.setPayStatus(TbBusiness.PayStatus.HAS_PAY_CONFIRM.getCode())
+                    .setPayMoney(tbBusiness.getItemPrice()).setTotalMoney(tbBusiness.getItemPrice());
+        });
+        tbBusinessService.updateBatchById(businessList);
+        List<TbBusinessItem> tbBusinessItems = tbBusinessItemService.findByBusinessIdList(businessList.stream().map(TbBusiness::getId).collect(Collectors.toList()));
+        tbBusinessItems.parallelStream().forEach(item -> item.setPayStatus(1).setPayTime(now));
+        tbBusinessItemService.updateBatchById(tbBusinessItems);
+        tbBusinessCar.setPay(1).setPayType(TbBusinessCar.PayTypeEnum.HAS_PAY_TYPE.getType())
+                .setPayTime(now);
+        tbBusinessCarService.updateById(tbBusinessCar);
+        List<PriceBO> priceBOList = new ArrayList<PriceBO>() {{
+            add(new PriceBO(tbBusinessCar.getId(), tbBusinessCar.getMoney()));
+        }};
+        String plate=tbBusinessCar.getCarNo();
+        String no = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + RandomUtil.randomNumbers(4);
+        List<TbFeeDetails> parkFeeDetailsList = tbFeeDetailsService.chargeParkFee(priceBOList, null, null, now, TbBusiness.PayType.PER_PAY);
+        this.createTbDeductionRecord(parkFeeDetailsList, tbAccount, plate, bind.getCustomerName(), no);
+        List<TbFeeDetails> tbFeeDetails =  tbFeeDetailsService.chargeBusinessFee(tbBusinessItems, null, null, now, TbBusiness.PayType.PER_PAY);
+        createTbDeductionRecord(tbFeeDetails, tbAccount, plate, bind.getCustomerName(), no);
+        tbFeeStatisticsService.addOrUpdateStatistic(now);//更新当前日期的日统计
+        return true;
+    }
 }

+ 4 - 0
sp-server/src/main/java/com/pj/project/tb_business/TbBusiness.java

@@ -288,6 +288,10 @@ public class TbBusiness extends Model<TbBusiness> implements Serializable {
      */
     private String confirmBy;
     private String confirmByAdminId;
+    /**
+     * 微信支付用户
+     */
+    private String payOpenid;
 
 
 

+ 14 - 5
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java

@@ -595,11 +595,10 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         result.put("carList", carsList.stream().sorted(Comparator.comparingDouble(obj -> Double.valueOf(obj.get("price").toString()))).collect(Collectors.toList()));
         BigDecimal itemsPrice = new BigDecimal("0");
         List<Map<String, Object>> itemList = new ArrayList<>();
+        //未支付的
+        items=items.stream().filter(item -> item.getPayStatus()==0).collect(Collectors.toList());
         for (TbBusinessItem item : items) {
             BigDecimal itemPrice = item.getItemPrice().multiply(new BigDecimal(item.getNum()));
-            if (item.getPayStatus() == 1) {
-                continue;
-            }
             itemsPrice = itemsPrice.add(itemPrice);
             Map<String, Object> itemMap = new HashMap<>();
             itemMap.put("id", item.getId());
@@ -761,6 +760,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         }
         BigDecimal itemPrice = db.getItemPrice();
         BigDecimal money = itemPrice.add(partMoney);
+        String no = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + RandomUtil.randomNumbers(4);
         if (payType == TbBusiness.PayType.PER_PAY.getCode()) {
             if (bind == null) {
                 throw new AjaxError("车辆未绑定预支付款,无法完成收费");
@@ -775,7 +775,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             tbAccount.setTotalMoney(AesUtil.encryptECB(balance.toString(), key));
             tbAccountService.updateById(tbAccount);
             //生成扣款记录
-            String no = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + RandomUtil.randomNumbers(4);
             if (partMoney.doubleValue() > 0 && !priceBOList.isEmpty()) {
                 //车辆的扣费记录
                 List<TbFeeDetails> parkFeeDetailsList = tbFeeDetailsService.chargeParkFee(
@@ -787,6 +786,16 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                     items, null, null, payTime, TbBusiness.PayType.PER_PAY);
             //生成扣费记录
             automaticPay.createTbDeductionRecord(tbFeeDetailsList, tbAccount, plate, bind.getCustomerName(), no);
+            automaticPay.unbindRun(plate);
+        }else if (payType == TbBusiness.PayType.OFF_LINE_PAY.getCode()){
+            //车辆的扣费记录
+            if (partMoney.doubleValue() > 0){
+                tbFeeDetailsService.chargeParkFee(
+                        priceBOList, null, null, payTime, TbBusiness.PayType.OFF_LINE_PAY);
+            }
+            //生成收费明细
+            tbFeeDetailsService.chargeBusinessFee(
+                    items, null, null, payTime, TbBusiness.PayType.OFF_LINE_PAY);
         }
         db.setPayStatus(TbBusiness.PayStatus.HAS_PAY_CONFIRM.getCode())
                 .setPayMoney(db.getItemPrice())
@@ -801,7 +810,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         tbBusinessCarService.updateBatchById(cars);
         tbBusinessItemService.updateBatchById(items);
         tbFeeStatisticsService.addOrUpdateStatistic(payTime);//更新当前日期的日统计
-        automaticPay.unbindRun(plate);
+
     }
 
     public void unBindCar(String id, String businessCarId) {

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

@@ -149,6 +149,10 @@ public class TbBusinessCar extends Model<TbBusinessCar> implements Serializable
      * 审核人
      */
     private String confirmJudgeBy;
+    /**
+     * 微信支付用户
+     */
+    private String payOpenid;
 
     @Getter
     @AllArgsConstructor

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

@@ -39,6 +39,7 @@ public class TbBusinessItem extends Model<TbBusinessItem> implements Serializabl
 	 * 此模块对应的权限码 
 	 */
 	public static final String PERMISSION_CODE = "tb-business-item";	
+	public static final String PERMISSION_CODE_ADD = "tb-business-item-supplement";
 
 
 	// ---------- 表中字段 ----------

+ 24 - 0
sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItemController.java

@@ -1,5 +1,6 @@
 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.satoken.StpUserUtil;
@@ -37,6 +38,29 @@ public class TbBusinessItemController {
     /**
      * 改
      */
+    @RequestMapping("add")
+    @SaCheckPermission(value = TbBusinessItem.PERMISSION_CODE_ADD)
+    public AjaxJson add() {
+        SoMap soMap = SoMap.getRequestSoMap();
+        String businessId = soMap.getString("businessId");
+        String itemId = soMap.getString("itemId");
+        String itemTypeId = soMap.getString("itemTypeId");
+        String num = soMap.getString("num");
+        tbBusinessItemService.addExtra(businessId,itemId,itemTypeId,num);
+        return AjaxJson.getSuccess();
+    }
+    @RequestMapping("del")
+    @SaCheckPermission(value = TbBusinessItem.PERMISSION_CODE_ADD)
+    public AjaxJson del() {
+        SoMap soMap = SoMap.getRequestSoMap();
+        String id = soMap.getString("id");
+        tbBusinessItemService.del(id);
+        return AjaxJson.getSuccess();
+    }
+
+    /**
+     * 改
+     */
     @RequestMapping("update")
     public AjaxJson update(TbBusinessItem t) {
         tbBusinessItemService.updateById(t);

+ 1 - 21
sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItemMapper.java

@@ -17,30 +17,10 @@ import java.util.List;
 @Repository
 public interface TbBusinessItemMapper extends BaseMapper<TbBusinessItem> {
 
-    /**
-     * 增
-     *
-     * @param t 实体对象
-     * @return 受影响行数
-     */
-    int add(TbBusinessItem t);
 
 
-    /**
-     * 改
-     *
-     * @param t 实体对象
-     * @return 受影响行数
-     */
-    int update(TbBusinessItem t);
 
-    /**
-     * 查 - 根据id
-     *
-     * @param id 要查询的数据id
-     * @return 实体对象
-     */
-    TbBusinessItem getById(String id);
+
 
     /**
      * 查集合 - 根据条件(参数为空时代表忽略指定条件)

+ 0 - 27
sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItemMapper.xml

@@ -2,27 +2,6 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.pj.project.tb_business_item.TbBusinessItemMapper">
 
-    <!-- 增 [G] -->
-    <insert id="add">
-        insert into tb_business_item (id, business_id, item_code, item_price, item_name, status, operate_time, operaror)
-        values (#{id}, #{businessId}, #{itemCode}, #{itemPrice}, #{itemName}, #{status}, #{operateTime}, #{operaror})
-    </insert>
-
-
-    <!-- 改 [G] -->
-    <update id="update">
-        update tb_business_item
-        set id           = #{id},
-            business_id  = #{businessId},
-            item_code    = #{itemCode},
-            item_price   = #{itemPrice},
-            item_name    = #{itemName},
-            status       = #{status},
-            operate_time = #{operateTime},
-            operaror     = #{operaror}
-        where id = #{id}
-    </update>
-
 
     <!-- ================================== 查询相关 ================================== -->
 
@@ -47,12 +26,6 @@
         where a.business_id = b.id
     </sql>
 
-    <!-- 查 - 根据id -->
-    <select id="getById" resultMap="model">
-        select *
-        from tb_busness
-        where id = #{id}
-    </select>
 
     <!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
     <select id="getList" resultType="com.pj.project.tb_business_item.TbBusinessItem">

+ 68 - 22
sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItemService.java

@@ -2,6 +2,7 @@ package com.pj.project.tb_business_item;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.NumberUtil;
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.excel.EasyExcel;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -20,12 +21,18 @@ 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_item.TbItem;
+import com.pj.project.tb_item.TbItemService;
+import com.pj.project.tb_item_type.TbItemType;
+import com.pj.project.tb_item_type.TbItemTypeService;
 import com.pj.project4sp.admin.SpAdmin;
 import com.pj.project4sp.admin.SpAdminService;
 import com.pj.project4sp.uploadfile.UploadUtil;
+import com.pj.utils.sg.AjaxError;
 import com.pj.utils.sg.AjaxJson;
 import com.pj.utils.so.SoMap;
 import lombok.extern.slf4j.Slf4j;
+import org.aspectj.weaver.loadtime.Aj;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
@@ -33,6 +40,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.io.File;
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Date;
@@ -67,35 +75,18 @@ public class TbBusinessItemService extends ServiceImpl<TbBusinessItemMapper, TbB
     @Resource
     @Lazy
     private WxService wxService;
-    @Resource
-    TaskService taskService;
+
 
     @Resource
     TbFeeDetailsService tbFeeDetailsService;
     @Resource
     private TbCostomerService tbCostomerService;
+    @Resource
+    private TbItemService tbItemService;
+    @Resource
+    private TbItemTypeService tbItemTypeService;
 
-    /**
-     * 增
-     */
-    int add(TbBusinessItem t) {
-        return tbBusinessItemMapper.add(t);
-    }
-
-
-    /**
-     * 改
-     */
-    int update(TbBusinessItem t) {
-        return tbBusinessItemMapper.update(t);
-    }
 
-    /**
-     * 查
-     */
-    TbBusinessItem getById(String id) {
-        return tbBusinessItemMapper.getById(id);
-    }
 
     /**
      * 查集合 - 根据条件(参数为空时代表忽略指定条件)
@@ -235,6 +226,7 @@ public class TbBusinessItemService extends ServiceImpl<TbBusinessItemMapper, TbB
 
     /**
      * 根据放行记录ID查找
+     *
      * @param busienssCarId
      * @return
      */
@@ -242,4 +234,58 @@ public class TbBusinessItemService extends ServiceImpl<TbBusinessItemMapper, TbB
         List<TbBusiness> businessList = tbBusinessService.findOtherBusinessByCarId(busienssCarId);
         return this.findByBusinessIdList(businessList.stream().map(TbBusiness::getId).collect(Collectors.toList()));
     }
+
+    /**
+     * 补录收费
+     *
+     * @param businessId
+     * @param itemId
+     * @param itemTypeId
+     */
+    public void addExtra(String businessId, String itemId, String itemTypeId, String num) {
+        TbBusiness tbBusiness = tbBusinessService.getById(businessId);
+        if (tbBusiness == null) {
+            throw new AjaxError("数据异常");
+        }
+        TbItemType tbItemType = tbItemTypeService.getById(itemTypeId);
+        if (tbItemType == null) {
+            throw new AjaxError("请选择收费项");
+        }
+        TbItem tbItem = tbItemService.getById(itemId);
+        if (tbItem == null) {
+            throw new AjaxError("请选择缴费明细");
+        }
+        List<TbBusinessItem> list = this.getByBusinessCarId(businessId);
+        TbBusinessItem tbBusinessItem = new TbBusinessItem();
+        BigDecimal totalPrice=new BigDecimal(num).multiply(tbItem.getPrice());
+        tbBusinessItem.setBusinessId(businessId).setItemTypeId(tbItemType.getId()).setItemTypeName(tbItemType.getName())
+                .setItemId(tbItem.getId()).setItemName(tbItem.getItemName()).setItemCode(tbItem.getItemCode())
+                .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())
+                .setNo(tbBusiness.getNo() + list.size() + 1)
+        .setPayType(tbItem.getPayType()).setPayTypeName(tbItem.getPayTypeName());
+        this.save(tbBusinessItem);
+        tbBusiness.setPayStatus(TbBusiness.PayStatus.NO_PAY.getCode())
+                .setItemPrice(tbBusiness.getItemPrice().add(totalPrice));
+        tbBusinessService.updateById(tbBusiness);
+    }
+
+    public void del(String id) {
+        TbBusinessItem tbBusinessItem = this.getById(id);
+        if (tbBusinessItem == null) {
+            throw new AjaxError("数据不存在");
+        }
+        TbBusiness tbBusiness = tbBusinessService.getById(tbBusinessItem.getBusinessId());
+        List<TbBusinessItem> tbBusinessItemList = this.findByBusinessId(tbBusiness.getId());
+        tbBusinessItemList.removeIf(item -> item.getId().equals(tbBusinessItem.getId()));
+        long count = tbBusinessItemList.stream().filter(item -> item.getPayStatus() == 0).count();
+        if (count == 0) {
+            tbBusiness.setPayStatus(TbBusiness.PayStatus.HAS_PAY_CONFIRM.getCode())
+                    .setItemPrice(tbBusiness.getItemPrice().subtract(tbBusinessItem.getTotal()));
+            tbBusinessService.updateById(tbBusiness);
+        }
+        this.removeById(id);
+    }
 }

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

@@ -108,7 +108,6 @@ public class TbFeeDetailsController {
      * 准备打印的数据
      */
     @RequestMapping("prePrint")
-    @SaCheckPermission(value = TbFeeDetails.TB_STATISTICS_PRINT)
     public AjaxJson prePrint() {
         SoMap so = SoMap.getRequestSoMap();
         return AjaxJson.getSuccessData(tbFeeDetailsService.prePrint(so));

+ 3 - 2
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsService.java

@@ -315,12 +315,13 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
             BigDecimal noTaxPrice = item.getTotal().subtract(taxPrice);
             noTaxPrice = noTaxPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
             String carNo = business.getCardNo();
-            if (StrUtil.isEmpty(business.getCardNo())) {
+            if (StrUtil.isEmpty(carNo)) {
                 carNo = business.getChinaCarNo();
             }
             TbGoods businessCfg = tbGoodsService.getById(business.getGoodsId());
             if ((TbGoods.LeaveEnum.BUSINESS_MONEY.getCode().equals(businessCfg.getChinaCarLeave())
-                    || TbGoods.LeaveEnum.APART_BUSINESS.getCode().equals(businessCfg.getChinaCarLeave()))) {
+                    || TbGoods.LeaveEnum.APART_BUSINESS.getCode().equals(businessCfg.getChinaCarLeave()))
+            &&TbGoods.LeaveEnum.PART_MONEY.getCode().equals(businessCfg.getVietnamCarLeave())) {
                 carNo = business.getChinaCarNo();
             }
             String businessCarIds = "";

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

@@ -62,20 +62,13 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
     TbFeeStatisticsMapper tbFeeStatisticsMapper;
     @Resource
     TbBusinessCarService tbBusinessCarService;
-    @Resource
-    TbBusinessService tbBusinessService;
+
     @Resource
     TbFeeDetailsService tbFeeDetailsService;
-    @Resource
-    private PartConfig partConfig;
+
     @Resource
     private MyConfig myConfig;
-    @Resource
-    private TbItemTypeService tbItemTypeService;
-    @Resource
-    private RelationBusinessCarService relationBusinessCarService;
-    @Resource
-    private TbGoodsService tbGoodsService;
+
 
     /**
      * 增
@@ -113,15 +106,11 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
     }
 
     List<TbFeeStatistics> getMonth(SoMap so) {
-        List<TbFeeStatistics> monthFees = tbFeeStatisticsMapper.getMonth(so);
-
-        return monthFees;
+        return tbFeeStatisticsMapper.getMonth(so);
     }
 
     List<TbFeeStatistics> getYear(SoMap so) {
-        List<TbFeeStatistics> yearFees = tbFeeStatisticsMapper.getYear(so);
-
-        return yearFees;
+        return tbFeeStatisticsMapper.getYear(so);
     }
 
     public TbFeeStatistics getByDayAndFeeType(String day, Integer feeType) {
@@ -132,70 +121,6 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
     }
 
 
-    /**
-     * 弃用
-     */
-    public void countParkFee(List<PriceBO> cars, Date now) {
-
-        String toDay = DateUtil.format(now, "yyyy-MM-dd");
-        String thisYear = StrUtil.sub(toDay, 0, 4);
-        String thisMonth = StrUtil.sub(toDay, 0, 7);
-        TbFeeStatistics parkFee = this.getByDayAndFeeType(toDay, TbFeeStatistics.FeeTypeEnum.PARK_FEE.getCode());
-        if (parkFee == null) {
-            parkFee = new TbFeeStatistics();
-            parkFee.setTaxRate(BigDecimal.valueOf(TbFeeStatistics.taxRate.PARK.getValue()));
-        }
-        BigDecimal totalPrice = BigDecimal.valueOf(0);
-        Integer totalNum = parkFee.getNum();
-
-        for (PriceBO bo1 : cars) {
-            BigDecimal price = bo1.getP();
-            if (price.compareTo(BigDecimal.valueOf(0)) != 0) {
-                totalPrice = totalPrice.add(price);
-                TbBusinessCar car = tbBusinessCarService.getById(bo1.getId());
-                Integer addNum = calcuAddNum(car.getMoney(), price,car.getCarSize());
-                totalNum += addNum;
-            }
-        }
-        if (totalPrice.compareTo(BigDecimal.valueOf(0)) == 0) {
-            return;
-        }
-        parkFee.setNum(totalNum).setTaxMoney(parkFee.getTaxMoney().add(totalPrice));
-        BigDecimal taxes = totalPrice
-                .divide(BigDecimal.valueOf(1).add(parkFee.getTaxRate()), 2, BigDecimal.ROUND_HALF_UP)
-                .multiply(parkFee.getTaxRate());
-        taxes = taxes.setScale(2, BigDecimal.ROUND_HALF_UP);
-        BigDecimal noTaxMoney = totalPrice.subtract(taxes);
-        noTaxMoney = noTaxMoney.setScale(2, BigDecimal.ROUND_HALF_UP);
-        parkFee.setNoTaxMoney(parkFee.getNoTaxMoney().add(noTaxMoney))
-                .setTaxes(parkFee.getTaxes().add(taxes));
-
-        parkFee.setDayTime(now).setMonth(thisMonth).setYear(thisYear).setDay(toDay)
-                .setFeeType(TbFeeStatistics.FeeTypeEnum.PARK_FEE.getCode()).setItemTypeName(TbFeeStatistics.FeeTypeEnum.PARK_FEE.getDesc())
-                .setPayType(3);
-        this.saveOrUpdate(parkFee);
-    }
-
-    public Integer calcuAddNum(BigDecimal money, BigDecimal p, Double carSize) {
-        BigDecimal baseNightPrice = partConfig.getBasePrice().add(partConfig.getExtraPrice());
-        //4.2~9.6
-        if (carSize < partConfig.getMildCarLength() && carSize >= partConfig.getFreeCarLength()) {
-            baseNightPrice = partConfig.getMildCarBasePrice().add(partConfig.getExtraPrice());
-        }
-        BigDecimal[] qrOld = money.divideAndRemainder(baseNightPrice);
-        Integer oldNightNum = qrOld[0].intValue();
-        if (qrOld[1].compareTo(BigDecimal.valueOf(0)) > 0) {
-            oldNightNum++;
-        }
-        BigDecimal newMoney = money.add(p);
-        BigDecimal[] qrNew = newMoney.divideAndRemainder(baseNightPrice);
-        Integer newNightNum = qrNew[0].intValue();
-        if (qrNew[1].compareTo(BigDecimal.valueOf(0)) > 0) {
-            newNightNum++;
-        }
-        return newNightNum - oldNightNum;
-    }
-
 
     /**
      * 照搬收费明细到日统计

+ 5 - 0
sp-server/src/main/java/com/pj/project/tb_item/TbItemController.java

@@ -118,5 +118,10 @@ public class TbItemController {
 
     // ------------------------- 前端接口 -------------------------
 
+    @RequestMapping(value = "getByItemTypeId")
+    public AjaxJson getByItemTypeId(String itemTypeId) {
+       List<TbItem>list= tbItemService.getItemTypeById(itemTypeId);
+        return AjaxJson.getSuccessData(list);
+    }
 
 }

+ 0 - 1
sp-server/src/main/java/com/pj/project/tb_item/TbItemMapper.xml

@@ -90,7 +90,6 @@
              relation_type_item b
         where a.id = b.item_id
           and b.type_id = #{typeId}
-          and a.status = 1
         order by b.need desc
     </select>
 

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

@@ -47,4 +47,6 @@ public class TbItemService extends ServiceImpl<TbItemMapper, TbItem> implements
     public List<TbItem> getItemTypeById(String typeId) {
         return tbItemMapper.getItemTypeById(typeId);
     }
+
+
 }

+ 0 - 1
sp-server/src/main/java/com/pj/utils/Ttime.java

@@ -44,7 +44,6 @@ public class Ttime {
      * 格式化输出结果
      */
     public void outTime() {
-        System.out.println(this.toString());
     }
 
     /**

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

@@ -95,7 +95,7 @@ ocr-config:
     bash: /opt/ocrpic/tesseract.sh
     analysis: /opt/ocrpic/ocrtxt/PIC_NAME.txt
 pushfee-config:
-    enable: true
+    enable: false
     remote-public-key-base6: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCb5yK85EKqwiQU+z1jyjOng6ecssQpEjC6STbCuSWN6KHLkijBxdqrCumXhbIyOVx4lHK9Rg5EjzlQxoaXQTgJdItaGjLC+UTE+NNAnnaFLg0x4jajNpLo473zdZxTYQaT3q/aKnTeXuKHw11PPUe4hmmfxPcdt9yJ0Iqo/XxV3QIDAQAB
     sync-url: http://117.141.148.233:8000/accounting/sync/bill
     sys-id: "0101"

+ 0 - 78
sp-server/src/main/resources/application-pro.yml

@@ -1,78 +0,0 @@
-# 端口
-server:
-    port: 8099
-
-spring:
-    # 数据源配置
-    datasource:
-        type: com.alibaba.druid.pool.DruidDataSource
-        url: jdbc:mysql://127.0.0.1:3306/pco_system?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTC
-        username: root
-        password: 123456
-        # 是否打开sql监控台  (生产环境请务必关闭此选项)
-        druid:
-            stat-view-servlet:
-                enabled: true
-            web-stat-filter:
-                enabled: true
-            filter:
-                config:
-                    enabled: true
-
-    # redis配置
-    redis:
-        # Redis数据库索引(默认为0)
-        database: 1
-        # Redis服务器地址
-        host: 127.0.0.1
-        # Redis服务器连接端口
-        port: 6379
-        # Redis服务器连接密码(默认为空)
-        # password:
-        # 连接超时时间(毫秒)
-        timeout: 5000ms
-        lettuce:
-            pool:
-                # 连接池最大连接数
-                max-active: 200
-                # 连接池最大阻塞等待时间(使用负值表示没有限制)
-                max-wait: -1ms
-                # 连接池中的最大空闲连接
-                max-idle: 10
-                # 连接池中的最小空闲连接
-                min-idle: 0
-
-    # 项目自定义配置
-    myconfig:
-        # 本项目部署到的服务器域名(文件上传等等模块  要用到)
-        domain: https://dxkaa1.bgigc.com/pro
-        web-domain: https://dxkaa1.bgigc.com/h5
-part-config:
-    base-price: 30 #基础费用
-    extra-price: 10 #过夜额外收费
-    night-end: 06:00:00 #夜间结束时间
-    free-minutes: 30
-    free-car-length: 4.2
-car:
-    max-length: 20
-    max-weight: 50
-wx-config:
-    flush-second: 120 #token刷新时间 秒
-    app-id: wxf33627516d0851e1
-    secret: fd1dd75b8063fbf4c94fce3aac5de524
-    mach-id: 1615645036
-    key: dongxingkouanerqiao8888888888888
-    token: dx1123
-    access-token-key: wechat:base_token_key
-    js-api-ticket-key: wechat:jsapi_ticket_key
-    access-token-url: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${wx-config.app-id}&secret=${wx-config.secret}
-    #弹出让用户确认授权的页面
-    auth-login-url: https://open.weixin.qq.com/connect/oauth2/authorize?appid=${wx-config.app-id}&redirect_uri=REDIRECT_URI&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect
-    js-api-token-url: https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=ACCESS_TOKEN&type=jsapi
-    openid-url: https://api.weixin.qq.com/sns/oauth2/access_token?appid=${wx-config.app-id}&secret=${wx-config.secret}&code=CODE&grant_type=authorization_code
-jh-config:
-  product-type: 10000301
-  business-merchant-no: PRO88882021122310003030
-  merchant-no: PRO88882021122310003030
-  trade-type: GAS_PAY
-  pay-secret: f0b9d6ea704d4c03a6b44be50d055025