First Initial
This commit is contained in:
21
Models/rep_position_salary/Irep_position_salaryService.cs
Normal file
21
Models/rep_position_salary/Irep_position_salaryService.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
using TodoAPI2.Models;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public interface Irep_position_salaryService
|
||||
{
|
||||
rep_position_salaryWithSelectionViewModel GetBlankItem();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
28
Models/rep_position_salary/rep_position_salaryInputModel.cs
Normal file
28
Models/rep_position_salary/rep_position_salaryInputModel.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rep_position_salaryInputModel
|
||||
{
|
||||
|
||||
public Guid? id { get; set; }
|
||||
|
||||
public int? employee_id { get; set; }
|
||||
|
||||
public int? position_id { get; set; }
|
||||
|
||||
public int? org_id { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rep_position_salaryReportRequestModel : rep_position_salarySearchModel
|
||||
{
|
||||
public string filetype { get; set; }
|
||||
|
||||
public string contentType { get { return MyHelper.GetContentType(filetype); } }
|
||||
}
|
||||
}
|
||||
|
||||
27
Models/rep_position_salary/rep_position_salarySearchModel.cs
Normal file
27
Models/rep_position_salary/rep_position_salarySearchModel.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rep_position_salarySearchModel
|
||||
{
|
||||
|
||||
public Guid id { get; set; }
|
||||
|
||||
public int? employee_id { get; set; }
|
||||
|
||||
public int? position_id { get; set; }
|
||||
|
||||
public int? org_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
45
Models/rep_position_salary/rep_position_salaryService.cs
Normal file
45
Models/rep_position_salary/rep_position_salaryService.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using AutoMapper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
using TodoAPI2.Models;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using System.Net;
|
||||
using TTSW.Configure;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Data;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rep_position_salaryService : Irep_position_salaryService
|
||||
{
|
||||
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
private Iexternal_employeeService emp;
|
||||
|
||||
public rep_position_salaryService(IMyDatabase mydb, Iexternal_linkageService inext, Iexternal_employeeService inemp)
|
||||
{
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
emp = inemp;
|
||||
}
|
||||
|
||||
public rep_position_salaryWithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var i = new rep_position_salaryWithSelectionViewModel();
|
||||
i.item_employee_id = (from x in emp.GetListByemployee_type(null,null) select x).ToList();
|
||||
i.item_position_id = (from x in ext.GetPositionForReport() select x).ToList();
|
||||
i.item_org_id = (from x in ext.GetDepartmentDataForReport() select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
28
Models/rep_position_salary/rep_position_salaryViewModel.cs
Normal file
28
Models/rep_position_salary/rep_position_salaryViewModel.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rep_position_salaryViewModel : BaseViewModel2<Guid>
|
||||
{
|
||||
|
||||
public int? employee_id { get; set; }
|
||||
|
||||
public int? position_id { get; set; }
|
||||
|
||||
public int? org_id { get; set; }
|
||||
|
||||
public string employee_id_external_linkage_external_name { get; set; }
|
||||
public string position_id_external_linkage_external_name { get; set; }
|
||||
public string org_id_external_linkage_external_name { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rep_position_salaryWithSelectionViewModel: rep_position_salaryViewModel
|
||||
{
|
||||
public List<external_employeeViewModel> item_employee_id { get; set; }
|
||||
public List<external_linkageViewModel> item_position_id { get; set; }
|
||||
public List<external_linkageViewModel> item_org_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user