|
|
@@ -1,6 +1,7 @@
|
|
|
package com.usoftchina.saas.document.service.Impl;
|
|
|
|
|
|
import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
|
|
|
+import com.usoftchina.saas.context.BaseContextHolder;
|
|
|
import com.usoftchina.saas.document.entities.Warehouse;
|
|
|
import com.usoftchina.saas.document.mapper.WarehouseMapper;
|
|
|
|
|
|
@@ -8,6 +9,7 @@ import com.usoftchina.saas.document.service.WarehouseService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
|
@Service
|
|
|
@@ -21,4 +23,18 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
|
|
|
warehouseMapper.callProcedure(map);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public boolean validPeriod(String period) {
|
|
|
+ long companyId = BaseContextHolder.getCompanyId();
|
|
|
+ Map<String, Object> map = new HashMap<String, Object>();
|
|
|
+ map.put("companyId", companyId);
|
|
|
+ map.put("period", period);
|
|
|
+ Short status = warehouseMapper.validPeriod(map);
|
|
|
+ if(status != null && status == 0){
|
|
|
+ return true;
|
|
|
+ }else{
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|