From f0bb2d8bd83bc984a78a9ef8c3c7dd4ef821627f Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期四, 29 六月 2023 15:24:14 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/CJGL/Mes_OrderProcFlowAllReportController.cs | 146 +++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 141 insertions(+), 5 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Mes_OrderProcFlowAllReportController.cs b/WebAPI/Controllers/CJGL/Mes_OrderProcFlowAllReportController.cs
index 5bdd5a7..1e9ae5b 100644
--- a/WebAPI/Controllers/CJGL/Mes_OrderProcFlowAllReportController.cs
+++ b/WebAPI/Controllers/CJGL/Mes_OrderProcFlowAllReportController.cs
@@ -18,6 +18,7 @@
private json objJsonResult = new json();
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
DataSet ds;
+ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
#region 杞﹂棿宸ュ簭鍏ㄧ▼璺熻釜鎶ヨ〃 鏌ヨ
[Route("Mes_OrderProcFlowAllReport/OrderProcFlowAllReportList")]
@@ -172,10 +173,37 @@
#region 璁′欢宸ヨ祫鎶ヨ〃 鏌ヨ
[Route("Mes_OrderProcFlowAllReport/EmployeePiecePayReport")]
[HttpGet]
- public object EmployeePiecePayReport(string sWhere)
+ public object EmployeePiecePayReport(string sWhere, string user)
{
try
{
+ //鑾峰彇绯荤粺鍙傛暟
+ string Ret = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ //鍒ゆ柇瀹㈡埛涓洪緳灞辨苯閰�
+ if (oSystemParameter.omodel.WMS_CampanyName == "榫欏北姹介厤")
+ {
+ //鑾峰彇闇�瑕佹嫾鎺ョ殑瀛楃涓�
+ string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "璁′欢宸ヨ祫鎶ヨ〃");
+
+ if (sql_splice != "")
+ {
+ sWhere += sql_splice;
+ }
+ else
+ {
+ string czymc = "";
+ ds = oCN.RunProcReturn("select * from gy_czygl where Czymc='" + user + "'", "gy_czygl");
+ for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
+ {
+ czymc += Convert.ToString(ds.Tables[0].Rows[i]["czymc"]) + ",";
+ }
+ sWhere += ",''";
+ }
+ }
+ }
+
//鍙嶅簭鍒楀寲浼犻�掔殑鍊�
ds = oCN.RunProcReturn("exec h_p_Sc_EmployeePiecePayReport " + sWhere + "", "h_p_Sc_EmployeePiecePayReport");
@@ -210,10 +238,37 @@
#region 璁′欢宸ヨ祫姹囨�绘姤琛� 鏌ヨ
[Route("Mes_OrderProcFlowAllReport/EmployeePiecePaySumReport")]
[HttpGet]
- public object EmployeePiecePaySumReport(string sWhere)
+ public object EmployeePiecePaySumReport(string sWhere, string user)
{
try
{
+ //鑾峰彇绯荤粺鍙傛暟
+ string Ret = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ //鍒ゆ柇瀹㈡埛涓洪緳灞辨苯閰�
+ if (oSystemParameter.omodel.WMS_CampanyName == "榫欏北姹介厤")
+ {
+ //鑾峰彇闇�瑕佹嫾鎺ョ殑瀛楃涓�
+ string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "璁′欢宸ヨ祫姹囨�绘姤琛�");
+
+ if (sql_splice != "")
+ {
+ sWhere += sql_splice;
+ }
+ else
+ {
+ string czymc = "";
+ ds = oCN.RunProcReturn("select * from gy_czygl where Czymc='" + user + "'", "gy_czygl");
+ for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
+ {
+ czymc += Convert.ToString(ds.Tables[0].Rows[i]["czymc"]) + ",";
+ }
+ sWhere += ",''";
+ }
+ }
+ }
+
//鍙嶅簭鍒楀寲浼犻�掔殑鍊�
ds = oCN.RunProcReturn("exec h_p_Sc_EmployeePiecePaySumReport " + sWhere + "", "h_p_Sc_EmployeePiecePaySumReport");
@@ -248,10 +303,37 @@
#region 宸ヨ祫姹囨姤鏃ユ姤琛� 鏌ヨ
[Route("Mes_OrderProcFlowAllReport/EmployeePieceWorkReport")]
[HttpGet]
- public object EmployeePieceWorkReport(string sWhere)
+ public object EmployeePieceWorkReport(string sWhere, string user)
{
try
{
+ //鑾峰彇绯荤粺鍙傛暟
+ string Ret = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ //鍒ゆ柇瀹㈡埛涓洪緳灞辨苯閰�
+ if (oSystemParameter.omodel.WMS_CampanyName == "榫欏北姹介厤")
+ {
+ //鑾峰彇闇�瑕佹嫾鎺ョ殑瀛楃涓�
+ string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "宸ュ簭姹囨姤鏃ユ姤琛�");
+
+ if (sql_splice != "")
+ {
+ sWhere += sql_splice;
+ }
+ else
+ {
+ string czymc = "";
+ ds = oCN.RunProcReturn("select * from gy_czygl where Czymc='" + user + "'", "gy_czygl");
+ for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
+ {
+ czymc += Convert.ToString(ds.Tables[0].Rows[i]["czymc"]) + ",";
+ }
+ sWhere += ",''";
+ }
+ }
+ }
+
//鍙嶅簭鍒楀寲浼犻�掔殑鍊�
ds = oCN.RunProcReturn("exec h_p_Sc_EmployeePieceWorkReport " + sWhere + "", "h_p_Sc_EmployeePieceWorkReport");
@@ -286,10 +368,37 @@
#region 鐢熶骇杞﹂棿宸ュ簭鎶ヨ〃 鏌ヨ
[Route("Mes_OrderProcFlowAllReport/WorkShopProcessWIPReport")]
[HttpGet]
- public object WorkShopProcessWIPReport(string sWhere)
+ public object WorkShopProcessWIPReport(string sWhere,string user)
{
try
{
+ //鑾峰彇绯荤粺鍙傛暟
+ string Ret = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ //鍒ゆ柇瀹㈡埛涓洪緳灞辨苯閰�
+ if (oSystemParameter.omodel.WMS_CampanyName == "榫欏北姹介厤")
+ {
+ //鑾峰彇闇�瑕佹嫾鎺ョ殑瀛楃涓�
+ string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "鐢熶骇杞﹂棿宸ュ簭鎶ヨ〃");
+
+ if(sql_splice != "")
+ {
+ sWhere += sql_splice;
+ }
+ else
+ {
+ string czymc = "";
+ ds = oCN.RunProcReturn("select * from gy_czygl where Czymc='" + user + "'", "gy_czygl");
+ for(int i = 0; i < ds.Tables[0].Rows.Count; i++)
+ {
+ czymc += Convert.ToString(ds.Tables[0].Rows[i]["czymc"])+",";
+ }
+ sWhere += ",''";
+ }
+ }
+ }
+
//鍙嶅簭鍒楀寲浼犻�掔殑鍊�
ds = oCN.RunProcReturn("exec h_p_Sc_WorkShopProcessWIPReport " + sWhere + "", "h_p_Sc_WorkShopProcessWIPReport");
@@ -324,10 +433,37 @@
#region 宸ュ簭鍦ㄥ埗鍝佹姤琛� 鏌ヨ
[Route("Mes_OrderProcFlowAllReport/WorkShopProcessWIPSumReport")]
[HttpGet]
- public object WorkShopProcessWIPSumReport(string sWhere)
+ public object WorkShopProcessWIPSumReport(string sWhere, string user)
{
try
{
+ //鑾峰彇绯荤粺鍙傛暟
+ string Ret = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ //鍒ゆ柇瀹㈡埛涓洪緳灞辨苯閰�
+ if (oSystemParameter.omodel.WMS_CampanyName == "榫欏北姹介厤")
+ {
+ //鑾峰彇闇�瑕佹嫾鎺ョ殑瀛楃涓�
+ string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "宸ュ簭鍦ㄥ埗鍝佹姤琛�");
+
+ if (sql_splice != "")
+ {
+ sWhere += sql_splice;
+ }
+ else
+ {
+ string czymc = "";
+ ds = oCN.RunProcReturn("select * from gy_czygl where Czymc='" + user + "'", "gy_czygl");
+ for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
+ {
+ czymc += Convert.ToString(ds.Tables[0].Rows[i]["czymc"]) + ",";
+ }
+ sWhere += ",''";
+ }
+ }
+ }
+
//鍙嶅簭鍒楀寲浼犻�掔殑鍊�
ds = oCN.RunProcReturn("exec h_p_Sc_WorkShopProcessWIPSumReport " + sWhere + "", "h_p_Sc_WorkShopProcessWIPSumReport");
--
Gitblit v1.9.1