单据类型字段合并等相关修改

master
anthonywj 2 years ago
parent 5e3fb59030
commit b94d85bfdd

@ -65,7 +65,13 @@ public class ConstantStatus {
*/
public static final Integer BUS_TYPE_NORMAL = 1; //正常出入库单据(入账)
public static final Integer BUS_TYPE_DELIVERY = 2; //送货出入库单据
public static final Integer BUS_TYPE__ARRIVAL = 3; //到货出库单据类型
public static final Integer BUS_TYPE_ARRIVAL = 3; //到货出库单据类型
public static final Integer BUS_TYPE_RETURNED = 4; //退货单单据类型
public static final Integer ACTION_TYPE_NORMAL = 1; //带票
public static final Integer ACTION_TYPE_PREIN = 2; //预验收
public static final Integer ACTION_TYPE_ADVANCE = 3; //寄售
public static final Integer ORDER_STATUS_ADDITIONAL = 5; //补录单据

@ -56,14 +56,14 @@ public class BasicBusTypePreController {
if (CollUtil.isEmpty(basicBusTypePreEntities)) {
//创建对应单据流转
if (filterBusTypePreRequest.getType() != null && "changEnable".equals(filterBusTypePreRequest.getType())) {
if (ConstantType.TYPE_OUT.equals(basicBussinessType.getMainAction()) && !basicBussinessType.isAdvanceType()) {
if (ConstantType.TYPE_OUT.equals(basicBussinessType.getMainAction()) && basicBussinessType.getActionType() != ConstantStatus.ACTION_TYPE_ADVANCE) {
BasicBusTypePreEntity basicBusTypePreEntity = new BasicBusTypePreEntity();
basicBusTypePreEntity.setChangeType(ConstantStatus.ORDER_CHANGE_INNOR_NORMAL_IN);
basicBusTypePreEntity.setIndex(1);
basicBusTypePreEntity.setAction(filterBusTypePreRequest.getAction());
basicBusTypePreEntity.setBeforeTime(1);
basicBusTypePreService.insertBusChangeType(basicBusTypePreEntity);
} else if (ConstantType.TYPE_OUT.equals(basicBussinessType.getMainAction()) && basicBussinessType.isAdvanceType()) {
} else if (ConstantType.TYPE_OUT.equals(basicBussinessType.getMainAction()) && basicBussinessType.getActionType() != ConstantStatus.ACTION_TYPE_ADVANCE) {
BasicBusTypePreEntity basicBusTypePreEntity = new BasicBusTypePreEntity();
basicBusTypePreEntity.setChangeType(ConstantStatus.ORDER_CHANGE_ADVANCE_IN);
basicBusTypePreEntity.setIndex(1);

@ -446,7 +446,7 @@ public class IoCodeTempController extends BaseController {
}
//校验预验收是否已存在
if (bussinessTypeEntity.isPreIn()) {
if (bussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_PREIN) {
if (StrUtil.isNotEmpty(udiEntity.getSerialNo())) {
List<InvPreinDetailEntity> invProductDetailEntities = invPreinDetailService.findByCode(code);
if (CollUtil.isNotEmpty(invProductDetailEntities)) {
@ -821,7 +821,7 @@ public class IoCodeTempController extends BaseController {
public BaseResponse checkInv(BasicBussinessTypeEntity bussinessTypeEntity, IoCodeTempEntity codeTempEntity) {
if (bussinessTypeEntity.isVailInv()) {
if (bussinessTypeEntity.isAdvanceType()) {
if (bussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_ADVANCE) {
// int count = invPreProductDetailService.vailStockCount(code); //todo 寄售
// if (count < 0) {
// return ResultVOUtils.error(500, "当前库存不足不允许0库存出库");

@ -294,8 +294,8 @@ public class BasicBussinessTypeEntity {
/**
*
*/
@TableField(value = "advanceType")
private boolean advanceType;
// @TableField(value = "advanceType")
// private boolean advanceType;
/**
*
@ -312,8 +312,8 @@ public class BasicBussinessTypeEntity {
/**
*
*/
@TableField(value = "preIn")
private boolean preIn;
// @TableField(value = "preIn")
// private boolean preIn;
@TableField(value = "preInBack")
@ -356,10 +356,14 @@ public class BasicBussinessTypeEntity {
@TableField(value = "busType")
private Integer busType; //1:正常2送货3.到货
private Integer busType; //1:正常2送货3.到货,4:退货
@TableField(value = "inStock")
private boolean inStock;
@TableField(value = "actionType")
private Integer actionType; //1带票正常2.预验收。3寄售
}

@ -275,7 +275,7 @@ public class BussinessTypeSaveRequest {
private boolean vailDispatch; //校验是否可配送
private int vailGroupBuy; //校验是否集采产品 0:全部1只采集集采产品2只采集非集采产品
private Integer busType; //1:正常2送货3.到货
private Integer actionType;
private boolean inStock;
}

@ -127,7 +127,7 @@ public class BasicBussinessTypeResponse {
private int vailGroupBuy; //校验是否集采产品 0:全部1只采集集采产品2只采集非集采产品
private Integer busType; //1:正常2送货3.到货
private Integer actionType;
private boolean inStock;

@ -670,9 +670,9 @@ public class IoCheckInoutService {
if (bussinessTypeEntity.isInStock()) {
// if (bussinessTypeEntity.getBusType() == ConstantStatus.BUS_TYPE_NORMAL) {
//生成库存
if (bussinessTypeEntity.isPreIn()) {
if (bussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_PREIN) {
genInvService.genPreInInv(orderEntity.getBillNo());
} else if (bussinessTypeEntity.isAdvanceType()) {
} else if (bussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_ADVANCE) {
genInvService.genPreInv(orderEntity.getBillNo());
} else {
genInvService.genNorInv(orderEntity.getBillNo());

@ -184,10 +184,10 @@ public class IoOrderServiceImpl implements IoOrderService {
if (orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_AUDITED) {
BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
//判断单据是否是预验收单据,如果是预验收单据,则删除预验收库库存
if (basicBussinessTypeEntity.isPreIn()) {
if (basicBussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_PREIN) {
preinOrderService.deleteByOrderId(billNo);
preinDetailService.deleteByOrderId(billNo);
} else if (basicBussinessTypeEntity.isAdvanceType()) {
} else if (basicBussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_ADVANCE) {
//是否寄售,删除寄售库存
List<InvPreProductDetailEntity> invProductDetailEntities = invPreProductDetailService.selectByOrderIdFk(billNo);
if (CollUtil.isNotEmpty(invProductDetailEntities)) {
@ -279,7 +279,7 @@ public class IoOrderServiceImpl implements IoOrderService {
BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
//预验收库存
if (basicBussinessTypeEntity.isPreIn()) {
if (basicBussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_PREIN) {
InvPreinDetailEntity invPreinDetailEntity = preinDetailService.findByCode(billNo, code);
int count = invPreinDetailEntity.getCount() - 1;
@ -292,7 +292,7 @@ public class IoOrderServiceImpl implements IoOrderService {
preinDetailService.update(invPreinDetailEntity);
}
} else if (basicBussinessTypeEntity.isAdvanceType()) { //寄售库存
} else if (basicBussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_ADVANCE) { //寄售库存
InvPreProductDetailEntity invProductDetailEntity = invPreProductDetailService.selectByCode(billNo, code);
int count = invProductDetailEntity.getCount() - 1;
if (count == 0) {
@ -378,7 +378,7 @@ public class IoOrderServiceImpl implements IoOrderService {
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
//预验收撤回---直接删除预验收库存
if (bussinessTypeEntity.isPreIn()) {
if (bussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_PREIN) {
invPreinOrderService.deleteByOrderId(billNo);
invPreinDetailService.deleteByOrderId(billNo);
} else {

@ -68,7 +68,7 @@
entrutSpms, codeFillCheck, defaultSubInv, defaultInv, orderVisibleType,
checkCopy, secCheckCopy, originAction, advanceType, changeEnable,
spUse, preIn, supplementAll, createUser, createTime, preInBack, vailDispatch,
vailGroupBuy, busType, inStock)
vailGroupBuy, busType, inStock,actionType)
values (#{mainAction},
#{action},
#{name},
@ -120,7 +120,7 @@
#{preIn},
#{supplementAll},
#{createUser},
#{createTime}, #{preInBack}, #{vailDispatch}, #{vailGroupBuy}#{busType}, #{inStock})
#{createTime}, #{preInBack}, #{vailDispatch}, #{vailGroupBuy}#{busType}, #{inStock}#{actionType})
</insert>
<select id="selectBusList" resultType="com.glxp.api.entity.basic.BasicBussinessTypeEntity">

@ -25,6 +25,9 @@ CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'vailDispatch', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'vailGroupBuy', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'busType', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'inStock', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'actionType', 'tinyint', 1);

Loading…
Cancel
Save