|
|
|
@ -300,4 +300,82 @@ public class BasicBussinessTypeServiceImpl extends ServiceImpl<BasicBussinessTyp
|
|
|
|
|
public List<BasicBussinessTypeEntity> selectbyNotAction(List<String> list) {
|
|
|
|
|
return basicBussinessTypeDao.selectbyNotAction(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<BasicBussinessTypeEntity> findByVueTypeAndType(FilterBussinessTypeRequest bussinessTypeFilterRequest) {
|
|
|
|
|
|
|
|
|
|
List<BasicBussinessTypeEntity> bussinessTypeEntities = null;
|
|
|
|
|
|
|
|
|
|
switch (bussinessTypeFilterRequest.getVueType()) {
|
|
|
|
|
case Constant.ORDER_ACTION_NOR_DETAIL:
|
|
|
|
|
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
|
|
|
|
|
.eq("actionType", 1).eq("inStock", true)
|
|
|
|
|
.eq(bussinessTypeFilterRequest.getProductType() != null, "productType", bussinessTypeFilterRequest.getProductType())
|
|
|
|
|
.eq("enable", true));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case Constant.ORDER_ACTION_PRE_DETAIL:
|
|
|
|
|
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
|
|
|
|
|
.eq("actionType", 3).eq("inStock", true)
|
|
|
|
|
.eq(bussinessTypeFilterRequest.getProductType() != null, "productType", bussinessTypeFilterRequest.getProductType())
|
|
|
|
|
.eq("enable", true));
|
|
|
|
|
break;
|
|
|
|
|
case Constant.ORDER_ACTION_PREIN_DETAIL:
|
|
|
|
|
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
|
|
|
|
|
.eq("actionType", 2).eq("inStock", true).eq(bussinessTypeFilterRequest.getProductType() != null, "productType", bussinessTypeFilterRequest.getProductType())
|
|
|
|
|
.eq("enable", true));
|
|
|
|
|
break;
|
|
|
|
|
case Constant.ORDER_ACTION_SUP_DELIVERY:
|
|
|
|
|
//允许送货单直接入库变更库存,则不判断送货单是否入库
|
|
|
|
|
|
|
|
|
|
String deliveryInstock = systemParamConfigService.selectValueByParamKey("deliveryInstock");
|
|
|
|
|
if (StrUtil.isNotEmpty(deliveryInstock) && deliveryInstock.equals("1")) {
|
|
|
|
|
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
|
|
|
|
|
.eq("mainAction", ConstantType.TYPE_PUT).eq("corpType", ConstantStatus.CORP_TYPE_OUT)
|
|
|
|
|
.eq(bussinessTypeFilterRequest.getProductType() != null, "productType", bussinessTypeFilterRequest.getProductType())
|
|
|
|
|
.gt("spUse", 1).eq("enable", true));
|
|
|
|
|
} else {
|
|
|
|
|
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
|
|
|
|
|
.eq("mainAction", ConstantType.TYPE_PUT).eq("corpType", ConstantStatus.CORP_TYPE_OUT)
|
|
|
|
|
.eq(bussinessTypeFilterRequest.getProductType() != null, "productType", bussinessTypeFilterRequest.getProductType())
|
|
|
|
|
.gt("spUse", 1).eq("inStock", false).eq("enable", true));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
case Constant.ORDER_ACTION_SUP_INVOICE:
|
|
|
|
|
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
|
|
|
|
|
.eq("mainAction", ConstantType.TYPE_PUT)
|
|
|
|
|
.eq(bussinessTypeFilterRequest.getProductType() != null, "productType", bussinessTypeFilterRequest.getProductType())
|
|
|
|
|
.gt("spUse", 0).eq("actionType", 1).eq("enable", true));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
//.eq("corpType", ConstantStatus.CORP_TYPE_OUT)
|
|
|
|
|
case Constant.ORDER_ACTION_SUP_DELAUDIT: //供应商审核送货单
|
|
|
|
|
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
|
|
|
|
|
.eq("mainAction", ConstantType.TYPE_PUT).eq("corpType", ConstantStatus.CORP_TYPE_OUT)
|
|
|
|
|
.eq(bussinessTypeFilterRequest.getProductType() != null, "productType", bussinessTypeFilterRequest.getProductType())
|
|
|
|
|
.gt("spUse", 1).eq("enable", true));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case Constant.ORDER_ACTION_SUP_INOUT: //供应商查询出入库单
|
|
|
|
|
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
|
|
|
|
|
.eq(bussinessTypeFilterRequest.getProductType() != null, "productType", bussinessTypeFilterRequest.getProductType())
|
|
|
|
|
.gt("spUse", 0).eq("enable", true));
|
|
|
|
|
break;
|
|
|
|
|
case Constant.ORDER_ACTION_SUP_PREIN:
|
|
|
|
|
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
|
|
|
|
|
.eq(bussinessTypeFilterRequest.getProductType() != null, "productType", bussinessTypeFilterRequest.getProductType())
|
|
|
|
|
.gt("spUse", 0).eq("enable", true).eq("corpType", ConstantStatus.CORP_TYPE_OUT).eq("actionType", 2));
|
|
|
|
|
case Constant.ORDER_STATUS_RETURN:
|
|
|
|
|
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
|
|
|
|
|
.gt("spUse", 0).eq("enable", true)
|
|
|
|
|
.eq(bussinessTypeFilterRequest.getProductType() != null, "productType", bussinessTypeFilterRequest.getProductType())
|
|
|
|
|
.eq("corpType", ConstantStatus.CORP_TYPE_OUT).eq("mainAction", ConstantType.TYPE_OUT));
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return bussinessTypeEntities;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|