Browse Source

opt: 修复点位提前释放的问题,添加日志

master
yanps 2 weeks ago
parent
commit
3937ed3a3b
  1. 10
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  2. 9
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/connector/service/impl/WmsToConnectorServiceImpl.java
  3. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/controller/FabController.java
  4. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/dto/OrderMater.java
  5. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/dto/SendMaterVo.java
  6. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/dto/SendVehicleVo.java
  7. 9
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/impl/FabServiceImpl.java
  8. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/handheld/service/impl/HandheldServiceImpl.java
  9. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dao/SchBaseVehiclematerialgroup.java
  10. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dao/mapper/SchBaseVehiclematerialgroupMapper.xml
  11. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/impl/SchBaseVehiclematerialgroupServiceImpl.java
  12. 3
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.xml
  13. 24
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java
  14. 3
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/connector/CNTTask.java
  15. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/connector/FTGTask.java
  16. 3
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/AtTask.java
  17. 11
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/BlankingTask.java
  18. 6
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/CallEmptyTask.java
  19. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/EmptyCageTask.java
  20. 3
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/MtTask.java
  21. 10
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/RackTask.java
  22. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/ToStoreHouseTask.java
  23. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/pcoperation/PcOperationSMTTask.java
  24. 5
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/pcoperation/ProcessingSMTTask.java
  25. 101
      lms/nladmin-ui/src/views/wms/sch/group/index.vue

10
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

@ -390,9 +390,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
//TODO:空料容放货完成反馈给Connector
if ("1".equals(is_connector)) {
if (!is_empty) {
finishTask(schBaseTask.getTask_code(), schBaseTask.getPoint_code2());
} else {
finishTask(schBaseTask.getTask_code(), schBaseTask.getPoint_code1());
JSONObject json = new JSONObject();
json.put("vehicle_code", schBaseTask.getVehicle_code());
json.put("status", status);
@ -400,9 +398,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
json.put("task_code", schBaseTask.getTask_code());
AcsResponse acsResponse = connectorService.feedAgvTaskStatus(json);
}
/*List<String> list = iSchBaseVehiclematerialgroupService.selectOrdersByVehicleCode(schBaseTask.getVehicle_code());
//同步fab工序流程
FabServiceImpl.syncFab(list);*/
} else if ("2".equals(is_connector)) {
JSONObject json = new JSONObject();
json.put("vehicle_code", schBaseTask.getVehicle_code());
@ -451,7 +446,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
param.put("vehicle_type", mdBaseVehicle.getVehicle_type());
connectorTask.apply(param);
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
.eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code1()).set(SchBasePoint::getIs_lock, true));
.eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code1())
.set(SchBasePoint::getIs_lock, true));
}
JSONObject json = new JSONObject();
json.put("vehicle_code", vehicle_code);
@ -494,6 +490,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
json.put("task_code", schBaseTask.getTask_code());
boolean flag = true;
String jobName = null;
iSchBaseVehiclematerialgroupService.remove(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
.eq(SchBaseVehiclematerialgroup::getVehicle_code, schBaseTask.getVehicle_code()));
AcsResponse acsResponse = connectorService.feedAgvTaskStatus(json);
if (acsResponse.getStatus() == 200 && StrUtil.isNotEmpty(acsResponse.getData())) {
JSONArray objects = JSONObject.parseArray(acsResponse.getData());

9
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/connector/service/impl/WmsToConnectorServiceImpl.java

@ -55,16 +55,17 @@ public class WmsToConnectorServiceImpl implements WmsToConnectorService {
} else if (ObjectUtil.isNotEmpty(isInvokeConnector) && GeneralDefinition.NO.equals(isInvokeConnector.getValue())) {
JSONObject jsonObject = new JSONObject();
JSONArray objects = new JSONArray();
jsonObject.put("status",200);
jsonObject.put("status", 200);
JSONArray materials = json.getJSONArray("materials");
materials.forEach(material -> {
String replace = StrUtil.replace(StrUtil.toString(material), "=", ":");
JSONObject jsonObject1 = JSONObject.parseObject(replace);
jsonObject1.put("due_date","2000-10-01 00:00:00 ");
jsonObject1.put("next_region_code","");
jsonObject1.put("due_date", "2000-10-01 00:00:00 ");
jsonObject1.put("next_region_code", "");
jsonObject1.put("priority", "5");
objects.add(jsonObject1);
});
jsonObject.put("data",objects);
jsonObject.put("data", objects);
return jsonObject;
}
return null;

1
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/controller/FabController.java

@ -246,6 +246,7 @@ public class FabController {
if (material1.getOrder_code().equals(jsonObject1.getString("order_code"))) {
material1.setDue_date(jsonObject1.getString("due_date"));
material1.setRegion_code(jsonObject1.getString("next_region_code"));
material1.setPriority(jsonObject1.getString("priority"));
}
});
});

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/dto/OrderMater.java

@ -42,4 +42,6 @@ public class OrderMater {
public String custom;
public String create_time;
public String priority;
}

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/dto/SendMaterVo.java

@ -53,4 +53,6 @@ public class SendMaterVo {
public String point_code;
private String priority;
}

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/dto/SendVehicleVo.java

@ -31,6 +31,10 @@ public class SendVehicleVo {
* 载具号
*/
private String vehicle_code;
/**
* 优先级
*/
private String priority;
/**
* 物料信息
*/

9
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/impl/FabServiceImpl.java

@ -19,7 +19,6 @@ import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
import org.nl.wms.sch.group.service.dao.SchBaseVehiclematerialgroup;
import org.nl.wms.sch.point.service.ISchBasePointService;
import org.nl.wms.sch.point.service.dao.SchBasePoint;
import org.nl.wms.sch.task_manage.task.tasks.handheld.CallEmptyTask;
import org.nl.wms.sch.task_manage.task.tasks.pcoperation.PcOperationCMTask;
import org.nl.wms.sch.task_manage.task.tasks.pcoperation.PcOperationSMTTask;
import org.nl.wms.sch.task_manage.task.tasks.pcoperation.PcOperationSNTTask;
@ -52,8 +51,6 @@ public class FabServiceImpl {
@Autowired
private PcOperationSNTTask pcOperationSNTTask;
@Autowired
private CallEmptyTask callEmptyTask;
@Autowired
private ISchBaseVehiclematerialgroupService iSchBaseVehiclematerialgroupService;
@ -113,7 +110,7 @@ public class FabServiceImpl {
param.put("region_code", callEmpVo.getRegion_code());
param.put("vehicle_type", callEmpVo.getVehicle_type());
param.put("ext_data", callEmpVo);
callEmptyTask.apply(param);
pcOperationSNTTask.apply(param);
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
.eq(SchBasePoint::getPoint_code, callEmpVo.getDevice_code())
.set(SchBasePoint::getIs_lock, true));
@ -137,9 +134,7 @@ public class FabServiceImpl {
param.put("vehicle_type", vehicle.getVehicle_type());
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
.eq(SchBasePoint::getPoint_code, sendMaterVo.getDevice_code())
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
.set(SchBasePoint::getIs_lock, true)
.set(SchBasePoint::getVehicle_code, null));
.set(SchBasePoint::getIs_lock, true));
pcOperationSMTTask.apply(param);
break;
case "snt":

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/handheld/service/impl/HandheldServiceImpl.java

@ -354,6 +354,7 @@ public class HandheldServiceImpl implements HandheldService {
if (jsonObject.get("order_code").equals(json2.getString("order_code"))) {
jsonObject.putOpt("due_date", json2.getString("due_date"));
jsonObject.putOpt("region_code", json2.getString("next_region_code"));
jsonObject.putOpt("priority", json2.getString("priority"));
return jsonObject; // 更新的对象
} else {
return jsonObject; // 其他对象保持不变
@ -392,6 +393,7 @@ public class HandheldServiceImpl implements HandheldService {
schBaseVehiclematerialgroup.setOrder_code(jsonObject.getStr("order_code"));
schBaseVehiclematerialgroup.setDue_date(jsonObject.getStr("due_date"));
schBaseVehiclematerialgroup.setCreate_name(SecurityUtils.getCurrentNickName());
schBaseVehiclematerialgroup.setPriority(jsonObject.getStr("priority"));
schBaseVehiclematerialgroup.setRegion_code(StrUtil.isBlank(finalRegion_code) ? jsonObject.getStr("region_code") : finalRegion_code);
iSchBaseVehiclematerialgroupService.create(schBaseVehiclematerialgroup);
});

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dao/SchBaseVehiclematerialgroup.java

@ -111,8 +111,8 @@ public class SchBaseVehiclematerialgroup implements Serializable {
@ApiModelProperty(value = "业务链路标识")
private String buss_move_id;
@ApiModelProperty(value = "是否首个流程任务")
private Boolean is_first_flow_task;
@ApiModelProperty(value = "优先级")
private String priority;
@ApiModelProperty(value = "流程编码")
private String flow_code;

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dao/mapper/SchBaseVehiclematerialgroupMapper.xml

@ -86,7 +86,7 @@
AND vg.workshop_code = #{query.workshop_code}
</if>
<if test="query.job_name != null">
AND vg.job_name = #{query.job_name}
AND vg.job_name like CONCAT('%', #{query.job_name}, '%')
</if>
<if test="query.region_code != null">
AND vg.region_code = #{query.region_code}

1
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/impl/SchBaseVehiclematerialgroupServiceImpl.java

@ -170,6 +170,7 @@ public class SchBaseVehiclematerialgroupServiceImpl extends ServiceImpl<SchBaseV
if (CollUtil.isNotEmpty(order_code)) {
orderList.put("region_code", order_code.get(0).getRegion_code());
orderList.put("due_date", order_code.get(0).getDue_date());
orderList.put("priority",order_code.get(0).getPriority());
}
});
maps = maps.stream().sorted(Comparator.comparingLong(order -> {

3
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.xml

@ -29,7 +29,8 @@
sch_base_vehiclematerialgroup.order_code,
sch_base_vehiclematerialgroup.due_date,
sch_base_vehiclematerialgroup.has_work,
sch_base_vehiclematerialgroup.create_time
sch_base_vehiclematerialgroup.create_time,
sch_base_vehiclematerialgroup.priority
FROM
sch_base_point
inner JOIN sch_base_vehiclematerialgroup ON sch_base_point.vehicle_code =

24
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java

@ -401,6 +401,18 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
.isNull(seq == 1, SchBasePoint::getVehicle_code)
.eq(StrUtil.isNotBlank(region_code), SchBasePoint::getRegion_code, region_code)
.orderByAsc(seq == 2, SchBasePoint::getIn_order_seq));
if (CollUtil.isEmpty(schBasePoints)) {
schBasePoints = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class)
.eq(SchBasePoint::getIs_lock, false)
.eq(SchBasePoint::getIs_used, true)
.eq(SchBasePoint::getPoint_status, pointStatus)
.eq(!vehicle_type.equals("G01"), SchBasePoint::getPoint_type, "1")
.eq(vehicle_type.equals("G01"), SchBasePoint::getPoint_type, point_type)
.eq(StrUtil.isNotBlank(vehicle_type), SchBasePoint::getCan_vehicle_type, vehicle_type)
.isNull(seq == 2, SchBasePoint::getVehicles)
.isNull(seq == 1, SchBasePoint::getVehicle_code)
.orderByAsc(seq == 2, SchBasePoint::getIn_order_seq));
}
return (CollUtil.isNotEmpty(schBasePoints) && schBasePoints.size() > 0) ? schBasePoints.get(0) : null;
}
@ -586,7 +598,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
}
@Override
public List<OrderMater> getStructList(String region_code, String vehicle_type) {
public List<OrderMater> getStructList(String pointCode, String vehicle_type) {
//1.查询的结果一个托盘有多个800,PC需要怎么展示?
Param dueDate = iSysParamService.findByCode("due_date");
String s = null;
@ -594,7 +606,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
s = DateUtil.offsetDay(new Date(), Integer.parseInt(dueDate.getValue())).toDateStr();
}
SchBasePoint schBasePoint = this.getOne(Wrappers.lambdaQuery(SchBasePoint.class)
.eq(SchBasePoint::getPoint_code, region_code));
.eq(SchBasePoint::getPoint_code, pointCode));
List<OrderMater> structList = pointMapper.getStructList(schBasePoint.getRegion_code(), "G01", s);
List<OrderMater> collect = structList.stream().collect(Collectors.groupingBy(
OrderMater::getVehicle_code,
@ -621,14 +633,16 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
public SchBasePoint selectEmpVehicleByRegionCode(String region_code, String vehicleType) {
synchronized (lock3) {
//查询满足条件的站点
List<SchBasePoint> schBasePoints = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class).eq(SchBasePoint::getIs_lock, false).
isNotNull(SchBasePoint::getVehicle_code)
List<SchBasePoint> schBasePoints = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class)
.eq(SchBasePoint::getIs_lock, false)
.isNotNull(SchBasePoint::getVehicle_code)
.eq(StrUtil.isNotEmpty(region_code), SchBasePoint::getRegion_code, region_code)
.eq(SchBasePoint::getPoint_status, GoodsEnum.EMPTY_PALLETS.getValue())
.eq(SchBasePoint::getCan_vehicle_type, vehicleType)
.eq(SchBasePoint::getIs_used, true));
if (CollectionUtils.isEmpty(schBasePoints)) {
schBasePoints = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class).eq(SchBasePoint::getIs_lock, false)
schBasePoints = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class)
.eq(SchBasePoint::getIs_lock, false)
.isNotNull(SchBasePoint::getVehicle_code)
.eq(SchBasePoint::getPoint_status, GoodsEnum.EMPTY_PALLETS.getValue())
.eq(SchBasePoint::getCan_vehicle_type, vehicleType)

3
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/connector/CNTTask.java

@ -31,6 +31,9 @@ import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
/**
* Connector下料
*/
@Slf4j
@Component(value = "CNTTask")
public class CNTTask extends AbstractTask {

1
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/connector/FTGTask.java

@ -31,7 +31,6 @@ import java.util.List;
import java.util.stream.Collectors;
/**
* @author LENOVO
* connector补空托任务
*/
@Slf4j

3
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/AtTask.java

@ -32,8 +32,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* @author LENOVO
* 空托盘送回
* 空料架送到内部加工过道区
*/
@Slf4j
@Component(value = "ATTask")

11
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/BlankingTask.java

@ -1,6 +1,7 @@
package org.nl.wms.sch.task_manage.task.tasks.handheld;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.nl.common.enums.GoodsEnum;
@ -10,6 +11,7 @@ import org.nl.wms.database.vehicle.service.IMdBaseVehicleService;
import org.nl.wms.database.vehicle.service.dao.MdBaseVehicle;
import org.nl.wms.ext.acs.service.dto.to.BaseResponse;
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
import org.nl.wms.sch.group.service.dao.SchBaseVehiclematerialgroup;
import org.nl.wms.sch.point.service.ISchBasePointService;
import org.nl.wms.sch.point.service.dao.SchBasePoint;
import org.nl.wms.sch.task.service.ISchBaseTaskService;
@ -28,7 +30,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
/**
* @author LENOVO
* 工序下料
*/
@Component("BLANKINGTask")
@ -67,10 +68,10 @@ public class BlankingTask extends AbstractTask {
SchBasePoint schBasePoint = null;
if (ObjectUtil.isEmpty(task.getRegion_code())) {
schBasePoint = schBasePointService.selectByGroundPoint(null,
GoodsEnum.OUT_OF_STOCK.getValue(), mdBaseVehicle.getVehicle_type(), 1,1);
GoodsEnum.OUT_OF_STOCK.getValue(), mdBaseVehicle.getVehicle_type(), 1, 1);
} else {
schBasePoint = schBasePointService.selectByGroundPoint(task.getRegion_code(),
GoodsEnum.OUT_OF_STOCK.getValue(), mdBaseVehicle.getVehicle_type(), 1,1);
GoodsEnum.OUT_OF_STOCK.getValue(), mdBaseVehicle.getVehicle_type(), 1, 1);
}
if (ObjectUtil.isEmpty(schBasePoint)) {
task.setRemark("未找到所需点位!");
@ -170,6 +171,10 @@ public class BlankingTask extends AbstractTask {
PointUtils.setUpdateByAcs(schBasePoint);
schBasePointService.updateById(schBasePoint);
}
if (StrUtil.isNotEmpty(taskObj.getVehicle_code())) {
schBaseVehiclematerialgroupService.remove(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
.eq(SchBaseVehiclematerialgroup::getVehicle_code, taskObj.getVehicle_code()));
}
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
taskObj.setTask_status(TaskStatus.CANCELED.getCode());

6
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/CallEmptyTask.java

@ -1,3 +1,4 @@
/*
package org.nl.wms.sch.task_manage.task.tasks.handheld;
import cn.hutool.core.util.ObjectUtil;
@ -27,10 +28,12 @@ import org.springframework.stereotype.Component;
import java.util.List;
*/
/**
* @author LENOVO
* 手持呼叫空料笼
*/
*//*
@Component("CALLEMPTYTask")
public class CallEmptyTask extends AbstractTask {
@ -170,3 +173,4 @@ public class CallEmptyTask extends AbstractTask {
taskService.updateById(taskObj);
}
}
*/

1
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/EmptyCageTask.java

@ -33,7 +33,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
/**
* @author LENOVO
* 手持创建空料笼入库
*/
@Component("EMPTYCAGETask")

3
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/MtTask.java

@ -28,8 +28,7 @@ import org.springframework.stereotype.Component;
import java.util.List;
/**
* @author LENOVO
* 手持创建空料笼入库
* 物料转运
*/
@Component("MTTask")
public class MtTask extends AbstractTask {

10
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/RackTask.java

@ -15,6 +15,7 @@ import org.nl.wms.database.vehicle.service.IMdBaseVehicleService;
import org.nl.wms.database.vehicle.service.dao.MdBaseVehicle;
import org.nl.wms.ext.acs.service.dto.to.BaseResponse;
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
import org.nl.wms.sch.group.service.dao.SchBaseVehiclematerialgroup;
import org.nl.wms.sch.point.service.ISchBasePointService;
import org.nl.wms.sch.point.service.dao.SchBasePoint;
import org.nl.wms.sch.task.service.ISchBaseTaskService;
@ -33,8 +34,7 @@ import org.springframework.stereotype.Component;
import java.util.List;
/**
* @author LENOVO
* 手持创建空料笼入库
* 手持创建空载具入库
*/
@Component("RACKTask")
public class RackTask extends AbstractTask {
@ -68,7 +68,7 @@ public class RackTask extends AbstractTask {
regionCode = RegionEnum.LAG_ROBOT_BEANDING_CELL.getRegion_code();
}
SchBasePoint schBasePoint = schBasePointService.selectByGroundPoint(regionCode,
GoodsEnum.OUT_OF_STOCK.getValue(), vehicle_type, 1,0);
GoodsEnum.OUT_OF_STOCK.getValue(), vehicle_type, 1, 0);
if (ObjectUtil.isEmpty(schBasePoint)) {
task.setRemark("未找到所需点位!");
taskService.updateById(task);
@ -145,6 +145,10 @@ public class RackTask extends AbstractTask {
.set(SchBasePoint::getPoint_status, GoodsEnum.EMPTY_PALLETS.getValue())
.set(SchBasePoint::getIs_lock, false));
}
if (StrUtil.isNotEmpty(taskObj.getVehicle_code())) {
schBaseVehiclematerialgroupService.remove(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
.eq(SchBaseVehiclematerialgroup::getVehicle_code, taskObj.getVehicle_code()));
}
// 任务完成
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
taskObj.setRemark(GeneralDefinition.TASK_FINISH);

1
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/ToStoreHouseTask.java

@ -30,7 +30,6 @@ import org.springframework.stereotype.Component;
import java.util.List;
/**
* @author LENOVO
* 补空框任务
*/
@Component("TOSTOREHOUSETask")

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/pcoperation/PcOperationSMTTask.java

@ -95,6 +95,7 @@ public class PcOperationSMTTask extends AbstractTask {
sendMaterVo1.setOrder_code(jsonObject.getString("order_code"));
sendMaterVo1.setDue_date(jsonObject.getString("due_date"));
sendMaterVo1.setRegion_code(jsonObject.getString("region_code"));
sendMaterVo1.setPriority(jsonObject.getString("priority"));
sendMaterVos.add(sendMaterVo1);
});
}
@ -112,6 +113,7 @@ public class PcOperationSMTTask extends AbstractTask {
schBaseVehiclematerialgroup.setOrder_code(smv.getOrder_code());
schBaseVehiclematerialgroup.setDue_date(smv.getDue_date());
schBaseVehiclematerialgroup.setHas_work(sendMaterVo.getHas_work());
schBaseVehiclematerialgroup.setPriority(smv.getPriority());
schBaseVehiclematerialgroupService.create(schBaseVehiclematerialgroup);
});
}

5
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/pcoperation/ProcessingSMTTask.java

@ -1,6 +1,7 @@
package org.nl.wms.sch.task_manage.task.tasks.pcoperation;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@ -184,6 +185,10 @@ public class ProcessingSMTTask extends AbstractTask {
PointUtils.setUpdateByAcs(schBasePoint);
schBasePointService.updateById(schBasePoint);
}
if (StrUtil.isNotEmpty(taskObj.getVehicle_code())) {
schBaseVehiclematerialgroupService.remove(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
.eq(SchBaseVehiclematerialgroup::getVehicle_code, taskObj.getVehicle_code()));
}
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
taskObj.setTask_status(TaskStatus.CANCELED.getCode());

101
lms/nladmin-ui/src/views/wms/sch/group/index.vue

@ -107,12 +107,12 @@
<!--<el-form-item label="子载具编码">
<el-input v-model="form.child_vehicle_code" style="width: 240px;" />
</el-form-item>-->
<el-form-item v-if="false" label="来源载具">
<!-- <el-form-item v-if="false" label="来源载具">
<el-input v-model="form.source_vehicle_code" style="width: 240px;" />
</el-form-item>
</el-form-item> -->
<el-form-item label="入库时间">
<el-date-picker
v-model="form.instorage_time"
v-model="form.create_time"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 240px;"
@ -121,7 +121,8 @@
</el-form-item>
<el-form-item label="点位编码">
<el-select
v-model="form.point_code"
v-model="form.theLocation"
clearable
filterable
placeholder="请选择"
style="width: 240px;"
@ -139,16 +140,16 @@
</el-select>
<!-- <el-input v-model="form.point_code" style="width: 240px;" />-->
</el-form-item>
<el-form-item label="点位名称">
<!-- <el-form-item label="点位名称">
<el-input v-model="form.point_name" style="width: 240px;" disabled />
</el-form-item>
<el-form-item label="是否满托">
</el-form-item> -->
<!-- <el-form-item label="是否满托">
<el-radio-group v-model="form.is_full" style="width: 240px">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="批次">
</el-form-item> -->
<!-- <el-form-item label="批次">
<el-input v-model="form.pcsn" style="width: 240px;" />
</el-form-item>
<el-form-item label="静置时间(分钟)">
@ -158,7 +159,7 @@
:max="999"
style="width: 240px;"
/>
</el-form-item>
</el-form-item> -->
<el-form-item label="物料数量">
<el-input-number
v-model.number="form.material_qty"
@ -166,26 +167,26 @@
style="width: 240px;"
/>
</el-form-item>
<el-form-item label="物料重量">
<!-- <el-form-item label="物料重量">
<el-input-number
v-model.number="form.material_weight"
:min="0"
style="width: 240px;"
/>
</el-form-item> -->
<el-form-item label="订单编码">
<el-input v-model="form.order_code" style="width: 240px;" />
</el-form-item>
<el-form-item label="工单编码">
<el-input v-model="form.workorder_code" style="width: 240px;" />
</el-form-item>
<el-form-item label="物料来源">
<!-- <el-form-item label="物料来源">
<el-radio-group v-model="choose" size="mini" style="width: 240px;">
<el-radio-button label="物料" />
<el-radio-button label="工单" />
</el-radio-group>
</el-form-item> -->
<el-form-item label="物料编码">
<el-input v-model="form.material_id" clearable style="width: 240px;" />
</el-form-item>
<el-form-item v-if="false" label="物料名称">
<el-input v-model="form.material_id" suffix-icon="el-icon-date" clearable style="width: 370px;" @focus="getMaterial" />
</el-form-item>
<el-form-item label="物料名称">
<!-- <el-form-item label="物料名称">
<el-input v-model="form.material_name" clearable style="width: 240px;" @clear="clearMaterial" @focus="getMaterial" />
</el-form-item>
<el-form-item label="物料编码">
@ -196,14 +197,14 @@
</el-form-item>
<el-form-item label="组盘次数">
<el-input v-model="form.group_number" style="width: 240px;" />
</el-form-item>
<el-form-item label="任务编码">
</el-form-item> -->
<!-- <el-form-item label="任务编码">
<el-input v-model="form.task_code" style="width: 240px;" />
</el-form-item>
</el-form-item> -->
<!--<el-form-item label="车间编码">
<el-input v-model="form.workshop_code" style="width: 240px;" />
</el-form-item>-->
<el-form-item label="组盘状态">
<!-- <el-form-item label="组盘状态">
<el-select
v-model="form.group_status"
size="mini"
@ -219,22 +220,43 @@
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form-item> -->
<!--<el-form-item label="是否首个流程任务">
<el-input v-model="form.is_first_flow_task" style="width: 240px;" />
</el-form-item>-->
<el-form-item label="流程编码">
<el-input v-model="form.flow_code" style="width: 240px;" />
<el-form-item label="工艺编码">
<!-- <el-input v-model="form.region_code" style="width: 240px;" /> -->
<el-select
v-model="form.region_code"
clearable
filterable
placeholder="请选择"
style="width: 240px;"
@change="setPointName"
>
<el-option
v-for="item in regionList"
:key="item.region_code"
:label="item.region_name"
:value="item.region_code"
/>
</el-select>
</el-form-item>
<el-form-item label="流程顺序">
<el-input v-model="form.flow_num" style="width: 240px;" />
<el-form-item label="交期时间">
<el-date-picker
v-model="form.due_date"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 240px;"
placeholder="选择日期时间"
/>
</el-form-item>
<el-form-item label="上一任务">
<!-- <el-form-item label="上一任务">
<el-input v-model="form.before_task_code" style="width: 240px;" />
</el-form-item>
<el-form-item label="下一任务">
<el-input v-model="form.next_task_code" style="width: 240px;" />
</el-form-item>
</el-form-item> -->
<el-form-item label="备注" prop="remark">
<label slot="label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
<el-input v-model.trim="form.remark" style="width: 480px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
@ -245,6 +267,9 @@
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible" title="物料图片">
<img :src="imageUrl" alt="物料图片" style="max-width: 100%;">
</el-dialog>
<el-dialog
title="创建任务"
:visible.sync="dialogVisible"
@ -261,6 +286,8 @@
class="filter-item"
style="width: 240px;"
clearable
filterable
:filter-method="filterPoint"
>
<el-option
v-for="item in pointList"
@ -295,10 +322,10 @@
<el-table-column type="selection" width="55" />
<el-table-column v-if="false" prop="group_id" label="组盘编码" :min-width="flexWidth('group_id',crud.data,'组盘编码')" />
<el-table-column prop="vehicle_code" label="载具编码" width="100" />
<el-table-column prop="region_name" label="下道工序" :min-width="flexWidth('region_name',crud.data,'下道工序')" />
<el-table-column prop="region_code" label="下道工序" :min-width="flexWidth('region_name',crud.data,'下道工序')" />
<el-table-column prop="order_code" label="工单编码" :min-width="flexWidth('order_code',crud.data,'工单编码')" />
<el-table-column v-if="false" prop="material_name" label="物料名称" show-overflow-tooltip :min-width="flexWidth('material_name',crud.data,'物料数量')" />
<el-table-column prop="material_id" label="物料编码" show-overflow-tooltip :min-width="flexWidth('material_id',crud.data,'物料编码')" />
<el-table-column prop="material_id" label="物料编码" show-overflow-tooltip :min-width="flexWidth('material_id',crud.data,'物料编码')" @click="showImage" />
<el-table-column prop="material_qty" label="物料数量" show-overflow-tooltip :min-width="flexWidth('material_qty',crud.data,'物料数量')" />
<el-table-column prop="job_name" label="jobName" show-overflow-tooltip :min-width="flexWidth('job_name',crud.data,'jobName')" />
<el-table-column prop="due_date" label="交期时间" show-overflow-tooltip :min-width="flexWidth('due_date',crud.data,'交期时间')" />
@ -379,7 +406,13 @@ const defaultForm = {
before_task_code: null,
next_task_code: null,
remark: null,
is_delete: false
is_delete: false,
create_time: null,
theLocation: null,
due_date: null,
order_code: null,
region_code: null
}
export default {
name: 'VehicleMaterialGroup',
@ -393,7 +426,7 @@ export default {
idField: 'group_id',
sort: 'vehicle_code,desc',
optShow: {
add: true,
add: false,
edit: true,
del: true,
download: false,

Loading…
Cancel
Save