Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseer
gxpt_ht
Commits
c437a914
Commit
c437a914
authored
Jan 23, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改批量分配保洁,管理入参
parent
b2113574
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
70 additions
and
15 deletions
+70
-15
SStoreController.java
...in/java/share/web/controller/system/SStoreController.java
+5
-4
SRoom.java
share-system/src/main/java/share/system/domain/SRoom.java
+6
-0
SStoreConsumerVo.java
...rc/main/java/share/system/domain/vo/SStoreConsumerVo.java
+21
-0
SStoreConsumerMapper.java
...c/main/java/share/system/mapper/SStoreConsumerMapper.java
+1
-1
ISStoreService.java
...em/src/main/java/share/system/service/ISStoreService.java
+3
-2
SStoreServiceImpl.java
...ain/java/share/system/service/impl/SStoreServiceImpl.java
+7
-6
SRoomMapper.xml
...e-system/src/main/resources/mapper/system/SRoomMapper.xml
+26
-1
SStoreConsumerMapper.xml
...src/main/resources/mapper/system/SStoreConsumerMapper.xml
+1
-1
No files found.
share-admin/src/main/java/share/web/controller/system/SStoreController.java
View file @
c437a914
...
...
@@ -26,6 +26,7 @@ import share.system.domain.SStore;
import
share.system.domain.SStoreConsumer
;
import
share.system.domain.SysUserRole
;
import
share.system.domain.vo.SConsumerVo
;
import
share.system.domain.vo.SStoreConsumerVo
;
import
share.system.service.ISStoreService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
...
...
@@ -175,9 +176,9 @@ public class SStoreController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:store:edit')"
)
@Log
(
title
=
"门店"
,
businessType
=
BusinessType
.
GRANT
)
@PutMapping
(
"/consumer/cancelAll"
)
public
AjaxResult
cancelAuthUserAll
(
Long
storeId
,
Long
[]
consumerIds
)
public
AjaxResult
cancelAuthUserAll
(
SStoreConsumerVo
storeConsumer
)
{
return
toAjax
(
sStoreService
.
deleteStoreConsumers
(
store
Id
,
consumerIds
));
return
toAjax
(
sStoreService
.
deleteStoreConsumers
(
store
Consumer
));
}
/**
...
...
@@ -186,9 +187,9 @@ public class SStoreController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:store:edit')"
)
@Log
(
title
=
"门店"
,
businessType
=
BusinessType
.
GRANT
)
@PutMapping
(
"/consumer/selectAll"
)
public
AjaxResult
selectAuthUserAll
(
Long
storeId
,
Long
[]
consumerIds
,
Integer
position
)
public
AjaxResult
selectAuthUserAll
(
SStoreConsumerVo
storeConsumer
)
{
return
toAjax
(
sStoreService
.
insertStoreConsumers
(
store
Id
,
consumerIds
,
position
));
return
toAjax
(
sStoreService
.
insertStoreConsumers
(
store
Consumer
));
}
...
...
share-system/src/main/java/share/system/domain/SRoom.java
View file @
c437a914
...
...
@@ -81,6 +81,12 @@ public class SRoom extends BaseEntity
private
String
params2
;
/**
* 是否脏房
*/
@Excel
(
name
=
"是否脏房(0:否,1:是)"
)
private
Integer
isDirtyRoom
;
/**
* 套餐ID
*/
@TableField
(
exist
=
false
)
...
...
share-system/src/main/java/share/system/domain/vo/SStoreConsumerVo.java
0 → 100644
View file @
c437a914
package
share
.
system
.
domain
.
vo
;
import
lombok.Data
;
import
share.system.domain.SStoreConsumer
;
@Data
public
class
SStoreConsumerVo
{
/**
* 门店ID
*/
private
Long
storeId
;
/**
* 保洁员ID
*/
private
Long
consumerId
;
private
Integer
position
;
private
Long
[]
consumerIds
;
}
share-system/src/main/java/share/system/mapper/SStoreConsumerMapper.java
View file @
c437a914
...
...
@@ -31,7 +31,7 @@ public interface SStoreConsumerMapper extends BaseMapper<SStoreConsumer> {
public
int
deleteInfo
(
SStoreConsumer
storeConsumer
);
public
int
deleteInfos
(
@Param
(
"storeId"
)
Long
storeId
,
@Param
(
"consumerIds"
)
Long
[]
consumerIds
);
public
int
deleteInfos
(
@Param
(
"storeId"
)
Long
storeId
,
@Param
(
"consumerIds"
)
Long
[]
consumerIds
,
@Param
(
"position"
)
Integer
position
);
List
<
Long
>
selectByConsumerId
(
@Param
(
"consumerId"
)
Long
consumerId
,
@Param
(
"position"
)
Integer
position
);
...
...
share-system/src/main/java/share/system/service/ISStoreService.java
View file @
c437a914
...
...
@@ -5,6 +5,7 @@ import java.util.Map;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.SStore
;
import
share.system.domain.vo.SStoreConsumerVo
;
import
share.system.domain.vo.SStoreVo
;
import
share.system.request.SStoreRequest
;
import
share.system.domain.SStoreConsumer
;
...
...
@@ -90,9 +91,9 @@ public interface ISStoreService extends IService<SStore>
int
deleteStoreConsumer
(
SStoreConsumer
storeConsumer
);
int
deleteStoreConsumers
(
Long
storeId
,
Long
[]
consumerIds
);
int
deleteStoreConsumers
(
SStoreConsumerVo
storeConsumer
);
int
insertStoreConsumers
(
Long
storeId
,
Long
[]
consumerIds
,
Integer
position
);
int
insertStoreConsumers
(
SStoreConsumerVo
storeConsumer
);
List
<
SStore
>
listVoByCleaner
();
...
...
share-system/src/main/java/share/system/service/impl/SStoreServiceImpl.java
View file @
c437a914
...
...
@@ -23,6 +23,7 @@ import org.springframework.stereotype.Service;
import
share.system.domain.*
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.SRoomVo
;
import
share.system.domain.vo.SStoreConsumerVo
;
import
share.system.domain.vo.SStoreVo
;
import
share.system.mapper.*
;
import
share.system.request.SStoreRequest
;
...
...
@@ -346,19 +347,19 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
}
@Override
public
int
deleteStoreConsumers
(
Long
storeId
,
Long
[]
consumerIds
)
{
return
storeConsumerMapper
.
deleteInfos
(
store
Id
,
consumerIds
);
public
int
deleteStoreConsumers
(
SStoreConsumerVo
storeConsumer
)
{
return
storeConsumerMapper
.
deleteInfos
(
store
Consumer
.
getStoreId
(),
storeConsumer
.
getConsumerIds
(),
storeConsumer
.
getPosition
()
);
}
@Override
public
int
insertStoreConsumers
(
Long
storeId
,
Long
[]
consumerIds
,
Integer
position
)
{
public
int
insertStoreConsumers
(
SStoreConsumerVo
storeConsumer
)
{
// 新增保洁与门店关系
List
<
SStoreConsumer
>
list
=
new
ArrayList
<
SStoreConsumer
>();
for
(
Long
consumerId
:
consumerIds
)
{
for
(
Long
consumerId
:
storeConsumer
.
getConsumerIds
()
)
{
SStoreConsumer
sc
=
new
SStoreConsumer
();
sc
.
setStoreId
(
store
Id
);
sc
.
setStoreId
(
store
Consumer
.
getStoreId
()
);
sc
.
setConsumerId
(
consumerId
);
sc
.
setPosition
(
position
);
sc
.
setPosition
(
storeConsumer
.
getPosition
()
);
list
.
add
(
sc
);
}
return
storeConsumerMapper
.
batchSStoreConsumer
(
list
);
...
...
share-system/src/main/resources/mapper/system/SRoomMapper.xml
View file @
c437a914
...
...
@@ -14,6 +14,7 @@
<result
property=
"info"
column=
"info"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"price"
column=
"price"
/>
<result
property=
"isDirtyRoom"
column=
"is_dirty_room"
/>
<result
property=
"doorLockCode"
column=
"door_lock_code"
/>
<result
property=
"electricControlCode"
column=
"electric_control_code"
/>
<result
property=
"password"
column=
"password"
/>
...
...
@@ -27,7 +28,27 @@
</resultMap>
<sql
id=
"selectSRoomVo"
>
select id, store_id, name, room_type, images, facilities, info, status, price, door_lock_code, electric_control_code, password, params1, params2, create_by, create_time, update_by, update_time, remark from s_room
select id,
store_id,
name,
room_type,
images,
facilities,
info,
status,
price,
is_dirty_room,
door_lock_code,
electric_control_code,
password,
params1,
params2,
create_by,
create_time,
update_by,
update_time,
remark
from s_room
</sql>
<select
id=
"selectSRoomList"
parameterType=
"SRoom"
resultMap=
"SRoomResult"
>
...
...
@@ -41,6 +62,7 @@
<if
test=
"info != null and info != ''"
>
and info = #{info}
</if>
<if
test=
"status != null and status != '' or status ==0"
>
and status = #{status}
</if>
<if
test=
"price != null "
>
and price = #{price}
</if>
<if
test=
"isDirtyRoom != null "
>
and is_dirty_room = #{isDirtyRoom}
</if>
<if
test=
"doorLockCode != null and doorLockCode != ''"
>
and door_lock_code = #{doorLockCode}
</if>
<if
test=
"electricControlCode != null and electricControlCode != ''"
>
and electric_control_code = #{electricControlCode}
</if>
<if
test=
"password != null and password != ''"
>
and password = #{password}
</if>
...
...
@@ -65,6 +87,7 @@
<if
test=
"info != null"
>
info,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"price != null"
>
price,
</if>
<if
test=
"isDirtyRoom != null"
>
is_dirty_room,
</if>
<if
test=
"doorLockCode != null"
>
door_lock_code,
</if>
<if
test=
"electricControlCode != null"
>
electric_control_code,
</if>
<if
test=
"password != null"
>
password,
</if>
...
...
@@ -85,6 +108,7 @@
<if
test=
"info != null"
>
#{info},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"price != null"
>
#{price},
</if>
<if
test=
"isDirtyRoom != null"
>
#{isDirtyRoom},
</if>
<if
test=
"doorLockCode != null"
>
#{doorLockCode},
</if>
<if
test=
"electricControlCode != null"
>
#{electricControlCode},
</if>
<if
test=
"password != null"
>
#{password},
</if>
...
...
@@ -109,6 +133,7 @@
<if
test=
"info != null"
>
info = #{info},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"price != null"
>
price = #{price},
</if>
<if
test=
"isDirtyRoom != null"
>
is_dirty_room = #{isDirtyRoom},
</if>
<if
test=
"doorLockCode != null"
>
door_lock_code = #{doorLockCode},
</if>
<if
test=
"electricControlCode != null"
>
electric_control_code = #{electricControlCode},
</if>
<if
test=
"password != null"
>
password = #{password},
</if>
...
...
share-system/src/main/resources/mapper/system/SStoreConsumerMapper.xml
View file @
c437a914
...
...
@@ -54,7 +54,7 @@
</delete>
<delete
id=
"deleteInfos"
>
delete from s_store_consumer where store_id=#{storeId} and position =
'1'
and consumer_id in
delete from s_store_consumer where store_id=#{storeId} and position =
#{position}
and consumer_id in
<foreach
collection=
"consumerIds"
item=
"consumerId"
open=
"("
separator=
","
close=
")"
>
#{consumerId}
</foreach>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment