Commit 1c4487367b3049a276cc3836f053da211e699e82

Authored by ljq
1 parent 530498f4

档案

ruoyi-archives/src/main/java/com/ruoyi/controller/ArchivesBoxController.java
... ... @@ -108,4 +108,13 @@ public class ArchivesBoxController extends BaseController
108 108 return getDataTable(list);
109 109 }
110 110  
  111 + /**
  112 + * 打散
  113 + */
  114 + // @PreAuthorize("@ss.hasPermi('archives:box:list')")
  115 + @PostMapping("/Scatter/{id}")
  116 + public AjaxResult Scatter(@PathVariable Long id){
  117 + return toAjax(archivesBoxService.Scatter(id));
  118 + }
  119 +
111 120 }
... ...
ruoyi-archives/src/main/java/com/ruoyi/mapper/ArchivesCollectBoxMapper.java
... ... @@ -2,6 +2,7 @@ package com.ruoyi.mapper;
2 2  
3 3 import java.util.List;
4 4 import com.ruoyi.domain.ArchivesCollectBox;
  5 +import org.apache.ibatis.annotations.Param;
5 6  
6 7 /**
7 8 * 【请填写功能名称】Mapper接口
... ... @@ -58,4 +59,13 @@ public interface ArchivesCollectBoxMapper
58 59 * @return 结果
59 60 */
60 61 public int deleteArchivesCollectBoxByIds(Long[] ids);
  62 +
  63 +
  64 + /**
  65 + *
  66 + * @param apprvoal
  67 + * @param boxId
  68 + * @return
  69 + */
  70 + public int Scatter(@Param("apprvoal")String apprvoal, @Param("boxId") Long boxId,@Param("status") String status);
61 71 }
... ...
ruoyi-archives/src/main/java/com/ruoyi/service/IArchivesBoxService.java
1 1 package com.ruoyi.service;
2 2  
  3 +import com.ruoyi.common.core.domain.AjaxResult;
3 4 import com.ruoyi.domain.ArchivesBox;
  5 +import org.springframework.web.bind.annotation.PathVariable;
4 6  
5 7 import java.util.List;
6 8  
... ... @@ -67,4 +69,7 @@ public interface IArchivesBoxService
67 69 * @return 结果
68 70 */
69 71 public int deleteArchivesBoxById(Long id);
  72 +
  73 +
  74 + public int Scatter(Long id);
70 75 }
... ...
ruoyi-archives/src/main/java/com/ruoyi/service/impl/ArchivesBoxServiceImpl.java
... ... @@ -3,9 +3,11 @@ package com.ruoyi.service.impl;
3 3 import com.ruoyi.domain.ArchivesBox;
4 4 import com.ruoyi.common.utils.DateUtils;
5 5 import com.ruoyi.mapper.ArchivesBoxMapper;
  6 +import com.ruoyi.mapper.ArchivesCollectBoxMapper;
6 7 import com.ruoyi.service.IArchivesBoxService;
7 8 import org.springframework.beans.factory.annotation.Autowired;
8 9 import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
9 11  
10 12 import java.util.List;
11 13  
... ... @@ -20,7 +22,9 @@ public class ArchivesBoxServiceImpl implements IArchivesBoxService
20 22 {
21 23 @Autowired
22 24 private ArchivesBoxMapper archivesBoxMapper;
23   -
  25 + @Autowired
  26 + private ArchivesCollectBoxMapper archivesCollectBoxMapper;
  27 +
24 28 /**
25 29 * 查询【请填写功能名称】
26 30 *
... ... @@ -106,4 +110,12 @@ public class ArchivesBoxServiceImpl implements IArchivesBoxService
106 110 {
107 111 return archivesBoxMapper.deleteArchivesBoxById(id);
108 112 }
  113 +
  114 + @Override
  115 + @Transactional
  116 + public int Scatter(Long id){
  117 + ArchivesBox box = archivesBoxMapper.selectArchivesBoxById(id);
  118 + //box.getApprvoal() 让文档和盒提交状态保持一样 1表示已整理文件
  119 + return archivesCollectBoxMapper.Scatter(box.getApprvoal(),box.getId(),"1");
  120 + }
109 121 }
... ...
ruoyi-archives/src/main/resources/mapper/archives/ArchivesCollectBoxMapper.xml
... ... @@ -214,4 +214,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
214 214 #{id}
215 215 </foreach>
216 216 </delete>
  217 +
  218 + <update id="Scatter" >
  219 + update archives_collect_box set
  220 + <if test="boxId != null">box_id =Null , status = #{status} ,apprvoal= #{apprvoal} where box_id = #{boxId}</if>
  221 + </update>
  222 +
  223 +
217 224 </mapper>
218 225 \ No newline at end of file
... ...
ruoyi-ui/src/api/archives/box.js
... ... @@ -49,3 +49,11 @@ export function listByIds(id) {
49 49 method: 'post'
50 50 })
51 51 }
  52 +// 打散功能
  53 +export function Scatter(id) {
  54 + return request({
  55 + url: '/archives/box/Scatter/' + id,
  56 + method: 'post'
  57 + })
  58 +}
  59 +
... ...
ruoyi-ui/src/views/archives/box/index.vue
... ... @@ -106,6 +106,20 @@
106 106 >归档</el-button>
107 107 </el-col>
108 108  
  109 +
  110 + <el-col :span="1.5" v-if="updatefiling">
  111 + <el-button
  112 + type="warning"
  113 + plain
  114 + icon="el-icon-download"
  115 + size="mini"
  116 + :disabled="single"
  117 + @click="handleupdateScatter"
  118 + v-hasPermi="['archives:collerctbox:inserBox']"
  119 + >打散</el-button>
  120 + </el-col>
  121 +
  122 +
109 123 <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
110 124 </el-row>
111 125  
... ... @@ -191,7 +205,7 @@
191 205 </template>
192 206  
193 207 <script>
194   -import { listBox, getBox, delBox, addBox, updateBox } from "@/api/archives/box";
  208 +import {listBox, getBox, delBox, addBox, updateBox, Scatter} from "@/api/archives/box";
195 209  
196 210 import indexbox from "@/views/archives/collerctbox/index.vue";
197 211  
... ... @@ -370,6 +384,14 @@ export default {
370 384 });
371 385 });
372 386 },
  387 + //打散
  388 + handleupdateScatter(row){
  389 + const id = row.id || this.ids
  390 + Scatter(id).then(response=> {
  391 + this.$modal.msgSuccess("打散成功");
  392 + this.open = false;
  393 + })
  394 + },
373 395  
374 396  
375 397 }
... ...
ruoyi-ui/src/views/archives/collerctbox/index.vue
... ... @@ -349,32 +349,10 @@
349 349 <el-table-column label="库位码" align="center" prop="deportNodeId" />
350 350 <el-table-column label="描述" align="center" prop="describes" />
351 351 </el-table>
352   -
353   - <el-col :span="1.5">
354   - <el-button
355   - type="success"
356   - plain
357   - icon="el-icon-edit"
358   - size="mini"
359   - :disabled="single"
360   - @click="handleUpdate"
361   - v-hasPermi="['archives:box:edit']"
362   - >修改</el-button>
363   - </el-col>
364 352 <div slot="footer" class="dialog-footer">
365 353 <el-button type="primary" @click="insetBox">确 定</el-button>
366 354 <el-button @click="cancel">取 消</el-button>
367 355 </div>
368   -
369   -<!--
370   - <pagination
371   - v-show="total>0"
372   - :total="total"
373   - :page.sync="queryParams.pageNum"
374   - :limit.sync="queryParams.pageSize"
375   - @pagination="getList"
376   - />-->
377   -
378 356 </el-dialog>
379 357 </div>
380 358 </template>
... ... @@ -649,6 +627,7 @@ export default {
649 627 const collerboxid = row.id || this.ids;
650 628 this.boxOpen = true;
651 629 this.collerboxid = collerboxid;
  630 + this.status = "2" //盒
652 631 listBox(this.queryParams).then(response => {
653 632 this.boxtwoList = response.rows;
654 633 });
... ... @@ -667,8 +646,9 @@ export default {
667 646 from.boxId = id + ""; //盒id
668 647 from.status = "2";
669 648 updateBox(from).then(response => {
670   - this.$modal.msgSuccess("提交成功");
  649 + this.$modal.msgSuccess("已成功加入盒内");
671 650 this.boxOpen = false;
  651 + this.getList();
672 652 });
673 653 });
674 654 },
... ...