Bladeren bron

上缴印章和销毁印章外键

xieyn 1 jaar geleden
bovenliggende
commit
b67cd7a796

+ 5 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/controller/SealDestroyController.java

@@ -108,7 +108,12 @@ public class SealDestroyController extends JeecgController<SealDestroy, ISealDes
 	@AutoLog(value = "销毁印章登记-编辑")
 	@ApiOperation(value="销毁印章登记-编辑", notes="销毁印章登记-编辑")
 	@PutMapping(value = "/edit")
+	@Transactional
 	public Result<?> edit(@RequestBody SealDestroy sealDestroy) {
+		UpdateWrapper<SealArchives> updateWrapper =  new UpdateWrapper<>();
+		updateWrapper.eq("id",sealDestroy.getSealId());
+		updateWrapper.set("destroy_date",sealDestroy.getDestroyDate());
+		sealArchivesService.update(updateWrapper);
 		sealDestroyService.updateById(sealDestroy);
 		return Result.ok("编辑成功!");
 	}

+ 21 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/controller/SealTurnController.java

@@ -109,7 +109,12 @@ public class SealTurnController extends JeecgController<SealTurn, ISealTurnServi
 	@AutoLog(value = "上缴印章-编辑")
 	@ApiOperation(value="上缴印章-编辑", notes="上缴印章-编辑")
 	@PutMapping(value = "/edit")
+	@Transactional
 	public Result<?> edit(@RequestBody SealTurn sealTurn) {
+		UpdateWrapper<SealArchives> updateWrapper =  new UpdateWrapper<>();
+		updateWrapper.eq("id",sealTurn.getSealId());
+		updateWrapper.set("turn_date",sealTurn.getTurnDate());
+		sealArchivesService.update(updateWrapper);
 		sealTurnService.updateById(sealTurn);
 		return Result.ok("编辑成功!");
 	}
@@ -182,4 +187,20 @@ public class SealTurnController extends JeecgController<SealTurn, ISealTurnServi
         return super.importExcel(request, response, SealTurn.class);
     }
 
+
+	 /**
+	  *   通过id删除
+	  *
+	  * @param sealTurn
+	  * @return
+	  */
+	 @AutoLog(value = "上缴印章-通过id删除")
+	 @ApiOperation(value="上缴印章-通过id删除", notes="上缴印章-通过id删除")
+	 @DeleteMapping(value = "/deletes")
+	 public Result<?> deletes(@RequestBody SealTurn sealTurn) {
+		 System.out.println(sealTurn);
+//		 sealTurnService.removeById(id);
+		 return Result.ok("删除成功!");
+	 }
+
 }

+ 0 - 1
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/SealDestroy.java

@@ -98,7 +98,6 @@ public class SealDestroy implements Serializable {
 	@Excel(name = "附件", width = 15)
     @ApiModelProperty(value = "附件")
     private String file;
-    @TableField(exist = false)
     @ApiModelProperty(value = "印章id")
     public String sealId;
 }

+ 0 - 1
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/SealTurn.java

@@ -115,7 +115,6 @@ public class SealTurn implements Serializable {
 	@Excel(name = "附件", width = 15)
     @ApiModelProperty(value = "附件")
     private String file;
-    @TableField(exist = false)
     @ApiModelProperty(value = "印章id")
     public String sealId;