Merge pull request 'develop' (#294) from develop into master

Reviewed-on: #294
liang.cheng 3 months ago
commit ea1028049b

@ -25,6 +25,7 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.company.SubCompanyComInfo;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -77,13 +78,14 @@ public class JobBrowserService extends BrowserService {
Map<String, Object> apidatas = new HashMap<>(); Map<String, Object> apidatas = new HashMap<>();
String q = Util.null2String(httpServletRequest.getParameter("q")); String q = Util.null2String(httpServletRequest.getParameter("q"));
List<String> sqlParams = new ArrayList<>(); List<String> sqlParams = new ArrayList<>();
SubCompanyComInfo subInfo = new SubCompanyComInfo();
String keyword = ""; String keyword = "";
if (q.length() > 0) { if (q.length() > 0) {
keyword = "%" + q + "%"; keyword = "%" + q + "%";
} }
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
String sqlwhere = " where t.delete_type = 0 "; String sqlwhere = " where t.delete_type = 0 ";
String backfields = "t.id, t.job_no, h.jobtitlename as name "; String backfields = "t.id,t.ec_company, t.job_no, h.jobtitlename as name ";
String fromSql = "FROM jcl_org_job t left join hrmjobtitles h on t.ec_jobTitle = h.id "; String fromSql = "FROM jcl_org_job t left join hrmjobtitles h on t.ec_jobTitle = h.id ";
String orderby = " order by t.id "; String orderby = " order by t.id ";
sqlwhere += " "; sqlwhere += " ";
@ -104,7 +106,8 @@ public class JobBrowserService extends BrowserService {
Map<String, String> item = new HashMap<>(3); Map<String, String> item = new HashMap<>(3);
item.put("id", Util.null2String(rs.getString("id"))); item.put("id", Util.null2String(rs.getString("id")));
String name = Util.null2String(rs.getString("name")); String name = Util.null2String(rs.getString("name"));
item.put("name", name); String subCompanyname = subInfo.getSubCompanyname(Util.null2String(rs.getString("ec_company")));
item.put("name", name+"("+subCompanyname+")");
item.put("title", name); item.put("title", name);
datas.add(item); datas.add(item);
} }

@ -10,6 +10,7 @@ import com.engine.organization.mapper.department.DepartmentMapper;
import com.engine.organization.util.db.MapperProxyFactory; import com.engine.organization.util.db.MapperProxyFactory;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import weaver.file.ImageFileManager;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.company.DepartmentComInfo; import weaver.hrm.company.DepartmentComInfo;
import weaver.hrm.company.SubCompanyComInfo; import weaver.hrm.company.SubCompanyComInfo;
@ -38,8 +39,10 @@ public class DepartmentBO {
} }
public static void setDeptLeader(List<DepartmentListDTO> departments) { public static void setDeptLeader(List<DepartmentListDTO> departments) {
for (DepartmentListDTO dept : departments) { for (DepartmentListDTO dept : departments) {
dept.setBmfzr(getEmployeeNameById(dept.getId())); dept.setBmfzr(getEmployeeNameById(dept.getId()));
List<DepartmentListDTO> children = dept.getChildren(); List<DepartmentListDTO> children = dept.getChildren();
if (CollectionUtils.isNotEmpty(children)){ if (CollectionUtils.isNotEmpty(children)){
setDeptLeader(children); setDeptLeader(children);
@ -171,7 +174,7 @@ public class DepartmentBO {
tree.setPid(null == item.getSupDepId() ? "0" : item.getSupDepId().toString()); tree.setPid(null == item.getSupDepId() ? "0" : item.getSupDepId().toString());
tree.setSelected(false); tree.setSelected(false);
tree.setType("2"); tree.setType("2");
tree.setParentComp(null == item.getSupDepId() ? "0" : item.getSubCompanyId1().toString()); tree.setParentComp(null == item.getSubCompanyId1() ? "0" : item.getSubCompanyId1().toString());
tree.setOrderNum(null == item.getShowOrder() ? 0.00 : item.getShowOrder().intValue()); tree.setOrderNum(null == item.getShowOrder() ? 0.00 : item.getShowOrder().intValue());
tree.setShowOrderOfTree(null == item.getShowOrderOfTree() ? 0.00 : item.getShowOrderOfTree()); tree.setShowOrderOfTree(null == item.getShowOrderOfTree() ? 0.00 : item.getShowOrderOfTree());
return tree; return tree;
@ -227,5 +230,11 @@ public class DepartmentBO {
} }
} }
/**
*
*/
private Map<String,String> getImageFileName(Integer depetId){
return null;
}
} }

@ -36,7 +36,7 @@ public class DepartmentListDTO {
/** /**
* *
*/ */
@TableTitle(labelId = 547141, title = "名称", dataIndex = "departmentMark", key = "departmentMark", width = "200") @TableTitle(labelId = 547181, title = "简称", dataIndex = "departmentMark", key = "departmentMark", width = "200")
private String departmentMark; private String departmentMark;
/** /**
@ -48,7 +48,7 @@ public class DepartmentListDTO {
/** /**
* *
*/ */
@TableTitle(labelId = 547181, title = "简称", dataIndex = "departmentName", key = "departmentName") @TableTitle(labelId = 547141, title = "名称", dataIndex = "departmentName", key = "departmentName")
private String departmentName; private String departmentName;
/** /**
@ -84,6 +84,16 @@ public class DepartmentListDTO {
*/ */
@TableTitle(labelId = 547186, title = "启用", dataIndex = "canceled", key = "canceled") @TableTitle(labelId = 547186, title = "启用", dataIndex = "canceled", key = "canceled")
private int canceled; private int canceled;
/**
*
*/
@TableTitle(labelId = 17616, title = "附件上传", dataIndex = "imageFileName", key = "imageFileName")
private String imageFileName;
private String fileUrl;
/** /**
* *
*/ */

@ -100,7 +100,7 @@ public interface ChartService {
* @param: [] * @param: []
* @return: java.util.Map<java.lang.Integer,com.engine.organization.entity.chart.HrmLabelVO> * @return: java.util.Map<java.lang.Integer,com.engine.organization.entity.chart.HrmLabelVO>
*/ */
Map<Integer, HrmLabelVO> selectLabel(); Map<String, HrmLabelVO> selectLabel();
/** /**
* @Description: * @Description:

@ -715,9 +715,9 @@ public class ChartServiceImpl extends Service implements ChartService {
} }
@Override @Override
public Map<Integer, HrmLabelVO> selectLabel() { public Map<String, HrmLabelVO> selectLabel() {
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
Map<Integer, HrmLabelVO> labelData = new HashMap<>(); Map<String, HrmLabelVO> labelData = new HashMap<>();
//labelId集合 //labelId集合
List<Integer> labelIds = Arrays.asList(547190,547194,547196,547262,547282,547283,547284,547285,547286,547287,547292,547293,547294,547296,547298,547299,547300,547301,547302,547303,547304,547305,547307,547310,547313,547314,547315,547316,547317, List<Integer> labelIds = Arrays.asList(547190,547194,547196,547262,547282,547283,547284,547285,547286,547287,547292,547293,547294,547296,547298,547299,547300,547301,547302,547303,547304,547305,547307,547310,547313,547314,547315,547316,547317,
547318,547319,547320,547321,547322,547323,547324,547326,547327,547328,547329,547330,547331,547332,547333,547334,547345,547346,547447,547448,547468,547473,547475,547476,547477,547478,547478,547264,547265,547463,547464,547465, 547318,547319,547320,547321,547322,547323,547324,547326,547327,547328,547329,547330,547331,547332,547333,547334,547345,547346,547447,547448,547468,547473,547475,547476,547477,547478,547478,547264,547265,547463,547464,547465,
@ -726,7 +726,7 @@ public class ChartServiceImpl extends Service implements ChartService {
labelIds.forEach(item -> { labelIds.forEach(item -> {
rs.executeQuery("select labelName from HtmlLabelInfo where indexid = ? and languageid = ?",item,user.getLanguage()); rs.executeQuery("select labelName from HtmlLabelInfo where indexid = ? and languageid = ?",item,user.getLanguage());
if (rs.next()){ if (rs.next()){
labelData.put(item,HrmLabelVO.builder().labelName(Util.null2String(rs.getString("labelName"))).build()); labelData.put(Util.null2String(item),HrmLabelVO.builder().labelName(Util.null2String(rs.getString("labelName"))).build());
} }
}); });

@ -48,7 +48,7 @@ public class ConfigServiceImpl extends Service implements ConfigService {
public String ssoLogin(QTXConfigParam qtx) throws UnsupportedEncodingException { public String ssoLogin(QTXConfigParam qtx) throws UnsupportedEncodingException {
String hkUrl; String hkUrl;
BaseBean bb = new BaseBean(); BaseBean bb = new BaseBean();
String enable = bb.getPropValue("qtx_sso_login", "enable"); String enable = bb.getPropValue("hrmOrganization", "enable");
String userAgent = qtx.getUserAgent(); String userAgent = qtx.getUserAgent();
boolean termianal = MobileTerminalEnum.containsEnumValue(userAgent); boolean termianal = MobileTerminalEnum.containsEnumValue(userAgent);
if (VALUE_ONE.equals(enable)) { if (VALUE_ONE.equals(enable)) {
@ -83,7 +83,7 @@ public class ConfigServiceImpl extends Service implements ConfigService {
if (Objects.nonNull(qtxConfigPO)) { if (Objects.nonNull(qtxConfigPO)) {
BeanUtils.copyProperties(datas, qtxConfigPO); BeanUtils.copyProperties(datas, qtxConfigPO);
} }
map.put("isopenconfig",bb.getPropValue("qtx_sso_login","enable")); map.put("isopenconfig",bb.getPropValue("hrmOrganization","enable"));
map.put("columns",columns); map.put("columns",columns);
map.put("datas", Collections.singletonList(datas)); map.put("datas", Collections.singletonList(datas));
return map; return map;
@ -93,7 +93,7 @@ public class ConfigServiceImpl extends Service implements ConfigService {
@Override @Override
public int saveConfigInfo(QTXConfigPO qtxConfigPO, String isopenconfig) { public int saveConfigInfo(QTXConfigPO qtxConfigPO, String isopenconfig) {
ConfigOperator ConfigOperator = new ConfigOperator(); ConfigOperator ConfigOperator = new ConfigOperator();
ConfigOperator.setProp("qtx_sso_login.properties", "enable", isopenconfig); ConfigOperator.setProp("hrmOrganization.properties", "enable", isopenconfig);
qtxConfigPO.setCreator(user.getUID()); qtxConfigPO.setCreator(user.getUID());
qtxConfigPO.setCreateDate(OrganizationDateUtil.getFormatLocalDate(LocalDate.now())); qtxConfigPO.setCreateDate(OrganizationDateUtil.getFormatLocalDate(LocalDate.now()));
getConfigMapper().deleteAll(); getConfigMapper().deleteAll();

@ -91,7 +91,7 @@ public class OrgChartWrapper extends Service {
return getChartService(user).recordStatistics(param); return getChartService(user).recordStatistics(param);
} }
public Map<Integer, HrmLabelVO> selectLabel() { public Map<String, HrmLabelVO> selectLabel() {
return getChartService(user).selectLabel(); return getChartService(user).selectLabel();
} }

Loading…
Cancel
Save