|
@@ -8,9 +8,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.imed.costaccount.common.exception.CostException;
|
|
import com.imed.costaccount.common.exception.CostException;
|
|
import com.imed.costaccount.common.util.BeanUtil;
|
|
import com.imed.costaccount.common.util.BeanUtil;
|
|
|
|
+import com.imed.costaccount.common.util.DateUtils;
|
|
import com.imed.costaccount.common.util.JacksonUtil;
|
|
import com.imed.costaccount.common.util.JacksonUtil;
|
|
import com.imed.costaccount.common.util.PageUtils;
|
|
import com.imed.costaccount.common.util.PageUtils;
|
|
import com.imed.costaccount.constants.NumberConstant;
|
|
import com.imed.costaccount.constants.NumberConstant;
|
|
|
|
+import com.imed.costaccount.enums.DateStyleEnum;
|
|
import com.imed.costaccount.mapper.CostCostingGroupMapper;
|
|
import com.imed.costaccount.mapper.CostCostingGroupMapper;
|
|
import com.imed.costaccount.mapper.CostIncomeFileMapper;
|
|
import com.imed.costaccount.mapper.CostIncomeFileMapper;
|
|
import com.imed.costaccount.mapper.CostIncomeGroupMapper;
|
|
import com.imed.costaccount.mapper.CostIncomeGroupMapper;
|
|
@@ -25,6 +27,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
+import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Objects;
|
|
import java.util.Objects;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
@@ -96,15 +99,27 @@ public class CostIncomeFileServiceImpl extends ServiceImpl<CostIncomeFileMapper,
|
|
*
|
|
*
|
|
* @param current
|
|
* @param current
|
|
* @param pageSize
|
|
* @param pageSize
|
|
- * @param name
|
|
|
|
|
|
+ * @param fileName
|
|
|
|
+ * @param dateTime
|
|
* @param hospId
|
|
* @param hospId
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public PageUtils queryList(Integer current, Integer pageSize, String name, Long hospId) {
|
|
|
|
|
|
+ public PageUtils queryList(Integer current, Integer pageSize, String fileName, String dateTime, Long hospId) {
|
|
|
|
+ int year = 0;
|
|
|
|
+ int month = 0;
|
|
|
|
+ if (StrUtil.isNotBlank(dateTime)) {
|
|
|
|
+ Date date = DateUtils.StringToDate(dateTime, DateStyleEnum.YYYY_MM);
|
|
|
|
+ year = DateUtil.year(date);
|
|
|
|
+ month = DateUtil.month(date) + 1;
|
|
|
|
+ }
|
|
Page<CostIncomeFile> costIncomeFilePage = new Page<>(current, pageSize);
|
|
Page<CostIncomeFile> costIncomeFilePage = new Page<>(current, pageSize);
|
|
Page<CostIncomeFile> page = this.page(costIncomeFilePage, new QueryWrapper<CostIncomeFile>().lambda()
|
|
Page<CostIncomeFile> page = this.page(costIncomeFilePage, new QueryWrapper<CostIncomeFile>().lambda()
|
|
- .eq(CostIncomeFile::getHospId, hospId).like(StrUtil.isNotBlank(name), CostIncomeFile::getFileName, name).orderByDesc(CostIncomeFile::getCreateTime));
|
|
|
|
|
|
+ .eq(CostIncomeFile::getHospId, hospId)
|
|
|
|
+ .like(StrUtil.isNotBlank(fileName), CostIncomeFile::getFileName, fileName)
|
|
|
|
+ .eq(StrUtil.isNotBlank(dateTime),CostIncomeFile::getDateYear,year)
|
|
|
|
+ .eq(StrUtil.isNotBlank(dateTime),CostIncomeFile::getDateMonth,month)
|
|
|
|
+ .orderByDesc(CostIncomeFile::getCreateTime));
|
|
List<CostIncomeFile> records = page.getRecords();
|
|
List<CostIncomeFile> records = page.getRecords();
|
|
List<CostIncomeFileVO> costIncomeFileVOList = BeanUtil.convertList(records, CostIncomeFileVO.class);
|
|
List<CostIncomeFileVO> costIncomeFileVOList = BeanUtil.convertList(records, CostIncomeFileVO.class);
|
|
costIncomeFileVOList.forEach(i -> {
|
|
costIncomeFileVOList.forEach(i -> {
|