fs-danaus
2024-03-16 a2ecbf17d6ba1c7b135fe10bb4cdfefa05b75add
WebRoot/public/template/0/5/dataHead.jsp
@@ -39,76 +39,333 @@
<%@page import="com.yc.utils.FormOpUtil"%>
<%
    SqlDBHelperIfc  sqlDBHelperIfc=(SqlDBHelperIfc)FactoryBean.getBean("SqlDBHelper");
    GfieldApprovedButtonIfc gButtonIfc=(GfieldApprovedButtonIfc)FactoryBean.getBean("GfieldApprovedButton");
    PanelTimeDao PanelTimeBo=(PanelTimeDao)FactoryBean.getBean("PanelTime");
    PanelManageDao PanelManageBo=(PanelManageDao)FactoryBean.getBean("PanelManage");
    TypeControlDao TypeControlBo=(TypeControlDao)FactoryBean.getBean("TypeControl");
    BuildFuncIfc  build=(BuildFuncIfc)FactoryBean.getBean("Build");
     SqlQueryIfc sqlQueryIfc = (SqlQueryIfc)FactoryBean.getBean("SqlQueryImpl");
     BuildTopIfc buildTopIfc = (BuildTopIfc)FactoryBean.getBean("BuildTopImpl");
     GfieldIfc gfieldIfc = (GfieldIfc)FactoryBean.getBean("GfieldImpl");
    FormLoadParameterEntity load =new FormLoadParameterEntity();//存放加载面板信息需要到的参数
    Map<String, Object> bdMap =new HashMap<String,Object>();//存放加载面板返回的信息
    String URL =SettingKey.getHostUrl(request);   //路径
   SqlDBHelperIfc  sqlDBHelperIfc=(SqlDBHelperIfc)FactoryBean.getBean("SqlDBHelper");
   GfieldApprovedButtonIfc gButtonIfc=(GfieldApprovedButtonIfc)FactoryBean.getBean("GfieldApprovedButton");
   PanelTimeDao PanelTimeBo=(PanelTimeDao)FactoryBean.getBean("PanelTime");
   PanelManageDao PanelManageBo=(PanelManageDao)FactoryBean.getBean("PanelManage");
   TypeControlDao TypeControlBo=(TypeControlDao)FactoryBean.getBean("TypeControl");
   BuildFuncIfc  build=(BuildFuncIfc)FactoryBean.getBean("Build");
   SqlQueryIfc sqlQueryIfc = (SqlQueryIfc)FactoryBean.getBean("SqlQueryImpl");
   BuildTopIfc buildTopIfc = (BuildTopIfc)FactoryBean.getBean("BuildTopImpl");
   GfieldIfc gfieldIfc = (GfieldIfc)FactoryBean.getBean("GfieldImpl");
   FormLoadParameterEntity load =new FormLoadParameterEntity();//存放加载面板信息需要到的参数
   Map<String, Object> bdMap =new HashMap<String,Object>();//存放加载面板返回的信息
   String URL =SettingKey.getHostUrl(request);   //路径
   String pantit="";
   int formId = [?formId];//功能号
   String formName ="[?formName]";//formName
   int formType = [?formType];
   int version=[?version];//当前的版本号
   int optype = [?formOptType];//操作类型
   String isShowOnlineMsg="[?isShowOnlineMsg]";//是否打开在线交流
    String isShowProcessTracking="[?isShowProcessTracking]";//是否打开流程跟踪
   //序列号扫码 xin 2021-8-2 17:50:03
   //入库
   Integer isshowinserialbtn=[?isshowinserialbtn];
   String inserialbtneditstatus="[?inserialbtneditstatus]";
   //出库
   Integer isshowoutserialbtn=[?isshowoutserialbtn];
   String outserialbtneditstatus="[?outserialbtneditstatus]";
   String
   outserialbtneditstatus
   =
   "[?outserialbtneditstatus]"
   ;
   //盘点
   Integer isShowCycleCountSerialBtn=[?isShowCycleCountSerialBtn];
   String cycleCountSerialBtnEditStatus="[?cycleCountSerialBtnEditStatus]";
   Integer
   isShowCycleCountSerialBtn
   =
   [
   ?
   isShowCycleCountSerialBtn
   ]
   ;
   String
   cycleCountSerialBtnEditStatus
   =
   "[?cycleCountSerialBtnEditStatus]"
   ;
   //农行支付收款、退款控制 xin 2021-8-23 14:30:39
   Integer isshowonlinepaymentbutton=[?isshowonlinepaymentbutton];
   String online="";
   if(isshowonlinepaymentbutton==1){
   online+=",(case when isnull(OnlinePaymentAmount,0) > 0 then 1 else 0 end) as isshowonlinepaymentbutton";
   Integer
   isshowonlinepaymentbutton
   =
   [
   ?
   isshowonlinepaymentbutton
   ]
   ;
   String
   online
   =
   ""
   ;
   if
   (
   isshowonlinepaymentbutton
   ==
   1
   )
   {
   online
   +=
   ",(case when isnull(OnlinePaymentAmount,0) > 0 then 1 else 0 end) as isshowonlinepaymentbutton"
   ;
   }
   //---------------在线交流,流程跟踪 by danaus 2024-03-15 09:36
   String
   isShowOnlineMsg
   =
   "[?isShowOnlineMsg]"
   ;//是否显示,1显示,0不显示
   String
   showOnlineMsgExpression
   =
   "[?ShowOnlineMsgExpression]"
   ;//表达式
   String
   isShowProcessTracking
   =
   "[?isShowProcessTracking]"
   ;
   String
   showProcessTrackingExpression
   =
   "[?ShowProcessTrackingExpression]"
   ;
   //--在线交流sql表达式
   if
   (
   "1"
   .
   equals
   (
   isShowOnlineMsg
   )
   )
   {
   if
   (
   org
   .
   apache
   .
   commons
   .
   lang3
   .
   StringUtils
   .
   isNotBlank
   (
   showOnlineMsgExpression
   )
   )
   {
   showOnlineMsgExpression
   =
   DBHelper
   .
   getRepAll
   (
   showOnlineMsgExpression
   ,
   session
   ,
   null
   ,
   true
   )
   ;
   online
   +=
   ",(case when "
   +
   showOnlineMsgExpression
   +
   " then 1 else 0 end) as isShowOnlineMsgBtn"
   ;
   }
   else
   {
   //没有设置表达式,默认显示
   online
   +=
   ",1 as isShowOnlineMsgBtn"
   ;
   }
   }
   //--流程跟踪sql表达式
   if
   (
   "1"
   .
   equals
   (
   isShowProcessTracking
   )
   )
   {
   if
   (
   org
   .
   apache
   .
   commons
   .
   lang3
   .
   StringUtils
   .
   isNotBlank
   (
   showProcessTrackingExpression
   )
   )
   {
   showProcessTrackingExpression
   =
   DBHelper
   .
   getRepAll
   (
   showProcessTrackingExpression
   ,
   session
   ,
   null
   ,
   true
   )
   ;
   online
   +=
   ",(case when "
   +
   showProcessTrackingExpression
   +
   " then 1 else 0 end) as isShowProcessTrackingBtn"
   ;
   }
   else
   {
   online
   +=
   ",1 as isShowProcessTrackingBtn"
   ;
   }
   }
   //-----------
   //用户代码
   String userCode = (String)session.getAttribute(SessionKey.USERCODE);
   String
   userCode
   =
   (
   String
   )
   session
   .
   getAttribute
   (
   SessionKey
   .
   USERCODE
   )
   ;
   //用户权限
   Map<String,Map<String,Object>> perssion=(Map<String,Map<String,Object>>)session.getAttribute(SessionKey.PERSSION);
   Map
   <
   String
   ,
   Map
   <
   String
   ,
   Object
   >
   >
   perssion
   =
   (
   Map
   <
   String
   ,
   Map
   <
   String
   ,
   Object
   >
   >
   )
   session
   .
   getAttribute
   (
   SessionKey
   .
   PERSSION
   )
   ;
   //用户对于该功能号所拥有的权限代码
   int profile=-1;
   try{
      profile=(Integer)perssion.get(formId+"").get("optype");
   }catch(Exception e){}
   int
   profile
   =
   -
   1
   ;
   try
   {
   profile
   =
   (
   Integer
   )
   perssion
   .
   get
   (
   formId
   +
   ""
   )
   .
   get
   (
   "optype"
   )
   ;
   }
   catch
   (
   Exception
   e
   )
   {
   }
   //是否为超级管理员  1 为超级管理员
   String isSuperUser = (String)session.getAttribute(SessionKey.SUPPER_USER);
   isSuperUser=isSuperUser.intern();
   if(isSuperUser=="1")
      profile=FormOpUtil.TotalOP;
   profile=FormOpUtil.TotalOP;
   if(optype!=-1){
      profile=profile&optype;
   }
   profile=profile&optype;
   }
   //获取查询字符串。比如:http://localhost/test.do?a=b&c=d&e=f
   //通过request.getQueryString()得到的是a=b&c=d&e=f;
   String queryString = request.getQueryString();
   if(queryString==null){
      queryString="";
   }
   queryString="";
   }
   //打开时输入密码
   String isOpenFuncShowPwdEdit = "[?isOpenFuncShowPwdEdit]";
   if(isOpenFuncShowPwdEdit!="" && isOpenFuncShowPwdEdit!="0"){
      boolean hasOpen = CheckInputPwdUtils.checkPwd(isOpenFuncShowPwdEdit,"[?formId]",request,response,session);
      if(!hasOpen){
         return;
      }
   boolean hasOpen = CheckInputPwdUtils.checkPwd(isOpenFuncShowPwdEdit,"[?formId]",request,response,session);
   if(!hasOpen){
   return;
   }
   }
   //功能链接表达式
   String hasShowItemExpression = "[?hasShowItemExpression]";
   String hasShowItemExpression = "[?hasShowItemExpression]";
   //
   SqlRowSet rs = null;
   String panelEnd="";
@@ -122,36 +379,36 @@
   String wherePan=request.getParameter("wherePan");
   String where = request.getParameter("where");
   if(wherePan==null){
      wherePan=(where!=null?where:null);
   wherePan=(where!=null?where:null);
   }
   request.setAttribute("wherePan",wherePan);
   request.setAttribute("wherePan",wherePan);
   if(wherePan==null&&(queryString.startsWith("where=")||queryString.startsWith("wherePan="))){
       wherePan=queryString.replace("where=", "").replace("wherePan=","");
   wherePan=queryString.replace("where=", "").replace("wherePan=","");
   }
   //功能连接表达式 &符号的替换属性需要用到   在RequestParameterUtils类的replaceRequestExpression方法调用到。操作时间 2014-6-26 10:40:00
   wherePan=HtmlUtil.prossIntoSessionForStr(wherePan,session);
   if(wherePan!=null){
      String []temp = wherePan.split("and");
      String []t=null;
      for(int i=0;i<temp.length;i++){
         t=temp[i].split("=");
         if("doccode".equalsIgnoreCase(t[0])){
            try{
               docCode=t[1];break;
            }catch(Exception e){}
         }
      }
      panelEnd=wherePan;
   }
   String []temp = wherePan.split("and");
   String []t=null;
   for(int i=0;i<temp.length;i++){
   t=temp[i].split("=");
   if("doccode".equalsIgnoreCase(t[0])){
   try{
   docCode=t[1];break;
   }catch(Exception e){}
   }
   }
   panelEnd=wherePan;
   }
   if(copy!=null){
       docCode=request.getParameter("doccode");
       where="doccode='"+docCode+"'";
   docCode=request.getParameter("doccode");
   where="doccode='"+docCode+"'";
   }
   if(docCode!=null&&!docCode.equals("")){
       panelEnd=(panelEnd.equals("")?"doccode='"+docCode.replaceAll("'","")+"'":panelEnd)+" and (formid in("+formId+" #dataformid#)) #formdatafilters#";
   if(docCode!=null&&!docCode.equals("")){
   panelEnd=(panelEnd.equals("")?"doccode='"+docCode.replaceAll("'","")+"'":panelEnd)+" and (formid in("+formId+" #dataformid#)) #formdatafilters#";
   }
   //panel info
   panelEnd=panelEnd.equals("")?"1=2":panelEnd;
   wherePan=panelEnd+ " and "+DBHelper.getQx(session);
@@ -161,17 +418,17 @@
   String grid=null;
   //end
   wherePan=DBHelper.getDWFqx(wherePan,request,formId,0);//组装取得数据组权限 
   String docStatus="0";
   try{
      //获取单据状态 xin 2019-2-25 16:59:54
      docStatus=PanelManageBo.getDocstatus(wherePan,formId,"[?zhu]",request);
   String docStatus="0";
   try{
   //获取单据状态 xin 2019-2-25 16:59:54
   docStatus=PanelManageBo.getDocstatus(wherePan,formId,"[?zhu]",request);
   }catch(Exception e){
      docStatus="0";
   docStatus="0";
   }
    load.setDocStatus(docStatus);
    load.setHasCopy(copy);
    load.setFormId(formId);
     load.setFormType(formType);
     load.setDoccode(docCode);
     load.setSession(request.getSession());
    %>
   load.setDocStatus(docStatus);
   load.setHasCopy(copy);
   load.setFormId(formId);
   load.setFormType(formType);
   load.setDoccode(docCode);
   load.setSession(request.getSession());
%>