WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs
@@ -279,8 +279,9 @@
        [HttpPost]
        public object ModifyByID([FromBody] JObject oMain)
        {
            try
            {
            {
                DAL.ClsGy_Employee_Ctl oDept = new DAL.ClsGy_Employee_Ctl();
                DAL.ClsGy_Employee_View oDeptHlp = new DAL.ClsGy_Employee_View();
@@ -292,7 +293,7 @@
                string msg4 = sArray[2].ToString();
                //string msg4 = sArray[2].ToString();
                //string msg5 = sArray[3].ToString();
                oCN.BeginTran();
                //编辑权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_Employee_Edit", 1, false, msg3))
                {
@@ -337,8 +338,8 @@
                long HCTPrjID = list[0].HCTPrjID;
                long HProcID = list[0].HProcID;
                string HBasePay = list[0].HBasePay;
                DateTime HInComDate = list[0].HInComDate;   //进厂日期
                DateTime HDimissionDate = list[0].HDimissionDate;   //离职日期 (允许NULL)
                DateTime HInComDate = list[0].HInComDate == null ? Convert.ToDateTime("1900/1/1") : list[0].HInComDate.Value;   //进厂日期
                DateTime HDimissionDate = list[0].HDimissionDate == null ? Convert.ToDateTime("1900/1/1") : list[0].HDimissionDate.Value;   //离职日期 (允许NULL)
                bool HOverType = list[0].HOverType;
                string HEmpType = list[0].HEmpType;
                string HOtherDeduct3 = list[0].HOtherDeduct3;
@@ -352,16 +353,16 @@
                string HDimissionReason = list[0].HDimissionReason;
                long HDormID = list[0].HDormID;
                string HArchivesNo = list[0].HArchivesNo;
                DateTime HStayCardEDate = list[0].HStayCardEDate;   //暂住证到期日
                DateTime HStayCardEDate = list[0].HStayCardEDate == null ? Convert.ToDateTime("1900/1/1") : list[0].HStayCardEDate.Value;   //暂住证到期日
                DateTime HCheckCardEDate = Convert.ToDateTime("1900/1/1");  //审检证到期日
                string HJobCardNo = list[0].HJobCardNo ?? "";
                DateTime HJobCardEDate = Convert.ToDateTime("1900/1/1");  //就业证到期日
                string HWorkType = list[0].HWorkType;
                long HContractYear = list[0].HContractYear;
                DateTime HContractBDate = list[0].HContractBDate;  //合同开始日
                DateTime HContractEDate = list[0].HContractEDate;   //合同到期日
                DateTime HContractBDate = list[0].HContractBDate == null ?  Convert.ToDateTime("1900/1/1") : list[0].HContractBDate.Value;  //合同开始日
                DateTime HContractEDate = list[0].HContractEDate == null ? Convert.ToDateTime("1900/1/1") : list[0].HContractEDate.Value;   //合同到期日
                string HInsuranceNo = list[0].HInsuranceNo;
                DateTime HInsuranceDate = list[0].HInsuranceDate;   //参保日期
                DateTime HInsuranceDate = list[0].HInsuranceDate == null ? Convert.ToDateTime("1900/1/1") : list[0].HInsuranceDate.Value;   //参保日期
                bool HInsuranceStatus = list[0].HInsuranceStatus;
                DateTime HSignDate =  Convert.ToDateTime("1900/1/1");  //签约日期
                bool HSignStatus = list[0].HSignStatus;
@@ -372,7 +373,7 @@
                string HSpec = list[0].HSpec ?? "";
                string HCompLev = list[0].HCompLev ?? "";
                string HEngLev = list[0].HEngLev ?? "";
                DateTime HGradDate = list[0].HGradDate;  //毕业日期
                DateTime HGradDate = list[0].HGradDate == null ? Convert.ToDateTime("1900/1/1") : list[0].HGradDate.Value;  //毕业日期
                string HGradSchool = list[0].HGradSchool ?? "";
                string HSalaryLev = list[0].HSalaryLev ?? "";
                long HDutyID = list[0].HDutyID;
@@ -431,6 +432,7 @@
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                //查询数据中是否存在重复代码
                ds = oCN.RunProcReturn("Select HItemID from Gy_Employee  Where HItemID<>" + HItemID + " and HNumber='" + HNumber + "' and HUSEORGID=" + HUSEORGID, "Gy_Warehouse");
@@ -446,7 +448,7 @@
                //保存完毕后处理
                if (HItemID == 0)
                {
                    oCN.BeginTran();
                    oCN.RunProc("Insert into Gy_Employee (" +
                      "HNumber,HName,HShortNumber,HEmpRate,HExamRate" +
                      ",HLevel,HParentID,HEndflag,HHighestPay,HOverPayRate" +
@@ -508,13 +510,13 @@
                    }
                    LogService.Write(sql3);
                    oCN.RunProcReturn(sql3, "Gy_Employee_Post");
                    oCN.Commit();
                }
                else
                {
                    
                    //若MAINDI重复则重新获取
                    oCN.BeginTran();
                    //已审核不允许修改
                    DataSet dss;
                    dss = oCN.RunProcReturn("select * from Gy_Employee where HItemID=" + HItemID, "Gy_Employee");
@@ -624,8 +626,9 @@
                    }
                    LogService.Write(sql3);
                    oCN.RunProcReturn(sql3, "Gy_WorkCenterSub");
                    oCN.Commit();
                }
                oCN.Commit();
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "保存成功!";
@@ -635,7 +638,7 @@
            }
            catch (Exception e)
            {
                //oCN.RollBack();
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.Message;