bug
luoyisheng
2025-02-13 ad91d75ba92aff79ef59293a42c366b21e1a0858
medicalWaste-admin/src/main/java/com/sinata/web/controller/applet/AppMwCheckoutRecordController.java
@@ -7,10 +7,7 @@
import com.sinata.common.core.domain.entity.SysUser;
import com.sinata.common.entity.PageDTO;
import com.sinata.common.utils.SecurityUtils;
import com.sinata.system.domain.MwCheckoutRecord;
import com.sinata.system.domain.MwDisposalHandleRecord;
import com.sinata.system.domain.MwDisposalRecord;
import com.sinata.system.domain.MwTransitCar;
import com.sinata.system.domain.*;
import com.sinata.system.domain.dto.CheckOutDto;
import com.sinata.system.domain.dto.CollectTotalUpDto;
import com.sinata.system.domain.query.CheckoutRecordQuery;
@@ -61,7 +58,8 @@
    @PostMapping("/total")
    public R<List<CollectTotalUpDto>> total(@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)LocalDate date) {
        SysUser sysUser = SecurityUtils.getLoginUser().getUser();
        return R.ok(mwCheckoutRecordService.totalUp(date,sysUser.getDepartmentId()));
        SysUser byId = userService.getById(sysUser.getUserId());
        return R.ok(mwCheckoutRecordService.totalUp(date,byId.getDepartmentId()));
    }
    @ApiOperation(value = "接收统计上",tags = "处置人员")
@@ -73,7 +71,8 @@
    @ApiOperation(value = "接收统计下",tags = "处置人员")
    @PostMapping("/out/record")
    public R<List<CheckOutDto>> record1(@DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date1,@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)LocalDate date2) {
        SysUser sysUser = SecurityUtils.getLoginUser().getUser();
        SysUser sysUser1 = SecurityUtils.getLoginUser().getUser();
        SysUser sysUser = userService.getById(sysUser1.getUserId());
        LocalDate now = LocalDate.now();
        List<MwDisposalRecord> list = disposalRecordService.lambdaQuery().ge(date1!=null,MwDisposalRecord::getReceiveTime, date1).le(date2!=null,MwDisposalRecord::getReceiveTime,date2).eq(MwDisposalRecord::getDepartmentId, sysUser.getDepartmentId()).orderByDesc(MwDisposalRecord::getReceiveTime).list();
        List<CheckOutDto> backList = new ArrayList<>();
@@ -84,7 +83,7 @@
            MwTransitCar byId1 = carService.getById(mwCheckoutRecord.getCarId());
            checkOutDto.setLicensePlateNumber(byId1.getLicensePlateNumber());
            checkOutDto.setCheckoutTime(mwCheckoutRecord.getReceiveTime());
            List<CollectTotalUpDto> records =  mwCheckoutRecordService.totalUp1(mwCheckoutRecord.getId());
            List<CollectTotalUpDto> records =  mwCheckoutRecordService.totalUp6(mwCheckoutRecord.getId());
            checkOutDto.setRecords(records);
            backList.add(checkOutDto);
        }
@@ -124,10 +123,12 @@
    @ApiOperation(value = "出库统计下")
    @PostMapping("/record")
    public R<List<CheckOutDto>> record() {
    public R<List<CheckOutDto>> record(@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)LocalDate date) {
        SysUser sysUser = SecurityUtils.getLoginUser().getUser();
        SysUser byId2 = userService.getById(sysUser.getUserId());
        LocalDate now = LocalDate.now();
        List<MwCheckoutRecord> list = mwCheckoutRecordService.lambdaQuery().eq(MwCheckoutRecord::getCheckoutTime, now).eq(MwCheckoutRecord::getDepartmentId, sysUser.getDepartmentId()).orderByDesc(MwCheckoutRecord::getCheckoutTime).list();
        List<MwCheckoutRecord> list = mwCheckoutRecordService.lambdaQuery().ge(MwCheckoutRecord::getCreateTime, date.atStartOfDay())
                .le(MwCheckoutRecord::getCreateTime, date.atTime(23,59,59)).eq(MwCheckoutRecord::getDepartmentId, byId2.getDepartmentId()).orderByDesc(MwCheckoutRecord::getCheckoutTime).list();
        List<CheckOutDto> backList = new ArrayList<>();
        for (MwCheckoutRecord mwCheckoutRecord : list) {
            CheckOutDto checkOutDto = new CheckOutDto();