修改数据库表前缀PLATFORMBTM_为PBT_,PLATFORMLT_为PLT_
| | |
| | | * @author weidy |
| | | * @date 2020/8/4 8:30 |
| | | */ |
| | | @VciBtmType(name = VciFileBtmTypeConstant.FILE_DOC_CLASSIFY,tableName = "platformbtm_"+ VciFileBtmTypeConstant.FILE_DOC_CLASSIFY,text = "文档的类型",description = "文档的用途",lifeCycle = FrameWorkLcStatusConstant.EMTYPE_LIFE_CYCLE) |
| | | @VciBtmType(name = VciFileBtmTypeConstant.FILE_DOC_CLASSIFY,tableName = "pbt_"+ VciFileBtmTypeConstant.FILE_DOC_CLASSIFY,text = "文档的类型",description = "文档的用途",lifeCycle = FrameWorkLcStatusConstant.EMTYPE_LIFE_CYCLE) |
| | | @Transient |
| | | public class VciFileDocClassifyDO extends BaseModel { |
| | | |
| | |
| | | * @author weidy |
| | | * @date 2020/3/12 |
| | | */ |
| | | @VciBtmType(name = VciFileBtmTypeConstant.FILE_OBJECT,tableName = "platformbtm_"+ VciFileBtmTypeConstant.FILE_OBJECT,text = "文件对象",revisionRuleInput = true,secretAble = true, |
| | | @VciBtmType(name = VciFileBtmTypeConstant.FILE_OBJECT,tableName = "pbt_"+ VciFileBtmTypeConstant.FILE_OBJECT,text = "文件对象",revisionRuleInput = true,secretAble = true, |
| | | lifeCycle = VciFileLifeConstant.FILE_LC,startStatus = VciFileDefaultValueConstant.FILE_LC_STATUS_INIT) |
| | | @Transient |
| | | public class VciFileObjectDO extends BaseModel { |
| | |
| | | * @return 数据库表格名称 |
| | | */ |
| | | public static String getTableName(String btmname) { |
| | | return (VciQueryWrapperForDO.USER_TABLE_COMPATIBILITY?"platformbtm_":"vcibt_") + btmname.trim().toLowerCase(); |
| | | return (VciQueryWrapperForDO.USER_TABLE_COMPATIBILITY?"pbt_":"vcibt_") + btmname.trim().toLowerCase(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 数据库表格名称 |
| | | */ |
| | | public static String getLinkTableName(String linkName){ |
| | | return (VciQueryWrapperForDO.USER_TABLE_COMPATIBILITY?"platformlt_":"vcilt_")+ linkName.trim().toLowerCase(); |
| | | return (VciQueryWrapperForDO.USER_TABLE_COMPATIBILITY?"plt_":"vcilt_")+ linkName.trim().toLowerCase(); |
| | | } |
| | | |
| | | /** |
| | |
| | | conditionMap.put("f_btwname", workitemBtmType); |
| | | }else if(StringUtils.isNotBlank(processOid)){ |
| | | //实际上传递的是executionid |
| | | conditionMap.put("f_oid", "\\IN(select oid from platformbtm_" + workIntanceBtmType + " where executionid = '" + processOid.trim() + "')"); |
| | | conditionMap.put("f_oid", "\\IN(select oid from pbt_" + workIntanceBtmType + " where executionid = '" + processOid.trim() + "')"); |
| | | conditionMap.put("f_btwname", workIntanceBtmType); |
| | | } |
| | | return getData(taskDataLink,conditionMap,referColumns); |
| | |
| | | conditionMap.put("f_oid", taskOid.trim()); |
| | | conditionMap.put("f_btwname", getWorkitemBtmType()); |
| | | }else if(StringUtils.isNotBlank(executionid)){ |
| | | conditionMap.put("f_oid", "\\IN(select oid from platformbtm_" + getWorkIntanceBtmType() + " where executionid = '" + executionid.trim() + "')"); |
| | | conditionMap.put("f_oid", "\\IN(select oid from pbt_" + getWorkIntanceBtmType() + " where executionid = '" + executionid.trim() + "')"); |
| | | conditionMap.put("f_btwname", getWorkIntanceBtmType()); |
| | | } |
| | | return loService.queryCLO(taskDataLink, conditionMap); |
| | |
| | | public DataGrid getDataByProcess(String executionId,String referColumns) throws VciBaseException{ |
| | | WebUtil.alertNotNull(executionId,"流程执行ID"); |
| | | Map<String,String> conditionMap = new HashMap<String, String>(); |
| | | conditionMap.put("f_oid","\\IN(select oid from platformbtm_" +getWorkIntanceBtmType() + " where executionid='" + executionId.trim() + "')"); |
| | | conditionMap.put("f_oid","\\IN(select oid from pbt_" +getWorkIntanceBtmType() + " where executionid='" + executionId.trim() + "')"); |
| | | conditionMap.put("f_btwname", getWorkIntanceBtmType()); |
| | | return getData(processDataLink,conditionMap,referColumns); |
| | | } |
| | |
| | | @Override |
| | | public List<ProcessInstanceVO> listExecutingProcessByBussinessOid(String bussinessOid, String btmName) throws VciBaseException { |
| | | Map<String,String> conditionMap = new HashMap<String, String>(); |
| | | conditionMap.put("oid",QueryOptionConstant.IN + "(select f_oid from platformlt_" + getTaskDataLink() + " where f_btwname='" + getWorkIntanceBtmType() + "' " + |
| | | conditionMap.put("oid",QueryOptionConstant.IN + "(select f_oid from plt_" + getTaskDataLink() + " where f_btwname='" + getWorkIntanceBtmType() + "' " + |
| | | " and t_btwname='" + btmName + "' and t_oid = '" + bussinessOid + "' )"); |
| | | conditionMap.put("lcstatus","Executing"); |
| | | List<ProcessInstance> processInstances = boService.queryObject(ProcessInstance.class,conditionMap); |
| | |
| | | |
| | | //查询数据是否已经发起了流程 |
| | | //查询input连接里是不是有流程实例,并且流程实例不等于终止 |
| | | conditionMap.put("oid", " in (select f_oid from platformlt_" + processDao.getTaskDataLink() + " where oid " + conditionMap.get("oid").replace("\\IN", " in ") + ")"); |
| | | conditionMap.put("oid", " in (select f_oid from plt_" + processDao.getTaskDataLink() + " where oid " + conditionMap.get("oid").replace("\\IN", " in ") + ")"); |
| | | List<BusinessObject> workInstanceCbos = boService.queryCBO(processDao.getWorkIntanceBtmType(), conditionMap); |
| | | if (workInstanceCbos != null && workInstanceCbos.size() > 0) { |
| | | for (BusinessObject workInstance : workInstanceCbos) { |
| | |
| | | return; |
| | | } |
| | | |
| | | String sql = "SELECT T_OID,T_BTWNAME FROM PLATFORMLT_INPUT WHERE F_OID = '" + wfOid + "'"; |
| | | String sql = "SELECT T_OID,T_BTWNAME FROM PLT_INPUT WHERE F_OID = '" + wfOid + "'"; |
| | | List<BusinessObject> queryResult = boService.queryBySql(sql, new HashMap<>()); |
| | | if (queryResult.size() == 0) { |
| | | logger.info("没有找到业务数据"); |
| | |
| | | } |
| | | String btmName = ObjectTool.getBOAttributeValue(queryResult.get(0),"t_btwname"); |
| | | String oid = ObjectTool.getBOAttributeValue(queryResult.get(0),"t_oid"); |
| | | String querySql = "select cac.oid from PLATFORMBTM_CODEALLCODE cac\n" + |
| | | " left join PLATFORMBTM_" + btmName + " wp on cac.CREATECODEOID = wp.OID\n" + |
| | | String querySql = "select cac.oid from PBT_CODEALLCODE cac\n" + |
| | | " left join PBT_" + btmName + " wp on cac.CREATECODEOID = wp.OID\n" + |
| | | " where wp.OID = '" + oid + "'"; |
| | | Map<String, String> conditionMap = new HashMap<>(); |
| | | conditionMap.put("oid", oid); |
| | |
| | | |
| | | @Test |
| | | public void test(){ |
| | | String sql = "select * from platformbtm_part where oid = 'E2ADEE0E-20F9-4CE2-A904-114460B01EB7'"; |
| | | String sql = "select * from pbt_part where oid = 'E2ADEE0E-20F9-4CE2-A904-114460B01EB7'"; |
| | | //List<BusinessObject> list = boServiceI.queryByOnlySql(sql); |
| | | //List<PartDO> list = boServiceI.queryByOnlySqlForObj(sql, PartDO.class); |
| | | Map<String, String> conditonMap = new HashMap<>(); |