|
|
@@ -28,8 +28,13 @@ public class OrganizationServiceImpl extends BaseMybatisDao<OrganizationManageme
|
|
|
/*olo.setCreateId(TokenManager.getAdminId());*/
|
|
|
Map<String,Object> params =disposeParams(olo);
|
|
|
@SuppressWarnings("unchecked")
|
|
|
- Pagination<OrganizationListOut> list=(Pagination<OrganizationListOut>)findPage("selectOrganizationList","selectOrganizationCount",params,pageNo,pageSize);
|
|
|
- return list;
|
|
|
+ Pagination<OrganizationListOut> p=(Pagination<OrganizationListOut>)findPage("selectOrganizationList","selectOrganizationCount",params,pageNo,pageSize);
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
+ List<OrganizationListOut> list=(List<OrganizationListOut>) p.getList();
|
|
|
+ for(OrganizationListOut i:list){
|
|
|
+ i.setSuperId(organizationManagementMapper.selectNameById(i.getSuperId()));
|
|
|
+ }
|
|
|
+ return p;
|
|
|
}
|
|
|
private Map<String,Object> disposeParams(OrganizationListOut olo){
|
|
|
Map<String,Object> params = new HashMap<String, Object>();
|
|
|
@@ -97,6 +102,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<OrganizationManageme
|
|
|
}
|
|
|
om.setDepNo(dep);
|
|
|
}
|
|
|
+ superId=organizationManagementMapper.selectIdByName(superId);
|
|
|
om.setSuperId(superId);
|
|
|
om.setRemarks(remarks);
|
|
|
om.setStatus("0");
|
|
|
@@ -111,6 +117,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<OrganizationManageme
|
|
|
@Override
|
|
|
public OrganizationListOut selectAllById(String id) {
|
|
|
OrganizationListOut olo=organizationManagementMapper.selectAllById(id);
|
|
|
+ olo.setSuperId(organizationManagementMapper.selectNameById(olo.getSuperId()));
|
|
|
return olo;
|
|
|
}
|
|
|
@Override
|
|
|
@@ -127,8 +134,8 @@ public class OrganizationServiceImpl extends BaseMybatisDao<OrganizationManageme
|
|
|
om.setType(type);
|
|
|
om.setUpdateTime(now);
|
|
|
om.setManagerId(managerId);
|
|
|
- om.setSuperId(superId);
|
|
|
String sdepNo=organizationManagementMapper.selectDepNoByName(superId);
|
|
|
+ superId=organizationManagementMapper.selectIdByName(superId);
|
|
|
int Count=organizationManagementMapper.selectDepNoCount(superId);
|
|
|
if(Count<10){
|
|
|
String dep=sdepNo+"0"+Count;
|
|
|
@@ -154,15 +161,16 @@ public class OrganizationServiceImpl extends BaseMybatisDao<OrganizationManageme
|
|
|
}
|
|
|
om.setDepNo(dep);
|
|
|
}
|
|
|
+ om.setSuperId(superId);
|
|
|
om.setStatus(status);
|
|
|
om.setRemarks(remarks);
|
|
|
om.setId(id);
|
|
|
organizationManagementMapper.updateByPrimaryKeySelective(om);
|
|
|
//*******下级编号修改
|
|
|
int n=0;
|
|
|
- List<OrganizationListOut> Nos =organizationManagementMapper.selectIDNBySuperId(name);
|
|
|
+ List<OrganizationListOut> Nos =organizationManagementMapper.selectIDNBySuperId(id);
|
|
|
for(OrganizationListOut i:Nos){
|
|
|
- sdepNo=organizationManagementMapper.selectDepNoByName(i.getSuperId());
|
|
|
+ sdepNo=organizationManagementMapper.selectDepNoById(i.getSuperId());
|
|
|
if(n<10){
|
|
|
String dep=sdepNo+"0"+n;
|
|
|
if(n>=10){
|
|
|
@@ -182,10 +190,10 @@ public class OrganizationServiceImpl extends BaseMybatisDao<OrganizationManageme
|
|
|
|
|
|
//*******下下级编号修改
|
|
|
int m=0;
|
|
|
- List<OrganizationListOut> Noss =organizationManagementMapper.selectIDNBySuperId(i.getName());
|
|
|
+ List<OrganizationListOut> Noss =organizationManagementMapper.selectIDNBySuperId(i.getId());
|
|
|
System.out.println("noss="+Noss);
|
|
|
for(OrganizationListOut o:Noss){
|
|
|
- sdepNo=organizationManagementMapper.selectDepNoByName(o.getSuperId());
|
|
|
+ sdepNo=organizationManagementMapper.selectDepNoById(o.getSuperId());
|
|
|
if(m<10){
|
|
|
String dep=sdepNo+"0"+m;
|
|
|
if(m>=10){
|
|
|
@@ -205,9 +213,9 @@ public class OrganizationServiceImpl extends BaseMybatisDao<OrganizationManageme
|
|
|
|
|
|
//*******下下级编号修改
|
|
|
int z=0;
|
|
|
- List<OrganizationListOut> Nosss =organizationManagementMapper.selectIDNBySuperId(o.getName());
|
|
|
+ List<OrganizationListOut> Nosss =organizationManagementMapper.selectIDNBySuperId(o.getId());
|
|
|
for(OrganizationListOut p:Nosss){
|
|
|
- sdepNo=organizationManagementMapper.selectDepNoByName(p.getSuperId());
|
|
|
+ sdepNo=organizationManagementMapper.selectDepNoById(p.getSuperId());
|
|
|
if(z<10){
|
|
|
String dep=sdepNo+"0"+z;
|
|
|
if(z>=10){
|