jiangbiao пре 1 година
родитељ
комит
094ba36504

+ 3 - 3
master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsFlplanTmplController.java

@@ -120,15 +120,15 @@ public class TTsFlplanTmplController extends BaseController {
     }
 
     @Log(title = "附件上传", businessType = BusinessType.UPDATE)
-    @PostMapping("/uploadFile")
-    public AjaxResult uploadFile(@RequestParam("file") MultipartFile file, Long id) throws IOException {
+    @PostMapping("/uploadFile/{id}")
+    public AjaxResult uploadFile(@RequestParam("file") MultipartFile file,@PathVariable Long id) throws IOException {
         if (!file.isEmpty()) {
             String url = FileUploadUtils.upload(RuoYiConfig.getFilePath("/bccnew"), file);
             TTsFlplanTmpl entity = tTsFlplanTmplService.selectTTsFlplanTmplById(id);
             entity.setFileUrl(url);
             entity.setFileName(file.getOriginalFilename());
             tTsFlplanTmplService.updateTTsFlplanTmpl(entity);
-            return AjaxResult.success();
+            return AjaxResult.success(id);
         }
         return AjaxResult.error("上传失败,请联系管理员");
     }

+ 3 - 3
master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsFtplanTmplController.java

@@ -122,15 +122,15 @@ public class TTsFtplanTmplController extends BaseController {
     }
 
     @Log(title = "附件上传", businessType = BusinessType.UPDATE)
-    @PostMapping("/uploadFile")
-    public AjaxResult uploadFile(@RequestParam("file") MultipartFile file, Long id) throws IOException {
+    @PostMapping("/uploadFile/{id}")
+    public AjaxResult uploadFile(@RequestParam("file") MultipartFile file,@PathVariable Long id) throws IOException {
         if (!file.isEmpty()) {
             String url = FileUploadUtils.upload(RuoYiConfig.getFilePath("/bccnew"), file);
             TTsFtplanTmpl entity = tTsFtplanTmplService.selectTTsFtplanTmplById(id);
             entity.setFileUrl(url);
             entity.setFileName(file.getOriginalFilename());
             tTsFtplanTmplService.updateTTsFtplanTmpl(entity);
-            return AjaxResult.success();
+            return AjaxResult.success(id);
         }
         return AjaxResult.error("上传失败,请联系管理员");
     }

+ 3 - 3
master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsLjplanTmplController.java

@@ -122,15 +122,15 @@ public class TTsLjplanTmplController extends BaseController {
     }
 
     @Log(title = "附件上传", businessType = BusinessType.UPDATE)
-    @PostMapping("/uploadFile")
-    public AjaxResult uploadFile(@RequestParam("file") MultipartFile file, Long id) throws IOException {
+    @PostMapping("/uploadFile/{id}")
+    public AjaxResult uploadFile(@RequestParam("file") MultipartFile file,@PathVariable Long id) throws IOException {
         if (!file.isEmpty()) {
             String url = FileUploadUtils.upload(RuoYiConfig.getFilePath("/bccnew"), file);
             TTsLjplanTmpl entity = tTsLjplanTmplService.selectTTsLjplanTmplById(id);
             entity.setFileUrl(url);
             entity.setFileName(file.getOriginalFilename());
             tTsLjplanTmplService.updateTTsLjplanTmpl(entity);
-            return AjaxResult.success();
+            return AjaxResult.success(id);
         }
         return AjaxResult.error("上传失败,请联系管理员");
     }

+ 3 - 3
master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsYsplanTmplController.java

@@ -122,15 +122,15 @@ public class TTsYsplanTmplController extends BaseController {
     }
 
     @Log(title = "附件上传", businessType = BusinessType.UPDATE)
-    @PostMapping("/uploadFile")
-    public AjaxResult uploadFile(@RequestParam("file") MultipartFile file, Long id) throws IOException {
+    @PostMapping("/uploadFile/{id}")
+    public AjaxResult uploadFile(@RequestParam("file") MultipartFile file,@PathVariable Long id) throws IOException {
         if (!file.isEmpty()) {
             String url = FileUploadUtils.upload(RuoYiConfig.getFilePath("/bccnew"), file);
             TTsYsplanTmpl entity = tTsYsplanTmplService.selectTTsYsplanTmplById(id);
             entity.setFileUrl(url);
             entity.setFileName(file.getOriginalFilename());
             tTsYsplanTmplService.updateTTsYsplanTmpl(entity);
-            return AjaxResult.success();
+            return AjaxResult.success(id);
         }
         return AjaxResult.error("上传失败,请联系管理员");
     }

+ 1 - 1
master/src/main/resources/mybatis/training/bccnew/TTsYsplanTmplMapper.xml

@@ -177,7 +177,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="timerNeed != null">timer_need = #{timerNeed},</if>
             <if test="sortTmpl != null">sort_tmpl = #{sortTmpl},</if>
         </trim>
-        where d.id = #{id}
+        where id = #{id}
     </update>
 
     <update id="deleteTTsYsplanTmplById" parameterType="Long">

BIN
master/src/main/resources/static/template/training/bccnewDsdt.xlsx


+ 4 - 4
ui/src/views/training/bccnew/flPlan/index.vue

@@ -291,7 +291,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/bccnew/flPlanTmpl/uploadFile",
+        url: process.env.VUE_APP_BASE_API + "/training/flPlan/uploadFile",
         commonfileList: null,
         queryParams: {
           pId: null,
@@ -396,7 +396,7 @@ export default {
       this.doc.commonfileList = [];
       this.doc.open = true;
       this.doc.id = row.id;
-      getFirstPlanTmpl(row.id).then(res => {
+      getFlPlan(row.id).then(res => {
         if (res.data.fileUrl != null)
           this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
       })
@@ -432,7 +432,7 @@ export default {
         cancelButtonText: this.$t('取消'),
         type: "warning"
       }).then(function () {
-        return updateFirstPlanTmpl({id: row.id, fileUrl: '', fileName: ''});
+        return updateFlPlan({id: row.id, fileUrl: '', fileName: ''});
       }).then(() => {
         this.msgSuccess(this.$t('删除成功'));
         this.doc.commonfileList = [];
@@ -449,7 +449,7 @@ export default {
       this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
       this.getList();
       this.doc.commonfileList = [];
-      getFirstPlanTmpl(response.data).then(res => {
+      getFlPlan(response.data).then(res => {
         if (res.data.fileUrl != null) {
           this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
         }

+ 4 - 4
ui/src/views/training/bccnew/ftPlan/index.vue

@@ -292,7 +292,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/bccnew/ftPlanTmpl/uploadFile",
+        url: process.env.VUE_APP_BASE_API + "/bccnew/ftPlan/uploadFile",
         commonfileList: null,
         queryParams: {
           pId: null,
@@ -397,7 +397,7 @@ export default {
       this.doc.commonfileList = [];
       this.doc.open = true;
       this.doc.id = row.id;
-      getFirstPlanTmpl(row.id).then(res => {
+      getFtPlan(row.id).then(res => {
         if (res.data.fileUrl != null)
           this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
       })
@@ -433,7 +433,7 @@ export default {
         cancelButtonText: this.$t('取消'),
         type: "warning"
       }).then(function () {
-        return updateFirstPlanTmpl({id: row.id, fileUrl: '', fileName: ''});
+        return updateFtPlan({id: row.id, fileUrl: '', fileName: ''});
       }).then(() => {
         this.msgSuccess(this.$t('删除成功'));
         this.doc.commonfileList = [];
@@ -450,7 +450,7 @@ export default {
       this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
       this.getList();
       this.doc.commonfileList = [];
-      getFirstPlanTmpl(response.data).then(res => {
+      getFtPlan(response.data).then(res => {
         if (res.data.fileUrl != null) {
           this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
         }

+ 4 - 4
ui/src/views/training/bccnew/ljPlan/index.vue

@@ -285,7 +285,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/bccnew/ljPlanTmpl/uploadFile",
+        url: process.env.VUE_APP_BASE_API + "/bccnew/ljPlan/uploadFile",
         commonfileList: null,
         queryParams: {
           pId: null,
@@ -391,7 +391,7 @@ export default {
       this.doc.commonfileList = [];
       this.doc.open = true;
       this.doc.id = row.id;
-      getFirstPlanTmpl(row.id).then(res => {
+      getLjPlan(row.id).then(res => {
         if (res.data.fileUrl != null)
           this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
       })
@@ -427,7 +427,7 @@ export default {
         cancelButtonText: this.$t('取消'),
         type: "warning"
       }).then(function () {
-        return updateFirstPlanTmpl({id: row.id, fileUrl: '', fileName: ''});
+        return updateLjPlan({id: row.id, fileUrl: '', fileName: ''});
       }).then(() => {
         this.msgSuccess(this.$t('删除成功'));
         this.doc.commonfileList = [];
@@ -444,7 +444,7 @@ export default {
       this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
       this.getList();
       this.doc.commonfileList = [];
-      getFirstPlanTmpl(response.data).then(res => {
+      getLjPlan(response.data).then(res => {
         if (res.data.fileUrl != null) {
           this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
         }

+ 4 - 4
ui/src/views/training/bccnew/ysPlan/index.vue

@@ -285,7 +285,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/bccnew/ysPlanTmpl/uploadFile",
+        url: process.env.VUE_APP_BASE_API + "/bccnew/ysPlan/uploadFile",
         commonfileList: null,
         queryParams: {
           pId: null,
@@ -391,7 +391,7 @@ export default {
       this.doc.commonfileList = [];
       this.doc.open = true;
       this.doc.id = row.id;
-      getFirstPlanTmpl(row.id).then(res => {
+      getYsPlan(row.id).then(res => {
         if (res.data.fileUrl != null)
           this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
       })
@@ -427,7 +427,7 @@ export default {
         cancelButtonText: this.$t('取消'),
         type: "warning"
       }).then(function () {
-        return updateFirstPlanTmpl({id: row.id, fileUrl: '', fileName: ''});
+        return updateYsPlan({id: row.id, fileUrl: '', fileName: ''});
       }).then(() => {
         this.msgSuccess(this.$t('删除成功'));
         this.doc.commonfileList = [];
@@ -444,7 +444,7 @@ export default {
       this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
       this.getList();
       this.doc.commonfileList = [];
-      getFirstPlanTmpl(response.data).then(res => {
+      getYsPlan(response.data).then(res => {
         if (res.data.fileUrl != null) {
           this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
         }