|
@@ -377,11 +377,20 @@ public class ArchivesAutoController extends BladeController {
|
|
|
@ApiOperation(value = "案卷迁移", notes = "传入ids,nodeId")
|
|
|
public R move(@ApiParam(value = "主键集合", required = true) @RequestParam String ids, @RequestParam Long nodeId) {
|
|
|
|
|
|
+ ArchiveTreeContract node = archiveTreeContractClient.getArchiveTreeContractById(nodeId);
|
|
|
+ if (node == null) {
|
|
|
+ return R.fail("找不到迁移的节点id");
|
|
|
+ }
|
|
|
+
|
|
|
List<ArchivesAuto> archivesAutos = archivesAutoService.listByIds(Func.toLongList(ids));
|
|
|
for (ArchivesAuto ar :archivesAutos) {
|
|
|
ar.setNodeId(nodeId);
|
|
|
+ ar.setTreeSort(node.getTreeSort());
|
|
|
+ ar.setContractId(node.getContractId());
|
|
|
+// if (node.getStorageType()!= null){
|
|
|
+// ar.setCarrierType(node.getStorageType().toString());
|
|
|
+// }
|
|
|
}
|
|
|
-
|
|
|
return R.status(archivesAutoService.updateBatchById(archivesAutos));
|
|
|
}
|
|
|
|
|
@@ -395,7 +404,7 @@ public class ArchivesAutoController extends BladeController {
|
|
|
|
|
|
ArchivesAuto archivesAuto = archivesAutoService.getById(archiveId);
|
|
|
if (archivesAuto != null && archivesAuto.getIsLock() == 1) {
|
|
|
- return R.data("案卷锁定中,能不能删除卷内文件");
|
|
|
+ return R.fail("案卷锁定中,能不能删除卷内文件");
|
|
|
}
|
|
|
|
|
|
return R.status(archivesAutoService.removeFiles(ids,archiveId));
|