优化盘点复盘的删除逻辑
This commit is contained in:
@@ -34,11 +34,12 @@ public class BusinessConstants {
|
|||||||
*/
|
*/
|
||||||
public static final Integer DEFAULT_PAGINATION_PAGE_SIZE = 10;
|
public static final Integer DEFAULT_PAGINATION_PAGE_SIZE = 10;
|
||||||
/**
|
/**
|
||||||
* 单据主表出入库类型 type 入库 出库
|
* 单据主表出入库类型 type 入库 出库 其它
|
||||||
* depothead
|
* depothead
|
||||||
* */
|
* */
|
||||||
public static final String DEPOTHEAD_TYPE_IN = "入库";
|
public static final String DEPOTHEAD_TYPE_IN = "入库";
|
||||||
public static final String DEPOTHEAD_TYPE_OUT = "出库";
|
public static final String DEPOTHEAD_TYPE_OUT = "出库";
|
||||||
|
public static final String DEPOTHEAD_TYPE_OTHER = "其它";
|
||||||
/**
|
/**
|
||||||
* 付款类型 payType //现付/预付款
|
* 付款类型 payType //现付/预付款
|
||||||
* */
|
* */
|
||||||
@@ -68,7 +69,7 @@ public class BusinessConstants {
|
|||||||
public static final String BILLS_STATUS_SKIPING = "3";
|
public static final String BILLS_STATUS_SKIPING = "3";
|
||||||
/**
|
/**
|
||||||
* 出入库分类
|
* 出入库分类
|
||||||
*采购、采购退货、其它、零售、销售、调拨等
|
*采购、采购退货、其它、零售、销售、调拨、盘点复盘等
|
||||||
* */
|
* */
|
||||||
public static final String SUB_TYPE_PURCHASE_ORDER = "采购订单";
|
public static final String SUB_TYPE_PURCHASE_ORDER = "采购订单";
|
||||||
public static final String SUB_TYPE_PURCHASE = "采购";
|
public static final String SUB_TYPE_PURCHASE = "采购";
|
||||||
@@ -79,6 +80,7 @@ public class BusinessConstants {
|
|||||||
public static final String SUB_TYPE_SALES = "销售";
|
public static final String SUB_TYPE_SALES = "销售";
|
||||||
public static final String SUB_TYPE_SALES_RETURN = "销售退货";
|
public static final String SUB_TYPE_SALES_RETURN = "销售退货";
|
||||||
public static final String SUB_TYPE_TRANSFER = "调拨";
|
public static final String SUB_TYPE_TRANSFER = "调拨";
|
||||||
|
public static final String SUB_TYPE_REPLAY = "盘点复盘";
|
||||||
/**
|
/**
|
||||||
* 批量插入sql时最大的数据条数
|
* 批量插入sql时最大的数据条数
|
||||||
* */
|
* */
|
||||||
|
|||||||
@@ -303,12 +303,14 @@ public class DepotHeadService {
|
|||||||
depotItemMapperEx.batchDeleteDepotItemByDepotHeadIds(new Long[]{depotHead.getId()});
|
depotItemMapperEx.batchDeleteDepotItemByDepotHeadIds(new Long[]{depotHead.getId()});
|
||||||
//删除单据主表信息
|
//删除单据主表信息
|
||||||
batchDeleteDepotHeadByIds(depotHead.getId().toString());
|
batchDeleteDepotHeadByIds(depotHead.getId().toString());
|
||||||
//将关联的订单置为审核状态-针对采购入库和销售出库
|
//将关联的单据置为审核状态-针对采购入库、销售出库和盘点复盘
|
||||||
if(StringUtil.isNotEmpty(depotHead.getLinkNumber())){
|
if(StringUtil.isNotEmpty(depotHead.getLinkNumber())){
|
||||||
if((BusinessConstants.DEPOTHEAD_TYPE_IN.equals(depotHead.getType()) &&
|
if((BusinessConstants.DEPOTHEAD_TYPE_IN.equals(depotHead.getType()) &&
|
||||||
BusinessConstants.SUB_TYPE_PURCHASE.equals(depotHead.getSubType()))
|
BusinessConstants.SUB_TYPE_PURCHASE.equals(depotHead.getSubType()))
|
||||||
|| (BusinessConstants.DEPOTHEAD_TYPE_OUT.equals(depotHead.getType()) &&
|
|| (BusinessConstants.DEPOTHEAD_TYPE_OUT.equals(depotHead.getType()) &&
|
||||||
BusinessConstants.SUB_TYPE_SALES.equals(depotHead.getSubType()))) {
|
BusinessConstants.SUB_TYPE_SALES.equals(depotHead.getSubType()))
|
||||||
|
|| (BusinessConstants.DEPOTHEAD_TYPE_OTHER.equals(depotHead.getType()) &&
|
||||||
|
BusinessConstants.SUB_TYPE_REPLAY.equals(depotHead.getSubType()))) {
|
||||||
DepotHead dh = new DepotHead();
|
DepotHead dh = new DepotHead();
|
||||||
dh.setStatus(BusinessConstants.BILLS_STATUS_AUDIT);
|
dh.setStatus(BusinessConstants.BILLS_STATUS_AUDIT);
|
||||||
DepotHeadExample example = new DepotHeadExample();
|
DepotHeadExample example = new DepotHeadExample();
|
||||||
|
|||||||
Reference in New Issue
Block a user