|
|
@ -19,8 +19,11 @@ import org.nl.wms.sch.group.service.dao.mapper.SchBaseVehiclematerialgroupMapper |
|
|
|
import org.nl.wms.sch.point.service.ISchBasePointService; |
|
|
|
import org.nl.wms.sch.point.service.dao.SchBasePoint; |
|
|
|
import org.nl.wms.sch.point.service.dao.mapper.SchBasePointMapper; |
|
|
|
import org.nl.wms.sch.point.service.dto.SchBasePointDto; |
|
|
|
import org.nl.wms.sch.point.service.dto.SchBasePointQuery; |
|
|
|
import org.nl.wms.sch.region.service.dao.SchBaseRegion; |
|
|
|
import org.nl.wms.sch.region.service.dao.mapper.SchBaseRegionMapper; |
|
|
|
import org.nl.wms.sch.report.service.dto.ReportDto; |
|
|
|
import org.nl.wms.sch.task.service.dao.SchBaseTask; |
|
|
|
import org.nl.wms.sch.task_manage.GeneralDefinition; |
|
|
|
import org.nl.wms.sch.task_manage.enums.PointStatusEnum; |
|
|
@ -50,38 +53,9 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch |
|
|
|
private SchBaseVehiclematerialgroupMapper vehiclematerialgroupMapper; |
|
|
|
|
|
|
|
@Override |
|
|
|
public IPage<SchBasePoint> queryAll(Map whereJson, PageQuery page,List<String> roles){ |
|
|
|
String blurry = ObjectUtil.isNotEmpty(whereJson.get("blurry")) ? whereJson.get("blurry").toString() : null; |
|
|
|
String workshop_code = ObjectUtil.isNotEmpty(whereJson.get("workshop_code")) ? whereJson.get("workshop_code").toString() : null; |
|
|
|
String region_code = ObjectUtil.isNotEmpty(whereJson.get("region_code")) ? whereJson.get("region_code").toString() : null; |
|
|
|
String point_type = ObjectUtil.isNotEmpty(whereJson.get("point_type")) ? whereJson.get("point_type").toString() : null; |
|
|
|
String point_status = ObjectUtil.isNotEmpty(whereJson.get("point_status")) ? whereJson.get("point_status").toString() : null; |
|
|
|
String vehicle_code = ObjectUtil.isNotEmpty(whereJson.get("vehicle_code")) ? whereJson.get("vehicle_code").toString() : null; |
|
|
|
String vehicle_code2 = ObjectUtil.isNotEmpty(whereJson.get("vehicle_code2")) ? whereJson.get("vehicle_code2").toString() : null; |
|
|
|
Boolean is_used = ObjectUtil.isNotEmpty(whereJson.get("is_used")) ? Boolean.valueOf(whereJson.get("is_used").toString()) : null; |
|
|
|
Boolean lock_type = ObjectUtil.isNotEmpty(whereJson.get("lock_type")) ? Boolean.valueOf(whereJson.get("lock_type").toString()) : false; |
|
|
|
Boolean parent_point = ObjectUtil.isNotEmpty(whereJson.get("parent_point")) ? Boolean.valueOf(whereJson.get("parent_point").toString()) : false; |
|
|
|
LambdaQueryWrapper<SchBasePoint> lam = new LambdaQueryWrapper<>(); |
|
|
|
lam.like(ObjectUtil.isNotEmpty(blurry), SchBasePoint::getPoint_code, blurry) |
|
|
|
.eq(ObjectUtil.isNotEmpty(workshop_code), SchBasePoint::getWorkshop_code, workshop_code) |
|
|
|
.in(ObjectUtil.isNotEmpty(roles),SchBasePoint::getWorkshop_code,roles) |
|
|
|
.eq(ObjectUtil.isNotEmpty(region_code), SchBasePoint::getRegion_code, region_code) |
|
|
|
.eq(ObjectUtil.isNotEmpty(point_type), SchBasePoint::getPoint_type, point_type) |
|
|
|
.eq(ObjectUtil.isNotEmpty(point_status), SchBasePoint::getPoint_status, point_status) |
|
|
|
.eq(ObjectUtil.isNotEmpty(is_used), SchBasePoint::getIs_used, is_used) |
|
|
|
.like(ObjectUtil.isNotEmpty(vehicle_code), SchBasePoint::getVehicle_code, vehicle_code) |
|
|
|
.like(ObjectUtil.isNotEmpty(vehicle_code2), SchBasePoint::getVehicle_code2, vehicle_code2) |
|
|
|
.and(!lock_type, slam -> slam.isNull(SchBasePoint::getIng_task_code) |
|
|
|
.or() |
|
|
|
.eq(SchBasePoint::getIng_task_code, "")) |
|
|
|
.and(lock_type, slam -> slam.isNotNull(SchBasePoint::getIng_task_code) |
|
|
|
.ne(SchBasePoint::getIng_task_code, "")) |
|
|
|
.orderByAsc(SchBasePoint::getRegion_code) |
|
|
|
.orderByAsc(SchBasePoint::getPoint_type) |
|
|
|
.orderByAsc(SchBasePoint::getPoint_code) |
|
|
|
.apply(parent_point, "point_code = parent_point_code"); |
|
|
|
IPage<SchBasePoint> pages = new Page<>(page.getPage() + 1, page.getSize()); |
|
|
|
pointMapper.selectPage(pages, lam); |
|
|
|
public IPage<SchBasePointDto> queryAll(SchBasePointQuery whereJson, PageQuery pageQuery){ |
|
|
|
IPage<SchBasePointDto> pages = new Page<>(pageQuery.getPage() + 1, pageQuery.getSize()); |
|
|
|
pages = pointMapper.queryPoint(pages, whereJson); |
|
|
|
return pages; |
|
|
|
} |
|
|
|
|
|
|
@ -123,7 +97,6 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch |
|
|
|
|
|
|
|
@Override |
|
|
|
public void update(SchBasePoint entity) { |
|
|
|
log.info("管理端手动变更点位信息:{}",entity.toString()); |
|
|
|
String currentUserId = SecurityUtils.getCurrentUserId(); |
|
|
|
String nickName = SecurityUtils.getCurrentNickName(); |
|
|
|
String now = DateUtil.now(); |
|
|
@ -135,12 +108,12 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch |
|
|
|
SchBaseRegion baseRegion = regionMapper.selectById(entity.getRegion_code()); |
|
|
|
entity.setRegion_name(baseRegion.getRegion_name()); |
|
|
|
} |
|
|
|
log.info("update管理端变更点位信息为:{}",entity.toString()); |
|
|
|
pointMapper.updateById(entity); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void updateByPc(SchBasePoint entity) { |
|
|
|
log.info("管理端手动变更点位信息:{}",entity.toString()); |
|
|
|
String currentUserId = SecurityUtils.getCurrentUserId(); |
|
|
|
String nickName = SecurityUtils.getCurrentNickName(); |
|
|
|
String now = DateUtil.now(); |
|
|
@ -174,6 +147,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch |
|
|
|
} |
|
|
|
} |
|
|
|
entity.setIs_has_workder(false); |
|
|
|
log.info("updateByPc管理端变更点位信息为:{}",entity.toString()); |
|
|
|
pointMapper.updateById(entity); |
|
|
|
} |
|
|
|
|
|
|
|