jiangping
2025-02-26 21ffb032824db3c392f63d318d36efee33326b80
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformJobCloudController.java
@@ -5,9 +5,10 @@
import com.doumee.config.annotation.LoginNoRequired;
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
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;
import com.doumee.core.utils.Constants;
import com.doumee.dao.business.model.PlatformJob;
import com.doumee.dao.web.reqeust.JobDetailDTO;
@@ -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;
/**
@@ -49,7 +53,7 @@
    @GetMapping("/delete/{id}")
    @CloudRequiredPermission("business:platformjob:delete")
    public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){
        platformJobService.delete(id);
        platformJobService.deleteById(id,this.getLoginUser(token));
        return ApiResponse.success(null);
    }
@@ -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查询")