|
@@ -36,6 +36,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import com.sckw.system.api.RemoteSystemService;
|
|
import com.sckw.system.api.RemoteSystemService;
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
import com.sckw.contract.dao.KwcContractTradeMapper;
|
|
import com.sckw.contract.dao.KwcContractTradeMapper;
|
|
|
|
|
|
|
@@ -404,6 +405,12 @@ public class KwcContractTradeService {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc: 导出
|
|
|
|
|
+ * @param reqVo 查询入参
|
|
|
|
|
+ * @author: czh
|
|
|
|
|
+ * @date 2023/7/17
|
|
|
|
|
+ */
|
|
|
public void export(QueryListReqVo reqVo) {
|
|
public void export(QueryListReqVo reqVo) {
|
|
|
QueryListReqDto queryListReqDto = new QueryListReqDto();
|
|
QueryListReqDto queryListReqDto = new QueryListReqDto();
|
|
|
BeanUtils.copyProperties(reqVo, queryListReqDto);
|
|
BeanUtils.copyProperties(reqVo, queryListReqDto);
|
|
@@ -444,6 +451,43 @@ public class KwcContractTradeService {
|
|
|
}
|
|
}
|
|
|
return getQueryListResVos(queryListResDtos);
|
|
return getQueryListResVos(queryListResDtos);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @return FindListGroupResVo
|
|
|
|
|
+ * @desc: 分组查询
|
|
|
|
|
+ * @author: czh
|
|
|
|
|
+ * @date: 2023/7/18
|
|
|
|
|
+ */
|
|
|
|
|
+ public List<FindListGroupResVo> findListGroup(QueryListReqVo reqVo) {
|
|
|
|
|
+ ContractStatusEnum[] values = ContractStatusEnum.values();
|
|
|
|
|
+ List<FindListGroupResVo> list = new ArrayList<>();
|
|
|
|
|
+ FindListGroupResVo total = new FindListGroupResVo();
|
|
|
|
|
+ total.setCount(0);
|
|
|
|
|
+ list.add(total);
|
|
|
|
|
+ for (ContractStatusEnum contractStatusEnum : values) {
|
|
|
|
|
+ FindListGroupResVo findListGroupResVo = new FindListGroupResVo();
|
|
|
|
|
+ findListGroupResVo.setStatus(contractStatusEnum.getCode());
|
|
|
|
|
+ findListGroupResVo.setStatusName(contractStatusEnum.getName());
|
|
|
|
|
+ findListGroupResVo.setCount(0);
|
|
|
|
|
+ list.add(findListGroupResVo);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ QueryListReqDto queryListReqDto = new QueryListReqDto();
|
|
|
|
|
+ BeanUtils.copyProperties(reqVo, queryListReqDto);
|
|
|
|
|
+ queryListReqDto.setEntId(LoginUserHolder.getEntId());
|
|
|
|
|
+ List<QueryListResDto> queryListResDtoList = kwcContractTradeMapper.queryList(queryListReqDto);
|
|
|
|
|
+ if (CollectionUtils.isNotEmpty(queryListResDtoList)) {
|
|
|
|
|
+ Map<Integer, List<QueryListResDto>> collect = queryListResDtoList.stream().collect(Collectors.groupingBy(QueryListResDto::getStatus));
|
|
|
|
|
+ for (FindListGroupResVo findListGroupResVo : list) {
|
|
|
|
|
+ List<QueryListResDto> queryListResDtos = collect.get(findListGroupResVo.getStatus());
|
|
|
|
|
+ findListGroupResVo.setCount(CollectionUtils.isEmpty(queryListResDtos) ? Global.NUMERICAL_ZERO : queryListResDtos.size());
|
|
|
|
|
+ }
|
|
|
|
|
+ //给汇总项求和
|
|
|
|
|
+ list.get(0).setCount(queryListResDtoList.size());
|
|
|
|
|
+ }
|
|
|
|
|
+ return list;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|