|
|
@ -19,6 +19,7 @@ import com.engine.organization.util.detach.DetachUtil;
|
|
|
|
import lombok.SneakyThrows;
|
|
|
|
import lombok.SneakyThrows;
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
|
|
import org.docx4j.wml.U;
|
|
|
|
import weaver.conn.RecordSet;
|
|
|
|
import weaver.conn.RecordSet;
|
|
|
|
import weaver.conn.RecordSetTrans;
|
|
|
|
import weaver.conn.RecordSetTrans;
|
|
|
|
import weaver.general.BaseBean;
|
|
|
|
import weaver.general.BaseBean;
|
|
|
@ -271,8 +272,18 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|
|
|
departmentChartPO.setExpand("1");
|
|
|
|
departmentChartPO.setExpand("1");
|
|
|
|
departmentChartPO.setFisvitual(rs.getString("isvitual"));
|
|
|
|
departmentChartPO.setFisvitual(rs.getString("isvitual"));
|
|
|
|
|
|
|
|
|
|
|
|
// 部门负责人
|
|
|
|
|
|
|
|
departmentChartPO.setFleader(getDepartmentLeader(fLeader));
|
|
|
|
//顺胜项目二开 虚拟维度增加建模部门负责人
|
|
|
|
|
|
|
|
if (!isRealDimension){
|
|
|
|
|
|
|
|
ChartDepartmentModeVO chartDepartmentModeVO = selectModeInfo(departmentId);
|
|
|
|
|
|
|
|
departmentChartPO.setFleader(chartDepartmentModeVO.getLeaderName());
|
|
|
|
|
|
|
|
departmentChartPO.setColorCheck(chartDepartmentModeVO.getColorCheck());
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
// 部门负责人
|
|
|
|
|
|
|
|
departmentChartPO.setFleader(getDepartmentLeader(fLeader));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dataList.add(departmentChartPO);
|
|
|
|
dataList.add(departmentChartPO);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1445,6 +1456,11 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|
|
|
chartPO.setFisvitual(recordSet.getString("isvitual"));
|
|
|
|
chartPO.setFisvitual(recordSet.getString("isvitual"));
|
|
|
|
chartPO.setHasChildren(getHasChildren(chartPO.getFtype(), chartPO.getFobjid()).toString());
|
|
|
|
chartPO.setHasChildren(getHasChildren(chartPO.getFtype(), chartPO.getFobjid()).toString());
|
|
|
|
chartPO.setDepartmentDepth(getDepartmentDepth(chartPO, topChartPO));
|
|
|
|
chartPO.setDepartmentDepth(getDepartmentDepth(chartPO, topChartPO));
|
|
|
|
|
|
|
|
//顺胜二开 虚拟维度部门颜色设置
|
|
|
|
|
|
|
|
if (!isRealDimension && "2".equals(chartPO.getFtype())){
|
|
|
|
|
|
|
|
ChartDepartmentModeVO departmentModeVO = selectModeInfo(recordSet.getString("id"));
|
|
|
|
|
|
|
|
chartPO.setColorCheck(departmentModeVO.getColorCheck());
|
|
|
|
|
|
|
|
}
|
|
|
|
// 小于、等于所选层级元素展开
|
|
|
|
// 小于、等于所选层级元素展开
|
|
|
|
chartPO.setExpand(inDepth(selectDepth, chartPO.getDepartmentDepth()) ? "1" : "0");
|
|
|
|
chartPO.setExpand(inDepth(selectDepth, chartPO.getDepartmentDepth()) ? "1" : "0");
|
|
|
|
filterAndAddData(currentList, chartPO, hideDepartment);
|
|
|
|
filterAndAddData(currentList, chartPO, hideDepartment);
|
|
|
@ -1703,7 +1719,29 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
currentList.add(chartPO);
|
|
|
|
currentList.add(chartPO);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 顺胜项目 uf_xnbmfzr
|
|
|
|
|
|
|
|
* @param departmentId
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@SneakyThrows
|
|
|
|
|
|
|
|
private ChartDepartmentModeVO selectModeInfo(String departmentId) {
|
|
|
|
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
|
|
|
|
ResourceComInfo com = new ResourceComInfo();
|
|
|
|
|
|
|
|
int colorCheck = 1;
|
|
|
|
|
|
|
|
String leaderName = null;
|
|
|
|
|
|
|
|
rs.executeQuery("select bmfzrid,bjtp from uf_xnbmfzr where xnzzid = ?",departmentId);
|
|
|
|
|
|
|
|
if (rs.next()){
|
|
|
|
|
|
|
|
colorCheck = Util.getIntValue(rs.getString("bjtp"),1);
|
|
|
|
|
|
|
|
leaderName = com.getLastname(Util.null2String(rs.getString("bmfzrid")));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return ChartDepartmentModeVO.builder()
|
|
|
|
|
|
|
|
.leaderName(leaderName)
|
|
|
|
|
|
|
|
.colorCheck(colorCheck)
|
|
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|