ComplianceServer/oldcode/WX.CRM.DataSynFactory/Cmd/Server_WorkAliasResRpt_IMP.cs

34 lines
996 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Dapper;
using System;
using WX.CRM.Common;
using WX.CRM.DataSynFactory.Dao;
using WX.CRM.DataSynFactory.Templates;
namespace WX.CRM.DataSynFactory.Cmd
{
public class Server_WorkAliasResRpt_IMP : Interfaces.IDataImportSvr<Server_WorkAliasResRpt>
{
public bool GenerateBusinessOne(Server_WorkAliasResRpt t)
{
try
{
using (var db = ZxdStore.GetConnection())
{
var sql = @"
INSERT INTO wx_workalias_resdayrpt (alias,rptdate,username,rescount,utime,deptcode)
values(@alias,@rptdate,@username,@rescount,now(),@deptcode)
on duplicate key update username =@username,rescount=@rescount,utime=now(); ";
db.Execute(sql, t);
}
return true;
}
catch (Exception ex)
{
LogHelper.Error("Server_WorkAliasResRpt_IMP" + ex.ToString());
return false;
}
}
}
}