|
@@ -1,6 +1,7 @@
|
|
|
package org.jeecg.modules.oa.controller;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
+import java.util.Collection;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -17,6 +18,7 @@ import org.jeecg.common.system.query.QueryGenerator;
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
|
import org.jeecg.modules.oa.entity.SealArchives;
|
|
|
import org.jeecg.modules.oa.entity.SealDestroy;
|
|
|
+import org.jeecg.modules.oa.entity.SealTurn;
|
|
|
import org.jeecg.modules.oa.service.ISealArchivesService;
|
|
|
import org.jeecg.modules.oa.service.ISealDestroyService;
|
|
|
|
|
@@ -127,7 +129,14 @@ public class SealDestroyController extends JeecgController<SealDestroy, ISealDes
|
|
|
@AutoLog(value = "销毁印章登记-通过id删除")
|
|
|
@ApiOperation(value="销毁印章登记-通过id删除", notes="销毁印章登记-通过id删除")
|
|
|
@DeleteMapping(value = "/delete")
|
|
|
+ @Transactional
|
|
|
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
|
|
+ SealDestroy sealDestroy = sealDestroyService.getById(id);
|
|
|
+ String sealId = sealDestroy.getSealId();
|
|
|
+ SealArchives sealArchives = sealArchivesService.getById(sealId);
|
|
|
+ sealArchives.setDestroyDate(null);
|
|
|
+ sealArchives.setSealStatus("正在使用");
|
|
|
+ sealArchivesService.updateById(sealArchives);
|
|
|
sealDestroyService.removeById(id);
|
|
|
return Result.ok("删除成功!");
|
|
|
}
|
|
@@ -142,6 +151,15 @@ public class SealDestroyController extends JeecgController<SealDestroy, ISealDes
|
|
|
@ApiOperation(value="销毁印章登记-批量删除", notes="销毁印章登记-批量删除")
|
|
|
@DeleteMapping(value = "/deleteBatch")
|
|
|
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
|
|
+ //变更印章档案数据
|
|
|
+ Collection<SealDestroy> sealTurnList = sealDestroyService.listByIds(Arrays.asList(ids.split(",")));
|
|
|
+ for(SealDestroy sealDestroy:sealTurnList){
|
|
|
+ String sealId = sealDestroy.getSealId();
|
|
|
+ SealArchives sealArchives = sealArchivesService.getById(sealId);
|
|
|
+ sealArchives.setDestroyDate(null);
|
|
|
+ sealArchives.setSealStatus("正在使用");
|
|
|
+ sealArchivesService.updateById(sealArchives);
|
|
|
+ }
|
|
|
this.sealDestroyService.removeByIds(Arrays.asList(ids.split(",")));
|
|
|
return Result.ok("批量删除成功!");
|
|
|
}
|