return list;
}
// 通过id查询销售单
@Override
public List selectById(Object[] paraArray) throws Exception {
BaseDaoImpl dao = new BaseDaoImpl();
String sql = "select c.id,c.name,w.id,w.name,g.stock " + "from goods g,category c,warehouse w "
- “where g.category_id=c.id and g.warehouse_id=w.id and g.del_flag=‘0’ and c.del_flag=‘0’ and w.del_flag=‘0’ and g.id=?”;
List<Object[]> list = dao.select(sql, 5, paraArray);
return list;
}
// 通过id修改库存
@Override
public int updateStockById(Object[] paraArray) throws Exception {
BaseDaoImpl dao = new BaseDaoImpl();
int result = 0;
result = dao.update(“update goods set stock=stock+? where id=?”, paraArray);
return result;
}
}
SaleOrderServiceImpl
package org.rancode.module.services.Impl;
import java.util.List;
import java.util.Vector;
import org.rancode.module.dao.Impl.BaseDaoImpl;
import org.rancode.module.services.SaleOrderService;
public class SaleOrderServiceImpl implements SaleOrderService {
// 条件查询销售单
@Override
public Vector selectByCondition(Object[] paraArray) throws Exception {
Vector rows = new Vector();
BaseDaoImpl dao = new BaseDaoImpl();
StringBuilder sqlBuilder = new StringBuilder(
"select s.id,s.bill_no,g.name,s.amount,c.name,w.name,u.name,c.id,w.id "
-
" from sale_order s,user u,goods g,category c,warehouse w "
-
" where s.handler_id=u.id and s.category_id=c.id and s.warehouse_id=w.id and s.goods_id=g.id and s.del_flag=‘0’ and g.del_flag=‘0’ and c.del_flag=‘0’ and w.del_flag=‘0’");
String name = paraArray[0].toString().trim();
if (!name.isEmpty()) {
sqlBuilder.append(" and g.name like ‘%" + paraArray[0] + "%’ ");
}
if (!“全部”.equals(paraArray[1])) {
sqlBuilder.append(" and s.category_id=‘" + paraArray[1] + "’ ");
}
if (!“全部”.equals(paraArray[2])) {
sqlBuilder.append(" and s.warehouse_id=‘" + paraArray[2] + "’ ");
}
String sql = sqlBuilder.toString();
List<Object[]> list = dao.select(sql, 9, null);
if (!list.isEmpty()) {
for (Object[] object : list) {
Vector temp = new Vector();
for (int i = 0; i < object.length; i++) {
temp.add(object[i]);
}
rows.add(temp);
}
}
return rows;
}
// 插入销售单
@Override
public int insert(Object[] paraArray) throws Exception {
BaseDaoImpl dao = new BaseDaoImpl();
int result = 0;
result = dao.insert(
“insert into sale_order(id,bill_no,handler_id,category_id,warehouse_id,amount,goods_id) values(?,?,?,?,?,?,?)”,
paraArray);
return result;
}
}
StockOrderServiceImpl
package org.rancode.module.services.Impl;
import java.util.List;
import java.util.Vector;
import org.rancode.module.dao.Impl.BaseDaoImpl;
import org.rancode.module.services.StockOrderService;
public class StockOrderServiceImpl implements StockOrderService {
// 条件查询入库单
@Override
public Vector selectStockInputByCondition(Object[] paraArray) throws Exception {
Vector rows = new Vector();
BaseDaoImpl dao = new BaseDaoImpl();
StringBuilder sqlBuilder = new StringBuilder(
"select s.id,s.bill_no,g.name,s.amount,c.name,w.name,u.name,c.id,w.id "
-
" from stock_order s,goods g,user u,category c,warehouse w "
-
" where s.handler_id=u.id and s.goods_id=g.id and s.category_id=c.id and s.warehouse_id=w.id and s.sign=‘0’ and s.del_flag=‘0’ and g.del_flag=‘0’ and c.del_flag=0 and w.del_flag=‘0’ ");
String name = paraArray[0].toString().trim();
if (!name.isEmpty()) {
sqlBuilder.append(" and g.name like ‘%" + paraArray[0] + "%’ ");
}
if (!“全部”.equals(paraArray[1])) {
sqlBuilder.append(" and s.category_id=‘" + paraArray[1] + "’ ");
}
if (!“全部”.equals(paraArray[2])) {
sqlBuilder.append(" and s.warehouse_id=‘" + paraArray[2] + "’ ");
}
if (!“全部”.equals(paraArray[3])) {
sqlBuilder.append(" and s.handler_id=‘" + paraArray[3] + "’ ");
}
String sql = sqlBuilder.toString();
List<Object[]> list = dao.select(sql, 9, null);
if (!list.isEmpty()) {
for (Object[] object : list) {
Vector temp = new Vector();
for (int i = 0; i < object.length; i++) {
temp.add(object[i]);
}
rows.add(temp);
}
}
return rows;
}
// 通过id逻辑删除入库单
@Override
public int deleteStockInputById(Object[] paraArray) throws Exception {
BaseDaoImpl dao = new BaseDaoImpl();
int result = 0;
result = dao.update(“update stock_order set del_flag=‘1’ where id=?”, paraArray);
return result;
}
// 通过id修改入库单
@Override
public int updateStockInputById(Object[] paraArray) throws Exception {
BaseDaoImpl dao = new BaseDaoImpl();
int result = 0;
result = dao.update(“update stock_order set amount=? where id=?”, paraArray);
return result;
}
// 插入入库单
@Override
public int insertStockInput(Object[] paraArray) throws Exception {
BaseDaoImpl dao = new BaseDaoImpl();
int result = 0;
result = dao.insert(
“insert into stock_order(id,bill_no,handler_id,warehouse_id,category_id,amount,goods_id,sign) values(?,?,?,?,?,?,?,‘0’)”,
paraArray);
return result;
}
// 条件查询出库单
@Override
public Vector selectStockOutputByCondition(Object[] paraArray) throws Exception {
Vector rows = new Vector();
BaseDaoImpl dao = new BaseDaoImpl();
StringBuilder sqlBuilder = new StringBuilder(
"select s.id,s.bill_no,g.name,s.amount,c.name,w.name,u.name,c.id,w.id "
-
" from stock_order s,goods g,user u,category c,warehouse w "
-
" where s.handler_id=u.id and s.goods_id=g.id and s.category_id=c.id and s.warehouse_id=w.id and s.sign=‘1’ and s.del_flag=‘0’ and g.del_flag=‘0’ and c.del_flag=0 and w.del_flag=‘0’ ");
String name = paraArray[0].toString().trim();
if (!name.isEmpty()) {
sqlBuilder.append(" and g.name like ‘%" + paraArray[0] + "%’ ");
}
if (!“全部”.equals(paraArray[1])) {
sqlBuilder.append(" and s.category_id=‘" + paraArray[1] + "’ ");
}
if (!“全部”.equals(paraArray[2])) {
sqlBuilder.append(" and s.warehouse_id=‘" + paraArray[2] + "’ ");
}
if (!“全部”.equals(paraArray[3])) {
sqlBuilder.append(" and s.handler_id=‘" + paraArray[3] + "’ ");
}
String sql = sqlBuilder.toString();
List<Object[]> list = dao.select(sql, 9, null);
if (!list.isEmpty()) {
for (Object[] object : list) {
Vector temp = new Vector();
for (int i = 0; i < object.length; i++) {
temp.add(object[i]);
}
rows.add(temp);
}
}
return rows;
}
// 通过id逻辑删除出库单
@Override
public int deleteStockOutputById(Object[] paraArray) throws Exception {
BaseDaoImpl dao = new BaseDaoImpl();
int result = 0;
result = dao.update(“update stock_order set del_flag=‘1’ where id=?”, paraArray);
return result;
}
// 通过id修改出库单
@Override
public int updateStockOutputById(Object[] paraArray) throws Exception {
BaseDaoImpl dao = new BaseDaoImpl();
int result = 0;
result = dao.update(“update stock_order set amount=? where id=?”, paraArray);
return result;
}
// 插入出库单
@Override
public int insertStockOutput(Object[] paraArray) throws Exception {
BaseDaoImpl dao = new BaseDaoImpl();
int result = 0;
result = dao.insert(
“insert into stock_order(id,bill_no,handler_id,warehouse_id,category_id,amount,goods_id,sign) values(?,?,?,?,?,?,?,‘1’)”,
paraArray);
return result;
}
}
UserServiceImpl
package org.rancode.module.services.Impl;
import java.util.List;
import org.omg.PortableServer.SERVANT_RETENTION_POLICY_ID;
import org.rancode.module.dao.BaseDao;
import org.rancode.module.dao.Impl.BaseDaoImpl;
import org.rancode.module.entity.User;
import org.rancode.module.services.UserService;
public class UserServiceImpl implements UserService {
// 查询一条记录
@Override
public User selectOne(Object[] paraArray) throws Exception {
User user = new User();
BaseDaoImpl dao = new BaseDaoImpl();
String sql = “select id,name,password,identity from user where name=? and password=?”;
List list = dao.select(sql, 4, paraArray);
if (!list.isEmpty()) {
user.setId((String) ((Object[]) list.get(0))[0]);
user.setName((String) ((Object[]) list.get(0))[1]);
user.setPassword((String) ((Object[]) list.get(0))[2]);
user.setIdentity((String) ((Object[]) list.get(0))[3]);
return user;
}
return null;
}
// 通过Id修改用户
@Override
public int updateUserById(Object[] paraArray) throws Exception {
int result = 0;
BaseDaoImpl dao = new BaseDaoImpl();
String sql = “update user set name = ?,password=? where id=?”;
result = dao.update(sql, paraArray);
return result;
}
}
WarehouseServiceImpl
package org.rancode.module.services.Impl;
import java.util.List;
import java.util.Vector;
import org.rancode.module.dao.Impl.BaseDaoImpl;
import org.rancode.module.services.WarehouseService;
public class WarehouseServiceImpl implements WarehouseService {
// 遍历所有仓库
@Override
public List selectAll() throws Exception {
BaseDaoImpl dao = new BaseDaoImpl();
List list = dao.select("select id,name from warehouse where 1=1 and del_flag=‘0’ ", 2, null);
if (!list.isEmpty()) {
return list;
}
return null;
}
// 遍历所有仓库返回Vector
@Override
public Vector selectAllVexctor() throws Exception {
Vector rows = new Vector();
BaseDaoImpl dao = new BaseDaoImpl();
List<Object[]> list = dao.select(“select id,sort,name from warehouse where 1=1 and del_flag=‘0’ order by sort”,
3, null);
if (!list.isEmpty()) {
int number = 1;
for (Object[] object : list) {
Vector temp = new Vector();
for (int i = 0; i < object.length; i++) {
if (i == 1) {
temp.add(number);
} else {
temp.add(object[i]);
}
}
rows.add(temp);
number++;
}
}
return rows;
}
// 通过Id修改仓库
@Override
public int updateById(Object[] paramArray) throws Exception {
int result = 0;
BaseDaoImpl dao = new BaseDaoImpl();
result = dao.update(“update warehouse set name=? where id=?”, paramArray);
return result;
}
// 通过Id逻辑删除仓库
@Override
public int deleteById(Object[] paramArray) throws Exception {
BaseDaoImpl dao = new BaseDaoImpl();
int result = 0;
result = dao.update(“update warehouse set del_flag=‘1’ where id=?”, paramArray);
return result;
}
// 插入仓库
@Override
public int insertById(Object[] paramArray) throws Exception {
BaseDaoImpl dao = new BaseDaoImpl();
int result = 0;
result = dao.insert("insert into warehouse(id,name) values(?,?) ", paramArray);
return result;
}
}
四、其他
====
1.更多系统
更多JavaSwing系统请关注专栏。
2.源码下载
3.运行项目
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。
深知大多数Java工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年Java开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Java开发知识点,真正体系化!
由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新
如果你觉得这些内容对你有帮助,可以添加V获取:vip1024b (备注Java)
总结
面试建议是,一定要自信,敢于表达,面试的时候我们对知识的掌握有时候很难面面俱到,把自己的思路说出来,而不是直接告诉面试官自己不懂,这也是可以加分的。
以上就是蚂蚁技术四面和HR面试题目,以下最新总结的最全,范围包含最全MySQL、Spring、Redis、JVM等最全面试题和答案,仅用于参考
一个人可以走的很快,但一群人才能走的更远。不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎扫码加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
HjXBQ-1712718431830)]
[外链图片转存中…(img-JENLOths-1712718431830)]
[外链图片转存中…(img-2Pzeh28A-1712718431831)]
[外链图片转存中…(img-EriaUx9D-1712718431831)]
[外链图片转存中…(img-bTAzKhil-1712718431831)]
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Java开发知识点,真正体系化!
由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新
如果你觉得这些内容对你有帮助,可以添加V获取:vip1024b (备注Java)
[外链图片转存中…(img-U8gK3D02-1712718431832)]
总结
面试建议是,一定要自信,敢于表达,面试的时候我们对知识的掌握有时候很难面面俱到,把自己的思路说出来,而不是直接告诉面试官自己不懂,这也是可以加分的。
以上就是蚂蚁技术四面和HR面试题目,以下最新总结的最全,范围包含最全MySQL、Spring、Redis、JVM等最全面试题和答案,仅用于参考
[外链图片转存中…(img-9WTzJv2V-1712718431832)]
一个人可以走的很快,但一群人才能走的更远。不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎扫码加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
[外链图片转存中…(img-ngb7Y84V-1712718431833)]