fix: 解包上料/下料/工单功能

This commit is contained in:
2025-07-25 15:10:43 +08:00
parent 8dfb0a9007
commit 529d697fe8
15 changed files with 369 additions and 313 deletions

View File

@@ -196,7 +196,7 @@ public class StructattrServiceImpl extends ServiceImpl<StructattrMapper, Structa
dto.setUpdate_time(now);
dto.setUpdate_id(currentUserId);
dto.setUpdate_name(nickName);
Sectattr sectattr = iSectattrService.findById(dto.getSect_id());
Sectattr sectattr = iSectattrService.findByCode(dto.getSect_id());
BsrealStorattr bsrealStorattr = iBsrealStorattrService.findById(sectattr.getStor_id());
dto.setSect_code(sectattr.getSect_code());
dto.setSect_name(sectattr.getSect_name());
@@ -409,7 +409,7 @@ public class StructattrServiceImpl extends ServiceImpl<StructattrMapper, Structa
Structattr structattr = this.getByCode(changeDto.getStructCode());
for (GroupPlate vehicleMater : groupPlates) {
String vehicleCode = vehicleMater.getStoragevehicle_code();
BigDecimal subtract = vehicleMater.getQty().subtract(vehicleMater.getFrozen_qty());
BigDecimal subtract = vehicleMater.getQty().add(vehicleMater.getFrozen_qty());
//100-出50 = 50
//如果出库是手持库出确认则不在这边变动组盘信息
if (!changeDto.getInBound()) {
@@ -417,7 +417,7 @@ public class StructattrServiceImpl extends ServiceImpl<StructattrMapper, Structa
.set("frozen_qty", 0)
.set("qty", subtract)
.set("update_time", now)
.set("status", GROUP_PLATE_STATUS.code("组盘"))
.set("status", GROUP_PLATE_STATUS.code("出库"))
.eq("group_id", vehicleMater.getGroup_id());
iMdPbGroupplateService.update(update);
}

View File

@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.nl.wms.basedata_manage.service.dao.Structattr;
import org.nl.wms.decision_manage.service.strategyConfig.decisioner.Decisioner;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import java.util.List;

View File

@@ -99,10 +99,8 @@ public class PdaJBServiceImpl implements PdaJBService {
@Transactional(rollbackFor = Exception.class)
public PdaResponse callMaterial(JSONObject whereJson) {
log.info("解包叫料,请求参数:{}", whereJson);
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
// workorder_id、area、point_code
String pointCode = whereJson.getString("point_code");
String workorderId = whereJson.getString("workorder_id");
PdmBdWorkorder workorder = workorderService.getById(workorderId);
if (ObjectUtil.isEmpty(workorder)) {
@@ -127,122 +125,76 @@ public class PdaJBServiceImpl implements PdaJBService {
throw new BadRequestException("托盘[" + outStructAttr.getStoragevehicle_code() + "]组盘信息不存在!");
}
// 1、创建出库单、明细、分配明细
// 1.1 单据表
String invId = IdUtil.getStringId();
IOStorInv ioStorInv = new IOStorInv();
ioStorInv.setIostorinv_id(invId);
ioStorInv.setBill_code(CodeUtil.getNewCode("OUT_STORE_CODE"));
ioStorInv.setBiz_date(DateUtil.format(new Date(), "yyyy-MM-dd"));
ioStorInv.setIo_type(IOSEnum.IO_TYPE.code("出库"));
ioStorInv.setDetail_count(1);
ioStorInv.setCreate_mode(IOSEnum.CREATE_MODE.code("终端产生"));
ioStorInv.setStor_id(outStructAttr.getStor_id());
ioStorInv.setStor_code(outStructAttr.getStor_code());
ioStorInv.setStor_name(outStructAttr.getStor_name());
ioStorInv.setBill_status(IOSEnum.BILL_STATUS.code("分配完"));
ioStorInv.setBill_type("1010");
ioStorInv.setIs_delete(BaseDataEnum.IS_YES_NOT.code(""));
ioStorInv.setIs_upload(BaseDataEnum.IS_YES_NOT.code(""));
ioStorInv.setInput_optid(currentUserId);
ioStorInv.setInput_optname(nickName);
ioStorInv.setInput_time(now);
ioStorInv.setUpdate_optid(currentUserId);
ioStorInv.setUpdate_optname(nickName);
ioStorInv.setUpdate_time(now);
ioStorInv.setTotal_qty(BigDecimal.valueOf(1));
ioStorInv.setDetail_count(1);
outBillService.save(ioStorInv);
// 1.2 单据明细
IOStorInvDtl dtl = new IOStorInvDtl();
dtl.setIostorinvdtl_id(IdUtil.getStringId());
dtl.setIostorinv_id(invId);
dtl.setSeq_no("1");
dtl.setMaterial_id(materialbase.getMaterial_id());
dtl.setMaterial_code(materialbase.getMaterial_code());
dtl.setPcsn(groupPlate.getPcsn());
dtl.setBill_status(IOSEnum.BILL_STATUS.code("分配完"));
dtl.setQty_unit_id(groupPlate.getQty_unit_id());
dtl.setQty_unit_name(groupPlate.getQty_unit_name());
dtl.setPlan_qty(BigDecimal.ONE);
dtl.setAssign_qty(BigDecimal.ONE);
dtl.setUnassign_qty(BigDecimal.ZERO);
ioStorInvDtlMapper.insert(dtl);
// 1.3 分配明细
IOStorInvDis ioStorInvDis = new IOStorInvDis();
ioStorInvDis.setIostorinvdis_id(IdUtil.getStringId());
ioStorInvDis.setIostorinv_id(dtl.getIostorinv_id());
ioStorInvDis.setIostorinvdtl_id(dtl.getIostorinvdtl_id());
ioStorInvDis.setSeq_no("1");
ioStorInvDis.setSect_id(outStructAttr.getSect_id());
ioStorInvDis.setPcsn(groupPlate.getPcsn());
ioStorInvDis.setMaterial_id(materialbase.getMaterial_id());
ioStorInvDis.setMaterial_code(materialbase.getMaterial_code());
ioStorInvDis.setSect_name(outStructAttr.getSect_name());
ioStorInvDis.setSect_code(outStructAttr.getSect_code());
ioStorInvDis.setStruct_id(outStructAttr.getStruct_id());
ioStorInvDis.setStruct_name(outStructAttr.getStruct_name());
ioStorInvDis.setStruct_code(outStructAttr.getStruct_code());
ioStorInvDis.setStoragevehicle_code(outStructAttr.getStoragevehicle_code());
ioStorInvDis.setIs_issued(BaseDataEnum.IS_YES_NOT.code(""));
ioStorInvDis.setQty_unit_id(groupPlate.getQty_unit_id());
ioStorInvDis.setQty_unit_name(groupPlate.getQty_unit_name());
ioStorInvDis.setWork_status(IOSEnum.INBILL_DIS_STATUS.code("生成"));
ioStorInvDis.setPlan_qty(groupPlate.getFrozen_qty());
JSONObject insertInvObj = new JSONObject();
JSONArray tableData = new JSONArray();
JSONObject table = new JSONObject();
tableData.add(table);
insertInvObj.put("stor_id", outStructAttr.getStor_id());
insertInvObj.put("stor_code", outStructAttr.getStor_code());
insertInvObj.put("bill_status", "10");
insertInvObj.put("total_qty", workorder.getPlan_weight());
insertInvObj.put("detail_count", 1);
insertInvObj.put("bill_type", "1012");
insertInvObj.put("biz_date", DateUtil.format(new Date(), "yyyy-MM-dd"));
insertInvObj.put("tableData", tableData);
table.put("turnout_struct_code", outStructAttr.getStruct_code());
table.put("turnout_sect_code", outStructAttr.getSect_code());
table.put("turnout_sect_name", outStructAttr.getSect_name());
table.put("sect_id", outStructAttr.getSect_id());
table.put("struct_id", outStructAttr.getStruct_id());
table.put("group_id", groupPlate.getGroup_id());
table.put("storagevehicle_code", outStructAttr.getStoragevehicle_code());
table.put("storagevehicle_type", workorder.getVehicle_type());
table.put("material_id", materialbase.getMaterial_id());
table.put("pcsn", groupPlate.getPcsn());
table.put("qty", groupPlate.getQty());
table.put("qty_unit_id", groupPlate.getQty_unit_id());
table.put("qty_unit_name", groupPlate.getQty_unit_name());
table.put("fronzen_qty", 0);
table.put("status", "01");
table.put("material_code", materialbase.getMaterial_code());
table.put("material_name", materialbase.getMaterial_name());
table.put("material_spec", materialbase.getMaterial_spec());
String invId = outBillService.insertDtl(insertInvObj);
// 调用手工分配
JSONObject param = new JSONObject();
JSONObject row = new JSONObject();
JSONArray rows = new JSONArray();
rows.add(row);
param.put("rows", rows);
IOStorInvDtl dtl = ioStorInvDtlMapper.selectOne(new LambdaQueryWrapper<IOStorInvDtl>()
.eq(IOStorInvDtl::getIostorinv_id, invId));
param.put("row", dtl);
row.put("storagevehicle_code", outStructAttr.getStoragevehicle_code());
row.put("pcsn", groupPlate.getPcsn());
row.put("qty", groupPlate.getQty());
row.put("qty_unit_name", groupPlate.getQty_unit_name());
row.put("frozen_qty", groupPlate.getFrozen_qty());
row.put("struct_id", outStructAttr.getStruct_id());
row.put("struct_code", outStructAttr.getStruct_code());
row.put("struct_name", outStructAttr.getStruct_name());
row.put("sect_id", outStructAttr.getSect_id());
row.put("sect_code", outStructAttr.getSect_code());
row.put("sect_name", outStructAttr.getSect_name());
row.put("material_code", groupPlate.getMaterial_code());
row.put("material_name", groupPlate.getMaterial_name());
row.put("edit", true);
outBillService.manualDiv(param);
// 1.3 仓位锁住
JSONObject lock_map = new JSONObject();
lock_map.put("struct_code", outStructAttr.getStruct_code());
lock_map.put("inv_id", ioStorInv.getIostorinv_id());
lock_map.put("inv_code", ioStorInv.getBill_code());
lock_map.put("inv_type", ioStorInv.getBill_type());
lock_map.put("lock_type", IOSEnum.LOCK_TYPE.code("出库锁"));
iStructattrService.updateStatusByCode("0", lock_map);
//更新组盘表冻结数量状态
iMdPbGroupPlateService.update(new LambdaUpdateWrapper<GroupPlate>()
.set(GroupPlate::getFrozen_qty, "1")
.set(GroupPlate::getUpdate_time, now)
.set(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("出库"))
.eq(GroupPlate::getStoragevehicle_code, outStructAttr.getStoragevehicle_code())
.eq(GroupPlate::getPcsn, groupPlate.getPcsn())
.eq(GroupPlate::getMaterial_id, materialbase.getMaterial_id())
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库")));
// 2、创建任务、下发
// 获取工单对应的区域的出入点
SchBasePoint inPoint = pointService.getNotTaskByRegionAndType(workorder.getRegion_code(), "3");
SchBasePoint outPoint = pointService.getNotTaskByRegionAndType(workorder.getRegion_code(), "4");
if (ObjectUtil.isEmpty(inPoint) || ObjectUtil.isEmpty(outPoint)) {
throw new BadRequestException("解包机输送线点位不存在或者存在任务!");
}
JSONObject task_form = new JSONObject();
task_form.put("task_type", "JbUpAgvTask");
task_form.put("group_id", groupPlate.getGroup_id());
task_form.put("order_id", workorder.getWorkorder_id());
task_form.put("TaskCode", CodeUtil.getNewCode("TASK_CODE"));
task_form.put("point_code1", outStructAttr.getStruct_code());
task_form.put("point_code2", inPoint.getPoint_code());
task_form.put("vehicle_code", outStructAttr.getStoragevehicle_code());
if ("2".equals(outPoint.getPoint_status())) {
// 四点任务
task_form.put("point_code3", outPoint.getPoint_code());
task_form.put("point_code4", outStructAttr.getStruct_code());
task_form.put("vehicle_code2", outPoint.getVehicle_code());
}
String task_id = jbUpAgvTask.create(task_form);
ioStorInvDis.setTask_id(task_id);
ioStorInvDis.setIs_issued(BaseDataEnum.IS_YES_NOT.code(""));
ioStorInvDis.setPoint_code(outStructAttr.getStruct_code());
ioStorInvDisMapper.insert(ioStorInvDis);
// 创建任务
SchBasePoint outPoint = pointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
.eq(SchBasePoint::getParent_point_code, pointCode)
.eq(SchBasePoint::getRegion_code, "CKQ"));
JSONObject taskParam = new JSONObject();
taskParam.put("order_id", workorderId);
taskParam.put("iostorinv_id", invId);
taskParam.put("point_code", outPoint.getPoint_code());
outBillService.allSetPoint(taskParam);
// 3、工单状态修改设置实际开始时间
workorder.setWorkorder_status("3");
workorder.setRealproducestart_date(DateUtil.now());
workorderService.updateById(workorder);
inPoint.setIng_task_code(task_id);
if ("2".equals(outPoint.getPoint_status())) {
outPoint.setIng_task_code(task_id);
}
pointService.updateBatchById(Arrays.asList(inPoint, outPoint));
return PdaResponse.requestOk();
}

View File

@@ -68,6 +68,11 @@ public class SchBasePointController {
public ResponseEntity<Object> getPointList(@RequestBody(required = false) SchBasePoint region) {
return new ResponseEntity<>(schBasePointService.getPointList(region), HttpStatus.OK);
}
@PostMapping("/getPointList2")
@Log("获取区域下拉框")
public ResponseEntity<Object> getPointList2(@RequestBody(required = false) SchBasePoint region) {
return new ResponseEntity<>(schBasePointService.getPointList2(region), HttpStatus.OK);
}
@Log("锁定与解锁")
@PostMapping("/changeLock")

View File

@@ -115,4 +115,6 @@ public interface ISchBasePointService extends IService<SchBasePoint> {
* @return
*/
List<SchBasePoint> getCanUseCFGJs(SchBasePoint parentPoint, String pointStatus);
List<SchBasePoint> getPointList2(SchBasePoint region);
}

View File

@@ -296,4 +296,14 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
return this.baseMapper.getCanUseCFGJs(parentPoint, pointStatus);
}
@Override
public List<SchBasePoint> getPointList2(SchBasePoint region) {
if (ObjectUtil.isEmpty(region)) {
return this.list();
}
return pointMapper.selectList(new LambdaQueryWrapper<SchBasePoint>()
.eq(SchBasePoint::getRegion_code, region.getRegion_code())
.eq(SchBasePoint::getIs_has_workder, true));
}
}

View File

@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.exception.BadRequestException;
@@ -11,6 +12,7 @@ import org.nl.common.utils.IdUtil;
import org.nl.common.utils.SecurityUtils;
import org.nl.wms.pm_manage.service.dao.PdmBdWorkorder;
import org.nl.wms.sch_manage.enums.TaskStatus;
import org.nl.wms.sch_manage.service.ISchBasePointService;
import org.nl.wms.sch_manage.service.ISchBaseTaskService;
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
@@ -41,6 +43,8 @@ public class JbDownAgvTask extends AbstractTask {
private IInBillService inBillService;
@Resource
private IOStorInvDisMapper ioStorInvDisMapper;
@Resource
private ISchBasePointService pointService;
@Override
public String create(JSONObject param) {
// 改造:多条任务
@@ -122,12 +126,36 @@ public class JbDownAgvTask extends AbstractTask {
private void finishTask(SchBaseTask taskObj) {
// 任务完成
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
taskObj.setRemark("已完成");
taskService.updateById(taskObj);
if ("3".equals(taskObj.getTask_group_seq().toString())) {
inBillService.taskFinish(taskObj);
taskObj.setRemark("等待最后一条任务完成");
if ("1".equals(taskObj.getTask_group_seq().toString())) {
// 开盖设置成有盖
SchBasePoint khgPoint = pointService.getById(taskObj.getPoint_code2());
khgPoint.setPoint_status("2");
khgPoint.setUpdate_time(DateUtil.now());
pointService.updateById(khgPoint);
}
if ("2".equals(taskObj.getTask_group_seq().toString())) {
SchBasePoint jbjPoint = pointService.getById(taskObj.getPoint_code1());
jbjPoint.setPoint_status("2");
jbjPoint.setVehicle_code(taskObj.getVehicle_code());
jbjPoint.setUpdate_time(DateUtil.now());
pointService.updateById(jbjPoint);
}
if ("3".equals(taskObj.getTask_group_seq().toString())) {
// 开盖设置成有盖
SchBasePoint khgPoint = pointService.getById(taskObj.getPoint_code2());
khgPoint.setPoint_status("2");
khgPoint.setUpdate_time(DateUtil.now());
pointService.updateById(khgPoint);
SchBaseTask task = new SchBaseTask();
task.setTask_status(TaskStatus.FINISHED.getCode());
task.setRemark("任务执行完毕");
taskService.update(task, new LambdaQueryWrapper<SchBaseTask>()
.eq(SchBaseTask::getTask_group_id, taskObj.getTask_group_id()));
inBillService.taskFinish(taskObj);
return;
}
taskService.updateById(taskObj);
}
@Override

View File

@@ -7,7 +7,8 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.IdUtil;
import org.nl.common.utils.SecurityUtils;
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
import org.nl.wms.basedata_manage.service.IStructattrService;
import org.nl.wms.basedata_manage.service.dao.Structattr;
import org.nl.wms.pm_manage.service.IPdmBdWorkorderService;
import org.nl.wms.pm_manage.service.dao.PdmBdWorkorder;
import org.nl.wms.sch_manage.enums.TaskStatus;
@@ -23,13 +24,13 @@ import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInvDis;
import org.nl.wms.warehouse_manage.inAndOut.service.dao.mapper.IOStorInvDisMapper;
import org.nl.wms.warehouse_manage.service.IMdPbGroupplateService;
import org.nl.wms.warehouse_manage.service.dao.GroupPlate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* 解包上料AGV任务
*
* @Author: lyd
* @Date: 2025/7/22
*/
@@ -47,6 +48,9 @@ public class JbUpAgvTask extends AbstractTask {
private ISchBasePointService pointService;
@Resource
private IMdPbGroupplateService groupplateService;
@Resource
private IStructattrService structattrService;
@Override
public String create(JSONObject json) {
SchBaseTask task = new SchBaseTask();
@@ -103,17 +107,17 @@ public class JbUpAgvTask extends AbstractTask {
// 取消任务
taskService.update(new LambdaUpdateWrapper<SchBaseTask>()
.set(SchBaseTask::getTask_status, TaskStatus.CANCELED.getCode())
.set(SchBaseTask::getRemark,"已取消")
.eq(SchBaseTask::getTask_id,taskObj.getTask_id())
.set(SchBaseTask::getRemark, "已取消")
.eq(SchBaseTask::getTask_id, taskObj.getTask_id())
);
//分配表清除任务
ioStorInvDisMapper.update(new IOStorInvDis(),new LambdaUpdateWrapper<>(IOStorInvDis.class)
.set(IOStorInvDis::getTask_id,null)
.set(IOStorInvDis::getPoint_code,null)
.set(IOStorInvDis::getIs_issued,0)
ioStorInvDisMapper.update(new IOStorInvDis(), new LambdaUpdateWrapper<>(IOStorInvDis.class)
.set(IOStorInvDis::getTask_id, null)
.set(IOStorInvDis::getPoint_code, null)
.set(IOStorInvDis::getIs_issued, 0)
.set(IOStorInvDis::getWork_status, IOSEnum.INBILL_DIS_STATUS.code("未生成"))
.eq(IOStorInvDis::getTask_id,taskObj.getTask_id())
.eq(IOStorInvDis::getTask_id, taskObj.getTask_id())
);
}
@@ -126,16 +130,18 @@ public class JbUpAgvTask extends AbstractTask {
// 工单完成
JSONObject requestParam = JSONObject.parseObject(taskObj.getRequest_param());
String orderId = requestParam.getString("order_id");
workorderService.update(new LambdaUpdateWrapper<PdmBdWorkorder>()
.set(PdmBdWorkorder::getWorkorder_status, "4")
.set(PdmBdWorkorder::getReal_qty, 1)
.set(PdmBdWorkorder::getRealproduceend_date, DateUtil.now())
.eq(PdmBdWorkorder::getWorkorder_id, orderId));
if (ObjectUtil.isNotEmpty(orderId)) {
workorderService.update(new LambdaUpdateWrapper<PdmBdWorkorder>()
.set(PdmBdWorkorder::getWorkorder_status, "4")
.set(PdmBdWorkorder::getReal_qty, 1)
.set(PdmBdWorkorder::getRealproduceend_date, DateUtil.now())
.eq(PdmBdWorkorder::getWorkorder_id, orderId));
}
// 点位设置值
pointService.update(new LambdaUpdateWrapper<SchBasePoint>()
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
.set(SchBasePoint::getPoint_status, "3")
.set(SchBasePoint::getIng_task_code, "")
.set(SchBasePoint::getIng_task_code, null)
.set(SchBasePoint::getUpdate_id, SecurityUtils.getCurrentUserId())
.set(SchBasePoint::getUpdate_name, SecurityUtils.getCurrentNickName())
.set(SchBasePoint::getUpdate_time, DateUtil.now())
@@ -143,22 +149,18 @@ public class JbUpAgvTask extends AbstractTask {
if (ObjectUtil.isNotEmpty(taskObj.getPoint_code3())) {
pointService.update(new LambdaUpdateWrapper<SchBasePoint>()
.set(SchBasePoint::getVehicle_code, "")
.set(SchBasePoint::getIng_task_code, "")
.set(SchBasePoint::getIng_task_code, null)
.set(SchBasePoint::getPoint_status, "1")
.set(SchBasePoint::getUpdate_id, SecurityUtils.getCurrentUserId())
.set(SchBasePoint::getUpdate_name, SecurityUtils.getCurrentNickName())
.set(SchBasePoint::getUpdate_time, DateUtil.now())
.eq(SchBasePoint::getPoint_code, taskObj.getPoint_code3()));
// 仓位设置空托盘
structattrService.update(new LambdaUpdateWrapper<Structattr>()
.set(Structattr::getStoragevehicle_code, taskObj.getVehicle_code2())
.set(Structattr::getOccupancy_state, 2)
.eq(Structattr::getStruct_code, taskObj.getPoint_code4()));
}
groupplateService.update(new LambdaUpdateWrapper<GroupPlate>()
.set(GroupPlate::getFrozen_qty, "1")
.set(GroupPlate::getUpdate_time, DateUtil.now())
.set(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("出库"))
.eq(GroupPlate::getStoragevehicle_code, taskObj.getVehicle_code())
// .eq(GroupPlate::getPcsn, w.getPcsn())
// .eq(GroupPlate::getMaterial_id, materialbase.getMaterial_id())
.eq(GroupPlate::getStatus,IOSEnum.GROUP_PLATE_STATUS.code("入库")));
}
@Override

View File

@@ -556,8 +556,8 @@ public class InBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv> i
SchBasePoint intoPoint = pointService.getNotTaskByRegionAndType(parentPoint.getRegion_code(), "2");
SchBasePoint emptyPoint = pointService.getNotTaskByRegionAndType(parentPoint.getRegion_code(), "5");
SchBasePoint fullPoint = pointService.getNotTaskByRegionAndType(parentPoint.getRegion_code(), "6");
// 获取盖子的对应的点位
List<SchBasePoint> canUseCFGJs = pointService.getCanUseCFGJs(parentPoint, "2");
// 获取盖子的对应的点位
List<SchBasePoint> canUseCFGJs = pointService.getCanUseCFGJs(parentPoint, "1");
if (canUseCFGJs.size() == 0) {
throw new BadRequestException("找不到可用的拆封盖机");
}
@@ -619,7 +619,7 @@ public class InBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv> i
List<JSONObject> jsonObjects = Arrays.asList(task1, task2, task3);
JSONObject requestTaskParam = new JSONObject();
requestTaskParam.put("tasks", jsonObjects);
jbDownAgvTask.create(requestTaskParam);
task_id = jbDownAgvTask.create(requestTaskParam);
} else {
//创建任务
JSONObject task_form = new JSONObject();

View File

@@ -28,11 +28,13 @@ import org.nl.wms.basedata_manage.service.dto.StrategyStructMaterialVO;
import org.nl.wms.basedata_manage.service.dto.StrategyStructParam;
import org.nl.wms.basedata_manage.service.dto.StructattrChangeDto;
import org.nl.wms.sch_manage.enums.TaskStatus;
import org.nl.wms.sch_manage.service.ISchBasePointService;
import org.nl.wms.sch_manage.service.ISchBaseTaskService;
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
import org.nl.wms.sch_manage.service.dao.mapper.SchBasePointMapper;
import org.nl.wms.sch_manage.service.util.tasks.StOutTask;
import org.nl.wms.sch_manage.service.util.tasks.jb.JbUpAgvTask;
import org.nl.wms.warehouse_manage.enums.IOSConstant;
import org.nl.wms.warehouse_manage.enums.IOSEnum;
import org.nl.wms.warehouse_manage.service.IMdPbGroupplateService;
@@ -46,6 +48,7 @@ import org.nl.wms.warehouse_manage.inAndOut.service.dao.mapper.IOStorInvDtlMappe
import org.nl.wms.warehouse_manage.inAndOut.service.dao.mapper.IOStorInvMapper;
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDisDto;
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDtlDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -69,6 +72,8 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
@Resource
private IStructattrService iStructattrService;
@Resource
private ISchBasePointService pointService;
/**
* 载具扩展属性mapper
@@ -94,6 +99,8 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
@Resource
private IMdPbGroupplateService iMdPbGroupPlateService;
@Autowired
private JbUpAgvTask jbUpAgvTask;
@Override
@@ -575,7 +582,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
ioStorInvDis.setSect_id(outAllocation.getSect_id());
ioStorInvDis.setPcsn(outAllocation.getPcsn());
ioStorInvDis.setMaterial_id(outAllocation.getMaterial_id());
ioStorInvDis.setMaterial_code(outAllocation.getMaterial_code());
// ioStorInvDis.setMaterial_code(outAllocation.getMaterial_code());
ioStorInvDis.setSect_name(outAllocation.getSect_name());
ioStorInvDis.setSect_code(outAllocation.getSect_code());
ioStorInvDis.setStruct_id(outAllocation.getStruct_id());
@@ -753,7 +760,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
double allocation_canuse_qty = 0;
for (int i = 0; i < rows.size(); i++){
JSONObject ivt = rows.getJSONObject(i);
double canuse_qty = ivt.getDoubleValue("canuse_qty");
double canuse_qty = ivt.getDoubleValue("qty");
//分配明细
IOStorInvDis ioStorInvDis = new IOStorInvDis();
ioStorInvDis.setIostorinvdis_id(IdUtil.getStringId());
@@ -763,6 +770,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
ioStorInvDis.setSect_id(ivt.getString("sect_id"));
ioStorInvDis.setPcsn(ivt.getString("pcsn"));
ioStorInvDis.setMaterial_id(dtl.getMaterial_id());
ioStorInvDis.setMaterial_code(dtl.getMaterial_code());
ioStorInvDis.setSect_name(ivt.getString("sect_name"));
ioStorInvDis.setSect_code(ivt.getString("sect_code"));
ioStorInvDis.setStruct_id(ivt.getString("struct_id"));
@@ -952,19 +960,49 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
if (ObjectUtil.isEmpty(ioStorInvDisList)){
throw new BadRequestException("当前没有可设置的分配明细");
}
String task_id = "";
for (IOStorInvDis ioStorInvDis:ioStorInvDisList){
//创建任务
JSONObject task_form = new JSONObject();
task_form.put("task_type", "STOutTask");
task_form.put("TaskCode",CodeUtil.getNewCode("TASK_CODE"));
task_form.put("PickingLocation", ioStorInvDis.getStruct_code());
task_form.put("PlacedLocation", point_code);
task_form.put("vehicle_code", ioStorInvDis.getStoragevehicle_code());
if ("1012".equals(ioStorInv.getBill_type())) {
// 解包需要单独操作
SchBasePoint ckPoint = pointService.getById(point_code);
SchBasePoint outPointP = pointService.getById(ckPoint.getParent_point_code());
SchBasePoint inPoint = pointService.getNotTaskByRegionAndType(outPointP.getRegion_code(), "3");
SchBasePoint outPoint = pointService.getNotTaskByRegionAndType(outPointP.getRegion_code(), "4");
if (ObjectUtil.isEmpty(inPoint) || ObjectUtil.isEmpty(outPoint)) {
throw new BadRequestException("解包机输送线点位不存在或者存在任务!");
}
JSONObject task_form = new JSONObject();
task_form.put("task_type", "JbUpAgvTask");
task_form.put("order_id", whereJson.getString("order_id"));
task_form.put("TaskCode", CodeUtil.getNewCode("TASK_CODE"));
task_form.put("point_code1", ioStorInvDis.getStruct_code());
task_form.put("point_code2", inPoint.getPoint_code());
task_form.put("vehicle_code", ioStorInvDis.getStoragevehicle_code());
if ("2".equals(outPoint.getPoint_status())) {
// 四点任务
task_form.put("point_code3", outPoint.getPoint_code());
task_form.put("point_code4", ioStorInvDis.getStruct_code());
task_form.put("vehicle_code2", outPoint.getVehicle_code());
}
task_id = jbUpAgvTask.create(task_form);
inPoint.setIng_task_code(task_id);
if ("2".equals(outPoint.getPoint_status())) {
outPoint.setIng_task_code(task_id);
}
pointService.updateBatchById(Arrays.asList(inPoint, outPoint));
} else {
//创建任务
JSONObject task_form = new JSONObject();
task_form.put("task_type", "STOutTask");
task_form.put("TaskCode",CodeUtil.getNewCode("TASK_CODE"));
task_form.put("PickingLocation", ioStorInvDis.getStruct_code());
task_form.put("PlacedLocation", point_code);
task_form.put("vehicle_code", ioStorInvDis.getStoragevehicle_code());
StOutTask stOutTask = SpringContextHolder.getBean("STOutTask");
StOutTask stOutTask = SpringContextHolder.getBean("STOutTask");
String task_id = stOutTask.create(task_form);
task_id = stOutTask.create(task_form);
}
//分配明细表更新任务相关数据
IOStorInvDis dis = new IOStorInvDis();

View File

@@ -2,62 +2,62 @@
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<el-row>
<el-col :span="4">
物料查询
<el-input
v-model="query.material_code"
clearable
style="width: 150px"
size="mini"
placeholder="物料编码、名称"
@keyup.enter.native="crud.toQuery"
<el-row>
<el-col :span="4">
物料查询
<el-input
v-model="query.material_code"
clearable
style="width: 150px"
size="mini"
placeholder="物料编码、名称"
@keyup.enter.native="crud.toQuery"
/>
</el-col>
<el-col :span="4">
批次查询
<el-input
v-model="query.pcsn"
clearable
style="width: 150px"
size="mini"
placeholder="批次"
@keyup.enter.native="crud.toQuery"
/>
</el-col>
<el-col :span="4">
载具编码
<el-input
v-model="query.storagevehicle_code"
clearable
style="width: 150px"
size="mini"
placeholder="载具编码"
@keyup.enter.native="crud.toQuery"
/>
</el-col>
<el-col :span="4">
组盘状态
<el-select
v-model="query.status"
clearable
style="width: 150px"
size="mini"
placeholder="状态"
class="filter-item"
@change="crud.toQuery"
>
<el-option
v-for="item in dict.GROUP_STATUS"
:label="item.label"
:value="item.value"
/>
</el-col>
<el-col :span="4">
批次查询
<el-input
v-model="query.pcsn"
clearable
style="width: 150px"
size="mini"
placeholder="批次"
@keyup.enter.native="crud.toQuery"
/>
</el-col>
<el-col :span="4">
载具编码
<el-input
v-model="query.storagevehicle_code"
clearable
style="width: 150px"
size="mini"
placeholder="载具编码"
@keyup.enter.native="crud.toQuery"
/>
</el-col>
<el-col :span="4">
组盘状态
<el-select
v-model="query.status"
clearable
style="width: 150px"
size="mini"
placeholder="状态"
class="filter-item"
@change="crud.toQuery"
>
<el-option
v-for="item in dict.GROUP_STATUS"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="4">
<rrOperation />
</el-col>
</el-row>
</el-select>
</el-col>
<el-col :span="4">
<rrOperation />
</el-col>
</el-row>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<!--新增表格-->
@@ -71,19 +71,19 @@
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px">
<el-row>
<el-col :span="8">
<el-form-item label="物料编码" prop="material_code" >
<el-input v-model="form.material_code" @focus="getMaterial" style="width: 200px;" :disabled="crud.status.edit > 0" />
<el-form-item label="物料编码" prop="material_code">
<el-input v-model="form.material_code" style="width: 200px;" :disabled="crud.status.edit > 0" @focus="getMaterial" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="物料名称" prop="material_name">
<el-input disabled v-model="form.material_name" style="width: 200px;" />
<el-form-item label="物料名称" prop="material_name">
<el-input v-model="form.material_name" disabled style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="规格" prop="material_spec">
<el-form-item label="规格" prop="material_spec">
<label slot="label">规&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;格</label>
<el-input disabled v-model="form.material_spec" style="width: 200px;" />
<el-input v-model="form.material_spec" disabled style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
@@ -154,7 +154,13 @@
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
<el-table-column prop="pcsn" label="批次" :min-width="flexWidth('pcsn',crud.data,'批次')" />
<el-table-column prop="status" label="状态" :formatter="formattStatus" :min-width="flexWidth('status',crud.data,'状态')" />
<el-table-column prop="qty" label="组盘数量" :formatter="crud.formatNum3" :min-width="100" />
<el-table-column prop="qty" label="可用数" :formatter="crud.formatNum3" :min-width="100" />
<el-table-column prop="frozen_qty" label="冻结数" :formatter="crud.formatNum3" :min-width="100" />
<el-table-column label="总数" :formatter="crud.formatNum3" :min-width="100">
<template slot-scope="scope">
{{ parseFloat(scope.row.qty + scope.row.frozen_qty).toFixed(3) }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
<el-table-column prop="create_name" label="组盘人" :min-width="flexWidth('create_name',crud.data,'组盘人')" />
<el-table-column prop="create_time" label="组盘时间" :min-width="flexWidth('create_time',crud.data,'组盘时间')" />

View File

@@ -93,16 +93,16 @@
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
<!-- <el-button-->
<!-- slot="right"-->
<!-- class="filter-item"-->
<!-- type="warning"-->
<!-- icon="el-icon-check"-->
<!-- size="mini"-->
<!-- @click="openOneCreate"-->
<!-- >-->
<!-- 一键生成-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- slot="right"-->
<!-- class="filter-item"-->
<!-- type="warning"-->
<!-- icon="el-icon-check"-->
<!-- size="mini"-->
<!-- @click="openOneCreate"-->
<!-- >-->
<!-- 一键生成-->
<!-- </el-button>-->
</crudOperation>
<!--表单组件-->
@@ -272,16 +272,16 @@
{{ dict.label.placement_type[scope.row.placement_type] }}
</template>
</el-table-column>
<el-table-column label="是否启用" align="center" prop="is_used">
<template slot-scope="scope">
<el-switch
:value="format_is_used(scope.row.is_used)"
active-color="#409EFF"
inactive-color="#F56C6C"
@change="changeEnabled(scope.row, scope.row.is_used)"
/>
</template>
</el-table-column>
<!-- <el-table-column label="是否启用" align="center" prop="is_used">-->
<!-- <template slot-scope="scope">-->
<!-- <el-switch-->
<!-- :value="format_is_used(scope.row.is_used)"-->
<!-- active-color="#409EFF"-->
<!-- inactive-color="#F56C6C"-->
<!-- @change="changeEnabled(scope.row, scope.row.is_used)"-->
<!-- />-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="taskdtl_type" label="锁定任务类型" width="150" :formatter="taskdtl_typeFormat" />
<el-table-column prop="task_code" label="锁定任务编码" width="150" />
<el-table-column prop="inv_code" label="锁定单据编码" width="150" />
@@ -305,7 +305,7 @@
<!--分页组件-->
<pagination />
</div>
<!-- <OneCreateDialog :dialog-show.sync="openOneCreateDialog" />-->
<!-- <OneCreateDialog :dialog-show.sync="openOneCreateDialog" />-->
</div>
</template>

View File

@@ -61,27 +61,27 @@
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
<!-- <el-button-->
<!-- slot="right"-->
<!-- class="filter-item"-->
<!-- type="success"-->
<!-- icon="el-icon-position"-->
<!-- size="mini"-->
<!-- :disabled="!(crud.selections[0]) || crud.selections[1]"-->
<!-- @click="submits(crud.selections[0])"-->
<!-- >-->
<!-- 开工-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- slot="right"-->
<!-- class="filter-item"-->
<!-- type="success"-->
<!-- icon="el-icon-position"-->
<!-- size="mini"-->
<!-- @click="synchronize()"-->
<!-- >-->
<!-- 同步-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- slot="right"-->
<!-- class="filter-item"-->
<!-- type="success"-->
<!-- icon="el-icon-position"-->
<!-- size="mini"-->
<!-- :disabled="!(crud.selections[0]) || crud.selections[1]"-->
<!-- @click="submits(crud.selections[0])"-->
<!-- >-->
<!-- 开工-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- slot="right"-->
<!-- class="filter-item"-->
<!-- type="success"-->
<!-- icon="el-icon-position"-->
<!-- size="mini"-->
<!-- @click="synchronize()"-->
<!-- >-->
<!-- 同步-->
<!-- </el-button>-->
<el-button
slot="right"
class="filter-item"
@@ -233,14 +233,14 @@
@focus="getProductionOrder(form.material_id)"
/>
</el-form-item>
<!-- <el-form-item label="静置时间(分钟)" prop="standing_time">-->
<!-- <el-input-number-->
<!-- v-model.number="form.standing_time"-->
<!-- :min="0"-->
<!-- :max="999"-->
<!-- style="width: 240px;"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="静置时间(分钟)" prop="standing_time">-->
<!-- <el-input-number-->
<!-- v-model.number="form.standing_time"-->
<!-- :min="0"-->
<!-- :max="999"-->
<!-- style="width: 240px;"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item v-if="crud.status.edit" label="实际数量" prop="real_qty">
<el-input-number
v-model.number="form.real_qty"
@@ -290,18 +290,18 @@
<el-form-item v-if="false" label="工单类型" prop="workorder_type">
<el-input v-model="form.workorder_type" style="width: 240px;" />
</el-form-item>
<!-- <el-form-item label="是否自动搬运" prop="is_needmove">-->
<!-- <el-radio-group v-model="form.is_needmove" 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="是否加急" prop="is_needmove">-->
<!-- <el-radio-group v-model="form.is_urgent" 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="是否自动搬运" prop="is_needmove">-->
<!-- <el-radio-group v-model="form.is_needmove" 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="是否加急" prop="is_needmove">-->
<!-- <el-radio-group v-model="form.is_urgent" style="width: 240px">-->
<!-- <el-radio :label="true">是</el-radio>-->
<!-- <el-radio :label="false">否</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
@@ -437,7 +437,8 @@
<MaterialDialog
:dialog-show.sync="materialDialog"
:flag="flag"
@tableChanged="tableChanged"/>
@tableChanged="tableChanged"
/>
</div>
</template>
@@ -600,7 +601,7 @@ export default {
const param = {
region_code: this.regionCodeParam
}
crudSchBasePoint.getPointList(param).then(res => {
crudSchBasePoint.getPointList2(param).then(res => {
this.pointList = res
this.regionCodeParam = null
})

View File

@@ -37,12 +37,12 @@
<el-form-item label="区域类型">
<el-select
v-model="query.region_code"
@clear="handleClear"
clearable
filterable
size="mini"
placeholder="区域类型"
class="filter-item"
@clear="handleClear"
@change="getPointStatusAndTypeList(query.region_code, 1)"
>
<el-option
@@ -109,7 +109,7 @@
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" >
<crudOperation :permission="permission">
<el-button
v-if="crud.query.is_used == 'false'"
slot="right"
@@ -230,7 +230,7 @@
</el-select>
</el-form-item>
<el-form-item label="父类编码" prop="vehicle_code">
<el-input v-model="form.parent_point_code" clearable style="width: 370px;" @focus="getParentPoint"/>
<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 !== '1'" label="载具编码" prop="vehicle_code">
<el-input v-model="form.vehicle_code" clearable style="width: 370px;" />
@@ -241,8 +241,8 @@
v-for="item in dict.storagevehicle_type"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="可放载具类型" prop="can_vehicle_types">
@@ -251,12 +251,12 @@
v-for="item in dict.storagevehicle_type"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="载具数量" prop="vehicle_qty">
<el-input-number style="width: 370px;" :controls="false" class="clear-number-input" v-model="form.vehicle_qty" :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 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>
@@ -281,25 +281,25 @@
<el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',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="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_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_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_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="vehicle_type" label="当前载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型', 30)">
<template slot-scope="scope">
{{ dict.label.storagevehicle_type[scope.row.vehicle_type] }}
</template>
</el-table-column>
<el-table-column prop="can_vehicle_type" label="可放载具类型" :min-width="flexWidth('can_vehicle_type',crud.data,'载具类型', 30)">
<template slot-scope="scope">
{{ dict.label.storagevehicle_type[scope.row.can_vehicle_type] }}
</template>
</el-table-column>
<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 label="是否锁定" :min-width="flexWidth('vehicle_qty',crud.data,'是否锁定')">
<template slot-scope="scope">
{{scope.row.ing_task_code?'是':'否'}}
{{ scope.row.ing_task_code?'是':'否' }}
</template>
</el-table-column>
<el-table-column prop="can_vehicle_type" label="可放载具类型" :min-width="flexWidth('can_vehicle_type',crud.data,'载具类型', 30)">
<template slot-scope="scope">
{{ getVehicleTypeLabel(scope.row.can_vehicle_type) }}
</template>
</el-table-column>
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'载具数量')" />
@@ -307,22 +307,22 @@
<el-table-column prop="material_spec" label="物料规格" :min-width="flexWidth('material_spec',crud.data,'载具数量')" />
<el-table-column prop="material_model" label="物料型号" :min-width="flexWidth('material_model',crud.data,'载具数量')" />
<el-table-column prop="material_qty" label="物料数量" :min-width="flexWidth('material_qty',crud.data,'载具数量')" />
<el-table-column prop="parent_point_code" label="父点位编码" :min-width="flexWidth('parent_point_code',crud.data,'父点位编码')"/>
<el-table-column prop="parent_point_code" label="父点位编码" :min-width="flexWidth('parent_point_code',crud.data,'父点位编码')" />
<el-table-column prop="ing_task_code" label="在执行的任务标识" :min-width="flexWidth('ing_task_code',crud.data,'在执行的任务标识')" />
<el-table-column prop="is_has_workder" label="是否有工单" :min-width="flexWidth('is_has_workder',crud.data,'是否有工单')">
<template slot-scope="scope">
{{scope.row.is_has_workder?'是':'否'}}
{{ scope.row.is_has_workder?'是':'否' }}
</template>
</el-table-column>
<el-table-column prop="is_auto" label="是否自动" :min-width="flexWidth('is_auto',crud.data,'是否自动')">
<template slot-scope="scope">
{{scope.row.is_auto?'是':'否'}}
{{ scope.row.is_auto?'是':'否' }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
<el-table-column prop="is_used" label="是否启用" :min-width="flexWidth('is_used',crud.data,'是否启用')">
<template slot-scope="scope">
{{scope.row.is_used?'是':'否'}}
{{ scope.row.is_used?'是':'否' }}
</template>
</el-table-column>
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
@@ -351,8 +351,8 @@
<!--分页组件-->
<pagination />
</div>
<ViewDialog ref="viewDialog"/>
<PointDialog :dialog-show.sync="pointDialog" :is-single="false" @tableChanged="tableChanged"/>
<ViewDialog ref="viewDialog" />
<PointDialog :dialog-show.sync="pointDialog" :is-single="false" @tableChanged="tableChanged" />
</div>
</template>
@@ -468,6 +468,12 @@ export default {
this.getPointStatusAndTypeList(this.form.region_code, 2)
}
},
getVehicleTypeLabel(value) {
if (!value) return ''
const types = value.toString().split(',').map(item => item.trim())
const labels = types.map(type => this.dict.label.storagevehicle_type[type] || '未知')
return labels.join(', ')
},
hand(value) {
this.crud.toQuery()
},

View File

@@ -39,6 +39,13 @@ export function getPointList(data) {
data
})
}
export function getPointList2(data) {
return request({
url: 'api/schBasePoint/getPointList2',
method: 'post',
data
})
}
export function changeLock(data) {
return request({
@@ -48,4 +55,4 @@ export function changeLock(data) {
})
}
export default { add, edit, del, changeUsed, getPointList, changeLock }
export default { add, edit, del, changeUsed, getPointList, getPointList2, changeLock }