Merge remote-tracking branch 'origin/master'

master
夜笙歌 2 years ago
commit 718597fb4c

@ -16,7 +16,7 @@ public class RuoYiApplication
{
// System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(RuoYiApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
System.out.println("(♥◠‿◠)ノ゙ 启动成功 ლ(´ڡ`ლ)゙ \n" +
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +

@ -43,7 +43,7 @@ public class AllBroadHTMLController {
return "broad/beforeLibrary";
}
//6 智能工厂二楼终检位置
//6 智能工厂二楼终检位置——成品入库可视化平台
@GetMapping("/finalAssemblyProductionData")
public String finalAssemblyProduction() {
return "broad/finalAssemblyProductionData";

@ -42,10 +42,14 @@ public class FPBroadController {
return JSONArray.toJSONString(service.fp_selectOrderExecution());
}
@PostMapping("/selectOrderExecutionPlan")
@PostMapping("/selectOrderExecutionPlan")
@ApiOperation("订单执行")
private String fp_selectOrderExecutionPlan() {
return JSONArray.toJSONString(service.fp_selectOrderExecutionPlan());
return JSONArray.toJSONString(service.fp_selectOrderExecutionPlan());
}
@ -63,32 +67,43 @@ public class FPBroadController {
}
@PostMapping("/selectStationHourInfo")
// 每小时数据 底部列表
@ApiOperation("生产统计数据")
private String fp_selectStationHourInfo() {
return JSONArray.toJSONString(service.fp_selectStationHourInfo());
}
private Map<String,String> map;
@PostMapping("/selectStationHourInfoDay")
@ApiOperation("底部列表白天使用")
private String selectOrderExecutionDay() {
return JSONArray.toJSONString(service.fp_selectStationHourInfoDay());
}
private Map<String, String> map;
{
map=new HashMap<>();
map.put("A1","10.10.60.176");
map.put("A2","10.10.60.177");
map.put("B1","10.10.60.178");
map.put("B2","10.10.60.179");
map = new HashMap<>();
map.put("A1", "10.10.60.176");
map.put("A2", "10.10.60.177");
map.put("B1", "10.10.60.178");
map.put("B2", "10.10.60.179");
}
@PostMapping("/selectDeviceState")
@ApiOperation("设备状态查询")
private String selectDeviceState(){
private String selectDeviceState() {
Set<String> strings = map.keySet();
Map<String,Integer> stateMap = null;
Map<String, Integer> stateMap = null;
try {
stateMap =new HashMap<>();
stateMap = new HashMap<>();
for (String key:strings) {
ProcessBuilder procBuilder = new ProcessBuilder("ping", map.get(key),"-w","2","-n","1");
for (String key : strings) {
ProcessBuilder procBuilder = new ProcessBuilder("ping", map.get(key), "-w", "2", "-n", "1");
Process proc = procBuilder.start();
int exitValue = proc.waitFor();
stateMap.put(key,exitValue);
stateMap.put(key, exitValue);
}
} catch (IOException e) {
System.out.println(e.getMessage());
@ -96,24 +111,24 @@ public class FPBroadController {
} catch (InterruptedException e) {
e.printStackTrace();
}
String json=JSONArray.toJSONString(stateMap);
String json = JSONArray.toJSONString(stateMap);
return json;
}
@PostMapping("/selectFpStock")
@ApiOperation("发泡库存统计")
public String selectFpStock(){
public String selectFpStock() {
return JSONArray.toJSONString(service.selectFpStock());
}
@PostMapping("/selectTeamGroups")
@ApiOperation("班组是早晚")
public String selectTeamGroups(){
Integer state=iBroadDruidService.selectTeamGroups();
Map<String,Integer> map=new HashMap<>();
map.put("班组",state);
public String selectTeamGroups() {
Integer state = iBroadDruidService.selectTeamGroups();
Map<String, Integer> map = new HashMap<>();
map.put("班组", state);
return JSONObject.toJSONString(map);
}
}

@ -37,12 +37,13 @@ public class ZZJXBroadController {
private String selectProductInByTeam(@PathVariable("id") int id) {
if (id == 0) {
int tag = service.zz_countNightProductIn();
if (tag > 0) {
// int tag = service.zz_countNightProductIn();
Integer tag = service.zz_countNightProductInTag();
if (tag!=null&&tag > 0) {
return JSONArray.toJSONString(service.zz_selectProductInByTeamNight());
}
return JSONArray.toJSONString(service.zz_selectProductInByTeam());
//return null;
} else {
return JSONArray.toJSONString(service.zz_selectProductInByDay());
}
@ -57,6 +58,7 @@ public class ZZJXBroadController {
@PostMapping("/selectLossInfo")
@ApiOperation("查询Loss和分布")
private String selectLossInfo() {
// 统计19.30之后还有没有入库的条码
int tag = service.zz_countNightProductIn();
if (tag > 0) {
return JSONArray.toJSONString(service.zz_selectLossInfo(2));

@ -264,7 +264,7 @@ body.FoamerScada {
body.Foamer2 {
height: auto;
width: auto;
background: url(../img/foamer2.jpg) no-repeat center fixed;
background: url(../img/foamer21.jpg) no-repeat center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
@ -436,4 +436,4 @@ body.LinerDevice {
-o-background-size: cover;
background-size: 100% 100%;
color: rgba(255,255,255,.95);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1000 KiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

@ -70,11 +70,11 @@ $(() => {
$.post("/broad/zz/selectLossInfo", {}, data => {
data = JSON.parse(data)
let LOSSOne = data.find(val => val.name == '1').qty
let LOSSTwo = data.find(val => val.name == '4').qty
LOSSOne = LOSSOne > 0 ? LOSSOne : 0
LOSS(LOSSOne)
verticalBarChart({
xName: ["0-3分钟", "3-10分钟", ">10分钟"],
yData: [data.find(val => val.name == '2').qty, data.find(val => val.name == '3').qty, LOSSTwo],
yData: [data.find(val => val.name == '2').qty, data.find(val => val.name == '3').qty, data.find(val => val.name == '4').qty],
}, document.getElementById("statisticOfAttribute"));
})
// 标准节拍

@ -11,7 +11,7 @@ $(() => {
// 目标
await $.post(url + "/selectProductInTarget", {}, data => {
data = JSON.parse(data)
targetTop.tips = data.find(val => val.name == "进度目标").qty
targetTop.tips = data.find(val => val.name == "进度目标")?.qty
})
// 终检一次不合格率目标
await $.post(url + "/selectOneBadRateMb", {}, data => {
@ -34,7 +34,7 @@ $(() => {
})
// 产量
$.post(url + `/selectProductInByTeam/${yieldType}`, {}, data => {
data = JSON.parse(data)
data = JSON.parse(data || '{}')
// 实际
targetTop.reality = data.map(val => val.qty).reduce((val1, val2) => val1 + val2, 0)
total('#total', data.map(val => val.qty).reduce((val1, val2) => val1 + val2, 0))
@ -52,8 +52,8 @@ $(() => {
arr[0] = arr[0] - (arr.reduce((val1, val2) => val1 + val2, 0) - targetTop.tips)
targetTop.targetArr = arr
let num = 0
arr.forEach((val,index) => {
if(data[index].qty){
arr.forEach((val, index) => {
if (data[index].qty) {
num += arr[index]
}
})
@ -79,7 +79,7 @@ $(() => {
} else {
targetTop.rate = 0
}
targetTop.gap = targetTop.progress - targetTop.reality
targetTop.gap = targetTop.progress - targetTop.reality > 0 ? targetTop.progress - targetTop.reality : targetTop.reality - targetTop.progress
barChartAndLineChartThree({
xName: xName,
yDataOne: data.map(val => val.qty),
@ -235,4 +235,4 @@ const total = (el, val = 0) => {
<span style="position: absolute;top: 54.3%;left: 66.7%;color: #CFD2D0;font-size: 1.0vw">合计${val}</span>
`
$(el).html(html)
}
}

File diff suppressed because it is too large Load Diff

@ -357,9 +357,11 @@
<script src="../../static/js/auto-update.js" th:src="@{/js/auto-update.js}"></script>
<script>
let practical = 0
//夹具生产计划切换
let tableData = []
let classes = 0
let totalNum = 0
let dayClass = ['工位', '型号', '状态', '目标', '计划', '累计', '达成率', '7:30', '8:30', '9:30', '10:30', '11:30', '12:30', '13:30', '14:30', '15:30', '16:30', '17:30', '18:30']
let nightClass = ['工位', '型号', '状态', '目标', '计划', '累计', '达成率', '19:30', '20:30', '21:30', '22:30', '23:30', '0:30', '1:30', '2:30', '3:30', '4:30', '5:30', '6:30']
let tableWidth = ["5%", '10%', "7%", "5%", "5%", "5%", "8%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%"]
@ -461,15 +463,15 @@
}
$(async () => {
let totalNum = 0
area()
// 当班计划/实际产量/当班差异
await autoUpdate('/broad/fp/selectFpOrderInfo', INTERVAL, data => {
// let p = [data[1], data[0][2], data[0][3]]
totalNum = data.find(val => val.name == '当班计划').qty
let now = data.find(val => val.name == '实际产量').qty
// let now = practical
let p = [totalNum, now, totalNum - now]
console.log(p)
for (let i in p) {
updateSplitBlocks(p[i], selectors[i])
}
@ -535,7 +537,13 @@
classes = data[`班组`]
})
// 生产统计数据
autoUpdate('/broad/fp/selectStationHourInfo', INTERVAL, data => {
const isDay = () => {
let nowTime = new Date()
let nowHour = parseFloat(`${parseInt(nowTime.toLocaleTimeString().split(':')[0])}.${parseInt(nowTime.toLocaleTimeString().split(':')[1])}`)
console.log(nowHour < 19.3 && nowHour > 7.3)
return nowHour < 19.3 && nowHour > 7.3
}
autoUpdate(isDay() ? '/broad/fp/selectStationHourInfoDay' : '/broad/fp/selectStationHourInfo', INTERVAL, data => {
tableData = data
let dataOne = []
if (isFirst) {
@ -547,6 +555,11 @@
times++
}
getTable(classes, dataOne)
practical = eval(data.map(val => val.qty).join('+'))
console.log(selectors)
console.log(practical)
// updateSplitBlocks(totalNum - practical, selectors[2])
// updateSplitBlocks(eval(data.map(val => val.qty).join('+')), selectors[1])
total(
Number((data.filter(val => val.status === '生产中').length / 28) * 100).toFixed(2) + '%',
totalNum,
@ -570,19 +583,19 @@
// 右侧压力 + 右侧温度
autoUpdate('/broad/fp/selectDeviceStation', INTERVAL, data => {
// 右侧压力
multipleVerticalBarChart(
multipleVerticalBarChart1(
{
xName: data.map(value => value.station_no),
yDataOne: data.map(value => value.pol_yl),
yDataOne: data.map(value => (value.pol_yl * 1.1).toFixed(1)),
yDataOneName: "POL压力",
yDataTwo: data.map(value => value.so_yl),
yDataTwo: data.map(value => (value.so_yl * 1.3).toFixed(1)),
yDataTwoName: "ISO压力",
}, document.getElementById("top-right"))
// 右侧温度
multipleBrokenLineAreaDiagram(
multipleBrokenLineAreaDiagram1(
{
xData: data.map(value => value.station_no),
yDataOne: data.map(value => value.pol_wd),
yDataOne: data.map(value => value.pol_wd ),
yDataOneName: "POL温度",
yDataTwo: data.map(value => value.so_wd),
yDataTwoName: "ISO温度",
@ -970,4 +983,4 @@
}
</script>
</html>
</html>

@ -92,7 +92,7 @@ $(() => {
safeTitle('#safeTitle')
}
day()
setCronTak(day, "0 * * * * * *");
setCronTak(day, "0 0/30 * * * * *");
})
</script>
</html>

@ -28,8 +28,17 @@ public class BaseProductQty extends BaseEntity
/** 目标数量 */
@Excel(name = "目标数量")
private Long qty;
private Long qtyB;
public void setId(Long id)
public Long getQtyB() {
return qtyB;
}
public void setQtyB(Long qtyB) {
this.qtyB = qtyB;
}
public void setId(Long id)
{
this.id = id;
}

@ -27,6 +27,7 @@ public interface BroadDataMapper {
// 发泡线
///////////////////////////////////////////////////////////////////////////
List<OrderInfo> fp_selectOrderExecution();
List<OrderInfo> fp_selectOrderExecutionPlan();
///////////////////////////////////////////////////////////////////////////
@ -43,6 +44,7 @@ public interface BroadDataMapper {
List<DeviceStation> fp_selectDeviceStation();
List<FPStationHourInfo> fp_selectStationHourInfo();
List<FPStationHourInfo> fp_selectStationHourInfoDay();
List<OrderInfo> xk_selectStockOccupancy();
@ -119,4 +121,6 @@ public interface BroadDataMapper {
void deleteWorkTime();
void deleteBoxOutput();
Integer zz_countNightProductInTag();
}

@ -43,6 +43,7 @@ public interface IBroadDataService {
List<DeviceStation> fp_selectDeviceStation();
List<FPStationHourInfo> fp_selectStationHourInfo();
List<FPStationHourInfo> fp_selectStationHourInfoDay();
List<OrderInfo> xk_selectStockOccupancy();
@ -79,7 +80,7 @@ public interface IBroadDataService {
List<MTKBeen> mtk_sselectQATop3();
Integer zz_countNightProductInTag();
List<BoxOutput> zz_selectLossInfo(int state);
List<BoxOutput> mtk_selectQAZD();
@ -98,4 +99,6 @@ public interface IBroadDataService {
List<BoxOutput> pqk_selectProductInStore();
}

@ -66,6 +66,10 @@ public class BroadDataServiceImpl implements IBroadDataService
public List<OrderInfo> fp_selectOrderExecution(){
return mapper.fp_selectOrderExecution();
}
@Override
public List<OrderInfo> fp_selectOrderExecutionPlan(){
return mapper.fp_selectOrderExecutionPlan();
@ -85,6 +89,10 @@ public class BroadDataServiceImpl implements IBroadDataService
public List<FPStationHourInfo> fp_selectStationHourInfo() {
return mapper.fp_selectStationHourInfo();
}
@Override
public List<FPStationHourInfo> fp_selectStationHourInfoDay() {
return mapper.fp_selectStationHourInfoDay();
}
@Override
public List<BoxOutput> selectFpStock() {
@ -161,6 +169,11 @@ public class BroadDataServiceImpl implements IBroadDataService
return mapper.zz_countNightProductIn();
}
@Override
public Integer zz_countNightProductInTag() {
return mapper.zz_countNightProductInTag();
}
@Override
public List<BoxOutput> zz_selectLossInfo(int state) {
return mapper.zz_selectLossInfo( state);

@ -10,10 +10,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="qty" column="qty" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="qtyB" column="qty_b" />
</resultMap>
<sql id="selectBaseProductQtyVo">
select id, day, qty, create_time, create_by from base_product_qty
select id, day, qty,qty_b, create_time, create_by from base_product_qty
</sql>
<select id="countDay" resultType="integer">
select count(1) from base_product_qty where day=#{day}
@ -41,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null">id,</if>
<if test="day != null">day,</if>
<if test="qty != null">qty,</if>
<if test="qtyB != null">qty_b,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
</trim>
@ -48,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null">#{id},</if>
<if test="day != null">#{day},</if>
<if test="qty != null">#{qty},</if>
<if test="qtyB != null">#{qtyB},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
</trim>
@ -58,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="day != null">day = #{day},</if>
<if test="qty != null">qty = #{qty},</if>
<if test="qtyB != null">qty_b = #{qtyB},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
</trim>

@ -17,11 +17,18 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">目标数量:</label>
<label class="col-sm-3 control-label">白班目标数量:</label>
<div class="col-sm-8">
<input name="qty" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">夜班目标数量:</label>
<div class="col-sm-8">
<input name="qtyB" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />

@ -72,8 +72,13 @@
},
{
field: 'qty',
title: '目标数量'
title: '白班目标数量'
},
{
field: 'qtyB',
title: '夜班目标数量'
},
{
field: 'createTime',
title: '创建时间'

@ -18,11 +18,18 @@
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">目标数量:</label>
<label class="col-sm-3 control-label">白班目标数量:</label>
<div class="col-sm-8">
<input name="qty" th:field="*{qty}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">夜班目标数量:</label>
<div class="col-sm-8">
<input name="qtyB" th:field="*{qtyB}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />

Loading…
Cancel
Save