| | |
| | | } |
| | | return fileInfo; |
| | | } |
| | | //编辑台站 |
| | | public Response updateStation(String stationName1, String stationName2, String stationName3, String updateStationName1, String updateStationName2, String updateStationName3) { |
| | | String stationName=""; |
| | | String updateStationName=""; |
| | | if(stationName1!=null&&!stationName1.isEmpty()){ |
| | | stationName=stationName+stationName1; |
| | | } |
| | | if(stationName2!=null&&!stationName2.isEmpty()){ |
| | | stationName=stationName+"-"+stationName2; |
| | | } |
| | | if(stationName3!=null&&!stationName3.isEmpty()){ |
| | | stationName=stationName+"-"+stationName3; |
| | | } |
| | | UpdateWrapper wrapper=new UpdateWrapper(); |
| | | if(updateStationName1!=null&&!updateStationName1.isEmpty()){ |
| | | updateStationName=updateStationName+stationName1; |
| | | wrapper.set("station_name1",updateStationName1); |
| | | } |
| | | if(updateStationName2!=null&&!updateStationName2.isEmpty()){ |
| | | updateStationName=updateStationName+"-"+updateStationName2; |
| | | wrapper.set("station_name2",updateStationName2); |
| | | } |
| | | if(updateStationName3!=null&&!updateStationName3.isEmpty()){ |
| | | updateStationName=updateStationName+"-"+updateStationName3; |
| | | wrapper.set("station_name3",updateStationName3); |
| | | } |
| | | wrapper.set("station_name",updateStationName); |
| | | wrapper.eq("station_name",stationName); |
| | | int flag=mapper.update(null,wrapper); |
| | | return new Response().set(1,flag>0,"修改操作"); |
| | | } |
| | | //删除台站 |
| | | public Response deleteStation(String stationName1, String stationName2, String stationName3) { |
| | | String stationName=""; |
| | | UpdateWrapper wrapper=new UpdateWrapper(); |
| | | if(stationName1!=null&&!stationName1.isEmpty()){ |
| | | stationName=stationName+stationName1; |
| | | } |
| | | if(stationName2!=null&&!stationName2.isEmpty()){ |
| | | stationName=stationName+"-"+stationName2; |
| | | } |
| | | if(stationName3!=null&&!stationName3.isEmpty()){ |
| | | stationName=stationName+"-"+stationName3; |
| | | } |
| | | wrapper.eq("station_name",stationName); |
| | | int flag=mapper.delete(wrapper); |
| | | return new Response().set(1,flag>0,"删除操作"); |
| | | } |
| | | } |