update:大屏接口修改
This commit is contained in:
@@ -11,6 +11,7 @@ import org.nl.acs.agv.AgvUtil;
|
|||||||
import org.nl.acs.config.AcsConfig;
|
import org.nl.acs.config.AcsConfig;
|
||||||
import org.nl.acs.device.service.DeviceService;
|
import org.nl.acs.device.service.DeviceService;
|
||||||
import org.nl.acs.device_driver.basedriver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
|
||||||
|
import org.nl.acs.device_driver.lnsh.converor_barcode.ConveyorBarcodeDeviceDriver;
|
||||||
import org.nl.acs.device_driver.lnsh.lnsh_Laminating_machine.ItemProtocol;
|
import org.nl.acs.device_driver.lnsh.lnsh_Laminating_machine.ItemProtocol;
|
||||||
import org.nl.acs.device_driver.lnsh.lnsh_Laminating_machine.LnshLaminatingMachineDeviceDriver;
|
import org.nl.acs.device_driver.lnsh.lnsh_Laminating_machine.LnshLaminatingMachineDeviceDriver;
|
||||||
import org.nl.acs.device_driver.lnsh.lnsh_fold_disc_site.LnshFoldDiscSiteDeviceDriver;
|
import org.nl.acs.device_driver.lnsh.lnsh_fold_disc_site.LnshFoldDiscSiteDeviceDriver;
|
||||||
@@ -1273,6 +1274,12 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
if (ObjectUtil.isEmpty(device)) {
|
if (ObjectUtil.isEmpty(device)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (device.getDeviceDriver() instanceof ConveyorBarcodeDeviceDriver) {
|
||||||
|
ConveyorBarcodeDeviceDriver driver = (ConveyorBarcodeDeviceDriver) device.getDeviceDriver();
|
||||||
|
status.put("mode", driver.getMode());
|
||||||
|
status.put("error", driver.getError());
|
||||||
|
status.put("move", driver.getMove());
|
||||||
|
}
|
||||||
if (device.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) {
|
if (device.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) {
|
||||||
LnshPalletizingManipulatorSiteDeviceDriver driver = (LnshPalletizingManipulatorSiteDeviceDriver) device.getDeviceDriver();
|
LnshPalletizingManipulatorSiteDeviceDriver driver = (LnshPalletizingManipulatorSiteDeviceDriver) device.getDeviceDriver();
|
||||||
status.put("mode", driver.getMode());
|
status.put("mode", driver.getMode());
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package org.nl.wms.cockpit.service.dao;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
* 点位信息(对接位、货架)
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class KlMaterialInfoVo {
|
||||||
|
private String pointStatus;
|
||||||
|
private String pointName;
|
||||||
|
private String pointCode;
|
||||||
|
private String materialWeight;
|
||||||
|
private String lastStandingTime;
|
||||||
|
private String materialCode;
|
||||||
|
}
|
||||||
@@ -389,7 +389,7 @@ public class CockpitServiceImpl implements CockpitService {
|
|||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
// 困料货架的信息显示
|
// 困料货架的信息显示
|
||||||
CompletableFuture<List<PointInfoVo>> trappedMaterialShelfTask = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<KlMaterialInfoVo>> trappedMaterialShelfTask = CompletableFuture.supplyAsync(() -> {
|
||||||
return cockPitMapper.selectKlhwInfo();
|
return cockPitMapper.selectKlhwInfo();
|
||||||
}, pool);
|
}, pool);
|
||||||
trappedMaterialShelfTask.thenAccept(result -> {
|
trappedMaterialShelfTask.thenAccept(result -> {
|
||||||
@@ -522,30 +522,64 @@ public class CockpitServiceImpl implements CockpitService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<InOutKilnVo> selectInOutKilnDetail() {
|
public List<InOutKilnVo> selectInOutKilnDetail() {
|
||||||
// List<String> points = new ArrayList<>();
|
List<String> points = new ArrayList<>();
|
||||||
// points.add("RYHCX01");
|
points.add("RYHCX01");
|
||||||
// points.add("CYHCX01");
|
points.add("CYHCX01");
|
||||||
// JSONArray pointsParam = new JSONArray(Collections.singletonList(points));
|
JSONArray pointsParam = new JSONArray(Collections.singletonList(points));
|
||||||
// AcsResponse response = wmsToAcsService.getDeviceStatus(pointsParam);
|
AcsResponse response = wmsToAcsService.getDeviceStatus(pointsParam);
|
||||||
// JSONArray data = ObjectUtil.isNotEmpty(response) ? response.getData() : pointsParam;
|
JSONArray data = ObjectUtil.isNotEmpty(response) ? response.getData() : pointsParam;
|
||||||
//todo 确定每托盘数量
|
|
||||||
List<InOutKilnVo> res = new ArrayList<>();
|
List<InOutKilnVo> res = new ArrayList<>();
|
||||||
InOutKilnVo in = cockPitMapper.selectInKilnInfo();
|
for (int i = 0; i < data.size(); i++) {
|
||||||
in.setStat("2");
|
JSONObject object = data.getJSONObject(i);
|
||||||
in.setPointName("入窑输送线");
|
if ("RYHCX01".equals(object.getString("device_code"))){
|
||||||
in.setWorkTime("3.5");
|
InOutKilnVo in = cockPitMapper.selectInKilnInfo();
|
||||||
in.setMaterialNum("25000");
|
if (null == in) {
|
||||||
InOutKilnVo out = cockPitMapper.selectOutKilnInfo();
|
in = new InOutKilnVo();
|
||||||
if (null == out) {
|
}
|
||||||
out = new InOutKilnVo();
|
if ("0".equals(object.getString("error"))){
|
||||||
|
in.setStat("2");
|
||||||
|
}else {
|
||||||
|
in.setStat("1");
|
||||||
|
}
|
||||||
|
in.setPointName("入窑输送线");
|
||||||
|
// in.setWorkTime("3.5");
|
||||||
|
res.add(in);
|
||||||
|
}
|
||||||
|
if ("CYHCX01".equals(object.getString("device_code"))){
|
||||||
|
InOutKilnVo out = cockPitMapper.selectOutKilnInfo();
|
||||||
|
if (null == out) {
|
||||||
|
out = new InOutKilnVo();
|
||||||
|
}
|
||||||
|
if ("0".equals(object.getString("error"))){
|
||||||
|
out.setStat("2");
|
||||||
|
}else {
|
||||||
|
out.setStat("1");
|
||||||
|
}
|
||||||
|
out.setPointName("出窑输送线");
|
||||||
|
// out.setWorkTime("3.5");
|
||||||
|
// out.setMaterialNum("25000");
|
||||||
|
// out.setDeliveredMaterialNum("25000");
|
||||||
|
res.add(out);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
out.setStat("2");
|
// //todo 确定每托盘数量
|
||||||
out.setPointName("出窑输送线");
|
// List<InOutKilnVo> res = new ArrayList<>();
|
||||||
out.setWorkTime("3.5");
|
// InOutKilnVo in = cockPitMapper.selectInKilnInfo();
|
||||||
out.setMaterialNum("25000");
|
// in.setStat("2");
|
||||||
out.setDeliveredMaterialNum("25000");
|
// in.setPointName("入窑输送线");
|
||||||
res.add(in);
|
// in.setWorkTime("3.5");
|
||||||
res.add(out);
|
// in.setMaterialNum("25000");
|
||||||
|
// InOutKilnVo out = cockPitMapper.selectOutKilnInfo();
|
||||||
|
// if (null == out) {
|
||||||
|
// out = new InOutKilnVo();
|
||||||
|
// }
|
||||||
|
// out.setStat("2");
|
||||||
|
// out.setPointName("出窑输送线");
|
||||||
|
// out.setWorkTime("3.5");
|
||||||
|
// out.setMaterialNum("25000");
|
||||||
|
// out.setDeliveredMaterialNum("25000");
|
||||||
|
// res.add(in);
|
||||||
|
// res.add(out);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public interface CockPitMapper {
|
|||||||
|
|
||||||
List<klInfoVo> queryKlInfoList();
|
List<klInfoVo> queryKlInfoList();
|
||||||
|
|
||||||
List<PointInfoVo> selectKlhwInfo();
|
List<KlMaterialInfoVo> selectKlhwInfo();
|
||||||
|
|
||||||
List<String> selectYzslwPoint();
|
List<String> selectYzslwPoint();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,6 +156,7 @@
|
|||||||
produceDate
|
produceDate
|
||||||
ORDER BY
|
ORDER BY
|
||||||
produceDate DESC
|
produceDate DESC
|
||||||
|
limit 7
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAllDevice" resultType="java.lang.String">
|
<select id="selectAllDevice" resultType="java.lang.String">
|
||||||
@@ -171,7 +172,8 @@
|
|||||||
from sch_base_task
|
from sch_base_task
|
||||||
WHERE config_code = 'YZMLTask'
|
WHERE config_code = 'YZMLTask'
|
||||||
and task_status = '5'
|
and task_status = '5'
|
||||||
and DATE ( create_time ) = CURDATE()) as deliveredPalletNum
|
and DATE ( create_time ) = CURDATE()) as deliveredPalletNum,
|
||||||
|
sum(sbv.material_qty) as materialNum
|
||||||
FROM sch_base_vehiclematerialgroup sbv
|
FROM sch_base_vehiclematerialgroup sbv
|
||||||
left join sch_base_point p
|
left join sch_base_point p
|
||||||
on p.vehicle_code = sbv.vehicle_code
|
on p.vehicle_code = sbv.vehicle_code
|
||||||
@@ -188,7 +190,8 @@
|
|||||||
from sch_base_task
|
from sch_base_task
|
||||||
where config_code = 'CYHCXMLTask'
|
where config_code = 'CYHCXMLTask'
|
||||||
and task_status = '5'
|
and task_status = '5'
|
||||||
and DATE ( create_time ) = CURDATE()) as palletNum
|
and DATE ( create_time ) = CURDATE()) as palletNum,
|
||||||
|
sum(material_qty) as materialNum
|
||||||
from sch_base_vehiclematerialgroup
|
from sch_base_vehiclematerialgroup
|
||||||
where out_kiln_time is not null
|
where out_kiln_time is not null
|
||||||
and DATE ( create_time ) = CURDATE()
|
and DATE ( create_time ) = CURDATE()
|
||||||
@@ -281,27 +284,35 @@
|
|||||||
ORDER BY p.point_code
|
ORDER BY p.point_code
|
||||||
</select>
|
</select>
|
||||||
<select id="queryKlInfoList" resultType="org.nl.wms.cockpit.service.dao.klInfoVo">
|
<select id="queryKlInfoList" resultType="org.nl.wms.cockpit.service.dao.klInfoVo">
|
||||||
SELECT
|
SELECT p.point_code as materialCode,
|
||||||
p.point_code as materialCode,
|
if(sum(v.material_weight) > 0.00, sum(v.material_weight), 0.00) as weight
|
||||||
sum( v.material_weight ) as weight
|
FROM sch_base_point P
|
||||||
FROM
|
LEFT JOIN sch_base_vehiclematerialgroup v ON p.point_code = v.point_code
|
||||||
sch_base_point P
|
WHERE p.region_code IN ('KL')
|
||||||
LEFT JOIN sch_base_vehiclematerialgroup v ON p.point_code = v.point_code
|
AND p.point_code NOT LIKE ('CBJ%')
|
||||||
WHERE
|
GROUP BY materialCode
|
||||||
p.region_code IN ( 'KL' )
|
ORDER BY weight desc
|
||||||
AND p.point_code NOT LIKE ( 'CBJ%' )
|
|
||||||
GROUP BY
|
|
||||||
materialCode
|
|
||||||
ORDER BY
|
|
||||||
materialCode
|
|
||||||
</select>
|
</select>
|
||||||
<select id="selectKlhwInfo" resultType="org.nl.wms.cockpit.service.dao.PointInfoVo">
|
<select id="selectKlhwInfo" resultType="org.nl.wms.cockpit.service.dao.KlMaterialInfoVo">
|
||||||
SELECT p.point_code as pointCode,
|
SELECT p.point_code AS pointCode,
|
||||||
p.point_name as pointName,
|
p.point_name AS pointName,
|
||||||
p.point_status as pointStatus
|
p.point_status AS pointStatus,
|
||||||
|
if(g.material_weight > 0.00, g.material_weight, 0.00) AS materialWeight,
|
||||||
|
IF
|
||||||
|
(
|
||||||
|
TIMESTAMPDIFF(
|
||||||
|
MINUTE, g.instorage_time,
|
||||||
|
NOW()) >= g.standing_time,
|
||||||
|
0,
|
||||||
|
g.standing_time - TIMESTAMPDIFF(
|
||||||
|
MINUTE, g.instorage_time,
|
||||||
|
NOW())
|
||||||
|
) AS lastStandingTime,
|
||||||
|
g.redundance_material_code as materialCode
|
||||||
FROM `sch_base_point` p
|
FROM `sch_base_point` p
|
||||||
WHERE p.region_code ='KL'
|
LEFT JOIN sch_base_vehiclematerialgroup g ON p.point_code = g.point_code
|
||||||
and p.point_code not like 'CBJ%'
|
WHERE p.region_code = 'KL'
|
||||||
|
AND p.point_code NOT LIKE 'CBJ%'
|
||||||
ORDER BY p.point_code
|
ORDER BY p.point_code
|
||||||
</select>
|
</select>
|
||||||
<select id="selectYzslwPoint" resultType="java.lang.String">
|
<select id="selectYzslwPoint" resultType="java.lang.String">
|
||||||
|
|||||||
Reference in New Issue
Block a user