| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.rmi.ServerException; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | import static com.vci.ubcs.code.constant.FrameWorkLangCodeConstant.DATA_OID_NOT_EXIST; |
| | | |
| | | @Service |
| | | public class CodeClassifyValueServiceImpl extends ServiceImpl<CodeClassifyValueMapper, CodeClassifyValue> implements ICodeClassifyValueService { |
| | | public class CodeClassifyValueServiceImpl extends ServiceImpl<CodeClassifyValueMapper, CodeClassifyValue> implements ICodeClassifyValueService { |
| | | |
| | | @Resource |
| | | private RevisionModelUtil revisionModelUtil; |
| | |
| | | treeWrapperOptions.copyFromTreeQuery(treeQueryObject); |
| | | return revisionModelUtil.doList2Trees(voList,treeWrapperOptions,(CodeClassifyValueVO s) ->{ |
| | | //可以在这里处理树节点的显示 |
| | | return s.getId() + " " + (Func.isNotEmpty(s.getName()) ? s.getName():"") + (FrameworkDataLCStatus.DISABLED.getValue().equalsIgnoreCase(s |
| | | return (Func.isNotEmpty(s.getId()) ? s.getId():"") + " " + (Func.isNotEmpty(s.getName()) ? s.getName():"") + (FrameworkDataLCStatus.DISABLED.getValue().equalsIgnoreCase(s |
| | | .getLcStatus()) ? (" 【停用】 ") : ""); |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 根据codeClassifySecOid删除码值 |
| | | * @param codeClassifySecOid |
| | | * @return |
| | | * @throws ServerException |
| | | */ |
| | | @Override |
| | | public Boolean deleteClassifyValueBySecOid(String codeClassifySecOid) throws ServerException { |
| | | LambdaQueryWrapper<CodeClassifyValue> wrapper = Wrappers.<CodeClassifyValue>query() |
| | | .lambda().eq(CodeClassifyValue::getCodeClassifySecOid, codeClassifySecOid); |
| | | return codeClassifyValueMapper.delete(wrapper) > 0; |
| | | } |
| | | |
| | | /** |
| | | * 数据对象转换为显示对象 |
| | | * @param codeClassifyValueDO 数据对象 |
| | | * @return 显示对象 |