|
|
|
@ -10,10 +10,8 @@ import com.da.common.exception.ServiceException;
|
|
|
|
import com.da.common.utils.DateUtils;
|
|
|
|
import com.da.common.utils.DateUtils;
|
|
|
|
import com.da.common.utils.StringUtils;
|
|
|
|
import com.da.common.utils.StringUtils;
|
|
|
|
import com.da.dangan.domain.DaPicturesRecard;
|
|
|
|
import com.da.dangan.domain.DaPicturesRecard;
|
|
|
|
import com.da.dangan.mapper.DaCatalogMapper;
|
|
|
|
import com.da.dangan.mapper.*;
|
|
|
|
import com.da.dangan.service.IDaCatalogService;
|
|
|
|
import com.da.dangan.service.IDaCatalogService;
|
|
|
|
import com.da.dangan.service.IDaPicturesRecardService;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
@ -33,8 +31,20 @@ public class DaCatalogServiceImpl implements IDaCatalogService
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private DaCatalogMapper daCatalogMapper;
|
|
|
|
private DaCatalogMapper daCatalogMapper;
|
|
|
|
@Autowired
|
|
|
|
@Resource
|
|
|
|
private IDaPicturesRecardService daPicturesRecardService;
|
|
|
|
private DaPicturesRecardMapper daPicturesRecardMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private DaCzrkdjMapper daCzrkdjMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private DaBirthDjMapper daBirthDjMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private DaQyzMapper daQyzMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private DaYtzmMapper daYtzmMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private DaZfnyhkcgMapper daZfnyhkcgMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private DaZqzMapper daZqzMapper;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询档案目录
|
|
|
|
* 查询档案目录
|
|
|
|
*
|
|
|
|
*
|
|
|
|
@ -111,12 +121,58 @@ public class DaCatalogServiceImpl implements IDaCatalogService
|
|
|
|
loginUser.getUser().getRoles().stream().anyMatch(sysRole -> sysRole.getRoleKey().equals("sysAdmin")))
|
|
|
|
loginUser.getUser().getRoles().stream().anyMatch(sysRole -> sysRole.getRoleKey().equals("sysAdmin")))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
catalogList = daCatalogMapper.selectDaCatalogList(daCatalog);
|
|
|
|
catalogList = daCatalogMapper.selectDaCatalogList(daCatalog);
|
|
|
|
}
|
|
|
|
} else
|
|
|
|
else
|
|
|
|
|
|
|
|
{ //根据用户权限显示目录信息
|
|
|
|
{ //根据用户权限显示目录信息
|
|
|
|
daCatalog.getParams().put("userId", loginUser.getUserId());
|
|
|
|
daCatalog.getParams().put("userId", loginUser.getUserId());
|
|
|
|
catalogList = daCatalogMapper.selectDaCatalogListByUserId(daCatalog);
|
|
|
|
catalogList = daCatalogMapper.selectDaCatalogListByUserId(daCatalog);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//按照目录的类型和id 查询对应目录及下级的档案识别的数据量
|
|
|
|
|
|
|
|
for(DaCatalog catalog:catalogList){
|
|
|
|
|
|
|
|
String ywType = catalog.getYwType();
|
|
|
|
|
|
|
|
//查询子目录的所有id集合
|
|
|
|
|
|
|
|
List<Long> ids = daCatalogMapper.selectContainIdsById(catalog.getId().toString());
|
|
|
|
|
|
|
|
ids.add(catalog.getId());
|
|
|
|
|
|
|
|
//默认count=0
|
|
|
|
|
|
|
|
Long count=0L;
|
|
|
|
|
|
|
|
switch (ywType) {
|
|
|
|
|
|
|
|
case "option1": //常住人口登记表1
|
|
|
|
|
|
|
|
//break;
|
|
|
|
|
|
|
|
case "option2": //常住卡
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
case "option3": //常住人口登记表2
|
|
|
|
|
|
|
|
//break;
|
|
|
|
|
|
|
|
case "option9": //常住人口登记表3
|
|
|
|
|
|
|
|
count = daCzrkdjMapper.selectCountByMuIds(ids);
|
|
|
|
|
|
|
|
catalog.setSbCount(count);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "option4":
|
|
|
|
|
|
|
|
//出生医学证明
|
|
|
|
|
|
|
|
count = daBirthDjMapper.selectCountByMuIds(ids);
|
|
|
|
|
|
|
|
catalog.setSbCount(count);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "option5":
|
|
|
|
|
|
|
|
//迁移证
|
|
|
|
|
|
|
|
count = daQyzMapper.selectCountByMuIds(ids);
|
|
|
|
|
|
|
|
catalog.setSbCount(count);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "option6":
|
|
|
|
|
|
|
|
//一胎证明
|
|
|
|
|
|
|
|
count = daYtzmMapper.selectCountByMuIds(ids);
|
|
|
|
|
|
|
|
catalog.setSbCount(count);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "option7":
|
|
|
|
|
|
|
|
//转非农业人口批复存根
|
|
|
|
|
|
|
|
count = daZfnyhkcgMapper.selectCountByMuIds(ids);
|
|
|
|
|
|
|
|
catalog.setSbCount(count);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "option8":
|
|
|
|
|
|
|
|
//准迁证
|
|
|
|
|
|
|
|
count = daZqzMapper.selectCountByMuIds(ids);
|
|
|
|
|
|
|
|
catalog.setSbCount(count);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
return catalogList;
|
|
|
|
return catalogList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -177,7 +233,7 @@ public class DaCatalogServiceImpl implements IDaCatalogService
|
|
|
|
//目录下已有上传图片的 不能删除
|
|
|
|
//目录下已有上传图片的 不能删除
|
|
|
|
DaPicturesRecard picturesRecard = new DaPicturesRecard();
|
|
|
|
DaPicturesRecard picturesRecard = new DaPicturesRecard();
|
|
|
|
picturesRecard.setMuId(id);
|
|
|
|
picturesRecard.setMuId(id);
|
|
|
|
List<DaPicturesRecard> daPicturesRecards = daPicturesRecardService.selectDaPicturesRecardList(picturesRecard);
|
|
|
|
List<DaPicturesRecard> daPicturesRecards = daPicturesRecardMapper.selectDaPicturesRecardList(picturesRecard);
|
|
|
|
if(daPicturesRecards!=null&&daPicturesRecards.size()>0){
|
|
|
|
if(daPicturesRecards!=null&&daPicturesRecards.size()>0){
|
|
|
|
return AjaxResult.error("目录下有已上传的图片,不能删除");
|
|
|
|
return AjaxResult.error("目录下有已上传的图片,不能删除");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|