ccjgmwz 3 سال پیش
والد
کامیت
8a121a64f4

+ 5 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CostManagementInfoServiceImpl.java

@@ -42,9 +42,13 @@ public class CostManagementInfoServiceImpl extends ServiceImpl<CostManagementInf
      */
      */
     @Override
     @Override
     public List<CostManagementInfo> selectCostManagementInfo(CostManagementInfo costManagementInfo) {
     public List<CostManagementInfo> selectCostManagementInfo(CostManagementInfo costManagementInfo) {
+        String compId = costManagementInfo.getCompId();
+        if(compId == null){
+            compId = AuthSecurityUtils.getCurrentUserInfo().getCompId();
+        }
         Wrapper<CostManagementInfo> costManagementInfoWrapper = new EntityWrapper<>();
         Wrapper<CostManagementInfo> costManagementInfoWrapper = new EntityWrapper<>();
         costManagementInfoWrapper.eq("warehouse_type", costManagementInfo.getWarehouseType())
         costManagementInfoWrapper.eq("warehouse_type", costManagementInfo.getWarehouseType())
-                                 .eq("comp_id", AuthSecurityUtils.getCurrentUserInfo().getCompId());
+                                 .eq("comp_id", compId);
         if (costManagementInfo.getWarehouseId()!=null&&!costManagementInfo.getWarehouseId().isEmpty()){
         if (costManagementInfo.getWarehouseId()!=null&&!costManagementInfo.getWarehouseId().isEmpty()){
             costManagementInfoWrapper.eq("warehouse_id", costManagementInfo.getWarehouseId());
             costManagementInfoWrapper.eq("warehouse_id", costManagementInfo.getWarehouseId());
         }
         }