diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java index 4e602d97b..45d6417d4 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java @@ -65,22 +65,45 @@ public class WxFinanceController extends BaseController { private SysConfigService sysConfigService; /** - * 账单类型(非能源) + * 账单合同类型(可自定义的) * @return */ - @GetMapping("billTypes") - public ResultData billTypes() { + @GetMapping("contractBillTypes") + public ResultData contractBillTypes() { List list = new ArrayList(); - for (EnumBillAllType t : EnumBillAllType.getCommonOperateTypes()) { - Map m = new HashMap(); - m.put("id", t.getCode()); - m.put("name", t.getMessage()); - m.put("isFixedPrice", t.isFixedPrice()); - list.add(m); + for (EnumBillAllType t : EnumBillAllType.values()) { + if (t == EnumBillAllType.RENT_DEPOSIT || t == EnumBillAllType.PROPERTY) { + Map m = new HashMap(); + m.put("id", t.getCode()); + m.put("name", t.getMessage()); + m.put("isFixedPrice", t.isFixedPrice()); + m.put("isDeposit", t.isDeposit()); + list.add(m); + } } return new ResultData(list); } + /** + * 账单临时类型(可自定义的) + * @return + */ + @GetMapping("otherBillTypes") + public ResultData otherBillTypes() { + List list = new ArrayList(); + for (EnumBillAllType t : EnumBillAllType.values()) { + if (t == EnumBillAllType.OTHER || t == EnumBillAllType.OTHER_DEPOSIT) { + Map m = new HashMap(); + m.put("id", t.getCode()); + m.put("name", t.getMessage()); + m.put("isFixedPrice", t.isFixedPrice()); + m.put("isDeposit", t.isDeposit()); + list.add(m); + } + } + return new ResultData(list); + } + @ApiOperation("费用科目列表") @GetMapping("feesList") @ApiImplicitParams({ diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumBillAllType.java b/mallinkService/src/main/java/com/iformall/enums/EnumBillAllType.java index 34f5f3b80..e2245dee8 100644 --- a/mallinkService/src/main/java/com/iformall/enums/EnumBillAllType.java +++ b/mallinkService/src/main/java/com/iformall/enums/EnumBillAllType.java @@ -72,17 +72,13 @@ public enum EnumBillAllType { return ret; } - //财务可以通用自定义的 - public static EnumBillAllType[] getCommonOperateTypes() { - EnumBillAllType[] ret = new EnumBillAllType[] {RENT_DEPOSIT,PROPERTY,OTHER,OTHER_DEPOSIT}; - return ret; - } - public static List getCalucuteUnites(Integer type) { //需要计算的费用,非一次性费用 List retList = new ArrayList(); if (type.intValue() == RENT.getCode().intValue() || type.intValue() == RENT_BUSSINESS_MANAGE.getCode().intValue() - || type.intValue() == RENT_OPERATION_MANAGE.getCode().intValue() || type.intValue() == PROPERTY.getCode().intValue() || type.intValue() == RENT_DEPOSIT.getCode().intValue()) { + || type.intValue() == RENT_OPERATION_MANAGE.getCode().intValue() || type.intValue() == PROPERTY.getCode().intValue() + || type.intValue() == RENT_DEPOSIT.getCode().intValue() || type.intValue() == OTHER.getCode().intValue() + || type.intValue() == OTHER_DEPOSIT.getCode().intValue()) { retList.add(EnumFeesStandardsCalcuteUnit.MM); retList.add(EnumFeesStandardsCalcuteUnit.HU); }else if (type.intValue() == DAILY.getCode().intValue()) {