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
09c69fd0
提交
09c69fd0
authored
11月 27, 2023
作者:
zhangqiliang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
发货管理的时候添加一个发货仓库名称字段;
校验SN号的时候,扣到货仓库的库存;
父级
4673a92c
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
45 行增加
和
1 行删除
+45
-1
src/main/java/com/starcharge/wios/controller/OrderInstallController.java
+25
-1
src/main/java/com/starcharge/wios/dao/entity/Delivery.java
+7
-0
src/main/java/com/starcharge/wios/dao/mappers/DeliveryMapper.xml
+6
-0
src/main/java/com/starcharge/wios/vo/DeliveryAddVo.java
+7
-0
没有找到文件。
src/main/java/com/starcharge/wios/controller/OrderInstallController.java
查看文件 @
09c69fd0
package
com
.
starcharge
.
wios
.
controller
;
package
com
.
starcharge
.
wios
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.ihidea.core.util.HttpClientUtils
;
import
com.starcharge.wios.dao.entity.Delivery
;
import
com.starcharge.wios.dao.entity.Delivery
;
import
com.starcharge.wios.dao.mappers.DeliveryMapper
;
import
com.starcharge.wios.dao.mappers.DeliveryMapper
;
import
com.starcharge.wios.dto.DeliveryUpdateDTO
;
import
com.starcharge.wios.dto.DeliveryUpdateDTO
;
import
io.netty.util.internal.StringUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
@@ -23,6 +27,9 @@ import io.swagger.annotations.ApiImplicitParam;
...
@@ -23,6 +27,9 @@ import io.swagger.annotations.ApiImplicitParam;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
/**
* 安装订单管理接口
* 安装订单管理接口
*
*
...
@@ -37,6 +44,8 @@ public class OrderInstallController {
...
@@ -37,6 +44,8 @@ public class OrderInstallController {
private
OrderInstallService
orderInstallService
;
private
OrderInstallService
orderInstallService
;
@Autowired
@Autowired
private
DeliveryMapper
deliveryMapper
;
private
DeliveryMapper
deliveryMapper
;
@Value
(
"${warehouseUrl.reduceUrl}"
)
private
String
reduceUrl
;
/**
/**
* 添加安装订单
* 添加安装订单
...
@@ -111,7 +120,22 @@ public class OrderInstallController {
...
@@ -111,7 +120,22 @@ public class OrderInstallController {
public
BaseResponse
<
Object
>
instaallReport
(
String
materialSn
)
{
public
BaseResponse
<
Object
>
instaallReport
(
String
materialSn
)
{
Delivery
delivery
=
this
.
deliveryMapper
.
selectByMaterialSn
(
materialSn
);
Delivery
delivery
=
this
.
deliveryMapper
.
selectByMaterialSn
(
materialSn
);
if
(
StringUtils
.
isEmpty
(
delivery
)){
if
(
StringUtils
.
isEmpty
(
delivery
)){
throw
new
ServiceException
(
"没有当前SN号"
);
throw
new
ServiceException
(
200
,
"没有当前SN号"
);
}
if
(
delivery
.
getInstallStatus
()!=
0
){
throw
new
ServiceException
(
200
,
"当前状态不是未安装状态"
);
}
//到货仓库的库存减少
Delivery
before
=
this
.
deliveryMapper
.
selectByPrimaryKey
(
delivery
.
getId
());
Map
<
String
,
String
>
params
=
new
HashMap
<
String
,
String
>();
params
.
put
(
"warehouseId"
,
before
.
getWarehouseId
());
params
.
put
(
"materialsCode"
,
before
.
getMaterialCode
());
params
.
put
(
"quantity"
,
"1"
);
String
jsonReduce
=
HttpClientUtils
.
post
(
reduceUrl
,
params
,
"UTF-8"
,
"UTF-8"
);
JSONObject
jsonReduceObject
=
JSONObject
.
parseObject
(
jsonReduce
);
String
codeReduce
=
jsonReduceObject
.
getString
(
"code"
);
if
(
StringUtil
.
isNullOrEmpty
(
codeReduce
)){
throw
new
ServiceException
(
"到货仓库库存扣减失败"
);
}
}
DeliveryUpdateDTO
deliveryUpdateDTO
=
new
DeliveryUpdateDTO
();
DeliveryUpdateDTO
deliveryUpdateDTO
=
new
DeliveryUpdateDTO
();
deliveryUpdateDTO
.
setId
(
delivery
.
getId
());
deliveryUpdateDTO
.
setId
(
delivery
.
getId
());
...
...
src/main/java/com/starcharge/wios/dao/entity/Delivery.java
查看文件 @
09c69fd0
...
@@ -300,6 +300,13 @@ public class Delivery extends PageVo implements Serializable {
...
@@ -300,6 +300,13 @@ public class Delivery extends PageVo implements Serializable {
*/
*/
@ApiModelProperty
(
value
=
"发货仓库id"
)
@ApiModelProperty
(
value
=
"发货仓库id"
)
private
String
warehouseId
;
private
String
warehouseId
;
/**
* 发货仓库
*
* @mbg.generated
*/
@ApiModelProperty
(
value
=
"发货仓库"
)
private
String
warehouseName
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
src/main/java/com/starcharge/wios/dao/mappers/DeliveryMapper.xml
查看文件 @
09c69fd0
...
@@ -277,6 +277,9 @@
...
@@ -277,6 +277,9 @@
<if
test=
"warehouseId != null"
>
<if
test=
"warehouseId != null"
>
warehouse_id,
warehouse_id,
</if>
</if>
<if
test=
"warehouseName != null"
>
warehouse_name,
</if>
<if
test=
"installStatus != null"
>
<if
test=
"installStatus != null"
>
install_status,
install_status,
</if>
</if>
...
@@ -348,6 +351,9 @@
...
@@ -348,6 +351,9 @@
<if
test=
"warehouseId != null"
>
<if
test=
"warehouseId != null"
>
#{warehouseId,jdbcType=VARCHAR},
#{warehouseId,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"warehouseName != null"
>
#{warehouseName,jdbcType=VARCHAR},
</if>
<if
test=
"installStatus != null"
>
<if
test=
"installStatus != null"
>
#{installStatus,jdbcType=INTEGER},
#{installStatus,jdbcType=INTEGER},
</if>
</if>
...
...
src/main/java/com/starcharge/wios/vo/DeliveryAddVo.java
查看文件 @
09c69fd0
...
@@ -165,6 +165,13 @@ public class DeliveryAddVo {
...
@@ -165,6 +165,13 @@ public class DeliveryAddVo {
*/
*/
@ApiModelProperty
(
value
=
"发货仓库id"
)
@ApiModelProperty
(
value
=
"发货仓库id"
)
private
String
warehouseId
;
private
String
warehouseId
;
/**
* 发货仓库
*
* @mbg.generated
*/
@ApiModelProperty
(
value
=
"发货仓库"
)
private
String
warehouseName
;
/**
/**
* 收货人
* 收货人
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论