|
@@ -15,6 +15,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.google.common.collect.ImmutableMap;
|
|
import com.google.common.collect.ImmutableMap;
|
|
import com.kcim.common.constants.NumberConstant;
|
|
import com.kcim.common.constants.NumberConstant;
|
|
|
|
+import com.kcim.common.constants.ParameterConstant;
|
|
import com.kcim.common.constants.SQLParameter;
|
|
import com.kcim.common.constants.SQLParameter;
|
|
import com.kcim.common.enums.CustomSqlTypeEnum;
|
|
import com.kcim.common.enums.CustomSqlTypeEnum;
|
|
import com.kcim.common.enums.DateStyleEnum;
|
|
import com.kcim.common.enums.DateStyleEnum;
|
|
@@ -2240,7 +2241,14 @@ public class CostDepartmentProfitServiceImpl extends ServiceImpl<CostDepartmentP
|
|
if (!CollectionUtils.isEmpty(responsibilities)) {
|
|
if (!CollectionUtils.isEmpty(responsibilities)) {
|
|
commonResponsibilityReportVo.setChild(getChildTitle(responsibilities, responsibilityGroup));
|
|
commonResponsibilityReportVo.setChild(getChildTitle(responsibilities, responsibilityGroup));
|
|
} else {
|
|
} else {
|
|
- commonResponsibilityReportVo.setChild(setDefalutChildList(responsibility));
|
|
|
|
|
|
+ //要显示占比时自动生成默认金额占比层
|
|
|
|
+ if(IsShowPercent()){
|
|
|
|
+ commonResponsibilityReportVo.setChild(setDefalutChildList(responsibility));
|
|
|
|
+ }else{
|
|
|
|
+ //不显示占比时,直接责任中心作为金额层
|
|
|
|
+ commonResponsibilityReportVo.setResponsibilityCode(commonResponsibilityReportVo.getResponsibilityCode() + AMOUNT_FIELD);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
list.add(commonResponsibilityReportVo);
|
|
list.add(commonResponsibilityReportVo);
|
|
}
|
|
}
|
|
@@ -2570,6 +2578,15 @@ public class CostDepartmentProfitServiceImpl extends ServiceImpl<CostDepartmentP
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 是否显示占比
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public boolean IsShowPercent(){
|
|
|
|
+ String parameterValue = centerService.getParameterValue(ParameterConstant.SHOW_PERCENT);
|
|
|
|
+ return NumberConstant.ONE_S.equals(parameterValue);
|
|
|
|
+ }
|
|
|
|
+
|
|
private List<CommonResponsibilityReportVo> getChildTitle(List<Responsibility> responsibilities, Map<Long, List<Responsibility>> responsibilityGroup) {
|
|
private List<CommonResponsibilityReportVo> getChildTitle(List<Responsibility> responsibilities, Map<Long, List<Responsibility>> responsibilityGroup) {
|
|
List<CommonResponsibilityReportVo> list = new ArrayList<>();
|
|
List<CommonResponsibilityReportVo> list = new ArrayList<>();
|
|
for (Responsibility responsibility : responsibilities) {
|
|
for (Responsibility responsibility : responsibilities) {
|
|
@@ -2581,8 +2598,15 @@ public class CostDepartmentProfitServiceImpl extends ServiceImpl<CostDepartmentP
|
|
if (!CollectionUtils.isEmpty(responsibilityChild)) {
|
|
if (!CollectionUtils.isEmpty(responsibilityChild)) {
|
|
commonResponsibilityReportVo.setChild(getChildTitle(responsibilityChild, responsibilityGroup));
|
|
commonResponsibilityReportVo.setChild(getChildTitle(responsibilityChild, responsibilityGroup));
|
|
} else {
|
|
} else {
|
|
- //添加金额占比
|
|
|
|
- commonResponsibilityReportVo.setChild(setDefalutChildList(responsibility));
|
|
|
|
|
|
+// //添加金额占比
|
|
|
|
+// commonResponsibilityReportVo.setChild(setDefalutChildList(responsibility));
|
|
|
|
+ //要显示占比时自动生成默认金额占比层
|
|
|
|
+ if(IsShowPercent()){
|
|
|
|
+ commonResponsibilityReportVo.setChild(setDefalutChildList(responsibility));
|
|
|
|
+ }else{
|
|
|
|
+ //不显示占比时,直接责任中心作为金额层
|
|
|
|
+ commonResponsibilityReportVo.setResponsibilityCode(commonResponsibilityReportVo.getResponsibilityCode() + AMOUNT_FIELD);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
list.add(commonResponsibilityReportVo);
|
|
list.add(commonResponsibilityReportVo);
|
|
}
|
|
}
|