10/17 单据增加单据类型

dev_unify
wangwei 6 months ago
parent b4586848b6
commit 11a52f4fd3

@ -267,13 +267,14 @@ public class BasicBussinessTypeController extends BaseController {
List<DictDto> reList = new ArrayList<>();
if (StrUtil.isNotEmpty(bussinessTypeFilterRequest.getVueType())) {
List<BasicBussinessTypeEntity> result = new ArrayList<>();
List<BasicBussinessTypeEntity> bussinessTypeEntities = basicBussinessTypeService.findByVueType(bussinessTypeFilterRequest.getVueType());
List<BasicBussinessTypeEntity> bussinessTypeEntities = basicBussinessTypeService.findByVueTypeAndType(bussinessTypeFilterRequest);
if (StrUtil.isNotEmpty(bussinessTypeFilterRequest.getInvCode()) || StrUtil.isNotEmpty(bussinessTypeFilterRequest.getCode())) {
//过滤是否是当前仓库底下单据类型
FilterBussinessTypeRequest tempRequest = new FilterBussinessTypeRequest();
tempRequest.setCode(bussinessTypeFilterRequest.getCode());
tempRequest.setInvCode(bussinessTypeFilterRequest.getInvCode());
tempRequest.setMainAction(bussinessTypeFilterRequest.getMainAction());
tempRequest.setProductType(bussinessTypeFilterRequest.getProductType());
List<BasicBussinessTypeResponse> bussinessTypeResponses = basicBussinessTypeService.filterJoinByInv(tempRequest);
if (CollUtil.isNotEmpty(bussinessTypeResponses)) {
for (BasicBussinessTypeResponse bussinessTypExportResponse : bussinessTypeResponses) {

@ -385,6 +385,7 @@ public class UdiRelevanceController extends BaseController {
udiProductEntity.setRequireScanCode(udiRelevanceSaveRequest.getRequireScanCode());
udiProductEntity.setFlbm(udiRelevanceSaveRequest.getFlbm());
udiProductEntity.setWorkPlaceCount(udiRelevanceSaveRequest.getWorkPlaceCount());
udiProductEntity.setUpdateTime(new Date());
// udiProductEntity = UdiInfoUtil.initUdiInfoEntity(udiProductEntity);
if (StrUtil.isNotEmpty(udiRelevanceSaveRequest.getOriginUuid())) {
udiProductEntity.setProductType(ConstantStatus.PRODUCT_TYPE_UDI);

@ -467,4 +467,9 @@ public class BasicBussinessTypeEntity {
@TableField(value = "codeCheck")
private Integer codeCheck;
/**
* ; 1: 2:
*/
@TableField(value = "productType")
private Integer productType;
}

@ -322,4 +322,10 @@ public class BussinessTypeSaveRequest {
@TableField(value = "codeCheck")
private Integer codeCheck;
/**
* ; 1: 2:
*/
@TableField(value = "productType")
private Integer productType;
}

@ -46,6 +46,7 @@ public class FilterBussinessTypeRequest extends ListPageRequest {
*/
private Integer advanceType;
private String type;
/**
@ -121,4 +122,9 @@ public class FilterBussinessTypeRequest extends ListPageRequest {
private Integer editType;
private Integer inPreInBack;
/**
* , 12
*/
private Integer productType;
}

@ -191,4 +191,6 @@ public class BasicBussinessTypeResponse {
@TableField(value = "codeCheck")
private Integer codeCheck;
private Integer productType;
}

@ -168,7 +168,16 @@ public class UdiRlSupResponse {
private String useLevelUnit;
private String packUnit;
private Integer useLeverCount;
private Integer distributeLevel;
private Integer useLevel;
/**
*
*/
private Integer distributeMaxLevel;
/**
* 使
*/
private Integer useMaxLevel;
}

@ -119,4 +119,6 @@ public interface IBasicBussinessTypeService extends IService<BasicBussinessTypeE
List<BasicBussinessTypeEntity> findByVueType(String vueType);
List<BasicBussinessTypeEntity> selectbyNotAction(List<String> list);
List<BasicBussinessTypeEntity> findByVueTypeAndType(FilterBussinessTypeRequest bussinessTypeFilterRequest);
}

@ -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;
}
}

@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;
import javax.annotation.Resource;
import java.util.*;

@ -39,6 +39,9 @@
<if test="busType != null">
AND bu.busType = #{busType}
</if>
<if test="productType != null">
AND bu.productType = #{productType}
</if>
<if test="preIn != null">
AND bu.preIn = #{preIn}
</if>
@ -218,6 +221,9 @@
<if test="spUse != null and spUse != 3">
AND basic_bussiness_type.spUse = #{spUse}
</if>
<if test="productType != null and productType != 3">
AND basic_bussiness_type.productType = #{productType}
</if>
<if test="code != ''and code != null">
AND subInvCode = #{code}
</if>
@ -253,6 +259,9 @@
<if test="enable != null">
AND basic_bussiness_type.enable = #{enable}
</if>
<if test="productType != null">
AND basic_bussiness_type.productType = #{productType}
</if>
<if test="spUse == 3">
AND basic_bussiness_type.spUse > 0
</if>

@ -60,6 +60,10 @@
basic_udirel.useLevelDi,
basic_udirel.useLevelUnit,
basic_udirel.useLeverCount,
basic_udirel.useLevel,
basic_udirel.distributeLevel,
basic_udirel.distributeMaxLevel,
basic_udirel.useMaxLevel,
bht.name classifyName,
basic_products.id as PRId,
basic_products.originUuid,

@ -1009,3 +1009,9 @@ CALL Pro_Temp_ColumnWork('thr_products', 'prepnUnit', 'varchar(255) CHARACTER SE
CALL Pro_Temp_ColumnWork('basic_products', 'zxxsdycpbs', ' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''最小销售产品标识''' ,1);
CALL Pro_Temp_ColumnWork('basic_products', 'xjdw', ' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''最小销售产品标识''' ,1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'productType',
' tinyint NULL DEFAULT NULL COMMENT ''单据类型; 1:器械单据 2:药品单据''',
1);

Loading…
Cancel
Save