qzyReal 3 anni fa
parent
commit
79c909068f

+ 1 - 1
app/pages/wx/pay.vue

@@ -246,7 +246,7 @@
 		display: flex;
 		align-items: center;
 		margin: 15rpx 30rpx;
-		padding: 40rpx 30rpx;
+		padding: 18rpx 30rpx;
 		border-radius: 10rpx;
 		background-color: #fff;
 		border: 1rpx solid #f5f5f5;

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

@@ -84,8 +84,8 @@ public class WxService {
         params.put("body", "支付中心-业务订单支付");
         params.put("out_trade_no", out_trade_no+"_"+System.currentTimeMillis()/1000);
         params.put("attach", JSONUtil.toJsonStr(atchMap));
-//        String total_free = Integer.parseInt(money) * 100 + "";
-        String total_free = "1";
+        String total_free = Integer.parseInt(money) * 100 + "";
+//        String total_free = "1";
         log.info("pay free:{}", total_free);
         params.put("total_fee", total_free);
         // params.put("total_fee", "1");

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

@@ -157,6 +157,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             storeMsg(t.getCustomerId(), "业务订单:【" + t.getNo() + "】数据发生更改," + DateUtil.now() + "。");
         }
         List<TbBusinessItem> items = JSONUtil.toList(t.getItemJson(), TbBusinessItem.class);
+
         saveOrUpdate(t);
         createBusinessPeople(t);
         tbBusinessItemService.removeByBusinessId(t.getId());

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

@@ -40,8 +40,7 @@ public class TbBusinessCarController {
 	@RequestMapping("delete")
 	@SaCheckPermission(TbBusiness.PERMISSION_CODE)
 	public AjaxJson delete(String id) {
-		tbBusinessCarService.deleteCar(id);
-		return AjaxJson.getSuccess();
+		return tbBusinessCarService.deleteCar(id);
 	}
 
 	@RequestMapping(value = "findInAndNoBusinessCar")

+ 13 - 8
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarService.java

@@ -117,7 +117,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
     }
 
     public void add(TbBusinessCar t) throws Exception {
-        String carNo = t.getCarNo();
+        String carNo = t.getCarNo().toUpperCase();
         TbBusinessCar db = this.check(carNo);
         String businessId = t.getBusinessId();
         if (db != null) {
@@ -128,13 +128,13 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
             throw new Exception("车辆已存在");
         }
         TbBusiness tbBusiness = tbBusinessService.getById(businessId);
-        if (tbBusiness != null) {
-            tbBusiness.setChinaPartMoney(tbBusiness.getChinaPartMoney().add(partConfig.getBasePrice()))
-                    .setTotalMoney(tbBusiness.getTotalMoney().add(partConfig.getBasePrice()));
-            tbBusinessService.updateById(tbBusiness);
+        if (!CAR_LIST.contains(carNo)) {
+            tbBusiness.setCardNo(carNo);
+            tbBusiness.setCardSize(t.getCarSize());
         }
-
-
+        tbBusiness.setChinaPartMoney(tbBusiness.getChinaPartMoney().add(partConfig.getBasePrice()))
+                .setTotalMoney(tbBusiness.getTotalMoney().add(partConfig.getBasePrice()));
+        tbBusinessService.updateById(tbBusiness);
         this.save(t);
     }
 
@@ -172,14 +172,19 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
         return getOne(ew);
     }
 
-    public void deleteCar(String id) {
+    public AjaxJson deleteCar(String id) {
         TbBusinessCar db = this.getById(id);
+        if (!CAR_LIST.contains(db.getCarNo())) {
+            return AjaxJson.getError("越南车不能删除");
+        }
         this.removeById(id);
         TbBusiness tbBusiness = tbBusinessService.getById(db.getBusinessId());
+
         if (tbBusiness != null) {
             tbBusiness.setChinaPartMoney(tbBusiness.getChinaPartMoney().subtract(partConfig.getBasePrice()))
                     .setTotalMoney(tbBusiness.getTotalMoney().subtract(partConfig.getBasePrice()));
             tbBusinessService.updateById(tbBusiness);
         }
+        return AjaxJson.getSuccess();
     }
 }