|  |  | 
 |  |  | package com.dy.pmsPlatform.station; | 
 |  |  |  | 
 |  |  | import cn.hutool.json.JSONArray; | 
 |  |  | import com.alibaba.excel.converters.Converter; | 
 |  |  | import com.alibaba.fastjson2.JSON; | 
 |  |  | import com.dy.common.aop.SsoPowerAop; | 
 |  |  | 
 |  |  | import com.dy.common.webUtil.QueryResultVo; | 
 |  |  | import com.dy.pmsGlobal.aop.Log; | 
 |  |  | import com.dy.pmsGlobal.pojoPlt.PltStation; | 
 |  |  | import com.dy.pmsGlobal.util.QrCodeConstant; | 
 |  |  | import com.dy.pmsGlobal.util.QrCodeUtil; | 
 |  |  | import com.google.zxing.WriterException; | 
 |  |  | import jakarta.servlet.http.HttpServletResponse; | 
 |  |  | 
 |  |  | public class StationCtrl { | 
 |  |  |     private static final String fileName = "工站信息" ; | 
 |  |  |     private static final String sheetName = "工站信息" ; | 
 |  |  |     private static final String stationPrefix = "103" ; | 
 |  |  |     private StationSv sv; | 
 |  |  |     @Autowired | 
 |  |  |     public StationCtrl(StationSv sv){ | 
 |  |  | 
 |  |  |         return BaseResponseUtils.buildSuccess(list); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 查询所有工站 | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @GetMapping(path="all") | 
 |  |  |     @SsoPowerAop(power = "10300006") | 
 |  |  |     @Log("查询所有工站") | 
 |  |  |     public BaseResponse<JSONArray> all(){ | 
 |  |  |         JSONArray array = sv.selectAllIdAndName() ; | 
 |  |  |         return BaseResponseUtils.buildSuccess(array); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @PostMapping(path="disabled") | 
 |  |  |     @SsoPowerAop(power = "10100011") | 
 |  |  |     @SsoPowerAop(power = "10300007") | 
 |  |  |     @Log("禁用或启用工站") | 
 |  |  |     public BaseResponse<Boolean> disabled(@RequestBody PltStation station){ | 
 |  |  |         int count = sv.disabled(station.id,station.disabled); | 
 |  |  | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |     @PostMapping(path="export") | 
 |  |  |     @SsoPowerAop(power = "10300000") | 
 |  |  |     @SsoPowerAop(power = "10300007") | 
 |  |  |     @Log("导出工站信息") | 
 |  |  |     public void export(HttpServletResponse response){ | 
 |  |  |         List<Converter> list = new ArrayList<>() ; | 
 |  |  | 
 |  |  | //                vo.code = "103"+station.id; | 
 |  |  |             vo.lineName = station.lineName; | 
 |  |  |             try { | 
 |  |  |                 vo.qrCode = QrCodeUtil.genQrCode(stationPrefix+station.id); | 
 |  |  |                 vo.qrCode = QrCodeUtil.genQrCode(QrCodeConstant.TypeStation+station.id); | 
 |  |  |             } catch (IOException e) { | 
 |  |  |                 e.printStackTrace(); | 
 |  |  |             } catch (WriterException e) { |