Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
warehouse
概览
Overview
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
苗卫卫
warehouse
Commits
b6c56fd0
提交
b6c56fd0
authored
11月 15, 2023
作者:
chaining
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 补充墙盒申请字段信息
父级
e23cffe6
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
67 行增加
和
31 行删除
+67
-31
src/main/java/com/boco/nbd/wios/manage/controller/WallboxApplyController.java
+50
-2
src/main/java/com/boco/nbd/wios/manage/entity/vo/WallboxApplyCheckVO.java
+3
-0
src/main/java/com/boco/nbd/wios/manage/entity/vo/WallboxApplyReqVO.java
+5
-2
src/main/java/com/boco/nbd/wios/manage/service/impl/WallboxApplyService.java
+8
-27
src/main/resources/mybatis/mapper/def/common/WallboxApplyMapper.xml
+1
-0
没有找到文件。
src/main/java/com/boco/nbd/wios/manage/controller/WallboxApplyController.java
查看文件 @
b6c56fd0
...
...
@@ -100,7 +100,7 @@ public class WallboxApplyController {
* 查询墙盒申请列表
*/
@GetMapping
(
"/list"
)
@ApiOperation
(
value
=
"分页查询墙盒申请列表"
)
@ApiOperation
(
value
=
"分页查询墙盒申请列表
-总仓
"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"page"
,
value
=
"一页显示数量"
,
dataType
=
"int"
,
paramType
=
"query"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"pagecount"
,
value
=
"页码"
,
dataType
=
"int"
,
paramType
=
"query"
,
required
=
true
)})
...
...
@@ -125,6 +125,44 @@ public class WallboxApplyController {
return
new
BaseResponse
<>(
list
);
}
/**
* 墙盒申请安装团队分页查询
*/
@GetMapping
(
"/supplierList"
)
@ApiOperation
(
value
=
"分页查询墙盒申请列表-安装团队"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"page"
,
value
=
"一页显示数量"
,
dataType
=
"int"
,
paramType
=
"query"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"pagecount"
,
value
=
"页码"
,
dataType
=
"int"
,
paramType
=
"query"
,
required
=
true
)})
public
BaseResponse
<
List
<
WallboxApplyInstallListVO
>>
supplierList
(
WallboxApplyReqVO
req
)
{
SessionInfo
loginUser
=
tokenService
.
getUser
();
String
userId
=
loginUser
.
getUserId
();
SupplierStaff
infoByAccount
=
supplierStaffService
.
getByAccountId
(
Integer
.
valueOf
(
userId
));
Supplier
supplier
=
supplierService
.
getById
(
infoByAccount
.
getSupplierId
());
if
(
supplier
==
null
)
{
throw
new
ServiceException
(
"供应商不存在"
);
}
req
.
setSupplierId
(
supplier
.
getId
());
List
<
WallboxApplyInstallListVO
>
list
=
wallboxApplyService
.
selectWallboxApplyListFromOrder
(
WallboxApplyConvert
.
INSTANCE
.
convert
(
req
));
LocalDateTime
currentTime
=
LocalDateTime
.
now
();
for
(
WallboxApplyInstallListVO
apply
:
list
)
{
Date
createdDate
=
apply
.
getCreatedTime
();
LocalDateTime
createdTime
=
LocalDateTime
.
ofInstant
(
createdDate
.
toInstant
(),
ZoneId
.
systemDefault
());
LocalDateTime
endTime
=
createdTime
.
plusHours
(
24
);
long
remainingHours
=
currentTime
.
until
(
endTime
,
ChronoUnit
.
HOURS
);
remainingHours
=
Math
.
max
(
remainingHours
,
0
);
// 将剩余小时数限制在0-24之间
if
(
remainingHours
==
0
)
{
apply
.
setIfTimeout
(
1L
);
}
else
{
apply
.
setIfTimeout
(
0L
);
}
apply
.
setTimeRemaining
(
Long
.
toString
(
remainingHours
));
}
return
new
BaseResponse
<>(
list
);
}
@GetMapping
(
"/get-import-template"
)
@ApiOperation
(
"获得导入模板"
)
...
...
@@ -216,12 +254,22 @@ public class WallboxApplyController {
return
new
BaseResponse
<>(
supplier
);
}
@ApiOperation
(
value
=
"查询当前账号所属团队"
)
@GetMapping
(
"/getTeamOrder"
)
public
BaseResponse
<
Object
>
getTeamOrder
(){
SessionInfo
loginUser
=
tokenService
.
getUser
();
String
userId
=
loginUser
.
getUserId
();
SupplierStaff
infoByAccount
=
supplierStaffService
.
getByAccountId
(
Integer
.
valueOf
(
userId
));
Supplier
supplier
=
supplierService
.
getById
(
infoByAccount
.
getSupplierId
());
return
new
BaseResponse
<>();
}
/**
* 修改墙盒申请
*/
@PutMapping
public
BaseResponse
<
Object
>
edit
(
@RequestBody
WallboxApply
tWallboxApply
)
{
//TODO 判断是否超时
return
new
BaseResponse
<>(
wallboxApplyService
.
updateWallboxApply
(
tWallboxApply
));
}
...
...
src/main/java/com/boco/nbd/wios/manage/entity/vo/WallboxApplyCheckVO.java
查看文件 @
b6c56fd0
...
...
@@ -27,6 +27,9 @@ public class WallboxApplyCheckVO {
@NotNull
(
message
=
"审核意见不能为空"
)
private
Long
checkStatus
;
@ApiModelProperty
(
value
=
"墙盒类型"
,
notes
=
"1:品牌墙盒,2:三方墙盒"
,
example
=
"1"
,
required
=
true
)
private
String
materialType
;
@ApiModelProperty
(
value
=
"审核备注"
,
notes
=
""
,
example
=
"同意"
,
required
=
true
)
private
String
checkRemarks
;
}
src/main/java/com/boco/nbd/wios/manage/entity/vo/WallboxApplyReqVO.java
查看文件 @
b6c56fd0
...
...
@@ -14,11 +14,14 @@ import lombok.Data;
public
class
WallboxApplyReqVO
{
/** 申请团队名称 */
@ApiModelProperty
(
value
=
"申请团队名称"
,
required
=
true
)
@ApiModelProperty
(
value
=
"申请团队名称"
)
private
String
supplierTeam
;
@ApiModelProperty
(
value
=
"申请团队id"
)
private
String
supplierId
;
/** 区域id */
@ApiModelProperty
(
value
=
"区域id"
,
required
=
true
)
@ApiModelProperty
(
value
=
"区域id"
)
private
String
regionId
;
/** 申请状态:0:已申请,1:已通过,2:已驳回,3:已关闭 */
...
...
src/main/java/com/boco/nbd/wios/manage/service/impl/WallboxApplyService.java
查看文件 @
b6c56fd0
...
...
@@ -19,6 +19,8 @@ import com.ihidea.core.support.session.SessionInfo;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.Date
;
...
...
@@ -48,7 +50,7 @@ public class WallboxApplyService {
@Autowired
private
SupplierStaffDao
supplierStaffDao
;
private
final
Integer
CHECK_STATUS_REJECT
=
2
;
private
final
Integer
CHECK_STATUS_REJECT
=
3
;
/**
* 查询墙盒申请
...
...
@@ -100,19 +102,10 @@ public class WallboxApplyService {
public
List
<
WallboxApplyInstallListVO
>
selectWallboxApplyListFromOrder
(
WallboxApply
WallboxApply
)
{
List
<
WallboxApplyInstallListVO
>
list
=
wallboxApplyMapper
.
selectWallboxApplyListFromOrder
(
WallboxApply
);
list
.
stream
().
map
(
l
->{
return
l
;
});
return
list
;
}
public
WallboxApply
calculateTimeRemaining
(
WallboxApply
wallboxApply
)
{
return
wallboxApply
;
}
/**
* 新增墙盒申请
*
...
...
@@ -156,19 +149,6 @@ public class WallboxApplyService {
}
/**
* 新增墙盒申请
*
* @param orderId 订单号
* @return 结果
*/
public
int
insertWallboxApply
(
int
orderId
)
{
//判断订单状态
// orderInstallDao.selectByOrderId()
return
0
;
}
/**
* 修改墙盒申请
*
* @return 结果
...
...
@@ -176,11 +156,11 @@ public class WallboxApplyService {
public
int
updateWallboxApply
(
WallboxApply
wallboxApply
)
{
WallboxApply
record
=
wallboxApplyMapper
.
selectWallboxApplyByOrderId
(
wallboxApply
.
getOutOrderId
());
//
if (!CHECK_STATUS_REJECT.equals(record.getCheckStatus())) {
//
throw new ServiceException("非驳回状态订单无法修改信息!");
//
}
if
(!
CHECK_STATUS_REJECT
.
equals
(
record
.
getCheckStatus
()))
{
throw
new
ServiceException
(
"非驳回状态订单无法修改信息!"
);
}
validateApplyExists
(
wallboxApply
.
getOrderId
());
wallboxApply
.
set
Check
Time
(
new
Date
());
wallboxApply
.
set
Modify
Time
(
new
Date
());
wallboxApply
.
setCheckStatus
(
1L
);
return
wallboxApplyMapper
.
updateWallboxApply
(
wallboxApply
);
}
...
...
@@ -214,6 +194,7 @@ public class WallboxApplyService {
/**
* 批量审核
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
,
rollbackFor
=
Exception
.
class
)
public
WallboxApplyBatchCheckDTO
checkBatch
(
WallboxApplyBatchCheckDTO
req
)
{
List
<
WallboxApplyCheckDTO
>
checkList
=
req
.
getCheckList
();
List
<
WallboxApply
>
toUpdateList
=
new
ArrayList
<>();
...
...
src/main/resources/mybatis/mapper/def/common/WallboxApplyMapper.xml
查看文件 @
b6c56fd0
...
...
@@ -131,6 +131,7 @@
'%')
</if>
<if
test=
"checkStatus != null "
>
and t_wallbox_apply.check_status = #{checkStatus}
</if>
<if
test=
"supplierId != null regionId != ''"
>
and t_wallbox_apply.supplier_id = #{supplierId}
</if>
<if
test=
"trackingStatus != null "
>
and t_wallbox_apply.tracking_status = #{trackingStatus}
</if>
<if
test=
"regionId != null and regionId != ''"
>
and t_wallbox_apply.region_id = #{regionId}
</if>
<if
test=
"wallboxItemId != null and wallboxItemId != ''"
>
and t_wallbox_apply.wallbox_item_id like
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论