瀏覽代碼

测试bug修改

xiaof 2 年之前
父節點
當前提交
71c966cdae
共有 25 個文件被更改,包括 146 次插入106 次删除
  1. 2 0
      paper-library-business/src/main/java/com/qmth/paper/library/business/mapper/PaperLibraryMapper.java
  2. 1 1
      paper-library-business/src/main/java/com/qmth/paper/library/business/service/PaperArchivesService.java
  3. 1 1
      paper-library-business/src/main/java/com/qmth/paper/library/business/service/PaperArchivesTypeService.java
  4. 2 2
      paper-library-business/src/main/java/com/qmth/paper/library/business/service/PaperLibraryCommonService.java
  5. 17 10
      paper-library-business/src/main/java/com/qmth/paper/library/business/service/impl/PaperArchivesServiceImpl.java
  6. 28 21
      paper-library-business/src/main/java/com/qmth/paper/library/business/service/impl/PaperArchivesTypeServiceImpl.java
  7. 12 6
      paper-library-business/src/main/java/com/qmth/paper/library/business/service/impl/PaperLibraryCommonServiceImpl.java
  8. 14 7
      paper-library-business/src/main/java/com/qmth/paper/library/business/service/impl/PaperLibraryServiceImpl.java
  9. 1 1
      paper-library-business/src/main/resources/mapper/PaperArchivesMapper.xml
  10. 5 1
      paper-library-business/src/main/resources/mapper/PaperLibraryMapper.xml
  11. 2 2
      paper-library-common/src/main/java/com/qmth/paper/library/common/service/BasicSemesterService.java
  12. 1 1
      paper-library-common/src/main/java/com/qmth/paper/library/common/service/SysRoleService.java
  13. 15 14
      paper-library-common/src/main/java/com/qmth/paper/library/common/service/impl/BasicSemesterServiceImpl.java
  14. 12 8
      paper-library-common/src/main/java/com/qmth/paper/library/common/service/impl/SysRoleServiceImpl.java
  15. 2 2
      paper-library/src/main/java/com/qmth/paper/library/api/BasicSemesterController.java
  16. 7 5
      paper-library/src/main/java/com/qmth/paper/library/api/BasicStudentController.java
  17. 0 1
      paper-library/src/main/java/com/qmth/paper/library/api/ClientController.java
  18. 0 1
      paper-library/src/main/java/com/qmth/paper/library/api/ConditionController.java
  19. 2 2
      paper-library/src/main/java/com/qmth/paper/library/api/PaperArchivesController.java
  20. 2 2
      paper-library/src/main/java/com/qmth/paper/library/api/PaperArchivesTypeController.java
  21. 5 5
      paper-library/src/main/java/com/qmth/paper/library/api/PaperScanTaskController.java
  22. 3 3
      paper-library/src/main/java/com/qmth/paper/library/api/SysOrgController.java
  23. 2 2
      paper-library/src/main/java/com/qmth/paper/library/api/SysRoleController.java
  24. 7 5
      paper-library/src/main/java/com/qmth/paper/library/api/SysUserController.java
  25. 3 3
      sql/paper-library-1.0.0.sql

+ 2 - 0
paper-library-business/src/main/java/com/qmth/paper/library/business/mapper/PaperLibraryMapper.java

@@ -32,4 +32,6 @@ public interface PaperLibraryMapper extends BaseMapper<PaperLibrary> {
     IPage<TaskStudentResult> listByStudentCode(@Param("page") Page<TaskStudentResult> page, @Param("schoolId") Long schoolId, @Param("studentCode") String studentCode);
 
     IPage<TaskStudentResult> pageStudent(@Param("objectPage") Page<Object> objectPage, @Param("schoolId") Long schoolId, @Param("paperScanTaskId") Long paperScanTaskId, @Param("param") String param);
+
+    int countByPaperScanTaskDetailId(Long paperScanTaskDetailId);
 }

+ 1 - 1
paper-library-business/src/main/java/com/qmth/paper/library/business/service/PaperArchivesService.java

@@ -20,7 +20,7 @@ public interface PaperArchivesService extends IService<PaperArchives> {
 
     boolean saveData(PaperArchives paperArchives);
 
-    boolean delete(Long id);
+    boolean delete(String ids);
 
     List<SelectResult> queryManagerOrg(Long semesterId);
 

+ 1 - 1
paper-library-business/src/main/java/com/qmth/paper/library/business/service/PaperArchivesTypeService.java

@@ -18,7 +18,7 @@ public interface PaperArchivesTypeService extends IService<PaperArchivesType> {
 
     boolean saveData(PaperArchivesType paperArchivesType);
 
-    boolean delete(Long id);
+    boolean delete(String ids);
 
     List<SelectResult> queryArchivesType();
 }

+ 2 - 2
paper-library-business/src/main/java/com/qmth/paper/library/business/service/PaperLibraryCommonService.java

@@ -54,10 +54,10 @@ public interface PaperLibraryCommonService {
     /**
      * 机构删除
      *
-     * @param id
+     * @param ids
      * @return
      */
-    boolean sysOrgRemove(Long id);
+    boolean sysOrgRemove(String ids);
 
     /**
      * 保存任务

+ 17 - 10
paper-library-business/src/main/java/com/qmth/paper/library/business/service/impl/PaperArchivesServiceImpl.java

@@ -15,11 +15,11 @@ import com.qmth.paper.library.business.service.PaperArchivesService;
 import com.qmth.paper.library.business.service.PaperLibraryService;
 import com.qmth.paper.library.business.service.PaperScanTaskService;
 import com.qmth.paper.library.common.contant.SystemConstant;
-import com.qmth.paper.library.common.entity.SysUser;
 import com.qmth.paper.library.common.enums.ExceptionResultEnum;
 import com.qmth.paper.library.common.enums.RoleTypeEnum;
 import com.qmth.paper.library.common.util.ServletUtil;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.List;
@@ -82,18 +82,25 @@ public class PaperArchivesServiceImpl extends ServiceImpl<PaperArchivesMapper, P
         }
     }
 
+    @Transactional
     @Override
-    public boolean delete(Long id) {
-        PaperArchives paperArchives = this.getById(id);
-        if (paperArchives == null) {
-            throw ExceptionResultEnum.ERROR.exception("数据有误");
-        }
+    public boolean delete(String ids) {
+        String[] idsArray = ids.split(",");
+        for (String id : idsArray) {
+            Long idLong = Long.valueOf(id);
+            PaperArchives paperArchives = this.getById(idLong);
+            if (paperArchives == null) {
+                throw ExceptionResultEnum.ERROR.exception("数据有误");
+            }
 
-        List<PaperScanTask> paperScanTaskList = paperScanTaskService.listByPaperArchivesId(id);
-        if (!paperScanTaskList.isEmpty()) {
-            throw ExceptionResultEnum.ERROR.exception("已有扫描任务,不能删除");
+            List<PaperScanTask> paperScanTaskList = paperScanTaskService.listByPaperArchivesId(idLong);
+            if (!paperScanTaskList.isEmpty()) {
+                throw ExceptionResultEnum.ERROR.exception("已有扫描任务,不能删除");
+            }
+            this.removeById(idLong);
         }
-        return this.removeById(id);
+
+        return true;
     }
 
     @Override

+ 28 - 21
paper-library-business/src/main/java/com/qmth/paper/library/business/service/impl/PaperArchivesTypeServiceImpl.java

@@ -14,6 +14,7 @@ import com.qmth.paper.library.common.contant.SystemConstant;
 import com.qmth.paper.library.common.enums.ExceptionResultEnum;
 import com.qmth.paper.library.common.util.ServletUtil;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.List;
@@ -56,34 +57,40 @@ public class PaperArchivesTypeServiceImpl extends ServiceImpl<PaperArchivesTypeM
         }
         // 修改
         else {
-            if (archivesType == null) {
-                throw ExceptionResultEnum.ERROR.exception("数据有误");
-            } else if (!paperArchivesType.getId().equals(archivesType.getId())) {
+            if (archivesType != null && !paperArchivesType.getId().equals(archivesType.getId())) {
                 throw ExceptionResultEnum.ERROR.exception("类型名称已存在");
             }
-            archivesType.setName(paperArchivesType.getName());
-            archivesType.setUpdateId(userId);
-            archivesType.setUpdateTime(System.currentTimeMillis());
-            return this.updateById(archivesType);
+            PaperArchivesType oldPaperArchivesType = this.getById(paperArchivesType.getId());
+
+            oldPaperArchivesType.setName(paperArchivesType.getName());
+            oldPaperArchivesType.setUpdateId(userId);
+            oldPaperArchivesType.setUpdateTime(System.currentTimeMillis());
+            return this.updateById(oldPaperArchivesType);
         }
     }
 
+    @Transactional
     @Override
-    public boolean delete(Long id) {
-        PaperArchivesType paperArchivesType = this.getById(id);
-        if (paperArchivesType == null) {
-            throw ExceptionResultEnum.ERROR.exception("数据有误");
-        }
-        // 已使用不能删除
-        QueryWrapper<PaperArchives> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(PaperArchives::getSchoolId, paperArchivesType.getSchoolId())
-                .eq(PaperArchives::getArchivesTypeId, id);
-        int count = paperArchivesService.count(queryWrapper);
-        if(count != 0){
-            throw ExceptionResultEnum.ERROR.exception("档案类型已使用,不能删除");
-        }
+    public boolean delete(String ids) {
+        String[] idsArray = ids.split(",");
+        for (String id : idsArray) {
+            Long idLong = Long.valueOf(id);
+            PaperArchivesType paperArchivesType = this.getById(idLong);
+            if (paperArchivesType == null) {
+                throw ExceptionResultEnum.ERROR.exception("数据有误");
+            }
+            // 已使用不能删除
+            QueryWrapper<PaperArchives> queryWrapper = new QueryWrapper<>();
+            queryWrapper.lambda().eq(PaperArchives::getSchoolId, paperArchivesType.getSchoolId())
+                    .eq(PaperArchives::getArchivesTypeId, idLong);
+            int count = paperArchivesService.count(queryWrapper);
+            if (count != 0) {
+                throw ExceptionResultEnum.ERROR.exception("档案类型已使用,不能删除");
+            }
 
-        return this.removeById(id);
+            this.removeById(idLong);
+        }
+        return true;
     }
 
     @Override

+ 12 - 6
paper-library-business/src/main/java/com/qmth/paper/library/business/service/impl/PaperLibraryCommonServiceImpl.java

@@ -219,17 +219,23 @@ public class PaperLibraryCommonServiceImpl implements PaperLibraryCommonService
     /**
      * 机构删除
      *
-     * @param id
+     * @param ids
      * @return
      */
+    @Transactional
     @Override
-    public boolean sysOrgRemove(Long id) {
-        // 机构校验
-        validateOrg(id);
-        boolean result = sysOrgService.removeById(id);
+    public boolean sysOrgRemove(String ids) {
+        String[] idsArray = ids.split(",");
+        for (String id : idsArray) {
+            Long idLong = Long.valueOf(id);
+            // 机构校验
+            validateOrg(idLong);
+            sysOrgService.removeById(idLong);
+        }
         Long schoolId = SystemConstant.convertIdToLong(String.valueOf(ServletUtil.getRequestHeaderSchoolId()));
         commonCacheService.removeOrgCollegeLevelCache(schoolId);
-        return result;
+
+        return true;
     }
 
     private void validateOrg(Long id) {

+ 14 - 7
paper-library-business/src/main/java/com/qmth/paper/library/business/service/impl/PaperLibraryServiceImpl.java

@@ -100,16 +100,23 @@ public class PaperLibraryServiceImpl extends ServiceImpl<PaperLibraryMapper, Pap
             throw ExceptionResultEnum.ERROR.exception("绑定对象有误,图片已删除,请刷新数据再试");
         }
 
-        // 更新已绑定状态
-        if (!paperScanTaskDetail.getBind()) {
-            paperScanTaskDetail.setBind(true);
-            paperScanTaskDetailService.updateById(paperScanTaskDetail);
-        }
-
         UpdateWrapper<PaperLibrary> updateWrapper = new UpdateWrapper<>();
         updateWrapper.lambda().set(PaperLibrary::getPaperScanTaskDetailId, paperScanTaskDetailId)
                 .eq(PaperLibrary::getId, paperLibraryId);
-        return this.update(updateWrapper);
+        this.update(updateWrapper);
+
+        // 更新已绑定状态
+        if (paperLibrary.getPaperScanTaskDetailId() != null) {
+            PaperScanTaskDetail oldPaperScanTaskDetail = paperScanTaskDetailService.getById(paperLibrary.getPaperScanTaskDetailId());
+            // 查询是否有绑定试卷
+            int count = this.baseMapper.countByPaperScanTaskDetailId(paperLibrary.getPaperScanTaskDetailId());
+            oldPaperScanTaskDetail.setBind(count > 0);
+            paperScanTaskDetailService.updateById(oldPaperScanTaskDetail);
+        }
+        paperScanTaskDetail.setBind(true);
+        paperScanTaskDetailService.updateById(paperScanTaskDetail);
+
+        return true;
     }
 
     @Override

+ 1 - 1
paper-library-business/src/main/resources/mapper/PaperArchivesMapper.xml

@@ -78,7 +78,7 @@
     </select>
     <select id="queryManagerOrg" resultType="com.qmth.paper.library.business.bean.result.SelectResult">
         SELECT
-            distinct pa.manager_id id, so.name
+            distinct pa.manager_org_id id, so.name
         FROM
             paper_archives pa
                 LEFT JOIN

+ 5 - 1
paper-library-business/src/main/resources/mapper/PaperLibraryMapper.xml

@@ -54,7 +54,8 @@
              FROM
                  paper_library
              WHERE
-                 paper_scan_task_detail_id IS NOT NULL) pl
+                 paper_scan_task_detail_id IS NOT NULL
+            GROUP BY paper_scan_task_detail_id) pl
                 JOIN
             paper_scan_task_detail pstd ON pl.school_id = pstd.school_id
                 AND pl.paper_scan_task_detail_id = pstd.id
@@ -162,4 +163,7 @@
             </if>
         </where>
     </select>
+    <select id="countByPaperScanTaskDetailId" resultType="java.lang.Integer">
+        select count(1) from paper_library where paper_scan_task_detail_id = #{paperScanTaskDetailId}
+    </select>
 </mapper>

+ 2 - 2
paper-library-common/src/main/java/com/qmth/paper/library/common/service/BasicSemesterService.java

@@ -51,10 +51,10 @@ public interface BasicSemesterService extends IService<BasicSemester> {
     /**
      * 学期删除
      *
-     * @param id 学期主键
+     * @param ids 学期主键
      * @return 是否删除成功
      */
-    boolean deleteBasicSemesterById(Long id);
+    boolean deleteBasicSemesterById(String ids);
 
     /**
      * 查询学期

+ 1 - 1
paper-library-common/src/main/java/com/qmth/paper/library/common/service/SysRoleService.java

@@ -35,7 +35,7 @@ public interface SysRoleService extends IService<SysRole> {
 
     boolean remove(Long id);
 
-    boolean removeReport(Long id);
+    boolean removeReport(String id);
 
     List<Long> getUserRoles(Long userId);
 

+ 15 - 14
paper-library-common/src/main/java/com/qmth/paper/library/common/service/impl/BasicSemesterServiceImpl.java

@@ -7,21 +7,20 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.paper.library.common.bean.params.BasicSemesterParams;
 import com.qmth.paper.library.common.bean.result.BasicSemesterResult;
-import com.qmth.paper.library.common.enums.ExceptionResultEnum;
-import com.qmth.paper.library.common.util.ServletUtil;
 import com.qmth.paper.library.common.contant.SystemConstant;
 import com.qmth.paper.library.common.entity.BasicSemester;
 import com.qmth.paper.library.common.entity.SysUser;
+import com.qmth.paper.library.common.enums.ExceptionResultEnum;
 import com.qmth.paper.library.common.mapper.BasicSemesterMapper;
 import com.qmth.paper.library.common.service.BasicSemesterService;
+import com.qmth.paper.library.common.util.ServletUtil;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.CollectionUtils;
 
 import javax.annotation.Resource;
 import java.util.List;
 import java.util.Objects;
-import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -46,7 +45,7 @@ public class BasicSemesterServiceImpl extends ServiceImpl<BasicSemesterMapper, B
     @Override
     public Long saveBasicSemester(BasicSemesterParams basicSemesterParams) throws IllegalAccessException {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        return basicSemesterService.saveBasicSemesterCommon(basicSemesterParams, sysUser.getSchoolId(),false);
+        return basicSemesterService.saveBasicSemesterCommon(basicSemesterParams, sysUser.getSchoolId(), false);
     }
 
     /**
@@ -54,7 +53,6 @@ public class BasicSemesterServiceImpl extends ServiceImpl<BasicSemesterMapper, B
      *
      * @param basicSemesterParams
      * @param schoolId
-     * @param orgId
      * @return
      * @throws IllegalAccessException
      */
@@ -71,10 +69,10 @@ public class BasicSemesterServiceImpl extends ServiceImpl<BasicSemesterMapper, B
                 .eq(BasicSemester::getSchoolId, schoolId)
                 .eq(BasicSemester::getName, semesterName));
         if (Objects.nonNull(checkName) && !checkName.getId().equals(id)) {
-            if (openApi){
+            if (openApi) {
                 // 如果是开放接口(分布式印刷推学期给教研分析),就算没有教研分析学期id,只要名称一致就视为编辑
                 id = checkName.getId();
-            }else {
+            } else {
                 throw ExceptionResultEnum.ERROR.exception("学期名称【" + semesterName + "】重复");
             }
         }
@@ -103,15 +101,18 @@ public class BasicSemesterServiceImpl extends ServiceImpl<BasicSemesterMapper, B
 
     @Transactional
     @Override
-    public boolean deleteBasicSemesterById(Long id) {
-        if (SystemConstant.longNotNull(id)) {
-            if (this.baseMapper.countBasicExamBySemesterId(id) > 0) {
+    public boolean deleteBasicSemesterById(String ids) {
+        String[] idsArrary = ids.split(",");
+        for (String id : idsArrary) {
+            if (StringUtils.isBlank(id)) {
+                throw ExceptionResultEnum.ERROR.exception("ID为空");
+            }
+            if (this.baseMapper.countBasicExamBySemesterId(Long.valueOf(id)) > 0) {
                 throw ExceptionResultEnum.ERROR.exception("学期中包含档案信息,不能删除");
             }
-            return this.removeById(id);
-        } else {
-            return true;
+            this.removeById(id);
         }
+        return true;
     }
 
     @Override

+ 12 - 8
paper-library-common/src/main/java/com/qmth/paper/library/common/service/impl/SysRoleServiceImpl.java

@@ -297,16 +297,20 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
 
     @Transactional
     @Override
-    public boolean removeReport(Long id) {
-        //删除权限
-        sysRolePrivilegeService.removeByRoleId(id);
-        this.removeById(id);
+    public boolean removeReport(String ids) {
+        String[] idsArray = ids.split(",");
+        for (String id : idsArray) {
+            Long idLong = Long.valueOf(id);
+            //删除权限
+            sysRolePrivilegeService.removeByRoleId(idLong);
+            this.removeById(idLong);
 
-        // 删除用户角色
-        sysUserRoleService.removeByRoleId(id);
+            // 删除用户角色
+            sysUserRoleService.removeByRoleId(idLong);
 
-        commonCacheService.removeRoleCache(id);
-        commonCacheService.removeRolePrivilegeCache(id);
+            commonCacheService.removeRoleCache(idLong);
+            commonCacheService.removeRolePrivilegeCache(idLong);
+        }
         return true;
     }
 

+ 2 - 2
paper-library/src/main/java/com/qmth/paper/library/api/BasicSemesterController.java

@@ -55,8 +55,8 @@ public class BasicSemesterController {
     @ApiOperation(value = "学期管理-删除(逻辑)")
     @RequestMapping(value = "/delete", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "删除成功", response = EditResult.class)})
-    public Result deleteBasicSemester(@ApiParam(value = "学期id", required = true) @RequestParam String id) {
-        return ResultUtil.ok(basicSemesterService.deleteBasicSemesterById(SystemConstant.convertIdToLong(id)));
+    public Result deleteBasicSemester(@ApiParam(value = "学期id", required = true) @RequestParam String ids) {
+        return ResultUtil.ok(basicSemesterService.deleteBasicSemesterById(ids));
     }
 
 }

+ 7 - 5
paper-library/src/main/java/com/qmth/paper/library/api/BasicStudentController.java

@@ -1,8 +1,6 @@
 package com.qmth.paper.library.api;
 
 
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.paper.library.business.bean.result.EditResult;
 import com.qmth.paper.library.business.service.PaperLibraryCommonService;
@@ -27,8 +25,11 @@ import javax.annotation.Resource;
 import javax.validation.Valid;
 import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
+import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 /**
  * <p>
@@ -76,9 +77,10 @@ public class BasicStudentController {
     @ApiOperation(value = "学生基本信息管理-批量删除(物理)")
     @RequestMapping(value = "/delete_batch", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "删除成功", response = EditResult.class)})
-    public Result deleteBasicStudent(@RequestBody String data) {
-        JSONObject object = JSON.parseObject(data, JSONObject.class);
-        return ResultUtil.ok(basicStudentService.removeBasicStudentBatch(JSON.parseArray(object.getString("ids"), Long.class)));
+    public Result deleteBasicStudent(@RequestParam String ids) {
+        String[] idsArray = ids.split(",");
+        List<Long> longList = Stream.of(idsArray).map(Long::parseLong).collect(Collectors.toList());
+        return ResultUtil.ok(basicStudentService.removeBasicStudentBatch(longList));
     }
 
     @ApiOperation(value = "学生基本信息管理-根据条件删除(物理)")

+ 0 - 1
paper-library/src/main/java/com/qmth/paper/library/api/ClientController.java

@@ -40,7 +40,6 @@ import java.util.Objects;
 @RestController
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/${prefix.url.client}")
 @Validated
-@Aac(auth = BOOL.FALSE)
 public class ClientController {
 
     @Resource

+ 0 - 1
paper-library/src/main/java/com/qmth/paper/library/api/ConditionController.java

@@ -40,7 +40,6 @@ import java.util.stream.Stream;
 @RestController
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/${prefix.url.common}")
 @Validated
-@Aac(auth = BOOL.FALSE)
 public class ConditionController {
 
     @Resource

+ 2 - 2
paper-library/src/main/java/com/qmth/paper/library/api/PaperArchivesController.java

@@ -74,8 +74,8 @@ public class PaperArchivesController {
     @ApiOperation(value = "删除")
     @PostMapping("/delete")
     @ApiResponses({@ApiResponse(code = 200, message = "删除成功", response = Result.class)})
-    public Result delete(@ApiParam(value = "主键") @RequestParam(required = false) Long id) {
-        return ResultUtil.ok(paperArchivesService.delete(id));
+    public Result delete(@ApiParam(value = "主键") @RequestParam String ids) {
+        return ResultUtil.ok(paperArchivesService.delete(ids));
     }
 
 }

+ 2 - 2
paper-library/src/main/java/com/qmth/paper/library/api/PaperArchivesTypeController.java

@@ -54,8 +54,8 @@ public class PaperArchivesTypeController {
     @ApiOperation(value = "删除")
     @PostMapping("/delete")
     @ApiResponses({@ApiResponse(code = 200, message = "删除成功", response = Result.class)})
-    public Result delete(@ApiParam(value = "主键") @RequestParam(required = false) Long id) {
-        return ResultUtil.ok(paperArchivesTypeService.delete(id));
+    public Result delete(@ApiParam(value = "主键") @RequestParam String ids) {
+        return ResultUtil.ok(paperArchivesTypeService.delete(ids));
     }
 
 }

+ 5 - 5
paper-library/src/main/java/com/qmth/paper/library/api/PaperScanTaskController.java

@@ -1,7 +1,5 @@
 package com.qmth.paper.library.api;
 
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.paper.library.business.bean.params.PaperScanTaskParam;
 import com.qmth.paper.library.business.bean.result.EditResult;
@@ -29,6 +27,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Objects;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 /**
  * @Description: 试卷扫描任务管理
@@ -75,10 +74,11 @@ public class PaperScanTaskController {
     @ApiOperation(value = "扫描任务管理-批量删除(物理)")
     @RequestMapping(value = "/delete_batch", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "删除成功", response = EditResult.class)})
-    public Result deletePaperScanTask(@RequestBody String data) {
+    public Result deletePaperScanTask(@RequestParam String ids) {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        JSONObject object = JSON.parseObject(data, JSONObject.class);
-        paperScanTaskService.deletePaperScanTaskByIdList(JSON.parseArray(object.getString("ids"), Long.class), sysUser);
+        String[] idsArray = ids.split(",");
+        List<Long> longList = Stream.of(idsArray).map(Long::parseLong).collect(Collectors.toList());
+        paperScanTaskService.deletePaperScanTaskByIdList(longList, sysUser);
         return ResultUtil.ok();
     }
 

+ 3 - 3
paper-library/src/main/java/com/qmth/paper/library/api/SysOrgController.java

@@ -86,13 +86,13 @@ public class SysOrgController {
     /**
      * 删除
      *
-     * @param org
+     * @param ids
      * @return
      */
     @ApiOperation(value = "删除")
     @RequestMapping(value = "/remove", method = RequestMethod.POST)
-    public Result remove(@RequestBody SysOrg org) {
-        return ResultUtil.ok(paperLibraryCommonService.sysOrgRemove(org.getId()));
+    public Result remove(@RequestParam String ids) {
+        return ResultUtil.ok(paperLibraryCommonService.sysOrgRemove(ids));
     }
 
     /**

+ 2 - 2
paper-library/src/main/java/com/qmth/paper/library/api/SysRoleController.java

@@ -99,8 +99,8 @@ public class SysRoleController {
      */
     @ApiOperation(value = "删除")
     @RequestMapping(value = "/remove", method = RequestMethod.POST)
-    public Result remove(@RequestParam(value = "id", required = true) Long id) {
-        return ResultUtil.ok(sysRoleService.removeReport(id));
+    public Result remove(@RequestParam String ids) {
+        return ResultUtil.ok(sysRoleService.removeReport(ids));
     }
 
     /**

+ 7 - 5
paper-library/src/main/java/com/qmth/paper/library/api/SysUserController.java

@@ -1,7 +1,5 @@
 package com.qmth.paper.library.api;
 
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
 import com.qmth.boot.api.annotation.Aac;
 import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.boot.api.constant.ApiConstant;
@@ -25,6 +23,9 @@ import javax.validation.Valid;
 import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
 import java.security.NoSuchAlgorithmException;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 /**
  * <p>
@@ -116,9 +117,10 @@ public class SysUserController {
      */
     @ApiOperation(value = "删除")
     @PostMapping("/remove")
-    public Result remove(@RequestBody String data) {
-        JSONObject object = JSON.parseObject(data, JSONObject.class);
-        return ResultUtil.ok(sysUserService.delete(JSON.parseArray(object.getString("ids"), Long.class)));
+    public Result remove(@RequestParam String ids) {
+        String[] idsArray = ids.split(",");
+        List<Long> longList = Stream.of(idsArray).map(Long::parseLong).collect(Collectors.toList());
+        return ResultUtil.ok(sysUserService.delete(longList));
     }
 
     /**

+ 3 - 3
sql/paper-library-1.0.0.sql

@@ -368,8 +368,8 @@ INSERT INTO `sys_privilege` VALUES (5, '用户管理', 'UserManage', 'MENU', 2,
 INSERT INTO `sys_privilege` VALUES (6, '角色管理', 'RoleManage', 'MENU', 2, 3, NULL, NULL, 1, 0, 1);
 INSERT INTO `sys_privilege` VALUES (7, '权限管理', 'MenuManage', 'MENU', 129, 6, NULL, NULL, 0, 1, 1);
 INSERT INTO `sys_privilege` VALUES (8, '档案管理', 'archives', 'MENU', 1, 2, NULL, NULL, 1, 0, 1);
-INSERT INTO `sys_privilege` VALUES (9, '档案管理', 'ArchivesManage', 'MENU', 8, 1, NULL, NULL, 1, 0, 1);
-INSERT INTO `sys_privilege` VALUES (10, '列表', 'List', 'LIST', 9, 1, 'AUTH', '15', 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (9, '档案管理', 'ArchivesManage', 'MENU', 8, 1, NULL, '37,410', 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (10, '列表', 'List', 'LIST', 9, 1, 'AUTH', '15,410', 1, 0, 1);
 INSERT INTO `sys_privilege` VALUES (11, '新增', 'Add', 'BUTTON', 9, 2, 'AUTH', '16', 1, 0, 1);
 INSERT INTO `sys_privilege` VALUES (12, '编辑', 'Edit', 'LINK', 9, 3, 'AUTH', '16', 1, 0, 1);
 INSERT INTO `sys_privilege` VALUES (13, '查看', 'Detail', 'LINK', 9, 4, 'AUTH', '17,29', 1, 0, 1);
@@ -380,7 +380,7 @@ INSERT INTO `sys_privilege` VALUES (17, '查看详情接口', '/api/admin/paper/
 INSERT INTO `sys_privilege` VALUES (18, '删除接口', '/api/admin/paper/archives/delete', 'URL', 9, 4, 'AUTH', NULL, 1, 1, 1);
 INSERT INTO `sys_privilege` VALUES (19, '数据检查', 'library', 'MENU', 1, 4, NULL, NULL, 1, 0, 1);
 INSERT INTO `sys_privilege` VALUES (20, '数据检查', 'LibraryManage', 'MENU', 19, 1, NULL, NULL, 1, 0, 1);
-INSERT INTO `sys_privilege` VALUES (21, '列表', 'List', 'LIST', 20, 1, 'AUTH', '23,24,25,26,29', 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (21, '列表', 'List', 'LIST', 20, 1, 'AUTH', '23,24,25,26,29,410', 1, 0, 1);
 INSERT INTO `sys_privilege` VALUES (22, '开始处理', 'Deal', 'BUTTON', 20, 2, 'AUTH', '27,28,34,35', 1, 0, 1);
 INSERT INTO `sys_privilege` VALUES (23, '未处理接口', '/api/admin/paper/library/page_unbind', 'URL', 20, 1, 'AUTH', NULL, 1, 1, 1);
 INSERT INTO `sys_privilege` VALUES (24, '未处理数量接口', '/api/admin/paper/library/count_unbind', 'URL', 20, 2, 'AUTH', NULL, 1, 1, 1);