最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

基于ssm的疫情時期藥物管理系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)-計(jì)算機(jī)畢業(yè)設(shè)計(jì)源碼+LW文檔

開發(fā)語言:Java

框架:ssm

JDK版本:JDK1.8

服務(wù)器:tomcat7

數(shù)據(jù)庫:mysql 5.7(一定要5.7版本)

數(shù)據(jù)庫工具:Navicat11

開發(fā)軟件:eclipse/myeclipse/idea

Maven包:Maven3.3.9

瀏覽器:谷歌瀏覽器



用戶管理邏輯代碼

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.YaopingoumaiEntity;

import com.entity.view.YaopingoumaiView;


import com.service.YaopingoumaiService;

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-02-20 21:37:04

?*/

@RestController

@RequestMapping("/yaopingoumai")

public class YaopingoumaiController {

? ? @Autowired

? ? private YaopingoumaiService yaopingoumaiService;




? ??



? ? /**

? ? ?* 后端列表

? ? ?*/

? ? @RequestMapping("/page")

? ? public R page(@RequestParam Map<String, Object> params,YaopingoumaiEntity yaopingoumai,?

HttpServletRequest request){


String tableName = request.getSession().getAttribute("tableName").toString();

if(tableName.equals("yonghu")) {

yaopingoumai.setZhanghao((String)request.getSession().getAttribute("username"));

}

if(tableName.equals("yisheng")) {

yaopingoumai.setYishengzhanghao((String)request.getSession().getAttribute("username"));

}

? ? ? ? EntityWrapper<YaopingoumaiEntity> ew = new EntityWrapper<YaopingoumaiEntity>();

PageUtils page = yaopingoumaiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yaopingoumai), params), params));

? ? ? ? return R.ok().put("data", page);

? ? }

? ??

? ? /**

? ? ?* 前端列表

? ? ?*/

@IgnoreAuth

? ? @RequestMapping("/list")

? ? public R list(@RequestParam Map<String, Object> params,YaopingoumaiEntity yaopingoumai,?

HttpServletRequest request){

? ? ? ? EntityWrapper<YaopingoumaiEntity> ew = new EntityWrapper<YaopingoumaiEntity>();

PageUtils page = yaopingoumaiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yaopingoumai), params), params));

? ? ? ? return R.ok().put("data", page);

? ? }


/**

? ? ?* 列表

? ? ?*/

? ? @RequestMapping("/lists")

? ? public R list( YaopingoumaiEntity yaopingoumai){

? ? ? ? EntityWrapper<YaopingoumaiEntity> ew = new EntityWrapper<YaopingoumaiEntity>();

? ? ? ew.allEq(MPUtil.allEQMapPre( yaopingoumai, "yaopingoumai"));?

? ? ? ? return R.ok().put("data", yaopingoumaiService.selectListView(ew));

? ? }


/**

? ? ?* 查詢

? ? ?*/

? ? @RequestMapping("/query")

? ? public R query(YaopingoumaiEntity yaopingoumai){

? ? ? ? EntityWrapper< YaopingoumaiEntity> ew = new EntityWrapper< YaopingoumaiEntity>();

? ew.allEq(MPUtil.allEQMapPre( yaopingoumai, "yaopingoumai"));?

YaopingoumaiView yaopingoumaiView =? yaopingoumaiService.selectView(ew);

return R.ok("查詢藥品購買成功").put("data", yaopingoumaiView);

? ? }

? ? /**

? ? ?* 后端詳情

? ? ?*/

? ? @RequestMapping("/info/{id}")

? ? public R info(@PathVariable("id") Long id){

? ? ? ? YaopingoumaiEntity yaopingoumai = yaopingoumaiService.selectById(id);

? ? ? ? return R.ok().put("data", yaopingoumai);

? ? }


? ? /**

? ? ?* 前端詳情

? ? ?*/

@IgnoreAuth

? ? @RequestMapping("/detail/{id}")

? ? public R detail(@PathVariable("id") Long id){

? ? ? ? YaopingoumaiEntity yaopingoumai = yaopingoumaiService.selectById(id);

? ? ? ? return R.ok().put("data", yaopingoumai);

? ? }

? ??




? ? /**

? ? ?* 后端保存

? ? ?*/

? ? @RequestMapping("/save")

? ? public R save(@RequestBody YaopingoumaiEntity yaopingoumai, HttpServletRequest request){

? ? yaopingoumai.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());

? ? //ValidatorUtils.validateEntity(yaopingoumai);


? ? ? ? yaopingoumaiService.insert(yaopingoumai);

? ? ? ? return R.ok();

? ? }

? ??

? ? /**

? ? ?* 前端保存

? ? ?*/

? ? @RequestMapping("/add")

? ? public R add(@RequestBody YaopingoumaiEntity yaopingoumai, HttpServletRequest request){

? ? yaopingoumai.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());

? ? //ValidatorUtils.validateEntity(yaopingoumai);


? ? ? ? yaopingoumaiService.insert(yaopingoumai);

? ? ? ? return R.ok();

? ? }


? ? /**

? ? ?* 修改

? ? ?*/

? ? @RequestMapping("/update")

? ? public R update(@RequestBody YaopingoumaiEntity yaopingoumai, HttpServletRequest request){

? ? ? ? //ValidatorUtils.validateEntity(yaopingoumai);

? ? ? ? yaopingoumaiService.updateById(yaopingoumai);//全部更新

? ? ? ? return R.ok();

? ? }

? ??


? ? /**

? ? ?* 刪除

? ? ?*/

? ? @RequestMapping("/delete")

? ? public R delete(@RequestBody Long[] ids){

? ? ? ? yaopingoumaiService.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<YaopingoumaiEntity> wrapper = new EntityWrapper<YaopingoumaiEntity>();

if(map.get("remindstart")!=null) {

wrapper.ge(columnName, map.get("remindstart"));

}

if(map.get("remindend")!=null) {

wrapper.le(columnName, map.get("remindend"));

}


String tableName = request.getSession().getAttribute("tableName").toString();

if(tableName.equals("yonghu")) {

wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));

}

if(tableName.equals("yisheng")) {

wrapper.eq("yishengzhanghao", (String)request.getSession().getAttribute("username"));

}


int count = yaopingoumaiService.selectCount(wrapper);

return R.ok().put("count", count);

}

}


基于ssm的疫情時期藥物管理系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)-計(jì)算機(jī)畢業(yè)設(shè)計(jì)源碼+LW文檔的評論 (共 條)

分享到微博請遵守國家法律
芮城县| 桦甸市| 崇州市| 怀来县| 确山县| 昭通市| 赤壁市| 建德市| 资源县| 水城县| 漳浦县| 舞钢市| 江山市| 云南省| 邮箱| 确山县| 东城区| 金堂县| 疏附县| 晋城| 阿勒泰市| 邢台市| 台东市| 顺昌县| 苏尼特左旗| 双桥区| 安福县| 西畴县| 商水县| 双柏县| 故城县| 天门市| 泰安市| 泗水县| 黎川县| 万山特区| 阜城县| 焉耆| 梅州市| 沈丘县| 郎溪县|