add: lms、acs烘箱联调
This commit is contained in:
@@ -64,10 +64,11 @@ public class BakingPdaServiceImpl implements BakingPdaService {
|
||||
String pointCode = param.getString("point_code");
|
||||
Assert.notBlank(pointCode, "点位不能为空!");
|
||||
SchBasePoint hotZcPoint = pointService.getById(pointCode);
|
||||
|
||||
if (ObjectUtil.isEmpty(hotZcPoint)) {
|
||||
throw new BadRequestException("点位 [" + pointCode + "] 不存在!");
|
||||
}
|
||||
PdmBiRawfoilworkorder rawOrder = rawfoilworkorderService.getById(hotZcPoint.getSource_id());
|
||||
PdmBiRawfoilworkorder rawOrder = rawfoilworkorderService.getByContainerName(hotZcPoint.getMaterial_code());
|
||||
if (ObjectUtil.isEmpty(rawOrder)) {
|
||||
throw new BadRequestException("点位 [" + pointCode + "] 对应的生箔工单不存在!");
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.pdm.ivt.hot.service.dao.StIvtHotpointivt;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.pdm.ivt.hot.service.dao.dto.StIvtHotpointivtParam;
|
||||
import org.nl.wms.quartz.dto.HotDeviceAndEreaDto;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -74,7 +75,7 @@ public interface IstIvtHotpointivtService extends IService<StIvtHotpointivt> {
|
||||
* @param productArea /
|
||||
* @return /
|
||||
*/
|
||||
JSONArray getHotDeviceInfoForAcs(String productArea);
|
||||
List<HotDeviceAndEreaDto> getHotDeviceInfoForAcs(String productArea);
|
||||
|
||||
/**
|
||||
* 根据点位编码获取烘箱点位
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.nl.wms.pdm.ivt.hot.service.dao.mapper;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import org.nl.wms.pdm.ivt.hot.service.dao.StIvtHotpointivt;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.quartz.dto.HotDeviceAndEreaDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -17,7 +18,7 @@ public interface StIvtHotpointivtMapper extends BaseMapper<StIvtHotpointivt> {
|
||||
|
||||
List<StIvtHotpointivt> getNotTaskHotOven(String rollType, String used);
|
||||
|
||||
JSONArray getHotDeviceInfoForAcs(String productArea);
|
||||
List<HotDeviceAndEreaDto> getHotDeviceInfoForAcs(String productArea);
|
||||
|
||||
List<StIvtHotpointivt> getNeedBakingPoint();
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
AND ht3.point_status = '01'
|
||||
AND t2.task_status <![CDATA[ < ]]> '07')
|
||||
</select>
|
||||
<select id="getHotDeviceInfoForAcs" resultType="com.alibaba.fastjson.JSONArray">
|
||||
<select id="getHotDeviceInfoForAcs" resultType="org.nl.wms.quartz.dto.HotDeviceAndEreaDto">
|
||||
SELECT point_code AS device_code,
|
||||
product_area
|
||||
FROM st_ivt_hotpointivt ivt
|
||||
|
||||
@@ -14,6 +14,7 @@ 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.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -130,7 +131,7 @@ public class StIvtHotpointivtServiceImpl extends ServiceImpl<StIvtHotpointivtMap
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray getHotDeviceInfoForAcs(String productArea) {
|
||||
public List<HotDeviceAndEreaDto> getHotDeviceInfoForAcs(String productArea) {
|
||||
return stIvtHotpointivtMapper.getHotDeviceInfoForAcs(productArea);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.nl.wms.quartz;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.SneakyThrows;
|
||||
@@ -8,10 +9,14 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.utils.RedisUtils;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.pdm.ivt.hot.service.IstIvtHotpointivtService;
|
||||
import org.nl.wms.quartz.dto.HotDeviceAndEreaDto;
|
||||
import org.nl.wms.util.URLEnum;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 自动查询烘箱温度
|
||||
* @Author: lyd
|
||||
@@ -34,11 +39,12 @@ public class AutoQueryDeviceStatus {
|
||||
String product_area = url.getProduct_area();
|
||||
//通过ACS接口获取温度
|
||||
// 查找设备号和区域
|
||||
JSONArray device_rows = hotpointivtService.getHotDeviceInfoForAcs(product_area);
|
||||
List<HotDeviceAndEreaDto> device_rows = hotpointivtService.getHotDeviceInfoForAcs(product_area);
|
||||
if (device_rows.size() == 0) {
|
||||
continue;
|
||||
}
|
||||
JSONObject jo = wmsToAcsService.getHotPointStatus(device_rows);
|
||||
JSONArray array= JSONArray.parseArray(JSON.toJSONString(device_rows));
|
||||
JSONObject jo = wmsToAcsService.getHotPointStatus(array);
|
||||
JSONArray de_rows = jo.getJSONArray("data");
|
||||
for (int i = 0; i < de_rows.size(); i++) {
|
||||
JSONObject row = de_rows.getJSONObject(i);
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.nl.wms.quartz.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class HotDeviceAndEreaDto {
|
||||
private String device_code;
|
||||
private String product_area;
|
||||
}
|
||||
Reference in New Issue
Block a user