guoyujie
2025-04-14 ecfd47af61f29888d2b69fec73867bd475f376b6
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -41,6 +41,8 @@
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
@Service
@@ -1137,4 +1139,25 @@
        return result;
    }
    public Map<String, Object> selectShiftQuantitySv(Map<String, Object> reportingWork) {
        String  creatorId = (String) reportingWork.get("userId");
        List<LocalDateTime> dateList = (List<LocalDateTime>) reportingWork.get("searchDate");
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        String startDate = LocalDateTime.now().with(LocalTime.MIN).format(formatter);
        String endDate = LocalDateTime.now().format(formatter);
        if (dateList.get(0)!=null){
            startDate = String.valueOf(dateList.get(0));
        }
        if (dateList.get(1)!=null){
            endDate = String.valueOf(dateList.get(1));
        }
        List<String> date = new ArrayList<>();
        date.add(startDate);
        date.add(endDate);
        Map<String, Object> result = new HashMap<>();
        result.put("data",orderProcessDetailMapper.selectShiftQuantitySv(creatorId, startDate, endDate));
        result.put("date",date);
        return result;
    }
}