接口联调

This commit is contained in:
mashuai 2024-12-01 13:30:13 +08:00
parent ef367f4d2c
commit 6587008d07
11 changed files with 108 additions and 5 deletions

View File

@ -0,0 +1,22 @@
package com.bonus.common.biz.domain.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author ma_sh
* @create 2024/12/1 12:29
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AreaVo {
@ApiModelProperty(value = "区域id")
private Long areaId;
@ApiModelProperty(value = "区域名称")
private String areaName;
}

View File

@ -123,6 +123,14 @@ public class BookCarServiceImpl implements BookCarService {
Long userId = SecurityUtils.getLoginUser().getUserid(); Long userId = SecurityUtils.getLoginUser().getUserid();
devInfo.setOrderUser(userId); devInfo.setOrderUser(userId);
List<DevInfoVo> bookCarDetails = bookCarMapper.getBookCarDetails(devInfo); List<DevInfoVo> bookCarDetails = bookCarMapper.getBookCarDetails(devInfo);
BmFileInfo bmFileInfo = new BmFileInfo();
bmFileInfo.setModelId(Long.parseLong(devInfo.getMaId()));
bmFileInfo.setTaskType(MaterialConstants.MATERIAL_FILE_TYPE_CODE);
bmFileInfo.setFileType(0L);
List<BmFileInfo> mainFileInfoList = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo);
if (CollectionUtils.isNotEmpty(mainFileInfoList) && CollectionUtils.isNotEmpty(bookCarDetails)) {
bookCarDetails.get(0).setPicUrl(mainFileInfoList.get(0).getFileUrl());
}
return AjaxResult.success(bookCarDetails); return AjaxResult.success(bookCarDetails);
} }
} }

View File

@ -1,6 +1,7 @@
package com.bonus.material.home.controller; package com.bonus.material.home.controller;
import com.bonus.common.biz.domain.TypeInfo; import com.bonus.common.biz.domain.TypeInfo;
import com.bonus.common.biz.domain.vo.AreaVo;
import com.bonus.common.core.web.controller.BaseController; import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.material.device.domain.vo.DevInfoVo; import com.bonus.material.device.domain.vo.DevInfoVo;
@ -60,4 +61,16 @@ public class MaTypeInfoController extends BaseController {
return AjaxResult.success(list); return AjaxResult.success(list);
} }
/**
* 租用需求大厅区域
* @param areaVo
* @return
*/
@ApiOperation("租赁需求大厅区域")
@GetMapping("/getArea")
public AjaxResult getArea(AreaVo areaVo) {
List<AreaVo> list = maTypeInfoSevice.getArea(areaVo);
return AjaxResult.success(list);
}
} }

View File

@ -3,6 +3,7 @@ package com.bonus.material.home.mapper;
import com.bonus.common.biz.domain.TreeNode; import com.bonus.common.biz.domain.TreeNode;
import com.bonus.common.biz.domain.TypeInfo; import com.bonus.common.biz.domain.TypeInfo;
import com.bonus.common.biz.domain.vo.AreaVo;
import com.bonus.material.device.domain.vo.DevInfoVo; import com.bonus.material.device.domain.vo.DevInfoVo;
import java.util.List; import java.util.List;
@ -32,4 +33,11 @@ public interface MaTypeInfoMapper {
* @return * @return
*/ */
List<TypeInfo> getTypeList(TypeInfo typeInfo); List<TypeInfo> getTypeList(TypeInfo typeInfo);
/**
* 租用需求大厅区域
* @param areaVo
* @return
*/
List<AreaVo> getArea(AreaVo areaVo);
} }

View File

@ -1,6 +1,7 @@
package com.bonus.material.home.service; package com.bonus.material.home.service;
import com.bonus.common.biz.domain.TypeInfo; import com.bonus.common.biz.domain.TypeInfo;
import com.bonus.common.biz.domain.vo.AreaVo;
import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.material.device.domain.vo.DevInfoVo; import com.bonus.material.device.domain.vo.DevInfoVo;
@ -30,4 +31,11 @@ public interface MaTypeInfoSevice {
*/ */
List<TypeInfo> getTypeList(TypeInfo typeInfo); List<TypeInfo> getTypeList(TypeInfo typeInfo);
/**
* 租用需求大厅区域
* @param areaVo
* @return
*/
List<AreaVo> getArea(AreaVo areaVo);
} }

View File

@ -3,6 +3,7 @@ package com.bonus.material.home.service.impl;
import com.bonus.common.biz.domain.TreeBuild; import com.bonus.common.biz.domain.TreeBuild;
import com.bonus.common.biz.domain.TreeNode; import com.bonus.common.biz.domain.TreeNode;
import com.bonus.common.biz.domain.TypeInfo; import com.bonus.common.biz.domain.TypeInfo;
import com.bonus.common.biz.domain.vo.AreaVo;
import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.material.device.domain.vo.DevInfoVo; import com.bonus.material.device.domain.vo.DevInfoVo;
import com.bonus.material.home.mapper.MaTypeInfoMapper; import com.bonus.material.home.mapper.MaTypeInfoMapper;
@ -14,8 +15,6 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
@Service @Service
@Slf4j @Slf4j
@ -66,4 +65,14 @@ public class MaTypeInfoServiceImpl implements MaTypeInfoSevice {
return maTypeInfoMapper.getTypeList(typeInfo); return maTypeInfoMapper.getTypeList(typeInfo);
} }
/**
* 租用需求大厅区域
* @param areaVo
* @return
*/
@Override
public List<AreaVo> getArea(AreaVo areaVo) {
return maTypeInfoMapper.getArea(areaVo);
}
} }

View File

@ -60,4 +60,10 @@ public class MaLease {
@ApiModelProperty("关键字") @ApiModelProperty("关键字")
private String keyWord; private String keyWord;
@ApiModelProperty(value = "区域id")
private Long areaId;
@ApiModelProperty(value = "区域名称")
private String areaName;
} }

View File

@ -113,6 +113,12 @@ public class MaLeaseInfo extends BaseEntity implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date orderTime; private Date orderTime;
@ApiModelProperty(value = "区域id")
private Long areaId;
@ApiModelProperty(value = "区域名称")
private String areaName;
@ApiModelProperty(value = "文件信息") @ApiModelProperty(value = "文件信息")
private List<BmFileInfo> fileInfoList; private List<BmFileInfo> fileInfoList;
} }

View File

@ -239,7 +239,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt1.type_id as firstId, mt1.type_id as firstId,
mt1.type_name as firstName, mt1.type_name as firstName,
GROUP_CONCAT(CONCAT(mt1.type_name, '/', mt2.type_name, '/', mt3.type_name)) AS groupName, GROUP_CONCAT(CONCAT(mt1.type_name, '/', mt2.type_name, '/', mt3.type_name)) AS groupName,
h.search_num as searchNum, IFNULL(h.search_num, 0) as searchNum,
d.create_time as createTime, d.create_time as createTime,
d.update_time as updateTime d.update_time as updateTime
FROM FROM

View File

@ -75,5 +75,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where del_flag = '0' where del_flag = '0'
</select> </select>
<select id="getArea" resultType="com.bonus.common.biz.domain.vo.AreaVo">
select
id as areaId,
name as areaName
from base_address
where parent_code = '34'
<if test="areaName != null and areaName != ''">
and area_name like concat('%',#{areaName},'%')
</if>
<if test="areaId != null">
and area_id = #{areaId}
</if>
</select>
</mapper> </mapper>

View File

@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="leaseCode != null and leaseCode != ''">lease_code,</if> <if test="leaseCode != null and leaseCode != ''">lease_code,</if>
<if test="typeId != null">type_id,</if> <if test="typeId != null">type_id,</if>
<if test="companyId != null">company_id,</if> <if test="companyId != null">company_id,</if>
<if test="areaId != null">area_id,</if>
<if test="leaseStatus != null">lease_status,</if> <if test="leaseStatus != null">lease_status,</if>
<if test="leaseDay != null">lease_day,</if> <if test="leaseDay != null">lease_day,</if>
<if test="leaseNum != null">lease_num,</if> <if test="leaseNum != null">lease_num,</if>
@ -27,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="leaseCode != null and leaseCode != ''">#{leaseCode},</if> <if test="leaseCode != null and leaseCode != ''">#{leaseCode},</if>
<if test="typeId != null">#{typeId},</if> <if test="typeId != null">#{typeId},</if>
<if test="companyId != null">#{companyId},</if> <if test="companyId != null">#{companyId},</if>
<if test="areaId != null">#{areaId},</if>
<if test="leaseStatus != null">#{leaseStatus},</if> <if test="leaseStatus != null">#{leaseStatus},</if>
<if test="leaseDay != null ">#{leaseDay},</if> <if test="leaseDay != null ">#{leaseDay},</if>
<if test="leaseNum != null ">#{leaseNum},</if> <if test="leaseNum != null ">#{leaseNum},</if>
@ -52,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="leaseName != null and leaseName != ''">lease_name = #{leaseName},</if> <if test="leaseName != null and leaseName != ''">lease_name = #{leaseName},</if>
<if test="typeId != null">type_id = #{typeId},</if> <if test="typeId != null">type_id = #{typeId},</if>
<if test="companyId != null">company_id = #{companyId},</if> <if test="companyId != null">company_id = #{companyId},</if>
<if test="areaId != null">area_id = #{areaId},</if>
<if test="leaseDay != null ">lease_day = #{leaseDay},</if> <if test="leaseDay != null ">lease_day = #{leaseDay},</if>
<if test="leaseStatus != null ">lease_status = #{leaseStatus},</if> <if test="leaseStatus != null ">lease_status = #{leaseStatus},</if>
<if test="leaseNum != null ">lease_num = #{leaseNum},</if> <if test="leaseNum != null ">lease_num = #{leaseNum},</if>
@ -106,10 +109,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt1.type_id as firstId, mt1.type_id as firstId,
mt1.type_name as firstName, mt1.type_name as firstName,
GROUP_CONCAT(CONCAT(mt1.type_name, '/', mt2.type_name, '/', mt3.type_name)) AS groupName, GROUP_CONCAT(CONCAT(mt1.type_name, '/', mt2.type_name, '/', mt3.type_name)) AS groupName,
m.publish_user as publishUser m.publish_user as publishUser,
m.area_id as areaId,
b.name as areaName
FROM FROM
ma_lease_info m ma_lease_info m
LEFT JOIN bm_company_info c ON m.company_id = c.company_id LEFT JOIN bm_company_info c ON m.company_id = c.company_id
LEFT JOIN base_address b ON b.id = m.area_id
LEFT JOIN ma_hot_search h ON h.lease_id = m.id LEFT JOIN ma_hot_search h ON h.lease_id = m.id
LEFT JOIN ma_type mt4 ON mt4.type_id = m.type_id and mt4.del_flag = '0' LEFT JOIN ma_type mt4 ON mt4.type_id = m.type_id and mt4.del_flag = '0'
LEFT JOIN ma_type mt3 ON mt3.type_id = mt4.parent_id and mt3.del_flag = '0' LEFT JOIN ma_type mt3 ON mt3.type_id = mt4.parent_id and mt3.del_flag = '0'
@ -207,10 +213,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt1.type_id as firstId, mt1.type_id as firstId,
mt1.type_name as firstName, mt1.type_name as firstName,
GROUP_CONCAT(CONCAT(mt1.type_name, '/', mt2.type_name, '/', mt3.type_name)) AS groupName, GROUP_CONCAT(CONCAT(mt1.type_name, '/', mt2.type_name, '/', mt3.type_name)) AS groupName,
m.publish_user as publishUser m.publish_user as publishUser,
b.id as areaId,
b.name as areaName
FROM FROM
ma_lease_info m ma_lease_info m
LEFT JOIN bm_company_info c ON m.company_id = c.company_id LEFT JOIN bm_company_info c ON m.company_id = c.company_id
LEFT JOIN base_address b ON b.id = m.area_id
LEFT JOIN sys_user su ON m.publish_user = su.user_id LEFT JOIN sys_user su ON m.publish_user = su.user_id
LEFT JOIN ma_type mt4 ON mt4.type_id = m.type_id and mt4.del_flag = '0' LEFT JOIN ma_type mt4 ON mt4.type_id = m.type_id and mt4.del_flag = '0'
LEFT JOIN ma_type mt3 ON mt3.type_id = mt4.parent_id and mt3.del_flag = '0' LEFT JOIN ma_type mt3 ON mt3.type_id = mt4.parent_id and mt3.del_flag = '0'
@ -234,6 +243,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</choose> </choose>
</if> </if>
<if test="companyId != null and companyId != ''"> and m.company_id = #{companyId}</if> <if test="companyId != null and companyId != ''"> and m.company_id = #{companyId}</if>
<if test="areaId != null"> and m.area_id = #{areaId}</if>
<if test="keyWord != null and keyWord != ''"> <if test="keyWord != null and keyWord != ''">
and ( and (
locate(#{keyWord},mt1.type_name) > 0 locate(#{keyWord},mt1.type_name) > 0