@ -1,408 +1,408 @@
/* */ package com.archive.project.system.dept.service
package com.archive.project.system.dept.service
;
;
/* */
/* */ import com.archive.common.exception.BusinessException ;
import com.archive.common.exception.BusinessException ;
/* */ import com.archive.common.utils.StringUtils ;
import com.archive.common.utils.StringUtils ;
/* */ import com.archive.common.utils.security.ShiroUtils ;
import com.archive.common.utils.security.ShiroUtils ;
/* */ import com.archive.framework.aspectj.lang.annotation.DataScope ;
import com.archive.framework.aspectj.lang.annotation.DataScope ;
/* */ import com.archive.framework.config.ArchiveConfig ;
import com.archive.framework.config.ArchiveConfig ;
/* */ import com.archive.framework.web.domain.Ztree ;
import com.archive.framework.web.domain.Ztree ;
/* */ import com.archive.project.system.dept.domain.Dept ;
import com.archive.project.system.dept.domain.Dept ;
/* */ import com.archive.project.system.dept.mapper.DeptMapper ;
import com.archive.project.system.dept.mapper.DeptMapper ;
/* */ import com.archive.project.system.dept.service.IDeptService ;
import com.archive.project.system.dept.service.IDeptService ;
/* */ import com.archive.project.system.role.domain.Role ;
import com.archive.project.system.role.domain.Role ;
/* */ import java.util.ArrayList ;
import java.util.ArrayList ;
/* */ import java.util.Iterator ;
import java.util.Iterator ;
/* */ import java.util.List ;
import java.util.List ;
/* */ import org.apache.commons.lang3.ArrayUtils ;
import org.apache.commons.lang3.ArrayUtils ;
/* */ import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.beans.factory.annotation.Autowired ;
/* */ import org.springframework.stereotype.Service ;
import org.springframework.stereotype.Service ;
/* */ import org.springframework.transaction.annotation.Transactional ;
import org.springframework.transaction.annotation.Transactional ;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Service
@Service
/* */ public class DeptServiceImpl
public class DeptServiceImpl
/* */ implements IDeptService
implements IDeptService
/* */ {
{
/* */ @Autowired
@Autowired
/* */ private DeptMapper deptMapper ;
private DeptMapper deptMapper ;
/* */ @Autowired
@Autowired
/* */ private ArchiveConfig archiveConfig ;
private ArchiveConfig archiveConfig ;
/* */
/* */ @DataScope ( deptAlias = "d" )
@DataScope ( deptAlias = "d" )
/* */ public List < Dept > selectDeptList ( Dept dept ) {
public List < Dept > selectDeptList ( Dept dept ) {
/* 47 */ if ( "mysql" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
if ( "mysql" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 48 */ return this . deptMapper . selectDeptList ( dept ) ;
return this . deptMapper . selectDeptList ( dept ) ;
/* */ }
}
/* 50 */ if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 51 */ return this . deptMapper . selectDeptListSqlite ( dept ) ;
return this . deptMapper . selectDeptListSqlite ( dept ) ;
/* */ }
}
/* 53 */ return this . deptMapper . selectDeptList ( dept ) ;
return this . deptMapper . selectDeptList ( dept ) ;
/* */ }
}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @DataScope ( deptAlias = "d" )
@DataScope ( deptAlias = "d" )
/* */ public List < Ztree > selectDeptTree ( Dept dept ) {
public List < Ztree > selectDeptTree ( Dept dept ) {
/* 68 */ List < Dept > deptList = null ;
List < Dept > deptList = null ;
/* 69 */ if ( "mysql" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
if ( "mysql" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 70 */ deptList = this . deptMapper . selectDeptList ( dept ) ;
deptList = this . deptMapper . selectDeptList ( dept ) ;
/* */ }
}
/* 72 */ else if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
else if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 73 */ deptList = this . deptMapper . selectDeptListSqlite ( dept ) ;
deptList = this . deptMapper . selectDeptListSqlite ( dept ) ;
/* */ }
}
/* 75 */ List < Ztree > ztrees = initZtree ( deptList ) ;
List < Ztree > ztrees = initZtree ( deptList ) ;
/* 76 */ return ztrees ;
return ztrees ;
/* */ }
}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @DataScope ( deptAlias = "d" )
@DataScope ( deptAlias = "d" )
/* */ public List < Ztree > selectDeptTreeExcludeChild ( Dept dept ) {
public List < Ztree > selectDeptTreeExcludeChild ( Dept dept ) {
/* 89 */ Long deptId = dept . getDeptId ( ) ;
Long deptId = dept . getDeptId ( ) ;
/* 90 */ List < Dept > deptList = null ;
List < Dept > deptList = null ;
/* 91 */ if ( "mysql" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
if ( "mysql" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 92 */ deptList = this . deptMapper . selectDeptList ( dept ) ;
deptList = this . deptMapper . selectDeptList ( dept ) ;
/* */ }
}
/* 94 */ else if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
else if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 95 */ deptList = this . deptMapper . selectDeptListSqlite ( dept ) ;
deptList = this . deptMapper . selectDeptListSqlite ( dept ) ;
/* */ }
}
/* 97 */ Iterator < Dept > it = deptList . iterator ( ) ;
Iterator < Dept > it = deptList . iterator ( ) ;
/* 98 */ while ( it . hasNext ( ) ) {
while ( it . hasNext ( ) ) {
/* */
/* 100 */ Dept d = it . next ( ) ;
Dept d = it . next ( ) ;
/* 101 */ if ( d . getDeptId ( ) . intValue ( ) = = deptId . longValue ( ) | |
if ( d . getDeptId ( ) . intValue ( ) = = deptId . longValue ( ) | |
/* 102 */ ArrayUtils . contains ( ( Object [ ] ) StringUtils . split ( d . getAncestors ( ) , "," ) , deptId + "" ) )
ArrayUtils . contains ( ( Object [ ] ) StringUtils . split ( d . getAncestors ( ) , "," ) , deptId + "" ) )
/* */ {
{
/* 104 */ it . remove ( ) ;
it . remove ( ) ;
/* */ }
}
/* */ }
}
/* 107 */ List < Ztree > ztrees = initZtree ( deptList ) ;
List < Ztree > ztrees = initZtree ( deptList ) ;
/* 108 */ return ztrees ;
return ztrees ;
/* */ }
}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List < Ztree > roleDeptTreeData ( Role role ) {
public List < Ztree > roleDeptTreeData ( Role role ) {
/* 120 */ Long roleId = role . getRoleId ( ) ;
Long roleId = role . getRoleId ( ) ;
/* 121 */ List < Ztree > ztrees = new ArrayList < > ( ) ;
List < Ztree > ztrees = new ArrayList < > ( ) ;
/* 122 */ List < Dept > deptList = selectDeptList ( new Dept ( ) ) ;
List < Dept > deptList = selectDeptList ( new Dept ( ) ) ;
/* 123 */ if ( StringUtils . isNotNull ( roleId ) ) {
if ( StringUtils . isNotNull ( roleId ) ) {
/* */
/* 125 */ List < String > roleDeptList = null ;
List < String > roleDeptList = null ;
/* 126 */ if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 127 */ roleDeptList = this . deptMapper . selectRoleDeptTreeSqlite ( roleId ) ;
roleDeptList = this . deptMapper . selectRoleDeptTreeSqlite ( roleId ) ;
/* */ } else {
} else {
/* 129 */ roleDeptList = this . deptMapper . selectRoleDeptTree ( roleId ) ;
roleDeptList = this . deptMapper . selectRoleDeptTree ( roleId ) ;
/* */ }
}
/* */
/* 132 */ ztrees = initZtree ( deptList , roleDeptList ) ;
ztrees = initZtree ( deptList , roleDeptList ) ;
/* */ }
}
/* */ else {
else {
/* */
/* 136 */ ztrees = initZtree ( deptList ) ;
ztrees = initZtree ( deptList ) ;
/* */ }
}
/* 138 */ return ztrees ;
return ztrees ;
/* */ }
}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List < Ztree > initZtree ( List < Dept > deptList ) {
public List < Ztree > initZtree ( List < Dept > deptList ) {
/* 149 */ return initZtree ( deptList , null ) ;
return initZtree ( deptList , null ) ;
/* */ }
}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List < Ztree > initZtree ( List < Dept > deptList , List < String > roleDeptList ) {
public List < Ztree > initZtree ( List < Dept > deptList , List < String > roleDeptList ) {
/* 161 */ List < Ztree > ztrees = new ArrayList < > ( ) ;
List < Ztree > ztrees = new ArrayList < > ( ) ;
/* 162 */ boolean isCheck = StringUtils . isNotNull ( roleDeptList ) ;
boolean isCheck = StringUtils . isNotNull ( roleDeptList ) ;
/* 163 */ for ( Dept dept : deptList ) {
for ( Dept dept : deptList ) {
/* */
/* 165 */ if ( "0" . equals ( dept . getStatus ( ) ) ) {
if ( "0" . equals ( dept . getStatus ( ) ) ) {
/* */
/* 167 */ Ztree ztree = new Ztree ( ) ;
Ztree ztree = new Ztree ( ) ;
/* 168 */ ztree . setId ( dept . getDeptId ( ) ) ;
ztree . setId ( dept . getDeptId ( ) ) ;
/* 169 */ ztree . setpId ( dept . getParentId ( ) ) ;
ztree . setpId ( dept . getParentId ( ) ) ;
/* 170 */ ztree . setName ( dept . getDeptName ( ) ) ;
ztree . setName ( dept . getDeptName ( ) ) ;
/* 171 */ ztree . setTitle ( dept . getDeptName ( ) ) ;
ztree . setTitle ( dept . getDeptName ( ) ) ;
/* 172 */ if ( isCheck )
if ( isCheck )
/* */ {
{
/* 174 */ ztree . setChecked ( roleDeptList . contains ( dept . getDeptId ( ) + dept . getDeptName ( ) ) ) ;
ztree . setChecked ( roleDeptList . contains ( dept . getDeptId ( ) + dept . getDeptName ( ) ) ) ;
/* */ }
}
/* 176 */ ztrees . add ( ztree ) ;
ztrees . add ( ztree ) ;
/* */ }
}
/* */ }
}
/* 179 */ return ztrees ;
return ztrees ;
/* */ }
}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int selectDeptCount ( Long parentId ) {
public int selectDeptCount ( Long parentId ) {
/* 191 */ Dept dept = new Dept ( ) ;
Dept dept = new Dept ( ) ;
/* 192 */ dept . setParentId ( parentId ) ;
dept . setParentId ( parentId ) ;
/* 193 */ return this . deptMapper . selectDeptCount ( dept ) ;
return this . deptMapper . selectDeptCount ( dept ) ;
/* */ }
}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public boolean checkDeptExistUser ( Long deptId ) {
public boolean checkDeptExistUser ( Long deptId ) {
/* 205 */ int result = this . deptMapper . checkDeptExistUser ( deptId ) ;
int result = this . deptMapper . checkDeptExistUser ( deptId ) ;
/* 206 */ return ( result > 0 ) ;
return ( result > 0 ) ;
/* */ }
}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int deleteDeptById ( Long deptId ) {
public int deleteDeptById ( Long deptId ) {
/* 218 */ return this . deptMapper . deleteDeptById ( deptId ) ;
return this . deptMapper . deleteDeptById ( deptId ) ;
/* */ }
}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int insertDept ( Dept dept ) {
public int insertDept ( Dept dept ) {
/* 230 */ Dept info = this . deptMapper . selectDeptById ( dept . getParentId ( ) ) ;
Dept info = this . deptMapper . selectDeptById ( dept . getParentId ( ) ) ;
/* */
/* 232 */ if ( ! "0" . equals ( info . getStatus ( ) ) )
if ( ! "0" . equals ( info . getStatus ( ) ) )
/* */ {
{
/* 234 */ throw new BusinessException ( "部门停用,不允许新增" ) ;
throw new BusinessException ( "部门停用,不允许新增" ) ;
/* */ }
}
/* 236 */ dept . setCreateBy ( ShiroUtils . getLoginName ( ) ) ;
dept . setCreateBy ( ShiroUtils . getLoginName ( ) ) ;
/* 237 */ dept . setAncestors ( info . getAncestors ( ) + "," + dept . getParentId ( ) ) ;
dept . setAncestors ( info . getAncestors ( ) + "," + dept . getParentId ( ) ) ;
/* 238 */ if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 239 */ return this . deptMapper . insertDeptSqlite ( dept ) ;
return this . deptMapper . insertDeptSqlite ( dept ) ;
/* */ }
}
/* 241 */ return this . deptMapper . insertDept ( dept ) ;
return this . deptMapper . insertDept ( dept ) ;
/* */ }
}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Transactional
@Transactional
/* */ public int updateDept ( Dept dept ) {
public int updateDept ( Dept dept ) {
/* 255 */ Dept newParentDept = this . deptMapper . selectDeptById ( dept . getParentId ( ) ) ;
Dept newParentDept = this . deptMapper . selectDeptById ( dept . getParentId ( ) ) ;
/* 256 */ Dept oldDept = selectDeptById ( dept . getDeptId ( ) ) ;
Dept oldDept = selectDeptById ( dept . getDeptId ( ) ) ;
/* 257 */ if ( StringUtils . isNotNull ( newParentDept ) & & StringUtils . isNotNull ( oldDept ) ) {
if ( StringUtils . isNotNull ( newParentDept ) & & StringUtils . isNotNull ( oldDept ) ) {
/* */
/* 259 */ String newAncestors = newParentDept . getAncestors ( ) + "," + newParentDept . getDeptId ( ) ;
String newAncestors = newParentDept . getAncestors ( ) + "," + newParentDept . getDeptId ( ) ;
/* 260 */ String oldAncestors = oldDept . getAncestors ( ) ;
String oldAncestors = oldDept . getAncestors ( ) ;
/* 261 */ dept . setAncestors ( newAncestors ) ;
dept . setAncestors ( newAncestors ) ;
/* 262 */ updateDeptChildren ( dept . getDeptId ( ) , newAncestors , oldAncestors ) ;
updateDeptChildren ( dept . getDeptId ( ) , newAncestors , oldAncestors ) ;
/* */ }
}
/* 264 */ dept . setUpdateBy ( ShiroUtils . getLoginName ( ) ) ;
dept . setUpdateBy ( ShiroUtils . getLoginName ( ) ) ;
/* 265 */ int result = 0 ;
int result = 0 ;
/* 266 */ if ( "mysql" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
if ( "mysql" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 267 */ result = this . deptMapper . updateDept ( dept ) ;
result = this . deptMapper . updateDept ( dept ) ;
/* */ }
}
/* 269 */ else if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
else if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 270 */ result = this . deptMapper . updateDeptSqlite ( dept ) ;
result = this . deptMapper . updateDeptSqlite ( dept ) ;
/* */ }
}
/* */
/* 273 */ if ( "0" . equals ( dept . getStatus ( ) ) )
if ( "0" . equals ( dept . getStatus ( ) ) )
/* */ {
{
/* */
/* 276 */ updateParentDeptStatus ( dept ) ;
updateParentDeptStatus ( dept ) ;
/* */ }
}
/* 278 */ return result ;
return result ;
/* */ }
}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private void updateParentDeptStatus ( Dept dept ) {
private void updateParentDeptStatus ( Dept dept ) {
/* 288 */ String updateBy = dept . getUpdateBy ( ) ;
String updateBy = dept . getUpdateBy ( ) ;
/* 289 */ dept = this . deptMapper . selectDeptById ( dept . getDeptId ( ) ) ;
dept = this . deptMapper . selectDeptById ( dept . getDeptId ( ) ) ;
/* 290 */ dept . setUpdateBy ( updateBy ) ;
dept . setUpdateBy ( updateBy ) ;
/* 291 */ if ( "mysql" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
if ( "mysql" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 292 */ this . deptMapper . updateDeptStatus ( dept ) ;
this . deptMapper . updateDeptStatus ( dept ) ;
/* */ }
}
/* 294 */ else if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
else if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 295 */ this . deptMapper . updateDeptStatusSqlite ( dept ) ;
this . deptMapper . updateDeptStatusSqlite ( dept ) ;
/* */ }
}
/* */ }
}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void updateDeptChildren ( Long deptId , String newAncestors , String oldAncestors ) {
public void updateDeptChildren ( Long deptId , String newAncestors , String oldAncestors ) {
/* 309 */ List < Dept > children = null ;
List < Dept > children = null ;
/* 310 */ if ( "mysql" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
if ( "mysql" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 311 */ children = this . deptMapper . selectChildrenDeptById ( deptId ) ;
children = this . deptMapper . selectChildrenDeptById ( deptId ) ;
/* */ }
}
/* 313 */ else if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
else if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 314 */ children = this . deptMapper . selectChildrenDeptByIdSqlite ( deptId ) ;
children = this . deptMapper . selectChildrenDeptByIdSqlite ( deptId ) ;
/* */ }
}
/* */
/* 317 */ for ( Dept child : children )
for ( Dept child : children )
/* */ {
{
/* 319 */ child . setAncestors ( child . getAncestors ( ) . replace ( oldAncestors , newAncestors ) ) ;
child . setAncestors ( child . getAncestors ( ) . replace ( oldAncestors , newAncestors ) ) ;
/* */ }
}
/* 321 */ if ( children . size ( ) > 0 )
if ( children . size ( ) > 0 )
/* */ {
{
/* 323 */ this . deptMapper . updateDeptChildren ( children ) ;
this . deptMapper . updateDeptChildren ( children ) ;
/* */ }
}
/* */ }
}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void updateDeptChildren ( Long deptId , String ancestors ) {
public void updateDeptChildren ( Long deptId , String ancestors ) {
/* 335 */ Dept dept = new Dept ( ) ;
Dept dept = new Dept ( ) ;
/* 336 */ dept . setParentId ( deptId ) ;
dept . setParentId ( deptId ) ;
/* 337 */ List < Dept > childrens = null ;
List < Dept > childrens = null ;
/* 338 */ if ( "mysql" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
if ( "mysql" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 339 */ childrens = this . deptMapper . selectDeptList ( dept ) ;
childrens = this . deptMapper . selectDeptList ( dept ) ;
/* */ }
}
/* 341 */ else if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
else if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 342 */ childrens = this . deptMapper . selectDeptListSqlite ( dept ) ;
childrens = this . deptMapper . selectDeptListSqlite ( dept ) ;
/* */ }
}
/* 344 */ for ( Dept children : childrens )
for ( Dept children : childrens )
/* */ {
{
/* 346 */ children . setAncestors ( ancestors + "," + dept . getParentId ( ) ) ;
children . setAncestors ( ancestors + "," + dept . getParentId ( ) ) ;
/* */ }
}
/* 348 */ if ( childrens . size ( ) > 0 )
if ( childrens . size ( ) > 0 )
/* */ {
{
/* 350 */ this . deptMapper . updateDeptChildren ( childrens ) ;
this . deptMapper . updateDeptChildren ( childrens ) ;
/* */ }
}
/* */ }
}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public Dept selectDeptById ( Long deptId ) {
public Dept selectDeptById ( Long deptId ) {
/* 363 */ return this . deptMapper . selectDeptById ( deptId ) ;
return this . deptMapper . selectDeptById ( deptId ) ;
/* */ }
}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int selectNormalChildrenDeptById ( Long deptId ) {
public int selectNormalChildrenDeptById ( Long deptId ) {
/* 375 */ if ( "mysql" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
if ( "mysql" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 376 */ return this . deptMapper . selectNormalChildrenDeptById ( deptId ) ;
return this . deptMapper . selectNormalChildrenDeptById ( deptId ) ;
/* */ }
}
/* 378 */ if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
if ( "sqlite" . equals ( this . archiveConfig . getDatabaseType ( ) ) ) {
/* 379 */ return this . deptMapper . selectNormalChildrenDeptByIdSqlite ( deptId ) ;
return this . deptMapper . selectNormalChildrenDeptByIdSqlite ( deptId ) ;
/* */ }
}
/* 381 */ return this . deptMapper . selectNormalChildrenDeptById ( deptId ) ;
return this . deptMapper . selectNormalChildrenDeptById ( deptId ) ;
/* */ }
}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public String checkDeptNameUnique ( Dept dept ) {
public String checkDeptNameUnique ( Dept dept ) {
/* 395 */ Long deptId = Long . valueOf ( StringUtils . isNull ( dept . getDeptId ( ) ) ? - 1L : dept . getDeptId ( ) . longValue ( ) ) ;
Long deptId = Long . valueOf ( StringUtils . isNull ( dept . getDeptId ( ) ) ? - 1L : dept . getDeptId ( ) . longValue ( ) ) ;
/* 396 */ Dept info = this . deptMapper . checkDeptNameUnique ( dept . getDeptName ( ) , dept . getParentId ( ) ) ;
Dept info = this . deptMapper . checkDeptNameUnique ( dept . getDeptName ( ) , dept . getParentId ( ) ) ;
/* 397 */ if ( StringUtils . isNotNull ( info ) & & info . getDeptId ( ) . longValue ( ) ! = deptId . longValue ( ) )
if ( StringUtils . isNotNull ( info ) & & info . getDeptId ( ) . longValue ( ) ! = deptId . longValue ( ) )
/* */ {
{
/* 399 */ return "1" ;
return "1" ;
/* */ }
}
/* 401 */ return "0" ;
return "0" ;
/* */ }
}
/* */ }
}
/ * Location : C : \ Users \ Administrator \ Desktop \ extracted . zip ! \ extracted \ BOOT - INF \ classes \ com \ archive \ project \ system \ dept \ service \ DeptServiceImpl . class
/ * Location : C : \ Users \ Administrator \ Desktop \ extracted . zip ! \ extracted \ BOOT - INF \ classes \ com \ archive \ project \ system \ dept \ service \ DeptServiceImpl . class