แก้ไขรายงานให้ใช้งานได้
This commit is contained in:
@@ -285,15 +285,15 @@ namespace TodoAPI2.Models
|
||||
|
||||
public List<external_linkageViewModel> GetPositionForReport()
|
||||
{
|
||||
var sql = string.Format("select {0}mpn{0}.{0}id{0}, {0}mpn{0}.{0}position_number{0}, {0}pos{0}.{0}position_name{0}, {0}he{0}.{0}employee_id{0}, CONCAT(hrm_title.title_name,' ',he.firstname,' ',he.lastname) as full_name, CONCAT(mpn.position_number,' ',pos.position_name) as position from {0}hrm_employees{0} as {0}he{0} left join {0}hrm_title_masters{0} as {0}hrm_title{0} on {0}he{0}.{0}prefix_card_name{0} = {0}hrm_title{0}.{0}id{0} left join {0}mpp_position_numbers{0} as {0}mpn{0} on {0}he{0}.{0}position{0} = {0}mpn{0}.{0}id{0} left join {0}org_position_datas{0} as {0}pos{0} on {0}mpn{0}.{0}position_id{0} = {0}pos{0}.{0}position_id{0} where {0}he{0}.{0}deleted_at{0} is null and {0}hrm_title{0}.{0}deleted_at{0} is null and {0}pos{0}.{0}deleted_at{0} is null and {0}mpn{0}.{0}deleted_at{0} is null", '"'.ToString());
|
||||
var sql = string.Format("select {0}mpn{0}.{0}position_id{0}, CONCAT(mpn.position_number,' ',pos.position_name) as position from {0}hrm_employees{0} as {0}he{0} left join {0}hrm_title_masters{0} as {0}hrm_title{0} on {0}he{0}.{0}prefix_card_name{0} = {0}hrm_title{0}.{0}id{0} left join {0}mpp_position_numbers{0} as {0}mpn{0} on {0}he{0}.{0}position{0} = {0}mpn{0}.{0}id{0} left join {0}org_position_datas{0} as {0}pos{0} on {0}mpn{0}.{0}position_id{0} = {0}pos{0}.{0}position_id{0} where {0}he{0}.{0}deleted_at{0} is null and {0}hrm_title{0}.{0}deleted_at{0} is null and {0}pos{0}.{0}deleted_at{0} is null and {0}mpn{0}.{0}deleted_at{0} is null", '"'.ToString());
|
||||
var para = db.GetParameterListNpgsql();
|
||||
DataTable dt = db.ExecuteDataTableNpgsql(sql, para);
|
||||
var result = new List<external_linkageViewModel>();
|
||||
foreach (DataRow dr in dt.Rows)
|
||||
{
|
||||
var i = new external_linkageViewModel();
|
||||
i.external_id = Convert.ToInt32(dr["id"]);
|
||||
i.external_code = dr["id"].ToString();
|
||||
i.external_id = Convert.ToInt32(dr["position_id"]);
|
||||
i.external_code = dr["position_id"].ToString();
|
||||
i.external_name = dr["position"].ToString();
|
||||
result.Add(i);
|
||||
}
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
"environmentVariables": {
|
||||
"SiteInformation_apisite": "/eva",
|
||||
"DB_USERNAME": "postgres",
|
||||
"JasperReportServer_reportsite": "/tb320hr",
|
||||
"JasperReportServer_reportsite": "/tb320hr_site2",
|
||||
"SiteInformation_modulesite": "http://tb320dev.zd.co.th/menu/evaluation",
|
||||
"DB_NAME": "tb320_hr",
|
||||
"DB_NAME": "tb320_hr_site2",
|
||||
"DB_PORT": "5432",
|
||||
"DB_PASSWORD": "project0*",
|
||||
"JasperReportServer_username": "jasper",
|
||||
|
||||
@@ -236,7 +236,10 @@ public class MyHelper
|
||||
if (propertyInfo.PropertyType.ToString().Contains("Date"))
|
||||
{
|
||||
var d = (DateTime)propertyInfo.GetValue(obj, null);
|
||||
value = d.Year + "-" + d.Month + "-" + d.Day;
|
||||
|
||||
value = (d.Year > 2400 ? d.Year - 543 : d.Year).ToString() + "-"
|
||||
+ (d.Month < 10 ? "0" + d.Month.ToString() : d.Month.ToString()) + "-"
|
||||
+ (d.Day < 10 ? "0" + d.Day.ToString() : d.Day.ToString());
|
||||
}
|
||||
parameter += propertyInfo.Name + "=" + value;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label id='lab_s_rep_family_relation_id' for='s_rep_family_relation_id'>ประเภทความสัมพันธ์</label>
|
||||
<select class="form-control" id="s_rep_family_relation_id" iLabel="ประเภทความสัมพันธ์" iRequire="true" iGroup="s_rep_family" title='ประเภทความสัมพันธ์' placeholder='ประเภทความสัมพันธ์'></select>
|
||||
<select class="form-control" id="s_rep_family_relation_id" iLabel="ประเภทความสัมพันธ์" iRequire="false" iGroup="s_rep_family" title='ประเภทความสัมพันธ์' placeholder='ประเภทความสัมพันธ์'></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user