BUG修复,权限控制
This commit is contained in:
parent
ef6f21c636
commit
b1ed914ebc
|
|
@ -0,0 +1,17 @@
|
|||
update jcl_field_extendinfo set isrequired = 1 where table_name ='JCL_ORG_JOB' and field_name ='job_name';
|
||||
|
||||
|
||||
delete from SystemRightDetail where rightid =2714;
|
||||
delete from SystemRightsLanguage where id =2714;
|
||||
delete from SystemRights where id =2714;
|
||||
delete from SystemRightToGroup where rightid =2714;
|
||||
delete from SystemRightType where id =37;
|
||||
delete from SystemRightGroups where id =-23;
|
||||
insert into SystemRights (id,rightdesc,righttype,detachable) values (2714,'组织数据导入','37',0);
|
||||
insert into SystemRightsLanguage (id,languageid,rightname,rightdesc) values (2714,8,'Organization data import','Organization data import');
|
||||
insert into SystemRightsLanguage (id,languageid,rightname,rightdesc) values (2714,9,'組織數據導入','組織數據導入');
|
||||
insert into SystemRightsLanguage (id,languageid,rightname,rightdesc) values (2714,7,'组织数据导入','组织数据导入');
|
||||
insert into SystemRightDetail (id,rightdetailname,rightdetail,rightid) values (43998,'组织数据导入权限','DataImport:All',2714);
|
||||
insert into SystemRightToGroup(rightid,groupid) values (2714,-23);
|
||||
insert into SystemRightGroups (id,rightgroupmark, rightgroupname, rightgroupremark) values(-23,'ORGANIZATION','组织管理权限组','组织管理');
|
||||
insert into SystemRightType(id,rightTypeName,rightTypeDesc) VALUES (37,'组织管理','组织管理');
|
||||
|
|
@ -199,7 +199,7 @@ public class CompServiceImpl extends Service implements CompService {
|
|||
OrganizationAssert.notEmpty(ids, "请选择要删除的数据");
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("id", StringUtils.join(ids, ","));
|
||||
new Thread(new OrganizationRunable(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.CANCELED, map)).start();
|
||||
new OrganizationRunable(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.CANCELED, map).run();
|
||||
return getCompMapper().deleteByIds(ids);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,12 @@ import com.engine.common.util.ServiceUtil;
|
|||
import com.engine.hrm.service.impl.HrmJobServiceImpl;
|
||||
import com.engine.hrm.service.impl.OrganizationServiceImpl;
|
||||
import com.engine.organization.entity.commom.RecordInfo;
|
||||
import com.engine.organization.entity.company.po.CompPO;
|
||||
import com.engine.organization.entity.extend.param.ExtendInfoParams;
|
||||
import com.engine.organization.entity.job.po.JobPO;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.mapper.comp.CompMapper;
|
||||
import com.engine.organization.mapper.extend.ExtMapper;
|
||||
import com.engine.organization.mapper.hrmresource.SystemDataMapper;
|
||||
import com.engine.organization.mapper.job.JobMapper;
|
||||
|
|
@ -407,17 +409,33 @@ public class OrganizationRunable implements Runnable {
|
|||
String forbiddenTag = Util.null2String(params.get("forbiddenTag"));
|
||||
List<String> idList = new ArrayList<>();
|
||||
String[] split = companyIds.split(",");
|
||||
for (String s : split) {
|
||||
idList.add(EcHrmRelationUtil.getEcCompanyId(s));
|
||||
if (StringUtils.isBlank(forbiddenTag)) {
|
||||
long currentTimeMillis = System.currentTimeMillis();
|
||||
for (String s : split) {
|
||||
// 更新名称为:名称+时间戳
|
||||
CompPO comp = MapperProxyFactory.getProxy(CompMapper.class).listById(Long.parseLong(s));
|
||||
params.put("parent_company", comp.getParentCompany());
|
||||
params.put("comp_no", comp.getCompNo());
|
||||
params.put("comp_name", comp.getCompName() + currentTimeMillis);
|
||||
params.put("comp_name_short", comp.getCompNameShort() + currentTimeMillis);
|
||||
params.put("show_order", comp.getShowOrder());
|
||||
updateCompany();
|
||||
idList.add(EcHrmRelationUtil.getEcCompanyId(s));
|
||||
}
|
||||
} else {
|
||||
for (String s : split) {
|
||||
idList.add(EcHrmRelationUtil.getEcCompanyId(s));
|
||||
}
|
||||
}
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("id", StringUtils.join(idList, ","));
|
||||
if (StringUtils.isBlank(forbiddenTag) || "1".equals(forbiddenTag)) {
|
||||
// 封存
|
||||
ServiceUtil.getService(OrganizationServiceImpl.class, user).doSubCompanyCancel(map, user);
|
||||
} else {
|
||||
|
||||
if ("0".equals(forbiddenTag)) {
|
||||
// 解封
|
||||
ServiceUtil.getService(OrganizationServiceImpl.class, user).doSubCompanyISCanceled(map, user);
|
||||
} else {
|
||||
// 删除封存、禁用封存
|
||||
ServiceUtil.getService(OrganizationServiceImpl.class, user).doSubCompanyCancel(map, user);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue