chenlu
2024-07-18 b864a88a6d34cbed2cfaad7f5e843ea1330c9c91
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
@@ -4,6 +4,7 @@
import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.erp.dto.pp.DamageReportDTO;
import com.example.erp.dto.pp.ScheduleProductionScheduleDTO;
import com.example.erp.dto.pp.TeamOutputDTO;
import com.example.erp.entity.pp.DamageDetails;
import com.example.erp.entity.pp.Report;
@@ -124,7 +125,7 @@
        return map;
    }
    public Map<String, Object> workInProgressSv(Date selectTime1, Date selectTime2, String orderId, String inputProject, String selectProcesses, String optionVal, Report report) {
    public Map<String, Object> workInProgressSv( String orderId, String inputProject, String selectProcesses, String optionVal, Report report) {
        if ("null".equals(orderId)) {
            orderId = "";
@@ -139,16 +140,16 @@
        Map<String, Object> map = new HashMap<>();
        if (optionVal.equals("1")){
            /* 根据销售单号汇总*/
            map.put("data", reportMapper.workInProgressOrderMp(selectTime1, selectTime2, orderId, inputProject, selectProcesses, report));
            map.put("data", reportMapper.workInProgressOrderMp( orderId, inputProject, selectProcesses, report));
        }else if(optionVal.equals("2")){
            /* 根流程卡号汇总*/
            map.put("data", reportMapper.workInProgressProcessMp(selectTime1, selectTime2, orderId, inputProject, selectProcesses, report));
            map.put("data", reportMapper.workInProgressProcessMp( orderId, inputProject, selectProcesses, report));
        } else if (optionVal.equals("3")) {
        } else {
            map.put("data", reportMapper.workInProgressMp(selectTime1, selectTime2, orderId, inputProject, selectProcesses, report));
            map.put("data", reportMapper.workInProgressMp( orderId, inputProject, selectProcesses, report));
        }
        map.put("process", productionSchedulingMapper.selectProcess());
        return map;
@@ -411,4 +412,19 @@
        map.put("total", reportMapper.teamOutputPageTotal(offset, pageSize, selectTime1, selectTime2,selectProcesses, teamOutputDTO));
        return map;
    }
    public Map<String, Object> scheduleProductionScheduleSv(Integer pageNum, Integer pageSize, Date selectTime1, Date selectTime2, String processes, ScheduleProductionScheduleDTO scheduleProductionScheduleDTO) {
        Integer offset = (pageNum - 1) * pageSize;
        Map<String, Object> map = new HashMap<>();
        map.put("data", reportMapper.scheduleProductionScheduleMp(offset, pageSize, selectTime1, selectTime2,processes, scheduleProductionScheduleDTO));
        map.put("total", reportMapper.getScheduleProductionScheduleTotal(offset, pageSize, selectTime1, selectTime2,processes, scheduleProductionScheduleDTO));
        map.put("process", productionSchedulingMapper.selectProcess());
        return map;
    }
    public List exportScheduleReportSv(Map<String, Object> dates) {
        List<LocalDate> date= (List<LocalDate>) dates.get("date1");
        String process= (String) dates.get("processes");
        return reportMapper.exportScheduleReportMp(date,process);
    }
}