123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- package com.jsh.erp.service;
- import com.alibaba.fastjson.JSONArray;
- import com.alibaba.fastjson.JSONObject;
- import com.baomidou.mybatisplus.extension.service.IService;
- import com.jsh.erp.datasource.dto.MaterialDto;
- import com.jsh.erp.datasource.entities.*;
- import com.jsh.erp.datasource.pda.dto.PDAInventoryDTO;
- import com.jsh.erp.datasource.pda.vo.PDADepotItemVO;
- import com.jsh.erp.datasource.vo.MaterialCurrentStock4SystemSku;
- import com.jsh.erp.datasource.pda.vo.PDATypeTree;
- import com.jsh.erp.datasource.vo.MaterialWarnListVo;
- import com.jsh.erp.datasource.vo.TaskStocktakingItemVO;
- import com.jsh.erp.utils.BaseResponseInfo;
- import org.springframework.transaction.annotation.Transactional;
- import org.springframework.web.multipart.MultipartFile;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import java.math.BigDecimal;
- import java.util.List;
- import java.util.Map;
- public interface MaterialService extends IService<Material> {
- Material getMaterial(long id)throws Exception;
- List<Material> getMaterialListByIds(String ids)throws Exception;
- List<Material> getMaterial() throws Exception;
- /**
- * 查询商品管理-商品信息列表查询
- */
- List<MaterialVo4Unit> select(String materialParam, String standard, String model, String color, String brand, String mfrs,
- String materialOther, String weight, String expiryNum, String enableSerialNumber,
- String enableBatchNumber, String position, String enabled, String remark, String categoryId,
- String mpList)
- throws Exception;
- /**
- * 新增商品
- * @param obj
- */
- @Transactional(value = "transactionManager", rollbackFor = Exception.class)
- int insertMaterial(MaterialDto obj, HttpServletRequest request)throws Exception;
- /**
- * 修改商品
- * @param obj
- */
- @Transactional(value = "transactionManager", rollbackFor = Exception.class)
- int updateMaterial(MaterialDto obj, HttpServletRequest request) throws Exception;
- @Transactional(value = "transactionManager", rollbackFor = Exception.class)
- int deleteMaterial(Long id, HttpServletRequest request)throws Exception;
- @Transactional(value = "transactionManager", rollbackFor = Exception.class)
- int batchDeleteMaterial(String ids, HttpServletRequest request)throws Exception;
- @Transactional(value = "transactionManager", rollbackFor = Exception.class)
- int batchDeleteMaterialByIds(String ids) throws Exception;
- int checkIsNameExist(Long id, String name)throws Exception;
- int checkIsExist(Long id, String name, String model, String color, String standard, String mfrs,
- String otherField1, String otherField2, String otherField3, String unit, Long unitId)throws Exception;
- @Transactional(value = "transactionManager", rollbackFor = Exception.class)
- int batchSetStatus(Boolean status, String ids)throws Exception;
- Unit findUnit(Long mId)throws Exception;
- List<MaterialVo4Unit> findById(Long id)throws Exception;
- List<MaterialVo4Unit> findByIdWithBarCode(Long meId)throws Exception;
- List<Long> getListByParentId(Long parentId);
- List<Long> getIdListByParentId(List<Long> idList, Long parentId);
- JSONArray getMaterialByParam(String materialParam);
- List<MaterialVo4Unit> findBySelectWithBarCode(Long categoryId, String q, String standardOrModel, String color,
- String brand, String mfrs, String enableSerialNumber, String enableBatchNumber,
- Integer offset, Integer rows, Long depotId) throws Exception;
- int findBySelectWithBarCodeCount(Long categoryId, String q, String standardOrModel, String color,
- String brand, String mfrs, String enableSerialNumber, String enableBatchNumber, Long depotId) throws Exception;
- void exportExcel(String categoryId, String materialParam, String color, String materialOther, String weight,
- String expiryNum, String enabled, String enableSerialNumber, String enableBatchNumber,
- String remark, HttpServletResponse response)throws Exception;
- @Transactional(value = "transactionManager", rollbackFor = Exception.class)
- BaseResponseInfo importExcel(MultipartFile file, HttpServletRequest request) throws Exception;
- void batchCheckExistMaterialListByParam(List<MaterialWithInitStock> mList, String name, String standard,
- String model, String color, String unit, String sku);
- void batchCheckExistBarCodeByParam(List<MaterialWithInitStock> mList,
- String barCode, String manyBarCode) throws Exception;
- @Transactional(value = "transactionManager", rollbackFor = Exception.class)
- void insertOrUpdateMaterialExtend(JSONObject materialExObj, String type, String defaultFlag, Long mId, User user) throws Exception;
- String getBasicBarCode(MaterialWithInitStock m);
- List<Material> getMaterialListByParam(String name, String standard, String model, String color, String unit, Long unitId, String basicBarCode) throws Exception;
- @Transactional(value = "transactionManager", rollbackFor = Exception.class)
- void insertCurrentStockByMaterialAndDepot(Long depotId, Long mId, BigDecimal stock);
- @Transactional(value = "transactionManager", rollbackFor = Exception.class)
- void batchDeleteInitialStockByMaterialList(List<Long> mIdList);
- @Transactional(value = "transactionManager", rollbackFor = Exception.class)
- void batchDeleteCurrentStockByMaterialList(List<Long> mIdList);
- List<MaterialVo4Unit> getMaterialEnableSerialNumberList(String q, Integer offset, Integer rows)throws Exception;
- Long getMaterialEnableSerialNumberCount(String q)throws Exception;
- BigDecimal parseBigDecimalEx(String str) throws Exception;
- BigDecimal parsePrice(String price, String ratio) throws Exception;
- BigDecimal getInitStockByMidAndDepotList(List<Long> depotList, Long materialId);
- BigDecimal getInitStock(Long materialId, Long depotId);
- BigDecimal getCurrentStockByMaterialIdAndDepotId(Long materialId, Long depotId);
- Map<Long,BigDecimal> getInitialStockMapByMaterialList(List<MaterialVo4Unit> list);
- Map<Long,BigDecimal> getCurrentStockMapByMaterialList(List<MaterialVo4Unit> list);
- /**
- * 根据商品和仓库获取安全库存信息
- * @param materialId 商品id
- * @param depotId 仓库id
- * @return
- */
- MaterialInitialStock getSafeStock(Long materialId, Long depotId);
- List<MaterialVo4Unit> getMaterialByMeId(Long meId);
- String getMaxBarCode();
- List<String> getMaterialNameList();
- List<MaterialVo4Unit> getMaterialByBarCode(String barCode);
- List<MaterialVo4Unit> getMaterialByBarCode(List<String> barCodeList);
- List<MaterialVo4Unit> getMaterialByBarCodeAndWithOutMId(String barCode, Long mId);
- List<MaterialInitialStockWithMaterial> getInitialStockWithMaterial(List<Long> depotList);
- List<MaterialVo4Unit> getListWithStock(List<Long> depotList, List<Long> idList, String position, String materialParam,
- Boolean moveAvgPriceFlag, Integer zeroStock, String column, String order,
- Integer offset, Integer rows) throws Exception;
- int getListWithStockCount(List<Long> depotList, List<Long> idList, String position, String materialParam, Integer zeroStock);
- MaterialVo4Unit getTotalStockAndPrice(List<Long> depotList, List<Long> idList, String position, String materialParam);
- String getBigUnitStock(BigDecimal stock, Long unitId) throws Exception;
- String getMaterialOtherByParam(String[] mpArr, MaterialVo4Unit m);
- @Transactional(value = "transactionManager", rollbackFor = Exception.class)
- int batchSetMaterialCurrentStock(String ids) throws Exception;
- @Transactional(value = "transactionManager", rollbackFor = Exception.class)
- int batchSetMaterialCurrentUnitPrice(String ids) throws Exception;
- int batchUpdate(JSONObject jsonObject);
- MaterialExtend getMaterialExtendBySerialNumber(String serialNumber);
- List<TaskStocktakingItemVO> getMaterialByBatchNumber(String batchNumber);
- Material getMaterialById(Long id);
- List<MaterialVo4Unit> getMaterialBySystemSku(List<String> systemSkuList);
- List<MaterialCurrentStock4SystemSku> getMaterialCurrentPriceByIdList(List<Long> idList);
- /**
- * 获取商品提醒
- * @return
- */
- MaterialWarnListVo getMaterialWarn();
- /**
- * 导入商品信息
- * @param file excel表格
- * @return
- */
- BaseResponseInfo importExcelTwo(MultipartFile file, HttpServletRequest request) throws Exception;
- /**
- * PDA库存查询
- * pdaInventoryDTO
- * @return
- */
- List<PDADepotItemVO> inventoryInquiry(PDAInventoryDTO pdaInventoryDTO);
- /**
- * 根据库位查询商品id集合
- * @param position
- * @return
- */
- List<Long> selectMaterialIdByPosition(String position);
- /**
- * 根据类型id查询子类型集合
- * @param id 类型id
- * @return
- */
- List<Long> selectCategoryIds(Long id);
- /**
- * 查询库位树
- */
- List<PDATypeTree> selectPosition();
- /**
- * 获取仓库id、商品id获取商品库位信息
- * @param did 仓库id
- * @param mid 商品id
- * @return 库位
- */
- String getPositionByDidAndMid(Long did, Long mid);
- /**
- * 根据商品id查询商品库存
- * @param mid 商品id
- * @return 商品库存
- */
- BigDecimal getMaterialStockByMid(Long mid);
- }
|