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.entities.*; import com.jsh.erp.datasource.vo.DepotItemStockWarningCount; import com.jsh.erp.datasource.vo.DepotItemVoBatchNumberList; import com.jsh.erp.datasource.vo.InOutPriceVo; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletRequest; import java.math.BigDecimal; import java.util.List; import java.util.Map; public interface DepotItemService extends IService { DepotItem getDepotItem(long id)throws Exception; List getDepotItem()throws Exception; List select(String name, Integer type, String remark, int offset, int rows)throws Exception; Long countDepotItem(String name, Integer type, String remark) throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) int insertDepotItem(JSONObject obj, HttpServletRequest request)throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) int updateDepotItem(JSONObject obj, HttpServletRequest request)throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) int deleteDepotItem(Long id, HttpServletRequest request)throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) int batchDeleteDepotItem(String ids, HttpServletRequest request)throws Exception; int checkIsNameExist(Long id, String name)throws Exception; List findDetailByDepotIdsAndMaterialIdList(String depotIds, Boolean forceFlag, Boolean inOutManageFlag, String sku, String batchNumber, String number, String beginTime, String endTime, Long mId, Integer offset, Integer rows)throws Exception; Long findDetailByDepotIdsAndMaterialIdCount(String depotIds, Boolean forceFlag, Boolean inOutManageFlag, String sku, String batchNumber, String number, String beginTime, String endTime, Long mId)throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) int insertDepotItemWithObj(DepotItem depotItem)throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) int updateDepotItemWithObj(DepotItem depotItem)throws Exception; List getListByHeaderId(Long headerId)throws Exception; DepotItem getItemByHeaderIdAndMaterial(Long headerId, Long meId)throws Exception; DepotItem getPreItemByHeaderIdAndMaterial(String linkStr, Long meId, Long linkId)throws Exception; List getDetailList(Long headerId)throws Exception; List getInOutStock(String materialParam, List categoryIdList, String endTime, Integer offset, Integer rows)throws Exception; int getInOutStockCount(String materialParam, List categoryIdList, String endTime)throws Exception; List getListWithBuyOrSale(String materialParam, String billType, String beginTime, String endTime, String[] creatorArray, Long organId, String[] organArray, List categoryList, List depotList, Boolean forceFlag, Integer offset, Integer rows)throws Exception; int getListWithBuyOrSaleCount(String materialParam, String billType, String beginTime, String endTime, String[] creatorArray, Long organId, String[] organArray, List categoryList, List depotList, Boolean forceFlag)throws Exception; BigDecimal buyOrSale(String type, String subType, Long MId, String beginTime, String endTime, String[] creatorArray, Long organId, String[] organArray, List depotList, Boolean forceFlag, String sumType) throws Exception; BigDecimal buyOrSalePriceTotal(String type, String subType, String materialParam, String beginTime, String endTime, String[] creatorArray, Long organId, String[] organArray, List categoryList, List depotList, Boolean forceFlag) throws Exception; List inOrOutPriceList(String beginTime, String endTime) throws Exception; /** * 保存单据子表信息 * @param rows 子表信息 * @param headerId 主表id * @param actionType 操作类型 */ @Transactional(value = "transactionManager", rollbackFor = Exception.class) void saveDetials(String rows, Long headerId, String actionType, HttpServletRequest request) throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) String getBillStatusByParam(DepotHead depotHead, String linkStr, String linkType); @Transactional(value = "transactionManager", rollbackFor = Exception.class) void changeBillStatus(String linkStr, String billStatus); @Transactional(value = "transactionManager", rollbackFor = Exception.class) void changeBillPurchaseStatus(String linkStr, String billStatus); DepotItem getDepotItemByBatchNumber(Long materialExtendId, String batchNumber); @Transactional(value = "transactionManager", rollbackFor = Exception.class) void deleteDepotItemHeadId(Long headerId)throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) void deleteOrCancelSerialNumber(String actionType, DepotHead depotHead, Long headerId) throws Exception; void checkAssembleWithMaterialType(JSONArray rowArr, String subType); @Transactional(value = "transactionManager", rollbackFor = Exception.class) void updateMaterialExtendPrice(Long meId, String subType, String billType, JSONObject rowObj) throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) List findStockWarningCount(Integer offset, Integer rows, String materialParam, List depotList, List categoryList); @Transactional(value = "transactionManager", rollbackFor = Exception.class) int findStockWarningCountTotal(String materialParam, List depotList, List categoryList); BigDecimal getSkuStockByParam(Long depotId, Long meId, String beginTime, String endTime) throws Exception; BigDecimal getStockByParam(Long depotId, Long mId, String beginTime, String endTime) throws Exception; BigDecimal getStockByParamWithDepotList(List depotList, Long mId, String beginTime, String endTime) throws Exception; Map getIntervalMapByParamWithDepotList(List depotList, Long mId, String beginTime, String endTime) throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) void updateCurrentStock(DepotItem depotItem) throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) void updateCurrentUnitPrice(DepotItem depotItem) throws Exception; void updateCurrentStockFun(Long mId, Long dId) throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) BigDecimal getFinishNumber(Long meId, Long id, Long headerId, Unit unitInfo, String materialUnit, String linkType); @Transactional(value = "transactionManager", rollbackFor = Exception.class) BigDecimal getRealFinishNumber(String currentSubType, Long meId, Long linkId, Long preHeaderId, Long currentHeaderId, Unit unitInfo, String materialUnit); List getBatchNumberList(String number, String name, Long depotId, String barCode, String batchNumber, Boolean forceFlag, Boolean inOutManageFlag) throws Exception; BigDecimal getOneBatchNumberStock(Long depotId, String barCode, String batchNumber) throws Exception; Long getCountByMaterialAndDepot(Long mId, Long depotId); JSONObject parseMapByExcelData(String barCodes, List> detailList, String prefixNo) throws Exception; BigDecimal getLastUnitPriceByParam(Long organId, Long meId, String prefixNo); BigDecimal getCurrentStockByParam(Long depotId, Long mId); String getOtherInfo(String[] mpArr, DepotItemVo4WithInfoEx diEx)throws Exception; }