fix:调整看板数据
This commit is contained in:
@@ -45,6 +45,13 @@ public class CockPitController {
|
|||||||
return new ResponseEntity<>(cockpitService.sortingMonitor(), HttpStatus.OK);
|
return new ResponseEntity<>(cockpitService.sortingMonitor(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/klineInfo")
|
||||||
|
@Log("窑看板")
|
||||||
|
@ApiOperation("窑看板")
|
||||||
|
public ResponseEntity<Object> klineInfo(){
|
||||||
|
return new ResponseEntity<>(cockpitService.getKlineInfo(), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/screenTableData")
|
@PostMapping("/screenTableData")
|
||||||
@Log("大屏-两侧图表")
|
@Log("大屏-两侧图表")
|
||||||
@ApiOperation("大屏-两侧图表")
|
@ApiOperation("大屏-两侧图表")
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import org.nl.common.domain.query.PageQuery;
|
|||||||
import org.nl.wms.cockpit.service.dao.*;
|
import org.nl.wms.cockpit.service.dao.*;
|
||||||
import org.nl.wms.das.device.record.service.dao.DasDeviceErrorRecord;
|
import org.nl.wms.das.device.record.service.dao.DasDeviceErrorRecord;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
@@ -27,6 +28,8 @@ public interface CockpitService {
|
|||||||
*/
|
*/
|
||||||
ConcurrentHashMap<String,Object> sortingMonitor();
|
ConcurrentHashMap<String,Object> sortingMonitor();
|
||||||
|
|
||||||
|
Map<String,List<KilnInfoVo>> getKlineInfo();
|
||||||
|
|
||||||
ConcurrentHashMap<String,Object> screenTableData();
|
ConcurrentHashMap<String,Object> screenTableData();
|
||||||
|
|
||||||
ConcurrentHashMap<String, Object> deviceCondition();
|
ConcurrentHashMap<String, Object> deviceCondition();
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package org.nl.wms.cockpit.service.dao;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 窑看板
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class KilnInfoVo {
|
||||||
|
private String vehicleCode;
|
||||||
|
private String materialCode;
|
||||||
|
private String materialModel;
|
||||||
|
private String materialQty;
|
||||||
|
}
|
||||||
@@ -16,4 +16,5 @@ public class ShiftProductionVo {
|
|||||||
private String workOrderCode;
|
private String workOrderCode;
|
||||||
private String pointCode;
|
private String pointCode;
|
||||||
private String planQty;
|
private String planQty;
|
||||||
|
private String qualifyRate;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ import org.nl.wms.ext.acs.service.dto.to.wms.AcsResponse;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
@@ -64,6 +66,9 @@ public class CockpitServiceImpl implements CockpitService {
|
|||||||
int qualified = Integer.parseInt(productionVo.getQualifiedQty());
|
int qualified = Integer.parseInt(productionVo.getQualifiedQty());
|
||||||
int lastQty = plan - unqualified - qualified;
|
int lastQty = plan - unqualified - qualified;
|
||||||
productionVo.setLastQty(String.valueOf(Math.max(lastQty, 0)));
|
productionVo.setLastQty(String.valueOf(Math.max(lastQty, 0)));
|
||||||
|
BigDecimal planBig = new BigDecimal(plan);
|
||||||
|
BigDecimal quaBig = new BigDecimal(qualified);
|
||||||
|
productionVo.setQualifyRate(String.valueOf(quaBig.divide(planBig, 2, RoundingMode.HALF_UP)));
|
||||||
}
|
}
|
||||||
return shiftProductionList;
|
return shiftProductionList;
|
||||||
}, pool);
|
}, pool);
|
||||||
@@ -179,6 +184,20 @@ public class CockpitServiceImpl implements CockpitService {
|
|||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, List<KilnInfoVo>> getKlineInfo() {
|
||||||
|
Map<String, List<KilnInfoVo>> res = new HashMap<>();
|
||||||
|
List<KilnInfoVo> inKilnInfoVos = cockPitMapper.selectInKilnBoard();
|
||||||
|
List<KilnInfoVo> outKilnInfoVos = cockPitMapper.selectOutKilnBoard();
|
||||||
|
List<KilnInfoVo> oneKilnInfoVos = cockPitMapper.selectOneKilnInfo();
|
||||||
|
List<KilnInfoVo> twoKilnInfoVos = cockPitMapper.selectTwoKilnInfo();
|
||||||
|
res.put("inKilnInfoVos", inKilnInfoVos);
|
||||||
|
res.put("outKilnInfoVos", outKilnInfoVos);
|
||||||
|
res.put("oneKilnInfoVos", oneKilnInfoVos);
|
||||||
|
res.put("twoKilnInfoVos", twoKilnInfoVos);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ConcurrentHashMap<String, Object> screenTableData() {
|
public ConcurrentHashMap<String, Object> screenTableData() {
|
||||||
ThreadPoolExecutor pool = ThreadPoolExecutorUtil.getPoll();
|
ThreadPoolExecutor pool = ThreadPoolExecutorUtil.getPoll();
|
||||||
|
|||||||
@@ -71,4 +71,12 @@ public interface CockPitMapper {
|
|||||||
|
|
||||||
ShiftProductionVo selectQtByVo(ShiftProductionVo productionVo);
|
ShiftProductionVo selectQtByVo(ShiftProductionVo productionVo);
|
||||||
|
|
||||||
|
List<KilnInfoVo> selectInKilnBoard();
|
||||||
|
|
||||||
|
List<KilnInfoVo> selectOutKilnBoard();
|
||||||
|
|
||||||
|
List<KilnInfoVo> selectOneKilnInfo();
|
||||||
|
|
||||||
|
List<KilnInfoVo> selectTwoKilnInfo();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,6 +70,8 @@
|
|||||||
LEFT JOIN md_base_material m ON m.material_id = w.material_id
|
LEFT JOIN md_base_material m ON m.material_id = w.material_id
|
||||||
LEFT JOIN md_cs_customerbase c ON w.customer = c.cust_id
|
LEFT JOIN md_cs_customerbase c ON w.customer = c.cust_id
|
||||||
WHERE w.region_code = 'YZ'
|
WHERE w.region_code = 'YZ'
|
||||||
|
and (w.workorder_status = '3' and w.realproduceend_date is null)
|
||||||
|
or (STR_TO_DATE(w.realproduceend_date, '%Y-%m-%d') = CURRENT_DATE)
|
||||||
ORDER BY w.team DESC, w.workorder_status
|
ORDER BY w.team DESC, w.workorder_status
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -376,5 +378,51 @@
|
|||||||
WHERE workorder_code = #{workOrderCode}
|
WHERE workorder_code = #{workOrderCode}
|
||||||
AND get_station = #{pointCode}
|
AND get_station = #{pointCode}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectInKilnBoard" resultType="org.nl.wms.cockpit.service.dao.KilnInfoVo">
|
||||||
|
SELECT g.vehicle_code as vehicleCode,
|
||||||
|
m.material_code as materialCode,
|
||||||
|
g.material_qty as materialQty,
|
||||||
|
m.material_model as materialModel
|
||||||
|
FROM sch_base_vehiclematerialgroup g
|
||||||
|
LEFT JOIN md_base_material m ON g.material_id = m.material_id
|
||||||
|
LEFT JOIN sch_base_point p ON g.point_code = p.point_code
|
||||||
|
WHERE g.group_bind_material_status = '2'
|
||||||
|
and p.region_code = 'RYHCX'
|
||||||
|
order by g.update_time desc
|
||||||
|
</select>
|
||||||
|
<select id="selectOutKilnBoard" resultType="org.nl.wms.cockpit.service.dao.KilnInfoVo">
|
||||||
|
SELECT g.vehicle_code as vehicleCode,
|
||||||
|
m.material_code as materialCode,
|
||||||
|
g.material_qty as materialQty,
|
||||||
|
m.material_model as materialModel
|
||||||
|
FROM sch_base_vehiclematerialgroup g
|
||||||
|
LEFT JOIN md_base_material m ON g.material_id = m.material_id
|
||||||
|
LEFT JOIN sch_base_point p ON g.point_code = p.point_code
|
||||||
|
WHERE g.group_bind_material_status = '2'
|
||||||
|
and p.region_code = 'CYHCX'
|
||||||
|
order by g.update_time desc
|
||||||
|
</select>
|
||||||
|
<select id="selectOneKilnInfo" resultType="org.nl.wms.cockpit.service.dao.KilnInfoVo">
|
||||||
|
SELECT g.vehicle_code as vehicleCode,
|
||||||
|
m.material_code as materialCode,
|
||||||
|
g.material_qty as materialQty,
|
||||||
|
m.material_model as materialModel
|
||||||
|
FROM sch_base_vehiclematerialgroup g
|
||||||
|
LEFT JOIN md_base_material m ON g.material_id = m.material_id
|
||||||
|
WHERE g.group_bind_material_status = '2'
|
||||||
|
and g.point_code = 'RYK01'
|
||||||
|
order by g.update_time desc
|
||||||
|
</select>
|
||||||
|
<select id="selectTwoKilnInfo" resultType="org.nl.wms.cockpit.service.dao.KilnInfoVo">
|
||||||
|
SELECT g.vehicle_code as vehicleCode,
|
||||||
|
m.material_code as materialCode,
|
||||||
|
g.material_qty as materialQty,
|
||||||
|
m.material_model as materialModel
|
||||||
|
FROM sch_base_vehiclematerialgroup g
|
||||||
|
LEFT JOIN md_base_material m ON g.material_id = m.material_id
|
||||||
|
WHERE g.group_bind_material_status = '2'
|
||||||
|
and g.point_code = 'RYK02'
|
||||||
|
order by g.update_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user