opt: 自测生箔到烘箱到分切
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.nl.wms.ext.acs.service.impl;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -166,7 +167,15 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
|
||||
@Override
|
||||
public JSONObject actionFinishRequest2(JSONObject param) {
|
||||
return null;
|
||||
String taskCode = param.getString("task_code");
|
||||
Assert.notBlank(taskCode, "任务编码不能为空");
|
||||
SchBaseTask task = taskService.getByCode(taskCode);
|
||||
AbstractTask factoryTask = taskFactory.getTask(task.getConfig_code());
|
||||
factoryTask.agvPickUpCompleted(task);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "取货完成请求成功!");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -202,6 +202,7 @@ public class RawFoilPdaServiceImpl implements RawFoilPdaService {
|
||||
param.put("device_code", pointCode);
|
||||
param.put("workorder_id", rawOrder.getWorkorder_id());
|
||||
param.put("ext_code", sbPoint.getExt_code());
|
||||
param.put("vehicle_code2", sbPoint.getExt_code());
|
||||
param.put("create_mode", GeneralDefinition.PDA_CREATION);
|
||||
// 判断是否呼叫空辊
|
||||
if (GeneralDefinition.YES.equals(isCallEmpty)) {
|
||||
|
||||
@@ -118,7 +118,6 @@ public class SlitterPdaServiceImpl implements SlitterPdaService {
|
||||
// 获取对应任务
|
||||
SchBaseTask task = taskService.getTaskByPointCodeX(null, pointCode, null, null);
|
||||
if (ObjectUtil.isEmpty(task)) {
|
||||
log.error("该点查不到任务!");
|
||||
throw new BadRequestException("该点查不到任务!");
|
||||
}
|
||||
//下发ACS,执行AGV动作
|
||||
|
||||
@@ -56,7 +56,7 @@ public class PdmBiSlittingproductionplanServiceImpl extends ServiceImpl<PdmBiSli
|
||||
*/
|
||||
@Override
|
||||
public IPage<PdmBiSlittingproductionplan> query(Map whereJson, PageQuery page) {
|
||||
IPage<PdmBiSlittingproductionplan> resultPage = new Page<>(page.getPage(), page.getSize());
|
||||
IPage<PdmBiSlittingproductionplan> resultPage = new Page<>(page.getPage() + 1, page.getSize());
|
||||
LambdaQueryWrapper<PdmBiSlittingproductionplan> queryWrapper = new LambdaQueryWrapper<>();
|
||||
if (whereJson.containsKey("order_type")) {
|
||||
queryWrapper.eq(PdmBiSlittingproductionplan::getOrder_type, whereJson.get("order_type"));
|
||||
|
||||
@@ -89,6 +89,24 @@ public interface IstIvtHotpointivtService extends IService<StIvtHotpointivt> {
|
||||
* @return /
|
||||
*/
|
||||
List<StIvtHotpointivt> getNeedBakingPoint();
|
||||
|
||||
/**
|
||||
* 获取不需要烘烤的点位
|
||||
* @return
|
||||
*/
|
||||
List<StIvtHotpointivt> getNoBakingPoint();
|
||||
|
||||
/**
|
||||
* 获取烘烤完毕的点
|
||||
* @return
|
||||
*/
|
||||
List<StIvtHotpointivt> getBakedFinishPoint();
|
||||
|
||||
/**
|
||||
* 获取需要出烘箱到暂存的点位
|
||||
* @return
|
||||
*/
|
||||
List<StIvtHotpointivt> getUnionBakedFinishPoint();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,4 +20,10 @@ public interface StIvtHotpointivtMapper extends BaseMapper<StIvtHotpointivt> {
|
||||
JSONArray getHotDeviceInfoForAcs(String productArea);
|
||||
|
||||
List<StIvtHotpointivt> getNeedBakingPoint();
|
||||
|
||||
List<StIvtHotpointivt> getNoBakingPoint();
|
||||
|
||||
List<StIvtHotpointivt> getBakedFinishPoint();
|
||||
|
||||
List<StIvtHotpointivt> getUnionBakedFinishPoint();
|
||||
}
|
||||
|
||||
@@ -34,13 +34,42 @@
|
||||
AND ivt.product_area = #{productArea}
|
||||
</select>
|
||||
<select id="getNeedBakingPoint" resultType="org.nl.wms.pdm.ivt.hot.service.dao.StIvtHotpointivt">
|
||||
SELECT
|
||||
hot.*
|
||||
FROM
|
||||
`st_ivt_hotpointivt` hot
|
||||
SELECT hot.*
|
||||
FROM `st_ivt_hotpointivt` hot
|
||||
LEFT JOIN pdm_bi_rawfoilworkorder raw ON hot.workorder_id = raw.workorder_id
|
||||
WHERE
|
||||
raw.is_baking = '1' AND hot.point_status = '03'
|
||||
WHERE raw.is_baking = '1'
|
||||
AND hot.point_status = '03'
|
||||
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.point_code1 = hot.point_code AND t.task_status <![CDATA[ < ]]> '07')
|
||||
ORDER BY hot.update_time
|
||||
</select>
|
||||
<select id="getNoBakingPoint" resultType="org.nl.wms.pdm.ivt.hot.service.dao.StIvtHotpointivt">
|
||||
SELECT hot.*
|
||||
FROM `st_ivt_hotpointivt` hot
|
||||
LEFT JOIN pdm_bi_rawfoilworkorder raw ON hot.workorder_id = raw.workorder_id
|
||||
WHERE raw.is_baking = '0'
|
||||
AND hot.point_status = '03'
|
||||
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.point_code1 = hot.point_code AND t.task_status <![CDATA[ < ]]> '07')
|
||||
ORDER BY hot.update_time
|
||||
</select>
|
||||
<select id="getBakedFinishPoint" resultType="org.nl.wms.pdm.ivt.hot.service.dao.StIvtHotpointivt">
|
||||
SELECT hot.*
|
||||
FROM `st_ivt_hotpointivt` hot
|
||||
WHERE hot.point_status = '04'
|
||||
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.point_code1 = hot.point_code AND t.task_status <![CDATA[ < ]]> '07')
|
||||
ORDER BY hot.update_time
|
||||
</select>
|
||||
<select id="getUnionBakedFinishPoint" resultType="org.nl.wms.pdm.ivt.hot.service.dao.StIvtHotpointivt">
|
||||
SELECT hot.*
|
||||
FROM `st_ivt_hotpointivt` hot
|
||||
LEFT JOIN pdm_bi_rawfoilworkorder raw ON hot.workorder_id = raw.workorder_id
|
||||
WHERE raw.is_baking = '0'
|
||||
AND hot.point_status = '03'
|
||||
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.point_code1 = hot.point_code AND t.task_status <![CDATA[ < ]]> '07')
|
||||
UNION
|
||||
SELECT hot.*
|
||||
FROM `st_ivt_hotpointivt` hot
|
||||
WHERE hot.point_status = '04'
|
||||
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.point_code1 = hot.point_code AND t.task_status <![CDATA[ < ]]> '07')
|
||||
ORDER BY update_time
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -1,26 +1,27 @@
|
||||
package org.nl.wms.pdm.ivt.hot.service.impl;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.pdm.ivt.hot.service.IstIvtHotpointivtService;
|
||||
import org.nl.wms.pdm.ivt.hot.service.dao.StIvtHotpointivt;
|
||||
import org.nl.wms.pdm.ivt.hot.service.dao.dto.StIvtHotpointivtParam;
|
||||
import org.nl.wms.pdm.ivt.hot.service.dao.mapper.StIvtHotpointivtMapper;
|
||||
import org.nl.wms.pdm.ivt.hot.service.IstIvtHotpointivtService;
|
||||
import org.nl.wms.storage_manage.ios.enums.IOSEnum;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@@ -45,13 +46,23 @@ public class StIvtHotpointivtServiceImpl extends ServiceImpl<StIvtHotpointivtMap
|
||||
*/
|
||||
@Override
|
||||
public IPage<StIvtHotpointivt> query(Map whereJson, PageQuery page) {
|
||||
IPage<StIvtHotpointivt> resultPage = new Page<>(page.getPage(), page.getSize());
|
||||
String pointCode = ObjectUtil.isNotEmpty(whereJson.get("point_code"))
|
||||
? (String) whereJson.get("point_code") : null;
|
||||
String pointStatus = ObjectUtil.isNotEmpty(whereJson.get("point_status"))
|
||||
? (String) whereJson.get("point_status") : null;
|
||||
String productArea = ObjectUtil.isNotEmpty(whereJson.get("product_area"))
|
||||
? (String) whereJson.get("product_area") : null;
|
||||
String isUsed = ObjectUtil.isNotEmpty(whereJson.get("is_used"))
|
||||
? (String) whereJson.get("is_used") : null;
|
||||
String pointLocation = ObjectUtil.isNotEmpty(whereJson.get("point_location"))
|
||||
? (String) whereJson.get("point_location") : null;
|
||||
IPage<StIvtHotpointivt> resultPage = new Page<>(page.getPage() + 1, page.getSize());
|
||||
LambdaQueryWrapper<StIvtHotpointivt> queryWrapper = new LambdaQueryWrapper<>();
|
||||
// if (whereJson.containsKey("name")) {
|
||||
// queryWrapper.like(StIvtHotpointivt::getName, whereJson.get("name"));
|
||||
// }
|
||||
//queryWrapper.eq(StIvtHotpointivt::getIs_delete,IOSEnum.IS_NOTANDYES.code("否"));
|
||||
//queryWrapper.orderByDesc(StIvtHotpointivt::getName);
|
||||
queryWrapper.like(ObjectUtil.isNotEmpty(pointCode), StIvtHotpointivt::getPoint_code, pointCode)
|
||||
.eq(ObjectUtil.isNotEmpty(pointStatus), StIvtHotpointivt::getPoint_status, pointStatus)
|
||||
.eq(ObjectUtil.isNotEmpty(productArea), StIvtHotpointivt::getProduct_area, productArea)
|
||||
.eq(ObjectUtil.isNotEmpty(isUsed), StIvtHotpointivt::getIs_used, isUsed)
|
||||
.eq(ObjectUtil.isNotEmpty(pointLocation), StIvtHotpointivt::getPoint_location, pointLocation);
|
||||
return stIvtHotpointivtMapper.selectPage(resultPage, queryWrapper);
|
||||
}
|
||||
|
||||
@@ -137,6 +148,21 @@ public class StIvtHotpointivtServiceImpl extends ServiceImpl<StIvtHotpointivtMap
|
||||
return stIvtHotpointivtMapper.getNeedBakingPoint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StIvtHotpointivt> getNoBakingPoint() {
|
||||
return stIvtHotpointivtMapper.getNoBakingPoint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StIvtHotpointivt> getBakedFinishPoint() {
|
||||
return stIvtHotpointivtMapper.getBakedFinishPoint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StIvtHotpointivt> getUnionBakedFinishPoint() {
|
||||
return stIvtHotpointivtMapper.getUnionBakedFinishPoint();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取实体基础信息
|
||||
|
||||
@@ -23,7 +23,7 @@ public class StIvtSbpointivtParam extends BaseQuery<StIvtSbpointivt> {
|
||||
/**
|
||||
* 点位标识
|
||||
*/
|
||||
private Long point_id;
|
||||
private String point_id;
|
||||
/**
|
||||
* 点位编码
|
||||
*/
|
||||
@@ -55,7 +55,7 @@ public class StIvtSbpointivtParam extends BaseQuery<StIvtSbpointivt> {
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long create_id;
|
||||
private String create_id;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@@ -67,7 +67,7 @@ public class StIvtSbpointivtParam extends BaseQuery<StIvtSbpointivt> {
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private Long update_optid;
|
||||
private String update_optid;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
|
||||
@@ -45,7 +45,7 @@ public class StIvtSbpointivtServiceImpl extends ServiceImpl<StIvtSbpointivtMappe
|
||||
*/
|
||||
@Override
|
||||
public IPage<StIvtSbpointivt> query(Map whereJson, PageQuery page) {
|
||||
IPage<StIvtSbpointivt> resultPage = new Page<>(page.getPage(), page.getSize());
|
||||
IPage<StIvtSbpointivt> resultPage = new Page<>(page.getPage() + 1, page.getSize());
|
||||
LambdaQueryWrapper<StIvtSbpointivt> queryWrapper = new LambdaQueryWrapper<>();
|
||||
if (whereJson.containsKey("point_code")) {
|
||||
queryWrapper.like(StIvtSbpointivt::getPoint_code, whereJson.get("point_code"));
|
||||
@@ -96,10 +96,6 @@ public class StIvtSbpointivtServiceImpl extends ServiceImpl<StIvtSbpointivtMappe
|
||||
*/
|
||||
@Override
|
||||
public void update(StIvtSbpointivtParam params) {
|
||||
// StIvtSbpointivt dto = stIvtSbpointivtMapper.selectById(params.getId());
|
||||
// if (dto == null) {
|
||||
// throw new BadRequestException("不存在该数据!");
|
||||
// }
|
||||
stIvtSbpointivtMapper.updateById(getBasicInfo(params, false));
|
||||
}
|
||||
|
||||
|
||||
@@ -52,10 +52,12 @@ public class AutoCreateInHotTask {
|
||||
.builder()
|
||||
.point_code(item.getPoint_code())
|
||||
.workorder_id(item.getSource_id())
|
||||
.vehicle_code(item.getVehicle_code())
|
||||
.update_time(item.getUpdate_time()).build()).collect(Collectors.toList());
|
||||
List<NeedBakingDto> collect2 = hotPoints.stream().map(item -> NeedBakingDto
|
||||
.builder()
|
||||
.point_code(item.getPoint_code())
|
||||
.vehicle_code(item.getFull_vehicle_code())
|
||||
.workorder_id(item.getWorkorder_id())
|
||||
.update_time(item.getUpdate_time()).build()).collect(Collectors.toList());
|
||||
List<NeedBakingDto> combinedList = new ArrayList<>();
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package org.nl.wms.quartz;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.wms.pdm.ivt.hot.service.IstIvtHotpointivtService;
|
||||
import org.nl.wms.pdm.ivt.hot.service.dao.StIvtHotpointivt;
|
||||
import org.nl.wms.sch.task_manage.core.constant.GeneralDefinition;
|
||||
import org.nl.wms.sch.task_manage.tasks.hot.InHotTrussTask;
|
||||
import org.nl.wms.sch.task_manage.tasks.hot.OutHotTrussTask;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Description: 自动创建出烘箱任务
|
||||
* <p>目的是由于有些进入烘烤的母卷,出烘箱发现没有位置了,转而存放到未开启的烘箱中去暂存,此时还没有质检,
|
||||
* 因此需要再次出烘箱到达烘箱暂存位进行暂存,等待质检
|
||||
* @see org.nl.wms.sch.task_manage.tasks.hot.OutHotTrussTask
|
||||
* @Date: 2024/8/29
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class AutoCreateOutHotTask {
|
||||
@Autowired
|
||||
private IstIvtHotpointivtService hotpointivtService;
|
||||
@Autowired
|
||||
private OutHotTrussTask outHotTrussTask;
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void run() {
|
||||
log.info("自动创建出烘箱任务开始执行...");
|
||||
// 获取烘箱内部状态:烘烤完毕暂存中(04)、03但不需要烘烤的点位
|
||||
List<StIvtHotpointivt> hotPoints = hotpointivtService.getUnionBakedFinishPoint();
|
||||
for (StIvtHotpointivt hotPoint : hotPoints) {
|
||||
JSONObject taskParam = new JSONObject();
|
||||
taskParam.put("pointType", "03".equals(hotPoint.getPoint_status()) ? "3" : "4");
|
||||
taskParam.put("order_code", hotPoint.getContainer_name());
|
||||
taskParam.put("up_task_code", "-");
|
||||
taskParam.put("device_code", hotPoint.getPoint_code());
|
||||
taskParam.put("config_code", "OutHotTrussTask");
|
||||
taskParam.put("create_mode", GeneralDefinition.AUTO_CREATION);
|
||||
// 满卷的收卷辊编码放在AGV任务的载具2上
|
||||
taskParam.put("vehicle_code", hotPoint.getFull_vehicle_code());
|
||||
outHotTrussTask.apply(taskParam);
|
||||
log.info("烘箱【{}】出箱任务创建完成", hotPoint.getPoint_code());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
//package org.nl.wms.quartz;
|
||||
//
|
||||
//import cn.hutool.core.util.ObjectUtil;
|
||||
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.nl.system.service.param.ISysParamService;
|
||||
//import org.nl.system.service.param.dao.Param;
|
||||
//import org.nl.wms.sch.task.service.ISchBaseTaskService;
|
||||
//import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//
|
||||
//import java.util.Arrays;
|
||||
//import java.util.List;
|
||||
//import java.util.stream.Collectors;
|
||||
//
|
||||
///**
|
||||
// * @Author: lyd
|
||||
// * @Description: 任务补偿机制:用于再次触发追加任务
|
||||
// * @Date: 2024/8/29
|
||||
// */
|
||||
//@Slf4j
|
||||
//@Component
|
||||
//public class TaskRetryCreat {
|
||||
//
|
||||
// @Autowired
|
||||
// private ISchBaseTaskService taskService;
|
||||
// @Autowired
|
||||
// private ISysParamService paramService;
|
||||
//
|
||||
// public void run() {
|
||||
// // 获取系统参数中需要补偿的任务配置
|
||||
// Param param = paramService.findByCode("TASK-RETRY");
|
||||
// if (ObjectUtil.isEmpty(param) || ObjectUtil.isEmpty(param.getValue())) {
|
||||
// log.warn("系统参数【TASK-RETRY】不存在!");
|
||||
// return;
|
||||
// }
|
||||
// List<String> configs = Arrays.stream(param.getValue().split("[,,]")).collect(Collectors.toList());
|
||||
// LambdaQueryWrapper<SchBaseTask> lam = new LambdaQueryWrapper<>();
|
||||
// lam.in(SchBaseTask::getConfig_code, configs)
|
||||
// .eq(SchBaseTask::get)
|
||||
// }
|
||||
//}
|
||||
@@ -19,4 +19,5 @@ public class NeedBakingDto {
|
||||
private String point_code;
|
||||
private String workorder_id;
|
||||
private String update_time;
|
||||
private String vehicle_code;
|
||||
}
|
||||
|
||||
@@ -131,6 +131,8 @@ public interface ISchBaseTaskService extends IService<SchBaseTask> {
|
||||
|
||||
/**
|
||||
* 根据点位获取对应的任务
|
||||
* <p>查询的任务状态是大于 {@link TaskStatus#SURE_END} 小于等于 {@link TaskStatus#PICK_UP_COMPLETED}
|
||||
* 但是不等于 {@link TaskStatus#FINISHED}</p>
|
||||
* @param p1 取货点1
|
||||
* @param p2 放货点1
|
||||
* @param p3 取货点2
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
||||
import org.nl.wms.sch.task.service.dto.SchBaseTaskQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -13,7 +14,7 @@ import java.util.List;
|
||||
**/
|
||||
public interface SchBaseTaskMapper extends BaseMapper<SchBaseTask> {
|
||||
|
||||
IPage<SchBaseTask> selectPageLeftJoin(IPage<SchBaseTask> pages, SchBaseTaskQuery whereJson, List<String> collect);
|
||||
IPage<SchBaseTask> selectPageLeftJoin(IPage<SchBaseTask> pages, SchBaseTaskQuery whereJson, Collection<String> collect);
|
||||
|
||||
List<SchBaseTask> checkHaveTask(String code);
|
||||
|
||||
|
||||
@@ -54,50 +54,24 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
|
||||
|
||||
@Override
|
||||
public IPage<SchBaseTask> queryAll(SchBaseTaskQuery whereJson, PageQuery page) {
|
||||
List<String> collect = ObjectUtil.isNotEmpty(whereJson.getMore_task_status())
|
||||
? Arrays.stream(whereJson.getMore_task_status().split(",")).collect(Collectors.toList()) : null;
|
||||
Set<String> collect = ObjectUtil.isNotEmpty(whereJson.getMore_task_status())
|
||||
? Arrays.stream(whereJson.getMore_task_status().split(",")).collect(Collectors.toSet()) : null;
|
||||
if (collect != null) {
|
||||
if (collect.contains(TaskStatus.UNFINISHED.getCode())) {
|
||||
collect = null;
|
||||
whereJson.setUnFinished(TaskStatus.EXECUTING.getCode());
|
||||
collect.removeIf(s -> (s.equals("07") || s.equals("08") || s.equals("09")));
|
||||
collect.add(TaskStatus.PICK_UP_COMPLETED.getCode());
|
||||
collect.add(TaskStatus.APPLY.getCode());
|
||||
collect.add(TaskStatus.CREATED.getCode());
|
||||
collect.add(TaskStatus.SURE_START.getCode());
|
||||
collect.add(TaskStatus.SURE_END.getCode());
|
||||
collect.add(TaskStatus.START_AND_POINT.getCode());
|
||||
collect.add(TaskStatus.ISSUE.getCode());
|
||||
collect.add(TaskStatus.EXECUTING.getCode());
|
||||
}
|
||||
}
|
||||
IPage<SchBaseTask> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
pages = schBaseTaskMapper.selectPageLeftJoin(pages, whereJson, collect);
|
||||
return pages;
|
||||
// String task_code = ObjectUtil.isNotEmpty(whereJson.get("task_code"))
|
||||
// ? whereJson.get("task_code").toString() : null;
|
||||
// String vehicle_code = ObjectUtil.isNotEmpty(whereJson.get("vehicle_code"))
|
||||
// ? whereJson.get("vehicle_code").toString() : null;
|
||||
// String point_code = ObjectUtil.isNotEmpty(whereJson.get("point_code"))
|
||||
// ? whereJson.get("point_code").toString() : null;
|
||||
// String begin_time = ObjectUtil.isNotEmpty(whereJson.get("begin_time"))
|
||||
// ? whereJson.get("begin_time").toString() : null;
|
||||
// String end_time = ObjectUtil.isNotEmpty(whereJson.get("end_time"))
|
||||
// ? whereJson.get("end_time").toString() : null;
|
||||
// String more_task_status = ObjectUtil.isNotEmpty(whereJson.get("more_task_status"))
|
||||
// ? whereJson.get("more_task_status").toString() : null;
|
||||
// List<String> collect = ObjectUtil.isNotEmpty(more_task_status)
|
||||
// ? Arrays.stream(more_task_status.split(",")).collect(Collectors.toList()) : null;
|
||||
// String unFinished = null;
|
||||
// if (collect != null) {
|
||||
// if (collect.contains(TaskStatus.UNFINISHED.getCode())) {
|
||||
// collect = null;
|
||||
// unFinished = TaskStatus.EXECUTING.getCode();
|
||||
// }
|
||||
// }
|
||||
// LambdaQueryWrapper<SchBaseTask> lam = new LambdaQueryWrapper<>();
|
||||
// lam.eq(ObjectUtil.isNotEmpty(task_code), SchBaseTask::getTask_code, task_code)
|
||||
// .eq(ObjectUtil.isNotEmpty(vehicle_code), SchBaseTask::getVehicle_code, vehicle_code)
|
||||
// .eq(ObjectUtil.isNotEmpty(point_code), SchBaseTask::getPoint_code1, point_code)
|
||||
// .ge(ObjectUtil.isNotEmpty(begin_time), SchBaseTask::getCreate_time, begin_time)
|
||||
// .le(ObjectUtil.isNotEmpty(end_time), SchBaseTask::getCreate_time, end_time)
|
||||
// .in(ObjectUtil.isNotEmpty(collect), SchBaseTask::getTask_status, collect)
|
||||
// .le(ObjectUtil.isNotEmpty(unFinished), SchBaseTask::getTask_status, unFinished)
|
||||
// .orderByDesc(SchBaseTask::getUpdate_time);
|
||||
// IPage<SchBaseTask> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
// schBaseTaskMapper.selectPage(pages, lam);
|
||||
// return pages;
|
||||
}
|
||||
|
||||
|
||||
@@ -226,7 +200,8 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
|
||||
}
|
||||
// 根据标识找到任务
|
||||
SchBaseTask taskOne = this.getByCode(task_code);
|
||||
if (Integer.parseInt(taskOne.getTask_status()) >= Integer.parseInt(TaskStatus.FINISHED.getCode())) {
|
||||
if (Integer.parseInt(taskOne.getTask_status()) >= Integer.parseInt(TaskStatus.FINISHED.getCode())
|
||||
&& Integer.parseInt(taskOne.getTask_status()) != Integer.parseInt(TaskStatus.PICK_UP_COMPLETED.getCode())) {
|
||||
throw new BadRequestException(LangProcess.msg("task_statusWrong"));
|
||||
}
|
||||
// 根据配置去工厂类获得类对象
|
||||
@@ -275,7 +250,8 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
|
||||
.eq(ObjectUtil.isNotEmpty(p3), SchBaseTask::getPoint_code3, p3)
|
||||
.eq(ObjectUtil.isNotEmpty(p4), SchBaseTask::getPoint_code4, p4)
|
||||
.gt(SchBaseTask::getTask_status, TaskStatus.SURE_END.getCode())
|
||||
.lt(SchBaseTask::getTask_status, TaskStatus.FINISHED.getCode())
|
||||
.ne(SchBaseTask::getTask_status, TaskStatus.FINISHED.getCode())
|
||||
.le(SchBaseTask::getTask_status, TaskStatus.PICK_UP_COMPLETED.getCode())
|
||||
.eq(SchBaseTask::getIs_delete, "0");
|
||||
return getOne(lam, false);
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@ public class AutoInHotTrussTask extends AbstractTask {
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("workorder_id", workOrderId);
|
||||
task.setPoint_code1(bakingDto.getPoint_code());
|
||||
task.setVehicle_code(bakingDto.getVehicle_code());
|
||||
task.setTask_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
task.setTask_code(CodeUtil.getNewCode("TASK_CODE"));
|
||||
task.setConfig_code("AutoInHotTrussTask");
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
* <p>todo: 业务需求待定!!!</p>
|
||||
* @see OutHotTrussTask
|
||||
*/
|
||||
@Deprecated
|
||||
@Slf4j
|
||||
@Component(value = "AutoOutHotTrussTask")
|
||||
public class AutoOutHotTrussTask extends AbstractTask {
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package org.nl.wms.sch.task_manage.tasks.hot;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.wms.pdm.bi.dao.PdmBiRawfoilworkorder;
|
||||
import org.nl.wms.pdm.bi.service.IpdmBiRawfoilworkorderService;
|
||||
import org.nl.wms.pdm.ivt.hot.service.IstIvtHotpointivtService;
|
||||
import org.nl.wms.pdm.ivt.hot.service.dao.StIvtHotpointivt;
|
||||
import org.nl.wms.sch.point.service.ISchBasePointService;
|
||||
@@ -13,6 +17,7 @@ import org.nl.wms.sch.task_manage.AbstractTask;
|
||||
import org.nl.wms.sch.task_manage.TaskStatus;
|
||||
import org.nl.wms.sch.task_manage.core.constant.GeneralDefinition;
|
||||
import org.nl.wms.sch.task_manage.core.enums.TaskFinishedTypeEnum;
|
||||
import org.nl.wms.util.PointUtils;
|
||||
import org.nl.wms.util.TaskUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -20,8 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.nl.wms.util.PointUtils.hotClearPoint;
|
||||
import static org.nl.wms.util.PointUtils.setUpdateByType;
|
||||
import static org.nl.wms.util.PointUtils.*;
|
||||
import static org.nl.wms.util.TaskUtils.checkTaskOptionStatus;
|
||||
import static org.nl.wms.util.TaskUtils.setUpdateByPC;
|
||||
import static org.nl.wms.util.TaskUtils.setUpdateByType;
|
||||
@@ -29,6 +33,7 @@ import static org.nl.wms.util.TaskUtils.setUpdateByType;
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Description: 创建出烘箱任务
|
||||
* <p>自动创建与ACS申请公用的任务类
|
||||
* @Date: 2024/8/9
|
||||
*/
|
||||
@Slf4j
|
||||
@@ -41,6 +46,8 @@ public class OutHotTrussTask extends AbstractTask {
|
||||
private IstIvtHotpointivtService hotpointivtService;
|
||||
@Autowired
|
||||
private ISchBaseTaskService taskService;
|
||||
@Autowired
|
||||
private IpdmBiRawfoilworkorderService rawfoilworkorderService;
|
||||
@Override
|
||||
public void create() throws BadRequestException {
|
||||
|
||||
@@ -49,20 +56,39 @@ public class OutHotTrussTask extends AbstractTask {
|
||||
@Override
|
||||
public void createCompletion(SchBaseTask task) {
|
||||
TaskUtils.taskLock("A1-HXZC", () -> {
|
||||
// 从烘箱暂存位找一个空位
|
||||
List<SchBasePoint> hotDjwList = pointService.getHotNotTaskPoint("A1", "A1-HXZC",
|
||||
"4", "1");
|
||||
if (hotDjwList.size() == 0) {
|
||||
throw new BadRequestException("烘箱烘烤完毕的暂存位不够!");
|
||||
}
|
||||
String requestParam = task.getRequest_param();
|
||||
JSONObject requestObj = JSONObject.parseObject(requestParam);
|
||||
String startPoint = task.getPoint_code1();
|
||||
String pointType = requestObj.getString("pointType");
|
||||
// 烘箱起点位置
|
||||
StIvtHotpointivt hotPoint = hotpointivtService.getPointByCode(startPoint, false);
|
||||
requestObj.put("workorder_id", hotPoint.getWorkorder_id());
|
||||
SchBasePoint point = hotDjwList.get(0);
|
||||
task.setVehicle_code(hotPoint.getFull_vehicle_code());
|
||||
// 从烘箱暂存位找一个空位
|
||||
List<SchBasePoint> hotDjwList = pointService.getHotNotTaskPoint("A1", "A1-HXZC",
|
||||
ObjectUtil.isNotEmpty(pointType) ? pointType : "4", "1");
|
||||
if (hotDjwList.size() == 0) {
|
||||
// 如果是在烘箱中的,那就不需要创建入其他未开启的烘箱
|
||||
if ("03".equals(hotPoint.getPoint_status()) || "04".equals(hotPoint.getPoint_status())) {
|
||||
log.info("已经是在烘箱暂存中,无需创建到烘箱的点位");
|
||||
return;
|
||||
}
|
||||
requestObj.put("is_flag", "1");
|
||||
// 找一个没开启的烘箱???
|
||||
PdmBiRawfoilworkorder order = rawfoilworkorderService.getById(hotPoint.getWorkorder_id());
|
||||
List<StIvtHotpointivt> notTaskHotOven = hotpointivtService.getNotTaskHotOven(order.getRoll_type(),
|
||||
"0");
|
||||
// 没有位置,自然需要报错
|
||||
if (notTaskHotOven.size() == 0) {
|
||||
throw new BadRequestException("烘箱烘烤完毕的暂存位不够!");
|
||||
}
|
||||
StIvtHotpointivt point = notTaskHotOven.get(0);
|
||||
task.setPoint_code2(point.getPoint_code());
|
||||
} else {
|
||||
requestObj.put("is_flag", "0");
|
||||
SchBasePoint point = hotDjwList.get(0);
|
||||
task.setPoint_code2(point.getPoint_code());
|
||||
}
|
||||
requestObj.put("workorder_id", hotPoint.getWorkorder_id());
|
||||
task.setVehicle_code(hotPoint.getFull_vehicle_code());
|
||||
task.setRequest_param(JSONObject.toJSONString(requestObj));
|
||||
// 保存任务参数
|
||||
task.setHandle_class(THIS_CLASS);
|
||||
@@ -76,17 +102,32 @@ public class OutHotTrussTask extends AbstractTask {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void finishTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||
checkTaskOptionStatus(taskObj);
|
||||
// 出烘箱后,终点状态应改成4:待分切
|
||||
JSONObject request = JSONObject.parseObject(taskObj.getRequest_param());
|
||||
// 出烘箱后,判断工单,如果烘烤,终点状态应改成3:待质检;不烘烤,设置4:待分切
|
||||
String startPointCode = taskObj.getPoint_code1();
|
||||
String endPointCode = taskObj.getPoint_code2();
|
||||
StIvtHotpointivt startPoint = hotpointivtService.getPointByCode(startPointCode, false);
|
||||
if ("0".equals(request.getString("is_flag"))) {
|
||||
PdmBiRawfoilworkorder order = rawfoilworkorderService.getById(request.getString("workorder_id"));
|
||||
SchBasePoint endPoint = pointService.getById(endPointCode);
|
||||
// 终点设置值
|
||||
endPoint.setVehicle_code(startPoint.getFull_vehicle_code());
|
||||
endPoint.setSource_id(startPoint.getWorkorder_id());
|
||||
endPoint.setPoint_status("4");
|
||||
setUpdateByType(endPoint, taskFinishedType);
|
||||
endPoint.setSource_id(ObjectUtil.isNotEmpty(startPoint.getWorkorder_id())
|
||||
? startPoint.getWorkorder_id()
|
||||
: request.getString("workorder_id"));
|
||||
endPoint.setPoint_status("0".equals(order.getIs_baking()) ? "4" : "3");
|
||||
PointUtils.setUpdateByType(endPoint, taskFinishedType);
|
||||
pointService.updateById(endPoint);
|
||||
} else {
|
||||
PdmBiRawfoilworkorder order = rawfoilworkorderService.getById(startPoint.getWorkorder_id());
|
||||
// 状态:04:烘烤完毕暂存
|
||||
StIvtHotpointivt hotpointivt = hotpointivtService.getPointByCode(endPointCode, false);
|
||||
hotpointivt.setPoint_status("04");
|
||||
hotpointivt.setContainer_name(order.getContainer_name());
|
||||
hotpointivt.setInstorage_time(DateUtil.now());
|
||||
setHxUpdateByType(hotpointivt, taskFinishedType);
|
||||
hotpointivtService.updateById(hotpointivt);
|
||||
}
|
||||
// 起点清空
|
||||
hotClearPoint(startPoint, taskFinishedType);
|
||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||
|
||||
@@ -7,6 +7,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.wms.pdm.bi.dao.PdmBiRawfoilworkorder;
|
||||
import org.nl.wms.pdm.bi.service.IpdmBiRawfoilworkorderService;
|
||||
import org.nl.wms.pdm.ivt.raw.service.IstIvtSbpointivtService;
|
||||
import org.nl.wms.pdm.ivt.raw.service.dao.StIvtSbpointivt;
|
||||
import org.nl.wms.sch.point.service.ISchBasePointService;
|
||||
import org.nl.wms.sch.point.service.dao.SchBasePoint;
|
||||
import org.nl.wms.sch.task.service.ISchBaseTaskService;
|
||||
@@ -44,6 +46,8 @@ public class RawDownAGVTask extends AbstractTask {
|
||||
@Autowired
|
||||
private IpdmBiRawfoilworkorderService rawfoilworkorderService;
|
||||
@Autowired
|
||||
private IstIvtSbpointivtService sbpointivtService;
|
||||
@Autowired
|
||||
private RedissonClient redissonClient;
|
||||
@Override
|
||||
public void create() throws BadRequestException {
|
||||
@@ -70,6 +74,9 @@ public class RawDownAGVTask extends AbstractTask {
|
||||
SchBasePoint hxPoint = hxPoints.get(0);
|
||||
if ("1".equals(flag)) {
|
||||
// 创建四点任务:先去收卷辊出口在到生箔位,在从生箔到烘箱对接位
|
||||
StIvtSbpointivt pointCode = sbpointivtService.getByPointCode(deviceCode, false);
|
||||
// 标记一下是哪个生箔机的收卷辊
|
||||
task.setVehicle_code2(pointCode.getExt_code());
|
||||
task.setPoint_code1(startPointCode);
|
||||
task.setPoint_code2(deviceCode + "_K");
|
||||
task.setPoint_code3(deviceCode + "_M");
|
||||
|
||||
687
lms2/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/hontPoint.vue
Normal file
687
lms2/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/hontPoint.vue
Normal file
@@ -0,0 +1,687 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
:label-width="computedSearchLabelWidth"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item :label="$t('Point.search.workshop_code')">
|
||||
<el-select
|
||||
v-model="query.workshop_code"
|
||||
clearable
|
||||
size="mini"
|
||||
:placeholder="$t('Point.search.workshop_code')"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in workShopList"
|
||||
:label="item.workshop_name"
|
||||
:value="item.workshop_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('Point.search.blurry')">
|
||||
<el-input
|
||||
v-model="query.blurry"
|
||||
clearable
|
||||
size="mini"
|
||||
:placeholder="$t('Point.search.p1')"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('Point.search.region_code')">
|
||||
<el-select
|
||||
v-model="query.region_code"
|
||||
disabled
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
:placeholder="$t('Point.search.region_code')"
|
||||
class="filter-item"
|
||||
@clear="handleClear"
|
||||
@change="getPointStatusAndTypeList(query.region_code, 1)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in regionList"
|
||||
:label="item.region_name"
|
||||
:value="item.region_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('Point.search.point_type')">
|
||||
<el-select
|
||||
v-model="query.point_type"
|
||||
clearable
|
||||
size="mini"
|
||||
:placeholder="$t('Point.search.point_type')"
|
||||
class="filter-item"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointTypesList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('Point.search.point_status')">
|
||||
<el-select
|
||||
v-model="query.point_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
:placeholder="$t('Point.search.point_status')"
|
||||
class="filter-item"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointStatusList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="$t('Point.search.lock_type')">-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="query.lock_type"-->
|
||||
<!-- clearable-->
|
||||
<!-- filterable-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :placeholder="$t('Point.search.lock_type')"-->
|
||||
<!-- class="filter-item"-->
|
||||
<!-- @change="hand"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in dict.d_lock_type"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item :label="$t('Point.search.is_used')">
|
||||
<el-switch
|
||||
v-model="query.is_used"
|
||||
active-value="true"
|
||||
inactive-value="false"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#C0CCDA"
|
||||
@change="hand"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
v-if="crud.query.is_used == 'false'"
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-circle-check"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="changeUsed(crud.selections, true)"
|
||||
>
|
||||
{{ $t('Point.search.enable') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="crud.query.is_used == 'true'"
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-circle-close"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="changeUsed(crud.selections, false)"
|
||||
>
|
||||
{{ $t('Point.search.disable') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="false"
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-circle-check"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="changeLock(crud.selections)"
|
||||
>
|
||||
锁定
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="false"
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-circle-close"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="changeLock(crud.selections)"
|
||||
>
|
||||
解锁
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
:width="computedLabelWidth"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
size="mini"
|
||||
:label-width="computedFormLabelWidth"
|
||||
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
|
||||
>
|
||||
<el-form-item
|
||||
v-if="false"
|
||||
label="点位标识"
|
||||
prop="point_id"
|
||||
>
|
||||
<el-input v-model="form.point_id" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('Point.dialog.workshop_code')">
|
||||
<el-select
|
||||
v-model="form.product_area"
|
||||
:placeholder="$t('common.Please_select')"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in workShopList"
|
||||
:label="item.workshop_name"
|
||||
:value="item.workshop_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('Point.dialog.region_code')" prop="region_code">
|
||||
<el-select
|
||||
v-model="form.region_code"
|
||||
:placeholder="$t('common.Please_select')"
|
||||
style="width: 370px;"
|
||||
@change="getPointStatusAndTypeList(form.region_code, 2)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in regionList"
|
||||
:label="item.region_name"
|
||||
:value="item.region_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('Point.dialog.point_code')" prop="point_code">
|
||||
<el-input v-model="form.point_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('Point.dialog.point_name')" prop="point_name">
|
||||
<el-input v-model="form.point_name" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="pointStatusDialogList.length > 0" :label="$t('Point.dialog.point_status')" prop="point_status">
|
||||
<el-select
|
||||
v-model="form.point_status"
|
||||
size="mini"
|
||||
:placeholder="$t('Point.dialog.point_status')"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointStatusDialogList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="pointTypesDialogList.length > 0" :label="$t('Point.dialog.point_type')" prop="device_point_type">
|
||||
<el-select
|
||||
v-model="form.point_type"
|
||||
size="mini"
|
||||
:placeholder="$t('Point.dialog.point_type')"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointTypesDialogList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('Point.dialog.parent_point_code')" 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 !== '1'" :label="$t('Point.dialog.vehicle_code')" 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 !== '1'" :label="$t('Point.dialog.vehicle_type')" prop="vehicle_code">
|
||||
<el-select v-model="form.vehicle_type" placeholder="请选择" clearable style="width: 370px;">
|
||||
<el-option
|
||||
v-for="item in dict.vehicle_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('Point.dialog.can_vehicle_type')" prop="can_vehicle_types">
|
||||
<el-select v-model="form.can_vehicle_types" multiple placeholder="请选择" clearable style="width: 370px;">
|
||||
<el-option
|
||||
v-for="item in dict.vehicle_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('Point.dialog.vehicle_qty')" 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-form-item>
|
||||
<el-form-item :label="$t('Point.dialog.is_has_workder')">
|
||||
<el-radio-group v-model="form.is_has_workder" size="mini">
|
||||
<el-radio label="true">{{ $t('common.Yes') }}</el-radio>
|
||||
<el-radio label="false">{{ $t('common.No') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('Point.dialog.is_auto')">
|
||||
<el-radio-group v-model="form.is_auto" size="mini">
|
||||
<el-radio label="true">{{ $t('common.Yes') }}</el-radio>
|
||||
<el-radio label="false">{{ $t('common.No') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('Point.dialog.remark')">
|
||||
<el-input v-model="form.remark" style="width: 370px;" rows="2" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">{{ $t('common.Cancel') }}</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.Confirm') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column
|
||||
prop="product_area"
|
||||
:label="$t('Point.table.workshop_code')"
|
||||
:min-width="flexWidth('product_area',crud.data,$t('Point.table.workshop_code'))"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="point_code"
|
||||
:label="$t('Point.table.point_code')"
|
||||
:min-width="flexWidth('point_code',crud.data,$t('Point.table.point_code'))"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="point_name"
|
||||
:label="$t('Point.table.point_name')"
|
||||
:min-width="flexWidth('point_name',crud.data,$t('Point.table.point_name'))"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="region_code"
|
||||
:label="$t('Point.table.region_code')"
|
||||
:min-width="flexWidth('region_code',crud.data,$t('Point.table.region_code'))"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="region_name"
|
||||
:label="$t('Point.table.region_name')"
|
||||
:min-width="flexWidth('region_name',crud.data, $t('Point.table.region_name'))"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="point_type_name"
|
||||
:label="$t('Point.table.point_type')"
|
||||
:min-width="flexWidth('point_type_name',crud.data,$t('Point.table.point_type'))"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="point_status_name"
|
||||
:label="$t('Point.table.point_status')"
|
||||
:min-width="flexWidth('point_status_name',crud.data,$t('Point.table.point_status'))"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="vehicle_type"
|
||||
:label="$t('Point.table.vehicle_type')"
|
||||
:min-width="flexWidth('vehicle_type',crud.data,$t('Point.table.vehicle_type'), 30)"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="vehicle_code"
|
||||
:label="$t('Point.table.vehicle_code')"
|
||||
:min-width="flexWidth('vehicle_code',crud.data,$t('Point.table.vehicle_code'))"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="vehicle_qty"
|
||||
:label="$t('Point.table.vehicle_qty')"
|
||||
:min-width="flexWidth('vehicle_qty',crud.data,$t('Point.table.vehicle_qty'))"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('Point.table.lock_type')"
|
||||
:min-width="flexWidth('lock_type',crud.data,$t('Point.table.lock_type'))"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.d_lock_type[scope.row.lock_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="parent_point_code"
|
||||
:label="$t('Point.table.parent_point_code')"
|
||||
:min-width="flexWidth('parent_point_code',crud.data,$t('Point.table.parent_point_code'))"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ing_task_code"
|
||||
:label="$t('Point.table.ing_task_code')"
|
||||
:min-width="flexWidth('ing_task_code',crud.data,$t('Point.table.ing_task_code'))"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="is_has_workder"
|
||||
:label="$t('Point.table.is_has_workder')"
|
||||
:min-width="flexWidth('is_has_workder',crud.data,$t('Point.table.is_has_workder'))"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.is_has_workder ? $t('common.Yes') : $t('common.No') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="is_auto"
|
||||
:label="$t('Point.table.is_auto')"
|
||||
:min-width="flexWidth('is_auto',crud.data,$t('Point.table.is_auto'))"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.is_auto ? $t('common.Yes') : $t('common.No') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="remark"
|
||||
:label="$t('Point.table.remark')"
|
||||
:min-width="flexWidth('remark',crud.data,$t('Point.table.remark'))"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="is_used"
|
||||
:label="$t('Point.table.is_used')"
|
||||
:min-width="flexWidth('is_used',crud.data,$t('Point.table.is_used'))"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.is_used ? $t('common.Yes') : $t('common.No') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="create_name"
|
||||
:label="$t('Point.table.create_name')"
|
||||
:min-width="flexWidth('create_name',crud.data,$t('Point.table.create_name'))"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="create_time"
|
||||
:label="$t('Point.table.create_time')"
|
||||
:min-width="flexWidth('create_time',crud.data,$t('Point.table.create_time'))"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="update_name"
|
||||
:label="$t('Point.table.update_name')"
|
||||
:min-width="flexWidth('update_name',crud.data,$t('Point.table.update_name'))"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="update_time"
|
||||
:label="$t('Point.table.update_time')"
|
||||
:min-width="flexWidth('update_time',crud.data,$t('Point.table.update_time'))"
|
||||
/>
|
||||
<el-table-column v-permission="[]" :label="$t('common.Operate')" width="180px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
style="display: inline"
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
<el-button
|
||||
v-if="false"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="toView(scope.row)"
|
||||
>
|
||||
查看详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<ViewDialog ref="viewDialog" />
|
||||
<PointDialog :dialog-show.sync="pointDialog" :is-single="false" @tableChanged="tableChanged" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint'
|
||||
import crudSchBaseRegion from '@/views/wms/sch/region/schBaseRegion'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudMdBaseWorkShop from '@/views/wms/basedata/workshop/mdBaseWorkshop'
|
||||
import ViewDialog from '@/views/wms/sch/point/ViewDialog.vue'
|
||||
import PointDialog from '@/views/wms/sch/point/PointDialog.vue'
|
||||
import i18n from '@/i18n'
|
||||
|
||||
const defaultForm = {
|
||||
point_code: null,
|
||||
point_name: null,
|
||||
region_code: null,
|
||||
region_name: null,
|
||||
point_type: null,
|
||||
point_status: null,
|
||||
can_vehicle_type: null,
|
||||
vehicle_max_qty: null,
|
||||
vehicle_type: null,
|
||||
vehicle_code: null,
|
||||
vehicle_qty: 0,
|
||||
block_num: null,
|
||||
row_num: null,
|
||||
col_num: null,
|
||||
layer_num: null,
|
||||
in_order_seq: null,
|
||||
out_order_seq: null,
|
||||
in_empty_seq: null,
|
||||
out_empty_seq: null,
|
||||
device_code: null,
|
||||
ext_point_code: null,
|
||||
ing_task_code: null,
|
||||
is_has_workder: 'true',
|
||||
product_area: null,
|
||||
is_auto: 'true',
|
||||
remark: null,
|
||||
is_used: 'true',
|
||||
can_vehicle_types: null
|
||||
}
|
||||
export default {
|
||||
name: 'HotPoint',
|
||||
dicts: ['vehicle_type', 'TrueOrFalse', 'd_lock_type'],
|
||||
components: { PointDialog, ViewDialog, pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: i18n.t('Point.title'),
|
||||
url: 'api/schBasePoint',
|
||||
idField: 'point_code',
|
||||
sort: 'point_code,desc',
|
||||
crudMethod: { ...crudSchBasePoint },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: true,
|
||||
del: true,
|
||||
download: false,
|
||||
reset: true
|
||||
},
|
||||
query: {
|
||||
is_used: 'true',
|
||||
region_code: 'A1-HXZC'
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
rules: {
|
||||
point_code: [
|
||||
{ required: true, message: i18n.t('Point.rules.r1'), trigger: 'blur' }
|
||||
],
|
||||
point_name: [
|
||||
{ required: true, message: i18n.t('Point.rules.r2'), trigger: 'blur' }
|
||||
],
|
||||
point_type: [
|
||||
{ required: true, message: i18n.t('Point.rules.r3'), trigger: 'blur' }
|
||||
],
|
||||
region_code: [
|
||||
{ required: true, message: i18n.t('Point.rules.r4'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
workShopList: [],
|
||||
regionList: [],
|
||||
pointTypesList: [],
|
||||
pointStatusList: [],
|
||||
pointStatusDialogList: [],
|
||||
pointTypesDialogList: [],
|
||||
pointDialog: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
computedSearchLabelWidth() {
|
||||
const item = localStorage.getItem('lang')
|
||||
if (item === 'zh') {
|
||||
return `90px`
|
||||
}
|
||||
return `150px`
|
||||
},
|
||||
computedLabelWidth() {
|
||||
const item = localStorage.getItem('lang')
|
||||
if (item === 'zh') {
|
||||
return `540px`
|
||||
}
|
||||
return `600px`
|
||||
},
|
||||
computedFormLabelWidth() {
|
||||
const item = localStorage.getItem('lang')
|
||||
if (item === 'zh') {
|
||||
return `110px`
|
||||
}
|
||||
if (item === 'in') {
|
||||
return `160px`
|
||||
}
|
||||
return `150px`
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getWorkShopList()
|
||||
this.getRegionList()
|
||||
this.getPointStatusAndTypeList('A1-HXZC', 1)
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.beforeToCU]() {
|
||||
this.form.is_has_workder = this.form.is_has_workder ? this.form.is_has_workder.toString() : 'false'
|
||||
this.form.is_auto = this.form.is_auto ? this.form.is_auto.toString() : 'false'
|
||||
},
|
||||
[CRUD.HOOK.afterToCU]() {
|
||||
if (this.form.region_code) {
|
||||
this.getPointStatusAndTypeList(this.form.region_code, 2)
|
||||
}
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
getWorkShopList() { // 获取车间列表
|
||||
crudMdBaseWorkShop.getWorkShopList().then(res => {
|
||||
this.workShopList = res
|
||||
})
|
||||
},
|
||||
getRegionList() {
|
||||
crudSchBaseRegion.getRegionList().then(res => {
|
||||
this.regionList = res
|
||||
})
|
||||
},
|
||||
getPointStatusAndTypeList(id, flag) {
|
||||
if (id) {
|
||||
this.getPointStatusList(id, flag)
|
||||
this.getPointTypeList(id, flag)
|
||||
}
|
||||
if (flag === 1) {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
},
|
||||
getPointStatusList(id, flag) {
|
||||
crudSchBaseRegion.getPointStatusSelectById(id).then(res => {
|
||||
if (flag === 1) {
|
||||
this.pointStatusList = res
|
||||
} else {
|
||||
this.pointStatusDialogList = res
|
||||
}
|
||||
})
|
||||
},
|
||||
getPointTypeList(id, flag) {
|
||||
crudSchBaseRegion.getPointTypeSelectById(id).then(res => {
|
||||
if (flag === 1) {
|
||||
this.pointTypesList = res
|
||||
} else {
|
||||
this.pointTypesDialogList = res
|
||||
}
|
||||
})
|
||||
},
|
||||
changeUsed(data, flag) { // 更改启用状态
|
||||
const param = {}
|
||||
param.data = data
|
||||
param.used = flag
|
||||
crudSchBasePoint.changeUsed(param).then(res => {
|
||||
this.crud.notify(i18n.t('common.Operation_success'), CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
showButton(point_status) {
|
||||
if (point_status && (point_status === '2' || point_status === '3')) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
toView(row) {
|
||||
if (row) {
|
||||
this.$refs.viewDialog.setParentData(row)
|
||||
}
|
||||
},
|
||||
tableChanged(row) {
|
||||
this.form.parent_point_code = row.map(point => point.point_code).join(',')
|
||||
},
|
||||
getParentPoint() {
|
||||
this.pointDialog = true
|
||||
},
|
||||
handleClear() {
|
||||
this.crud.query.region_code = null
|
||||
this.crud.query.point_type = null
|
||||
this.crud.query.point_status = null
|
||||
this.hand()
|
||||
},
|
||||
changeLock(data) {
|
||||
const param = {}
|
||||
param.data = data
|
||||
param.lock_type = this.crud.query.lock_type
|
||||
crudSchBasePoint.changeLock(param).then(res => {
|
||||
this.crud.notify(i18n.t('common.Operation_success'), CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -2,11 +2,12 @@
|
||||
<div class="app-container">
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane>
|
||||
<span slot="label"><i class="el-icon-date" /> {{ $t('Hot.pan1.title') }}</span>
|
||||
<span slot="label"><i class="el-icon-view" /> {{ $t('Hot.pan1.title') }}</span>
|
||||
<PointIvt />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('Hot.pan2.title')">
|
||||
<TaskDtl />
|
||||
<el-tab-pane>
|
||||
<span slot="label"><i class="el-icon-view" /> {{ $t('Hot.pan2.title') }}</span>
|
||||
<hot-point />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
@@ -15,9 +16,10 @@
|
||||
<script>
|
||||
import PointIvt from '@/views/wms/pdm/ivt/hotpointivt/pointIvt'
|
||||
import TaskDtl from '@/views/wms/pdm/ivt/hotpointivt/taskDtl'
|
||||
import HotPoint from '@/views/wms/pdm/ivt/hotpointivt/hontPoint.vue'
|
||||
export default {
|
||||
name: 'StIvtHotpointivt',
|
||||
components: { PointIvt, TaskDtl }
|
||||
components: { HotPoint, PointIvt, TaskDtl }
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
}
|
||||
},
|
||||
'pan2': {
|
||||
'title': '烘箱任务',
|
||||
'title': '烘箱暂存点位信息',
|
||||
'table': {
|
||||
'bill_code': '单据编码',
|
||||
'container_name': '母卷号',
|
||||
|
||||
Reference in New Issue
Block a user