fix: 修复手持测试过程中遇到的问题
This commit is contained in:
@@ -11,7 +11,7 @@ import lombok.Getter;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum VehicleTypeEnum {
|
public enum VehicleTypeEnum {
|
||||||
|
|
||||||
TRAY("T001","钢托盘"),
|
TRAY("G01","钢托盘"),
|
||||||
FRAME_R01("R01","料框 1230mm*840mm*990mm"),
|
FRAME_R01("R01","料框 1230mm*840mm*990mm"),
|
||||||
FRAME_R02("R02","料框 1230mm*840mm*450mm"),
|
FRAME_R02("R02","料框 1230mm*840mm*450mm"),
|
||||||
RACKS_S04("S04","料架 1230mm*840mm*1670mm"),
|
RACKS_S04("S04","料架 1230mm*840mm*1670mm"),
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ public class MobileAuthorizationController {
|
|||||||
@Log("PC登出")
|
@Log("PC登出")
|
||||||
public ResponseEntity<Object> loginOut(@Validated @RequestBody AuthUserDto authUser) {
|
public ResponseEntity<Object> loginOut(@Validated @RequestBody AuthUserDto authUser) {
|
||||||
// 密码解密 - 前端的加密规则: encrypt(根据实际更改)
|
// 密码解密 - 前端的加密规则: encrypt(根据实际更改)
|
||||||
redisUtils.del("mobile:" + authUser.getDevice());
|
redisUtils.del("mobile:" + authUser.getDevice_code());
|
||||||
return new ResponseEntity(TableDataInfo.build(), HttpStatus.OK);
|
return new ResponseEntity(TableDataInfo.build(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,5 +36,5 @@ public class AuthUserDto {
|
|||||||
|
|
||||||
private String uuid = "";
|
private String uuid = "";
|
||||||
|
|
||||||
private String device ;
|
private String device_code ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.nl.wms.ext.connector.service.impl;
|
package org.nl.wms.ext.connector.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -53,13 +54,16 @@ public class WmsToConnectorServiceImpl implements WmsToConnectorService {
|
|||||||
return jsonObject;
|
return jsonObject;
|
||||||
} else if (ObjectUtil.isNotEmpty(isInvokeConnector) && GeneralDefinition.NO.equals(isInvokeConnector.getValue())) {
|
} else if (ObjectUtil.isNotEmpty(isInvokeConnector) && GeneralDefinition.NO.equals(isInvokeConnector.getValue())) {
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
JSONObject jsonObject1 = new JSONObject();
|
|
||||||
JSONArray objects = new JSONArray();
|
JSONArray objects = new JSONArray();
|
||||||
jsonObject.put("status",200);
|
jsonObject.put("status",200);
|
||||||
jsonObject1.put("due_date","");
|
JSONArray materials = json.getJSONArray("materials");
|
||||||
jsonObject1.put("next_region_code","");
|
materials.forEach(material -> {
|
||||||
jsonObject1.put("order_code","");
|
String replace = StrUtil.replace(StrUtil.toString(material), "=", ":");
|
||||||
objects.add(jsonObject1);
|
JSONObject jsonObject1 = JSONObject.parseObject(replace);
|
||||||
|
jsonObject1.put("due_date"," ");
|
||||||
|
jsonObject1.put("next_region_code","");
|
||||||
|
objects.add(jsonObject1);
|
||||||
|
});
|
||||||
jsonObject.put("data",objects);
|
jsonObject.put("data",objects);
|
||||||
return jsonObject;
|
return jsonObject;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,4 +49,6 @@ public class SendMaterVo {
|
|||||||
|
|
||||||
public String due_date;
|
public String due_date;
|
||||||
|
|
||||||
|
List<SendVehicleVo> mater;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,10 @@ public class SendVehicleVo {
|
|||||||
* 订单号
|
* 订单号
|
||||||
*/
|
*/
|
||||||
private String order_code;
|
private String order_code;
|
||||||
|
/**
|
||||||
|
* 交期时间
|
||||||
|
*/
|
||||||
|
private String due_date;
|
||||||
/**
|
/**
|
||||||
* 物料信息
|
* 物料信息
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -18,6 +18,6 @@ public class SendVehiclesVo {
|
|||||||
/**
|
/**
|
||||||
* 物料信息
|
* 物料信息
|
||||||
*/
|
*/
|
||||||
List<SendVehicleVo> sendVehicleVoList;
|
List<SendVehicleVo> mater;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import org.nl.wms.sch.task_manage.task.tasks.pcoperation.PcOperationSMTTask;
|
|||||||
import org.nl.wms.sch.task_manage.task.tasks.pcoperation.PcOperationSNTTask;
|
import org.nl.wms.sch.task_manage.task.tasks.pcoperation.PcOperationSNTTask;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -77,6 +78,7 @@ public class FabServiceImpl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void createAgvTask(JSONObject form, String type) {
|
public void createAgvTask(JSONObject form, String type) {
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONArray;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import nl.basjes.shaded.org.springframework.util.Assert;
|
import nl.basjes.shaded.org.springframework.util.Assert;
|
||||||
|
import org.nl.common.enums.GoodsEnum;
|
||||||
import org.nl.common.enums.VehicleTypeEnum;
|
import org.nl.common.enums.VehicleTypeEnum;
|
||||||
import org.nl.common.enums.region.RegionEnum;
|
import org.nl.common.enums.region.RegionEnum;
|
||||||
import org.nl.common.exception.BadRequestException;
|
import org.nl.common.exception.BadRequestException;
|
||||||
@@ -31,6 +32,7 @@ import org.nl.wms.sch.task_manage.GeneralDefinition;
|
|||||||
import org.nl.wms.sch.task_manage.task.TaskFactory;
|
import org.nl.wms.sch.task_manage.task.TaskFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@@ -67,7 +69,7 @@ public class HandheldServiceImpl implements HandheldService {
|
|||||||
String vehicle = param.getString("vehicle_list");
|
String vehicle = param.getString("vehicle_list");
|
||||||
String device_code = param.getString("device_code");
|
String device_code = param.getString("device_code");
|
||||||
String[] vehicle_list = null;
|
String[] vehicle_list = null;
|
||||||
if(vehicle.contains(",")){
|
if (vehicle.contains(",")) {
|
||||||
vehicle_list = vehicle.split(",");
|
vehicle_list = vehicle.split(",");
|
||||||
}
|
}
|
||||||
if (vehicle_list.length != 2 && vehicle_list.length != 4) {
|
if (vehicle_list.length != 2 && vehicle_list.length != 4) {
|
||||||
@@ -93,83 +95,99 @@ public class HandheldServiceImpl implements HandheldService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void cageBlankingTask(JSONObject param) {
|
public void cageBlankingTask(JSONObject param) {
|
||||||
Assert.noNullElements(new Object[]{param.getString("device_code"), param.getString("vehicle_code")},
|
Assert.noNullElements(new Object[]{param.getString("device_code"), param.getString("vehicle_code")},
|
||||||
"当前点位或目的地不能为空!");
|
"当前点位或目的地不能为空!");
|
||||||
JSONArray materials = param.getJSONArray("material");
|
String region_code = param.getString("region_code");
|
||||||
String device_code = param.getString("device_code");
|
String device_code = param.getString("device_code");
|
||||||
String vehicle_code = param.getString("vehicle_code");
|
String vehicle_code = param.getString("vehicle_code");
|
||||||
/*String material_qty = param.getString("material_qty");
|
|
||||||
String material_code = param.getString("material_code");*/
|
|
||||||
String region_code = param.getString("region_code");
|
|
||||||
/*String order_code = param.getString("order_code");*/
|
|
||||||
SchBasePoint schBasePoint = iSchBasePointService.selectByPointCode(device_code);
|
|
||||||
if (ObjectUtil.isEmpty(schBasePoint)) throw new BadRequestException("设备点位不存在!");
|
|
||||||
JSONObject json = new JSONObject();
|
|
||||||
JSONArray jsonArray = new JSONArray();
|
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
|
||||||
materials.stream().forEach(material2 -> {
|
|
||||||
String replace = StrUtil.replace(StrUtil.toString(material2), "=", ":");
|
|
||||||
JSONObject jsonObject = JSONObject.parseObject(replace);
|
|
||||||
map.put("order_code", jsonObject.getString("order_code"));
|
|
||||||
map.put("qty", jsonObject.getString("material_qty"));
|
|
||||||
jsonArray.add(map);
|
|
||||||
});
|
|
||||||
json.put("vehicle_code", vehicle_code);
|
|
||||||
json.put("region_code", region_code);
|
|
||||||
json.put("materials", jsonArray);
|
|
||||||
JSONObject json1 = wmsToConnectorService.applyRegionAndDueDate(json);
|
|
||||||
if (ObjectUtil.isNotEmpty(json1) && json1.getInteger("status") == 200) {
|
|
||||||
JSONArray date = json1.getJSONArray("data");
|
|
||||||
date.stream().forEach(date1 -> {
|
|
||||||
JSONObject json2 = JSONObject.parseObject(StrUtil.toString(date1));
|
|
||||||
materials.stream().forEach(material -> {
|
|
||||||
String replace = StrUtil.replace(StrUtil.toString(material), "=", ":");
|
|
||||||
JSONObject jsonObject = JSONObject.parseObject(replace);
|
|
||||||
if (jsonObject.getString("order_code").equals(json2.getString("order_code"))) {
|
|
||||||
jsonObject.put("due_date", json2.getString("due_date"));
|
|
||||||
jsonObject.put("region_code", json2.getString("next_region_code"));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
region_code = JSONObject.parseObject(StrUtil.toString(date.get(0))).getString("region_code");
|
|
||||||
} else if (ObjectUtil.isNotEmpty(json1)) {
|
|
||||||
throw new BadRequestException(json1.getString("msg"));
|
|
||||||
}
|
|
||||||
param.put("material", materials);
|
|
||||||
if (!param.getString("region_code").equals(RegionEnum.NBJG.getRegion_code())) {
|
|
||||||
Assert.noNullElements(param.getJSONArray("material"), "参数不能为空!");
|
|
||||||
}
|
|
||||||
AbstractTask connectorTask = taskFactory.getTask("BLANKINGTask");
|
AbstractTask connectorTask = taskFactory.getTask("BLANKINGTask");
|
||||||
JSONObject jo = new JSONObject();
|
if (StrUtil.isNotEmpty(region_code) && (RegionEnum.NBJG.getRegion_code().equals(region_code)
|
||||||
jo.put("device_code", device_code);
|
|| RegionEnum.WXJG.getRegion_code().equals(region_code))) {
|
||||||
if (RegionEnum.NBJG.getRegion_code().equals(region_code) || RegionEnum.WXJG.getRegion_code().equals(region_code)) {
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("device_code", device_code);
|
||||||
jo.put("config_code", "ProcessingSMTTask");
|
jo.put("config_code", "ProcessingSMTTask");
|
||||||
|
jo.put("create_mode", GeneralDefinition.AUTO_CREATION);
|
||||||
|
jo.put("vehicle_code", vehicle_code);
|
||||||
|
jo.put("region_code", region_code);
|
||||||
|
param.put("target_region_code", region_code);
|
||||||
|
jo.put("ext_data", param);
|
||||||
|
connectorTask.apply(jo);
|
||||||
|
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, device_code)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
||||||
|
.set(SchBasePoint::getIs_lock, true)
|
||||||
|
.set(SchBasePoint::getVehicle_code, null));
|
||||||
} else {
|
} else {
|
||||||
|
Assert.noNullElements(param.getJSONArray("material"), "参数不能为空!");
|
||||||
|
JSONArray materials = param.getJSONArray("material");
|
||||||
|
SchBasePoint schBasePoint = iSchBasePointService.selectByPointCode(device_code);
|
||||||
|
if (ObjectUtil.isEmpty(schBasePoint)) throw new BadRequestException("设备点位不存在!");
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
JSONArray jsonArray = new JSONArray();
|
||||||
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
materials.stream().forEach(material2 -> {
|
||||||
|
boolean material_code = ObjectUtil.isEmpty(((LinkedHashMap) material2).get("material_code"));
|
||||||
|
if (material_code) {
|
||||||
|
((LinkedHashMap) material2).remove("material_code");
|
||||||
|
}
|
||||||
|
String replace = StrUtil.replace(StrUtil.toString(material2), "=", ":");
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(replace);
|
||||||
|
map.put("order_code", jsonObject.getString("order_code"));
|
||||||
|
map.put("qty", jsonObject.getString("material_qty"));
|
||||||
|
jsonArray.add(map);
|
||||||
|
});
|
||||||
|
json.put("vehicle_code", vehicle_code);
|
||||||
|
json.put("region_code", region_code);
|
||||||
|
json.put("materials", jsonArray);
|
||||||
|
JSONObject json1 = wmsToConnectorService.applyRegionAndDueDate(json);
|
||||||
|
if (ObjectUtil.isNotEmpty(json1) && json1.getInteger("status") == 200) {
|
||||||
|
JSONArray date = json1.getJSONArray("data");
|
||||||
|
date.stream().forEach(date1 -> {
|
||||||
|
JSONObject json2 = JSONObject.parseObject(StrUtil.toString(date1));
|
||||||
|
materials.stream().forEach(material -> {
|
||||||
|
String replace = StrUtil.replace(StrUtil.toString(material), "=", ":");
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(replace);
|
||||||
|
if (jsonObject.getString("order_code").equals(json2.getString("order_code"))) {
|
||||||
|
jsonObject.put("due_date", json2.getString("due_date"));
|
||||||
|
jsonObject.put("region_code", json2.getString("next_region_code"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
region_code = JSONObject.parseObject(StrUtil.toString(date.get(0))).getString("region_code");
|
||||||
|
} else if (ObjectUtil.isNotEmpty(json1)) {
|
||||||
|
throw new BadRequestException(json1.getString("msg"));
|
||||||
|
}
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("device_code", device_code);
|
||||||
jo.put("config_code", "BLANKINGTask");
|
jo.put("config_code", "BLANKINGTask");
|
||||||
|
jo.put("create_mode", GeneralDefinition.AUTO_CREATION);
|
||||||
|
jo.put("vehicle_code", vehicle_code);
|
||||||
|
jo.put("region_code", region_code);
|
||||||
|
jo.put("ext_data", param);
|
||||||
|
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, device_code)
|
||||||
|
.set(SchBasePoint::getIs_lock, true)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
||||||
|
.set(SchBasePoint::getVehicle_code, null));
|
||||||
|
connectorTask.apply(jo);
|
||||||
|
iSchBaseVehiclematerialgroupService.remove(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
|
||||||
|
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicle_code));
|
||||||
|
materials.stream().forEach(material -> {
|
||||||
|
String replace = StrUtil.replace(StrUtil.toString(material), "=", ":");
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(replace);
|
||||||
|
SchBaseVehiclematerialgroup schBaseVehiclematerialgroup = new SchBaseVehiclematerialgroup();
|
||||||
|
schBaseVehiclematerialgroup.setVehicle_code(vehicle_code);
|
||||||
|
schBaseVehiclematerialgroup.setMaterial_qty(jsonObject.getInteger("material_qty"));
|
||||||
|
schBaseVehiclematerialgroup.setMaterial_code(jsonObject.getString("material_code"));
|
||||||
|
schBaseVehiclematerialgroup.setOrder_code(jsonObject.getString("order_code"));
|
||||||
|
schBaseVehiclematerialgroup.setDue_date(jsonObject.getString("due_date"));
|
||||||
|
schBaseVehiclematerialgroup.setRegion_code(jsonObject.getString("region_code"));
|
||||||
|
iSchBaseVehiclematerialgroupService.create(schBaseVehiclematerialgroup);
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
jo.put("create_mode", GeneralDefinition.AUTO_CREATION);
|
|
||||||
jo.put("vehicle_code", vehicle_code);
|
|
||||||
jo.put("region_code", region_code);
|
|
||||||
jo.put("ext_data", param);
|
|
||||||
connectorTask.apply(jo);
|
|
||||||
iSchBaseVehiclematerialgroupService.remove(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
|
|
||||||
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicle_code));
|
|
||||||
materials.stream().forEach(material -> {
|
|
||||||
String replace = StrUtil.replace(StrUtil.toString(material), "=", ":");
|
|
||||||
JSONObject jsonObject = JSONObject.parseObject(replace);
|
|
||||||
SchBaseVehiclematerialgroup schBaseVehiclematerialgroup = new SchBaseVehiclematerialgroup();
|
|
||||||
schBaseVehiclematerialgroup.setVehicle_code(vehicle_code);
|
|
||||||
schBaseVehiclematerialgroup.setMaterial_qty(jsonObject.getInteger("material_qty"));
|
|
||||||
schBaseVehiclematerialgroup.setMaterial_code(jsonObject.getString("material_code"));
|
|
||||||
schBaseVehiclematerialgroup.setOrder_code(jsonObject.getString("order_code"));
|
|
||||||
schBaseVehiclematerialgroup.setDue_date(jsonObject.getString("due_date"));
|
|
||||||
schBaseVehiclematerialgroup.setRegion_code(jsonObject.getString("region_code"));
|
|
||||||
iSchBaseVehiclematerialgroupService.create(schBaseVehiclematerialgroup);
|
|
||||||
});
|
|
||||||
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
|
||||||
.eq(SchBasePoint::getPoint_code, device_code)
|
|
||||||
.set(SchBasePoint::getIs_lock, true));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -181,20 +199,17 @@ public class HandheldServiceImpl implements HandheldService {
|
|||||||
.eq(SchBaseRegion::getRegion_code, region_code));
|
.eq(SchBaseRegion::getRegion_code, region_code));
|
||||||
if (ObjectUtil.isEmpty(schBaseRegion)) throw new BadRequestException("该区域不存在!");
|
if (ObjectUtil.isEmpty(schBaseRegion)) throw new BadRequestException("该区域不存在!");
|
||||||
List<String> pointCodes = iSchBasePointService.getByRegionCode(region_code);
|
List<String> pointCodes = iSchBasePointService.getByRegionCode(region_code);
|
||||||
boolean is_executing = iSchBaseTaskService.selectByPointCodeAndStatus(pointCodes);
|
|
||||||
if (is_executing) {
|
|
||||||
return "当前区域有任务正在执行,请等待任务执行完在锁定!";
|
|
||||||
}
|
|
||||||
iSchBaseTaskService.selectByPointCodeAndTaskStatus(pointCodes);
|
|
||||||
if (StrUtil.equals(status, "0")) {
|
if (StrUtil.equals(status, "0")) {
|
||||||
iSchBasePointService.releasePoint(region_code);
|
iSchBasePointService.releasePoint(region_code);
|
||||||
iSchBaseTaskService.updateTaskStatusByPointCode(pointCodes);
|
iSchBaseTaskService.updateTaskStatusByPointCode(pointCodes);
|
||||||
} else if (StrUtil.equals(status, "1")) {
|
} else if (StrUtil.equals(status, "1")) {
|
||||||
|
boolean is_executing = iSchBaseTaskService.selectByPointCodeAndStatus(pointCodes);
|
||||||
|
if (is_executing) {
|
||||||
|
throw new BadRequestException("该区域有任务正在执行,请等待任务执行完成再锁定!");
|
||||||
|
}
|
||||||
|
iSchBaseTaskService.selectByPointCodeAndTaskStatus(pointCodes);
|
||||||
iSchBasePointService.lockPoint(region_code);
|
iSchBasePointService.lockPoint(region_code);
|
||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(pointCodes) && pointCodes.size() > 0) {
|
|
||||||
return "当前区域已存在的任务有" + pointCodes.size() + "个";
|
|
||||||
}
|
|
||||||
return "操作成功";
|
return "操作成功";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,9 +230,13 @@ public class HandheldServiceImpl implements HandheldService {
|
|||||||
jo.put("device_code", device_code);
|
jo.put("device_code", device_code);
|
||||||
jo.put("config_code", "TOSTOREHOUSETask");
|
jo.put("config_code", "TOSTOREHOUSETask");
|
||||||
jo.put("create_mode", GeneralDefinition.AUTO_CREATION);
|
jo.put("create_mode", GeneralDefinition.AUTO_CREATION);
|
||||||
jo.put("vehicle_code", vehicle_type);
|
jo.put("vehicle_type", vehicle_type);
|
||||||
jo.put("ext_data", param);
|
jo.put("ext_data", param);
|
||||||
connectorTask.apply(jo);
|
connectorTask.apply(jo);
|
||||||
|
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, device_code)
|
||||||
|
.set(SchBasePoint::getIs_lock, true)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.EMPTY_PALLETS.getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -248,7 +267,7 @@ public class HandheldServiceImpl implements HandheldService {
|
|||||||
@Override
|
@Override
|
||||||
public void materialTransfer(JSONObject param) {
|
public void materialTransfer(JSONObject param) {
|
||||||
Assert.noNullElements(new Object[]{param.getString("device_code"), param.getString("vehicle_code")}, "参数不能为空!");
|
Assert.noNullElements(new Object[]{param.getString("device_code"), param.getString("vehicle_code")}, "参数不能为空!");
|
||||||
// String vehicle_code = param.getString("vehicle_code");
|
String vehicle_code = param.getString("vehicle_code");
|
||||||
String device_code = param.getString("device_code");
|
String device_code = param.getString("device_code");
|
||||||
SchBasePoint schBasePoint = iSchBasePointService.selectByPointCode(device_code);
|
SchBasePoint schBasePoint = iSchBasePointService.selectByPointCode(device_code);
|
||||||
if (ObjectUtil.isEmpty(schBasePoint)) throw new BadRequestException("设备点位不存在!");
|
if (ObjectUtil.isEmpty(schBasePoint)) throw new BadRequestException("设备点位不存在!");
|
||||||
@@ -258,10 +277,14 @@ public class HandheldServiceImpl implements HandheldService {
|
|||||||
jo.put("device_code", device_code);
|
jo.put("device_code", device_code);
|
||||||
jo.put("config_code", "MTTask");
|
jo.put("config_code", "MTTask");
|
||||||
jo.put("create_mode", GeneralDefinition.AUTO_CREATION);
|
jo.put("create_mode", GeneralDefinition.AUTO_CREATION);
|
||||||
/*jo.put("vehicle_code", vehicle_code);
|
jo.put("vehicle_code", vehicle_code);
|
||||||
jo.put("vehicle_type", mdBaseVehicle.getVehicle_type());*/
|
|
||||||
jo.put("ext_data", param);
|
jo.put("ext_data", param);
|
||||||
connectorTask.apply(jo);
|
connectorTask.apply(jo);
|
||||||
|
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, device_code)
|
||||||
|
.set(SchBasePoint::getIs_lock, true)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
||||||
|
.set(SchBasePoint::getVehicle_code, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -333,7 +356,7 @@ public class HandheldServiceImpl implements HandheldService {
|
|||||||
public JSONObject
|
public JSONObject
|
||||||
deviceInLogin(JSONObject json) {
|
deviceInLogin(JSONObject json) {
|
||||||
Assert.notNull(json.getString("device_code"), "登录参数不能为空");
|
Assert.notNull(json.getString("device_code"), "登录参数不能为空");
|
||||||
if(StrUtil.isNotEmpty(json.getString("device_code"))){
|
if (StrUtil.isNotEmpty(json.getString("device_code"))) {
|
||||||
Object regin_code = redisUtils.get("mobile:" + json.getString("device_code"));
|
Object regin_code = redisUtils.get("mobile:" + json.getString("device_code"));
|
||||||
if (regin_code != null) {
|
if (regin_code != null) {
|
||||||
throw new BadRequestException("当前设备工序已经登陆,无法继续选择");
|
throw new BadRequestException("当前设备工序已经登陆,无法继续选择");
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ public interface ISchBasePointService extends IService<SchBasePoint> {
|
|||||||
* @param vehicle_type
|
* @param vehicle_type
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
SchBasePoint selectByVehicleQty(String config_code, String vehicle_type);
|
SchBasePoint selectByVehicleQty(String vehicle_type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据载具类型查询点位
|
* 根据载具类型查询点位
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
</select>
|
</select>
|
||||||
<select id="selectByRegionCode" resultType="java.lang.String">
|
<select id="selectByRegionCode" resultType="java.lang.String">
|
||||||
select
|
select
|
||||||
sbp.vehicle_code
|
sbp.point_code
|
||||||
from
|
from
|
||||||
sch_base_point sbp
|
sch_base_point sbp
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -356,14 +356,21 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SchBasePoint selectByVehicleQty(String config_code, String vehicle_type) {
|
public SchBasePoint selectByVehicleQty(String vehicle_type) {
|
||||||
Assert.noNullElements(new Object[]{config_code, vehicle_type}, "载具类型不能为空!");
|
Assert.noNullElements(new Object[]{vehicle_type}, "载具类型不能为空!");
|
||||||
List<SchBasePoint> schBasePoints = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class).eq(SchBasePoint::getIs_lock, false)
|
List<SchBasePoint> schBasePoints = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getIs_lock, false)
|
||||||
.isNotNull(SchBasePoint::getVehicle_code)
|
.isNotNull(SchBasePoint::getVehicle_code)
|
||||||
.eq(SchBasePoint::getRegion_code, config_code)
|
|
||||||
.eq(SchBasePoint::getPoint_status, GoodsEnum.EMPTY_PALLETS.getValue())
|
.eq(SchBasePoint::getPoint_status, GoodsEnum.EMPTY_PALLETS.getValue())
|
||||||
.eq(SchBasePoint::getCan_vehicle_type, vehicle_type));
|
.eq(SchBasePoint::getCan_vehicle_type, vehicle_type));
|
||||||
return null;
|
if (CollectionUtils.isEmpty(schBasePoints)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
SchBasePoint schBasePoint = schBasePoints.get(0);
|
||||||
|
this.update(new UpdateWrapper<SchBasePoint>()
|
||||||
|
.set("is_lock", true)
|
||||||
|
.eq("point_code", schBasePoint.getPoint_code()));
|
||||||
|
return schBasePoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -383,7 +390,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
|||||||
.eq(SchBasePoint::getIs_lock, false)
|
.eq(SchBasePoint::getIs_lock, false)
|
||||||
.eq(SchBasePoint::getIs_used, true)
|
.eq(SchBasePoint::getIs_used, true)
|
||||||
.eq(SchBasePoint::getPoint_status, pointStatus)
|
.eq(SchBasePoint::getPoint_status, pointStatus)
|
||||||
.eq(SchBasePoint::getCan_vehicle_type, vehicle_type)
|
.eq(StrUtil.isNotBlank(vehicle_type),SchBasePoint::getCan_vehicle_type, vehicle_type)
|
||||||
.isNull(seq == 2, SchBasePoint::getVehicles)
|
.isNull(seq == 2, SchBasePoint::getVehicles)
|
||||||
.isNull(seq == 1, SchBasePoint::getVehicle_code)
|
.isNull(seq == 1, SchBasePoint::getVehicle_code)
|
||||||
.eq(StrUtil.isNotBlank(region_code), SchBasePoint::getRegion_code, region_code)
|
.eq(StrUtil.isNotBlank(region_code), SchBasePoint::getRegion_code, region_code)
|
||||||
|
|||||||
@@ -267,10 +267,13 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
|
|||||||
public boolean selectByPointCodeAndStatus(List<String> pointCodes) {
|
public boolean selectByPointCodeAndStatus(List<String> pointCodes) {
|
||||||
for (String pointCode : pointCodes) {
|
for (String pointCode : pointCodes) {
|
||||||
List<SchBaseTask> schBaseTasks = schBaseTaskMapper.selectList(Wrappers.lambdaQuery(SchBaseTask.class)
|
List<SchBaseTask> schBaseTasks = schBaseTaskMapper.selectList(Wrappers.lambdaQuery(SchBaseTask.class)
|
||||||
.eq(SchBaseTask::getPoint_code1, pointCode)
|
.eq(SchBaseTask::getTask_status, TaskStatus.EXECUTING.getCode())
|
||||||
.or()
|
.and(wrapper -> wrapper
|
||||||
.eq(SchBaseTask::getPoint_code2, pointCode)
|
.eq(SchBaseTask::getPoint_code1, pointCode)
|
||||||
.in(SchBaseTask::getTask_status, TaskStatus.EXECUTING.getCode()));
|
.or()
|
||||||
|
.eq(SchBaseTask::getPoint_code2, pointCode))
|
||||||
|
|
||||||
|
);
|
||||||
if (CollUtil.isNotEmpty(schBaseTasks) && schBaseTasks.size() > 0) {
|
if (CollUtil.isNotEmpty(schBaseTasks) && schBaseTasks.size() > 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -283,10 +286,11 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
|
|||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
for (String pointCode : pointCodes) {
|
for (String pointCode : pointCodes) {
|
||||||
List<SchBaseTask> schBaseTasks = schBaseTaskMapper.selectList(Wrappers.lambdaQuery(SchBaseTask.class)
|
List<SchBaseTask> schBaseTasks = schBaseTaskMapper.selectList(Wrappers.lambdaQuery(SchBaseTask.class)
|
||||||
.eq(SchBaseTask::getPoint_code1, pointCode)
|
.le(SchBaseTask::getTask_status, TaskStatus.ISSUED.getCode())
|
||||||
.or()
|
.and(wrapper -> wrapper
|
||||||
.eq(SchBaseTask::getPoint_code2, pointCode)
|
.eq(SchBaseTask::getPoint_code1, pointCode)
|
||||||
.le(SchBaseTask::getTask_status, TaskStatus.ISSUED.getCode()));
|
.or()
|
||||||
|
.eq(SchBaseTask::getPoint_code2, pointCode)));
|
||||||
if (CollUtil.isNotEmpty(schBaseTasks) && schBaseTasks.size() > 0) {
|
if (CollUtil.isNotEmpty(schBaseTasks) && schBaseTasks.size() > 0) {
|
||||||
schBaseTasks.forEach(task -> {
|
schBaseTasks.forEach(task -> {
|
||||||
update(Wrappers.lambdaUpdate(SchBaseTask.class)
|
update(Wrappers.lambdaUpdate(SchBaseTask.class)
|
||||||
@@ -305,10 +309,11 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
|
|||||||
public void updateTaskStatusByPointCode(List<String> pointCodes) {
|
public void updateTaskStatusByPointCode(List<String> pointCodes) {
|
||||||
for (String pointCode : pointCodes) {
|
for (String pointCode : pointCodes) {
|
||||||
List<SchBaseTask> schBaseTasks = schBaseTaskMapper.selectList(Wrappers.lambdaQuery(SchBaseTask.class)
|
List<SchBaseTask> schBaseTasks = schBaseTaskMapper.selectList(Wrappers.lambdaQuery(SchBaseTask.class)
|
||||||
.eq(SchBaseTask::getPoint_code1, pointCode)
|
.eq(SchBaseTask::getTask_status, TaskStatus.TIMEOUT.getCode())
|
||||||
.or()
|
.and(wrapper -> wrapper
|
||||||
.eq(SchBaseTask::getPoint_code2, pointCode)
|
.eq(SchBaseTask::getPoint_code1, pointCode)
|
||||||
.eq(SchBaseTask::getTask_status, TaskStatus.TIMEOUT.getCode()));
|
.or()
|
||||||
|
.eq(SchBaseTask::getPoint_code2, pointCode)));
|
||||||
if (CollUtil.isNotEmpty(schBaseTasks) && schBaseTasks.size() > 0) {
|
if (CollUtil.isNotEmpty(schBaseTasks) && schBaseTasks.size() > 0) {
|
||||||
schBaseTasks.forEach(task -> {
|
schBaseTasks.forEach(task -> {
|
||||||
update(Wrappers.lambdaUpdate(SchBaseTask.class)
|
update(Wrappers.lambdaUpdate(SchBaseTask.class)
|
||||||
|
|||||||
@@ -300,6 +300,7 @@ public abstract class AbstractTask {
|
|||||||
taskService.update(Wrappers.lambdaUpdate(SchBaseTask.class)
|
taskService.update(Wrappers.lambdaUpdate(SchBaseTask.class)
|
||||||
.set(SchBaseTask::getRemark, "下发任务失败" + e.getMessage())
|
.set(SchBaseTask::getRemark, "下发任务失败" + e.getMessage())
|
||||||
.eq(SchBaseTask::getTask_code, task.getTask_code()));
|
.eq(SchBaseTask::getTask_code, task.getTask_code()));
|
||||||
|
throw new BadRequestException("下发任务失败" + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class MtTask extends AbstractTask {
|
|||||||
for (SchBaseTask task : tasks) {
|
for (SchBaseTask task : tasks) {
|
||||||
String vehicle_type = task.getVehicle_type();
|
String vehicle_type = task.getVehicle_type();
|
||||||
SchBasePoint schBasePoint = schBasePointService.selectByGroundPoint(RegionEnum.NBJG.getRegion_code(),
|
SchBasePoint schBasePoint = schBasePointService.selectByGroundPoint(RegionEnum.NBJG.getRegion_code(),
|
||||||
GoodsEnum.OUT_OF_STOCK.getValue(),null, 1);
|
GoodsEnum.OUT_OF_STOCK.getValue(),null, 2);
|
||||||
if (ObjectUtil.isEmpty(schBasePoint)) {
|
if (ObjectUtil.isEmpty(schBasePoint)) {
|
||||||
task.setRemark("未找到所需点位!");
|
task.setRemark("未找到所需点位!");
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
|
|||||||
@@ -62,8 +62,7 @@ public class ToStoreHouseTask extends AbstractTask {
|
|||||||
schBasePoint = schBasePointService.selectByEmptyCage(RegionEnum.DDLK.getRegion_code(),
|
schBasePoint = schBasePointService.selectByEmptyCage(RegionEnum.DDLK.getRegion_code(),
|
||||||
task.getVehicle_type(),GoodsEnum.EMPTY_PALLETS.getValue(),true,task);
|
task.getVehicle_type(),GoodsEnum.EMPTY_PALLETS.getValue(),true,task);
|
||||||
} else {
|
} else {
|
||||||
schBasePoint = schBasePointService.selectByGroundPoint(null, GoodsEnum.EMPTY_PALLETS.getValue()
|
schBasePoint = schBasePointService.selectByVehicleQty(task.getVehicle_type());
|
||||||
, task.getVehicle_type(), 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(schBasePoint)) {
|
if (ObjectUtil.isEmpty(schBasePoint)) {
|
||||||
@@ -129,14 +128,16 @@ public class ToStoreHouseTask extends AbstractTask {
|
|||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
PointUtils.updateByIngTaskCode(schBasePoint);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
|
.set(SchBasePoint::getVehicle_code,null));
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String point_code2 = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.updateByIngTaskCode(schBasePoint2);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
|
.set(SchBasePoint::getVehicle_code,taskObj.getVehicle_code()));
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import org.nl.wms.util.TaskUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -66,8 +67,6 @@ public class PcOperationSMTTask extends AbstractTask {
|
|||||||
List<SchBaseTask> tasks = taskService.findTasksByTaskStatus(TASK_CONFIG_CODE, TaskStatus.APPLY);
|
List<SchBaseTask> tasks = taskService.findTasksByTaskStatus(TASK_CONFIG_CODE, TaskStatus.APPLY);
|
||||||
|
|
||||||
for (SchBaseTask task : tasks) {
|
for (SchBaseTask task : tasks) {
|
||||||
TaskUtils.setUpdateByAcs(task);
|
|
||||||
|
|
||||||
SendMaterVo sendMaterVo = JSONObject.parseObject(task.getRequest_param(), SendMaterVo.class);
|
SendMaterVo sendMaterVo = JSONObject.parseObject(task.getRequest_param(), SendMaterVo.class);
|
||||||
//判断是否指定到外协区
|
//判断是否指定到外协区
|
||||||
String targetRegionCode = sendMaterVo.getTarget_region_code();
|
String targetRegionCode = sendMaterVo.getTarget_region_code();
|
||||||
@@ -87,10 +86,13 @@ public class PcOperationSMTTask extends AbstractTask {
|
|||||||
NoticeTypeEnum.WARN.getCode());
|
NoticeTypeEnum.WARN.getCode());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
List<SendMaterVo> sendMaterVos = null;
|
List<SendMaterVo> sendMaterVos = new ArrayList<>();
|
||||||
if (CollUtil.isNotEmpty(sendMaterVo.getMaterial_info())) {
|
if (CollUtil.isNotEmpty(sendMaterVo.getMaterial_info())) {
|
||||||
sendMaterVo.getMaterial_info().stream().forEach(sendMater -> {
|
sendMaterVo.getMaterial_info().stream().forEach(sendMater -> {
|
||||||
SendMaterVo sendMaterVo1 = BeanUtil.copyProperties(sendMater, SendMaterVo.class);
|
JSONObject jsonObject = JSONObject.parseObject(sendMater);
|
||||||
|
SendMaterVo sendMaterVo1 = new SendMaterVo();
|
||||||
|
sendMaterVo1.setMaterial_qty(jsonObject.getInteger("material_qty"));
|
||||||
|
sendMaterVo1.setOrder_code(jsonObject.getString("order_code"));
|
||||||
sendMaterVos.add(sendMaterVo1);
|
sendMaterVos.add(sendMaterVo1);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -116,6 +118,7 @@ public class PcOperationSMTTask extends AbstractTask {
|
|||||||
task.setVehicle_type(schBasePoint.getCan_vehicle_type());
|
task.setVehicle_type(schBasePoint.getCan_vehicle_type());
|
||||||
task.setRemark("");
|
task.setRemark("");
|
||||||
task.setTask_status(TaskStatus.CREATED.getCode());
|
task.setTask_status(TaskStatus.CREATED.getCode());
|
||||||
|
TaskUtils.setUpdateByAcs(task);
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
|
|
||||||
//更新点位
|
//更新点位
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ public class ProcessingSMTTask extends AbstractTask {
|
|||||||
|
|
||||||
//更新点位
|
//更新点位
|
||||||
schBasePoint.setPoint_status(GoodsEnum.IN_STOCK.getValue());
|
schBasePoint.setPoint_status(GoodsEnum.IN_STOCK.getValue());
|
||||||
|
schBasePoint.setVehicle_code(task.getVehicle_code());
|
||||||
schBasePoint.setIng_task_code(task.getTask_code());
|
schBasePoint.setIng_task_code(task.getTask_code());
|
||||||
schBasePoint.setIs_lock(true);
|
schBasePoint.setIs_lock(true);
|
||||||
PointUtils.setUpdateByAcs(schBasePoint);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ public class BmVehicleInfo implements Serializable {
|
|||||||
* 添加人
|
* 添加人
|
||||||
*/
|
*/
|
||||||
private String create_name;
|
private String create_name;
|
||||||
|
private String create_id;
|
||||||
/**
|
/**
|
||||||
* 添加时间
|
* 添加时间
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
@@ -14,6 +15,7 @@ import org.nl.common.utils.CodeUtil;
|
|||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.system.service.dict.ISysDictService;
|
import org.nl.system.service.dict.ISysDictService;
|
||||||
import org.nl.system.service.dict.dao.Dict;
|
import org.nl.system.service.dict.dao.Dict;
|
||||||
|
import org.nl.wms.database.vehicle.service.dao.MdBaseVehicle;
|
||||||
import org.nl.wms.sch.vehicle.service.IBmVehicleInfoService;
|
import org.nl.wms.sch.vehicle.service.IBmVehicleInfoService;
|
||||||
import org.nl.wms.sch.vehicle.service.dao.BmVehicleInfo;
|
import org.nl.wms.sch.vehicle.service.dao.BmVehicleInfo;
|
||||||
import org.nl.wms.sch.vehicle.service.dao.mapper.BmVehicleInfoMapper;
|
import org.nl.wms.sch.vehicle.service.dao.mapper.BmVehicleInfoMapper;
|
||||||
@@ -42,7 +44,7 @@ public class BmVehicleInfoServiceImpl extends ServiceImpl<BmVehicleInfoMapper, B
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BmVehicleInfo vehileInfo(String vehicle_code) {
|
public BmVehicleInfo vehileInfo(String vehicle_code) {
|
||||||
return this.getOne(new QueryWrapper<BmVehicleInfo>().eq("vehicle_code",vehicle_code));
|
return this.getOne(new QueryWrapper<BmVehicleInfo>().eq("vehicle_code", vehicle_code));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -53,22 +55,21 @@ public class BmVehicleInfoServiceImpl extends ServiceImpl<BmVehicleInfoMapper, B
|
|||||||
throw new BadRequestException("此载具已存在");
|
throw new BadRequestException("此载具已存在");
|
||||||
}
|
}
|
||||||
//转编码类型:
|
//转编码类型:
|
||||||
Dict dict = dictService.getOne(new QueryWrapper<Dict>().eq("para1", map.getString("vehicle_type")));
|
Dict dict = dictService.getOne(new QueryWrapper<Dict>().eq("value", map.getString("vehicle_type")));
|
||||||
if (dict==null){
|
if (dict == null) {
|
||||||
throw new BadRequestException("此载具类型"+map.getString("vehicle_type")+"没有配置字典值");
|
throw new BadRequestException("此载具类型" + map.getString("vehicle_type") + "没有配置字典值");
|
||||||
}
|
}
|
||||||
JSONArray resultCodeArr = new JSONArray();
|
JSONArray resultCodeArr = new JSONArray();
|
||||||
int num = MapUtil.getInt(map, "num");
|
BmVehicleInfo entity = new BmVehicleInfo();
|
||||||
for (int i = 0; i < num; i++) {
|
entity.setVehicle_code(map.getString("vehicle_code"));
|
||||||
BmVehicleInfo entity = new BmVehicleInfo();
|
entity.setVehicle_name(dict.getLabel());
|
||||||
entity.setVehicle_code(CodeUtil.getNewCode(map.getString("vehicle_type")));
|
entity.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
entity.setVehicle_name(entity.getVehicle_name());
|
entity.setCreate_time(DateUtil.now());
|
||||||
entity.setUpdate_name(SecurityUtils.getCurrentNickName());
|
entity.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||||
entity.setUpdate_name(DateUtil.now());
|
entity.setUpdate_time(DateUtil.now());
|
||||||
entity.setVehicle_type(dict.getValue());
|
entity.setVehicle_type(dict.getValue());
|
||||||
this.save(entity);
|
this.save(entity);
|
||||||
resultCodeArr.add(entity.getVehicle_code());
|
resultCodeArr.add(entity.getVehicle_code());
|
||||||
}
|
|
||||||
return resultCodeArr;
|
return resultCodeArr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,8 +105,6 @@ public class BmVehicleInfoServiceImpl extends ServiceImpl<BmVehicleInfoMapper, B
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page queryAll(VehicleQuery query, PageQuery page) {
|
public Page queryAll(VehicleQuery query, PageQuery page) {
|
||||||
return this.page(page.build(), query.build());
|
return this.page(page.build(), query.build());
|
||||||
@@ -119,12 +118,12 @@ public class BmVehicleInfoServiceImpl extends ServiceImpl<BmVehicleInfoMapper, B
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object findById(Long storagevehicle_id) {
|
public Object findById(Long storagevehicle_id) {
|
||||||
return this.getOne(new QueryWrapper<BmVehicleInfo>().eq("storagevehicle_id",storagevehicle_id));
|
return this.getOne(new QueryWrapper<BmVehicleInfo>().eq("storagevehicle_id", storagevehicle_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BmVehicleInfo findByCode(String code) {
|
public BmVehicleInfo findByCode(String code) {
|
||||||
return this.getOne(new QueryWrapper<BmVehicleInfo>().eq("vehicle_code",code));
|
return this.getOne(new QueryWrapper<BmVehicleInfo>().eq("vehicle_code", code));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -136,8 +135,11 @@ public class BmVehicleInfoServiceImpl extends ServiceImpl<BmVehicleInfoMapper, B
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteAll(Long[] ids) {
|
public void deleteAll(Long[] ids) {
|
||||||
if (ids.length>0){
|
if (ids.length > 0) {
|
||||||
this.removeByIds(Arrays.asList(ids));
|
Arrays.stream(ids).forEach(id -> {
|
||||||
|
this.remove(Wrappers.lambdaQuery(BmVehicleInfo.class)
|
||||||
|
.eq(BmVehicleInfo::getVehicle_code,String.valueOf(id)));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
label-width="90px"
|
label-width="90px"
|
||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
<el-form-item label="所属车间" v-if="false">
|
<el-form-item v-if="false" label="所属车间">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.workshop_code"
|
v-model="query.workshop_code"
|
||||||
clearable
|
clearable
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in workShopList"
|
v-for="item in workShopList"
|
||||||
|
:key="item.workshop_code"
|
||||||
:label="item.workshop_name"
|
:label="item.workshop_name"
|
||||||
:value="item.workshop_code"
|
:value="item.workshop_code"
|
||||||
/>
|
/>
|
||||||
@@ -36,8 +37,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="区域类型">
|
<el-form-item label="区域类型">
|
||||||
<el-select
|
<el-select
|
||||||
style="width: 230px;"
|
|
||||||
v-model="query.region_code"
|
v-model="query.region_code"
|
||||||
|
style="width: 230px;"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
size="mini"
|
size="mini"
|
||||||
@@ -48,6 +49,7 @@
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in regionList"
|
v-for="item in regionList"
|
||||||
|
:key="item.region_code"
|
||||||
:label="item.region_name"
|
:label="item.region_name"
|
||||||
:value="item.region_code"
|
:value="item.region_code"
|
||||||
/>
|
/>
|
||||||
@@ -64,6 +66,7 @@
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in pointTypesList"
|
v-for="item in pointTypesList"
|
||||||
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
@@ -81,6 +84,7 @@
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in pointStatusList"
|
v-for="item in pointStatusList"
|
||||||
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
@@ -137,7 +141,7 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="540px">
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu" :title="crud.status.title" width="540px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;">
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;">
|
||||||
<el-form-item v-if="false" label="点位标识" prop="point_id">
|
<el-form-item v-if="false" label="点位标识" prop="point_id">
|
||||||
<el-input v-model="form.point_id" style="width: 370px;" />
|
<el-input v-model="form.point_id" style="width: 370px;" />
|
||||||
@@ -150,6 +154,7 @@
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in workShopList"
|
v-for="item in workShopList"
|
||||||
|
:key="item.workshop_code"
|
||||||
:label="item.workshop_name"
|
:label="item.workshop_name"
|
||||||
:value="item.workshop_code"
|
:value="item.workshop_code"
|
||||||
/>
|
/>
|
||||||
@@ -164,6 +169,7 @@
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in regionList"
|
v-for="item in regionList"
|
||||||
|
:key="item.region_code"
|
||||||
:label="item.region_name"
|
:label="item.region_name"
|
||||||
:value="item.region_code"
|
:value="item.region_code"
|
||||||
/>
|
/>
|
||||||
@@ -186,6 +192,7 @@
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in pointStatusDialogList"
|
v-for="item in pointStatusDialogList"
|
||||||
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
@@ -201,6 +208,7 @@
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in pointTypesDialogList"
|
v-for="item in pointTypesDialogList"
|
||||||
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
@@ -228,6 +236,22 @@
|
|||||||
<el-form-item label="载具数量" prop="vehicle_qty">
|
<el-form-item label="载具数量" prop="vehicle_qty">
|
||||||
<el-input-number v-model="form.vehicle_qty" style="width: 370px;" :controls="false" class="clear-number-input" :min="0" :precision="0" :max="99999" label="载具数量" size="mini" />
|
<el-input-number v-model="form.vehicle_qty" style="width: 370px;" :controls="false" class="clear-number-input" :min="0" :precision="0" :max="99999" label="载具数量" size="mini" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="点位状态" prop="point_status">
|
||||||
|
<el-select
|
||||||
|
v-model="form.point_status"
|
||||||
|
size="mini"
|
||||||
|
placeholder="点位状态"
|
||||||
|
class="filter-item"
|
||||||
|
style="width: 370px;"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in pointStatus"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="是否有工单">
|
<el-form-item label="是否有工单">
|
||||||
<el-radio v-for="item in dict.TrueOrFalse" :key="item.id" v-model="form.is_has_workder" :label="item.value">{{ item.label }}</el-radio>
|
<el-radio v-for="item in dict.TrueOrFalse" :key="item.id" v-model="form.is_has_workder" :label="item.value">{{ item.label }}</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -252,15 +276,19 @@
|
|||||||
<el-table-column prop="region_code" label="区域编码" :min-width="flexWidth('region_code',crud.data,'区域编码')" />
|
<el-table-column prop="region_code" label="区域编码" :min-width="flexWidth('region_code',crud.data,'区域编码')" />
|
||||||
<el-table-column prop="region_name" label="区域名称" :min-width="flexWidth('region_name',crud.data,'区域名称')" />
|
<el-table-column prop="region_name" label="区域名称" :min-width="flexWidth('region_name',crud.data,'区域名称')" />
|
||||||
<el-table-column prop="point_type_name" label="点位类型" :min-width="flexWidth('point_type_name',crud.data,'点位类型')" />
|
<el-table-column prop="point_type_name" label="点位类型" :min-width="flexWidth('point_type_name',crud.data,'点位类型')" />
|
||||||
<el-table-column prop="point_status_name" label="点位状态" :min-width="flexWidth('point_status_name',crud.data,'点位类型')" />
|
<el-table-column prop="point_status" label="点位状态" :min-width="flexWidth('point_status',crud.data,'点位类型')">
|
||||||
<!-- <el-table-column prop="point_type" label="点位类型" :min-width="flexWidth('point_type',crud.data,'点位类型')" />-->
|
<template v-slot="scope">
|
||||||
|
{{ dict.label.point_status[scope.row.point_status] || '未知' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column prop="point_type" label="点位类型" :min-width="flexWidth('point_type',crud.data,'点位类型')" />-->
|
||||||
<!-- <el-table-column prop="point_status" label="点位状态" :min-width="flexWidth('point_status',crud.data,'点位状态')" />-->
|
<!-- <el-table-column prop="point_status" label="点位状态" :min-width="flexWidth('point_status',crud.data,'点位状态')" />-->
|
||||||
<!-- <el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型', 30)">
|
<!-- <el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型', 30)">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<!-- <el-table-column prop="vehicle_type" label="物料类型" :min-width="flexWidth('vehicle_type',crud.data,'物料类型')" />-->
|
<!-- <el-table-column prop="vehicle_type" label="物料类型" :min-width="flexWidth('vehicle_type',crud.data,'物料类型')" />-->
|
||||||
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" />
|
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" />
|
||||||
<el-table-column prop="vehicle_qty" label="载具数量" :min-width="flexWidth('vehicle_qty',crud.data,'载具数量')" />
|
<el-table-column prop="vehicle_qty" label="载具数量" :min-width="flexWidth('vehicle_qty',crud.data,'载具数量')" />
|
||||||
<el-table-column label="是否锁定" :min-width="flexWidth('vehicle_qty',crud.data,'是否锁定')">
|
<el-table-column label="是否锁定" :min-width="flexWidth('vehicle_qty',crud.data,'是否锁定')">
|
||||||
@@ -387,6 +415,29 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
dict: {
|
||||||
|
label: {
|
||||||
|
point_status: {
|
||||||
|
'2': '有货',
|
||||||
|
'1': '空托盘',
|
||||||
|
'0': '无货'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pointStatus: [
|
||||||
|
{
|
||||||
|
label: '有货',
|
||||||
|
value: '2'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '空托盘',
|
||||||
|
value: '1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '无货',
|
||||||
|
value: '0'
|
||||||
|
}
|
||||||
|
],
|
||||||
permission: {},
|
permission: {},
|
||||||
rules: {
|
rules: {
|
||||||
point_code: [
|
point_code: [
|
||||||
|
|||||||
@@ -46,18 +46,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission">
|
<crudOperation :permission="permission" />
|
||||||
<el-button
|
|
||||||
slot="right"
|
|
||||||
class="filter-item"
|
|
||||||
type="success"
|
|
||||||
icon="el-icon-printer"
|
|
||||||
size="mini"
|
|
||||||
@click="printView"
|
|
||||||
>
|
|
||||||
打印
|
|
||||||
</el-button>
|
|
||||||
</crudOperation>
|
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
@@ -111,13 +100,27 @@
|
|||||||
@close="materiValueCancel()"
|
@close="materiValueCancel()"
|
||||||
>
|
>
|
||||||
<el-form ref="form" :model="updateForm" :rules="rules" size="mini" label-width="110px">
|
<el-form ref="form" :model="updateForm" :rules="rules" size="mini" label-width="110px">
|
||||||
<el-form-item label="载具编号" prop="vehicle_code">
|
<el-form-item label="载具编码" prop="vehicle_code">
|
||||||
<template>
|
<template>
|
||||||
<el-input v-model="updateForm.vehicle_code" clearable />
|
<el-input v-model="updateForm.vehicle_code" clearable />
|
||||||
</template>
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="载具重量(g)" prop="vehicle_weight">
|
<el-form-item label="载具类型" prop="vehicle_weight">
|
||||||
<el-input-number v-model="updateForm.vehicle_weight" clearable style="width: 370px;" />
|
<el-select
|
||||||
|
v-model="updateForm.vehicle_type"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请选择"
|
||||||
|
class="filter-item"
|
||||||
|
style="width: 390px;"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.storagevehicle_type"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@@ -125,39 +128,6 @@
|
|||||||
<el-button type="primary" @click="pointMateriSubmit()">确认</el-button>
|
<el-button type="primary" @click="pointMateriSubmit()">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog
|
|
||||||
:before-close="crud.cancelCU"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
title="打印配置"
|
|
||||||
:visible.sync="printVisible"
|
|
||||||
width="450px"
|
|
||||||
>
|
|
||||||
<el-form ref="form" :model="printForm" size="mini" label-width="150px">
|
|
||||||
<el-form-item label="纸张高度(mm)" prop="pageh">
|
|
||||||
<el-input v-model="printForm.pageh" :precision="0" style="width: 150px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="纸张宽度(mm)" prop="pagew">
|
|
||||||
<el-input v-model="printForm.pagew" :precision="0" style="width: 150px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="页边距top(mm)" prop="pagetop">
|
|
||||||
<el-input v-model="printForm.pagetop" :precision="0" style="width: 150px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="页边距right(mm)" prop="pageright">
|
|
||||||
<el-input v-model="printForm.pageright" :precision="0" style="width: 150px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="页边距down(mm)" prop="pagedown">
|
|
||||||
<el-input v-model="printForm.pagedown" :precision="0" style="width: 150px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="页边距left(mm)" prop="pageleft">
|
|
||||||
<el-input v-model="printForm.pageleft" :precision="0" style="width: 150px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<br>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="info" @click="printClose">取消</el-button>
|
|
||||||
<el-button :loading="crud.cu === 2" type="primary" @click="print">打印</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:before-close="crud.cancelCU"
|
:before-close="crud.cancelCU"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
@@ -174,13 +144,12 @@
|
|||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
style="width: 250px;"
|
style="width: 250px;"
|
||||||
@change="getVehicle"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.storagevehicle_type"
|
v-for="item in dict.storagevehicle_type"
|
||||||
:key="item.para1"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.para1"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -258,12 +227,12 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页组件-->
|
<!-- 分页组件-->
|
||||||
<MaterDtl
|
<!-- <MaterDtl
|
||||||
:dialog-show.sync="materialShow"
|
:dialog-show.sync="materialShow"
|
||||||
:is-single="true"
|
:is-single="true"
|
||||||
:mater-opt-code="materType"
|
:mater-opt-code="materType"
|
||||||
@setMaterValue="setMaterValue"
|
@setMaterValue="setMaterValue"
|
||||||
/>
|
/> -->
|
||||||
<pagination />
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -277,17 +246,17 @@ import crudOperation from '@crud/CRUD.operation'
|
|||||||
import udOperation from '@crud/UD.operation'
|
import udOperation from '@crud/UD.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
||||||
import MaterDtl from './MaterDialog'
|
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
vehicle_code: null,
|
vehicle_code: null,
|
||||||
vehicle_name: null,
|
vehicle_name: null,
|
||||||
is_used: '1'
|
is_used: '1',
|
||||||
|
vehicle_type: ''
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'Storagevehicleinfo',
|
name: 'Storagevehicleinfo',
|
||||||
dicts: ['storagevehicle_type', 'VEHICLE_OVER_TYPE'],
|
dicts: ['storagevehicle_type', 'VEHICLE_OVER_TYPE'],
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl },
|
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -497,8 +466,9 @@ export default {
|
|||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
getVehicle(code) {
|
/* getVehicle(code) {
|
||||||
|
console.log('选中的值:', code) // 调试信息
|
||||||
if (!code) {
|
if (!code) {
|
||||||
this.crud.notify('请选择载具类型', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('请选择载具类型', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
this.form.vehicle_code = ''
|
this.form.vehicle_code = ''
|
||||||
@@ -507,7 +477,7 @@ export default {
|
|||||||
crudStoragevehicleinfo.getVehicle(code).then(res => {
|
crudStoragevehicleinfo.getVehicle(code).then(res => {
|
||||||
this.form.vehicle_code = res.value
|
this.form.vehicle_code = res.value
|
||||||
})
|
})
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user