添加出库时开启序列号的商品强制附加使用序列号
This commit is contained in:
@@ -101,87 +101,6 @@ public interface DepotHeadMapper {
|
||||
*/
|
||||
int updateByPrimaryKey(DepotHead record);
|
||||
|
||||
List<DepotHeadVo4List> selectByConditionDepotHead(
|
||||
@Param("type") String type,
|
||||
@Param("subType") String subType,
|
||||
@Param("number") String number,
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("dhIds") String dhIds,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByDepotHead(
|
||||
@Param("type") String type,
|
||||
@Param("subType") String subType,
|
||||
@Param("number") String number,
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("dhIds") String dhIds);
|
||||
|
||||
Long getMaxId();
|
||||
|
||||
String findMaterialsListByHeaderId(
|
||||
@Param("id") Long id);
|
||||
|
||||
List<DepotHeadVo4InDetail> findByAll(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("type") String type,
|
||||
@Param("pid") Integer pid,
|
||||
@Param("dids") String dids,
|
||||
@Param("oId") Integer oId,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int findByAllCount(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("type") String type,
|
||||
@Param("pid") Integer pid,
|
||||
@Param("dids") String dids,
|
||||
@Param("oId") Integer oId);
|
||||
|
||||
List<DepotHeadVo4InOutMCount> findInOutMaterialCount(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("type") String type,
|
||||
@Param("pid") Integer pid,
|
||||
@Param("dids") String dids,
|
||||
@Param("oId") Integer oId,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int findInOutMaterialCountTotal(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("type") String type,
|
||||
@Param("pid") Integer pid,
|
||||
@Param("dids") String dids,
|
||||
@Param("oId") Integer oId);
|
||||
|
||||
List<DepotHeadVo4StatementAccount> findStatementAccount(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("organId") Integer organId,
|
||||
@Param("supType") String supType,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int findStatementAccountCount(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("organId") Integer organId,
|
||||
@Param("supType") String supType);
|
||||
|
||||
BigDecimal findAllMoney(
|
||||
@Param("supplierId") Integer supplierId,
|
||||
@Param("type") String type,
|
||||
@Param("subType") String subType,
|
||||
@Param("modeName") String modeName,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
List<DepotHeadVo4List> getDetailByNumber(
|
||||
@Param("number") String number);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.jsh.erp.datasource.mappers;
|
||||
|
||||
import com.jsh.erp.datasource.entities.DepotHead;
|
||||
import com.jsh.erp.datasource.vo.DepotHeadVo4InDetail;
|
||||
import com.jsh.erp.datasource.vo.DepotHeadVo4InOutMCount;
|
||||
import com.jsh.erp.datasource.vo.DepotHeadVo4List;
|
||||
import com.jsh.erp.datasource.vo.DepotHeadVo4StatementAccount;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description
|
||||
*
|
||||
* @Author: cjl
|
||||
* @Date: 2019/1/25 14:50
|
||||
*/
|
||||
public interface DepotHeadMapperEx {
|
||||
List<DepotHeadVo4List> selectByConditionDepotHead(
|
||||
@Param("type") String type,
|
||||
@Param("subType") String subType,
|
||||
@Param("number") String number,
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("dhIds") String dhIds,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByDepotHead(
|
||||
@Param("type") String type,
|
||||
@Param("subType") String subType,
|
||||
@Param("number") String number,
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("dhIds") String dhIds);
|
||||
|
||||
Long getMaxId();
|
||||
|
||||
String findMaterialsListByHeaderId(
|
||||
@Param("id") Long id);
|
||||
|
||||
List<DepotHeadVo4InDetail> findByAll(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("type") String type,
|
||||
@Param("pid") Integer pid,
|
||||
@Param("dids") String dids,
|
||||
@Param("oId") Integer oId,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int findByAllCount(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("type") String type,
|
||||
@Param("pid") Integer pid,
|
||||
@Param("dids") String dids,
|
||||
@Param("oId") Integer oId);
|
||||
|
||||
List<DepotHeadVo4InOutMCount> findInOutMaterialCount(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("type") String type,
|
||||
@Param("pid") Integer pid,
|
||||
@Param("dids") String dids,
|
||||
@Param("oId") Integer oId,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int findInOutMaterialCountTotal(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("type") String type,
|
||||
@Param("pid") Integer pid,
|
||||
@Param("dids") String dids,
|
||||
@Param("oId") Integer oId);
|
||||
|
||||
List<DepotHeadVo4StatementAccount> findStatementAccount(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("organId") Integer organId,
|
||||
@Param("supType") String supType,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int findStatementAccountCount(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("organId") Integer organId,
|
||||
@Param("supType") String supType);
|
||||
|
||||
BigDecimal findAllMoney(
|
||||
@Param("supplierId") Integer supplierId,
|
||||
@Param("type") String type,
|
||||
@Param("subType") String subType,
|
||||
@Param("modeName") String modeName,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
List<DepotHeadVo4List> getDetailByNumber(
|
||||
@Param("number") String number);
|
||||
/**
|
||||
* 新增单据主表信息,并反显单据主表id
|
||||
* */
|
||||
int adddepotHead(DepotHead depotHead);
|
||||
/**
|
||||
* 更新单据主表信息
|
||||
* */
|
||||
void updatedepotHead(DepotHead depotHead);
|
||||
}
|
||||
@@ -96,123 +96,6 @@ public interface DepotItemMapper {
|
||||
*/
|
||||
int updateByPrimaryKey(DepotItem record);
|
||||
|
||||
List<DepotItem> selectByConditionDepotItem(
|
||||
@Param("name") String name,
|
||||
@Param("type") Integer type,
|
||||
@Param("remark") String remark,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByDepotItem(
|
||||
@Param("name") String name,
|
||||
@Param("type") Integer type,
|
||||
@Param("remark") String remark);
|
||||
|
||||
List<DepotItemVo4HeaderId> getHeaderIdByMaterial(
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotIds") String depotIds);
|
||||
|
||||
List<DepotItemVo4DetailByTypeAndMId> findDetailByTypeAndMaterialIdList(
|
||||
@Param("mId") Long mId,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int findDetailByTypeAndMaterialIdCounts(
|
||||
@Param("mId") Long mId);
|
||||
|
||||
List<DepotItemVo4Material> findStockNumByMaterialIdList(
|
||||
@Param("mId") Long mId,
|
||||
@Param("monthTime") String monthTime,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int findStockNumByMaterialIdCounts(
|
||||
@Param("mId") Long mId,
|
||||
@Param("monthTime") String monthTime);
|
||||
|
||||
int findByTypeAndMaterialIdIn(
|
||||
@Param("mId") Long mId);
|
||||
|
||||
int findByTypeAndMaterialIdOut(
|
||||
@Param("mId") Long mId);
|
||||
|
||||
List<DepotItemVo4WithInfoEx> getDetailList(
|
||||
@Param("headerId") Long headerId);
|
||||
|
||||
List<DepotItemVo4WithInfoEx> findByAll(
|
||||
@Param("headIds") String headIds,
|
||||
@Param("materialIds") String materialIds,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int findByAllCount(
|
||||
@Param("headIds") String headIds,
|
||||
@Param("materialIds") String materialIds);
|
||||
|
||||
BigDecimal findByTypeInIsPrev(
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime);
|
||||
|
||||
BigDecimal findByTypeInIsNotPrev(
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime);
|
||||
|
||||
BigDecimal findByTypeOutIsPrev(
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime);
|
||||
|
||||
BigDecimal findByTypeOutIsNotPrev(
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime);
|
||||
|
||||
|
||||
|
||||
BigDecimal findPriceByTypeInIsPrev(
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime);
|
||||
|
||||
BigDecimal findPriceByTypeInIsNotPrev(
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime);
|
||||
|
||||
BigDecimal findPriceByTypeOutIsPrev(
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime);
|
||||
|
||||
BigDecimal findPriceByTypeOutIsNotPrev(
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime);
|
||||
|
||||
BigDecimal buyOrSaleNumber(
|
||||
@Param("type") String type,
|
||||
@Param("subType") String subType,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime,
|
||||
@Param("sumType") String sumType);
|
||||
|
||||
BigDecimal buyOrSalePrice(
|
||||
@Param("type") String type,
|
||||
@Param("subType") String subType,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime,
|
||||
@Param("sumType") String sumType);
|
||||
|
||||
BigDecimal findGiftByTypeIn(
|
||||
@Param("subType") String subType,
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId);
|
||||
|
||||
BigDecimal findGiftByTypeOut(
|
||||
@Param("subType") String subType,
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
package com.jsh.erp.datasource.mappers;
|
||||
|
||||
import com.jsh.erp.datasource.entities.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description
|
||||
*
|
||||
* @Author: cjl
|
||||
* @Date: 2019/1/24 16:59
|
||||
*/
|
||||
public interface DepotItemMapperEx {
|
||||
List<DepotItem> selectByConditionDepotItem(
|
||||
@Param("name") String name,
|
||||
@Param("type") Integer type,
|
||||
@Param("remark") String remark,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByDepotItem(
|
||||
@Param("name") String name,
|
||||
@Param("type") Integer type,
|
||||
@Param("remark") String remark);
|
||||
|
||||
List<DepotItemVo4HeaderId> getHeaderIdByMaterial(
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotIds") String depotIds);
|
||||
|
||||
List<DepotItemVo4DetailByTypeAndMId> findDetailByTypeAndMaterialIdList(
|
||||
@Param("mId") Long mId,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int findDetailByTypeAndMaterialIdCounts(
|
||||
@Param("mId") Long mId);
|
||||
|
||||
List<DepotItemVo4Material> findStockNumByMaterialIdList(
|
||||
@Param("mId") Long mId,
|
||||
@Param("monthTime") String monthTime,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int findStockNumByMaterialIdCounts(
|
||||
@Param("mId") Long mId,
|
||||
@Param("monthTime") String monthTime);
|
||||
|
||||
int findByTypeAndMaterialIdIn(
|
||||
@Param("mId") Long mId);
|
||||
|
||||
int findByTypeAndMaterialIdOut(
|
||||
@Param("mId") Long mId);
|
||||
|
||||
List<DepotItemVo4WithInfoEx> getDetailList(
|
||||
@Param("headerId") Long headerId);
|
||||
|
||||
List<DepotItemVo4WithInfoEx> findByAll(
|
||||
@Param("headIds") String headIds,
|
||||
@Param("materialIds") String materialIds,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int findByAllCount(
|
||||
@Param("headIds") String headIds,
|
||||
@Param("materialIds") String materialIds);
|
||||
|
||||
BigDecimal findByTypeInIsPrev(
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime);
|
||||
|
||||
BigDecimal findByTypeInIsNotPrev(
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime);
|
||||
|
||||
BigDecimal findByTypeOutIsPrev(
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime);
|
||||
|
||||
BigDecimal findByTypeOutIsNotPrev(
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime);
|
||||
|
||||
|
||||
|
||||
BigDecimal findPriceByTypeInIsPrev(
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime);
|
||||
|
||||
BigDecimal findPriceByTypeInIsNotPrev(
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime);
|
||||
|
||||
BigDecimal findPriceByTypeOutIsPrev(
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime);
|
||||
|
||||
BigDecimal findPriceByTypeOutIsNotPrev(
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime);
|
||||
|
||||
BigDecimal buyOrSaleNumber(
|
||||
@Param("type") String type,
|
||||
@Param("subType") String subType,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime,
|
||||
@Param("sumType") String sumType);
|
||||
|
||||
BigDecimal buyOrSalePrice(
|
||||
@Param("type") String type,
|
||||
@Param("subType") String subType,
|
||||
@Param("MId") Long MId,
|
||||
@Param("MonthTime") String MonthTime,
|
||||
@Param("sumType") String sumType);
|
||||
|
||||
BigDecimal findGiftByTypeIn(
|
||||
@Param("subType") String subType,
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId);
|
||||
|
||||
BigDecimal findGiftByTypeOut(
|
||||
@Param("subType") String subType,
|
||||
@Param("ProjectId") Integer ProjectId,
|
||||
@Param("MId") Long MId);
|
||||
/**
|
||||
* create by: cjl
|
||||
* description:
|
||||
* 通过单据主表id查询所有单据子表数据
|
||||
* create time: 2019/1/24 16:56
|
||||
* @Param: depotheadId
|
||||
* @return java.util.List<com.jsh.erp.datasource.entities.DepotItem>
|
||||
*/
|
||||
List<DepotItem> findDepotItemListBydepotheadId(@Param("depotheadId")Long depotheadId,
|
||||
@Param("enableSerialNumber")String enableSerialNumber);
|
||||
/**
|
||||
* 根据单据主表id删除单据子表数据
|
||||
* */
|
||||
int deleteDepotItemByDepotHeadIds(@Param("depotheadIds")Long []depotHeadIds);
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.jsh.erp.datasource.mappers;
|
||||
|
||||
import com.jsh.erp.datasource.entities.SerialNumber;
|
||||
import com.jsh.erp.datasource.entities.SerialNumberEx;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -42,4 +42,19 @@ public interface SerialNumberMapperEx {
|
||||
* 未删除为卖出的视为有效
|
||||
* */
|
||||
int findSerialNumberByMaterialId(@Param("materialId") Long materialId);
|
||||
/**
|
||||
* 查询符合条件的序列号数量
|
||||
* */
|
||||
int countSerialNumberByMaterialIdAndDepotheadId(@Param("materialId")Long materialId, @Param("depotheadId")Long depotheadId, @Param("isSell")String isSell);
|
||||
/**
|
||||
* 卖出: update jsh_serial_number set is_Sell='1' ,depothead_Id='depotheadId' where 1=1 and material_Id='materialId'
|
||||
* and is_Sell !='1' and delete_Flag !='1' {limit 0,count}
|
||||
* */
|
||||
int sellSerialNumber(@Param("materialId")Long materialId, @Param("depotheadId")Long depotheadId,@Param("count")Integer count, @Param("updateTime") Date updateTime,@Param("updater") Long updater);
|
||||
/**
|
||||
* 赎回:update jsh_serial_number set is_Sell='0' where 1=1 and material_Id='materialId'
|
||||
* and depothead_Id='depotheadId' and is_Sell !='0' and delete_Flag !='1' {limit 0,count}
|
||||
* */
|
||||
int cancelSerialNumber(@Param("materialId")Long materialId, @Param("depotheadId")Long depotheadId, @Param("count")Integer count, @Param("updateTime") Date updateTime,@Param("updater") Long updater);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user