各位高手进来看看,帮小弟解决个问题

时间:2021-12-08 21:22:52
org.apache.jasper.JasperException: Unable to compile class for JSP: 
An error occurred at line: 21 in the jsp file: /tichen/tichen_do.jsp
TiChenJiSuan cannot be resolved

19:         String startdate = request.getParameter("startdate");
20:         String enddate = request.getParameter("enddate");
21:         TiChenJiSuan.yeWu(startdate,enddate); 
22:         System.out .print("ssss");
23:        // TiChenYuSuan.yeWu(startdate,enddate);
24:         response.sendRedirect("tichenxianshi.jsp?startdate="+startdate+"&enddate="+enddate);

Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
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:228)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
at java.lang.Thread.run(Unknown Source)

8 个解决方案

#1


TiChenJiSuan cannot be resolved     应该是TiChenJiSuan没导入  它是静态的吗?

#2


 1 package com.etfiber.oa;
 2 import java.text.DateFormat;
 3 import java.text.ParseException;
 4 import java.text.SimpleDateFormat;
 5 import java.util.ArrayList;
 6 import java.util.Date;
 7 import java.util.Iterator;
 8 import com.etfiber.database.dao.TiChenJSDao;
 9 import com.etfiber.util.*;
10 public class TiChenJiSuan {
11 public synchronized static void yeWu(String startDate,String endDate){
12 System.out .print("ssss");
13 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式
14 String systemDate = df.format(new Date());
15 TiChenJSDao tcjs = new TiChenJSDao();
16 ArrayList listCont = tcjs.selectCont(startDate, endDate);
17 //建立在startDate——endDate时间段内所有的合同列表
18 ArrayList listYewu = tcjs.selectYewu(listCont);
19 //为合同列表添加相应电路的价格等信息
20 Iterator iter = listYewu.iterator();   
21 while(iter.hasNext())
22 {
23 TiChen tc = (TiChen)iter.next();
24     String[] Huikuan={"2009-09-01","50","50","50"};//tcjs.selectUSEFEE(condentcode);回款25  时间及金额
26 String condentcode = tc.getContdetcode();//合同明细编号
27 String zt = tcjs.selectZT(condentcode);//按合同明细编号添加其提成计算状态信息
28 boolean ztbool = "".equals(zt)||"未发放".equals(zt);
29 if(ztbool)
30 {
31 if("".equals(zt))
32 {
33   String type = tc.getCusttype();                 
34   boolean zhjr = "A".equals(type)||"B".equals(type);
35   String opcode = tc.getOPERATIONCODE();
36   boolean vpnsdh = "001".equals(opcode)||"002".equals(opcode);
37   String speedstr = tc.getSpeed();
38   int speed = 0;
39                  //提取速度大小
40   if("".equals(speedstr)||speedstr==null)
41   {
42                     speed = 0;
43   }
44                  else
45                  {
46                    try
47                    {
48      String[] speedstr1 = tc.getSpeed().trim().split("M");
49      speed =  Integer.parseInt(speedstr1[0]);
50                    }
51                    catch(Exception e)
52                   {
53                   tcjs.insertZT(condentcode, "速率不规则");
54                   continue;
55                  }
56                 }
57  boolean endvs = vpnsdh&&(speed>100);
58  boolean inter = "003".equals(opcode)&&speed>30;
59      if(endvs)
60      {
61    tcjs.insertZT(condentcode, "不发放");
62    zt = "不发放";
63    continue;
64  }
65      else
66      {
67 tcjs.insertZT(condentcode, "未发放");
68 zt = "未发放";
69      }
70 if(inter)
71 {
72 tcjs.insertZT(condentcode, "不发放");
73 zt = "不发放";
74 continue;
75 }
76     else
77     {
78 tcjs.insertZT(condentcode, "未发放");
79 zt = "未发放";
80 }
81 }
82            else if("未计算".equals(zt))
83            {
84   if("YZX".equals(tc.getCompanycode()))
85   {
86   int year = Integer.parseInt( tc.getCONYEAR());
87   int month = Integer.parseInt(tc.getCONMONTH());
88 double[]douxishu=js.selectFgsXiShu(tc.getCustdate(),year,month,tc.getIsuse());                                                                                                    
89       ZgsTiChenBiLi ztcb = tcjs.selectZgsBiLi(tc.getCustdate());                                                                         
90   tc.setStraightscale(ztcb.getStraightscale());
91   tc.setMangerscale(ztcb.getMangerscale());
92   tc.setMachinescale(ztcb.getMachinescale());
93   tc.setContsignchangescale(douxishu[0]);
94   tc.setContservechangescale(douxishu[1]);
95   tc.setOncefeestraightscale(0.06);
96   tc.setOncefeemangerscale(0.02);
97   tcjs.insertTCBL(tc);
98   tcjs.insertZT(condentcode,"未发放");
99   }

#3


101      else 
102   {
103  int year = Integer.parseInt( tc.getCONYEAR());
104  int month = Integer.parseInt(tc.getCONMONTH());
105 double[] douxishu =tcjs.selectFgsXiShu(tc.getCustdate(),year,month,tc.getIsuse()); 
106 double[] doubili = tcjs.selectFgsBiLi(tc.getAGENTFLAG(),  tc.getCusttype(),tc.getCustdate());                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
107  tc.setStraightscale(doubili[0]);
108  tc.setContsignchangescale(douxishu[0]);
109  tc.setContservechangescale(douxishu[1]);
200  tc.setMangerscale(doubili[1]);
201  tcjs.insertTCBL(tc);
202  tcjs.insertZT(condentcode,"未发放");
203   }
204   zt="未发放";
205 }
206
207   if("未发放".equals(zt))
208   {
209   //发放表中不存在记录,则计算。
210   String type = tc.getCusttype(); 
211   boolean zhjr = "A".equals(type)||"B".equals(type);
212   String speedstr = tc.getSpeed();
213   int speed = 0;
214              //提取速度大小
215              try
216              {
217     String[] speedstr1 = tc.getSpeed().trim().split("M");
218     speed =  Integer.parseInt(speedstr1[0]);
219              }
220              catch(Exception e)
221              {
222                 continue;
223              } 
224    if(zhjr||speed<100) //常规业务
225    {  
226     if("0".equals(tc.getIsuse()))
227     {
228      double paid=0;
229      try
230      {
231     paid = new Double(Huikuan[1]).doubleValue();
232     }
233 catch (Exception e) 
234 {
235 e.printStackTrace();
236 }
237      double price = tc.getPrice();
238      if(price==paid)
239      {
240     FactGrant fg = new FactGrant();
241  fg.setContcode(tc.getContcode());
242  fg.setContdetcode(tc.getContdetcode());
243                                       fg.setCode(tc.getCode());
244                       fg.setType(tcjs.selectBusinesstype(tc.getOPERATIONCODE()));
245 fg.setCustname(tc.getCustname());
247  fg.setCompanycode(tc.getCompanycode());
248  fg.setSALESMANAGE(tc.getSalesmanage());
249  fg.setIsuse(tc.getIsuse());
250  fg.setSALESNAME(tc.getSalesname());
251  fg.setCONTDATE(tc.getCustdate());
252  int year = Integer.parseInt(tc.getCONYEAR());
253  int month = Integer.parseInt(tc.getCONMONTH());
254  double amont = 0;
255  if(year==0)
256  {
257 amont = month*price;
258  }
259  else
260  {
261 amont = price * 12;
262  }
263  fg.setAmout(amont);
264  double[] dou = tcjs.selectZjGl(condentcode);
265                     fg.setSTRAIGHTAMOUT(amont*dou[0]*dou[3]*dou[4]);
266                     fg.setMANGERAMOUT(amont*dou[1]*dou[3]*dou[4]);
267                     if("YZX".equals(tc.getCompanycode()))
268                     {
269                      fg.setMACHINEAMOUT(amont*dou[2]*dou[3]*dou[4]);
270                     }
271                     fg.setREPORTDATE(Huikuan[0]);
272                     tcjs.insertFact(fg);                
273                     tcjs.updateZT("发放完", condentcode);                                     
274     }
275  }
276  else if("1".equals(tc.getIsuse()))//续签合同计算
277  {
278  double[] paid={0,0,0,0} ;
279  try {
280  paid[0] = new Double(Huikuan[1]).doubleValue();
281  paid[1] = new Double(Huikuan[2]).doubleValue();
282  paid[2] = new Double(Huikuan[3]).doubleValue();
283  }
284  catch (Exception e) 
285  {
286     e.printStackTrace();
287  }
288      double price = tc.getPrice();
289      paid[3]=paid[0]+paid[1]+paid[2];
290     if(paid[3]==price)
291     {
292     FactGrant fg = new FactGrant();
293 fg.setContcode(tc.getContcode());
294 fg.setContdetcode(tc.getContdetcode());
295 fg.setCode(tc.getCode());
296 fg.setType(tcjs.selectBusinesstype(tc.getOPERATIONCODE()));
297 fg.setCustname(tc.getCustname());
298 fg.setIsuse(tc.getIsuse());
299     fg.setCompanycode(tc.getCompanycode());
300 fg.setSALESMANAGE(tc.getSalesmanage());
301 fg.setSALESNAME(tc.getSalesname());
302 int year = Integer.parseInt(tc.getCONYEAR());
303 int month = Integer.parseInt(tc.getCONMONTH());  
304 double amont = 0;
305 if(year==0)
306 {
307    amont = month*price;
308 }
309 else
310 {
311     amont = price * 12;
312 }
313 fg.setAmout(amont);
314 double[] dou = tcjs.selectZjGl(condentcode);
315                 fg.setSTRAIGHTAMOUT(amont*dou[0]*dou[3]*dou[4]);
316                    fg.setMANGERAMOUT(amont*dou[1]*dou[3]*dou[4]);
317                    if("YZX".equals(tc.getCompanycode()))
318                    {
319                        fg.setMACHINEAMOUT(amont*dou[2]*dou[3]*dou[4]);
320                    }
321                    fg.setMANUALCODE(tc.getMANUALCODE());
322                    fg.setREPORTDATE(Huikuan[0]);                         
323                    tcjs.insertFact(fg);
324                    tcjs.updateZT("发放完", condentcode);
325                }
326              }
327   }//常规业务
328   else if(!zhjr||speed>=100)
329   {
330   FactGrant fg = new FactGrant();
331   fg.setContcode(tc.getContcode());
332   fg.setContdetcode(tc.getContdetcode());
333   fg.setCode(tc.getCode());
334   fg.setType(tcjs.selectBusinesstype(tc.getOPERATIONCODE()));
335   fg.setCustname(tc.getCustname());
336   fg.setCompanycode(tc.getCompanycode());
337   fg.setSALESMANAGE(tc.getSalesmanage());
338   fg.setIsuse(tc.getIsuse());
339   fg.setSALESNAME(tc.getSalesname());
340   fg.setCONTDATE(tc.getCustdate());
341   double paid=0;//实际回款金额
342       try
343       {
344     paid = new Double(Huikuan[1]).doubleValue();
345   }
346       catch (Exception e) 
347   {
348 e.printStackTrace();
349   }
350   double price = tc.getPrice();//每月应收账
351   Date date1 = null;
352   Date date2 = null;
353   try
354   {
355       date1 = df.parse(tc.getCustdate());
356       date2= df.parse(Huikuan[0]);
357   }
358   catch(ParseException e)
359   {
360       e.printStackTrace();
361   }
362   int flag1= date2.getYear()-date1.getYear();
363   int flag2= 12-date1.getMonth()+date2.getMonth()+1;
364   if(flag1==0||flag2<=12)
365   {
366     if(price==paid)
367   {
368   double[] dou =tcjs.selectZjGl(condentcode);//批发比例
369   fg.setSTRAIGHTAMOUT(paid*dou[0]*dou[3]);
370              fg.setMANGERAMOUT(paid*dou[1]*dou[3]);
371  }
372 }
373   fg.setMANUALCODE(tc.getMANUALCODE());
374   fg.setREPORTDATE(Huikuan[0]);
375   tcjs.insertFact(fg);
376   tcjs.updateZT("发放完", condentcode);
377   }
378 }
379   tcjs.colseConnectionPool();
380 }
381   }
382  }
383 public static void main(String args[])
384 {
385 TiChenJiSuan.yeWu("2009-01-01","2009-03-31");
386 }
387     }   
 

#4


JSP页面写错了,

#5


你jsp没有像这样引入类TiChenJiSuan吧
<%@ page import="java.util.HashMap"%>

#6


已经引入啦
 <%@ page language="java" import="java.util.*,com.etfiber.util.*,com.etfiber.oa.*,com.etfiber.database.dao.*" pageEncoding="gb2312"%>

#7


<%@ page language="java" import="java.util.*,com.etfiber.util.*,com.etfiber.oa.*,com.etfiber.database.dao.*" pageEncoding="gb2312"%>
<%request.setCharacterEncoding("gb2312"); %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title></title>
    
 </head>
  
  <body>
<% 
        String startdate = request.getParameter("startdate");
        String enddate = request.getParameter("enddate");
        System.out .print(startdate+","+enddate);
        TiChenJiSuan.yeWu(startdate,enddate); 
       // TiChenYuSuan.yeWu(startdate,enddate);
        response.sendRedirect("tichenxianshi.jsp?startdate="+startdate+"&enddate="+enddate);
   %>
  </body>
</html>

#8


该回复于2011-09-19 12:18:36被版主删除

#1


TiChenJiSuan cannot be resolved     应该是TiChenJiSuan没导入  它是静态的吗?

#2


 1 package com.etfiber.oa;
 2 import java.text.DateFormat;
 3 import java.text.ParseException;
 4 import java.text.SimpleDateFormat;
 5 import java.util.ArrayList;
 6 import java.util.Date;
 7 import java.util.Iterator;
 8 import com.etfiber.database.dao.TiChenJSDao;
 9 import com.etfiber.util.*;
10 public class TiChenJiSuan {
11 public synchronized static void yeWu(String startDate,String endDate){
12 System.out .print("ssss");
13 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式
14 String systemDate = df.format(new Date());
15 TiChenJSDao tcjs = new TiChenJSDao();
16 ArrayList listCont = tcjs.selectCont(startDate, endDate);
17 //建立在startDate——endDate时间段内所有的合同列表
18 ArrayList listYewu = tcjs.selectYewu(listCont);
19 //为合同列表添加相应电路的价格等信息
20 Iterator iter = listYewu.iterator();   
21 while(iter.hasNext())
22 {
23 TiChen tc = (TiChen)iter.next();
24     String[] Huikuan={"2009-09-01","50","50","50"};//tcjs.selectUSEFEE(condentcode);回款25  时间及金额
26 String condentcode = tc.getContdetcode();//合同明细编号
27 String zt = tcjs.selectZT(condentcode);//按合同明细编号添加其提成计算状态信息
28 boolean ztbool = "".equals(zt)||"未发放".equals(zt);
29 if(ztbool)
30 {
31 if("".equals(zt))
32 {
33   String type = tc.getCusttype();                 
34   boolean zhjr = "A".equals(type)||"B".equals(type);
35   String opcode = tc.getOPERATIONCODE();
36   boolean vpnsdh = "001".equals(opcode)||"002".equals(opcode);
37   String speedstr = tc.getSpeed();
38   int speed = 0;
39                  //提取速度大小
40   if("".equals(speedstr)||speedstr==null)
41   {
42                     speed = 0;
43   }
44                  else
45                  {
46                    try
47                    {
48      String[] speedstr1 = tc.getSpeed().trim().split("M");
49      speed =  Integer.parseInt(speedstr1[0]);
50                    }
51                    catch(Exception e)
52                   {
53                   tcjs.insertZT(condentcode, "速率不规则");
54                   continue;
55                  }
56                 }
57  boolean endvs = vpnsdh&&(speed>100);
58  boolean inter = "003".equals(opcode)&&speed>30;
59      if(endvs)
60      {
61    tcjs.insertZT(condentcode, "不发放");
62    zt = "不发放";
63    continue;
64  }
65      else
66      {
67 tcjs.insertZT(condentcode, "未发放");
68 zt = "未发放";
69      }
70 if(inter)
71 {
72 tcjs.insertZT(condentcode, "不发放");
73 zt = "不发放";
74 continue;
75 }
76     else
77     {
78 tcjs.insertZT(condentcode, "未发放");
79 zt = "未发放";
80 }
81 }
82            else if("未计算".equals(zt))
83            {
84   if("YZX".equals(tc.getCompanycode()))
85   {
86   int year = Integer.parseInt( tc.getCONYEAR());
87   int month = Integer.parseInt(tc.getCONMONTH());
88 double[]douxishu=js.selectFgsXiShu(tc.getCustdate(),year,month,tc.getIsuse());                                                                                                    
89       ZgsTiChenBiLi ztcb = tcjs.selectZgsBiLi(tc.getCustdate());                                                                         
90   tc.setStraightscale(ztcb.getStraightscale());
91   tc.setMangerscale(ztcb.getMangerscale());
92   tc.setMachinescale(ztcb.getMachinescale());
93   tc.setContsignchangescale(douxishu[0]);
94   tc.setContservechangescale(douxishu[1]);
95   tc.setOncefeestraightscale(0.06);
96   tc.setOncefeemangerscale(0.02);
97   tcjs.insertTCBL(tc);
98   tcjs.insertZT(condentcode,"未发放");
99   }

#3


101      else 
102   {
103  int year = Integer.parseInt( tc.getCONYEAR());
104  int month = Integer.parseInt(tc.getCONMONTH());
105 double[] douxishu =tcjs.selectFgsXiShu(tc.getCustdate(),year,month,tc.getIsuse()); 
106 double[] doubili = tcjs.selectFgsBiLi(tc.getAGENTFLAG(),  tc.getCusttype(),tc.getCustdate());                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
107  tc.setStraightscale(doubili[0]);
108  tc.setContsignchangescale(douxishu[0]);
109  tc.setContservechangescale(douxishu[1]);
200  tc.setMangerscale(doubili[1]);
201  tcjs.insertTCBL(tc);
202  tcjs.insertZT(condentcode,"未发放");
203   }
204   zt="未发放";
205 }
206
207   if("未发放".equals(zt))
208   {
209   //发放表中不存在记录,则计算。
210   String type = tc.getCusttype(); 
211   boolean zhjr = "A".equals(type)||"B".equals(type);
212   String speedstr = tc.getSpeed();
213   int speed = 0;
214              //提取速度大小
215              try
216              {
217     String[] speedstr1 = tc.getSpeed().trim().split("M");
218     speed =  Integer.parseInt(speedstr1[0]);
219              }
220              catch(Exception e)
221              {
222                 continue;
223              } 
224    if(zhjr||speed<100) //常规业务
225    {  
226     if("0".equals(tc.getIsuse()))
227     {
228      double paid=0;
229      try
230      {
231     paid = new Double(Huikuan[1]).doubleValue();
232     }
233 catch (Exception e) 
234 {
235 e.printStackTrace();
236 }
237      double price = tc.getPrice();
238      if(price==paid)
239      {
240     FactGrant fg = new FactGrant();
241  fg.setContcode(tc.getContcode());
242  fg.setContdetcode(tc.getContdetcode());
243                                       fg.setCode(tc.getCode());
244                       fg.setType(tcjs.selectBusinesstype(tc.getOPERATIONCODE()));
245 fg.setCustname(tc.getCustname());
247  fg.setCompanycode(tc.getCompanycode());
248  fg.setSALESMANAGE(tc.getSalesmanage());
249  fg.setIsuse(tc.getIsuse());
250  fg.setSALESNAME(tc.getSalesname());
251  fg.setCONTDATE(tc.getCustdate());
252  int year = Integer.parseInt(tc.getCONYEAR());
253  int month = Integer.parseInt(tc.getCONMONTH());
254  double amont = 0;
255  if(year==0)
256  {
257 amont = month*price;
258  }
259  else
260  {
261 amont = price * 12;
262  }
263  fg.setAmout(amont);
264  double[] dou = tcjs.selectZjGl(condentcode);
265                     fg.setSTRAIGHTAMOUT(amont*dou[0]*dou[3]*dou[4]);
266                     fg.setMANGERAMOUT(amont*dou[1]*dou[3]*dou[4]);
267                     if("YZX".equals(tc.getCompanycode()))
268                     {
269                      fg.setMACHINEAMOUT(amont*dou[2]*dou[3]*dou[4]);
270                     }
271                     fg.setREPORTDATE(Huikuan[0]);
272                     tcjs.insertFact(fg);                
273                     tcjs.updateZT("发放完", condentcode);                                     
274     }
275  }
276  else if("1".equals(tc.getIsuse()))//续签合同计算
277  {
278  double[] paid={0,0,0,0} ;
279  try {
280  paid[0] = new Double(Huikuan[1]).doubleValue();
281  paid[1] = new Double(Huikuan[2]).doubleValue();
282  paid[2] = new Double(Huikuan[3]).doubleValue();
283  }
284  catch (Exception e) 
285  {
286     e.printStackTrace();
287  }
288      double price = tc.getPrice();
289      paid[3]=paid[0]+paid[1]+paid[2];
290     if(paid[3]==price)
291     {
292     FactGrant fg = new FactGrant();
293 fg.setContcode(tc.getContcode());
294 fg.setContdetcode(tc.getContdetcode());
295 fg.setCode(tc.getCode());
296 fg.setType(tcjs.selectBusinesstype(tc.getOPERATIONCODE()));
297 fg.setCustname(tc.getCustname());
298 fg.setIsuse(tc.getIsuse());
299     fg.setCompanycode(tc.getCompanycode());
300 fg.setSALESMANAGE(tc.getSalesmanage());
301 fg.setSALESNAME(tc.getSalesname());
302 int year = Integer.parseInt(tc.getCONYEAR());
303 int month = Integer.parseInt(tc.getCONMONTH());  
304 double amont = 0;
305 if(year==0)
306 {
307    amont = month*price;
308 }
309 else
310 {
311     amont = price * 12;
312 }
313 fg.setAmout(amont);
314 double[] dou = tcjs.selectZjGl(condentcode);
315                 fg.setSTRAIGHTAMOUT(amont*dou[0]*dou[3]*dou[4]);
316                    fg.setMANGERAMOUT(amont*dou[1]*dou[3]*dou[4]);
317                    if("YZX".equals(tc.getCompanycode()))
318                    {
319                        fg.setMACHINEAMOUT(amont*dou[2]*dou[3]*dou[4]);
320                    }
321                    fg.setMANUALCODE(tc.getMANUALCODE());
322                    fg.setREPORTDATE(Huikuan[0]);                         
323                    tcjs.insertFact(fg);
324                    tcjs.updateZT("发放完", condentcode);
325                }
326              }
327   }//常规业务
328   else if(!zhjr||speed>=100)
329   {
330   FactGrant fg = new FactGrant();
331   fg.setContcode(tc.getContcode());
332   fg.setContdetcode(tc.getContdetcode());
333   fg.setCode(tc.getCode());
334   fg.setType(tcjs.selectBusinesstype(tc.getOPERATIONCODE()));
335   fg.setCustname(tc.getCustname());
336   fg.setCompanycode(tc.getCompanycode());
337   fg.setSALESMANAGE(tc.getSalesmanage());
338   fg.setIsuse(tc.getIsuse());
339   fg.setSALESNAME(tc.getSalesname());
340   fg.setCONTDATE(tc.getCustdate());
341   double paid=0;//实际回款金额
342       try
343       {
344     paid = new Double(Huikuan[1]).doubleValue();
345   }
346       catch (Exception e) 
347   {
348 e.printStackTrace();
349   }
350   double price = tc.getPrice();//每月应收账
351   Date date1 = null;
352   Date date2 = null;
353   try
354   {
355       date1 = df.parse(tc.getCustdate());
356       date2= df.parse(Huikuan[0]);
357   }
358   catch(ParseException e)
359   {
360       e.printStackTrace();
361   }
362   int flag1= date2.getYear()-date1.getYear();
363   int flag2= 12-date1.getMonth()+date2.getMonth()+1;
364   if(flag1==0||flag2<=12)
365   {
366     if(price==paid)
367   {
368   double[] dou =tcjs.selectZjGl(condentcode);//批发比例
369   fg.setSTRAIGHTAMOUT(paid*dou[0]*dou[3]);
370              fg.setMANGERAMOUT(paid*dou[1]*dou[3]);
371  }
372 }
373   fg.setMANUALCODE(tc.getMANUALCODE());
374   fg.setREPORTDATE(Huikuan[0]);
375   tcjs.insertFact(fg);
376   tcjs.updateZT("发放完", condentcode);
377   }
378 }
379   tcjs.colseConnectionPool();
380 }
381   }
382  }
383 public static void main(String args[])
384 {
385 TiChenJiSuan.yeWu("2009-01-01","2009-03-31");
386 }
387     }   
 

#4


JSP页面写错了,

#5


你jsp没有像这样引入类TiChenJiSuan吧
<%@ page import="java.util.HashMap"%>

#6


已经引入啦
 <%@ page language="java" import="java.util.*,com.etfiber.util.*,com.etfiber.oa.*,com.etfiber.database.dao.*" pageEncoding="gb2312"%>

#7


<%@ page language="java" import="java.util.*,com.etfiber.util.*,com.etfiber.oa.*,com.etfiber.database.dao.*" pageEncoding="gb2312"%>
<%request.setCharacterEncoding("gb2312"); %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title></title>
    
 </head>
  
  <body>
<% 
        String startdate = request.getParameter("startdate");
        String enddate = request.getParameter("enddate");
        System.out .print(startdate+","+enddate);
        TiChenJiSuan.yeWu(startdate,enddate); 
       // TiChenYuSuan.yeWu(startdate,enddate);
        response.sendRedirect("tichenxianshi.jsp?startdate="+startdate+"&enddate="+enddate);
   %>
  </body>
</html>

#8


该回复于2011-09-19 12:18:36被版主删除