数据库变更CNPC_XJYJ
This commit is contained in:
@@ -13,7 +13,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class PersonInOutService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -128,7 +128,7 @@ namespace BLL
|
||||
/// <param name="changeTime"></param>
|
||||
public static void AddPersonInOut(Model.SitePerson_PersonInOut personInOut)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.SitePerson_PersonInOut newPersonInOut = new Model.SitePerson_PersonInOut
|
||||
{
|
||||
@@ -194,7 +194,7 @@ namespace BLL
|
||||
public static void AddPersonInOut(List<Model.SitePerson_PersonInOut> personInOuts)
|
||||
{
|
||||
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
|
||||
db.SitePerson_PersonInOut.InsertAllOnSubmit(personInOuts);
|
||||
@@ -225,7 +225,7 @@ namespace BLL
|
||||
/// <param name="PersonInOut"></param>
|
||||
public static void InsertPersonInOutNowNow(Model.SitePerson_PersonInOut PersonInOut)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string proCode = ProjectService.GetContractNoByProjectId(PersonInOut.ProjectId);
|
||||
var getRealNameP = db.RealName_Project.FirstOrDefault(x => x.ProCode == proCode);
|
||||
@@ -285,7 +285,7 @@ namespace BLL
|
||||
/// <param name="PersonInOut"></param>
|
||||
public static void InsertPersonInOutNowNow(Model.SitePerson_PersonInOutNow PersonInOut)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getNow = db.SitePerson_PersonInOutNow.FirstOrDefault(x => x.PersonInOutId == PersonInOut.PersonInOutId);
|
||||
if (getNow == null)
|
||||
@@ -349,7 +349,7 @@ namespace BLL
|
||||
/// <param name="person">人员实体</param>
|
||||
public static void UpdatePersonInfo(Model.SitePerson_PersonInOut personInOut)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var getPersonInOut = db.SitePerson_PersonInOut.FirstOrDefault(x => x.PersonInOutId == personInOut.PersonInOutId);
|
||||
if (getPersonInOut != null)
|
||||
{
|
||||
@@ -410,7 +410,7 @@ namespace BLL
|
||||
/// <param name="personId"></param>
|
||||
public static void DeletePersonInOutByPersonId(string personId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var personInOut = from x in db.SitePerson_PersonInOut where x.PersonId == personId select x;
|
||||
if (personInOut.Count() > 0)
|
||||
{
|
||||
@@ -424,7 +424,7 @@ namespace BLL
|
||||
/// <param name="personId"></param>
|
||||
public static void DeletePersonInOutById(string id)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var realName = db.RealName_PersonInOutNow.FirstOrDefault(x => x.PersonInOutId == id);
|
||||
if (realName != null)
|
||||
@@ -453,7 +453,7 @@ namespace BLL
|
||||
/// <param name="personId"></param>
|
||||
public static void UpdateRealNameInOut(string personId, string oldCardNo, string newIdCardNo)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var personInOuts = from x in db.RealName_PersonInOutNow
|
||||
where x.PersonId == personId && x.IdcardNumber == oldCardNo
|
||||
select x;
|
||||
@@ -473,7 +473,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.WorkPostStatisticItem> getWorkPostStatistic(List<Model.SitePerson_PersonInOut> getAllPersonInOutList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
List<Model.WorkPostStatisticItem> reports = new List<Model.WorkPostStatisticItem>();
|
||||
|
||||
var getUnitIdList = getAllPersonInOutList.Select(x => x.UnitId).Distinct();
|
||||
|
||||
Reference in New Issue
Block a user