From 04345420e457ccffcfc94646fde4f5a2204164c3 Mon Sep 17 00:00:00 2001
From: 6c <420680616@qq.com>
Date: 星期三, 15 十月 2025 10:31:18 +0800
Subject: [PATCH] 移动端加载mvc
---
src/main/java/com/product/mobile/core/service/CommonMVCService.java | 71 +++++++++++++++++++++++------------
1 files changed, 47 insertions(+), 24 deletions(-)
diff --git a/src/main/java/com/product/mobile/core/service/CommonMVCService.java b/src/main/java/com/product/mobile/core/service/CommonMVCService.java
index f418f38..c68b0c4 100644
--- a/src/main/java/com/product/mobile/core/service/CommonMVCService.java
+++ b/src/main/java/com/product/mobile/core/service/CommonMVCService.java
@@ -1,28 +1,17 @@
package com.product.mobile.core.service;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import com.aspose.p6a2feef8.p995e1fda.pbdb106a0.b;
import com.product.common.lang.StringUtils;
import com.product.core.config.CoreConst;
-import com.product.core.config.Global;
import com.product.core.dao.BaseDao;
import com.product.core.entity.DataTableEntity;
import com.product.core.entity.FieldSetEntity;
import com.product.core.exception.BaseException;
-import com.product.core.log.SystemLogger;
import com.product.core.service.support.AbstractBaseService;
-import com.product.core.spring.context.SpringMVCContextHolder;
import com.product.mobile.core.config.MobileCoreCode;
-import com.product.mobile.core.config.MobileCoreConst;
-import com.product.module.sys.entity.SystemUser;
-import com.product.util.BaseUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.text.SimpleDateFormat;
/**
* 鎵嬫満绔紝鑾峰彇鐢ㄦ埛鎵�鏈夊簲鐢�
@@ -32,7 +21,7 @@
@Component
public class CommonMVCService extends AbstractBaseService{
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); //鍒跺畾杈撳嚭鏍煎紡
-
+
@Autowired
public BaseDao baseDao;
/**
@@ -41,7 +30,7 @@
* @param uuid
*/
public String getApproveDetailUUID(String table,String uuid) {
-
+
DataTableEntity dt = getBaseDao().listTable("product_sys_flow_detail", " record_uuid=? and table_name=? ",new Object[]{uuid,table});
if(dt.isEmpty()) {
return null;
@@ -53,14 +42,14 @@
* 鏌ュ嚭MVC涓寜閽搷浣滅殑鐣岄潰锛岀晫闈㈠悗闈㈢殑鎵�鏈夋寜閽�
* @param button 鏈夊彲鑳芥槸绫诲瀷锛屾湁鍙兘鏄痷uid
* @param table
- * @param functionUuid
+ * @param functionUuid
* @return
* @throws BaseException
*/
public FieldSetEntity getPageButtons(FieldSetEntity fse) throws BaseException{
-
+
String buttonUuid=fse.getString("buttonUuid");
-
+
String table=fse.getString(CoreConst.SYSTEM_TABLE_NAME_LABEL);
if(table==null) table=fse.getTableName();
String functionUuid=fse.getString("functionUuid");
@@ -73,13 +62,17 @@
}
}
FieldSetEntity page=null;
-
+
+ DataTableEntity curButtonDte = new DataTableEntity();
if(!StringUtils.isEmpty(functionUuid)) {
//鏍规嵁鎸夐挳绫诲瀷鏌ュ嚭鎸夐挳uuid
if(StringUtils.isEmpty(buttonUuid)&& !StringUtils.isEmpty(buttonType) ) {
DataTableEntity d=baseDao.listTable("product_sys_function_buttons", " function_uuid=? and button_category_uuid=? ", new String[] {functionUuid,buttonType},"button_type");
if(!DataTableEntity.isEmpty(d)) {
- buttonUuid=d.getFieldSetEntity(0).getUUID();//鍙栫涓�鏉�
+ FieldSetEntity curButtonFse = d.getFieldSetEntity(0);
+ curButtonFse.setTableName("cur_button");
+ curButtonDte.addFieldSetEntity(curButtonFse);
+ buttonUuid=curButtonFse.getUUID();//鍙栫涓�鏉�
}
}
//鏌ュ嚭鎸夐挳瀵瑰簲鐣岄潰锛屽彲鑳芥寜閽湁澶氫釜锛屽彇绗竴涓�
@@ -95,7 +88,7 @@
if(!DataTableEntity.isEmpty(d)) {
page=d.getFieldSetEntity(0);//鍙栫涓�鏉�
}else {
-
+
}
}
if(page!=null) {
@@ -106,6 +99,7 @@
.append(")");
DataTableEntity d=baseDao.listTable(b.toString() , new String[] {functionUuid,functionUuid,page.getUUID()} );
page.addSubDataTable(d);
+ page.addSubDataTable(curButtonDte);
}else {
throw new BaseException(MobileCoreCode.GET_ROUTER_FAIL);
}
@@ -114,5 +108,34 @@
throw new BaseException(MobileCoreCode.GET_ROUTER_FAIL);
}
}
-
+ /**
+ * 鎵ц琛ㄨ揪寮�
+ * @param exp
+ * @return
+ */
+ public FieldSetEntity excuteExp(String exp) {
+ String sql="select "+exp+" expValue";
+ FieldSetEntity fs=baseDao.getFieldSetBySQL(sql, null, false);
+ return fs;
+ }
+
+ /**
+ * 鏍规嵁鎸夐挳uuid鎵惧埌杩炴帴鐨勭涓�涓〉闈�
+ * @param fse
+ * @return
+ */
+ public FieldSetEntity getNextPageByButtonUUID(FieldSetEntity fse) {
+ String buttonUUID = fse.getUUID();
+ StringBuilder sql = new StringBuilder(128);
+ sql.append("\nSELECT p.flow_uuid type_code,p.flow_title");
+ sql.append("\nFROM product_sys_mvc_page p");
+ sql.append("\nINNER JOIN product_sys_link l ON p.uuid=l.line_to");
+ sql.append("\nWHERE l.line_from=?");
+ sql.append("\nORDER BY p.id DESC");
+ DataTableEntity nextPageDte = baseDao.listTable(sql.toString(), new Object[]{buttonUUID});
+ if (DataTableEntity.isEmpty(nextPageDte)) {
+ throw new BaseException(MobileCoreCode.GET_MVC_PAGE_INFO_FAIL);
+ }
+ return nextPageDte.getFieldSetEntity(0);
+ }
}
--
Gitblit v1.9.2