| @@ -65,22 +65,45 @@ public class WxFinanceController extends BaseController { | |||||
| private SysConfigService sysConfigService; | private SysConfigService sysConfigService; | ||||
| /** | /** | ||||
| * 账单类型(非能源) | |||||
| * 账单合同类型(可自定义的) | |||||
| * @return | * @return | ||||
| */ | */ | ||||
| @GetMapping("billTypes") | |||||
| public ResultData billTypes() { | |||||
| @GetMapping("contractBillTypes") | |||||
| public ResultData contractBillTypes() { | |||||
| List<Map> list = new ArrayList<Map>(); | List<Map> list = new ArrayList<Map>(); | ||||
| 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 new ResultData(list); | ||||
| } | } | ||||
| /** | |||||
| * 账单临时类型(可自定义的) | |||||
| * @return | |||||
| */ | |||||
| @GetMapping("otherBillTypes") | |||||
| public ResultData otherBillTypes() { | |||||
| List<Map> list = new ArrayList<Map>(); | |||||
| 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("费用科目列表") | @ApiOperation("费用科目列表") | ||||
| @GetMapping("feesList") | @GetMapping("feesList") | ||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @@ -72,17 +72,13 @@ public enum EnumBillAllType { | |||||
| return ret; | return ret; | ||||
| } | } | ||||
| //财务可以通用自定义的 | |||||
| public static EnumBillAllType[] getCommonOperateTypes() { | |||||
| EnumBillAllType[] ret = new EnumBillAllType[] {RENT_DEPOSIT,PROPERTY,OTHER,OTHER_DEPOSIT}; | |||||
| return ret; | |||||
| } | |||||
| public static List<EnumFeesStandardsCalcuteUnit> getCalucuteUnites(Integer type) { | public static List<EnumFeesStandardsCalcuteUnit> getCalucuteUnites(Integer type) { | ||||
| //需要计算的费用,非一次性费用 | //需要计算的费用,非一次性费用 | ||||
| List<EnumFeesStandardsCalcuteUnit> retList = new ArrayList<EnumFeesStandardsCalcuteUnit>(); | List<EnumFeesStandardsCalcuteUnit> retList = new ArrayList<EnumFeesStandardsCalcuteUnit>(); | ||||
| if (type.intValue() == RENT.getCode().intValue() || type.intValue() == RENT_BUSSINESS_MANAGE.getCode().intValue() | 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.MM); | ||||
| retList.add(EnumFeesStandardsCalcuteUnit.HU); | retList.add(EnumFeesStandardsCalcuteUnit.HU); | ||||
| }else if (type.intValue() == DAILY.getCode().intValue()) { | }else if (type.intValue() == DAILY.getCode().intValue()) { | ||||