|
@@ -1,13 +1,10 @@
|
|
|
|
|
|
|
|
package org.sky.scientific.service.impl;
|
|
package org.sky.scientific.service.impl;
|
|
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
import jakarta.annotation.Resource;
|
|
import jakarta.annotation.Resource;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.sky.core.log.exception.ServiceException;
|
|
import org.sky.core.log.exception.ServiceException;
|
|
|
import org.sky.core.mp.base.BaseServiceImpl;
|
|
import org.sky.core.mp.base.BaseServiceImpl;
|
|
|
-import org.sky.core.mp.support.Condition;
|
|
|
|
|
-import org.sky.core.mp.support.Query;
|
|
|
|
|
import org.sky.core.tool.utils.Func;
|
|
import org.sky.core.tool.utils.Func;
|
|
|
import org.sky.scientific.mapper.XmFinanceMapper;
|
|
import org.sky.scientific.mapper.XmFinanceMapper;
|
|
|
import org.sky.scientific.mapper.XmMapper;
|
|
import org.sky.scientific.mapper.XmMapper;
|
|
@@ -34,15 +31,14 @@ public class XmFinanceServiceImpl extends BaseServiceImpl<XmFinanceMapper, XmFin
|
|
|
private XmMapper xmMapper;
|
|
private XmMapper xmMapper;
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public IPage<XmFinanceEntity> selectXmFinancePage(IPage<XmFinanceEntity> page, XmFinanceEntity dto) {
|
|
|
|
|
|
|
+ public List<XmFinanceEntity> selectXmFinanceList(XmFinanceEntity dto) {
|
|
|
if (Func.isBlank(dto.getYearAndMonth())) {
|
|
if (Func.isBlank(dto.getYearAndMonth())) {
|
|
|
throw new ServiceException("参数yearAndMonth不能为空");
|
|
throw new ServiceException("参数yearAndMonth不能为空");
|
|
|
}
|
|
}
|
|
|
if (dto.getType() == null || !Arrays.asList(1, 2, 3).contains(dto.getType())) {
|
|
if (dto.getType() == null || !Arrays.asList(1, 2, 3).contains(dto.getType())) {
|
|
|
throw new ServiceException("参数type为空或者错误");
|
|
throw new ServiceException("参数type为空或者错误");
|
|
|
}
|
|
}
|
|
|
- List<XmFinanceEntity> list = baseMapper.selectXmFinancePage(page, dto);
|
|
|
|
|
- return page.setRecords(list);
|
|
|
|
|
|
|
+ return baseMapper.selectXmFinanceList(dto);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -60,8 +56,7 @@ public class XmFinanceServiceImpl extends BaseServiceImpl<XmFinanceMapper, XmFin
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//根据yearAndMonth和type查询已有项目
|
|
//根据yearAndMonth和type查询已有项目
|
|
|
- Query query = new Query().setCurrent(1).setSize(Integer.MAX_VALUE);
|
|
|
|
|
- List<XmFinanceEntity> dbXmFinanceList = baseMapper.selectXmFinancePage(Condition.getPage(query), entity);
|
|
|
|
|
|
|
+ List<XmFinanceEntity> dbXmFinanceList = baseMapper.selectXmFinanceList(entity);
|
|
|
|
|
|
|
|
//年度研发项目
|
|
//年度研发项目
|
|
|
List<Long> xmIdList = xmListByYear.stream().map(XmEntity::getId).toList();
|
|
List<Long> xmIdList = xmListByYear.stream().map(XmEntity::getId).toList();
|
|
@@ -105,8 +100,7 @@ public class XmFinanceServiceImpl extends BaseServiceImpl<XmFinanceMapper, XmFin
|
|
|
throw new ServiceException(entity.getYearAndMonth() + "年度内无研发项目可引入");
|
|
throw new ServiceException(entity.getYearAndMonth() + "年度内无研发项目可引入");
|
|
|
}
|
|
}
|
|
|
//根据yearAndMonth和type查询已有项目
|
|
//根据yearAndMonth和type查询已有项目
|
|
|
- Query query = new Query().setCurrent(1).setSize(Integer.MAX_VALUE);
|
|
|
|
|
- List<XmFinanceEntity> dbXmFinanceList = baseMapper.selectXmFinancePage(Condition.getPage(query), entity);
|
|
|
|
|
|
|
+ List<XmFinanceEntity> dbXmFinanceList = baseMapper.selectXmFinanceList(entity);
|
|
|
if (Func.isEmpty(dbXmFinanceList)) {
|
|
if (Func.isEmpty(dbXmFinanceList)) {
|
|
|
//本年度无会计/加计扣除/高新-研发项目清单,直接保存
|
|
//本年度无会计/加计扣除/高新-研发项目清单,直接保存
|
|
|
|
|
|