Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wios
概览
Overview
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
苗卫卫
wios
Commits
5c222115
提交
5c222115
authored
1 年前
作者:
zhangqiliang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
退货管理的更新和审核接口采用发货表的数据
父级
2fc917b1
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
51 行增加
和
23 行删除
+51
-23
src/main/java/com/starcharge/wios/controller/RejectController.java
+26
-22
src/main/java/com/starcharge/wios/dao/entity/Delivery.java
+1
-1
src/main/java/com/starcharge/wios/dao/mappers/DeliveryMapper.xml
+24
-0
没有找到文件。
src/main/java/com/starcharge/wios/controller/RejectController.java
查看文件 @
5c222115
...
@@ -5,7 +5,9 @@ import com.ihidea.core.support.exception.ServiceException;
...
@@ -5,7 +5,9 @@ import com.ihidea.core.support.exception.ServiceException;
import
com.ihidea.core.support.session.SessionInfo
;
import
com.ihidea.core.support.session.SessionInfo
;
import
com.starcharge.wios.auth.service.TokenService
;
import
com.starcharge.wios.auth.service.TokenService
;
import
com.starcharge.wios.convert.RejectConvert
;
import
com.starcharge.wios.convert.RejectConvert
;
import
com.starcharge.wios.dao.entity.Delivery
;
import
com.starcharge.wios.dao.entity.Reject
;
import
com.starcharge.wios.dao.entity.Reject
;
import
com.starcharge.wios.dao.mappers.DeliveryMapper
;
import
com.starcharge.wios.dao.mappers.RejectMapper
;
import
com.starcharge.wios.dao.mappers.RejectMapper
;
import
com.starcharge.wios.enums2.TauxiliarymaterialStatusEnum
;
import
com.starcharge.wios.enums2.TauxiliarymaterialStatusEnum
;
import
com.starcharge.wios.service.CommonUpdateService
;
import
com.starcharge.wios.service.CommonUpdateService
;
...
@@ -53,9 +55,11 @@ public class RejectController {
...
@@ -53,9 +55,11 @@ public class RejectController {
private
CommonUpdateService
commonUpdateService
;
private
CommonUpdateService
commonUpdateService
;
@Autowired
@Autowired
private
SnowFlakeService
snowFlakeService
;
private
SnowFlakeService
snowFlakeService
;
@Autowired
private
DeliveryMapper
deliveryMapper
;
@PostMapping
(
"/add"
)
@PostMapping
(
"/add"
)
@ApiOperation
(
value
=
"
新增
退货"
)
@ApiOperation
(
value
=
"
申请
退货"
)
@ParamsValidate
@ParamsValidate
public
BaseResponse
<
Integer
>
AddReject
(
@RequestBody
@Validated
(
CreateEntityGroup
.
class
)
RejectAddVo
rejectAddVo
,
BindingResult
bindingResult
){
public
BaseResponse
<
Integer
>
AddReject
(
@RequestBody
@Validated
(
CreateEntityGroup
.
class
)
RejectAddVo
rejectAddVo
,
BindingResult
bindingResult
){
if
(
rejectAddVo
.
getInstallOrder
()==
null
){
if
(
rejectAddVo
.
getInstallOrder
()==
null
){
...
@@ -75,22 +79,22 @@ public class RejectController {
...
@@ -75,22 +79,22 @@ public class RejectController {
}
}
@PostMapping
(
"/query"
)
@PostMapping
(
"/query"
)
@ApiOperation
(
value
=
"退货列表查询"
)
@ApiOperation
(
value
=
"退货列表查询"
)
public
BaseResponse
<
List
<
Reject
>>
queryReject
(
Reject
Reject
){
public
BaseResponse
<
List
<
Delivery
>>
queryReject
(
Delivery
Delivery
){
return
new
BaseResponse
(
this
.
rejectMapper
.
selectRejectList
(
Reject
));
return
new
BaseResponse
(
this
.
deliveryMapper
.
selectDeliveryList
(
Delivery
));
}
}
@GetMapping
(
"/detail"
)
@GetMapping
(
"/detail"
)
@ApiOperation
(
value
=
"退货详情"
)
@ApiOperation
(
value
=
"退货详情"
)
public
BaseResponse
<
Reject
>
getdetail
(
@RequestParam
int
id
){
public
BaseResponse
<
Reject
>
getdetail
(
@RequestParam
int
id
){
Reject
reject
=
this
.
reject
Mapper
.
selectByPrimaryKey
(
id
);
Delivery
delivery
=
this
.
delivery
Mapper
.
selectByPrimaryKey
(
id
);
if
(!
StringUtil
.
isNullOrEmpty
(
reject
.
getRejectMaterial
())){
if
(!
StringUtil
.
isNullOrEmpty
(
delivery
.
getRejectMaterial
())){
String
[]
rejectMaterial
=
reject
.
getRejectMaterial
().
split
(
","
);
String
[]
rejectMaterial
=
delivery
.
getRejectMaterial
().
split
(
","
);
List
<
String
>
list
=
new
ArrayList
<>();
List
<
String
>
list
=
new
ArrayList
<>();
for
(
String
rejectMaterials:
rejectMaterial
){
for
(
String
rejectMaterials:
rejectMaterial
){
list
.
add
(
rejectMaterials
);
list
.
add
(
rejectMaterials
);
}
}
reject
.
setRejectMaterialList
(
list
);
delivery
.
setRejectMaterialList
(
list
);
}
}
return
new
BaseResponse
(
reject
);
return
new
BaseResponse
(
delivery
);
}
}
@GetMapping
(
"/delete"
)
@GetMapping
(
"/delete"
)
@ApiOperation
(
value
=
"删除退货信息"
)
@ApiOperation
(
value
=
"删除退货信息"
)
...
@@ -100,13 +104,13 @@ public class RejectController {
...
@@ -100,13 +104,13 @@ public class RejectController {
@PostMapping
(
"/update"
)
@PostMapping
(
"/update"
)
@ApiOperation
(
"更新退货单信息"
)
@ApiOperation
(
"更新退货单信息"
)
@ParamsValidate
@ParamsValidate
public
BaseResponse
<
Reject
>
update
(
@RequestBody
@Validated
(
UpdateEntityGroup
.
class
)
RejectAddVo
rejectAddVo
,
BindingResult
bindingResult
){
public
BaseResponse
<
Reject
>
update
(
@RequestBody
@Validated
(
UpdateEntityGroup
.
class
)
Delivery
delivery
,
BindingResult
bindingResult
){
var
data
=
RejectConvert
.
INSTANCE
.
convertAddVo
(
rejectAddVo
);
//
var data=RejectConvert.INSTANCE.convertAddVo(rejectAddVo);
this
.
commonUpdateService
.
UpdateColumns
(
d
ata
,
false
);
this
.
commonUpdateService
.
UpdateColumns
(
d
elivery
,
false
);
return
new
BaseResponse
(
this
.
rejectMapper
.
updateByPrimaryKeySelective
(
data
));
return
new
BaseResponse
(
this
.
deliveryMapper
.
updateByPrimaryKeySelective
(
delivery
));
}
}
@PostMapping
(
"/export"
)
/*
@PostMapping("/export")
@ApiOperation(value = "导出退货单列表")
@ApiOperation(value = "导出退货单列表")
public void export(HttpServletResponse response, @RequestBody Reject Reject) throws IOException {
public void export(HttpServletResponse response, @RequestBody Reject Reject) throws IOException {
...
@@ -116,22 +120,22 @@ public class RejectController {
...
@@ -116,22 +120,22 @@ public class RejectController {
.rejectMapper.selectRejectList(Reject));
.rejectMapper.selectRejectList(Reject));
// 输出
// 输出
ExcelUtils.write(response, "退货管理列表.xls", "退货信息", RejectExcelVo.class, data);
ExcelUtils.write(response, "退货管理列表.xls", "退货信息", RejectExcelVo.class, data);
}
}
*/
@PostMapping
(
"/check"
)
@PostMapping
(
"/check"
)
@ApiOperation
(
"审批退货单"
)
@ApiOperation
(
"审批退货单"
)
@ParamsValidate
@ParamsValidate
public
BaseResponse
<
Boolean
>
check
(
@RequestBody
@Validated
RejectCheckVo
rejectCheckVo
,
BindingResult
bindingResult
){
public
BaseResponse
<
Boolean
>
check
(
@RequestBody
@Validated
Delivery
delivery
,
BindingResult
bindingResult
){
var
status
=
TauxiliarymaterialStatusEnum
.
getEnumByName
(
0
,
rejectCheckVo
.
getStatus
());
var
status
=
TauxiliarymaterialStatusEnum
.
getEnumByName
(
0
,
delivery
.
getStatus
());
if
(
status
==
null
){
if
(
status
==
null
){
throw
new
ServiceException
(
400
,
"status必须是枚举:"
+
TauxiliarymaterialStatusEnum
.
getStatusTypeEnums
(
0
).
stream
().
map
(
e
->
e
.
name
()).
reduce
(
""
,(
a
,
b
)->
a
+
","
+
b
));
throw
new
ServiceException
(
400
,
"status必须是枚举:"
+
TauxiliarymaterialStatusEnum
.
getStatusTypeEnums
(
0
).
stream
().
map
(
e
->
e
.
name
()).
reduce
(
""
,(
a
,
b
)->
a
+
","
+
b
));
}
}
SessionInfo
sessionInfo
=
tokenService
.
getUser
();
SessionInfo
sessionInfo
=
tokenService
.
getUser
();
var
data
=
RejectConvert
.
INSTANCE
.
convertCheckVo
(
rejectCheckVo
);
//
var data=RejectConvert.INSTANCE.convertCheckVo(rejectCheckVo);
d
ata
.
setCheckUser
(
sessionInfo
.
getUserId
());
d
elivery
.
setCheckUser
(
sessionInfo
.
getUserId
());
d
ata
.
setCheckUserName
(
sessionInfo
.
getUserName
());
d
elivery
.
setCheckUserName
(
sessionInfo
.
getUserName
());
d
ata
.
setCheckTime
(
LocalDateTime
.
now
());
d
elivery
.
setCheckTime
(
LocalDateTime
.
now
());
this
.
commonUpdateService
.
UpdateColumns
(
d
ata
,
false
);
this
.
commonUpdateService
.
UpdateColumns
(
d
elivery
,
false
);
return
new
BaseResponse
(
this
.
rejectMapper
.
updateByPrimaryKeySelective
(
data
));
return
new
BaseResponse
(
this
.
deliveryMapper
.
updateByPrimaryKeySelective
(
delivery
));
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/starcharge/wios/dao/entity/Delivery.java
查看文件 @
5c222115
...
@@ -229,7 +229,7 @@ public class Delivery extends PageVo implements Serializable {
...
@@ -229,7 +229,7 @@ public class Delivery extends PageVo implements Serializable {
* @mbg.generated
* @mbg.generated
*/
*/
@ApiModelProperty
(
value
=
"退货的审批时间"
)
@ApiModelProperty
(
value
=
"退货的审批时间"
)
private
String
checkTime
;
private
LocalDateTime
checkTime
;
/**
/**
* 退货的审核人
* 退货的审核人
*
*
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/starcharge/wios/dao/mappers/DeliveryMapper.xml
查看文件 @
5c222115
...
@@ -479,6 +479,30 @@
...
@@ -479,6 +479,30 @@
<if
test=
"receiver != null"
>
<if
test=
"receiver != null"
>
receiver = #{receiver,jdbcType=VARCHAR},
receiver = #{receiver,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks,jdbcType=VARCHAR},
</if>
<if
test=
"rejectMaterial != null"
>
reject_material = #{rejectMaterial,jdbcType=VARCHAR},
</if>
<if
test=
"reason != null"
>
reason = #{reason,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=VARCHAR},
</if>
<if
test=
"checkTime != null"
>
check_time = #{checkTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"checkUser != null"
>
check_user = #{checkUser,jdbcType=VARCHAR},
</if>
<if
test=
"checkUserName != null"
>
check_user_name = #{checkUserName,jdbcType=VARCHAR},
</if>
<if
test=
"checkSuggestion != null"
>
check_suggestion = #{checkSuggestion,jdbcType=VARCHAR},
</if>
</set>
</set>
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</update>
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论