Merge pull request '组织架构图' (#218) from feature/cl into develop
Reviewed-on: http://221.226.25.34:3000/liang.cheng/weaver-hrm-organization/pulls/218
This commit is contained in:
commit
d1ec88779a
|
|
@ -538,8 +538,8 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
rs.executeQuery("select id,data_id,super_id,type,on_job_num,staff_num,creator,create_time,update_time from jcl_org_onjob");
|
||||
while (rs.next()) {
|
||||
Integer type = Util.getIntValue(rs.getString("type"));
|
||||
String dataIdName = "";
|
||||
String superIdName = "";
|
||||
String dataIdName;
|
||||
String superIdName;
|
||||
if (ModuleTypeEnum.subcompanyfielddefined.getValue().equals(type)) {
|
||||
dataIdName = subCompanyComInfo.getSubCompanyname(Util.null2String((rs.getString("data_id"))));
|
||||
superIdName = subCompanyComInfo.getSubCompanyname(Util.null2String((rs.getString("super_id"))));
|
||||
|
|
@ -613,6 +613,7 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
|
||||
rst.commit();
|
||||
}catch (Exception e) {
|
||||
result.put("errorMsg",e.getMessage());
|
||||
rst.rollback();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
package weaver.interfaces.organization.cronjob;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.entity.chart.params.StatisticsParam;
|
||||
import com.engine.organization.service.ChartService;
|
||||
import com.engine.organization.service.impl.ChartServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.hrm.User;
|
||||
import weaver.interfaces.schedule.BaseCronJob;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/9/14 9:20 AM
|
||||
* @Description: 人数统计
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class StatisticsPersonCron extends BaseCronJob {
|
||||
|
||||
private ChartService getChartService(User user) {
|
||||
return ServiceUtil.getService(ChartServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
Integer value = StringUtils.isNotBlank(companyId) ? Integer.parseInt(companyId) : null;
|
||||
StatisticsParam build = StatisticsParam.builder().companyId(value).build();
|
||||
User user = new User();
|
||||
user.setUid(1);
|
||||
getChartService(user).recordStatistics(build);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue