| | |
| | | openMenu(item = {}) { |
| | | this.$store.dispatch("GetMenu", item.id).then(data => { |
| | | if (data.length !== 0) { |
| | | debugger; |
| | | // debugger; |
| | | this.$router.$avueRouter.formatRoutes(data, true); |
| | | } |
| | | //当点击顶部菜单后默认打开第一个菜单 |
| | |
| | | @Api(value = "编码数据管理", tags = "编码数据管理") |
| | | public class MdmEngineController { |
| | | |
| | | // /** |
| | | // * 日志 |
| | | // */ |
| | | /** |
| | | * 日志 |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | /** |
| | | * 主数据引擎服务 |
| | |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("changeStatus") |
| | | public R changeStatus(BaseModelDTO baseModelDTO) { |
| | | public R changeStatus(@RequestBody BaseModelDTO baseModelDTO) { |
| | | engineService.changeStatus(baseModelDTO); |
| | | return R.success("操作成功!"); |
| | | } |
| | |
| | | * 码值回收 |
| | | */ |
| | | TASK_BACK(FrameWorkDefaultValueConstant.FRAMEWORK_RELEASE_TAKEBACK,"码值回收"), |
| | | |
| | | /** |
| | | * 停用 |
| | | */ |
| | |
| | | */ |
| | | Map<String,Object> getNextRevision(@Param("tableName")String tableName,@Param("nameoid") String nameoid); |
| | | |
| | | // Integer updateByTaleAndOid(@Param("tableName")String tableName, @Param("nameoid") String nameoid, @Param("lcStatus") String lcStatus); |
| | | |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.beans.BeanInfo; |
| | |
| | | if (baseModels.size() == 0) { |
| | | throw new VciBaseException("未查询到相关数据。"); |
| | | } |
| | | // 待完善 |
| | | List<BtmTypeVO> cboList = null; // btmTypeClient.selectList(wrapper); |
| | | //还需要修改allCode的生命周期 |
| | | // Map<String, String> conditionMap = new HashMap<>(); |
| | | QueryWrapper<CodeAllCode> allCodeWrapper = new QueryWrapper<>(); |
| | |
| | | if (!listR.isSuccess() || listR.getData().size() == 0) { |
| | | throw new VciBaseException("传入业务类型未查询到相应表单,请检查!"); |
| | | } |
| | | commonsMapper.deleteByTaleAndOid(listR.getData().get(0).getTableName(), VciBaseUtil.toInSql(baseModelDTO.getOid())); |
| | | // 直接删除,不给状态 |
| | | commonsMapper.deleteByTaleAndOid(listR.getData().get(0).getTableName(), VciBaseUtil.toInSql(baseModelDTO.getOid())); |
| | | // commonsMapper.updateByTaleAndOid(listR.getData().get(0).getTableName(), VciBaseUtil.toInSql(baseModelDTO.getOid()),CodeDefaultLC.TASK_BACK.getValue()); |
| | | } else { |
| | | for (BaseModel baseModel : baseModels) { |
| | | baseModel.setLcStatus(baseModelDTO.getLcStatus()); |
| | | } |
| | | updateBatchByBaseModel(baseModelDTO.getBtmname(), baseModels); |
| | | // lifeCycleService.transCboStatus(cboList, baseModelDTO.getLcStatus()); |
| | | } |
| | | for (CodeAllCode codeCbo : codeCbos) { |
| | | codeCbo.setLcStatus(baseModelDTO.getLcStatus()); |
| | | } |
| | | codeAllCodeService.updateBatchById(codeCbos); |
| | | // lifeCycleService.transCboStatus(codeCbos, baseModelDTO.getLcStatus()); |
| | | } |
| | | |
| | | /** |
| | |
| | | delete from ${tableName} where oid in (${oids}) |
| | | </insert> |
| | | |
| | | <!-- <update id="updateByTaleAndOid">--> |
| | | <!-- update ${tableName}--> |
| | | <!-- set lcStatus = #{lcStatus}--> |
| | | <!-- where oid = (${oids})--> |
| | | <!-- </update>--> |
| | | |
| | | |
| | | <update id="updateBatchByBaseModel" parameterType="java.util.List" > |
| | | BEGIN |
| | | <foreach collection="mapList" item="columnMap" index="index" separator=";"> |
| | |
| | | @Override |
| | | public boolean submit(Menu menu) { |
| | | LambdaQueryWrapper<Menu> menuQueryWrapper = Wrappers.lambdaQuery(); |
| | | // 新增 |
| | | if (menu.getId() == null) { |
| | | menuQueryWrapper.eq(Menu::getCode, menu.getCode()).or( |
| | | wrapper -> wrapper.eq(Menu::getName, menu.getName()).eq(Menu::getCategory, MENU_CATEGORY) |
| | | ); |
| | | //检验是否重复菜单别名,只校验同一父分类菜单下的编号是否重复 |
| | | menuQueryWrapper.eq(Menu::getParentId,menu.getParentId()!=null ? menu.getParentId():BladeConstant.TOP_PARENT_ID) |
| | | .eq(Menu::getCode, menu.getCode()) |
| | | .or(wrapper -> wrapper.eq(Menu::getName, menu.getName()).eq(Menu::getCategory, MENU_CATEGORY)) |
| | | ; |
| | | } else { |
| | | // 修改 |
| | | menuQueryWrapper.ne(Menu::getId, menu.getId()).and( |
| | | wrapper -> wrapper.eq(Menu::getCode, menu.getCode()).or( |
| | | o -> o.eq(Menu::getName, menu.getName()).eq(Menu::getCategory, MENU_CATEGORY) |
| | | ) |
| | | wrapper -> wrapper.eq(Menu::getCode, menu.getCode()) |
| | | .eq(Menu::getParentId,menu.getParentId()) |
| | | .or(o -> o.eq(Menu::getName, menu.getName()).eq(Menu::getCategory, MENU_CATEGORY)) |
| | | ); |
| | | } |
| | | Long cnt = baseMapper.selectCount(menuQueryWrapper); |