本文主要是介绍ssm医药进出口交易系统源码和论文,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
ssm医药进出口交易系统源码和论文726
首先,论文一开始便是清楚的论述了系统的研究内容。其次,剖析系统需求分析,弄明白“做什么”,分析包括业务分析和业务流程的分析以及用例分析,更进一步明确系统的需求。然后在明白了系统的需求基础上需要进一步地设计系统,主要包罗软件架构模式、整体功能模块、数据库设计。本项目软件架构选择B/S模式,总体功能模块运用自顶向下的分层思想。再然后就是实现系统并进行代码编写实现功能。论文的最后章节总结一下自己完成本论文和开发本项目的心得和总结。通过医药进出口交易系统将会使医药进出口交易各个方面的工作效率带来实质性的提升。
关键字:B/S模式 医药进出口交易 软件架构
演示视频:ssm医药进出口交易系统源码和论文_哔哩哔哩_bilibili
Abstract
First of all, the thesis clearly discusses the systematic research content at the very beginning. Secondly, the analysis of system requirements analysis, understand "what to do", including business analysis and business process analysis and use case analysis, further clear system requirements. Then, on the basis of understanding the requirements of the system, we need to further design the system, mainly including software architecture pattern, overall functional modules and database design. The software architecture of the project is B/S mode, and the overall functional modules are layered from top to bottom. Then is the realization of the system and code writing to achieve the function. The last chapter of the paper summarizes the experience and summary of the completion of this paper and the development of this project. Through the medical import and export trading system will make the medical import and export trading in all aspects of work efficiency to bring substantial improvement.
Key words: B/S mode pharmaceutical import and export transaction software architecture
package com.controller;import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;import com.entity.KehuEntity;
import com.entity.view.KehuView;import com.service.KehuService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;/*** 客户* 后端接口* @author * @email * @date 2022-03-03 21:32:45*/
@RestController
@RequestMapping("/kehu")
public class KehuController {@Autowiredprivate KehuService kehuService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@RequestMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {KehuEntity user = kehuService.selectOne(new EntityWrapper<KehuEntity>().eq("kehumingcheng", username));if(user==null || !user.getMima().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(), username,"kehu", "客户" );return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@RequestMapping("/register")public R register(@RequestBody KehuEntity kehu){//ValidatorUtils.validateEntity(kehu);KehuEntity user = kehuService.selectOne(new EntityWrapper<KehuEntity>().eq("kehumingcheng", kehu.getKehumingcheng()));if(user!=null) {return R.error("注册用户已存在");}Long uId = new Date().getTime();kehu.setId(uId);kehuService.insert(kehu);return R.ok();}/*** 退出*/@RequestMapping("/logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");KehuEntity user = kehuService.selectById(id);return R.ok().put("data", user);}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){KehuEntity user = kehuService.selectOne(new EntityWrapper<KehuEntity>().eq("kehumingcheng", username));if(user==null) {return R.error("账号不存在");}user.setMima("123456");kehuService.updateById(user);return R.ok("密码已重置为:123456");}/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,KehuEntity kehu, HttpServletRequest request){EntityWrapper<KehuEntity> ew = new EntityWrapper<KehuEntity>();PageUtils page = kehuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, kehu), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,KehuEntity kehu, HttpServletRequest request){EntityWrapper<KehuEntity> ew = new EntityWrapper<KehuEntity>();PageUtils page = kehuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, kehu), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( KehuEntity kehu){EntityWrapper<KehuEntity> ew = new EntityWrapper<KehuEntity>();ew.allEq(MPUtil.allEQMapPre( kehu, "kehu")); return R.ok().put("data", kehuService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(KehuEntity kehu){EntityWrapper< KehuEntity> ew = new EntityWrapper< KehuEntity>();ew.allEq(MPUtil.allEQMapPre( kehu, "kehu")); KehuView kehuView = kehuService.selectView(ew);return R.ok("查询客户成功").put("data", kehuView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){KehuEntity kehu = kehuService.selectById(id);return R.ok().put("data", kehu);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){KehuEntity kehu = kehuService.selectById(id);return R.ok().put("data", kehu);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody KehuEntity kehu, HttpServletRequest request){kehu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(kehu);KehuEntity user = kehuService.selectOne(new EntityWrapper<KehuEntity>().eq("kehumingcheng", kehu.getKehumingcheng()));if(user!=null) {return R.error("用户已存在");}kehu.setId(new Date().getTime());kehuService.insert(kehu);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody KehuEntity kehu, HttpServletRequest request){kehu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(kehu);KehuEntity user = kehuService.selectOne(new EntityWrapper<KehuEntity>().eq("kehumingcheng", kehu.getKehumingcheng()));if(user!=null) {return R.error("用户已存在");}kehu.setId(new Date().getTime());kehuService.insert(kehu);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody KehuEntity kehu, HttpServletRequest request){//ValidatorUtils.validateEntity(kehu);kehuService.updateById(kehu);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){kehuService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 提醒接口*/@RequestMapping("/remind/{columnName}/{type}")public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) {map.put("column", columnName);map.put("type", type);if(type.equals("2")) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");Calendar c = Calendar.getInstance();Date remindStartDate = null;Date remindEndDate = null;if(map.get("remindstart")!=null) {Integer remindStart = Integer.parseInt(map.get("remindstart").toString());c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart);remindStartDate = c.getTime();map.put("remindstart", sdf.format(remindStartDate));}if(map.get("remindend")!=null) {Integer remindEnd = Integer.parseInt(map.get("remindend").toString());c.setTime(new Date());c.add(Calendar.DAY_OF_MONTH,remindEnd);remindEndDate = c.getTime();map.put("remindend", sdf.format(remindEndDate));}}Wrapper<KehuEntity> wrapper = new EntityWrapper<KehuEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = kehuService.selectCount(wrapper);return R.ok().put("count", count);}/*** (按值统计)*/@RequestMapping("/value/{xColumnName}/{yColumnName}")public R value(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName,HttpServletRequest request) {Map<String, Object> params = new HashMap<String, Object>();params.put("xColumn", xColumnName);params.put("yColumn", yColumnName);EntityWrapper<KehuEntity> ew = new EntityWrapper<KehuEntity>();List<Map<String, Object>> result = kehuService.selectValue(params, ew);SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");for(Map<String, Object> m : result) {for(String k : m.keySet()) {if(m.get(k) instanceof Date) {m.put(k, sdf.format((Date)m.get(k)));}}}return R.ok().put("data", result);}/*** (按值统计)时间统计类型*/@RequestMapping("/value/{xColumnName}/{yColumnName}/{timeStatType}")public R valueDay(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType,HttpServletRequest request) {Map<String, Object> params = new HashMap<String, Object>();params.put("xColumn", xColumnName);params.put("yColumn", yColumnName);params.put("timeStatType", timeStatType);EntityWrapper<KehuEntity> ew = new EntityWrapper<KehuEntity>();List<Map<String, Object>> result = kehuService.selectTimeStatValue(params, ew);SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");for(Map<String, Object> m : result) {for(String k : m.keySet()) {if(m.get(k) instanceof Date) {m.put(k, sdf.format((Date)m.get(k)));}}}return R.ok().put("data", result);}/*** 分组统计*/@RequestMapping("/group/{columnName}")public R group(@PathVariable("columnName") String columnName,HttpServletRequest request) {Map<String, Object> params = new HashMap<String, Object>();params.put("column", columnName);EntityWrapper<KehuEntity> ew = new EntityWrapper<KehuEntity>();List<Map<String, Object>> result = kehuService.selectGroup(params, ew);SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");for(Map<String, Object> m : result) {for(String k : m.keySet()) {if(m.get(k) instanceof Date) {m.put(k, sdf.format((Date)m.get(k)));}}}return R.ok().put("data", result);}
}
package com.controller;import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;import com.entity.YewubumenEntity;
import com.entity.view.YewubumenView;import com.service.YewubumenService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;/*** 业务部门* 后端接口* @author * @email * @date 2022-03-03 21:32:45*/
@RestController
@RequestMapping("/yewubumen")
public class YewubumenController {@Autowiredprivate YewubumenService yewubumenService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@RequestMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {YewubumenEntity user = yewubumenService.selectOne(new EntityWrapper<YewubumenEntity>().eq("yuangonggonghao", username));if(user==null || !user.getMima().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(), username,"yewubumen", "业务部门" );return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@RequestMapping("/register")public R register(@RequestBody YewubumenEntity yewubumen){//ValidatorUtils.validateEntity(yewubumen);YewubumenEntity user = yewubumenService.selectOne(new EntityWrapper<YewubumenEntity>().eq("yuangonggonghao", yewubumen.getYuangonggonghao()));if(user!=null) {return R.error("注册用户已存在");}Long uId = new Date().getTime();yewubumen.setId(uId);yewubumenService.insert(yewubumen);return R.ok();}/*** 退出*/@RequestMapping("/logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");YewubumenEntity user = yewubumenService.selectById(id);return R.ok().put("data", user);}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){YewubumenEntity user = yewubumenService.selectOne(new EntityWrapper<YewubumenEntity>().eq("yuangonggonghao", username));if(user==null) {return R.error("账号不存在");}user.setMima("123456");yewubumenService.updateById(user);return R.ok("密码已重置为:123456");}/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,YewubumenEntity yewubumen, HttpServletRequest request){EntityWrapper<YewubumenEntity> ew = new EntityWrapper<YewubumenEntity>();PageUtils page = yewubumenService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yewubumen), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,YewubumenEntity yewubumen, HttpServletRequest request){EntityWrapper<YewubumenEntity> ew = new EntityWrapper<YewubumenEntity>();PageUtils page = yewubumenService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yewubumen), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( YewubumenEntity yewubumen){EntityWrapper<YewubumenEntity> ew = new EntityWrapper<YewubumenEntity>();ew.allEq(MPUtil.allEQMapPre( yewubumen, "yewubumen")); return R.ok().put("data", yewubumenService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(YewubumenEntity yewubumen){EntityWrapper< YewubumenEntity> ew = new EntityWrapper< YewubumenEntity>();ew.allEq(MPUtil.allEQMapPre( yewubumen, "yewubumen")); YewubumenView yewubumenView = yewubumenService.selectView(ew);return R.ok("查询业务部门成功").put("data", yewubumenView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){YewubumenEntity yewubumen = yewubumenService.selectById(id);return R.ok().put("data", yewubumen);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){YewubumenEntity yewubumen = yewubumenService.selectById(id);return R.ok().put("data", yewubumen);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody YewubumenEntity yewubumen, HttpServletRequest request){yewubumen.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(yewubumen);YewubumenEntity user = yewubumenService.selectOne(new EntityWrapper<YewubumenEntity>().eq("yuangonggonghao", yewubumen.getYuangonggonghao()));if(user!=null) {return R.error("用户已存在");}yewubumen.setId(new Date().getTime());yewubumenService.insert(yewubumen);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody YewubumenEntity yewubumen, HttpServletRequest request){yewubumen.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(yewubumen);YewubumenEntity user = yewubumenService.selectOne(new EntityWrapper<YewubumenEntity>().eq("yuangonggonghao", yewubumen.getYuangonggonghao()));if(user!=null) {return R.error("用户已存在");}yewubumen.setId(new Date().getTime());yewubumenService.insert(yewubumen);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody YewubumenEntity yewubumen, HttpServletRequest request){//ValidatorUtils.validateEntity(yewubumen);yewubumenService.updateById(yewubumen);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){yewubumenService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 提醒接口*/@RequestMapping("/remind/{columnName}/{type}")public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) {map.put("column", columnName);map.put("type", type);if(type.equals("2")) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");Calendar c = Calendar.getInstance();Date remindStartDate = null;Date remindEndDate = null;if(map.get("remindstart")!=null) {Integer remindStart = Integer.parseInt(map.get("remindstart").toString());c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart);remindStartDate = c.getTime();map.put("remindstart", sdf.format(remindStartDate));}if(map.get("remindend")!=null) {Integer remindEnd = Integer.parseInt(map.get("remindend").toString());c.setTime(new Date());c.add(Calendar.DAY_OF_MONTH,remindEnd);remindEndDate = c.getTime();map.put("remindend", sdf.format(remindEndDate));}}Wrapper<YewubumenEntity> wrapper = new EntityWrapper<YewubumenEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = yewubumenService.selectCount(wrapper);return R.ok().put("count", count);}}
这篇关于ssm医药进出口交易系统源码和论文的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!