模块管理分权
This commit is contained in:
parent
f6ea4425cf
commit
96cefec891
|
|
@ -21,4 +21,6 @@ public interface ManagerDetachMapper {
|
|||
int deleteByIds(@Param("ids") Collection<Long> ids);
|
||||
|
||||
List<ManagerDetachPO> selectByIds(@Param("ids")Collection<Long> ids);
|
||||
|
||||
ManagerDetachPO getDetachById(@Param("id") Integer id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@
|
|||
<select id="selectByIds" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_detach t
|
||||
from jcl_org_detach
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
|
|
@ -206,4 +206,12 @@
|
|||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getDetachById" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_detach
|
||||
WHERE delete_type = 0
|
||||
AND id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -40,4 +40,11 @@ public interface ManagerDetachService {
|
|||
* @return
|
||||
*/
|
||||
int save(ManagerDetachParam param);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int updateDetach(ManagerDetachParam param);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.organization.service.impl;
|
|||
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.api.browser.bean.SearchConditionItem;
|
||||
import com.api.browser.bean.SearchConditionOption;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.component.OrganizationWeaTable;
|
||||
|
|
@ -63,11 +64,18 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe
|
|||
Map<String, Object> apiDatas = new HashMap<>();
|
||||
List<SearchConditionItem> selectItems = new ArrayList<>();
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
List<SearchConditionOption> selectOptions = new ArrayList<>();
|
||||
SearchConditionOption moduleOption = new SearchConditionOption("0", "组织管理",true);
|
||||
selectOptions.add(moduleOption);
|
||||
|
||||
SearchConditionItem ecManager = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "管理员", "1", "ecManager", "");
|
||||
ecManager.setRules("required|string");
|
||||
SearchConditionItem ecRolelevel = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "可维护机构", "194", "ecRolelevel", "");
|
||||
SearchConditionItem ecRolelevel = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "可维护机构", "194", "ecRolelevel", "");
|
||||
ecRolelevel.setRules("required|string");
|
||||
SearchConditionItem module = OrganizationFormItemUtil.checkboxItem(user, 2, 16, 1, false, "可管理模块", "module");
|
||||
SearchConditionItem module = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, "可管理模块", "module");
|
||||
module.setViewAttr(1);
|
||||
module.setDetailtype(2);
|
||||
module.setHasBorder(true);
|
||||
if (id != null) {
|
||||
//todo
|
||||
}
|
||||
|
|
@ -92,6 +100,7 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe
|
|||
.jclManager(String.valueOf(getHrmResourceMapper().getJclResourceId(param.getEcManager())))
|
||||
.ecRolelevel(param.getEcRolelevel())
|
||||
.jclRolelevel(EcHrmRelationUtil.getJclCompanyId(param.getEcRolelevel()) != null ? String.valueOf(EcHrmRelationUtil.getJclCompanyId(param.getEcRolelevel()).getId()) : null)
|
||||
.manageModule("组织管理")
|
||||
.creator((long)user.getUID())
|
||||
.deleteType(0)
|
||||
.createTime(new Date())
|
||||
|
|
@ -101,6 +110,17 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe
|
|||
return getMangeDetachMapper().insertIgnoreNull(managerDetachPO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateDetach(ManagerDetachParam param) {
|
||||
ManagerDetachPO managerDetachPO = ManagerDetachPO.builder()
|
||||
.ecManager(param.getEcManager())
|
||||
.jclManager(String.valueOf(getHrmResourceMapper().getJclResourceId(param.getEcManager())))
|
||||
.ecRolelevel(param.getEcRolelevel())
|
||||
.jclRolelevel(EcHrmRelationUtil.getJclCompanyId(param.getEcRolelevel()) != null ? String.valueOf(EcHrmRelationUtil.getJclCompanyId(param.getEcRolelevel()).getId()) : null)
|
||||
.build();
|
||||
return getMangeDetachMapper().updateDetach(managerDetachPO);
|
||||
}
|
||||
|
||||
private String buildSqlWhere(Map<String, Object> params) {
|
||||
String sqlWhere = " where 1 = 1";
|
||||
String lastName = (String) params.get("ecManager");
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public class ManagerDetachController {
|
|||
}
|
||||
|
||||
@POST
|
||||
@Path("/updateScheme")
|
||||
@Path("/update")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult updateScheme(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody ManagerDetachParam param) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -79,11 +79,10 @@ public class ManagerDetachWrapper extends OrganizationWrapper {
|
|||
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.OTHER, operateDesc = "分权数据更新")
|
||||
public int updateDetach(ManagerDetachParam param) {
|
||||
// SchemePO schemeByID = getSchemeMapper().getSchemeByID(param.getId());
|
||||
// int updateScheme = getManagerDetachService(user).updateDetach(param);
|
||||
// writeOperateLog(new Object() {
|
||||
// }.getClass(), schemeByID.getSchemeName(), JSON.toJSONString(param), schemeByID, getSchemeMapper().getSchemeByID(param.getId()));
|
||||
// return updateScheme;
|
||||
return -1;
|
||||
ManagerDetachPO managerDetachPO = MapperProxyFactory.getProxy(ManagerDetachMapper.class).getDetachById(param.getId());
|
||||
int result = getManagerDetachService(user).updateDetach(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), managerDetachPO.getEcManager(), JSON.toJSONString(param), managerDetachPO, MapperProxyFactory.getProxy(ManagerDetachMapper.class).getDetachById(param.getId()));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue