diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsMaterialDetailController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsMaterialDetailController.java
index 7fcfca6..4d8dfc2 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsMaterialDetailController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsMaterialDetailController.java
@@ -106,7 +106,7 @@ public class EhsMaterialDetailController extends BaseController
ehsMaterial = new EhsMaterial();
ehsMaterial.setMaterialQuantity(ehsMaterialDetail.getOperateType()==1?result2.toString():null);
ehsMaterial.setMaterialId(ehsMaterialDetail.getMaterialId());
- ehsMaterialDetail.setInventory(result2);
+ ehsMaterialDetail.setInventory(ehsMaterialDetail.getOperateType()==1?result2:string1);
ehsMaterialDetailService.save(ehsMaterialDetail);//
return toAjax(ehsMaterialService.updateById(ehsMaterial));
}
diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsMaterialDetailMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsMaterialDetailMapper.xml
index ac3b062..bf0f18d 100644
--- a/ruoyi-system/src/main/resources/mapper/ehs/EhsMaterialDetailMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsMaterialDetailMapper.xml
@@ -47,6 +47,7 @@
and operate_type = #{operateType}
and (outbound_user_id is null or outbound_user_id ='')
+ order by material_detail_id desc