qzyReal 2 år sedan
förälder
incheckning
035963311c

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

@@ -273,6 +273,10 @@ public class TbBusinessController {
         return AjaxJson.getSuccess();
     }
 
+    /**
+     * 线下收费
+     * @return
+     */
     @RequestMapping("manualConfirm")
     @SaCheckPermission(TbBusiness.PERMISSION_MANUAL_PAY)
     public AjaxJson manualConfirm() {

+ 4 - 2
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java

@@ -675,7 +675,8 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             throw new BusinessException("业务不存在");
         }
         Date now = new Date();
-        db.setPayStatus(3).setPayMoney(db.getItemPrice()).setPayTime(now);
+        db.setPayStatus(TbBusiness.PayStatus.HAS_PAY_CONFIRM.getCode())
+                .setPayMoney(db.getItemPrice()).setPayTime(now);
         this.updateById(db);
         cars.forEach(tbBusinessCar -> {
             Date realInTime = tbBusinessCar.getRealInTime();
@@ -684,7 +685,8 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                 BigDecimal price = calculationPartMoney(realInTime, realOutTime);
                 tbBusinessCar.setMoney(price);
             }
-            tbBusinessCar.setPay(1).setPayTime(now);
+            tbBusinessCar.setPay(1).setPayTime(now)
+                    .setPayType(TbBusinessCar.PayTypeEnum.HAS_PAY_TYPE.getType());
             tbBusinessCarService.updateById(tbBusinessCar);
         });
         List<TbBusinessItem> items = tbBusinessItemService.findByBusinessId(id);