Procházet zdrojové kódy

违纪类型BUG FIX

lideyin před 5 roky
rodič
revize
386892bdcd

+ 2 - 21
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/IllegallyTypeController.java

@@ -182,25 +182,6 @@ public class IllegallyTypeController extends ControllerSupport {
         return list;
     }
 
-    /**
-     * 方法注释
-     *
-     * @param orgId
-     * @param code
-     * @return
-     * @author WANGWEI
-     */
-    @ApiOperation(value = "查询违纪类型")
-    @GetMapping("byCode")
-    public IllegallyTypeEntity getByCode(@RequestParam Long orgId, @RequestParam String code) {
-        IllegallyTypeEntity specialty = illegallyTypeRepo.findByRootOrgIdAndCode(orgId, code);
-        if (null == specialty) {
-            throw new StatusException("620002", "违纪类型不存在");
-        }
-        validateRootOrgIsolation(specialty.getRootOrgId());
-        return specialty;
-    }
-
     /**
      * 修正
      *
@@ -211,7 +192,7 @@ public class IllegallyTypeController extends ControllerSupport {
     @ApiOperation(value = "新增违纪类型", notes = "新增")
     @PostMapping
     @Transactional
-    public Long addSpecialty(@RequestBody IllegallyTypeDomain domain) {
+    public Long addIllegallyType(@RequestBody IllegallyTypeDomain domain) {
         trim(domain, true);
 
         User accessUser = getAccessUser();
@@ -304,7 +285,7 @@ public class IllegallyTypeController extends ControllerSupport {
     @ApiOperation(value = "导入", notes = "导入")
     @PostMapping("import")
     @Transactional
-    public Map<String, Object> importSpecialty(@RequestParam CommonsMultipartFile file) {
+    public Map<String, Object> importIllegallyType(@RequestParam CommonsMultipartFile file) {
         DiskFileItem item = (DiskFileItem) file.getFileItem();
         File storeLocation = item.getStoreLocation();
         List<Map<String, Object>> failRecords = illegallyTypeService.importIllegallyType(getRootOrgId(),

+ 1 - 0
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/IllegallyTypeServiceImpl.java

@@ -62,6 +62,7 @@ public class IllegallyTypeServiceImpl implements IllegallyTypeService {
                 }
                 entity = new IllegallyTypeEntity();
 
+                entity.setCode(code);
                 entity.setName(name);
                 entity.setRootOrgId(rootOrgId);
                 entity.setEnable(true);