| @@ -0,0 +1,233 @@ | |||
| package com.iformall.controller.contract; | |||
| import com.alibaba.fastjson.JSONArray; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.annotation.TenantIgnore; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.po.base.BaseEntity.SortField; | |||
| import com.iformall.domain.vo.WxRentContractYearsVo; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.WxRentContractMapper; | |||
| import com.iformall.service.*; | |||
| import com.iformall.utils.Constant; | |||
| import com.iformall.utils.DateUtils; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import org.apache.commons.compress.utils.Lists; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.math.BigDecimal; | |||
| import java.text.SimpleDateFormat; | |||
| import java.util.*; | |||
| /** | |||
| */ | |||
| @RestController | |||
| @RequestMapping("wxAgileContract") | |||
| public class WxAgileContractController extends WxContractBaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private WxAgileContractService wxAgileContractService; | |||
| @Autowired | |||
| private WxAllBillService wxAllBillService; | |||
| @Autowired | |||
| private WxPayAccountBillService payAccountBillService; | |||
| @Autowired | |||
| private WxMerchantService wxMerchantService; | |||
| @Autowired | |||
| private WxRentContractMapper wxRentContractMapper; | |||
| @Autowired | |||
| private WxRentPropertyContractService wxRentPropertyContractService; | |||
| @Autowired | |||
| private WxShopService wxShopService; | |||
| @Autowired | |||
| WxPropertyContractService wxPropertyContractService; | |||
| @Autowired | |||
| WxMallBuildingService buildingService; | |||
| @Autowired | |||
| WxMallFloorService floorService; | |||
| @Autowired | |||
| WxEnergyService wxEnergyService; | |||
| @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 WxRentContract wxRentContract, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::list"); | |||
| if (null == wxRentContract) { | |||
| wxRentContract = new WxRentContract(); | |||
| } | |||
| wxRentContract.updateTenantInfo(getTenantInfo()); | |||
| wxRentContract.setAgileType(EnumRentAgileType.AGILE.getCode()); | |||
| wxRentContract.setSortColumns(" updatetime desc"); | |||
| //Map<String, Object> result = wxRentContractService.listAsPage(wxRentContract, pageNum, pageSize); | |||
| WxUserDataRule dataRule = this.getCurrentDataFloors(); | |||
| if (null != dataRule) { | |||
| wxRentContract.setFloorForRule(dataRule.getFloorIds()); | |||
| wxRentContract.setBusinessForRule(dataRule.getBussinessIds()); | |||
| wxRentContract.setShopTypeForRule(dataRule.getShopTypes()); | |||
| } | |||
| if (null == wxRentContract.getIsPrivateMerchant()) { | |||
| wxRentContract.setIsPrivateMerchant(EnumYesOrNo.NO.getCode()); | |||
| } | |||
| PageInfo<WxRentContract> page = wxAgileContractService.getRentContractList(wxRentContract, pageNum, pageSize); | |||
| Integer hasFlow = null; | |||
| if (null != page && null != page.getList()) { | |||
| for (WxRentContract wrc: page.getList()) { | |||
| if (null == hasFlow) { | |||
| if(rentContractHasWorkFlow(wrc)) { | |||
| hasFlow = 1; | |||
| }else { | |||
| hasFlow = 0; | |||
| } | |||
| } | |||
| wrc.setFlowHas(hasFlow); | |||
| } | |||
| } | |||
| return new ResultData(page); | |||
| } | |||
| /** | |||
| * 新增/修改第一步 | |||
| * @param wxRentContract | |||
| * @return | |||
| */ | |||
| @PostMapping("saveOrUpdate") | |||
| public ResultData saveOrUpdate(@RequestBody WxRentContract wxRentContract) { | |||
| MallUserInfo user = getUser(); | |||
| wxRentContract.updateTenantInfo(user); | |||
| wxRentContract.setAgileType(EnumRentAgileType.AGILE.getCode()); | |||
| if (null == wxRentContract.getMerchantId()) { | |||
| return new ResultData(Result.ERROR,"请选择商户"); | |||
| } | |||
| if (null == wxRentContract.getDayPriceCalcute()) { | |||
| return new ResultData(Result.ERROR,"请选择日均单价计费规则"); | |||
| } | |||
| //以前合同必填的数据初始化 | |||
| wxRentContract.setDecimalSize(2); | |||
| wxRentContract.setReceivePeriodUnit(EnumContractReceivePeriodUnit.MONTH.getCode()); | |||
| wxRentContract.setRevenueRatio(EnumYesOrNo.NO.getCode()); | |||
| wxRentContract.setRevenueFixedRentPrice(EnumYesOrNo.NO.getCode()); | |||
| wxRentContract.setOutDateNotifyDays(0); | |||
| wxRentContract.setPayPeriodRate(1); | |||
| wxRentContract.setOperationType(EnumContractOperationType.PART.getCode()); | |||
| if (null == wxRentContract.getRentalStartDate()) { | |||
| return new ResultData(Result.ERROR,"请选择合同开始日期"); | |||
| } | |||
| if (null == wxRentContract.getRentalEndDate()) { | |||
| return new ResultData(Result.ERROR,"请选择合同结束日期"); | |||
| } | |||
| int[] array = DateUtils.getDiff(wxRentContract.getRentalStartDate(),wxRentContract.getRentalEndDate()); | |||
| wxRentContract.setLease(array[0]); | |||
| if (null == wxRentContract.getSignDate()) { | |||
| return new ResultData(Result.ERROR,"请选择合同签约日期"); | |||
| } | |||
| wxRentContract.setStartDate(wxRentContract.getRentalStartDate()); | |||
| wxRentContract.setEndDate(wxRentContract.getRentalEndDate()); | |||
| String rentInfo = wxRentContract.getRentInfo(); | |||
| if (StringUtils.isBlank(rentInfo)) { | |||
| return new ResultData(Result.ERROR,"请选择铺位"); | |||
| } | |||
| JSONArray rentInfoArray = JSONArray.parseArray(rentInfo); | |||
| int size = rentInfoArray.size(); | |||
| if (size == 0) { | |||
| return new ResultData(ErrorCode.SHOP_NOT_SELECTED); | |||
| } | |||
| List<Long> shopList = Lists.newArrayList(); | |||
| //查询rent_info 包括 shopId | |||
| String shopName = ""; | |||
| BigDecimal rentAreaDecimal = new BigDecimal(0); | |||
| for (int i = 0; i < size; i++) { | |||
| JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); | |||
| Long shopId = rentInfoObject.getLong("id"); | |||
| //wxRentContract.setShopId(shopId); | |||
| String shopNumber = rentInfoObject.getString("shopNumber"); | |||
| if (!shopList.contains(shopId)) { | |||
| shopList.add(shopId); | |||
| shopName = shopName +","+ shopNumber; | |||
| } | |||
| String rentArea = rentInfoObject.getString("rentArea"); | |||
| if (StringUtils.isNotBlank(rentArea)) { | |||
| rentAreaDecimal = rentAreaDecimal.add(new BigDecimal(rentArea)); | |||
| } | |||
| } | |||
| wxRentContract.setRentArea(rentAreaDecimal.toPlainString()); | |||
| wxRentContract.setShopName(shopName); | |||
| return wxAgileContractService.saveOrUpdate(wxRentContract, user); | |||
| } | |||
| /** | |||
| * 押金科目 | |||
| * @return | |||
| */ | |||
| @GetMapping("depositFeesList") | |||
| public ResultData depositFeesList() { | |||
| WxEnergyFees dt = new WxEnergyFees(); | |||
| dt.updateTenantInfo(getTenantInfo()); | |||
| dt.setIsDel(EnumYesOrNo.NO.getCode()); | |||
| List<Integer> billTypeList = new ArrayList<Integer>(); | |||
| billTypeList.add(EnumBillAllType.RENT_DEPOSIT.getCode()); | |||
| billTypeList.add(EnumBillAllType.PROPERTY.getCode()); | |||
| billTypeList.add(EnumBillAllType.PROPERTY_DEPOSIT.getCode()); | |||
| dt.setBillTypeList(billTypeList); | |||
| dt.setIsDespoit(EnumYesOrNo.YES.getCode()); | |||
| dt.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | |||
| PageInfo<WxEnergyFees> page = wxEnergyService.feesListAsPage(dt, 1, 100,false); | |||
| if (null == page) { | |||
| return new ResultData(); | |||
| } | |||
| return new ResultData(page.getList()); | |||
| } | |||
| /** | |||
| * 添加押金 | |||
| */ | |||
| @PostMapping("addDeposits") | |||
| public ResultData addDepositFees(@RequestBody WxRentContract wxRentContract) { | |||
| if (null == wxRentContract.getContractDepositList() || wxRentContract.getContractDepositList().size() <= 0 ) { | |||
| return new ResultData(Result.ERROR,"请至少增加一个"); | |||
| } | |||
| wxRentContract.updateTenantInfo(getTenantInfo()); | |||
| return wxAgileContractService.saveDeposit(wxRentContract); | |||
| } | |||
| /** | |||
| * 查询押金 | |||
| */ | |||
| @GetMapping("getDeposits") | |||
| public ResultData getDeposits(@ModelAttribute WxRentContract wxRentContract) { | |||
| //查询 | |||
| return new ResultData(wxAgileContractService.findShopFeesDeposit(wxRentContract)); | |||
| } | |||
| /** | |||
| * 添加非押金项 | |||
| */ | |||
| @PostMapping("addUnDeposits") | |||
| public ResultData addUnDeposits(@RequestBody WxRentContractAgileUnDeposit unDeposit) { | |||
| return null; | |||
| } | |||
| } | |||
| @@ -199,6 +199,10 @@ public class WxFinanceController extends BaseController { | |||
| if (null == record.getBillType()) { | |||
| return new ResultData(Result.ERROR,"请选择绑定账单类型"); | |||
| } | |||
| if (record.getBillType() == EnumBillAllType.RENT_DEPOSIT.getCode()) { | |||
| record.setIsDespoit(EnumYesOrNo.YES.getCode()); | |||
| record.setFixedPrice(EnumYesOrNo.YES.getCode()); | |||
| } | |||
| wxEnergyService.saveOrUpdateFees(record); | |||
| return new ResultData(); | |||
| } | |||
| @@ -0,0 +1,76 @@ | |||
| ALTER TABLE wx_rent_contract ADD COLUMN agile_type INT(1) NOT NULL DEFAULT 1 COMMENT '合同类型'; | |||
| ALTER TABLE wx_rent_contract ADD COLUMN create_by_name VARCHAR(100) COMMENT '创建人姓名' AFTER create_by; | |||
| ALTER TABLE wx_rent_contract ADD COLUMN update_by_name VARCHAR(100) COMMENT '修改人姓名' AFTER update_by; | |||
| ALTER TABLE wx_property_contract ADD COLUMN create_by_name VARCHAR(100) COMMENT '创建人姓名' AFTER create_by; | |||
| ALTER TABLE wx_property_contract ADD COLUMN update_by_name VARCHAR(100) COMMENT '修改人姓名' AFTER update_by; | |||
| CREATE TABLE `wx_rent_contract_agile_deposit` ( | |||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||
| `rent_contract_id` bigint(20) NOT NULL COMMENT '合同编号', | |||
| `fees_id` bigint(20) NOT NULL COMMENT '科目编号', | |||
| `price` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '金额', | |||
| `tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID', | |||
| `parent_tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID', | |||
| `updatetime` datetime DEFAULT NULL COMMENT '更新时间', | |||
| `createtime` datetime DEFAULT NULL COMMENT '创建时间', | |||
| `merchant_id` bigint(20) DEFAULT NULL, | |||
| PRIMARY KEY (`id`), | |||
| UNIQUE KEY `U_R_S` (`rent_contract_id`,`fees_id`) | |||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='租赁合同'; | |||
| CREATE TABLE `wx_rent_contract_agile_deposit_shop` ( | |||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||
| `rent_deposit_id` bigint(20) NOT NULL COMMENT '押金项编号', | |||
| `shop_id` bigint(20) NOT NULL COMMENT '店铺编号', | |||
| `shop_number` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '店铺号', | |||
| `tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID', | |||
| `parent_tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID', | |||
| `updatetime` datetime DEFAULT NULL COMMENT '更新时间', | |||
| `createtime` datetime DEFAULT NULL COMMENT '创建时间', | |||
| `rent_contract_id` bigint(20) NOT NULL COMMENT '合同编号', | |||
| PRIMARY KEY (`id`), | |||
| UNIQUE KEY `U_R_S_E` (`rent_deposit_id`,`shop_id`) | |||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='租赁合同'; | |||
| CREATE TABLE `wx_rent_contract_agile_un_deposit` ( | |||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||
| `tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID', | |||
| `parent_tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID', | |||
| `rent_contract_id` bigint(20) NOT NULL COMMENT '合同编号', | |||
| `merchant_id` bigint(20) DEFAULT NULL, | |||
| `setting_method` int(1) NOT NULL DEFAULT '1' COMMENT '费用设置方式', | |||
| `fees_id` bigint(20) NOT NULL COMMENT '科目编号', | |||
| `price` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '单价', | |||
| `price_unit` int(1) NOT NULL COMMENT '单价单位', | |||
| `time_unit` int(1) NOT NULL COMMENT '计费周期', | |||
| `calcute_time_unit` int(11) NOT NULL COMMENT '收费周期', | |||
| `fees_create_rule` int(1) NOT NULL COMMENT '费用生成规则', | |||
| `updatetime` datetime DEFAULT NULL COMMENT '更新时间', | |||
| `createtime` datetime DEFAULT NULL COMMENT '创建时间', | |||
| PRIMARY KEY (`id`), | |||
| UNIQUE KEY `U_R_S` (`rent_contract_id`,`fees_id`) | |||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='租赁合同'; | |||
| CREATE TABLE `wx_rent_contract_agile_un_deposit_item` ( | |||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||
| `tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID', | |||
| `parent_tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID', | |||
| `rent_contract_id` bigint(20) NOT NULL COMMENT '合同编号', | |||
| `un_deposit_id` bigint(20) NOT NULL COMMENT '费用编号', | |||
| `merchant_id` bigint(20) NOT NULL COMMENT '商户编号', | |||
| `shop_id` bigint(20) DEFAULT NULL COMMENT '店铺编号', | |||
| `shop_number` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '店铺号', | |||
| `fees_id` bigint(20) NOT NULL COMMENT '科目编号', | |||
| `begin_time` datetime NOT NULL COMMENT '开始日期', | |||
| `end_time` datetime NOT NULL COMMENT '结束日期', | |||
| `price` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '单价', | |||
| `price_unit` int(1) NOT NULL COMMENT '单价单位', | |||
| `updatetime` datetime DEFAULT NULL COMMENT '更新时间', | |||
| `createtime` datetime DEFAULT NULL COMMENT '创建时间', | |||
| `is_free` int(1) NOT NULL DEFAULT '0' COMMENT '是否免租期', | |||
| `rent_area` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '计租面积', | |||
| PRIMARY KEY (`id`), | |||
| UNIQUE KEY `U_R_S` (`rent_contract_id`,`fees_id`) | |||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='租赁合同'; | |||
| @@ -127,10 +127,14 @@ public class WxPropertyContract extends TenantEntity { | |||
| private Date updatetime; | |||
| @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createBy") | |||
| private Long updateBy; | |||
| @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createBy") | |||
| private String updateByName; | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createtime") | |||
| private Date createtime; | |||
| @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createBy") | |||
| private Long createBy; | |||
| @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createBy") | |||
| private String createByName; | |||
| @io.swagger.annotations.ApiModelProperty(value="计租面积",name="rentArea") | |||
| private String rentArea; | |||
| @@ -8,6 +8,7 @@ import com.iformall.common.SortColumn; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.vo.RentContractFreePeriodVo; | |||
| import com.iformall.enums.EnumPriceUnit; | |||
| import com.iformall.enums.EnumRentAgileType; | |||
| import com.iformall.enums.EnumRentContractAdjustPeriod; | |||
| import com.iformall.enums.EnumRentContractStatus; | |||
| import com.iformall.enums.EnumRentContractType; | |||
| @@ -291,10 +292,14 @@ public class WxRentContract extends TenantEntity { | |||
| private Date updatetime; | |||
| @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createBy") | |||
| private Long updateBy; | |||
| @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createBy") | |||
| private String updateByName; | |||
| @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createtime") | |||
| private Date createtime; | |||
| @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createBy") | |||
| private Long createBy; | |||
| @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createBy") | |||
| private String createByName; | |||
| @io.swagger.annotations.ApiModelProperty(value = "计租面积", name = "rentArea") | |||
| private String rentArea; | |||
| @@ -533,6 +538,17 @@ public class WxRentContract extends TenantEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value = "免租期说明", name = "freePeriodRemark") | |||
| private String freePeriodRemark; | |||
| @io.swagger.annotations.ApiModelProperty(value = "合同类型EnumRentAgileType", name = "agileType") | |||
| private Integer agileType; | |||
| @TableField(exist = false) | |||
| private String agileTypeName; | |||
| public String getAgileTypeName() { | |||
| if (null != agileType) { | |||
| return EnumRentAgileType.getEnum(agileType).getMessage(); | |||
| } | |||
| return null; | |||
| } | |||
| public List<Long> shopIdsByRentInfo() { | |||
| List<Long> shopList = Lists.newArrayList(); | |||
| @@ -635,5 +651,7 @@ public class WxRentContract extends TenantEntity { | |||
| private String queryShopNumber; | |||
| @TableField(exist = false) | |||
| private List<Integer> privateRentShopTypeList; | |||
| @TableField(exist = false) | |||
| List<WxRentContractAgileDeposit> contractDepositList; | |||
| } | |||
| @@ -0,0 +1,46 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| 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; | |||
| import java.util.List; | |||
| /** | |||
| */ | |||
| @TableName(value = "wx_rent_contract_agile_deposit") | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxRentContractAgileDeposit extends TenantEntity { | |||
| private static final long serialVersionUID = 7009117540201976664L; | |||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | |||
| private Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value="合同编号",name="rentContractId") | |||
| private Long rentContractId; | |||
| @io.swagger.annotations.ApiModelProperty(value="商户编号",name="merchantId") | |||
| private Long merchantId; | |||
| @io.swagger.annotations.ApiModelProperty(value="科目编号",name="feesId") | |||
| private Long feesId; | |||
| @io.swagger.annotations.ApiModelProperty(value="金额",name="price") | |||
| private String price; | |||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | |||
| private Date createTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | |||
| private Date updateTime; | |||
| @TableField(exist = false) | |||
| private List<WxShop> shopList; | |||
| } | |||
| @@ -0,0 +1,41 @@ | |||
| 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; | |||
| /** | |||
| */ | |||
| @TableName(value = "wx_rent_contract_agile_deposit_shop") | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxRentContractAgileDepositShop extends TenantEntity { | |||
| private static final long serialVersionUID = 7009117540201976664L; | |||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | |||
| private Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value="合同编号",name="rentContractId") | |||
| private Long rentContractId; | |||
| @io.swagger.annotations.ApiModelProperty(value="押金项编号",name="rentDepositId") | |||
| private Long rentDepositId; | |||
| @io.swagger.annotations.ApiModelProperty(value="店铺编号",name="shopId") | |||
| private Long shopId; | |||
| @io.swagger.annotations.ApiModelProperty(value="金额",name="price") | |||
| private String shopNumber; | |||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | |||
| private Date createTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | |||
| private Date updateTime; | |||
| } | |||
| @@ -0,0 +1,96 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.enums.EnumFeesShopTimeType; | |||
| import com.iformall.enums.EnumRentContractAgilPriceUnit; | |||
| import com.iformall.enums.EnumRentContractAgilSettingMethod; | |||
| import com.iformall.enums.EnumRentContractAgilTimeUnit; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.ToString; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| /** | |||
| */ | |||
| @TableName(value = "wx_rent_contract_agile_un_deposit") | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxRentContractAgileUnDeposit extends TenantEntity { | |||
| private static final long serialVersionUID = 7009117540201976664L; | |||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | |||
| private Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value="合同编号",name="rentContractId") | |||
| private Long rentContractId; | |||
| @io.swagger.annotations.ApiModelProperty(value="商户编号",name="merchantId") | |||
| private Long merchantId; | |||
| @io.swagger.annotations.ApiModelProperty(value="费用设置方式EnumRentContractAgilSettingMethod",name="settingMethod") | |||
| private Integer settingMethod; | |||
| @TableField(exist = false) | |||
| private String settingMethodName; | |||
| public String getSettingMethodName() { | |||
| if (null != settingMethod) { | |||
| return EnumRentContractAgilSettingMethod.getEnum(settingMethod).getMessage(); | |||
| } | |||
| return null; | |||
| } | |||
| @io.swagger.annotations.ApiModelProperty(value="科目编号",name="feesId") | |||
| private Long feesId; | |||
| @io.swagger.annotations.ApiModelProperty(value="单价",name="price") | |||
| private String price; | |||
| @io.swagger.annotations.ApiModelProperty(value="单价单位EnumRentContractAgilPriceUnit",name="priceUnit") | |||
| private Integer priceUnit; | |||
| @TableField(exist = false) | |||
| private String priceUnitName; | |||
| public String getPriceUnitName() { | |||
| if (null != priceUnit) { | |||
| return EnumRentContractAgilPriceUnit.getEnum(priceUnit).getMessage(); | |||
| } | |||
| return null; | |||
| } | |||
| @io.swagger.annotations.ApiModelProperty(value="计费周期EnumRentContractAgilTimeUnit",name="timeUnit") | |||
| private Integer timeUnit; | |||
| @TableField(exist = false) | |||
| private String timeUnitName; | |||
| public String getTimeUnitName() { | |||
| if (null != timeUnit) { | |||
| return EnumRentContractAgilTimeUnit.getEnum(timeUnit).getMessage(); | |||
| } | |||
| return null; | |||
| } | |||
| @io.swagger.annotations.ApiModelProperty(value="收费周期",name="calcuteTime") | |||
| private Integer calcuteTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="费用生成规则EnumFeesShopTimeType",name="feesCreateRule") | |||
| private Integer feesCreateRule; | |||
| @TableField(exist = false) | |||
| private String feesCreateRuleName; | |||
| public String getFeesCreateRule() { | |||
| if (null != feesCreateRule) { | |||
| return EnumFeesShopTimeType.getEnum(feesCreateRule).getMessage(); | |||
| } | |||
| return null; | |||
| } | |||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | |||
| private Date createTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | |||
| private Date updateTime; | |||
| } | |||
| @@ -0,0 +1,81 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.enums.EnumFeesShopTimeType; | |||
| import com.iformall.enums.EnumRentContractAgilPriceUnit; | |||
| import com.iformall.enums.EnumRentContractAgilSettingMethod; | |||
| import com.iformall.enums.EnumRentContractAgilTimeUnit; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.ToString; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| /** | |||
| */ | |||
| @TableName(value = "wx_rent_contract_agile_un_deposit_item") | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxRentContractAgileUnDepositItem extends TenantEntity { | |||
| private static final long serialVersionUID = 7009117540201976664L; | |||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | |||
| private Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value="合同编号",name="rentContractId") | |||
| private Long rentContractId; | |||
| @io.swagger.annotations.ApiModelProperty(value="费用编号",name="unDepositId") | |||
| private Long unDepositId; | |||
| @io.swagger.annotations.ApiModelProperty(value="商户编号",name="merchantId") | |||
| private Long merchantId; | |||
| @io.swagger.annotations.ApiModelProperty(value="铺位编号",name="shopId") | |||
| private Long shopId; | |||
| @io.swagger.annotations.ApiModelProperty(value="铺位号",name="shopNumber") | |||
| private String shopNumber; | |||
| @io.swagger.annotations.ApiModelProperty(value="科目编号",name="feesId") | |||
| private Long feesId; | |||
| @io.swagger.annotations.ApiModelProperty(value="beginTime",name="beginTime") | |||
| private Date beginTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="endTime",name="endTime") | |||
| private Date endTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="单价",name="price") | |||
| private String price; | |||
| @io.swagger.annotations.ApiModelProperty(value="单价单位EnumRentContractAgilPriceUnit",name="priceUnit") | |||
| private Integer priceUnit; | |||
| @TableField(exist = false) | |||
| private String priceUnitName; | |||
| public String getPriceUnitName() { | |||
| if (null != priceUnit) { | |||
| return EnumRentContractAgilPriceUnit.getEnum(priceUnit).getMessage(); | |||
| } | |||
| return null; | |||
| } | |||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | |||
| private Date createTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | |||
| private Date updateTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="是否免租期",name="isFree") | |||
| private Integer isFree; | |||
| @io.swagger.annotations.ApiModelProperty(value="计租面积",name="rentArea") | |||
| private String rentArea; | |||
| } | |||
| @@ -0,0 +1,36 @@ | |||
| package com.iformall.enums; | |||
| /** | |||
| */ | |||
| public enum EnumRentAgileType { | |||
| STANDARDS_YEAR(1, "年计费基数合同"), | |||
| AGILE(2, "自定义合同"); | |||
| public static EnumRentAgileType getEnum(Integer code) { | |||
| for (EnumRentAgileType value : values()) { | |||
| if (value.getCode().equals(code)) { | |||
| return value; | |||
| } | |||
| } | |||
| return null; | |||
| } | |||
| private Integer code; | |||
| private String message; | |||
| EnumRentAgileType(Integer code, String message) { | |||
| this.code = code; | |||
| this.message = message; | |||
| } | |||
| public Integer getCode() { | |||
| return code; | |||
| } | |||
| public String getMessage() { | |||
| return message; | |||
| } | |||
| } | |||
| @@ -0,0 +1,42 @@ | |||
| package com.iformall.enums; | |||
| /** | |||
| */ | |||
| public enum EnumRentContractAgilPriceUnit { | |||
| MM_DAY(1, "㎡/天"), | |||
| MM_MONTH(2, "㎡/月"), | |||
| DAY(3,"天"), | |||
| MONTH(4,"月"), | |||
| QUATOR(5,"季度"), | |||
| HALF_YEAR(6,"半年"), | |||
| YEAR(7,"年"), | |||
| RENT_PERIOD(8,"租赁期"), | |||
| ; | |||
| public static EnumRentContractAgilPriceUnit getEnum(Integer code) { | |||
| for (EnumRentContractAgilPriceUnit value : values()) { | |||
| if (value.getCode().equals(code)) { | |||
| return value; | |||
| } | |||
| } | |||
| return null; | |||
| } | |||
| private Integer code; | |||
| private String message; | |||
| EnumRentContractAgilPriceUnit(Integer code, String message) { | |||
| this.code = code; | |||
| this.message = message; | |||
| } | |||
| public Integer getCode() { | |||
| return code; | |||
| } | |||
| public String getMessage() { | |||
| return message; | |||
| } | |||
| } | |||
| @@ -0,0 +1,36 @@ | |||
| package com.iformall.enums; | |||
| /** | |||
| */ | |||
| public enum EnumRentContractAgilSettingMethod { | |||
| BY_CONTRACT(1, "按合同设置费用"), | |||
| BY_SHOP(2, "按铺位设置费用") | |||
| ; | |||
| public static EnumRentContractAgilSettingMethod getEnum(Integer code) { | |||
| for (EnumRentContractAgilSettingMethod value : values()) { | |||
| if (value.getCode().equals(code)) { | |||
| return value; | |||
| } | |||
| } | |||
| return null; | |||
| } | |||
| private Integer code; | |||
| private String message; | |||
| EnumRentContractAgilSettingMethod(Integer code, String message) { | |||
| this.code = code; | |||
| this.message = message; | |||
| } | |||
| public Integer getCode() { | |||
| return code; | |||
| } | |||
| public String getMessage() { | |||
| return message; | |||
| } | |||
| } | |||
| @@ -0,0 +1,39 @@ | |||
| package com.iformall.enums; | |||
| /** | |||
| */ | |||
| public enum EnumRentContractAgilTimeUnit { | |||
| MONTH(1, "月"), | |||
| QUATOR(2,"季度"), | |||
| HALF_YEAR(3,"半年"), | |||
| YEAR(4,"年"), | |||
| RENT_PERIOD(5,"租赁期"), | |||
| ; | |||
| public static EnumRentContractAgilTimeUnit getEnum(Integer code) { | |||
| for (EnumRentContractAgilTimeUnit value : values()) { | |||
| if (value.getCode().equals(code)) { | |||
| return value; | |||
| } | |||
| } | |||
| return null; | |||
| } | |||
| private Integer code; | |||
| private String message; | |||
| EnumRentContractAgilTimeUnit(Integer code, String message) { | |||
| this.code = code; | |||
| this.message = message; | |||
| } | |||
| public Integer getCode() { | |||
| return code; | |||
| } | |||
| public String getMessage() { | |||
| return message; | |||
| } | |||
| } | |||
| @@ -0,0 +1,20 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxRentContractAgileDeposit; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import java.util.List; | |||
| /** | |||
| */ | |||
| public interface WxRentContractAgileDepositMapper extends CommonMapper<WxRentContractAgileDeposit, Long> { | |||
| List<WxRentContractAgileDeposit> findList(WxRentContractAgileDeposit wxBillRent); | |||
| WxRentContractAgileDeposit selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| List<Long> findIdList(WxRentContractAgileDeposit wxBillRent); | |||
| void deleteByContractId(WxRentContractAgileDeposit wxBillRent); | |||
| } | |||
| @@ -0,0 +1,21 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxRentContractAgileDepositShop; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import java.util.List; | |||
| /** | |||
| */ | |||
| public interface WxRentContractAgileDepositShopMapper extends CommonMapper<WxRentContractAgileDepositShop, Long> { | |||
| List<WxRentContractAgileDepositShop> findList(WxRentContractAgileDepositShop wxBillRent); | |||
| WxRentContractAgileDepositShop selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| List<Long> findIdList(WxRentContractAgileDepositShop wxBillRent); | |||
| void deleteByContractId(WxRentContractAgileDepositShop wxBillRent); | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxRentContractAgileUnDepositItem; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import java.util.List; | |||
| /** | |||
| */ | |||
| public interface WxRentContractAgileUnDepositItemMapper extends CommonMapper<WxRentContractAgileUnDepositItem, Long> { | |||
| List<WxRentContractAgileUnDepositItem> findList(WxRentContractAgileUnDepositItem wxBillRent); | |||
| WxRentContractAgileUnDepositItem selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| List<Long> findIdList(WxRentContractAgileUnDepositItem wxBillRent); | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxRentContractAgileUnDeposit; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import java.util.List; | |||
| /** | |||
| */ | |||
| public interface WxRentContractAgileUnDepositMapper extends CommonMapper<WxRentContractAgileUnDeposit, Long> { | |||
| List<WxRentContractAgileUnDeposit> findList(WxRentContractAgileUnDeposit wxBillRent); | |||
| WxRentContractAgileUnDeposit selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| List<Long> findIdList(WxRentContractAgileUnDeposit wxBillRent); | |||
| } | |||
| @@ -0,0 +1,24 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxRentContract; | |||
| import com.iformall.domain.po.WxRentContractAgileDeposit; | |||
| import java.util.List; | |||
| /** | |||
| */ | |||
| public interface WxAgileContractService { | |||
| PageInfo<WxRentContract> getRentContractList(WxRentContract record, Integer pageIndex, Integer pageSize); | |||
| WxRentContract selectById(Long id); | |||
| ResultData saveOrUpdate(WxRentContract record,MallUserInfo user); | |||
| ResultData saveDeposit(WxRentContract wxRentContract); | |||
| List<WxRentContractAgileDeposit> findShopFeesDeposit(WxRentContract wxRentContract); | |||
| } | |||
| @@ -0,0 +1,232 @@ | |||
| package com.iformall.service.impl; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxMerchant; | |||
| import com.iformall.domain.po.WxRentContract; | |||
| import com.iformall.domain.po.WxRentContractAgileDeposit; | |||
| import com.iformall.domain.po.WxRentContractAgileDepositShop; | |||
| import com.iformall.domain.po.WxShop; | |||
| import com.iformall.enums.EnumRentContractAppStatus; | |||
| import com.iformall.enums.EnumRentContractStatus; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.WxBusinessMapper; | |||
| import com.iformall.mapper.WxMerchantMapper; | |||
| import com.iformall.mapper.WxRentContractAgileDepositMapper; | |||
| import com.iformall.mapper.WxRentContractAgileDepositShopMapper; | |||
| import com.iformall.mapper.WxRentContractAgileUnDepositItemMapper; | |||
| import com.iformall.mapper.WxRentContractAgileUnDepositMapper; | |||
| import com.iformall.mapper.WxRentContractFreePeriodMapper; | |||
| import com.iformall.mapper.WxRentContractMapper; | |||
| import com.iformall.mapper.WxShopMapper; | |||
| import com.iformall.service.SysConfigService; | |||
| import com.iformall.service.WxAgileContractService; | |||
| import com.iformall.service.WxFlowRecordService; | |||
| import com.iformall.service.WxMallService; | |||
| import com.iformall.service.WxMerchantService; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.context.annotation.Lazy; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Propagation; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| import java.util.ArrayList; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| /** | |||
| */ | |||
| @Service | |||
| public class WxAgileContractServiceImpl implements WxAgileContractService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private String fmUploadDir; | |||
| @Autowired | |||
| WxRentContractMapper wxRentContractMapper; | |||
| @Autowired | |||
| WxRentContractAgileDepositMapper wxRentContractAgileDepositMapper; | |||
| @Autowired | |||
| WxRentContractAgileDepositShopMapper wxRentContractAgileDepositShopMapper; | |||
| @Autowired | |||
| WxRentContractAgileUnDepositMapper wxRentContractAgileUnDepositMapper; | |||
| @Autowired | |||
| WxRentContractAgileUnDepositItemMapper wxRentContractAgileUnDepositItemMapper; | |||
| @Autowired | |||
| WxRentContractFreePeriodMapper wxRentContractFreePeriodMapper; | |||
| @Autowired | |||
| WxShopMapper wxShopMapper; | |||
| @Lazy | |||
| @Autowired | |||
| WxMerchantService wxMerchantService; | |||
| @Autowired | |||
| WxMerchantMapper wxMerchantMapper; | |||
| @Autowired | |||
| WxBusinessMapper wxBusinessMapper; | |||
| @Lazy | |||
| @Autowired | |||
| WxMallService wxMallService; | |||
| @Lazy | |||
| @Autowired | |||
| WxFlowRecordService wxFlowRecordService; | |||
| @Lazy | |||
| @Autowired | |||
| SysConfigService sysConfigService; | |||
| @Override | |||
| public PageInfo<WxRentContract> getRentContractList(WxRentContract rentContract, Integer pageIndex, Integer pageSize) { | |||
| if (StringUtils.isNoneBlank(rentContract.getFloorForRule())) { | |||
| List<Long> mids = wxMerchantService.getFloorBuildMerchantIds(rentContract, rentContract.getFloorForRule() , null, null,rentContract.getShopTypeForRule(), 0, 0,null); | |||
| if (null == mids || mids.size() <= 0 ) { | |||
| rentContract.setId(-1L); | |||
| } else { | |||
| rentContract.setMerchantIds(mids); | |||
| } | |||
| } | |||
| PageInfo<WxRentContract> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxRentContractMapper.findList(rentContract)); | |||
| return pageInfo; | |||
| } | |||
| @Override | |||
| public WxRentContract selectById(Long id) { | |||
| return wxRentContractMapper.selectById(id); | |||
| } | |||
| @Override | |||
| public ResultData saveOrUpdate(WxRentContract record,MallUserInfo user) { | |||
| boolean isCreate = false; | |||
| if (null == record.getId()) { | |||
| //保存租赁合同信息 | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| record.setId(idWorker.nextId()); | |||
| isCreate = true; | |||
| record.setCreatetime(new Date()); | |||
| record.setCreateBy(user.getId()); | |||
| record.setCreateByName(user.getName()); | |||
| } | |||
| WxMerchant merchant = wxMerchantMapper.selectById(record.getMerchantId()); | |||
| record.setIsPrivateMerchant(merchant.getIsPrivate()); | |||
| record.setPrivateRentShopType(merchant.getCreateShopType()); | |||
| record.setMerchantName(merchant.getName()); | |||
| record.setUpdatetime(new Date()); | |||
| record.setUpdateBy(user.getId()); | |||
| record.setUpdateByName(user.getName()); | |||
| if (StringUtils.isEmpty(record.getPrice())) { | |||
| record.setPrice("0"); | |||
| } | |||
| if (StringUtils.isEmpty(record.getDeposit())) { | |||
| record.setDeposit("0"); | |||
| } | |||
| try { | |||
| record.setApplyStatus(EnumRentContractAppStatus.DEFAULT.getCode()); | |||
| record.setStatus(EnumRentContractStatus.UNWRITE.getCode()); | |||
| if (isCreate) { | |||
| wxRentContractMapper.insert(record); | |||
| }else { | |||
| wxRentContractMapper.updateById(record); | |||
| } | |||
| } catch (Exception e) { | |||
| logger.error("保存合同信息失败,e:" + e.getMessage(),e); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| return new ResultData(Result.SUCCESS, "保存合同信息成功", record); | |||
| } | |||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | |||
| @Override | |||
| public ResultData saveDeposit(WxRentContract wxRentContract) { | |||
| WxRentContract contract = this.selectById(wxRentContract.getId()); | |||
| WxRentContractAgileDeposit cdq = new WxRentContractAgileDeposit(); | |||
| cdq.updateTenantInfo(wxRentContract); | |||
| cdq.setRentContractId(wxRentContract.getId()); | |||
| wxRentContractAgileDepositMapper.deleteByContractId(cdq); | |||
| WxRentContractAgileDepositShop cadsq = new WxRentContractAgileDepositShop(); | |||
| cadsq.updateTenantInfo(wxRentContract); | |||
| cadsq.setRentContractId(wxRentContract.getId()); | |||
| wxRentContractAgileDepositShopMapper.deleteByContractId(cadsq); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| for (int i = 0 ; i < wxRentContract.getContractDepositList().size(); i++) { | |||
| WxRentContractAgileDeposit deposit = wxRentContract.getContractDepositList().get(i); | |||
| if (null != deposit.getShopList() && deposit.getShopList().size() > 0 ) { | |||
| WxRentContractAgileDeposit rca = new WxRentContractAgileDeposit(); | |||
| rca.setRentContractId(wxRentContract.getId()); | |||
| rca.setMerchantId(contract.getMerchantId()); | |||
| rca.updateTenantInfo(wxRentContract); | |||
| rca.setId(idWorker.nextId()); | |||
| rca.setFeesId(deposit.getFeesId()); | |||
| rca.setPrice(deposit.getPrice()); | |||
| rca.setCreateTime(new Date()); | |||
| rca.setUpdateTime(new Date()); | |||
| wxRentContractAgileDepositMapper.insert(rca); | |||
| for (int j = 0 ; j < deposit.getShopList().size(); j ++) { | |||
| WxShop s = deposit.getShopList().get(j); | |||
| WxRentContractAgileDepositShop ds = new WxRentContractAgileDepositShop(); | |||
| ds.setRentContractId(wxRentContract.getId()); | |||
| ds.updateTenantInfo(wxRentContract); | |||
| ds.setId(idWorker.nextId()); | |||
| ds.setCreateTime(new Date()); | |||
| ds.setUpdateTime(new Date()); | |||
| ds.setShopId(s.getId()); | |||
| ds.setShopNumber(s.getShopNumber()); | |||
| wxRentContractAgileDepositShopMapper.insert(ds); | |||
| } | |||
| } | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| @Override | |||
| public List<WxRentContractAgileDeposit> findShopFeesDeposit(WxRentContract wxRentContract) { | |||
| WxRentContractAgileDeposit adq = new WxRentContractAgileDeposit(); | |||
| adq.updateTenantInfo(wxRentContract); | |||
| adq.setRentContractId(wxRentContract.getId()); | |||
| List<WxRentContractAgileDeposit> depositList = wxRentContractAgileDepositMapper.findList(adq); | |||
| if (null != depositList && depositList.size() > 0 ) { | |||
| for (int i = 0 ; i < depositList.size(); i++ ) { | |||
| WxRentContractAgileDeposit d = depositList.get(i); | |||
| WxRentContractAgileDepositShop ds = new WxRentContractAgileDepositShop(); | |||
| ds.setRentContractId(wxRentContract.getId()); | |||
| ds.updateTenantInfo(wxRentContract); | |||
| ds.setRentDepositId(d.getId()); | |||
| List<WxRentContractAgileDepositShop> dslist = wxRentContractAgileDepositShopMapper.findList(ds); | |||
| if (null != dslist && dslist.size() > 0 ) { | |||
| List<WxShop> shopList = new ArrayList<WxShop>(); | |||
| for (int j = 0 ; j < dslist.size(); j++ ) { | |||
| WxRentContractAgileDepositShop ads = dslist.get(j); | |||
| WxShop sp = new WxShop(); | |||
| sp.setId(ads.getShopId()); | |||
| sp.setShopNumber(ads.getShopNumber()); | |||
| shopList.add(sp); | |||
| } | |||
| d.setShopList(shopList);; | |||
| } | |||
| } | |||
| } | |||
| return depositList; | |||
| } | |||
| } | |||
| @@ -718,6 +718,11 @@ public class WxEnergyServiceImpl implements WxEnergyService { | |||
| }else { | |||
| fees.setFixedPrice(EnumYesOrNo.NO.getCode()); | |||
| } | |||
| if (t.isDeposit()) { | |||
| fees.setIsDespoit(EnumYesOrNo.YES.getCode()); | |||
| }else { | |||
| fees.setIsDespoit(EnumYesOrNo.NO.getCode()); | |||
| } | |||
| Date date = new Date(); | |||
| fees.setCreateTime(date); | |||
| fees.setUpdateTime(date); | |||
| @@ -349,8 +349,10 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||
| record.setId(idWorker.nextId()); | |||
| record.setCreatetime(date); | |||
| record.setCreateBy(user.getId()); | |||
| record.setCreateByName(user.getName()); | |||
| record.setUpdatetime(date); | |||
| record.setUpdateBy(user.getId()); | |||
| record.setUpdateByName(user.getName()); | |||
| record.setStatus(EnumRentContractStatus.UNWRITE.getCode()); | |||
| record.setApplyStatus(EnumRentContractAppStatus.DEFAULT.getCode()); | |||
| wxPropertyContractMapper.insert(record); | |||
| @@ -358,6 +360,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||
| }else { | |||
| record.setUpdatetime(date); | |||
| record.setUpdateBy(user.getId()); | |||
| record.setUpdateByName(user.getName()); | |||
| wxPropertyContractMapper.updateById(record); | |||
| } | |||
| } catch (Exception e) { | |||
| @@ -48,6 +48,7 @@ import com.iformall.enums.EnumGetRatioFrom; | |||
| import com.iformall.enums.EnumIsPreview; | |||
| import com.iformall.enums.EnumMissTimeType; | |||
| import com.iformall.enums.EnumPriceUnit; | |||
| import com.iformall.enums.EnumRentAgileType; | |||
| import com.iformall.enums.EnumRentContractAdjustPeriod; | |||
| import com.iformall.enums.EnumRentContractAdjustRatioWay; | |||
| import com.iformall.enums.EnumRentContractAppStatus; | |||
| @@ -405,8 +406,10 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| Date date = new Date(); | |||
| record.setCreatetime(date); | |||
| record.setCreateBy(user.getId()); | |||
| record.setCreateByName(user.getName()); | |||
| record.setUpdatetime(date); | |||
| record.setUpdateBy(user.getId()); | |||
| record.setUpdateByName(user.getName()); | |||
| List<Long> shopList = Lists.newArrayList(); | |||
| String rentInfo = record.getRentInfo(); | |||
| @@ -439,6 +442,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| Date tempDate = record.getRentalStartDate(); | |||
| record.setRentalStartDate(oldRentStartDate); | |||
| record.setShopName(shopName); | |||
| record.setAgileType(EnumRentAgileType.STANDARDS_YEAR.getCode()); | |||
| wxRentContractMapper.insert(record); | |||
| record.setRentalStartDate(tempDate); | |||
| } catch (Exception e) { | |||
| @@ -717,7 +721,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| } | |||
| List<Long> shopList = Lists.newArrayList(); | |||
| record.setUpdatetime(new Date()); | |||
| record.setUpdateBy(user.getId());; | |||
| record.setUpdateBy(user.getId()); | |||
| record.setUpdateByName(user.getName()); | |||
| String rentInfo = record.getRentInfo(); | |||
| JSONArray rentInfoArray = JSONArray.parseArray(rentInfo); | |||
| int size = rentInfoArray.size(); | |||
| @@ -49,7 +49,9 @@ | |||
| <result column="rent_start_type" property="rentStartType"/> | |||
| <result column="fixed_price" jdbcType="INTEGER" property="fixedPrice"/> | |||
| <result column="create_by" jdbcType="BIGINT" property="createBy"/> | |||
| <result column="create_by_name" jdbcType="VARCHAR" property="createByName"/> | |||
| <result column="update_by" jdbcType="BIGINT" property="updateBy"/> | |||
| <result column="update_by_name" jdbcType="VARCHAR" property="updateByName"/> | |||
| <result column="operation_type" property="operationType"/> | |||
| <result column="late_pay_ratio" property="latePayRatio"/> | |||
| <result column="late_pay_day" property="latePayDay"/> | |||
| @@ -74,7 +76,7 @@ | |||
| <sql id="allColumns"> | |||
| `id`,`merchant_id`,`is_private_merchant`,`private_rent_shop_type`,`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`,`price_detail`, | |||
| `sign_date`,`receive_period`,`tenant_id`,`parent_tenant_id`,`filepath`,`status`,`contract_number`,`price_detail`,`create_by_name`,`update_by_name`, | |||
| `deposit`,`pay_date`,`is_del`,`merchant_name`,`brand`,`business_id`,`receive_period_unit`,`create_by`,`update_by`,`first_bill_receive_date`, | |||
| `shop_type`,`updatetime`,`createtime`,`rent_area`,`fees_standards_info`,`first_bill_date_start`,`first_bill_date_end`, | |||
| `link_person`,`link_phone`,`pay_account`,`filename`,`lease`,`rent_contract_id`,`day_price_calcute`,`month_average_days`, | |||
| @@ -0,0 +1,65 @@ | |||
| <?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.WxRentContractAgileDepositMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxRentContractAgileDeposit"> | |||
| <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="create_time" jdbcType="TIMESTAMP" property="createTime"/> | |||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | |||
| <result column="rent_contract_id" jdbcType="BIGINT" property="rentContractId"/> | |||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId"/> | |||
| <result column="fees_id" jdbcType="BIGINT" property="feesId"/> | |||
| <result column="price" jdbcType="VARCHAR" property="price"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`rent_contract_id`,`merchant_id`,`fees_id`,`price` | |||
| </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 != rentContractId ">and `rent_contract_id` = #{rentContractId}</if> | |||
| <if test=" null != merchantId ">and `merchant_id` = #{merchantId}</if> | |||
| <if test=" null != feesId ">and `fees_id` = #{feesId}</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.WxRentContractAgileDeposit" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_rent_contract_agile_deposit | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="findIdList" parameterType="com.iformall.domain.po.WxRentContractAgileDeposit" resultType="Long"> | |||
| select id | |||
| from wx_rent_contract_agile_deposit | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_rent_contract_agile_deposit where id = #{id} and `tenant_id` = #{tenantId} | |||
| </select> | |||
| <delete id= "deleteByContractId" parameterType="com.iformall.domain.po.WxRentContractAgileDeposit"> | |||
| delete from wx_rent_contract_agile_deposit where `rent_contract_id` = #{rentContractId} | |||
| </delete> | |||
| </mapper> | |||
| @@ -0,0 +1,65 @@ | |||
| <?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.WxRentContractAgileDepositShopMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxRentContractAgileDepositShop"> | |||
| <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="create_time" jdbcType="TIMESTAMP" property="createTime"/> | |||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | |||
| <result column="rent_contract_id" jdbcType="BIGINT" property="rentContractId"/> | |||
| <result column="rent_deposit_id" jdbcType="BIGINT" property="rentDepositId"/> | |||
| <result column="shop_id" jdbcType="BIGINT" property="shopId"/> | |||
| <result column="shop_number" jdbcType="VARCHAR" property="shopNumber"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`rent_contract_id`,`rent_deposit_id`,`shop_id`,`shop_number` | |||
| </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 != rentContractId ">and `rent_contract_id` = #{rentContractId}</if> | |||
| <if test=" null != rentDepositId ">and `rent_deposit_id` = #{rentDepositId}</if> | |||
| <if test=" null != shopId ">and `shop_id` = #{shopId}</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.WxRentContractAgileDepositShop" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_rent_contract_agile_deposit_shop | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="findIdList" parameterType="com.iformall.domain.po.WxRentContractAgileDepositShop" resultType="Long"> | |||
| select id | |||
| from wx_rent_contract_agile_deposit_shop | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_rent_contract_agile_deposit_shop where id = #{id} and `tenant_id` = #{tenantId} | |||
| </select> | |||
| <delete id= "deleteByContractId" parameterType="com.iformall.domain.po.WxRentContractAgileDepositShop"> | |||
| delete from wx_rent_contract_agile_deposit_shop where `rent_contract_id` = #{rentContractId} | |||
| </delete> | |||
| </mapper> | |||
| @@ -0,0 +1,70 @@ | |||
| <?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.WxRentContractAgileUnDepositItemMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxRentContractAgileUnDepositItem"> | |||
| <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="rent_contract_id" jdbcType="BIGINT" property="rentContractId"/> | |||
| <result column="un_deposit_id" jdbcType="BIGINT" property="unDepositId"/> | |||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId"/> | |||
| <result column="shop_id" jdbcType="BIGINT" property="shopId"/> | |||
| <result column="shop_number" jdbcType="VARCHAR" property="shopNumber"/> | |||
| <result column="fees_id" jdbcType="BIGINT" property="feesId"/> | |||
| <result column="begin_time" jdbcType="TIMESTAMP" property="beginTime"/> | |||
| <result column="end_time" jdbcType="TIMESTAMP" property="endTime"/> | |||
| <result column="price" jdbcType="VARCHAR" property="price"/> | |||
| <result column="price_unit" jdbcType="INTEGER" property="priceUnit"/> | |||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | |||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | |||
| <result column="is_free" jdbcType="INTEGER" property="isFree"/> | |||
| <result column="rent_area" jdbcType="VARCHAR" property="rentArea"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`tenant_id`,`parent_tenant_id`,`rent_contract_id`,`un_deposit_id`,`merchant_id`,`shop_id`,`shop_number`, | |||
| `fees_id`,`begin_time`,`end_time`,`price`,`price_unit`,`create_time`,`update_time`,`is_free`,`rent_area` | |||
| </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 != rentContractId ">and `rent_contract_id` = #{rentContractId}</if> | |||
| <if test=" null != merchantId ">and `merchant_id` = #{merchantId}</if> | |||
| <if test=" null != feesId ">and `fees_id` = #{feesId}</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.WxRentContractAgileUnDepositItem" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_rent_contract_agile_un_deposit_item | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="findIdList" parameterType="com.iformall.domain.po.WxRentContractAgileUnDepositItem" resultType="Long"> | |||
| select id | |||
| from wx_rent_contract_agile_un_deposit_item | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_rent_contract_agile_un_deposit_item where id = #{id} and `tenant_id` = #{tenantId} | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,67 @@ | |||
| <?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.WxRentContractAgileUnDepositMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxRentContractAgileUnDeposit"> | |||
| <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="rent_contract_id" jdbcType="BIGINT" property="rentContractId"/> | |||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId"/> | |||
| <result column="setting_method" jdbcType="INTEGER" property="settingMethod"/> | |||
| <result column="fees_id" jdbcType="BIGINT" property="feesId"/> | |||
| <result column="price" jdbcType="VARCHAR" property="price"/> | |||
| <result column="price_unit" jdbcType="INTEGER" property="priceUnit"/> | |||
| <result column="time_unit" jdbcType="INTEGER" property="timeUnit"/> | |||
| <result column="calcute_time" jdbcType="INTEGER" property="calcuteTime"/> | |||
| <result column="fees_create_rule" jdbcType="INTEGER" property="feesCreateRule"/> | |||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | |||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`tenant_id`,`parent_tenant_id`,`rent_contract_id`,`merchant_id`,`setting_method`,`fees_id`,`price`,`price_unit`, | |||
| `time_unit`,`calcute_time`,`fees_create_rule`,`create_time`,`update_time` | |||
| </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 != rentContractId ">and `rent_contract_id` = #{rentContractId}</if> | |||
| <if test=" null != merchantId ">and `merchant_id` = #{merchantId}</if> | |||
| <if test=" null != feesId ">and `fees_id` = #{feesId}</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.WxRentContractAgileUnDeposit" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_rent_contract_agile_un_deposit | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="findIdList" parameterType="com.iformall.domain.po.WxRentContractAgileUnDeposit" resultType="Long"> | |||
| select id | |||
| from wx_rent_contract_agile_un_deposit | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_rent_contract_agile_un_deposit where id = #{id} and `tenant_id` = #{tenantId} | |||
| </select> | |||
| </mapper> | |||
| @@ -29,7 +29,9 @@ | |||
| <result column="contract_number" jdbcType="VARCHAR" property="contractNumber"/> | |||
| <result column="create_by" jdbcType="BIGINT" property="createBy"/> | |||
| <result column="create_by_name" jdbcType="VARCHAR" property="createByName"/> | |||
| <result column="update_by" jdbcType="BIGINT" property="updateBy"/> | |||
| <result column="update_by_name" jdbcType="VARCHAR" property="updateByName"/> | |||
| <result column="first_party_bank_info" jdbcType="VARCHAR" property="firstPartyBankInfo"/> | |||
| <result column="second_party_bank_info" jdbcType="VARCHAR" property="secondPartyBankInfo"/> | |||
| <result column="second_party_tax_info" jdbcType="VARCHAR" property="secondPartyTaxInfo"/> | |||
| @@ -130,10 +132,12 @@ | |||
| <result column="first_bill_date_start" jdbcType="TIMESTAMP" property="firstBillDateStart"/> | |||
| <result column="first_bill_date_end" jdbcType="TIMESTAMP" property="firstBillDateEnd"/> | |||
| <result column="first_bill_receive_date" jdbcType="TIMESTAMP" property="firstBillReceiveDate"/> | |||
| <result column="agile_type" jdbcType="INTEGER" property="agileType"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`merchant_id`,`is_private_merchant`,`private_rent_shop_type`, | |||
| `id`,`merchant_id`,`is_private_merchant`,`private_rent_shop_type`,`agile_type`, | |||
| `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`,`price_detail`,`create_by`,`update_by`, | |||
| @@ -143,7 +147,7 @@ | |||
| `brand`,`business_id`,`shop_type`,`shop_type_str`,`updatetime`,`createtime`,`link_person`,`link_phone`,`link_address`, | |||
| `pay_account`,`filename`,`lease`,`type`,`revenue`,`revenue_ratio`,`revenue_ratio_way`,`revenue_ratio_set`,`adjust_ratio`,`adjust_period`,`pay_ratio`, | |||
| `start_date`,`end_date`,`shop_name`,`from_id`,`end_contract_time`,`revenue_fixed_rent_price`,`revenue_rent_price`, | |||
| `apply_status`,`bank_name`,`fix_start_date`,`fix_end_date`,`pay_period_rate`, | |||
| `apply_status`,`bank_name`,`fix_start_date`,`fix_end_date`,`pay_period_rate`,`create_by_name`,`update_by_name`, | |||
| `business_type`,`rent_info`, `file_names`,price_unit,rent_price,other_rent_price_info,`subject_name`,rent_start_type, | |||
| `rent_input_way`,`adjust_ratio_way`,`operation_type`,late_pay_ratio,late_pay_day,first_bill_receive_date, | |||
| bussiness_management_fee,bussiness_management_fee_ratio_way,bussiness_management_fee_ratio, | |||
| @@ -158,6 +162,7 @@ | |||
| <if test=" null != merchantId and '' != merchantId">and `merchant_id` = #{merchantId}</if> | |||
| <if test=" null != isPrivateMerchant">and `is_private_merchant` = #{isPrivateMerchant}</if> | |||
| <if test=" null != privateRentShopType">and `private_rent_shop_type` = #{privateRentShopType}</if> | |||
| <if test=" null != agileType">and `agile_type` = #{agileType}</if> | |||
| <if test=" null != price and '' != price">and `price` = #{price}</if> | |||
| <if test=" null != rentalStartDate and '' != rentalStartDate">and `rental_start_date` = #{rentalStartDate}</if> | |||
| <if test=" null != rentalEndDate and '' != rentalEndDate">and `rental_end_date` = #{rentalEndDate}</if> | |||