01 | package com.crm.action; |
02 |
03 | import java.util.List; |
04 |
05 | import javax.servlet.http.HttpServletRequest; |
06 |
07 | import org.apache.struts2.ServletActionContext; |
08 |
09 | import com.crm.dao.DdmxDao; |
10 | import com.crm.entity.Dingdan; |
11 | import com.crm.entity.Dingdanmingxi; |
12 | import com.opensymphony.xwork2.ActionSupport; |
13 |
14 | public class DdmxAction extends ActionSupport{ |
15 | private Dingdanmingxi ddmx; |
16 | private DdmxDao dmdao; |
17 | public Dingdanmingxi getDdmx() { |
18 | return ddmx; |
19 | } |
20 | public void setDdmx(Dingdanmingxi ddmx) { |
21 | this .ddmx = ddmx; |
22 | } |
23 | public DdmxDao getDmdao() { |
24 | return dmdao; |
25 | } |
26 | public void setDmdao(DdmxDao dmdao) { |
27 | this .dmdao = dmdao; |
28 | } |
29 | |
30 | public String dm(){ |
31 | List<Dingdan> d=dmdao.dd(ddmx); |
32 | List<Dingdanmingxi> dm=dmdao.ddmx(ddmx); |
33 | |
34 | double zonge = 0 ; |
35 | for ( int i= 0 ;i<dm.size();i++){ |
36 | double jine =Double.parseDouble( dm.get(i).getJine()); |
37 | zonge += jine; |
38 | } |
39 | |
40 | HttpServletRequest req=ServletActionContext.getRequest(); |
41 | req.setAttribute( "dd" , d); |
42 | req.setAttribute( "ddmx" , dm); |
43 | req.setAttribute( "zonge" , zonge); |
44 | return "ddmx" ; |
45 | } |
46 | } |

pangzhihui LV14
2023年12月10日
upup996 LV6
2022年12月15日
zhaoyangwfd LV17
2022年10月11日
zw050256 LV7
2022年9月30日
hbsoft2008 LV16
2022年6月1日
wangyang520 LV6
2022年5月1日
WanLiuYun LV12
2022年4月13日
sanshao526 LV12
2022年4月4日
7z7z7z LV5
2022年3月21日
ddqddqddq LV14
2022年3月16日