This commit is contained in:
ls
2026-01-07 19:48:33 +08:00
parent 4c03ae35ad
commit b6f57154e8
27 changed files with 352 additions and 73 deletions

View File

@@ -201,7 +201,7 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
this.setIsonline(false);
message = "有报警";
//无报警
} else if (error != 0 && error1 != 1) {
} else if (error != 0 || error1 != 0) {
this.setIserror(true);
message = "有报警";
//无报警
@@ -463,7 +463,6 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
/*map.put("action", action);
map.put("message", message);*/
/*map.put("task", this.getTask());*/
map.put("error", ErrorUtil.getDictDetail("hx_error_type", String.valueOf(this.getError())));
map.put("temperature", temperature);
map.put("countdown_house", countdown_house);
map.put("countdown_min", countdown_min);

View File

@@ -478,7 +478,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
return false;
}
// 判断相邻烘箱是否有货有异常
if (filterNeighbors(startdevice)) return false;
// if (filterNeighbors(startdevice)) return false;
}
if (nextdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
@@ -488,7 +488,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
return false;
}
// 判断相邻烘箱是否有货有异常
if (filterNeighbors(nextdevice)) return false;
// if (filterNeighbors(nextdevice)) return false;
}

View File

@@ -118,6 +118,14 @@ public class WmsToAcsController {
}
@PostMapping("/writeTime")
@Log("下发烘箱时间")
@SaIgnore
public ResponseEntity<Object> writeTime(@RequestBody String whereJson) throws Exception {
return new ResponseEntity<>(wmstoacsService.writeTime(whereJson), HttpStatus.OK);
}
@PostMapping("/getCutpointivtType")
@Log("分切下料缓存信息")
@SaIgnore

View File

@@ -120,4 +120,6 @@ public interface WmsToAcsService {
Map<String, Object> getTubeMes(String whereJson) throws Exception;
Map<String, Object> getCutpointivtType(String whereJson)throws Exception;
Map<String, Object> writeTime(String whereJson) throws Exception;
}

View File

@@ -781,6 +781,46 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
}
@Override
public Map<String, Object> writeTime(String whereJson) throws Exception {
log.info("下发烘箱时间--------------:输入参数" + whereJson);
LuceneLogDto logDto = LuceneLogDto.builder()
.content("下发烘箱时间-----输入参数:" + whereJson)
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
JSONArray datas = JSONArray.parseArray(whereJson);
for (int i = 0; i < datas.size(); i++) {
JSONObject data = (JSONObject) datas.get(i);
String device_code = data.getString("device_code");
String time = data.getString("house");
Device device = deviceAppService.findDeviceByCode(device_code);
if (ObjectUtil.isEmpty(device)) {
throw new Exception("未找到对应设备:" + device_code);
}
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver();
try {
hongXiangConveyorDeviceDriver.writing("to_time_house", time);
} catch (Exception e) {
e.printStackTrace();
}
}
}
JSONObject resultJson = new JSONObject();
resultJson.put("status", HttpStatus.OK.value());
resultJson.put("message", "操作成功");
LuceneLogDto logDto1 = LuceneLogDto.builder()
.device_code("下发烘箱时间")
.content("下发烘箱时间-----返回参数:" + resultJson)
.build();
logDto1.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto1);
resultJson.put("status", HttpStatus.OK.value());
return resultJson;
}
@Override
public Map<String, Object> queryDevice(String jsonObject) throws Exception {
try {

View File

@@ -49,4 +49,5 @@ public interface WmsToAcsService {
*/
JSONObject getCutpointivtType(JSONArray param);
JSONObject toAcsHotTime(JSONArray acsArray);
}

View File

@@ -58,6 +58,12 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
return AcsUtil.notifyAcs4("api/wms/getTubeMsg", param);
}
@Override
public JSONObject toAcsHotTime(JSONArray param) {
return AcsUtil.notifyAcs4("api/wms/writeTime", param);
}
@Override
public JSONObject getCutpointivtType(JSONArray param) {
return AcsUtil.notifyAcs4("api/wms/getCutpointivtType", param);

View File

@@ -0,0 +1,122 @@
package org.nl.wms.pda;
/**
* @author ldjun
* @version 1.0
* @date 2023年02月14日 15:20
* @desc desc
*/
import cn.dev33.satoken.annotation.SaIgnore;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.MapOf;
import org.nl.system.service.param.ISysParamService;
import org.nl.system.service.param.dao.Param;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.util.Map;
import static cn.hutool.http.HttpUtil.downloadFile;
/**
*
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/pda/update")
@Slf4j
public class AppUpdateController {
private final ISysParamService iSysParamService;
@PostMapping
@SaIgnore
public ResponseEntity<Map> apkUrl() {
Map of = MapOf.of("versionName", "1.0.1", "url", "http://192.168.20.13:8011/api/pda/update/download/app-release");
// Map of = MapOf.of("versionName", "1.0.1", "url", "http://localhost:8011/api/pda/update/download/app-release");
return new ResponseEntity<>(of, HttpStatus.OK);
}
@RequestMapping("/download/app-release")
@SaIgnore
public void setPrint(HttpServletResponse response){
Param byCode = iSysParamService.findByCode("apkurl");
if (byCode==null){
throw new BadRequestException("更新失败:为配置apk下载地址");
}
System.out.println(byCode.getValue());
try {
downloadFile(response,byCode.getValue(),"release");
}catch (Exception ex){
ex.printStackTrace();
}
}
/**
* 附件下载
* @param response
* @param fileName
* @param path
* @return
* @throws Exception
*/
public void downloadFile(HttpServletResponse response, String path, String fileName) throws Exception {
if (fileName != null) {
//设置文件路径
File file = new File(path);
if (file.exists()) {
response.setHeader("content-type", "application/octet-stream");
response.setContentType("application/octet-stream");
try {
response.setHeader("Content-Disposition", "attachment;filename=" + new String(fileName.getBytes("utf-8"), "ISO-8859-1") + ".apk");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
byte[] buffer = new byte[1024];
FileInputStream fis = null;
BufferedInputStream bis = null;
try {
fis = new FileInputStream(file);
bis = new BufferedInputStream(fis);
OutputStream os = response.getOutputStream();
int i = bis.read(buffer);
while (i != -1) {
os.write(buffer, 0, i);
i = bis.read(buffer);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
if (bis != null) {
try {
bis.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (fis != null) {
try {
fis.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
}
}
}

View File

@@ -166,6 +166,8 @@ public class BakingPdaServiceImpl implements BakingPdaService {
// 收卷辊编码
String rollCode = param.getString("roll_code");
String temperature = param.getString("temperature");
// 临时功能大于1650宽度的卷
String isWidth = param.getString("is_width");
if (!isValidInteger(temperature)) {
throw new BadRequestException("温度请输入整数!");
}
@@ -245,6 +247,7 @@ public class BakingPdaServiceImpl implements BakingPdaService {
}
JSONObject taskParam = new JSONObject();
taskParam.put("order_code", orderCode);
taskParam.put("is_width", isWidth);
taskParam.put("device_code", pointCode);
taskParam.put("vehicle_code", rollCode);
taskParam.put("config_code", "InHotTrussTask");

View File

@@ -15,6 +15,7 @@ import org.nl.wms.ext.acs.service.WmsToAcsService;
import org.nl.wms.pda.mps.service.RawFoilPdaService;
import org.nl.wms.pdm.bi.dao.PdmBiRawfoilworkorder;
import org.nl.wms.pdm.bi.service.IpdmBiRawfoilworkorderService;
import org.nl.wms.pdm.ivt.hot.service.dao.mapper.StIvtHotpointivtMapper;
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;
@@ -71,6 +72,9 @@ public class RawFoilPdaServiceImpl implements RawFoilPdaService {
@Autowired
private InHotTrussTask inHotTrussTask;
@Autowired
private StIvtHotpointivtMapper stIvtHotpointivtMapper;
@Override
@Transactional(rollbackFor = Exception.class)
public JSONObject needEmptyVehicle(JSONObject param) {
@@ -189,6 +193,8 @@ public class RawFoilPdaServiceImpl implements RawFoilPdaService {
}
// point_code, order_code, is_call_empty
String pointCode = param.getString("point_code");
// 临时功能大于1650宽度的卷
String isWidth = param.getString("is_width");
// 母卷号
String orderCode = param.getString("order_code");
// 大小卷
@@ -214,7 +220,7 @@ public class RawFoilPdaServiceImpl implements RawFoilPdaService {
setDjw(param);
} else {
// 找烘箱位置
String stIvtHotpointivt = inHotTrussTask.getStIvtHotpointivt(rollType, temperature);
String stIvtHotpointivt = inHotTrussTask.getStIvtHotpointivt(rollType, temperature,isWidth);
if (StrUtil.isNotEmpty(stIvtHotpointivt)) {
param.put("put_code", stIvtHotpointivt);
} else {
@@ -227,12 +233,7 @@ public class RawFoilPdaServiceImpl implements RawFoilPdaService {
// schBasePoint.setPoint_status(POINT_STATUS_BINDING);
// pointService.updateById(schBasePoint);
if (ObjectUtil.isNotEmpty(order)) {
if (StrUtil.isNotEmpty(theory_height)) {
order.setTheory_height(new BigDecimal(theory_height));
}
if (StrUtil.isNotEmpty(productin_qty)) {
order.setProductin_qty(new BigDecimal(productin_qty));
}
order.setUp_coiler_date(DateUtil.now());
order.setBaking_temperature(temperature);
order.setBaking_time(time);
@@ -249,12 +250,7 @@ public class RawFoilPdaServiceImpl implements RawFoilPdaService {
rawOrder.setMfg_order_name("$$$$");
rawOrder.setProduct_name("锂电");
rawOrder.setDescription("锂电");
if (StrUtil.isNotEmpty(theory_height)) {
order.setTheory_height(new BigDecimal(theory_height));
}
if (StrUtil.isNotEmpty(productin_qty)) {
order.setProductin_qty(new BigDecimal(productin_qty));
}
rawOrder.setUp_coiler_date(DateUtil.now());
rawOrder.setStatus("01");
rawOrder.setWind_roll("roll");

View File

@@ -361,7 +361,7 @@ public class OtherPdaServiceImpl implements OtherPdaService {
// point_code, vehicle_code, vehicle_type
// 到物料表中查找载具号
String pointCode = param.getString("point_code");
List<SchBaseTask> schBaseTasks = taskService.checkHaveTask(pointCode);
List<SchBaseTask> schBaseTasks = taskService.checkHaveTask3(pointCode);
if (schBaseTasks.size() > 0) {
throw new BadRequestException("点位[" + pointCode + "]已经存在任务!");
}

View File

@@ -17,7 +17,7 @@
w.*
FROM st_ivt_hotpointivt p
LEFT JOIN pdm_bi_rawfoilworkorder w ON w.workorder_id = p.workorder_id
WHERE p.point_status = '04';
WHERE p.point_status = '04'
ORDER BY zc_point;
</select>
</mapper>

View File

@@ -2,6 +2,9 @@ package org.nl.wms.pdm.ivt.hot.service.impl;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -9,12 +12,14 @@ 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.ext.acs.service.WmsToAcsService;
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.quartz.dto.HotDeviceAndEreaDto;
import org.nl.wms.storage_manage.ios.enums.IOSEnum;
import org.nl.wms.util.URLEnum;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -38,6 +43,9 @@ public class StIvtHotpointivtServiceImpl extends ServiceImpl<StIvtHotpointivtMap
private StIvtHotpointivtMapper stIvtHotpointivtMapper;
@Autowired
private WmsToAcsService wmsToAcsService;
/**
* 查询数据分页
*
@@ -108,6 +116,20 @@ public class StIvtHotpointivtServiceImpl extends ServiceImpl<StIvtHotpointivtMap
// if (dto == null) {
// throw new BadRequestException("不存在该数据!");
// }
//如果温度变化向acs修改时间
StIvtHotpointivt stIvtHotpointivt = stIvtHotpointivtMapper.selectById(params.getIvt_id());
if (StrUtil.isNotEmpty(params.getLast_time()) && !params.getLast_time().equals(stIvtHotpointivt.getLast_time())){
JSONArray acsArray = new JSONArray();
JSONObject acs = new JSONObject();
acs.put("product_area", URLEnum.ACS_URL_A1.getProduct_area());
acs.put("house",params.getLast_time());
acs.put("device_code", stIvtHotpointivt.getPoint_code());
acsArray.add(acs);
// 调用ACS
JSONObject jsonObject = wmsToAcsService.toAcsHotTime(acsArray);
}
stIvtHotpointivtMapper.updateById(getBasicInfo(params, false));
}

View File

@@ -166,9 +166,14 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
entity.setMaterial_code("");
entity.setSource_id("");
}
//手动维护母卷和状态信息
if (ObjectUtil.isNotEmpty(pointStatus) && ObjectUtil.isNotEmpty(entity.getRemark()) && (pointStatus.equals(PointStatusEnum.WAIT_SLITTING.getCode())||pointStatus.equals(PointStatusEnum.WAIT_BIND.getCode())||pointStatus.equals(PointStatusEnum.WAIT_INSPACTION.getCode()))){
updateOrder(entity, pointStatus);
pointMapper.updateById(entity);
}
private void updateOrder(SchBasePoint entity, String pointStatus) {
if (ObjectUtil.isNotEmpty(pointStatus) && ObjectUtil.isNotEmpty(entity.getRemark()) && (pointStatus.equals(PointStatusEnum.WAIT_SLITTING.getCode())|| pointStatus.equals(PointStatusEnum.WAIT_BIND.getCode())|| pointStatus.equals(PointStatusEnum.WAIT_INSPACTION.getCode()))){
//查看是否有工单,如果没有新建一个,如果有则更新
PdmBiRawfoilworkorder order = rawfoilworkorderService.getByContainerName(entity.getRemark());
if (ObjectUtil.isNotEmpty(order)) {
@@ -199,7 +204,6 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
}
}
pointMapper.updateById(entity);
}
@Override

View File

@@ -121,6 +121,14 @@ public interface ISchBaseTaskService extends IService<SchBaseTask> {
*/
List<SchBaseTask> checkHaveTask(String code);
/**
* 检测点位编码是否存在任务
* @param code 点位编码
* @return 任务
*/
List<SchBaseTask> checkHaveTask3(String code);
/**
* 检测点位编码是否存在status<=7的任务
* @param code

View File

@@ -20,6 +20,8 @@ public interface SchBaseTaskMapper extends BaseMapper<SchBaseTask> {
List<SchBaseTask> checkHaveTask2(String code);
List<SchBaseTask> checkHaveTask3(String code);
List<SchBaseTask> checkHaveRelatedTaskInRequestParam(String param);
List<SchBaseTask> getWasteFoilTask(String code);

View File

@@ -56,6 +56,17 @@
)
</select>
<select id="checkHaveTask3" resultType="org.nl.wms.sch.task.service.dao.SchBaseTask">
SELECT *
FROM sch_base_task
WHERE task_status <![CDATA[ <= ]]> '071' AND task_status <![CDATA[ <> ]]> '07'
AND ( point_code1 = #{code}
OR point_code2 = #{code}
OR point_code3 = #{code}
)
</select>
<select id="checkHaveTask2" resultType="org.nl.wms.sch.task.service.dao.SchBaseTask">
SELECT *
FROM sch_base_task

View File

@@ -244,6 +244,11 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
return schBaseTaskMapper.checkHaveTask(code);
}
@Override
public List<SchBaseTask> checkHaveTask3(String code) {
return schBaseTaskMapper.checkHaveTask3(code);
}
@Override
public List<SchBaseTask> checkHaveTask2(String code) {
return schBaseTaskMapper.checkHaveTask2(code);

View File

@@ -20,7 +20,8 @@ public enum PointStatusEnum {
EMPTY_VEHICLE("2", "空载具/有货"),
WAIT_SLITTING("4", "待分切"),
WAIT_INSPACTION("3", "待质检"),
WAIT_BIND("5", "待绑定");
WAIT_BIND("5", "待绑定"),
WAIT_RAW("05", "生箔入卷占用");
private final String code;
private final String label;

View File

@@ -144,6 +144,8 @@ public class BakingOperationServiceImpl implements BakingOperationService {
if (StringUtil.isEmpty(putCode)){
throw new BadRequestException("终点不能为空");
}
PdmBiRawfoilworkorder order = rawfoilworkorderService.getByContainerName(orderCode);
if (ObjectUtil.isNotEmpty(orderCode)) {
rawfoilworkorderService.update(new LambdaUpdateWrapper<PdmBiRawfoilworkorder>()
.set(PdmBiRawfoilworkorder::getStatus, "04")
@@ -165,6 +167,7 @@ public class BakingOperationServiceImpl implements BakingOperationService {
taskParam.put("up_task_code", taskObj.getTask_code());
taskParam.put("device_code", hxPointCode);
taskParam.put("put_code", putCode);
taskParam.put("baking_time", order.getBaking_time());
taskParam.put("config_code", "InHotDockingTrussTask");
taskParam.put("create_mode", GeneralDefinition.ACS_CREATION);
// 满卷的收卷辊编码放在AGV任务的载具2上

View File

@@ -15,6 +15,7 @@ import org.nl.wms.sch.point.service.dao.SchBasePoint;
import org.nl.wms.sch.task.service.ISchBaseTaskService;
import org.nl.wms.sch.task.service.dao.SchBaseTask;
import org.nl.wms.sch.task_manage.AbstractTask;
import org.nl.wms.sch.task_manage.AcsTaskDto;
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.constant.RegionConstant;
@@ -135,4 +136,13 @@ public class InHotDockingTrussTask extends AbstractTask {
TaskUtils.setUpdateByType(taskObj, taskFinishedType);
taskService.updateById(taskObj);
}
@Override
public void deliveryBeforeProcessing(SchBaseTask task, AcsTaskDto acsTaskDto) {
JSONObject param = JSONObject.parseObject(task.getRequest_param());
String bakingTemperature = param.getString("baking_temperature");
String bakingTime = param.getString("baking_time");
acsTaskDto.setOven_time(bakingTime);
acsTaskDto.setTemperature(bakingTemperature);
}
}

View File

@@ -5,7 +5,6 @@ import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.exception.BadRequestException;
@@ -23,16 +22,14 @@ import org.nl.wms.sch.task_manage.AbstractTask;
import org.nl.wms.sch.task_manage.AcsTaskDto;
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.PointStatusEnum;
import org.nl.wms.sch.task_manage.core.enums.TaskFinishedTypeEnum;
import org.nl.wms.util.TaskUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;
import java.util.stream.Collectors;
import static org.nl.wms.sch.task_manage.core.constant.RegionConstant.REGION_A1_HXZC;
@@ -80,6 +77,7 @@ public class InHotTrussTask extends AbstractTask {
JSONObject requestObj = JSONObject.parseObject(requestParam);
String orderCode = requestObj.getString("order_code");
String isStorage = requestObj.getString("is_storage");
String isWidth = requestObj.getString("is_width");
String plan = requestObj.getString("plan");
String flag = "0";
PdmBiRawfoilworkorder order = rawfoilworkorderService.getByContainerName(orderCode);
@@ -93,7 +91,7 @@ public class InHotTrussTask extends AbstractTask {
requestObj.put("baking_temperature", bakingTemperature);
requestObj.put("baking_time", order.getBaking_time());
// 如果需要烘烤, 先找对应点
List<StIvtHotpointivt> hotList = getStIvtHotpointivts(task, order, bakingTemperature);
List<StIvtHotpointivt> hotList = getStIvtHotpointivts(task, order, bakingTemperature,isWidth);
// 没有烘烤位置或者没有找到对应的点就区待烘烤区, 就去待烘烤
if (hotList.size() == 0 || ObjectUtil.isEmpty(task.getPoint_code2())) {
// 找不到就去找暂存区(待烘烤区)
@@ -158,8 +156,15 @@ public class InHotTrussTask extends AbstractTask {
taskService.save(task);
}
private List<StIvtHotpointivt> getStIvtHotpointivts(SchBaseTask task, PdmBiRawfoilworkorder order, String bakingTemperature) {
private List<StIvtHotpointivt> getStIvtHotpointivts(SchBaseTask task, PdmBiRawfoilworkorder order, String bakingTemperature, String isWidth) {
List<StIvtHotpointivt> hotList = hotpointivtService.getNotTaskHotOven(order.getRoll_type(), "1","01");
if (isWidth.equals("1")){
hotList = hotList.stream()
.filter(item -> item != null
&& "with".equals(item.getPcsn()))
.collect(Collectors.toList());
}
if (hotList.size() > 0) {
List<StIvtHotpointivt> hotListFilter = multiFilter(hotList);
// 查找合适温度的点位
@@ -182,9 +187,15 @@ public class InHotTrussTask extends AbstractTask {
*
* @return
*/
public String getStIvtHotpointivt(String rollType, String bakingTemperature) {
public String getStIvtHotpointivt(String rollType, String bakingTemperature, String isWidth) {
String poitnt = "";
List<StIvtHotpointivt> hotList = hotpointivtService.getNotTaskHotOven(rollType, "1","01");
if (isWidth.equals("1")){
hotList = hotList.stream()
.filter(item -> item != null
&& "with".equals(item.getPcsn()))
.collect(Collectors.toList()); }
if (hotList.size() > 0) {
List<StIvtHotpointivt> hotListFilter = multiFilter(hotList);
// 查找合适温度的点位
@@ -194,6 +205,10 @@ public class InHotTrussTask extends AbstractTask {
if (ObjectUtil.isNotEmpty(pointTemperature)) {
if (pointTemperature.equals(bakingTemperature)) {
poitnt = pointCode;
//找到点位后讲点位设置为生箔暂存
String code = PointStatusEnum.WAIT_RAW.getCode();
hotPoint.setPoint_status(code);
stIvtHotpointivtMapper.updateById(hotPoint);
break;
}
}
@@ -286,6 +301,7 @@ public class InHotTrussTask extends AbstractTask {
hotpointivt.setContainer_name(order.getContainer_name());
hotpointivt.setWorkorder_id(order.getWorkorder_id());
hotpointivt.setInstorage_time(DateUtil.now());
hotpointivt.setLast_time(order.getBaking_time());
hotpointivt.setFull_vehicle_code(taskObj.getVehicle_code());
// 02烘烤中04烘烤完毕暂存中
hotpointivt.setPoint_status("0".equals(caching) ? "02" : "04");

View File

@@ -1,5 +1,6 @@
package org.nl.wms.sch.task_manage.tasks.hot;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.exception.BadRequestException;
@@ -105,8 +106,10 @@ public class OutHotToDockingTrussTask extends AbstractTask {
PdmBiRawfoilworkorder order = rawfoilworkorderService.getById(request.getString("workorder_id"));
SchBasePoint endPoint = pointService.getById(endPointCode);
// 终点设置值
endPoint.setMaterial_code(order.getContainer_name());
endPoint.setVehicle_code(order.getWind_roll());
if (ObjectUtil.isNotEmpty(order)) {
endPoint.setMaterial_code(order.getContainer_name());
endPoint.setVehicle_code(order.getWind_roll());
}
endPoint.setSource_id(request.getString("workorder_id"));
if (POINT_TYPE_HOT_DOCKING.equals(endPoint.getPoint_type())) {
endPoint.setPoint_status(POINT_STATUS_WAIT_QUALITY);

View File

@@ -1,12 +1,15 @@
package org.nl.wms.sch.task_manage.tasks.raw;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.SneakyThrows;
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.pdm.ivt.raw.service.IstIvtSbpointivtService;
import org.nl.wms.sch.point.service.ISchBasePointService;
import org.nl.wms.sch.point.service.dao.SchBasePoint;
@@ -50,6 +53,9 @@ public class RawDownAGVTask extends AbstractTask {
private IstIvtSbpointivtService sbpointivtService;
@Autowired
private RedissonClient redissonClient;
@Autowired
private IstIvtHotpointivtService hotpointivtService;
@Override
public void create() throws BadRequestException {
@@ -104,7 +110,19 @@ public class RawDownAGVTask extends AbstractTask {
// update: 任务完成创建桁架任务改成等待AGV申请
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
taskObj.setFinished_type(taskFinishedType.getCode());
// 将占用的烘箱点位释放掉
String requestParam = taskObj.getRequest_param();
JSONObject requestObj = JSONObject.parseObject(requestParam);
String putCode = requestObj.getString("put_code");
TaskUtils.setUpdateByType(taskObj, taskFinishedType);
if (StrUtil.isNotEmpty(putCode)){
StIvtHotpointivt hotpointivt = hotpointivtService.getPointByCode(putCode, false);
// 空位
if (ObjectUtil.isNotEmpty(hotpointivt)) {
hotpointivt.setPoint_status("01");
hotpointivtService.updateById(hotpointivt);
}
}
taskService.updateById(taskObj);
}
@@ -113,6 +131,18 @@ public class RawDownAGVTask extends AbstractTask {
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
checkTaskOptionStatus(taskObj);
// 取消
// 将占用的烘箱点位释放掉
String requestParam = taskObj.getRequest_param();
JSONObject requestObj = JSONObject.parseObject(requestParam);
String putCode = requestObj.getString("put_code");
if (StrUtil.isNotEmpty(putCode)){
StIvtHotpointivt hotpointivt = hotpointivtService.getPointByCode(putCode, false);
// 空位
if (ObjectUtil.isNotEmpty(hotpointivt)) {
hotpointivt.setPoint_status("01");
hotpointivtService.updateById(hotpointivt);
}
}
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
taskObj.setFinished_type(taskFinishedType.getCode());

View File

@@ -10,7 +10,7 @@ export default {
'instorage_time': '入箱时间',
'product_area': '生产区域',
'temperature': '温度',
'last_time': '倒计时',
'last_time': '加热时间',
'group_name': '组别',
'ext_code': '外部编码',
'point_location': '位置',

View File

@@ -59,6 +59,16 @@
@change="hand"
/>
</el-form-item>
<el-form-item label="备注">
<el-input
v-model="query.remark"
clearable
placeholder="备注"
style="width: 185px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item :label="$t('Hot.pan1.dialog.point_location')">
<el-select
v-model="query.point_location"
@@ -153,9 +163,15 @@
<el-form-item :label="$t('Hot.pan1.dialog.temperature')">
<el-input v-model="form.temperature" style="width: 370px;" />
</el-form-item>
<el-form-item label="加热时间">
<el-input v-model="form.last_time" style="width: 370px;" />
</el-form-item>
<el-form-item :label="$t('Hot.pan1.dialog.is_used')" prop="is_used">
<el-switch v-model="form.is_used" active-value="1" inactive-value="0" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" style="width: 370px;" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">{{ $t('common.Cancel') }}</el-button>
@@ -199,16 +215,20 @@
:min-width="flexWidth('instorage_time',crud.data,$t('Hot.pan1.table.instorage_time'))"
show-overflow-tooltip
/>
<el-table-column
prop="last_time"
:label="$t('Hot.pan1.table.last_time')"
:min-width="flexWidth('last_time',crud.data,$t('Hot.pan1.table.last_time'))"
/>
<el-table-column
prop="temperature"
:label="$t('Hot.pan1.table.temperature')"
:min-width="flexWidth('temperature',crud.data,$t('Hot.pan1.table.temperature'), 10)"
/>
<el-table-column
prop="last_time"
:label="$t('Hot.pan1.table.last_time')"
:min-width="flexWidth('last_time',crud.data,$t('Hot.pan1.table.last_time'))"
prop="remark"
:label="$t('Hot.pan1.table.remark')"
:min-width="flexWidth('remark',crud.data,$t('Hot.pan1.table.remark'))"
/>
<el-table-column
prop="group_name"
@@ -238,11 +258,7 @@
{{ dict.label.is_used[scope.row.is_used] }}
</template>
</el-table-column>
<el-table-column
prop="remark"
:label="$t('Hot.pan1.table.remark')"
:min-width="flexWidth('remark',crud.data,$t('Hot.pan1.table.remark'))"
/>
<el-table-column
prop="update_time"
:label="$t('Hot.pan1.table.update_time')"

View File

@@ -238,36 +238,7 @@
/>
</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.search.lock_type')" prop="device_point_type">
<el-select
v-model="form.lock_type"
size="mini"
:placeholder="$t('Point.search.lock_type')"
class="filter-item"
style="width: 370px;"
>
<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.dialog.parent_point_code')" prop="vehicle_code">
<el-input v-model="form.parent_point_code" clearable style="width: 370px;" @focus="getParentPoint" />
</el-form-item>