Commit 1ef3bf92c282724b82feb032bff049c74e34ab7d

Authored by yiming
2 parents 7eba48b8 c397f373

Merge remote-tracking branch 'origin/master'

ruoyi-archives/src/main/java/com/ruoyi/controller/ArchivesBoxController.java
@@ -108,4 +108,13 @@ public class ArchivesBoxController extends BaseController @@ -108,4 +108,13 @@ public class ArchivesBoxController extends BaseController
108 return getDataTable(list); 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,6 +2,7 @@ package com.ruoyi.mapper;
2 2
3 import java.util.List; 3 import java.util.List;
4 import com.ruoyi.domain.ArchivesCollectBox; 4 import com.ruoyi.domain.ArchivesCollectBox;
  5 +import org.apache.ibatis.annotations.Param;
5 6
6 /** 7 /**
7 * 【请填写功能名称】Mapper接口 8 * 【请填写功能名称】Mapper接口
@@ -58,4 +59,13 @@ public interface ArchivesCollectBoxMapper @@ -58,4 +59,13 @@ public interface ArchivesCollectBoxMapper
58 * @return 结果 59 * @return 结果
59 */ 60 */
60 public int deleteArchivesCollectBoxByIds(Long[] ids); 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 package com.ruoyi.service; 1 package com.ruoyi.service;
2 2
  3 +import com.ruoyi.common.core.domain.AjaxResult;
3 import com.ruoyi.domain.ArchivesBox; 4 import com.ruoyi.domain.ArchivesBox;
  5 +import org.springframework.web.bind.annotation.PathVariable;
4 6
5 import java.util.List; 7 import java.util.List;
6 8
@@ -67,4 +69,7 @@ public interface IArchivesBoxService @@ -67,4 +69,7 @@ public interface IArchivesBoxService
67 * @return 结果 69 * @return 结果
68 */ 70 */
69 public int deleteArchivesBoxById(Long id); 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,9 +3,11 @@ package com.ruoyi.service.impl;
3 import com.ruoyi.domain.ArchivesBox; 3 import com.ruoyi.domain.ArchivesBox;
4 import com.ruoyi.common.utils.DateUtils; 4 import com.ruoyi.common.utils.DateUtils;
5 import com.ruoyi.mapper.ArchivesBoxMapper; 5 import com.ruoyi.mapper.ArchivesBoxMapper;
  6 +import com.ruoyi.mapper.ArchivesCollectBoxMapper;
6 import com.ruoyi.service.IArchivesBoxService; 7 import com.ruoyi.service.IArchivesBoxService;
7 import org.springframework.beans.factory.annotation.Autowired; 8 import org.springframework.beans.factory.annotation.Autowired;
8 import org.springframework.stereotype.Service; 9 import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
9 11
10 import java.util.List; 12 import java.util.List;
11 13
@@ -20,7 +22,9 @@ public class ArchivesBoxServiceImpl implements IArchivesBoxService @@ -20,7 +22,9 @@ public class ArchivesBoxServiceImpl implements IArchivesBoxService
20 { 22 {
21 @Autowired 23 @Autowired
22 private ArchivesBoxMapper archivesBoxMapper; 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,4 +110,12 @@ public class ArchivesBoxServiceImpl implements IArchivesBoxService
106 { 110 {
107 return archivesBoxMapper.deleteArchivesBoxById(id); 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,4 +214,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
214 #{id} 214 #{id}
215 </foreach> 215 </foreach>
216 </delete> 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 </mapper> 224 </mapper>
218 \ No newline at end of file 225 \ No newline at end of file
ruoyi-ui/src/api/archives/box.js
@@ -66,3 +66,11 @@ export function shelveDown(data) { @@ -66,3 +66,11 @@ export function shelveDown(data) {
66 data: data 66 data: data
67 }) 67 })
68 } 68 }
  69 +// 打散功能
  70 +export function Scatter(id) {
  71 + return request({
  72 + url: '/archives/box/Scatter/' + id,
  73 + method: 'post'
  74 + })
  75 +}
  76 +
ruoyi-ui/src/views/archives/box/index.vue
@@ -106,6 +106,20 @@ @@ -106,6 +106,20 @@
106 >归档</el-button> 106 >归档</el-button>
107 </el-col> 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 <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> 123 <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
110 </el-row> 124 </el-row>
111 125
@@ -191,7 +205,7 @@ @@ -191,7 +205,7 @@
191 </template> 205 </template>
192 206
193 <script> 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 import indexbox from "@/views/archives/collerctbox/index.vue"; 210 import indexbox from "@/views/archives/collerctbox/index.vue";
197 211
@@ -370,6 +384,14 @@ export default { @@ -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,32 +349,10 @@
349 <el-table-column label="库位码" align="center" prop="deportNodeId" /> 349 <el-table-column label="库位码" align="center" prop="deportNodeId" />
350 <el-table-column label="描述" align="center" prop="describes" /> 350 <el-table-column label="描述" align="center" prop="describes" />
351 </el-table> 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 <div slot="footer" class="dialog-footer"> 352 <div slot="footer" class="dialog-footer">
365 <el-button type="primary" @click="insetBox">确 定</el-button> 353 <el-button type="primary" @click="insetBox">确 定</el-button>
366 <el-button @click="cancel">取 消</el-button> 354 <el-button @click="cancel">取 消</el-button>
367 </div> 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 </el-dialog> 356 </el-dialog>
379 </div> 357 </div>
380 </template> 358 </template>
@@ -649,6 +627,7 @@ export default { @@ -649,6 +627,7 @@ export default {
649 const collerboxid = row.id || this.ids; 627 const collerboxid = row.id || this.ids;
650 this.boxOpen = true; 628 this.boxOpen = true;
651 this.collerboxid = collerboxid; 629 this.collerboxid = collerboxid;
  630 + this.status = "2" //盒
652 listBox(this.queryParams).then(response => { 631 listBox(this.queryParams).then(response => {
653 this.boxtwoList = response.rows; 632 this.boxtwoList = response.rows;
654 }); 633 });
@@ -667,8 +646,9 @@ export default { @@ -667,8 +646,9 @@ export default {
667 from.boxId = id + ""; //盒id 646 from.boxId = id + ""; //盒id
668 from.status = "2"; 647 from.status = "2";
669 updateBox(from).then(response => { 648 updateBox(from).then(response => {
670 - this.$modal.msgSuccess("提交成功"); 649 + this.$modal.msgSuccess("已成功加入盒内");
671 this.boxOpen = false; 650 this.boxOpen = false;
  651 + this.getList();
672 }); 652 });
673 }); 653 });
674 }, 654 },