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
07a8dfa7
提交
07a8dfa7
authored
11月 29, 2023
作者:
zhangqiliang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
墙盒品牌名称和墙盒导出优化
父级
3fca8360
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
37 行增加
和
5 行删除
+37
-5
src/main/java/com/boco/nbd/wios/export/Contants.java
+1
-1
src/main/java/com/boco/nbd/wios/export/impl/WallBoxExport.java
+26
-3
src/main/java/com/boco/nbd/wios/manage/entity/vo/WallboxApplyInstallListVO.java
+7
-0
src/main/resources/mybatis/mapper/def/common/WallboxApplyMapper.xml
+3
-1
没有找到文件。
src/main/java/com/boco/nbd/wios/export/Contants.java
查看文件 @
07a8dfa7
...
@@ -101,5 +101,5 @@ public class Contants {
...
@@ -101,5 +101,5 @@ public class Contants {
public
static
final
String
export_wallBox_title
=
"序号,申请团队,安装订单号,安装单最近状态,区域,是否特殊申请,审核状态,物流状态,剩余时间,超时类型,数量,申请时间"
;
public
static
final
String
export_wallBox_title
=
"序号,申请团队,安装订单号,安装单最近状态,区域,是否特殊申请,审核状态,物流状态,剩余时间,超时类型,数量,申请时间"
;
public
static
final
String
export_wallBox_field
=
public
static
final
String
export_wallBox_field
=
"
no
,supplierTeam,orderId,installStatus,regionName,ifEmergency,checkStatus,logisticsStatus,timeRemaining,ifTimeout,number,createdTime"
;
"
id
,supplierTeam,orderId,installStatus,regionName,ifEmergency,checkStatus,logisticsStatus,timeRemaining,ifTimeout,number,createdTime"
;
}
}
src/main/java/com/boco/nbd/wios/export/impl/WallBoxExport.java
查看文件 @
07a8dfa7
package
com
.
boco
.
nbd
.
wios
.
export
.
impl
;
package
com
.
boco
.
nbd
.
wios
.
export
.
impl
;
import
com.boco.nbd.wios.export.Export
;
import
com.boco.nbd.wios.export.Export
;
import
com.boco.nbd.wios.manage.convert.WallboxApplyConvert
;
import
com.boco.nbd.wios.manage.entity.bo.SupplierBo
;
import
com.boco.nbd.wios.manage.entity.bo.SupplierBo
;
import
com.boco.nbd.wios.manage.entity.bo.SupplierVo
;
import
com.boco.nbd.wios.manage.entity.bo.SupplierVo
;
import
com.boco.nbd.wios.manage.entity.bo.WallboxApply
;
import
com.boco.nbd.wios.manage.entity.bo.WallboxApply
;
import
com.boco.nbd.wios.manage.entity.vo.WallboxApplyInstallListVO
;
import
com.boco.nbd.wios.manage.entity.vo.WallboxApplyInstallListVO
;
import
com.boco.nbd.wios.manage.entity.vo.WallboxApplyReqVO
;
import
com.boco.nbd.wios.manage.mapper.def.WallboxApplyMapper
;
import
com.boco.nbd.wios.manage.mapper.def.WallboxApplyMapper
;
import
com.boco.nbd.wios.manage.service.impl.SupplierService
;
import
com.boco.nbd.wios.manage.service.impl.SupplierService
;
import
com.boco.nbd.wios.manage.service.impl.WallboxApplyService
;
import
com.fasterxml.jackson.databind.DeserializationFeature
;
import
com.fasterxml.jackson.databind.DeserializationFeature
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.time.ZoneId
;
import
java.time.temporal.ChronoUnit
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -25,14 +32,30 @@ public class WallBoxExport implements Export<WallboxApplyInstallListVO> {
...
@@ -25,14 +32,30 @@ public class WallBoxExport implements Export<WallboxApplyInstallListVO> {
@Autowired
@Autowired
private
WallboxApplyMapper
wallboxApplyMapper
;
private
WallboxApplyMapper
wallboxApplyMapper
;
@Autowired
private
WallboxApplyService
wallboxApplyService
;
@Override
@Override
public
List
<
WallboxApplyInstallListVO
>
getExportList
(
String
json
)
throws
Exception
{
public
List
<
WallboxApplyInstallListVO
>
getExportList
(
String
json
)
throws
Exception
{
ObjectMapper
mapper
=
new
ObjectMapper
();
ObjectMapper
mapper
=
new
ObjectMapper
();
mapper
.
configure
(
DeserializationFeature
.
FAIL_ON_UNKNOWN_PROPERTIES
,
false
);
mapper
.
configure
(
DeserializationFeature
.
FAIL_ON_UNKNOWN_PROPERTIES
,
false
);
WallboxApply
condition
=
mapper
.
readValue
(
json
,
WallboxApply
.
class
);
WallboxApplyReqVO
condition
=
mapper
.
readValue
(
json
,
WallboxApplyReqVO
.
class
);
List
<
WallboxApplyInstallListVO
>
list
=
List
<
WallboxApplyInstallListVO
>
list
=
wallboxApplyService
.
selectWallboxApplyListFromOrder
(
WallboxApplyConvert
.
INSTANCE
.
convert
(
condition
));
wallboxApplyMapper
.
selectWallboxApplyListFromOrder
(
condition
);
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
));
}
Long
no
=
1L
;
Long
no
=
1L
;
for
(
WallboxApplyInstallListVO
vo
:
list
)
{
for
(
WallboxApplyInstallListVO
vo
:
list
)
{
vo
.
setId
(
no
++);
vo
.
setId
(
no
++);
...
...
src/main/java/com/boco/nbd/wios/manage/entity/vo/WallboxApplyInstallListVO.java
查看文件 @
07a8dfa7
...
@@ -134,4 +134,11 @@ public class WallboxApplyInstallListVO {
...
@@ -134,4 +134,11 @@ public class WallboxApplyInstallListVO {
*/
*/
@ApiModelProperty
(
value
=
"所属区域"
)
@ApiModelProperty
(
value
=
"所属区域"
)
private
String
areaName
;
private
String
areaName
;
/**
* 墙盒品牌名称
*
* @mbg.generated
*/
@ApiModelProperty
(
value
=
"墙盒品牌名称"
)
private
String
wallboxModelName
;
}
}
src/main/resources/mybatis/mapper/def/common/WallboxApplyMapper.xml
查看文件 @
07a8dfa7
...
@@ -123,11 +123,13 @@
...
@@ -123,11 +123,13 @@
t_wallbox_apply.area_name,
t_wallbox_apply.area_name,
t_order.shipno as tracking_number,
t_order.shipno as tracking_number,
t_order.status as install_status,
t_order.status as install_status,
td.logistic_order deliveryLogisticOrder,td.logistic_company logisticCompany,td.sender sender,td.sender_phone senderPhone,td.receiver receiver
td.logistic_order deliveryLogisticOrder,td.logistic_company logisticCompany,td.sender sender,td.sender_phone senderPhone,td.receiver receiver,
tc.name wallboxModelName
FROM t_wallbox_apply
FROM t_wallbox_apply
LEFT JOIN t_order ON t_wallbox_apply.order_id = t_order.id
LEFT JOIN t_order ON t_wallbox_apply.order_id = t_order.id
left join t_region reg on reg.id=t_wallbox_apply.region_id
left join t_region reg on reg.id=t_wallbox_apply.region_id
left join t_delivery td on td.install_order = t_wallbox_apply.order_id
left join t_delivery td on td.install_order = t_wallbox_apply.order_id
left join t_oem_cascade tc on tc.id = t_wallbox_apply.wallbox_model
<where>
<where>
<if
test=
"supplierTeam != null and supplierTeam != ''"
>
and t_wallbox_apply.supplier_team like concat('%',
<if
test=
"supplierTeam != null and supplierTeam != ''"
>
and t_wallbox_apply.supplier_team like concat('%',
#{supplierTeam},
#{supplierTeam},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论