This commit is contained in:
parent
15f9818de6
commit
efe800a554
|
|
@ -16,6 +16,7 @@ import com.bonus.material.largeScreen.entity.OrderData;
|
||||||
import com.bonus.material.largeScreen.service.LargeScreenService;
|
import com.bonus.material.largeScreen.service.LargeScreenService;
|
||||||
import com.bonus.material.lease.domain.MaLeaseInfo;
|
import com.bonus.material.lease.domain.MaLeaseInfo;
|
||||||
import com.bonus.material.lease.mapper.MaLeaseInfoMapper;
|
import com.bonus.material.lease.mapper.MaLeaseInfoMapper;
|
||||||
|
import com.bonus.material.lease.service.MaLeaseInfoService;
|
||||||
import com.bonus.material.order.domain.OrderDetailDto;
|
import com.bonus.material.order.domain.OrderDetailDto;
|
||||||
import com.bonus.material.order.domain.OrderInfoDto;
|
import com.bonus.material.order.domain.OrderInfoDto;
|
||||||
import com.bonus.material.order.mapper.OrderMapper;
|
import com.bonus.material.order.mapper.OrderMapper;
|
||||||
|
|
@ -54,6 +55,9 @@ public class LargeScreenController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private DevInfoService devInfoService;
|
private DevInfoService devInfoService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MaLeaseInfoService maLeaseInfoService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private OrderMapper orderMapper;
|
private OrderMapper orderMapper;
|
||||||
|
|
||||||
|
|
@ -395,8 +399,13 @@ public class LargeScreenController extends BaseController {
|
||||||
@ApiOperation("最需装备二级页面")
|
@ApiOperation("最需装备二级页面")
|
||||||
@GetMapping("/getLeaseOnlyInfo")
|
@GetMapping("/getLeaseOnlyInfo")
|
||||||
public AjaxResult getLeaseOnlyInfo(MaLeaseOnlyInfo dto) {
|
public AjaxResult getLeaseOnlyInfo(MaLeaseOnlyInfo dto) {
|
||||||
|
List<MaLeaseOnlyInfo> list = new ArrayList<>();
|
||||||
startPage();
|
startPage();
|
||||||
List<MaLeaseOnlyInfo> list = leaseInfoMapper.getLeaseOnlyInfo(dto);
|
if (dto.getIsHot() != null && dto.getIsHot()) {
|
||||||
|
list = maLeaseInfoService.getDetails(dto);
|
||||||
|
} else {
|
||||||
|
list = leaseInfoMapper.getLeaseOnlyInfo(dto);
|
||||||
|
}
|
||||||
return AjaxResult.success(getDataTable(list));
|
return AjaxResult.success(getDataTable(list));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ import java.util.Date;
|
||||||
@Data
|
@Data
|
||||||
public class MaLeaseOnlyInfo {
|
public class MaLeaseOnlyInfo {
|
||||||
|
|
||||||
|
private Boolean isHot;
|
||||||
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.material.lease.service;
|
package com.bonus.material.lease.service;
|
||||||
|
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
|
import com.bonus.material.largeScreen.entity.MaLeaseOnlyInfo;
|
||||||
import com.bonus.material.lease.domain.MaLease;
|
import com.bonus.material.lease.domain.MaLease;
|
||||||
import com.bonus.material.lease.domain.MaLeaseDto;
|
import com.bonus.material.lease.domain.MaLeaseDto;
|
||||||
import com.bonus.material.lease.domain.MaLeaseInfo;
|
import com.bonus.material.lease.domain.MaLeaseInfo;
|
||||||
|
|
@ -79,4 +80,11 @@ public interface MaLeaseInfoService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxResult agreeOrReject(MaLeaseInfo maLeaseInfo);
|
AjaxResult agreeOrReject(MaLeaseInfo maLeaseInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最需装备二级页面
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<MaLeaseOnlyInfo> getDetails(MaLeaseOnlyInfo dto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ import com.bonus.common.security.utils.SecurityUtils;
|
||||||
import com.bonus.material.basic.domain.BmMessage;
|
import com.bonus.material.basic.domain.BmMessage;
|
||||||
import com.bonus.material.basic.mapper.BmMessageMapper;
|
import com.bonus.material.basic.mapper.BmMessageMapper;
|
||||||
import com.bonus.material.device.mapper.BmFileInfoMapper;
|
import com.bonus.material.device.mapper.BmFileInfoMapper;
|
||||||
|
import com.bonus.material.largeScreen.entity.MaLeaseOnlyInfo;
|
||||||
import com.bonus.material.lease.domain.*;
|
import com.bonus.material.lease.domain.*;
|
||||||
import com.bonus.material.lease.domain.vo.MaLeaseVo;
|
import com.bonus.material.lease.domain.vo.MaLeaseVo;
|
||||||
import com.bonus.material.lease.mapper.MaLeaseInfoMapper;
|
import com.bonus.material.lease.mapper.MaLeaseInfoMapper;
|
||||||
|
|
@ -40,6 +41,7 @@ import javax.annotation.Resource;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租赁需求大厅实现层
|
* 租赁需求大厅实现层
|
||||||
|
|
@ -119,9 +121,9 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
||||||
phoneNumber = Sm4Utils.decrypt(info.getPhoneNumber());
|
phoneNumber = Sm4Utils.decrypt(info.getPhoneNumber());
|
||||||
}
|
}
|
||||||
// 根据电话号码数量发送短信
|
// 根据电话号码数量发送短信
|
||||||
JSONObject sendResult = SmsTool.sendSms(new SmsParam(phoneNumber, notice.getNoticeContent()), BmConfigItems.ANHUI_COMPANY_SMS_KEY);
|
//JSONObject sendResult = SmsTool.sendSms(new SmsParam(phoneNumber, notice.getNoticeContent()), BmConfigItems.ANHUI_COMPANY_SMS_KEY);
|
||||||
//String sendResult = SmsUtils.smsToken(phoneNumber, maLeaseInfo.getLeaseName(), "");
|
String sendResult = SmsUtils.smsToken(phoneNumber, maLeaseInfo.getLeaseName(), "");
|
||||||
if (StringUtils.isBlank(sendResult.toString())) {
|
if (StringUtils.isBlank(sendResult)) {
|
||||||
return AjaxResult.error("短信发送失败");
|
return AjaxResult.error("短信发送失败");
|
||||||
} else {
|
} else {
|
||||||
System.out.println("短信发送成功:" + sendResult);
|
System.out.println("短信发送成功:" + sendResult);
|
||||||
|
|
@ -560,6 +562,38 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
||||||
return result > 0 ? AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) : AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
|
return result > 0 ? AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) : AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最需装备二级页面
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<MaLeaseOnlyInfo> getDetails(MaLeaseOnlyInfo dto) {
|
||||||
|
List<MaLeaseOnlyInfo> list = leaseInfoMapper.getLeaseOnlyInfo(null);
|
||||||
|
String topPopularTypeName = leaseInfoMapper.getTopPopularTypeName();
|
||||||
|
// 从list集合中获取和topPopularTypeName相同名称的数据
|
||||||
|
List<MaLeaseOnlyInfo> infos = list.stream().filter(item -> item.getDeviceName().equals(topPopularTypeName)).collect(Collectors.toList());
|
||||||
|
if (StringUtils.isNotBlank(dto.getKeyWord())) {
|
||||||
|
infos = infos.stream()
|
||||||
|
.filter(item -> containsKeyword(item, dto.getKeyWord()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
return infos;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断MaLeaseOnlyInfo对象是否包含关键字
|
||||||
|
* @param item
|
||||||
|
* @param keyWord
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private boolean containsKeyword(MaLeaseOnlyInfo item, String keyWord) {
|
||||||
|
return (item.getDeviceName() != null && item.getDeviceName().contains(keyWord)) ||
|
||||||
|
(item.getPublishCompany() != null && item.getPublishCompany().contains(keyWord)) ||
|
||||||
|
(item.getPerson() != null && item.getPerson().contains(keyWord)) ||
|
||||||
|
(item.getPhoneNumber() != null && item.getPhoneNumber().contains(keyWord));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询出租方需求列表
|
* 查询出租方需求列表
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue