| | |
| | | } |
| | | } |
| | | |
| | | #region 职员 金蝶同步 |
| | | [Route("Gy_Employee/SaveGy_EmployeeListApi")] |
| | | [HttpPost] |
| | | public object SaveGy_EmployeeListApi([FromBody] JObject msg) |
| | | { |
| | | try |
| | | { |
| | | var _value = msg["model"].ToString(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ListModels oListModels = new ListModels(); |
| | | List<Model.ClsGy_Employee_Model> lsmain = new List<Model.ClsGy_Employee_Model>(); |
| | | lsmain = oListModels.getObjectByJson_Gy_Employee(_value); |
| | | string sql = string.Empty; |
| | | //保存 |
| | | oCN.BeginTran(); |
| | | sql = $"delete Gy_Employee where HItemID = {lsmain[0].HItemID}"; |
| | | oCN.RunProc(sql); |
| | | sql = "set identity_insert Gy_Employee on"; |
| | | oCN.RunProc(sql); |
| | | |
| | | oCN.RunProc($@"insert into Gy_Employee(HItemID,HNumber, HName, HShortNumber, HEmpRate, HExamRate |
| | | ,HLevel,HParentID,HEndflag,HHighestPay,HOverPayRate |
| | | ,HStopflag,HRemark,HHelpCode,HInsuranceSubsidy |
| | | ,HBirthday,HGradDate,HInsuranceDate,HContractBDate,HContractEDate |
| | | ,HJobCardEDate,HCheckCardEDate,HStayCardEDate,HHealthCardEDate |
| | | ,HAge,HSalaryLev,HContractYear,HInsuranceStatus,HSignStatus |
| | | ,HSex,HMarr,HBlighty,HNation,HBlightyType |
| | | ,HGovStatus,HBloodType,HStature,HAvoird,HKnowLev |
| | | ,HProTitleID,HGradSchool,HEngLev,HCompLev,HSpec |
| | | ,HEmail,HNowAdd,HHomeAdd,HIDCard,HLinkPhone,HMobilePhone,HFax |
| | | ,HOldCompany,HInsuranceNo,HJobCardNo,HArchivesNo,HWorkType,HDimissionReason |
| | | ,HDimissionDate,HInComDate,HSignDate,HRelDate |
| | | ,HPostID,HDormID,HDutyID,HLeftMoneyRate |
| | | ,HEmpType,HPayType,HOverType,HNoBrushFlag,HShiftFlag,HStopwagesFlag |
| | | ,HPostalCode,HBank,HBasePay,HExamLevPostMoney,HBSTDeptID |
| | | ,HOtherDeduct3,HInsurance,HMedicare,HDrydock |
| | | ,HBankAccount,HGroupID,HDeptID,HWorkTypeID,HCTPrjID,HUSEORGID,HAddress) |
| | | values({lsmain[0].HItemID},'{lsmain[0].HNumber}','{lsmain[0].HName}','{lsmain[0].HShortNumber}',{lsmain[0].HEmpRate},{lsmain[0].HExamRate},{lsmain[0].HLevel},{lsmain[0].HParentID},{Convert.ToString(lsmain[0].HEndFlag ? 1 : 0)},{lsmain[0].HHighestPay},{lsmain[0].HOverPayRate},{Convert.ToString(lsmain[0].HStopflag ? 1 : 0) },'{lsmain[0].HRemark}','{lsmain[0].HHelpCode}',{lsmain[0].HInsuranceSubsidy},'{lsmain[0].HBirthDay}','{lsmain[0].HGradDate}','{lsmain[0].HInsuranceDate}','{lsmain[0].HContractBDate}','{lsmain[0].HContractEDate}','{lsmain[0].HJobCardEDate}','{lsmain[0].HCheckCardEDate}','{lsmain[0].HStayCardEDate}','{lsmain[0].HHealthCardEDate}',{lsmain[0].HAge},'{lsmain[0].HSalaryLev}',{lsmain[0].HContractYear},{lsmain[0].HInsuranceStatus},{lsmain[0].HSignStatus},'{lsmain[0].HSex}','{lsmain[0].HMarr}','{lsmain[0].HBlighty}','{lsmain[0].HNation}','{lsmain[0].HBlightyType}','{lsmain[0].HGovStatus}','{lsmain[0].HBloodType}','{lsmain[0].HStature}','{lsmain[0].HAvoird}','{lsmain[0].HKnowLev}','{lsmain[0].HProTitleID}','{lsmain[0].HGradSchool}','{lsmain[0].HEngLev}','{lsmain[0].HCompLev}','{lsmain[0].HSpec}','{lsmain[0].HEmail}','{lsmain[0].HNowAdd}','{lsmain[0].HHomeAdd}','{lsmain[0].HIDCard}','{lsmain[0].HLinkPhone}','{lsmain[0].HMobilePhone}','{lsmain[0].HFax}','{lsmain[0].HOldCompany}','{lsmain[0].HInsuranceNo}','{lsmain[0].HJobCardNo}','{lsmain[0].HArchivesNo}','{lsmain[0].HWorkType}','{lsmain[0].HDimissionReason}','{lsmain[0].HDimissionDate}','{lsmain[0].HInComDate}','{lsmain[0].HSignDate}','{lsmain[0].HRelDate}',{lsmain[0].HPostID},{lsmain[0].HDormID},{lsmain[0].HDutyID},{lsmain[0].HLeftMoneyRate},'{lsmain[0].HEmpType}','{lsmain[0].HPayType}','{lsmain[0].HOverType}',{lsmain[0].HNoBrushFlag},{lsmain[0].HShiftFlag},{lsmain[0].HStopwagesFlag},'{lsmain[0].HPostalCode}','{lsmain[0].HBank}',{lsmain[0].HBasePay},{lsmain[0].HExamLevPostMoney},{lsmain[0].HBSTDeptID},{lsmain[0].HOtherDeduct3},{lsmain[0].HInsurance},{lsmain[0].HMedicare},{lsmain[0].HDrydock},'{lsmain[0].HBankAccount}',{lsmain[0].HGroupID},{lsmain[0].HDeptID},{lsmain[0].HWorkTypeID},{lsmain[0].HCTPrjID},{lsmain[0].HUSEORGID},'{lsmain[0].HAddress}')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //修改上级为非末级代码 |
| | | sql = "set identity_insert Gy_Employee off"; |
| | | oCN.RunProc(sql); |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存成功!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |