diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java index e413104..3a91556 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java @@ -1,5 +1,6 @@ package org.nl.wms.ext.service.impl; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ObjectUtil; import cn.hutool.http.HttpStatus; @@ -206,13 +207,15 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { @Override public BaseResponse notify(JSONObject param) { String requestNo = param.getString("requestNo"); - log.info("notifyAcs - 请求参数 {}", param); + log.info(DateUtil.now()+"notifyAcs - 请求参数前 {}", param); if(param.getInteger("type")==1){ //叠盘机高度同步 SchBasePoint schBasePoint= pointService.getOne(new LambdaQueryWrapper() .eq(SchBasePoint::getPoint_code, param.getString("device_code"))); + log.info(DateUtil.now()+"notifyAcs - 请求参数中:"+schBasePoint.getVehicle_qty()+"------>"+param.getInteger("number")); schBasePoint.setVehicle_qty(param.getInteger("number")); pointService.update(schBasePoint); + log.info(DateUtil.now()+"notifyAcs - 请求参数后 {}", schBasePoint.toString()); }else if(param.getInteger("type")==2) { // 输送线看板展示字段同步 for (String key : param.keySet()) { diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/controller/SchBasePointController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/controller/SchBasePointController.java index 03eadcd..8b5331e 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/controller/SchBasePointController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/controller/SchBasePointController.java @@ -18,6 +18,7 @@ import org.nl.wms.ext.service.AcsToWmsService; import org.nl.wms.ext.service.dto.to.BaseResponse; import org.nl.wms.sch.point.service.ISchBasePointService; import org.nl.wms.sch.point.service.dao.SchBasePoint; +import org.nl.wms.sch.point.service.dto.SchBasePointQuery; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -49,19 +50,8 @@ public class SchBasePointController { @Log("查询点位管理") @ApiOperation("查询点位管理") //@SaCheckPermission("@el.check('schBasePoint:list')") - public ResponseEntity query(@RequestParam Map whereJson, PageQuery page){ - String userName=SecurityUtils.getCurrentUsername(); - UserQuery query=new UserQuery(); - query.setBlurry(userName); - PageQuery pageQuery=new PageQuery(); - List userDetail = userService.getUserDetail(query, pageQuery); - List roles=new ArrayList(); - for(SysRole role:userDetail.get(0).getRoles()){ - if(ObjectUtil.isNotEmpty(role.getRemark())){ - roles.add(role.getRemark()); - } - } - return new ResponseEntity<>(TableDataInfo.build(schBasePointService.queryAll(whereJson,page,roles)),HttpStatus.OK); + public ResponseEntity query(SchBasePointQuery whereJson, PageQuery page){ + return new ResponseEntity<>(TableDataInfo.build(schBasePointService.queryAll(whereJson,page)),HttpStatus.OK); } @PostMapping diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java index f0a132d..7115f44 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java @@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import org.nl.common.domain.query.PageQuery; import com.baomidou.mybatisplus.extension.service.IService; import org.nl.wms.sch.point.service.dao.SchBasePoint; +import org.nl.wms.sch.point.service.dto.SchBasePointDto; +import org.nl.wms.sch.point.service.dto.SchBasePointQuery; import java.util.List; import java.util.Map; @@ -23,7 +25,7 @@ public interface ISchBasePointService extends IService { * @param pageable 分页参数 * @return IPage */ - IPage queryAll(Map whereJson, PageQuery pageable,List roles); + IPage queryAll(SchBasePointQuery whereJson, PageQuery pageable); /** * 创建 diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.java index edd6aca..e8f2ff6 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.java @@ -1,9 +1,10 @@ package org.nl.wms.sch.point.service.dao.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Select; +import com.baomidou.mybatisplus.core.metadata.IPage; import org.nl.wms.sch.point.service.dao.SchBasePoint; +import org.nl.wms.sch.point.service.dto.SchBasePointDto; +import org.nl.wms.sch.point.service.dto.SchBasePointQuery; import java.util.List; @@ -19,4 +20,10 @@ public interface SchBasePointMapper extends BaseMapper { * @param used */ void batchChangeUsed(List pointCodes, Boolean used); + + /** + * 分页查找 + * @return + */ + IPage queryPoint(IPage pages, SchBasePointQuery query); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.xml index 66342b0..f071aa6 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.xml @@ -12,4 +12,52 @@ + + diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dto/SchBasePointDto.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dto/SchBasePointDto.java index 736c3ea..ba9f2e3 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dto/SchBasePointDto.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dto/SchBasePointDto.java @@ -113,4 +113,8 @@ public class SchBasePointDto implements Serializable { /** 修改时间 */ private String update_time; + + private String moname; + + private String status; } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dto/SchBasePointQuery.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dto/SchBasePointQuery.java index 0ce389d..d9a10f2 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dto/SchBasePointQuery.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dto/SchBasePointQuery.java @@ -1,12 +1,27 @@ package org.nl.wms.sch.point.service.dto; +import lombok.Data; import org.nl.common.domain.query.BaseQuery; import org.nl.wms.sch.point.service.dao.SchBasePoint; +import java.io.Serializable; + /** * @author lyd * @date 2023-05-15 **/ -public class SchBasePointQuery extends BaseQuery { +@Data +public class SchBasePointQuery implements Serializable { + + private String blurry; + + private String region_code; + + private String vehicle_code; + + private String vehicle_code2; + + private Boolean is_used; + private Boolean lock_type; } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java index 04f1d85..49a3357 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java @@ -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 queryAll(Map whereJson, PageQuery page,List 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 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 pages = new Page<>(page.getPage() + 1, page.getSize()); - pointMapper.selectPage(pages, lam); + public IPage queryAll(SchBasePointQuery whereJson, PageQuery pageQuery){ + IPage pages = new Page<>(pageQuery.getPage() + 1, pageQuery.getSize()); + pages = pointMapper.queryPoint(pages, whereJson); return pages; } @@ -123,7 +97,6 @@ public class SchBasePointServiceImpl extends ServiceImpl { */ Integer findUnFinishTasksByPoint_code2(String task_code, String point_code2); + /** * 根据任务号和子托盘查询未完成的任务 * @param task_code diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java index 03e68a2..83765d1 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java @@ -134,7 +134,8 @@ public class SchBaseTaskServiceImpl extends ServiceImpl slam.eq(SchBaseTask::getPoint_code1, point_code2) .or() .eq(SchBaseTask::getPoint_code2, point_code2)) - .eq(SchBaseTask::getIs_delete, false); + .eq(SchBaseTask::getIs_delete, false) + .gt(point_code2.startsWith("DKT"),SchBaseTask::getTask_status, TaskStatus.APPLY.getCode()); Integer schBaseTasks = schBaseTaskMapper.selectCount(lam); return schBaseTasks; } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/POINTTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/POINTTask.java index dfc6e59..f8dfaf0 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/POINTTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/POINTTask.java @@ -99,15 +99,18 @@ public class POINTTask extends AbstractTask { log.info("分配终点点位"+task.getPoint_code2()+"已存在已存在载具!"); continue; } - // 获取任务 - Integer taskList = taskService.findUnFinishTasksByPoint_code2(task.getTask_code(),task.getPoint_code2()); - if(taskList>0){ - task.setRemark("分配终点点位"+task.getPoint_code2()+"已存在未完成任务!"); - taskService.update(task); - // 消息通知 - log.info("分配终点点位"+task.getPoint_code2()+"已存在未完成任务!"); - continue; + } + // 获取任务 + Integer taskList = taskService.findUnFinishTasksByPoint_code2(task.getTask_code(),task.getPoint_code2()); + if(taskList>0){ + task.setRemark("分配终点点位"+task.getPoint_code2()+"已存在未完成任务!"); + if(task.getPoint_code2().startsWith("DKT")){ + task.setPoint_code2(nextSchBasePoint.getPoint_code()); } + taskService.update(task); + // 消息通知 + log.info("分配终点点位"+task.getPoint_code2()+"已存在未完成任务!"); + continue; } //复制对象 SchBaseTask acs_task = BeanUtil.copyProperties(task,SchBaseTask.class); @@ -137,6 +140,9 @@ public class POINTTask extends AbstractTask { now_num++; }else{ task.setRemark("下发acs失败:"+result.toString()); + if(task.getPoint_code2().startsWith("DKT")){ + task.setPoint_code2(nextSchBasePoint.getPoint_code()); + } taskService.update(task); } } diff --git a/lms/nladmin-ui/src/views/wms/sch/point/PointDialog.vue b/lms/nladmin-ui/src/views/wms/sch/point/PointDialog.vue index 7bd8e0e..2df5c99 100644 --- a/lms/nladmin-ui/src/views/wms/sch/point/PointDialog.vue +++ b/lms/nladmin-ui/src/views/wms/sch/point/PointDialog.vue @@ -93,8 +93,7 @@ export default { url: 'api/schBasePoint', optShow: {}, query: { - is_used: true, - parent_point: true + is_used: true } }) }, diff --git a/lms/nladmin-ui/src/views/wms/sch/point/index.vue b/lms/nladmin-ui/src/views/wms/sch/point/index.vue index b138921..c08cd02 100644 --- a/lms/nladmin-ui/src/views/wms/sch/point/index.vue +++ b/lms/nladmin-ui/src/views/wms/sch/point/index.vue @@ -60,22 +60,6 @@ /> - - - - - - - - - - - - + +