|
|
@@ -6,6 +6,7 @@ import com.crm.manager.repository.TransactionItemRepository;
|
|
|
import com.crm.manager.service.SysConfigService;
|
|
|
import com.crm.manager.service.SysVaultodyConfigService;
|
|
|
import com.crm.manager.service.VaultodyService;
|
|
|
+import com.crm.manager.util.DateUtils;
|
|
|
import com.crm.rely.backend.core.constant.Constants;
|
|
|
import com.crm.rely.backend.core.dto.base.BaseResultDto;
|
|
|
import com.crm.rely.backend.core.dto.base.PageDto;
|
|
|
@@ -368,7 +369,15 @@ public class VaultodyServiceImpl implements VaultodyService {
|
|
|
public List<TransactionItemTable> queryExportItems (VaultTransactionsEntity entity) throws Exception{
|
|
|
VaultTransactionsSearchEntity vaultTransactionsSearchEntity = new VaultTransactionsSearchEntity();
|
|
|
BeanUtils.copyProperties(entity, vaultTransactionsSearchEntity);
|
|
|
- return transactionItemMapper.pageList(vaultTransactionsSearchEntity);
|
|
|
+ Long startTime = null;
|
|
|
+ Long endTime = null;
|
|
|
+ if(entity.getStartTime() != null){
|
|
|
+ startTime = DateUtils.dateToSecondTimestamp(entity.getStartTime());
|
|
|
+ }
|
|
|
+ if (entity.getEndTime() != null){
|
|
|
+ endTime = DateUtils.dateToSecondTimestamp(entity.getEndTime());
|
|
|
+ }
|
|
|
+ return transactionItemMapper.pageList(vaultTransactionsSearchEntity,startTime,endTime);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -396,12 +405,23 @@ public class VaultodyServiceImpl implements VaultodyService {
|
|
|
}
|
|
|
batchSave(tables);
|
|
|
}
|
|
|
- Integer count = transactionItemMapper.countList(entity);
|
|
|
+
|
|
|
+ Long startSecond = null;
|
|
|
+ Long endSecond = null;
|
|
|
+
|
|
|
+ if(entity.getStartTime() != null){
|
|
|
+ startSecond = DateUtils.dateToSecondTimestamp(entity.getStartTime());
|
|
|
+ }
|
|
|
+ if (entity.getEndTime() != null){
|
|
|
+ endSecond = DateUtils.dateToSecondTimestamp(entity.getEndTime());
|
|
|
+ }
|
|
|
+
|
|
|
+ Integer count = transactionItemMapper.countList(entity,startSecond,endSecond);
|
|
|
if (count == null || count <= 0) {
|
|
|
return ResultWithPagerDto.success(new PageDto(), new ArrayList<>());
|
|
|
}
|
|
|
PageDto pageDto = PageDto.format(entity, count);
|
|
|
- List<TransactionItemTable> dtos = transactionItemMapper.pageList(entity);
|
|
|
+ List<TransactionItemTable> dtos = transactionItemMapper.pageList(entity,startSecond,endSecond);
|
|
|
|
|
|
if (dtos == null || dtos.size() <= 0) {
|
|
|
throw new ServiceException(Constants.SYSTEM_ERROR);
|