初步增加请购单

This commit is contained in:
jishenghua
2024-04-19 22:56:31 +08:00
parent 396a2b875c
commit e6456acdb6
7 changed files with 580 additions and 13 deletions

View File

@@ -80,8 +80,9 @@ public class BusinessConstants {
public static final String PURCHASE_STATUS_SKIPING = "3";
/**
* 出入库分类
*采购、采购退货、其它、零售、销售、调拨、盘点复盘等
* 请购单、采购、采购退货、其它、零售、销售、调拨、盘点复盘等
* */
public static final String SUB_TYPE_PURCHASE_APPLY = "请购单";
public static final String SUB_TYPE_PURCHASE_ORDER = "采购订单";
public static final String SUB_TYPE_PURCHASE = "采购";
public static final String SUB_TYPE_PURCHASE_RETURN = "采购退货";

View File

@@ -256,7 +256,9 @@ public class DepotHeadService {
*/
public String[] getDepotArray(String subType) throws Exception {
String [] depotArray = null;
if(!BusinessConstants.SUB_TYPE_PURCHASE_ORDER.equals(subType) && !BusinessConstants.SUB_TYPE_SALES_ORDER.equals(subType)) {
if(!BusinessConstants.SUB_TYPE_PURCHASE_APPLY.equals(subType)
&& !BusinessConstants.SUB_TYPE_PURCHASE_ORDER.equals(subType)
&& !BusinessConstants.SUB_TYPE_SALES_ORDER.equals(subType)) {
String depotIds = depotService.findDepotStrByCurrentUser();
depotArray = StringUtil.isNotEmpty(depotIds) ? depotIds.split(",") : null;
}

View File

@@ -612,7 +612,8 @@ public class DepotItemService {
if (StringUtil.isExist(rowObj.get("depotId"))) {
depotItem.setDepotId(rowObj.getLong("depotId"));
} else {
if(!BusinessConstants.SUB_TYPE_PURCHASE_ORDER.equals(depotHead.getSubType())
if(!BusinessConstants.SUB_TYPE_PURCHASE_APPLY.equals(depotHead.getSubType())
&& !BusinessConstants.SUB_TYPE_PURCHASE_ORDER.equals(depotHead.getSubType())
&& !BusinessConstants.SUB_TYPE_SALES_ORDER.equals(depotHead.getSubType())) {
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_DEPOT_FAILED_CODE,
String.format(ExceptionConstants.DEPOT_HEAD_DEPOT_FAILED_MSG));