|
|
@@ -79,10 +79,16 @@ public class BusJcbFdfxjyqController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "更新")
|
|
|
@PutMapping("/update")
|
|
|
- public AjaxResult update(@RequestBody @Valid BusJcbFdfxjyq busJcbFdfxjyq) {
|
|
|
+ public AjaxResult update(@RequestBody @Valid BusJcbFdfxjyq busJcbFdfxjyq) throws Exception {
|
|
|
BaseDeptStation deptStation = stationService.getInfo(busJcbFdfxjyq.getDeptId(),
|
|
|
busJcbFdfxjyq.getLineId(), busJcbFdfxjyq.getStationId());
|
|
|
busJcbFdfxjyq.setDeptStationId(deptStation.getId());
|
|
|
+ //将文件转成base64
|
|
|
+ if(busJcbFdfxjyq.getPicUrl()!=null&&!busJcbFdfxjyq.getPicUrl().equals("")){
|
|
|
+ MultipartFile multipartFile = BASE64DecodedMultipartFile.base64ToMultipart(busJcbFdfxjyq.getPicUrl());
|
|
|
+ String path = sysFileService.uploadFile(multipartFile);
|
|
|
+ busJcbFdfxjyq.setPicUrl(path);
|
|
|
+ }
|
|
|
return toAjax(busJcbFdfxjyqService.update(busJcbFdfxjyq));
|
|
|
}
|
|
|
|