| | |
| | | import com.vci.ubcs.code.mapper.CodeButtonMapper; |
| | | import com.vci.ubcs.code.service.ICodeButtonService; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeButtonVO; |
| | | import com.vci.ubcs.code.wrapper.CodeButtonWrapper; |
| | | import com.vci.ubcs.common.utils.PageDO2PageVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.revision.service.RevisionModelUtil; |
| | |
| | | query.setSize(pageHelper.getLimit()); |
| | | query.setCurrent(pageHelper.getPage()); |
| | | } |
| | | query.setDescs("createTime"); |
| | | query.setDescs("CREATETIME"); |
| | | CodeButton codeButton = new CodeButton(); |
| | | BeanMap beanMap = BeanMap.create(codeButton); |
| | | beanMap.putAll(conditionMap); |
| | | IPage<CodeButton> doList = codeButtonMapper.selectPage(Condition.getPage(query),Condition.getQueryWrapper(codeButton)); |
| | | IPage<CodeButtonVO> voList = new Page<>(); |
| | | if (!CollectionUtils.isEmpty(doList.getRecords())) { |
| | | voList.setRecords(codeButtonDO2VOs(doList.getRecords())); |
| | | PageDO2PageVO.pageDO2PageVO(doList,voList); |
| | | voList = CodeButtonWrapper.build().pageVO(doList); |
| | | } |
| | | return voList; |
| | | } |
| | |
| | | * @throws VciBaseException 参数为空或者不存在的时候会抛出异常 |
| | | */ |
| | | @Override |
| | | public List<CodeButtonVO> codeButtonDO2VOs(Collection<CodeButton> codeButtonDOs) throws VciBaseException{ |
| | | public List<CodeButtonVO> codeButtonDO2VOs(Collection<CodeButton> codeButtonDOs) throws VciBaseException{ |
| | | List<CodeButtonVO> voList = new ArrayList<CodeButtonVO>(); |
| | | if(!CollectionUtils.isEmpty(codeButtonDOs)){ |
| | | for(CodeButton s: codeButtonDOs){ |
| | |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(codeButtonDO,vo); |
| | | //如果有lcstatus的类的话 |
| | | vo.setLcStatusText(FrameworkDataLCStatus.getTextByValue(vo.getLcStatus())); |
| | | vo.setUsedpositiontypeText(CodeUseButtonPositionTypeEnum.getTextByValue(codeButtonDO.getUsedPositionType())); |
| | | |
| | | } |
| | | return vo; |
| | | } |
| | |
| | | return codeButtonDOList; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R enableCodeButton(String id) { |
| | | CodeButton codebutton = codeButtonMapper.selectById(id); |
| | |
| | | * @return 执行的结果 |
| | | */ |
| | | private R changeLcStatus(CodeButton buttonDTO, boolean disable){ |
| | | // VciBaseUtil.alertNotNull(buttonDTO,"数据对象",buttonDTO.getOid(),"主键"); |
| | | // VciBaseUtil.alertNotNull(buttonDTO,"数据对象",buttonDTO.getOid(),"主键"); |
| | | if(disable){ |
| | | buttonDTO.setLcStatus(FrameworkDataLCStatus.ENABLED.getValue()); |
| | | }else{ |