Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
5c86b86f
Commit
5c86b86f
authored
Dec 14, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
6e56256d
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
2 deletions
+81
-2
BaseOrderController.java
...ava/com/xxfc/platform/order/rest/BaseOrderController.java
+11
-1
VehiclePublishReceiveBiz.java
...m/xxfc/platform/vehicle/biz/VehiclePublishReceiveBiz.java
+39
-0
VehiclePublishReceiveMapper.java
.../platform/vehicle/mapper/VehiclePublishReceiveMapper.java
+6
-0
AppVehiclePublishController.java
...fc/platform/vehicle/rest/AppVehiclePublishController.java
+4
-0
AppVehiclePublishReceiveController.java
...form/vehicle/rest/AppVehiclePublishReceiveController.java
+8
-0
VehiclePublishMapper.xml
...server/src/main/resources/mapper/VehiclePublishMapper.xml
+1
-1
VehiclePublishReceiveMapper.xml
...src/main/resources/mapper/VehiclePublishReceiveMapper.xml
+12
-0
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/BaseOrderController.java
View file @
5c86b86f
...
...
@@ -547,6 +547,16 @@ public class BaseOrderController extends CommonBaseController implements UserRes
@RequestMapping
(
value
=
"/updateBaseOrder"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
ObjectRestResponse
updateBaseOrder
(
@RequestBody
BaseOrder
baseOrder
)
{
String
no
=
baseOrder
.
getNo
();
if
(
StringUtils
.
isNotBlank
(
no
)){
BaseOrder
baseOrder1
=
new
BaseOrder
();
baseOrder1
.
setNo
(
no
);
baseOrder1
=
baseOrderBiz
.
selectOne
(
baseOrder1
);
if
(
baseOrder1
!=
null
){
baseOrder
.
setId
(
baseOrder1
.
getId
());
baseOrder
.
setVersion
(
baseOrder1
.
getVersion
());
}
}
baseOrderBiz
.
updateSelectiveById
(
baseOrder
);
return
ObjectRestResponse
.
succ
();
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehiclePublishReceiveBiz.java
View file @
5c86b86f
...
...
@@ -10,6 +10,7 @@ import com.github.wxiaoqi.security.common.exception.BaseException;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.order.contant.enumerate.OrderStatusEnum
;
import
com.xxfc.platform.order.entity.BaseOrder
;
import
com.xxfc.platform.order.feign.OrderFeign
;
import
com.xxfc.platform.order.pojo.dto.ReceiveRefundDTO
;
...
...
@@ -33,6 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.beans.Transient
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
...
...
@@ -636,6 +638,43 @@ public class VehiclePublishReceiveBiz extends BaseBiz<VehiclePublishReceiveMappe
}
@Transient
public
void
endPublish
(
Integer
publishId
){
VehiclePublish
vehiclePublish
=
vehiclePublishBiz
.
selectById
(
publishId
);
if
(
vehiclePublish
==
null
)
throw
new
BaseException
(
"需求不存在--id==="
+
publishId
,
ResultCode
.
FAILED_CODE
);
VehiclePublishGoods
publishGoods
=
new
VehiclePublishGoods
();
publishGoods
.
setPublishId
(
publishId
);
List
<
VehiclePublishGoods
>
publishGoodsList
=
publishGoodsBiz
.
selectList
(
publishGoods
);
if
(
publishGoodsList
==
null
||
publishGoodsList
.
size
()
==
0
)
throw
new
BaseException
(
"子需求不存在"
,
ResultCode
.
FAILED_CODE
);
List
<
Integer
>
publishGoodsIds
=
publishGoodsList
.
stream
().
map
(
VehiclePublishGoods:
:
getId
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
VehiclePublishReceive
>
list
=
mapper
.
getListByPublishGoodsIds
(
publishGoodsIds
);
List
<
String
>
receiveOrderNos
=
null
;
if
(
list
.
size
()
>
0
){
List
<
VehiclePublishReceive
>
payList
=
list
.
stream
().
filter
(
x
->
x
.
getStatus
()
==
1
).
collect
(
Collectors
.
toList
());
if
(
payList
!=
null
&&
payList
.
size
()
>
0
)
throw
new
BaseException
(
"存在待确认无法取消"
,
ResultCode
.
FAILED_CODE
);
receiveOrderNos
=
list
.
stream
().
filter
(
x
->
x
.
getStatus
()
==
0
).
map
(
VehiclePublishReceive:
:
getReceiveOrderNo
).
distinct
().
collect
(
Collectors
.
toList
());
}
vehiclePublish
.
setStatus
(
3
);
vehiclePublishBiz
.
updateSelectiveById
(
vehiclePublish
);
if
(
receiveOrderNos
!=
null
&&
receiveOrderNos
.
size
()
>
0
){
for
(
String
receiveOrderNo
:
receiveOrderNos
){
mapper
.
updStatusByOrderNo
(
receiveOrderNo
);
BaseOrder
baseOrder
=
new
BaseOrder
();
baseOrder
.
setNo
(
receiveOrderNo
);
baseOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_CANCEL
.
getCode
());
orderFeign
.
updateBaseOrder
(
baseOrder
);
}
}
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/VehiclePublishReceiveMapper.java
View file @
5c86b86f
...
...
@@ -9,6 +9,7 @@ import com.xxfc.platform.vehicle.pojo.vo.VehiclePublishGoodsVo;
import
com.xxfc.platform.vehicle.pojo.vo.VehiclePublishReceiveVo
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Update
;
import
tk.mybatis.mapper.additional.idlist.SelectByIdListMapper
;
import
tk.mybatis.mapper.common.Mapper
;
...
...
@@ -38,4 +39,9 @@ public interface VehiclePublishReceiveMapper extends Mapper<VehiclePublishReceiv
@Select
(
"SELECT * FROM vehicle_publish_receive WHERE publish_goods_id =#{pubilishId} and `status` in (1,3,5,6) ORDER BY id DESC LIMIT 1"
)
VehiclePublishReceive
getReceivByPubilishId
(
@Param
(
"pubilishId"
)
Integer
pubilishId
);
List
<
VehiclePublishReceive
>
getListByPublishGoodsIds
(
@Param
(
"publishGoodsIds"
)
List
<
Integer
>
publishGoodsIds
);
@Update
(
"update vehicle_publish_receive set status = 4 where receive_order_no = #{orderNo}"
)
void
updStatusByOrderNo
(
@Param
(
"orderNo"
)
String
orderNo
);
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/AppVehiclePublishController.java
View file @
5c86b86f
...
...
@@ -58,6 +58,7 @@ public class AppVehiclePublishController extends BaseController<VehiclePublishBi
@IgnoreUserToken
public
ObjectRestResponse
selectList
(
VehiclePublishFindDTO
publishFindDTO
)
{
publishFindDTO
.
setSelectType
(
1
);
publishFindDTO
.
setNowTime
(
System
.
currentTimeMillis
());
return
ObjectRestResponse
.
succ
(
baseBiz
.
selectList
(
publishFindDTO
));
}
...
...
@@ -120,4 +121,7 @@ public class AppVehiclePublishController extends BaseController<VehiclePublishBi
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/AppVehiclePublishReceiveController.java
View file @
5c86b86f
...
...
@@ -108,6 +108,14 @@ public class AppVehiclePublishReceiveController extends BaseController<VehiclePu
}
@PostMapping
(
"endPublish"
)
@ApiModelProperty
(
"结束调车"
)
public
ObjectRestResponse
endPublish
(
@RequestBody
VehiclePublishReceiveDTO
publishReceiveDTO
){
baseBiz
.
endPublish
(
publishReceiveDTO
.
getPublishId
());
return
ObjectRestResponse
.
succ
();
}
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehiclePublishMapper.xml
View file @
5c86b86f
...
...
@@ -24,7 +24,7 @@
AND p.`status`= #{status}
</if>
<if
test=
"nowTime != null and nowTime > 0"
>
AND p.`publish_end_time` >= #{nowTime}
AND p.`publish_end_time` >= #{nowTime}
and status in (0)
</if>
<if
test=
"dataCompanyIds != null and dataCompanyIds.size > 0"
>
and p.id in
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehiclePublishReceiveMapper.xml
View file @
5c86b86f
...
...
@@ -159,4 +159,16 @@
ORDER BY goodsNumber DESC
</select>
<select
id=
"getListByPublishGoodsIds"
resultType=
"com.xxfc.platform.vehicle.entity.VehiclePublishReceive"
>
SELECT * FROM vehicle_publish_receive
<where>
<if
test=
"publishGoodsIds != null and publishGoodsIds.size > 0"
>
and publish_goods_id in
<foreach
collection=
"publishGoodsIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
</where>
</select>
</mapper>
\ No newline at end of file
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