Explorar el Código

烧成看板 双折线图

忠帅 张 hace 2 años
padre
commit
b67a5dcda8

+ 58 - 23
wwwroot/main/Procedure/Boardkanban/Boardkanban.ashx

@@ -244,17 +244,9 @@ public class  FormingKanban : IHttpHandler, IReadOnlySessionState
 
 			    if (context.Request["m"].ToString() == "Alltotal")
             {
-                string sqlStr = @"with 打磨 AS (
-											SELECT
-												COUNT(dfc.BARCODE) 缺陷数量
-												FROM TP_PM_DEFECT dfc
-												LEFT JOIN TP_MST_DEFECT df ON df.DEFECTID = dfc.DEFECTID 
-												WHERE dfc.VALUEFLAG=1 AND TRUNC(dfc.CREATETIME)=TRUNC(SYSDATE)
-												
-												),
-											一烧产量 AS 
+                string sqlStr = @"with 一烧产量 AS 
 												(
-											  SELECT COUNT( * ) 出窑数 FROM TP_PM_PRODUCTIONDATA WHERE PROCEDUREID IN (15,16)  AND GOODSLEVELID IN (1,4,5) AND TRUNC( CREATETIME ) = trunc(sysdate)    and VALUEFLAG=1 
+											  SELECT COUNT( * ) 出窑数 FROM TP_PM_PRODUCTIONDATA WHERE PROCEDUREID IN (15,16)  AND GOODSLEVELID IN (4,5) AND TRUNC( CREATETIME ) = trunc(sysdate)    and VALUEFLAG=1 
 												),
 												检验数 AS 
 												(
@@ -262,29 +254,30 @@ public class  FormingKanban : IHttpHandler, IReadOnlySessionState
 												)
 												SELECT
 												一烧产量.出窑数,
-												DECODE( NVL( 打磨.缺陷数量, 0 ),0,'0%',TO_CHAR((NVL( 打磨.缺陷数量, 0 ) / DECODE( NVL( 检验数.一烧出窑数, 1 ), 0, 1, NVL( 检验数.一烧出窑数, 1 ) ) ) * 100,'fm99990.0' ) || '%' ) as 打磨缺陷
+												DECODE( NVL( 一烧产量.出窑数, 0 ),0,'0%',TO_CHAR((NVL( 一烧产量.出窑数, 0 ) / DECODE( NVL( 检验数.一烧出窑数, 1 ), 0, 1, NVL( 检验数.一烧出窑数, 1 ) ) ) * 100,'fm99990.0' ) || '%' ) as 一烧合格
 												FROM  
-												打磨
-												LEFT JOIN 检验数 on 1=1
-												LEFT JOIN 一烧产量 on 1=1";
+												一烧产量
+												LEFT JOIN 检验数 on 1=1 ";
                 //直接获取不分页数据
                 DataTable dt = conn.ExecuteDatatable(sqlStr);
                 string jsonStr = new JsonResult(dt).ToJson();
                 context.Response.Write(jsonStr);
             }
-
                  	if (context.Request["m"].ToString() == "MonthTable")
 			{
 				string sqlStr = @"SELECT
-								责任工号,
-								生产线号,
-								缺陷名称,
-								产品分级
+*
+FROM(
+SELECT
+									责任工号,
+									产品编码,
+									TO_CHAR(缺陷名称) as 缺陷名称,
+									产品分级
 								FROM(
 							SELECT DISTINCT
 										stf.STAFFCODE 责任工号,
 										TMDP.BARCODE 条码,
-										pd.GOODSCODE 生产线号,
+										pd.GOODSCODE 产品编码,
 										TMDP.DEFECTNAME 缺陷名称,
 										TMG.GOODSLEVELNAME 产品分级
 										FROM TP_PM_DEFECT TMDP
@@ -302,7 +295,36 @@ public class  FormingKanban : IHttpHandler, IReadOnlySessionState
 											AND TMDP.VALUEFLAG = '1' --有效  
 											AND PD.PROCEDUREID=16
 											AND TRUNC(TMDP.CREATETIME)=TRUNC(SYSDATE)
-											)";
+											)
+											UNION ALL
+											SELECT
+												责任工号,
+									产品编码,
+									缺陷名称,
+									产品分级
+								
+											FROM(
+											SELECT
+										  stf.STAFFCODE 责任工号,
+										  pd.BARCODE 条码,
+										  pd.GOODSCODE 产品编码,
+										  ' ' as 缺陷名称,
+										  TMG.GOODSLEVELNAME 产品分级
+											FROM TP_PM_PRODUCTIONDATA  pd
+											LEFT JOIN TP_MST_USERSTAFF class on class.USERID=pd.CREATEUSERID
+											LEFT JOIN TP_HR_STAFF stf on stf.STAFFID=class.STAFFID
+											LEFT JOIN TP_MST_GOODSLEVEL TMG ON TMG.GOODSLEVELID = PD.GOODSLEVELID
+											--LEFT JOIN TP_PC_PROCEDURE TPP ON PD.PROCEDUREID = TPP.PROCEDUREID
+											LEFT JOIN TP_MST_GOODS GD ON PD.GOODSID = GD.GOODSID
+											LEFT JOIN TP_MST_GOODSTYPE GDT ON GD.GOODSTYPEID = GDT.GOODSTYPEID 
+												WHERE 
+											 PD.VALUEFLAG = '1' --有效
+											AND PD.PROCEDUREID=16
+											AND (pd.GOODSLEVELTYPEID=4 OR pd.GOODSLEVELTYPEID=null)
+											AND TRUNC(pd.CREATETIME)=TRUNC(SYSDATE) 
+											)
+											)
+											ORDER BY 产品编码";
                 //直接获取不分页数据
                 DataTable dt = conn.ExecuteDatatable(sqlStr);
                 string jsonStr = new JsonResult(dt).ToJson();
@@ -342,6 +364,18 @@ public class  FormingKanban : IHttpHandler, IReadOnlySessionState
 												GROUP BY CREATETIME)
 												GROUP BY SJ ORDER BY SJ
 												),
+												检验数 AS (
+													SELECT 
+													SJ,
+													SUM(一烧出窑数) AS 一烧出窑数
+													FROM(
+													 SELECT
+													 TO_CHAR(CREATETIME,'MM-DD')AS SJ,
+													 COUNT( * ) 一烧出窑数 
+													 FROM TP_PM_PRODUCTIONDATA WHERE PROCEDUREID =16  and VALUEFLAG=1 	AND TRUNC(CREATETIME)>= (ADD_MONTHS(TRUNC(SYSDATE, 'MM'), -1) + 25) AND TRUNC(CREATETIME)<(ADD_MONTHS(TRUNC(SYSDATE, 'MM'), 0) + 25)+23/24 +59/(24*60)
+													GROUP BY CREATETIME)
+													GROUP BY SJ ORDER BY SJ
+												),
 												一烧出窑量 AS 
 												(
 												SELECT
@@ -372,15 +406,16 @@ public class  FormingKanban : IHttpHandler, IReadOnlySessionState
 												NVL( 一烧出窑量.一烧出窑量, 0 ) 一烧出窑量,
 												CASE WHEN 一烧出窑量.一烧出窑量 is NULL THEN '0%' ELSE 
 												DECODE( NVL( 缺陷.缺陷数量, 0 ),0,'0%',
-												TO_CHAR( CASE WHEN (  ( NVL( 一烧出窑量.一烧出窑量, 1 )- NVL( 缺陷.缺陷数量, 0 )  ) / DECODE( NVL( 一烧出窑量.一烧出窑量, 1 ), 0, 1, NVL( 一烧出窑量.一烧出窑量, 1 ) ) ) * 100<=0
+												TO_CHAR( CASE WHEN (  ( NVL( 检验数.一烧出窑数, 1 )- NVL( 缺陷.缺陷数量, 0 )  ) / DECODE( NVL( 检验数.一烧出窑数, 1 ), 0, 1, NVL( 检验数.一烧出窑数, 1 ) ) ) * 100<=0
 												THEN 0 
 												ELSE 
-												(  ( NVL( 一烧出窑量.一烧出窑量, 1 )- NVL( 缺陷.缺陷数量, 0 )  ) / DECODE( NVL( 一烧出窑量.一烧出窑量, 1 ), 0, 1, NVL( 一烧出窑量.一烧出窑量, 1 ) ) ) * 100 end
+												(  ( NVL( 检验数.一烧出窑数, 1 )- NVL( 缺陷.缺陷数量, 0 )  ) / DECODE( NVL( 检验数.一烧出窑数, 1 ), 0, 1, NVL( 检验数.一烧出窑数, 1 ) ) ) * 100 end
 												,'fm99990.0' ) ) END  一烧合格率
 												FROM 时间
 												left JOIN 缺陷 ON 时间.SJ=缺陷.SJ
 												left JOIN 一烧产量 ON 缺陷.SJ=一烧产量.SJ
 												LEFT JOIN 一烧出窑量 ON 一烧出窑量.SJ=时间.SJ
+												LEFT JOIN 检验数 on 检验数.SJ=一烧出窑量.SJ
 												ORDER BY 	时间.SJ
 												
 												".Replace("{first}",first).Replace("{second}",second);

+ 4 - 4
wwwroot/main/Procedure/Boardkanban/Boardkanban.html

@@ -125,7 +125,7 @@
                     <tr class="tr_title_warning">
                         <td style="font-size: 27px; width: 25%; height: 30px; ">责任工号</td>
                         <td style="font-size: 27px; width: 25%; height: 30px; ">产品编码</td>
-                        <td style="font-size: 27px; width: 25%; height: 30px; ">缺陷位置</td>
+                        <td style="font-size: 27px; width: 25%; height: 30px; ">缺陷名称</td>
                         <td style="font-size: 27px; width: 25%; height: 30px; ">产品分级</td>
                     </tr>
                 </table>
@@ -133,7 +133,7 @@
                     <table id="dayTable_template" style="display:none;">
                         <tr class="tr_bg_light_warning" style="height:30px;">
                             <td style="font-size: 18px; width: 25%; height: 30px; ">{责任工号}</td>
-                            <td style="font-size: 18px; width: 25%; height: 30px; ">{生产线号}</td>
+                            <td style="font-size: 18px; width: 25%; height: 30px; ">{产品编码}</td>
                             <td style="font-size: 18px; width: 25%; height: 30px; ">{缺陷名称}</td>
                             <td style="font-size: 18px; width: 25%; height: 30px; ">{产品分级}</td>
                         </tr>
@@ -254,7 +254,7 @@
 						var temp = $("#dayTable_template").html();
 						temp = temp.replace("<tbody>", "").replace("</tbody>", "");
 						temp = temp.replace('{责任工号}', json["rows"][i]['责任工号']);
-						temp = temp.replace('{生产线号}', json["rows"][i]['生产线号']);
+						temp = temp.replace('{产品编码}', json["rows"][i]['产品编码']);
 						temp = temp.replace('{缺陷名称}', json["rows"][i]['缺陷名称']);
                         temp = temp.replace('{产品分级}', json["rows"][i]['产品分级']);
 						$("#dayTable").append(temp);
@@ -331,7 +331,7 @@
             }
 
             Chart.defaults.global.defaultFontColor = 'white';
-            Chart.defaults.global.defaultFontSize = 18;
+            Chart.defaults.global.defaultFontSize = 16;
             Chart.defaults.global.legend.display = false;
 
             //每小时产量=========================================

+ 290 - 141
wwwroot/main/Procedure/BurnIntoKanban/BurnIntoKanban.html

@@ -24,122 +24,127 @@
             <div style="width:50%;text-align:center; font-size:40px">烧成看板</div>
             <div style="width:25%;text-align:right;"></div>
         </div>
-        <div class="box_body" style="display: flex; flex-direction: column;">
+		<div class="box_body" style="display: flex; flex-direction: column;">
 
-            <!--31天产量曲线图-->
-            <div style="width:1840px;height:30%;display:flex;flex-direction:row;">
-                <div style="width: 75%; height: 300px;">
-                    <div style="color:white;font-size:15px;font-weight:600; text-align:center">每日产量计划达成</div>
-                    <canvas id="canvasDayCL" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 330px; width: 80% "></canvas>
-                </div>
-            </div>
+			<!--31天产量曲线图-->
+			<div style="width:1840px;height:40%;display:flex;flex-direction:row;">
+				<div style="width: 75%; height: 150px;">
+					<div style="color:white;font-size:15px;font-weight:600; text-align:center">每日产量计划达成</div>
+					<canvas id="canvasDayCL" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 170px; width: 100% "></canvas>
+				</div>
+			</div>
+			<div style="width:1840px;height:40%;display:flex;flex-direction:row; margin-top:-10%">
+				<div style="width: 75%; height: 150px;">
+					<canvas id="canvasMonthCL" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 170px; width: 100%;"></canvas>
+				</div>
+			</div>
 
-            <div>
-                <table rules="none" align="right" style="width: 20%; height: 270px; margin-left:80%;margin-top:-291px ">
-                    <tr class="tr_title_warning">
-                        <td style="width: 8%; height: 60px; font-size: 30px; text-align: left" colspan="2"><strong><span id="sj" style="color:white;">2023-4-30 00:00</span></strong></td>
-                    </tr>
-                    <tr class="tr_title_warning">
-                        <td style="width: 8%; height: 95px; font-size: 35px; text-align: left ">装窑:<span id="ydm" style="color:white;">加载中...</span></td>
-                    </tr>
-                    <tr class="tr_title_warning">
-                        <td style="width: 8%; height: 95px; font-size: 35px; text-align: left ">白坯入库:<span id="ycx" style="color:white;">加载中...</span></td>
-                    </tr>
-                    <tr class="tr_title_warning">
-                        <td style="width: 8%; height: 95px; font-size: 35px; text-align: left ">白坏库存:<span id="ygx" style="color:white;">加载中...</span></td>
-                    </tr>
-                </table>
-            </div>
-            <!--表格-->
-            <div style="width: 100%; height: 530px; display: flex; flex-direction: row; margin-top: 4%">
-                <div style="width: 100%; height: 530px; ">
-                    <table cellspacing="0" cellpadding="0" border="0" style="width:50%;">
-                        <tr class="tr_title_warning">
-                            <td colspan="7" style="font-size: 30px; color: white;">烧成工序装窑、出窑个人数据</td>
-                        </tr>
-                        <tr class="tr_title_warning" style="height: 30px; font-size:27px">
-                            <td style="width: 15%;">工号</td>
-                            <td style="width: 15%;">数量</td>
-                            <td style="width: 15%;">工号</td>
-                            <td style="width: 15%;">数量</td>
-                            <td style="width: 15%;">工号</td>
-                            <td style="width: 15%;">数量</td>
-                        </tr>
-                    </table>
-                    <div style=" height:170px;overflow:hidden;">
-                        <table style="width: 50%; display:none;" id="StaffTable_template">
-                            <!--style=""-->
-                            <tr class="tr_title_warning" style="height: 30px; font-size: 20px">
-                                <td style="font-size: 18px; color: white; height: 30px; width: 16%; text-align: center ">{工号}</td>
-                                <td style="font-size: 20px; color: white; height: 30px; width: 16%; text-align: center">{数量}</td>
-                                <td style="font-size: 18px; color: white; height: 30px; width: 16%; text-align: center ">{工号1}</td>
-                                <td style="font-size: 20px; color: white; height: 30px; width: 16%; text-align: center">{数量1}</td>
-                                <td style="font-size: 18px; color: white; height: 30px; width: 16%; text-align: center ">{工号2}</td>
-                                <td style="font-size: 20px; color: white; height: 30px; width: 16%; text-align: center">{数量2}</td>
-                            </tr>
-                        </table>
-                        <table id="StaffTable" style="width: 50%;">
-                        </table>
-                    </div>
+			<div style=" margin-top: -121px">
+				<table rules="none" align="right" style="width: 20%; height: 270px; margin-left:80%;margin-top:-471px ">
+					<tr class="tr_title_warning">
+						<td style="width: 8%; height: 60px; font-size: 30px; text-align: left" colspan="2"><strong><span id="sj" style="color:white;">2023-4-30 00:00</span></strong></td>
+					</tr>
+					<tr class="tr_title_warning">
+						<td style="width: 8%; height: 95px; font-size: 35px; text-align: left ">装窑:<span id="ydm" style="color:white;">加载中...</span></td>
+					</tr>
+					<tr class="tr_title_warning">
+						<td style="width: 8%; height: 95px; font-size: 35px; text-align: left ">白坯入库:<span id="ycx" style="color:white;">加载中...</span></td>
+					</tr>
+					<tr class="tr_title_warning">
+						<td style="width: 8%; height: 95px; font-size: 35px; text-align: left ">白坏库存:<span id="ygx" style="color:white;">加载中...</span></td>
+					</tr>
+				</table>
+			</div>
+			<!--表格-->
+			<div style="width: 100%; height: 530px; display: flex; flex-direction: row; margin-top: -4%">
+				<div style="width: 100%; height: 530px; ">
+					<table cellspacing="0" cellpadding="0" border="0" style="width:50%;">
+						<tr class="tr_title_warning">
+							<td colspan="7" style="font-size: 30px; color: white;">烧成工序装窑、出窑个人数据</td>
+						</tr>
+						<tr class="tr_title_warning" style="height: 30px; font-size:27px">
+							<td style="width: 15%;">工号</td>
+							<td style="width: 15%;">数量</td>
+							<td style="width: 15%;">工号</td>
+							<td style="width: 15%;">数量</td>
+							<td style="width: 15%;">工号</td>
+							<td style="width: 15%;">数量</td>
+						</tr>
+					</table>
+					<div style=" height:198px;overflow:hidden;">
+						<table style="width: 50%; display:none;" id="StaffTable_template">
+							<!--style=""-->
+							<tr class="tr_title_warning" style="height: 30px; font-size: 20px">
+								<td style="font-size: 18px; color: white; height: 30px; width: 16%; text-align: center ">{工号}</td>
+								<td style="font-size: 20px; color: white; height: 30px; width: 16%; text-align: center">{数量}</td>
+								<td style="font-size: 18px; color: white; height: 30px; width: 16%; text-align: center ">{工号1}</td>
+								<td style="font-size: 20px; color: white; height: 30px; width: 16%; text-align: center">{数量1}</td>
+								<td style="font-size: 18px; color: white; height: 30px; width: 16%; text-align: center ">{工号2}</td>
+								<td style="font-size: 20px; color: white; height: 30px; width: 16%; text-align: center">{数量2}</td>
+							</tr>
+						</table>
+						<table id="StaffTable" style="width: 50%;">
+						</table>
+					</div>
 
-                    <table cellspacing="0" cellpadding="0" border="0" style="width: 50%;">
-                        <tr class="tr_title_warning" style="height: 60px; font-size: 30px">
-                            <td colspan="3" style="width:50%">施釉缺陷率:<span id="dmqxl" style="color:white">——</span></td>
-                            <td colspan="3" style="width:50%">一烧产量:<span id="cxqxl" style="color:white">——</span></td>
-                        </tr>
-                        <tr class="tr_bg_light_warning" style="height: 50px; font-size: 25px">
-                            <td>缺陷</td>
-                            <td id="qxname1">缺陷1</td>
-                            <td id="qxname2">缺陷2</td>
-                            <td id="qxname3">缺陷3</td>
-                            <td id="qxname4">缺陷4</td>
-                            <td>其他</td>
-                        </tr>
-                        <tr class="tr_bg_light_warning" style="height: 60px; font-size: 25px ">
-                            <td>数量</td>
-                            <td id="sl1">1</td>
-                            <td id="sl2">2</td>
-                            <td id="sl3">3</td>
-                            <td id="sl4">4</td>
-                            <td id="sl5">5</td>
-                        </tr>
-                        <tr class="tr_bg_light_warning" style="height: 60px; font-size: 25px ">
-                            <td>缺陷率</td>
-                            <td id="qxl1">0%</td>
-                            <td id="qxl2">0%</td>
-                            <td id="qxl3">0%</td>
-                            <td id="qxl4">0%</td>
-                            <td id="qxl5">0%</td>
-                        </tr>
-                    </table>
-                </div>
-            </div>
-            <div style="width: 50%; height: 500px; padding-right: 20px; margin-top: -530px; margin-left: 50% ">
-                <table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
-                    <tr class="tr_title_warning">
-                        <td colspan="4" style="color:white;">成检实时数据(烧成缺陷数据)</td>
-                    </tr>
-                    <tr class="tr_title_warning">
-                        <td style="font-size: 27px; width: 25%; height: 30px; ">责任工号</td>
-                        <td style="font-size: 27px; width: 25%; height: 30px; ">产品编码</td>
-                        <td style="font-size: 27px; width: 25%; height: 30px; ">缺陷位置</td>
-                        <td style="font-size: 27px; width: 25%; height: 30px; ">产品分级</td>
-                    </tr>
-                </table>
-                <div style=" height: 438px; overflow: hidden;">
-                    <table id="dayTable_template" style="display:none;">
-                        <tr class="tr_bg_light_warning" style="height:30px;">
-                            <td style="font-size: 18px; width: 25%; height: 30px; ">{责任工号}</td>
-                            <td style="font-size: 18px; width: 25%; height: 30px; ">{生产线号}</td>
-                            <td style="font-size: 18px; width: 25%; height: 30px; ">{缺陷名称}</td>
-                            <td style="font-size: 18px; width: 25%; height: 30px; ">{产品分级}</td>
-                        </tr>
-                    </table>
-                    <table id="dayTable" style="width: 100%; ">
-                    </table>
-                </div>
-            </div>
-        </div>
+					<table cellspacing="0" cellpadding="0" border="0" style="width: 50%;">
+						<tr class="tr_title_warning" style="height: 60px; font-size: 30px">
+							<td colspan="3" style="width:50%">施釉缺陷率:<span id="dmqxl" style="color:white">——</span></td>
+							<td colspan="3" style="width:50%">一烧产量:<span id="cxqxl" style="color:white">——</span></td>
+						</tr>
+						<tr class="tr_bg_light_warning" style="height: 50px; font-size: 25px">
+							<td>缺陷</td>
+							<td id="qxname1">缺陷1</td>
+							<td id="qxname2">缺陷2</td>
+							<td id="qxname3">缺陷3</td>
+							<td id="qxname4">缺陷4</td>
+							<td>其他</td>
+						</tr>
+						<tr class="tr_bg_light_warning" style="height: 60px; font-size: 25px ">
+							<td>数量</td>
+							<td id="sl1">1</td>
+							<td id="sl2">2</td>
+							<td id="sl3">3</td>
+							<td id="sl4">4</td>
+							<td id="sl5">5</td>
+						</tr>
+						<tr class="tr_bg_light_warning" style="height: 60px; font-size: 25px ">
+							<td>缺陷率</td>
+							<td id="qxl1">0%</td>
+							<td id="qxl2">0%</td>
+							<td id="qxl3">0%</td>
+							<td id="qxl4">0%</td>
+							<td id="qxl5">0%</td>
+						</tr>
+					</table>
+				</div>
+			</div>
+			<div style="width: 52%; height: 530px; padding-right: 20px; margin-top: -530px; margin-left: 50% ">
+				<table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
+					<tr class="tr_title_warning">
+						<td colspan="4" style="color: white; font-size: 30px">成检实时数据(烧成缺陷数据)</td>
+					</tr>
+					<tr class="tr_title_warning">
+						<td style="font-size: 27px; width: 25%; height: 30px; ">责任工号</td>
+						<td style="font-size: 27px; width: 25%; height: 30px; ">产品编码</td>
+						<td style="font-size: 27px; width: 25%; height: 30px; ">缺陷名称</td>
+						<td style="font-size: 27px; width: 25%; height: 30px; ">产品分级</td>
+					</tr>
+				</table>
+				<div style=" height: 448px; overflow: hidden;">
+					<table id="dayTable_template" style="display:none;">
+						<tr class="tr_bg_light_warning" style="height:30px;">
+							<td style="font-size: 18px; width: 25%; height: 30px; ">{责任工号}</td>
+							<td style="font-size: 18px; width: 25%; height: 30px; ">{生产线号}</td>
+							<td style="font-size: 18px; width: 25%; height: 30px; ">{缺陷名称}</td>
+							<td style="font-size: 18px; width: 25%; height: 30px; ">{产品分级}</td>
+						</tr>
+					</table>
+					<table id="dayTable" style="width: 100%; ">
+					</table>
+				</div>
+			</div>
+		</div>
     </div>
 
     <script>
@@ -157,7 +162,8 @@
         //页面加载
         $(document).ready(function () {
             timeUp();
-            initData();
+			initData();
+			initData2();
 			doGetData = setInterval(function () { loadServerTime(); }, 3000);
            doGetData = setInterval(function () { timeUp(); }, 10000);
            loadDayTable();
@@ -263,15 +269,7 @@
 				}
 			});
         }
-        function clearData() {
-            //清除数据
-            window.DayCL.data.labels = [];
-            //window.DayCL.data.datasets[0].data = [0, 0, 0, 0, 0, 0, 0];
-            window.DayCL.data.datasets[0].data = [];
-            //window.DayCL.data.datasets[1].data = [0, 0, 0, 0, 0, 0, 0];
-            window.DayCL.data.datasets[1].data = [];
-            window.DayCL.update();
-        }
+  
 		function loadServerTime() {
 			$.get('BurnIntoKanban.ashx?m=fwq', function (data) {
 				var json = JSON.parse(data);
@@ -305,12 +303,39 @@
                     for (var n = 0; n < json["rows"].length; n++) {
                         window.DayCL.data.labels.push(json["rows"][n]["SJ"]);
                         window.DayCL.data.datasets[0].data[n] = (json["rows"][n]["入库"]);
-                        window.DayCL.data.datasets[1].data[n] = (json["rows"][n]["装窑"]);
+
                     }
                     }
                     window.DayCL.update();
             });
+
+
+
+			$.get("BurnIntoKanban.ashx?m=rate", function (data) {
+				clearData2();
+				var json = JSON.parse(data);
+				if (json["success"] == true) {
+					for (var n = 0; n < json["rows"].length; n++) {
+						window.MonthCL.data.labels.push(json["rows"][n]["SJ"]);
+						window.MonthCL.data.datasets[0].data[n] = (json["rows"][n]["装窑"]);
+
+					}
+				}
+				window.MonthCL.update();
+			});
         }
+		function clearData() {
+			//清除数据
+			window.DayCL.data.labels = [];
+			window.DayCL.data.datasets[0].data = [];
+			window.DayCL.update();
+		}
+		function clearData2() {
+			//清除数据
+			window.MonthCL.data.labels = [];
+			window.MonthCL.data.datasets[0].data = [];
+			window.MonthCL.update();
+		}
         function initData() {
             window.chartColors = {
                 red: 'rgb(255, 99, 132)',
@@ -328,8 +353,8 @@
                 return Math.round(Math.random() * num);
             }
 
-            Chart.defaults.global.defaultFontColor = 'white';
-            Chart.defaults.global.defaultFontSize = 18;
+			Chart.defaults.global.defaultFontColor = 'white';
+            Chart.defaults.global.defaultFontSize = 15;
             Chart.defaults.global.legend.display = false;
 
             //每小时产量=========================================
@@ -339,23 +364,15 @@
 					datasets: [
 						{
 							//label: "近七日本烧合格率",
-							label: "白坯入库量",
+                            label: "白坯入库量",
 							fill: false,
 							backgroundColor: color(window.chartColors.red).alpha(0.6).rgbString(),
 							borderColor: window.chartColors.red,
-							borderWidth: 2,
-							pointRadius: 15,
-							data: []
-						}, {
-							//label: "近七日整体合格率",
-							label: "日装窑量",
-							fill: false,
-							backgroundColor: color(window.chartColors.orange).alpha(0.6).rgbString(),
-							borderColor: window.chartColors.orange,
-							borderWidth: 2,
-							pointRadius: 15,
+							borderWidth: 4,
+                            pointRadius: 15,
+                            
 							data: []
-                        }
+						}
 					]
 				},
                 type: 'line',
@@ -388,16 +405,148 @@
                             display: true,
                             scaleLabel: {
                                 display: false,
-                                labelString: 'Value'
-                            }
+                                labelString: 'Value'							}
                         }]
                     }
                 }
             };
             var ctxDayCL = document.getElementById("canvasDayCL").getContext("2d");
             window.DayCL = new Chart(ctxDayCL, configDayCL);
+
+
+			//甲班缺陷===========================================
+			window.configMonthCL = {
+				data: {
+					labels: [],
+					datasets: [
+					 {
+							//label: "近七日整体合格率",
+							label: "日装窑量",
+							fill: false,
+							backgroundColor: color(window.chartColors.purple).alpha(0.6).rgbString(),
+							borderColor: window.chartColors.purple,
+							borderWidth: 4,
+							pointRadius: 15,
+							data: []
+						}
+					]
+				},
+				type: 'line',
+				options: {
+					responsive: true,
+					legend: {
+						display: true
+					},
+					title: {
+						display: false,
+						text: '每小时产量'
+					},
+					tooltips: {
+						mode: 'index',
+						intersect: false,
+					},
+					hover: {
+						mode: 'nearest',
+						intersect: true
+					},
+					scales: {
+						xAxes: [{
+							display: true,
+							scaleLabel: {
+								display: false,
+								labelString: ''
+							}
+						}],
+						yAxes: [{
+							display: true,
+							scaleLabel: {
+								display: false,
+								labelString: 'Value'
+							}
+						}]
+					}
+				}
+			};
+			var ctxMonthCL = document.getElementById("canvasMonthCL").getContext("2d");
+			window.MonthCL = new Chart(ctxMonthCL, configMonthCL);
+            //===================================================
         }
+		function initData2() {
+			window.chartColors = {
+				red: 'rgb(255, 99, 132)',
+				orange: 'rgb(255, 159, 64)',
+				yellow: 'rgb(255, 250, 86)',
+				green: 'rgb(75, 192, 192)',
+				blue: 'rgb(54, 162, 250)',
+				purple: 'rgb(153, 102, 255)',
+				grey: 'rgb(231,233,237)'
+			};
+
+			var color = Chart.helpers.color;
+			window.randomScalingFactor = function (num) {
+				return Math.round(Math.random() * num);
+			}
+			Chart.defaults.global.defaultFontColor = 'white';
+			Chart.defaults.global.defaultFontSize = 13;
+			Chart.defaults.global.legend.display = false;
 
+			//甲班缺陷===========================================
+			window.configMonthCL = {
+				data: {
+					labels: [],
+					datasets: [
+						{
+							//label: "近七日整体合格率",
+							label: "日装窑量",
+							fill: false,
+							backgroundColor: color(window.chartColors.purple).alpha(0.6).rgbString(),
+							borderColor: window.chartColors.purple,
+							borderWidth: 4,
+							pointRadius: 13,
+							data: []
+						}
+					]
+				},
+				type: 'line',
+				options: {
+					responsive: true,
+					legend: {
+						display: true
+					},
+					title: {
+						display: false,
+						text: '每小时产量'
+					},
+					tooltips: {
+						mode: 'index',
+						intersect: false,
+					},
+					hover: {
+						mode: 'nearest',
+						intersect: true
+					},
+					scales: {
+						xAxes: [{
+							display: true,
+							scaleLabel: {
+								display: false,
+								labelString: ''
+							}
+						}],
+						yAxes: [{
+							display: true,
+							scaleLabel: {
+								display: false,
+								labelString: 'Value'
+							}
+						}]
+					}
+				}
+			};
+			var ctxMonthCL = document.getElementById("canvasMonthCL").getContext("2d");
+			window.MonthCL = new Chart(ctxMonthCL, configMonthCL);
+			//===================================================
+		}
     </script>
 
     <script src="/Plugins/chartjs-2.8.0/chart-2.8.min.js"></script>

+ 10 - 8
wwwroot/main/Procedure/FormingKanban/FormingKanban.ashx

@@ -147,14 +147,16 @@ public class FormingKanban : IHttpHandler, IReadOnlySessionState
             }
             if (context.Request["m"].ToString() == "Alltotal")
             {
-                string sqlStr = @"with 半检缺陷 AS (
-												SELECT
-												COUNT(DISTINCT df.BARCODE) 缺陷数量
-												FROM TP_PM_DEFECT df
-												LEFT JOIN TP_MST_DEFECT dft ON dft.DEFECTID = df.DEFECTID  
-												WHERE df.VALUEFLAG=1
-												and dft.DEFECTTYPEID=1
-												AND TRUNC( df.CREATETIME ) = trunc(sysdate) 
+                string sqlStr = @"		with 半检缺陷 AS (
+												
+											SELECT
+												COUNT(dfc.BARCODE) 缺陷数量
+												FROM TP_PM_DEFECT dfc
+												LEFT JOIN TP_MST_DEFECT df ON df.DEFECTID = dfc.DEFECTID 
+												WHERE dfc.VALUEFLAG=1
+												and TRUNC(dfc.CREATETIME)=TRUNC(SYSDATE)
+												AND  dfc.DEFECTNAME IN ('坯脏','棕眼','裂底','裂圈','裂鼻子','裂水道','裂管','沾接裂','裂眼','板折',
+												'糙活','变形','渣','管道渣','孔眼不良','睹眼','眼歪','丢气孔','丢眼','坯磕','漏气','空泡','水封不良','冲刷不好','泥埂','断浆迹','模迹','重皮','气泡','眼扁','水绺','卡球') 
 												),
 												一烧产量 AS 
 												(

+ 2 - 2
wwwroot/main/Procedure/FormingKanban/FormingKanban.html

@@ -114,7 +114,7 @@
                     <tr class="tr_title_warning">
                         <td style="font-size: 27px; width: 25%; height: 30px; ">责任工号</td>
                         <td style="font-size: 27px; width: 25%; height: 30px; ">产品编码</td>
-                        <td style="font-size: 27px; width: 25%; height: 30px; ">缺陷位置</td>
+                        <td style="font-size: 27px; width: 25%; height: 30px; ">缺陷名称</td>
                         <td style="font-size: 27px; width: 25%; height: 30px; ">产品分级</td>
                     </tr>
                 </table>
@@ -311,7 +311,7 @@
 			}
 
 			Chart.defaults.global.defaultFontColor = 'white';
-			Chart.defaults.global.defaultFontSize = 17;
+			Chart.defaults.global.defaultFontSize = 16;
 			Chart.defaults.global.legend.display = false;
 
 			//每小时产量=========================================

+ 2 - 2
wwwroot/main/Procedure/GlazedKanban/GlazedKanban.html

@@ -122,7 +122,7 @@
                     <tr class="tr_title_warning">
                         <td style="font-size: 27px; width: 25%; height: 30px; ">责任工号</td>
                         <td style="font-size: 27px; width: 25%; height: 30px; ">产品编码</td>
-                        <td style="font-size: 27px; width: 25%; height: 30px; ">缺陷位置</td>
+                        <td style="font-size: 27px; width: 25%; height: 30px; ">缺陷名称</td>
                         <td style="font-size: 27px; width: 25%; height: 30px; ">产品分级</td>
                     </tr>
                 </table>
@@ -332,7 +332,7 @@
             }
 
             Chart.defaults.global.defaultFontColor = 'white';
-            Chart.defaults.global.defaultFontSize = 18;
+            Chart.defaults.global.defaultFontSize = 16;
             Chart.defaults.global.legend.display = false;
 
             //每小时产量=========================================

+ 85 - 89
wwwroot/main/Procedure/HalfCheckKanban/HalfCheckKanban.ashx

@@ -71,41 +71,7 @@ public class FormingKanban : IHttpHandler, IReadOnlySessionState
                 context.Response.Write(jsonStr);
             }
 
-            if (context.Request["m"].ToString() == "pie1")
-            {
-                string sqlStr = @"with 半检缺陷 AS (
-											SELECT
-												COUNT(dfc.BARCODE) 缺陷数量
-												FROM TP_PM_DEFECT dfc
-												LEFT JOIN TP_MST_DEFECT df ON df.DEFECTID = dfc.DEFECTID 
-												WHERE dfc.VALUEFLAG=1
-												and TRUNC(dfc.CREATETIME)=TRUNC(SYSDATE)
-												AND  dfc.DEFECTNAME IN ('坯脏','棕眼','裂底','裂圈','裂鼻子','裂水道','裂管','沾接裂','裂眼','板折',
-												'糙活','变形','渣','管道渣','孔眼不良','睹眼','眼歪','丢气孔','丢眼','坯磕','漏气','空泡','水封不良','冲刷不好','泥埂','断浆迹','模迹','重皮','气泡','眼扁','水绺','卡球') 
-												),
-												检验数 AS 
-												(
-											SELECT COUNT( * ) 出窑数 FROM TP_PM_PRODUCTIONDATA WHERE PROCEDUREID =16  and VALUEFLAG=1 	AND TRUNC(CREATETIME)=TRUNC(SYSDATE)
-												)
-												SELECT
-												检验数.出窑数 ,
-												DECODE( NVL( 半检缺陷.缺陷数量, 0 ),0,'0%',TO_CHAR(
-												CASE WHEN (1- NVL( 半检缺陷.缺陷数量, 0 ) / DECODE( NVL( 检验数.出窑数, 1 ), 0, 1, NVL( 检验数.出窑数, 1 ) ) ) * 100 >=100
-												THEN 100 else  ( 1- NVL( 半检缺陷.缺陷数量, 0 ) / DECODE( NVL( 检验数.出窑数, 1 ), 0, 1, NVL( 检验数.出窑数, 1 ) ) ) * 100 END
-												,'fm99990.0' ) || '%' ) as 合格率,
-												
-												DECODE( NVL( 半检缺陷.缺陷数量, 0 ),0,'0%',TO_CHAR(
-												CASE WHEN ( NVL(半检缺陷.缺陷数量, 0 ) / DECODE( NVL( 检验数.出窑数, 1 ), 0, 1, NVL( 检验数.出窑数, 1 ) ) ) * 100 >=100
-												THEN 100 else  (NVL( 半检缺陷.缺陷数量, 0 ) / DECODE( NVL( 检验数.出窑数, 1 ), 0, 1, NVL( 检验数.出窑数, 1 ) ) ) * 100 END
-												,'fm99990.0' ) || '%' ) as 缺陷率
-												FROM  
-												半检缺陷
-												LEFT JOIN 检验数 on 1=1";
-                //直接获取不分页数据
-                DataTable dt = conn.ExecuteDatatable(sqlStr);
-                string jsonStr = new JsonResult(dt).ToJson();
-                context.Response.Write(jsonStr);
-            }
+         
 
 
 
@@ -455,62 +421,92 @@ public class FormingKanban : IHttpHandler, IReadOnlySessionState
             }
             if (context.Request["m"].ToString() == "StaffTable")
             {
-                string sqlStr = @"SELECT 
-										 CASE WHEN UU.STAFFCODE is NULL THEN '--' ELSE TO_CHAR(UU.STAFFCODE )end AS STAFFCODE,
-										 CASE WHEN UU.COUNTS is NULL THEN '0' ELSE TO_CHAR(UU.COUNTS )end AS COUNTS,
-										 CASE WHEN UU.STAFFCODE1 is NULL THEN '--' ELSE TO_CHAR(UU.STAFFCODE1 )end AS STAFFCODE,
-										 CASE WHEN UU.COUNTS1 is NULL THEN '0' ELSE TO_CHAR(UU.COUNTS1 )end AS COUNTS1
-										 
-										FROM(
-										SELECT
-										 U1.ID AS ID,
-										 U1.STAFFCODE AS STAFFCODE,
-										 U1.COUNTS AS COUNTS,
-										 U2.ID AS ID1,
-										 U2.STAFFCODE AS STAFFCODE1,
-										 U2.COUNTS AS COUNTS1
-										FROM(
-										SELECT
-										 ROWNUM AS ID,
-										 T.STAFFCODE,
-										 T.COUNTS
+                string sqlStr = @"SELECT
+									CASE WHEN UU.STAFFCODE IS NULL THEN ' ' ELSE TO_CHAR(UU.STAFFCODE) END STAFFCODE,
+							  	CASE WHEN UU.COUNTS IS NULL THEN ' ' ELSE TO_CHAR(UU.COUNTS)  END COUNTS,	
+									CASE WHEN UU.STAFFCODE1 IS NULL THEN ' ' ELSE TO_CHAR(UU.STAFFCODE1)  END STAFFCODE1,	
+									CASE WHEN UU.COUNTS1 IS NULL THEN ' ' ELSE TO_CHAR(UU.COUNTS1)  END COUNTS1,	
+									CASE WHEN UU.STAFFCODE2 IS NULL THEN ' ' ELSE TO_CHAR(UU.STAFFCODE2)  END STAFFCODE2,	
+									CASE WHEN UU.COUNTS2 IS NULL THEN ' ' ELSE TO_CHAR(UU.COUNTS2)  END COUNTS2
+																	FROM
+									(
+									SELECT
+										U1.ID AS ID,
+										U1.STAFFCODE AS STAFFCODE,
+										U1.COUNTS AS COUNTS,
+										U2.ID AS ID1,
+										U2.STAFFCODE AS STAFFCODE1,
+										U2.COUNTS AS COUNTS1,
+										U3.ID AS ID2,
+										U3.STAFFCODE AS STAFFCODE2,
+										U3.COUNTS AS COUNTS2 
+									FROM
+										(
+										SELECT ROWNUM AS
+											ID,
+											T.STAFFCODE,
+											T.COUNTS 
+										FROM
+											(
+											SELECT
+												THS.STAFFCODE STAFFCODE,
+												COUNT( tppd.BARCODE ) AS COUNTS 
+											FROM
+												TP_PM_PRODUCTIONDATA TPPD
+												LEFT JOIN TP_MST_USERSTAFF TMUS ON TPPD.USERID = TMUS.USERID
+												LEFT JOIN TP_HR_STAFF THS ON THS.STAFFID = TMUS.STAFFID 
+											WHERE
+												TPPD.PROCEDUREID IN ( 6,40,31 ) 
+												AND TRUNC(TPPD.CREATETIME)=TRUNC(SYSDATE)
+											GROUP BY
+												THS.STAFFCODE 
+											) T 
+										) U1
+										LEFT JOIN (
+										SELECT ROWNUM AS
+											ID,
+											T1.STAFFCODE,
+											T1.COUNTS 
 										FROM
-										 (
-										 SELECT
-										  THS.STAFFCODE STAFFCODE,
-										  COUNT( tppd.BARCODE ) AS COUNTS 
-										 FROM
-										  TP_PM_PRODUCTIONDATA TPPD
-										  LEFT JOIN TP_MST_USERSTAFF TMUS ON TPPD.USERID = TMUS.USERID
-										  LEFT JOIN TP_HR_STAFF THS ON THS.STAFFID = TMUS.STAFFID 
-										 WHERE
-										  TPPD.PROCEDUREID IN ( 6,40,31 ) 
-											and TRUNC(TPPD.CREATETIME)= TRUNC(SYSDATE)
-										 GROUP BY
-										 THS.STAFFCODE 
-										 ) T) U1
-										 LEFT JOIN (SELECT
-										 ROWNUM AS ID,
-										 T1.STAFFCODE,
-										 T1.COUNTS
+											(
+											SELECT
+												THS.STAFFCODE STAFFCODE,
+												COUNT( tppd.BARCODE ) AS COUNTS 
+											FROM
+												TP_PM_PRODUCTIONDATA TPPD
+												LEFT JOIN TP_MST_USERSTAFF TMUS ON TPPD.USERID = TMUS.USERID
+												LEFT JOIN TP_HR_STAFF THS ON THS.STAFFID = TMUS.STAFFID 
+											WHERE
+												TPPD.PROCEDUREID IN ( 6,40,31 ) 
+												AND TRUNC(TPPD.CREATETIME)=TRUNC(SYSDATE)
+											GROUP BY
+												THS.STAFFCODE 
+											) T1 
+										) U2 ON U1.ID = ( U2.ID - 1 )
+										LEFT JOIN (
+										SELECT ROWNUM AS
+											ID,
+											T.STAFFCODE,
+											T.COUNTS 
 										FROM
-										 (
-										 SELECT
-										  THS.STAFFCODE STAFFCODE,
-										  COUNT( tppd.BARCODE ) AS COUNTS 
-										 FROM
-										  TP_PM_PRODUCTIONDATA TPPD
-										  LEFT JOIN TP_MST_USERSTAFF TMUS ON TPPD.USERID = TMUS.USERID
-										  LEFT JOIN TP_HR_STAFF THS ON THS.STAFFID = TMUS.STAFFID 
-										 WHERE
-										  TPPD.PROCEDUREID IN ( 6,40,31 ) 
-											and TRUNC(TPPD.CREATETIME)= TRUNC(SYSDATE)
-										 GROUP BY
-										 THS.STAFFCODE 
-										 ) T1 ) U2 ON U1.ID = (U2.ID - 1)
-										 WHERE
-										 mod( U1.id, 3 ) = 1
-										 ) UU";
+											(
+											SELECT
+												THS.STAFFCODE STAFFCODE,
+												COUNT( tppd.BARCODE ) AS COUNTS 
+											FROM
+												TP_PM_PRODUCTIONDATA TPPD
+												LEFT JOIN TP_MST_USERSTAFF TMUS ON TPPD.USERID = TMUS.USERID
+												LEFT JOIN TP_HR_STAFF THS ON THS.STAFFID = TMUS.STAFFID 
+											WHERE
+												TPPD.PROCEDUREID IN ( 6,40,31 ) 
+												AND TRUNC(TPPD.CREATETIME)=TRUNC(SYSDATE)
+											GROUP BY
+												THS.STAFFCODE 
+											) T 
+										) U3 ON U2.ID = ( U3.ID - 1 ) 
+									WHERE
+									mod( U1.id, 3 ) = 1 
+									) UU";
                 //直接获取不分页数据
                 DataTable dt = conn.ExecuteDatatable(sqlStr);
                 string jsonStr = new JsonResult(dt).ToJson();

+ 62 - 114
wwwroot/main/Procedure/HalfCheckKanban/HalfCheckKanban.html

@@ -27,13 +27,12 @@
         <div class="box_body" style="display: flex; flex-direction: column;">
 
             <!--31天产量曲线图-->
-            <div style="width:1840px;height:30%;display:flex;flex-direction:row;margin-left:-5%">
-                <div style="width: 75%; height: 300px;">
+            <div style="width:1840px;height:30%;display:flex;flex-direction:row;">
+                <div style="width: 80%; height: 300px;">
                     <div style="color:white;font-size:15px;font-weight:600; text-align:center">每日产量计划达成</div>
                     <canvas id="canvasDayCL" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 330px; width: 80% "></canvas>
                 </div>
             </div>
-
             <div>
                 <table rules="none" align="right" style="width: 20%; height: 270px; margin-left:80%;margin-top:-291px ">
                     <tr class="tr_bg_dark_warning">
@@ -54,43 +53,43 @@
                 </table>
             </div>
             <!--表格-->
-            <div style="width: 100%; height: 530px; display: flex; flex-direction: row; margin-top: 4%">
-                <div style="width: 50%; height: 532px; padding-right: 20px;">
-                    <table cellspacing="0" cellpadding="0" border="0" style="width: 67%; ">
+            <div style="width: 98%; height: 530px; display: flex; flex-direction: row; margin-top: 4%">
+                <div style="width: 100%; height: 530px; ">
+                    <table cellspacing="0" cellpadding="0" border="0" style="width:50%;">
                         <tr class="tr_title_warning">
-                            <td colspan="4" style="color: white; font-size: 30px; ">半检工个人检验数据</td>
+                            <td colspan="7" style="font-size: 30px; color: white;">半检工个人检验数据</td>
                         </tr>
                         <tr class="tr_title_warning" style="height: 30px; font-size:27px">
-                            <td style="width: 25%;">工号</td>
-                            <td style="width: 25%;">数量</td>
-                            <td style="width: 25%;">工号</td>
-                            <td style="width: 25%;">数量</td>
+                            <td style="width: 15%;">工号</td>
+                            <td style="width: 15%;">数量</td>
+                            <td style="width: 15%;">工号</td>
+                            <td style="width: 15%;">数量</td>
+                            <td style="width: 15%;">工号</td>
+                            <td style="width: 15%;">数量</td>
                         </tr>
                     </table>
-                    <div style="width: 67%; height: 158px; overflow: hidden; ">
-                        <table cellspacing="0" cellpadding="0" border="0" style="width: 68%; display: none; " id="StaffTable_template">
-                            <tr class="tr_bg_light_warning" style="height: 30px; font-size:18px">
-                                <td style="font-size: 15px; width: 25%; height: 30px; color: white; text-align: center">{工号}</td>
-                                <td style="font-size: 15px; width: 25%; color: white; height: 30px; text-align: center">{数量}</td>
-                                <td style="font-size: 15px; width: 25%; color: white; height: 30px; text-align: center ">{工号2}</td>
-                                <td style="font-size: 15px; width: 25%; color: white; height: 30px; text-align: center ">{数量2}</td>
+                    <div style=" height:158px;overflow:hidden;">
+                        <table style="width: 50%; display:none;" id="StaffTable_template">
+                            <!--style=""-->
+                            <tr class="tr_title_warning" style="height: 30px; font-size: 20px">
+                                <td style="font-size: 18px; color: white; height: 30px; width: 16%; text-align: center ">{工号}</td>
+                                <td style="font-size: 20px; color: white; height: 30px; width: 16%; text-align: center">{数量}</td>
+                                <td style="font-size: 18px; color: white; height: 30px; width: 16%; text-align: center ">{工号1}</td>
+                                <td style="font-size: 20px; color: white; height: 30px; width: 16%; text-align: center">{数量1}</td>
+                                <td style="font-size: 18px; color: white; height: 30px; width: 16%; text-align: center ">{工号2}</td>
+                                <td style="font-size: 20px; color: white; height: 30px; width: 16%; text-align: center">{数量2}</td>
                             </tr>
                         </table>
-                        <table id="StaffTable" style="width: 100%; ">
+                        <table id="StaffTable" style="width: 50%;">
                         </table>
                     </div>
-                    <div style="width:80%;height:230px;display:flex;flex-direction:row;margin-left:45%;margin-top:-251px">
-                        <div style="width: 100%; height: 520px;">
-                            <div style="color:white;font-size:30px;font-weight:600; text-align:center">半检质量</div>
-                            <canvas id="canvasDefectA" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 200px; width: 100%"></canvas>
-                        </div>
-                    </div>
-                    <table cellspacing="0" cellpadding="0" border="0" style="width: 100%; margin-top: 2%;">
+
+                    <table cellspacing="0" cellpadding="0" border="0" style="width: 50%;">
                         <tr class="tr_title_warning" style="height: 60px;">
-                            <td colspan="3"  class="tr_title_warning"  style="font-size: 30px; width: 50%" >半检缺陷率:<span id="bjqxl"  style="color: white; font-size: 30px; ">--</span></td>
-                            <td colspan="3"  class="tr_title_warning"   style="font-size: 30px; width: 50%">一烧产量:<span  id="scl"  style="color: white; font-size: 30px; ">--</span></td>
+                            <td colspan="3" class="tr_title_warning" style="font-size: 30px; width: 50%">半检缺陷率:<span id="bjqxl" style="color: white; font-size: 30px; ">--</span></td>
+                            <td colspan="3" class="tr_title_warning" style="font-size: 30px; width: 50%">一烧产量:<span id="scl" style="color: white; font-size: 30px; ">--</span></td>
                         </tr>
-                        <tr class="tr_title_warning"   style="height: 60px; font-size: 25px">
+                        <tr class="tr_bg_light_warning" style="height: 50px; font-size: 25px">
                             <td>缺陷</td>
                             <td id="qxname1">缺陷1</td>
                             <td id="qxname2">缺陷2</td>
@@ -100,11 +99,11 @@
                         </tr>
                         <tr class="tr_bg_light_warning" style="height: 60px; font-size: 25px ">
                             <td>数量</td>
-                            <td id="sl1">0</td>
-                            <td id="sl2">0</td>
-                            <td id="sl3">0</td>
-                            <td id="sl4">0</td>
-                            <td id="sl5">0</td>
+                            <td id="sl1">1</td>
+                            <td id="sl2">2</td>
+                            <td id="sl3">3</td>
+                            <td id="sl4">4</td>
+                            <td id="sl5">5</td>
                         </tr>
                         <tr class="tr_bg_light_warning" style="height: 60px; font-size: 25px ">
                             <td>缺陷率</td>
@@ -125,7 +124,7 @@
                     <tr class="tr_title_warning">
                         <td style="font-size: 27px; width: 25%; height: 30px; ">责任工号</td>
                         <td style="font-size: 27px; width: 25%; height: 30px; ">产品编码</td>
-                        <td style="font-size: 27px; width: 25%; height: 30px; ">缺陷位置</td>
+                        <td style="font-size: 27px; width: 25%; height: 30px; ">缺陷名称</td>
                         <td style="font-size: 27px; width: 25%; height: 30px; ">产品分级</td>
                     </tr>
                 </table>
@@ -138,7 +137,7 @@
                             <td style="font-size: 18px; width: 220px; height: 30px; ">{产品分级}</td>
                         </tr>
                     </table>
-                    <table id="dayTable"  style="width: 100%; ">
+                    <table id="dayTable" style="width: 100%; ">
                     </table>
                 </div>
             </div>
@@ -227,24 +226,26 @@
 		}
 
         function StaffTable() {
-            clearInterval(StaffInterval);
+			clearInterval(StaffInterval);
 			$.get("HalfCheckKanban.ashx?m=StaffTable", function (data) {
-			var json = JSON.parse(data);
-			if (json["success"] == true) {
-				$("#StaffTable").html("");
-				for (var i = 0; i < json["rows"].length; i++) {
-					var temp = $("#StaffTable_template").html();
-					temp = temp.replace("<tbody>", "").replace("</tbody>", "");
-					temp = temp.replace('{工号}', json["rows"][i]['STAFFCODE']);
-					temp = temp.replace('{数量}', json["rows"][i]['COUNTS']);
-					temp = temp.replace('{工号2}', json["rows"][i]['STAFFCODE1']);
-					temp = temp.replace('{数量2}', json["rows"][i]['COUNTS1']);
-					$("#StaffTable").append(temp);
+				var json = JSON.parse(data);
+				if (json["success"] == true) {
+					$("#StaffTable").html("");
+					for (var i = 0; i < json["rows"].length; i++) {
+						var temp = $("#StaffTable_template").html();
+						temp = temp.replace("<tbody>", "").replace("</tbody>", "");
+						temp = temp.replace('{工号}', json["rows"][i]['STAFFCODE']);
+						temp = temp.replace('{数量}', json["rows"][i]['COUNTS']);
+						temp = temp.replace('{工号1}', json["rows"][i]['STAFFCODE1']);
+						temp = temp.replace('{数量1}', json["rows"][i]['COUNTS1']);
+						temp = temp.replace('{工号2}', json["rows"][i]['STAFFCODE2']);
+						temp = temp.replace('{数量2}', json["rows"][i]['COUNTS2']);
+						$("#StaffTable").append(temp);
+					}
+					StaffTableRowCount = json["rows"].length;
+					StaffInterval = setInterval(StaffTableScroll, 3000);
 				}
-                StaffTableRowCount = json["rows"].length;
-                    StaffInterval = setInterval(StaffTableScroll, 3000);
-			}
-		});
+			});
 		}
         //明细表
         function loadDayTable() {
@@ -318,17 +319,6 @@
 
 
         function loadData() {
-			$.get("HalfCheckKanban.ashx?m=pie1", function (data) {
-			var json = JSON.parse(data);
-                if (json["success"] == true) {
-                    var firs = parseFloat(json["rows"][0]["合格率"]);
-					var lpv = firs.toFixed(2);
-                    var sencond = 100.00 - parseFloat(json["rows"][0]["合格率"]);
-					var sec = sencond.toFixed(2);
-					window.DefectA.data.datasets[0].data = [lpv, sec];
-				window.DefectA.update();
-			}
-		});
 			$.get("HalfCheckKanban.ashx?m=rate", function (data) {
 				clearData();
 				var json = JSON.parse(data);
@@ -360,9 +350,8 @@
             window.randomScalingFactor = function (num) {
                 return Math.round(Math.random() * num);
             }
-
             Chart.defaults.global.defaultFontColor = 'white';
-            Chart.defaults.global.defaultFontSize = 18;
+            Chart.defaults.global.defaultFontSize = 16;
             Chart.defaults.global.legend.display = false;
 
             //每小时产量=========================================
@@ -373,8 +362,8 @@
 						label: "入库量",
                         backgroundColor: color(window.chartColors.orange).alpha(0.6).rgbString(),
                         borderColor: window.chartColors.orange,
-                        borderWidth: 2,
-						pointRadius: 13,
+                        borderWidth: 3,
+						pointRadius: 15,
                         data: [],
                         fill: false,
                     }, {
@@ -382,20 +371,20 @@
                         fill: false,
                         backgroundColor: color(window.chartColors.blue).alpha(0.6).rgbString(),
                         borderColor: window.chartColors.blue,
-                        borderWidth: 2,
-						pointRadius: 13,
+                        borderWidth: 3,
+						pointRadius: 15,
                         data: []
 						}, {
 						label: "检验量",
 							fill: false,
 						backgroundColor: color(window.chartColors.red).alpha(0.6).rgbString(),
 							borderColor: window.chartColors.red,
-							borderWidth: 2,
-							pointRadius: 13,
+							borderWidth: 3,
+							pointRadius: 15,
 							data: []
 						}]
                 },
-                type: 'line',
+                type: 'bar',
                 options: {
                     responsive: true,
                     legend: {
@@ -425,7 +414,7 @@
                             display: true,
                             scaleLabel: {
                                 display: false,
-                                labelString: 'Value'
+                                labelString: 'Value',
                             }
                         }]
                     }
@@ -433,47 +422,6 @@
             };
             var ctxDayCL = document.getElementById("canvasDayCL").getContext("2d");
             window.DayCL = new Chart(ctxDayCL, configDayCL);
-
-			//甲班缺陷===========================================
-			window.configDefectA = {
-				data: {
-					labels: ['良品率:%','缺陷率:%'],
-					datasets: [{
-						label: '工序',
-						backgroundColor: [
-							color(window.chartColors.red).alpha(0.35).rgbString(),
-							color(window.chartColors.blue).alpha(0.35).rgbString(),
-						],
-						fill: false,
-						borderColor: [
-							window.chartColors.red,
-							window.chartColors.blue,
-
-                        ],
-						borderWidth: 2,
-						pointRadius: 30,
-						data: [50,50]
-					}]
-				},
-				type: 'pie',
-				options: {
-					legend: {
-						display: true
-					},
-					title: {
-						display: false,
-						text: "良品率:%"
-					},
-					tooltips: {
-						mode: 'point',
-						intersect: false
-					},
-					responsive: true
-
-				}
-			};
-			var ctxDefectA = document.getElementById("canvasDefectA").getContext("2d");
-			window.DefectA = new Chart(ctxDefectA, configDefectA);
         }
     </script>
 

+ 1 - 3
wwwroot/main/Procedure/PackagingKanban/PackagingKanban.html

@@ -229,14 +229,12 @@
                 purple: 'rgb(153, 102, 255)',
                 grey: 'rgb(231,233,237)'
             };
-
             var color = Chart.helpers.color;
             window.randomScalingFactor = function (num) {
                 return Math.round(Math.random() * num);
             }
-
             Chart.defaults.global.defaultFontColor = 'white';
-            Chart.defaults.global.defaultFontSize = 18;
+            Chart.defaults.global.defaultFontSize = 16;
             Chart.defaults.global.legend.display = false;
 
             //每小时产量=========================================

+ 3 - 3
wwwroot/main/Procedure/RefinementKanban/RefinementKanban.html

@@ -120,8 +120,8 @@
                     </tr>
                     <tr class="tr_title_warning">
                         <td style="font-size: 27px; width: 25%; height: 30px; ">责任工号</td>
-                        <td style="font-size: 27px; width: 25%; height: 30px; ">产品编码</td>
-                        <td style="font-size: 27px; width: 25%; height: 30px; ">缺陷位置</td>
+                        <td style="font-size: 27px; width: 25%; height: 30px; ">工种</td>
+                        <td style="font-size: 27px; width: 25%; height: 30px; ">缺陷名称</td>
                         <td style="font-size: 27px; width: 25%; height: 30px; ">产品分级</td>
                     </tr>
                 </table>
@@ -332,7 +332,7 @@
             }
 
             Chart.defaults.global.defaultFontColor = 'white';
-            Chart.defaults.global.defaultFontSize = 18;
+            Chart.defaults.global.defaultFontSize = 16;
             Chart.defaults.global.legend.display = false;
 
             //每小时产量=========================================