master
anthonywj 2 years ago
parent 399a859504
commit 69d4b65562

@ -228,5 +228,6 @@ public class Constant {
public static final String ORDER_ACTION_NOR_DETAIL = "norDetail";
public static final String ORDER_ACTION_PRE_DETAIL = "preDetail";
public static final String ORDER_ACTION_SUP_DELIVERY = "supDelivery";
}

@ -181,23 +181,35 @@ public class BasicBussinessTypeController extends BaseController {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
//判断是否是医院用户
if (isHosUser()) {
bussinessTypeFilterRequest.setUserId(getUserId());
if (StrUtil.isNotEmpty(bussinessTypeFilterRequest.getVueType())) {
List<BasicBussinessTypeEntity> bussinessTypeEntities = basicBussinessTypeService.findByVueType(bussinessTypeFilterRequest.getVueType());
PageInfo<BasicBussinessTypeEntity> pageInfo;
pageInfo = new PageInfo<>(bussinessTypeEntities);
PageSimpleResponse<BasicBussinessTypeEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(bussinessTypeEntities);
return ResultVOUtils.success(pageSimpleResponse);
} else {
//当前用户为供应商,查询单据类型添加允许供应商使用参数
bussinessTypeFilterRequest.setSpUse(true);
//判断是否是医院用户
if (isHosUser()) {
bussinessTypeFilterRequest.setUserId(getUserId());
} else {
//当前用户为供应商,查询单据类型添加允许供应商使用参数
bussinessTypeFilterRequest.setSpUse(true);
}
List<BasicBussinessTypeResponse> bussinessTypeEntities;
bussinessTypeEntities = basicBussinessTypeService.filterJoinByUser(
bussinessTypeFilterRequest);
PageInfo<BasicBussinessTypeResponse> pageInfo;
pageInfo = new PageInfo<>(bussinessTypeEntities);
PageSimpleResponse<BasicBussinessTypeResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(bussinessTypeEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
List<BasicBussinessTypeResponse> bussinessTypeEntities;
bussinessTypeEntities = basicBussinessTypeService.filterJoinByUser(
bussinessTypeFilterRequest);
PageInfo<BasicBussinessTypeResponse> pageInfo;
pageInfo = new PageInfo<>(bussinessTypeEntities);
PageSimpleResponse<BasicBussinessTypeResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(bussinessTypeEntities);
return ResultVOUtils.success(pageSimpleResponse);
}

@ -73,11 +73,9 @@ public class IoOrderController extends BaseController {
if (StrUtil.isNotBlank(filterOrderRequest.getStatusType())) {
orderService.setFilterStatus(filterOrderRequest);
}
if (StrUtil.isNotBlank(filterOrderRequest.getActionType())) {
if (StrUtil.isNotBlank(filterOrderRequest.getVueType())) {
orderService.setActions(filterOrderRequest);
}
String customerId = getCustomerId();
if (!customerId.equals("110")) {
filterOrderRequest.setFromCorp(customerId);

@ -70,7 +70,7 @@ public class IoOrderDetailResultController extends BaseController {
orderDetailResultRequest.setFromCorp(getCustomerId());
}
FilterOrderRequest filterOrderRequest = new FilterOrderRequest();
filterOrderRequest.setActionType(orderDetailResultRequest.getActionType());
filterOrderRequest.setVueType(orderDetailResultRequest.getActionType());
List<String> actions = orderService.setActions(filterOrderRequest);
if (CollUtil.isEmpty(actions)) {
return ResultVOUtils.success("");

@ -387,5 +387,14 @@ public class BasicBussinessTypeEntity {
@TableField(value = "thrCheckCopy")
private boolean thrCheckCopy;
@TableField(value = "fillCodeRel")
private boolean fillCodeRel;
@TableField(value = "checkVailDate")
private boolean checkVailDate;
@TableField(value = "checkExpire")
private boolean checkExpire;
@TableField(value = "checkCertExpire")
private boolean checkCertExpire;
}

@ -1,5 +1,6 @@
package com.glxp.api.req.basic;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@ -275,7 +276,7 @@ public class BussinessTypeSaveRequest {
private boolean vailDispatch; //校验是否可配送
private int vailGroupBuy; //校验是否集采产品 0:全部1只采集集采产品2只采集非集采产品
private Integer busType; //1:正常2送货3.到货
private int actionType;
private int actionType; //1带票正常2.预验收。3寄售
private boolean inStock;
@ -290,4 +291,13 @@ public class BussinessTypeSaveRequest {
private boolean thrCheckBalance;
private boolean thrCheckCopy;
private boolean fillCodeRel;
private boolean checkVailDate;
private boolean checkExpire;
private boolean checkCertExpire;
}

@ -105,5 +105,7 @@ public class FilterBussinessTypeRequest extends ListPageRequest {
private Integer busType;
private Boolean inStock;
private Boolean fillCodeRel;
private String vueType;
}

@ -148,7 +148,7 @@ public class FilterOrderRequest extends ListPageRequest {
* norDetail
* preDetail
*/
private String actionType;
private String vueType; //页面类型
private Integer orderType;

@ -128,7 +128,7 @@ public class BasicBussinessTypeResponse {
private int vailGroupBuy; //校验是否集采产品 0:全部1只采集集采产品2只采集非集采产品
private Integer busType; //1:正常2送货3.到货
private int actionType;
private int actionType; //1带票正常2.预验收。3寄售
private boolean inStock;
private boolean thrCheckEnable;
@ -142,4 +142,10 @@ public class BasicBussinessTypeResponse {
private boolean thrCheckBalance;
private boolean thrCheckCopy;
private boolean fillCodeRel;
private boolean checkVailDate;
private boolean checkExpire;
private boolean checkCertExpire;
}

@ -67,7 +67,7 @@ public interface IBasicBussinessTypeService {
*
* @param bussinessTypeEntity
*/
boolean insertIgnoreBussinessType(BasicBussinessTypeEntity bussinessTypeEntity,String id);
boolean insertIgnoreBussinessType(BasicBussinessTypeEntity bussinessTypeEntity, String id);
/**
*
@ -110,4 +110,7 @@ public interface IBasicBussinessTypeService {
boolean checkBusTypeNameExists(String name, Integer id);
List<BasicBussinessTypeEntity> selectIgnoreSelf(String action);
List<BasicBussinessTypeEntity> findByVueType(String vueType);
}

@ -4,6 +4,8 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.glxp.api.constant.Constant;
import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.constant.ConstantType;
import com.glxp.api.dao.basic.BasicBussinessTypeDao;
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
@ -19,6 +21,7 @@ import javax.annotation.Resource;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@Slf4j
@Service
@ -126,8 +129,8 @@ public class BasicBussinessTypeServiceImpl implements IBasicBussinessTypeService
}
@Override
public boolean insertIgnoreBussinessType(BasicBussinessTypeEntity bussinessTypeEntity,String id) {
setUpdateInfoById(bussinessTypeEntity,id);
public boolean insertIgnoreBussinessType(BasicBussinessTypeEntity bussinessTypeEntity, String id) {
setUpdateInfoById(bussinessTypeEntity, id);
return basicBussinessTypeDao.insertIgnoreBussinessType(bussinessTypeEntity);
}
@ -188,6 +191,35 @@ public class BasicBussinessTypeServiceImpl implements IBasicBussinessTypeService
return list;
}
@Override
public List<BasicBussinessTypeEntity> findByVueType(String vueType) {
List<BasicBussinessTypeEntity> bussinessTypeEntities = null;
switch (vueType) {
case Constant.ORDER_ACTION_NOR_DETAIL:
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
.eq("actionType", 1).eq("inStock", true));
break;
case Constant.ORDER_ACTION_PRE_DETAIL:
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
.eq("actionType", 3).eq("inStock", true));
break;
case Constant.ORDER_ACTION_SUP_DELIVERY:
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
.eq("mainAction", ConstantType.TYPE_PUT).eq("corpType", ConstantStatus.CORP_TYPE_OUT)
.eq("spUse", true));
break;
default:
break;
}
return bussinessTypeEntities;
}
/**
* /
*
@ -205,7 +237,7 @@ public class BasicBussinessTypeServiceImpl implements IBasicBussinessTypeService
}
private void setUpdateInfoById(BasicBussinessTypeEntity bussinessTypeEntity,String id) {
private void setUpdateInfoById(BasicBussinessTypeEntity bussinessTypeEntity, String id) {
Date now = new Date();

@ -542,28 +542,11 @@ public class IoOrderServiceImpl implements IoOrderService {
public List<String> setActions(FilterOrderRequest filterOrderRequest) {
List<BasicBussinessTypeEntity> bussinessTypeEntities;
List<String> actions = null;
if (filterOrderRequest.getActionType() == null)
if (filterOrderRequest.getVueType() == null)
return null;
switch (filterOrderRequest.getActionType()) {
case Constant.ORDER_ACTION_NOR_DETAIL:
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
.eq("actionType", 1).eq("inStock", true));
actions = bussinessTypeEntities.stream().map(BasicBussinessTypeEntity::getAction).collect(Collectors.toList());
filterOrderRequest.setActions(actions);
break;
case Constant.ORDER_ACTION_PRE_DETAIL:
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
.eq("actionType", 3).eq("inStock", true));
actions = bussinessTypeEntities.stream().map(BasicBussinessTypeEntity::getAction).collect(Collectors.toList());
filterOrderRequest.setActions(actions);
break;
default:
break;
}
;
bussinessTypeEntities = basicBussinessTypeService.findByVueType(filterOrderRequest.getVueType());
actions = bussinessTypeEntities.stream().map(BasicBussinessTypeEntity::getAction).collect(Collectors.toList());
filterOrderRequest.setActions(actions);
return actions;
}

@ -120,7 +120,7 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
String udiCode = "#" + udiProductEntity.getNameCode() + "#" + obj.getProductDate() + "#" + obj.getExpireDate() +
"#" + obj.getBatchNo() + "#" + udiProductEntity.getSerialNo() + "#" + udiProductEntity.getWarehouseCode() + "#" + udiProductEntity.getDeptCode();
udiCode = udiCode.replaceAll("#null", "");
udiCode = udiCode.replaceAll("#null", "#");
innerOrderPrintEntity.setUdiCode(udiCode);
invInnerOrderPrintDao.insert(innerOrderPrintEntity);
}

@ -28,7 +28,7 @@ public class UdiCalCountUtil {
if (udiRelevanceResponse.getBhzxxsbzsl() == 0) {
udiRelevanceResponse.setBhzxxsbzsl(1);
}
if (udiRelevanceResponse.getZxxsbzbhsydysl() == 0) {
if (udiRelevanceResponse.getZxxsbzbhsydysl() == null || udiRelevanceResponse.getZxxsbzbhsydysl() == 0) {
udiRelevanceResponse.setZxxsbzbhsydysl(1);
}
actCount = udiRelevanceResponse.getBhzxxsbzsl() * udiRelevanceResponse.getZxxsbzbhsydysl();

@ -16,9 +16,6 @@
<if test="inStock != null">
AND bu.inStock = #{inStock}
</if>
<if test="advanceType != null">
AND bu.advanceType = #{advanceType}
</if>
<if test="enable != null">
AND bu.enable = #{enable}
</if>
@ -70,11 +67,11 @@
checkBalance, secCheckBalance, useDyCount, expireTip, updateTime,
defaultUnit, prefix, outToSpms, ullageFill, scanPreIn, vailInv,
entrutSpms, codeFillCheck, defaultSubInv, defaultInv, orderVisibleType,
checkCopy, secCheckCopy, originAction, advanceType, changeEnable,
checkCopy, secCheckCopy, originAction, changeEnable,
spUse, preIn, supplementAll, createUser, createTime, preInBack, vailDispatch,
vailGroupBuy, busType, inStock, actionType
, thrCheckEnable, thrCheckWebNew, thrCheckPdaUn, thrCheckPdaEd, thrCheckUdims, thrCheckPc, thrCheckSp
, thrCheckChange, thrCheckBalance, thrCheckCopy)
, thrCheckChange, thrCheckBalance, thrCheckCopy, fillCodeRel,checkVailDate,checkCertExpire)
values (#{mainAction},
#{action},
#{name},
@ -120,7 +117,6 @@
#{checkCopy},
#{secCheckCopy},
#{originAction},
#{advanceType},
#{changeEnable},
#{spUse},
#{preIn},
@ -129,7 +125,9 @@
#{createTime}, #{preInBack}, #{vailDispatch}, #{vailGroupBuy}, #{busType}, #{inStock}, #{actionType}
, #{thrCheckEnable}, #{thrCheckWebNew}, #{thrCheckPdaUn}, #{thrCheckPdaEd}, #{thrCheckUdims},
#{thrCheckPc}
, #{thrCheckSp}, #{thrCheckChange}, #{thrCheckBalance}, #{thrCheckCopy})
, #{thrCheckSp}, #{thrCheckChange}, #{thrCheckBalance}, #{thrCheckCopy}, #{fillCodeRel}
, #{checkVailDate}, #{checkExpire}, #{checkCertExpire}
)
</insert>
<select id="selectBusList" resultType="com.glxp.api.entity.basic.BasicBussinessTypeEntity">
@ -142,9 +140,6 @@
<if test="action != null and action != ''">
AND bu.action like concat('%', #{action}, '%')
</if>
<if test="advanceType != null">
AND bu.advanceType = #{advanceType}
</if>
<if test="enable != null">
AND bu.enable = #{enable}
</if>

@ -41,7 +41,10 @@ CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckSp', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckChange', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckBalance', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckCopy', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'fillCodeRel', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkVailDate', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkExpire', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkCertExpire', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'batchNo', 'varchar(255) ', 1);

Loading…
Cancel
Save