fix: connector上下层取货放货顺序优化,添加点位页面修改锁功能

This commit is contained in:
yanps
2024-11-04 10:09:01 +08:00
parent cacb1f0867
commit 51cad1bd9d
20 changed files with 459 additions and 284 deletions

View File

@@ -1,56 +1,57 @@
//package org.nl.config.saconfig;
//
//import org.springframework.core.annotation.Order;
//import org.springframework.stereotype.Component;
//import org.springframework.web.cors.CorsConfiguration;
//
//import javax.servlet.*;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//
///**
// * 跨域过滤器
// * @author kong
// */
//@Component
//@Order(-200)
//public class CorsFilter implements Filter {
//
// static final String OPTIONS = "OPTIONS";
//
// @Override
// public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
// throws IOException, ServletException {
// HttpServletRequest request = (HttpServletRequest) req;
// HttpServletResponse response = (HttpServletResponse) res;
// // 允许指定域访问跨域资源
// response.setHeader("Access-Control-Allow-Origin", "*");
// // 允许所有请求方式
// response.setHeader("Access-Control-Allow-Methods", "*");
// // 有效时间
// response.setHeader("Access-Control-Max-Age", "3600");
// // 允许的header参数
// response.setHeader("Access-Control-Allow-Headers", "*");
// response.setHeader("Access-Control-Allow-Credentials", "true");
//
// // 如果是预检请求,直接返回
// if (OPTIONS.equals(request.getMethod())) {
// System.out.println("=======================浏览器发来了OPTIONS预检请求==========");
// response.getWriter().print("");
// return;
// }
//
// // System.out.println("*********************************过滤器被使用**************************");
// chain.doFilter(req, res);
// }
//
// @Override
// public void init(FilterConfig filterConfig) {
// }
//
// @Override
// public void destroy() {
// }
//
//}
/*
package org.nl.config.saconfig;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.web.cors.CorsConfiguration;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
*/
/**
* 跨域过滤器
* @author kong
*//*
@Component
@Order(-200)
public class CorsFilter implements Filter {
static final String OPTIONS = "OPTIONS";
@Override
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) res;
// 允许指定域访问跨域资源
response.setHeader("Access-Control-Allow-Origin", "*");
// 允许所有请求方式
response.setHeader("Access-Control-Allow-Methods", "*");
// 有效时间
response.setHeader("Access-Control-Max-Age", "3600");
// 允许的header参数
response.setHeader("Access-Control-Allow-Headers", "*");
response.setHeader("Access-Control-Allow-Credentials", "true");
// 如果是预检请求,直接返回
if (OPTIONS.equals(request.getMethod())) {
System.out.println("=======================浏览器发来了OPTIONS预检请求==========");
response.getWriter().print("");
return;
}
// System.out.println("*********************************过滤器被使用**************************");
chain.doFilter(req, res);
}
@Override
public void destroy() {
}
}
*/

View File

@@ -516,8 +516,15 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
schBaseVehiclematerialgroup.setOrder_code(connectorDto.getProductionOrder());
schBaseVehiclematerialgroup.setCreate_name("Connector");
iSchBaseVehiclematerialgroupService.create(schBaseVehiclematerialgroup);
taskService.update(Wrappers.lambdaUpdate(SchBaseTask.class).eq(SchBaseTask::getTask_code, schBaseTask.getTask_code())
.set(SchBaseTask::getJob_name, connectorDto.getJobname()));
if ("Y".equals(connectorDto.getFinished())) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("cJobName",connectorDto.getJobname());
try {
sortingService.applyFinishJobName(jsonObject);
}catch (Exception e){
log.info("wms反馈sorting->JobName完成,失败{}",e.getMessage());
}
}
}
} else {
throw new BadRequestException("LMS向Connector请求取货");

View File

@@ -116,7 +116,6 @@ public class FabServiceImpl {
callEmptyTask.apply(param);
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
.eq(SchBasePoint::getPoint_code, callEmpVo.getDevice_code())
.set(SchBasePoint::getPoint_status, GoodsEnum.EMPTY_PALLETS.getValue())
.set(SchBasePoint::getIs_lock, true));
break;
case "smt":

View File

@@ -1,6 +1,5 @@
package org.nl.wms.ext.handheld.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
@@ -10,7 +9,6 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import nl.basjes.shaded.org.springframework.util.Assert;
import org.nl.common.enums.GoodsEnum;
import org.nl.common.enums.VehicleEnum;
import org.nl.common.enums.VehicleTypeEnum;
import org.nl.common.enums.region.RegionEnum;
import org.nl.common.exception.BadRequestException;
@@ -25,7 +23,6 @@ import org.nl.wms.database.vehicle.service.IMdBaseVehicleService;
import org.nl.wms.database.vehicle.service.dao.MdBaseVehicle;
import org.nl.wms.ext.acs.service.WmsToAcsService;
import org.nl.wms.ext.connector.service.WmsToConnectorService;
import org.nl.wms.ext.handheld.handheldEnum.RouteEnum;
import org.nl.wms.ext.handheld.service.HandheldService;
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
import org.nl.wms.sch.group.service.dao.SchBaseVehiclematerialgroup;
@@ -44,6 +41,8 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;
/**
* @author LENOVO
@@ -248,10 +247,10 @@ public class HandheldServiceImpl implements HandheldService {
Assert.noNullElements(new Object[]{param.getString("device_code"), param.getString("vehicle_code")},
"当前点位或目的地不能为空!");
SchBasePoint schBasePoint = iSchBasePointService.selectByPointCode(param.getString("device_code"));
if (ObjectUtil.isEmpty(schBasePoint)) throw new BadRequestException("设备点位不存在!");
/*if (ObjectUtil.isEmpty(schBasePoint)) throw new BadRequestException("设备点位不存在!");
if (schBasePoint.getIs_lock()) {
throw new BadRequestException("该点位正在执行任务,请稍后再试!");
}
}*/
String region_code = param.getString("region_code");
String device_code = param.getString("device_code");
String vehicle_code = param.getString("vehicle_code");
@@ -329,10 +328,9 @@ public class HandheldServiceImpl implements HandheldService {
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"));
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(material2);
map.put("order_code", jsonObject.get("order_code"));
map.put("qty", jsonObject.get("material_qty"));
jsonArray.add(map);
});
json.put("vehicle_code", vehicle_code);
@@ -341,16 +339,21 @@ public class HandheldServiceImpl implements HandheldService {
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"));
}
});
date.stream().map(date1 -> JSONObject.parseObject(StrUtil.toString(date1))).forEach(json2 -> {
List<cn.hutool.json.JSONObject> updatedMaterials = materials.stream()
.map(material -> {
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(material);
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"));
return jsonObject; // 更新的对象
} else {
return jsonObject; // 其他对象保持不变
}
})
.collect(Collectors.toList());
materials.clear();
materials.addAll(updatedMaterials);
});
region_code = JSONObject.parseObject(StrUtil.toString(date.get(0))).getString("region_code");
jo.put("region_code", region_code);
@@ -373,25 +376,15 @@ public class HandheldServiceImpl implements HandheldService {
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicle_code));
String finalRegion_code = region_code;
materials.stream().forEach(material -> {
String replace = StrUtil.replace(StrUtil.toString(material), "=", ":");
replace = replace.replaceAll("material_code:,", "");
// 使用 Hutool 的 JSONUtil 解析 JSON 字符串
cn.hutool.json.JSONObject jsonObject1 = JSONUtil.parseObj(replace);
// 判断 material_code 是否为空
if (replace.contains("OR")) {
Object materialCode = jsonObject1.get("order_code");
jsonObject1.put("order_code", materialCode.toString());
replace = jsonObject1.toString();
}
JSONObject jsonObject = JSONObject.parseObject(replace);
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(material);
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.setMaterial_qty(jsonObject.getInt("material_qty"));
schBaseVehiclematerialgroup.setMaterial_code(jsonObject.getStr("material_code"));
schBaseVehiclematerialgroup.setOrder_code(jsonObject.getStr("order_code"));
schBaseVehiclematerialgroup.setDue_date(jsonObject.getStr("due_date"));
schBaseVehiclematerialgroup.setCreate_name(SecurityUtils.getCurrentNickName());
schBaseVehiclematerialgroup.setRegion_code(StrUtil.isBlank(finalRegion_code) ? jsonObject.getString("region_code") : finalRegion_code);
schBaseVehiclematerialgroup.setRegion_code(StrUtil.isBlank(finalRegion_code) ? jsonObject.getStr("region_code") : finalRegion_code);
iSchBaseVehiclematerialgroupService.create(schBaseVehiclematerialgroup);
});
}

View File

@@ -28,4 +28,13 @@ public class WmsToSortingService {
AcsResponse acsResponse = ConnectorUtil.notifyEextSystem("api/external/wms/agv", json, GeneralDefinition.SORTING_URL);
return acsResponse;
}
/**
* 反馈Sorting jobname完成
* @param json
*/
public void applyFinishJobName(JSONObject json) {
AcsResponse acsResponse = ConnectorUtil.notifyEextSystem("api/external/jobif/updatejobstatus", json, GeneralDefinition.SORTING_URL);
}
}

View File

@@ -158,7 +158,7 @@ public interface ISchBasePointService extends IService<SchBasePoint> {
* @param vehicle_type
* @return
*/
SchBasePoint selectByGroundPoint(String region_code, String pointStatus, String vehicle_type, int seq);
SchBasePoint selectByGroundPoint(String region_code, String pointStatus, String vehicle_type, int seq,int point_type);
/**

View File

@@ -18,6 +18,7 @@
WHERE p.point_code = #{id}
FOR UPDATE
</select>
<select id="getStructList" resultType="org.nl.wms.ext.fab.service.dto.OrderMater">
SELECT
sch_base_point.point_code,
@@ -46,11 +47,13 @@
AND sch_base_vehiclematerialgroup.region_code = #{region_code}
</select>
<select id="selectByRegionCode" resultType="java.lang.String">
select sbp.point_code
from sch_base_point sbp
where sbp.region_code = #{region_code}
</select>
<select id="selectJobDevice" resultType="java.util.Map">
select sbp.point_code, sbp.point_name
from sch_base_point sbp
@@ -58,6 +61,7 @@
and region_code = 'GZQ'
and region_points is not null
</select>
<select id="selectPointByRegion" resultType="com.alibaba.fastjson.JSONObject"
parameterType="java.lang.String">
select point_code, point_name, point_status
@@ -65,4 +69,5 @@
where region_code = #{regionCode}
and point_type is null
</select>
</mapper>

View File

@@ -269,8 +269,8 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
pointMapper.updateById(schBasePoint);
return schBasePoint;
}
SchBasePoint schBasePoint1 = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class).eq(SchBasePoint::getRegion_code, region_code)).get(0);
if (ObjectUtil.isEmpty(schBasePoint1)) throw new BadRequestException("不存在该区域!");
/*SchBasePoint schBasePoint1 = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class).eq(SchBasePoint::getRegion_code, region_code)).get(0);
if (ObjectUtil.isEmpty(schBasePoint1)) throw new BadRequestException("不存在该区域!");*/
//分配载具类型相同的站点
List<SchBasePoint> schBasePoints1 = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class)
.eq(SchBasePoint::getIs_lock, false)
@@ -280,7 +280,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
.eq(SchBasePoint::getIs_used, true)
.eq(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue()));
if (CollUtil.isNotEmpty(schBasePoints1) && schBasePoints1.size() > 0) {
schBasePoints1.stream().sorted(Comparator.comparingInt(schBasePoint -> Math.abs(schBasePoint1.getRegion_seq() - schBasePoint.getRegion_seq())));
/*schBasePoints1.stream().sorted(Comparator.comparingInt(schBasePoint -> Math.abs(schBasePoint1.getRegion_seq() - schBasePoint.getRegion_seq())));*/
SchBasePoint schBasePoint = schBasePoints1.get(0);
schBasePoint.setIs_lock(true);
PointUtils.setUpdateByAcs(schBasePoint);
@@ -389,13 +389,13 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
}
@Override
public SchBasePoint selectByGroundPoint(String region_code, String pointStatus, String vehicle_type, int seq) {
public SchBasePoint selectByGroundPoint(String region_code, String pointStatus, String vehicle_type, int seq,int point_type) {
List<SchBasePoint> 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, "0")
.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)
@@ -413,7 +413,8 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
.eq(SchBasePoint::getIs_used, true)
.eq(SchBasePoint::getPoint_status, pointStatus)
.eq(SchBasePoint::getCan_vehicle_type, vehicle_type)
.isNotNull(SchBasePoint::getVehicle_code));
.isNotNull(SchBasePoint::getVehicle_code)
.orderByDesc(SchBasePoint::getIn_order_seq));
if (CollUtil.isNotEmpty(schBasePoints) && schBasePoints.size() > 0) {
SchBasePoint schBasePoint = schBasePoints.get(0);
schBasePoint.setIs_lock(true);

View File

@@ -83,7 +83,7 @@ public class CNTTask extends AbstractTask {
task.setVehicle_type(schBasePoint.getCan_vehicle_type());
task.setRemark("");
task.setTask_status(TaskStatus.CREATED.getCode());
if (task.getPoint_code1().endsWith("1")) {
if (task.getPoint_code1().endsWith("1") || task.getPoint_code1().endsWith("3")) {
task.setAcs_trace_id("4");
}
taskService.updateById(task);

View File

@@ -67,10 +67,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);
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);
GoodsEnum.OUT_OF_STOCK.getValue(), mdBaseVehicle.getVehicle_type(), 1,1);
}
if (ObjectUtil.isEmpty(schBasePoint)) {
task.setRemark("未找到所需点位!");

View File

@@ -63,7 +63,8 @@ public class CallEmptyTask extends AbstractTask {
NoticeTypeEnum.WARN.getCode());
continue;
}
SchBasePoint schBasePoint = schBasePointService.selectByGroundPoint(task.getRegion_code(), GoodsEnum.OUT_OF_STOCK.getValue(), mdBaseVehicle.getVehicle_type(), 1);
SchBasePoint schBasePoint = schBasePointService.selectByGroundPoint(task.getRegion_code(), GoodsEnum.OUT_OF_STOCK.getValue()
, mdBaseVehicle.getVehicle_type(), 1,1);
if (ObjectUtil.isEmpty(schBasePoint)) {
task.setRemark("未找到所需点位!");
taskService.updateById(task);

View File

@@ -75,22 +75,22 @@ public class EmptyCageTask extends AbstractTask {
case "R01":
//RO1空料容
schBasePoint = schBasePointService.selectByGroundPoint(RegionEnum.DDLK.getRegion_code(),
GoodsEnum.OUT_OF_STOCK.getValue(), VehicleTypeEnum.FRAME_R01.getVehicleCode(), 2);
GoodsEnum.OUT_OF_STOCK.getValue(), VehicleTypeEnum.FRAME_R01.getVehicleCode(), 2,1);
break;
case "R02":
//RO2空料容
schBasePoint = schBasePointService.selectByGroundPoint(RegionEnum.DDLK.getRegion_code(),
GoodsEnum.OUT_OF_STOCK.getValue(), VehicleTypeEnum.FRAME_R02.getVehicleCode(), 2);
GoodsEnum.OUT_OF_STOCK.getValue(), VehicleTypeEnum.FRAME_R02.getVehicleCode(), 2,1);
break;
case "S04":
//RO2空料容
schBasePoint = schBasePointService.selectByGroundPoint(RegionEnum.DDLK.getRegion_code(),
GoodsEnum.OUT_OF_STOCK.getValue(), VehicleTypeEnum.RACKS_S04.getVehicleCode(), 2);
GoodsEnum.OUT_OF_STOCK.getValue(), VehicleTypeEnum.RACKS_S04.getVehicleCode(), 2,1);
break;
case "S06":
//RO2空料容
schBasePoint = schBasePointService.selectByGroundPoint(RegionEnum.DDLK.getRegion_code(),
GoodsEnum.OUT_OF_STOCK.getValue(), VehicleTypeEnum.RACKS_S06.getVehicleCode(), 2);
GoodsEnum.OUT_OF_STOCK.getValue(), VehicleTypeEnum.RACKS_S06.getVehicleCode(), 2,1);
break;
default:
break;

View File

@@ -58,7 +58,7 @@ public class MtTask extends AbstractTask {
for (SchBaseTask task : tasks) {
String vehicle_type = task.getVehicle_type();
SchBasePoint schBasePoint = schBasePointService.selectByGroundPoint(RegionEnum.NBJG.getRegion_code(),
GoodsEnum.OUT_OF_STOCK.getValue(), null, 2);
GoodsEnum.OUT_OF_STOCK.getValue(), null, 2,1);
if (ObjectUtil.isEmpty(schBasePoint)) {
task.setRemark("未找到所需点位!");
taskService.updateById(task);

View File

@@ -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);
GoodsEnum.OUT_OF_STOCK.getValue(), vehicle_type, 1,0);
if (ObjectUtil.isEmpty(schBasePoint)) {
task.setRemark("未找到所需点位!");
taskService.updateById(task);

View File

@@ -10,6 +10,8 @@ import org.nl.common.enums.GoodsEnum;
import org.nl.common.enums.wms.PointStatusEnum;
import org.nl.common.exception.BadRequestException;
import org.nl.system.service.notice.ISysNoticeService;
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.ext.fab.service.dto.SendMaterVo;
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
@@ -52,6 +54,8 @@ public class ProcessingSMTTask extends AbstractTask {
private ISchBasePointService schBasePointService;
@Autowired
private ISchBaseVehiclematerialgroupService schBaseVehiclematerialgroupService;
@Autowired
private IMdBaseVehicleService mdBaseVehicleService;
@Override
protected void create() throws BadRequestException {
@@ -134,7 +138,6 @@ public class ProcessingSMTTask extends AbstractTask {
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
// 起点清空
if (ObjectUtil.isNotEmpty(schBasePoint)) {
PointUtils.updateByIngTaskCode(schBasePoint);
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
.eq(SchBasePoint::getPoint_code, startPoint)
.set(SchBasePoint::getVehicle_code, null)
@@ -144,11 +147,19 @@ public class ProcessingSMTTask extends AbstractTask {
String point_code2 = taskObj.getPoint_code2();
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
PointUtils.updateByIngTaskCode(schBasePoint2);
String point_status = GoodsEnum.IN_STOCK.getValue();
Boolean point_type = false;
if (point_code2.contains("NBJGKLLDJW")) {
point_status = GoodsEnum.EMPTY_PALLETS.getValue();
point_type = true;
}
MdBaseVehicle mdBaseVehicle = mdBaseVehicleService.selectByVehicleCode(taskObj.getVehicle_code());
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
.eq(SchBasePoint::getPoint_code, point_code2)
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
.set(SchBasePoint::getPoint_status, GoodsEnum.IN_STOCK.getValue())
.set(point_type, SchBasePoint::getCan_vehicle_type, mdBaseVehicle.getVehicle_type())
.set(point_type, SchBasePoint::getIn_order_seq, 5)
.set(SchBasePoint::getPoint_status, point_status)
.set(SchBasePoint::getIs_lock, false));
}
// 任务完成

View File

@@ -3,7 +3,7 @@ window.g = {
VUE_APP_BASE_API: 'http://127.0.0.1:8010'
},
prod: {
VUE_APP_BASE_API: 'http://127.0.0.1:8010'
VUE_APP_BASE_API: 'http://192.168.101.1:8010'
}
}

View File

@@ -101,7 +101,7 @@
@change="hand"
/>
</el-form-item>
<el-form-item label="锁定类型">
<el-form-item label="是否锁定">
<el-switch
v-model="query.lock_type"
:active-value="true"
@@ -228,11 +228,25 @@
<el-form-item label="父类编码" prop="vehicle_code">
<el-input v-model="form.parent_point_code" clearable style="width: 370px;" @focus="getParentPoint" />
</el-form-item>
<el-form-item v-if="form.point_status !== '0'" label="载具编码" prop="vehicle_code">
<el-form-item label="载具编码" prop="vehicle_code">
<el-input v-model="form.vehicle_code" clearable style="width: 370px;" />
</el-form-item>
<el-form-item v-if="form.point_status !== '0'" label="允许载具类型" prop="vehicle_type">
<el-input v-model="form.vehicle_type" clearable style="width: 370px;" />
<el-form-item label="允许载具类型" prop="can_vehicle_type">
<el-select
v-model="form.can_vehicle_type"
size="mini"
placeholder="允许载具类型"
class="filter-item"
style="width: 370px;"
>
<el-option
v-for="item in dict.can_vehicle_type"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<!-- <el-input v-model="form.can_vehicle_type" clearable style="width: 370px;" /> -->
</el-form-item>
<!-- <el-form-item label="可放载具类型" prop="can_vehicle_types">
<el-select v-model="form.can_vehicle_types" multiple placeholder="请选择" clearable style="width: 370px;">
@@ -263,11 +277,11 @@
/>
</el-select>
</el-form-item>
<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-form-item label="是否锁定">
<el-radio v-for="item in dict.TrueOrFalse" :key="item.id" v-model="form.is_lock" :label="item.value">{{ item.label }}</el-radio>
</el-form-item>
<el-form-item label="是否自动">
<el-radio v-for="item in dict.TrueOrFalse" :key="item.id" v-model="form.is_auto" :label="item.value">{{ item.label }}</el-radio>
<el-form-item label="是否启用">
<el-radio v-for="item in dict.TrueOrFalse" :key="item.id" v-model="form.is_used" :label="item.value">{{ item.label }}</el-radio>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="form.remark" style="width: 370px;" rows="2" type="textarea" />
@@ -397,11 +411,12 @@ const defaultForm = {
is_auto: 'true',
remark: null,
is_used: 'true',
is_lock: 'true',
can_vehicle_types: null
}
export default {
name: 'SchBasePoint',
dicts: ['vehicle_type', 'TrueOrFalse'],
dicts: ['vehicle_type', 'TrueOrFalse', 'can_vehicle_type'],
components: { PointDialog, ViewDialog, pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
@@ -483,8 +498,8 @@ export default {
return true
},
[CRUD.HOOK.beforeToCU]() {
this.form.is_has_workder = this.form.is_has_workder.toString()
this.form.is_auto = this.form.is_auto.toString()
this.form.is_lock = this.form.is_lock.toString()
this.form.is_used = this.form.is_used.toString()
},
[CRUD.HOOK.afterToCU]() {
if (this.form.region_code) {

View File

@@ -19,6 +19,8 @@ module.exports = {
lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false,
devServer: {
allowedHosts: ['all'],
disableHostCheck: true,
port: port,
open: false,
overlay: {