jiangping
2025-01-25 48b65b8e1618852345d37674042b9923e1549080
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformJobCloudController.java
@@ -5,6 +5,7 @@
import com.doumee.config.annotation.LoginNoRequired;
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.dao.business.vo.PlatformJobExportVo;
import com.doumee.service.business.third.model.ApiResponse;
import com.doumee.service.business.third.model.PageData;
import com.doumee.service.business.third.model.PageWrap;
@@ -15,12 +16,15 @@
import com.doumee.service.business.PlatformJobService;
import com.doumee.service.business.third.WmsService;
import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
import com.mchange.v2.beans.BeansUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
@@ -100,7 +104,19 @@
                platformJob.setJobForm(Constants.ZERO);
            }
        }
        ExcelExporter.build(PlatformJob.class).export(platformJobList, "安泰物流作业任务", response);
        if(Constants.equalsInteger(pageWrap.getModel().getJobType(),1)){
            List<PlatformJobExportVo> exportVoList  =new ArrayList<>();
            if(platformJobList!=null){
                for(PlatformJob job : platformJobList){
                    PlatformJobExportVo t = new PlatformJobExportVo();
                    BeanUtils.copyProperties(job,t);
                    exportVoList.add(t);
                }
                ExcelExporter.build(PlatformJobExportVo.class).export(exportVoList, "预约入园作业记录", response);
            }
        }else{
            ExcelExporter.build(PlatformJob.class).export(platformJobList, "安泰物流作业任务", response);
        }
    }
    @ApiOperation("根据ID查询")