Browse Source

枚举提取

qzyReal 2 years ago
parent
commit
e6b0989749
26 changed files with 403 additions and 397 deletions
  1. 19 43
      sp-server/src/main/java/com/pj/api/open/service/OpenService.java
  2. 9 0
      sp-server/src/main/java/com/pj/api/pushfee/bo/SyncBillParam.java
  3. 4 6
      sp-server/src/main/java/com/pj/api/pushfee/task/FeeDetailSyncTask.java
  4. 4 6
      sp-server/src/main/java/com/pj/api/wx/service/WxService.java
  5. 65 0
      sp-server/src/main/java/com/pj/constants/business/CarEnum.java
  6. 36 0
      sp-server/src/main/java/com/pj/constants/business/FeeTypeEnum.java
  7. 76 0
      sp-server/src/main/java/com/pj/constants/business/GoodsEnum.java
  8. 25 0
      sp-server/src/main/java/com/pj/constants/business/PartFeeEnum.java
  9. 18 0
      sp-server/src/main/java/com/pj/constants/business/PersonEnum.java
  10. 15 0
      sp-server/src/main/java/com/pj/constants/business/SyncTypeEnum.java
  11. 13 0
      sp-server/src/main/java/com/pj/constants/business/TaxRate.java
  12. 11 13
      sp-server/src/main/java/com/pj/project/tb_account/AutomaticPay.java
  13. 33 37
      sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java
  14. 1 28
      sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCar.java
  15. 13 14
      sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarService.java
  16. 6 4
      sp-server/src/main/java/com/pj/project/tb_business_item/PayTask.java
  17. 4 73
      sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetails.java
  18. 31 32
      sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsService.java
  19. 2 2
      sp-server/src/main/java/com/pj/project/tb_fee_details/statics/FeeTypeStatics.java
  20. 4 35
      sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatistics.java
  21. 2 3
      sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsController.java
  22. 5 14
      sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsService.java
  23. 0 62
      sp-server/src/main/java/com/pj/project/tb_goods/TbGoods.java
  24. 4 3
      sp-server/src/main/java/com/pj/project/tb_goods/TbGoodsController.java
  25. 1 21
      sp-server/src/main/java/com/pj/project/tb_item/TbItem.java
  26. 2 1
      sp-server/src/main/java/com/pj/project/tb_item/TbItemController.java

+ 19 - 43
sp-server/src/main/java/com/pj/api/open/service/OpenService.java

@@ -2,10 +2,6 @@ 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.img.ImgUtil;
-import cn.hutool.core.io.FileUtil;
-import cn.hutool.core.util.RandomUtil;
 import cn.hutool.core.util.RandomUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.json.JSONUtil;
@@ -13,9 +9,9 @@ import cn.hutool.log.StaticLog;
 import com.pj.api.open.ResultJson;
 import com.pj.api.open.bo.CheckCarNumberBO;
 import com.pj.api.open.bo.InRecordBO;
-import com.pj.constants.UserTypeEnum;
+import com.pj.constants.business.CarEnum;
+import com.pj.constants.business.GoodsEnum;
 import com.pj.current.config.PartConfig;
-import com.pj.current.config.SystemObject;
 import com.pj.current.task.TaskService;
 import com.pj.project.tb_account.AutomaticPay;
 import com.pj.project.tb_business.TbBusiness;
@@ -23,47 +19,27 @@ 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;
-import com.pj.project.tb_business_people.TbBusinessPeople;
-import com.pj.project.tb_business_people.TbBusinessPeopleService;
 import com.pj.project.tb_car.TbCar;
 import com.pj.project.tb_car.TbCarService;
-import com.pj.project.tb_car_no_color.TbCarNoColor;
-import com.pj.project.tb_car_no_color.TbCarNoColorService;
 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_type.TbItemType;
 import com.pj.project.tb_mild_car.TbMildCar;
 import com.pj.project.tb_mild_car.TbMildCarService;
-import com.pj.project4sp.global.BusinessException;
-import com.pj.project4sp.uploadfile.UploadConfig;
-import com.pj.utils.AesUtil;
 import com.pj.utils.cache.RedisUtil;
-import com.pj.utils.sg.AjaxJson;
-import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import sun.misc.BASE64Decoder;
 
 import javax.annotation.Resource;
-import javax.xml.crypto.Data;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.OutputStream;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
-import java.util.Collections;
 import java.util.Date;
 import java.util.List;
-import java.util.Objects;
 import java.util.stream.Collectors;
 
 @Service
@@ -132,8 +108,8 @@ public class OpenService {
             tbBusinessCar = new TbBusinessCar();
             tbBusinessCar.setCarNo(carNo).setPay(0).setCarSize(0D).setIsLock(0)
                     .setCarCompany(tbCar != null ? tbCar.getCustomerName() : "临时").setCreateTime(now)
-                    .setInChannel(channel).setRealInTime(now).setCarType(TbItem.ItemTypeEnum.EMPTY_TYPE.getType())
-                    .setBasePartMoney(new BigDecimal("0")).setTimeUpdate(now).setConfirmJudge(TbBusinessCar.ConfirmJudgeEnum.NO_NEED_JUDGE.getCode())
+                    .setInChannel(channel).setRealInTime(now).setCarType(CarEnum.CarTypeEnum.EMPTY_TYPE.getType())
+                    .setBasePartMoney(new BigDecimal("0")).setTimeUpdate(now).setConfirmJudge(CarEnum.ConfirmJudgeEnum.NO_NEED_JUDGE.getCode())
                     .setNo(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmm")) + RandomUtil.randomNumbers(4));
             tbBusinessCarService.save(tbBusinessCar);
             CoverBase64ToUrl(image, tbBusinessCar.getId(), carNo, 1);
@@ -181,8 +157,8 @@ public class OpenService {
             StaticLog.error("缓存离场图片,{}", carNo);
             IMAGE_CACHE.put(carNo, image);
         }
-        if (TbBusinessCar.BusinessTypeEnum.BUSINESS_CAR.getType().equals(tbBusinessCar.getBusinessType())) {
-            if (tbBusinessCar.getConfirmJudge() != TbBusinessCar.ConfirmJudgeEnum.JUDGE_PASS.getCode()) {
+        if (CarEnum.BusinessTypeEnum.BUSINESS_CAR.getType().equals(tbBusinessCar.getBusinessType())) {
+            if (tbBusinessCar.getConfirmJudge() != CarEnum.ConfirmJudgeEnum.JUDGE_PASS.getCode()) {
                 log.error("请求返回【业务未审核】:{}", carNo);
                 return ResultJson.error("业务未审核");
             }
@@ -233,7 +209,7 @@ public class OpenService {
             } else {
                 //无需交停车费,又没有支付的--->设置成免费车辆
                 if (tbBusinessCar.getPayTime() == null) {
-                    tbBusinessCar.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType()).setPay(1);
+                    tbBusinessCar.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType()).setPay(1);
                 }
                 freeOut(tbBusinessCar, now, channel, image);
                 return ResultJson.success();
@@ -243,7 +219,7 @@ public class OpenService {
             //1、分越重车和空车
             //空车是否收费
             //该车所有的业务都是到达卡口才进行扣费才会进入自动扣费
-            if (TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType)) {
+            if (CarEnum.CarTypeEnum.EMPTY_TYPE.getType().equals(carType)) {
                 boolean chinaCarPay = businessList.stream().anyMatch(tbBusiness -> {
                     TbGoods tbGoods = tbGoodsService.getById(tbBusiness.getGoodsId());
                     return tbGoods.getChinaCarPay() == 1;
@@ -257,7 +233,7 @@ public class OpenService {
                         //  return ResultJson.error("请缴停车费" + dif + "元");
                     } else {
                         if (tbBusinessCar.getPayTime() == null) {
-                            tbBusinessCar.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType()).setPay(1);
+                            tbBusinessCar.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType()).setPay(1);
                         }
                     }
                 }
@@ -275,7 +251,7 @@ public class OpenService {
                         //  return ResultJson.error("请缴停车费" + dif + "元");
                     } else {
                         if (tbBusinessCar.getPayTime() == null) {
-                            tbBusinessCar.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType()).setPay(1);
+                            tbBusinessCar.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType()).setPay(1);
                         }
                     }
                 }
@@ -286,15 +262,15 @@ public class OpenService {
         int autoPayCount=0;
         for (TbBusiness tbBusiness : businessList) {
             TbGoods tbGoods = tbGoodsService.getById(tbBusiness.getGoodsId());
-            if (TbGoods.DeductionTypeEnum.OUT_KK.getCode().equals(tbGoods.getAutoDeductionType())) {
+            if (GoodsEnum.DeductionTypeEnum.OUT_KK.getCode().equals(tbGoods.getAutoDeductionType())) {
                 autoPayCount++;
             }
             int vietnamLeave = tbGoods.getVietnamCarLeave();
             int chinaCarLeave = tbGoods.getChinaCarLeave();
             boolean pay = tbBusiness.getPayMoney().doubleValue() >= tbBusiness.getItemPrice().doubleValue();
             //需要交业务费
-            if (TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType)) {//越南车==重车
-                if (TbGoods.LeaveEnum.PART_MONEY.getCode() != vietnamLeave
+            if (CarEnum.CarTypeEnum.WEIGHT_TYPE.getType().equals(carType)) {//越南车==重车
+                if (GoodsEnum.LeaveEnum.PART_MONEY.getCode() != vietnamLeave
                         && !pay) {
                     RedisUtil.setByMINUTES(channel, carNo, 5);
                     log.error("越南车==重车:缴纳业务费用:{}", carNo);
@@ -302,7 +278,7 @@ public class OpenService {
                     // return ResultJson.error("请缴纳业务费用");
                 }
             } else {
-                if (TbGoods.LeaveEnum.PART_MONEY.getCode() != chinaCarLeave
+                if (GoodsEnum.LeaveEnum.PART_MONEY.getCode() != chinaCarLeave
                         && !pay) {
                     RedisUtil.setByMINUTES(channel, carNo, 5);
                     businessMoney = businessMoney.add(tbBusiness.getItemPrice());
@@ -343,10 +319,10 @@ public class OpenService {
 
 
     private void freeOut(TbBusinessCar tbBusinessCar, Date now, String outChannel, String base64Image) {
-        if (StrUtil.equals(tbBusinessCar.getPayType(), TbBusinessCar.PayTypeEnum.NO_PAY_TYPE.getType())) {
+        if (StrUtil.equals(tbBusinessCar.getPayType(), CarEnum.PayTypeEnum.NO_PAY_TYPE.getType())) {
             BigDecimal partMoney = tbBusinessService.calculationPartMoney(tbBusinessCar.getRealInTime(), now, tbBusinessCar.getCarSize());
             if (partMoney.doubleValue() <= 0) {
-                tbBusinessCar.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
+                tbBusinessCar.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType());
             }
         }
         tbBusinessCar.setRealOutTime(now).setTimeUpdate(now).setOutChannel(outChannel);
@@ -388,16 +364,16 @@ public class OpenService {
             //蓝牌 4.2米以及以下
             if (color.contains(partConfig.getFreeColor())) {
                 if (tbMildCar == null) {
-                    tbBusinessCar.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType()).setPay(1);
+                    tbBusinessCar.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType()).setPay(1);
                 }
             }
             TbCar tbCar = tbCarService.findByCardNo(tbBusinessCar.getCarNo());
             if (tbCar != null && !TbCar.CarTypeEnum.BUSINESS_CAR.getType().equals(tbCar.getCarType())) {
-                tbBusinessCar.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
+                tbBusinessCar.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType());
                 List<TbBusiness> businessList = tbBusinessService.findOtherBusinessByCarId(tbBusinessCar.getId());
                 if (businessList.isEmpty()) {
                     //无业务&免费车===>无需审核
-                    tbBusinessCar.setConfirmJudge(TbBusinessCar.ConfirmJudgeEnum.NO_NEED_JUDGE.getCode());
+                    tbBusinessCar.setConfirmJudge(CarEnum.ConfirmJudgeEnum.NO_NEED_JUDGE.getCode());
                 }
             }
             tbBusinessCar.setColor(color);

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

@@ -127,4 +127,13 @@ public class SyncBillParam implements Serializable {
      * 实际金额
      */
     private BigDecimal actPrice;
+
+    /**
+     * 支付渠道编号
+     */
+    private String paymentWayNo;
+    /**
+     * 支付渠道名称
+     */
+    private String paymentWayName;
 }

+ 4 - 6
sp-server/src/main/java/com/pj/api/pushfee/task/FeeDetailSyncTask.java

@@ -1,14 +1,10 @@
 package com.pj.api.pushfee.task;
 
-import cn.com.btxc.micro.uni.openapi.api.DemoResponse;
 import cn.com.btxc.micro.uni.openapi.inject.ComposeOperation;
-import cn.com.btxc.micro.uni.openapi.inter.ErrorObj;
-import cn.com.btxc.micro.uni.openapi.inter.ResponseCallBack;
 import cn.com.btxc.micro.uni.openapi.inter.message.Message;
 import cn.com.btxc.micro.uni.openapi.keys.ApiKey;
 import cn.com.btxc.micro.uni.openapi.role.ClientRole;
 import cn.com.btxc.micro.uni.openapi.role.builder.ClientRoleBuilder;
-import cn.com.btxc.micro.uni.openapi.rsa.beans.BaseParsedMessage;
 import cn.com.btxc.micro.uni.openapi.rsa.operation.ComposeOperationImpl;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.extra.spring.SpringUtil;
@@ -18,6 +14,8 @@ import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 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.current.config.PushfeeConfig;
 import com.pj.current.task.Task;
 import com.pj.project.tb_costomer.TbCostomer;
@@ -56,7 +54,7 @@ public class FeeDetailSyncTask extends Task {
         SyncBillParam opd = new SyncBillParam();
         String itemTypeId = tbFeeDetails.getItemTypeId();
         if (StrUtil.isEmpty(itemTypeId)) {
-            itemTypeId = TbFeeDetails.PartFeeEnum.getNoByDesc(tbFeeDetails.getItemTypeName());
+            itemTypeId = PartFeeEnum.getNoByDesc(tbFeeDetails.getItemTypeName());
         }
         String itemId = tbFeeDetails.getItemId();
         if (StrUtil.isEmpty(itemId)) {
@@ -75,7 +73,7 @@ public class FeeDetailSyncTask extends Task {
         opd.setSyncType(syncType).setQuantity(tbFeeDetails.getNum().toString())
                 .setSubjectName(tbFeeDetails.getCarNo()).setSubBillNo(subBillNo)
                 .setBizTypeNo(itemTypeId).setBizTypeName(tbFeeDetails.getItemTypeName())
-                .setChargeItemName(TbFeeDetails.fee.getDesc(tbFeeDetails.getFeeType())).setChargeItemNo(tbFeeDetails.getFeeType() + "")
+                .setChargeItemName(FeeTypeEnum.getDesc(tbFeeDetails.getFeeType())).setChargeItemNo(tbFeeDetails.getFeeType() + "")
                 .setClassifyPath(classifyPath).setPartnersName(partnersName)
                 .setPaidSerialNo(tbFeeDetails.getTransactionId())
                 .setPaidAmount(tbFeeDetails.getItemPrice().toString()).setRefundAmount("0").setPayStatus("支付成功")

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

@@ -1,7 +1,6 @@
 package com.pj.api.wx.service;
 
 import cn.hutool.core.date.DateUtil;
-import cn.hutool.core.net.URLDecoder;
 import cn.hutool.core.util.NumberUtil;
 import cn.hutool.core.util.RandomUtil;
 import cn.hutool.core.util.StrUtil;
@@ -14,6 +13,7 @@ import com.alibaba.fastjson.JSON;
 import com.pj.api.wx.WxUtils;
 import com.pj.api.wx.bo.*;
 import com.pj.api.wx.vo.PrePayVO;
+import com.pj.constants.business.CarEnum;
 import com.pj.current.config.MyConfig;
 import com.pj.current.config.PartConfig;
 import com.pj.current.config.WxConfig;
@@ -26,13 +26,11 @@ 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_charge_record.TbChargeRecord;
-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_order.TbOrder;
 import com.pj.project.tb_order.TbOrderService;
 import com.pj.project.wx_send_msg.WxSendMsg;
@@ -243,7 +241,7 @@ public class WxService {
                     continue;
                 }
                 car.setPay(1).setMoney(price).setPayTime(payTime)
-                        .setPayType(TbBusinessCar.PayTypeEnum.HAS_PAY_TYPE.getType())
+                        .setPayType(CarEnum.PayTypeEnum.HAS_PAY_TYPE.getType())
                         .setOutTradeNo(outTradeNo)
                         .setPayOpenid(payopenid);
                 tbBusinessCarService.updateById(car);
@@ -271,8 +269,8 @@ public class WxService {
                     carList.forEach(tbBusinessCar -> {
                         String carType = tbBusinessCar.getCarType();
                         //
-                        if (TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType) && tbGoods.getChinaCarPay() == 0
-                                || TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType) && tbGoods.getVietnamCarPay() == 0) {
+                        if (CarEnum.CarTypeEnum.EMPTY_TYPE.getType().equals(carType) && tbGoods.getChinaCarPay() == 0
+                                || CarEnum.CarTypeEnum.WEIGHT_TYPE.getType().equals(carType) && tbGoods.getVietnamCarPay() == 0) {
                             tbBusinessCar.setPay(1).setPayTime(finalPayTime).setPayOpenid(payopenid);
                             tbBusinessCarService.updateById(tbBusinessCar);
                         }

+ 65 - 0
sp-server/src/main/java/com/pj/constants/business/CarEnum.java

@@ -0,0 +1,65 @@
+package com.pj.constants.business;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Getter
+@AllArgsConstructor
+public class CarEnum {
+    @Getter
+    @AllArgsConstructor
+    public static enum CarTypeEnum {
+
+
+    EMPTY_TYPE("空车", "空车"),
+    WEIGHT_TYPE("载重", "载重");
+
+    private String type;
+    private String desc;
+
+    public static List<Map<String, String>> getList() {
+        List<Map<String, String>> list = new ArrayList<>();
+        for (CarEnum.CarTypeEnum tbItem : CarEnum.CarTypeEnum.values()) {
+            Map<String, String> map = new HashMap<>();
+            map.put("id", tbItem.getType());
+            map.put("name", tbItem.getDesc());
+            list.add(map);
+        }
+        return list;
+    }
+    }
+
+    @Getter
+    @AllArgsConstructor
+    public static enum PayTypeEnum {
+        FEE_TYPE("免费"),
+        HAS_PAY_TYPE("已支付"),
+        NO_PAY_TYPE("未支付");
+        private String type;
+    }
+
+    @Getter
+    @AllArgsConstructor
+    public static enum BusinessTypeEnum {
+        NO_BUSINESS(0, "非业务车"),
+        BUSINESS_CAR(1, "业务车");
+        private Integer type;
+        private String typeDesc;
+    }
+    @Getter
+    @AllArgsConstructor
+    public static enum ConfirmJudgeEnum {
+        NO_JUDGE(0, "未审核"),
+        JUDGE_PASS(1, "审核通过"),
+        CALL_BACK(2, "审核驳回"),
+        NO_NEED_JUDGE(3, "无需审核"),
+        ;
+        private int code;
+        private String desc;
+    }
+}

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

@@ -0,0 +1,36 @@
+package com.pj.constants.business;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.*;
+
+@Getter
+@AllArgsConstructor
+public enum FeeTypeEnum {
+    OTHER_FEE(-1, "其他"),
+    NUCLEIC_FEE(1, "核酸检测"),
+    DISINFECT_FEE(2, "消杀作业"),
+    STEVEDORE_FEE(3, "装卸作业"),
+    PARK_FEE(4, "停车业务"),
+    WEIGHT_FEE(5, "过磅费"),
+    MANAGE_FEE(6, "入场管理费"),
+    CHARGE_FEE(7, "充电打冷作业");
+    private int code;
+    private String desc;
+
+    public static List<Map<String, Object>> getList() {
+        List<Map<String, Object>> list = new ArrayList<>();
+        for (FeeTypeEnum feeTypeEnum : FeeTypeEnum.values()) {
+            Map<String, Object> map = new HashMap<>();
+            map.put("id", feeTypeEnum.getCode());
+            map.put("name", feeTypeEnum.getDesc());
+            list.add(map);
+        }
+        return list;
+    }
+    public static String getDesc(int code) {
+      return   Arrays.stream(FeeTypeEnum.values()).filter(feeTypeEnum -> feeTypeEnum.getCode()==code)
+                .findAny().orElse(OTHER_FEE).getDesc();
+    }
+}

+ 76 - 0
sp-server/src/main/java/com/pj/constants/business/GoodsEnum.java

@@ -0,0 +1,76 @@
+package com.pj.constants.business;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@AllArgsConstructor
+@Getter
+public class GoodsEnum {
+
+    @Getter
+    @AllArgsConstructor
+    public static enum PayStep {
+        BEFORE_CONFIRM(1, "下单后"),
+        AFTER_CONFIRM(2, "确认订单后");
+        private Integer code;
+        private String desc;
+
+        public static List<Map<String, Object>> getList() {
+            List<Map<String, Object>> list = new ArrayList<>();
+            for (PayStep tbItem : PayStep.values()) {
+                Map<String, Object> map = new HashMap<>();
+                map.put("id", tbItem.getCode());
+                map.put("name", tbItem.getDesc());
+                list.add(map);
+            }
+            return list;
+        }
+    }
+
+    @Getter
+    @AllArgsConstructor
+    public static enum LeaveEnum {
+        PART_MONEY(1, "只交停车费"),
+        BUSINESS_MONEY(2, "只交业务费"),
+        APART_BUSINESS(3, "停车费+业务费");
+        private Integer code;
+        private String desc;
+
+        public static List<Map<String, Object>> getList() {
+            List<Map<String, Object>> list = new ArrayList<>();
+            for (LeaveEnum tbItem : LeaveEnum.values()) {
+                Map<String, Object> map = new HashMap<>();
+                map.put("id", tbItem.getCode());
+                map.put("name", tbItem.getDesc());
+                list.add(map);
+            }
+            return list;
+        }
+    }
+
+    @Getter
+    @AllArgsConstructor
+    public static enum DeductionTypeEnum {
+        BUSINESS_OK(1, "业务单确认后扣费"),
+        OUT_KK(2, "到达卡口扣费");
+        private Integer code;
+        private String desc;
+
+        public static List<Map<String, Object>> getList() {
+            List<Map<String, Object>> list = new ArrayList<>();
+            for (DeductionTypeEnum tbItem : DeductionTypeEnum.values()) {
+                Map<String, Object> map = new HashMap<>();
+                map.put("id", tbItem.getCode());
+                map.put("name", tbItem.getDesc());
+                list.add(map);
+            }
+            return list;
+        }
+    }
+
+}

+ 25 - 0
sp-server/src/main/java/com/pj/constants/business/PartFeeEnum.java

@@ -0,0 +1,25 @@
+package com.pj.constants.business;
+
+import cn.hutool.core.util.StrUtil;
+import com.pj.project.tb_fee_details.TbFeeDetails;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.Arrays;
+
+@Getter
+@AllArgsConstructor
+public enum PartFeeEnum {
+    DAY_PART("1", "白天停车"),
+    NIGHT_PART("2", "夜间停车"),
+    IN_24_HOURS("3","24小时内停车服务收费"),
+    OUT_24_HOURS("4","停放超24小时停车服务收费"),
+    UNKNOW("-1", "未知"),
+    ;
+    private String no;
+    private String desc;
+    public static String getNoByDesc(String desc){
+        return Arrays.stream(PartFeeEnum.values()).filter(obj-> StrUtil.equals(desc,obj.getDesc()))
+                .findAny().orElse(UNKNOW).getNo();
+    }
+}

+ 18 - 0
sp-server/src/main/java/com/pj/constants/business/PersonEnum.java

@@ -0,0 +1,18 @@
+package com.pj.constants.business;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+//(1=核酸检测,2=消杀作业,3=装卸作业,4=停车费,5=过磅费)
+public  enum PersonEnum {
+    JICHA(1, "统计稽查员"),
+    KAIDAN(2, "开单员"),
+    FUHE(3, "复核员");
+
+    private int code;
+    private String desc;
+
+
+}

+ 15 - 0
sp-server/src/main/java/com/pj/constants/business/SyncTypeEnum.java

@@ -0,0 +1,15 @@
+package com.pj.constants.business;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@AllArgsConstructor
+@Getter
+public enum SyncTypeEnum {
+    INSERT("insert", "新增"),
+    UPDATE("update", "更新"),
+    DELETE("delete", "删除");
+
+    private String code;
+    private String desc;
+}

+ 13 - 0
sp-server/src/main/java/com/pj/constants/business/TaxRate.java

@@ -0,0 +1,13 @@
+package com.pj.constants.business;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum TaxRate {
+    PARK(0.09, "停车费税率"),
+    BUSINESS(0.06, "业务费税率");
+    private Double value;
+    private String desc;
+}

+ 11 - 13
sp-server/src/main/java/com/pj/project/tb_account/AutomaticPay.java

@@ -4,11 +4,11 @@ package com.pj.project.tb_account;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.NumberUtil;
 import cn.hutool.core.util.RandomUtil;
-import cn.hutool.extra.spring.SpringUtil;
 import cn.hutool.log.StaticLog;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.pj.api.open.ResultJson;
 import com.pj.api.wx.bo.PriceBO;
+import com.pj.constants.business.CarEnum;
+import com.pj.constants.business.GoodsEnum;
 import com.pj.project.tb_business.TbBusiness;
 import com.pj.project.tb_business.TbBusinessService;
 import com.pj.project.tb_business_car.TbBusinessCar;
@@ -25,10 +25,8 @@ 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.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;
@@ -157,7 +155,7 @@ public class AutomaticPay {
         BigDecimal totalMoneyBig = new BigDecimal(totalMoney);
         BigDecimal balance = totalMoneyBig.subtract(tbBusiness.getItemPrice());
         //是否离场支付
-        boolean isOut = (TbGoods.DeductionTypeEnum.OUT_KK.getCode().equals(tbBusiness.getAutoDeductionType())) &&
+        boolean isOut = (GoodsEnum.DeductionTypeEnum.OUT_KK.getCode().equals(tbBusiness.getAutoDeductionType())) &&
                 this.feeType == 3;
         if (isOut) {
             parkingMoneyBig = getParkings(cars);
@@ -343,7 +341,7 @@ public class AutomaticPay {
      */
     private void updateTbBusinessCar(TbBusinessCar car) {
         if (car == null) return;
-        car.setPay(1).setPayTime(new Date()).setPayType(TbBusinessCar.PayTypeEnum.HAS_PAY_TYPE.getType());
+        car.setPay(1).setPayTime(new Date()).setPayType(CarEnum.PayTypeEnum.HAS_PAY_TYPE.getType());
         car.updateById();
     }
 
@@ -374,7 +372,7 @@ public class AutomaticPay {
         if (cars != null) {
             for (TbBusinessCar car : cars) {
                 if (isOut) {
-                    if (TbBusinessCar.PayTypeEnum.FEE_TYPE.getType().equals(car.getPayType())) {
+                    if (CarEnum.PayTypeEnum.FEE_TYPE.getType().equals(car.getPayType())) {
                         continue;
                     }
                     if (!businessNameList.contains("停车费")) {
@@ -448,7 +446,7 @@ public class AutomaticPay {
         BigDecimal value = new BigDecimal("0");
         for (TbBusinessCar car : cars) {
             value = value.add(this.caulatePrice(car, now));
-            car.setPayType(TbBusinessCar.PayTypeEnum.HAS_PAY_TYPE.getType());
+            car.setPayType(CarEnum.PayTypeEnum.HAS_PAY_TYPE.getType());
         }
         return value;
     }
@@ -465,10 +463,10 @@ public class AutomaticPay {
         BigDecimal value = new BigDecimal("0");
         for (TbBusinessCar car : cars) {
             if (isParkingFeeByBS(tbBusiness, car.getCarType())) {
-                car.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
+                car.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType());
             } else {
                 value = value.add(this.caulatePrice(car, now));
-                car.setPayType(TbBusinessCar.PayTypeEnum.HAS_PAY_TYPE.getType());
+                car.setPayType(CarEnum.PayTypeEnum.HAS_PAY_TYPE.getType());
             }
         }
         return value;
@@ -480,7 +478,7 @@ public class AutomaticPay {
      * @return true是免费
      */
     private boolean isParkingFeeByBS(TbBusiness tbBusiness, String carType) {
-        if (TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType)) {
+        if (CarEnum.CarTypeEnum.EMPTY_TYPE.getType().equals(carType)) {
             TbGoods tbGoods = tbGoodsService.getById(tbBusiness.getGoodsId());
             return tbGoods.getChinaCarPay() == 1;
         } else {//越南车=重车
@@ -609,7 +607,7 @@ public class AutomaticPay {
         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);
+        tbBusinessCar.setMoney(new BigDecimal(partMoney)).setPayType(CarEnum.PayTypeEnum.HAS_PAY_TYPE.getType()).setPayTime(now);
         List<PriceBO> priceBOList = new ArrayList<PriceBO>() {{
             add(new PriceBO(tbBusinessCar.getId(), tbBusinessCar.getMoney()));
         }};
@@ -672,7 +670,7 @@ public class AutomaticPay {
         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())
+        tbBusinessCar.setPay(1).setPayType(CarEnum.PayTypeEnum.HAS_PAY_TYPE.getType())
                 .setPayTime(now);
         tbBusinessCarService.updateById(tbBusinessCar);
         List<PriceBO> priceBOList = new ArrayList<PriceBO>() {{

+ 33 - 37
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java

@@ -8,7 +8,6 @@ import java.time.temporal.ChronoUnit;
 import java.util.*;
 import java.util.stream.Collectors;
 
-import cn.com.btxc.micro.uni.openapi.util.AESUtils;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.NumberUtil;
 import cn.hutool.core.util.RandomUtil;
@@ -21,12 +20,13 @@ 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.api.open.ResultJson;
 import com.pj.api.pushfee.oa.CallbackBO;
 import com.pj.api.wx.bo.MsgDataBO;
 import com.pj.api.wx.bo.PriceBO;
 import com.pj.api.wx.service.WxService;
 import com.pj.constants.UserTypeEnum;
+import com.pj.constants.business.CarEnum;
+import com.pj.constants.business.GoodsEnum;
 import com.pj.current.config.*;
 import com.pj.current.satoken.StpUserUtil;
 import com.pj.project.oa.bo.OAResultBO;
@@ -47,8 +47,6 @@ 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_no_color.TbCarNoColor;
-import com.pj.project.tb_car_no_color.TbCarNoColorService;
 import com.pj.project.tb_costomer.TbCostomer;
 import com.pj.project.tb_costomer.TbCostomerService;
 import com.pj.project.tb_declare.TbDeclare;
@@ -66,8 +64,6 @@ 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.project.tb_mild_car.TbMildCar;
-import com.pj.project.tb_mild_car.TbMildCarService;
 import com.pj.project.tb_notices.TbNoticesService;
 import com.pj.project.tb_sort_group.TbSortGroup;
 import com.pj.project.tb_sort_group.TbSortGroupService;
@@ -435,7 +431,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             });
             TbGoods tbGoods = tbGoodsService.getById(business.getGoodsId());
             //只有改业务是在确认后扣费才需要执行自动扣费
-            if (TbGoods.DeductionTypeEnum.BUSINESS_OK.getCode().equals(tbGoods.getAutoDeductionType())) {
+            if (GoodsEnum.DeductionTypeEnum.BUSINESS_OK.getCode().equals(tbGoods.getAutoDeductionType())) {
                 automaticPay.run(business.getId(), null, 2);
             }
         });
@@ -537,9 +533,9 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             TbGoods tbGoods = tbGoodsService.getById(tbBusiness.getGoodsId());
             Integer payStep = tbGoods.getPayStep();
             //确认订单后方可缴费
-            return TbGoods.PayStep.AFTER_CONFIRM.getCode().equals(payStep) && tbBusiness.getAdminConfirmInput() == 1
+            return GoodsEnum.PayStep.AFTER_CONFIRM.getCode().equals(payStep) && tbBusiness.getAdminConfirmInput() == 1
                     //或者下单后可缴费
-                    || TbGoods.PayStep.BEFORE_CONFIRM.getCode().equals(payStep) && tbBusiness.getAdminConfirmInput() >= 0;
+                    || GoodsEnum.PayStep.BEFORE_CONFIRM.getCode().equals(payStep) && tbBusiness.getAdminConfirmInput() >= 0;
         }).collect(Collectors.toList());
 
         List<String> businessIdList = businessList.stream().map(TbBusiness::getId).collect(Collectors.toList());
@@ -547,8 +543,8 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         result.put("showPay", true);
         result.put("businessId", businessIds);
         result.put("noJudgeCount", 0);
-        if (TbBusinessCar.BusinessTypeEnum.BUSINESS_CAR.getType().equals(tbBusinessCar.getBusinessType())) {
-            if (tbBusinessCar.getConfirmJudge() != TbBusinessCar.ConfirmJudgeEnum.JUDGE_PASS.getCode()) {
+        if (CarEnum.BusinessTypeEnum.BUSINESS_CAR.getType().equals(tbBusinessCar.getBusinessType())) {
+            if (tbBusinessCar.getConfirmJudge() != CarEnum.ConfirmJudgeEnum.JUDGE_PASS.getCode()) {
                 result.put("noJudgeCount", 1);
             }
         }
@@ -566,7 +562,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             if (outTime != null) {
                 String carType = tbBusinessCar.getCarType();
                 if (StrUtil.isEmpty(carType)) {
-                    carType = TbItem.ItemTypeEnum.EMPTY_TYPE.getType();
+                    carType = CarEnum.CarTypeEnum.EMPTY_TYPE.getType();
                 }
                 BigDecimal partMoney = calculationPartMoney(inTime, outTime, tbBusinessCar.getCarSize());
                 if (StrUtil.isNotEmpty(tbBusinessCar.getColor()) && tbBusinessCar.getCarSize() != null) {
@@ -577,14 +573,14 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                     }
                 }
                 //越南车牌,是否免费
-                if (TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType) && vietnamCarPay == 0) {
+                if (CarEnum.CarTypeEnum.WEIGHT_TYPE.getType().equals(carType) && vietnamCarPay == 0) {
                     partMoney = new BigDecimal("0");
                 }
                 //中国车,是否免费
-                if (TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType) && chinaCarPay == 0) {
+                if (CarEnum.CarTypeEnum.EMPTY_TYPE.getType().equals(carType) && chinaCarPay == 0) {
                     partMoney = new BigDecimal("0");
                 }
-                if (TbBusinessCar.PayTypeEnum.FEE_TYPE.getType().equals(tbBusinessCar.getPayType())) {
+                if (CarEnum.PayTypeEnum.FEE_TYPE.getType().equals(tbBusinessCar.getPayType())) {
                     partMoney = new BigDecimal("0");
                 }
                 carMap.put("price", partMoney);
@@ -723,7 +719,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         List<PriceBO> priceBOList = new ArrayList<>();
         TbGoods tbGoods = tbGoodsService.getById(db.getGoodsId());
         //该确认确未确认
-        if (tbGoods.getPayStep().equals(TbGoods.PayStep.AFTER_CONFIRM.getCode()) &&db.getAdminConfirmInput()==0) {
+        if (tbGoods.getPayStep().equals(GoodsEnum.PayStep.AFTER_CONFIRM.getCode()) &&db.getAdminConfirmInput()==0) {
             throw new AjaxError("该业务需要确认后才能收费");
         }
         for (TbBusinessCar tbBusinessCar : cars) {
@@ -745,7 +741,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                 }
             }
             tbBusinessCar.setPay(1).setPayTime(payTime)
-                    .setPayType(TbBusinessCar.PayTypeEnum.HAS_PAY_TYPE.getType());
+                    .setPayType(CarEnum.PayTypeEnum.HAS_PAY_TYPE.getType());
             if (payType == TbBusiness.PayType.PER_PAY.getCode()) {
                 TbDeductionBind deductionBind = tbDeductionBindService.getBindCarByPlate(carNo);
                 if (deductionBind != null) {
@@ -889,7 +885,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             //最新一条记录
             TbBusinessCar db = tbBusinessCarService.findTheLastRecord(carNo);
             //存在并且未离场+已审核
-            if (db != null && db.getConfirmJudge() == TbBusinessCar.ConfirmJudgeEnum.JUDGE_PASS.getCode() && db.getRealOutTime() == null) {
+            if (db != null && db.getConfirmJudge() == CarEnum.ConfirmJudgeEnum.JUDGE_PASS.getCode() && db.getRealOutTime() == null) {
                 throw new BusinessException("车辆【" + carNo + "】已审核,请驳回再录入业务");
             }
             if (!tbGoods.getName().contains("整车")) {
@@ -908,20 +904,20 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                     checkOtherBusiness(item.getItemTypeId(), otherBusinessBO.getOperateTime(), tbBusiness.getId(), carNo);
                 }
             }
-            db.setPayType(TbBusinessCar.PayTypeEnum.NO_PAY_TYPE.getType());
-            if ((TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType) && chinaCarPay == 0)
-                    || (TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType) && vietnamCarPay == 0)) {
-                db.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
+            db.setPayType(CarEnum.PayTypeEnum.NO_PAY_TYPE.getType());
+            if ((CarEnum.CarTypeEnum.EMPTY_TYPE.getType().equals(carType) && chinaCarPay == 0)
+                    || (CarEnum.CarTypeEnum.WEIGHT_TYPE.getType().equals(carType) && vietnamCarPay == 0)) {
+                db.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType());
             }
             TbCar tbCar = tbCarService.findByCardNo(carNo);
             if (tbCar != null) {
                 db.setCarCompany(tbCar.getCustomerName());
                 if (!TbCar.CarTypeEnum.BUSINESS_CAR.getType().equals(tbCar.getCarType())) {
-                    db.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
+                    db.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType());
                 }
             }
-            db.setCarNo(carNo).setIsLock(0).setBusinessType(TbBusinessCar.BusinessTypeEnum.BUSINESS_CAR.getType());
-            db.setCarSize(car.getCarSize()).setConfirmJudge(TbBusinessCar.ConfirmJudgeEnum.NO_JUDGE.getCode())//业务车都是未审核状态
+            db.setCarNo(carNo).setIsLock(0).setBusinessType(CarEnum.BusinessTypeEnum.BUSINESS_CAR.getType());
+            db.setCarSize(car.getCarSize()).setConfirmJudge(CarEnum.ConfirmJudgeEnum.NO_JUDGE.getCode())//业务车都是未审核状态
                     .setTimeUpdate(now).setCarType(car.getCarType())
                     .setNetWeight(car.getNetWeight()).setColor(car.getColor())
                     .setCustomerId(customerId)
@@ -1011,7 +1007,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             if (StrUtil.isNotEmpty(businessCarId)) {
                 //原来已存在的
                 TbBusinessCar dbBusinessCar = tbBusinessCarService.getById(businessCarId);
-                if (dbBusinessCar.getConfirmJudge() == TbBusinessCar.ConfirmJudgeEnum.JUDGE_PASS.getCode()) {
+                if (dbBusinessCar.getConfirmJudge() == CarEnum.ConfirmJudgeEnum.JUDGE_PASS.getCode()) {
                     throw new BusinessException("车辆【" + carNo + "】已审核,请驳回再录入业务");
                 }
                 //如果修改了车牌号
@@ -1027,8 +1023,8 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                                 .setCarNo(carNo).setCarType(tbBusinessCar.getCarType()).setCarSize(tbBusinessCar.getCarSize())
                                 .setNetWeight(tbBusinessCar.getNetWeight()).setCustomerId(dbBusiness.getCustomerId())
                                 .setTimeUpdate(now).setIsLock(0).setCarType(tbBusinessCar.getCarType());
-                        if ((TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType) && chinaCarPay == 0) || (TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType) && vietnamCarPay == 0)) {
-                            otherCar.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
+                        if ((CarEnum.CarTypeEnum.EMPTY_TYPE.getType().equals(carType) && chinaCarPay == 0) || (CarEnum.CarTypeEnum.WEIGHT_TYPE.getType().equals(carType) && vietnamCarPay == 0)) {
+                            otherCar.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType());
                         }
                         tbBusinessCarService.save(otherCar);
                     } else {
@@ -1049,7 +1045,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                 TbBusinessCar checkCar = tbBusinessCarService.findTheLastRecord(carNo);
                 //存在+审核+未离场的
                 if (checkCar != null
-                        && checkCar.getConfirmJudge() == TbBusinessCar.ConfirmJudgeEnum.JUDGE_PASS.getCode()
+                        && checkCar.getConfirmJudge() == CarEnum.ConfirmJudgeEnum.JUDGE_PASS.getCode()
                         && checkCar.getRealOutTime() == null) {
                     throw new BusinessException("车辆【" + carNo + "】已审核,请驳回再录入业务");
                 }
@@ -1058,14 +1054,14 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                         (checkCar.getRealInTime() != null && checkCar.getRealOutTime() != null)) {
                     checkCar = new TbBusinessCar();
                     checkCar.setCreateTime(now).setPay(0).setBusinessType(1)
-                            .setConfirmJudge(TbBusinessCar.ConfirmJudgeEnum.NO_JUDGE.getCode())
+                            .setConfirmJudge(CarEnum.ConfirmJudgeEnum.NO_JUDGE.getCode())
                             .setNo(carBuseinssNo + RandomUtil.randomNumbers(4));
                 }
                 checkCar.setCarNo(carNo).setCarType(tbBusinessCar.getCarType()).setCarSize(tbBusinessCar.getCarSize())
                         .setNetWeight(tbBusinessCar.getNetWeight()).setCustomerId(dbBusiness.getCustomerId())
                         .setTimeUpdate(now).setIsLock(0).setCarType(tbBusinessCar.getCarType());
-                if ((TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType) && chinaCarPay == 0) || (TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType) && vietnamCarPay == 0)) {
-                    checkCar.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
+                if ((CarEnum.CarTypeEnum.EMPTY_TYPE.getType().equals(carType) && chinaCarPay == 0) || (CarEnum.CarTypeEnum.WEIGHT_TYPE.getType().equals(carType) && vietnamCarPay == 0)) {
+                    checkCar.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType());
                 }
                 tbBusinessCarService.saveOrUpdate(checkCar);
                 RelationBusinessCar relationBusinessCar = new RelationBusinessCar();
@@ -1231,7 +1227,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         if (outTime == null) {
             throw new AjaxError(carNo + "离场时间不能为空");
         }
-        if (payType.equals(TbBusinessCar.PayTypeEnum.HAS_PAY_TYPE.getType())) {
+        if (payType.equals(CarEnum.PayTypeEnum.HAS_PAY_TYPE.getType())) {
             if (payTime == null) {
                 throw new AjaxError(carNo + "支付时间不能为空");
             }
@@ -1486,15 +1482,15 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             }
 
             car.setCreateTime(now).setNo(carBuseinssNo + RandomUtil.randomNumbers(4));
-            if ((TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType) && chinaCarPay == 0)
-                    || (TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType) && vietnamCarPay == 0)) {
-                car.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
+            if ((CarEnum.CarTypeEnum.EMPTY_TYPE.getType().equals(carType) && chinaCarPay == 0)
+                    || (CarEnum.CarTypeEnum.WEIGHT_TYPE.getType().equals(carType) && vietnamCarPay == 0)) {
+                car.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType());
             }
             TbCar tbCar = tbCarService.findByCardNo(carNo);
             if (tbCar != null) {
                 car.setCarCompany(tbCar.getCustomerName());
                 if (!TbCar.CarTypeEnum.BUSINESS_CAR.getType().equals(tbCar.getCarType())) {
-                    car.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
+                    car.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType());
                 }
             }
             car.setCarNo(carNo).setIsLock(0);

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

@@ -158,33 +158,6 @@ public class TbBusinessCar extends Model<TbBusinessCar> implements Serializable
      */
     private String outTradeNo;
 
-    @Getter
-    @AllArgsConstructor
-    public static enum PayTypeEnum {
-        FEE_TYPE("免费"),
-        HAS_PAY_TYPE("已支付"),
-        NO_PAY_TYPE("未支付");
-        private String type;
-    }
-
-    @Getter
-    @AllArgsConstructor
-    public static enum BusinessTypeEnum {
-        NO_BUSINESS(0, "非业务车"),
-        BUSINESS_CAR(1, "业务车");
-        private Integer type;
-        private String typeDesc;
-    }
-    @Getter
-    @AllArgsConstructor
-    public static enum ConfirmJudgeEnum {
-        NO_JUDGE(0, "未审核"),
-        JUDGE_PASS(1, "审核通过"),
-        CALL_BACK(2, "审核驳回"),
-        NO_NEED_JUDGE(3, "无需审核"),
-        ;
-        private int code;
-        private String desc;
-    }
+
 
 }

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

@@ -9,22 +9,21 @@ import com.alibaba.excel.EasyExcel;
 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.constants.business.FeeTypeEnum;
+import com.pj.constants.business.CarEnum;
 import com.pj.current.config.PartConfig;
 import com.pj.current.config.SystemObject;
 import com.pj.current.satoken.StpUserUtil;
 import com.pj.project.relation_business_car.RelationBusinessCar;
 import com.pj.project.relation_business_car.RelationBusinessCarService;
-import com.pj.project.tb_account.AutomaticPay;
 import com.pj.project.tb_business.TbBusiness;
 import com.pj.project.tb_business.TbBusinessService;
 import com.pj.project.tb_business_car.statics.CarStatics;
 import com.pj.project.tb_car.TbCar;
 import com.pj.project.tb_car.TbCarService;
-import com.pj.project.tb_car_no_color.TbCarNoColorService;
 import com.pj.project.tb_deduction_bind.TbDeductionBindService;
 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_mild_car.TbMildCar;
 import com.pj.project.tb_mild_car.TbMildCarService;
 import com.pj.project4sp.global.BusinessException;
@@ -214,7 +213,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
         if (t.getColor().contains(partConfig.getFreeColor())) {
             TbMildCar tbMildCar = tbMildCarService.findByCarNo(carNo);
             if (tbMildCar == null) {
-                t.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType()).setPay(1);
+                t.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType()).setPay(1);
             }
         }
         this.saveOrUpdate(t);
@@ -224,7 +223,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
     public void updateCarRecord(TbBusinessCar t) throws Exception {
         String outRemark = t.getOutRemark();
         TbBusinessCar db = this.getById(t.getId());
-        if (db.getConfirmJudge() == TbBusinessCar.ConfirmJudgeEnum.JUDGE_PASS.getCode()) {
+        if (db.getConfirmJudge() == CarEnum.ConfirmJudgeEnum.JUDGE_PASS.getCode()) {
             throw new BusinessException("车辆【" + db.getCarNo() + "】已审核,请驳回再录入业务");
         }
         if (StrUtil.isEmpty(outRemark) && !Objects.equals(t.getRealOutTime(), db.getRealOutTime())) {
@@ -241,7 +240,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
         if (color.contains(partConfig.getFreeColor())) {
             TbMildCar tbMildCar = tbMildCarService.findByCarNo(carNo);
             if (tbMildCar == null) {
-                t.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType()).setPay(1);
+                t.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType()).setPay(1);
             }
         }
         if (db.getRealOutTime() == null && t.getRealOutTime() != null) {
@@ -256,7 +255,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
             t.setInTimeSupplement(1).setInTimeSupplementTime(new Date());
         }
         if (t.getRealInTime() != null && t.getRealOutTime() != null
-                && StrUtil.equals(db.getPayType(), TbBusinessCar.PayTypeEnum.NO_PAY_TYPE.getType())) {
+                && StrUtil.equals(db.getPayType(), CarEnum.PayTypeEnum.NO_PAY_TYPE.getType())) {
             BigDecimal money = tbBusinessService.calculationPartMoney(t.getRealInTime(), t.getRealOutTime(), t.getCarSize());
             t.setMoney(money);
             db.setMoney(money);
@@ -306,7 +305,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
             tbFeeDetailsService.updateBatchById(feeDetailsLIst);
         }
         if (businessList.isEmpty()) {
-            List<TbFeeDetails> feeDetailsList = tbFeeDetailsService.getByBusinessCarIdAndCarNoAndFeeType(t.getId(), oldCarNo, TbFeeDetails.fee.PARK_FEE.getCode());
+            List<TbFeeDetails> feeDetailsList = tbFeeDetailsService.getByBusinessCarIdAndCarNoAndFeeType(t.getId(), oldCarNo, FeeTypeEnum.PARK_FEE.getCode());
             for (TbFeeDetails feeDetail : feeDetailsList) {
                 if (feeDetail != null) {
                     feeDetail.setCarNo(newCarNo);
@@ -354,7 +353,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
     }
 
     public AjaxJson deleteRecord(String id) {
-        List<TbFeeDetails> tbFeeDetails = tbFeeDetailsService.findByBusinessCarId(id, TbFeeDetails.fee.PARK_FEE.getCode());
+        List<TbFeeDetails> tbFeeDetails = tbFeeDetailsService.findByBusinessCarId(id, FeeTypeEnum.PARK_FEE.getCode());
         if (!tbFeeDetails.isEmpty()) {
             return AjaxJson.getError("该车有付款记录,不能删除");
         }
@@ -449,7 +448,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
     public CarStatics staticsCar() {
         List<TbCar> cars = tbCarService.list();
         List<String> carNoList = cars.stream().map(TbCar::getCardNo).collect(Collectors.toList());
-        return tbBusinessCarMapper.staticsCar(TbItem.ItemTypeEnum.WEIGHT_TYPE.getType(), TbItem.ItemTypeEnum.EMPTY_TYPE.getType(), carNoList);
+        return tbBusinessCarMapper.staticsCar(CarEnum.CarTypeEnum.WEIGHT_TYPE.getType(), CarEnum.CarTypeEnum.EMPTY_TYPE.getType(), carNoList);
     }
 
     public List<TbBusinessCar> getPay(String day) {
@@ -477,7 +476,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
      */
     public void callback(String id, String judgeContent) {
         TbBusinessCar db = this.getById(id);
-        db.setConfirmJudge(TbBusinessCar.ConfirmJudgeEnum.CALL_BACK.getCode())
+        db.setConfirmJudge(CarEnum.ConfirmJudgeEnum.CALL_BACK.getCode())
                 .setConfirmJudgeContent(judgeContent).setConfirmJudgeTime(new Date())
                 .setConfirmJudgeBy(StpUserUtil.getCreateBy());
         this.updateById(db);
@@ -485,7 +484,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
         businessList.forEach(tbBusiness -> {
             List<TbBusinessCar> tbBusinessCars = this.findOtherBusinessCar(tbBusiness.getId());
             tbBusinessCars.stream().filter(tbBusinessCar -> !StrUtil.equals(tbBusinessCar.getId(),id)).forEach(tbBusinessCar -> {
-                tbBusinessCar.setConfirmJudge(TbBusinessCar.ConfirmJudgeEnum.CALL_BACK.getCode())
+                tbBusinessCar.setConfirmJudge(CarEnum.ConfirmJudgeEnum.CALL_BACK.getCode())
                         .setConfirmJudgeContent(judgeContent).setConfirmJudgeTime(new Date())
                         .setConfirmJudgeBy(StpUserUtil.getCreateBy());
                 this.updateById(tbBusinessCar);
@@ -503,7 +502,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
         businessList.forEach(tbBusiness -> {
             List<TbBusinessCar> tbBusinessCars = this.findOtherBusinessCar(tbBusiness.getId());
             tbBusinessCars.forEach(tbBusinessCar -> {
-                tbBusinessCar.setConfirmJudge(TbBusinessCar.ConfirmJudgeEnum.JUDGE_PASS.getCode())
+                tbBusinessCar.setConfirmJudge(CarEnum.ConfirmJudgeEnum.JUDGE_PASS.getCode())
                         .setConfirmJudgeContent("审核通过").setConfirmJudgeTime(new Date())
                         .setConfirmJudgeBy(StpUserUtil.getCreateBy());
                 this.updateById(tbBusinessCar);
@@ -521,7 +520,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
         QueryWrapper<TbBusinessCar> ew = new QueryWrapper<>();
         ew.lambda().like(TbBusinessCar::getCarNo, carNo)
                 .eq(TbBusinessCar::getPay, 0)
-                .eq(TbBusinessCar::getPayType, TbBusinessCar.PayTypeEnum.NO_PAY_TYPE.getType());
+                .eq(TbBusinessCar::getPayType, CarEnum.PayTypeEnum.NO_PAY_TYPE.getType());
         return list(ew);
     }
 }

+ 6 - 4
sp-server/src/main/java/com/pj/project/tb_business_item/PayTask.java

@@ -11,6 +11,8 @@ import cn.hutool.extra.spring.SpringUtil;
 import cn.hutool.log.StaticLog;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.pj.api.wx.bo.PriceBO;
+import com.pj.constants.business.CarEnum;
+import com.pj.constants.business.GoodsEnum;
 import com.pj.current.task.Task;
 import com.pj.project.tb_account.TbAccount;
 import com.pj.project.tb_account.TbAccountService;
@@ -172,7 +174,7 @@ public class PayTask extends Task {
         BigDecimal parkingMoneyBig = new BigDecimal(0);
         BigDecimal totalMoneyBig = new BigDecimal(totalMoney);
         BigDecimal balance = totalMoneyBig.subtract(tbBusiness.getItemPrice());
-        boolean isOut = (TbGoods.DeductionTypeEnum.OUT_KK.getCode()==tbBusiness.getAutoDeductionType())&&NbUtil.isNull(this.plate);
+        boolean isOut = (GoodsEnum.DeductionTypeEnum.OUT_KK.getCode()==tbBusiness.getAutoDeductionType())&&NbUtil.isNull(this.plate);
         if(isOut){
             parkingMoneyBig = getParkings(cars);
             balance = balance.subtract(parkingMoneyBig);
@@ -311,7 +313,7 @@ public class PayTask extends Task {
         int i = 0;
         for (TbFeeDetails feeDetails : tbFeeDetailsList){
             TbDeductionRecord deductionRecord = BeanUtil.toBean(feeDetails,TbDeductionRecord.class);
-            if(TbGoods.DeductionTypeEnum.BUSINESS_OK.getCode()==tbBusiness.getAutoDeductionType()){
+            if(GoodsEnum.DeductionTypeEnum.BUSINESS_OK.getCode()==tbBusiness.getAutoDeductionType()){
                 String bindIdStr = deductionBindService.getBindId(plate);
                 deductionRecord.setDeductionBindId(bindIdStr);
             }
@@ -347,7 +349,7 @@ public class PayTask extends Task {
     private void updateTbBusinessCar(TbBusinessCar car){
         if(car == null)return;
         car.setPay(1).setMoney(car.getMoney()).setPayTime(new Date()).setPayType(
-                    TbBusinessCar.PayTypeEnum.HAS_PAY_TYPE.getType());
+                    CarEnum.PayTypeEnum.HAS_PAY_TYPE.getType());
         car.updateById();
     }
 
@@ -373,7 +375,7 @@ public class PayTask extends Task {
         businessNoList.add(tbBusiness.getNo());
         carNos.add(tbBusiness.getCardNo());
         businessNameList.add(tbBusiness.getGoodsName());
-        if(cars!=null && (TbGoods.DeductionTypeEnum.OUT_KK.getCode()==tbBusiness.getAutoDeductionType()) &&
+        if(cars!=null && (GoodsEnum.DeductionTypeEnum.OUT_KK.getCode()==tbBusiness.getAutoDeductionType()) &&
                 NbUtil.isNull(this.plate)){
             businessNameList.add("停车费");
             for (TbBusinessCar car : cars) {

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

@@ -232,79 +232,10 @@ public class TbFeeDetails implements Serializable {
     private Integer syncStatus=0;
     private String module;
 
-    @Getter
-    @AllArgsConstructor
-    //(1=核酸检测,2=消杀作业,3=装卸作业,4=停车费,5=过磅费)
-    public static enum fee {
-        NUCLEIC_FEE(1, "核酸检测"),
-        DISINFECT_FEE(2, "消杀作业"),
-        STEVEDORE_FEE(3, "装卸作业"),
-        PARK_FEE(4, "停车业务"),
-        WEIGHT_FEE(5, "过磅费"),
-        MANAGE_FEE(6, "入场管理费"),
-        CHARGE_FEE(7, "充电打冷作业");
-        private int code;
-        private String desc;
-
-        public static String getDesc(int code) {
-            fee[] fees = values();
-            for (fee fee : fees) {
-                if (fee.getCode() == code) {
-                    return fee.getDesc();
-                }
-            }
-            return null;
-        }
-    }
-
-    @Getter
-    @AllArgsConstructor
-    //(1=核酸检测,2=消杀作业,3=装卸作业,4=停车费,5=过磅费)
-    public static enum personEnum {
-        JICHA(1, "统计稽查员"),
-        KAIDAN(2, "开单员"),
-        FUHE(3, "复核员");
-
-        private int code;
-        private String desc;
-
-
-    }
-    @Getter
-    @AllArgsConstructor
-    //(1=核酸检测,2=消杀作业,3=装卸作业,4=停车费,5=过磅费)
-    public static enum SyncTypeEnum {
-        INSERT("insert", "新增"),
-        UPDATE("update", "更新"),
-        DELETE("delete", "删除");
-
-        private String code;
-        private String desc;
-    }
-    @Getter
-    @AllArgsConstructor
-    public static enum ModuleEnum {
-        ONLINE("线上"),
-        OFFLINE("线下");
-        private String desc;
-    }
-    @Getter
-    @AllArgsConstructor
-    //(1=核酸检测,2=消杀作业,3=装卸作业,4=停车费,5=过磅费)
-    public static enum PartFeeEnum {
-        DAY_PART("1", "白天停车"),
-        NIGHT_PART("2", "夜间停车"),
-        IN_24_HOURS("3","24小时内停车服务收费"),
-        OUT_24_HOURS("4","停放超24小时停车服务收费"),
-        UNKNOW("-1", "未知"),
-        ;
-        private String no;
-        private String desc;
-        public static String getNoByDesc(String desc){
-           return Arrays.stream(PartFeeEnum.values()).filter(obj-> StrUtil.equals(desc,obj.getDesc()))
-                    .findAny().orElse(UNKNOW).getNo();
-        }
-    }
+
+    
+
+
 
 
 }

+ 31 - 32
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsService.java

@@ -10,7 +10,6 @@ import java.util.stream.Collectors;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.RandomUtil;
 import cn.hutool.core.util.StrUtil;
-import cn.hutool.json.JSONUtil;
 import com.alibaba.excel.EasyExcel;
 import com.alibaba.excel.ExcelWriter;
 import com.alibaba.excel.util.ListUtils;
@@ -22,6 +21,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.pj.api.pushfee.task.FeeDetailSyncTask;
 import com.pj.api.wx.bo.PriceBO;
+import com.pj.constants.business.*;
 import com.pj.current.config.MyConfig;
 import com.pj.current.config.PartConfig;
 import com.pj.current.satoken.StpUserUtil;
@@ -51,7 +51,6 @@ import com.pj.project4sp.role.SpRoleMapper;
 import com.pj.project4sp.uploadfile.UploadUtil;
 import com.pj.utils.sg.AjaxError;
 import com.pj.utils.so.SoMap;
-import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.poi.ss.usermodel.BorderStyle;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -239,10 +238,10 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
                 out24Details.setItemName("中小型货车(9.6米以下货车)");
             }
             //24小时内的停车费
-            in24Detail.setNum(1).setItemTypeName(TbFeeDetails.PartFeeEnum.IN_24_HOURS.getDesc())
+            in24Detail.setNum(1).setItemTypeName(PartFeeEnum.IN_24_HOURS.getDesc())
                     .setUnitPrice(in24Price).setItemPrice(in24Price).setModule(payType.getDesc()).setBusinessId(bindIdStr);
             setFee(in24Detail, car, transactionId, outTradeNo, now);
-            String type = StrUtil.isEmpty(in24Detail.getId()) ? TbFeeDetails.SyncTypeEnum.INSERT.getCode() : TbFeeDetails.SyncTypeEnum.UPDATE.getCode();
+            String type = StrUtil.isEmpty(in24Detail.getId()) ? SyncTypeEnum.INSERT.getCode() : SyncTypeEnum.UPDATE.getCode();
             saveOrUpdate(in24Detail);
             details.add(in24Detail);
             taskService.addTask(new FeeDetailSyncTask(RandomUtil.randomNumbers(10), 1000, in24Detail.getId(), type));
@@ -251,10 +250,10 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
             if (out24Price.compareTo(BigDecimal.valueOf(0)) > 0) {
                 BigDecimal unitPrice = in24Price.add(partConfig.getExtraPrice());
                 int num = out24Price.divide(unitPrice, BigDecimal.ROUND_UP, 0).intValue();
-                out24Details.setNum(num).setItemTypeName(TbFeeDetails.PartFeeEnum.OUT_24_HOURS.getDesc())
+                out24Details.setNum(num).setItemTypeName(PartFeeEnum.OUT_24_HOURS.getDesc())
                         .setUnitPrice(unitPrice).setItemPrice(out24Price).setModule(payType.getDesc()).setBusinessId(bindIdStr);
                 setFee(out24Details, car, transactionId, outTradeNo, now);
-                type = StrUtil.isEmpty(out24Details.getId()) ? TbFeeDetails.SyncTypeEnum.INSERT.getCode() : TbFeeDetails.SyncTypeEnum.UPDATE.getCode();
+                type = StrUtil.isEmpty(out24Details.getId()) ? SyncTypeEnum.INSERT.getCode() :SyncTypeEnum.UPDATE.getCode();
                 saveOrUpdate(out24Details);
                 taskService.addTask(new FeeDetailSyncTask(RandomUtil.randomNumbers(10), 1000, out24Details.getId(), type));
                 details.add(out24Details);
@@ -274,7 +273,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
         parkFee.setBusinessCarId(car.getId())
                 .setCarNo(car.getCarNo())
                 .setNoTaxPrice(noTaxPrice).setTaxPrice(taxPrice)
-                .setFeeType(TbFeeDetails.fee.PARK_FEE.getCode())
+                .setFeeType(FeeTypeEnum.PARK_FEE.getCode())
                 .setPayDay(toDay).setPayType(3).setCreateTime(now).setUpdateTime(now)
                 .setIsSettle(1).setPayMode(1).setPayTime(nowStr)
                 .setTransactionId(transactionId).setOutTradeNo(outTradeNo)
@@ -294,7 +293,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
      * @param transactionId
      * @param outTradeNo
      * @param now
-     * @param module        线上缴费/线下缴费
+     * @param
      */
     public List<TbFeeDetails> chargeBusinessFee(List<TbBusinessItem> items, String transactionId, String outTradeNo, Date now, TbBusiness.PayType payType) {
         String module = payType.getDesc();
@@ -319,9 +318,9 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
                 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.PART_MONEY.getCode().equals(businessCfg.getVietnamCarLeave())) {
+            if ((GoodsEnum.LeaveEnum.BUSINESS_MONEY.getCode().equals(businessCfg.getChinaCarLeave())
+                    || GoodsEnum.LeaveEnum.APART_BUSINESS.getCode().equals(businessCfg.getChinaCarLeave()))
+            &&GoodsEnum.LeaveEnum.PART_MONEY.getCode().equals(businessCfg.getVietnamCarLeave())) {
                 carNo = business.getChinaCarNo();
             }
             String businessCarIds = "";
@@ -351,7 +350,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
                     .setTransactionId(transactionId).setOutTradeNo(outTradeNo)
                     .setNum(Integer.valueOf(item.getNum()))
                     .setModule(module);
-            String type = StrUtil.isEmpty(businessFeeDetail.getId()) ? TbFeeDetails.SyncTypeEnum.INSERT.getCode() : TbFeeDetails.SyncTypeEnum.UPDATE.getCode();
+            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));
             feeDetails.add(businessFeeDetail);
@@ -390,7 +389,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
         List<TbFeeDetails> list = this.getList(so);
         Integer index = 1;
         for (TbFeeDetails feeDetails : list) {
-            String feeType = TbFeeDetails.fee.getDesc(feeDetails.getFeeType());
+            String feeType = FeeTypeEnum.getDesc(feeDetails.getFeeType());
             ExportFeeDetailDTO detailDTO = new ExportFeeDetailDTO();
             detailDTO.setBusinessNo(feeDetails.getBusinessNo()).setCarNo(feeDetails.getCarNo())
                     .setFeeType(feeType).setItemTypeName(feeDetails.getItemTypeName())
@@ -412,10 +411,10 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
                 detailDTO.setBusinessNo(feeDetails.getBusinessCarNo());
             }
             exportList.add(detailDTO);
-            if(checkTimeRange(nowStr, nowStr, feeDetails.getCreateTime()) && feeDetails.getFeeType()==TbFeeDetails.fee.PARK_FEE.getCode()){
+            if(checkTimeRange(nowStr, nowStr, feeDetails.getCreateTime()) && feeDetails.getFeeType()==FeeTypeEnum.PARK_FEE.getCode()){
                 toDayFee = toDayFee.add(feeDetails.getItemPrice());
             }
-            if(feeDetails.getFeeType()==TbFeeDetails.fee.PARK_FEE.getCode()){
+            if(feeDetails.getFeeType()==FeeTypeEnum.PARK_FEE.getCode()){
                 allParkFee = allParkFee.add(feeDetails.getItemPrice());
             }
             allDayFee = allDayFee.add(feeDetails.getItemPrice());
@@ -474,7 +473,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
         }
         int index = 1;
         for (TbFeeDetails feeDetails : list) {
-            String feeType = TbFeeDetails.fee.getDesc(feeDetails.getFeeType());
+            String feeType = FeeTypeEnum.getDesc(feeDetails.getFeeType());
             ExportFeeDetailDTO detailDTO = new ExportFeeDetailDTO();
             detailDTO.setBusinessNo(feeDetails.getBusinessNo()).setCarNo(feeDetails.getCarNo())
                     .setFeeType(feeType).setItemTypeName(feeDetails.getItemTypeName())
@@ -643,7 +642,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
         List<ExportFeeDetailDTO> printList = new ArrayList<>();
         Integer index = 1;
         for (TbFeeDetails feeDetails : feeDetaillist) {
-            String feeType = TbFeeDetails.fee.getDesc(feeDetails.getFeeType());
+            String feeType = FeeTypeEnum.getDesc(feeDetails.getFeeType());
             ExportFeeDetailDTO detailDTO = new ExportFeeDetailDTO();
             detailDTO.setBusinessNo(feeDetails.getBusinessNo()).setCarNo(feeDetails.getCarNo())
                     .setFeeType(feeType).setItemTypeName(feeDetails.getItemTypeName())
@@ -698,7 +697,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
     public void jiChaConfirm(List<Long> ids) {
         SpAdmin admin = StpUserUtil.getAdmin();
         SpRole role = spRoleMapper.getById(Long.valueOf(admin.getRoleId()));
-        if (!StrUtil.equals(TbFeeDetails.personEnum.JICHA.getDesc(), role.getName()) && !StrUtil.equals("admin", role.getType())) {
+        if (!StrUtil.equals(PersonEnum.JICHA.getDesc(), role.getName()) && !StrUtil.equals("admin", role.getType())) {
             throw new BusinessException("无操作权限");
         }
         List<TbFeeDetails> detailsList = this.listByIds(ids);
@@ -713,7 +712,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
             days.add(dayStr);
         }
         this.updateBatchById(detailsList);
-        changeStats(days, TbFeeDetails.personEnum.JICHA.getDesc());
+        changeStats(days, PersonEnum.JICHA.getDesc());
     }
 
     public void kaiDanConfirm(List<Long> ids) {
@@ -730,7 +729,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
             days.add(dayStr);
         }
         this.updateBatchById(detailsList);
-        changeStats(days, TbFeeDetails.personEnum.KAIDAN.getDesc());
+        changeStats(days, PersonEnum.KAIDAN.getDesc());
     }
 
     public void diaoDuConfirm(List<Long> ids) {
@@ -738,7 +737,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
         AtomicBoolean hasPermission = new AtomicBoolean(false);
         StrUtil.splitTrim(admin.getRoleId(), ",").forEach(roleId -> {
             SpRole role = spRoleMapper.getById(Long.valueOf(roleId));
-            if (StrUtil.equals(TbFeeDetails.personEnum.FUHE.getDesc(), role.getName()) || StrUtil.equals("admin", role.getType())) {
+            if (StrUtil.equals(PersonEnum.FUHE.getDesc(), role.getName()) || StrUtil.equals("admin", role.getType())) {
                 hasPermission.set(true);
             }
         });
@@ -757,14 +756,14 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
             days.add(dayStr);
         }
         this.updateBatchById(detailsList);
-        changeStats(days, TbFeeDetails.personEnum.FUHE.getDesc());
+        changeStats(days, PersonEnum.FUHE.getDesc());
     }
 
     private void changeStats(Set<String> days, String personType) {
         String personColumn = "";
-        if (StrUtil.equals(personType, TbFeeDetails.personEnum.JICHA.getDesc())) {
+        if (StrUtil.equals(personType, PersonEnum.JICHA.getDesc())) {
             personColumn = "ji_cha_person";
-        } else if (StrUtil.equals(personType, TbFeeDetails.personEnum.KAIDAN.getDesc())) {
+        } else if (StrUtil.equals(personType, PersonEnum.KAIDAN.getDesc())) {
             personColumn = "kai_dan_person";
         } else {
             personColumn = "diao_du_person";
@@ -779,9 +778,9 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
             if (confirmList.size() == thisDayTotal) {
                 Set<String> names = new TreeSet<>();
                 for (TbFeeDetails detail : confirmList) {
-                    if (StrUtil.equals(personType, TbFeeDetails.personEnum.JICHA.getDesc())) {
+                    if (StrUtil.equals(personType, PersonEnum.JICHA.getDesc())) {
                         names.add(detail.getJiChaPerson());
-                    } else if (StrUtil.equals(personType, TbFeeDetails.personEnum.KAIDAN.getDesc())) {
+                    } else if (StrUtil.equals(personType, PersonEnum.KAIDAN.getDesc())) {
                         names.add(detail.getKaiDanPerson());
                     } else {
                         names.add(detail.getDiaoDuPerson());
@@ -792,9 +791,9 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
                 ew3.eq("day_time", day);
                 List<TbFeeStatistics> statsList = tbFeeStatisticsService.list(ew3);
                 for (TbFeeStatistics thisDayStats : statsList) {
-                    if (StrUtil.equals(personType, TbFeeDetails.personEnum.JICHA.getDesc())) {
+                    if (StrUtil.equals(personType, PersonEnum.JICHA.getDesc())) {
                         thisDayStats.setJiChaPerson(personName);
-                    } else if (StrUtil.equals(personType, TbFeeDetails.personEnum.KAIDAN.getDesc())) {
+                    } else if (StrUtil.equals(personType, PersonEnum.KAIDAN.getDesc())) {
                         thisDayStats.setKaiDanPerson(personName);
                     } else {
                         thisDayStats.setDiaoDuPerson(personName);
@@ -810,7 +809,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
     public void jiChaCancel(List<Long> ids) {
         SpAdmin admin = StpUserUtil.getAdmin();
         SpRole role = spRoleMapper.getById(Long.valueOf(admin.getRoleId()));
-        if (!StrUtil.equals(TbFeeDetails.personEnum.JICHA.getDesc(), role.getName()) && !StrUtil.equals("admin", role.getType())) {
+        if (!StrUtil.equals(PersonEnum.JICHA.getDesc(), role.getName()) && !StrUtil.equals("admin", role.getType())) {
             throw new BusinessException("该操作需要统计稽查员的权限");
         }
         List<TbFeeDetails> detailsList = this.listByIds(ids);
@@ -884,8 +883,8 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
                 carNo = business.getChinaCarNo();
             }
             TbGoods businessCfg = tbGoodsService.getById(business.getGoodsId());
-            if ((TbGoods.LeaveEnum.BUSINESS_MONEY.getCode() == businessCfg.getChinaCarLeave() || TbGoods.LeaveEnum.APART_BUSINESS.getCode() == businessCfg.getChinaCarLeave())
-                    && TbGoods.LeaveEnum.BUSINESS_MONEY.getCode() != businessCfg.getVietnamCarLeave() && TbGoods.LeaveEnum.APART_BUSINESS.getCode() != businessCfg.getVietnamCarLeave()) {
+            if ((GoodsEnum.LeaveEnum.BUSINESS_MONEY.getCode() == businessCfg.getChinaCarLeave() || GoodsEnum.LeaveEnum.APART_BUSINESS.getCode() == businessCfg.getChinaCarLeave())
+                    && GoodsEnum.LeaveEnum.BUSINESS_MONEY.getCode() != businessCfg.getVietnamCarLeave() && GoodsEnum.LeaveEnum.APART_BUSINESS.getCode() != businessCfg.getVietnamCarLeave()) {
                 carNo = business.getChinaCarNo();
             }
             String businessCarIds = "";
@@ -932,7 +931,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
         parkFee.setBusinessCarId(car.getId())
                 .setCarNo(car.getCarNo())
                 .setNoTaxPrice(noTaxPrice).setTaxPrice(taxPrice)
-                .setFeeType(TbFeeDetails.fee.PARK_FEE.getCode())
+                .setFeeType(FeeTypeEnum.PARK_FEE.getCode())
                 .setPayDay(toDay).setPayType(5).setCreateTime(now).setUpdateTime(now)
                 .setIsSettle(1).setPayMode(1).setPayTime(nowStr)
                 .setTransactionId(transactionId).setOutTradeNo(outTradeNo)

+ 2 - 2
sp-server/src/main/java/com/pj/project/tb_fee_details/statics/FeeTypeStatics.java

@@ -1,6 +1,6 @@
 package com.pj.project.tb_fee_details.statics;
 
-import com.pj.project.tb_fee_details.TbFeeDetails;
+import com.pj.constants.business.FeeTypeEnum;
 import lombok.Data;
 import lombok.experimental.Accessors;
 
@@ -20,6 +20,6 @@ public class FeeTypeStatics implements Serializable {
         if (feeType == null) {
             return this.name;
         }
-        return TbFeeDetails.fee.getDesc(feeType);
+        return FeeTypeEnum.getDesc(feeType);
     }
 }

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

@@ -129,41 +129,10 @@ public class TbFeeStatistics implements Serializable {
     @TableField(exist = false)
     private BigDecimal statisticsMoney = new BigDecimal(0);
 
-    @Getter
-    @AllArgsConstructor
-    //(1=核酸检测,2=消杀作业,3=装卸作业,4=停车费,5=过磅费)
-    public static enum FeeTypeEnum {
-        NUCLEIC_FEE(1, "核酸检测"),
-        DISINFECT_FEE(2, "消杀作业"),
-        STEVEDORE_FEE(3, "装卸作业"),
-        PARK_FEE(4, "停车费"),
-        WEIGHT_FEE(5, "过磅费"),
-        MANAGE_FEE(6, "入场管理费"),
-        CHARGE_FEE(7, "充电打冷作业");
-        private int code;
-        private String desc;
-    }
-
-    @Getter
-    @AllArgsConstructor
-    public static enum taxRate {
-        PARK(0.09, "停车费税率"),
-        BUSINESS(0.06, "业务费税率");
-        private Double value;
-        private String desc;
-    }
-
-
-    public static List<Map<String, Object>> getList() {
-        List<Map<String, Object>> list = new ArrayList<>();
-        for (TbFeeStatistics.FeeTypeEnum feeTypeEnum : TbFeeStatistics.FeeTypeEnum.values()) {
-            Map<String, Object> map = new HashMap<>();
-            map.put("id", feeTypeEnum.getCode());
-            map.put("name", feeTypeEnum.getDesc());
-            list.add(map);
-        }
-        return list;
-    }
+
+
+
+
 
 
 }

+ 2 - 3
sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsController.java

@@ -1,9 +1,8 @@
 package com.pj.project.tb_fee_statistics;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
-import com.pj.current.satoken.StpUserUtil;
+import com.pj.constants.business.FeeTypeEnum;
 import com.pj.project4sp.SP;
-import com.pj.utils.sg.AjaxError;
 import com.pj.utils.sg.AjaxJson;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -171,7 +170,7 @@ public class TbFeeStatisticsController {
 
     @RequestMapping(value = "getFeeType")
     public AjaxJson getFeeType() {
-        return AjaxJson.getSuccessData(TbFeeStatistics.getList());
+        return AjaxJson.getSuccessData(FeeTypeEnum.getList());
     }
 
 

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

@@ -10,17 +10,11 @@ import com.alibaba.excel.write.metadata.fill.FillConfig;
 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.api.wx.bo.PriceBO;
+import com.pj.constants.business.FeeTypeEnum;
 import com.pj.current.config.MyConfig;
-import com.pj.current.config.PartConfig;
 import com.pj.current.satoken.StpUserUtil;
-import com.pj.project.relation_business_car.RelationBusinessCar;
-import com.pj.project.relation_business_car.RelationBusinessCarService;
-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_fee_details.TbFeeDetails;
 import com.pj.project.tb_fee_details.TbFeeDetailsService;
 import com.pj.project.tb_fee_details.dto.ExportFeeDetailDTO;
@@ -28,9 +22,6 @@ import com.pj.project.tb_fee_statistics.dto.ExportDayStatsDTO;
 import com.pj.project.tb_fee_statistics.dto.ExportMonthDataDTO;
 import com.pj.project.tb_fee_statistics.dto.PrintDayStatsDTO;
 import com.pj.project.tb_fee_statistics.dto.StatsSumDTO;
-import com.pj.project.tb_goods.TbGoods;
-import com.pj.project.tb_goods.TbGoodsService;
-import com.pj.project.tb_item_type.TbItemTypeService;
 import com.pj.project4sp.uploadfile.UploadUtil;
 import com.pj.utils.so.SoMap;
 import lombok.extern.slf4j.Slf4j;
@@ -152,11 +143,11 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
         List<TbFeeDetails> list = tbFeeDetailsService.list(qw);
         Integer totalNum = 0;
         for (TbFeeDetails feeDetail : list) {
-            if (feeDetail.getFeeType() == TbFeeStatistics.FeeTypeEnum.PARK_FEE.getCode()) {
+            if (feeDetail.getFeeType() == FeeTypeEnum.PARK_FEE.getCode()) {
                 totalNum = totalNum + feeDetail.getNum();
             }
         }
-        TbFeeStatistics feeStatistics = getByDayAndFeeType(day, TbFeeStatistics.FeeTypeEnum.PARK_FEE.getCode());
+        TbFeeStatistics feeStatistics = getByDayAndFeeType(day, FeeTypeEnum.PARK_FEE.getCode());
         feeStatistics.setNum(totalNum);
         this.updateById(feeStatistics);
         return feeStatistics;
@@ -307,7 +298,7 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
 
         List<ExportDayStatsDTO> printList = new ArrayList<>();
         for (TbFeeStatistics stats : statsList) {
-            String feeType = TbFeeDetails.fee.getDesc(stats.getFeeType());
+            String feeType = FeeTypeEnum.getDesc(stats.getFeeType());
             ExportDayStatsDTO dayStatsDTO = new ExportDayStatsDTO();
             dayStatsDTO.setDayTime(stats.getDay())
                     .setFeeType(feeType).setNum(stats.getNum())
@@ -381,7 +372,7 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
 
         List<ExportDayStatsDTO> exportList = new ArrayList<>();
         for (TbFeeStatistics stats : statsList) {
-            String feeType = TbFeeDetails.fee.getDesc(stats.getFeeType());
+            String feeType = FeeTypeEnum.getDesc(stats.getFeeType());
             ExportDayStatsDTO dayStatsDTO = new ExportDayStatsDTO();
             dayStatsDTO.setDayTime(stats.getDay())
                     .setFeeType(feeType).setNum(stats.getNum())

+ 0 - 62
sp-server/src/main/java/com/pj/project/tb_goods/TbGoods.java

@@ -105,66 +105,4 @@ public class TbGoods extends Model<TbGoods> implements Serializable {
     private Integer autoDeductionType;
 
 
-    @Getter
-    @AllArgsConstructor
-    public static enum PayStep {
-        BEFORE_CONFIRM(1, "下单后"),
-        AFTER_CONFIRM(2, "确认订单后");
-        private Integer code;
-        private String desc;
-
-        public static List<Map<String, Object>> getList() {
-            List<Map<String, Object>> list = new ArrayList<>();
-            for (PayStep tbItem : PayStep.values()) {
-                Map<String, Object> map = new HashMap<>();
-                map.put("id", tbItem.getCode());
-                map.put("name", tbItem.getDesc());
-                list.add(map);
-            }
-            return list;
-        }
-    }
-
-    @Getter
-    @AllArgsConstructor
-    public static enum LeaveEnum {
-        PART_MONEY(1, "只交停车费"),
-        BUSINESS_MONEY(2, "只交业务费"),
-        APART_BUSINESS(3, "停车费+业务费");
-        private Integer code;
-        private String desc;
-
-        public static List<Map<String, Object>> getList() {
-            List<Map<String, Object>> list = new ArrayList<>();
-            for (LeaveEnum tbItem : LeaveEnum.values()) {
-                Map<String, Object> map = new HashMap<>();
-                map.put("id", tbItem.getCode());
-                map.put("name", tbItem.getDesc());
-                list.add(map);
-            }
-            return list;
-        }
-    }
-
-    @Getter
-    @AllArgsConstructor
-    public static enum DeductionTypeEnum {
-        BUSINESS_OK(1, "业务单确认后扣费"),
-        OUT_KK(2, "到达卡口扣费");
-        private Integer code;
-        private String desc;
-
-        public static List<Map<String, Object>> getList() {
-            List<Map<String, Object>> list = new ArrayList<>();
-            for (DeductionTypeEnum tbItem : DeductionTypeEnum.values()) {
-                Map<String, Object> map = new HashMap<>();
-                map.put("id", tbItem.getCode());
-                map.put("name", tbItem.getDesc());
-                list.add(map);
-            }
-            return list;
-        }
-    }
-
-
 }

+ 4 - 3
sp-server/src/main/java/com/pj/project/tb_goods/TbGoodsController.java

@@ -3,6 +3,7 @@ package com.pj.project.tb_goods;
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.util.StrUtil;
 import com.pj.constants.UserTypeEnum;
+import com.pj.constants.business.GoodsEnum;
 import com.pj.current.satoken.StpUserUtil;
 import com.pj.project.tb_costomer.TbCostomer;
 import com.pj.project.tb_costomer.TbCostomerService;
@@ -226,12 +227,12 @@ public class TbGoodsController {
 
     @RequestMapping("getPayStep")
     public AjaxJson getPayStep() {
-        return AjaxJson.getSuccessData(TbGoods.PayStep.getList());
+        return AjaxJson.getSuccessData(GoodsEnum.PayStep.getList());
     }
 
     @RequestMapping("getLeaveSetting")
     public AjaxJson getLeaveSetting() {
-        return AjaxJson.getSuccessData(TbGoods.LeaveEnum.getList());
+        return AjaxJson.getSuccessData(GoodsEnum.LeaveEnum.getList());
     }
 
     /**
@@ -241,7 +242,7 @@ public class TbGoodsController {
      */
     @RequestMapping("getDeductionTypeList")
     public AjaxJson getDeductionTypeList() {
-        return AjaxJson.getSuccessData(TbGoods.DeductionTypeEnum.getList());
+        return AjaxJson.getSuccessData(GoodsEnum.DeductionTypeEnum.getList());
     }
 
     /**

+ 1 - 21
sp-server/src/main/java/com/pj/project/tb_item/TbItem.java

@@ -103,26 +103,6 @@ public class TbItem extends Model<TbItem> implements Serializable {
     @TableField(exist = false)
     private int inc;
 
-    @Getter
-    @AllArgsConstructor
-    public static enum ItemTypeEnum {
-        EMPTY_TYPE("空车", "空车"),
-        WEIGHT_TYPE("载重", "载重");
-
-        private String type;
-        private String desc;
-
-        public static List<Map<String, String>> getList() {
-            List<Map<String, String>> list = new ArrayList<>();
-            for (ItemTypeEnum tbItem : ItemTypeEnum.values()) {
-                Map<String, String> map = new HashMap<>();
-                map.put("id", tbItem.getType());
-                map.put("name", tbItem.getDesc());
-                list.add(map);
-            }
-            return list;
-        }
-
-    }
+
 
 }

+ 2 - 1
sp-server/src/main/java/com/pj/project/tb_item/TbItemController.java

@@ -1,6 +1,7 @@
 package com.pj.project.tb_item;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.pj.constants.business.CarEnum;
 import com.pj.project4sp.SP;
 import com.pj.utils.sg.AjaxJson;
 import com.pj.utils.so.SoMap;
@@ -113,7 +114,7 @@ public class TbItemController {
 
     @RequestMapping(value = "getItemType")
     public AjaxJson getItemType() {
-        return AjaxJson.getSuccessData(TbItem.ItemTypeEnum.getList());
+        return AjaxJson.getSuccessData(CarEnum.CarTypeEnum.getList());
     }
 
     // ------------------------- 前端接口 -------------------------