|
|
@ -6,6 +6,7 @@ import com.yxt.common.core.result.ResultBean; |
|
|
|
import com.yxt.supervise.portal.api.storein.StoreIn; |
|
|
|
import com.yxt.supervise.portal.api.storein.StoreInItem; |
|
|
|
import com.yxt.supervise.portal.api.storein.StoreInWithItemDto; |
|
|
|
import com.yxt.supervise.portal.biz.inventoryinformation.InventoryInformationService; |
|
|
|
import com.yxt.supervise.portal.extexcel.ExcelUtil; |
|
|
|
import com.yxt.supervise.portal.extexcel.HSSFRowReader; |
|
|
|
import org.apache.poi.hssf.usermodel.HSSFRow; |
|
|
@ -14,6 +15,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.io.BufferedInputStream; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.InputStream; |
|
|
@ -28,7 +30,8 @@ public class StoreInService extends MybatisBaseService<StoreInMapper, StoreIn> { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private StoreInItemService storeInItemService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
private InventoryInformationService inventoryInformationService; |
|
|
|
public ResultBean importXlsFromFilePath(String xlsFilePath) { |
|
|
|
BufferedInputStream bis = FileUtil.getInputStream(xlsFilePath); |
|
|
|
return importXlsFromInputStream(bis); |
|
|
@ -60,6 +63,8 @@ public class StoreInService extends MybatisBaseService<StoreInMapper, StoreIn> { |
|
|
|
map.put(c_f, dto); |
|
|
|
} |
|
|
|
StoreInItem item = createStoreInItemFromRow(row); |
|
|
|
inventoryInformationService.increaseStock(item.getProductCode(), |
|
|
|
dto.getStoreIn().getStoreCode(),item.getInNumber()+""); |
|
|
|
dto.getItemList().add(item); |
|
|
|
} |
|
|
|
|
|
|
|