From c975ff6253fef1e619daa8e82670a8f9e13f721d Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期五, 18 十一月 2022 09:23:56 +0800
Subject: [PATCH] 设备保养项目导入接口修改
---
VueWebApi/DLL/DAL/AppDeviceManageDAL.cs | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/VueWebApi/DLL/DAL/AppDeviceManageDAL.cs b/VueWebApi/DLL/DAL/AppDeviceManageDAL.cs
index 86c7ecc..3c15a46 100644
--- a/VueWebApi/DLL/DAL/AppDeviceManageDAL.cs
+++ b/VueWebApi/DLL/DAL/AppDeviceManageDAL.cs
@@ -383,8 +383,8 @@
var dynamicParams = new DynamicParameters();
try
{
- //鑾峰彇褰撳墠鎵爜璁惧鏄惁鐢宠缁翠慨璁板綍
- sql = @"select * from TEqp_RepairRequest where eqp_code=@eqpcode and status='REPA' or status='COMP'";
+ //鑾峰彇褰撳墠鎵爜璁惧鏄惁瀛樺湪宸茬敵璇锋垨宸茬淮淇姸鎬佹暟鎹�
+ sql = @"select * from TEqp_RepairRequest where eqp_code=@eqpcode and status<>'CONFIR'";
dynamicParams.Add("@eqpcode", eqpcode);
var data0 = DapperHelper.selectdata(sql, dynamicParams);
if (data0.Rows.Count > 0)
@@ -607,7 +607,7 @@
string imgPath1 = "", imgPath2 = "", AbsolutePath = "";
HttpPostedFile file = files[i];
string imgName = DateTime.Now.ToString("yyyyMMddhhmmss") + i.ToString();
- string keyname = files.AllKeys[i].ToString();
+ string keyname = files.AllKeys[i].ToString().Substring(0, files.AllKeys[i].ToString().IndexOf(";"));
if (keyname == "files1")
{
imgPath1 = "/DeviceImage/image1/" + imgName + file.FileName; //閫氳繃姝ゅ璞¤幏鍙栨枃浠跺悕
@@ -618,7 +618,6 @@
imgPath2 = "/DeviceImage/image2/" + imgName + file.FileName; //閫氳繃姝ゅ璞¤幏鍙栨枃浠跺悕
AbsolutePath = System.Web.HttpContext.Current.Server.MapPath(imgPath2);
}
-
file.SaveAs(AbsolutePath); //灏嗕笂浼犵殑涓滆タ淇濆瓨
//寰幆鍐欑淮淇褰曞搴斿浘鐗囪〃
sql = @"insert into TEqp_RepairImage(source_wo,wo_type,img1url,img2url)
@@ -931,7 +930,7 @@
mn.flag = data.Rows[i]["FLAG"].ToString();
mn.children = new List<AnDnDateSub>();
//鏍规嵁鍛煎彨绫诲瀷id鏌ユ壘缁戝畾浜哄憳
- sql = @"select U.usercode,U.username
+ sql = @"select U.usercode,U.username,U.rid
from TAnDon_Roul_ConFigUser A
inner join TUser U on A.usercode=U.usercode
where A.ando_cogfigid=@id";
@@ -942,6 +941,8 @@
for (int j = 0; j < data0.Rows.Count; j++)
{
AnDnDateSub sn = new AnDnDateSub();
+ sn.rid= data0.Rows[j]["RID"].ToString();//rid
+ sn.alias = data0.Rows[j]["RID"].ToString() + data0.Rows[j]["USERCODE"].ToString(); //鍒悕
sn.usercode = data0.Rows[j]["USERCODE"].ToString();
sn.username = data0.Rows[j]["USERNAME"].ToString();
mn.children.Add(sn);
@@ -1037,6 +1038,7 @@
eqp_code = eqpcode,
type = code,
resp_user = json[i].children[j].usercode,
+ alias= json[i].children[j].alias,
status = "N"
}
});
@@ -1044,7 +1046,7 @@
}
}
//鏋佸厜鎺ㄩ��
- //mes = JPushManage.ExecutePushByUserId(username, wkshpcode, eqpcode, json);
+ mes = JPushManage.ExecutePushByUserId(username, wkshpcode, eqpcode, json);
bool aa = DapperHelper.DoTransaction(list);
if (aa)
{
@@ -1083,7 +1085,7 @@
try
{
//鑾峰彇瀵瑰簲璁惧鍙婃墍灞炶溅闂寸殑瀹夌伅鍛煎彨璁板綍
- sql = @"select A.eqp_code,B.name as eqp_name,T.org_name,A.type as typecode,D.name as typename
+ sql = @"select A.eqp_code,B.name as eqp_name,T.org_code as wksp_code,T.org_name as wksp_name,A.type as typecode,D.name as typename
from TAnDon_Task_Info A
left join TEqpInfo B on A.eqp_code=B.code
left join TOrganization T on B.wksp_code=T.org_code
@@ -1125,7 +1127,7 @@
try
{
list.Clear();
- for (int i = 1; i <= json.Count; i++)
+ for (int i = 0; i <json.Count; i++)
{
string code = json[i].code.ToString();
string name = json[i].name.ToString();
--
Gitblit v1.9.3