6c
2025-05-07 eb8a211f814360b6aa2da9cefd924d355bbb5972
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  有可能是类型,有可能是uuid
     * @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,7 +62,7 @@
          }
       }
       FieldSetEntity page=null;
       if(!StringUtils.isEmpty(functionUuid)) {
          //根据按钮类型查出按钮uuid
          if(StringUtils.isEmpty(buttonUuid)&& !StringUtils.isEmpty(buttonType) ) {
@@ -95,7 +84,7 @@
              if(!DataTableEntity.isEmpty(d)) {
                 page=d.getFieldSetEntity(0);//取第一条
              }else {
              }
          }
          if(page!=null) {
@@ -124,4 +113,24 @@
      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);
   }
}