diff --git a/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/common/service/impl/CommonServiceImpl.java b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/common/service/impl/CommonServiceImpl.java index 0543b96..1a507da 100644 --- a/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/common/service/impl/CommonServiceImpl.java +++ b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/common/service/impl/CommonServiceImpl.java @@ -8,9 +8,12 @@ import com.weaver.ebuilder.datasource.api.query.dto.dw.QueryDto; import com.weaver.ebuilder.datasource.api.query.dto.dw.TableQuery; import com.weaver.ebuilder.datasource.api.service.DataSetService; import com.weaver.seconddev.jcl.common.service.CommonService; +import com.weaver.seconddev.jcl.organization.service.impl.AuthorizedStrengthServiceImpl; import com.weaver.seconddev.jcl.organization.util.CommonUtils; import com.weaver.seconddev.jcl.organization.util.DatabaseUtils; import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -19,7 +22,7 @@ import java.util.Map; import java.util.Set; import java.util.stream.Collectors; -@Slf4j + @Service public class CommonServiceImpl implements CommonService { @@ -28,6 +31,8 @@ public class CommonServiceImpl implements CommonService { @Autowired private DataSetService dsSetService; + private static final Logger log = LoggerFactory.getLogger(CommonServiceImpl.class); + @Override public Map updateCommon(Map param) { @@ -112,7 +117,7 @@ public class CommonServiceImpl implements CommonService { tableQuery.setGroupId(groupId); tableQuery.setName(sourceName); List> dataSets = dsSetService.getDataSets(tableQuery); - log.info("dataSets :[{}]",dataSets); + log.error("dataSets:[{}]",dataSets); if (dataSets.size() > 0){ String tableId = CommonUtils.null2String(dataSets.get(0).get("id")); QueryDto queryDto = new QueryDto(); diff --git a/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/impl/AuthorizedStrengthServiceImpl.java b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/impl/AuthorizedStrengthServiceImpl.java index b01777e..70cb875 100644 --- a/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/impl/AuthorizedStrengthServiceImpl.java +++ b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/impl/AuthorizedStrengthServiceImpl.java @@ -9,6 +9,8 @@ import com.weaver.seconddev.jcl.organization.util.CommonUtils; import com.weaver.seconddev.jcl.organization.util.DatabaseUtils; import com.weaver.seconddev.jcl.organization.util.DateUtil; import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -16,7 +18,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; -@Slf4j + @Service public class AuthorizedStrengthServiceImpl implements AuthorizedStrengthService { @Autowired @@ -24,11 +26,14 @@ public class AuthorizedStrengthServiceImpl implements AuthorizedStrengthService @Autowired private CommonService commonService; + private static final Logger log = LoggerFactory.getLogger(AuthorizedStrengthServiceImpl.class); + @Override public Map getDepartmentAuthorizedStrength(Map params) { - - String sql = "select * from hr_est_cfg where org_id=? and plan_id=? and cfg_year=?"; + log.error("params: [{}]",params); + String sql = "select * from e10_other_business.hr_est_cfg where org_id=? and plan_id=? and cfg_year=?"; List> dataList = databaseUtils.getSqlList(sql, CommonUtils.getParamList(params.get("adjustDepartment"),params.get("developPlan"),params.get("adjustYear"))); + log.error("hrestcfgList: [{}]",dataList); List cfgIds = dataList.stream().map(e->e.get("id").toString()).collect(Collectors.toList()); String currentDate = DateUtil.getCurrentMonth(); //人员编制统计数据 数据源 @@ -44,13 +49,13 @@ public class AuthorizedStrengthServiceImpl implements AuthorizedStrengthService ((List>)e.get("grade")).get(0).get("id").equals(params.get("grade"))).collect(Collectors.toList()); - sql = "select * from hr_est_history where org_id=? and cfg_id in ("+String.join(",",cfgIds)+")"; + sql = "select * from e10_other_business.hr_est_history where org_id=? and cfg_id in ("+String.join(",",cfgIds)+")"; List> historyList = databaseUtils.getSqlList(sql,CommonUtils.getParamList(params.get("adjustDepartment"))); String startDate = params.get("adjustYear")+"-01"; List> deparmentAdjust = Lists.newArrayList(); List> jobAdjust = Lists.newArrayList(); - for (int i=0;i<11;i++){ + for (int i=0;i<=11;i++){ Map dataMap = Maps.newHashMap(); Map dataMap2 = Maps.newHashMap();