|
@@ -1,5 +1,6 @@
|
|
|
package com.sooka.sponest.data.system.attach.controller;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ruoyi.common.core.domain.R;
|
|
|
import com.ruoyi.common.core.web.controller.BaseController;
|
|
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
@@ -127,4 +128,11 @@ public class CenterdataTAttachController extends BaseController {
|
|
|
public R<List<CenterdataTAttach>> urlAttchMpF(@PathVariable String busId) {
|
|
|
return R.ok(centerdataTAttachMapper.urlAttchMpF(busId));
|
|
|
}
|
|
|
+
|
|
|
+ @PostMapping("/delAndInsertBatch")
|
|
|
+ public R delAndInsertBatch(@RequestParam("jsonStr") String jsonStr) {
|
|
|
+ List<CenterdataTAttach> attaches = JSONObject.parseArray(jsonStr, CenterdataTAttach.class);
|
|
|
+ centerdataTAttachService.deleteCenterdataTAttachByBusId(attaches.get(0).getBusId());
|
|
|
+ return R.ok(centerdataTAttachService.insertListCenterdataTAttach(attaches));
|
|
|
+ }
|
|
|
}
|