模板日期修改
This commit is contained in:
parent
3711640756
commit
daa5200238
|
@ -960,6 +960,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
}).FirstOrDefault();
|
}).FirstOrDefault();
|
||||||
|
|
||||||
string date1 = "";
|
string date1 = "";
|
||||||
|
string date11 = "";
|
||||||
string sign = "";
|
string sign = "";
|
||||||
string sign1 = "";
|
string sign1 = "";
|
||||||
Model.AttachFile attachFile = null;
|
Model.AttachFile attachFile = null;
|
||||||
|
@ -1027,10 +1028,25 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
}
|
}
|
||||||
|
|
||||||
// 构建格式化的字符串
|
// 构建格式化的字符串
|
||||||
date1 = dateTime1.HasValue
|
// date1 = dateTime1.HasValue
|
||||||
? $" {dateTime1.Value.Year} 年 {dateTime1.Value.Month:D2} 月 {dateTime1.Value.Day:D2} 日"
|
// ? $" {dateTime1.Value.Year} 年 {dateTime1.Value.Month:D2} 月 {dateTime1.Value.Day:D2} 日"
|
||||||
: "";
|
// : "";
|
||||||
|
date1 = person.InTime.HasValue ? string.Format("{0:yyyy-MM-dd}", person.InTime.Value.AddDays(2)) : "";
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(InTime))
|
||||||
|
{
|
||||||
|
DateTime dt = DateTime.Parse(InTime);
|
||||||
|
dt = dt.AddDays(2);
|
||||||
|
date1 = string.Format("{0:yyyy年MM月dd日}", dt);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(date1))
|
||||||
|
{
|
||||||
|
DateTime dt = DateTime.Parse(date1);
|
||||||
|
dt = dt.AddDays(2);
|
||||||
|
date11 = string.Format("{0:yyyy年MM月dd日}", dt);
|
||||||
|
}
|
||||||
|
|
||||||
string sign2 = AttachFileService.getFileUrl(person.PersonId + "_2");
|
string sign2 = AttachFileService.getFileUrl(person.PersonId + "_2");
|
||||||
if (!string.IsNullOrEmpty(sign2))
|
if (!string.IsNullOrEmpty(sign2))
|
||||||
{
|
{
|
||||||
|
@ -1041,9 +1057,16 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
helper.AddImage(string.Empty, "sign2", 0, 0, 0, 0);
|
helper.AddImage(string.Empty, "sign2", 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
string date2 = personData.SignTime.HasValue
|
// string date2 = personData.SignTime.HasValue
|
||||||
? $" {personData.SignTime.Value.Year} 年 {personData.SignTime.Value.Month:D2} 月 {personData.SignTime.Value.Day:D2} 日"
|
// ? $" {personData.SignTime.Value.Year} 年 {personData.SignTime.Value.Month:D2} 月 {personData.SignTime.Value.Day:D2} 日"
|
||||||
: "";
|
// : "";
|
||||||
|
string date2 = "";
|
||||||
|
if (!string.IsNullOrEmpty(date11))
|
||||||
|
{
|
||||||
|
DateTime dt = DateTime.Parse(date11);
|
||||||
|
dt = dt.AddDays(3);
|
||||||
|
date2 = string.Format("{0:yyyy年MM月dd日}", dt);
|
||||||
|
}
|
||||||
|
|
||||||
string IdentityCard = person.IdentityCard;
|
string IdentityCard = person.IdentityCard;
|
||||||
string Telephone = person.Telephone;
|
string Telephone = person.Telephone;
|
||||||
|
@ -1269,14 +1292,14 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
fieldNames = new[]
|
fieldNames = new[]
|
||||||
{
|
{
|
||||||
"projectName", "name", "time", "sex", "InTime", "sign",
|
"projectName", "name", "time", "sex", "InTime", "sign",
|
||||||
"date1", "date2", "IdentityCard", "Telephone", "year", "month", "day",
|
"date1","date11", "date2", "IdentityCard", "Telephone", "year", "month", "day",
|
||||||
"unitName", "workPostName", "TestStartTime","IdCard", "TestScores", "SValue", "SValueCount", "MValue",
|
"unitName", "workPostName", "TestStartTime","IdCard", "TestScores", "SValue", "SValueCount", "MValue",
|
||||||
"MValueCount", "JValue", "JValueCount"
|
"MValueCount", "JValue", "JValueCount"
|
||||||
};
|
};
|
||||||
|
|
||||||
fieldValues = new object[]
|
fieldValues = new object[]
|
||||||
{
|
{
|
||||||
projectName, name, time, sex, InTime, sign, date1, date2,
|
projectName, name, time, sex, InTime, sign, date1,date11, date2,
|
||||||
IdentityCard, Telephone, year, month, day,
|
IdentityCard, Telephone, year, month, day,
|
||||||
unitName, workPostName, TestStartTime,IdCard, TestScores, SValue, SValueCount, MValue, MValueCount,
|
unitName, workPostName, TestStartTime,IdCard, TestScores, SValue, SValueCount, MValue, MValueCount,
|
||||||
JValue, JValueCount
|
JValue, JValueCount
|
||||||
|
@ -1287,14 +1310,14 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
fieldNames = new[]
|
fieldNames = new[]
|
||||||
{
|
{
|
||||||
"projectName", "name", "time", "sex", "InTime", "sign",
|
"projectName", "name", "time", "sex", "InTime", "sign",
|
||||||
"date1", "date2", "IdentityCard", "Telephone", "year", "month", "day",
|
"date1","date11", "date2", "IdentityCard", "Telephone", "year", "month", "day",
|
||||||
"unitName", "workPostName", "TestStartTime", "testName", "IdCard", "TestScores", "SValue", "SValueCount",
|
"unitName", "workPostName", "TestStartTime", "testName", "IdCard", "TestScores", "SValue", "SValueCount",
|
||||||
"MValue", "MValueCount", "JValue", "JValueCount"
|
"MValue", "MValueCount", "JValue", "JValueCount"
|
||||||
};
|
};
|
||||||
|
|
||||||
fieldValues = new object[]
|
fieldValues = new object[]
|
||||||
{
|
{
|
||||||
projectName, name, time, sex, InTime, sign, date1, date2,
|
projectName, name, time, sex, InTime, sign, date1,date11, date2,
|
||||||
IdentityCard, Telephone, year, month, day,
|
IdentityCard, Telephone, year, month, day,
|
||||||
unitName, workPostName, TestStartTime, testName, IdCard, TestScores, SValue, SValueCount,
|
unitName, workPostName, TestStartTime, testName, IdCard, TestScores, SValue, SValueCount,
|
||||||
MValue, MValueCount, JValue, JValueCount
|
MValue, MValueCount, JValue, JValueCount
|
||||||
|
|
Loading…
Reference in New Issue