Merge branches 'develop' and '大王椰组织调整工作流提醒' of http://221.226.25.34:3000/liang.cheng/weaver-hrm-organization into 大王椰组织调整工作流提醒
This commit is contained in:
commit
c08f0fbb2a
|
|
@ -8262,81 +8262,81 @@ delete from HtmlModuleLabel where indexId = 547595 and moduleCode = 'HRM' and ty
|
|||
/
|
||||
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','HRM',547595) ;
|
||||
/
|
||||
delete from HtmlLabelIndex where id = 547599 and ( trim(indexdesc) is null ) ;
|
||||
delete from HtmlLabelIndex where id = 547598 and ( indexdesc is null or indexdesc = '' ) ;
|
||||
/
|
||||
insert into HtmlLabelIndex(id,indexdesc) select 547599,'部门简称' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547599 and ( trim(indexdesc) is not null )) and rownum = 1 ;
|
||||
insert into HtmlLabelIndex(id,indexdesc) select 547598,'部门名称' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547598 and ( indexdesc is not null and indexdesc <> '' )) limit 1 ;
|
||||
/
|
||||
delete from HtmlLabelInfo where indexid = 547599 and languageid=7 and ( trim(labelname) is null ) ;
|
||||
delete from HtmlLabelInfo where indexid = 547598 and languageid=7 and ( labelname is null or labelname = '' ) ;
|
||||
/
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547599 as indexid ,'部门简称' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547599 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547598 as indexid ,'部门名称' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547598 and languageid=7 and ( labelname is not null and labelname <> '' )) limit 1 ;
|
||||
/
|
||||
delete from HtmlLabelInfo where indexid = 547599 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
|
||||
delete from HtmlLabelInfo where indexid = 547598 and languageid=8 and ( labelname is null or labelname = '' or length(labelname)!=octet_length(labelname) ) ;
|
||||
/
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547599 as indexid ,'Department Abbreviation' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547599 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547598 as indexid ,'Department Name' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547598 and languageid=8 and ( labelname is not null and labelname <> '' and length(labelname)=octet_length(labelname) )) limit 1 ;
|
||||
/
|
||||
delete from HtmlLabelInfo where indexid = 547599 and languageid=9 and ( trim(labelname) is null ) ;
|
||||
delete from HtmlLabelInfo where indexid = 547598 and languageid=9 and ( labelname is null or labelname = '' ) ;
|
||||
/
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547599 as indexid ,'部門簡稱' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547599 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
|
||||
/
|
||||
delete from HtmlModuleLabel where indexId = 547599 and moduleCode = 'HRM' and type = 'label' ;
|
||||
/
|
||||
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','HRM',547599) ;
|
||||
/
|
||||
delete from HtmlLabelIndex where id = 547598 and ( trim(indexdesc) is null ) ;
|
||||
/
|
||||
insert into HtmlLabelIndex(id,indexdesc) select 547598,'部门名称' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547598 and ( trim(indexdesc) is not null )) and rownum = 1 ;
|
||||
/
|
||||
delete from HtmlLabelInfo where indexid = 547598 and languageid=7 and ( trim(labelname) is null ) ;
|
||||
/
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547598 as indexid ,'部门名称' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547598 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
|
||||
/
|
||||
delete from HtmlLabelInfo where indexid = 547598 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
|
||||
/
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547598 as indexid ,'Department Name' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547598 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
|
||||
/
|
||||
delete from HtmlLabelInfo where indexid = 547598 and languageid=9 and ( trim(labelname) is null ) ;
|
||||
/
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547598 as indexid ,'部門名稱' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547598 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547598 as indexid ,'部門名稱' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547598 and languageid=9 and ( labelname is not null and labelname <> '' )) limit 1 ;
|
||||
/
|
||||
delete from HtmlModuleLabel where indexId = 547598 and moduleCode = 'HRM' and type = 'label' ;
|
||||
/
|
||||
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','HRM',547598) ;
|
||||
/
|
||||
delete from HtmlLabelIndex where id = 547597 and ( trim(indexdesc) is null ) ;
|
||||
delete from HtmlLabelIndex where id = 547599 and ( indexdesc is null or indexdesc = '' ) ;
|
||||
/
|
||||
insert into HtmlLabelIndex(id,indexdesc) select 547597,'标识' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547597 and ( trim(indexdesc) is not null )) and rownum = 1 ;
|
||||
insert into HtmlLabelIndex(id,indexdesc) select 547599,'部门简称' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547599 and ( indexdesc is not null and indexdesc <> '' )) limit 1 ;
|
||||
/
|
||||
delete from HtmlLabelInfo where indexid = 547597 and languageid=7 and ( trim(labelname) is null ) ;
|
||||
delete from HtmlLabelInfo where indexid = 547599 and languageid=7 and ( labelname is null or labelname = '' ) ;
|
||||
/
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547597 as indexid ,'标识' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547597 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547599 as indexid ,'部门简称' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547599 and languageid=7 and ( labelname is not null and labelname <> '' )) limit 1 ;
|
||||
/
|
||||
delete from HtmlLabelInfo where indexid = 547597 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
|
||||
delete from HtmlLabelInfo where indexid = 547599 and languageid=8 and ( labelname is null or labelname = '' or length(labelname)!=octet_length(labelname) ) ;
|
||||
/
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547597 as indexid ,'Identifier' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547597 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547599 as indexid ,'Department Abbreviation' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547599 and languageid=8 and ( labelname is not null and labelname <> '' and length(labelname)=octet_length(labelname) )) limit 1 ;
|
||||
/
|
||||
delete from HtmlLabelInfo where indexid = 547597 and languageid=9 and ( trim(labelname) is null ) ;
|
||||
delete from HtmlLabelInfo where indexid = 547599 and languageid=9 and ( labelname is null or labelname = '' ) ;
|
||||
/
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547597 as indexid ,'標識' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547597 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547599 as indexid ,'部門簡稱' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547599 and languageid=9 and ( labelname is not null and labelname <> '' )) limit 1 ;
|
||||
/
|
||||
delete from HtmlModuleLabel where indexId = 547599 and moduleCode = 'HRM' and type = 'label' ;
|
||||
/
|
||||
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','HRM',547599) ;
|
||||
/
|
||||
delete from HtmlLabelIndex where id = 547597 and ( indexdesc is null or indexdesc = '' ) ;
|
||||
/
|
||||
insert into HtmlLabelIndex(id,indexdesc) select 547597,'标识' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547597 and ( indexdesc is not null and indexdesc <> '' )) limit 1 ;
|
||||
/
|
||||
delete from HtmlLabelInfo where indexid = 547597 and languageid=7 and ( labelname is null or labelname = '' ) ;
|
||||
/
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547597 as indexid ,'标识' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547597 and languageid=7 and ( labelname is not null and labelname <> '' )) limit 1 ;
|
||||
/
|
||||
delete from HtmlLabelInfo where indexid = 547597 and languageid=8 and ( labelname is null or labelname = '' or length(labelname)!=octet_length(labelname) ) ;
|
||||
/
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547597 as indexid ,'Identifier' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547597 and languageid=8 and ( labelname is not null and labelname <> '' and length(labelname)=octet_length(labelname) )) limit 1 ;
|
||||
/
|
||||
delete from HtmlLabelInfo where indexid = 547597 and languageid=9 and ( labelname is null or labelname = '' ) ;
|
||||
/
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547597 as indexid ,'標識' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547597 and languageid=9 and ( labelname is not null and labelname <> '' )) limit 1 ;
|
||||
/
|
||||
delete from HtmlModuleLabel where indexId = 547597 and moduleCode = 'HRM' and type = 'label' ;
|
||||
/
|
||||
insert into HtmlModuleLabel(type,moduleCode,indexId) values ('label','HRM',547597) ;
|
||||
/
|
||||
delete from HtmlLabelIndex where id = 547596 and ( trim(indexdesc) is null ) ;
|
||||
delete from HtmlLabelIndex where id = 547596 and ( indexdesc is null or indexdesc = '' ) ;
|
||||
/
|
||||
insert into HtmlLabelIndex(id,indexdesc) select 547596,'责任编辑' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547596 and ( trim(indexdesc) is not null )) and rownum = 1 ;
|
||||
insert into HtmlLabelIndex(id,indexdesc) select 547596,'责任编辑' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 547596 and ( indexdesc is not null and indexdesc <> '' )) limit 1 ;
|
||||
/
|
||||
delete from HtmlLabelInfo where indexid = 547596 and languageid=7 and ( trim(labelname) is null ) ;
|
||||
delete from HtmlLabelInfo where indexid = 547596 and languageid=7 and ( labelname is null or labelname = '' ) ;
|
||||
/
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547596 as indexid ,'责任编辑' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547596 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547596 as indexid ,'责任编辑' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547596 and languageid=7 and ( labelname is not null and labelname <> '' )) limit 1 ;
|
||||
/
|
||||
delete from HtmlLabelInfo where indexid = 547596 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
|
||||
delete from HtmlLabelInfo where indexid = 547596 and languageid=8 and ( labelname is null or labelname = '' or length(labelname)!=octet_length(labelname) ) ;
|
||||
/
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547596 as indexid ,'Responsible Editor' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547596 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547596 as indexid ,'Responsible Editor' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547596 and languageid=8 and ( labelname is not null and labelname <> '' and length(labelname)=octet_length(labelname) )) limit 1 ;
|
||||
/
|
||||
delete from HtmlLabelInfo where indexid = 547596 and languageid=9 and ( trim(labelname) is null ) ;
|
||||
delete from HtmlLabelInfo where indexid = 547596 and languageid=9 and ( labelname is null or labelname = '' ) ;
|
||||
/
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547596 as indexid ,'責任編輯' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547596 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
|
||||
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 547596 as indexid ,'責任編輯' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 547596 and languageid=9 and ( labelname is not null and labelname <> '' )) limit 1 ;
|
||||
/
|
||||
delete from HtmlModuleLabel where indexId = 547596 and moduleCode = 'HRM' and type = 'label' ;
|
||||
/
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class CompBO {
|
|||
tree.setIsParent(false);
|
||||
tree.setIsVirtual("0");
|
||||
tree.setName(item.getSubCompanyName());
|
||||
tree.setPid(item.getSupSubComId().toString());
|
||||
tree.setPid(item.getSupSubComId() == null ? "0" :item.getSupSubComId().toString());
|
||||
tree.setSelected(false);
|
||||
tree.setType("1");
|
||||
tree.setOrderNum(null == item.getShowOrder() ? 0 : item.getShowOrder());
|
||||
|
|
@ -101,7 +101,7 @@ public class CompBO {
|
|||
.subCompanyCode(e.getSubCompanyCode())
|
||||
.subCompanyDesc(e.getSubCompanyDesc())
|
||||
.subCompanyName(e.getSubCompanyName())
|
||||
.supSubComId(e.getSupSubComId())
|
||||
.supSubComId(e.getSupSubComId() == null ? 0 : e.getSupSubComId())
|
||||
.supSubComName(null == poMaps.get(e.getSupSubComId()) ? "" : poMaps.get(e.getSupSubComId()).getSubCompanyName())
|
||||
.showOrder(e.getShowOrder())
|
||||
.canceled(null == e.getCanceled() ? 0 : e.getCanceled())
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ public class DepartmentBO {
|
|||
tree.setPid(null == item.getSupDepId() ? "0" : item.getSupDepId().toString());
|
||||
tree.setSelected(false);
|
||||
tree.setType("2");
|
||||
tree.setParentComp(item.getSubCompanyId1().toString());
|
||||
tree.setParentComp(null == item.getSupDepId() ? "0" : item.getSubCompanyId1().toString());
|
||||
tree.setOrderNum(null == item.getShowOrder() ? 0 : item.getShowOrder().intValue());
|
||||
return tree;
|
||||
}).collect(Collectors.toList());
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import com.engine.organization.util.detach.DetachUtil;
|
|||
import com.engine.organization.util.excel.ExcelUtil;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.company.DepartmentComInfo;
|
||||
import weaver.hrm.company.SubCompanyComInfo;
|
||||
|
|
@ -167,7 +168,7 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
|
|||
}
|
||||
|
||||
List<String> columnList = Arrays.asList(columns.split(","));
|
||||
|
||||
String propValue = new BaseBean().getPropValue("hrmOrganization", "orgId");
|
||||
|
||||
|
||||
BigDecimal decimal = new BigDecimal(100 / columnList.size());
|
||||
|
|
@ -175,18 +176,26 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
|
|||
List<SearchConditionItem> items = allCondition.getItems();
|
||||
for (SearchConditionItem item : items) {
|
||||
String columnName = item.getDomkey()[0];
|
||||
fields.add(hrmResourceService.buildTableSql(columnName) + " as " + hrmResourceService.buildTableSql(columnName).replace(".", "_"));
|
||||
WeaTableColumn weaTableColumn = new WeaTableColumn();
|
||||
|
||||
if (columnName.equals("-1_cus_"+propValue)){
|
||||
fields.add("t.id as " + hrmResourceService.buildTableSql(columnName).replace(".", "_"));
|
||||
weaTableColumn.setTransmethod("com.engine.organization.transmethod.HrmResourceTransMethod.getOrgValueExp");
|
||||
}else{
|
||||
fields.add(hrmResourceService.buildTableSql(columnName) + " as " + hrmResourceService.buildTableSql(columnName).replace(".", "_"));
|
||||
// 导出专用转换,去除html标签
|
||||
weaTableColumn.setTransmethod("com.engine.organization.transmethod.HrmResourceTransMethod.getFieldTrueValueExp");
|
||||
}
|
||||
|
||||
|
||||
String scopeId = columnName.split("_")[0];
|
||||
String fieldName = columnName.substring(columnName.lastIndexOf("_") + 1);
|
||||
WeaTableColumn weaTableColumn = new WeaTableColumn();
|
||||
weaTableColumn.setText(MapperProxyFactory.getProxy(HrmResourceMapper.class).queryLabelName(fieldName, scopeId, user.getLanguage()));
|
||||
weaTableColumn.setColumn(hrmResourceService.buildTableSql(columnName).replace(".", "_"));
|
||||
weaTableColumn.setDisplay(columnList.contains(columnName) ? WeaBoolAttr.TRUE : WeaBoolAttr.FALSE);
|
||||
// 导出专用转换,去除html标签
|
||||
weaTableColumn.setTransmethod("com.engine.organization.transmethod.HrmResourceTransMethod.getFieldTrueValueExp");
|
||||
|
||||
weaTableColumn.setOtherpara(columnName);
|
||||
weaTableColumn.setWidth(decimal.setScale(2, RoundingMode.HALF_UP).doubleValue() + "%");
|
||||
//weaTableColumn.setWidth(decimal.setScale(2, RoundingMode.HALF_UP).doubleValue() + "%");
|
||||
if (weaTableColumn.getDisplay().getBoolVal()) {
|
||||
weaTableColumnList.add(weaTableColumn);
|
||||
headerList.add(weaTableColumn.getColumn());
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.organization.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.organization.entity.staff.param.StaffOutParam;
|
||||
import com.engine.organization.entity.staff.po.StaffPO;
|
||||
import com.engine.organization.enums.ModuleTypeEnum;
|
||||
|
|
@ -9,6 +10,7 @@ import com.engine.organization.util.OrganizationAssert;
|
|||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.hrm.User;
|
||||
import weaver.hrm.company.DepartmentComInfo;
|
||||
import weaver.hrm.company.SubCompanyComInfo;
|
||||
|
|
@ -75,6 +77,10 @@ public class FunctionOutStaffServiceImpl {
|
|||
|
||||
private Integer frozenStaffNums(StaffOutParam param) {
|
||||
StaffPO staffPO = select(param);
|
||||
if (param.getNum() < 0) {
|
||||
OrganizationAssert.isFalse(staffPO.getFreezeNum() == 0, SystemEnv.getHtmlLabelName(547949,user.getLanguage()));
|
||||
}
|
||||
|
||||
List<Integer> numberF = Arrays.asList(staffPO.getFreezeNum(),param.getNum(),staffPO.getPermanentNum());
|
||||
//1.增加冻结数 (num为负数时为减少冻结数)
|
||||
Integer sum = numberF.stream()
|
||||
|
|
@ -107,14 +113,14 @@ public class FunctionOutStaffServiceImpl {
|
|||
}
|
||||
//向上部门 分部在编数调整
|
||||
upwardReviewSums(param);
|
||||
//2.调整方式为流程时释放冻结数
|
||||
if (param.getChangeMode() == 1) {
|
||||
List<Integer> numbersF = Arrays.asList(staffPO.getFreezeNum(),param.getNum());
|
||||
int difference = numbersF.stream()
|
||||
.reduce((a, b) -> a - b)
|
||||
.orElse(0);
|
||||
staffPO.setFreezeNum(difference);
|
||||
}
|
||||
//2.调整方式为流程时释放冻结数(废弃 单独走冻结接口释放)
|
||||
// if (param.getChangeMode() == 1) {
|
||||
// List<Integer> numbersF = Arrays.asList(staffPO.getFreezeNum(),param.getNum());
|
||||
// int difference = numbersF.stream()
|
||||
// .reduce((a, b) -> a - b)
|
||||
// .orElse(0);
|
||||
// staffPO.setFreezeNum(difference);
|
||||
// }
|
||||
buildStaffPO(staffPO);
|
||||
return staffMapper().updateStaff(staffPO);
|
||||
}
|
||||
|
|
@ -130,13 +136,13 @@ public class FunctionOutStaffServiceImpl {
|
|||
//向上部门 分部在编数调整
|
||||
upwardReviewSums(param);
|
||||
//2.调整方式为流程时释放冻结数
|
||||
if (param.getChangeMode() == 1) {
|
||||
List<Integer> numbersF = Arrays.asList(staffPO.getFreezeNum(),param.getNum());
|
||||
int differenceF = numbersF.stream()
|
||||
.reduce((a, b) -> a - b)
|
||||
.orElse(0);
|
||||
staffPO.setFreezeNum(differenceF);
|
||||
}
|
||||
// if (param.getChangeMode() == 1) {
|
||||
// List<Integer> numbersF = Arrays.asList(staffPO.getFreezeNum(),param.getNum());
|
||||
// int differenceF = numbersF.stream()
|
||||
// .reduce((a, b) -> a - b)
|
||||
// .orElse(0);
|
||||
// staffPO.setFreezeNum(differenceF);
|
||||
// }
|
||||
buildStaffPO(staffPO);
|
||||
return staffMapper().updateStaff(staffPO);
|
||||
}
|
||||
|
|
@ -223,6 +229,11 @@ public class FunctionOutStaffServiceImpl {
|
|||
|
||||
private StaffPO select(StaffOutParam param) {
|
||||
List<StaffPO> staffPO = staffMapper().customSelect(param.getPlanId(), param.getCompany(), param.getDepartment(), param.getJob());
|
||||
BaseBean bb = new BaseBean();
|
||||
bb.writeLog("编制参数"+ JSON.toJSONString(param));
|
||||
bb.writeLog("查询结果"+ JSON.toJSONString(staffPO));
|
||||
bb.writeLog("user对象"+JSON.toJSONString(user));
|
||||
bb.writeLog("msg"+SystemEnv.getHtmlLabelName(547474,user.getLanguage()));
|
||||
OrganizationAssert.notEmpty(staffPO,SystemEnv.getHtmlLabelName(547474,user.getLanguage()));
|
||||
return staffPO.get(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.api.browser.bean.SearchConditionOption;
|
|||
import com.api.browser.util.ConditionType;
|
||||
import com.api.hrm.bean.HrmFieldBean;
|
||||
import com.api.hrm.util.HrmFieldSearchConditionComInfo;
|
||||
import com.api.hrm.util.HrmTransMethod;
|
||||
import com.cloudstore.eccom.constant.WeaBoolAttr;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
|
|
@ -59,6 +60,7 @@ import org.json.JSONException;
|
|||
import org.json.JSONObject;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.StringUtil;
|
||||
import weaver.general.TimeUtil;
|
||||
import weaver.general.Util;
|
||||
|
|
@ -160,6 +162,8 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
List<String> fields = new ArrayList<>();
|
||||
List<SearchConditionGroup> allConditions = getAllConditions();
|
||||
|
||||
String propValue = new BaseBean().getPropValue("hrmOrganization", "orgId");
|
||||
|
||||
if (jclOrgCustomTemplatePO != null) {
|
||||
if (StringUtils.isNotBlank(jclOrgCustomTemplatePO.getBasicFields())) {
|
||||
columns = jclOrgCustomTemplatePO.getBasicFields();
|
||||
|
|
@ -185,17 +189,24 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
List<SearchConditionItem> items = filterByDomkey(all, columnList);
|
||||
for (SearchConditionItem item : items) {
|
||||
String columnName = item.getDomkey()[0];
|
||||
fields.add(buildTableSql(columnName) + " as " + buildTableSql(columnName).replace(".", "_"));
|
||||
WeaTableColumn weaTableColumn = new WeaTableColumn();
|
||||
|
||||
if (columnName.equals("-1_cus_"+propValue)){
|
||||
fields.add("t.id as " + buildTableSql(columnName).replace(".", "_"));
|
||||
weaTableColumn.setTransmethod("com.engine.organization.transmethod.HrmResourceTransMethod.getOrgValue");
|
||||
|
||||
}else{
|
||||
fields.add(buildTableSql(columnName) + " as " + buildTableSql(columnName).replace(".", "_"));
|
||||
weaTableColumn.setTransmethod("com.engine.organization.transmethod.HrmResourceTransMethod.getFieldTrueValue");
|
||||
}
|
||||
|
||||
String scopeId = columnName.split("_")[0];
|
||||
String fieldName = columnName.substring(columnName.lastIndexOf("_") + 1);
|
||||
WeaTableColumn weaTableColumn = new WeaTableColumn();
|
||||
|
||||
weaTableColumn.setText(getHrmResourceMapper().queryLabelName(fieldName, scopeId, user.getLanguage()));
|
||||
weaTableColumn.setColumn(buildTableSql(columnName).replace(".", "_"));
|
||||
|
||||
weaTableColumn.setDisplay(columnList.contains(columnName) ? WeaBoolAttr.TRUE : WeaBoolAttr.FALSE);
|
||||
weaTableColumn.setTransmethod("com.engine.organization.transmethod.HrmResourceTransMethod.getFieldTrueValue");
|
||||
weaTableColumn.setOtherpara(columnName);
|
||||
weaTableColumn.setDisplay(columnList.contains(columnName) ? WeaBoolAttr.TRUE : WeaBoolAttr.FALSE);
|
||||
weaTableColumn.setWidth(decimal.setScale(2, RoundingMode.HALF_UP).doubleValue() + "%");
|
||||
weaTableColumnList.add(weaTableColumn);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ import org.apache.commons.lang.StringUtils;
|
|||
import weaver.general.StringUtil;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.hrm.job.JobTitlesComInfo;
|
||||
import weaver.systeminfo.SystemEnv;
|
||||
|
||||
import java.util.*;
|
||||
|
|
@ -565,6 +566,7 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
|
||||
@Override
|
||||
public void refresh() {
|
||||
JobTitlesComInfo jb = new JobTitlesComInfo();
|
||||
// 解决并发情况下,岗位数据重复问题
|
||||
synchronized (JobServiceImpl.class) {
|
||||
//1.人员表查询
|
||||
|
|
@ -582,6 +584,10 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
.createTime(new Date())
|
||||
.updateTime(new Date())
|
||||
.build();
|
||||
String jobTitlescode = jb.getJobTitlescode(String.valueOf(resourcePO.getJobtitle()));
|
||||
if (!"".equals(jobTitlescode)) {
|
||||
jobPO.setJobNo(jobTitlescode+"-"+resourcePO.getDepartmentid());
|
||||
}
|
||||
getJobMapper().insertIgnoreNull(jobPO);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.organization.transmethod;
|
||||
|
||||
import com.api.hrm.util.HrmTransMethod;
|
||||
import com.engine.organization.entity.job.bo.JobBO;
|
||||
import com.engine.organization.mapper.comp.CompMapper;
|
||||
import com.engine.organization.mapper.department.DepartmentMapper;
|
||||
|
|
@ -8,6 +9,7 @@ import com.engine.organization.util.db.MapperProxyFactory;
|
|||
import org.json.JSONObject;
|
||||
import weaver.hrm.User;
|
||||
import weaver.hrm.definedfield.HrmFieldManager;
|
||||
import weaver.hrm.resource.ResourceComInfo;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
|
|
@ -39,6 +41,34 @@ public class HrmResourceTransMethod {
|
|||
}
|
||||
}
|
||||
|
||||
public static String getOrgValue(String id, String para) {
|
||||
HrmTransMethod hrmTransMethod = new HrmTransMethod();
|
||||
|
||||
try {
|
||||
ResourceComInfo hrm = new ResourceComInfo();
|
||||
String departmentId = hrm.getDepartmentID(id);
|
||||
String subCompanyId = hrm.getSubCompanyID(id);
|
||||
return hrmTransMethod.getAllParentDepartmentNames("",departmentId,subCompanyId);
|
||||
} catch (Exception e) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public static String getOrgValueExp(String id, String para) {
|
||||
HrmTransMethod hrmTransMethod = new HrmTransMethod();
|
||||
|
||||
try {
|
||||
ResourceComInfo hrm = new ResourceComInfo();
|
||||
String departmentId = hrm.getDepartmentID(id);
|
||||
String subCompanyId = hrm.getSubCompanyID(id);
|
||||
String allParentDepartmentNames = hrmTransMethod.getAllParentDepartmentNames("", departmentId, subCompanyId);
|
||||
allParentDepartmentNames = allParentDepartmentNames.replaceAll("<[^>]*>", "").replaceAll(" ", "");
|
||||
return allParentDepartmentNames;
|
||||
} catch (Exception e) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 字段展示内容转换,导出用
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue