|

楼主 |
发表于 2017-11-8 10:29:03
|
显示全部楼层
本帖最后由 qweasdzxc 于 2017-11-8 10:31 编辑
我设置了check,就是会报错,31行如图4
- public static void zcdrProcessAfterImportExcelBeforeAction() {
- System.out.println("导入前");
- //获得excel文件
- Workbook workBook = (Workbook)ModelUtils.getRequestContext().getActionContext().getParameter("excel");
- Sheet sheet = workBook.getSheetAt(0);//获得sheet表1
- for(int i=1;i<=sheet.getLastRowNum();i++){ //(从第二行开始)对行进行循环
- Row row=sheet.getRow(i);
- Cell cell1=row.getCell(0);//第一列
- // Cell cell2=row.getCell(1);//第二列
- //
-
- String flxbh = cell1.toString();// 类型编码
- cell1.setCellValue(flxbh+"新增");
- // String flxmc = cell2.toString();// 类型名称
-
- Cell cell3=row.getCell(2);//第三列
- Cell cell4=row.getCell(3);//第四列
- String fwpbh = cell3.toString();// 类型编码
- String fwpmc = cell4.toString();// 类型名称
- String ksql = "INSERT INTO XL_WPB p (p, p.version, p.fLXID ,p.fWPBH ,p.fWPMC) VALUES ('"+ CommonUtils.createGUID() +"', 0, '新增', '"+ fwpbh +"', '"+ fwpmc +"')";
- KSQL.executeUpdate(ksql, null, "/XL/CS/data", null);
- }
- }
复制代码- 2017-11-08 10:24:00 excute stream action, params:{"accept":"application/json","action":"importExcel","actionFlag":"__action_0__","activity":"mainActivity","contentType":"json","executeContext":"","executor":"","parameters":{"config":{"@type":"xml","xml":"<config use-default="true" to="DB" excel-file="E:\\BeX5_V3.7(XL)\\apache-tomcat\\temp\\afd832cb-409c-46fc-abfc-91e495dd059d.excel.tmp" mapping-file="E:\\BeX5_V3.7(XL)\\apache-tomcat\\temp\\41d15672-6c86-4d76-9505-6004129263c8.excel.tmp"><data><concept name="XL_LXB"><relation name="XL_LXB" type="String"/><relation name="fLXBH" type="String"/><relation name="fLXMC" type="String"/><relation name="version" type="Integer"/></concept></data></config>"},"createActionParam":{"action":"createXL_LXBAction","activity":"mainActivity","parameters":{"table":{"@type":"table","rows":[],"userdata":{"idColumnDefine":"XL_LXB","idColumnName":"XL_LXB","idColumnType":"String","model":"/XL/CS/data","relationAlias":"fLXBH,fLXMC,version","relationTypes":"String,String,Integer","relations":"XL_LXB.fLXBH,XL_LXB.fLXMC,XL_LXB.version","updateMode":"whereVersion"}}},"process":"/XL/CS/process/zcdr/zcdrProcess"},"saveActionParam":{"action":"saveXL_LXBAction","activity":"mainActivity","parameters":{"table":{"@type":"table","rows":[{"fLXBH":{"changed":"1"},"fLXMC":{"changed":"1"},"userdata":{"id":{"value":"96A8FE940B1A4D92831A5905F678633F"},"isModified":true,"recordState":"new"},"version":{"changed":"1","value":0}}],"userdata":{"idColumnDefine":"XL_LXB","idColumnName":"XL_LXB","idColumnType":"String","model":"/XL/CS/data","relationAlias":"fLXBH,fLXMC,version","relationTypes":"String,String,Integer","relations":"XL_LXB.fLXBH,XL_LXB.fLXMC,XL_LXB.version","sys.count":2,"sys.rowid":"XL_LXB","updateMode":"whereVersion"}}},"process":"/XL/CS/process/zcdr/zcdrProcess"}},"process":"/XL/CS/process/zcdr/zcdrProcess"}
- java.lang.reflect.InvocationTargetException
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
- at java.lang.reflect.Method.invoke(Method.java:497)
- 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.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:723)
- at com.justep.x.bs.BusinessServerServlet.service(Unknown Source)
- at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
- 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:103)
- at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
- at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
- at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
- at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
- at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
- at java.lang.Thread.run(Thread.java:745)
- Caused by: java.lang.reflect.InvocationTargetException
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
- at java.lang.reflect.Method.invoke(Method.java:497)
- at com.justep.system.action.Engine.invokeAction(Native Method)
- at com.justep.system.action.Engine.invokeAction(Unknown Source)
- at com.justep.model.impl.UtilImplementInstance.invokeAction(Unknown Source)
- at com.justep.system.action.ActionUtils.invokeAction(Unknown Source)
- at com.justep.excel.ImportGenerator.generate(ImportGenerator.java:121)
- at Excel.importExcel(Excel.java:88)
- ... 27 more
- Caused by: java.lang.NullPointerException
- at ZcdrProcess.zcdrProcessAfterImportExcelBeforeAction(ZcdrProcess.java:31)
- ... 37 more
复制代码
|
|