From daf065f5894352e5b739c66fb6fa12d8d028d5c3 Mon Sep 17 00:00:00 2001
From: admin <qiutairan163@163.com>
Date: 星期二, 11 十一月 2025 11:20:03 +0800
Subject: [PATCH] 首页库存和仓库
---
Wms/Model/ModelDto/DataDto/MateDataStockDto.cs | 85 ++++
HTML/views/home/console2.html | 682 ++++++++++++++++++++++---------------
Wms/WMS.IBLL/IDataServer/IStockServer.cs | 32 +
Wms/WMS.BLL/DataServer/StockServer.cs | 246 ++++++++++--
4 files changed, 714 insertions(+), 331 deletions(-)
diff --git a/HTML/views/home/console2.html b/HTML/views/home/console2.html
index ccfb7ba..c71b123 100644
--- a/HTML/views/home/console2.html
+++ b/HTML/views/home/console2.html
@@ -2,30 +2,30 @@
<html>
<head>
- <meta charset="utf-8">
- <title>layuiAdmin 鎺у埗鍙颁富椤典竴</title>
- <meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport"
- content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
- <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
- <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
- <style type="text/css">
- html,
- body {
- height: 100%;
- }
+ <meta charset="utf-8">
+ <title>layuiAdmin 鎺у埗鍙颁富椤典竴</title>
+ <meta name="renderer" content="webkit">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport"
+ content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+ <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
+ <style type="text/css">
+ html,
+ body {
+ height: 100%;
+ }
- .ceshi {
- display: flex;
- justify-content: space-around;
- }
+ .ceshi {
+ display: flex;
+ justify-content: space-around;
+ }
- .acls {
- display: inline-block;
- width: 125px;
- height: 60px;
- }
+ .acls {
+ display: inline-block;
+ width: 125px;
+ height: 60px;
+ }
.water-ball {
position: relative;
@@ -40,7 +40,8 @@
.wave {
position: absolute;
bottom: 0;
- left: -50%; /* 璋冩暣娉㈡氮鐨勮捣濮嬩綅缃� */
+ left: -50%;
+ /* 璋冩暣娉㈡氮鐨勮捣濮嬩綅缃� */
width: 200%;
height: 200%;
background: #00bcd4;
@@ -63,7 +64,8 @@
font-size: 12px;
color: #00796b;
font-weight: bold;
- margin-bottom: 5px; /* 璋冩暣鏂囧瓧鍜岀櫨鍒嗘暟涔嬮棿鐨勯棿璺� */
+ margin-bottom: 5px;
+ /* 璋冩暣鏂囧瓧鍜岀櫨鍒嗘暟涔嬮棿鐨勯棿璺� */
}
.percentage {
@@ -75,17 +77,21 @@
.gradient-line {
margin-top: 30px;
width: 80%;
- height: 2px; /* 绾挎潯鐨勯珮搴� */
- background: linear-gradient(to right,
- #74f2e57f, /* 宸﹁竟娴呰壊 */
- #03d5c0, /* 涓棿娣辫壊 */
- #74f2e57f); /* 鍙宠竟娴呰壊 */
+ height: 2px;
+ /* 绾挎潯鐨勯珮搴� */
+ background: linear-gradient(to right,
+ #74f2e57f,
+ /* 宸﹁竟娴呰壊 */
+ #03d5c0,
+ /* 涓棿娣辫壊 */
+ #74f2e57f);
+ /* 鍙宠竟娴呰壊 */
opacity: 0.5;
}
- .cuboid_group{
+ .cuboid_group {
display: flex;
justify-content: center;
align-items: center;
@@ -96,11 +102,14 @@
}
.cuboid {
- width: 200px; /* 闀挎柟浣撶殑瀹藉害 */
- height: 100px; /* 闀挎柟浣撶殑楂樺害 */
+ width: 200px;
+ /* 闀挎柟浣撶殑瀹藉害 */
+ height: 100px;
+ /* 闀挎柟浣撶殑楂樺害 */
position: relative;
transform-style: preserve-3d;
- transform: rotateX(-25deg) rotateY(45deg); /* 鍒濆鏃嬭浆瑙掑害 */
+ transform: rotateX(-25deg) rotateY(45deg);
+ /* 鍒濆鏃嬭浆瑙掑害 */
}
.cuboid .face {
@@ -113,7 +122,8 @@
background-color: rgba(0, 123, 255, 0.8);
border: 2px solid #007bff;
box-sizing: border-box;
- overflow: hidden; /* 闅愯棌瓒呭嚭閮ㄥ垎 */
+ overflow: hidden;
+ /* 闅愯棌瓒呭嚭閮ㄥ垎 */
opacity: 0.6;
}
@@ -121,43 +131,53 @@
.cuboid .front {
width: 100px;
height: 50px;
- transform: translateZ(25px); /* 鍚戝墠绉诲姩 */
- border-radius: 5px; /* 鍦嗚 */
+ transform: translateZ(25px);
+ /* 鍚戝墠绉诲姩 */
+ border-radius: 5px;
+ /* 鍦嗚 */
}
/* 鍚庨潰 */
.cuboid .back {
width: 100px;
height: 50px;
- transform: rotateY(180deg) translateZ(25px); /* 鍚戝悗绉诲姩 */
- border-radius: 5px; /* 鍦嗚 */
+ transform: rotateY(180deg) translateZ(25px);
+ /* 鍚戝悗绉诲姩 */
+ border-radius: 5px;
+ /* 鍦嗚 */
}
/* 鍙抽潰 */
.cuboid .right {
width: 50px;
height: 50px;
- transform: rotateY(90deg) translateZ(75px); /* 鍚戝彸绉诲姩 */
- border-radius: 5px; /* 鍦嗚 */
+ transform: rotateY(90deg) translateZ(75px);
+ /* 鍚戝彸绉诲姩 */
+ border-radius: 5px;
+ /* 鍦嗚 */
}
/* 宸﹂潰 */
.cuboid .left {
width: 50px;
height: 50px;
- transform: rotateY(-90deg) translateZ(25px); /* 鍚戝乏绉诲姩 */
+ transform: rotateY(-90deg) translateZ(25px);
+ /* 鍚戝乏绉诲姩 */
display: flex;
flex-wrap: wrap;
justify-content: space-around;
align-content: space-around;
background-color: rgba(0, 123, 255, 0.8);
- border-radius: 5px; /* 鍦嗚 */
+ border-radius: 5px;
+ /* 鍦嗚 */
}
/* 绐楁埛鏍峰紡 */
.cuboid .left .window {
- width: 16px; /* 绐楁埛瀹藉害 */
- height: 16px; /* 绐楁埛楂樺害 */
+ width: 16px;
+ /* 绐楁埛瀹藉害 */
+ height: 16px;
+ /* 绐楁埛楂樺害 */
background-color: yellow;
}
@@ -165,71 +185,84 @@
.cuboid .top {
width: 100px;
height: 50px;
- transform: rotateX(90deg) translateZ(25px); /* 鍚戜笂绉诲姩 */
- border-radius: 5px; /* 鍦嗚 */
-
+ transform: rotateX(90deg) translateZ(25px);
+ /* 鍚戜笂绉诲姩 */
+ border-radius: 5px;
+ /* 鍦嗚 */
+
}
/* 搴曢潰 */
.cuboid .bottom {
width: 100px;
height: 50px;
- transform: rotateX(-90deg) translateZ(25px); /* 鍚戜笅绉诲姩 */
- border-radius: 5px; /* 鍦嗚 */
+ transform: rotateX(-90deg) translateZ(25px);
+ /* 鍚戜笅绉诲姩 */
+ border-radius: 5px;
+ /* 鍦嗚 */
}
/* 鍘绘帀琛ㄦ牸鐨勮竟妗嗙嚎 */
.layui-table {
border: none;
}
- .layui-table th, .layui-table td {
+
+ .layui-table th,
+ .layui-table td {
border: none;
}
+
/* 鍘绘帀琛ㄥご鐨勪笅杈规 */
.layui-table thead tr {
border-bottom: none;
}
+
/* 鍘绘帀琛ㄦ牸琛岀殑涓嬭竟妗� */
.layui-table tbody tr {
border-bottom: none;
}
- </style>
+ </style>
</head>
<body>
<!-- background: radial-gradient(circle,#bce2aa, #6ce6da); -->
- <div class="layui-fluid" style="padding: 10px;height: 97%;">
- <div class="layui-row layui-col-space15" style="height: 100%;">
+ <div class="layui-fluid" style="padding: 10px;height: 97%;">
+ <div class="layui-row layui-col-space15" style="height: 100%;">
<!-- 宸� -->
- <div class="layui-col-md4" style="height: 100%;margin-top: 10px;">
- <div class="layui-card" style="height: 100%;border-radius: 15px;box-shadow: 0px 0px 10px 1px #a4a3a3;">
+ <div class="layui-col-md4" style="height: 100%;margin-top: 10px;">
+ <div class="layui-card" style="height: 100%;border-radius: 15px;box-shadow: 0px 0px 10px 1px #a4a3a3;">
<div style="width: 100%;height: 23.33%;">
<div class="layui-card-header">
<img src="../../img/console/xiexian.png" style="height: 20px;">
绯荤粺鐩戞帶
</div>
- <div class="layui-card-body" style="padding-top: 0px; height: 90%;display: flex; justify-content: space-between; ">
- <div class="mokuan"style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100px;width: 100px;">
+ <div class="layui-card-body"
+ style="padding-top: 0px; height: 90%;display: flex; justify-content: space-between; ">
+ <div class="mokuan"
+ style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100px;width: 100px;">
<img src="../../img/console/zaixianyonghu.png" style="width: 30px;">
<label style="height: 35px;line-height: 35px;">鍦ㄧ嚎鐢ㄦ埛鏁�</label>
- <label style="font-size: 32px;color: #009688;">108</label>
+ <label style="font-size: 32px;color: #009688;">106</label>
</div>
- <div class="mokuan"style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100px;width: 100px;">
+ <div class="mokuan"
+ style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100px;width: 100px;">
<img src="../../img/console/PDA.png" style="width: 30px;">
<label style="height: 35px;line-height: 35px;">鎺ュ叆PDA鏁�</label>
- <label style="font-size: 32px;color: #009688;">108</label>
+ <label style="font-size: 32px;color: #009688;">107</label>
</div>
- <div class="mokuan"style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100px;width: 100px;">
+ <div class="mokuan"
+ style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100px;width: 100px;">
<img src="../../img/console/pc.png" style="width: 30px;">
<label style="height: 35px;line-height: 35px;">鎺ュ叆PC鏁�</label>
- <label style="font-size: 32px;color: #009688;">108</label>
+ <label style="font-size: 32px;color: #009688;">108</label>
</div>
- <div class="mokuan"style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100px;width: 100px;">
+ <div class="mokuan"
+ style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100px;width: 100px;">
<img src="../../img/console/dayinji.png" style="width: 30px;">
<label style="height: 35px;line-height: 35px;">鎺ュ叆鎵撳嵃鏈烘暟</label>
- <label style="font-size: 32px;color: #009688;">108</label>
+ <label style="font-size: 32px;color: #009688;">109</label>
</div>
- </div>
+ </div>
</div>
<div style="width: 100%;height: 38.33%;">
<div class="layui-card-header">
@@ -237,70 +270,63 @@
搴撳瓨鐗╂枡绫诲瀷鍒嗗竷
</div>
<div class="layui-card-body" style="padding: 0;height: 100%;">
- <div id="zhuOrder" style="width: 100%; height: 100%; display: flex; align-items: center;justify-content: center;">
+ <div id="zhuOrder"
+ style="width: 100%; height: 100%; display: flex; align-items: center;justify-content: center;">
</div>
- </div>
- </div>
+ </div>
+ </div>
<div style="width: 100%;height: 38.33%;">
<div class="layui-card-header">
<img src="../../img/console/xiexian.png" style="height: 20px;">
搴撳瓨璐ㄩ噺鐘舵�佸垎甯�
</div>
<div class="layui-card-body" style="padding: 0;height: 90%;">
- <div id="yuanOrder" style="width: 100%; height: 100%; display: flex; align-items: center;justify-content: center;">
+ <div id="yuanOrder"
+ style="width: 100%; height: 100%; display: flex; align-items: center;justify-content: center;">
</div>
- </div>
- </div>
- </div>
- </div>
+ </div>
+ </div>
+ </div>
+ </div>
<!-- 涓� -->
<div class="layui-col-md4" style="height: 100%;margin-top: 10px;">
<div style="width: 100%;height: 15%;">
- <div class="layui-card-body" style="padding-top: 0px; height: 100%;display: flex; justify-content: space-between;">
- <div class="mokuan"style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100px;width: 100px;">
- <label style="height: 50px;line-height: 50px;font-size: 36px;color: #009688;font-weight: 600;">5</label>
- <label style="font-size: 20px;">搴撳尯鎬绘暟</label>
+ <div class="layui-card-body"
+ style="padding-top: 0px; height: 100%;display: flex; justify-content: space-between;">
+ <div class="mokuan"
+ style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100px;width: 100px;">
+ <label id="wareHouseNum"
+ style="height: 50px;line-height: 50px;font-size: 36px;color: #009688;font-weight: 600;"></label>
+ <label style="font-size: 20px;">搴撳尯鎬绘暟</label>
</div>
- <div class="mokuan"style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100px;width: 100px;">
- <label style="height: 50px;line-height: 50px;font-size: 32px;color: #009688;font-weight: 600;">2270</label>
- <label style="font-size: 20px;">搴撲綅鎬绘暟</label>
+ <div class="mokuan"
+ style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100px;width: 100px;">
+ <label id="stockTotal"
+ style="height: 50px;line-height: 50px;font-size: 32px;color: #009688;font-weight: 600;"></label>
+ <label style="font-size: 20px;">搴撲綅鎬绘暟</label>
</div>
- <div class="mokuan"style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100px;width: 100px;">
- <label style="height: 50px;line-height: 50px;font-size: 32px;color: #009688;font-weight: 600;">108</label>
- <label style="font-size: 20px;">宸蹭娇鐢ㄥ簱浣�</label>
+ <div class="mokuan"
+ style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100px;width: 100px;">
+ <label id="useStock"
+ style="height: 50px;line-height: 50px;font-size: 32px;color: #009688;font-weight: 600;"></label>
+ <label style="font-size: 20px;">宸蹭娇鐢ㄥ簱浣�</label>
</div>
- <div class="mokuan"style="display: flex;justify-content: center;align-items: center;height: 100px;margin: 0;">
+ <div class="mokuan"
+ style="display: flex;justify-content: center;align-items: center;height: 100px;margin: 0;">
<div class="water-ball">
<div class="wave"></div>
<div class="text-container">
<div class="label">鎬诲埄鐢ㄧ巼</div>
- <div class="percentage">50%</div>
+ <div class="percentage" id="allUseRate"></div>
</div>
- </div>
+ </div>
</div>
</div>
</div>
<div style="width: 100%;height: 85%;display: flex; align-items: center;flex-direction: column;">
<div class="gradient-line"></div>
-
- <div style="width: 300px;height: 120px;box-shadow: 0px 0px 10px 1px #009688; border-radius:15px;margin-top: 30px;">
- <div class="layui-card-header">
- <img src="../../img/console/xiexian.png" style="height: 20px;">
- 鍘熻緟鏂欎粨搴�,甯告俯搴撳尯
- </div>
- <div class="layui-card-body" style="padding-top: 0px; height: 90%;display: flex; justify-content: space-between; ">
- <div class="mokuan"style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 60px;width: 100px;">
- <label style="height: 50px;line-height: 50px;font-size: 28px;color: #009688;font-weight: 600;">1008</label>
- <label style="font-size: 18px;">搴撲綅鎬绘暟</label>
- </div>
- <div class="mokuan"style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 60px;width: 100px;">
- <label style="height: 50px;line-height: 50px;font-size: 28px;color: #009688;font-weight: 600;">270</label>
- <label style="font-size: 18px;">宸蹭娇鐢�</label>
- </div>
-
- </div>
- </div>
+ <div id="warehouseInfo"></div>
<!-- <div style="width: auto;height: 220px;display: grid;align-items: center; justify-content: center; grid-template-columns: repeat(3, 1fr); gap: 10px;margin-top: 30px;">
<div class="cuboid_group">
@@ -380,19 +406,20 @@
</div>
</div> -->
- </div>
+ </div>
</div>
- <!-- 鍙� -->
- <div class="layui-col-md4" style="height: 100%;margin-top: 10px;">
- <div class="layui-card" style="height: 100%;border-radius: 15px;box-shadow: 0px 0px 10px 1px #a4a3a3;">
- <div style="width: 100%;height: 33.33%;">
+ <!-- 鍙� -->
+ <div class="layui-col-md4" style="height: 100%;margin-top: 10px;">
+ <div class="layui-card" style="height: 100%;border-radius: 15px;box-shadow: 0px 0px 10px 1px #a4a3a3;">
+ <div style="width: 100%;height: 33.33%;">
<div class="layui-card-header">
<img src="../../img/console/xiexian.png" style="height: 20px;">
杩戜竴鏈堢儹搴︾墿鏂�
</div>
<div class="layui-card-body" style="padding: 0;height: 90%;width: 90%;margin-left: 5%;">
- <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"border="0" cellpadding="0" cellspacing="0"></table>
- </div>
+ <table id="LAY-app-content-list" lay-filter="LAY-app-content-list" border="0"
+ cellpadding="0" cellspacing="0"></table>
+ </div>
</div>
<div style="width: 100%;height: 33.33%;">
<div class="layui-card-header">
@@ -401,22 +428,23 @@
</div>
<div class="layui-card-body" style="padding: 0;height: 90%;width: 90%;margin-left: 5%;">
<table id="LAY-app-content-list2" lay-filter="LAY-app-content-list2"></table>
- </div>
- </div>
+ </div>
+ </div>
<div style="width: 100%;height: 33.33%;">
<div class="layui-card-header">
<img src="../../img/console/xiexian.png" style="height: 20px;">
鏈堝害鍑哄叆搴撹秼鍔�
</div>
<div class="layui-card-body" style="padding: 0;height: 90%;">
- <div id="xianOrder" style="width: 100%; height: 100%; display: flex; align-items: center;justify-content: center;">
+ <div id="xianOrder"
+ style="width: 100%; height: 100%; display: flex; align-items: center;justify-content: center;">
</div>
- </div>
- </div>
- </div>
- </div>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
- </div>
+ </div>
<script src="../../layuiadmin/layui/layui.js?t=1"></script>
<script src="../../layuiadmin/layui/layui.js?t=1"></script>
@@ -430,7 +458,7 @@
}).extend({
index: 'lib/index', //涓诲叆鍙fā鍧�
-
+
});
// 鐩存帴浣跨敤鍏ㄥ眬鐨� echarts
var echarts = window.echarts;
@@ -441,140 +469,188 @@
laypage = layui.laypage,
layer = layui.layer
- //搴撳瓨鐗╂枡绫诲瀷鍒嗗竷(鏌辩姸)
- this.chartLine = echarts.init(document.getElementById("zhuOrder"));
- option = {
- xAxis: {
- type: 'category',
- data: ['鎴愬搧', '鍘熸枡', '澶栧寘鏉�', '鍐呭寘鏉�', '涓棿鍝�', '鑰楁潗'],
- axisLine: { show: false }, // 闅愯棌 x 杞寸嚎
- axisTick: { show: false }, // 闅愯棌 x 杞村埢搴︾嚎
- },
- yAxis: {
- type: 'value'
- },
- grid: {
- top:'5%',
- containLabel: true
- },
- series: [
- {
- data: [
- {
- value: 120,
- itemStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: '#37A2FF' },
- { offset: 1, color: '#9EE7FF' }
- ]),
- borderRadius: [15, 15, 0, 0]
- }
- },
- {
- value: 200,
- itemStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: '#FF9F7F' },
- { offset: 1, color: '#FFD97F' }
- ]),
- borderRadius: [15, 15, 0, 0]
- }
- },
- {
- value: 150,
- itemStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: '#73F0A0' },
- { offset: 1, color: '#B8F7D4' }
- ]),
- borderRadius: [15, 15, 0, 0]
- }
- },
- {
- value: 80,
- itemStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: '#FF6B6B' },
- { offset: 1, color: '#FFA8A8' }
- ]),
- borderRadius: [15, 15, 0, 0]
- }
- },
- {
- value: 70,
- itemStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: '#A28DFF' },
- { offset: 1, color: '#D5C7FF' }
- ]),
- borderRadius: [15, 15, 0, 0]
- }
- },
- {
- value: 110,
- itemStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: '#FFD700' },
- { offset: 1, color: '#FFFACD' }
- ]),
- borderRadius: [15, 15, 0, 0]
- }
- }
- ],
- type: 'bar',
- barWidth: '30%',
- showBackground: true,
- backgroundStyle: {
- color: 'rgba(180, 180, 180, 0.2)',
- borderRadius: [25, 25, 0, 0]
- }
- }
- ]
- };
- this.chartLine.setOption(option);
-
- //搴撳瓨璐ㄩ噺鐘舵�佸垎甯�(楗肩姸)
- this.chartYuan = echarts.init(document.getElementById("yuanOrder"));
- var option2;
-
- option2 = {
- tooltip: {
- trigger: 'item'
- },
- legend: {
- top: '5%',
- left: 'center'
- },
- series: [
- {
- name: '鏁伴噺',
- type: 'pie',
- radius: ['40%', '70%'],
- avoidLabelOverlap: false,
- itemStyle: {
- borderRadius: 10,
- borderColor: '#fff',
- borderWidth: 2
- },
- label: {
- show: true, // 鏄剧ず鏍囩
- position: 'outside', // 鏍囩浣嶇疆鍦ㄩゼ鍥惧閮�
- formatter: '{b}: {c} ({d}%)' // 鏍囩鏍煎紡锛屾樉绀哄悕绉般�佸�煎拰鐧惧垎姣�
- },
- labelLine: {
- show: true, // 鏄剧ず寮曞绾�
- length: 20, // 绗竴娈靛紩瀵肩嚎鐨勯暱搴�
- length2: 30 // 绗簩娈靛紩瀵肩嚎鐨勯暱搴�
- },
- data: [
- { value: 1048, name: '鍚堟牸' },
- { value: 735, name: '涓嶅悎鏍�' },
- { value: 580, name: '寰呴獙璇�' }
- ]
- }]
+
+ //搴撳瓨鐗╂枡绫诲瀷鍒嗗竷(鏌辩姸)
+ refreshGoodsTypeFb();
+ function refreshGoodsTypeFb() {
+ var param = {};
+
+ sendData(IP + "/Statistical/GetGoodsTypeFb", param, 'get', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ this.chartLine = echarts.init(document.getElementById("zhuOrder"));
+
+ var goodsType = [];
+ var seriesData = [];
+
+ // 瀹氫箟棰滆壊娓愬彉鏁扮粍
+ var colorGradients = [
+ [
+ { offset: 0, color: '#37A2FF' },
+ { offset: 1, color: '#9EE7FF' }
+ ],
+ [
+ { offset: 0, color: '#FF9F7F' },
+ { offset: 1, color: '#FFD97F' }
+ ],
+ [
+ { offset: 0, color: '#73F0A0' },
+ { offset: 1, color: '#B8F7D4' }
+ ],
+ [
+ { offset: 0, color: '#A28DFF' },
+ { offset: 1, color: '#D5C7FF' }
+ ],
+ [
+ { offset: 0, color: '#FFD700' },
+ { offset: 1, color: '#FFFACD' }
+ ]
+ ];
+
+ //姝g‘閬嶅巻鏁扮粍骞跺鐞嗘暟鎹�
+ res.data.forEach(function (item, index) {
+ goodsType.push(item.TypeName);
+
+ //鍔ㄦ�佸垱寤烘暟鎹」锛岄伩鍏嶇‖缂栫爜
+ var dataItem = {
+ value: item.TypeNum,
+ itemStyle: {
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1,
+ colorGradients[index % colorGradients.length] // 寰幆浣跨敤棰滆壊
+ ),
+ borderRadius: [15, 15, 0, 0]
+ }
+ };
+ seriesData.push(dataItem);
+ });
+
+ var option = {
+ title: {
+ //text: '搴撳瓨鐗╂枡绫诲瀷鍒嗗竷',
+ left: 'center',
+ textStyle: {
+ fontSize: 16,
+ fontWeight: 'bold'
+ }
+ },
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'shadow'
+ },
+ formatter: function (params) {
+ var data = params[0];
+ return data.name + ': ' + data.value;
+ }
+ },
+ xAxis: {
+ type: 'category',
+ data: goodsType,
+ axisLine: { show: false },
+ axisTick: { show: false },
+ axisLabel: {
+ interval: 0,
+ rotate: 0 // 濡傛灉鍒嗙被鍚嶅お闀垮彲浠ヨ缃棆杞�
+ }
+ },
+ yAxis: {
+ type: 'value',
+ name: '鏁伴噺'
+ },
+ grid: {
+ top: '15%',
+ left: '3%',
+ right: '4%',
+ bottom: '3%',
+ containLabel: true
+ },
+ series: [
+ {
+ data: seriesData,
+ type: 'bar',
+ barWidth: '30%',
+ showBackground: true,
+ backgroundStyle: {
+ color: 'rgba(180, 180, 180, 0.2)',
+ borderRadius: [25, 25, 0, 0]
+ },
+ label: {
+ show: true,
+ position: 'top',
+ formatter: '{c}'
+ }
+ }
+ ]
+ };
+ this.chartLine.setOption(option);
+
+ }
+ else { //涓嶆垚鍔�
+ layer.msg('鑾峰彇鎬婚噺鍒楄〃淇℃伅澶辫触锛�', {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ }
+ });
};
- this.chartYuan.setOption(option2);
+
+
+ //搴撳瓨璐ㄩ噺鐘舵�佸垎甯�(楗肩姸)
+ refreshQualityStatusFb();
+ function refreshQualityStatusFb() {
+ var param = {};
+
+ sendData(IP + "/Statistical/GetQualityStatusFb", param, 'get', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ //搴撳瓨璐ㄩ噺鐘舵�佸垎甯�(楗肩姸)
+ this.chartYuan = echarts.init(document.getElementById("yuanOrder"));
+ var option2 = {
+ tooltip: {
+ trigger: 'item'
+ },
+ legend: {
+ top: '5%',
+ left: 'center'
+ },
+ series: [{
+ name: '鏁伴噺',
+ type: 'pie',
+ radius: ['40%', '75%'],
+ avoidLabelOverlap: false,
+ itemStyle: {
+ borderRadius: 10,
+ borderColor: '#fff',
+ borderWidth: 2
+ },
+ label: {
+ show: true, // 鏄剧ず鏍囩
+ position: 'outside', // 鏍囩浣嶇疆鍦ㄩゼ鍥惧閮�
+ formatter: '{b}: {c} ({d}%)' // 鏍囩鏍煎紡锛屾樉绀哄悕绉般�佸�煎拰鐧惧垎姣�
+ },
+ labelLine: {
+ show: true, // 鏄剧ず寮曞绾�
+ length: 20, // 绗竴娈靛紩瀵肩嚎鐨勯暱搴�
+ length2: 30 // 绗簩娈靛紩瀵肩嚎鐨勯暱搴�
+ },
+ data: res.data.map(function (item) {
+ return {
+ name: item.TypeName,
+ value: item.TypeNum
+ };
+ })
+ }]
+ };
+ this.chartYuan.setOption(option2);
+ }
+ else { //涓嶆垚鍔�
+ layer.msg('鑾峰彇鎬婚噺鍒楄〃淇℃伅澶辫触锛�', {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ }
+ });
+ };
+
//鑾峰彇鏈堝害鍑哄叆搴撹秼鍔匡紙鎶樼嚎锛�
this.chartXian = echarts.init(document.getElementById("xianOrder"));
@@ -591,9 +667,9 @@
data: ['鍏ュ簱', '鍑哄簱']
},
grid: {
- top: '15%',
- left:'5%',
- bottom:'15%',
+ top: '15%',
+ left: '5%',
+ bottom: '15%',
containLabel: true
},
toolbox: {
@@ -627,11 +703,77 @@
]
};
this.chartXian.setOption(option3);
-
+
+
+ //浠撳簱鐘跺喌鎬�
+ refreshWarehouseState();
+ function refreshWarehouseState() {
+ var param = {
+
+ };
+ sendData(IP + "/Statistical/GetWareHouseState", param, 'get', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ $("#wareHouseNum").append(res.data.WarehouseNum);
+ $("#stockTotal").append(res.data.StockAllNum);
+ $("#useStock").append(res.data.StockUseNum);
+ $("#allUseRate").append(res.data.StockUseRate);
+ setPercentage(parseFloat(res.data.StockUseRate.replace('%', '')));
+ }
+ else { //涓嶆垚鍔�
+ layer.msg('鑾峰彇鎬婚噺鍒楄〃淇℃伅澶辫触锛�', {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ }
+ });
+ }
+
+
+ //浠撳簱璇︽儏
+ refreshWarehouseInfo();
+ function refreshWarehouseInfo() {
+ var param = {
+
+ };
+ sendData(IP + "/Statistical/GetWareHouseStateInfo", param, 'get', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ var html = '';
+ res.data.forEach(function (item) {
+ html += `<div style="width: 300px;height: 120px;box-shadow: 0px 0px 10px 1px #009688; border-radius:15px;margin-top: 40px;">
+ <div class="layui-card-header"> <img src="../../img/console/xiexian.png" style="height: 20px;">${item.WarehouseName}</div>
+ <div class="layui-card-body"
+ style="padding-top: 0px; height: 90%;display: flex; justify-content: space-between; ">
+ <div class="mokuan"
+ style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 60px;width: 100px;">
+ <label style="height: 50px;line-height: 50px;font-size: 28px;color: #009688;font-weight: 600;">${item.StockAllNum}</label>
+ <label style="font-size: 18px;">搴撲綅鎬绘暟</label>
+ </div>
+ <div class="mokuan"
+ style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 60px;width: 100px;">
+ <label style="height: 50px;line-height: 50px;font-size: 28px;color: #009688;font-weight: 600;">${item.StockUseNum}</label>
+ <label style="font-size: 18px;">宸蹭娇鐢�</label>
+ </div>
+ </div>
+ </div>`;
+ })
+ $('#warehouseInfo').html(html);
+ }
+ else { //涓嶆垚鍔�
+ layer.msg('鑾峰彇鎬婚噺鍒楄〃淇℃伅澶辫触锛�', {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ }
+ });
+ }
+
+
+
+
//杩戜竴鏈堢儹搴︾墿鏂�
refreshTable();
function refreshTable() {
- infoOptions = {
+ infoOptions = {
elem: '#LAY-app-content-list',
height: 'full-600',
id: 'LAY-app-content-list',
@@ -669,7 +811,7 @@
}, function () { });
}
});
- }
+ }
//瀹夊叏搴撳瓨棰勮
@@ -684,19 +826,19 @@
limits: pageLimits,
cellMinWidth: 60, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
even: true,
- cols:[[
- {field: '',title: '搴忓彿',type:'numbers',fixed: 'left', "disabled": true},
- {field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center'},
- {field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center'},
- {title: '鎵规', field: 'LotNo', align: 'center'},
- {field: 'ResidueQty', title: '鍓╀綑鏁伴噺', align: 'center'},
- ]]
+ cols: [[
+ { field: '', title: '搴忓彿', type: 'numbers', fixed: 'left', "disabled": true },
+ { field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center' },
+ { field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center' },
+ { title: '鎵规', field: 'LotNo', align: 'center' },
+ { field: 'ResidueQty', title: '鍓╀綑鏁伴噺', align: 'center' },
+ ]]
};
var param = {
};
- sendData(IP + "/Statistical/GetInventoryWarning", param, 'get', function(res) {
+ sendData(IP + "/Statistical/GetInventoryWarning", param, 'get', function (res) {
if (res.code == 0) { //鎴愬姛
var list = res.data;
$.extend(infoOptions2, {
@@ -710,20 +852,20 @@
layer.msg('鑾峰彇浣庡簱瀛樼墿鏂欎俊鎭け璐ワ紒', {
icon: 2,
time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {});
+ }, function () { });
}
});
- }
+ }
// 璁剧疆鍒濆鐧惧垎姣�
- setPercentage(50);
+ // setPercentage(50);
function setPercentage(percent) {
const wave = $('.wave');
const percentageText = $('.percentage');
const waterBallHeight = $('.water-ball').height();
// 璁$畻娉㈡氮鐨勯珮搴︼紙鐧惧垎姣旇秺楂橈紝娉㈡氮瓒婁綆锛�
- const waveHeight =(100 - percent) / 100 * waterBallHeight;
+ const waveHeight = (100 - percent) / 100 * waterBallHeight;
// 璁剧疆娉㈡氮鐨勯珮搴�
wave.css('top', waveHeight + 'px');
diff --git a/Wms/Model/ModelDto/DataDto/MateDataStockDto.cs b/Wms/Model/ModelDto/DataDto/MateDataStockDto.cs
index cdebd2e..8e13509 100644
--- a/Wms/Model/ModelDto/DataDto/MateDataStockDto.cs
+++ b/Wms/Model/ModelDto/DataDto/MateDataStockDto.cs
@@ -1,6 +1,7 @@
锘縰sing System;
using System.Collections;
using System.Collections.Generic;
+using System.DirectoryServices;
using System.Text;
namespace Model.ModelDto.DataDto
@@ -80,27 +81,27 @@
/// 鍌ㄤ綅鍦板潃
/// </summary>
public string LocatNo { get; set; }
-
+
/// <summary>
/// 鎵樼洏鍙�
/// </summary>
public string PalletNo { get; set; }
-
+
/// <summary>
/// 鐢熶骇鏃堕棿
/// </summary>
public DateTime ProductionTime { get; set; }
-
+
/// <summary>
/// 杩囨湡鏃堕棿
/// </summary>
public DateTime ExpirationTime { get; set; }
-
+
/// <summary>
/// 鐘舵��
/// </summary>
public string Status { get; set; }
-
+
/// <summary>
/// 妫�楠屾爣璁�
/// </summary>
@@ -110,17 +111,17 @@
/// 闆舵墭鏍囪
/// </summary>
public string BitPalletMark { get; set; }
-
+
/// <summary>
/// 璐ㄩ噺鐘舵��
/// </summary>
public string InspectStatus { get; set; }
-
+
/// <summary>
/// 鏄惁瑁瑰寘
/// </summary>
public string IsBale { get; set; }
-
+
/// <summary>
/// 鏄惁鎵撳甫
/// </summary>
@@ -153,7 +154,7 @@
public string AreaName { get; set; }
public string AreaNo { get; set; }
public string LocatNo { get; set; }
-
+
public int Id { get; set; }
/// <summary>
@@ -268,4 +269,70 @@
}
+
+ /// <summary>
+ /// 浠撳簱搴撲綅浣跨敤dto
+ /// </summary>
+ public class WarehouseUseDto
+ {
+ /// <summary>
+ /// 浠撳簱鍚嶇О
+ /// </summary>
+ public string WarehouseName { get; set; } = "";
+
+ /// <summary>
+ /// 搴撲綅鎬绘暟
+ /// </summary>
+ public string StockAllNum { get; set; }
+
+ /// <summary>
+ /// 搴撲綅浣跨敤鏁�
+ /// </summary>
+ public string StockUseNum { get; set; }
+ }
+
+
+ /// <summary>
+ /// 浠撳簱姒傚喌dto
+ /// </summary>
+ public class WarehouseStateDto : WarehouseUseDto
+ {
+ /// <summary>
+ /// 搴撳尯鎬绘暟
+ /// </summary>
+ public string WarehouseNum { get; set; }
+
+ /// <summary>
+ /// 鎬诲埄鐢ㄧ巼
+ /// </summary>
+ public string StockUseRate { get; set; }
+ }
+
+
+ /// <summary>
+ /// 绫诲瀷鐨勫悕绉版暟閲忔瘮渚媎to
+ /// </summary>
+ public class IdNameNumRateDto
+ {
+ /// <summary>
+ /// 绫诲瀷id
+ /// </summary>
+ public string TypeId { get; set; }
+
+ /// <summary>
+ /// 绫诲瀷鍚嶇О
+ /// </summary>
+ public string TypeName { get; set; }
+
+ /// <summary>
+ /// 绫诲瀷鏁伴噺
+ /// </summary>
+ public double TypeNum { get; set; }
+
+ /// <summary>
+ /// 绫诲瀷姣斾緥
+ /// </summary>
+ public string TypeRate { get; set; } = "0%";
+ }
+
}
diff --git a/Wms/WMS.BLL/DataServer/StockServer.cs b/Wms/WMS.BLL/DataServer/StockServer.cs
index 2ecb669..093a005 100644
--- a/Wms/WMS.BLL/DataServer/StockServer.cs
+++ b/Wms/WMS.BLL/DataServer/StockServer.cs
@@ -1,8 +1,10 @@
锘縰sing System;
using System.Collections;
using System.Collections.Generic;
+using System.Data;
using System.Linq;
using System.Linq.Expressions;
+using System.Net.WebSockets;
using System.Runtime.Intrinsics.X86;
using System.Security.Claims;
using System.Text;
@@ -14,6 +16,7 @@
using Model.ModelVm.SysVm;
using MySqlConnector;
using SqlSugar;
+using Talk.Extensions;
using WMS.DAL;
using WMS.Entity.BllAsnEntity;
using WMS.Entity.BllQualityEntity;
@@ -28,9 +31,152 @@
public class StockServer : DbHelper<DataStock>, IStockServer
{
private static readonly SqlSugarScope Db = DataContext.Db;
+
public StockServer() : base(Db)
{
+ }
+
+
+ /// <summary>
+ /// 鑾峰彇搴撳瓨鐗╂枡绫诲瀷鍒嗗竷
+ /// </summary>
+ /// <returns></returns>
+ public IEnumerable<IdNameNumRateDto> GetGoodsTypeFb()
+ {
+ string stockNumSql = $@"select a.Type,sum(b.num) as num
+ from SysMaterials a
+ inner join (select SkuNo,sum(Qty) as num from DataStockDetail where IsDel='0' group by SkuNo) b on b.SkuNo=a.SkuNo
+ where a.IsDel='0'
+ group by a.Type";
+ DataTable stockNumDt = Db.Ado.GetDataTable(stockNumSql);
+ var stockNumIE = stockNumDt.Rows.Cast<DataRow>().Select(e => new
+ {
+ typeName = e["Type"] + "",
+ num = e["num"] + ""
+ });
+
+ //鐗╂枡绫诲瀷
+ string goodsTypeSql = $@"select DictNo,DictName,0.00 as num
+ from SysDictionary
+ where IsDel='0' and ParentNo='MaterialType'
+ order by Id";
+ DataTable goodsTypeDt = Db.Ado.GetDataTable(goodsTypeSql);
+
+ IEnumerable<IdNameNumRateDto> result = goodsTypeDt.Rows.Cast<DataRow>().Select(e => new IdNameNumRateDto
+ {
+ TypeId = e["DictNo"] + "",
+ TypeName = e["DictName"] + "",
+ TypeNum = Convert.ToDouble((stockNumIE.FirstOrDefault(f => f.typeName == e["DictNo"] + "") == null) ? "0.00" : stockNumIE.First(f => f.typeName == e["DictNo"] + "").num),
+ });
+ return result;
+ }
+
+
+ /// <summary>
+ /// 鑾峰彇搴撳瓨璐ㄩ噺鐘舵�佸垎甯�
+ /// </summary>
+ /// <returns></returns>
+ public IEnumerable<IdNameNumRateDto> GetQualityStatusFb()
+ {
+ string stockNumSql = $@"select InspectStatus,sum(Qty) as num
+ from DataStockDetail
+ where IsDel='0' and InspectStatus is not null
+ group by InspectStatus";
+ DataTable stockNumDt = Db.Ado.GetDataTable(stockNumSql);
+ object totalObj = stockNumDt.Compute("sum(num)", "");
+
+ var stockNumIE = stockNumDt.Rows.Cast<DataRow>().Select(e => new
+ {
+ typeName = e["InspectStatus"] + "",
+ num = e["num"] + ""
+ });
+
+ //鐗╂枡绫诲瀷
+ string inspectStatusSql = $@"select DictNo,DictName,0.00 as num,'0%' as rate
+ from SysDictionary
+ where IsDel='0' and ParentNo='InspectStatus'
+ order by Id";
+ DataTable goodsTypeDt = Db.Ado.GetDataTable(inspectStatusSql);
+
+ foreach (DataRow dr in goodsTypeDt.Rows)
+ {
+ var stockNum = stockNumIE.FirstOrDefault(e => e.typeName == dr["DictNo"] + "");
+
+ if (stockNum != null)
+ {
+ dr["num"] = stockNum.num;
+ dr["rate"] = (stockNum.num.ToDouble() / Convert.ToDouble(totalObj) * 100.00).ToString("0.00") + "%";
+ }
+ }
+
+ IEnumerable<IdNameNumRateDto> result = goodsTypeDt.Rows.Cast<DataRow>().Select(e => new IdNameNumRateDto
+ {
+ TypeId = e["DictNo"] + "",
+ TypeName = e["DictName"] + "",
+ TypeNum = Convert.ToDouble(e["num"]),
+ TypeRate = e["rate"] + ""
+ });
+ return result;
+ }
+
+
+ /// <summary>
+ /// 鑾峰彇浠撳簱鐘跺喌鎬�
+ /// </summary>
+ /// <returns></returns>
+ public WarehouseStateDto GetWareHouseState()
+ {
+ //搴撳尯鎬绘暟
+ string houseNumSql = $@"select count(Id) as num
+ from SysWareHouse
+ where IsDel='0'";
+ int houseNum = Db.Ado.GetInt(houseNumSql);
+
+ //搴撲綅鎬绘暟
+ string stockNumSql = $@"select count(Id) as num
+ from SysStorageLocat
+ where IsDel='0'";
+ int stockNum = Db.Ado.GetInt(stockNumSql);
+
+ //宸蹭娇鐢ㄥ簱浣�
+ string stockUseNumSql = $@"select count(Id) as num
+ from SysStorageLocat
+ where IsDel='0' and Status='1'";
+ int stockUseNum = Db.Ado.GetInt(stockUseNumSql);
+
+ WarehouseStateDto result = new WarehouseStateDto()
+ {
+ WarehouseNum = houseNum + "",
+ StockAllNum = stockNum + "",
+ StockUseNum = stockUseNum + "",
+ StockUseRate = ((double)stockUseNum / stockNum * 100.00).ToString("0.00") + "%"
+ };
+ return result;
+ }
+
+
+ /// <summary>
+ /// 鑾峰彇浠撳簱璇︽儏
+ /// </summary>
+ /// <returns></returns>
+ public IEnumerable<WarehouseUseDto> GetWareHouseStateInfo()
+ {
+ string stockUseSql = $@"select a.Id,a.WareHouseNo,a.WareHouseName,b.num as stockNum,c.num as useNum
+ from SysWareHouse a
+ left join (select WareHouseNo,count(Id) as num from SysStorageLocat where IsDel='0' group by WareHouseNo) b on b.WareHouseNo=a.WareHouseNo
+ left join (select WareHouseNo,count(Id) as num from SysStorageLocat where IsDel='0' and Status='1' group by WareHouseNo) c on c.WareHouseNo=a.WareHouseNo
+ where a.IsDel='0'
+ order by a.WareHouseNo";
+ DataTable stockUseDt = Db.Ado.GetDataTable(stockUseSql);
+
+ IEnumerable<WarehouseUseDto> result = stockUseDt.Rows.Cast<DataRow>().Select(e => new WarehouseUseDto
+ {
+ WarehouseName = e["WareHouseName"] + "",
+ StockAllNum = e["stockNum"] + "",
+ StockUseNum = e["useNum"] + ""
+ });
+ return result;
}
@@ -50,7 +196,7 @@
/// <param name="wareHouseNo">鎵�灞炰粨搴�</param>
/// <param name="areaNo">鎵�灞炲尯鍩�</param>
/// <returns></returns>
- public async Task<List<MateDataStockDto>> GetDataStockList(string selectType, string skuNo, string skuName, string ownerNo,
+ public async Task<List<MateDataStockDto>> GetDataStockList(string selectType, string skuNo, string skuName, string ownerNo,
string ownerName, string lotNo, string status, string inspectStatus, string wareHouseNo, string areaNo)
{
Expression<Func<DataStockDetail, bool>> item = Expressionable.Create<DataStockDetail>()
@@ -70,53 +216,53 @@
var data = Db.Queryable<DataStockDetail>().Where(item);
List<MateDataStockDto> data2;
- switch (selectType)
+ switch (selectType)
{
// 鎸夌墿鏂欑粺璁�
case "0":
- data2 = await data.GroupBy(a => new { a.SkuNo, a.SkuName, a.Standard })
- .Select(a => new MateDataStockDto()
- {
- SkuNo = a.SkuNo, //鐗╂枡缂栫爜
- SkuName = a.SkuName, //鐗╂枡鍚嶇О
- Standard = a.Standard, //瑙勬牸
- //LotNo = a.LotNo, //鎵规
- //LotText = a.LotText, //鎵规鎻忚堪
- //OwnerNo = a.OwnerNo, //璐т富缂栫爜
- //OwnerName = a.OwnerName, //璐т富鍚嶇О
- Status = status, //搴撳瓨鐘舵��
- InspectStatus = inspectStatus, //璐ㄦ鐘舵��
- Qty = SqlFunc.AggregateSumNoNull(a.Qty), //搴撳瓨鏁伴噺
- LockQty = SqlFunc.AggregateSumNoNull(a.LockQty), //閿佸畾鏁伴噺
- FrozenQty = SqlFunc.AggregateSumNoNull(a.LockQty),
- InspectQty = SqlFunc.AggregateSumNoNull(a.InspectQty)
- }).ToListAsync();
+ data2 = await data.GroupBy(a => new { a.SkuNo, a.SkuName, a.Standard })
+ .Select(a => new MateDataStockDto()
+ {
+ SkuNo = a.SkuNo, //鐗╂枡缂栫爜
+ SkuName = a.SkuName, //鐗╂枡鍚嶇О
+ Standard = a.Standard, //瑙勬牸
+ //LotNo = a.LotNo, //鎵规
+ //LotText = a.LotText, //鎵规鎻忚堪
+ //OwnerNo = a.OwnerNo, //璐т富缂栫爜
+ //OwnerName = a.OwnerName, //璐т富鍚嶇О
+ Status = status, //搴撳瓨鐘舵��
+ InspectStatus = inspectStatus, //璐ㄦ鐘舵��
+ Qty = SqlFunc.AggregateSumNoNull(a.Qty), //搴撳瓨鏁伴噺
+ LockQty = SqlFunc.AggregateSumNoNull(a.LockQty), //閿佸畾鏁伴噺
+ FrozenQty = SqlFunc.AggregateSumNoNull(a.LockQty),
+ InspectQty = SqlFunc.AggregateSumNoNull(a.InspectQty)
+ }).ToListAsync();
break;
// 鎸夋壒娆$粺璁�
case "1":
- data2 = await data.GroupBy(a => new { a.LotNo, a.LotText, a.SkuNo, a.SkuName, a.Standard })
- .Select(a => new MateDataStockDto()
- {
- SkuNo = a.SkuNo, //鐗╂枡缂栫爜
- SkuName = a.SkuName, //鐗╂枡鍚嶇О
- Standard = a.Standard, //瑙勬牸
- LotNo = a.LotNo, //鎵规
- LotText = a.LotText, //鎵规鎻忚堪
- //OwnerNo = a.OwnerNo, //璐т富缂栫爜
- //OwnerName = a.OwnerName, //璐т富鍚嶇О
- Status = status, //搴撳瓨鐘舵��
- InspectStatus = inspectStatus, //璐ㄦ鐘舵��
- Qty = SqlFunc.AggregateSumNoNull(a.Qty), //搴撳瓨鏁伴噺
- LockQty = SqlFunc.AggregateSumNoNull(a.LockQty), //閿佸畾鏁伴噺
- FrozenQty = SqlFunc.AggregateSumNoNull(a.LockQty),
- InspectQty = SqlFunc.AggregateSumNoNull(a.InspectQty)
- }).ToListAsync();
+ data2 = await data.GroupBy(a => new { a.LotNo, a.LotText, a.SkuNo, a.SkuName, a.Standard })
+ .Select(a => new MateDataStockDto()
+ {
+ SkuNo = a.SkuNo, //鐗╂枡缂栫爜
+ SkuName = a.SkuName, //鐗╂枡鍚嶇О
+ Standard = a.Standard, //瑙勬牸
+ LotNo = a.LotNo, //鎵规
+ LotText = a.LotText, //鎵规鎻忚堪
+ //OwnerNo = a.OwnerNo, //璐т富缂栫爜
+ //OwnerName = a.OwnerName, //璐т富鍚嶇О
+ Status = status, //搴撳瓨鐘舵��
+ InspectStatus = inspectStatus, //璐ㄦ鐘舵��
+ Qty = SqlFunc.AggregateSumNoNull(a.Qty), //搴撳瓨鏁伴噺
+ LockQty = SqlFunc.AggregateSumNoNull(a.LockQty), //閿佸畾鏁伴噺
+ FrozenQty = SqlFunc.AggregateSumNoNull(a.LockQty),
+ InspectQty = SqlFunc.AggregateSumNoNull(a.InspectQty)
+ }).ToListAsync();
break;
// 鎸夎川妫�鐘舵�佺粺璁�
case "2":
- data2 = await data.GroupBy(a => new { a.SkuNo, a.SkuName, a.Standard,a.InspectStatus})
+ data2 = await data.GroupBy(a => new { a.SkuNo, a.SkuName, a.Standard, a.InspectStatus })
.Select(a => new MateDataStockDto()
{
SkuNo = a.SkuNo, //鐗╂枡缂栫爜
@@ -133,7 +279,7 @@
FrozenQty = SqlFunc.AggregateSumNoNull(a.LockQty),
InspectQty = SqlFunc.AggregateSumNoNull(a.InspectQty),
}).ToListAsync();
- break;
+ break;
// 鎸夎揣涓荤粺璁�
case "3":
@@ -154,11 +300,11 @@
FrozenQty = SqlFunc.AggregateSumNoNull(a.LockQty),
InspectQty = SqlFunc.AggregateSumNoNull(a.InspectQty),
}).ToListAsync();
- break;
+ break;
// 榛樿缁熻锛堢墿鏂� 鎵规 璐ㄦ 搴撳瓨鐘舵�� 璐т富)
default:
- data2 = await data.GroupBy(a => new { a.SkuNo, a.SkuName, a.Standard ,a.LotNo, a.LotText, a.OwnerNo, a.OwnerName , a.InspectStatus })
+ data2 = await data.GroupBy(a => new { a.SkuNo, a.SkuName, a.Standard, a.LotNo, a.LotText, a.OwnerNo, a.OwnerName, a.InspectStatus })
.Select(a => new MateDataStockDto()
{
SkuNo = a.SkuNo, //鐗╂枡缂栫爜
@@ -348,9 +494,9 @@
.GroupBy(a => new { a.LotNo, a.SkuNo, a.SkuName })
.Select(a => new TotalRecordDto()
{
- LotNo=a.LotNo,
- SkuNo=a.SkuNo,
- SkuName=a.SkuName,
+ LotNo = a.LotNo,
+ SkuNo = a.SkuNo,
+ SkuName = a.SkuName,
RQty = SqlFunc.AggregateSumNoNull(a.Qty),
RFactQty = (decimal)SqlFunc.AggregateSum(a.FactQty),
RCompleteQty = (decimal)SqlFunc.AggregateSum(a.CompleteQty),
@@ -435,22 +581,22 @@
/// <param name="startTime">寮�濮嬫椂闂�</param>
/// <param name="endTime">缁撴潫鏃堕棿</param>
/// <returns></returns>
- public List<TotalRecordDto> GetDetailedRecord(string skuNo, string skuName, string lotNo, string palletNo,string startTime, string endTime)
+ public List<TotalRecordDto> GetDetailedRecord(string skuNo, string skuName, string lotNo, string palletNo, string startTime, string endTime)
{
// 鑾峰彇鍏ュ簱鍗曟槑缁嗕俊鎭�
- var asnList = Db.Queryable<BllPalletBind,BllArrivalNoticeDetail>
- ((tb1,tb2)=>new JoinQueryInfos(
+ var asnList = Db.Queryable<BllPalletBind, BllArrivalNoticeDetail>
+ ((tb1, tb2) => new JoinQueryInfos(
JoinType.Left, tb1.ASNDetailNo == tb2.Id
))
- .Where((tb1,tb2) => tb1.IsDel == "0" && tb2.IsDel == "0")
+ .Where((tb1, tb2) => tb1.IsDel == "0" && tb2.IsDel == "0")
.WhereIF(!string.IsNullOrWhiteSpace(startTime), tb1 => tb1.CompleteTime >= Convert.ToDateTime(startTime))
.WhereIF(!string.IsNullOrWhiteSpace(endTime), tb1 => tb1.CompleteTime <= Convert.ToDateTime(endTime).AddDays(1))
.WhereIF(!string.IsNullOrEmpty(palletNo), tb1 => tb1.PalletNo.Contains(palletNo))
- .WhereIF(!string.IsNullOrEmpty(skuNo), (tb1,tb2) => tb2.SkuNo.Contains(skuNo))
+ .WhereIF(!string.IsNullOrEmpty(skuNo), (tb1, tb2) => tb2.SkuNo.Contains(skuNo))
.WhereIF(!string.IsNullOrEmpty(skuName), (tb1, tb2) => tb2.SkuName.Contains(skuName))
.WhereIF(!string.IsNullOrEmpty(lotNo), (tb1, tb2) => tb2.LotNo.Contains(lotNo))
//.GroupBy((tb1,tb2) => new { tb2.LotNo, tb2.SkuNo, tb2.SkuName })
- .Select((tb1,tb2) => new TotalRecordDto()
+ .Select((tb1, tb2) => new TotalRecordDto()
{
ASNNo = tb2.ASNNo,
LotNo = tb1.LotNo,
@@ -463,7 +609,7 @@
CompleteTime = tb2.CreateTime,
LotText = tb1.LotText,
SupplierLot = tb2.SupplierLot,
-
+
SONo = "",
CTaskNo = "",
CCreateTime = null,
diff --git a/Wms/WMS.IBLL/IDataServer/IStockServer.cs b/Wms/WMS.IBLL/IDataServer/IStockServer.cs
index 0d0a3b2..c68e954 100644
--- a/Wms/WMS.IBLL/IDataServer/IStockServer.cs
+++ b/Wms/WMS.IBLL/IDataServer/IStockServer.cs
@@ -10,6 +10,34 @@
{
public interface IStockServer
{
+ /// <summary>
+ /// 鑾峰彇搴撳瓨鐗╂枡绫诲瀷鍒嗗竷
+ /// </summary>
+ /// <returns></returns>
+ IEnumerable<IdNameNumRateDto> GetGoodsTypeFb();
+
+
+ /// <summary>
+ /// 鑾峰彇搴撳瓨璐ㄩ噺鐘舵�佸垎甯�
+ /// </summary>
+ /// <returns></returns>
+ IEnumerable<IdNameNumRateDto> GetQualityStatusFb();
+
+
+ /// <summary>
+ /// 鑾峰彇浠撳簱鐘跺喌鎬�
+ /// </summary>
+ /// <returns></returns>
+ WarehouseStateDto GetWareHouseState();
+
+
+ /// <summary>
+ /// 鑾峰彇浠撳簱鐘跺喌璇︽儏
+ /// </summary>
+ /// <returns></returns>
+ IEnumerable<WarehouseUseDto> GetWareHouseStateInfo();
+
+
#region 搴撳瓨鏄庣粏
/// <summary>
@@ -26,7 +54,7 @@
/// <param name="wareHouseNo">鎵�灞炰粨搴�</param>
/// <param name="areaNo">鎵�灞炲尯鍩�</param>
/// <returns></returns>
- Task<List<MateDataStockDto>> GetDataStockList(string selectType, string skuNo, string skuName, string ownerNo, string ownerName, string lotNo,
+ Task<List<MateDataStockDto>> GetDataStockList(string selectType, string skuNo, string skuName, string ownerNo, string ownerName, string lotNo,
string status, string inspectStatus, string wareHouseNo, string areaNo);
/// <summary>
@@ -40,7 +68,7 @@
/// <param name="status">搴撳瓨鐘舵��</param>
/// <param name="inspectStatus">璐ㄦ鐘舵��</param>
/// <returns></returns>
- List<StockDetailDto> GetInventoryList1(string skuNo, string skuName, string lotNo, string locatNo,
+ List<StockDetailDto> GetInventoryList1(string skuNo, string skuName, string lotNo, string locatNo,
string palletNo, string status, string inspectStatus, string ownerNo, string ownerName, string startTime, string endTime);
#endregion
--
Gitblit v1.8.0