Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Evan Liu
hms
提交
bcfc422c
H
hms
项目概览
Evan Liu
/
hms
通知
10
Star
5
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hms
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
bcfc422c
编写于
8月 17, 2021
作者:
刘
刘兴
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitee.com/liuxing997/hotel-management-system
上级
ec5173a0
e0c0ad33
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
4 deletion
+6
-4
HMS/src/main/java/com/hqyj/seven/dao/EnterDao.java
HMS/src/main/java/com/hqyj/seven/dao/EnterDao.java
+1
-1
HMS/src/main/java/com/hqyj/seven/service/impl/HouseServiceImpl.java
...in/java/com/hqyj/seven/service/impl/HouseServiceImpl.java
+4
-2
HMS/src/main/resources/mapper/enterDaoMapper.xml
HMS/src/main/resources/mapper/enterDaoMapper.xml
+1
-1
未找到文件。
HMS/src/main/java/com/hqyj/seven/dao/EnterDao.java
浏览文件 @
bcfc422c
...
...
@@ -16,7 +16,7 @@ public interface EnterDao {
//删除记录
int
deleteEnter
(
int
enter_id
);
//更新房间号和客户号
int
updateByHouseIdAndCustomerId
(
@Param
(
"time"
)
Date
time
,
@Param
(
"houseId"
)
int
houseId
,
@Param
(
"customerId"
)
int
customerId
);
int
updateByHouseIdAndCustomerId
(
@Param
(
"time"
)
Date
time
,
@Param
(
"houseId"
)
int
houseId
,
@Param
(
"customerId"
)
int
customerId
,
@Param
(
"state"
)
String
state
);
Enter
selectByHouseIdAndCustomerId
(
@Param
(
"houseId"
)
int
houseId
,
@Param
(
"customerId"
)
int
customerId
);
//根据住房id或者房间id查询住宿情况
List
<
Enter
>
queryOneById
(
int
id
);
...
...
HMS/src/main/java/com/hqyj/seven/service/impl/HouseServiceImpl.java
浏览文件 @
bcfc422c
...
...
@@ -289,7 +289,7 @@ public class HouseServiceImpl implements HouseService {
int
houseId
=
house
.
getHouseId
();
if
(
house
.
getState
().
equals
(
"入住"
))
{
Date
date1
=
new
Date
();
enterDao
.
updateByHouseIdAndCustomerId
(
date1
,
houseId
,
customerId
);
enterDao
.
updateByHouseIdAndCustomerId
(
date1
,
houseId
,
customerId
,
"已结账"
);
Enter
enter
=
enterDao
.
selectByHouseIdAndCustomerId
(
houseId
,
customerId
);
Date
date2
=
enter
.
getEnd_time_estimate
();
DecimalFormat
df
=
new
DecimalFormat
(
"#.##"
);
...
...
@@ -299,8 +299,10 @@ public class HouseServiceImpl implements HouseService {
Fee
fee
=
feedao
.
queryByHouseIdAndCoustomerId
(
houseId
,
customerId
);
int
feeId
=
fee
.
getFeeId
();
String
feeddirect
=
fee
.
getDirect
();
if
(
feeddirect
.
equals
(
"未缴费"
))
if
(
feeddirect
.
equals
(
"未缴费"
))
{
feedao
.
updateByFeeId
(
feeId
);
enterDao
.
updateByHouseIdAndCustomerId
(
date1
,
houseId
,
customerId
,
"未结账"
);
}
houseDao
.
updateByHouseNameToCheckOut
(
name
);
result
.
put
(
"code"
,
200
);
result
.
put
(
"message"
,
"退房成功"
);
...
...
HMS/src/main/resources/mapper/enterDaoMapper.xml
浏览文件 @
bcfc422c
...
...
@@ -21,7 +21,7 @@
delete from enter where enter_id = #{enter_id}
</delete>
<update
id=
"updateByHouseIdAndCustomerId"
parameterType=
"com.hqyj.seven.pojo.Enter"
>
update enter set end_time_actual=#{time},state=
'待结账'
where house_id=#{houseId} and customer_id=#{customerId}
update enter set end_time_actual=#{time},state=
#{state}
where house_id=#{houseId} and customer_id=#{customerId}
</update>
<select
id=
"selectByHouseIdAndCustomerId"
resultType=
"com.hqyj.seven.pojo.Enter"
>
select * from enter where house_id=#{houseId} and customer_id=#{customerId} order by enter_id DESC limit 1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录