|
|
|
|
@ -1,345 +1,345 @@
|
|
|
|
|
/* */ package com.archive.project.dajs.jsgl.controller
|
|
|
|
|
package com.archive.project.dajs.jsgl.controller
|
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
/* */
|
|
|
|
|
/* */ import com.archive.common.archiveUtil.TableUtil;
|
|
|
|
|
/* */ import com.archive.common.utils.StringUtils;
|
|
|
|
|
/* */ import com.archive.framework.aspectj.lang.annotation.Log;
|
|
|
|
|
/* */ import com.archive.framework.aspectj.lang.enums.BusinessType;
|
|
|
|
|
/* */ import com.archive.framework.web.controller.BaseController;
|
|
|
|
|
/* */ import com.archive.framework.web.domain.AjaxResult;
|
|
|
|
|
/* */ import com.archive.project.dajs.jsgl.service.IJsglService;
|
|
|
|
|
/* */ import com.archive.project.dasz.archivetype.domain.ArchiveCollationTree;
|
|
|
|
|
/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService;
|
|
|
|
|
/* */ import com.archive.project.system.config.service.IConfigService;
|
|
|
|
|
/* */ import com.archive.project.system.dict.domain.DictData;
|
|
|
|
|
/* */ import com.archive.project.system.dict.domain.DictType;
|
|
|
|
|
/* */ import com.archive.project.system.dict.service.IDictTypeService;
|
|
|
|
|
/* */ import java.io.IOException;
|
|
|
|
|
/* */ import java.util.HashMap;
|
|
|
|
|
/* */ import java.util.List;
|
|
|
|
|
/* */ import java.util.Map;
|
|
|
|
|
/* */ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
|
|
/* */ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
/* */ import org.springframework.stereotype.Controller;
|
|
|
|
|
/* */ import org.springframework.ui.ModelMap;
|
|
|
|
|
/* */ import org.springframework.validation.annotation.Validated;
|
|
|
|
|
/* */ import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
/* */ import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
/* */ import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
/* */ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
/* */ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
/* */ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
/* */ import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */ @Controller
|
|
|
|
|
/* */ @RequestMapping({"/dajs/jsgl"})
|
|
|
|
|
/* */ public class JsglController
|
|
|
|
|
/* */ extends BaseController
|
|
|
|
|
/* */ {
|
|
|
|
|
/* */ @Autowired
|
|
|
|
|
/* */ private IArchiveTypeService archiveTypeService;
|
|
|
|
|
/* */ @Autowired
|
|
|
|
|
/* */ private IDictTypeService dictTypeService;
|
|
|
|
|
/* */ @Autowired
|
|
|
|
|
/* */ private IJsglService jsglService;
|
|
|
|
|
/* */ @Autowired
|
|
|
|
|
/* */ private IConfigService configService;
|
|
|
|
|
/* 56 */ private String prefix = "dajs/jsgl";
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */ @RequiresPermissions({"dajs:jsgl:view"})
|
|
|
|
|
/* */ @GetMapping
|
|
|
|
|
/* */ public String jsgl(ModelMap mmap) {
|
|
|
|
|
/* 65 */ List<ArchiveCollationTree> ztrees = this.archiveTypeService.archiveCollationTreeData();
|
|
|
|
|
/* 66 */ if (ztrees != null && ztrees.size() > 2) {
|
|
|
|
|
/* 67 */ mmap.put("firstNode", ztrees.get(1));
|
|
|
|
|
/* */ } else {
|
|
|
|
|
/* 69 */ mmap.put("firstNode", null);
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* 73 */ DictType dictType = new DictType(); dictType.setLabel("column_bind");
|
|
|
|
|
/* 74 */ List<DictType> dictTypeList = this.dictTypeService.selectDictTypeList(dictType);
|
|
|
|
|
/* 75 */ Map<String, List<DictData>> dictDataMap = new HashMap<>();
|
|
|
|
|
/* 76 */ for (DictType dictTypeTemp : dictTypeList) {
|
|
|
|
|
/* 77 */ List<DictData> dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType());
|
|
|
|
|
/* 78 */ dictDataMap.put(dictTypeTemp.getDictType(), dictDatas);
|
|
|
|
|
/* */ }
|
|
|
|
|
/* 80 */ mmap.put("dictDataMap", dictDataMap);
|
|
|
|
|
/* 81 */ return this.prefix + "/jsgl";
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */ @GetMapping({"/add/{archiveId}/{type}/{ownerid}"})
|
|
|
|
|
/* */ public String add(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type, @PathVariable("ownerid") String ownerid, ModelMap mmap) {
|
|
|
|
|
/* 97 */ mmap.put("archiveId", archiveId);
|
|
|
|
|
/* 98 */ mmap.put("type", type);
|
|
|
|
|
/* 99 */ mmap.put("ownerid", ownerid);
|
|
|
|
|
/* 100 */ return this.prefix + "/add";
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */ @GetMapping({"/detail/{archiveId}/{type}/{id}"})
|
|
|
|
|
/* */ public String detail(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) {
|
|
|
|
|
/* 113 */ mmap.put("archiveTypeId", archiveId);
|
|
|
|
|
/* 114 */ mmap.put("type", type);
|
|
|
|
|
/* 115 */ mmap.put("id", id);
|
|
|
|
|
/* 116 */ return this.prefix + "/detail";
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */ @GetMapping({"/update/{archiveId}/{type}/{id}"})
|
|
|
|
|
/* */ public String update(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) {
|
|
|
|
|
/* 128 */ mmap.put("archiveTypeId", archiveId);
|
|
|
|
|
/* 129 */ mmap.put("type", type);
|
|
|
|
|
/* 130 */ mmap.put("id", id);
|
|
|
|
|
/* 131 */ return this.prefix + "/update";
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */ @RequiresPermissions({"dajs:jsgl:fileUpload"})
|
|
|
|
|
/* */ @GetMapping({"/uploadFile/{archiveId}/{type}/{id}"})
|
|
|
|
|
/* */ public String uploadFile(@PathVariable("archiveId") long archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) {
|
|
|
|
|
/* 146 */ long tableId = TableUtil.getTableIdByArchiveTypeId(archiveId);
|
|
|
|
|
/* 147 */ mmap.put("tableId", Long.valueOf(tableId));
|
|
|
|
|
/* 148 */ mmap.put("id", id);
|
|
|
|
|
/* 149 */ return this.prefix + "/uploadFile";
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */ @PostMapping({"/fileUpload"})
|
|
|
|
|
/* */ @ResponseBody
|
|
|
|
|
/* */ public Map<String, Object> fileUpload(@RequestParam("file") MultipartFile[] files, long tableId, long id) {
|
|
|
|
|
/* 163 */ Map<String, Object> map = new HashMap<>();
|
|
|
|
|
/* 164 */ boolean res = false;
|
|
|
|
|
/* */ try {
|
|
|
|
|
/* 166 */ res = this.jsglService.uploadFile(files, tableId, id);
|
|
|
|
|
/* 167 */ } catch (IOException e) {
|
|
|
|
|
/* 168 */ e.printStackTrace();
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* 171 */ map.put("res", Boolean.valueOf(res));
|
|
|
|
|
/* 172 */ return map;
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */ @GetMapping({"/appendAddForm/{archiveId}/{type}"})
|
|
|
|
|
/* */ @ResponseBody
|
|
|
|
|
/* */ public String appendAddForm(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type) {
|
|
|
|
|
/* 189 */ return this.jsglService.appendAddForm(archiveId, type);
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */ @Log(title = "接收管理-档案新增", businessType = BusinessType.INSERT)
|
|
|
|
|
/* */ @PostMapping({"/add"})
|
|
|
|
|
/* */ @ResponseBody
|
|
|
|
|
/* */ public AjaxResult addSave(@Validated String archiveStr, @Validated String archiveId, @Validated String type) {
|
|
|
|
|
/* 197 */ if (StringUtils.isEmpty(archiveStr)) {
|
|
|
|
|
/* 198 */ return error("提交数据为空,新增失败!");
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* */ try {
|
|
|
|
|
/* 202 */ boolean flag = this.jsglService.addSave(archiveStr, archiveId, type);
|
|
|
|
|
/* 203 */ if (flag) {
|
|
|
|
|
/* 204 */ return toAjax(true);
|
|
|
|
|
/* */ }
|
|
|
|
|
/* 206 */ return toAjax(false);
|
|
|
|
|
/* */ }
|
|
|
|
|
/* 208 */ catch (Exception e) {
|
|
|
|
|
/* 209 */ e.printStackTrace();
|
|
|
|
|
/* 210 */ return toAjax(false);
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */ @Log(title = "接收管理-档案修改", businessType = BusinessType.UPDATE)
|
|
|
|
|
/* */ @PostMapping({"/update"})
|
|
|
|
|
/* */ @ResponseBody
|
|
|
|
|
/* */ public AjaxResult update(@Validated String archiveStr, @Validated String archiveTypeId, @Validated String type, @Validated String id) {
|
|
|
|
|
/* 221 */ if (StringUtils.isEmpty(archiveStr)) {
|
|
|
|
|
/* 222 */ return error("提交数据为空,新增失败!");
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* */ try {
|
|
|
|
|
/* 226 */ boolean flag = this.jsglService.update(archiveStr, archiveTypeId, type, id);
|
|
|
|
|
/* 227 */ if (flag) {
|
|
|
|
|
/* 228 */ return toAjax(true);
|
|
|
|
|
/* */ }
|
|
|
|
|
/* 230 */ return toAjax(false);
|
|
|
|
|
/* */ }
|
|
|
|
|
/* 232 */ catch (Exception e) {
|
|
|
|
|
/* 233 */ e.printStackTrace();
|
|
|
|
|
/* 234 */ return toAjax(false);
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */ @Log(title = "接收管理-档案删除", businessType = BusinessType.DELETE)
|
|
|
|
|
/* */ @PostMapping({"/delete"})
|
|
|
|
|
/* */ @ResponseBody
|
|
|
|
|
/* */ public AjaxResult delete(@Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids) {
|
|
|
|
|
/* 252 */ boolean flag = false;
|
|
|
|
|
/* */
|
|
|
|
|
/* */ try {
|
|
|
|
|
/* 255 */ String deleteType = this.configService.selectConfigByKey("archive.deleteDataType");
|
|
|
|
|
/* 256 */ if (deleteType.equals("1")) {
|
|
|
|
|
/* */
|
|
|
|
|
/* 258 */ flag = this.jsglService.archiveLogicDelete(query, archiveTypeId, type, ids);
|
|
|
|
|
/* 259 */ } else if (deleteType.equals("2")) {
|
|
|
|
|
/* */
|
|
|
|
|
/* 261 */ flag = this.jsglService.archivePhysicalDelete(query, archiveTypeId, type, ids);
|
|
|
|
|
/* */ } else {
|
|
|
|
|
/* 263 */ return error("请在\"系统参数\"中配置\"档案条目删除方式\"!");
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* 266 */ } catch (Exception ex) {
|
|
|
|
|
/* 267 */ System.out.println("档案删除出现异常:" + ex.getMessage());
|
|
|
|
|
/* 268 */ return error("删除失败!");
|
|
|
|
|
/* */ }
|
|
|
|
|
/* 270 */ if (flag) {
|
|
|
|
|
/* 271 */ return success("删除成功!");
|
|
|
|
|
/* */ }
|
|
|
|
|
/* 273 */ return error("删除失败!");
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */ @Log(title = "接收管理-整理入库", businessType = BusinessType.ZLRK)
|
|
|
|
|
/* */ @PostMapping({"/zlrk"})
|
|
|
|
|
/* */ @ResponseBody
|
|
|
|
|
/* */ public AjaxResult zlrk(@Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids) {
|
|
|
|
|
/* 289 */ boolean flag = false;
|
|
|
|
|
/* */ try {
|
|
|
|
|
/* 291 */ flag = this.jsglService.rzlk(query, archiveTypeId, type, ids);
|
|
|
|
|
/* 292 */ } catch (Exception ex) {
|
|
|
|
|
/* 293 */ System.out.println("入管理库出现异常:" + ex.getMessage());
|
|
|
|
|
/* 294 */ return error("入管理库失败!");
|
|
|
|
|
/* */ }
|
|
|
|
|
/* 296 */ if (flag) {
|
|
|
|
|
/* 297 */ return success("入管理库成功!");
|
|
|
|
|
/* */ }
|
|
|
|
|
/* 299 */ return error("入管理库失败!");
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */ @GetMapping({"/appendAddFormByDataId/{archiveTypeId}/{type}/{id}/{readOnly}"})
|
|
|
|
|
/* */ @ResponseBody
|
|
|
|
|
/* */ public String appendAddFormByDataId(@PathVariable("archiveTypeId") String archiveTypeId, @PathVariable("type") String type, @PathVariable("id") String id, @PathVariable("readOnly") String readOnly) {
|
|
|
|
|
/* 314 */ return this.jsglService.appendAddFormByDataId(archiveTypeId, type, id, readOnly);
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */ @GetMapping({"/folderFile/{archiveId}/{id}"})
|
|
|
|
|
/* */ public String folderFile(@PathVariable("archiveId") String archiveId, @PathVariable("id") String id, ModelMap mmap) {
|
|
|
|
|
/* 327 */ mmap.put("archiveId", archiveId);
|
|
|
|
|
/* 328 */ mmap.put("folderId", id);
|
|
|
|
|
/* */
|
|
|
|
|
/* 330 */ DictType dictType = new DictType(); dictType.setLabel("column_bind");
|
|
|
|
|
/* 331 */ List<DictType> dictTypeList = this.dictTypeService.selectDictTypeList(dictType);
|
|
|
|
|
/* 332 */ Map<String, List<DictData>> dictDataMap = new HashMap<>();
|
|
|
|
|
/* 333 */ for (DictType dictTypeTemp : dictTypeList) {
|
|
|
|
|
/* 334 */ List<DictData> dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType());
|
|
|
|
|
/* 335 */ dictDataMap.put(dictTypeTemp.getDictType(), dictDatas);
|
|
|
|
|
/* */ }
|
|
|
|
|
/* 337 */ mmap.put("dictDataMap", dictDataMap);
|
|
|
|
|
/* 338 */ return this.prefix + "/jnwj";
|
|
|
|
|
/* */ }
|
|
|
|
|
/* */ }
|
|
|
|
|
|
|
|
|
|
import com.archive.common.archiveUtil.TableUtil;
|
|
|
|
|
import com.archive.common.utils.StringUtils;
|
|
|
|
|
import com.archive.framework.aspectj.lang.annotation.Log;
|
|
|
|
|
import com.archive.framework.aspectj.lang.enums.BusinessType;
|
|
|
|
|
import com.archive.framework.web.controller.BaseController;
|
|
|
|
|
import com.archive.framework.web.domain.AjaxResult;
|
|
|
|
|
import com.archive.project.dajs.jsgl.service.IJsglService;
|
|
|
|
|
import com.archive.project.dasz.archivetype.domain.ArchiveCollationTree;
|
|
|
|
|
import com.archive.project.dasz.archivetype.service.IArchiveTypeService;
|
|
|
|
|
import com.archive.project.system.config.service.IConfigService;
|
|
|
|
|
import com.archive.project.system.dict.domain.DictData;
|
|
|
|
|
import com.archive.project.system.dict.domain.DictType;
|
|
|
|
|
import com.archive.project.system.dict.service.IDictTypeService;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Controller
|
|
|
|
|
@RequestMapping({"/dajs/jsgl"})
|
|
|
|
|
public class JsglController
|
|
|
|
|
extends BaseController
|
|
|
|
|
{
|
|
|
|
|
@Autowired
|
|
|
|
|
private IArchiveTypeService archiveTypeService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private IDictTypeService dictTypeService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private IJsglService jsglService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private IConfigService configService;
|
|
|
|
|
private String prefix = "dajs/jsgl";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequiresPermissions({"dajs:jsgl:view"})
|
|
|
|
|
@GetMapping
|
|
|
|
|
public String jsgl(ModelMap mmap) {
|
|
|
|
|
List<ArchiveCollationTree> ztrees = this.archiveTypeService.archiveCollationTreeData();
|
|
|
|
|
if (ztrees != null && ztrees.size() > 2) {
|
|
|
|
|
mmap.put("firstNode", ztrees.get(1));
|
|
|
|
|
} else {
|
|
|
|
|
mmap.put("firstNode", null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DictType dictType = new DictType(); dictType.setLabel("column_bind");
|
|
|
|
|
List<DictType> dictTypeList = this.dictTypeService.selectDictTypeList(dictType);
|
|
|
|
|
Map<String, List<DictData>> dictDataMap = new HashMap<>();
|
|
|
|
|
for (DictType dictTypeTemp : dictTypeList) {
|
|
|
|
|
List<DictData> dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType());
|
|
|
|
|
dictDataMap.put(dictTypeTemp.getDictType(), dictDatas);
|
|
|
|
|
}
|
|
|
|
|
mmap.put("dictDataMap", dictDataMap);
|
|
|
|
|
return this.prefix + "/jsgl";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping({"/add/{archiveId}/{type}/{ownerid}"})
|
|
|
|
|
public String add(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type, @PathVariable("ownerid") String ownerid, ModelMap mmap) {
|
|
|
|
|
mmap.put("archiveId", archiveId);
|
|
|
|
|
mmap.put("type", type);
|
|
|
|
|
mmap.put("ownerid", ownerid);
|
|
|
|
|
return this.prefix + "/add";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping({"/detail/{archiveId}/{type}/{id}"})
|
|
|
|
|
public String detail(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) {
|
|
|
|
|
mmap.put("archiveTypeId", archiveId);
|
|
|
|
|
mmap.put("type", type);
|
|
|
|
|
mmap.put("id", id);
|
|
|
|
|
return this.prefix + "/detail";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping({"/update/{archiveId}/{type}/{id}"})
|
|
|
|
|
public String update(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) {
|
|
|
|
|
mmap.put("archiveTypeId", archiveId);
|
|
|
|
|
mmap.put("type", type);
|
|
|
|
|
mmap.put("id", id);
|
|
|
|
|
return this.prefix + "/update";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequiresPermissions({"dajs:jsgl:fileUpload"})
|
|
|
|
|
@GetMapping({"/uploadFile/{archiveId}/{type}/{id}"})
|
|
|
|
|
public String uploadFile(@PathVariable("archiveId") long archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) {
|
|
|
|
|
long tableId = TableUtil.getTableIdByArchiveTypeId(archiveId);
|
|
|
|
|
mmap.put("tableId", Long.valueOf(tableId));
|
|
|
|
|
mmap.put("id", id);
|
|
|
|
|
return this.prefix + "/uploadFile";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping({"/fileUpload"})
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public Map<String, Object> fileUpload(@RequestParam("file") MultipartFile[] files, long tableId, long id) {
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
|
boolean res = false;
|
|
|
|
|
try {
|
|
|
|
|
res = this.jsglService.uploadFile(files, tableId, id);
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
map.put("res", Boolean.valueOf(res));
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping({"/appendAddForm/{archiveId}/{type}"})
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public String appendAddForm(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type) {
|
|
|
|
|
return this.jsglService.appendAddForm(archiveId, type);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Log(title = "接收管理-档案新增", businessType = BusinessType.INSERT)
|
|
|
|
|
@PostMapping({"/add"})
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public AjaxResult addSave(@Validated String archiveStr, @Validated String archiveId, @Validated String type) {
|
|
|
|
|
if (StringUtils.isEmpty(archiveStr)) {
|
|
|
|
|
return error("提交数据为空,新增失败!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
boolean flag = this.jsglService.addSave(archiveStr, archiveId, type);
|
|
|
|
|
if (flag) {
|
|
|
|
|
return toAjax(true);
|
|
|
|
|
}
|
|
|
|
|
return toAjax(false);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
return toAjax(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Log(title = "接收管理-档案修改", businessType = BusinessType.UPDATE)
|
|
|
|
|
@PostMapping({"/update"})
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public AjaxResult update(@Validated String archiveStr, @Validated String archiveTypeId, @Validated String type, @Validated String id) {
|
|
|
|
|
if (StringUtils.isEmpty(archiveStr)) {
|
|
|
|
|
return error("提交数据为空,新增失败!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
boolean flag = this.jsglService.update(archiveStr, archiveTypeId, type, id);
|
|
|
|
|
if (flag) {
|
|
|
|
|
return toAjax(true);
|
|
|
|
|
}
|
|
|
|
|
return toAjax(false);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
return toAjax(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Log(title = "接收管理-档案删除", businessType = BusinessType.DELETE)
|
|
|
|
|
@PostMapping({"/delete"})
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public AjaxResult delete(@Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids) {
|
|
|
|
|
boolean flag = false;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
String deleteType = this.configService.selectConfigByKey("archive.deleteDataType");
|
|
|
|
|
if (deleteType.equals("1")) {
|
|
|
|
|
|
|
|
|
|
flag = this.jsglService.archiveLogicDelete(query, archiveTypeId, type, ids);
|
|
|
|
|
} else if (deleteType.equals("2")) {
|
|
|
|
|
|
|
|
|
|
flag = this.jsglService.archivePhysicalDelete(query, archiveTypeId, type, ids);
|
|
|
|
|
} else {
|
|
|
|
|
return error("请在\"系统参数\"中配置\"档案条目删除方式\"!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (Exception ex) {
|
|
|
|
|
System.out.println("档案删除出现异常:" + ex.getMessage());
|
|
|
|
|
return error("删除失败!");
|
|
|
|
|
}
|
|
|
|
|
if (flag) {
|
|
|
|
|
return success("删除成功!");
|
|
|
|
|
}
|
|
|
|
|
return error("删除失败!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Log(title = "接收管理-整理入库", businessType = BusinessType.ZLRK)
|
|
|
|
|
@PostMapping({"/zlrk"})
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public AjaxResult zlrk(@Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids) {
|
|
|
|
|
boolean flag = false;
|
|
|
|
|
try {
|
|
|
|
|
flag = this.jsglService.rzlk(query, archiveTypeId, type, ids);
|
|
|
|
|
} catch (Exception ex) {
|
|
|
|
|
System.out.println("入管理库出现异常:" + ex.getMessage());
|
|
|
|
|
return error("入管理库失败!");
|
|
|
|
|
}
|
|
|
|
|
if (flag) {
|
|
|
|
|
return success("入管理库成功!");
|
|
|
|
|
}
|
|
|
|
|
return error("入管理库失败!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping({"/appendAddFormByDataId/{archiveTypeId}/{type}/{id}/{readOnly}"})
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public String appendAddFormByDataId(@PathVariable("archiveTypeId") String archiveTypeId, @PathVariable("type") String type, @PathVariable("id") String id, @PathVariable("readOnly") String readOnly) {
|
|
|
|
|
return this.jsglService.appendAddFormByDataId(archiveTypeId, type, id, readOnly);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping({"/folderFile/{archiveId}/{id}"})
|
|
|
|
|
public String folderFile(@PathVariable("archiveId") String archiveId, @PathVariable("id") String id, ModelMap mmap) {
|
|
|
|
|
mmap.put("archiveId", archiveId);
|
|
|
|
|
mmap.put("folderId", id);
|
|
|
|
|
|
|
|
|
|
DictType dictType = new DictType(); dictType.setLabel("column_bind");
|
|
|
|
|
List<DictType> dictTypeList = this.dictTypeService.selectDictTypeList(dictType);
|
|
|
|
|
Map<String, List<DictData>> dictDataMap = new HashMap<>();
|
|
|
|
|
for (DictType dictTypeTemp : dictTypeList) {
|
|
|
|
|
List<DictData> dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType());
|
|
|
|
|
dictDataMap.put(dictTypeTemp.getDictType(), dictDatas);
|
|
|
|
|
}
|
|
|
|
|
mmap.put("dictDataMap", dictDataMap);
|
|
|
|
|
return this.prefix + "/jnwj";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\jsgl\controller\JsglController.class
|
|
|
|
|
|