diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFeesStandardsController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFeesStandardsController.java new file mode 100644 index 000000000..03166d3f0 --- /dev/null +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFeesStandardsController.java @@ -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 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); + } + +} diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxFeesStandards.java b/mallinkService/src/main/java/com/iformall/domain/po/WxFeesStandards.java new file mode 100644 index 000000000..a1c3c8230 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxFeesStandards.java @@ -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; +} + diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java b/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java index 8d1ec18a4..79623153e 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java @@ -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; diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumFeesStandardsCalcuteUnit.java b/mallinkService/src/main/java/com/iformall/enums/EnumFeesStandardsCalcuteUnit.java new file mode 100644 index 000000000..1638b0ae6 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumFeesStandardsCalcuteUnit.java @@ -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; + } + +} diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumFeesStandardsTimeUnit.java b/mallinkService/src/main/java/com/iformall/enums/EnumFeesStandardsTimeUnit.java new file mode 100644 index 000000000..9ad6abcd6 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumFeesStandardsTimeUnit.java @@ -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; + } + +} diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumFeesStandardsType.java b/mallinkService/src/main/java/com/iformall/enums/EnumFeesStandardsType.java new file mode 100644 index 000000000..1deb31503 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumFeesStandardsType.java @@ -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 getCalucuteUnites(Integer type) { + List retList = new ArrayList(); + 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 getTimeUnites(Integer type) { + List retList = new ArrayList(); + retList.add(EnumFeesStandardsTimeUnit.DAY); + retList.add(EnumFeesStandardsTimeUnit.MONTH); + retList.add(EnumFeesStandardsTimeUnit.YEAR); + return retList; + } + +} diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxFeesStandardsMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxFeesStandardsMapper.java new file mode 100644 index 000000000..3fb49406f --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/mapper/WxFeesStandardsMapper.java @@ -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 { + + List findList(WxFeesStandards record); + + + WxFeesStandards getById(WxFeesStandards recordQ); +} diff --git a/mallinkService/src/main/java/com/iformall/service/WxFeesStandardsService.java b/mallinkService/src/main/java/com/iformall/service/WxFeesStandardsService.java new file mode 100644 index 000000000..f34649f7f --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/service/WxFeesStandardsService.java @@ -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 listAsPage(WxFeesStandards record, Integer pageIndex, Integer pageSize); + + /** + * id+tenantId + * @param + * @return + */ + WxFeesStandards getById(Long id, String tenantId); +} diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFeesStandardsServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFeesStandardsServiceImpl.java new file mode 100644 index 000000000..e644778f4 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFeesStandardsServiceImpl.java @@ -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 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); + } + +} diff --git a/mallinkService/src/main/resources/mapper/WxFeesStandardsMapper.xml b/mallinkService/src/main/resources/mapper/WxFeesStandardsMapper.xml new file mode 100644 index 000000000..14dcf386e --- /dev/null +++ b/mallinkService/src/main/resources/mapper/WxFeesStandardsMapper.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + `id`,`tenant_id`,`parent_tenant_id`,`is_del`,`name`,`update_time`,`create_time`,`type`,`fixed_price`,`calcute_unit`,`time_unit` + + + + + where 1 = 1 + and `id` = #{id} + and `tenant_id` = #{tenantId} + and `parent_tenant_id` = #{parentTenantId} + and `is_del` = #{isDel} + and `name` like concat('%', #{name},'%') + and `type` = #{type} + and `fixed_price` = #{fixedPrice} + and `calcute_unit` = #{calcuteUnit} + and `time_unit` = #{timeUnit} + + and id in + + #{idItem} + + + order by ${sortColumns} + + + + + + + diff --git a/mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml b/mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml index a2b2bc239..dfcebaca5 100644 --- a/mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml @@ -59,11 +59,12 @@ + `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`, diff --git a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml index b09cad3cb..6ff251a44 100644 --- a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml @@ -100,8 +100,6 @@ - - @@ -127,13 +125,14 @@ + `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 @@ + @@ -375,7 +375,7 @@