From e99d99e277871729e1af52ecb24c2a8cbb08158c Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期四, 04 八月 2022 17:37:41 +0800
Subject: [PATCH] 修改唯一登录接口
---
VueWebApi/DLL/DAL/KanBanManagerentDAL.cs | 105 ++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 92 insertions(+), 13 deletions(-)
diff --git a/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs b/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs
index f964aaf..57ef245 100644
--- a/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs
+++ b/VueWebApi/DLL/DAL/KanBanManagerentDAL.cs
@@ -223,17 +223,20 @@
try
{
//鑾峰彇浜у搧鎶ュ伐top5淇℃伅
- sql = @"select top 5 A.partname,isnull(sum(A.good_qty),0) as good_qty from(
- select M.partname,A.good_qty from TK_Wrk_Record A
- inner join TK_Wrk_Step S on A.wo_code=S.wo_code and A.step_code=S.step_code
- inner join TMateriel_Info M on A.materiel_code=M.partcode
- where A.style='B' and S.isend='Y' and datediff(day,GETDATE(),A.lm_date)=0
- union all
- select M.partname,A.sqty as good_qty from TK_Wrk_OutRecord A
- inner join TK_Wrk_Step S on A.wo_code=S.wo_code and A.step_code=S.step_code
- inner join TMateriel_Info M on A.materiel_code=M.partcode
- where A.style='S' and S.isend='Y' and datediff(day,GETDATE(),A.lm_date)=0
- ) as A group by A.partname order by good_qty desc";
+ sql = @"select top 5 A.org_name as wkshname,A.name as linename,A.partname,isnull(sum(A.good_qty),0) as good_qty from(
+ select W.org_name,E.name,M.partname,A.good_qty from TK_Wrk_Record A
+ inner join TK_Wrk_Step S on A.wo_code=S.wo_code and A.step_code=S.step_code
+ inner join TMateriel_Info M on A.materiel_code=M.partcode
+ inner join TEqpInfo E on A.eqp_code=E.code
+ inner join TOrganization W on E.wksp_code=W.org_code and W.description='W'
+ where A.style='B' and S.isend='Y' and datediff(day,GETDATE(),A.lm_date)=0
+ union all
+ select C.name as linename,'' as wkshname,M.partname,A.sqty as good_qty from TK_Wrk_OutRecord A
+ inner join TK_Wrk_Step S on A.wo_code=S.wo_code and A.step_code=S.step_code
+ inner join TMateriel_Info M on A.materiel_code=M.partcode
+ inner join TCustomer C on A.wx_code=C.code and C.btype='WX'
+ where A.style='S' and S.isend='Y' and datediff(day,GETDATE(),A.lm_date)=0
+ ) as A group by A.org_name,A.name,A.partname order by good_qty desc";
var data = DapperHelper.selecttable(sql);
mes.code = "200";
mes.Message = "鏌ヨ鎴愬姛!";
@@ -258,8 +261,84 @@
try
{
//鑾峰彇鎶ュ伐涓嶈壇top5淇℃伅
- sql = @"select isnull(COUNT(checkitem_name),0) cont,checkitem_name from TStepCheckRecordSub where DateDiff(dd,lm_date,getdate())<=7
- group by checkitem_name order by cont desc";
+ sql = @"select isnull(COUNT(B.name),0) cont,B.name
+ from CSR_WorkRecord_Defect A
+ inner join TDefect B on A.defect_code=B.code
+ where DateDiff(dd,A.lm_date,getdate())<=7
+ group by B.name order by cont desc";
+ var data = DapperHelper.selecttable(sql);
+ mes.code = "200";
+ mes.Message = "鏌ヨ鎴愬姛!";
+ mes.data = data;
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = e.Message;
+ mes.data = null;
+ }
+ return mes;
+ }
+ #endregion
+
+
+ #region[閲囪喘璁㈠崟璺熻釜绠$悊鐪嬫澘,宸︿笂鏈湀閲囪喘璁㈠崟鏁般�佹湰鏈堥噰璐繘璐у崟鏁般�佹湰鏈堥噰璐叆搴撳崟鏁癩
+ public static ToMessage PurchaseLeftTop()
+ {
+ string sql = "";
+ try
+ {
+ //鑾峰彇鏈湀閲囪喘璁㈠崟鏁般�佹湰鏈堥噰璐繘璐у崟鏁般�佹湰鏈堥噰璐叆搴撳崟鏁�
+ sql = @"select * from h_v_DDKanBan_PurchaseLeftTop ";
+ var data = DapperHelper.selecttable(sql);
+ mes.code = "200";
+ mes.Message = "鏌ヨ鎴愬姛!";
+ mes.data = data;
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = e.Message;
+ mes.data = null;
+ }
+ return mes;
+ }
+ #endregion
+
+ #region[閲囪喘璁㈠崟璺熻釜绠$悊鐪嬫澘,宸︿笅閲囪喘璁㈠崟璺熻釜鍒楄〃]
+ public static ToMessage PurchaseLeftBottom()
+ {
+ string sql = "";
+ try
+ {
+ //鑾峰彇閲囪喘璁㈠崟璺熻釜鍒楄〃
+ sql = @"select * from h_v_DDKanBan_PurchaseLeftBottom ";
+ var data = DapperHelper.selecttable(sql);
+ mes.code = "200";
+ mes.Message = "鏌ヨ鎴愬姛!";
+ mes.data = data;
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = e.Message;
+ mes.data = null;
+ }
+ return mes;
+ }
+ #endregion
+
+ #region[閲囪喘璁㈠崟璺熻釜绠$悊鐪嬫澘,鍙充晶Top]
+ public static ToMessage PurchaseRight()
+ {
+ string sql = "";
+ try
+ {
+ //鑾峰彇閲囪喘璁㈠崟璺熻釜鍒楄〃
+ sql = @"select * from h_v_DDKanBan_PurchaseRight ";
var data = DapperHelper.selecttable(sql);
mes.code = "200";
mes.Message = "鏌ヨ鎴愬姛!";
--
Gitblit v1.9.3