Merge branch 'master' of http://47.109.37.87:3000/by2025/SmartParks
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
@@ -105,14 +105,14 @@ public class TbFloorController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据单元ID查询楼层
|
||||
* 根据楼层id查询楼层
|
||||
*
|
||||
* @param unitId 单元ID
|
||||
* @param buildingId 单元ID
|
||||
* @return 楼层
|
||||
*/
|
||||
@GetMapping("/queryByUnitId/{unitId}")
|
||||
public R<List<TbFloorVo>> queryByUnitId(@NotNull(message = "单元ID不能为空")
|
||||
@PathVariable("unitId") Long unitId) {
|
||||
return R.ok(tbFloorService.queryByUnitId(unitId));
|
||||
@GetMapping("/queryByBuildingId/{buildingId}")
|
||||
public R<List<TbFloorVo>> queryByBuildingId(@NotNull(message = "楼层ID不能为空")
|
||||
@PathVariable("buildingId") Long buildingId) {
|
||||
return R.ok(tbFloorService.queryByBuildingId(buildingId));
|
||||
}
|
||||
}
|
||||
|
@@ -101,6 +101,10 @@ public class ServiceWorkOrders extends TenantEntity {
|
||||
* 图片
|
||||
*/
|
||||
private String imgUrl;
|
||||
/**
|
||||
* 工单图片
|
||||
*/
|
||||
private String orderImgUrl;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
@@ -90,11 +90,6 @@ public class CleanOrderBo extends BaseEntity {
|
||||
@NotBlank(message = "结束时间不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String endTime;
|
||||
|
||||
/**
|
||||
* 单位id
|
||||
*/
|
||||
@NotNull(message = "单位id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
/**
|
||||
* 评价
|
||||
*/
|
||||
|
@@ -48,6 +48,11 @@ public class ServiceWorkOrdersInfoVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "工单类型")
|
||||
private Long type;
|
||||
/**
|
||||
* 权重
|
||||
*/
|
||||
@ExcelProperty(value = "权重")
|
||||
private String processingWeight;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
@@ -127,6 +132,22 @@ public class ServiceWorkOrdersInfoVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 评价文本
|
||||
*/
|
||||
private String serviceEvaluaText;
|
||||
/**
|
||||
* 工单图片
|
||||
*/
|
||||
private String orderImgUrl;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String imgUrl;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
*工单记录
|
||||
*/
|
||||
|
@@ -131,6 +131,10 @@ public class ServiceWorkOrdersVo implements Serializable {
|
||||
* 评价文本
|
||||
*/
|
||||
private String serviceEvaluaText;
|
||||
/**
|
||||
* 工单图片
|
||||
*/
|
||||
private String orderImgUrl;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
|
@@ -0,0 +1,37 @@
|
||||
package org.dromara.property.dubbo;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.property.api.RemoteBuildingService;
|
||||
import org.dromara.property.api.domain.vo.RemoteBuildingVo;
|
||||
import org.dromara.property.domain.vo.TbBuildingVo;
|
||||
import org.dromara.property.domain.vo.TbUnitVo;
|
||||
import org.dromara.property.service.ITbBuildingService;
|
||||
import org.dromara.property.service.ITbUnitService;
|
||||
|
||||
/**
|
||||
* 对外提供的远程服务调用
|
||||
*
|
||||
* @author lxj
|
||||
*/
|
||||
@DubboService
|
||||
@RequiredArgsConstructor
|
||||
public class RemoteBuildingServiceImpl implements RemoteBuildingService {
|
||||
|
||||
private final ITbBuildingService iTbBuildingService;
|
||||
|
||||
|
||||
@Override
|
||||
public RemoteBuildingVo queryBuildingById(Long id) {
|
||||
TbBuildingVo tbBuildingVo = iTbBuildingService.queryById(id);
|
||||
if(tbBuildingVo == null) {
|
||||
return null;
|
||||
}
|
||||
RemoteBuildingVo remoteBuildingVo = new RemoteBuildingVo();
|
||||
remoteBuildingVo.setId(tbBuildingVo.getId());
|
||||
remoteBuildingVo.setCommunityId(tbBuildingVo.getCommunityId());
|
||||
remoteBuildingVo.setBuildingName(tbBuildingVo.getBuildingName());
|
||||
remoteBuildingVo.setFloorCount(tbBuildingVo.getFloorCount());
|
||||
return remoteBuildingVo;
|
||||
}
|
||||
}
|
@@ -5,6 +5,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.core.domain.TreeNode;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.redis.utils.RedisUtils;
|
||||
import org.dromara.property.api.RemoteFloorService;
|
||||
import org.dromara.property.api.domain.vo.RemoteFloorVo;
|
||||
import org.dromara.property.domain.vo.TbBuildingVo;
|
||||
@@ -34,7 +35,6 @@ public class RemoteFloorServiceImpl implements RemoteFloorService {
|
||||
private final ITbUnitService unitService;
|
||||
private final ITbFloorService floorService;
|
||||
|
||||
|
||||
@Override
|
||||
public RemoteFloorVo queryByFloorId(Long floorId) {
|
||||
TbFloorVo tbFloorVo = floorService.queryById(floorId);
|
||||
@@ -103,14 +103,14 @@ public class RemoteFloorServiceImpl implements RemoteFloorService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据单元ID查询楼层
|
||||
* 根据楼层id查询楼层
|
||||
*
|
||||
* @param unitId 单元ID
|
||||
* @param buildingId 单元ID
|
||||
* @return 楼层
|
||||
*/
|
||||
@Override
|
||||
public List<RemoteFloorVo> queryByUnitId(Long unitId){
|
||||
List<TbFloorVo> tbFloorVo = floorService.queryByUnitId(unitId);
|
||||
public List<RemoteFloorVo> queryByBuildingId(Long buildingId){
|
||||
List<TbFloorVo> tbFloorVo = floorService.queryByBuildingId(buildingId);
|
||||
List<RemoteFloorVo> remoteFloorVos = new ArrayList<>();
|
||||
|
||||
tbFloorVo.forEach(item -> {
|
||||
|
@@ -1,39 +0,0 @@
|
||||
package org.dromara.property.dubbo;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.property.api.RemoteUnitService;
|
||||
import org.dromara.property.api.domain.vo.RemoteUnitVo;
|
||||
import org.dromara.property.domain.vo.TbUnitVo;
|
||||
import org.dromara.property.service.ITbUnitService;
|
||||
|
||||
/**
|
||||
* 对外提供的远程服务调用
|
||||
*
|
||||
* @author lxj
|
||||
*/
|
||||
@DubboService
|
||||
@RequiredArgsConstructor
|
||||
public class RemoteUnitServiceImpl implements RemoteUnitService {
|
||||
|
||||
private final ITbUnitService tbUnitService;
|
||||
|
||||
|
||||
@Override
|
||||
public RemoteUnitVo queryUnitById(Long id) {
|
||||
TbUnitVo tbUnitVo = tbUnitService.queryById(id);
|
||||
if(tbUnitVo == null) {
|
||||
return null;
|
||||
}
|
||||
RemoteUnitVo remoteUnitVo = new RemoteUnitVo();
|
||||
remoteUnitVo.setId(tbUnitVo.getId());
|
||||
remoteUnitVo.setCommunityId(tbUnitVo.getCommunityId());
|
||||
remoteUnitVo.setBuildingId(tbUnitVo.getBuildingId());
|
||||
remoteUnitVo.setUnitName(tbUnitVo.getUnitName());
|
||||
remoteUnitVo.setFloorCount(tbUnitVo.getFloorCount());
|
||||
remoteUnitVo.setHouseholdCount(tbUnitVo.getHouseholdCount());
|
||||
remoteUnitVo.setStairCount(tbUnitVo.getStairCount());
|
||||
return remoteUnitVo;
|
||||
}
|
||||
}
|
@@ -76,10 +76,10 @@ public interface ITbFloorService {
|
||||
List<TbFloorVo> queryAll();
|
||||
|
||||
/**
|
||||
* 根据单元ID查询楼层
|
||||
* 根据楼层id查询楼层
|
||||
*
|
||||
* @param unitId 单元ID
|
||||
* @param buildingId 单元ID
|
||||
* @return 楼层
|
||||
*/
|
||||
List<TbFloorVo> queryByUnitId(Long unitId);
|
||||
List<TbFloorVo> queryByBuildingId(Long buildingId);
|
||||
}
|
||||
|
@@ -216,6 +216,7 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService {
|
||||
* 修改前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeUpdate(ServiceWorkOrders entity) {
|
||||
Assert.isTrue(ObjectUtil.isNotEmpty(entity.getStatus()),"状态不能为空!");
|
||||
LambdaQueryWrapper<ServiceWorkOrdersRecord> ordersLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
ordersLambdaQueryWrapper.eq(ServiceWorkOrdersRecord::getOrderId, entity.getId());
|
||||
ordersLambdaQueryWrapper.eq(ServiceWorkOrdersRecord::getStatus, entity.getStatus());
|
||||
|
@@ -160,15 +160,15 @@ public class TbFloorServiceImpl implements ITbFloorService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据单元ID查询楼层
|
||||
* 根据楼层id查询楼层
|
||||
*
|
||||
* @param unitId 单元ID
|
||||
* @param buildingId 单元ID
|
||||
* @return 楼层
|
||||
*/
|
||||
@Override
|
||||
public List<TbFloorVo> queryByUnitId(Long unitId) {
|
||||
public List<TbFloorVo> queryByBuildingId(Long buildingId) {
|
||||
LambdaQueryWrapper<TbFloor> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(TbFloor::getUnitId, unitId)
|
||||
lqw.eq(TbFloor::getBuildingId, buildingId)
|
||||
.orderByAsc(TbFloor::getFloorNumber);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
Reference in New Issue
Block a user