|
@@ -34,7 +34,12 @@ import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.manager.entity.ArchiveTreeContract;
|
|
|
+import org.springblade.manager.entity.ContractInfo;
|
|
|
+import org.springblade.manager.entity.ProjectInfo;
|
|
|
import org.springblade.manager.feign.ArchiveTreeContractClient;
|
|
|
+import org.springblade.manager.feign.ContractClient;
|
|
|
+import org.springblade.manager.feign.ProjectClient;
|
|
|
+import org.springblade.manager.feign.WbsInfoClient;
|
|
|
import org.springblade.system.entity.DictBiz;
|
|
|
import org.springblade.system.feign.IDictBizClient;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -57,7 +62,7 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
|
private final IDictBizClient iDictBizClient;
|
|
|
private ArchiveFileClient archiveFileClient;
|
|
|
private ArchiveTreeContractClient archiveTreeContractClient;
|
|
|
-
|
|
|
+ private ContractClient contractClient;
|
|
|
private Map<String,Integer> indexMap; //按立卷位区分和生成流水号
|
|
|
|
|
|
|
|
@@ -152,6 +157,47 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Map<String, String> getAllArchiveByContractType(Long projectId,String typ) {
|
|
|
+ List<ArchivesAutoVO> list = baseMapper.getAllArchiveByContractType(projectId,typ);
|
|
|
+ List<ContractInfo> infos = contractClient.queryContractListByIds(Arrays.asList(projectId));
|
|
|
+ int key1=0,key2=0,key3=0;
|
|
|
+ //判断案卷属于1施工,2监理,还是3业主
|
|
|
+ for (ArchivesAutoVO l : list) {
|
|
|
+ String type = l.getContractType();
|
|
|
+ if (StringUtils.isBlank(type)){
|
|
|
+ //业主
|
|
|
+ key3++;
|
|
|
+ }else if ("S".equals(type)){
|
|
|
+ //监理
|
|
|
+ key2++;
|
|
|
+ }else if ("C".equals(type)){
|
|
|
+ //施工
|
|
|
+ key1++;
|
|
|
+ }else if (type.length() > 10){
|
|
|
+ for (ContractInfo info : infos) {
|
|
|
+ if (type.equals(info.getId()+"")){
|
|
|
+ Integer t = info.getContractType();
|
|
|
+ if (t == 1){
|
|
|
+ key1++;
|
|
|
+ }else if(t==2){
|
|
|
+ key2++;
|
|
|
+ }else {
|
|
|
+ key3++;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ System.out.println(type);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Map<String,String> map = new HashMap<>();
|
|
|
+ map.put("key1",key1+"");
|
|
|
+ map.put("key2",key2+"");
|
|
|
+ map.put("key3",key3+"");
|
|
|
+ return map;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
public void archiveAutoMethod(Long projectId){
|