起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5575|回复: 15

[结贴] 打印报表(主从表),带电子签章,跳转后带不出数据

[复制链接]

448

主题

1226

帖子

2613

积分

金牌会员

Rank: 6Rank: 6

积分
2613
QQ
发表于 2014-9-21 10:04:53 | 显示全部楼层 |阅读模式
版本: X5.2.7 小版本号:
数据库: MySQL 服务器操作系统: Windows 应用服务器: Tomcat
客户端操作系统: Windows 7 浏览器: Chrome
本帖最后由 zdq 于 2014-9-21 10:09 编辑

请老师给看一下,打印带电子签章的主从报表,可以成功跳转,但是没有数据。debugger显示ksql的问题,我检查过了KSQl没有问题,是不是哪里还存在错误。
public static Table xiangmlxsqs(String rowid)throws Exception{
  //项目立项申请书
  Table t = KSQL.select(" select Tchuangxkfxmlxsqs.* from Tchuangxkfxmlxsqs Tchuangxkfxmlxsqs where Tchuangxkfxmlxsqs ='"+rowid+"'", null, "/tedawired/BaoB/data", null);
  Iterator<Row> it = t.iterator();
                   while (it.hasNext()){
                           Row r = it.next();
                           for(int i=1;i<5;i++){
                           
                           String field = null;
                           if(i==1)
                  {
                    field ="tfZJLQZ";
                  }
                           if(i==2)
                  {
                    field ="tfCWBQZ";
                  }
                           if(i==3)
                  {
                    field ="tfZGCSQZ";
                  }
                           if(i==4)
                  {
                    field ="tfFJLQZ";
                  }
                  
         String v = r.getString(field);                  
                           
      // String v = r.getString("tfCWBQM");//取出图片字段
      
    if (!Utils.isEmptyString(v)) {
     JSONArray ja = new JSONArray(v);
     JSONObject jsonObject = ja.getJSONObject(0);
     String docPath = jsonObject.getString("docPath");
     String fileID = jsonObject.getString("fileID");
     try {
      String urlPattern = "/repository/file/view/" + fileID + "/last/content";
      String url = addBsessionid(DocAdapter.queryNoPermissionHost(true, docPath, urlPattern, true)); //通过docPath和fileID获得图片的url
      r.setString(field, url); //将url存入table对象
     } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
     }
   
   }
    }
  }return t;
                  
  }
前两天老师指导,没有带电子签章,可以带出数据,现在把action的代码做了更改了。

45

主题

4492

帖子

3960

积分

论坛元老

Rank: 8Rank: 8

积分
3960
QQ
发表于 2014-9-21 11:20:11 | 显示全部楼层
报什么错误,贴一下TOMCAT中的错误信息。
向前进,向前进,我们……
回复 支持 反对

使用道具 举报

310

主题

4938

帖子

4767

积分

论坛元老

Rank: 8Rank: 8

积分
4767
QQ
发表于 2014-9-21 13:28:37 | 显示全部楼层
把下面的这句放在KSQL.select 后和return t前,看看两次输出的结果有什么不同
System.out.println(new com.justep.system.transform.Table2Row().transform(t,null).asXML());

如果控制台有报错,把报错信息发上来
QQ:179785966
回复 支持 反对

使用道具 举报

448

主题

1226

帖子

2613

积分

金牌会员

Rank: 6Rank: 6

积分
2613
QQ
 楼主| 发表于 2014-9-22 08:56:26 | 显示全部楼层
yinlun 发表于 2014-9-21 13:28
把下面的这句放在KSQL.select 后和return t前,看看两次输出的结果有什么不同
System.out.println(new com. ...

两次次打印都是,一模一样:<rows><userdata name="model">/tedawired/BaoB/data</userdata><userdata name="userdata">whereVersion</userdata><userdata name="relations">Tchuangxkfxmlxsqs,Tchuangxkfxmlxsqs.tfXiangMBH,Tchuangxkfxmlxsqs.tfXiangMMC,Tchuangxkfxmlxsqs.tfXiangMJL,Tchuangxkfxmlxsqs.tfTouZZE,Tchuangxkfxmlxsqs.tfJiTBK,Tchuangxkfxmlxsqs.tfZiCZJ,Tchuangxkfxmlxsqs.tfXiangMLXDBYX,Tchuangxkfxmlxsqs.tfXiangMJSDKHX,Tchuangxkfxmlxsqs.tfXiangMZYNRHZTMB,Tchuangxkfxmlxsqs.tfTouZJHJMX,Tchuangxkfxmlxsqs.tfXiaoZCYJZZ,Tchuangxkfxmlxsqs.tfCaiWBYJ,Tchuangxkfxmlxsqs.tfGongSLDBZYJ,Tchuangxkfxmlxsqs.tfBeiZ,Tchuangxkfxmlxsqs.tfFuJ,Tchuangxkfxmlxsqs.tfFlag,Tchuangxkfxmlxsqs.version,Tchuangxkfxmlxsqs.tfZJLYJ,Tchuangxkfxmlxsqs.tfZJLQZ,Tchuangxkfxmlxsqs.tfCWBQZ,Tchuangxkfxmlxsqs.tfZGCSYJ,Tchuangxkfxmlxsqs.tfZGCSQZ,Tchuangxkfxmlxsqs.tfFJLYJ,Tchuangxkfxmlxsqs.tfFJLQZ</userdata><userdata name="relation-types">String,String,String,String,Decimal,Decimal,Decimal,Text,Text,Text,Text,String,Text,Text,String,Text,String,Integer,String,Text,Text,String,Text,String,Text</userdata><userdata name="relation-alias">Tchuangxkfxmlxsqs,tfXiangMBH,tfXiangMMC,tfXiangMJL,tfTouZZE,tfJiTBK,tfZiCZJ,tfXiangMLXDBYX,tfXiangMJSDKHX,tfXiangMZYNRHZTMB,tfTouZJHJMX,tfXiaoZCYJZZ,tfCaiWBYJ,tfGongSLDBZYJ,tfBeiZ,tfFuJ,tfFlag,version,tfZJLYJ,tfZJLQZ,tfCWBQZ,tfZGCSYJ,tfZGCSQZ,tfFJLYJ,tfFJLQZ</userdata></rows>

回复 支持 反对

使用道具 举报

448

主题

1226

帖子

2613

积分

金牌会员

Rank: 6Rank: 6

积分
2613
QQ
 楼主| 发表于 2014-9-22 08:57:00 | 显示全部楼层
yinlun 发表于 2014-9-21 13:28
把下面的这句放在KSQL.select 后和return t前,看看两次输出的结果有什么不同
System.out.println(new com. ...

控制台报错:

<actions><action content-type="application/json" accept="application/json, text/javascript, */*"><![CDATA[{"process":"/tedawired/xxgl/process/XiangMxx/xiangMxxProcess","activity":"mainActivity","actionFlag":"__action_0__","executor":"PSN01","executeContext":"","action":"saveTchuangxkfxmlxsqsAction","parameters":{"table":{"@type":"table","userdata":{"relationAlias":"tfXiangMBH,tfXiangMMC,tfXiangMJL,tfTouZZE,tfJiTBK,tfZiCZJ,tfXiangMLXDBYX,tfXiangMJSDKHX,tfXiangMZYNRHZTMB,tfTouZJHJMX,tfXiaoZCYJZZ,tfCaiWBYJ,tfGongSLDBZYJ,tfBeiZ,tfFuJ,tfFlag,version,tfZJLYJ,tfZJLQZ,tfCWBQZ,tfZGCSYJ,tfZGCSQZ,tfFJLYJ,tfFJLQZ","relationTypes":"String,String,String,Decimal,Decimal,Decimal,Text,Text,Text,Text,String,Text,Text,String,Text,String,Integer,String,Text,Text,String,Text,String,Text","idColumnType":"String","sys.rowid":"Tchuangxkfxmlxsqs","idColumnDefine":"Tchuangxkfxmlxsqs","idColumnName":"Tchuangxkfxmlxsqs","relations":"Tchuangxkfxmlxsqs.tfXiangMBH,Tchuangxkfxmlxsqs.tfXiangMMC,Tchuangxkfxmlxsqs.tfXiangMJL,Tchuangxkfxmlxsqs.tfTouZZE,Tchuangxkfxmlxsqs.tfJiTBK,Tchuangxkfxmlxsqs.tfZiCZJ,Tchuangxkfxmlxsqs.tfXiangMLXDBYX,Tchuangxkfxmlxsqs.tfXiangMJSDKHX,Tchuangxkfxmlxsqs.tfXiangMZYNRHZTMB,Tchuangxkfxmlxsqs.tfTouZJHJMX,Tchuangxkfxmlxsqs.tfXiaoZCYJZZ,Tchuangxkfxmlxsqs.tfCaiWBYJ,Tchuangxkfxmlxsqs.tfGongSLDBZYJ,Tchuangxkfxmlxsqs.tfBeiZ,Tchuangxkfxmlxsqs.tfFuJ,Tchuangxkfxmlxsqs.tfFlag,Tchuangxkfxmlxsqs.version,Tchuangxkfxmlxsqs.tfZJLYJ,Tchuangxkfxmlxsqs.tfZJLQZ,Tchuangxkfxmlxsqs.tfCWBQZ,Tchuangxkfxmlxsqs.tfZGCSYJ,Tchuangxkfxmlxsqs.tfZGCSQZ,Tchuangxkfxmlxsqs.tfFJLYJ,Tchuangxkfxmlxsqs.tfFJLQZ","model":"/tedawired/xxgl/data","updateMode":"whereVersion","concept":"Tchuangxkfxmlxsqs","conceptAlias":"Tchuangxkfxmlxsqs"},"rows":[{"userdata":{"id":{"value":"D3BDECD1125143C8B26682244DED0926","originalValue":"D3BDECD1125143C8B26682244DED0926","changed":"0"},"recordState":"new"},"tfXiangMBH":{"value":"2014-null-117","originalValue":"2014-null-117","changed":"1"},"tfXiangMMC":{"value":"11","originalValue":"","changed":"1"},"tfXiangMJL":{"value":"33","originalValue":"","changed":"1"},"tfTouZZE":{"value":22,"originalValue":"","changed":"1"},"tfJiTBK":{"value":"","originalValue":"","changed":"1"},"tfZiCZJ":{"value":"","originalValue":"","changed":"1"},"tfXiangMLXDBYX":{"value":"44","originalValue":"","changed":"1"},"tfXiangMJSDKHX":{"value":"55","originalValue":"","changed":"1"},"tfXiangMZYNRHZTMB":{"value":"66","originalValue":"","changed":"1"},"tfTouZJHJMX":{"value":"77","originalValue":"","changed":"1"},"tfXiaoZCYJZZ":{"value":"88","originalValue":"","changed":"1"},"tfCaiWBYJ":{"value":"99","originalValue":"","changed":"1"},"tfGongSLDBZYJ":{"value":"","originalValue":"","changed":"1"},"tfBeiZ":{"value":"","originalValue":"","changed":"1"},"tfFuJ":{"value":"","originalValue":"","changed":"1"},"tfFlag":{"value":"","originalValue":"","changed":"1"},"version":{"value":0,"originalValue":0,"changed":"0"},"tfZJLYJ":{"value":"","originalValue":"","changed":"1"},"tfZJLQZ":{"value":"","originalValue":"","changed":"1"},"tfCWBQZ":{"value":"","originalValue":"","changed":"1"},"tfZGCSYJ":{"value":"","originalValue":"","changed":"1"},"tfZGCSQZ":{"value":"","originalValue":"","changed":"1"},"tfFJLYJ":{"value":"","originalValue":"","changed":"1"},"tfFJLQZ":{"value":"","originalValue":"","changed":"1"}}]}},"translateParameter":null}]]></action><action direct-execute="false" process="/tedawired/xxgl/process/XiangMxx/xiangMxxProcess" activity="mainActivity" action-flag="__action_1__" executor="PSN01" execute-context="" name="externalStartProcessAction" accept="*/*"> <parameters xmlns:xbiz="http://www.justep.com/xbiz#">  <parameter name="process">   <xbiz:simple type="http://www.w3.org/2001/XMLSchema#String">/tedawired/xxgl/process/XiangMxx/xiangMxxProcess</xbiz:simple>  </parameter>  <parameter name="attributes"><xbiz:map><item key="sData1"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String">D3BDECD1125143C8B26682244DED0926</xbiz:simple></item></xbiz:map></parameter>  <parameter name="control"/>  <parameter name="executor">   <xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"/>  </parameter> </parameters></action></actions>
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at com.justep.system.action.Engine.invokeActions(Native Method)
at com.justep.system.action.Engine.invokeActions(Unknown Source)
at com.justep.business.server.BusinessServer.doAction(Unknown Source)
at com.justep.business.server.BusinessServer.doExcute(Unknown Source)
at com.justep.business.server.BusinessServer.excute(Unknown Source)
at com.justep.business.server.BusinessServerServlet.execService(Unknown Source)
at com.justep.business.server.BusinessServerServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.justep.x.bs.BusinessServerServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:595)
Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150210; 提示: 执行KSQL出错, KSQL: INSERT INTO Tchuangxkfxmlxsqs Tchuangxkfxmlxsqs(Tchuangxkfxmlxsqs, Tchuangxkfxmlxsqs.version, Tchuangxkfxmlxsqs.tfXiangMBH, Tchuangxkfxmlxsqs.tfXiangMMC, Tchuangxkfxmlxsqs.tfXiangMJL, Tchuangxkfxmlxsqs.tfTouZZE, Tchuangxkfxmlxsqs.tfJiTBK, Tchuangxkfxmlxsqs.tfZiCZJ, Tchuangxkfxmlxsqs.tfXiangMLXDBYX, Tchuangxkfxmlxsqs.tfXiangMJSDKHX, Tchuangxkfxmlxsqs.tfXiangMZYNRHZTMB, Tchuangxkfxmlxsqs.tfTouZJHJMX, Tchuangxkfxmlxsqs.tfXiaoZCYJZZ, Tchuangxkfxmlxsqs.tfCaiWBYJ, Tchuangxkfxmlxsqs.tfGongSLDBZYJ, Tchuangxkfxmlxsqs.tfBeiZ, Tchuangxkfxmlxsqs.tfFuJ, Tchuangxkfxmlxsqs.tfFlag, Tchuangxkfxmlxsqs.tfZJLYJ, Tchuangxkfxmlxsqs.tfZJLQZ, Tchuangxkfxmlxsqs.tfCWBQZ, Tchuangxkfxmlxsqs.tfZGCSYJ, Tchuangxkfxmlxsqs.tfZGCSQZ, Tchuangxkfxmlxsqs.tfFJLYJ, Tchuangxkfxmlxsqs.tfFJLQZ) VALUES (:Tchuangxkfxmlxsqs, :version, :tfXiangMBH, :tfXiangMMC, :tfXiangMJL, :tfTouZZE, :tfJiTBK, :tfZiCZJ, :tfXiangMLXDBYX, :tfXiangMJSDKHX, :tfXiangMZYNRHZTMB, :tfTouZJHJMX, :tfXiaoZCYJZZ, :tfCaiWBYJ, :tfGongSLDBZYJ, :tfBeiZ, :tfFuJ, :tfFlag, :tfZJLYJ, :tfZJLQZ, :tfCWBQZ, :tfZGCSYJ, :tfZGCSQZ, :tfFJLYJ, :tfFJLQZ)
at com.justep.exception.BusinessException.create(Unknown Source)
at com.justep.system.data.impl.TableUtilsImplement.ksqlInsert(Unknown Source)
at com.justep.system.data.impl.TableUtilsImplement.ksqlExecuteUpdate(Unknown Source)
at com.justep.system.data.KSQL.executeUpdate(Unknown Source)
at com.justep.system.data.KSQL.executeUpdate(Unknown Source)
at com.justep.system.data.impl.TableImpl.insert(Unknown Source)
at com.justep.system.data.impl.TableImpl.save(Unknown Source)
at com.justep.system.data.impl.TableImpl.save(Unknown Source)
at com.justep.system.data.BizData.save(Unknown Source)
at BizProcedure.save(BizProcedure.java:27)
... 26 more
回复 支持 反对

使用道具 举报

448

主题

1226

帖子

2613

积分

金牌会员

Rank: 6Rank: 6

积分
2613
QQ
 楼主| 发表于 2014-9-22 08:57:16 | 显示全部楼层
yinlun 发表于 2014-9-21 13:28
把下面的这句放在KSQL.select 后和return t前,看看两次输出的结果有什么不同
System.out.println(new com. ...

Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150039; 提示: 执行sql: INSERT INTO tchuangxkfxmlxsqs (tchuangxkfxmlxsqs.FID, tchuangxkfxmlxsqs.VERSION, tchuangxkfxmlxsqs.TFXIANGMBH, tchuangxkfxmlxsqs.TFXIANGMMC, tchuangxkfxmlxsqs.TFXIANGMJL, tchuangxkfxmlxsqs.TFTOUZZE, tchuangxkfxmlxsqs.TFJITBK, tchuangxkfxmlxsqs.TFZICZJ, tchuangxkfxmlxsqs.TFXIANGMLXDBYX, tchuangxkfxmlxsqs.TFXIANGMJSDKHX, tchuangxkfxmlxsqs.TFXIANGMZYNRHZTMB, tchuangxkfxmlxsqs.TFTOUZJHJMX, tchuangxkfxmlxsqs.TFXIAOZCYJZZ, tchuangxkfxmlxsqs.TFCAIWBYJ, tchuangxkfxmlxsqs.TFGONGSLDBZYJ, tchuangxkfxmlxsqs.TFBEIZ, tchuangxkfxmlxsqs.TFFUJ, tchuangxkfxmlxsqs.TFFLAG, tchuangxkfxmlxsqs.TFZJLYJ, tchuangxkfxmlxsqs.TFZJLQZ, tchuangxkfxmlxsqs.TFCWBQZ, tchuangxkfxmlxsqs.TFZGCSYJ, tchuangxkfxmlxsqs.TFZGCSQZ, tchuangxkfxmlxsqs.TFFJLYJ, tchuangxkfxmlxsqs.TFFJLQZ) VALUES ( ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ), binds: [D3BDECD1125143C8B26682244DED0926, 0, 2014-null-117, 11, 33, 22, null, null, 44, 55, 66, 77, 88, 99, null, , null, , , null, null, , null, , null]出错
at com.justep.exception.BusinessException.create(Unknown Source)
at com.justep.system.ksql.KSQLUtils.execSqlUpdate(Unknown Source)
... 35 more
Caused by: java.sql.SQLException: Duplicate entry '11' for key 4
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1124)
at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:676)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1166)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1082)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1067)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
... 36 more
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35962
发表于 2014-9-22 10:49:51 | 显示全部楼层
Caused by: java.sql.SQLException: Duplicate entry '11' for key 4

这个错误是数据库报出来的,可以到网上查找相关的资料
http://www.educity.cn/wenda/585176.html
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

448

主题

1226

帖子

2613

积分

金牌会员

Rank: 6Rank: 6

积分
2613
QQ
 楼主| 发表于 2014-9-23 10:17:29 | 显示全部楼层
本帖最后由 zdq 于 2014-9-23 10:21 编辑
jishuang 发表于 2014-9-22 10:49
Caused by: java.sql.SQLException: Duplicate entry '11' for key 4

这个错误是数据库报出来的,可以到网 ...

老师,现在不报错了,但是还是带不出数据,是按照您那天的方法配置的主从注解。值是action的代码作了改变,对带出数据有没有影响?
public static Table xiangmlxsqs(String rowid)throws Exception{
  //项目立项申请书
  Table t = KSQL.select("select Tchuangxkfxmlxsqs.* from Tchuangxkfxmlxsqs Tchuangxkfxmlxsqs where Tchuangxkfxmlxsqs ='"+rowid+"'", null, "/tedawired/BaoB/data", null);
  Iterator<Row> it = t.iterator();
                   while (it.hasNext()){
                           Row r = it.next();
                           for(int i=1;i<5;i++){
                           
                           String field = null;
                           if(i==1)
                  {
                    field ="tfZJLQZ";
                  }
                           if(i==2)
                  {
                    field ="tfCWBQZ";
                  }
                           if(i==3)
                  {
                    field ="tfZGCSQZ";
                  }
                           if(i==4)
                  {
                    field ="tfFJLQZ";
                  }
                  
         String v = r.getString(field);                  
                           
      // String v = r.getString("tfCWBQM");//取出图片字段
      
    if (!Utils.isEmptyString(v)) {
     JSONArray ja = new JSONArray(v);
     JSONObject jsonObject = ja.getJSONObject(0);
     String docPath = jsonObject.getString("docPath");
     String fileID = jsonObject.getString("fileID");
     try {
      String urlPattern = "/repository/file/view/" + fileID + "/last/content";
      String url = addBsessionid(DocAdapter.queryNoPermissionHost(true, docPath, urlPattern, true)); //通过docPath和fileID获得图片的url
      r.setString(field, url); //将url存入table对象
     } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
     }
   
   }
    }
  }return t;
                  
  }
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35962
发表于 2014-9-23 11:23:38 | 显示全部楼层
public static Table xiangmlxsqs(String rowid)throws Exception{
  //项目立项申请书
  Table t = KSQL.select("select Tchuangxkfxmlxsqs.* from Tchuangxkfxmlxsqs Tchuangxkfxmlxsqs where Tchuangxkfxmlxsqs

='"+rowid+"'", null, "/tedawired/BaoB/data", null);
  Iterator<Row> it = t.iterator();
                   while (it.hasNext()){
                           Row r = it.next();
                           for(int i=1;i<5;i++){
                           
                           String field = null;
                           if(i==1)
                  {
                    field ="tfZJLQZ";
                  }
                           if(i==2)
                  {
                    field ="tfCWBQZ";
                  }
                           if(i==3)
                  {
                    field ="tfZGCSQZ";
                  }
                           if(i==4)
                  {
                    field ="tfFJLQZ";
                  }
                  
         String v = r.getString(field);                  
                           
      // String v = r.getString("tfCWBQM");//取出图片字段
      
    if (!Utils.isEmptyString(v)) {
     JSONArray ja = new JSONArray(v);
     JSONObject jsonObject = ja.getJSONObject(0);
     String docPath = jsonObject.getString("docPath");
     String fileID = jsonObject.getString("fileID");
     try {
      String urlPattern = "/repository/file/view/" + fileID + "/last/content";
      String url = addBsessionid(DocAdapter.queryNoPermissionHost(true, docPath, urlPattern, true)); //通过docPath和fileID获

得图片的url
      r.setString(field, url); //将url存入table对象
     } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
     }
   
   }
    }
  }
System.out.println(new com.justep.system.transform.Table2Row().transform(t,null).asXML());
return t;
                  
  }

把你的数据打印出来看看
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

448

主题

1226

帖子

2613

积分

金牌会员

Rank: 6Rank: 6

积分
2613
QQ
 楼主| 发表于 2014-9-23 11:35:49 | 显示全部楼层
本帖最后由 zdq 于 2014-9-23 11:37 编辑
jishuang 发表于 2014-9-23 11:23
public static Table xiangmlxsqs(String rowid)throws Exception{
  //项目立项申请书
  Table t = KSQL.s ...

是这个吗?
<rows><userdata name="model">/tedawired/BaoB/data</userdata><userdata name="userdata">whereVersion</userdata><userdata name="relations">Tchuangxkfxmlxsqs,Tchuangxkfxmlxsqs.tfXiangMBH,Tchuangxkfxmlxsqs.tfXiangMMC,Tchuangxkfxmlxsqs.tfXiangMJL,Tchuangxkfxmlxsqs.tfTouZZE,Tchuangxkfxmlxsqs.tfJiTBK,Tchuangxkfxmlxsqs.tfZiCZJ,Tchuangxkfxmlxsqs.tfXiangMJSDKHX,Tchuangxkfxmlxsqs.tfXiangMZYNRHZTMB,Tchuangxkfxmlxsqs.tfTouZJHJMX,Tchuangxkfxmlxsqs.tfXiaoZCYJZZ,Tchuangxkfxmlxsqs.tfCaiWBYJ,Tchuangxkfxmlxsqs.tfGongSLDBZYJ,Tchuangxkfxmlxsqs.tfBeiZ,Tchuangxkfxmlxsqs.tfFuJ,Tchuangxkfxmlxsqs.tfFlag,Tchuangxkfxmlxsqs.version,Tchuangxkfxmlxsqs.tfZJLYJ,Tchuangxkfxmlxsqs.tfZJLQZ,Tchuangxkfxmlxsqs.tfCWBQZ,Tchuangxkfxmlxsqs.tfZGCSYJ,Tchuangxkfxmlxsqs.tfZGCSQZ,Tchuangxkfxmlxsqs.tfFJLYJ,Tchuangxkfxmlxsqs.tfFJLQZ,Tchuangxkfxmlxsqs.tfXiangMLXDBYX,Tchuangxkfxmlxsqs.tfBizState</userdata><userdata name="relation-types">String,String,String,String,Decimal,Decimal,Decimal,Text,Text,Text,String,Text,Text,String,Text,String,Integer,String,Text,Text,String,Text,String,Text,Text,String</userdata><userdata name="relation-alias">Tchuangxkfxmlxsqs,tfXiangMBH,tfXiangMMC,tfXiangMJL,tfTouZZE,tfJiTBK,tfZiCZJ,tfXiangMJSDKHX,tfXiangMZYNRHZTMB,tfTouZJHJMX,tfXiaoZCYJZZ,tfCaiWBYJ,tfGongSLDBZYJ,tfBeiZ,tfFuJ,tfFlag,version,tfZJLYJ,tfZJLQZ,tfCWBQZ,tfZGCSYJ,tfZGCSQZ,tfFJLYJ,tfFJLQZ,tfXiangMLXDBYX,tfBizState</userdata><row><userdata name="recordState">edit</userdata><cell><![CDATA[C014CAF1C0934AC0BCDB6432A98F4A23]]></cell><cell><![CDATA[2014-null-132]]></cell><cell><![CDATA[zdq]]></cell><cell><![CDATA[zdq]]></cell><cell><![CDATA[11.00]]></cell><cell><![CDATA[11.00]]></cell><cell><![CDATA[11.00]]></cell><cell><![CDATA[zdq]]></cell><cell><![CDATA[zdq]]></cell><cell><![CDATA[zdq]]></cell><cell><![CDATA[zdq]]></cell><cell><![CDATA[zdq]]></cell><cell/><cell/><cell/><cell/><cell><![CDATA[0]]></cell><cell/><cell/><cell changed="1" original-value="[{&quot;docID&quot;:&quot;C65093EF38F000015ECD4CE07B001B3B&quot;,&quot;docName&quot;:&quot;{ADJF$X%63S0H8~QF[ZV[~5.png&quot;,&quot;size&quot;:&quot;1348&quot;,&quot;fileID&quot;:&quot;39-defaultDocNameSpace&quot;,&quot;docPath&quot;:&quot;/defaultDocNameSpace&quot;,&quot;time&quot;:&quot;2014-09-23T11:32:30.787Z&quot;}]"><![CDATA[/UI/system/service/doc/common/uploadDoc.j?dochost=http://localhost:8080/DocServer/repository/file/view/39-defaultDocNameSpace/last/content?key=f933c7f22e58992ce220df61190a807ed0427e9bf8e10af1e53c7e0f8b5b494f866eec09a41ab9342499c1c3713c41b76c2459faf0d3fb26a02f8d2ad476cf3a5aab6cd57d647193afa74a58262fd3d1424f21972204e88fc337e2a31cfb362722a295f980d8f212&bsessionid=A883CCE2630A24D6519E9953D9717523]]></cell><cell><![CDATA[zdq]]></cell><cell changed="1" original-value="[{&quot;docID&quot;:&quot;C65093EFA7D000012EF71950AF007500&quot;,&quot;docName&quot;:&quot;{ADJF$X%63S0H8~QF[ZV[~5.png&quot;,&quot;size&quot;:&quot;1348&quot;,&quot;fileID&quot;:&quot;40-defaultDocNameSpace&quot;,&quot;docPath&quot;:&quot;/defaultDocNameSpace&quot;,&quot;time&quot;:&quot;2014-09-23T11:32:32.531Z&quot;}]"><![CDATA[/UI/system/service/doc/common/uploadDoc.j?dochost=http://localhost:8080/DocServer/repository/file/view/40-defaultDocNameSpace/last/content?key=f933c7f22e58992ce220df61190a807ed0427e9bf8e10af1e53c7e0f8b5b494f866eec09a41ab9342499c1c3713c41b71910dd7b0265fde2a02f8d2ad476cf3a5aab6cd57d647193afa74a58262fd3d1424f21972204e88fc337e2a31cfb362775b38e663cb5bd55&bsessionid=A883CCE2630A24D6519E9953D9717523]]></cell><cell/><cell/><cell><![CDATA[zdq]]></cell><cell><![CDATA[Editing]]></cell></row></rows>
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-6-16 14:26 , Processed in 0.115504 second(s), 26 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表