Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/RecyclingApplicationComparator.java =================================================================== diff -u -r19103 -r19124 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/RecyclingApplicationComparator.java (.../RecyclingApplicationComparator.java) (revision 19103) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/RecyclingApplicationComparator.java (.../RecyclingApplicationComparator.java) (revision 19124) @@ -159,8 +159,16 @@ updateMsg.append(String.format("物品【%s】申请数量从【%s】改成【%s】,", newTousseItemDto.getName(), oldAmount, newAmount)); } //回收数量 - if(oldTousseItemDto.getRecyclingAmount() == null || oldTousseItemDto.getRecyclingAmount() <= 0){ + if(oldTousseItemDto.getRecyclingAmount() == null){ if(newTousseItemDto.getRecyclingAmount() != null && newTousseItemDto.getRecyclingAmount().intValue() > 0){ + updateMsg.append(String.format("物品【%s】,回收数量为【%d】,", + newTousseItemDto.getName(), newTousseItemDto.getRecyclingAmount())); + }else if(newTousseItemDto.getRecyclingAmount() == null || newTousseItemDto.getRecyclingAmount() <= 0){ + updateMsg.append(String.format("物品【%s】回收被删除,", oldTousseItemDto.getName())); + } + }else if(oldTousseItemDto.getRecyclingAmount() <= 0){ + //删除后添加 + if(newTousseItemDto.getRecyclingAmount() != null && newTousseItemDto.getRecyclingAmount().intValue() > 0){ updateMsg.append(String.format("新增物品【%s】,回收数量为【%d】,", newTousseItemDto.getName(), newTousseItemDto.getRecyclingAmount())); }