| @@ -0,0 +1,54 @@ | |||
| package com.iformall.controller.market; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.WxFeesStandards; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.service.WxFeesStandardsService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.GetMapping; | |||
| import org.springframework.web.bind.annotation.ModelAttribute; | |||
| import org.springframework.web.bind.annotation.RequestMapping; | |||
| import org.springframework.web.bind.annotation.RestController; | |||
| @RestController | |||
| @RequestMapping("feesStandars") | |||
| public class WxFeesStandardsController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private WxFeesStandardsService wxFeesStandardsService; | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||
| }) | |||
| public ResultData list(@ModelAttribute WxFeesStandards record, Integer pageNum, Integer pageSize) { | |||
| if (null == record) { | |||
| record = new WxFeesStandards(); | |||
| } | |||
| record.updateTenantInfo(getTenantInfo()); | |||
| record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | |||
| PageInfo<WxFeesStandards> page = wxFeesStandardsService.listAsPage(record, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("详情接口") | |||
| @GetMapping("detail") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| }) | |||
| public ResultData detail(Long id) { | |||
| WxFeesStandards record = wxFeesStandardsService.getById(id,getTenantInfo().getTenantId()); | |||
| return new ResultData(record); | |||
| } | |||
| } | |||
| @@ -0,0 +1,39 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.ToString; | |||
| import java.util.Date; | |||
| /** | |||
| * @author gongbiao | |||
| */ | |||
| @TableName(value = "wx_fees_standards") | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxFeesStandards extends TenantEntity { | |||
| private static final long serialVersionUID = -2034956838395479510L; | |||
| protected Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value = "是否删除1是0否", name = "isDel") | |||
| private Integer isDel; | |||
| @io.swagger.annotations.ApiModelProperty(value = "更新时间", name = "updatetime") | |||
| private Date updateTime; | |||
| @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createtime") | |||
| private Date createTime; | |||
| @io.swagger.annotations.ApiModelProperty(value = "名称", name = "createtime") | |||
| private String name; | |||
| @io.swagger.annotations.ApiModelProperty(value = "类型EnumFeesStandardsType", name = "type") | |||
| private Integer type; | |||
| @io.swagger.annotations.ApiModelProperty(value = "是否一次性费用EnumYesOrNo", name = "fixedPrice") | |||
| private Integer fixedPrice; | |||
| @io.swagger.annotations.ApiModelProperty(value = "计量单位EnumFeesStandardsCalcuteUnit【非固定费用使用】", name = "calcuteUnit") | |||
| private Integer calcuteUnit; | |||
| @io.swagger.annotations.ApiModelProperty(value = "时间单位EnumFeesStandardsTimeUnit【非固定费用使用】", name = "timeUnit") | |||
| private Integer timeUnit; | |||
| } | |||
| @@ -370,8 +370,11 @@ public class WxRentContract extends TenantEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value = "租金单位1日2月3年", name = "priceUnit") | |||
| private Integer priceUnit; | |||
| @io.swagger.annotations.ApiModelProperty(value = "多径租赁单价(其他放rentInfo)", name = "priceUnit") | |||
| @io.swagger.annotations.ApiModelProperty(value = "租金租赁单价(其他放rentInfo)", name = "priceUnit") | |||
| private String rentPrice; | |||
| @io.swagger.annotations.ApiModelProperty(value = "费用详细说明", name = "priceDetail") | |||
| private String priceDetail; | |||
| @io.swagger.annotations.ApiModelProperty(value = "其他多径租赁单价", name = "otherRentPriceInfo") | |||
| private String otherRentPriceInfo; | |||
| @@ -0,0 +1,38 @@ | |||
| package com.iformall.enums; | |||
| /** | |||
| * @author gongbiao | |||
| */ | |||
| public enum EnumFeesStandardsCalcuteUnit { | |||
| MM(1, "平米(㎡)"), | |||
| DIAN_DU(2, "度(KWh)"), | |||
| SHUI_DUN(3,"吨(立方米)(m³)"); | |||
| public static EnumFeesStandardsCalcuteUnit getEnum(Integer code) { | |||
| for (EnumFeesStandardsCalcuteUnit value : values()) { | |||
| if (value.getCode().equals(code)) { | |||
| return value; | |||
| } | |||
| } | |||
| return null; | |||
| } | |||
| private Integer code; | |||
| private String message; | |||
| EnumFeesStandardsCalcuteUnit(Integer code, String message) { | |||
| this.code = code; | |||
| this.message = message; | |||
| } | |||
| public Integer getCode() { | |||
| return code; | |||
| } | |||
| public String getMessage() { | |||
| return message; | |||
| } | |||
| } | |||
| @@ -0,0 +1,38 @@ | |||
| package com.iformall.enums; | |||
| /** | |||
| * @author gongbiao | |||
| */ | |||
| public enum EnumFeesStandardsTimeUnit { | |||
| DAY(1, "日"), | |||
| MONTH(2, "月"), | |||
| YEAR(3,"年"); | |||
| public static EnumFeesStandardsTimeUnit getEnum(Integer code) { | |||
| for (EnumFeesStandardsTimeUnit value : values()) { | |||
| if (value.getCode().equals(code)) { | |||
| return value; | |||
| } | |||
| } | |||
| return null; | |||
| } | |||
| private Integer code; | |||
| private String message; | |||
| EnumFeesStandardsTimeUnit(Integer code, String message) { | |||
| this.code = code; | |||
| this.message = message; | |||
| } | |||
| public Integer getCode() { | |||
| return code; | |||
| } | |||
| public String getMessage() { | |||
| return message; | |||
| } | |||
| } | |||
| @@ -0,0 +1,60 @@ | |||
| package com.iformall.enums; | |||
| import java.util.ArrayList; | |||
| import java.util.List; | |||
| /** | |||
| * @author gongbiao | |||
| */ | |||
| public enum EnumFeesStandardsType { | |||
| PROPERTY_CONTRACT(1, "物业合同费用标准"), | |||
| DAILY_BILL(2, "日常费用标准"); | |||
| public static EnumFeesStandardsType getEnum(Integer code) { | |||
| for (EnumFeesStandardsType value : values()) { | |||
| if (value.getCode().equals(code)) { | |||
| return value; | |||
| } | |||
| } | |||
| return null; | |||
| } | |||
| private Integer code; | |||
| private String message; | |||
| EnumFeesStandardsType(Integer code, String message) { | |||
| this.code = code; | |||
| this.message = message; | |||
| } | |||
| public Integer getCode() { | |||
| return code; | |||
| } | |||
| public String getMessage() { | |||
| return message; | |||
| } | |||
| public static List<EnumFeesStandardsCalcuteUnit> getCalucuteUnites(Integer type) { | |||
| List<EnumFeesStandardsCalcuteUnit> retList = new ArrayList<EnumFeesStandardsCalcuteUnit>(); | |||
| if (type.intValue() == PROPERTY_CONTRACT.getCode().intValue()) { | |||
| retList.add(EnumFeesStandardsCalcuteUnit.MM); | |||
| return retList; | |||
| }else if (type.intValue() == DAILY_BILL.getCode().intValue()) { | |||
| retList.add(EnumFeesStandardsCalcuteUnit.DIAN_DU); | |||
| retList.add(EnumFeesStandardsCalcuteUnit.SHUI_DUN); | |||
| return retList; | |||
| } | |||
| return null; | |||
| } | |||
| public static List<EnumFeesStandardsTimeUnit> getTimeUnites(Integer type) { | |||
| List<EnumFeesStandardsTimeUnit> retList = new ArrayList<EnumFeesStandardsTimeUnit>(); | |||
| retList.add(EnumFeesStandardsTimeUnit.DAY); | |||
| retList.add(EnumFeesStandardsTimeUnit.MONTH); | |||
| retList.add(EnumFeesStandardsTimeUnit.YEAR); | |||
| return retList; | |||
| } | |||
| } | |||
| @@ -0,0 +1,16 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxFeesStandards; | |||
| import java.util.List; | |||
| /** | |||
| */ | |||
| public interface WxFeesStandardsMapper extends CommonMapper<WxFeesStandards, Long> { | |||
| List<WxFeesStandards> findList(WxFeesStandards record); | |||
| WxFeesStandards getById(WxFeesStandards recordQ); | |||
| } | |||
| @@ -0,0 +1,25 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxFeesStandards; | |||
| public interface WxFeesStandardsService { | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @param pageIndex | |||
| * @param pageSize | |||
| * @return | |||
| */ | |||
| PageInfo<WxFeesStandards> listAsPage(WxFeesStandards record, Integer pageIndex, Integer pageSize); | |||
| /** | |||
| * id+tenantId | |||
| * @param | |||
| * @return | |||
| */ | |||
| WxFeesStandards getById(Long id, String tenantId); | |||
| } | |||
| @@ -0,0 +1,34 @@ | |||
| package com.iformall.service.impl; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.mapper.WxFeesStandardsMapper; | |||
| import com.iformall.service.*; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @Service | |||
| public class WxFeesStandardsServiceImpl implements WxFeesStandardsService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxFeesStandardsMapper wxFeesStandardsMapper; | |||
| @Override | |||
| public PageInfo<WxFeesStandards> listAsPage(WxFeesStandards record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxFeesStandardsMapper.findList(record)); | |||
| } | |||
| @Override | |||
| public WxFeesStandards getById(Long id, String tenantId) { | |||
| WxFeesStandards recordQ = new WxFeesStandards(); | |||
| recordQ.setId(id); | |||
| recordQ.setTenantId(tenantId); | |||
| return wxFeesStandardsMapper.getById(recordQ); | |||
| } | |||
| } | |||
| @@ -0,0 +1,57 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxFeesStandardsMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxFeesStandards"> | |||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | |||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | |||
| <result column="name" jdbcType="VARCHAR" property="name"/> | |||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | |||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | |||
| <result column="type" jdbcType="INTEGER" property="type"/> | |||
| <result column="fixed_price" jdbcType="INTEGER" property="fixedPrice"/> | |||
| <result column="calcute_unit" jdbcType="INTEGER" property="calcuteUnit"/> | |||
| <result column="time_unit" jdbcType="INTEGER" property="timeUnit"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`tenant_id`,`parent_tenant_id`,`is_del`,`name`,`update_time`,`create_time`,`type`,`fixed_price`,`calcute_unit`,`time_unit` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id ">and `id` = #{id}</if> | |||
| <if test=" null != tenantId and '' != tenantId"> and `tenant_id` = #{tenantId} </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> and `parent_tenant_id` = #{parentTenantId} </if> | |||
| <if test=" null != isDel">and `is_del` = #{isDel}</if> | |||
| <if test=" null != name and '' != name">and `name` like concat('%', #{name},'%') </if> | |||
| <if test=" null != type">and `type` = #{type}</if> | |||
| <if test=" null != fixedPrice">and `fixed_price` = #{fixedPrice}</if> | |||
| <if test=" null != calcuteUnit">and `calcute_unit` = #{calcuteUnit}</if> | |||
| <if test=" null != timeUnit">and `time_unit` = #{timeUnit}</if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxFeesStandards" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_fees_standards | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="getById" parameterType="com.iformall.domain.po.WxFeesStandards" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_fees_standards | |||
| where `id` = #{id} and `tenant_id` = #{tenantId} | |||
| </select> | |||
| </mapper> | |||
| @@ -59,11 +59,12 @@ | |||
| <result column="create_type" jdbcType="INTEGER" property="createType"/> | |||
| <result column="shop_ids" jdbcType="VARCHAR" property="shopIds"/> | |||
| <result column="shop_numbers" jdbcType="VARCHAR" property="shopNumbers"/> | |||
| <result column="price_detail" jdbcType="VARCHAR" property="priceDetail"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`merchant_id`,`decimal_size`,`price`,`rental_start_date`,`rental_end_date`,`create_type`,`shop_ids`,`shop_numbers`, | |||
| `sign_date`,`receive_period`,`tenant_id`,`parent_tenant_id`,`filepath`,`status`,`contract_number`, | |||
| `sign_date`,`receive_period`,`tenant_id`,`parent_tenant_id`,`filepath`,`status`,`contract_number`,`price_detail`, | |||
| `deposit`,`pay_date`,`is_del`,`merchant_name`,`brand`,`business_id`,`receive_period_unit`, | |||
| `shop_type`,`updatetime`,`createtime`,`rent_area`,`rent_shop_type`, | |||
| `link_person`,`link_phone`,`pay_account`,`filename`,`lease`,`rent_contract_id`, | |||
| @@ -100,8 +100,6 @@ | |||
| <result column="business_type" property="businessType"/> | |||
| <result column="rent_info" jdbcType="VARCHAR" property="rentInfo"/> | |||
| <result column="file_names" jdbcType="VARCHAR" property="fileNames"/> | |||
| <result column="price_unit" property="priceUnit"/> | |||
| <result column="rent_price" property="rentPrice"/> | |||
| <result column="subject_name" property="subjectName"/> | |||
| <result column="rent_start_type" property="rentStartType"/> | |||
| <result column="shop_name" property="shopName"/> | |||
| @@ -127,13 +125,14 @@ | |||
| <result column="out_date_notify_days" jdbcType="INTEGER" property="outDateNotifyDays"/> | |||
| <result column="out_date_notify_phone" jdbcType="VARCHAR" property="outDateNotifyPhone"/> | |||
| <result column="design_file" jdbcType="VARCHAR" property="designFile"/> | |||
| <result column="price_detail" jdbcType="VARCHAR" property="priceDetail"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`merchant_id`, | |||
| `shop_type_sub`,`lease_purpose`,`contractual_rules`,`delivery_date`,`delivery_grace_period`,`opening_date`,`business_hours`,`scope_metre`, | |||
| `decimal_size`,`price`,`rental_start_date`,`rental_end_date`,`sign_date`,`receive_period`,`receive_period_unit`, | |||
| `tenant_id`,`parent_tenant_id`,`filepath`,`status`,`contract_number`, | |||
| `tenant_id`,`parent_tenant_id`,`filepath`,`status`,`contract_number`,`price_detail`, | |||
| `first_party_bank_info`,`second_party_bank_info`,`second_party_tax_info`, | |||
| `property_name`,`property_fee`,`fee_cycle`,`water_fee`,`electricity_fees`, | |||
| `deposit`,cashtype_content_lsit,cashtype_lsit,`pay_date`,`is_del`,`merchant_name`, | |||
| @@ -358,6 +357,7 @@ | |||
| <result column="rental_start_date" property="rentalStartDate"/> | |||
| <result column="rental_end_date" property="rentalEndDate"/> | |||
| <result column="rent_price" property="rentPrice"/> | |||
| <result column="price_detail" property="priceDetail"/> | |||
| <result column="property_price" property="propertyPrice"/> | |||
| <result column="type" property="type"/> | |||
| <result column="status" property="status"/> | |||
| @@ -375,7 +375,7 @@ | |||
| <select id="listContractVo" parameterType="com.iformall.domain.vo.WxRentPropertyContractVo" resultMap="contractMap"> | |||
| select rc.id,rc.tenant_id,rc.parent_tenant_id,rc.id as rent_id, pc.id as property_id, rc.merchant_name,rc.rental_start_date,rc.rental_end_date,rc.`status`, | |||
| rc.price as rent_price,rc.contract_number,rc.shop_name,rc.type,rc.apply_status, | |||
| rc.price as rent_price,rc.contract_number,rc.shop_name,rc.type,rc.apply_status,rc.price_detail, | |||
| rc.rent_shop_type,rc.rent_info,pc.price as property_price,rc.merchant_id,pc.`status` as property_status, | |||
| rc.price_unit as rent_price_unit,pc.price_unit as property_price_unit, | |||
| rc.business_type businessType,rc.bus_discount_ratio,rc.bus_discount_time | |||
| @@ -469,7 +469,7 @@ | |||
| rc.`id`,rc.`merchant_id`, | |||
| rc.`shop_type_sub`,rc.`lease_purpose`,rc.`contractual_rules`,rc.`delivery_date`,rc.`delivery_grace_period`,rc.`opening_date`,rc.`business_hours`,rc.`scope_metre`, | |||
| rc.`price`,rc.rent_area,rc.`rental_start_date`,rc.`rental_end_date`,rc.`sign_date`,rc.`receive_period`, rc.`receive_period_unit`, | |||
| rc.`tenant_id`,rc.`parent_tenant_id`,rc.`filepath`,rc.`status`,rc.`contract_number`, | |||
| rc.`tenant_id`,rc.`parent_tenant_id`,rc.`filepath`,rc.`status`,rc.`contract_number`,rc.`price_detail`, | |||
| rc.`first_party_bank_info`,rc.`second_party_bank_info`,rc.`second_party_tax_info`, | |||
| rc.`property_name`,rc.`property_fee`,rc.`fee_cycle`,rc.`water_fee`,rc.`electricity_fees`, | |||
| rc.`deposit`,rc.cashtype_content_lsit,rc.cashtype_lsit,rc.`pay_date`,rc.`is_del`,rc.`merchant_name`, | |||
| @@ -496,7 +496,7 @@ | |||
| rc.`id`,rc.`merchant_id`, | |||
| rc.`shop_type_sub`,rc.`lease_purpose`,rc.`contractual_rules`,rc.`delivery_date`,rc.`delivery_grace_period`,rc.`opening_date`,rc.`business_hours`,rc.`scope_metre`, | |||
| rc.`price`,rc.rent_area,rc.`rental_start_date`,rc.`rental_end_date`,rc.`sign_date`,rc.`receive_period`, rc.`receive_period_unit`, | |||
| rc.`tenant_id`,rc.`parent_tenant_id`,rc.`filepath`,rc.`status`,rc.`contract_number`, | |||
| rc.`tenant_id`,rc.`parent_tenant_id`,rc.`filepath`,rc.`status`,rc.`contract_number`,rc.`price_detail`, | |||
| rc.`first_party_bank_info`,rc.`second_party_bank_info`,rc.`second_party_tax_info`, | |||
| rc.`property_name`,rc.`property_fee`,rc.`fee_cycle`,rc.`water_fee`,rc.`electricity_fees`, | |||
| rc.`deposit`,rc.cashtype_content_lsit,rc.cashtype_lsit,rc.`pay_date`,rc.`is_del`,rc.`merchant_name`, | |||