| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.nacos.api.exception.NacosException; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.omd.constant.BtmTypeConstant; |
| | |
| | | btmType.setAttributes(btmTypeAttributeService.getAllAttribute(btmType)); |
| | | return btmType; |
| | | } |
| | | |
| | | /** |
| | | * 获取引用某个生命周期的业务类型 |
| | | * |
| | | * @param lifeId 生命周期的编号 |
| | | * @return 业务类型显示对象 |
| | | */ |
| | | @Override |
| | | public List<BtmTypeVO> selectByLifeId(String lifeId) { |
| | | if(StringUtils.isBlank(lifeId)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | LambdaQueryWrapper<BtmType> query = new LambdaQueryWrapper<BtmType>(); |
| | | query.eq(BtmType::getLifeCycleId,lifeId); |
| | | return BtmTypeWrapper.build().listEntityVO(getBaseMapper().selectList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 统计引用某个生命周期的业务类型 |
| | | * |
| | | * @param lifeId 生命周期的编号 |
| | | * @return 个数 |
| | | */ |
| | | @Override |
| | | public Integer countByLifeId(String lifeId) { |
| | | if(StringUtils.isBlank(lifeId)){ |
| | | return 0; |
| | | } |
| | | LambdaQueryWrapper<BtmType> query = new LambdaQueryWrapper<BtmType>(); |
| | | query.eq(BtmType::getLifeCycleId,lifeId); |
| | | return baseMapper.selectCount(query).intValue(); |
| | | } |
| | | } |