Browse Source

fix: 修复大屏

master
李永德 2 years ago
parent
commit
96413dde7d
  1. 4
      lms/nladmin-system/src/main/java/org/nl/wms/cockpit/rest/CockpitController.java
  2. 3
      lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/CockpitServiceImpl.java
  3. 17
      lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_STORAGE.wql

4
lms/nladmin-system/src/main/java/org/nl/wms/cockpit/rest/CockpitController.java

@ -40,6 +40,7 @@ public class CockpitController{
/**
* 生产统计
*/
@SaIgnore
@PostMapping("/productionStatistics")
@Log("生产统计")
@ApiOperation("生产统计")
@ -52,6 +53,7 @@ public class CockpitController{
*/
@PostMapping("/storageMonitor")
@Log("仓储监控")
@SaIgnore
@ApiOperation("仓储监控")
public CommonResult<Object> storageMonitor() {
return RestBusinessTemplate.execute(cockpitService::storageMonitor);
@ -62,6 +64,7 @@ public class CockpitController{
*/
@PostMapping("/findStorageById")
@Log("根据点位id获取仓储信息")
@SaIgnore
@ApiOperation("根据点位id获取仓储信息")
public CommonResult<SchBasePointDto> findStorageById(@RequestBody Map<String,String> id) {
return RestBusinessTemplate.execute(() -> {
@ -88,6 +91,7 @@ public class CockpitController{
*/
@PostMapping("/findDeviceById")
@Log("根据点位id获取设备信息")
@SaIgnore
@ApiOperation("根据点位id获取设备信息")
public CommonResult<DeviceDetailDto> findDeviceById(@RequestBody Map<String,String> id) {
return RestBusinessTemplate.execute(() -> {

3
lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/CockpitServiceImpl.java

@ -57,6 +57,7 @@ public class CockpitServiceImpl implements CockpitService{
if(ObjectUtil.isNotEmpty(result)) {
res = result.toJavaList(WorkorderDto.class);
res.forEach(r -> {
// todo: 未根据实际,可以不需要客户
r.setCust_name("新余钢铁");
if(StringUtils.isNotEmpty(r.getLabel())) {
r.setLabel(r.getLabel().substring(0, 2));
@ -216,7 +217,7 @@ public class CockpitServiceImpl implements CockpitService{
d.setWork_time(duration.toHours() + "");
}
// 设置设备状态
d.setDevice_status(PointUpdateUtil.getDeviceStatus(d.getDevice_code()));
// d.setDevice_status(PointUpdateUtil.getDeviceStatus(d.getDevice_code()));
DeviceEnum deviceEnum = DeviceEnum.get(d.getDevice_model(), d.getDevice_code());
// 添加图片名字
d.setDevice_url(deviceEnum.getPictureName());

17
lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_STORAGE.wql

@ -46,7 +46,10 @@
point.*
FROM
sch_base_point point
LEFT JOIN md_me_materialbase material ON material.material_id = point.material_id
LEFT JOIN md_me_material_detail material ON material.material_id = (
SELECT ve.material_id FROM st_ivt_vehicle_detail ve WHERE ve.vehicle_code = point.vehicle_code
AND ve.vehicle_type = point.vehicle_type AND ve.is_delete = '0'
)
WHERE
point.region_code = 'KLHJ'
ORDER BY
@ -63,9 +66,12 @@
point.*
FROM
sch_base_point point
LEFT JOIN md_me_materialbase material ON material.material_id = point.material_id
LEFT JOIN md_me_material_detail material ON material.material_id = (
SELECT ve.material_id FROM st_ivt_vehicle_detail ve WHERE ve.vehicle_code = point.vehicle_code
AND ve.vehicle_type = point.vehicle_type AND ve.is_delete = '0'
)
WHERE
point.region_code = 'CYZCQ'
point.region_code = 'CPHJ'
ORDER BY
point.create_time DESC
ENDSELECT
@ -80,7 +86,10 @@
point.*
FROM
sch_base_point point
LEFT JOIN md_me_materialbase material ON material.material_id = point.material_id
LEFT JOIN md_me_material_detail material ON material.material_id = (
SELECT ve.material_id FROM st_ivt_vehicle_detail ve WHERE ve.vehicle_code = point.vehicle_code
AND ve.vehicle_type = point.vehicle_type AND ve.is_delete = '0'
)
WHERE 1=1
OPTION 输入.point_id <> ""
point.point_id = 输入.point_id

Loading…
Cancel
Save