|
@@ -1,5 +1,6 @@
|
|
|
package com.imed.costaccount.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.date.DateTime;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
@@ -96,15 +97,27 @@ public class CostIncomeFileServiceImpl extends ServiceImpl<CostIncomeFileMapper,
|
|
|
*
|
|
|
* @param current
|
|
|
* @param pageSize
|
|
|
- * @param name
|
|
|
+ * @param fileName
|
|
|
+ * @param dateTime
|
|
|
* @param hospId
|
|
|
* @return
|
|
|
*/
|
|
|
@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) {
|
|
|
+ Integer year = null;
|
|
|
+ Integer month = null;
|
|
|
+ if (StrUtil.isNotBlank(dateTime)) {
|
|
|
+ DateTime date = DateUtil.parseDate(dateTime);
|
|
|
+ year = DateUtil.year(date);
|
|
|
+ month = DateUtil.month(date) + 1;
|
|
|
+ }
|
|
|
Page<CostIncomeFile> costIncomeFilePage = new Page<>(current, pageSize);
|
|
|
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<CostIncomeFileVO> costIncomeFileVOList = BeanUtil.convertList(records, CostIncomeFileVO.class);
|
|
|
costIncomeFileVOList.forEach(i -> {
|