Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -322,6 +322,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
jo.put("device_name", driver.getDevice().getDevice_name());
|
jo.put("device_name", driver.getDevice().getDevice_name());
|
||||||
jo.put("status", driver.getStatus());
|
jo.put("status", driver.getStatus());
|
||||||
jo.put("power", driver.getElectric_qty());
|
jo.put("power", driver.getElectric_qty());
|
||||||
|
jo.put("x", driver.getX());
|
||||||
|
jo.put("y", driver.getY());
|
||||||
jo.put("error", driver.getError());
|
jo.put("error", driver.getError());
|
||||||
jo.put("error_msg", driver.getError() == 0 ? "" : driver.getError_message());
|
jo.put("error_msg", driver.getError() == 0 ? "" : driver.getError_message());
|
||||||
} else if (device.getDeviceDriver() instanceof AgvNdcTwoDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof AgvNdcTwoDeviceDriver) {
|
||||||
@@ -330,6 +332,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
jo.put("device_name", driver.getDevice().getDevice_name());
|
jo.put("device_name", driver.getDevice().getDevice_name());
|
||||||
jo.put("status", driver.getStatus());
|
jo.put("status", driver.getStatus());
|
||||||
jo.put("power", driver.getElectric_qty());
|
jo.put("power", driver.getElectric_qty());
|
||||||
|
jo.put("x", driver.getX());
|
||||||
|
jo.put("y", driver.getY());
|
||||||
jo.put("error", driver.getError());
|
jo.put("error", driver.getError());
|
||||||
jo.put("error_msg", driver.getError() == 0 ? "" : driver.getError_message());
|
jo.put("error_msg", driver.getError() == 0 ? "" : driver.getError_message());
|
||||||
} else if (device.getDeviceDriver() instanceof OvenGantryManipulatorDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof OvenGantryManipulatorDeviceDriver) {
|
||||||
|
|||||||
@@ -29,4 +29,9 @@ public interface AutoRiKuService {
|
|||||||
* 获取发货区
|
* 获取发货区
|
||||||
* */
|
* */
|
||||||
JSONObject queryNum(JSONObject whereJson);
|
JSONObject queryNum(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取空托盘
|
||||||
|
* */
|
||||||
|
JSONObject getEmpPoint();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,4 +227,44 @@ public class AutoRiKuServiceImpl implements AutoRiKuService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject getEmpPoint() {
|
||||||
|
WQLObject attrTab = WQLObject.getWQLObject("st_ivt_structattr");
|
||||||
|
|
||||||
|
JSONObject jsonAll = new JSONObject();
|
||||||
|
JSONArray dataArr = new JSONArray();
|
||||||
|
|
||||||
|
// 获取有货货位
|
||||||
|
JSONArray haveArr = attrTab.query("sect_code = 'KTP01' and is_delete = '0' and IFNULL(storagevehicle_code,'') <> '' and is_used = '1' ").getResultJSONArray(0);
|
||||||
|
|
||||||
|
JSONObject jsonHave = new JSONObject();
|
||||||
|
jsonHave.put("name", "有货");
|
||||||
|
jsonHave.put("value", haveArr.size());
|
||||||
|
|
||||||
|
// 获取无货货位
|
||||||
|
JSONArray notHaveArr = attrTab.query("sect_code = 'KTP01' and is_delete = '0' and IFNULL(storagevehicle_code,'') = '' and is_used = '1'").getResultJSONArray(0);
|
||||||
|
JSONObject jsonNotHave = new JSONObject();
|
||||||
|
jsonNotHave.put("name", "空闲");
|
||||||
|
jsonNotHave.put("value", notHaveArr.size());
|
||||||
|
|
||||||
|
// 获取禁用货位
|
||||||
|
JSONArray usedArr = attrTab.query("sect_code = 'KTP01' and is_used = '0' and IFNULL(storagevehicle_code,'') = '' and is_delete = '0'").getResultJSONArray(0);
|
||||||
|
|
||||||
|
JSONObject jsonUsed = new JSONObject();
|
||||||
|
jsonUsed.put("name", "禁用");
|
||||||
|
jsonUsed.put("value", usedArr.size());
|
||||||
|
|
||||||
|
dataArr.add(jsonHave);
|
||||||
|
dataArr.add(jsonNotHave);
|
||||||
|
dataArr.add(jsonUsed);
|
||||||
|
|
||||||
|
int num = haveArr.size() + notHaveArr.size() + usedArr.size();
|
||||||
|
|
||||||
|
jsonAll.put("pieSubTest", "总仓位: "+num);
|
||||||
|
jsonAll.put("data", dataArr);
|
||||||
|
jsonAll.put("name", "立库空托盘统计");
|
||||||
|
|
||||||
|
return jsonAll;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ public class AutoWebSocketRiKu {
|
|||||||
data.put("two",autoRiKuService.getTwoPoint());
|
data.put("two",autoRiKuService.getTwoPoint());
|
||||||
data.put("three",autoRiKuService.getThreePoint());
|
data.put("three",autoRiKuService.getThreePoint());
|
||||||
data.put("all",autoRiKuService.getAllPoint());
|
data.put("all",autoRiKuService.getAllPoint());
|
||||||
|
data.put("empList",autoRiKuService.getEmpPoint());
|
||||||
|
|
||||||
return new ResponseEntity<>(data, HttpStatus.OK);
|
return new ResponseEntity<>(data, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -458,6 +458,8 @@ public class SapToLmsServiceImpl implements SapToLmsService {
|
|||||||
String lgort_out = jo.getString("LGORT1"); // 调出仓库
|
String lgort_out = jo.getString("LGORT1"); // 调出仓库
|
||||||
String lgort_in = jo.getString("LGORT2"); // 调入仓库
|
String lgort_in = jo.getString("LGORT2"); // 调入仓库
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(jo.getString("ZDBSQD"))) throw new BadRequestException("交货单不能为空!");
|
||||||
|
|
||||||
JSONObject jsonStorOut = storTab.query("stor_code = '" + lgort_out + "' and is_used = '1' and is_delete = '0'").uniqueResult(0);
|
JSONObject jsonStorOut = storTab.query("stor_code = '" + lgort_out + "' and is_used = '1' and is_delete = '0'").uniqueResult(0);
|
||||||
JSONObject jsonStorIn = storTab.query("stor_code = '" + lgort_in + "' and is_used = '1' and is_delete = '0'").uniqueResult(0);
|
JSONObject jsonStorIn = storTab.query("stor_code = '" + lgort_in + "' and is_used = '1' and is_delete = '0'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonStorOut) || ObjectUtil.isEmpty(jsonStorIn)) {
|
if (ObjectUtil.isEmpty(jsonStorOut) || ObjectUtil.isEmpty(jsonStorIn)) {
|
||||||
@@ -488,21 +490,29 @@ public class SapToLmsServiceImpl implements SapToLmsService {
|
|||||||
jsonMst.put("user", "sap");
|
jsonMst.put("user", "sap");
|
||||||
|
|
||||||
// 明细
|
// 明细
|
||||||
|
JSONArray item = jo.getJSONArray("ITEM");
|
||||||
|
|
||||||
JSONArray tableData = new JSONArray();
|
JSONArray tableData = new JSONArray();
|
||||||
|
for (int i = 0; i < item.size(); i++) {
|
||||||
|
JSONObject jsonObject = item.getJSONObject(i);
|
||||||
JSONObject jsonDtl = new JSONObject();
|
JSONObject jsonDtl = new JSONObject();
|
||||||
JSONObject jsonMater = materTab.query("material_code = '" + jo.getString("MATNR") + "'").uniqueResult(0);
|
|
||||||
if (ObjectUtil.isEmpty(jsonMater)) throw new BadRequestException("此物料不存在" + jo.getString("MATNR"));
|
JSONObject jsonMater = materTab.query("material_code = '" + jsonObject.getString("MATNR") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(jsonMater)) throw new BadRequestException("此物料不存在" + jsonObject.getString("MATNR"));
|
||||||
JSONObject jsonUnit = unitTab.query("measure_unit_id = '" + jsonMater.getString("base_unit_id") + "'").uniqueResult(0);
|
JSONObject jsonUnit = unitTab.query("measure_unit_id = '" + jsonMater.getString("base_unit_id") + "'").uniqueResult(0);
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(jsonObject.getString("KALAB"))) throw new BadRequestException("调拨数量不能为空!");
|
||||||
|
if (ObjectUtil.isEmpty(jsonObject.getString("ZVBELN"))) throw new BadRequestException("订单不能为空!");
|
||||||
|
|
||||||
jsonDtl.put("material_id", jsonMater.getString("material_id"));
|
jsonDtl.put("material_id", jsonMater.getString("material_id"));
|
||||||
jsonDtl.put("qty_unit_id", jsonMater.getLongValue("base_unit_id"));
|
jsonDtl.put("qty_unit_id", jsonMater.getLongValue("base_unit_id"));
|
||||||
jsonDtl.put("qty_unit_name", jsonUnit.getString("unit_name"));
|
jsonDtl.put("qty_unit_name", jsonUnit.getString("unit_name"));
|
||||||
jsonDtl.put("plan_qty", jo.getDoubleValue("KALAB"));
|
jsonDtl.put("plan_qty", jsonObject.getDoubleValue("KALAB"));
|
||||||
jsonDtl.put("source_bill_code", jo.getString("ZVBELN"));
|
jsonDtl.put("source_bill_code", jsonObject.getString("ZVBELN"));
|
||||||
jsonDtl.put("vbeln", jo.getString("ZDBSQD")); // 来源交货单
|
jsonDtl.put("vbeln", jo.getString("ZDBSQD")); // 来源交货单
|
||||||
// jsonDtl.put("posnr", json.getString("POSNR")); // 来源交货单行
|
jsonDtl.put("width", jsonObject.getString("ZHL02")); // 幅宽
|
||||||
jsonDtl.put("width", jo.getString("ZHL02")); // 幅宽
|
|
||||||
tableData.add(jsonDtl);
|
tableData.add(jsonDtl);
|
||||||
|
}
|
||||||
jsonMst.put("tableData", tableData);
|
jsonMst.put("tableData", tableData);
|
||||||
|
|
||||||
// 调用出库新增
|
// 调用出库新增
|
||||||
|
|||||||
@@ -612,7 +612,9 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
for (int j = 0; j < disArr.size(); j++) {
|
for (int j = 0; j < disArr.size(); j++) {
|
||||||
JSONObject jsonDis = disArr.getJSONObject(j);
|
JSONObject jsonDis = disArr.getJSONObject(j);
|
||||||
JSONObject paramDis = new JSONObject();
|
JSONObject paramDis = new JSONObject();
|
||||||
paramDis.put("ZVBELN", jsonDtl.getString("source_bill_code"));
|
JSONObject jsonDtl2 = wo_dtl.query("iostorinvdtl_id = '" + jsonDis.getString("iostorinvdtl_id") + "'").uniqueResult(0);
|
||||||
|
|
||||||
|
paramDis.put("ZVBELN", jsonDtl2.getString("source_bill_code"));
|
||||||
|
|
||||||
JSONObject jsonMater = materTab.query("material_id = '" + jsonDis.getString("material_id") + "'").uniqueResult(0);
|
JSONObject jsonMater = materTab.query("material_id = '" + jsonDis.getString("material_id") + "'").uniqueResult(0);
|
||||||
paramDis.put("MATNR", jsonMater.getString("material_code"));
|
paramDis.put("MATNR", jsonMater.getString("material_code"));
|
||||||
|
|||||||
@@ -28,6 +28,14 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :xs="24" :sm="24" :lg="24">
|
||||||
|
<div class="chart-wrapper">
|
||||||
|
<pie-chart :chart-data="empList" />
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -46,7 +54,8 @@ export default {
|
|||||||
allList: {},
|
allList: {},
|
||||||
oneList: {},
|
oneList: {},
|
||||||
twoList: {},
|
twoList: {},
|
||||||
threeList: {}
|
threeList: {},
|
||||||
|
empList: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -74,6 +83,7 @@ export default {
|
|||||||
this.twoList = res.two
|
this.twoList = res.two
|
||||||
this.threeList = res.three
|
this.threeList = res.three
|
||||||
this.allList = res.all
|
this.allList = res.all
|
||||||
|
this.empList = res.empList
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user