Commit abbf0977 by HlQ

[add] 交付日志报表支持按用户筛选

1 parent 7b7731ff
...@@ -31,6 +31,7 @@ public class DeliverLogDTO extends BaseDTO { ...@@ -31,6 +31,7 @@ public class DeliverLogDTO extends BaseDTO {
* 日志人 * 日志人
*/ */
private Long userId; private Long userId;
private Long[] userIds;
/** /**
* 日志日期 * 日志日期
......
...@@ -4,6 +4,7 @@ import com.github.yulichang.base.MPJBaseServiceImpl; ...@@ -4,6 +4,7 @@ import com.github.yulichang.base.MPJBaseServiceImpl;
import com.github.yulichang.wrapper.MPJLambdaWrapper; import com.github.yulichang.wrapper.MPJLambdaWrapper;
import io.github.linpeilie.Converter; import io.github.linpeilie.Converter;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.dromara.hutool.core.array.ArrayUtil;
import org.dromara.hutool.core.date.DateUtil; import org.dromara.hutool.core.date.DateUtil;
import org.dromara.hutool.core.lang.Opt; import org.dromara.hutool.core.lang.Opt;
import org.dromara.hutool.core.text.StrUtil; import org.dromara.hutool.core.text.StrUtil;
...@@ -51,6 +52,7 @@ public class DeliverLogServiceImpl extends MPJBaseServiceImpl<DeliverLogMapper, ...@@ -51,6 +52,7 @@ public class DeliverLogServiceImpl extends MPJBaseServiceImpl<DeliverLogMapper,
.leftJoin(RStoreConfederate.class, RStoreConfederate::getId, DeliverLog::getConfederateId) .leftJoin(RStoreConfederate.class, RStoreConfederate::getId, DeliverLog::getConfederateId)
.leftJoin(User.class, User::getId, DeliverLog::getUserId) .leftJoin(User.class, User::getId, DeliverLog::getUserId)
.leftJoin(RContractUser.class, RContractUser::getContractNo, DeliverLog::getContractNo) .leftJoin(RContractUser.class, RContractUser::getContractNo, DeliverLog::getContractNo)
.in(ArrayUtil.isNotEmpty(dto.getUserIds()), DeliverLog::getUserId, dto.getUserIds())
.between(DeliverLog::getLogDate, dto.getLogDateStart(), dto.getLogDateEnd()); .between(DeliverLog::getLogDate, dto.getLogDateStart(), dto.getLogDateEnd());
var deliverLogList = this.selectJoinList(DeliverLogVO.class, wrapper); var deliverLogList = this.selectJoinList(DeliverLogVO.class, wrapper);
deliverLogList.forEach(log -> log.getContractUserList().stream() deliverLogList.forEach(log -> log.getContractUserList().stream()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!