报表日期
This commit is contained in:
parent
675e5d7972
commit
0cfbe05c54
|
|
@ -16,6 +16,7 @@
|
|||
<result column="position_setting" property="positionSetting"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="report_name" property="reportName"/>
|
||||
<result column="time_type" property="timeType"/>
|
||||
<result column="salary_end_month" property="salaryEndMonth"/>
|
||||
<result column="salary_start_month" property="salaryStartMonth"/>
|
||||
<result column="second_dimension" property="secondDimension"/>
|
||||
|
|
@ -56,6 +57,7 @@
|
|||
, t.tax_agent_setting
|
||||
, t.tenant_key
|
||||
, t.update_time
|
||||
, t.time_type
|
||||
</sql>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
|
|
@ -123,6 +125,9 @@
|
|||
<if test="reportName != null">
|
||||
AND report_name = #{reportName}
|
||||
</if>
|
||||
<if test="timeType != null">
|
||||
AND time_type = #{timeType}
|
||||
</if>
|
||||
<if test="salaryEndMonth != null">
|
||||
AND salary_end_month = #{salaryEndMonth}
|
||||
</if>
|
||||
|
|
@ -210,6 +215,9 @@
|
|||
<if test="reportName != null">
|
||||
report_name,
|
||||
</if>
|
||||
<if test="timeType != null">
|
||||
time_type,
|
||||
</if>
|
||||
<if test="salaryEndMonth != null">
|
||||
salary_end_month,
|
||||
</if>
|
||||
|
|
@ -284,6 +292,9 @@
|
|||
<if test="reportName != null">
|
||||
#{reportName},
|
||||
</if>
|
||||
<if test="timeType != null">
|
||||
#{timeType},
|
||||
</if>
|
||||
<if test="salaryEndMonth != null">
|
||||
#{salaryEndMonth},
|
||||
</if>
|
||||
|
|
@ -334,6 +345,7 @@
|
|||
position_setting=#{positionSetting},
|
||||
remark=#{remark},
|
||||
report_name=#{reportName},
|
||||
time_type=#{timeType},
|
||||
salary_end_month=#{salaryEndMonth},
|
||||
salary_start_month=#{salaryStartMonth},
|
||||
second_dimension=#{secondDimension},
|
||||
|
|
@ -392,6 +404,9 @@
|
|||
<if test="reportName != null">
|
||||
report_name=#{reportName},
|
||||
</if>
|
||||
<if test="timeType != null">
|
||||
time_type=#{timeType},
|
||||
</if>
|
||||
<if test="salaryEndMonth != null">
|
||||
salary_end_month=#{salaryEndMonth},
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -99,19 +99,39 @@ public class SalaryStatisticsReportBO {
|
|||
* @param po
|
||||
*/
|
||||
public static void poToQueryParam(SalaryStatisticsReportDataQueryParam param, SalaryStatisticsReportPO po) {
|
||||
param.setSalaryStartMonth(SalaryDateUtil.getFormatYearMonth(po.getSalaryStartMonth()));
|
||||
param.setSalaryEndMonth(SalaryDateUtil.getFormatYearMonth(po.getSalaryEndMonth()));
|
||||
String salaryStartMonth = param.getSalaryStartMonth();
|
||||
if (salaryStartMonth == null) {
|
||||
param.setSalaryStartMonth(SalaryDateUtil.getFormatYearMonth(po.getSalaryStartMonth()));
|
||||
} else {
|
||||
param.setSalaryStartMonth(SalaryDateUtil.getFormatYearMonth(SalaryDateUtil.dateStrToLocalDate(salaryStartMonth)));
|
||||
}
|
||||
String salaryEndMonth = param.getSalaryEndMonth();
|
||||
if (salaryEndMonth == null) {
|
||||
param.setSalaryEndMonth(SalaryDateUtil.getFormatYearMonth(po.getSalaryEndMonth()));
|
||||
} else {
|
||||
param.setSalaryEndMonth(SalaryDateUtil.getFormatYearMonth(SalaryDateUtil.dateStrToLocalDate(salaryEndMonth)));
|
||||
}
|
||||
|
||||
String key = "id";
|
||||
param.setTaxAgent(((List<Map>) JSON.parseArray(po.getTaxAgentSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
if (po.getTaxAgentSetting() != null) {
|
||||
param.setTaxAgent(((List<Map>) JSON.parseArray(po.getTaxAgentSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
// param.setIncomeCategory(((List<Map>) JSON.parseArray(po.getIncomeCategorySetting(), Map.class)).stream().map(m -> Integer.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
param.setSubCompany(((List<Map>) JSON.parseArray(po.getSubCompanySetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
param.setDepart(((List<Map>) JSON.parseArray(po.getDepartSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
if (po.getSubCompanySetting() != null) {
|
||||
param.setSubCompany(((List<Map>) JSON.parseArray(po.getSubCompanySetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
if (po.getDepartSetting() != null) {
|
||||
param.setDepart(((List<Map>) JSON.parseArray(po.getDepartSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
// param.setGrade(((List<Map>) JSON.parseArray(po.getGradeSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
// param.setPosition(((List<Map>) JSON.parseArray(po.getPositionSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
// param.setStatus(((List<Map>) JSON.parseArray(po.getStatusSetting(), Map.class)).stream().map(m -> m.get(key).toString()).collect(Collectors.toList()));
|
||||
param.setEmployee(((List<Map>) JSON.parseArray(po.getEmployeeSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
param.setHiredate(JSON.parseArray(po.getHiredateSetting(), Date.class));
|
||||
if (po.getEmployeeSetting() != null) {
|
||||
param.setEmployee(((List<Map>) JSON.parseArray(po.getEmployeeSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
if (po.getHiredateSetting() != null) {
|
||||
param.setHiredate(JSON.parseArray(po.getHiredateSetting(), Date.class));
|
||||
}
|
||||
// param.setLeavedate(JSON.parseArray(po.getLeavedateSetting(), LocalDate.class));
|
||||
}
|
||||
|
||||
|
|
@ -812,6 +832,7 @@ public class SalaryStatisticsReportBO {
|
|||
.map(Map.Entry::getKey)
|
||||
.orElse("");
|
||||
}
|
||||
|
||||
/**
|
||||
* 平铺
|
||||
*
|
||||
|
|
|
|||
|
|
@ -372,9 +372,9 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
|||
public PageInfo<Map<String, Object>> buildReportRecords(SalaryStatisticsDimensionPO dimension, SalaryStatisticsReportDataQueryParam param, List<SalaryStatisticsItemPO> salaryStatisticsItemList) {
|
||||
Map<String, Boolean> checkMap = SalaryStatisticsReportBO.checkLoad(salaryStatisticsItemList);
|
||||
// 如果一个都没有,直接返回
|
||||
if (!checkMap.get("isNow")) {
|
||||
return new PageInfo<Map<String, Object>>();
|
||||
}
|
||||
// if (!checkMap.get("isNow")) {
|
||||
// return new PageInfo<Map<String, Object>>();
|
||||
// }
|
||||
|
||||
|
||||
// 获取本期报表分权后的核算人员
|
||||
|
|
|
|||
|
|
@ -165,6 +165,8 @@ public class SalaryStatisticsReportController {
|
|||
SalaryStatisticsReportDataQueryParam param = SalaryStatisticsReportDataQueryParam.builder()
|
||||
.id(Long.parseLong(request.getParameter("id")))
|
||||
.dimensionId(Long.parseLong(request.getParameter("dimensionId")))
|
||||
.salaryStartMonth(request.getParameter("salaryStartMonth"))
|
||||
.salaryEndMonth(request.getParameter("salaryEndMonth"))
|
||||
.isShare(StringUtils.equals(request.getParameter("isShare"), "true"))
|
||||
.build();
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -130,7 +130,9 @@ public class SalaryStatisticsReportWrapper extends Service {
|
|||
Map<String, Object> temp = new HashMap<>();
|
||||
temp.put("id", po.getId().toString());
|
||||
temp.put("reportName", po.getReportName());
|
||||
temp.put("timeType", po.getTimeType() == null ? "10" : po.getTimeType().toString());
|
||||
temp.put("timeType", po.getTimeType() == null ? 10 : po.getTimeType());
|
||||
temp.put("salaryStartMonth", SalaryDateUtil.getFormatYearMonth(po.getSalaryStartMonth()));
|
||||
temp.put("salaryEndMonth", SalaryDateUtil.getFormatYearMonth(po.getSalaryEndMonth()));
|
||||
List<String> dimNames = Arrays.stream(po.getDimension().split(",")).map(dim -> Optional.ofNullable(salaryStatisticsDimensionMap.get(dim)).orElse("")).collect(Collectors.toList());
|
||||
temp.put("dimension", StringUtils.join(dimNames, ","));
|
||||
temp.put("dimensionId", po.getDimension());
|
||||
|
|
@ -238,7 +240,7 @@ public class SalaryStatisticsReportWrapper extends Service {
|
|||
SalaryAssert.notNull(po, SalaryI18nUtil.getI18nLabel(152563, "报表不存在"));
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("timeType", po.getTimeType() == null ? 10 : po.getTimeType().toString());
|
||||
data.put("timeType", po.getTimeType() == null ? 10 : po.getTimeType());
|
||||
data.put("salaryStartMonth", SalaryDateUtil.getFormatYearMonth(po.getSalaryStartMonth()));
|
||||
data.put("salaryEndMonth", SalaryDateUtil.getFormatYearMonth(po.getSalaryEndMonth()));
|
||||
data.put("taxAgent", JSONArray.parseArray(po.getTaxAgentSetting()));
|
||||
|
|
|
|||
Loading…
Reference in New Issue