Skip to content

Commit a63c4d5

Browse files
committed
数丢失问题
1 parent 908f221 commit a63c4d5

7 files changed

+94
-26
lines changed

App/Controllers/ORDER_TASK_INFORMATIONController.cs

+40-3
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,15 @@ public ActionResult ErWeiMa2(string id = "1611081523323547325feb23206e5")
5656
ViewBag.Id = id;
5757
return View();
5858
}
59-
6059
[HttpPut]
6160
[ValidateInput(false)]
6261
public ActionResult QianZi(string id, string PICTURE, string HTMLVALUE)
6362
{
64-
var pic = "/up/QianZi/" + id + ".png";
63+
var pic = "";
6564
if (!string.IsNullOrWhiteSpace(PICTURE))
6665
{
6766
string path = Server.MapPath("~/up/QianZi/");
68-
var pathErWeiMa = path + id + ".png";
67+
var pathErWeiMa = path + id + ".png";
6968
using (System.IO.FileStream fs = new System.IO.FileStream(pathErWeiMa, System.IO.FileMode.OpenOrCreate))
7069
{
7170
byte[] byt = Convert.FromBase64String(PICTURE);
@@ -75,6 +74,7 @@ public ActionResult QianZi(string id, string PICTURE, string HTMLVALUE)
7574
fs.Close();
7675
stream.Close();
7776
}
77+
pic = "/up/QianZi/" + id + ".png";
7878
}
7979
Common.ClientResult.OrderTaskGong result = new Common.ClientResult.OrderTaskGong();
8080
SIGN sign = new SIGN();
@@ -91,6 +91,43 @@ public ActionResult QianZi(string id, string PICTURE, string HTMLVALUE)
9191

9292
return Json(result); //提示创建成功
9393
}
94+
[HttpPut]
95+
[ValidateInput(false)]
96+
public ActionResult QianZi2(string id, string PICTURE, string HTMLVALUE)
97+
{
98+
SIGN sign = new SIGN();
99+
100+
sign.ID = Result.GetNewId();
101+
var pic = "";
102+
if (!string.IsNullOrWhiteSpace(PICTURE))
103+
{
104+
string path = Server.MapPath("~/up/QianZi/");
105+
var pathErWeiMa = path + sign.ID + ".png";
106+
using (System.IO.FileStream fs = new System.IO.FileStream(pathErWeiMa, System.IO.FileMode.OpenOrCreate))
107+
{
108+
byte[] byt = Convert.FromBase64String(PICTURE);
109+
MemoryStream stream = new MemoryStream(byt);
110+
System.IO.BinaryWriter w = new System.IO.BinaryWriter(fs);
111+
w.Write(stream.ToArray());
112+
fs.Close();
113+
stream.Close();
114+
}
115+
pic = "/up/QianZi/" + sign.ID + ".png";
116+
}
117+
Common.ClientResult.OrderTaskGong result = new Common.ClientResult.OrderTaskGong();
118+
119+
sign.PICTURE = pic;
120+
sign.HTMLVALUE = Server.UrlDecode(HTMLVALUE);//解码
121+
string currentPerson = GetCurrentPerson();
122+
sign.CREATETIME = DateTime.Now;
123+
sign.CREATEPERSON = currentPerson;
124+
125+
sign.UPDATEPERSON = id;
126+
result.Code = Common.ClientCode.Succeed;
127+
result.Message = Suggestion.InsertSucceed;
128+
m_BLL.EditSTATUS2(ref validationErrors, sign);
129+
return Json(result); //提示创建成功
130+
}
94131
/// <summary>
95132
/// 列表
96133
/// </summary>

App/Controllers/VJIANDINGRENWUController.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ public JsonResult GetData(string id, int page, int rows, string order, string so
354354

355355
int total = 0;
356356
Common.Account account = GetCurrentAccount();
357-
search += "EQUIPMENT_STATUS_VALUUMN&" + Common.ORDER_STATUS.已分配.GetHashCode() + "*" + Common.ORDER_STATUS.已领取.GetHashCode() + "*" + Common.ORDER_STATUS.试验完成.GetHashCode() + "*" + Common.ORDER_STATUS.器具已入库.GetHashCode() + "*" + Common.ORDER_STATUS.器具已领取.GetHashCode() + "";
357+
search += "EQUIPMENT_STATUS_VALUUMN&" + Common.ORDER_STATUS.已分配.GetHashCode() + "*" + Common.ORDER_STATUS.已领取.GetHashCode() + "*" + Common.ORDER_STATUS.试验完成.GetHashCode() + "*" + Common.ORDER_STATUS.待入库.GetHashCode() + "*" + Common.ORDER_STATUS.器具已入库.GetHashCode() + "*" + Common.ORDER_STATUS.器具已领取.GetHashCode() + "";
358358
search += "^NAME&" + account.UNDERTAKE_LABORATORYName;
359359
List<VJIANDINGRENWU> queryData = m_BLL.GetByParamX(id, page, rows, order, sort, search, ref total);
360360
return Json(new datagrid

App/Controllers/VQIJULINGQU1Controller.cs

+1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public ActionResult Show(string baogaoid, string qijuid)
142142
osi.UPDATETIME = oti.UPDATETIME;
143143
osi.UPDATEPERSON = oti.UPDATEPERSON;
144144
#endregion
145+
ViewBag.Id = osi.ID;
145146
ViewBag.Baogaoid = baogaoid;
146147
ViewBag.Qijuid = qijuid;
147148
return View(osi);

App/Views/VQIJULINGQU1/Show.cshtml

+25-17
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@using Common
88
<script src="~/Scripts/jquery.edatagrid.js"></script>
99
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
10-
<html xmlns="http://www.w3.org/1999/xhtml">
10+
<html xmlns="http://www.w3.org/1999/xhtml">
1111

1212
<head>
1313
@*<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />*@
@@ -108,17 +108,17 @@
108108
<td colspan="2" id="INSPECTION_ENTERPRISE">@Model.INSPECTION_ENTERPRISE</td>
109109
<td width="81">单位地址</td>
110110
<td colspan="2" id="INSPECTION_ENTERPRISE_ADDRESS">@Model.INSPECTION_ENTERPRISE_ADDRESS</td>
111-
111+
112112
</tr>
113-
113+
114114
<tr>
115115
<td width="81" height="32">证书单位名称</td>
116116
<td colspan="2" id="CERTIFICATE_ENTERPRISE">@Model.CERTIFICATE_ENTERPRISE</td>
117117
<td width="81">单位地址</td>
118118
<td colspan="2" id="CERTIFICATE_ENTERPRISE_ADDRESS">@Model.CERTIFICATE_ENTERPRISE_ADDRESS</td>
119-
119+
120120
</tr>
121-
121+
122122
</table>
123123
<table class="tab1" border="1px" cellpadding="0" cellspacing="0" align="center" id="qijuzhi">
124124
<tr>
@@ -142,8 +142,8 @@
142142
<td>@item.ATTACHMENT</td>
143143
<td>@item.UNDERTAKE_LABORATORYID</td>
144144
<td>@item.APPLIANCE_RECIVE</td>
145-
<td>@((item.APPLIANCECOLLECTIONSATE != null) ? item.APPLIANCECOLLECTIONSATE : "未领取")</td>
146-
<td>@((item.REPORTTORECEVESTATE!=null)?item.REPORTTORECEVESTATE :"未领取")</td>
145+
<td>@((item.APPLIANCECOLLECTIONSATE != null) ? item.APPLIANCECOLLECTIONSATE : "未领取")</td>
146+
<td>@((item.REPORTTORECEVESTATE != null) ? item.REPORTTORECEVESTATE : "未领取")</td>
147147
</tr>
148148
}
149149
</table>
@@ -163,14 +163,13 @@
163163
</div>
164164
</td>
165165
</tr>
166-
<tr>
167-
</tr>
166+
<tr></tr>
168167
</table>
169-
168+
170169
<p class="beizhu" id="tongxundizi">
171170
领取日期:@System.DateTime.Now.ToShortDateString()
172171
</p>
173-
172+
174173
</div>
175174
<div class="tr mt10">
176175
<input id="Button3" type="button" value="重新签字" class="my-btn" onclick="" />
@@ -219,15 +218,24 @@
219218
dataType: "json",
220219
data: { PICTURE: stream, HTMLVALUE: $("#HTMLVALUE").html() },
221220
success: function (data) {
222-
$.messager.alert('操作提示', "领取成功!", 'info');
223-
if (window.opener) {
224-
window.opener.location.href = "/VQIJULINGQU1";
221+
$.messager.alert({
222+
title: '提示',
223+
msg: '成功',
224+
icon: 'info',
225+
width: 400,
226+
top: 100,
227+
fn: function () {
228+
if (window.opener) {
229+
window.opener.location.href = "/VQIJULINGQU1";
230+
231+
window.close();
232+
}
233+
}
234+
});
225235
226-
window.close();
227-
}
228236
}
229237
});
230-
238+
231239
//$("#flexigridData").datagrid("reload");
232240
//$("#flexigridData").datagrid("clearSelections");
233241
}

BLL/Shiyanshi/ORDER_TASK_INFORMATIONBLL.cs

+20
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,26 @@ public bool EditSTATUS(ref ValidationErrors validationErrors, string id, SIGN si
5151
}
5252
return false;
5353
}
54+
public bool EditSTATUS2(ref ValidationErrors validationErrors, SIGN sign)
55+
{
56+
try
57+
{
58+
using (SysEntities sys=new SysEntities())
59+
{
60+
sys.SIGN.Add(sign);
61+
sys.SaveChanges();
62+
}
63+
64+
65+
return true;
66+
}
67+
catch (Exception ex)
68+
{
69+
validationErrors.Add(ex.Message);
70+
ExceptionsHander.WriteExceptions(ex);
71+
}
72+
return false;
73+
}
5474

5575
/// <summary>
5676
/// 获取委托单号

Common/OrderStatus.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,31 +38,31 @@ public enum ORDER_STATUS
3838
/// </summary>
3939
保存 = 1000,
4040
/// <summary>
41-
/// 器具登记完成时
41+
/// 器具登记完成时1
4242
/// </summary>
4343
已分配 = 1010,
4444
/// <summary>
4545
/// 器具检定退回到器具登记时
4646
/// </summary>
4747
已退回 = 1015,
4848
/// <summary>
49-
/// 点击领取按钮时
49+
/// 点击领取按钮时1
5050
/// </summary>
5151
已领取 = 1020,
5252
/// <summary>
53-
/// 审核完成时
53+
/// 审核完成时1
5454
/// </summary>
5555
试验完成 = 1040,
5656
/// <summary>
5757
/// 批准同意后在没有其余实验室要做实验时器具状态改为待入库
5858
/// </summary>
5959
待入库 = 1041,
6060
/// <summary>
61-
/// 点击入库按钮时
61+
/// 点击入库按钮时1
6262
/// </summary>
6363
器具已入库 = 1042,
6464
/// <summary>
65-
/// 器具领取环节
65+
/// 器具领取环节1
6666
/// </summary>
6767
器具已领取 = 1043,
6868

IBLL/Shiyanshi/IORDER_TASK_INFORMATIONBLL.cs

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ public partial interface IORDER_TASK_INFORMATIONBLL
2424
bool EditField(ref Common.ValidationErrors validationErrors, ORDER_TASK_INFORMATION entity);
2525
[OperationContract]
2626
bool EditSTATUS(ref ValidationErrors validationErrors, string id, SIGN sign);
27+
[OperationContract]
28+
bool EditSTATUS2(ref ValidationErrors validationErrors, SIGN sign);
2729
/// <summary>
2830
/// 获取委托单号
2931
/// </summary>

0 commit comments

Comments
 (0)