From 5df558ffa83ea7f35f272d027b70c3e251c0142d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9D=A4=20=E6=A2=81?= Date: Wed, 30 Aug 2023 17:19:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=90=8C=E6=AD=A5bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalSchoolApi/Controllers/YKTTrabs.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/DigitalSchoolApi/Controllers/YKTTrabs.cs b/DigitalSchoolApi/Controllers/YKTTrabs.cs index 92c788c..abf6fce 100644 --- a/DigitalSchoolApi/Controllers/YKTTrabs.cs +++ b/DigitalSchoolApi/Controllers/YKTTrabs.cs @@ -1911,7 +1911,7 @@ namespace DigitalSchoolApi.Controllers } if (!string.IsNullOrEmpty(item.SEX_CODE)) { - sb.Append($" GenderNo='{item.SEX_CODE}',"); + sb.Append(" GenderNo='"+(item.SEX_CODE=="1"?"1":"0")+"',"); } //民族 if (!string.IsNullOrEmpty(item.NATION_CODE)) @@ -2056,8 +2056,8 @@ namespace DigitalSchoolApi.Controllers } if (!string.IsNullOrEmpty(xsxx.SEX_CODE)) { - fieleSb.Append("IdentityCardNo,"); - sb.Append($" '{xsxx.SEX_CODE}',"); + fieleSb.Append("GenderNo,"); + sb.Append(" '" + (xsxx.SEX_CODE == "1" ? "1" : "0") + "',"); } //民族 if (!string.IsNullOrEmpty(xsxx.NATION_CODE)) @@ -2101,7 +2101,12 @@ namespace DigitalSchoolApi.Controllers fieleSb.Append("Grade,"); sb.Append($" '{xsxx.ENROLL_GRADE.ToString().Substring(2)}',"); } - sb.Append(@" InSchoolStatus='" + (xsxx.IS_NORMAL) + "',"); + + if (xsxx.IS_NORMAL!=null) + { + fieleSb.Append("InSchoolStatus,"); + sb.Append(" '" + (xsxx.IS_NORMAL) + "',"); + } //去掉最后一个逗号 if (fieleSb.ToString().Contains(",") && sb.ToString().Contains(",")) {