| | |
| | | <artifactId>spring-security-config</artifactId> |
| | | <version>4.1.3.RELEASE</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.belerweb</groupId> |
| | | <artifactId>pinyin4j</artifactId> |
| | | <version>2.5.0</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | import org.activiti.engine.task.Task; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.servlet.http.HttpSession; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.*; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | IMaintainService maintainService; |
| | | @Autowired |
| | | ITUserService userService; |
| | | |
| | | @Value("${img.url}") |
| | | String basePath; |
| | | |
| | | @RequestMapping(value = "/list", method = RequestMethod.GET) |
| | | public Result<List<Map<String, Object>>> list(HttpServletRequest request) throws FileNotFoundException { |
| | |
| | | List<Map<String, Object>> list = flowsMapper.selectVersion(filterSegment); |
| | | for (Map<String, Object> one : list) { |
| | | String newModelId = (String) one.get(Constant.ID); |
| | | String url = "processes/" + newModelId + "/" + newModelId + ".png"; |
| | | String url = "act/img/" + newModelId; |
| | | one.put("imgurl",url); |
| | | } |
| | | return Result.success(list); |
| | | } |
| | | @RequestMapping(value = "/img/{modelId}", method = RequestMethod.GET) |
| | | public void image(@PathVariable String modelId, HttpServletResponse response) { |
| | | String filePath = basePath + modelId +"/"+ modelId + ".png"; |
| | | File file = new File(filePath); |
| | | FileInputStream fileInputStream = null; |
| | | response.setHeader("Content-Type", "image/png"); |
| | | try{ |
| | | fileInputStream = new FileInputStream(file); |
| | | OutputStream outputStream = response.getOutputStream(); |
| | | byte[] b = new byte[1024]; |
| | | int len; |
| | | while ((len = fileInputStream.read(b, 0, 1024)) != -1) { |
| | | outputStream.write(b, 0, len); |
| | | } |
| | | } |
| | | catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | finally { |
| | | if (fileInputStream != null) { |
| | | try { |
| | | fileInputStream.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | @RequestMapping(value = "/deleteModel/{modelId}", method = RequestMethod.GET) |
| | | public Result deleteModel(@PathVariable String modelId) { |
| | | boolean b = repositoryService.deleteModel(modelId); |
| | | if (b) { |
| | | return Result.success(null); |
| | | } else { |
| | | return Result.error(CodeMsg.DELETE_ERROR); |
| | | } |
| | | } |
| | | @RequestMapping(value = "/processlist", method = RequestMethod.GET) |
| | | public Result<Result<JSONArray>> processlist(HttpServletRequest request) { |
| | | Result<JSONArray> processList = repositoryService.getProcessList(); |
| | |
| | | } else { |
| | | flows.setStatus(ActivitiStatus.open); |
| | | } |
| | | |
| | | if (!pass) { |
| | | flows.setStatus(ActivitiStatus.close); |
| | | } |
| | | |
| | | if (flows.getBusinessType().equals(ActivitiBusinessType.maintain)){ |
| | | String maintainId = flows.getBusinessId(); |
| | | maintainService.dealFlow(maintainId, flows.getStatus()); |
| | |
| | | package com.highdatas.mdm.controller; |
| | | |
| | | import com.fasterxml.jackson.databind.node.ObjectNode; |
| | | import com.highdatas.mdm.pojo.CodeMsg; |
| | | import com.highdatas.mdm.pojo.Result; |
| | | import com.highdatas.mdm.service.ModelEditorService; |
| | | import com.highdatas.mdm.service.act.IdentityService; |
| | | import com.highdatas.mdm.service.act.RepositoryService; |
| | |
| | | |
| | | @RequestMapping(value="/model/{modelId}/save", method = RequestMethod.PUT) |
| | | |
| | | public void saveModel(@PathVariable String modelId, HttpServletRequest request) { |
| | | repositoryService.saveModel(modelId, request); |
| | | public Result saveModel(@PathVariable String modelId, HttpServletRequest request) { |
| | | boolean saved = repositoryService.saveModel(modelId, request); |
| | | if (saved) { |
| | | return Result.success(null); |
| | | } else { |
| | | return Result.error(new CodeMsg(1000, "未检测到任一标签")); |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value="/model/{modelId}/delete", method = RequestMethod.PUT) |
New file |
| | |
| | | package com.highdatas.mdm.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.stereotype.Controller; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author kimi |
| | | * @since 2020-01-13 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/deletedTableLog") |
| | | public class DeletedTableLogController { |
| | | |
| | | } |
| | |
| | | return maintainService.getUnSubmitData(tableName, pageNo, pageSize, whereSegment); |
| | | } |
| | | |
| | | @RequestMapping(value = "{tableName}/unflow/{pageNo}", method = RequestMethod.GET) |
| | | public Result unflow(@PathVariable String tableName, @PathVariable Integer pageNo, HttpServletRequest request) throws UnsupportedEncodingException { |
| | | String pageSize = request.getParameter("pageSize"); |
| | | String whereSegment = request.getParameter("whereSegment"); |
| | | |
| | | if (StringUtils.isEmpty(whereSegment)) { |
| | | whereSegment = Constant.WHERE_DEFAULT; |
| | | }else { |
| | | whereSegment = URLDecoder.decode(whereSegment, "UTF-8"); |
| | | } |
| | | if (StringUtils.isEmpty(pageSize)) { |
| | | return maintainService.getInvalidVerionData(tableName, whereSegment, pageNo, null); |
| | | } else { |
| | | return maintainService.getInvalidVerionData(tableName, whereSegment, pageNo, Integer.valueOf(pageSize)); |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/history/{tableName}", method = RequestMethod.GET) |
| | | public Result getHistory(@PathVariable String tableName) { |
| | | |
| | |
| | | } |
| | | |
| | | List<String> result = maintainList.stream() |
| | | .filter(maintain -> !StringUtils.isEmpty(maintain.getFlowId())) |
| | | .filter(maintain -> flowsService.selectById(maintain.getFlowId()).getStatus().equals(ActivitiStatus.open)) |
| | | .map(maintain -> maintain.getVersion()) |
| | | .collect(Collectors.toList()); |
| | | |
| | |
| | | if (StringUtils.isEmpty(uploadType)) { |
| | | uploadType = Constant.All; |
| | | } |
| | | MenuMapping menuMapping = menuMappingService.selectOne(new EntityWrapper<MenuMapping>().eq("table_name",tableName)); |
| | | SysOperateLog operateLog = new SysOperateLog(); |
| | | |
| | | Maintain maxVersion = maintainService.getMaxVersion(tableName); |
| | | Maintain maintain = new Maintain(); |
| | | String biggerVersion = null; |
| | | if (maxVersion == null) { |
| | | biggerVersion = Constant.VERSION_Default; |
| | | maintain.setOrderNo(0); |
| | | operateLog.setOperate("初始化主题数据"); |
| | | } else { |
| | | operateLog.setOperate("更新主题"); |
| | | String flowId = maxVersion.getFlowId(); |
| | | String mVersion = maxVersion.getVersion(); |
| | | if (StringUtils.isEmpty(flowId)) { |
| | |
| | | Long aLong = tableInfoMapper.tempDeal(maintain.getTableName() + Constant.RECORD, DbUtils.quotedStr(maintain.getId())); |
| | | |
| | | maintain.setDesp(MessageFormat.format("上传数据{0}条", aLong)); |
| | | MenuMapping menuMapping = menuMappingService.selectOne(new EntityWrapper<MenuMapping>().eq("table_name", maintain.getTableName())); |
| | | |
| | | SysOperateLog operateLog = new SysOperateLog(); |
| | | operateLog.setCreateTime(new Date()) |
| | | .setMaintainId(maintain.getId()) |
| | | .setId(DbUtils.getUUID()) |
| | |
| | | return masterDataService.selectList(tableName,whereSegment); |
| | | } |
| | | |
| | | @RequestMapping(value = "{maintainId}/modify/{operateStr}", method = RequestMethod.GET) |
| | | public Result modify(@PathVariable String maintainId, @PathVariable String operateStr, HttpServletRequest request) throws UnsupportedEncodingException { |
| | | @RequestMapping(value = "{maintainId}/modify/{operateStr}", method = RequestMethod.POST) |
| | | public Result modify(@RequestParam String datas, @PathVariable String maintainId, @PathVariable String operateStr, HttpServletRequest request) throws UnsupportedEncodingException { |
| | | Result result = null; |
| | | Operate operate = Operate.parse(operateStr); |
| | | String datas = request.getParameter("datas"); |
| | | Maintain maintain = maintainService.selectById(maintainId); |
| | | switch (operate) { |
| | | case delete: |
| | | //datas is id; |
| | | result = deleteById(maintain.getTableName() + Constant.RECORD, datas); |
| | | Integer deleteCount = tableInfoMapper.deleteRecordByMaintainId(maintain.getTableName() + Constant.RECORD, DbUtils.quotedStr(datas), DbUtils.quotedStr(maintainId)); |
| | | |
| | | result = Result.success(deleteCount); |
| | | break; |
| | | case update: |
| | | JSONObject jsonObject = JSONObject.parseObject(datas); |
| | | Object id = jsonObject.get("id"); |
| | | String updateSegment = masterDataService.getUpdateSegment(maintain.getTableName(), datas); |
| | | result = masterDataService.update(maintain.getTableName() + Constant.RECORD, updateSegment, false); |
| | | String id = (String) jsonObject.get("id"); |
| | | jsonObject.remove(Constant.ID); |
| | | datas = jsonObject.toJSONString(); |
| | | String updateSegment = masterDataService.getUpdateSegment(maintain.getTableName(), maintain.getTableName() + Constant.RECORD, datas); |
| | | |
| | | Integer updateCount = tableInfoMapper.updateRecordByMaintainId(maintain.getTableName() + Constant.RECORD, updateSegment, DbUtils.quotedStr(maintainId)); |
| | | result = Result.success(updateCount); |
| | | break; |
| | | case create: |
| | | JSONObject createObject = JSONObject.parseObject(datas); |
| | | String recordId = DbUtils.getUUID(); |
| | | createObject.fluentPut(Constant.ID, recordId); |
| | | createObject.fluentPut(Constant.STD_ID, DbUtils.getUUID()); |
| | | datas = createObject.toJSONString(); |
| | | |
| | | MaintainDetail maintainDetail = new MaintainDetail(); |
| | | maintainDetail.setParentId(maintainId); |
| | | maintainDetail.setId(DbUtils.getUUID()); |
| | | maintainDetail.setPreMergeId(recordId); |
| | | maintainDetail.setCreateTime(new Date()); |
| | | maintainDetail.setOperate(Operate.create); |
| | | |
| | | result = masterDataService.insert(maintain.getTableName() + Constant.RECORD, datas); |
| | | if (result.getSuccess()) { |
| | | maintainDetail.insert(); |
| | | } |
| | | break; |
| | | default: |
| | | result = Result.error(CodeMsg.OPERATR_ERROR); |
| | |
| | | @RequestMapping(value = "/add", method = RequestMethod.POST) |
| | | public Result<Object> insert(@RequestParam String data, HttpServletRequest request) { |
| | | HttpSession session = request.getSession(); |
| | | boolean inserted =menuMappingService.create(data, session); |
| | | if (inserted) { |
| | | return Result.success("插入成功", null); |
| | | MenuMapping inserted =menuMappingService.create(data, session); |
| | | if (inserted != null) { |
| | | return Result.success(inserted); |
| | | } else { |
| | | return Result.error(CodeMsg.INSERT_ERROR); |
| | | } |
| | |
| | | String businessType = request.getParameter("businessType"); |
| | | SysBusinessOperate businessOperate = businessOperateService.selectById(id); |
| | | |
| | | businessOperate.setCreateTime(new Date()).setId(DbUtils.getUUID()).setChageId(user.getUserId()).setModelId(modelId).setBusinessType(businessType); |
| | | businessOperate.setCreateTime(new Date()).setChageId(user.getUserId()).setModelId(modelId).setBusinessType(businessType); |
| | | businessOperate.setUpdateTime(new Date()); |
| | | boolean update = businessOperate.updateById(); |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.highdatas.mdm.entity.DeletedTableLog; |
| | | import com.highdatas.mdm.entity.MenuMapping; |
| | | import com.highdatas.mdm.entity.SysMenu; |
| | | import com.highdatas.mdm.pojo.CodeMsg; |
| | | import com.highdatas.mdm.pojo.MaintainDataType; |
| | | import com.highdatas.mdm.pojo.Result; |
| | | import com.highdatas.mdm.service.IDeletedTableLogService; |
| | | import com.highdatas.mdm.service.IMenuMappingService; |
| | | import com.highdatas.mdm.service.ISysMenuService; |
| | | import com.highdatas.mdm.util.Constant; |
| | | import com.highdatas.mdm.util.DbUtils; |
| | |
| | | @RequestMapping("/menu") |
| | | public class SysMenuController { |
| | | @Autowired |
| | | private ISysMenuService menuService; |
| | | ISysMenuService menuService; |
| | | |
| | | @Autowired |
| | | IMenuMappingService menuMappingService; |
| | | |
| | | @Autowired |
| | | IDeletedTableLogService deletedTableLogService; |
| | | |
| | | |
| | | @RequestMapping(value = "/all", method = RequestMethod.GET) |
| | | public Result<List<SysMenu>> getAll() { |
| | |
| | | HashSet<SysMenu> sysMenus = deleteMenuByParentId(data, menuid); |
| | | |
| | | for (SysMenu sysMenu : sysMenus) { |
| | | List<MenuMapping> menuMappingList = menuMappingService.selectList(new EntityWrapper<MenuMapping>().eq("menu_id", sysMenu.getId())); |
| | | for (MenuMapping menuMapping : menuMappingList) { |
| | | // 添加待删除表的日志 |
| | | DeletedTableLog deletedTableLog = new DeletedTableLog(); |
| | | deletedTableLog.setId(DbUtils.getUUID()).setTableName(menuMapping.getTableName()).setCreateTime(new Date()); |
| | | deletedTableLog.insert(); |
| | | menuMapping.deleteById(); |
| | | } |
| | | sysMenu.deleteById(); |
| | | } |
| | | boolean delete = menuService.deleteById(menuid); |
New file |
| | |
| | | package com.highdatas.mdm.entity; |
| | | |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author kimi |
| | | * @since 2020-01-13 |
| | | */ |
| | | @TableName("deleted_table_log") |
| | | public class DeletedTableLog extends Model<DeletedTableLog> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String id; |
| | | |
| | | @TableField("table_name") |
| | | private String tableName; |
| | | |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public DeletedTableLog setId(String id) { |
| | | this.id = id; |
| | | return this; |
| | | } |
| | | public String getTableName() { |
| | | return tableName; |
| | | } |
| | | |
| | | public DeletedTableLog setTableName(String tableName) { |
| | | this.tableName = tableName; |
| | | return this; |
| | | } |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public DeletedTableLog setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | return this; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "DeletedTableLog{" + |
| | | "id=" + id + |
| | | ", tableName=" + tableName + |
| | | ", createTime=" + createTime + |
| | | "}"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.highdatas.mdm.mapper; |
| | | |
| | | import com.highdatas.mdm.entity.DeletedTableLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author kimi |
| | | * @since 2020-01-13 |
| | | */ |
| | | public interface DeletedTableLogMapper extends BaseMapper<DeletedTableLog> { |
| | | |
| | | } |
| | |
| | | |
| | | Integer updateStdId(@Param("tableTempName")String tableTempName); |
| | | |
| | | Integer updateRecordByMaintainId(@Param("tableTempName")String tableTempName, @Param("updateSegment") String updateSegment, @Param("maintainId")String maintainId); |
| | | |
| | | Integer deleteRecordByMaintainId(@Param("tableTempName")String tableTempName, @Param("stdId") String stdId, @Param("maintainId")String maintainId); |
| | | |
| | | } |
| | | |
New file |
| | |
| | | <?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.highdatas.mdm.mapper.DeletedTableLogMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.highdatas.mdm.entity.DeletedTableLog"> |
| | | <id column="id" property="id" /> |
| | | <result column="table_name" property="tableName" /> |
| | | <result column="create_time" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | return new Result<T>(data); |
| | | } |
| | | public static <T> Result<T> success(CodeMsg codeMsg){ |
| | | return new Result<T>(codeMsg); |
| | | return new Result<T>(CodeMsg.SUCCESS); |
| | | } |
| | | public static <T> Result<T> success(String message, T data){ |
| | | return new Result<T>(message, data); |
New file |
| | |
| | | package com.highdatas.mdm.service; |
| | | |
| | | import com.highdatas.mdm.entity.DeletedTableLog; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author kimi |
| | | * @since 2020-01-13 |
| | | */ |
| | | public interface IDeletedTableLogService extends IService<DeletedTableLog> { |
| | | |
| | | } |
| | |
| | | public interface IMenuMappingService extends IService<MenuMapping> { |
| | | |
| | | |
| | | boolean create(String json, HttpSession session); |
| | | MenuMapping create(String json, HttpSession session); |
| | | |
| | | |
| | | boolean update(String json); |
| | |
| | | |
| | | Result updateById(String tableName, String fieldsSegment, String id, boolean total); |
| | | |
| | | Result updateByStdId(String tableName, String fieldsSegment, String id, boolean total); |
| | | |
| | | Result update(String tableName, String fieldsSegment, boolean total); |
| | | |
| | | Result update(String tableName, String fieldsSegment, String whereSegment); |
| | | |
| | | String getUpdateSegment(String tableName, String fieldsSegment); |
| | | String getUpdateSegment(String tableName, String alias, String fieldsSegment); |
| | | |
| | | Result update(String tableName, String updateSegment, String whereDefault, boolean total); |
| | | |
| | |
| | | |
| | | Result deleteById(String tableName, String id); |
| | | |
| | | Result deleteByStdId(String tableName, String id); |
| | | |
| | | Result delete(String tableName, String whereSegment); |
| | | |
| | | Result selectListByPageByVersion(String tableName, String whereSegment, Integer pageNo, String version, boolean findMax); |
| | |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ClassUtils; |
| | | |
| | |
| | | RepositoryService service; |
| | | @Autowired |
| | | ObjectMapper objectMapper; |
| | | |
| | | @Value("${img.url}") |
| | | String basePath; |
| | | //download |
| | | public void getModelXml(HttpServletResponse response, String modelId) throws IOException { |
| | | Model model = service.getModel(modelId); |
| | |
| | | //1.3 |
| | | ObjectNode modelNode = (ObjectNode) new ObjectMapper().readTree(hashMap.get("json_xml").getBytes("utf-8")); |
| | | BpmnModel bpmnModel = new BpmnJsonConverter().convertToBpmnModel(modelNode); |
| | | if (bpmnModel.getProcesses().size() == 0) { |
| | | return false; |
| | | } |
| | | byte[] bpmnBytes = new BpmnXMLConverter().convertToXML(bpmnModel); |
| | | String processName = newModel.getName()+ ".bpmn20.xml"; |
| | | Deployment deployment = service.createDeployment().name(newModel.getName()).addString(processName,new String(bpmnBytes,"UTF-8")).deploy(); |
| | |
| | | service.addModelEditorSourceExtra(newModel.getId(), result); |
| | | String newModelId = newModel.getId(); |
| | | //TODO dir 2. |
| | | String basePath = ClassUtils.getDefaultClassLoader().getResource("").getPath(); |
| | | String path = basePath + "static/processes/" + newModelId; |
| | | String path = basePath + newModelId; |
| | | File dir = new File(path); |
| | | if (!dir.exists()) { |
| | | dir.mkdirs(); |
| | |
| | | if (file.exists()) { |
| | | file.delete(); |
| | | } |
| | | log.info(file.getAbsolutePath()); |
| | | file.createNewFile(); |
| | | fileOutputStream2 = new FileOutputStream(file); |
| | | fileOutputStream2.write(bpmnBytes); |
New file |
| | |
| | | package com.highdatas.mdm.service.impl; |
| | | |
| | | import com.highdatas.mdm.entity.DeletedTableLog; |
| | | import com.highdatas.mdm.mapper.DeletedTableLogMapper; |
| | | import com.highdatas.mdm.service.IDeletedTableLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author kimi |
| | | * @since 2020-01-13 |
| | | */ |
| | | @Service |
| | | public class DeletedTableLogServiceImpl extends ServiceImpl<DeletedTableLogMapper, DeletedTableLog> implements IDeletedTableLogService { |
| | | |
| | | } |
| | |
| | | MasterDataService masterDataService; |
| | | @Autowired |
| | | ISysFieldService fieldService; |
| | | |
| | | @Autowired |
| | | MaintainMapper maintainMapper; |
| | | |
| | |
| | | continue; |
| | | } |
| | | ActivitiStatus status = flows.getStatus(); |
| | | if (status.equals(ActivitiStatus.open)) { |
| | | if (status.equals(ActivitiStatus.open) && nowMaintain == null) { |
| | | nowMaintain = maintain; |
| | | break; |
| | | continue; |
| | | } |
| | | if (!status.equals(ActivitiStatus.open) && nowMaintain != null){ |
| | | nowMaintain = null; |
| | | } |
| | | } |
| | | if (nowMaintain == null) { |
| | | nowMaintain = selectOne(new EntityWrapper<Maintain>().eq("table_name", tableName).orderBy("version desc")); |
| | | } |
| | | int orderNo = nowMaintain.getOrderNo(); |
| | | Maintain nowVersion = getNowVersion(tableName); |
| | | if (nowVersion != null && nowVersion.getOrderNo() == orderNo) { |
| | | orderNo--; |
| | | } |
| | | Maintain maintain = selectOne(new EntityWrapper<Maintain>().eq("table_name", nowMaintain.getTableName()).eq("order_no", orderNo)); |
| | | return maintain; |
| | | } |
| | |
| | | try { |
| | | String[] split = fields.split(Constant.SEMICOLON); |
| | | List<String> fieldNameList = Arrays.stream(split).map(s -> s.trim()).collect(Collectors.toList()); |
| | | fields = fieldNameList.stream().collect(Collectors.joining(Constant.COMMA)); |
| | | ContentBuilder builder = new ContentBuilder(Constant.COMMA); |
| | | Object parse = JSON.parse(values); |
| | | List<String> ids = new ArrayList<>(); |
| | |
| | | ids.add(id); |
| | | String sqlValues = builder.toString(); |
| | | mapper.insert(tableName, fields, sqlValues); |
| | | return Result.success(CodeMsg.INSERT_SUCCESS); |
| | | return Result.success(ids); |
| | | } else if (parse instanceof JSONArray) { |
| | | JSONArray jsonArray = (JSONArray) parse; |
| | | int size = jsonArray.size(); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Result updateByStdId(String tableName, String fieldsSegment, String id, boolean total) { |
| | | String whereStr = DbUtils.combieOneSegment(Constant.STD_ID, id); |
| | | return update(tableName, fieldsSegment,whereStr, total); |
| | | } |
| | | |
| | | @Override |
| | | public Result update(String tableName, String fieldsSegment, boolean total) { |
| | | String whereSegment = Constant.WHERE_DEFAULT; |
| | | return update(tableName, fieldsSegment,whereSegment, total); |
| | |
| | | segment = new Segment(fieldName, String.valueOf(o)); |
| | | } else { |
| | | segment = new Segment(fieldName, o); |
| | | } |
| | | builder.append(segment.toString()); |
| | | } |
| | | return builder.toString(); |
| | | } |
| | | |
| | | @Override |
| | | public String getUpdateSegment(String tableName, String alias, String fieldsSegment) { |
| | | ContentBuilder builder = new ContentBuilder(Constant.COMMA); |
| | | JSONObject jsonObject = JSONObject.parseObject(fieldsSegment); |
| | | List<TableSchemaResult> tableFieldResultList = mapper.getTableField(tableName); |
| | | for (TableSchemaResult tableSchemaResult : tableFieldResultList) { |
| | | String dbType = tableSchemaResult.getDbType(); |
| | | String fieldName = tableSchemaResult.getFieldName(); |
| | | Object o = jsonObject.get(fieldName); |
| | | if (o == null) { |
| | | continue; |
| | | } |
| | | String javaTypeStr = DbUtils.toSqlToJava(dbType); |
| | | Segment segment; |
| | | if ("string".equalsIgnoreCase(javaTypeStr.trim())) { |
| | | |
| | | segment = new Segment(MessageFormat.format(Constant.Alias, alias, fieldName), String.valueOf(o)); |
| | | } else { |
| | | segment = new Segment(MessageFormat.format(Constant.Alias, alias, fieldName), o); |
| | | } |
| | | builder.append(segment.toString()); |
| | | } |
| | |
| | | String whereStr = DbUtils.combieOneSegment(Constant.ID, id); |
| | | return delete(tableName, whereStr); |
| | | } |
| | | |
| | | @Override |
| | | public Result deleteByStdId(String tableName, String id) { |
| | | String whereStr = DbUtils.combieOneSegment(Constant.STD_ID, id); |
| | | return delete(tableName, whereStr); |
| | | } |
| | | @Override |
| | | public Result delete(String tableName, String whereSegment) { |
| | | try { |
| | |
| | | import com.highdatas.mdm.service.ISysMenuService; |
| | | import com.highdatas.mdm.util.Constant; |
| | | import com.highdatas.mdm.util.DbUtils; |
| | | import com.highdatas.mdm.util.WorkflowUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | public static final String key = "process"; |
| | | |
| | | @Override |
| | | public boolean create(String json, HttpSession session) { |
| | | public MenuMapping create(String json, HttpSession session) { |
| | | JSONObject jsonObject = JSONObject.parseObject(json); |
| | | // //1 |
| | | // Flows flows = activitiService.start(key, session); |
| | |
| | | menuMapping = objectMapper.readValue(json, MenuMapping.class); |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | return false; |
| | | return null; |
| | | } |
| | | //menuMapping.setMaintainId(maintainId); |
| | | return create(menuMapping); |
| | |
| | | return null; |
| | | } |
| | | |
| | | public boolean create(MenuMapping menuMapping) { |
| | | public MenuMapping create(MenuMapping menuMapping) { |
| | | menuMapping.setCreateTime(new Date()); |
| | | menuMapping.setId(DbUtils.getUUID()); |
| | | return this.insert(menuMapping); |
| | | String name = menuMapping.getName(); |
| | | name = DbUtils.getChineseOrEnglishOrNumber(name); |
| | | String tableName = WorkflowUtils.toFirstChar(name.toLowerCase()); |
| | | tableName = Constant.MD + tableName; |
| | | String tableByName = tableInfoMapper.selectTableByName(tableName); |
| | | if (!StringUtils.isEmpty(tableByName)){ |
| | | tableName = tableName + "_" + DbUtils.getUUID(5); |
| | | } |
| | | menuMapping.setTableName(tableName); |
| | | boolean insert = this.insert(menuMapping); |
| | | if (insert) { |
| | | return menuMapping; |
| | | } else { |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | String A2 = "a2"; |
| | | String All = "all"; |
| | | String DataMenu = "DataMenu"; |
| | | String AND = " and "; |
| | | String MD = "md_"; |
| | | } |
| | |
| | | String id = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | return id; |
| | | } |
| | | public static String getUUID(int i) { |
| | | String id = UUID.randomUUID().toString().replaceAll("-", "").substring(0, i); |
| | | return id; |
| | | } |
| | | |
| | | public static String combieOneSegment(String name, String value) { |
| | | Segment segment = new Segment(name, value); |
| | |
| | | public static int getOrderNoAdd(int orderNo) { |
| | | return orderNo + 1; |
| | | } |
| | | |
| | | public static final String getChineseOrEnglishOrNumber(String str) { |
| | | StringBuffer sbf = new StringBuffer(); |
| | | char[] charArray = str.toCharArray(); |
| | | for (int i = 0; i < charArray.length; i++) { |
| | | if ((charArray[i] >= 0x4e00) && (charArray[i] <= 0x9fbb)) { |
| | | sbf.append(charArray[i]); |
| | | } |
| | | if ((charArray[i] >= 65) && (charArray[i] <= 122)) { |
| | | sbf.append(charArray[i]); |
| | | } |
| | | if (str.charAt(i) >= 48 && str.charAt(i) <= 57) { |
| | | sbf.append(charArray[i]); |
| | | } |
| | | } |
| | | return sbf.toString(); |
| | | } |
| | | } |
| | |
| | | // strategy.setCapitalMode(true);// 全局大写命名 ORACLE 注意 |
| | | strategy.setTablePrefix(new String[]{""});// 此处可以修改为您的表前缀 |
| | | strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略 |
| | | strategy.setInclude(new String[]{"sys_business_operate"}); // 需要生成的表 |
| | | strategy.setInclude(new String[]{"deleted_table_log"}); // 需要生成的表 |
| | | // strategy.setExclude(new String[]{"test"}); // 排除生成的表 |
| | | // 自定义实体父类 |
| | | // strategy.setSuperEntityClass("com.baomidou.demo.TestEntity"); |
| | |
| | | package com.highdatas.mdm.util; |
| | | |
| | | import com.highdatas.mdm.process.canvas.ProcessDiagramGenerator; |
| | | import net.sourceforge.pinyin4j.PinyinHelper; |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; |
| | | import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination; |
| | | import org.activiti.bpmn.model.BpmnModel; |
| | | import org.activiti.engine.ProcessEngineConfiguration; |
| | | import org.activiti.engine.RepositoryService; |
| | | import org.activiti.engine.repository.ProcessDefinition; |
| | | import com.highdatas.mdm.process.canvas.ProcessDiagramGenerator; |
| | | import org.apache.commons.io.FileUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | |
| | | public class WorkflowUtils { |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(toFirstChar("汉字转换为拼音").toUpperCase()); //转为首字母大写 |
| | | //System.out.println(toPinyin("汉字转换为拼音")); |
| | | } |
| | | private static Logger logger = LoggerFactory.getLogger(WorkflowUtils.class); |
| | | |
| | | /** |
| | |
| | | return diagramPath; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取字符串拼音的第一个字母 |
| | | * @param chinese |
| | | * @return |
| | | */ |
| | | public static String toFirstChar(String chinese){ |
| | | String pinyinStr = ""; |
| | | char[] newChar = chinese.toCharArray(); //转为单个字符 |
| | | HanyuPinyinOutputFormat defaultFormat = new HanyuPinyinOutputFormat(); |
| | | defaultFormat.setCaseType(HanyuPinyinCaseType.LOWERCASE); |
| | | defaultFormat.setToneType(HanyuPinyinToneType.WITHOUT_TONE); |
| | | for (int i = 0; i < newChar.length; i++) { |
| | | if (newChar[i] > 128) { |
| | | try { |
| | | pinyinStr += PinyinHelper.toHanyuPinyinStringArray(newChar[i], defaultFormat)[0].charAt(0); |
| | | } catch (BadHanyuPinyinOutputFormatCombination e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }else{ |
| | | pinyinStr += newChar[i]; |
| | | } |
| | | } |
| | | return pinyinStr; |
| | | } |
| | | |
| | | /** |
| | | * 汉字转为拼音 |
| | | * @param chinese |
| | | * @return |
| | | */ |
| | | public static String toPinyin(String chinese){ |
| | | String pinyinStr = ""; |
| | | char[] newChar = chinese.toCharArray(); |
| | | HanyuPinyinOutputFormat defaultFormat = new HanyuPinyinOutputFormat(); |
| | | defaultFormat.setCaseType(HanyuPinyinCaseType.LOWERCASE); |
| | | defaultFormat.setToneType(HanyuPinyinToneType.WITHOUT_TONE); |
| | | for (int i = 0; i < newChar.length; i++) { |
| | | if (newChar[i] > 128) { |
| | | try { |
| | | pinyinStr += PinyinHelper.toHanyuPinyinStringArray(newChar[i], defaultFormat)[0]; |
| | | } catch (BadHanyuPinyinOutputFormatCombination e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }else{ |
| | | pinyinStr += newChar[i]; |
| | | } |
| | | } |
| | | return pinyinStr; |
| | | } |
| | | } |
| | |
| | | server: |
| | | port: 9010 |
| | | #url: jdbc:mysql://180.169.94.250:8306/data_admin?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true |
| | | img: |
| | | url1: /usr/project/mdm/activiti |
| | | url : d:/datagovernance/file/activiti/ |
| | | |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://localhost:3306/data_admin?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true |
| | | username: root |
| | | password: 123456 |
| | | url: jdbc:mysql://180.169.94.250:8306/data_admin?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true |
| | | username: masterdata |
| | | password: md123! |
| | | |
| | | activiti: |
| | | database-schema-update: true |
| | |
| | | port: 9010 |
| | | bak: |
| | | url: 220.158.10.151 |
| | | |
| | | img: |
| | | url: d:/datagovernance/file/activiti/ |
| | | baks: |
| | | url1: jdbc:mysql://127.0.0.1:3306/data_admin?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true |
| | | url: jdbc:mysql://127.0.0.1:3306/data_admin?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true |
| | | username: root |
| | | password: datacvg123! |
| | | |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://192.168.2.230:3306/data_admin?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true |
| | | username: masterdata |
| | | password: md123! |
| | | url: jdbc:mysql://127.0.0.1:3306/data_admin?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true |
| | | username: root |
| | | password: datacvg123! |
| | | hikari: |
| | | minimum-idle: 3 |
| | | max-lifetime: 30000 |
| | |
| | | servlet: |
| | | content-type: text/html |
| | | encoding: utf-8 |
| | | |
| | | logging: |
| | | level: |
| | | com: |
| | | highdatas: |
| | | mdm: |
| | | mapper: DEBUG |
| | | |
| | | mybatis-plus: |
| | | mapper-locations: classpath:mapping/*.xml |
| | | type-aliases-package: com.highdatas.mdm.mapper |
| | | global-config: |
| | | db-config: |
| | | column-underline: true |
| | | |
| | | exists: |
| | | callback: |
| | | url: http://192.168.2.68:18080/activiti/getBusinessId |
| | | #activiti: |
| | | # check-process-definitions: false |
| | |
| | | SELECT std_id FROM ${tableTempName} tm |
| | | LEFT JOIN maintain_detail ON tm.id = maintain_detail.pre_merge_id |
| | | LEFT JOIN maintain ON maintain.id = maintain_detail.parent_id |
| | | LEFT JOIN flows f on maintain.flow_id = f.id |
| | | WHERE maintain.order_no <= ${fromOrderNo} and maintain.order_no > ${toOrderNo} |
| | | and operate = 'create' |
| | | AND tm.std_id = m.id |
| | | AND f.status = 'open' |
| | | and maintain.table_name = '${tableName}' |
| | | ) ) a1 |
| | | LEFT JOIN |
| | |
| | | SELECT MIN(m.order_no) as order_no, mt.std_id FROM ${tableTempName} mt |
| | | LEFT JOIN maintain_detail md on md.pre_merge_id = mt.id |
| | | LEFT JOIN maintain m on m.id = md.parent_id |
| | | LEFT JOIN flows f on m.flow_id = f.id |
| | | WHERE m.order_no <= ${fromOrderNo} and m.order_no > ${toOrderNo} and m.table_name = '${tableName}' |
| | | and operate = 'update' |
| | | AND f.status = 'open' |
| | | GROUP BY mt.std_id |
| | | ) a on a.order_no = m.order_no and a.std_id = h.std_id |
| | | )a2 on a1.id = a2.id WHERE a2.id is null |
| | |
| | | SELECT std_id FROM ${tableTempName} tm |
| | | LEFT JOIN maintain_detail ON tm.id = maintain_detail.pre_merge_id |
| | | LEFT JOIN maintain ON maintain.id = maintain_detail.parent_id |
| | | LEFT JOIN flows f on maintain.flow_id = f.id |
| | | WHERE maintain.order_no <= ${fromOrderNo} and maintain.order_no > ${toOrderNo} |
| | | and operate = 'create' |
| | | AND f.status = 'open' |
| | | AND tm.std_id = m.id |
| | | and maintain.table_name = '${tableName}' |
| | | ) ) a1 |
| | |
| | | SELECT MIN(m.order_no) as order_no, mt.std_id FROM ${tableTempName} mt |
| | | LEFT JOIN maintain_detail md on md.pre_merge_id = mt.id |
| | | LEFT JOIN maintain m on m.id = md.parent_id |
| | | LEFT JOIN flows f on m.flow_id = f.id |
| | | WHERE m.order_no <= ${fromOrderNo} and m.order_no > ${toOrderNo} and m.table_name = '${tableName}' |
| | | and operate = 'update' |
| | | AND f.status = 'open' |
| | | GROUP BY mt.std_id |
| | | ) a on a.order_no = m.order_no and a.std_id = h.std_id |
| | | )a2 on a1.id = a2.id WHERE a2.id is not null |
| | | UNION |
| | | SELECT ${tempFields} FROM maintain_detail md |
| | | LEFT JOIN maintain ON maintain.id = md.parent_id |
| | | LEFT JOIN flows f on maintain.flow_id = f.id |
| | | LEFT JOIN ${tableTempName} mt on mt.id = md.pre_merge_id |
| | | WHERE maintain.order_no <= ${fromOrderNo} and maintain.order_no > ${toOrderNo} AND operate = 'delete' |
| | | AND f.status = 'open' |
| | | and maintain.table_name = '${tableName}' |
| | | AND NOT EXISTS ( |
| | | SELECT * FROM maintain_detail |
| | | LEFT JOIN maintain ON maintain.id = maintain_detail.parent_id |
| | | LEFT JOIN ${tableTempName} mt1 on mt1.id = maintain_detail.pre_merge_id |
| | | LEFT JOIN flows f on maintain.flow_id = f.id |
| | | WHERE maintain.order_no <= ${fromOrderNo} and maintain.order_no > ${toOrderNo} |
| | | AND operate = 'create' |
| | | AND f.status = 'open' |
| | | AND mt.std_id = mt1.std_id |
| | | and maintain.table_name = '${tableName}' |
| | | ) |
| | |
| | | SELECT std_id FROM ${tableTempName} tm |
| | | LEFT JOIN maintain_detail ON tm.id = maintain_detail.pre_merge_id |
| | | LEFT JOIN maintain ON maintain.id = maintain_detail.parent_id |
| | | LEFT JOIN flows f on maintain.flow_id = f.id |
| | | WHERE maintain.order_no <= ${fromOrderNo} and maintain.order_no > ${toOrderNo} |
| | | and maintain.table_name = '${tableName}' |
| | | AND f.status = 'open' |
| | | and operate = 'create' |
| | | AND tm.std_id = m.id |
| | | ) ) a1 |
| | |
| | | SELECT MIN(m.order_no) as order_no, mt.std_id FROM ${tableTempName} mt |
| | | LEFT JOIN maintain_detail md on md.pre_merge_id = mt.id |
| | | LEFT JOIN maintain m on m.id = md.parent_id |
| | | LEFT JOIN flows f on m.flow_id = f.id |
| | | WHERE m.order_no <= ${fromOrderNo} and m.order_no > ${toOrderNo} and m.table_name = '${tableName}' |
| | | and operate = 'update' |
| | | AND f.status = 'open' |
| | | GROUP BY mt.std_id |
| | | ) a on a.order_no = m.order_no and a.std_id = h.std_id |
| | | )a2 on a1.id = a2.id WHERE a2.id is null |
| | |
| | | SELECT std_id FROM ${tableTempName} tm |
| | | LEFT JOIN maintain_detail ON tm.id = maintain_detail.pre_merge_id |
| | | LEFT JOIN maintain ON maintain.id = maintain_detail.parent_id |
| | | LEFT JOIN flows f on maintain.flow_id = f.id |
| | | WHERE maintain.order_no <= ${fromOrderNo} and maintain.order_no > ${toOrderNo} |
| | | and maintain.table_name = '${tableName}' |
| | | AND f.status = 'open' |
| | | and operate = 'create' |
| | | AND tm.std_id = m.id |
| | | ) ) a1 |
| | |
| | | SELECT MIN(m.order_no) as order_no, mt.std_id FROM ${tableTempName} mt |
| | | LEFT JOIN maintain_detail md on md.pre_merge_id = mt.id |
| | | LEFT JOIN maintain m on m.id = md.parent_id |
| | | LEFT JOIN flows f on m.flow_id = f.id |
| | | WHERE m.order_no <= ${fromOrderNo} and m.order_no > ${toOrderNo} and m.table_name = '${tableName}' |
| | | and operate = 'update' |
| | | AND f.status = 'open' |
| | | GROUP BY mt.std_id |
| | | ) a on a.order_no = m.order_no and a.std_id = h.std_id |
| | | )a2 on a1.id = a2.id WHERE a2.id is not null |
| | |
| | | SELECT ${tempFields} FROM maintain_detail md |
| | | LEFT JOIN maintain ON maintain.id = md.parent_id |
| | | LEFT JOIN ${tableTempName} mt on mt.id = md.pre_merge_id |
| | | LEFT JOIN flows f on maintain.flow_id = f.id |
| | | WHERE maintain.order_no <= ${fromOrderNo} and maintain.order_no > ${toOrderNo} |
| | | and maintain.table_name = '${tableName}' |
| | | AND f.status = 'open' |
| | | AND operate = 'delete' |
| | | AND NOT EXISTS ( |
| | | SELECT * FROM maintain_detail |
| | | LEFT JOIN maintain ON maintain.id = maintain_detail.parent_id |
| | | LEFT JOIN ${tableTempName} mt1 on mt1.id = maintain_detail.pre_merge_id |
| | | LEFT JOIN flows f on maintain.flow_id = f.id |
| | | WHERE maintain.order_no <= ${fromOrderNo} and maintain.order_no > ${toOrderNo} |
| | | AND operate = 'create' |
| | | AND f.status = 'open' |
| | | AND mt.std_id = mt1.std_id |
| | | and maintain.table_name = '${tableName}' |
| | | ) |
| | |
| | | and maintain_detail.pre_merge_id = t.id |
| | | ) |
| | | </select> |
| | | |
| | | |
| | | <select id="updateRecordByMaintainId" statementType="STATEMENT" resultType="java.lang.Integer"> |
| | | update ${tableTempName} |
| | | INNER JOIN maintain_detail on ${tableTempName}.id = maintain_detail.pre_merge_id |
| | | set ${updateSegment} |
| | | WHERE maintain_detail.parent_id = ${maintainId} |
| | | |
| | | </select> |
| | | |
| | | <select id="deleteRecordByMaintainId" statementType="STATEMENT" resultType="java.lang.Integer"> |
| | | |
| | | DELETE ${tableTempName} from ${tableTempName} |
| | | INNER JOIN maintain_detail on maintain_detail.pre_merge_id = ${tableTempName}.id |
| | | WHERE maintain_detail.parent_id = ${maintainId} and ${tableTempName}.std_id = ${stdId} |
| | | \ |
| | | |
| | | </select> |
| | | </mapper> |
| | |
| | | $scope.$hide(); |
| | | }; |
| | | $scope.closeMine = function () { |
| | | if (window.isShow) { |
| | | window.isShow = false; |
| | | } |
| | | var browserName = navigator.appName; |
| | | var browserVer = parseInt(navigator.appVersion); |
| | | //alert(browserName + " : "+browserVer); |
| | |
| | | url: KISBPM.URL.putModel(modelMetaData.modelId)}) |
| | | |
| | | .success(function (data, status, headers, config) { |
| | | if (!data.success) { |
| | | alert(data.message); |
| | | $scope.status.loading = false; |
| | | return; |
| | | } |
| | | $scope.editor.handleEvents({ |
| | | type: ORYX.CONFIG.EVENT_SAVED |
| | | }); |