1、对MDM服务的接口测试更改。
2、增加sys的菜单接口用于通过业务类型获取相关的界面按钮。
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.annotation.Transient; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * ç¸ä¼¼é¡¹ |
| | | * @author weidy |
| | | * @date 2022-1-14 |
| | | */ |
| | | //@VciBtmType(name = MdmBtmTypeConstant.CODE_CLASSIFY,text = "主é¢åºåç±»",lifeCycle = FrameWorkLcStatusConstant.FRAME_WORK_LIFE_CYCLE_NAME) |
| | | @Data |
| | | @TableName("PL_CODE_RESEMBLERULE") |
| | | @ApiModel(value = "CodeResemblerule对象", description = "ç¸ä¼¼é¡¹") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeResembleRule extends BaseModel { |
| | | |
| | | /** |
| | | * åºåå |
| | | */ |
| | | private static final long serialVersionUID = 7375719926432663351L; |
| | | |
| | | /** |
| | | * æ¯å¦å¿½ç¥å¤§å°å |
| | | */ |
| | | // @Column(columnDefinition = "æ¯å¦å¿½ç¥å¤§å°å") |
| | | private String ignoreCaseFlag; |
| | | |
| | | /** |
| | | * æ¯å¦å¿½ç¥ç©ºæ ¼ |
| | | */ |
| | | // @Column(columnDefinition = "æ¯å¦å¿½ç¥ç©ºæ ¼") |
| | | private String ignoreSpaceFlag; |
| | | |
| | | /** |
| | | * æ¯å¦å¿½ç¥å
¨é¨ç©ºæ ¼ |
| | | */ |
| | | // @Column(columnDefinition = "æ¯å¦å¿½ç¥å
¨é¨ç©ºæ ¼") |
| | | private String ignoreAllSpaceFlag; |
| | | |
| | | /** |
| | | * æ¯å¦å¿½ç¥å
¨åè§ |
| | | */ |
| | | // @Column(columnDefinition = "æ¯å¦å¿½ç¥å
¨åè§") |
| | | private String ignoreWidthFlag; |
| | | |
| | | /** |
| | | * è¿æ¥ç¬¦ |
| | | */ |
| | | // @Column(columnDefinition = "è¿æ¥ç¬¦",length = 200) |
| | | private String linkCharacter; |
| | | |
| | | public String getIgnoreWidthFlag() { |
| | | return ignoreWidthFlag; |
| | | } |
| | | |
| | | public void setIgnoreWidthFlag(String ignoreWidthFlag) { |
| | | this.ignoreWidthFlag = ignoreWidthFlag; |
| | | } |
| | | |
| | | public String getIgnoreCaseFlag() { |
| | | return ignoreCaseFlag; |
| | | } |
| | | |
| | | public void setIgnoreCaseFlag(String ignoreCaseFlag) { |
| | | this.ignoreCaseFlag = ignoreCaseFlag; |
| | | } |
| | | |
| | | public String getIgnoreSpaceFlag() { |
| | | return ignoreSpaceFlag; |
| | | } |
| | | |
| | | public void setIgnoreSpaceFlag(String ignoreSpaceFlag) { |
| | | this.ignoreSpaceFlag = ignoreSpaceFlag; |
| | | } |
| | | |
| | | public String getIgnoreAllSpaceFlag() { |
| | | return ignoreAllSpaceFlag; |
| | | } |
| | | |
| | | public void setIgnoreAllSpaceFlag(String ignoreAllSpaceFlag) { |
| | | this.ignoreAllSpaceFlag = ignoreAllSpaceFlag; |
| | | } |
| | | |
| | | |
| | | public String getLinkCharacter() { |
| | | return linkCharacter; |
| | | } |
| | | |
| | | public void setLinkCharacter(String linkCharacter) { |
| | | this.linkCharacter = linkCharacter; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "CodeResembleRuleDO{" + |
| | | " ignoreCaseFlag='" + ignoreCaseFlag + '\'' + |
| | | ", ignoreSpaceFlag='" + ignoreSpaceFlag + '\'' + |
| | | ", ignoreAllSpaceFlag='" + ignoreAllSpaceFlag + '\'' + |
| | | ", ignoreWidthFlag='" + ignoreWidthFlag + '\'' + |
| | | ", linkCharacter='" + linkCharacter + '\'' + |
| | | "} " + super.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | String API_PREFIX = "/client"; |
| | | String MENU = API_PREFIX + "/menu"; |
| | | String MENU_BUTTON = API_PREFIX + "/menu-button"; |
| | | String DEPT = API_PREFIX + "/dept"; |
| | | String DEPT_IDS = API_PREFIX + "/dept-ids"; |
| | | String DEPT_IDS_FUZZY = API_PREFIX + "/dept-ids-fuzzy"; |
| | |
| | | R<Menu> getMenu(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * è·åèåä¸é¢çæé® |
| | | * |
| | | * @param btmType ä¸å¡ç±»å |
| | | * @return List<Menu> |
| | | */ |
| | | @GetMapping(MENU_BUTTON) |
| | | R<List<Menu>> getMenuButtonByType(@RequestParam("btmType") String btmType); |
| | | |
| | | /** |
| | | * è·åé¨é¨ |
| | | * |
| | | * @param id ä¸»é® |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R<List<Menu>> getMenuButtonByType(String btmType) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | @Override |
| | | public R<Dept> getDept(Long id) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci.ubcs</groupId> |
| | | <artifactId>ubcs-user-api</artifactId> |
| | | <version>3.0.1.RELEASE</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci.ubcs</groupId> |
| | | <artifactId>ubcs-system-api</artifactId> |
| | | <version>3.0.1.RELEASE</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | <!--<dependency> |
| | | <groupId>com.vci.ubcs</groupId> |
| | | <artifactId>ubcs-webservice</artifactId> |
| | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | //@AllArgsConstructor |
| | |
| | | String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + LocalFileUtil.getFileNameForIE(file.getOriginalFilename()); |
| | | File file1 = new File(excelFileName); |
| | | try { |
| | | // file.transferTo(new File(excelFileName)); |
| | | // CodeImProtRusultVO codeImProtRusultVO = mdmIOService.batchImportCode(orderDTO,file1); |
| | | // if(StringUtils.isNotBlank(codeImProtRusultVO.getFilePath())||StringUtils.isNotBlank(codeImProtRusultVO.getRedisUuid())){ |
| | | // //æ¾å°mapé |
| | | // R result = R.fail("导å
¥å¤±è´¥"); |
| | | // if(StringUtils.isNotBlank(codeImProtRusultVO.getFilePath())) { |
| | | // String filedUUid = ControllerUtil.putErrorFile(codeImProtRusultVO.getFilePath()); |
| | | // codeImProtRusultVO.setFileOid(filedUUid); |
| | | // } |
| | | // result.setData(codeImProtRusultVO); |
| | | // return result; |
| | | // }else { |
| | | // return R.success("æä½æåï¼"); |
| | | // } |
| | | file.transferTo(new File(excelFileName)); |
| | | CodeImProtRusultVO codeImProtRusultVO = mdmIOService.batchImportCode(orderDTO,file1); |
| | | if(StringUtils.isNotBlank(codeImProtRusultVO.getFilePath())||StringUtils.isNotBlank(codeImProtRusultVO.getRedisUuid())){ |
| | | //æ¾å°mapé |
| | | R result = R.fail("导å
¥å¤±è´¥"); |
| | | if(StringUtils.isNotBlank(codeImProtRusultVO.getFilePath())) { |
| | | String filedUUid = ControllerUtil.putErrorFile(codeImProtRusultVO.getFilePath()); |
| | | codeImProtRusultVO.setFileOid(filedUUid); |
| | | } |
| | | result.setData(codeImProtRusultVO); |
| | | return result; |
| | | }else { |
| | | return R.success("æä½æåï¼"); |
| | | } |
| | | }catch (Throwable e) { |
| | | logger.error("导å
¥é误",e); |
| | | String errorFile = LocalFileUtil.getDefaultTempFolder() + File.separator + "é误.txt"; |
| | |
| | | }finally { |
| | | file1.delete(); |
| | | } |
| | | return null; |
| | | // return null; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | @GetMapping("/thisistest") |
| | | @ResponseBody |
| | | public List<BaseModel> thisistest(String codeClassifyOid, String functionId) throws Exception { |
| | | return engineService.selectByTypeAndOid("wupin", "b1511bb3-a773-43e2-ac85-a7fde7314a0f,3e08970024835e69f6c2b2ecd90c48c3,582ff205-0dfb-43e0-8223-e772ff1851ab,db0400fe-cc90-4d9d-8da7-1edf06b1481b"); |
| | | public Integer thisistest(String codeClassifyOid, String functionId) throws Exception { |
| | | // return engineService.selectByTypeAndOid("wupin", "b1511bb3-a773-43e2-ac85-a7fde7314a0f,3e08970024835e69f6c2b2ecd90c48c3,582ff205-0dfb-43e0-8223-e772ff1851ab,db0400fe-cc90-4d9d-8da7-1edf06b1481b"); |
| | | |
| | | List<BaseModel> models = new ArrayList<>(); |
| | | BaseModel baseModel = new BaseModel(); |
| | | Map<String,String > map = new HashMap<>(); |
| | | map.put("JZL","6789"); |
| | | map.put("JZRXX","67891"); |
| | | map.put("JZXZB","67892"); |
| | | map.put("JSZGL","67893"); |
| | | map.put("JSSXT","67894"); |
| | | baseModel.setBtmname("djii"); |
| | | baseModel.setCreator("fjivis"); |
| | | baseModel.setId("vcia"); |
| | | baseModel.setOid("0d86b1ba-9e9e-4d3d-9ae4-f862c3684e74"); |
| | | baseModel.setCreateTime(new Date()); |
| | | baseModel.setTs(new Date()); |
| | | baseModel.setData(map); |
| | | models.add(baseModel); |
| | | |
| | | BaseModel baseModel1 = new BaseModel(); |
| | | Map<String,String > map1 = new HashMap<>(); |
| | | map1.put("JZL","6789z"); |
| | | map1.put("JZRXX","67891z"); |
| | | map1.put("JZXZB","67892z"); |
| | | map1.put("JSZGL","67893z"); |
| | | map1.put("JSSXT","67894z"); |
| | | baseModel1.setBtmname("djiiz"); |
| | | baseModel1.setCreator("fjivisz"); |
| | | baseModel1.setId("vciaz"); |
| | | baseModel1.setTs(new Date()); |
| | | baseModel1.setOid("4a00be07-f5a8-4a9b-88fb-d52a0d9cf546"); |
| | | baseModel1.setCreateTime(new Date()); |
| | | baseModel1.setData(map1); |
| | | models.add(baseModel1); |
| | | |
| | | BaseModel baseModel2 = new BaseModel(); |
| | | Map<String,String > map2 = new HashMap<>(); |
| | | map2.put("JZL","67892"); |
| | | map2.put("JZRXX","678912"); |
| | | map2.put("JZXZB","678922"); |
| | | map2.put("JSZGL","678932"); |
| | | map2.put("JSSXT","678942"); |
| | | baseModel2.setBtmname("djii2"); |
| | | baseModel2.setCreator("fjivis2"); |
| | | baseModel2.setTs(new Date()); |
| | | baseModel2.setId("vcia2"); |
| | | baseModel2.setOid("fa430ff9-f141-4dcf-8809-6f87905c1dea"); |
| | | baseModel2.setCreateTime(new Date()); |
| | | baseModel2.setData(map2); |
| | | models.add(baseModel2); |
| | | |
| | | return 0; |
| | | |
| | | |
| | | |
| | | // return engineService.updateBatchByBaseModel("wupin", models); |
| | | // return engineService.getUIInfoByClassifyOid(codeClassifyOid,functionId); |
| | | } |
| | | } |
| | |
| | | /** |
| | | * æ¥æ¾æ å½¢ç»æ |
| | | * |
| | | * @return æ°æ®éå |
| | | */ |
| | | List<CodeClassify> selectCodeClassifyDOByTree(@Param("id") String id,@Param("lcstatus") String lcstatus,@Param("parentcodeclassifyoid") String parentcodeclassifyoid); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ°æ®ä¸PL_CODE_KEYATTRREPEATãPL_CODE_RESEMBLERULEãPL_CODE_RULEèæ¥ |
| | | * |
| | | * @param oids åç±»çä¸»é® |
| | | * @return æ°æ®éå |
| | | */ |
| | | List<CodeClassify> selectClassifyByKeyAndReseRel(@Param("oids") String oids); |
| | | |
| | | /** |
| | | * æ¥æ¾æ å½¢ç»æ |
| | | * |
| | | * @param oid åç±»çä¸»é® |
| | | * @return æ°æ®éå |
| | | */ |
| | |
| | | |
| | | List<CodeClassifyTemplateAttr> selectRefByOid(String oid); |
| | | |
| | | /** |
| | | * æ¡ä»¶,å
³èæ¥è¯¢æåº |
| | | * |
| | | * @param classifytemplateoids |
| | | * @return |
| | | */ |
| | | List<CodeClassifyTemplateAttr> selectByClassifytemplateoidRel(String classifytemplateoids); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.vci.ubcs.code.entity.CodeResembleRule; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ä¸»æ°æ®ç¼ç è§åæ°æ®æä½å± |
| | | * |
| | | * @author ludc |
| | | * @date 2022-01-24 |
| | | */ |
| | | public interface CodeResembleRuleMapper extends BaseMapper<CodeResembleRule>, MPJBaseMapper<CodeResembleRule> { |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | List<Map> selectBySql(@Param("inSql") String inSql); |
| | | |
| | | List<Map<String,String>> queryByOnlySqlForMap(@Param("inSql") String inSql); |
| | | |
| | | /** |
| | | * ä¼ å
¥è¡¨åï¼mapï¼list<map>宿æ¹éæ´æ°æä½ |
| | | * @param tableName 表å |
| | |
| | | package com.vci.ubcs.code.service; |
| | | |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import com.vci.ubcs.code.entity.CodeReferConfig; |
| | | import com.vci.ubcs.code.entity.CodeResembleRule; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeResembleRuleVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | |
| | | public interface ICodeResembleRuleService { |
| | | public interface ICodeResembleRuleService extends MPJBaseService<CodeResembleRule> { |
| | | CodeResembleRuleVO getObjectByOid(String codeResembleRuleOid); |
| | | } |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param codeResembleRuleDO æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | * @throws VciBaseException æ·è´å±æ§åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | CodeResembleRuleVO codeResembleRuleDO2VO(CodeResembleRule codeResembleRuleDO) throws VciBaseException; |
| | | |
| | | } |
| | |
| | | // conditionMap.put("classifytemplateoid", QueryOptionConstant.IN + "(" + VciBaseUtil.toInSql(templateOids.toArray(new String[0])) + ")"); |
| | | // PageHelper pageHelper = new PageHelper(-1); |
| | | // pageHelper.addDefaultAsc("orderNum"); |
| | | QueryWrapper<CodeClassifyTemplateAttr> wrapper = new QueryWrapper<>(); |
| | | wrapper.in("classifytemplateoid",templateOids); |
| | | wrapper.orderByAsc("orderNum"); |
| | | List<CodeClassifyTemplateAttr> attrDOS = baseMapper.selectList(wrapper); |
| | | // QueryWrapper<CodeClassifyTemplateAttr> wrapper = new QueryWrapper<>(); |
| | | // wrapper.in("classifytemplateoid",templateOids); |
| | | // wrapper.orderByAsc("orderNum"); |
| | | List<CodeClassifyTemplateAttr> attrDOS = baseMapper.selectByClassifytemplateoidRel(VciBaseUtil.toInSql(templateOids.toArray(new String[0]))); |
| | | // baseMapper.selectByClassifytemplateoid(VciBaseUtil.toInSql(templateOids.toArray(new String[0]))); |
| | | |
| | | if(!CollectionUtils.isEmpty(attrDOS)){ |
| | |
| | | package com.vci.ubcs.code.service.impl; |
| | | |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.vci.ubcs.code.entity.CodeReferConfig; |
| | | import com.vci.ubcs.code.entity.CodeResembleRule; |
| | | import com.vci.ubcs.code.enumpack.FrameworkDataLCStatus; |
| | | import com.vci.ubcs.code.mapper.CodeReferConfigMapper; |
| | | import com.vci.ubcs.code.mapper.CodeResembleRuleMapper; |
| | | import com.vci.ubcs.code.service.ICodeResembleRuleService; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeResembleRuleVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import static com.vci.ubcs.code.constant.FrameWorkLangCodeConstant.DATA_OID_NOT_EXIST; |
| | | |
| | | /** |
| | | * ç¸ä¼¼æ¥è¯¢è§åæå¡ |
| | |
| | | * @date 2022-04-10 |
| | | */ |
| | | @Service |
| | | public class CodeResembleRuleServiceImpl implements ICodeResembleRuleService { |
| | | public class CodeResembleRuleServiceImpl extends MPJBaseServiceImpl<CodeResembleRuleMapper, CodeResembleRule> implements ICodeResembleRuleService { |
| | | @Override |
| | | public CodeResembleRuleVO getObjectByOid(String codeResembleRuleOid) { |
| | | return null; |
| | | public CodeResembleRuleVO getObjectByOid(String oid) { |
| | | return codeResembleRuleDO2VO(selectByOid(oid)); |
| | | } |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢æ°æ®å¯¹è±¡ |
| | | * @param oid ä¸»é® |
| | | * @return æ°æ®å¯¹è±¡ |
| | | * @throws VciBaseException åæ°ä¸ºç©ºï¼å¹¶ä¸æ°æ®ä¸åå¨çæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | private CodeResembleRule selectByOid(String oid) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(oid,"主é®"); |
| | | CodeResembleRule codeResembleRuleDO = baseMapper.selectById(oid.trim()); |
| | | // CodeResembleRule codeResembleRuleDO = codeResembleRuleMapper.selectByPrimaryKey(oid.trim()); |
| | | if(codeResembleRuleDO == null || StringUtils.isBlank(codeResembleRuleDO.getOid())){ |
| | | throw new VciBaseException(DATA_OID_NOT_EXIST); |
| | | } |
| | | return codeResembleRuleDO; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param codeResembleRuleDO æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | * @throws VciBaseException æ·è´å±æ§åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public CodeResembleRuleVO codeResembleRuleDO2VO(CodeResembleRule codeResembleRuleDO) throws VciBaseException{ |
| | | CodeResembleRuleVO vo = new CodeResembleRuleVO(); |
| | | if(codeResembleRuleDO != null){ |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(codeResembleRuleDO,vo); |
| | | //妿ælcstatusçç±»çè¯ |
| | | vo.setLcStatusText(FrameworkDataLCStatus.getTextByValue(vo.getLcStatus())); |
| | | |
| | | } |
| | | return vo; |
| | | } |
| | | } |
| | |
| | | import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid; |
| | | import com.vci.ubcs.starter.web.pagemodel.KeyValue; |
| | | import com.vci.ubcs.starter.web.util.LangBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciDateUtil; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | String redisUUid=batchImportCodes(orderDTO,templateVO,dataSet,errorMap,true); |
| | | CodeImProtRusultVO codeImProtRusultVO = new CodeImProtRusultVO(); |
| | | List<String> needRowIndexList = new ArrayList<>(); |
| | | // String filePath = returnErrorToExcel(dataSet.getRowData(), errorMap, needRowIndexList, dataSet.getColName()); |
| | | // if(StringUtils.isNotBlank(filePath)) { |
| | | // codeImProtRusultVO.setFilePath(filePath); |
| | | // } |
| | | // if(StringUtils.isNotBlank(redisUUid)){ |
| | | // codeImProtRusultVO.setRedisUuid(redisUUid); |
| | | // } |
| | | return null; |
| | | // return codeImProtRusultVO; |
| | | String filePath = returnErrorToExcel(dataSet.getRowData(), errorMap, needRowIndexList, dataSet.getColName()); |
| | | if(StringUtils.isNotBlank(filePath)) { |
| | | codeImProtRusultVO.setFilePath(filePath); |
| | | } |
| | | if(StringUtils.isNotBlank(redisUUid)){ |
| | | codeImProtRusultVO.setRedisUuid(redisUUid); |
| | | } |
| | | // return null; |
| | | return codeImProtRusultVO; |
| | | } |
| | | |
| | | /** |
| | | * é误信æ¯è¿åexcel |
| | | * @param rowDataList ææç导å
¥æ°æ® |
| | | * @param errorMap é误çä¿¡æ¯ |
| | | * @param needRowIndexList éè¦åå
¥çæ°æ®çè¡å· |
| | | * @param titleRowData æ é¢è¡ |
| | | * |
| | | * @return é误çexcelæä»¶ï¼æ²¡æé误ä¼è¿å空 |
| | | */ |
| | | private String returnErrorToExcel(Collection<SheetRowData> rowDataList, |
| | | Map<String,String> errorMap, |
| | | List<String> needRowIndexList,List<String> titleRowData){ |
| | | if(CollectionUtils.isEmpty(errorMap)){ |
| | | return ""; |
| | | } |
| | | Map<String, SheetRowData> rowIndexDataMap = rowDataList.stream().filter(s -> !needRowIndexList.contains(s.getRowIndex())).collect(Collectors.toMap(s -> s.getRowIndex(), t -> t)); |
| | | List<WriteExcelData> errorDataList = new ArrayList<>(); |
| | | errorDataList.add(new WriteExcelData(0,0,"é误信æ¯")); |
| | | for (int i = 0; i < titleRowData.size(); i++) { |
| | | //é误信æ¯å¨æå |
| | | errorDataList.add(new WriteExcelData(0,i+1,titleRowData.get(i))); |
| | | } |
| | | Integer[] newRowIndex = new Integer[]{1}; |
| | | errorMap.forEach((index,error)->{ |
| | | //é误信æ¯å
¨é¨ç»åå°ä¸èµ· |
| | | SheetRowData rowData = rowIndexDataMap.getOrDefault(index, null); |
| | | if(rowData!=null){ |
| | | errorDataList.add(new WriteExcelData(newRowIndex[0],0,error)); |
| | | rowData.getData().forEach((colIndex,value)->{ |
| | | errorDataList.add(new WriteExcelData(newRowIndex[0],colIndex+1,value)); |
| | | }); |
| | | newRowIndex[0]++; |
| | | } |
| | | }); |
| | | String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + "é误信æ¯.xls"; |
| | | WriteExcelOption eo = new WriteExcelOption(errorDataList); |
| | | try { |
| | | new File(excelFileName).createNewFile(); |
| | | } catch (IOException e) { |
| | | throw new VciBaseException(LangBaseUtil.getErrorMsg(e)); |
| | | } |
| | | ExcelUtil.writeDataToFile(excelFileName,eo); |
| | | return excelFileName; |
| | | } |
| | | |
| | | /** |
| | |
| | | order by id asc |
| | | </select> |
| | | |
| | | <select id="selectCodeClassifyDOByTree" resultMap="plCodeClassifyResultMap"> |
| | | select codeclassify0.OWNER as owner, |
| | | codeclassify0.BTMTYPEID as btmtypeid, |
| | | codeclassify0.CREATOR as creator, |
| | | codeclassify0.CREATETIME as createtime, |
| | | codeclassify0.LASTMODIFIER as lastmodifier, |
| | | codeclassify0.DESCRIPTION as description, |
| | | codeclassify0.ORDERNUM as ordernum, |
| | | codeclassify0.CODERULEOID as coderuleoid, |
| | | codeclassify0.OID as oid, |
| | | codeclassify0.BTMNAME as btmname, |
| | | codeclassify0.BTMTYPENAME as btmtypename, |
| | | codeclassify0.CODEKEYATTRREPEATOID as codekeyattrrepeatoid, |
| | | codeclassify0.PARENTCODECLASSIFYOID as parentcodeclassifyoid, |
| | | codeclassify0.NAME as name, |
| | | codeclassify0.LASTMODIFYTIME as lastmodifytime, |
| | | codeclassify0.ID as id, |
| | | codeclassify0.CODERESEMBLERULEOID as coderesembleruleoid, |
| | | codeclassify0.LCSTATUS as lcstatus, |
| | | codeclassify0.TS as ts, |
| | | coderuleoid.name as codeRuleOidName, |
| | | codekeyattrrepeatoid.name as codeKeyAttrRepeatOidName, |
| | | coderesembleruleoid.name as codeResembleRuleOidName |
| | | from pl_code_classify codeclassify0 |
| | | left join pl_code_rule coderuleoid |
| | | on codeclassify0.codeRuleOid = coderuleoid.oid |
| | | left join pl_code_keyattrrepeat codekeyattrrepeatoid |
| | | on codeclassify0.codeKeyAttrRepeatOid = codekeyattrrepeatoid.oid |
| | | left join pl_code_resemblerule coderesembleruleoid |
| | | on codeclassify0.codeResembleRuleOid = coderesembleruleoid.oid |
| | | where codeclassify0.lcstatus = #{lcstatus} |
| | | <if test="parentcodeclassifyoid != null and parentcodeclassifyoid != ''"> |
| | | and codeclassify0.parentcodeclassifyoid = #{parentcodeclassifyoid} |
| | | </if> |
| | | <if test="parentcodeclassifyoid == null or parentcodeclassifyoid == ''"> |
| | | and codeclassify0.parentcodeclassifyoid is null |
| | | and codeclassify0.id = #{id} |
| | | </if> |
| | | order by id asc |
| | | </select> |
| | | |
| | | <select id="selectClassifyByKeyAndReseRel" resultMap="plCodeClassifyResultMap"> |
| | | SELECT PCC.*, |
| | | PCK.NAME AS CODEKEYATTRREPEATOIDNAME, |
| | | PCR.NAME AS CODERESEMBLERULEOIDNAME, |
| | | PCE.NAME CODERULEOIDNAME |
| | | FROM PL_CODE_CLASSIFY PCC |
| | | LEFT JOIN PL_CODE_KEYATTRREPEAT PCK |
| | | ON PCC.CODEKEYATTRREPEATOID = PCK.OID |
| | | LEFT JOIN PL_CODE_RESEMBLERULE PCR |
| | | ON PCC.CODERESEMBLERULEOID = PCR.OID |
| | | LEFT JOIN PL_CODE_RULE PCE |
| | | ON PCC.CODERULEOID = PCE.OID |
| | | WHERE PCC.OID IN (${oids}) |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | where codeclstempattr0.classifytemplateoid = #{oid} |
| | | </select> |
| | | |
| | | <select id="selectByClassifytemplateoidRel" resultMap="CodeClstempattrResultMap"> |
| | | select PCC.*, PLT.NAME classifyTemplateOidName |
| | | from PL_CODE_CLSTEMPATTR PCC, PL_CODE_CLSTEMPLATE PLT |
| | | where PCC.CLASSIFYTEMPLATEOID = PLT.OID |
| | | AND PCC.classifytemplateoid IN (${oid}) |
| | | ORDER BY PCC.ORDERNUM ASC |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vci.ubcs.code.mapper.CodeResembleRuleMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="CodeResembleRuleResultMap" type="com.vci.ubcs.code.entity.CodeResembleRule"> |
| | | <id property="oid" column="OID"/> |
| | | <result property="btmname" column="BTMNAME"/> |
| | | <result property="revisionOid" column="REVISIONOID"/> |
| | | <result property="nameOid" column="NAMEOID"/> |
| | | <result property="lastR" column="LASTR"/> |
| | | <result property="firstR" column="FIRSTR"/> |
| | | <result property="lastV" column="LASTV"/> |
| | | <result property="firstV" column="FIRSTV"/> |
| | | <result property="creator" column="CREATOR"/> |
| | | <result property="createTime" column="CREATETIME"/> |
| | | <result property="lastModifier" column="LASTMODIFIER"/> |
| | | <result property="lastModifyTime" column="LASTMODIFYTIME"/> |
| | | <result property="revisionRule" column="REVISIONVALUE"/> |
| | | <result property="versionRule" column="VISIONRULE"/> |
| | | <result property="revisionValue" column="REVISIONRULE"/> |
| | | <result property="versionValue" column="VERSIONVALUE"/> |
| | | <result property="revisionSeq" column="REVISIONSEQ"/> |
| | | <result property="versionSeq" column="VERSIONSEQ"/> |
| | | <result property="lctid" column="LCTID"/> |
| | | <result property="lcStatus" column="LCSTATUS"/> |
| | | <result property="ts" column="TS"/> |
| | | <result property="id" column="ID"/> |
| | | <result property="name" column="NAME"/> |
| | | <result property="description" column="DESCRIPTION"/> |
| | | <result property="owner" column="OWNER"/> |
| | | <result property="copyFromVersion" column="COPYFROMVERSION"/> |
| | | <result property="ignoreCaseFlag" column="IGNORECASEFLAG"/> |
| | | <result property="ignoreSpaceFlag" column="IGNORESPACEFLAG"/> |
| | | <result property="ignoreAllSpaceFlag" column="IGNOREALLSPACEFLAG"/> |
| | | <result property="ignoreWidthFlag" column="IGNOREWIDTHFLAG"/> |
| | | <result property="linkCharacter" column="LINKCHARACTER"/> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | ${inSql} |
| | | </select> |
| | | |
| | | <select id="queryByOnlySqlForMap" resultType="java.util.Map"> |
| | | ${inSql} |
| | | </select> |
| | | |
| | | <insert id="insertByBaseModel" parameterType="java.util.Map"> |
| | | insert into ${tableName} |
| | | ( |
| | |
| | | <artifactId>orai18n</artifactId> |
| | | <version>${orai18n.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci.ubcs</groupId> |
| | | <artifactId>ubcs-code-api</artifactId> |
| | | <version>3.0.1.RELEASE</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import java.util.List; |
| | |
| | | public R<Menu> getMenu(Long id) { |
| | | return R.data(menuService.getById(id)); |
| | | } |
| | | @Override |
| | | @GetMapping(MENU_BUTTON) |
| | | public R<List<Menu>> getMenuButtonByType(String btmType) { |
| | | return R.data(menuService.getMenuButtonByType(btmType)); |
| | | } |
| | | |
| | | @Override |
| | | @GetMapping(DEPT) |
| | |
| | | * @return |
| | | */ |
| | | List<Menu> allMenu(); |
| | | /** |
| | | * æ ¹æ®ä¸å¡ç±»åæ¥è¯¢èåçåæé® |
| | | * |
| | | * @return |
| | | */ |
| | | List<Menu> selectMenuChildByBtnType(String btmType); |
| | | |
| | | /** |
| | | * æéé
ç½®èå |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.node.TreeNode; |
| | | import org.springblade.core.tool.support.Kv; |
| | | import com.vci.ubcs.system.entity.Menu; |
| | |
| | | * @return |
| | | */ |
| | | boolean submit(Menu menu); |
| | | |
| | | /** |
| | | * è·åèåä¸é¢çæé® |
| | | * |
| | | * @param btmType ä¸å¡ç±»å |
| | | * @return List<Menu> |
| | | */ |
| | | List<Menu> getMenuButtonByType(String btmType); |
| | | } |
| | |
| | | import com.vci.ubcs.system.service.ITopMenuSettingService; |
| | | import com.vci.ubcs.system.wrapper.MenuWrapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import com.vci.ubcs.core.log.exception.ServiceException; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.constant.BladeConstant; |
| | | import org.springblade.core.tool.node.ForestNodeMerger; |
| | | import org.springblade.core.tool.node.TreeNode; |
| | |
| | | return saveOrUpdate(menu); |
| | | } |
| | | |
| | | @Override |
| | | public List<Menu> getMenuButtonByType(String btmType) { |
| | | return baseMapper.selectMenuChildByBtnType(btmType); |
| | | } |
| | | |
| | | } |
| | |
| | | GROUP BY m.path |
| | | </select> |
| | | |
| | | <select id="selectMenuChildByBtnType" resultMap="menuResultMap"> |
| | | select pm.* |
| | | from pl_sys_menu ps, pl_sys_menu pm |
| | | where ps.is_deleted = 0 |
| | | and ps.category = 1 |
| | | and ps.alias = #{btmType} |
| | | and ps.id = pm.parent_id order by pm.sort asc |
| | | </select> |
| | | |
| | | </mapper> |