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.device.service.DeviceService;
|
||||
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.LnshLaminatingMachineDeviceDriver;
|
||||
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)) {
|
||||
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) {
|
||||
LnshPalletizingManipulatorSiteDeviceDriver driver = (LnshPalletizingManipulatorSiteDeviceDriver) device.getDeviceDriver();
|
||||
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;
|
||||
});
|
||||
// 困料货架的信息显示
|
||||
CompletableFuture<List<PointInfoVo>> trappedMaterialShelfTask = CompletableFuture.supplyAsync(() -> {
|
||||
CompletableFuture<List<KlMaterialInfoVo>> trappedMaterialShelfTask = CompletableFuture.supplyAsync(() -> {
|
||||
return cockPitMapper.selectKlhwInfo();
|
||||
}, pool);
|
||||
trappedMaterialShelfTask.thenAccept(result -> {
|
||||
@@ -522,30 +522,64 @@ public class CockpitServiceImpl implements CockpitService {
|
||||
|
||||
@Override
|
||||
public List<InOutKilnVo> selectInOutKilnDetail() {
|
||||
// List<String> points = new ArrayList<>();
|
||||
// points.add("RYHCX01");
|
||||
// points.add("CYHCX01");
|
||||
// JSONArray pointsParam = new JSONArray(Collections.singletonList(points));
|
||||
// AcsResponse response = wmsToAcsService.getDeviceStatus(pointsParam);
|
||||
// JSONArray data = ObjectUtil.isNotEmpty(response) ? response.getData() : pointsParam;
|
||||
//todo 确定每托盘数量
|
||||
List<String> points = new ArrayList<>();
|
||||
points.add("RYHCX01");
|
||||
points.add("CYHCX01");
|
||||
JSONArray pointsParam = new JSONArray(Collections.singletonList(points));
|
||||
AcsResponse response = wmsToAcsService.getDeviceStatus(pointsParam);
|
||||
JSONArray data = ObjectUtil.isNotEmpty(response) ? response.getData() : pointsParam;
|
||||
List<InOutKilnVo> res = new ArrayList<>();
|
||||
InOutKilnVo in = cockPitMapper.selectInKilnInfo();
|
||||
in.setStat("2");
|
||||
in.setPointName("入窑输送线");
|
||||
in.setWorkTime("3.5");
|
||||
in.setMaterialNum("25000");
|
||||
InOutKilnVo out = cockPitMapper.selectOutKilnInfo();
|
||||
if (null == out) {
|
||||
out = new InOutKilnVo();
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
JSONObject object = data.getJSONObject(i);
|
||||
if ("RYHCX01".equals(object.getString("device_code"))){
|
||||
InOutKilnVo in = cockPitMapper.selectInKilnInfo();
|
||||
if (null == in) {
|
||||
in = 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");
|
||||
out.setPointName("出窑输送线");
|
||||
out.setWorkTime("3.5");
|
||||
out.setMaterialNum("25000");
|
||||
out.setDeliveredMaterialNum("25000");
|
||||
res.add(in);
|
||||
res.add(out);
|
||||
// //todo 确定每托盘数量
|
||||
// List<InOutKilnVo> res = new ArrayList<>();
|
||||
// InOutKilnVo in = cockPitMapper.selectInKilnInfo();
|
||||
// in.setStat("2");
|
||||
// in.setPointName("入窑输送线");
|
||||
// in.setWorkTime("3.5");
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ public interface CockPitMapper {
|
||||
|
||||
List<klInfoVo> queryKlInfoList();
|
||||
|
||||
List<PointInfoVo> selectKlhwInfo();
|
||||
List<KlMaterialInfoVo> selectKlhwInfo();
|
||||
|
||||
List<String> selectYzslwPoint();
|
||||
}
|
||||
|
||||
@@ -156,6 +156,7 @@
|
||||
produceDate
|
||||
ORDER BY
|
||||
produceDate DESC
|
||||
limit 7
|
||||
</select>
|
||||
|
||||
<select id="selectAllDevice" resultType="java.lang.String">
|
||||
@@ -171,7 +172,8 @@
|
||||
from sch_base_task
|
||||
WHERE config_code = 'YZMLTask'
|
||||
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
|
||||
left join sch_base_point p
|
||||
on p.vehicle_code = sbv.vehicle_code
|
||||
@@ -188,7 +190,8 @@
|
||||
from sch_base_task
|
||||
where config_code = 'CYHCXMLTask'
|
||||
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
|
||||
where out_kiln_time is not null
|
||||
and DATE ( create_time ) = CURDATE()
|
||||
@@ -281,27 +284,35 @@
|
||||
ORDER BY p.point_code
|
||||
</select>
|
||||
<select id="queryKlInfoList" resultType="org.nl.wms.cockpit.service.dao.klInfoVo">
|
||||
SELECT
|
||||
p.point_code as materialCode,
|
||||
sum( v.material_weight ) as weight
|
||||
FROM
|
||||
sch_base_point P
|
||||
LEFT JOIN sch_base_vehiclematerialgroup v ON p.point_code = v.point_code
|
||||
WHERE
|
||||
p.region_code IN ( 'KL' )
|
||||
AND p.point_code NOT LIKE ( 'CBJ%' )
|
||||
GROUP BY
|
||||
materialCode
|
||||
ORDER BY
|
||||
materialCode
|
||||
SELECT p.point_code as materialCode,
|
||||
if(sum(v.material_weight) > 0.00, sum(v.material_weight), 0.00) as weight
|
||||
FROM sch_base_point P
|
||||
LEFT JOIN sch_base_vehiclematerialgroup v ON p.point_code = v.point_code
|
||||
WHERE p.region_code IN ('KL')
|
||||
AND p.point_code NOT LIKE ('CBJ%')
|
||||
GROUP BY materialCode
|
||||
ORDER BY weight desc
|
||||
</select>
|
||||
<select id="selectKlhwInfo" resultType="org.nl.wms.cockpit.service.dao.PointInfoVo">
|
||||
SELECT p.point_code as pointCode,
|
||||
p.point_name as pointName,
|
||||
p.point_status as pointStatus
|
||||
<select id="selectKlhwInfo" resultType="org.nl.wms.cockpit.service.dao.KlMaterialInfoVo">
|
||||
SELECT p.point_code AS pointCode,
|
||||
p.point_name AS pointName,
|
||||
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
|
||||
WHERE p.region_code ='KL'
|
||||
and p.point_code not like 'CBJ%'
|
||||
LEFT JOIN sch_base_vehiclematerialgroup g ON p.point_code = g.point_code
|
||||
WHERE p.region_code = 'KL'
|
||||
AND p.point_code NOT LIKE 'CBJ%'
|
||||
ORDER BY p.point_code
|
||||
</select>
|
||||
<select id="selectYzslwPoint" resultType="java.lang.String">
|
||||
|
||||
Reference in New Issue
Block a user