|  |  |  | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoUg.UgRtuProgram; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoUg.UgRtuTask; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.rtuMw.Web2RtuMw; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voUg.VoUgRtuResult; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voUg.VoUgRtuResult4Failure; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voUg.VoUgRtuResult4Success; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voUg.VoWatch; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.Operation; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Content; | 
|---|
|  |  |  | 
|---|
|  |  |  | private RtuUpgradeSv sv ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | RtuUpgradeResSv resSv ; | 
|---|
|  |  |  | private RtuUpgradeResSv resSv ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private Environment env; | 
|---|
|  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/exportUgFail", method = RequestMethod.GET) | 
|---|
|  |  |  | public void exportUgFail(HttpServletResponse response) throws Exception { | 
|---|
|  |  |  | setExcelRespProp(response, "升级失败RTU列表"); | 
|---|
|  |  |  | List<VoUgRtuResult> rsList = resSv.exportUgFail(); | 
|---|
|  |  |  | List<VoUgRtuResult4Failure> rsList = resSv.exportUgFail(); | 
|---|
|  |  |  | EasyExcel.write(response.getOutputStream()) | 
|---|
|  |  |  | .head(VoUgRtuResult.class) | 
|---|
|  |  |  | .head(VoUgRtuResult4Failure.class) | 
|---|
|  |  |  | .excelType(ExcelTypeEnum.XLSX) | 
|---|
|  |  |  | .sheet("升级失败RTU列表") | 
|---|
|  |  |  | .doWrite(rsList); | 
|---|
|  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/exportUgSuccess", method = RequestMethod.GET) | 
|---|
|  |  |  | public void exportUgSuccess(HttpServletResponse response) throws Exception { | 
|---|
|  |  |  | setExcelRespProp(response, "升级成功RTU列表"); | 
|---|
|  |  |  | List<VoUgRtuResult> rsList = resSv.exportUgSuccess(); | 
|---|
|  |  |  | List<VoUgRtuResult4Success> rsList = resSv.exportUgSuccess(); | 
|---|
|  |  |  | EasyExcel.write(response.getOutputStream()) | 
|---|
|  |  |  | .head(VoUgRtuResult.class) | 
|---|
|  |  |  | .head(VoUgRtuResult4Success.class) | 
|---|
|  |  |  | .excelType(ExcelTypeEnum.XLSX) | 
|---|
|  |  |  | .sheet("升级成功RTU列表") | 
|---|
|  |  |  | .doWrite(rsList); | 
|---|