|
|
@ -20,7 +20,30 @@ public class Ghrh_YearHumanSettingsServices : BaseServices<Ghrh_YearHumanSetting |
|
|
|
_commonServices = commonServices; |
|
|
|
_commonServices = commonServices; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 字典映射、全称、单位转换等 |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// 字典映射、全称、单位转换等 |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="view"></param> |
|
|
|
|
|
|
|
private async Task SetLabel(Ghrh_YearHumanSettingsDto data) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (data != null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
data.M1_F = data.M1 + (data.M1_A ?? 0); |
|
|
|
|
|
|
|
data.M2_F = data.M2 + (data.M2_A ?? 0); |
|
|
|
|
|
|
|
data.M3_F = data.M3 + (data.M3_A ?? 0); |
|
|
|
|
|
|
|
data.M4_F = data.M4 + (data.M4_A ?? 0); |
|
|
|
|
|
|
|
data.M5_F = data.M5 + (data.M5_A ?? 0); |
|
|
|
|
|
|
|
data.M6_F = data.M6 + (data.M6_A ?? 0); |
|
|
|
|
|
|
|
data.M7_F = data.M7 + (data.M7_A ?? 0); |
|
|
|
|
|
|
|
data.M8_F = data.M8 + (data.M8_A ?? 0); |
|
|
|
|
|
|
|
data.M9_F = data.M9 + (data.M9_A ?? 0); |
|
|
|
|
|
|
|
data.M10_F = data.M10 + (data.M10_A ?? 0); |
|
|
|
|
|
|
|
data.M11_F = data.M11 + (data.M11_A ?? 0); |
|
|
|
|
|
|
|
data.M12_F = data.M12 + (data.M12_A ?? 0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
public override async Task<long> Add(InsertGhrh_YearHumanSettingsInput entity) |
|
|
|
public override async Task<long> Add(InsertGhrh_YearHumanSettingsInput entity) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -100,21 +123,9 @@ public class Ghrh_YearHumanSettingsServices : BaseServices<Ghrh_YearHumanSetting |
|
|
|
rule.JobName = jobs.FirstOrDefault(o => rule.JobId == o.JobID)?.JobName; |
|
|
|
rule.JobName = jobs.FirstOrDefault(o => rule.JobId == o.JobID)?.JobName; |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
entitys.ForEach(async x => |
|
|
|
entitys.ForEach(data => |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
data.M1_F = data.M1 + (data.M1_A ?? 0); |
|
|
|
await SetLabel(x); |
|
|
|
data.M2_F = data.M2 + (data.M2_A ?? 0); |
|
|
|
|
|
|
|
data.M3_F = data.M3 + (data.M3_A ?? 0); |
|
|
|
|
|
|
|
data.M4_F = data.M4 + (data.M4_A ?? 0); |
|
|
|
|
|
|
|
data.M5_F = data.M5 + (data.M5_A ?? 0); |
|
|
|
|
|
|
|
data.M6_F = data.M6 + (data.M6_A ?? 0); |
|
|
|
|
|
|
|
data.M7_F = data.M7 + (data.M7_A ?? 0); |
|
|
|
|
|
|
|
data.M8_F = data.M8 + (data.M8_A ?? 0); |
|
|
|
|
|
|
|
data.M9_F = data.M9 + (data.M9_A ?? 0); |
|
|
|
|
|
|
|
data.M10_F = data.M10 + (data.M10_A ?? 0); |
|
|
|
|
|
|
|
data.M11_F = data.M11 + (data.M11_A ?? 0); |
|
|
|
|
|
|
|
data.M12_F = data.M12 + (data.M12_A ?? 0); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
result.result.DT_TableDataT1 = entitys; |
|
|
|
result.result.DT_TableDataT1 = entitys; |
|
|
@ -153,23 +164,22 @@ public class Ghrh_YearHumanSettingsServices : BaseServices<Ghrh_YearHumanSetting |
|
|
|
|
|
|
|
|
|
|
|
var data = result.result.DT_TableDataT1[0]; |
|
|
|
var data = result.result.DT_TableDataT1[0]; |
|
|
|
data.StartMonth = config != null ? config.ConfigValue.ObjToInt() : 1; |
|
|
|
data.StartMonth = config != null ? config.ConfigValue.ObjToInt() : 1; |
|
|
|
data.M1_F = data.M1 + (data.M1_A ?? 0); |
|
|
|
|
|
|
|
data.M2_F = data.M2 + (data.M2_A ?? 0); |
|
|
|
await SetLabel(data); |
|
|
|
data.M3_F = data.M3 + (data.M3_A ?? 0); |
|
|
|
|
|
|
|
data.M4_F = data.M4 + (data.M4_A ?? 0); |
|
|
|
|
|
|
|
data.M5_F = data.M5 + (data.M5_A ?? 0); |
|
|
|
|
|
|
|
data.M6_F = data.M6 + (data.M6_A ?? 0); |
|
|
|
|
|
|
|
data.M7_F = data.M7 + (data.M7_A ?? 0); |
|
|
|
|
|
|
|
data.M8_F = data.M8 + (data.M8_A ?? 0); |
|
|
|
|
|
|
|
data.M9_F = data.M9 + (data.M9_A ?? 0); |
|
|
|
|
|
|
|
data.M10_F = data.M10 + (data.M10_A ?? 0); |
|
|
|
|
|
|
|
data.M11_F = data.M11 + (data.M11_A ?? 0); |
|
|
|
|
|
|
|
data.M12_F = data.M12 + (data.M12_A ?? 0); |
|
|
|
|
|
|
|
result.result.DT_TableDataT1[0] = data; |
|
|
|
result.result.DT_TableDataT1[0] = data; |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override async Task<Ghrh_YearHumanSettingsDto> QueryById(object objId) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var entity = await base.QueryById(objId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await SetLabel(entity); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return entity; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public async Task<ServiceResult<List<FlowTableColumn>>> QueryApplyColumn(int curentYear, int langId) |
|
|
|
public async Task<ServiceResult<List<FlowTableColumn>>> QueryApplyColumn(int curentYear, int langId) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int flowId = await Db.Ado.GetIntAsync("Select FlowID from Ghrw_Flow where FlowNo='F_ESS_RecruitYearManpowerApply'"); |
|
|
|
int flowId = await Db.Ado.GetIntAsync("Select FlowID from Ghrw_Flow where FlowNo='F_ESS_RecruitYearManpowerApply'"); |
|
|
|