什么叫做供货商药品目录t添加查询功能?就是说我们前面的博客里面不是说供货商登录后看到了自己供应的药品了么如下:

现在供货商想要往里面添加别的药品,那么这个药品的来源就是卫生局提供的那个Ypxx表(药品总表),我们要显示的就是ypxx表减去我之前添加到。就是我可以添加的药品数据。

如下:

我单击“供应药品添加”来到下面的页面:

这个页面的里面的药品就是我可以添加的。之前的已经存在的药品比如流水号“200211”的药品在这里是找不到的。

上面就是我们要实现的功能。

下面从Dao层开始给出具体的代码:
先给出SQL语句:

Sql:
主查询表:ypxx表 关联查询表:在where条件 中,过虑掉供货商药品目录 表的记录 select ypxx.id,
ypxx.bm,
ypxx.mc,
ypxx.jx,
ypxx.gg,
ypxx.zhxs,
ypxx.scqymc,
ypxx.spmc,
ypxx.zbjg,
ypxx.jyzt, from ypxx
--查询子查询不为空的值
where not exists(select id from gysypml where usergysid='5197cdd2-08cf-11e3-8a4f-60a44cea4388' and ypxx.id = gysypml.ypxxid)

这个语句查出来的是5197cdd2-08cf-11e3-8a4f-60a44cea4388这个供应商还可以添加的药品。

我们的Mapper接口还是卸载上一篇文章里面的GysypmlMapperCustom.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="yycg.business.dao.mapper.GysypmlMapperCustom" > <!-- 供货商药品目录查询条件 -->
<sql id="query_gysympl_where">
<if test="gysypmlCustom!=null"> <if test="gysypmlCustom.usergysid!=null and gysypmlCustom.usergysid!=''">
and gysypml.usergysid = #{gysypmlCustom.usergysid}
</if>
<if test="gysypmlCustom.ypxxid!=null and gysypmlCustom.ypxxid!=''">
and gysypml.ypxxid = #{gysypmlCustom.ypxxid}
</if> </if>
</sql> <!-- 供货商目录控制查询条件 -->
<sql id="query_gysypmlcontrol_where">
<if test="gysypmlCustom!=null">
<if test="gysypmlCustom.control!=null and gysypmlCustom.control!=''">
and gysypml_control.control = #{gysypmlCustom.control}
</if>
<if test="gysypmlCustom.usergysid!=null and gysypmlCustom.usergysid!=''">
and gysypml_control.usergysid = #{gysypmlCustom.usergysid}
</if>
<if test="gysypmlCustom.ypxxid!=null and gysypmlCustom.ypxxid!=''">
and gysypml_control.ypxxid = #{gysypmlCustom.ypxxid}
</if>
</if> </sql> <!-- 供应商药品目录添加查询 -->
<select id="findAddGysypmlList" parameterType="yycg.business.pojo.vo.GysypmlQueryVo" resultType="yycg.business.pojo.vo.GysypmlCustom">
<if test="pageQuery!=null">
select page_2.*
from (select page_1.*, rownum page_num
from
(
</if>
select ypxx.id,
ypxx.bm,
ypxx.mc,
ypxx.jx,
ypxx.gg,
ypxx.zhxs,
ypxx.scqymc,
ypxx.spmc,
ypxx.zbjg,
ypxx.jyzt, (select info
from dictinfo
where ypxx.jyzt = dictcode
and typecode = '003') jyztmc
from ypxx
where not exists(select id from gysypml where usergysid=#{gysypmlCustom.usergysid} and ypxx.id = gysypml.ypxxid)
<!-- 药品查询条件 -->
<include refid="yycg.business.dao.mapper.YpxxMapperCustom.query_ypxx_where" />
<!-- 分页尾 -->
<if test="pageQuery!=null">
) page_1
<![CDATA[
where rownum <= ${pageQuery.PageQuery_end}) page_2
where page_2.page_num >= ${pageQuery.PageQuery_start}
]]>
</if>
</select> <!-- 供应商药品目录添加总数查询 (用来分页的)-->
<select id="findAddGysypmlCount" parameterType="yycg.business.pojo.vo.GysypmlQueryVo" resultType="int"> select count(*) from ypxx
where not exists(select id from gysypml where usergysid=#{gysypmlCustom.usergysid} and ypxx.id = gysypml.ypxxid)
<!-- 药品查询条件 -->
<include refid="yycg.business.dao.mapper.YpxxMapperCustom.query_ypxx_where" /> </select> </mapper>

我们再来写Mapper接口文件:

package yycg.business.dao.mapper;

import java.util.List;

import yycg.business.pojo.vo.GysypmlCustom;
import yycg.business.pojo.vo.GysypmlQueryVo; public interface GysypmlMapperCustom {
/* public List<GysypmlCustom> findGysymplList(GysypmlQueryVo gysypmlQueryVo) throws Exception; public int findGysypmlCount(GysypmlQueryVo gysypmlQueryVo)throws Exception;*/这两个函数是上一篇文章的内容,这里不做解释了。直接忽略 <!-- 供应商药品目录添加查询 -->
public List<GysypmlCustom> findAddGysypmlList(GysypmlQueryVo gysypmlQueryVo)throws Exception;

<!-- 供应商药品目录添加总数查询 (用来分页的)-->
public int findAddGysypmlCount(GysypmlQueryVo gysypmlQueryVo) throws Exception;
}

然后我们写Serivice层接口:

package yycg.business.service;

import java.util.List;

import yycg.business.pojo.vo.GysypmlCustom;
import yycg.business.pojo.vo.GysypmlQueryVo; public interface GysymplService {

/*
public List<GysypmlCustom> findGysymplList(String usergysId ,GysypmlQueryVo gysymplQueryVo) throws Exception; public int findGysypmlCount(String usergysId,GysypmlQueryVo gysymplQueryVo)throws Exception;*/这两个函数是上一篇文章的内容,这里不做解释了。直接忽略 //药品添加目录查询
public List<GysypmlCustom> findAddGysypmlList(String usergysId,GysypmlQueryVo gysypmlQueryVo)throws Exception;
//药品添加数量查询
public int findAddGysypmlCount(String usergysId,GysypmlQueryVo gysypmlQueryVo) throws Exception; }

然后写接口实现类:

package yycg.business.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import yycg.business.dao.mapper.GysypmlMapperCustom;
import yycg.business.pojo.vo.GysypmlCustom;
import yycg.business.pojo.vo.GysypmlQueryVo;
import yycg.business.service.GysymplService; public class GysemplServiceImpl implements GysymplService { @Autowired
GysypmlMapperCustom gysymplMapperCustom; /*@Override
public List<GysypmlCustom> findGysymplList(String usergysId,
GysypmlQueryVo gysymplQueryVo) throws Exception {
// 为了防止bug.这里做一个非空校验,如果传进来不是空,那么就直接把传进来那个赋值给他,如果传进来就是空的
// 那么就新建一个
gysymplQueryVo = gysymplQueryVo != null ? gysymplQueryVo
: new GysypmlQueryVo();
*//**
* 为什么这里要再得到一个?因为可能在页面上已经传进来一个gysymplCustom. 所以要判断传进来那个是不是空的。
*
*
*//*
GysypmlCustom gysymplCustom = gysymplQueryVo.getGysymplCustom();
if (gysymplCustom == null)// 如果是空的,那就new一个。反正我们的目的就是把usergysId的值设置进去。
{
gysymplCustom = new GysypmlCustom(); }
// 设置数据范围权限
gysymplCustom.setId(usergysId); List<GysypmlCustom> listgyGysymplCustoms = gysymplMapperCustom
.findGysymplList(gysymplQueryVo);
return listgyGysymplCustoms;
} @Override
public int findGysypmlCount(String usergysId, GysypmlQueryVo gysymplQueryVo)
throws Exception { // 为了防止bug.这里做一个非空校验,如果传进来不是空,那么就直接把传进来那个赋值给他,如果传进来就是空的
// 那么就新建一个
gysymplQueryVo = gysymplQueryVo != null ? gysymplQueryVo
: new GysypmlQueryVo();
*//**
* 为什么这里要再得到一个?因为可能在页面上已经传进来一个gysymplCustom. 所以要判断传进来那个是不是空的。
*
*
*//*
GysypmlCustom gysymplCustom = gysymplQueryVo.getGysymplCustom();
if (gysymplCustom == null)// 如果是空的,那就new一个。反正我们的目的就是把usergysId的值设置进去。
{
gysymplCustom = new GysypmlCustom(); } // 设置数据范围权限
gysymplCustom.setUsergysid(usergysId);
gysymplQueryVo.setGysymplCustom(gysymplCustom);
int count = gysymplMapperCustom.findGysypmlCount(gysymplQueryVo);
return count;
}
*/上面这两个函数都不是这次内容的重点,所以忽视。
@Override
public List<GysypmlCustom> findAddGysypmlList(String usergysId,
GysypmlQueryVo gysypmlQueryVo) throws Exception { // 为了防止bug.这里做一个非空校验,如果传进来不是空,那么就直接把传进来那个赋值给他,如果传进来就是空的
// 那么就新建一个
gysypmlQueryVo = gysypmlQueryVo != null ? gysypmlQueryVo
: new GysypmlQueryVo();
/**
* 为什么这里要再得到一个?因为可能在页面上已经传进来一个gysymplCustom. 所以要判断传进来那个是不是空的。
*
*
*/
GysypmlCustom gysymplCustom = gysypmlQueryVo.getGysymplCustom();
if (gysymplCustom == null)// 如果是空的,那就new一个。反正我们的目的就是把usergysId的值设置进去。
{
gysymplCustom = new GysypmlCustom(); } gysymplCustom.setUsergysid(usergysId);
gysypmlQueryVo.setGysymplCustom(gysymplCustom); List<GysypmlCustom> listsCustoms = gysymplMapperCustom
.findAddGysypmlList(gysypmlQueryVo);
return listsCustoms;
} @Override
public int findAddGysypmlCount(String usergysId,
GysypmlQueryVo gysypmlQueryVo) throws Exception { // 为了防止bug.这里做一个非空校验,如果传进来不是空,那么就直接把传进来那个赋值给他,如果传进来就是空的
// 那么就新建一个
gysypmlQueryVo = gysypmlQueryVo != null ? gysypmlQueryVo
: new GysypmlQueryVo();
/**
* 为什么这里要再得到一个?因为可能在页面上已经传进来一个gysymplCustom. 所以要判断传进来那个是不是空的。
*
*
*/
GysypmlCustom gysymplCustom = gysypmlQueryVo.getGysymplCustom();
if (gysymplCustom == null)// 如果是空的,那就new一个。反正我们的目的就是把usergysId的值设置进去。
{
gysymplCustom = new GysypmlCustom(); } gysymplCustom.setUsergysid(usergysId);
gysypmlQueryVo.setGysymplCustom(gysymplCustom);
int listsCount = gysymplMapperCustom.findAddGysypmlCount(gysypmlQueryVo); return listsCount;
} }

我们最后看Action层:

package yycg.business.action;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import yycg.base.pojo.po.Dictinfo;
import yycg.base.pojo.vo.ActiveUser;
import yycg.base.pojo.vo.PageQuery;
import yycg.base.process.context.Config;
import yycg.base.process.result.DataGridResultInfo;
import yycg.base.service.SystemConfigService;
import yycg.business.pojo.vo.GysypmlCustom;
import yycg.business.pojo.vo.GysypmlQueryVo;
import yycg.business.service.GysymplService;
@Controller
@RequestMapping("/ypml")
public class GysymplAction { @Autowired
SystemConfigService systemConfigService;
@Autowired
GysymplService gysymplService;
//去往查询页面
/* @RequestMapping("/querygysypml")
public String querygysypml( Model model) throws Exception
{
//药品类别,查出来之后在页面传动到querygysypml.jsp页面进行显示
List<Dictinfo> yplblist=systemConfigService.findDictinfoByType("001");
model.addAttribute("yplblist", yplblist); List<Dictinfo> jyztlist=systemConfigService.findDictinfoByType("003");
model.addAttribute("jyztlist", jyztlist); List<Dictinfo> zlcclist=systemConfigService.findDictinfoByType("004");
model.addAttribute("zlcclist", zlcclist); List<Dictinfo> controllist=systemConfigService.findDictinfoByType("008");
model.addAttribute("controllist", controllist);
return "/business/ypml/querygysypml";
} //查询结果集
@RequestMapping("/querygysympl_request")
public @ResponseBody DataGridResultInfo querygysympl_request(HttpSession session,GysypmlQueryVo gysypmlQueryVo,int page,int rows) throws Exception
{
//当前用户信息去 Session中去拿。
ActiveUser activeUser=(ActiveUser)session.getAttribute(Config.ACTIVEUSER_KEY); *//**
* 刚开始的时候想不通,为什么传的是用户所属的单位id,潜意识里想不是应该传的是用户的id吗,
* 后来想想不是啊,怎么可能是用户的id,因为是供应商这么一个大的慨念在提供货物,是以供应商为单位的,
* 所以应该是供应商啊,有很多个供应商在供应药品,所以是供应商的id.
*
*//*
//用户所属的单位
String usergysid=activeUser.getSysid();//单位id
//列的总数
int total=gysymplService.findGysypmlCount(usergysid, gysypmlQueryVo);
//列表
PageQuery pageQuery=new PageQuery();
pageQuery.setPageParams(total, rows, page);
//设置分页参数
gysypmlQueryVo.setPageQuery(pageQuery);
//分页查询列表
List<GysypmlCustom> list=gysymplService.findGysymplList(usergysid, gysypmlQueryVo);
DataGridResultInfo dataGridResultInfo=new DataGridResultInfo();
dataGridResultInfo.setTotal(total);
dataGridResultInfo.setRows(list); return dataGridResultInfo; }
*/上面这两个函数都不是这次内容的重点,所以忽视。 @RequestMapping("/querygysypmladd")//转达页面
public String queryaddgysypml( Model model) throws Exception
{ //药品类别,查出来之后在页面传动到querygysypml.jsp页面进行显示
List<Dictinfo> yplblist=systemConfigService.findDictinfoByType("001");
model.addAttribute("yplblist", yplblist); List<Dictinfo> jyztlist=systemConfigService.findDictinfoByType("003");
model.addAttribute("jyztlist", jyztlist); List<Dictinfo> zlcclist=systemConfigService.findDictinfoByType("004");
model.addAttribute("zlcclist", zlcclist); List<Dictinfo> controllist=systemConfigService.findDictinfoByType("008");
model.addAttribute("controllist", controllist);
return "/business/ypml/querygysypmladd"; } @RequestMapping("/querygysypmladd_result")//查询
public @ResponseBody DataGridResultInfo queryaddgysympl_request(HttpSession session,GysypmlQueryVo gysypmlQueryVo,int page,int rows) throws Exception
{
//当前用户信息去 Session中去拿。
ActiveUser activeUser=(ActiveUser)session.getAttribute(Config.ACTIVEUSER_KEY); /**
* 刚开始的时候想不通,为什么传的是用户所属的单位id,潜意识里想不是应该传的是用户的id吗,
* 后来想想不是啊,怎么可能是用户的id,因为是供应商这么一个大的慨念在提供货物,是以供应商为单位的,
* 所以应该是供应商啊,有很多个供应商在供应药品,所以是供应商的id.
*
*/
//用户所属的单位
String usergysid=activeUser.getSysid();//单位id
//列的总数
int total=gysymplService.findAddGysypmlCount(usergysid, gysypmlQueryVo);
//列表
PageQuery pageQuery=new PageQuery();
pageQuery.setPageParams(total, rows, page);
//设置分页参数
gysypmlQueryVo.setPageQuery(pageQuery);
//分页查询列表
List<GysypmlCustom> list=gysymplService.findAddGysypmlList(usergysid, gysypmlQueryVo);
DataGridResultInfo dataGridResultInfo=new DataGridResultInfo();
dataGridResultInfo.setTotal(total);
dataGridResultInfo.setRows(list); return dataGridResultInfo;
}
}

最后给出页面:querygyspmladd.jsp:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jsp/base/tag.jsp"%>
<html>
<head>
<title>供货商药品目录添加查询</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> <%@ include file="/WEB-INF/jsp/base/common_css.jsp"%>
<%@ include file="/WEB-INF/jsp/base/common_js.jsp"%> <script type="text/javascript"> var gysypmladd = function(){
//_confirm询问是否继续操作?
_confirm('您确定要將选择药品添加至药品目录吗?',null,
//执行添加函数
function(){
//定义一个数组,准备存放选中行的序号
var indexs=[];
//获取数据列表中所有选中的行(数组)
var rows = dataGrid_obj.datagrid('getSelections');
//便利所有选中的行
for(var i=0;i<rows.length;i++){ //alert(dataGrid_obj.datagrid('getRowIndex',rows[i]));
//将返回的选中行的序号加到indexs数组中
var index = dataGrid_obj.datagrid('getRowIndex',rows[i]);//选中行的下标
//将选中行的序号设置到数组indexs中
indexs.push(index);
//alert(dataGrid_obj.datagrid('getRowIndex',rows[i]));
}
//判断如果存在选中的行,indexs数组里边有选中行的序号
if(rows.length>0){//如果存在选中的行则将indexs数组中的序号格式化为逗号分隔的并赋给indexs控件 $("#indexs").val(indexs.join(","));//将indexs数组的元素在中间加逗号拼接成一个字符串
//提交form,提交数据包括药品信息id(每条记录都 有),indexs(hidden)
jquerySubByFId('gysypmladdqueryForm',gysypmladd_callback, null);
}else{
//如果没有选中行则提示
alert_warn("请选择要添加的药品");
} } ) }; function gysypmladd_callback(data) {
//message_alert(data);
//改为可以提示错误信息明细
var result = getCallbackData(data);
_alert(result);//输出信息 /*
//刷新页面重新查询
gysypmladdquery(); //添加刷新父窗口代码
parent.gysypmlquery(); */
} //工具栏 var toolbar = [ {
id : 'gysypmladd',
text : '确认添加',
iconCls : 'icon-add',
handler : gysypmladd
}]; var frozenColumns; var columns = [ [{
field : 'check',
title : '选择',
checkbox : true//显示成checkbox
},{
field : 'id',
hidden:true,
formatter:function(value, row, index){//index是每行的序号,gysypmlControls是action中接收的list集合对象名称,ypxxid是list中对象的属性名
return '<input type="hidden" name="gysypmlControls['+index+'].ypxxid" value="'+value+'" />';
}
},{
field : 'bm',
title : '流水号',
width : 80
},{
field : 'mc',
title : '通用名',
width : 130
},{
field : 'jx',
title : '剂型',
width : 80
},{
field : 'gg',
title : '规格',
width : 100
},{
field : 'zhxs',
title : '转换系数',
width : 50
},{
field : 'scqymc',
title : '生产企业',
width : 180
},{
field : 'spmc',
title : '商品名称',
width : 150
},{
field : 'zbjg',
title : '中标价',
width : 50
},{
field : 'jyztmc',
title : '交易状态',
width : 60
}
]]; var dataGrid_obj;//datagrid的对象 $(function() {
dataGrid_obj = $('#gysypmladdlist'); dataGrid_obj.datagrid({
title : '供应药品列表',
//nowrap : false,
striped : true,
//collapsible : true,
url : '${baseurl}ypml/querygysypmladd_result.action',
//sortName : 'code',
//sortOrder : 'desc',
//remoteSort : false,
idField : 'id',//结果集主键,设置错误影响获取选中行的操作,比如getSelections执行
//frozenColumns : frozenColumns,
columns : columns,
pagination : true,
rownumbers : true,
toolbar : toolbar,
loadMsg:"",
pageList:[15,30,50,100],
//点击行时取消选中行,因为jqueryeasyui在点击行的时候默认选中行
onClickRow : function(index, field, value) {
dataGrid_obj.datagrid('unselectRow', index);
},
//当加载成功时:清除所有选中的行,解决分页数据传到action为-1问题
onLoadSuccess:function(){
dataGrid_obj.datagrid('clearSelections');
}
}); }); function gysypmladdquery() { var formdata = $("#gysypmladdqueryForm").serializeJson();
//alert(formdata);
//取消所有选中的 行
dataGrid_obj.datagrid('unselectAll');
dataGrid_obj.datagrid('load', formdata);
}
</script>
</HEAD>
<BODY>
<div id="ypxxquery_div">
<form id="gysypmladdqueryForm" name="gysypmladdqueryForm" action="${baseurl}ypml/addgysypmlsubmit.action" method="post">
<!-- indexs中存储就是选中的行的序号中间以逗号分隔 -->
<input type="hidden" name="indexs" id="indexs" />
<TABLE class="table_search">
<TBODY>
<TR> <TD class="left">通用名:</td>
<td><INPUT type="text" name="ypxxCustom.mc" /></TD>
<TD class="left">剂型:</TD>
<td ><INPUT type="text" name="ypxxCustom.jx" /></td>
<TD class="left">规格:</TD>
<td ><INPUT type="text" name="ypxxCustom.gg" /></td>
<TD class="left">转换系数:</TD>
<td ><INPUT type="text" name="ypxxCustom.zhxs" /></td>
</TR>
<TR>
<TD class="left">流水号:</TD>
<td ><INPUT type="text" name="ypxxCustom.bm" /></td>
<TD class="left">生产企业:</TD>
<td ><INPUT type="text" name="ypxxCustom.scqymc" /></td>
<TD class="left">商品名称:</TD>
<td ><INPUT type="text" name="ypxxCustom.spmc" /></td>
<td class="left">价格范围:</td>
<td>
<INPUT id="ypxxCustom.zbjglower" name="ypxxCustom.zbjglower" style="width:70px"/>

<INPUT id="ypxxCustom.zbjgupper" name="ypxxCustom.zbjgupper" style="width:70px"/> </td>
</tr>
<tr> <TD class="left">药品类别:</TD>
<td >
<select id="ypxxCustom.lb" name="ypxxCustom.lb" style="width:150px">
<option value="">全部</option>
<c:forEach items="${yplblist}" var="value">
<option value="${value.id}">${value.info}</option>
</c:forEach>
</select>
</td>
<TD class="left">交易状态:</TD>
<td >
<select id="ypxxCustom.jyzt" name="ypxxCustom.jyzt" style="width:150px">
<option value="">全部</option>
<c:forEach items="${jyztlist}" var="value">
<option value="${value.dictcode}">${value.info}</option>
</c:forEach>
</select> </td> <td class="left" height="25">质量层次:</td>
<td>
<select id="ypxxCustom.zlcc" name="ypxxCustom.zlcc" style="width:150px">
<option value="">全部</option>
<c:forEach items="${zlcclist}" var="value">
<option value="${value.id}">${value.info}</option>
</c:forEach>
</select> </td>
<td colspan=2>
<a id="btn" href="#" onclick="gysypmladdquery()" class="easyui-linkbutton" iconCls='icon-search'>查询</a>
</td> </TR> </TBODY>
</TABLE> <TABLE border=0 cellSpacing=0 cellPadding=0 width="99%" align=center>
<TBODY>
<TR>
<TD>
<table id="gysypmladdlist"></table>
</TD>
</TR>
</TBODY>
</TABLE>
</form>
</div> </BODY>
</HTML>

到这里就好了。

对了最后说一下:

这个下拉列表怎么来的?

我们看Action 层中的

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

    public String queryaddgysypml( Model model) throws Exception
{ //药品类别,查出来之后在页面传动到querygysypml.jsp页面进行显示
List<Dictinfo> yplblist=systemConfigService.findDictinfoByType("001");
model.addAttribute("yplblist", yplblist); List<Dictinfo> jyztlist=systemConfigService.findDictinfoByType("003");
model.addAttribute("jyztlist", jyztlist); List<Dictinfo> zlcclist=systemConfigService.findDictinfoByType("004");
model.addAttribute("zlcclist", zlcclist); List<Dictinfo> controllist=systemConfigService.findDictinfoByType("008");
model.addAttribute("controllist", controllist);
return "/business/ypml/querygysypmladd"; }
 List<Dictinfo> zlcclist=systemConfigService.findDictinfoByType("004");就是从数据字典里面把数据取出来,然后通过Mode传送到页面,然后页面再遍历。就可以了。

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

033医疗项目-模块三:药品供应商目录模块——供货商药品目录t添加查询功能----------Dao层和Service层和Action层和调试的更多相关文章

  1. 030医疗项目-模块三:药品供应商目录模块——供货商药品目录查询功能----------Dao层:基本的查询语句的编写

    我们安装显示的要求: 我们能看到显示的目录里面有:供货企业的名字(这个数据来自于供货商的表[usergys]),流水号,通用名,剂型(这些都来自药品信息表),供货的状态(这个呢在gysypml_con ...

  2. Myeclipse插件快速生成ssh项目并配置注解 在action层注入service的超详细过程

    最近发现,我对于ssh的 自动注入配置 还是不熟悉,于是整理了一下 终于做了一个 简单的 注入配置出来. 以前都是在applicationContext.xml 里面这样配 <bean id=& ...

  3. 035医疗项目-模块三:药品供应商目录模块——供货商药品目录(批量)添加药品的功能---------Service

    这篇文章我们重点介绍Service层.因为Dao层就是用Gysypml逆向生成的Mapper就可以了.所以这里重点讲解Service层. 业务逻辑如下: 1:我们从前端页面传入有两个值:1:userg ...

  4. 036医疗项目-模块三:药品供应商目录模块——供货商药品目录(批量)添加药品的功能---------Action层

    这篇文章我们来讲Action层: 我们先讲开发步骤: 1:我们要根据Service层里面要传的参数,在Action层传入对应的参数. Service层是:public void insertGysym ...

  5. 032医疗项目-模块三:药品供应商目录模块——供货商药品目录查询功能----------Service层和Action层和调试

    我们上一篇文章讲了Dao层代码: 这一篇我们讲解Service层和Action层: Service层: 分为接口和实现类,我们主要看实现类:GysemplServiceImpl package yyc ...

  6. 027医疗项目-模块二:药品目录的导入导出-导入功能的Action的编写

    前一篇文章我们写了Service层,这篇文章我们写一下Action层. 实现的功能: 1:我们先下载模板:然后按照模板里面的规则,插入数据.比如存在d盘. 2:然后浏览找到那个文件,上传上去. 然后把 ...

  7. 023医疗项目-模块二:药品目录的导入导出-从数据库中查出数据用XSSF导出excel并存放在虚拟目录最后下载(包括调试)

    我们要实现的效果:     进入到这个页面后,输入要查询的条件,查询出药品表的数据,然后按下导出按钮 ,就会在服务器的一个目录下生成一个药品表的excel表格.  点击"导出"之后 ...

  8. 044医疗项目-模块四:采购单模块—采购单保存(Dao,Service,Action三层)

    我们上上一篇文章(042医疗项目-模块四:采购单模块-采购单明细添加查询,并且把数据添加到数据库中)做的工作是把数据插入到了数据库,我们这篇文章做的是042医疗项目-模块四:采购单模块-采购单明细添加 ...

  9. 005医疗项目-模块一:用户的查找:1.用户表查询的sql语句

    这是医疗项目的第一个模块:做一个用户的查询,可以根据用户的账号,用户的名称,单位的名称,用户的类型去查询.要求效果如下:

随机推荐

  1. node.js学习之路

    (非原创) 目录 Nodejs的介绍 15个Nodejs应用场景 Nodejs学习路线图 1. Nodejs的介绍 Node.js的是建立在Chrome的JavaScript的运行时,可方便地构建快速 ...

  2. SQL Server 2000 sp2 及更低版本不受此版本的 Windows 支持

    SQL Server 2000 sp2 及更低版本不受此版本的 Windows 支持.在安装了 SQL Server 2000 之后请应用 sp3. 出现这种现象的原因在于:Windows Serve ...

  3. OpenResty(nginx+lua) 入门

    OpenResty 官网:http://openresty.org/ OpenResty 是一个nginx和它的各种三方模块的一个打包而成的软件平台.最重要的一点是它将lua/luajit打包了进来, ...

  4. c# bass入门学习

    据说bass挺好用的,所以又搞了个音乐播放器 这是参考了别人的bass教学结合自己的理解写的bass操作类 public class BassHelper { private static BassH ...

  5. Boost.log

    =================================版权声明================================= 版权声明:本文为博主原创文章 未经许可不得转载  请通过右 ...

  6. main()函数的完整形式

    初学C语言都觉得main作为整个程序的入口函数是不需要传递参数的,但事实上,我们完全可以给main()传入参数进而控制整个程序的执行,就像我们使用DOS命令传入的参数一样,这里面argc表示传入的参数 ...

  7. 初识Hadoop入门介绍

    初识hadoop入门介绍 Hadoop一直是我想学习的技术,正巧最近项目组要做电子商城,我就开始研究Hadoop,虽然最后鉴定Hadoop不适用我们的项目,但是我会继续研究下去,技多不压身. < ...

  8. JavaScript中产生标识符方式的演变

    本文记录下JS中产生标示符方式的演变,从ES5到ES6,ES5及其之前是一种方式,只包含两种声明(var/function),ES6则增加了一些产生标识符的关键字,如 let.const.class. ...

  9. @Value取不到值引出的spring的2种配置文件applicationContext.xml和xxx-servlet.xml

    项目中经常会用到配置文件,定义成properties的形式比较常见,为了方便使用一般在spring配置文件中做如下配置: <context:property-placeholder ignore ...

  10. TFS 2013 生成(构建)历史记录保持策略(Retention Policy)

    TFS服务器通过自动构建,实现软件生成和发布的自动化过程,这一直是TFS系统中非常重要的一个功能模块.近年来发布的TFS版本,都在自动化构建方面大幅增强了相应的功能.在这篇博客里我主要总结TFS 20 ...