Merge branch 'master' of http://47.109.37.87:3000/by2025/SmartParks
This commit is contained in:
commit
398e19f2f7
@ -1,6 +1,8 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
@ -103,4 +105,23 @@ public class PlantsRentalOrderController extends BaseController {
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(plantsRentalOrderService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 按时间统计订单数量
|
||||
* @param timeUnit 1日 2周 3月
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/statisticsByTime")
|
||||
public R<Map> statisticsByTime(@RequestParam("timeUnit") Integer timeUnit){
|
||||
return R.ok(plantsRentalOrderService.statisticsByTime(timeUnit));
|
||||
}
|
||||
|
||||
/**
|
||||
*按用户类型统计
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/countByCusType")
|
||||
public R<Map> countByCusType(){
|
||||
return R.ok(plantsRentalOrderService.countByCusType());
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ public class PlantsProduct extends BaseEntity {
|
||||
/**
|
||||
* 产品分类
|
||||
*/
|
||||
private Long plantType;
|
||||
private String plantType;
|
||||
|
||||
/**
|
||||
* 产品图片
|
||||
@ -65,7 +65,7 @@ public class PlantsProduct extends BaseEntity {
|
||||
/**
|
||||
* 状态(0下架 1上架 )
|
||||
*/
|
||||
private Long state;
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
@ -42,12 +42,12 @@ public class PlantsRentalOrder extends BaseEntity {
|
||||
/**
|
||||
* 客户类型
|
||||
*/
|
||||
private Long customerType;
|
||||
private String customerType;
|
||||
|
||||
/**
|
||||
* 租赁周期
|
||||
*/
|
||||
private Long rentalPeriod;
|
||||
private String rentalPeriod;
|
||||
|
||||
/**
|
||||
* 租赁开始时间
|
||||
@ -67,7 +67,7 @@ public class PlantsRentalOrder extends BaseEntity {
|
||||
/**
|
||||
* 租赁方式
|
||||
*/
|
||||
private Long rentalType;
|
||||
private String rentalType;
|
||||
|
||||
/**
|
||||
* 租赁方案id
|
||||
@ -87,17 +87,22 @@ public class PlantsRentalOrder extends BaseEntity {
|
||||
/**
|
||||
* 支付状态
|
||||
*/
|
||||
private Long paymentStatus;
|
||||
private String paymentStatus;
|
||||
|
||||
/**
|
||||
* 是否续租
|
||||
*/
|
||||
private Long isRelet;
|
||||
private String isRelet;
|
||||
|
||||
/**
|
||||
* 合同状态
|
||||
*/
|
||||
private Long contractStatus;
|
||||
private String contractStatus;
|
||||
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
* 签署时间
|
||||
|
@ -50,7 +50,7 @@ public class PlantsRentalPlan extends BaseEntity {
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Long state;
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
@ -42,7 +42,7 @@ public class PlantsProductBo extends BaseEntity {
|
||||
* 产品分类
|
||||
*/
|
||||
@NotNull(message = "产品分类不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long plantType;
|
||||
private String plantType;
|
||||
|
||||
/**
|
||||
* 产品图片
|
||||
@ -71,7 +71,7 @@ public class PlantsProductBo extends BaseEntity {
|
||||
* 状态(0下架 1上架 )
|
||||
*/
|
||||
@NotNull(message = "状态(0下架 1上架 )不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long state;
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
@ -30,7 +30,6 @@ public class PlantsRentalOrderBo extends BaseEntity {
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
@NotBlank(message = "订单号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
@ -43,13 +42,13 @@ public class PlantsRentalOrderBo extends BaseEntity {
|
||||
* 客户类型
|
||||
*/
|
||||
@NotNull(message = "客户类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long customerType;
|
||||
private String customerType;
|
||||
|
||||
/**
|
||||
* 租赁周期
|
||||
*/
|
||||
@NotNull(message = "租赁周期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long rentalPeriod;
|
||||
private String rentalPeriod;
|
||||
|
||||
/**
|
||||
* 租赁开始时间
|
||||
@ -73,7 +72,7 @@ public class PlantsRentalOrderBo extends BaseEntity {
|
||||
* 租赁方式
|
||||
*/
|
||||
@NotNull(message = "租赁方式不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long rentalType;
|
||||
private String rentalType;
|
||||
|
||||
/**
|
||||
* 租赁方案id
|
||||
@ -93,18 +92,22 @@ public class PlantsRentalOrderBo extends BaseEntity {
|
||||
/**
|
||||
* 支付状态
|
||||
*/
|
||||
@NotNull(message = "支付状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long paymentStatus;
|
||||
private String paymentStatus;
|
||||
|
||||
/**
|
||||
* 是否续租
|
||||
*/
|
||||
private Long isRelet;
|
||||
private String isRelet;
|
||||
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
* 合同状态
|
||||
*/
|
||||
private Long contractStatus;
|
||||
private String contractStatus;
|
||||
|
||||
/**
|
||||
* 签署时间
|
||||
@ -112,4 +115,6 @@ public class PlantsRentalOrderBo extends BaseEntity {
|
||||
private Date signTime;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -9,6 +9,8 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案业务对象 plants_rental_plan
|
||||
*
|
||||
@ -53,12 +55,18 @@ public class PlantsRentalPlanBo extends BaseEntity {
|
||||
* 状态
|
||||
*/
|
||||
@NotNull(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long state;
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 产品id
|
||||
*/
|
||||
@NotNull(message = "绿植产品不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private List<Long> productIds;
|
||||
|
||||
|
||||
}
|
||||
|
@ -52,5 +52,8 @@ public class PlantsPlanProductVo implements Serializable {
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
/**
|
||||
* 产品信息
|
||||
*/
|
||||
private PlantsProductVo product;
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ public class PlantsProductVo implements Serializable {
|
||||
* 产品分类
|
||||
*/
|
||||
@ExcelProperty(value = "产品分类")
|
||||
private Long plantType;
|
||||
private String plantType;
|
||||
|
||||
/**
|
||||
* 产品图片
|
||||
@ -81,7 +81,7 @@ public class PlantsProductVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "product_management_status")
|
||||
private Long state;
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
@ -53,14 +53,14 @@ public class PlantsRentalOrderVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "客户类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "wy_khlx")
|
||||
private Long customerType;
|
||||
private String customerType;
|
||||
|
||||
/**
|
||||
* 租赁周期
|
||||
*/
|
||||
@ExcelProperty(value = "租赁周期", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "wy_time_unit")
|
||||
private Long rentalPeriod;
|
||||
private String rentalPeriod;
|
||||
|
||||
/**
|
||||
* 租赁开始时间
|
||||
@ -84,7 +84,7 @@ public class PlantsRentalOrderVo implements Serializable {
|
||||
* 租赁方式
|
||||
*/
|
||||
@ExcelProperty(value = "租赁方式")
|
||||
private Long rentalType;
|
||||
private String rentalType;
|
||||
|
||||
/**
|
||||
* 租赁方案id
|
||||
@ -108,19 +108,24 @@ public class PlantsRentalOrderVo implements Serializable {
|
||||
* 支付状态
|
||||
*/
|
||||
@ExcelProperty(value = "支付状态")
|
||||
private Long paymentStatus;
|
||||
private String paymentStatus;
|
||||
|
||||
/**
|
||||
* 是否续租
|
||||
*/
|
||||
@ExcelProperty(value = "是否续租")
|
||||
private Long isRelet;
|
||||
private String isRelet;
|
||||
|
||||
/**
|
||||
* 合同状态
|
||||
*/
|
||||
@ExcelProperty(value = "合同状态")
|
||||
private Long contractStatus;
|
||||
private String contractStatus;
|
||||
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
* 签署时间
|
||||
|
@ -11,7 +11,7 @@ import lombok.Data;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@ -63,7 +63,7 @@ public class PlantsRentalPlanVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "wy_kg")
|
||||
private Long state;
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
@ -77,4 +77,6 @@ public class PlantsRentalPlanVo implements Serializable {
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
private List<PlantsPlanProductVo> productList;
|
||||
|
||||
}
|
||||
|
@ -69,9 +69,14 @@ public class ResidentUnitVo implements Serializable {
|
||||
/**
|
||||
* 入驻位置
|
||||
*/
|
||||
@ExcelProperty(value = "入驻位置")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 入驻位置
|
||||
*/
|
||||
@ExcelProperty(value = "入驻位置")
|
||||
private String locationDetail;
|
||||
|
||||
/**
|
||||
* 入驻时间
|
||||
*/
|
||||
|
@ -4,6 +4,8 @@ import org.dromara.property.domain.PlantsPlanProduct;
|
||||
import org.dromara.property.domain.vo.PlantsPlanProductVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案-绿植Mapper接口
|
||||
*
|
||||
@ -12,4 +14,7 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
*/
|
||||
public interface PlantsPlanProductMapper extends BaseMapperPlus<PlantsPlanProduct, PlantsPlanProductVo> {
|
||||
|
||||
void deleteByPlanId(Long planId);
|
||||
|
||||
List<PlantsPlanProductVo> queryProductsInfo(Long planId);
|
||||
}
|
||||
|
@ -1,9 +1,13 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.dromara.property.domain.PlantsRentalOrder;
|
||||
import org.dromara.property.domain.vo.PlantsRentalOrderVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 绿植租赁-订单管理Mapper接口
|
||||
*
|
||||
@ -12,4 +16,28 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
*/
|
||||
public interface PlantsRentalOrderMapper extends BaseMapperPlus<PlantsRentalOrder, PlantsRentalOrderVo> {
|
||||
|
||||
@Select("SELECT HOUR(create_time) AS hour, COUNT(*) AS count " +
|
||||
"FROM plants_rental_order " +
|
||||
"WHERE create_time >= CURDATE() AND create_time < DATE_ADD(CURDATE(), INTERVAL 1 DAY) " +
|
||||
"GROUP BY HOUR(create_time)")
|
||||
List<Map<String, Object>> countByDay();
|
||||
|
||||
@Select("SELECT " +
|
||||
"CASE DAYOFWEEK(create_time) AS week," +
|
||||
"COUNT(*) AS count" +
|
||||
"FROM plants_rental_order " +
|
||||
"WHERE create_time >= DATE_SUB(CURDATE(), INTERVAL WEEKDAY(CURDATE()) DAY) " +
|
||||
"AND create_time < DATE_ADD(DATE_SUB(CURDATE(), INTERVAL WEEKDAY(CURDATE()) DAY), INTERVAL 7 DAY) " +
|
||||
"GROUP BY DATE(create_time) " +
|
||||
"ORDER BY day")
|
||||
List<Map<String, Object>> countByWeek();
|
||||
|
||||
@Select("SELECT DAY(create_time) AS day, COUNT(*) AS count " +
|
||||
"FROM plants_rental_order " +
|
||||
"WHERE create_time >= DATE_FORMAT(CURDATE(), '%Y-%m-01') " +
|
||||
"AND create_time < DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01') " +
|
||||
"GROUP BY DAY(create_time) " +
|
||||
"ORDER BY day")
|
||||
List<Map<String, Object>> countByMonth();
|
||||
|
||||
}
|
||||
|
@ -12,4 +12,6 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
*/
|
||||
public interface TbRoomMapper extends BaseMapperPlus<TbRoom, TbRoomVo> {
|
||||
|
||||
//查询房间名称
|
||||
String queryRoomName(Long roomId);
|
||||
}
|
||||
|
@ -66,4 +66,29 @@ public interface IPlantsPlanProductService {
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 批量保存租赁方案植物
|
||||
*
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
Boolean saveBatch(List<PlantsPlanProduct> list);
|
||||
|
||||
/**
|
||||
* 修改租赁方案植物
|
||||
*
|
||||
* @param list
|
||||
* @param planId
|
||||
* @return
|
||||
*/
|
||||
Boolean updateByPlanId(List<PlantsPlanProduct> list, Long planId);
|
||||
|
||||
/**
|
||||
* 查询租赁方案植物数据
|
||||
*
|
||||
* @param planId
|
||||
* @return
|
||||
*/
|
||||
List<PlantsPlanProductVo> queryPlanProductsInfo(Long planId);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 绿植租赁-订单管理Service接口
|
||||
@ -66,4 +67,17 @@ public interface IPlantsRentalOrderService {
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 按时间统计订单数量
|
||||
* @param timeUnit 1日 2周 3月
|
||||
* @return
|
||||
*/
|
||||
Map<String,List> statisticsByTime(Integer timeUnit);
|
||||
|
||||
/**
|
||||
* 按客户类型统计订单数量
|
||||
* @return
|
||||
*/
|
||||
Map<String,List> countByCusType();
|
||||
}
|
||||
|
@ -66,4 +66,11 @@ public interface IResidentPersonService {
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 获取单位人员数量
|
||||
* @param unitId
|
||||
* @return
|
||||
*/
|
||||
Long queryPersonCount(Long unitId);
|
||||
}
|
||||
|
@ -70,4 +70,11 @@ public interface ITbRoomService {
|
||||
|
||||
List<TbRoomVo> queryAll();
|
||||
|
||||
/**
|
||||
* 获取详细房间名称
|
||||
* @param roomId 房间id
|
||||
* @return 房间名称
|
||||
*/
|
||||
String queryRoomName(Long roomId);
|
||||
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ public class PlantsPlanProductServiceImpl implements IPlantsPlanProductService {
|
||||
* @return 绿植租赁-租赁方案-绿植
|
||||
*/
|
||||
@Override
|
||||
public PlantsPlanProductVo queryById(Long id){
|
||||
public PlantsPlanProductVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ public class PlantsPlanProductServiceImpl implements IPlantsPlanProductService {
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(PlantsPlanProduct entity){
|
||||
private void validEntityBeforeSave(PlantsPlanProduct entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
@ -125,9 +125,43 @@ public class PlantsPlanProductServiceImpl implements IPlantsPlanProductService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量保存租赁方案植物
|
||||
*
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Boolean saveBatch(List<PlantsPlanProduct> list) {
|
||||
return baseMapper.insertBatch(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改租赁方案植物
|
||||
*
|
||||
* @param list
|
||||
* @param planId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByPlanId(List<PlantsPlanProduct> list, Long planId) {
|
||||
baseMapper.deleteByPlanId(planId);
|
||||
return baseMapper.insertBatch(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询租赁方案植物数据
|
||||
* @param planId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PlantsPlanProductVo> queryPlanProductsInfo(Long planId) {
|
||||
return baseMapper.queryProductsInfo(planId);
|
||||
}
|
||||
}
|
||||
|
@ -80,8 +80,8 @@ public class PlantsProductServiceImpl implements IPlantsProductService {
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getImgPath()), PlantsProduct::getImgPath, bo.getImgPath());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSpecification()), PlantsProduct::getSpecification, bo.getSpecification());
|
||||
lqw.eq(bo.getRent() != null, PlantsProduct::getRent, bo.getRent());
|
||||
lqw.eq(bo.getInventory() != null, PlantsProduct::getInventory, bo.getInventory());
|
||||
lqw.eq(bo.getState() != null, PlantsProduct::getState, bo.getState());
|
||||
lqw.gt(bo.getInventory()!=null,PlantsProduct::getInventory, bo.getInventory());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@ -98,6 +98,8 @@ public class PlantsProductServiceImpl implements IPlantsProductService {
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
add.setPlantCode("LZ"+add.getId());
|
||||
baseMapper.updateById(add);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@ -16,9 +17,8 @@ import org.dromara.property.domain.PlantsRentalOrder;
|
||||
import org.dromara.property.mapper.PlantsRentalOrderMapper;
|
||||
import org.dromara.property.service.IPlantsRentalOrderService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.time.YearMonth;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 绿植租赁-订单管理Service业务层处理
|
||||
@ -40,7 +40,7 @@ public class PlantsRentalOrderServiceImpl implements IPlantsRentalOrderService {
|
||||
* @return 绿植租赁-订单管理
|
||||
*/
|
||||
@Override
|
||||
public PlantsRentalOrderVo queryById(Long id){
|
||||
public PlantsRentalOrderVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
@ -105,6 +105,8 @@ public class PlantsRentalOrderServiceImpl implements IPlantsRentalOrderService {
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
add.setOrderNo("ZL" + add.getId().toString());
|
||||
baseMapper.updateById(add);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
@ -125,7 +127,7 @@ public class PlantsRentalOrderServiceImpl implements IPlantsRentalOrderService {
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(PlantsRentalOrder entity){
|
||||
private void validEntityBeforeSave(PlantsRentalOrder entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
@ -138,9 +140,107 @@ public class PlantsRentalOrderServiceImpl implements IPlantsRentalOrderService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 按时间统计订单数量
|
||||
*
|
||||
* @param timeUnit 1日 2周 3月
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, List> statisticsByTime(Integer timeUnit) {
|
||||
if (timeUnit == 1) {
|
||||
return countByDay();
|
||||
} else if (timeUnit == 2) {
|
||||
return countByWeek();
|
||||
} else {
|
||||
return countByMonth();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计日订单数
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Map<String, List> countByDay() {
|
||||
List<Map<String, Object>> maps = baseMapper.countByDay();
|
||||
List<Integer> time = new ArrayList<>();
|
||||
for (int i = 0; i < 24; i++) {
|
||||
time.add(i);
|
||||
}
|
||||
List<Integer> counts = new ArrayList<>(Collections.nCopies(24, 0));
|
||||
maps.forEach(item -> {
|
||||
int hour = Integer.valueOf(item.get("hour").toString());
|
||||
int count = Integer.valueOf(item.get("count").toString());
|
||||
if (hour >= 0 && hour < 24) {
|
||||
counts.set(hour, count);
|
||||
}
|
||||
});
|
||||
Map<String, List> map = new HashMap<>();
|
||||
map.put("time", time);
|
||||
map.put("counts", counts);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计周订单数
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Map<String, List> countByWeek() {
|
||||
List<Map<String, Object>> maps = baseMapper.countByWeek();
|
||||
String[] time = new String[]{"周一", "周二", "周三", "周四", "周五", "周六", "周日"};
|
||||
List<Integer> counts = new ArrayList<>(Collections.nCopies(7, 0));
|
||||
for (int i = 0; i < maps.size(); i++) {
|
||||
if (i == 0) {
|
||||
int count = Integer.valueOf(maps.get(i).get("count").toString());
|
||||
counts.set(6, count);
|
||||
} else if (i + 1 < maps.size()) {
|
||||
int week = Integer.valueOf(maps.get(i + 1).get("week").toString());
|
||||
int count = Integer.valueOf(maps.get(i + 1).get("count").toString());
|
||||
counts.set(week, count);
|
||||
}
|
||||
|
||||
}
|
||||
Map<String, List> map = new HashMap<>();
|
||||
map.put("time", Arrays.asList(time));
|
||||
map.put("counts", counts);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计月订单数
|
||||
* @return
|
||||
*/
|
||||
public Map<String, List> countByMonth() {
|
||||
List<Map<String, Object>> maps = baseMapper.countByMonth();
|
||||
int days = YearMonth.now().lengthOfMonth();
|
||||
List<Integer> time = new ArrayList<>();
|
||||
for (int i = 1; i <=days; i++) {
|
||||
time.add(i);
|
||||
}
|
||||
List<Integer> counts = new ArrayList<>(Collections.nCopies(days, 0));
|
||||
maps.forEach(item -> {
|
||||
int day = Integer.valueOf(item.get("day").toString());
|
||||
int count = Integer.valueOf(item.get("count").toString());
|
||||
if (day >= 1 && day <= days) {
|
||||
counts.set(day, count);
|
||||
}
|
||||
});
|
||||
Map<String, List> map = new HashMap<>();
|
||||
map.put("time", time);
|
||||
map.put("counts", counts);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List> countByCusType() {
|
||||
return Map.of();
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@ -9,6 +10,10 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.property.domain.PlantsPlanProduct;
|
||||
import org.dromara.property.domain.vo.PlantsPlanProductVo;
|
||||
import org.dromara.property.service.IPlantsPlanProductService;
|
||||
import org.dromara.property.service.IPlantsProductService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.PlantsRentalPlanBo;
|
||||
import org.dromara.property.domain.vo.PlantsRentalPlanVo;
|
||||
@ -16,9 +21,7 @@ import org.dromara.property.domain.PlantsRentalPlan;
|
||||
import org.dromara.property.mapper.PlantsRentalPlanMapper;
|
||||
import org.dromara.property.service.IPlantsRentalPlanService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案Service业务层处理
|
||||
@ -33,6 +36,8 @@ public class PlantsRentalPlanServiceImpl implements IPlantsRentalPlanService {
|
||||
|
||||
private final PlantsRentalPlanMapper baseMapper;
|
||||
|
||||
private final IPlantsPlanProductService planProductService;
|
||||
|
||||
/**
|
||||
* 查询绿植租赁-租赁方案
|
||||
*
|
||||
@ -41,7 +46,10 @@ public class PlantsRentalPlanServiceImpl implements IPlantsRentalPlanService {
|
||||
*/
|
||||
@Override
|
||||
public PlantsRentalPlanVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
PlantsRentalPlanVo plantsRentalPlanVo = baseMapper.selectVoById(id);
|
||||
List<PlantsPlanProductVo> list = planProductService.queryPlanProductsInfo(plantsRentalPlanVo.getId());
|
||||
plantsRentalPlanVo.setProductList(list);
|
||||
return plantsRentalPlanVo;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -95,7 +103,18 @@ public class PlantsRentalPlanServiceImpl implements IPlantsRentalPlanService {
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
Long planId = add.getId();
|
||||
bo.setId(planId);
|
||||
if(CollectionUtils.isNotEmpty(bo.getProductIds())){
|
||||
List<PlantsPlanProduct> list = new ArrayList<>();
|
||||
for (Long productId : bo.getProductIds()) {
|
||||
PlantsPlanProduct planProduct = new PlantsPlanProduct();
|
||||
planProduct.setPlanId(planId);
|
||||
planProduct.setProductId(productId);
|
||||
list.add(planProduct);
|
||||
}
|
||||
planProductService.saveBatch(list);
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
@ -110,6 +129,16 @@ public class PlantsRentalPlanServiceImpl implements IPlantsRentalPlanService {
|
||||
public Boolean updateByBo(PlantsRentalPlanBo bo) {
|
||||
PlantsRentalPlan update = MapstructUtils.convert(bo, PlantsRentalPlan.class);
|
||||
validEntityBeforeSave(update);
|
||||
if(CollectionUtils.isNotEmpty(bo.getProductIds())){
|
||||
List<PlantsPlanProduct> list = new ArrayList<>();
|
||||
for (Long productId : bo.getProductIds()) {
|
||||
PlantsPlanProduct planProduct = new PlantsPlanProduct();
|
||||
planProduct.setPlanId(update.getId());
|
||||
planProduct.setProductId(productId);
|
||||
list.add(planProduct);
|
||||
}
|
||||
planProductService.updateByPlanId(list,update.getId());
|
||||
}
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@ -139,4 +140,16 @@ public class ResidentPersonServiceImpl implements IResidentPersonService {
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单位人员数量
|
||||
* @param unitId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Long queryPersonCount(Long unitId) {
|
||||
LambdaQueryWrapper<ResidentPerson> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(unitId != null, ResidentPerson::getUnitId, unitId);
|
||||
return baseMapper.selectCount(lqw);
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.property.service.IResidentPersonService;
|
||||
import org.dromara.property.service.ITbRoomService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.ResidentUnitBo;
|
||||
import org.dromara.property.domain.vo.ResidentUnitVo;
|
||||
@ -33,6 +35,10 @@ public class ResidentUnitServiceImpl implements IResidentUnitService {
|
||||
|
||||
private final ResidentUnitMapper baseMapper;
|
||||
|
||||
private final ITbRoomService roomService;
|
||||
|
||||
private final IResidentPersonService personService;
|
||||
|
||||
/**
|
||||
* 查询入驻单位
|
||||
*
|
||||
@ -41,7 +47,15 @@ public class ResidentUnitServiceImpl implements IResidentUnitService {
|
||||
*/
|
||||
@Override
|
||||
public ResidentUnitVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
ResidentUnitVo residentUnitVo = baseMapper.selectVoById(id);
|
||||
//获取入驻位置详情
|
||||
if(StringUtils.isNotBlank(residentUnitVo.getLocation())){
|
||||
String roomName = roomService.queryRoomName(Long.valueOf(residentUnitVo.getLocation()));
|
||||
residentUnitVo.setLocationDetail(roomName);
|
||||
}
|
||||
Long num = personService.queryPersonCount(residentUnitVo.getId());
|
||||
residentUnitVo.setNumber(num);
|
||||
return residentUnitVo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -149,4 +149,14 @@ public class TbRoomServiceImpl implements ITbRoomService {
|
||||
public List<TbRoomVo> queryAll() {
|
||||
return baseMapper.selectVoList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取房间名称
|
||||
* @param roomId 房间id
|
||||
* @return 房间名称
|
||||
*/
|
||||
@Override
|
||||
public String queryRoomName(Long roomId) {
|
||||
return baseMapper.queryRoomName(roomId);
|
||||
}
|
||||
}
|
||||
|
@ -3,5 +3,36 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.property.mapper.PlantsPlanProductMapper">
|
||||
<resultMap id="planProductMap" type="org.dromara.property.domain.vo.PlantsPlanProductVo">
|
||||
<result property="id" column="pid"/>
|
||||
<result property="planId" column="plan_id"/>
|
||||
<result property="productId" column="product_id"/>
|
||||
<association property="product" javaType="org.dromara.property.domain.vo.PlantsProductVo">
|
||||
<id property="id" column="id"/>
|
||||
<result property="plantCode" column="plant_code"/>
|
||||
<result property="plantName" column="plant_name"/>
|
||||
<result property="plantType" column="plant_type"/>
|
||||
<result property="imgPath" column="img_path"/>
|
||||
<result property="specification" column="specification"/>
|
||||
<result property="rent" column="rent"/>
|
||||
<result property="inventory" column="inventory"/>
|
||||
<result property="state" column="state"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<delete id="deleteByPlanId" parameterType="Long">
|
||||
delete from plants_plan_product p where p.plan_id=#{planId}
|
||||
</delete>
|
||||
|
||||
<select id="queryProductsInfo" resultMap="planProductMap">
|
||||
select
|
||||
c.id pid,
|
||||
c.plan_id,
|
||||
c.product_id,
|
||||
p.*
|
||||
from plants_plan_product c
|
||||
left join plants_product p on c.product_id = p.id
|
||||
where c.plan_id = #{planId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -4,4 +4,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.property.mapper.TbRoomMapper">
|
||||
|
||||
<select id="queryRoomName" resultType="java.lang.String">
|
||||
select
|
||||
concat(c.community_name,b.building_name,u.unit_name,f.floor_name,r.room_number)
|
||||
from tb_room r
|
||||
inner join tb_floor f on r.floor_id=f.id
|
||||
inner join tb_unit u on r.unit_id=u.id
|
||||
inner join tb_building b on r.building_id=b.id
|
||||
inner join tb_community c on r.community_id=c.id
|
||||
where r.id=#{roomId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -3,6 +3,7 @@ package org.dromara.sis.controller;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.sis.sdk.unview.model.UvModel;
|
||||
import org.dromara.sis.sdk.unview.service.VideoAlarmService;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@ -16,6 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @author lxj
|
||||
* @since 25-06-24
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/uniview")
|
||||
@ -27,6 +29,7 @@ public class VideoAlarmController {
|
||||
@PostMapping("/custom/router")
|
||||
public UvModel.UniViewResult<?> alarm(@RequestBody String data) {
|
||||
UvModel.AlarmReportInfo alarmReportData = JSONObject.parseObject(data, UvModel.AlarmReportInfo.class);
|
||||
// log.info("宇视上报消息,msg={}", alarmReportData);
|
||||
videoAlarmService.handleAlarmData(alarmReportData);
|
||||
return UvModel.UniViewResult.success(null);
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public class DoorDeviceController {
|
||||
* @return Boolean
|
||||
*/
|
||||
@PostMapping("/deleteDoorDevice/{id}")
|
||||
public R<Boolean> deleteDoorDevice(@PathVariable Integer id) {
|
||||
public R<Boolean> deleteDoorDevice(@PathVariable Long id) {
|
||||
log.info("E8接口删除门禁信息 入参={}", id);
|
||||
|
||||
Boolean flag = doorDeviceService.deleteDoorDevice(id);
|
||||
|
@ -27,11 +27,11 @@ public class SisAccessControlBo extends BaseEntity {
|
||||
@NotNull(message = "不能为空", groups = {EditGroup.class})
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 门禁设备编码
|
||||
*/
|
||||
@NotBlank(message = "门禁设备编码不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String accessCode;
|
||||
// /**
|
||||
// * 门禁设备编码
|
||||
// */
|
||||
// @NotBlank(message = "门禁设备编码不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
// private String accessCode;
|
||||
|
||||
/**
|
||||
* 门禁名称
|
||||
@ -80,8 +80,8 @@ public class SisAccessControlBo extends BaseEntity {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@NotBlank(message = "不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String factoryCode;
|
||||
// @NotBlank(message = "不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
// private String factoryCode;
|
||||
|
||||
/**
|
||||
* 控制卡类型:1-系统,2-E8
|
||||
|
@ -42,7 +42,7 @@ public class SisPersonLibImgBo extends BaseEntity {
|
||||
* 图片ossId
|
||||
*/
|
||||
@NotBlank(message = "图片ossId不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String imgOssId;
|
||||
private Long imgOssId;
|
||||
|
||||
/**
|
||||
* 性别 1:男2:女 99:未说明
|
||||
|
@ -55,7 +55,7 @@ public interface DoorDeviceService {
|
||||
* @param id 入参
|
||||
* @return Boolean
|
||||
*/
|
||||
Boolean deleteDoorDevice(Integer id);
|
||||
Boolean deleteDoorDevice(Long id);
|
||||
|
||||
/**
|
||||
* 分页获取授权门信息
|
||||
|
@ -159,7 +159,7 @@ public class DoorDeviceServiceImpl implements DoorDeviceService {
|
||||
* @return Boolean
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteDoorDevice(Integer id) {
|
||||
public Boolean deleteDoorDevice(Long id) {
|
||||
|
||||
// 构造删除门设备的API路径,使用设备ID替换占位符
|
||||
String api = DOOR_DEVICE_DELETE.replace("{id}", id.toString());
|
||||
|
@ -160,6 +160,25 @@ public class UvModel {
|
||||
private String image_path;
|
||||
private String image_base64;
|
||||
private String similarity;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CompareResult{" +
|
||||
"target_id=" + target_id +
|
||||
", lib_id=" + lib_id +
|
||||
", lib_name='" + lib_name + '\'' +
|
||||
", person_id=" + person_id +
|
||||
", person_name='" + person_name + '\'' +
|
||||
", sex=" + sex +
|
||||
", email='" + email + '\'' +
|
||||
", tel='" + tel + '\'' +
|
||||
", certificate_type=" + certificate_type +
|
||||
", certificate_no='" + certificate_no + '\'' +
|
||||
", image_path='" + image_path + '\'' +
|
||||
// ", image_base64='" + image_base64 + '\'' +
|
||||
", similarity='" + similarity + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
@ -171,6 +190,19 @@ public class UvModel {
|
||||
private String crop_image_path;
|
||||
private String orig_image_base64; // 人脸抓拍大图base64
|
||||
private String crop_image_base64; // 人脸抓拍小图base64
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Face{" +
|
||||
"capture_time=" + capture_time +
|
||||
", point_x='" + point_x + '\'' +
|
||||
", point_y='" + point_y + '\'' +
|
||||
", orig_image_path='" + orig_image_path + '\'' +
|
||||
", crop_image_path='" + crop_image_path + '\'' +
|
||||
// ", orig_image_base64='" + orig_image_base64 + '\'' +
|
||||
// ", crop_image_base64='" + crop_image_base64 + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
|
@ -106,8 +106,18 @@ public class VideoAlarmService {
|
||||
* @param alarmReportData 告警数据
|
||||
*/
|
||||
private void handleFacialCapture(UvModel.AlarmReportInfo alarmReportData) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 人脸比对数据上报
|
||||
*
|
||||
* @param alarmReportData 告警数据
|
||||
*/
|
||||
private void handleFacialComparison(UvModel.AlarmReportInfo alarmReportData) {
|
||||
log.info("人脸数据比对,msg= {}", alarmReportData);
|
||||
List<UvModel.CompareResult> compareResults = alarmReportData.getCompare_results();
|
||||
if (compareResults == null) {
|
||||
if (alarmReportData.getHas_result() == 1 && compareResults == null) {
|
||||
log.info("无比对结果,不处理此条数据。");
|
||||
return;
|
||||
}
|
||||
@ -151,15 +161,6 @@ public class VideoAlarmService {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 人脸比对数据上报
|
||||
*
|
||||
* @param alarmReportData 告警数据
|
||||
*/
|
||||
private void handleFacialComparison(UvModel.AlarmReportInfo alarmReportData) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 行为比对数据上报
|
||||
*
|
||||
|
@ -93,12 +93,12 @@ public class SisAccessControlServiceImpl implements ISisAccessControlService {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<SisAccessControl> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(SisAccessControl::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAccessCode()), SisAccessControl::getAccessCode, bo.getAccessCode());
|
||||
// lqw.eq(StringUtils.isNotBlank(bo.getAccessCode()), SisAccessControl::getAccessCode, bo.getAccessCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getAccessName()), SisAccessControl::getAccessName, bo.getAccessName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAccessIp()), SisAccessControl::getAccessIp, bo.getAccessIp());
|
||||
lqw.eq(bo.getAccessPort() != null, SisAccessControl::getAccessPort, bo.getAccessPort());
|
||||
lqw.eq(bo.getAccessType() != null, SisAccessControl::getAccessType, bo.getAccessType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFactoryCode()), SisAccessControl::getFactoryCode, bo.getFactoryCode());
|
||||
// lqw.eq(StringUtils.isNotBlank(bo.getFactoryCode()), SisAccessControl::getFactoryCode, bo.getFactoryCode());
|
||||
lqw.eq(bo.getControlType() != null, SisAccessControl::getControlType, bo.getControlType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getControlCode()), SisAccessControl::getControlCode, bo.getControlCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOutCode()), SisAccessControl::getOutCode, bo.getOutCode());
|
||||
@ -228,6 +228,7 @@ public class SisAccessControlServiceImpl implements ISisAccessControlService {
|
||||
@Override
|
||||
public SisAccessControlVo queryByBindDeviceIp(String deviceCode) {
|
||||
LambdaQueryWrapper<SisAccessControl> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(SisAccessControl::getBindDeviceIp, deviceCode);
|
||||
return baseMapper.selectVoOne(wrapper);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user