| @@ -23,11 +23,15 @@ public class WxContractBaseController extends BaseController{ | |||||
| @Autowired | @Autowired | ||||
| private WxFlowService wxFlowService; | private WxFlowService wxFlowService; | ||||
| protected Map<String,Object> generateFlowParams(EnumFlowKey flowType,EnumFlowContractType contractType,String remark,Long contractId) { | |||||
| protected Map<String,Object> generateFlowParams(EnumFlowKey flowType,EnumFlowContractType contractType,String remark,Long contractId,Long wholeProperyId) { | |||||
| Map<String,Object> map = new HashMap<String,Object>(); | Map<String,Object> map = new HashMap<String,Object>(); | ||||
| map.put("businessType", flowType.getCode()); | map.put("businessType", flowType.getCode()); | ||||
| map.put("remark", remark); | map.put("remark", remark); | ||||
| map.put("businessId", String.valueOf(contractId)); | map.put("businessId", String.valueOf(contractId)); | ||||
| //租金+物业合同时用到 | |||||
| if (null != wholeProperyId) { | |||||
| map.put("wholeProperyId", String.valueOf(wholeProperyId)); | |||||
| } | |||||
| List<Map> variablesList = new ArrayList<Map>(); | List<Map> variablesList = new ArrayList<Map>(); | ||||
| Map contractTypeMap = new HashMap<String,Object>(); | Map contractTypeMap = new HashMap<String,Object>(); | ||||
| contractTypeMap.put("key","contractType"); | contractTypeMap.put("key","contractType"); | ||||
| @@ -152,6 +152,10 @@ public class WxPropertyContractController extends WxContractBaseController { | |||||
| contract.setUpdatetime(new Date()); | contract.setUpdatetime(new Date()); | ||||
| try { | try { | ||||
| wxPropertyContractService.updatePropertyContract(contract); | wxPropertyContractService.updatePropertyContract(contract); | ||||
| if (contract.getOperationType().intValue() == EnumContractOperationType.WHOLE.getCode().intValue()) { | |||||
| } | |||||
| return new ResultData(contract); | return new ResultData(contract); | ||||
| }catch(Exception e) { | }catch(Exception e) { | ||||
| logger.error(" WxPropertyContract unvalid error.",e); | logger.error(" WxPropertyContract unvalid error.",e); | ||||
| @@ -212,15 +216,15 @@ public class WxPropertyContractController extends WxContractBaseController { | |||||
| } | } | ||||
| if(contract.getOperationType().intValue() == EnumContractOperationType.PART.getCode().intValue()) { | if(contract.getOperationType().intValue() == EnumContractOperationType.PART.getCode().intValue()) { | ||||
| if (contract.getRentShopType().intValue() == EnumRentShopType.SHOP.getCode().intValue()) { | if (contract.getRentShopType().intValue() == EnumRentShopType.SHOP.getCode().intValue()) { | ||||
| contract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_PRO_CONTRACT, EnumFlowContractType.PROPERTY, contract.getRemark(), contract.getId())); | |||||
| contract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_PRO_CONTRACT, EnumFlowContractType.PROPERTY, contract.getRemark(), contract.getId(),null)); | |||||
| }else if (contract.getRentShopType().intValue() == EnumRentShopType.POINT.getCode().intValue()) { | }else if (contract.getRentShopType().intValue() == EnumRentShopType.POINT.getCode().intValue()) { | ||||
| contract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_PRO_POINT_CONTRACT, EnumFlowContractType.PROPERTY_POINT, contract.getRemark(), contract.getId())); | |||||
| contract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_PRO_POINT_CONTRACT, EnumFlowContractType.PROPERTY_POINT, contract.getRemark(), contract.getId(),null)); | |||||
| } | } | ||||
| }else { | }else { | ||||
| if (contract.getRentShopType().intValue() == EnumRentShopType.SHOP.getCode().intValue()) { | if (contract.getRentShopType().intValue() == EnumRentShopType.SHOP.getCode().intValue()) { | ||||
| contract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_PRO_CONTRACT, EnumFlowContractType.WHOLE_SHOP, contract.getRemark(), contract.getId())); | |||||
| contract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_PRO_CONTRACT, EnumFlowContractType.WHOLE_SHOP, contract.getRemark(), contract.getId(),null)); | |||||
| }else if (contract.getRentShopType().intValue() == EnumRentShopType.POINT.getCode().intValue()) { | }else if (contract.getRentShopType().intValue() == EnumRentShopType.POINT.getCode().intValue()) { | ||||
| contract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_PRO_POINT_CONTRACT, EnumFlowContractType.WHOLE_POINT, contract.getRemark(), contract.getId())); | |||||
| contract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_PRO_POINT_CONTRACT, EnumFlowContractType.WHOLE_POINT, contract.getRemark(), contract.getId(),null)); | |||||
| } | } | ||||
| } | } | ||||
| return wxPropertyContractService.apply(contract,user); | return wxPropertyContractService.apply(contract,user); | ||||
| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.controller.contract; | package com.iformall.controller.contract; | ||||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.annotation.SystemControllerLog; | import com.iformall.annotation.SystemControllerLog; | ||||
| import com.iformall.annotation.UserDataRuleAnnotation; | import com.iformall.annotation.UserDataRuleAnnotation; | ||||
| @@ -9,6 +10,7 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
| import com.iformall.enums.EnumContractOperationType; | |||||
| import com.iformall.enums.EnumContractType; | import com.iformall.enums.EnumContractType; | ||||
| import com.iformall.enums.EnumFlowContractType; | import com.iformall.enums.EnumFlowContractType; | ||||
| import com.iformall.enums.EnumFlowKey; | import com.iformall.enums.EnumFlowKey; | ||||
| @@ -60,18 +62,16 @@ public class WxRentContractController extends WxContractBaseController { | |||||
| private WxMerchantService wxMerchantService; | private WxMerchantService wxMerchantService; | ||||
| @Autowired | @Autowired | ||||
| private WxRentContractMapper wxRentContractMapper; | private WxRentContractMapper wxRentContractMapper; | ||||
| @Autowired | @Autowired | ||||
| WxBillRentMapper wxBillRentMapper; | WxBillRentMapper wxBillRentMapper; | ||||
| @Autowired | @Autowired | ||||
| WxBillPropertyMapper wxBillPropertyMapper; | WxBillPropertyMapper wxBillPropertyMapper; | ||||
| @Autowired | @Autowired | ||||
| private WxRentPropertyContractService wxRentPropertyContractService; | private WxRentPropertyContractService wxRentPropertyContractService; | ||||
| @Autowired | @Autowired | ||||
| private WxShopService wxShopService; | private WxShopService wxShopService; | ||||
| @Autowired | |||||
| WxPropertyContractService wxPropertyContractService; | |||||
| @UserDataRuleAnnotation("rent_contract_list") | @UserDataRuleAnnotation("rent_contract_list") | ||||
| @GetMapping("/list") | @GetMapping("/list") | ||||
| @@ -421,11 +421,20 @@ public class WxRentContractController extends WxContractBaseController { | |||||
| if(rentContractHasWorkFlow(rentContract)) { | if(rentContractHasWorkFlow(rentContract)) { | ||||
| return new ResultData(ErrorCode.FLOW_FAIL.getCode(),"租赁合同存在工作流,不允许直接生效。"); | return new ResultData(ErrorCode.FLOW_FAIL.getCode(),"租赁合同存在工作流,不允许直接生效。"); | ||||
| } | } | ||||
| if (rentContract.getRentShopType().intValue() == EnumRentShopType.SHOP.getCode().intValue()) { | |||||
| rentContract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_RENT_CONTRACT, EnumFlowContractType.RENT, wxRentContract.getRemark(), wxRentContract.getId())); | |||||
| }else if (rentContract.getRentShopType().intValue() == EnumRentShopType.POINT.getCode().intValue()) { | |||||
| rentContract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_SHOP_CONTRACT, EnumFlowContractType.RENT_POINT, wxRentContract.getRemark(), wxRentContract.getId())); | |||||
| } | |||||
| if(rentContract.getOperationType().intValue() == EnumContractOperationType.PART.getCode().intValue()) { | |||||
| if (rentContract.getRentShopType().intValue() == EnumRentShopType.SHOP.getCode().intValue()) { | |||||
| rentContract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_RENT_CONTRACT, EnumFlowContractType.RENT, wxRentContract.getRemark(), wxRentContract.getId(),null)); | |||||
| }else if (rentContract.getRentShopType().intValue() == EnumRentShopType.POINT.getCode().intValue()) { | |||||
| rentContract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_SHOP_CONTRACT, EnumFlowContractType.RENT_POINT, wxRentContract.getRemark(), wxRentContract.getId(),null)); | |||||
| } | |||||
| }else { | |||||
| if (rentContract.getRentShopType().intValue() == EnumRentShopType.SHOP.getCode().intValue()) { | |||||
| rentContract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_RENT_CONTRACT, EnumFlowContractType.WHOLE_SHOP, wxRentContract.getRemark(), wxRentContract.getId(),wxRentContract.getPropertyId())); | |||||
| }else if (rentContract.getRentShopType().intValue() == EnumRentShopType.POINT.getCode().intValue()) { | |||||
| rentContract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_SHOP_CONTRACT, EnumFlowContractType.WHOLE_POINT, wxRentContract.getRemark(), wxRentContract.getId(),wxRentContract.getPropertyId())); | |||||
| } | |||||
| } | |||||
| return wxRentContractService.apply(rentContract,user); | return wxRentContractService.apply(rentContract,user); | ||||
| } | } | ||||
| @@ -33,7 +33,6 @@ public class WxRentPropertyContractController extends WxContractBaseController { | |||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | ||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | ||||
| @SystemControllerLog(description = "租赁物业合同-列表") | |||||
| public ResultData list(@ModelAttribute WxRentPropertyContractVo wxRentPropertyContractVo, Integer pageNum, Integer pageSize) { | public ResultData list(@ModelAttribute WxRentPropertyContractVo wxRentPropertyContractVo, Integer pageNum, Integer pageSize) { | ||||
| logger.debug("[" + getIpAddr() + "] wxRentPropertyContract::list"); | logger.debug("[" + getIpAddr() + "] wxRentPropertyContract::list"); | ||||
| if (null == wxRentPropertyContractVo) { | if (null == wxRentPropertyContractVo) { | ||||
| @@ -46,20 +45,22 @@ public class WxRentPropertyContractController extends WxContractBaseController { | |||||
| @ApiOperation("根据id查询接口") | @ApiOperation("根据id查询接口") | ||||
| @GetMapping("/findById") | @GetMapping("/findById") | ||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| @SystemControllerLog(description = "租赁物业合同-根据id查询接口") | |||||
| public ResultData findById(Long id) { | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "rentId", value = "租金合同编号", dataType = "Long", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "propertyId", value = "物业合同编号", dataType = "Long", paramType = "query", required = true)}) | |||||
| public ResultData findById(Long rentId,Long propertyId) { | |||||
| logger.debug("[" + getIpAddr() + "] wxRentPropertyContract::findById"); | logger.debug("[" + getIpAddr() + "] wxRentPropertyContract::findById"); | ||||
| return wxRentPropertyContractService.getContractInfo(id); | |||||
| return wxRentPropertyContractService.getContractInfo(rentId,propertyId); | |||||
| } | } | ||||
| @ApiOperation("合同审批详情") | @ApiOperation("合同审批详情") | ||||
| @GetMapping("/getContractApplyInfo") | @GetMapping("/getContractApplyInfo") | ||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| @SystemControllerLog(description = "租赁物业合同-合同审批详情") | |||||
| public ResultData getContractApplyInfo(Long id) { | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "rentId", value = "租金合同编号", dataType = "Long", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "propertyId", value = "物业合同编号", dataType = "Long", paramType = "query", required = true)}) | |||||
| public ResultData getContractApplyInfo(Long rentId,Long propertyId) { | |||||
| logger.debug("[" + getIpAddr() + "] wxRentPropertyContract::getContractApplyInfo"); | logger.debug("[" + getIpAddr() + "] wxRentPropertyContract::getContractApplyInfo"); | ||||
| return wxRentPropertyContractService.getContractApplyInfo(id); | |||||
| return wxRentPropertyContractService.getContractApplyInfo(rentId,propertyId); | |||||
| } | } | ||||
| @PostMapping("insertRentForCreate") | @PostMapping("insertRentForCreate") | ||||
| @@ -203,6 +203,10 @@ public class WxRentContract extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @io.swagger.annotations.ApiModelProperty(value = "审批说明", name = "remark") | @io.swagger.annotations.ApiModelProperty(value = "审批说明", name = "remark") | ||||
| private String remark; | private String remark; | ||||
| @TableField(exist = false) | |||||
| @io.swagger.annotations.ApiModelProperty(value = "审批时带的物业合同编号,租金+物业时用", name = "propertyId") | |||||
| private Long propertyId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "租金信息", name = "rentInfo") | @io.swagger.annotations.ApiModelProperty(value = "租金信息", name = "rentInfo") | ||||
| private String rentInfo; | private String rentInfo; | ||||
| @@ -17,6 +17,9 @@ public class WxRentPropertyContractVo extends TenantEntity { | |||||
| protected Long id; | protected Long id; | ||||
| private Long rentId; | |||||
| private Long propertyId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "合同编号", name = "contractNumber") | @io.swagger.annotations.ApiModelProperty(value = "合同编号", name = "contractNumber") | ||||
| private String contractNumber; | private String contractNumber; | ||||
| @@ -12,9 +12,9 @@ public interface WxRentPropertyContractService { | |||||
| PageInfo<WxRentPropertyContractVo> listContractVo(WxRentPropertyContractVo wxRentPropertyContractVo, Integer pageNum, Integer pageSize); | PageInfo<WxRentPropertyContractVo> listContractVo(WxRentPropertyContractVo wxRentPropertyContractVo, Integer pageNum, Integer pageSize); | ||||
| ResultData getContractInfo(Long id); | |||||
| ResultData getContractInfo(Long rentId,Long propertyId); | |||||
| ResultData getContractApplyInfo(Long id); | |||||
| ResultData getContractApplyInfo(Long rentId,Long propertyId); | |||||
| ResultData insertRentForCreate(WxRentContract wxRentContract); | ResultData insertRentForCreate(WxRentContract wxRentContract); | ||||
| @@ -193,7 +193,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| if(record.getOperationType().equals(EnumContractOperationType.WHOLE.getCode())){ | if(record.getOperationType().equals(EnumContractOperationType.WHOLE.getCode())){ | ||||
| isrentproperty = true; | isrentproperty = true; | ||||
| } | } | ||||
| String wholeProperyId = (String)mapInfo.get("wholeProperyId"); | |||||
| //如果是提交审批 , 审批驳回状态不变 | //如果是提交审批 , 审批驳回状态不变 | ||||
| if (EnumRentContractAppStatus.APPLYING.getCode().intValue() == applyStatus.intValue()) { | if (EnumRentContractAppStatus.APPLYING.getCode().intValue() == applyStatus.intValue()) { | ||||
| //如果合同的状态非正常,则不处理 | //如果合同的状态非正常,则不处理 | ||||
| @@ -208,12 +208,13 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| }else if (EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { | }else if (EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { | ||||
| wxRentContractService.updateRentContractStatus(businessId); | wxRentContractService.updateRentContractStatus(businessId); | ||||
| if (isrentproperty) { | if (isrentproperty) { | ||||
| wxPropertyContractService.updatePropertyContractStatus(businessId); | |||||
| wxPropertyContractService.updatePropertyContractStatus(Long.parseLong(wholeProperyId)); | |||||
| } | } | ||||
| } | } | ||||
| wxRentContractService.updateApplyStatus(rent); | wxRentContractService.updateApplyStatus(rent); | ||||
| if (isrentproperty) { | if (isrentproperty) { | ||||
| WxPropertyContract wxPropertyContract = new WxPropertyContract(); | WxPropertyContract wxPropertyContract = new WxPropertyContract(); | ||||
| wxPropertyContract.setId(Long.parseLong(wholeProperyId)); | |||||
| wxPropertyContract.setRentContractId(record.getId()); | wxPropertyContract.setRentContractId(record.getId()); | ||||
| wxPropertyContract.setStatus(propertyStatus); | wxPropertyContract.setStatus(propertyStatus); | ||||
| wxPropertyContract.setApplyStatus(applyStatus); | wxPropertyContract.setApplyStatus(applyStatus); | ||||
| @@ -52,13 +52,14 @@ public class WxRentPropertyContractServiceImpl implements WxRentPropertyContract | |||||
| } | } | ||||
| @Override | @Override | ||||
| public ResultData getContractInfo(Long id) { | |||||
| public ResultData getContractInfo(Long rentId,Long propertyId) { | |||||
| Map<String, Object> data = new HashMap<>(2); | Map<String, Object> data = new HashMap<>(2); | ||||
| Map<String, Object> rent = wxRentContractService.getById(id); | |||||
| Map<String, Object> rent = wxRentContractService.getById(rentId); | |||||
| data.put("rent", rent); | data.put("rent", rent); | ||||
| WxPropertyContract wxPropertyContractQuery = new WxPropertyContract(); | |||||
| wxPropertyContractQuery.setRentContractId(id); | |||||
| WxPropertyContract propertyContract = wxPropertyContractMapper.selectOne(new QueryWrapper(wxPropertyContractQuery)); | |||||
| //WxPropertyContract wxPropertyContractQuery = new WxPropertyContract(); | |||||
| //wxPropertyContractQuery.setRentContractId(rentId); | |||||
| //WxPropertyContract propertyContract = wxPropertyContractMapper.selectOne(new QueryWrapper(wxPropertyContractQuery)); | |||||
| WxPropertyContract propertyContract = wxPropertyContractMapper.selectById(propertyId); | |||||
| if (propertyContract != null) { | if (propertyContract != null) { | ||||
| List<WxBillProperty> wxBillPropertyPreview = wxPropertyContractService.getWxBillPropertyPreview(propertyContract.getId()); | List<WxBillProperty> wxBillPropertyPreview = wxPropertyContractService.getWxBillPropertyPreview(propertyContract.getId()); | ||||
| propertyContract.setPreviewBillRentList(wxBillPropertyPreview); | propertyContract.setPreviewBillRentList(wxBillPropertyPreview); | ||||
| @@ -69,13 +70,14 @@ public class WxRentPropertyContractServiceImpl implements WxRentPropertyContract | |||||
| @Override | @Override | ||||
| public ResultData getContractApplyInfo(Long id) { | |||||
| public ResultData getContractApplyInfo(Long rentId,Long propertyId) { | |||||
| Map<String, Object> data = new HashMap<>(2); | Map<String, Object> data = new HashMap<>(2); | ||||
| Map<String, Object> rent = wxRentContractService.getById(id); | |||||
| Map<String, Object> rent = wxRentContractService.getById(rentId); | |||||
| data.put("rent", rent); | data.put("rent", rent); | ||||
| WxPropertyContract wxPropertyContractQuery = new WxPropertyContract(); | |||||
| wxPropertyContractQuery.setRentContractId(id); | |||||
| WxPropertyContract propertyContract = wxPropertyContractMapper.selectOne(new QueryWrapper(wxPropertyContractQuery)); | |||||
| // WxPropertyContract wxPropertyContractQuery = new WxPropertyContract(); | |||||
| // wxPropertyContractQuery.setRentContractId(id); | |||||
| // WxPropertyContract propertyContract = wxPropertyContractMapper.selectOne(new QueryWrapper(wxPropertyContractQuery)); | |||||
| WxPropertyContract propertyContract = wxPropertyContractMapper.selectById(propertyId); | |||||
| if (propertyContract != null) { | if (propertyContract != null) { | ||||
| try { | try { | ||||
| Map<String, Object> property = wxPropertyContractService.getById(propertyContract.getId()); | Map<String, Object> property = wxPropertyContractService.getById(propertyContract.getId()); | ||||
| @@ -356,7 +356,7 @@ | |||||
| update wx_property_contract set apply_status=#{applyStatus} | update wx_property_contract set apply_status=#{applyStatus} | ||||
| <if test=" null != businessType ">,business_type=#{businessType}</if> | <if test=" null != businessType ">,business_type=#{businessType}</if> | ||||
| <if test=" null != status ">,status=#{status}</if> | <if test=" null != status ">,status=#{status}</if> | ||||
| where rent_contract_id=#{rentContractId} | |||||
| where rent_contract_id=#{rentContractId} and id = #{id} | |||||
| </update> | </update> | ||||
| <update id="updateStatus" parameterType="com.iformall.domain.po.WxPropertyContract"> | <update id="updateStatus" parameterType="com.iformall.domain.po.WxPropertyContract"> | ||||
| @@ -516,7 +516,8 @@ | |||||
| <resultMap id="contractMap" type="com.iformall.domain.vo.WxRentPropertyContractVo"> | <resultMap id="contractMap" type="com.iformall.domain.vo.WxRentPropertyContractVo"> | ||||
| <id column="id" property="id"/> | <id column="id" property="id"/> | ||||
| <result column="contract_number" property="contractNumber"/> | |||||
| <result column="rent_id" property="rentId"/> | |||||
| <result column="property_id" property="propertyId"/> | |||||
| <result column="shop_name" property="shopName"/> | <result column="shop_name" property="shopName"/> | ||||
| <result column="merchant_name" property="merchantName"/> | <result column="merchant_name" property="merchantName"/> | ||||
| <result column="rent_info" property="rentInfo"/> | <result column="rent_info" property="rentInfo"/> | ||||
| @@ -539,7 +540,7 @@ | |||||
| <select id="listContractVo" parameterType="com.iformall.domain.vo.WxRentPropertyContractVo" resultMap="contractMap"> | <select id="listContractVo" parameterType="com.iformall.domain.vo.WxRentPropertyContractVo" resultMap="contractMap"> | ||||
| select rc.id,rc.merchant_name,rc.rental_start_date,rc.rental_end_date,rc.`status`, | |||||
| select rc.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.rent_shop_type,rc.rent_info,pc.price as property_price,rc.merchant_id,pc.`status` as property_status, | 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.price_unit as rent_price_unit,pc.price_unit as property_price_unit, | ||||
| @@ -552,6 +553,12 @@ | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | <if test=" null != parentTenantId and '' != parentTenantId"> | ||||
| and rc.`parent_tenant_id` = #{parentTenantId} | and rc.`parent_tenant_id` = #{parentTenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != rentId and '' != rentId"> | |||||
| and rc.`id` = #{rentId} | |||||
| </if> | |||||
| <if test=" null != propertyId and '' != propertyId"> | |||||
| and pc.`id` = #{propertyId} | |||||
| </if> | |||||
| <if test=" null != merchantName and merchantName!=''">and rc.`merchant_name` like | <if test=" null != merchantName and merchantName!=''">and rc.`merchant_name` like | ||||
| concat('%',#{merchantName},'%') | concat('%',#{merchantName},'%') | ||||
| </if> | </if> | ||||