获取工程量清单接口回退版本、项目级大屏人员定位接口
This commit is contained in:
@ -182,19 +182,19 @@ public class BusMrpBaseController extends BaseController {
|
||||
@GetMapping("/coryEngineeringList")
|
||||
public R<List<BusBillofquantities>> obtainTheList(CoryObtainTheListReq req) {
|
||||
// public R<List<ObtainTheListRes>> obtainTheList(CoryObtainTheListReq req) {
|
||||
// BusBillofquantitiesVersions one = busBillofquantitiesVersionsService.getOne(Wrappers.<BusBillofquantitiesVersions>lambdaQuery()
|
||||
// .eq(BusBillofquantitiesVersions::getWorkOrderType, "3") //物资工程量清单
|
||||
// .eq(BusBillofquantitiesVersions::getProjectId, req.getProjectId())
|
||||
// .eq(BusBillofquantitiesVersions::getVersions, req.getVersions())
|
||||
// .eq(BusBillofquantitiesVersions::getStatus, BusinessStatusEnum.FINISH.getStatus())
|
||||
// .last("limit 1")
|
||||
// );
|
||||
// if (one == null){
|
||||
// throw new ServiceException("请先完成物资工程量清单");
|
||||
// }
|
||||
// List<BusBillofquantities> list = busBillofquantitiesService.list(Wrappers.<BusBillofquantities>lambdaQuery()
|
||||
// .eq(BusBillofquantities::getVersions, one.getVersions())
|
||||
// );
|
||||
BusBillofquantitiesVersions one = busBillofquantitiesVersionsService.getOne(Wrappers.<BusBillofquantitiesVersions>lambdaQuery()
|
||||
.eq(BusBillofquantitiesVersions::getWorkOrderType, "3") //物资工程量清单
|
||||
.eq(BusBillofquantitiesVersions::getProjectId, req.getProjectId())
|
||||
.eq(BusBillofquantitiesVersions::getVersions, req.getVersions())
|
||||
.eq(BusBillofquantitiesVersions::getStatus, BusinessStatusEnum.FINISH.getStatus())
|
||||
.last("limit 1")
|
||||
);
|
||||
if (one == null){
|
||||
throw new ServiceException("请先完成物资工程量清单");
|
||||
}
|
||||
List<BusBillofquantities> list = busBillofquantitiesService.list(Wrappers.<BusBillofquantities>lambdaQuery()
|
||||
.eq(BusBillofquantities::getVersions, one.getVersions())
|
||||
);
|
||||
// List<ObtainTheListRes> obtainTheListRes = new ArrayList<>();
|
||||
// list.forEach(billofquantities -> {
|
||||
// ObtainTheListRes res = new ObtainTheListRes();
|
||||
@ -208,8 +208,8 @@ public class BusMrpBaseController extends BaseController {
|
||||
// // 3. 递归组装树形结构,从顶级节点(pid=0)开始
|
||||
// List<ObtainTheListRes> treeList = buildTree("0", parentMap);
|
||||
// return R.ok(treeList);
|
||||
// return R.ok(list);
|
||||
return R.ok(busBillofquantitiesService.getBaseMapper().selectList(new LambdaQueryWrapper<BusBillofquantities>().eq(BusBillofquantities::getPid, req.getSid())));
|
||||
return R.ok(list);
|
||||
// return R.ok(busBillofquantitiesService.getBaseMapper().selectList(new LambdaQueryWrapper<BusBillofquantities>().eq(BusBillofquantities::getPid, req.getSid())));
|
||||
}
|
||||
|
||||
private List<ObtainTheListRes> buildTree(String parentId, Map<String, List<ObtainTheListRes>> parentMap) {
|
||||
|
||||
@ -92,6 +92,16 @@ public class GpsEquipmentController extends BaseController {
|
||||
return gpsEquipmentService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询GPS设备详细列表
|
||||
*/
|
||||
@SaCheckPermission("gps:equipment:list")
|
||||
@GetMapping("/list")
|
||||
public R<List<GpsEquipmentVo>> list(GpsEquipmentBo bo) {
|
||||
return R.ok(gpsEquipmentService.queryList(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询GPS设备用户列表
|
||||
*/
|
||||
|
||||
@ -56,6 +56,15 @@ public class GpsEquipmentSonController extends BaseController {
|
||||
return R.ok(gpsEquipmentSonService.queryList(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询GPS设备定位信息列表(大屏获取人员最后一次位置)
|
||||
*/
|
||||
@SaCheckPermission("gps:equipmentSon:getList")
|
||||
@GetMapping("/largerScreen/getList")
|
||||
public R<List<GpsEquipmentSonVo>> getLargerScreenList(GpsEquipmentSonBo bo) {
|
||||
return R.ok(gpsEquipmentSonService.getLargerScreenList(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询GPS设备定位信息列表
|
||||
|
||||
@ -72,4 +72,6 @@ public interface IGpsEquipmentSonService extends IService<GpsEquipmentSon>{
|
||||
List<GpsEquipmentSonVo> getClientList(Long projectId);
|
||||
|
||||
Map<String, Object> getAppList(GpsEquipmentSonBo bo);
|
||||
|
||||
List<GpsEquipmentSonVo> getLargerScreenList(GpsEquipmentSonBo bo);
|
||||
}
|
||||
|
||||
@ -175,4 +175,11 @@ public class GpsEquipmentSonServiceImpl extends ServiceImpl<GpsEquipmentSonMappe
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GpsEquipmentSonVo> getLargerScreenList(GpsEquipmentSonBo bo) {
|
||||
return baseMapper.selectVoList(new LambdaQueryWrapper<GpsEquipmentSon>()
|
||||
.eq(GpsEquipmentSon::getProjectId, bo.getProjectId())
|
||||
.apply("row_number() over (partition by {0} order by {1} desc) = 1","user_id","create_time"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user