From bf5696c15f238f2d14c27011ba907665da6d4b7e Mon Sep 17 00:00:00 2001 From: liyongde <1419499670@qq.com> Date: Thu, 28 Dec 2023 18:59:46 +0800 Subject: [PATCH] =?UTF-8?q?opt:=20=E4=BB=BB=E5=8A=A1=E3=80=82=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/nl/config/lucene/Searcher.java | 6 +--- .../controller/lucence/LuceneController.java | 2 +- .../lucene/impl/LuceneServiceImpl.java | 5 ++- .../param/impl/SysParamServiceImpl.java | 2 ++ .../acs/service/impl/AcsToWmsServiceImpl.java | 12 ++++--- .../nl/wms/pda/controller/PdaController.java | 19 ++-------- .../controller/SchBaseTaskController.java | 7 ++-- .../SchBaseTaskconfigController.java | 6 ++++ .../sch/task/service/ISchBaseTaskService.java | 4 ++- .../service/ISchBaseTaskconfigService.java | 3 ++ .../wms/sch/task/service/dao/SchBaseTask.java | 5 +++ .../service/dao/mapper/SchBaseTaskMapper.java | 5 +++ .../service/dao/mapper/SchBaseTaskMapper.xml | 36 +++++++++++++++++++ .../task/service/dto/SchBaseTaskQuery.java | 15 +++++++- .../service/impl/SchBaseTaskServiceImpl.java | 34 ++++-------------- .../impl/SchBaseTaskconfigServiceImpl.java | 8 +++++ lms/nladmin-ui/src/views/lucene/index.vue | 4 +++ .../src/views/system/param/index.vue | 4 +-- .../wms/sch/task/config/schBaseTaskconfig.js | 8 ++++- .../src/views/wms/sch/task/index.vue | 30 +++++++++++++--- 20 files changed, 145 insertions(+), 70 deletions(-) diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/Searcher.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/Searcher.java index 2565dcd..2e51775 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/Searcher.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/Searcher.java @@ -107,14 +107,10 @@ public class Searcher { for (ScoreDoc scoreDoc : scoreDocs) { Document doc = reader.document(scoreDoc.doc); - String logInfo = LogMessageConstant.COLOR_CYAN + doc.get(LogMessageConstant.FIELD_LABEL) + + String logInfo = LogMessageConstant.COLOR_RED + doc.get(LogMessageConstant.FIELD_TIMESTAMP) + LogMessageConstant.COLOR_RESET + " - " + LogMessageConstant.COLOR_BLUE + doc.get(LogMessageConstant.FIELD_IP) + LogMessageConstant.COLOR_RESET + " - " + - LogMessageConstant.COLOR_YELLOW + doc.get(LogMessageConstant.FIELD_TRACEID) + - LogMessageConstant.COLOR_RESET + " - " + - LogMessageConstant.COLOR_RED + doc.get(LogMessageConstant.FIELD_TIMESTAMP) + - LogMessageConstant.COLOR_RESET + " - " + LogMessageConstant.COLOR_GREEN + "[" + doc.get(LogMessageConstant.FIELD_THREAD) + "]" + LogMessageConstant.COLOR_RESET + " - " + LogMessageConstant.COLOR_BLACK + doc.get(LogMessageConstant.FIELD_LEVEL) + diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/lucence/LuceneController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/lucence/LuceneController.java index 410ae6a..2dae889 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/lucence/LuceneController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/lucence/LuceneController.java @@ -38,6 +38,6 @@ public class LuceneController { @PostMapping("/deleteAllLog") public ResponseEntity deleteAllLog() { luceneService.deleteAllLog(); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); + return new ResponseEntity<>(HttpStatus.OK); } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/lucene/impl/LuceneServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/lucene/impl/LuceneServiceImpl.java index 184083d..1220fd9 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/lucene/impl/LuceneServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/lucene/impl/LuceneServiceImpl.java @@ -61,7 +61,10 @@ public class LuceneServiceImpl implements LuceneService { IndexWriter writer = LuceneAppender.indexWriter; // 创建一个匹配所有文档的查询 MatchAllDocsQuery query = new MatchAllDocsQuery(); - writer.deleteDocuments(query); + // 获取删除的文档数量 + long deletedDocs = writer.deleteDocuments(query); + // 输出删除的文档数量 + System.out.println("Deleted " + deletedDocs + " documents"); writer.commit(); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/param/impl/SysParamServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/param/impl/SysParamServiceImpl.java index afcdd78..13fc447 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/param/impl/SysParamServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/param/impl/SysParamServiceImpl.java @@ -49,6 +49,8 @@ public class SysParamServiceImpl extends ServiceImpl impl IPage pages = new Page<>(page.getPage() + 1, page.getSize()); LambdaQueryWrapper lam = new QueryWrapper().lambda(); lam.like(ObjectUtil.isNotEmpty(code), Param::getCode, code) + .or(ObjectUtil.isNotEmpty(code)) + .like(ObjectUtil.isNotEmpty(code), Param::getName, code) .orderByAsc(Param::getCreate_time); paramMapper.selectPage(pages, lam); return pages; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java index eddb63f..68e2a26 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java @@ -430,13 +430,15 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { String getStation = request.getGet_station(); String putStation = request.getPut_station(); // 查找当前点位中的信息,如果acs没有提供,就获取点位上的数据,如果点位没有,则数据失效 + // 拆垛位 SchBasePoint pickupPoint = pointService.getById(getStation); + // 码垛位 SchBasePoint putPoint = pointService.getById(putStation); - if (request.getGet_station_vehicle_code() == null || request.getGet_station_vehicle_code().equals("0")) { - request.setGet_station_vehicle_code(pickupPoint.getVehicle_code()); + if (request.getGet_station_vehicle_code() == null || "0".equals(request.getGet_station_vehicle_code())) { + throw new BadRequestException("取砖位的载具编码不能为空"); } - if (request.getPut_station_vehicle_code() == null || request.getPut_station_vehicle_code().equals("0")) { - request.setPut_station_vehicle_code(putPoint.getVehicle_code()); + if (request.getPut_station_vehicle_code() == null || "0".equals(request.getPut_station_vehicle_code())) { + throw new BadRequestException("放置位的载具编码不能为空"); } // 获取工单 PdmBdWorkorder productionTask = workorderService.getDeviceProductionTask(pickupPoint.getParent_point_code()); @@ -703,7 +705,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { taskResponse.setMessage("静置完成"); taskResponse.setWeight(one.getMaterial_weight().toString()); taskResponse.setMudBatch(one.getPcsn()); - // todo: 泥料数据删除 + // 泥料数据删除 List list = requestMaterialRecordService.list(new LambdaQueryWrapper() .eq(PdmBdRequestMaterialRecord::getDevice_code, yjDeviceCode) .eq(ObjectUtil.isNotEmpty(productionTask), PdmBdRequestMaterialRecord::getWorkorder_id, productionTask.getWorkorder_code()) diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java index ae0069a..346f572 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java @@ -3,6 +3,7 @@ package org.nl.wms.pda.controller; import cn.dev33.satoken.annotation.SaIgnore; import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; +import org.nl.common.annotation.Limit; import org.nl.common.logging.annotation.Log; import org.nl.wms.das.device.check.service.IDasDeviceCheckRecordService; import org.nl.wms.das.device.check.service.dao.DasDeviceCheckRecord; @@ -44,56 +45,48 @@ public class PdaController { @PostMapping("/deviceCheck/verify") @Log("设备点检") - public ResponseEntity deviceCheck(@Validated @RequestBody DasDeviceCheckRecord entity) { return new ResponseEntity<>(deviceCheckRecordService.create(entity), HttpStatus.OK); } @PostMapping("/deviceCheck/deviceInfo") @Log("设备下拉框数据") - public ResponseEntity deviceInfo() { return new ResponseEntity<>(pdaService.getDeviceInfo(), HttpStatus.OK); } @PostMapping("/deviceCheck/deviceStatus") @Log("设备状态下拉框数据") - public ResponseEntity deviceStatus() { return new ResponseEntity<>(pdaService.getDeviceStatus(), HttpStatus.OK); } @PostMapping("/deviceSwitchover/deviceAction") @Log("设备动作下拉框数据") - public ResponseEntity deviceAction() { return new ResponseEntity<>(pdaService.deviceAction(), HttpStatus.OK); } @PostMapping("/deviceSwitchover/verify") @Log("设备动作切换") - public ResponseEntity deviceSwitchover(@Validated @RequestBody DasDeviceOperationRecord entity) { return new ResponseEntity<>(deviceOperationRecordService.create(entity), HttpStatus.OK); } @PostMapping("/group/getPressCode") @Log("获取压机编码") - public ResponseEntity getPressCode() { return new ResponseEntity<>(pdaService.getDeviceInfo(), HttpStatus.OK); } @PostMapping("/group/getVehicleType") @Log("获取载具类型") - public ResponseEntity getVehicleType() { return new ResponseEntity<>(pdaService.getVehicleType(), HttpStatus.OK); } @PostMapping("/group/getPressWorkOrder") @Log("获取工单编码") - @Deprecated public ResponseEntity getPressWorkOrder(@RequestBody JSONObject param) { return new ResponseEntity<>(workorderService.getDeviceProductionTask(param.getString("point_code")), HttpStatus.OK); @@ -101,56 +94,48 @@ public class PdaController { @PostMapping("/group/manual") @Log("人工组盘") - public ResponseEntity manualDiskAssembly(@Validated @RequestBody ManualGroupDto entity) { return new ResponseEntity<>(pdaService.manualCreateByPda(entity), HttpStatus.OK); } @PostMapping("/move/getBlendingCode") @Log("获取混碾机编码") - public ResponseEntity getBlendingCode() { return new ResponseEntity<>(pdaService.getBlendingCode(), HttpStatus.OK); } @PostMapping("/move/sendTask") @Log("生成混碾->压机任务") - public ResponseEntity sendTask(@Validated @RequestBody BlendingMoveDto blendingMoveDto) { return new ResponseEntity<>(pdaService.sendTask(blendingMoveDto), HttpStatus.OK); } @PostMapping("/forcedResting/show") @Log("显示静置时长") - public ResponseEntity forcedRestingShow() { return new ResponseEntity<>(pdaService.forcedRestingShow(), HttpStatus.OK); } @PostMapping("/forcedResting/submit") @Log("强制静置") - public ResponseEntity forcedResting(@Validated @RequestBody ForcedRestingDto forcedRestingDto) { return new ResponseEntity<>(pdaService.forcedResting(forcedRestingDto), HttpStatus.OK); } @PostMapping("/manualSorting/orders") @Log("人工分拣-显示工单") - public ResponseEntity manualOrders() { return new ResponseEntity<>(pdaService.manualOrders(), HttpStatus.OK); } @PostMapping("/manualSorting/productionScheduling") @Log("人工分拣-开工") - public ResponseEntity productionScheduling(@Validated @RequestBody ManualSortingDto manualSortingDto) { return new ResponseEntity<>(pdaService.productionScheduling(manualSortingDto), HttpStatus.OK); } @PostMapping("/manualSorting/productionComplete") @Log("人工分拣-完工") - public ResponseEntity productionComplete(@Validated @RequestBody ManualSortingDto manualSortingDto) { return new ResponseEntity<>(pdaService.productionComplete(manualSortingDto), HttpStatus.OK); } @@ -227,7 +212,7 @@ public class PdaController { @PostMapping("/manualSorting/bindingVehicle") @Log("人工分拣-载具绑定") - + @Limit(period = 2, count = 1) public ResponseEntity bindingVehicle(@Validated @RequestBody VehicleBindingDto vehicleBindingDto) { return new ResponseEntity<>(pdaService.bindingVehicle(vehicleBindingDto), HttpStatus.OK); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/controller/SchBaseTaskController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/controller/SchBaseTaskController.java index adfc6b4..538d049 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/controller/SchBaseTaskController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/controller/SchBaseTaskController.java @@ -7,6 +7,7 @@ import org.nl.common.domain.query.PageQuery; import org.nl.common.logging.annotation.Log; import org.nl.wms.sch.task.service.ISchBaseTaskService; import org.nl.wms.sch.task.service.dao.SchBaseTask; +import org.nl.wms.sch.task.service.dto.SchBaseTaskQuery; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -33,13 +34,12 @@ public class SchBaseTaskController { @Log("查询任务管理") //@SaCheckPermission("@el.check('schBaseTask:list')") - public ResponseEntity query(@RequestParam Map whereJson, PageQuery page) { + public ResponseEntity query(SchBaseTaskQuery whereJson, PageQuery page) { return new ResponseEntity<>(TableDataInfo.build(schBaseTaskService.queryAll(whereJson, page)), HttpStatus.OK); } @PostMapping @Log("新增任务管理") - //@SaCheckPermission("@el.check('schBaseTask:add')") public ResponseEntity create(@Validated @RequestBody SchBaseTask entity) { schBaseTaskService.create(entity); @@ -48,7 +48,6 @@ public class SchBaseTaskController { @PutMapping @Log("修改任务管理") - //@SaCheckPermission("@el.check('schBaseTask:edit')") public ResponseEntity update(@Validated @RequestBody SchBaseTask entity) { schBaseTaskService.update(entity); @@ -66,7 +65,6 @@ public class SchBaseTaskController { @GetMapping("/taskStatusList") @Log("任务状态下拉框") - @SaIgnore //@SaCheckPermission("@el.check('schBaseTask:list')") public ResponseEntity getTaskStatusList() { @@ -75,7 +73,6 @@ public class SchBaseTaskController { @PutMapping("/operation") @Log("任务操作") - //@SaCheckPermission("task:edit") public ResponseEntity update(@RequestBody Map map) { schBaseTaskService.operation(map); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/controller/SchBaseTaskconfigController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/controller/SchBaseTaskconfigController.java index ea9b17b..f880d6a 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/controller/SchBaseTaskconfigController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/controller/SchBaseTaskconfigController.java @@ -63,4 +63,10 @@ public class SchBaseTaskconfigController { schBaseTaskconfigService.deleteAll(ids); return new ResponseEntity<>(HttpStatus.OK); } + + @PostMapping("/getTaskConfigList") + @Log("获取下拉框") + public ResponseEntity getTaskConfigList() { + return new ResponseEntity<>(schBaseTaskconfigService.getTaskConfigList(), HttpStatus.OK); + } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/ISchBaseTaskService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/ISchBaseTaskService.java index b546fd8..ff4bbeb 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/ISchBaseTaskService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/ISchBaseTaskService.java @@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.extension.service.IService; import org.nl.common.domain.query.PageQuery; import org.nl.wms.ext.acs.service.dto.to.BaseRequest; import org.nl.wms.sch.task.service.dao.SchBaseTask; +import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig; +import org.nl.wms.sch.task.service.dto.SchBaseTaskQuery; import org.nl.wms.sch.task_manage.task.core.TaskStatus; import java.math.BigDecimal; @@ -28,7 +30,7 @@ public interface ISchBaseTaskService extends IService { * @param pageable 分页参数 * @return IPage */ - IPage queryAll(Map whereJson, PageQuery pageable); + IPage queryAll(SchBaseTaskQuery whereJson, PageQuery pageable); /** diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/ISchBaseTaskconfigService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/ISchBaseTaskconfigService.java index e75a1f5..343c78c 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/ISchBaseTaskconfigService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/ISchBaseTaskconfigService.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import org.nl.common.domain.query.PageQuery; import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig; +import java.util.List; import java.util.Map; import java.util.Set; @@ -44,4 +45,6 @@ public interface ISchBaseTaskconfigService extends IService { * @param ids / */ void deleteAll(Set ids); + + List getTaskConfigList(); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dao/SchBaseTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dao/SchBaseTask.java index a41d5f0..74076e7 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dao/SchBaseTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dao/SchBaseTask.java @@ -1,6 +1,7 @@ package org.nl.wms.sch.task.service.dao; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; @@ -117,5 +118,9 @@ public class SchBaseTask implements Serializable { private String update_time; + @TableField(exist = false) + private String config_name; + @TableField(exist = false) + private String task_name; } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dao/mapper/SchBaseTaskMapper.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dao/mapper/SchBaseTaskMapper.java index 25e7a0f..f9d6803 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dao/mapper/SchBaseTaskMapper.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dao/mapper/SchBaseTaskMapper.java @@ -1,9 +1,12 @@ package org.nl.wms.sch.task.service.dao.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import org.nl.wms.sch.task.service.dao.SchBaseTask; +import org.nl.wms.sch.task.service.dto.SchBaseTaskQuery; import java.math.BigDecimal; +import java.util.List; /** * @author lyd @@ -16,4 +19,6 @@ public interface SchBaseTaskMapper extends BaseMapper { BigDecimal getCallMaterialCarryingByDevice(String deviceCode); int getCarryingByDevice(String deviceCode, String taskConfig); + + IPage selectPageLeftJoin(IPage pages, SchBaseTaskQuery whereJson, List collect); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dao/mapper/SchBaseTaskMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dao/mapper/SchBaseTaskMapper.xml index 07b666d..114b90f 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dao/mapper/SchBaseTaskMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dao/mapper/SchBaseTaskMapper.xml @@ -33,4 +33,40 @@ AND t.task_status IN ('1', '2', '3', '4') AND p1.parent_point_code = p2.parent_point_code + diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dto/SchBaseTaskQuery.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dto/SchBaseTaskQuery.java index 4b3130b..f3e8193 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dto/SchBaseTaskQuery.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dto/SchBaseTaskQuery.java @@ -1,12 +1,25 @@ package org.nl.wms.sch.task.service.dto; +import lombok.Data; import org.nl.common.domain.query.BaseQuery; import org.nl.wms.sch.task.service.dao.SchBaseTask; +import java.io.Serializable; + /** * @author lyd * @date 2023-05-15 **/ -public class SchBaseTaskQuery extends BaseQuery { +@Data +public class SchBaseTaskQuery implements Serializable { + private String task_code; + private String vehicle_code; + private String point_code; + private String begin_time; + private String end_time; + private String more_task_status; + private String unFinished; + + private String config_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 1cead08..5aaf676 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 @@ -17,8 +17,10 @@ import org.nl.common.exception.BadRequestException; import org.nl.common.utils.SecurityUtils; import org.nl.wms.sch.task.service.ISchBaseTaskService; import org.nl.wms.sch.task.service.dao.SchBaseTask; +import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig; import org.nl.wms.sch.task.service.dao.mapper.SchBaseTaskMapper; import org.nl.wms.sch.task.service.dao.mapper.SchBaseTaskconfigMapper; +import org.nl.wms.sch.task.service.dto.SchBaseTaskQuery; import org.nl.wms.sch.task_manage.AbstractTask; import org.nl.wms.sch.task_manage.task.TaskFactory; import org.nl.wms.sch.task_manage.task.core.TaskStatus; @@ -50,39 +52,17 @@ public class SchBaseTaskServiceImpl extends ServiceImpl queryAll(Map whereJson, PageQuery page) { - String task_code = ObjectUtil.isNotEmpty(whereJson.get("task_code")) - ? whereJson.get("task_code").toString() : null; - String vehicle_code = ObjectUtil.isNotEmpty(whereJson.get("vehicle_code")) - ? whereJson.get("vehicle_code").toString() : null; - String point_code = ObjectUtil.isNotEmpty(whereJson.get("point_code")) - ? whereJson.get("point_code").toString() : null; - String begin_time = ObjectUtil.isNotEmpty(whereJson.get("begin_time")) - ? whereJson.get("begin_time").toString() : null; - String end_time = ObjectUtil.isNotEmpty(whereJson.get("end_time")) - ? whereJson.get("end_time").toString() : null; - String more_task_status = ObjectUtil.isNotEmpty(whereJson.get("more_task_status")) - ? whereJson.get("more_task_status").toString() : null; - List collect = ObjectUtil.isNotEmpty(more_task_status) - ? Arrays.stream(more_task_status.split(",")).collect(Collectors.toList()) : null; - String unFinished = null; + public IPage queryAll(SchBaseTaskQuery whereJson, PageQuery page) { + List collect = ObjectUtil.isNotEmpty(whereJson.getMore_task_status()) + ? Arrays.stream(whereJson.getMore_task_status().split(",")).collect(Collectors.toList()) : null; if (collect != null) { if (collect.contains(TaskStatus.UNFINISHED.getCode())) { collect = null; - unFinished = TaskStatus.EXECUTING.getCode(); + whereJson.setUnFinished(TaskStatus.EXECUTING.getCode()); } } - LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); - lam.eq(ObjectUtil.isNotEmpty(task_code), SchBaseTask::getTask_code, task_code) - .eq(ObjectUtil.isNotEmpty(vehicle_code), SchBaseTask::getVehicle_code, vehicle_code) - .eq(ObjectUtil.isNotEmpty(point_code), SchBaseTask::getPoint_code1, point_code) - .ge(ObjectUtil.isNotEmpty(begin_time), SchBaseTask::getCreate_time, begin_time) - .le(ObjectUtil.isNotEmpty(end_time), SchBaseTask::getCreate_time, end_time) - .in(ObjectUtil.isNotEmpty(collect), SchBaseTask::getTask_status, collect) - .le(ObjectUtil.isNotEmpty(unFinished), SchBaseTask::getTask_status, unFinished) - .orderByDesc(SchBaseTask::getUpdate_time); IPage pages = new Page<>(page.getPage() + 1, page.getSize()); - schBaseTaskMapper.selectPage(pages, lam); + pages = schBaseTaskMapper.selectPageLeftJoin(pages, whereJson, collect); return pages; } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskconfigServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskconfigServiceImpl.java index 32810e5..d572b27 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskconfigServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskconfigServiceImpl.java @@ -18,8 +18,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Arrays; +import java.util.List; import java.util.Map; import java.util.Set; +import java.util.function.Consumer; /** * @author lyd @@ -39,6 +41,7 @@ public class SchBaseTaskconfigServiceImpl extends ServiceImpl lam = new LambdaQueryWrapper<>(); lam.like(ObjectUtil.isNotEmpty(blurry), SchBaseTaskconfig::getConfig_name, blurry) + .or(ObjectUtil.isNotEmpty(blurry), la -> la.like( SchBaseTaskconfig::getConfig_code, blurry)) .eq(ObjectUtil.isNotEmpty(workshop_code), SchBaseTaskconfig::getWorkshop_code, workshop_code); IPage pages = new Page<>(page.getPage() + 1, page.getSize()); schBaseTaskconfigMapper.selectPage(pages, lam); @@ -127,4 +130,9 @@ public class SchBaseTaskconfigServiceImpl extends ServiceImpl getTaskConfigList() { + return this.list(); + } + } diff --git a/lms/nladmin-ui/src/views/lucene/index.vue b/lms/nladmin-ui/src/views/lucene/index.vue index cbd1665..ca565f7 100644 --- a/lms/nladmin-ui/src/views/lucene/index.vue +++ b/lms/nladmin-ui/src/views/lucene/index.vue @@ -144,6 +144,10 @@ export default { toDeleteLog() { luceneOperation.deleteAllLog().then(res => { this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS) + this.crud.toQuery() + }).finally(() => { + this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS) + this.crud.toQuery() }) }, getTagList() { diff --git a/lms/nladmin-ui/src/views/system/param/index.vue b/lms/nladmin-ui/src/views/system/param/index.vue index c72c054..1723a28 100644 --- a/lms/nladmin-ui/src/views/system/param/index.vue +++ b/lms/nladmin-ui/src/views/system/param/index.vue @@ -10,12 +10,12 @@ label-width="80px" label-suffix=":" > - + diff --git a/lms/nladmin-ui/src/views/wms/sch/task/config/schBaseTaskconfig.js b/lms/nladmin-ui/src/views/wms/sch/task/config/schBaseTaskconfig.js index eb94df5..aa2c551 100644 --- a/lms/nladmin-ui/src/views/wms/sch/task/config/schBaseTaskconfig.js +++ b/lms/nladmin-ui/src/views/wms/sch/task/config/schBaseTaskconfig.js @@ -7,6 +7,12 @@ export function add(data) { data }) } +export function getTaskConfigList() { + return request({ + url: 'api/schBaseTaskconfig/getTaskConfigList', + method: 'post' + }) +} export function del(ids) { return request({ @@ -24,4 +30,4 @@ export function edit(data) { }) } -export default { add, edit, del } +export default { add, edit, del, getTaskConfigList } diff --git a/lms/nladmin-ui/src/views/wms/sch/task/index.vue b/lms/nladmin-ui/src/views/wms/sch/task/index.vue index 7967879..1b1f9fd 100644 --- a/lms/nladmin-ui/src/views/wms/sch/task/index.vue +++ b/lms/nladmin-ui/src/views/wms/sch/task/index.vue @@ -15,7 +15,7 @@ @@ -25,16 +25,29 @@ + + + + + {{ item.config_code }} + {{ item.task_name }} + + + @@ -179,6 +192,7 @@ + @@ -244,6 +258,7 @@