MyEclipse编译报错:throw new Error("Unresolved compilation problem: ");
thrownewError("Unresolvedcompilationproblem:\n\tTypemismatch:cannotconvertfromFinance...
throw new Error("Unresolved compilation problem: \n\tType mismatch: cannot convert from FinanceBean to List<FinanceBean>\n");
JDK版本:1.6
源代码:
public void getQuarterLine(ActionMapping mapping,ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception{
String fjson="";
int ftAttachment = ParamUtil.getParameterInt(request, "ftAttachment",0);
String ftYears = ParamUtil.getParameter(request, "ftYears");//选择了多少年
String chargeType=ParamUtil.getParameter(request, "chargType");
String sdate = ParamUtil.getParameter(request, "sdate");//时间
String kitName="";
if("H".equals(chargeType)){
kitName="回款额";
}else if("T".equals(chargeType)){
kitName="投资额";
}else if("S".equals(chargeType)){
kitName="三项费用";
}
FinanceBean fBean =new FinanceBean();
List ftList = new ArrayList();
fBean.setFtAttachment(ftAttachment);
fBean.setFtKitName(kitName);
fBean.setSDate(sdate);
try {
if(StringUtils.isNotEmpty(ftYears)){
fBean.setFtYears(ftYears);
ftList = this.aphFinanceLogic.getQuarterLine(fBean);
}
} catch (Exception e) {
e.printStackTrace();
}
fjson=FpmCommon.getJson(ftList);
ResponseJsonOutUtil.jsonOutToPrintWriter(response, fjson);
} 展开
JDK版本:1.6
源代码:
public void getQuarterLine(ActionMapping mapping,ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception{
String fjson="";
int ftAttachment = ParamUtil.getParameterInt(request, "ftAttachment",0);
String ftYears = ParamUtil.getParameter(request, "ftYears");//选择了多少年
String chargeType=ParamUtil.getParameter(request, "chargType");
String sdate = ParamUtil.getParameter(request, "sdate");//时间
String kitName="";
if("H".equals(chargeType)){
kitName="回款额";
}else if("T".equals(chargeType)){
kitName="投资额";
}else if("S".equals(chargeType)){
kitName="三项费用";
}
FinanceBean fBean =new FinanceBean();
List ftList = new ArrayList();
fBean.setFtAttachment(ftAttachment);
fBean.setFtKitName(kitName);
fBean.setSDate(sdate);
try {
if(StringUtils.isNotEmpty(ftYears)){
fBean.setFtYears(ftYears);
ftList = this.aphFinanceLogic.getQuarterLine(fBean);
}
} catch (Exception e) {
e.printStackTrace();
}
fjson=FpmCommon.getJson(ftList);
ResponseJsonOutUtil.jsonOutToPrintWriter(response, fjson);
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询