GithubHelp home page GithubHelp logo

dalian369 / dssims Goto Github PK

View Code? Open in Web Editor NEW
3.0 0.0 0.0 27.39 MB

Drug storage and sales information management system,药品存销信息管理系统

Java 6.27% CSS 3.80% HTML 12.79% JavaScript 77.08% Shell 0.06%

dssims's Introduction

DSSIMS

Drug storage and sales information management system,药品存销信息管理系统

dssims's People

Contributors

dalian369 avatar

Stargazers

 avatar  avatar  avatar

dssims's Issues

ajax给新添加的元素添加事件

ajax有时候刷新页面后,需要给其中一些元素加上事件,需要写在回调函数里,或者加上asno:false;要不然元素会加不上事件。

sql语句异常

异常信息:
nested exception is org.apache.ibatis.reflection.ReflectionException:
There is no getter for property named 'msg' in 'class java.lang.String'
出错地方:
select * from inventory i,administrator a,medicine m, supplier s where i.A_ID=a.A_ID and i.M_ID=m.M_ID and i.S_ID=s.S_ID and (m.M_NAME like #{msg} or m.M_TYPE like #{msg})
解决:
去掉sql语句中的if标签限制,或者将where改成.
不能单独使用if标签
运行正常!

当页面请求404时

当发生404时:
1.在前端检查地址是否正确
2.在控制器检查地址映射是否正确
3.检查参数是否匹配
4.检查mav的地址是否正确

java.sql.Date数据转换为json数据存储异常

异常信息:
net.sf.json.JSONException: java.lang.reflect.InvocationTargetException
出错地方:
Medicine里有一个java.sql.Date日期类型,存储为json格式时出错
修改:
将 public Date getProductionDate() {
return productionDate();
}
修改为 public String getProductionDate() {
return productionDate.toString();
}
运行正常!

Model object must not be null

异常信息:
java.lang.IllegalArgumentException: Model object must not be null
原因:
我没有在session里没有存储键值对,在另一个地方却想要获取该key对应的value

你好

作者你好,我这学期刚学了数据库,想借鉴你GitHub药品进销系统的代码,但是没看到数据库的文件,不知道表的格式,新手也不知道怎么运行这个项目,您有空的话能不能占用一点时间指导一下我呢,qq2393583998,谢谢大大

设置mysql编码

1.关闭mysql所有服务

2.在C:\ProgramData\MySQL\MySQL Server 8.0路径下找到my.ini文件

3..打开添加以下内容
[client]
#设置客户端字符集

default-character-set=utf8

[mysqld]

#设置服务器字符集为utf8

character_set_server=utf8

4.将修改后的文件拷贝到C:\Program Files\MySQL\MySQL Server 8.0

5.重新启动mysql服务器

org.mybatis.spring.MyBatisSystemException异常

异常信息:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:

Error querying database.
Cause: java.lang.IllegalArgumentException:
Mapped Statements collection does not contain value for cn.dlain.entities.MedicineMapper.fuzzyQuery

这种错误需要检查映射地址是否正确。

java.lang.AbstractMethodError异常

java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer;

需要将老版本mybatis-spring-1.2.3.jar更换成mybatis为“mybatis-3.4.4.jar”

update更新数据库信息错误异常

异常信息:
Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: '薛磊'
出错位置:

update customer set
C_NAME=#{name}
and C_PHONE=#{phone}
where C_ID=#{id}

update语句中set后面多个值不能用and连接,改成 逗号
运行正常!

ajax请求页面乱码问题

若ajax请求jsp页面,需加上这条语句
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>

mybatis和mybatis-spring包的版本兼容问题

在使用SqlSessionTemplate时,请使用老版本mybatis-spring-1.2.3.jar。
或者更新mybatis为“mybatis-3.4.4.jar”版本!

在使用错误版本时,会报一个“NoClassDefFoundError .../cursor/cursor”!

在<script>中使用EL表达式和JQuery时会出现异常

异常信息:

Uncaught ReferenceError: 薛磊 is not defined

at HTMLDocument.<anonymous> (login.form:137)

at j (jquery-2.1.0.min.js:2)

at Object.fireWith [as resolveWith] (jquery-2.1.0.min.js:2)

at Function.ready (jquery-2.1.0.min.js:2)

at HTMLDocument.I (jquery-2.1.0.min.js:2)

报错地方:
$(function(){
alert("a");
$("#user").text(${name});
});

不要在js语句里用EL表达式

mybatis和mybatis-spring包的版本兼容问题

在使用SqlSessionTemplate时,请使用老版本mybatis-spring-1.2.3.jar。
或者更新mybatis为“mybatis-3.4.4.jar”版本!
在使用错误版本时,会报一个“NoClassDefFoundError .../cursor/cursor”!

JS代码里使用后台发送过来的JSON数据时,发生异常

异常信息:
JS代码里使用后台发送过来的JSON数据时,发生异常,不能找到 xx not define
原因:
传递json数据一定在RequestMapping里设置传输格式,也就是在后台设置传输的格式,否则前端不能解析。
解决:
@RequestMapping(value="queryPurchasesByThreeId",produces="text/json;charset=UTF-8")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.