获取工程量清单接口回退版本、项目级大屏人员定位接口

This commit is contained in:
2025-09-17 16:14:04 +08:00
parent 42c5f46f75
commit 19f8e10714
5 changed files with 43 additions and 15 deletions

View File

@ -182,19 +182,19 @@ public class BusMrpBaseController extends BaseController {
@GetMapping("/coryEngineeringList") @GetMapping("/coryEngineeringList")
public R<List<BusBillofquantities>> obtainTheList(CoryObtainTheListReq req) { public R<List<BusBillofquantities>> obtainTheList(CoryObtainTheListReq req) {
// public R<List<ObtainTheListRes>> obtainTheList(CoryObtainTheListReq req) { // public R<List<ObtainTheListRes>> obtainTheList(CoryObtainTheListReq req) {
// BusBillofquantitiesVersions one = busBillofquantitiesVersionsService.getOne(Wrappers.<BusBillofquantitiesVersions>lambdaQuery() BusBillofquantitiesVersions one = busBillofquantitiesVersionsService.getOne(Wrappers.<BusBillofquantitiesVersions>lambdaQuery()
// .eq(BusBillofquantitiesVersions::getWorkOrderType, "3") //物资工程量清单 .eq(BusBillofquantitiesVersions::getWorkOrderType, "3") //物资工程量清单
// .eq(BusBillofquantitiesVersions::getProjectId, req.getProjectId()) .eq(BusBillofquantitiesVersions::getProjectId, req.getProjectId())
// .eq(BusBillofquantitiesVersions::getVersions, req.getVersions()) .eq(BusBillofquantitiesVersions::getVersions, req.getVersions())
// .eq(BusBillofquantitiesVersions::getStatus, BusinessStatusEnum.FINISH.getStatus()) .eq(BusBillofquantitiesVersions::getStatus, BusinessStatusEnum.FINISH.getStatus())
// .last("limit 1") .last("limit 1")
// ); );
// if (one == null){ if (one == null){
// throw new ServiceException("请先完成物资工程量清单"); throw new ServiceException("请先完成物资工程量清单");
// } }
// List<BusBillofquantities> list = busBillofquantitiesService.list(Wrappers.<BusBillofquantities>lambdaQuery() List<BusBillofquantities> list = busBillofquantitiesService.list(Wrappers.<BusBillofquantities>lambdaQuery()
// .eq(BusBillofquantities::getVersions, one.getVersions()) .eq(BusBillofquantities::getVersions, one.getVersions())
// ); );
// List<ObtainTheListRes> obtainTheListRes = new ArrayList<>(); // List<ObtainTheListRes> obtainTheListRes = new ArrayList<>();
// list.forEach(billofquantities -> { // list.forEach(billofquantities -> {
// ObtainTheListRes res = new ObtainTheListRes(); // ObtainTheListRes res = new ObtainTheListRes();
@ -208,8 +208,8 @@ public class BusMrpBaseController extends BaseController {
// // 3. 递归组装树形结构从顶级节点pid=0开始 // // 3. 递归组装树形结构从顶级节点pid=0开始
// List<ObtainTheListRes> treeList = buildTree("0", parentMap); // List<ObtainTheListRes> treeList = buildTree("0", parentMap);
// return R.ok(treeList); // return R.ok(treeList);
// return R.ok(list); return R.ok(list);
return R.ok(busBillofquantitiesService.getBaseMapper().selectList(new LambdaQueryWrapper<BusBillofquantities>().eq(BusBillofquantities::getPid, req.getSid()))); // 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) { private List<ObtainTheListRes> buildTree(String parentId, Map<String, List<ObtainTheListRes>> parentMap) {

View File

@ -92,6 +92,16 @@ public class GpsEquipmentController extends BaseController {
return gpsEquipmentService.queryPageList(bo, pageQuery); 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设备用户列表 * 查询GPS设备用户列表
*/ */

View File

@ -56,6 +56,15 @@ public class GpsEquipmentSonController extends BaseController {
return R.ok(gpsEquipmentSonService.queryList(bo)); 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设备定位信息列表 * 查询GPS设备定位信息列表

View File

@ -72,4 +72,6 @@ public interface IGpsEquipmentSonService extends IService<GpsEquipmentSon>{
List<GpsEquipmentSonVo> getClientList(Long projectId); List<GpsEquipmentSonVo> getClientList(Long projectId);
Map<String, Object> getAppList(GpsEquipmentSonBo bo); Map<String, Object> getAppList(GpsEquipmentSonBo bo);
List<GpsEquipmentSonVo> getLargerScreenList(GpsEquipmentSonBo bo);
} }

View File

@ -175,4 +175,11 @@ public class GpsEquipmentSonServiceImpl extends ServiceImpl<GpsEquipmentSonMappe
return map; 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"));
}
} }