bug修复

pull/101/head
Mlin 3 years ago
parent 241bf47710
commit 8cda66dc8b

@ -1,7 +1,6 @@
package com.engine.organization.service.impl; package com.engine.organization.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.engine.common.entity.HrmSubCompanyEntity;
import com.engine.core.impl.Service; import com.engine.core.impl.Service;
import com.engine.organization.entity.hrmresource.po.HrmResourcePO; import com.engine.organization.entity.hrmresource.po.HrmResourcePO;
import com.engine.organization.entity.map.JclOrgMap; import com.engine.organization.entity.map.JclOrgMap;
@ -64,8 +63,6 @@ public class VersionManageServiceImpl extends Service implements VersionManageSe
saveHrmToVersion(paramMap, user); saveHrmToVersion(paramMap, user);
saveHrmToMap(paramMap); saveHrmToMap(paramMap);
break; break;
default:
break;
} }
} }
@ -92,9 +89,8 @@ public class VersionManageServiceImpl extends Service implements VersionManageSe
map.put("value", String.format("%.1f", hrmSubCompanyVersion.getVersion())); map.put("value", String.format("%.1f", hrmSubCompanyVersion.getVersion()));
versions.add(map); versions.add(map);
} }
if (StringUtils.isBlank(version)) { if (version.equals("1.0")) {
size = size > 1 ? size - 1 : size; version = "1";
version = String.format("%.1f", list.get(size - 1).getVersion());
} }
list = getCompanyVersionMapper().getSubComVersionList(id, version); list = getCompanyVersionMapper().getSubComVersionList(id, version);
for (HrmSubCompanyVersion hrmSubCompanyVersion : list) { for (HrmSubCompanyVersion hrmSubCompanyVersion : list) {
@ -120,9 +116,8 @@ public class VersionManageServiceImpl extends Service implements VersionManageSe
map.put("value", String.format("%.1f", hrmDepartmentVersion.getVersion())); map.put("value", String.format("%.1f", hrmDepartmentVersion.getVersion()));
versions.add(map); versions.add(map);
} }
if (StringUtils.isBlank(version)) { if (version.equals("1.0")) {
deptSize = deptSize > 1 ? deptSize - 1 : deptSize; version = "1";
version = String.format("%.1f", deptVersionList.get(deptSize).getVersion());
} }
deptVersionList = getCompanyVersionMapper().getDeptVersionList(id, version); deptVersionList = getCompanyVersionMapper().getDeptVersionList(id, version);
for (HrmDepartmentVersion hrmDepartmentVersion : deptVersionList) { for (HrmDepartmentVersion hrmDepartmentVersion : deptVersionList) {
@ -151,9 +146,8 @@ public class VersionManageServiceImpl extends Service implements VersionManageSe
map.put("value", String.format("%.1f", hrmResourceVersion.getVersion())); map.put("value", String.format("%.1f", hrmResourceVersion.getVersion()));
versions.add(map); versions.add(map);
} }
if (StringUtils.isBlank(version)) { if (version.equals("1.0")) {
deptSize = resSize > 1 ? resSize - 1 : resSize; version = "1";
version = String.format("%.1f", resVersionList.get(deptSize).getVersion());
} }
resVersionList = getCompanyVersionMapper().getResourceVersionList(id, version); resVersionList = getCompanyVersionMapper().getResourceVersionList(id, version);
for (HrmResourceVersion hrmResourceVersion : resVersionList) { for (HrmResourceVersion hrmResourceVersion : resVersionList) {
@ -197,7 +191,7 @@ public class VersionManageServiceImpl extends Service implements VersionManageSe
jclOrgMap.setFDateBegin(new Date(OrganizationDateUtil.stringToDate(currentDate).getTime())); jclOrgMap.setFDateBegin(new Date(OrganizationDateUtil.stringToDate(currentDate).getTime()));
jclOrgMap.setFDateEnd(new Date(OrganizationDateUtil.stringToDate("2022-12-31").getTime())); jclOrgMap.setFDateEnd(new Date(OrganizationDateUtil.stringToDate("2022-12-31").getTime()));
JclOrgMap jclOrgMapByFParentId = getJclOrgMapMapper().getSumPlanAndJobByFParentId(jclOrgMap.getFDateBegin(), String.valueOf(jclOrgMap.getId())); JclOrgMap jclOrgMapByFParentId = getJclOrgMapMapper().getSumPlanAndJobByFParentId(jclOrgMap.getFDateBegin(), Util.null2String(jclOrgMap.getId()));
if (jclOrgMapByFParentId != null) { if (jclOrgMapByFParentId != null) {
jclOrgMap.setFPlan(jclOrgMapByFParentId.getFPlan()); jclOrgMap.setFPlan(jclOrgMapByFParentId.getFPlan());
jclOrgMap.setFOnJob(jclOrgMapByFParentId.getFOnJob()); jclOrgMap.setFOnJob(jclOrgMapByFParentId.getFOnJob());

Loading…
Cancel
Save