Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
213d7d88
Commit
213d7d88
authored
Apr 01, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://115.159.76.241/haoban3.0/haoban-manage3.0.git
into developer
parents
61bc1a68
953af0a8
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
84 additions
and
14 deletions
+84
-14
AuditApiService.java
...va/com/gic/haoban/manage/api/service/AuditApiService.java
+2
-2
TabHaobanAuditMapper.java
...aoban/manage/service/dao/mapper/TabHaobanAuditMapper.java
+3
-0
AuditApiServiceImpl.java
.../manage/service/service/out/impl/AuditApiServiceImpl.java
+29
-4
AuditSettingApiServiceImpl.java
.../service/service/out/impl/AuditSettingApiServiceImpl.java
+4
-0
DepartmentMapper.xml
...e3-service/src/main/resources/mapper/DepartmentMapper.xml
+1
-1
StaffMapper.xml
...manage3-service/src/main/resources/mapper/StaffMapper.xml
+1
-1
TabHaobanAuditMapper.xml
...ervice/src/main/resources/mapper/TabHaobanAuditMapper.xml
+38
-0
AuditController.java
...com/gic/haoban/manage/web/controller/AuditController.java
+5
-5
StoreController.java
...com/gic/haoban/manage/web/controller/StoreController.java
+1
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/AuditApiService.java
View file @
213d7d88
...
@@ -14,9 +14,9 @@ public interface AuditApiService {
...
@@ -14,9 +14,9 @@ public interface AuditApiService {
Page
<
AuditDTO
>
page
(
Integer
auditType
,
String
search
,
String
wxEnterpriseId
,
String
enterpriseId
,
Integer
auditStatus
,
Integer
auditFlag
,
BasePageInfo
pageInfo
);
Page
<
AuditDTO
>
page
(
Integer
auditType
,
String
search
,
String
wxEnterpriseId
,
String
enterpriseId
,
Integer
auditStatus
,
Integer
auditFlag
,
BasePageInfo
pageInfo
);
void
audit
(
String
auditId
);
void
audit
(
String
auditId
,
String
aduitName
);
void
refuse
(
String
auditId
,
String
auditReason
);
void
refuse
(
String
auditId
,
String
auditReason
,
String
aduitName
);
int
save
(
Integer
auditType
,
String
wxEnterpriseId
,
String
enterpriseId
,
String
commitStaffId
,
String
commitStoreId
,
String
changeField
,
String
oldValue
,
String
newValue
);
int
save
(
Integer
auditType
,
String
wxEnterpriseId
,
String
enterpriseId
,
String
commitStaffId
,
String
commitStoreId
,
String
changeField
,
String
oldValue
,
String
newValue
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanAuditMapper.java
View file @
213d7d88
...
@@ -22,6 +22,9 @@ public interface TabHaobanAuditMapper {
...
@@ -22,6 +22,9 @@ public interface TabHaobanAuditMapper {
Page
<
TabHaobanAudit
>
page
(
@Param
(
"auditType"
)
Integer
auditType
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
,
@Param
(
"staffIds"
)
List
<
String
>
staffIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"auditStatus"
)
Integer
auditStatus
,
@Param
(
"auditFlag"
)
Integer
auditFlag
);
Page
<
TabHaobanAudit
>
page
(
@Param
(
"auditType"
)
Integer
auditType
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
,
@Param
(
"staffIds"
)
List
<
String
>
staffIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"auditStatus"
)
Integer
auditStatus
,
@Param
(
"auditFlag"
)
Integer
auditFlag
);
Page
<
TabHaobanAudit
>
pageForStoreIdsAndstaffIds
(
@Param
(
"auditType"
)
Integer
auditType
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
,
@Param
(
"staffIds"
)
List
<
String
>
staffIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"auditStatus"
)
Integer
auditStatus
,
@Param
(
"auditFlag"
)
Integer
auditFlag
);
List
<
TabHaobanAudit
>
listByStoreId
(
String
storeId
);
List
<
TabHaobanAudit
>
listByStoreId
(
String
storeId
);
TabHaobanAudit
findByStoreIdAndChangeField
(
@Param
(
"storeId"
)
String
storeId
,
@Param
(
"changeField"
)
String
changeField
);
TabHaobanAudit
findByStoreIdAndChangeField
(
@Param
(
"storeId"
)
String
storeId
,
@Param
(
"changeField"
)
String
changeField
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/AuditApiServiceImpl.java
View file @
213d7d88
...
@@ -5,6 +5,7 @@ import java.text.SimpleDateFormat;
...
@@ -5,6 +5,7 @@ import java.text.SimpleDateFormat;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -20,6 +21,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -20,6 +21,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreDetailDTO
;
import
com.gic.enterprise.api.dto.StorePhotoDTO
;
import
com.gic.enterprise.api.dto.StorePhotoDTO
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
...
@@ -69,12 +71,28 @@ public class AuditApiServiceImpl implements AuditApiService{
...
@@ -69,12 +71,28 @@ public class AuditApiServiceImpl implements AuditApiService{
}
}
}
}
PageHelper
.
startPage
(
pageInfo
.
getPageNum
(),
pageInfo
.
getPageSize
());
PageHelper
.
startPage
(
pageInfo
.
getPageNum
(),
pageInfo
.
getPageSize
());
com
.
github
.
pagehelper
.
Page
<
TabHaobanAudit
>
page
=
auditMapper
.
page
(
auditType
,
storeIds
,
staffIds
,
wxEnterpriseId
,
enterpriseId
,
auditStatus
,
auditFlag
);
com
.
github
.
pagehelper
.
Page
<
TabHaobanAudit
>
page
=
new
com
.
github
.
pagehelper
.
Page
<
TabHaobanAudit
>();
if
(
CollectionUtil
.
isNotEmpty
(
storeIds
)&&
CollectionUtil
.
isNotEmpty
(
staffIds
)){
page
=
auditMapper
.
pageForStoreIdsAndstaffIds
(
auditType
,
storeIds
,
staffIds
,
wxEnterpriseId
,
enterpriseId
,
auditStatus
,
auditFlag
);
}
else
{
page
=
auditMapper
.
page
(
auditType
,
storeIds
,
staffIds
,
wxEnterpriseId
,
enterpriseId
,
auditStatus
,
auditFlag
);
}
// List<TabHaobanAudit> list = page.getResult();
if
(
CollectionUtil
.
isNotEmpty
(
page
.
getResult
())){
List
<
String
>
commitStaffIds
=
page
.
getResult
().
stream
().
map
(
s
->
s
.
getCommitStaffId
()).
collect
(
Collectors
.
toList
());
List
<
TabHaobanStaff
>
staffList
=
staffMapper
.
listByIds
(
commitStaffIds
);
Map
<
String
,
TabHaobanStaff
>
map
=
com
.
gic
.
commons
.
util
.
CollectionUtil
.
toMap
(
staffList
,
"staffId"
);
for
(
TabHaobanAudit
tab:
page
.
getResult
()){
String
commitStaffId
=
tab
.
getCommitStaffId
();
map
.
get
(
commitStaffId
).
getStaffName
();
tab
.
setCommitStaffName
(
map
.
get
(
commitStaffId
)==
null
?
""
:
map
.
get
(
commitStaffId
).
getStaffName
());
}
}
return
PageUtil
.
changePageHelperToCurrentPage
(
page
,
AuditDTO
.
class
);
return
PageUtil
.
changePageHelperToCurrentPage
(
page
,
AuditDTO
.
class
);
}
}
@Transactional
@Transactional
@Override
@Override
public
void
audit
(
String
auditId
)
{
public
void
audit
(
String
auditId
,
String
auditName
)
{
TabHaobanAudit
tab
=
auditMapper
.
selectByPrimaryKey
(
auditId
);
TabHaobanAudit
tab
=
auditMapper
.
selectByPrimaryKey
(
auditId
);
if
(
tab
==
null
){
if
(
tab
==
null
){
return
;
return
;
...
@@ -82,6 +100,7 @@ public class AuditApiServiceImpl implements AuditApiService{
...
@@ -82,6 +100,7 @@ public class AuditApiServiceImpl implements AuditApiService{
tab
.
setAuditId
(
auditId
);
tab
.
setAuditId
(
auditId
);
tab
.
setAuditStatus
(
1
);
tab
.
setAuditStatus
(
1
);
tab
.
setUpdateTime
(
new
Date
());
tab
.
setUpdateTime
(
new
Date
());
tab
.
setAuditName
(
auditName
);
auditMapper
.
updateByPrimaryKeySelective
(
tab
);
auditMapper
.
updateByPrimaryKeySelective
(
tab
);
String
storeId
=
tab
.
getCommitStoreId
();
String
storeId
=
tab
.
getCommitStoreId
();
String
oldValue
=
tab
.
getOldValue
();
String
oldValue
=
tab
.
getOldValue
();
...
@@ -90,12 +109,13 @@ public class AuditApiServiceImpl implements AuditApiService{
...
@@ -90,12 +109,13 @@ public class AuditApiServiceImpl implements AuditApiService{
this
.
editStoreInfo
(
storeId
,
changeField
,
oldValue
,
newValue
);
this
.
editStoreInfo
(
storeId
,
changeField
,
oldValue
,
newValue
);
}
}
@Override
@Override
public
void
refuse
(
String
auditId
,
String
auditReason
)
{
public
void
refuse
(
String
auditId
,
String
auditReason
,
String
auditName
)
{
TabHaobanAudit
tab
=
new
TabHaobanAudit
();
TabHaobanAudit
tab
=
new
TabHaobanAudit
();
tab
.
setAuditId
(
auditId
);
tab
.
setAuditId
(
auditId
);
tab
.
setAuditStatus
(
2
);
tab
.
setAuditStatus
(
2
);
tab
.
setUpdateTime
(
new
Date
());
tab
.
setUpdateTime
(
new
Date
());
tab
.
setAuditReason
(
auditReason
);
tab
.
setAuditReason
(
auditReason
);
tab
.
setAuditName
(
auditName
);
auditMapper
.
updateByPrimaryKeySelective
(
tab
);
auditMapper
.
updateByPrimaryKeySelective
(
tab
);
}
}
@Override
@Override
...
@@ -135,7 +155,9 @@ public class AuditApiServiceImpl implements AuditApiService{
...
@@ -135,7 +155,9 @@ public class AuditApiServiceImpl implements AuditApiService{
//非门店图片修改
//非门店图片修改
logger
.
info
(
"===================进222"
);
logger
.
info
(
"===================进222"
);
getStoreDTO
(
store
,
changeField
,
oldValue
,
newValue
);
getStoreDTO
(
store
,
changeField
,
oldValue
,
newValue
);
storeService
.
saveOrUpdateStore
(
store
);
StoreDetailDTO
detailDTO
=
EntityUtil
.
changeEntityByJSON
(
StoreDetailDTO
.
class
,
store
);
storeService
.
saveStore
(
detailDTO
);
// storeService.saveOrUpdateStore(store);
}
else
{
}
else
{
//门店图片修改
//门店图片修改
logger
.
info
(
"===================进333"
);
logger
.
info
(
"===================进333"
);
...
@@ -184,6 +206,9 @@ public class AuditApiServiceImpl implements AuditApiService{
...
@@ -184,6 +206,9 @@ public class AuditApiServiceImpl implements AuditApiService{
}
else
if
(
StoreFieldEnum
.
STORE_NAME
.
getValue
().
equals
(
changeField
)){
}
else
if
(
StoreFieldEnum
.
STORE_NAME
.
getValue
().
equals
(
changeField
)){
//门店名字
//门店名字
store
.
setStoreName
(
newValue
);
store
.
setStoreName
(
newValue
);
TabHaobanDepartment
tab
=
departmentMapper
.
getByRelatedId
(
store
.
getStoreId
());
tab
.
setDepartmentName
(
newValue
);
departmentMapper
.
updateByPrimaryKey
(
tab
);
}
else
if
(
StoreFieldEnum
.
STORE_IMAG
.
getValue
().
equals
(
changeField
)){
}
else
if
(
StoreFieldEnum
.
STORE_IMAG
.
getValue
().
equals
(
changeField
)){
//门店图片
//门店图片
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/AuditSettingApiServiceImpl.java
View file @
213d7d88
...
@@ -32,6 +32,10 @@ public class AuditSettingApiServiceImpl implements AuditSettingApiService{
...
@@ -32,6 +32,10 @@ public class AuditSettingApiServiceImpl implements AuditSettingApiService{
tab
.
setStatusFlag
(
1
);
tab
.
setStatusFlag
(
1
);
tab
.
setWxEnterpriseId
(
wxEnterpriseId
);
tab
.
setWxEnterpriseId
(
wxEnterpriseId
);
auditSettingMapper
.
insert
(
tab
);
auditSettingMapper
.
insert
(
tab
);
}
else
{
tab
.
setAuditFlag
(
auditFlag
);
tab
.
setUpdateTime
(
new
Date
());
auditSettingMapper
.
updateByPrimaryKeySelective
(
tab
);
}
}
}
}
...
...
haoban-manage3-service/src/main/resources/mapper/DepartmentMapper.xml
View file @
213d7d88
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from tab_haoban_department
from tab_haoban_department
where department_name like
contact
('%',#{departmentName,jdbcType=VARCHAR},'%')
where department_name like
CONCAT
('%',#{departmentName,jdbcType=VARCHAR},'%')
and status_flag = 1
and status_flag = 1
and is_store =1
and is_store =1
</select>
</select>
...
...
haoban-manage3-service/src/main/resources/mapper/StaffMapper.xml
View file @
213d7d88
...
@@ -296,7 +296,7 @@
...
@@ -296,7 +296,7 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff
from tab_haoban_staff
where status_flag = 1
where status_flag = 1
and staff_name like
contact
('%',#{staffName,jdbcType=VARCHAR},'%')
and staff_name like
CONCAT
('%',#{staffName,jdbcType=VARCHAR},'%')
</select>
</select>
<select
id=
"selectByUserIdAndEnterpriseId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"selectByUserIdAndEnterpriseId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanAuditMapper.xml
View file @
213d7d88
...
@@ -297,8 +297,46 @@
...
@@ -297,8 +297,46 @@
</if>
</if>
<include
refid=
"storeSql"
/>
<include
refid=
"storeSql"
/>
<include
refid=
"staffSql"
/>
<include
refid=
"staffSql"
/>
order by commit_time desc
</select>
</select>
<select
id=
"pageForStoreIdsAndstaffIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_audit
where 1=1
<if
test =
"wxEnterpriseId != null"
>
and wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</if>
<if
test =
"enterpriseId != null and enterpriseId !=''"
>
and enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
</if>
<if
test =
"auditType != null"
>
and audit_type = #{auditType,jdbcType=INTEGER}
</if>
<if
test =
"auditFlag != null and auditFlag == 0"
>
and audit_status = 0
</if>
<if
test =
"auditFlag != null and auditFlag != 0"
>
and audit_status in (1,2)
</if>
<if
test =
"auditStatus != null"
>
and audit_status = #{auditStatus,jdbcType=INTEGER}
</if>
and ( commit_store_id in
<foreach
collection=
"storeIds"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
or commit_staff_id in
<foreach
collection=
"staffIds"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
)
order by commit_time desc
</select>
<select
id=
"listByStoreId"
resultMap=
"BaseResultMap"
>
<select
id=
"listByStoreId"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/AuditController.java
View file @
213d7d88
...
@@ -149,21 +149,21 @@ public class AuditController extends WebBaseController{
...
@@ -149,21 +149,21 @@ public class AuditController extends WebBaseController{
//审核拒绝
//审核拒绝
@HttpLimit
@HttpLimit
@RequestMapping
(
"refuse"
)
@RequestMapping
(
"refuse"
)
public
HaobanResponse
refuse
(
String
auditId
,
String
auditReason
)
{
public
HaobanResponse
refuse
(
String
auditId
,
String
auditReason
,
String
auditName
)
{
if
(
StringUtils
.
isAnyBlank
(
auditId
,
auditReason
)){
if
(
StringUtils
.
isAnyBlank
(
auditId
,
auditReason
,
auditName
)){
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
}
auditApiService
.
refuse
(
auditId
,
auditReason
);
auditApiService
.
refuse
(
auditId
,
auditReason
,
auditName
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
//审核同意
//审核同意
@HttpLimit
@HttpLimit
@RequestMapping
(
"audit"
)
@RequestMapping
(
"audit"
)
public
HaobanResponse
audit
(
String
auditId
)
{
public
HaobanResponse
audit
(
String
auditId
,
String
auditName
)
{
if
(
StringUtils
.
isAnyBlank
(
auditId
)){
if
(
StringUtils
.
isAnyBlank
(
auditId
)){
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
}
auditApiService
.
audit
(
auditId
);
auditApiService
.
audit
(
auditId
,
auditName
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/StoreController.java
View file @
213d7d88
...
@@ -281,7 +281,7 @@ public class StoreController extends WebBaseController{
...
@@ -281,7 +281,7 @@ public class StoreController extends WebBaseController{
List
<
String
>
imgList
=
imgDTOList
.
stream
().
map
(
s
->
s
.
getQcloudImageUrl
()).
collect
(
Collectors
.
toList
());
List
<
String
>
imgList
=
imgDTOList
.
stream
().
map
(
s
->
s
.
getQcloudImageUrl
()).
collect
(
Collectors
.
toList
());
vo
.
setImgList
(
imgList
);
vo
.
setImgList
(
imgList
);
}
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"HH:mm
:ss
"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"HH:mm"
);
if
(
vo
.
getOpenTime
()!=
null
){
if
(
vo
.
getOpenTime
()!=
null
){
vo
.
setOpenTimeStr
(
sdf
.
format
(
vo
.
getOpenTime
()));
vo
.
setOpenTimeStr
(
sdf
.
format
(
vo
.
getOpenTime
()));
}
}
...
...
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