Merge branch 'master' of http://47.104.102.122:3000/lpf/SGGL_SeDin_New
This commit is contained in:
commit
e624dbe84b
|
|
@ -358,6 +358,7 @@ namespace BLL.Common
|
||||||
string faceImageBase64 = ImageToByte64String(filename, System.Drawing.Imaging.ImageFormat.Jpeg); // 图片的base64编码
|
string faceImageBase64 = ImageToByte64String(filename, System.Drawing.Imaging.ImageFormat.Jpeg); // 图片的base64编码
|
||||||
string data = "{\"employeeNo\":\"" + employeeNo + "\",\"personName\":\"" + personName + "\",\"faceImageBase64\":\"" + faceImageBase64 + "\",\"verifyImage\":true}";
|
string data = "{\"employeeNo\":\"" + employeeNo + "\",\"personName\":\"" + personName + "\",\"faceImageBase64\":\"" + faceImageBase64 + "\",\"verifyImage\":true}";
|
||||||
string result = Post(YunMouUrl + "api/v1/open/basic/persons/update", data, "application/json;charset=UTF-8", access_token);
|
string result = Post(YunMouUrl + "api/v1/open/basic/persons/update", data, "application/json;charset=UTF-8", access_token);
|
||||||
|
ErrLogInfo.WriteLog(personName + result);
|
||||||
var j2 = JsonConvert.DeserializeObject<dynamic>(result);
|
var j2 = JsonConvert.DeserializeObject<dynamic>(result);
|
||||||
return j2.code;
|
return j2.code;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -198,6 +198,7 @@ namespace BLL
|
||||||
InOutWay = personInOut.InOutWay ?? Const.InOutWay_Other,
|
InOutWay = personInOut.InOutWay ?? Const.InOutWay_Other,
|
||||||
WorkAreaId = personInOut.WorkAreaId,
|
WorkAreaId = personInOut.WorkAreaId,
|
||||||
WorkAreaName = personInOut.WorkAreaName,
|
WorkAreaName = personInOut.WorkAreaName,
|
||||||
|
IdentityCard = personInOut.IdentityCard,
|
||||||
OldID = personInOut.OldID,
|
OldID = personInOut.OldID,
|
||||||
Address = personInOut.Address,
|
Address = personInOut.Address,
|
||||||
Remark = personInOut.Remark,
|
Remark = personInOut.Remark,
|
||||||
|
|
@ -210,7 +211,7 @@ namespace BLL
|
||||||
{
|
{
|
||||||
personIds.Add(personInOut.IdentityCard);
|
personIds.Add(personInOut.IdentityCard);
|
||||||
}
|
}
|
||||||
newPersonInOutList.Add(personInOut);
|
newPersonInOutList.Add(newPersonInOut);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Model.SitePerson_Person> person_Peoples = new List<Model.SitePerson_Person>();
|
List<Model.SitePerson_Person> person_Peoples = new List<Model.SitePerson_Person>();
|
||||||
|
|
@ -244,7 +245,7 @@ namespace BLL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!getPerson.OutTime.HasValue || getPerson.OutTime > DateTime.Now)
|
if (getPerson!=null && (!getPerson.OutTime.HasValue || getPerson.OutTime > DateTime.Now))
|
||||||
{
|
{
|
||||||
//// 插入当日记录表
|
//// 插入当日记录表
|
||||||
needInsertPersonInOutList.Add(newPersonInOut);
|
needInsertPersonInOutList.Add(newPersonInOut);
|
||||||
|
|
@ -398,7 +399,7 @@ namespace BLL
|
||||||
foreach (var newPersonInOut in newPersonInOutList)
|
foreach (var newPersonInOut in newPersonInOutList)
|
||||||
{
|
{
|
||||||
var getPUnit = getPUnitS.FirstOrDefault(x => x.UnitId == newPersonInOut.UnitId);
|
var getPUnit = getPUnitS.FirstOrDefault(x => x.UnitId == newPersonInOut.UnitId);
|
||||||
if (getPUnit.UnitType != Const.ProjectUnitType_3 && getPUnit.UnitType != Const.ProjectUnitType_4 && getPUnit.IsSynchro == true)
|
if (getPUnit!=null&&getPUnit.UnitType != Const.ProjectUnitType_3 && getPUnit.UnitType != Const.ProjectUnitType_4 && getPUnit.IsSynchro == true)
|
||||||
{
|
{
|
||||||
if (getRealNameP != null && newPersonInOut.ChangeTime.HasValue)
|
if (getRealNameP != null && newPersonInOut.ChangeTime.HasValue)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ using System.Data.SqlClient;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using AspNet = System.Web.UI.WebControls;
|
||||||
|
|
||||||
namespace FineUIPro.Web.HSSE.Check
|
namespace FineUIPro.Web.HSSE.Check
|
||||||
{
|
{
|
||||||
|
|
@ -342,6 +343,59 @@ namespace FineUIPro.Web.HSSE.Check
|
||||||
Response.Write(GetGridTableHtml(Grid1));
|
Response.Write(GetGridTableHtml(Grid1));
|
||||||
Response.End();
|
Response.End();
|
||||||
}
|
}
|
||||||
|
public static string GetGridTableHtml(Grid grid)
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
|
||||||
|
sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
|
||||||
|
sb.Append("<tr>");
|
||||||
|
|
||||||
|
foreach (GridColumn column in grid.Columns)
|
||||||
|
{
|
||||||
|
if (column.ColumnID != "Actions" && !column.Hidden)
|
||||||
|
{
|
||||||
|
sb.AppendFormat("<td>{0}</td>", column.HeaderText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sb.Append("</tr>");
|
||||||
|
foreach (GridRow row in grid.Rows)
|
||||||
|
{
|
||||||
|
sb.Append("<tr>");
|
||||||
|
foreach (GridColumn column in grid.Columns)
|
||||||
|
{
|
||||||
|
if (column.ColumnID != "Actions" && !column.Hidden)
|
||||||
|
{
|
||||||
|
string html = row.Values[column.ColumnIndex].ToString();
|
||||||
|
if (column.ColumnID == "tfNumber" && (row.FindControl("labNumber") as AspNet.Label) != null)
|
||||||
|
{
|
||||||
|
html = (row.FindControl("labNumber") as AspNet.Label).Text;
|
||||||
|
}
|
||||||
|
if (column.ColumnID == "CheckManNames" && (row.FindControl("Label2") as AspNet.Label) != null)
|
||||||
|
{
|
||||||
|
html = (row.FindControl("Label2") as AspNet.Label).Text;
|
||||||
|
}
|
||||||
|
// 处理CheckBox
|
||||||
|
if (html.Contains("f-grid-static-checkbox"))
|
||||||
|
{
|
||||||
|
if (!html.Contains("f-checked"))
|
||||||
|
{
|
||||||
|
html = "×";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
html = "√";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sb.AppendFormat("<td style='vnd.ms-excel.numberformat:@;width:140px;'>{0}</td>", html);
|
||||||
|
// sb.AppendFormat("<td>{0}</td>", html);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.Append("</tr>");
|
||||||
|
}
|
||||||
|
sb.Append("</table>");
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
protected void rbStates_SelectedIndexChanged(object sender, EventArgs e)
|
protected void rbStates_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
|
|
||||||
|
|
@ -476,6 +476,7 @@ namespace WebAPI.Controllers
|
||||||
{
|
{
|
||||||
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == person.IdentityCard.Trim() && x.ProjectId == person.ProjectId);
|
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == person.IdentityCard.Trim() && x.ProjectId == person.ProjectId);
|
||||||
if (getPerson != null && getPerson.PersonId != person.PersonId)
|
if (getPerson != null && getPerson.PersonId != person.PersonId)
|
||||||
|
//if (getPerson != null && getPerson.SitePersonId != person.SitePersonId)
|
||||||
{
|
{
|
||||||
responeData.code = 2;
|
responeData.code = 2;
|
||||||
responeData.message = "人员身份证号码已存在!";
|
responeData.message = "人员身份证号码已存在!";
|
||||||
|
|
@ -785,7 +786,7 @@ namespace WebAPI.Controllers
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
responeData.code = 0;
|
responeData.code = 0;
|
||||||
responeData.message = ex.Message;
|
responeData.message = ex.StackTrace;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return responeData;
|
return responeData;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue