基于springboot道路建设项目管理系统源码和论文

道路建设项目中涉及的设备和材料、施工队员和管理人员等人力物力众多,只有将各种资源有效组织和科学管理起来,才能使项目的建设真正达到成本、进度和质量的有效管理和控制。为节约项目资金和时间成本,优化项目流程,同时为项目管理者提供对项目的监控和决策支持,运用现代信息技术管理道路建设项目,是促进道路建设项目管理现代化的必由之路。

首先,对广东鸿高建设集团有限公司的道路建设项目进行了实地调研和分析,然后,在研究了当前主流的开发平台、技术以及数据库基础上,提出基于Spring Boot+MyBatis框架,采用Ajax、Maven等技术,采用MySQL5.7数据库完成系统的开发方案,运用面向对象分析法,最终实现一个具有用户管理、部门管理、项目安排、任务提交、设备管理、材料管理、岗位管理成本管理等功能的道路建设项目管理系统。为企业提供道路建设项目管理的信息化管理,实现科学规范的管理。

关键词:项目管理;Spring Boot;MyBatis;Ajax

【574】基于springboot道路建设项目管理系统源码和论文

ABSTRACT

There are many human and material resources involved in road construction projects, such as equipment and materials, construction crews and management personnel. Only by organizing and scientifically managing various resources effectively, can make the construction of the project really achieve cost, progress and quality of effective management and control. In order to save the project funds and time cost, optimize the project flow, at the same time provide the project manager with the monitoring and decision support to the project, use the modern information technology to manage the road construction project. It is the only way to promote the modernization of road construction project management. First of all, the road construction project of Guangdong Honggao Construction Group Co. , Ltd. is investigated and analyzed on the spot. Secondly, on the basis of studying the current mainstream development platform, technology and database, the framework of Spring Boot + MyBatis is proposed, using Ajax, Maven and other technologies, using MySQL5.7 database to complete the system development program, using object-oriented analysis. Finally, a road construction project management system with the functions of user management, Department Management, project arrangement, task submission, equipment management, material management and post management cost management is realized. To provide information management of road construction project management for enterprises to achieve scientific and standardized management.

Keywords: project management; Spring Boot; MyBatis; Ajax

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	
    <groupId>com.ruoyi</groupId>
    <artifactId>ruoyi</artifactId>
    <version>4.1.0</version>

    <name>ruoyi</name>
	<url>http://www.ruoyi.vip</url>
    <description>若依管理系统</description>
    
    <properties>
	    <ruoyi.version>4.1.0</ruoyi.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<java.version>1.8</java.version>
		<shiro.version>1.4.1</shiro.version>
		<thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version>
		<mybatis.boot.version>1.3.2</mybatis.boot.version>
		<druid.version>1.1.14</druid.version>
		<bitwalker.version>1.19</bitwalker.version>
		<kaptcha.version>2.3.2</kaptcha.version>
		<swagger.version>2.9.2</swagger.version>
		<pagehelper.boot.version>1.2.5</pagehelper.boot.version>
		<fastjson.version>1.2.60</fastjson.version>
		<oshi.version>3.9.1</oshi.version>
		<commons.io.version>2.5</commons.io.version>
		<commons.fileupload.version>1.3.3</commons.fileupload.version>
		<poi.version>3.17</poi.version>
		<velocity.version>1.7</velocity.version>
	</properties>
	
    <!-- 依赖声明 -->
    <dependencyManagement>
        <dependencies>
        
            <!-- SpringBoot的依赖配置-->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>2.1.1.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            
            <!--阿里数据库连接池 -->
			<dependency>
	            <groupId>com.alibaba</groupId>
	            <artifactId>druid-spring-boot-starter</artifactId>
	            <version>${druid.version}</version>
	        </dependency>
	        
	        <!--验证码 -->
			<dependency>
				<groupId>com.github.penggle</groupId>
				<artifactId>kaptcha</artifactId>
				<version>${kaptcha.version}</version>
			</dependency>
			
			<!--Shiro核心框架 -->
			<dependency>
				<groupId>org.apache.shiro</groupId>
				<artifactId>shiro-core</artifactId>
				<version>${shiro.version}</version>
			</dependency>
			
			<!-- Shiro使用Srping框架 -->
			<dependency>
				<groupId>org.apache.shiro</groupId>
				<artifactId>shiro-spring</artifactId>
				<version>${shiro.version}</version>
			</dependency>
			
			<!-- Shiro使用EhCache缓存框架 -->
			<dependency>
				<groupId>org.apache.shiro</groupId>
				<artifactId>shiro-ehcache</artifactId>
				<version>${shiro.version}</version>
			</dependency>
	
			<!-- thymeleaf模板引擎和shiro框架的整合 -->
			<dependency>
				<groupId>com.github.theborakompanioni</groupId>
				<artifactId>thymeleaf-extras-shiro</artifactId>
				<version>${thymeleaf.extras.shiro.version}</version>
			</dependency>
	
			<!-- 解析客户端操作系统、浏览器等 -->
			<dependency>
				<groupId>eu.bitwalker</groupId>
				<artifactId>UserAgentUtils</artifactId>
				<version>${bitwalker.version}</version>
			</dependency>
			
			<!-- pagehelper 分页插件 -->
			<dependency>
				<groupId>com.github.pagehelper</groupId>
				<artifactId>pagehelper-spring-boot-starter</artifactId>
				<version>${pagehelper.boot.version}</version>
			</dependency>
			
			<!-- 获取系统信息 -->
			<dependency>
				<groupId>com.github.oshi</groupId>
				<artifactId>oshi-core</artifactId>
				<version>${oshi.version}</version>
			</dependency>
			
			<!-- swagger2-->
			<dependency>
				<groupId>io.springfox</groupId>
				<artifactId>springfox-swagger2</artifactId>
				<version>${swagger.version}</version>
				<exclusions>
				    <exclusion>
				        <groupId>io.swagger</groupId>
				        <artifactId>swagger-annotations</artifactId>
				    </exclusion>
				    <exclusion>
				        <groupId>io.swagger</groupId>
				        <artifactId>swagger-models</artifactId>
				    </exclusion>
				</exclusions>
			</dependency>
			
			<!-- swagger2-UI-->
			<dependency>
				<groupId>io.springfox</groupId>
				<artifactId>springfox-swagger-ui</artifactId>
				<version>${swagger.version}</version>
			</dependency>
            
            <!--io常用工具类 -->
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>${commons.io.version}</version>
			</dependency>
	
			<!--文件上传工具类 -->
			<dependency>
				<groupId>commons-fileupload</groupId>
				<artifactId>commons-fileupload</artifactId>
				<version>${commons.fileupload.version}</version>
			</dependency>
			
			<!-- excel工具 -->
			<dependency>
				<groupId>org.apache.poi</groupId>
				<artifactId>poi-ooxml</artifactId>
				<version>${poi.version}</version>
			</dependency>
			
			<!--velocity代码生成使用模板 -->
	        <dependency>
	            <groupId>org.apache.velocity</groupId>
	            <artifactId>velocity</artifactId>
	            <version>${velocity.version}</version>
	        </dependency>
	        
	        <!-- 阿里JSON解析器 -->
			<dependency>
				<groupId>com.alibaba</groupId>
				<artifactId>fastjson</artifactId>
				<version>${fastjson.version}</version>
			</dependency>

	
			<!-- 代码生成-->
			<dependency>
				<groupId>com.ruoyi</groupId>
				<artifactId>ruoyi-generator</artifactId>
				<version>${ruoyi.version}</version>
			</dependency>
			
			<!-- 核心模块-->
			<dependency>
				<groupId>com.ruoyi</groupId>
				<artifactId>ruoyi-framework</artifactId>
				<version>${ruoyi.version}</version>
			</dependency>
			
	        <!-- 系统模块-->
			<dependency>
				<groupId>com.ruoyi</groupId>
				<artifactId>ruoyi-system</artifactId>
				<version>${ruoyi.version}</version>
			</dependency>
			
			<!-- 通用工具-->
	        <dependency>
	            <groupId>com.ruoyi</groupId>
	            <artifactId>ruoyi-common</artifactId>
	            <version>${ruoyi.version}</version>
	        </dependency>
	        
        </dependencies>
    </dependencyManagement>

    <modules>
	    <module>ruoyi-admin</module>
		<module>ruoyi-framework</module>
		<module>ruoyi-system</module>
		<module>ruoyi-generator</module>
        <module>ruoyi-common</module>
    </modules>
    <packaging>pom</packaging>


	<dependencies>

		 

	</dependencies>

	<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
        </plugins>
    </build>

	<repositories>
		<repository>
			<id>public</id>
			<name>aliyun nexus</name>
			<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
			<releases>
				<enabled>true</enabled>
			</releases>
		</repository>
	</repositories>

	<pluginRepositories>
		<pluginRepository>
			<id>public</id>
			<name>aliyun nexus</name>
			<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</pluginRepository>
	</pluginRepositories>

</project>

## 内置功能

1.  用户管理:用户是系统操作者,该功能主要完成系统用户配置。
2.  部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
3.  岗位管理:配置系统用户所属担任职务。
4.  菜单管理:配置系统菜单,操作权限,按钮权限标识等。
5.  角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
6.  字典管理:对系统中经常使用的一些较为固定的数据进行维护。
7.  参数管理:对系统动态配置常用参数。
8.  通知公告:系统通知公告信息发布维护。
9.  操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
10. 登录日志:系统登录日志记录查询包含登录异常。
11. 在线用户:当前系统中活跃用户状态监控。
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
14. 系统接口:根据业务代码自动生成相关的api接口文档。
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
16. 在线构建器:拖动表单元素生成相应的HTML代码。
17. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。

package com.controller;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.model.Bingli;
import com.model.Dclass;
import com.model.Drug;
import com.model.Orderitem;
import com.model.Torder;
import com.model.User;
import com.response.OrderitemListResponse;
import com.response.TorderListResponse;
import com.service.BingliService;
import com.service.DclassService;
import com.service.DoctorService;
import com.service.DrugService;
import com.service.OrderitemService;
import com.service.TorderService;
import com.service.UserService;
import com.util.Cart;
import com.util.Config;
import com.util.PageBean;

/**
 * 药单Controller业务控制类
 */
@Controller
public class TorderController {
	/**
	 * 注入Service
	 */
	@Autowired
	private TorderService torderService;
	@Autowired
	private DrugService drugService;
	
	@Autowired
	private DclassService dclassService;
	@Autowired
	private OrderitemService orderitemService;
	@Autowired
	private BingliService bingliitemService;
	@Autowired
	private UserService userService;
	@Autowired
	private DoctorService doctorService;
	
	/**
	 * 进入列表页面
	 * 
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/torder_toList")
	public String toList(HttpServletRequest request) throws Exception {
		return "/admin/torder/torder_list.jsp";
	}

	/**
	 * 药单列表
	 * 
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/torder_list")
	@ResponseBody
	public TorderListResponse list(HttpServletRequest request) throws Exception {
		TorderListResponse res = new TorderListResponse();
		/**
		 * 获取分页参数
		 */
		int page = 0; // 当前页数
		int limit = 0;// 每页显示的数量
		int offset = 0;
		try {
			page = Integer.parseInt(request.getParameter("page"));
			limit = Integer.parseInt(request.getParameter("limit"));
		} catch (Exception e) {
		}
		if (page > 0) {
			offset = (page - 1) * limit;
		}
		PageBean pages = new PageBean(offset);
		Torder torder = new Torder();
		String blid = request.getParameter("blid");
		torder.setBlid(Integer.parseInt(blid == null || "".equals(blid) ? "0"
				: blid));
		request.setAttribute("blid", blid);
		String uid = request.getParameter("uid");
		torder.setUid(Integer.parseInt(uid == null || "".equals(uid) ? "0"
				: uid));
		request.setAttribute("uid", uid);
		String zt = request.getParameter("zt");
		torder.setZt(zt);
		request.setAttribute("zt", zt);
		// 查询记录总数
		int count = torderService.getCount(torder);
		// 获取当前页记录
		List<Torder> torderList = torderService.queryTorderList(torder, pages);
		if(torderList!=null&&torderList.size()>0){
			for (Torder torder2 : torderList) {
				User userVO = userService.queryUserById(torder2.getUid());
				if(userVO!=null){
					torder2.setUserVO(userVO);
				}
			}
		}
		res.setCode(0);
		res.setRows(torderList);
		res.setTotal(count);
		return res;
	}

	/**
	 * 跳转到新增药品界面
	 * 
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/torder_toAdd")
	public String toAdd(HttpServletRequest request) throws Exception {
		int blid = Integer.parseInt(request.getParameter("blid"));
		request.getSession().setAttribute("blid",blid);
		Cart cart = (Cart) request.getSession().getAttribute("cart");
		if(cart==null){
			cart = new Cart();
		}
		request.getSession().setAttribute("cart",cart);
		//跳转至药品页面
		return "redirect:drug_toList_cart.action";
	}
    /**
       *   购药结算
     * @param request
     * @return
     * @throws Exception
     */
	@RequestMapping(value = "/torder_toAdd2")
	public String toAdd2(HttpServletRequest request) throws Exception {
		int blid = Integer.parseInt(request.getSession().getAttribute("blid").toString());
		Bingli bingli = bingliitemService.queryBingliById(blid);
		User user = userService.queryUserById(bingli.getUid());
		request.setAttribute("user", user);
		Cart cart = (Cart) request.getSession().getAttribute("cart");
		List<Orderitem> list = new ArrayList<Orderitem>();
		if(cart!=null&&cart.getItems()!=null){
			for (Iterator it = cart.getItems().values().iterator(); it.hasNext();) {
				Orderitem orderItem = (Orderitem) it.next();
				orderItem.getJiage();
				list.add(orderItem);
			}
		}
		Torder torder = new Torder();
		torder.setZongjine(getTotalPrice(list));
		torder.setUid(bingli.getUid());
		request.setAttribute("torder", torder);
		//跳转至药品页面
		return "/admin/torder/torder_add.jsp";
	}

	/**
	 * 跳转到更新药单界面
	 * 
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/torder_toUpdate")
	public String toUpdate(HttpServletRequest request) throws Exception {
		int id = Integer.parseInt(request.getParameter("id"));
		// 根据ID查询出需要更新的记录
		Torder torder = torderService.queryTorderById(id);
		request.setAttribute("torder", torder);
		return "/admin/torder/torder_update.jsp";
	}

	/**
	 * 更新药单
	 * 
	 * @param torder
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/torder_update")
	public String update(HttpServletRequest request)
			throws Exception {
		int id = Integer.parseInt(request.getParameter("id"));
		// 根据ID查询出需要更新的记录
		Torder torder = torderService.queryTorderById(id);
		torder.setZt("已缴费");
		// 更新数据库
		torderService.updateTorder(torder);
		return "redirect:admin/torder/torder_list.jsp";
	}
	
	/**
	 *  取药
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/torder_qy")
	public String qy(HttpServletRequest request)
			throws Exception {
		int id = Integer.parseInt(request.getParameter("id"));
		// 根据ID查询出需要更新的记录
		Torder torder = torderService.queryTorderById(id);
		torder.setZt("已取药");
		// 更新数据库
		torderService.updateTorder(torder);
		Orderitem orderitem = new Orderitem();
		orderitem.setOrderid(id);
		List<Orderitem> orderitemList = orderitemService.queryOrderitemList(orderitem,null);
		for (Orderitem orderItem:orderitemList) {
			Drug drug = drugService.queryDrugById(orderItem.getDrugid());
			if(drug!=null){
				drug.setNum(drug.getNum()-orderItem.getNum());
				drugService.updateDrug(drug);
			}
		}
		
		return "redirect:admin/bingli/bingli_list_user.jsp";
	}

	/**
	 * 删除药单
	 * 
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/torder_delete")
	public String delete(HttpServletRequest request) throws Exception {
		// 根据id删除数据库记录
		int id = Integer.parseInt(request.getParameter("id"));
		torderService.deleteTorder(id);
		return "redirect:admin/torder/torder_list.jsp";
	}

	/**
	 * 查看药单详情
	 * 
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/torder_toView")
	public String toView(HttpServletRequest request) throws Exception {
		int id = Integer.parseInt(request.getParameter("id"));
		// 根据ID查询出记录放到request中,到前台jsp界面显示
		// 通过病历Id查询
		Torder torder = new Torder();
		torder.setBlid(id);
		List<Torder> tlist = torderService.queryTorderList(torder, null);
		torder = tlist.get(0);
		if(torder!=null) {
			User userVO = userService.queryUserById(torder.getUid());
			torder.setUserVO(userVO);
		}
		
		request.setAttribute("torder", torder);
		Orderitem orderitem = new Orderitem();
		orderitem.setOrderid(torder.getId());
		List<Orderitem> orderitemList = orderitemService.queryOrderitemList(orderitem,null);
		request.setAttribute("list", orderitemList);
		return "/admin/torder/torder_view.jsp";
	}
	
	
	/**
	 * 跳转到加入药单
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/drug_toAddDan")
	public String drug_toAddDan(HttpServletRequest request) throws Exception {
		int id = Integer.parseInt(request.getParameter("id"));
		// 根据ID查询出需要更新的记录
		Drug drug = drugService.queryDrugById(id);
		Dclass dclass = dclassService.queryDclassById(drug.getDcode());
		if (dclass != null) {
			drug.setDclassVO(dclass);
		}	
		request.setAttribute("drug", drug);
	

		return "/admin/dan/iteam_add.jsp";
	}


	
	/**
	 * 添加到药单中
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/addToCart")
	public String addToCart(HttpServletRequest request) throws Exception {
		int drugid = Integer.parseInt(request.getParameter("drugid"));
		int num = Integer.parseInt(request.getParameter("num"));
		Drug drug = drugService.queryDrugById(drugid);
		Dclass dclass = dclassService.queryDclassById(drug.getDcode());
		if (dclass != null) {
			drug.setDclassVO(dclass);
		}	

		Orderitem orderItem = new Orderitem();
		orderItem.setDrugid(drugid);
		orderItem.setDrugVO(drug);
		orderItem.setNum(num);
		orderItem.setDanjia(drug.getDanjia());
		Cart cart = (Cart) request.getSession().getAttribute("cart");
		if(cart==null){
			cart = new Cart();
		}
		cart.addGoods(drugid, orderItem);
		
		request.getSession().setAttribute("cart", cart);
		request.setAttribute("path", "myCart.action");
		return "/common/succeed.jsp";
	}
	/***
	 * 添加购药
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/myCart_list")
	@ResponseBody
	public OrderitemListResponse myCart2(HttpServletRequest request) throws Exception {
		OrderitemListResponse res = new OrderitemListResponse();
		Cart cart = (Cart) request.getSession().getAttribute("cart");
		List<Orderitem> list = new ArrayList<Orderitem>();
		if(cart!=null&&cart.getItems()!=null){
			for (Iterator it = cart.getItems().values().iterator(); it.hasNext();) {
				Orderitem orderItem = (Orderitem) it.next();
				orderItem.getJiage();
				list.add(orderItem);
			}
		}
		request.setAttribute("totalPrice", getTotalPrice(list));
		res.setCode(0);
		res.setRows(list);
		res.setTotal(0);
		return res;
	}
	/**
	 * 购药清单
	 * @param request
	 * @return
	 */
	@RequestMapping(value = "/myCart")
	public String myCart(HttpServletRequest request) {
		Cart cart = (Cart) request.getSession().getAttribute("cart");
		List<Orderitem> list = new ArrayList<Orderitem>();
		if(cart!=null&&cart.getItems()!=null){
			for (Iterator it = cart.getItems().values().iterator(); it.hasNext();) {
				Orderitem orderItem = (Orderitem) it.next();
				orderItem.getJiage();
				list.add(orderItem);
			}
		}
		
		request.setAttribute("totalPrice", getTotalPrice(list));
		return "/admin/dan/myCart.jsp";
	}
	/**
	 * 保存新增药单
	 * 
	 * @param torder
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/torder_add")
	public String add(Torder torder, HttpServletRequest request)
			throws Exception {
		Cart cart = (Cart) request.getSession().getAttribute("cart");
		int blid =Integer.parseInt(request.getSession().getAttribute("blid").toString());
		List<Orderitem> list = new ArrayList<Orderitem>();
		for (Iterator it = cart.getItems().values().iterator(); it.hasNext();) {
			Orderitem orderItem = (Orderitem) it.next();
			list.add(orderItem);
			
		}
		
		torder.setBianhao("YD"+new SimpleDateFormat("yyyyMMddHHmmss")
		.format(new Date()));
		torder.setCdate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
				.format(new Date()));
		torder.setZt("未缴费");
		torder.setBlid(blid);
		torder.setZongjine(getTotalPrice(list));
		// 保存到数据库
		torderService.insertTorder(torder);

		for (Iterator it = list.iterator(); it.hasNext();) {
			Orderitem orderItem = (Orderitem) it.next();
			orderItem.setOrderid(torder.getId());
			orderItem.setDrugid(orderItem.getDrugVO().getId());
			orderitemService.insertOrderitem(orderItem);
			
		}
		cart.getItems().clear();
		cart.setSjfk("0");
		request.getSession().setAttribute("blid", null);
		request.getSession().setAttribute("cart", cart);
		request.setAttribute("message","操作成功");
  		request.setAttribute("path","admin/bingli/bingli_list.jsp");
  		return "/common/succeed.jsp";
	}
	/**
	 * 计算总金额
	 * @param list
	 * @return
	 */
	public String getTotalPrice(List<Orderitem> list) {
		String totalPrice = "0";
		for (Iterator it = list.iterator(); it.hasNext();) {

			Orderitem orderItem = (Orderitem) it.next();
			int quantity = orderItem.getNum();
			totalPrice = Config.getTPrice(totalPrice,orderItem.getDanjia(), quantity) ;
		}
		return totalPrice;
	}
	/**
	 * 删除购买的药品
	 * @param request
	 * @return
	 */
	@RequestMapping(value = "/iteam_delete")
	public String iteam_delete(HttpServletRequest request) {
		Cart cart = (Cart) request.getSession().getAttribute("cart");
		int drugid = Integer.parseInt(request.getParameter("drugid"));
		cart.getItems().remove(drugid);
		return "redirect:/myCart.action";
	}
}

  • 18
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序猿毕业分享网

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值