34 lines
996 B
C#
34 lines
996 B
C#
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;
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|