Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
ims-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
ims-ci-test
Commits
4ea438a2
提交
4ea438a2
authored
8月 25, 2023
作者:
张小凤
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FlowDictionaryAndTimeDTO(update)
上级
9c4343ce
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
876 行增加
和
34 行删除
+876
-34
FlowDictionaryAndTimeDTO.java
.../com/mmc/csf/infomation/dto/FlowDictionaryAndTimeDTO.java
+46
-0
RequirementsServiceDTO.java
...va/com/mmc/csf/infomation/dto/RequirementsServiceDTO.java
+43
-0
ServiceArriveSceneDTO.java
...ava/com/mmc/csf/infomation/dto/ServiceArriveSceneDTO.java
+9
-0
ServiceEvaluateDTO.java
...n/java/com/mmc/csf/infomation/dto/ServiceEvaluateDTO.java
+4
-0
ServiceFulfilATaskDTO.java
...ava/com/mmc/csf/infomation/dto/ServiceFulfilATaskDTO.java
+5
-0
ServiceSettleAccountsDTO.java
.../com/mmc/csf/infomation/dto/ServiceSettleAccountsDTO.java
+5
-0
GetOrderNumberUpdateVO.java
...ava/com/mmc/csf/infomation/vo/GetOrderNumberUpdateVO.java
+43
-0
ServiceRequirementsEditVO.java
.../com/mmc/csf/infomation/vo/ServiceRequirementsEditVO.java
+106
-0
ReleaseApplication.java
...src/main/java/com/mmc/csf/release/ReleaseApplication.java
+5
-2
RequirementsController.java
...om/mmc/csf/release/controller/RequirementsController.java
+30
-1
RequirementsDao.java
...rc/main/java/com/mmc/csf/release/dao/RequirementsDao.java
+19
-0
RequirementsAmountDO.java
...csf/release/entity/requirements/RequirementsAmountDO.java
+7
-0
RequirementsInfoDO.java
...c/csf/release/entity/requirements/RequirementsInfoDO.java
+36
-4
RequirementsServiceDO.java
...sf/release/entity/requirements/RequirementsServiceDO.java
+4
-0
RequirementsService.java
...java/com/mmc/csf/release/service/RequirementsService.java
+7
-4
RequirementsServiceImpl.java
...mmc/csf/release/service/impl/RequirementsServiceImpl.java
+290
-12
ServiceTakeDownTask.java
...va/com/mmc/csf/release/timerTask/ServiceTakeDownTask.java
+13
-4
RequirementsDao.xml
...rc/main/resources/mapper/requirements/RequirementsDao.xml
+204
-7
没有找到文件。
csf-common/csf-common-model/src/main/java/com/mmc/csf/infomation/dto/FlowDictionaryAndTimeDTO.java
0 → 100644
浏览文件 @
4ea438a2
package
com
.
mmc
.
csf
.
infomation
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
/**
* @Author small
* @Date 2023/8/25 18:45
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
FlowDictionaryAndTimeDTO
implements
Serializable
{
//抢单
@ApiModelProperty
(
value
=
"抢单"
,
example
=
"抢单"
)
private
RequirementsServiceDTO
requirementsServiceDTO
;
//抵达现场地址
// service_arrive_scene
@ApiModelProperty
(
value
=
"抵达现场"
,
example
=
"抵达现场"
)
private
ServiceArriveSceneDTO
serviceArriveSceneDTO
;
//完成任务
// service_fulfil_a_task
@ApiModelProperty
(
value
=
"完成任务"
,
example
=
"完成任务"
)
private
ServiceFulfilATaskDTO
serviceFulfilATaskDTO
;
//结算
//service_settle_accounts
@ApiModelProperty
(
value
=
"结算"
,
example
=
"结算"
)
private
ServiceSettleAccountsDTO
serviceSettleAccountsDTO
;
//评价
// service_evaluate
@ApiModelProperty
(
value
=
"评价"
,
example
=
"评价"
)
private
ServiceEvaluateDTO
serviceEvaluateDTO
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/infomation/dto/RequirementsServiceDTO.java
0 → 100644
浏览文件 @
4ea438a2
package
com
.
mmc
.
csf
.
infomation
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author small
* @Date 2023/8/25 19:40
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
RequirementsServiceDTO
{
/**
* 抢单时间
*/
@ApiModelProperty
(
value
=
"抢单时间"
,
example
=
"抢单时间"
)
private
String
createTime
;
/**
* 修改时间
*/
@ApiModelProperty
(
value
=
"抢单时间"
,
example
=
"抢单时间"
)
private
String
updateTime
;
@ApiModelProperty
(
value
=
"服务id"
,
example
=
"服务id"
)
private
Integer
requirementsInfoId
;
@ApiModelProperty
(
value
=
"流程id"
,
hidden
=
true
)
private
Integer
serviceFlowId
;
@ApiModelProperty
(
value
=
"流程字典"
,
example
=
"流程字典"
)
private
FlowDictionaryDTO
flowDictionaryDTO
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/infomation/dto/ServiceArriveSceneDTO.java
浏览文件 @
4ea438a2
...
...
@@ -40,4 +40,13 @@ public class ServiceArriveSceneDTO {
@ApiModelProperty
(
value
=
"服务需求id"
,
required
=
true
)
private
Integer
requirementsInfoId
;
@ApiModelProperty
(
value
=
"到达现场时间"
)
private
String
createTime
;
private
String
updateTime
;
@ApiModelProperty
(
value
=
"流程id"
,
hidden
=
true
)
private
Integer
serviceFlowId
;
private
FlowDictionaryDTO
flowDictionaryDTO
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/infomation/dto/ServiceEvaluateDTO.java
浏览文件 @
4ea438a2
...
...
@@ -44,4 +44,8 @@ public class ServiceEvaluateDTO {
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
private
FlowDictionaryDTO
flowDictionaryDTO
;
@ApiModelProperty
(
value
=
""
,
hidden
=
true
)
private
Integer
serviceFlowId
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/infomation/dto/ServiceFulfilATaskDTO.java
浏览文件 @
4ea438a2
...
...
@@ -39,4 +39,9 @@ public class ServiceFulfilATaskDTO {
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
""
,
hidden
=
true
)
private
Integer
serviceFlowId
;
private
FlowDictionaryDTO
flowDictionaryDTO
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/infomation/dto/ServiceSettleAccountsDTO.java
浏览文件 @
4ea438a2
...
...
@@ -41,4 +41,9 @@ public class ServiceSettleAccountsDTO {
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
private
FlowDictionaryDTO
flowDictionaryDTO
;
@ApiModelProperty
(
value
=
""
,
hidden
=
true
)
private
Integer
serviceFlowId
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/infomation/vo/GetOrderNumberUpdateVO.java
0 → 100644
浏览文件 @
4ea438a2
package
com
.
mmc
.
csf
.
infomation
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.math.BigDecimal
;
/**
* @Author small
* @Date 2023/8/25 13:23
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public
class
GetOrderNumberUpdateVO
{
@ApiModelProperty
(
value
=
"订单金额"
,
example
=
"100.00"
,
required
=
true
)
//@NotNull(message = "订单金额", groups = {Insert.class})
//@DecimalMin(value = "100.00", message = "amount格式不正确")
private
BigDecimal
orderAmount
;
@ApiModelProperty
(
value
=
"云享金"
,
example
=
"10"
,
hidden
=
true
)
private
BigDecimal
cashAmount
;
@ApiModelProperty
(
value
=
"佣金"
,
example
=
"10"
,
hidden
=
true
)
private
BigDecimal
salaryAmount
;
@ApiModelProperty
(
value
=
"微信金额"
,
example
=
"10"
,
hidden
=
true
)
private
BigDecimal
weChatPay
;
@ApiModelProperty
(
value
=
"用户id"
,
example
=
"10"
,
hidden
=
true
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"支付方式,云享金:1,佣金:2,微信支付:3"
,
example
=
"1,2,3"
,
required
=
true
)
private
String
paymentType
;
@ApiModelProperty
(
value
=
"抢单时需要知道抢单的那个订单"
,
example
=
"1"
,
required
=
true
)
private
Integer
requirementsInfoId
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/infomation/vo/ServiceRequirementsEditVO.java
0 → 100644
浏览文件 @
4ea438a2
package
com
.
mmc
.
csf
.
infomation
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.mmc.csf.release.model.group.Insert
;
import
com.mmc.csf.release.model.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* @Author small
* @Date 2023/8/25 10:53
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public
class
ServiceRequirementsEditVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
447951390213113317L
;
@ApiModelProperty
(
value
=
"id"
)
@NotNull
(
message
=
"requirementsInfoId不能为空"
,
groups
=
{
Update
.
class
})
private
Integer
requirementsInfoId
;
@ApiModelProperty
(
value
=
"id"
,
example
=
"1"
)
private
Integer
serviceId
;
@ApiModelProperty
(
value
=
"飞行日期——任务开始时间"
,
example
=
"2023-07-25"
,
required
=
true
)
@NotNull
(
message
=
"任务开始时间不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
String
taskStartTime
;
@ApiModelProperty
(
value
=
"飞行日期——任务结束时间"
,
example
=
"2023-07-26"
,
required
=
true
)
@NotNull
(
message
=
"任务开始时间不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
String
taskEndTime
;
@ApiModelProperty
(
value
=
"飞行位置——任务地址"
,
example
=
"广东省深圳市"
,
required
=
true
)
@NotBlank
(
message
=
"任务地址不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
private
String
taskAddress
;
@ApiModelProperty
(
value
=
"飞行位置——任务经度"
,
example
=
"23.344324"
,
required
=
true
)
@NotNull
(
message
=
"任务经度不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
private
Double
longitude
;
@ApiModelProperty
(
value
=
"飞行位置——任务纬度"
,
example
=
"44.344324"
,
required
=
true
)
@NotNull
(
message
=
"任务纬度不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
private
Double
latitude
;
@ApiModelProperty
(
value
=
"任务需求描述"
,
example
=
"描述一下"
,
required
=
true
)
@NotNull
(
message
=
"任务需求描述不能为空"
,
groups
=
{
Insert
.
class
})
@Length
(
max
=
300
,
message
=
"字符过长"
)
private
String
requireDescription
;
@ApiModelProperty
(
value
=
"订单金额"
,
example
=
"100"
,
required
=
true
)
@NotNull
(
message
=
"订单金额"
,
groups
=
{
Insert
.
class
})
private
BigDecimal
orderAmount
;
@ApiModelProperty
(
value
=
"飞手保险1飞手保险 2三者保险 3机身保险"
,
example
=
"1,2,3"
,
required
=
true
)
@NotNull
(
message
=
"飞手保险"
,
groups
=
{
Insert
.
class
})
private
String
insurance
;
/* @ApiModelProperty(value = "订单级别 todo:前端传英文,后台自己获取金额 订单级别(REGULAR_ORDER,RUSH_ORDER,TOP_ORDER)", example = "REGULAR_ORDER", required = true)
@NotNull(message = "订单级别", groups = {Insert.class})
private OrderLevelEnum orderLevelEnum;*/
@ApiModelProperty
(
value
=
"后台获取token里面的用户id"
,
hidden
=
true
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"发布者姓名"
,
example
=
"张三"
)
private
String
publishName
;
@ApiModelProperty
(
value
=
"发布者电话"
,
example
=
"1892994543"
,
required
=
true
)
@NotNull
(
message
=
"发布者电话不能为空"
,
groups
=
{
Insert
.
class
})
private
String
publishPhone
;
@ApiModelProperty
(
value
=
"云享金"
,
example
=
"10"
,
hidden
=
true
)
private
BigDecimal
cashAmount
;
@ApiModelProperty
(
value
=
"佣金"
,
example
=
"10"
,
hidden
=
true
)
private
BigDecimal
salaryAmount
;
@ApiModelProperty
(
value
=
"微信支付订单编号"
,
example
=
"R202308191657303116170"
)
private
String
wechatPayOrderNumber
;
@ApiModelProperty
(
value
=
"支付方式,云享金:1,佣金:2,微信支付:3"
,
example
=
"1,2,3"
)
private
String
paymentType
;
@ApiModelProperty
(
value
=
"微信金额"
,
example
=
"10"
,
hidden
=
true
)
private
BigDecimal
weChat
;
@ApiModelProperty
(
value
=
"地区编码"
,
example
=
"307013"
)
private
String
adcode
;
}
release-service/src/main/java/com/mmc/csf/release/ReleaseApplication.java
浏览文件 @
4ea438a2
...
...
@@ -4,16 +4,19 @@ import org.springframework.boot.SpringApplication;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.web.client.RestTemplate
;
/**
* @Author LW
* @date 2023/5/13 10:39
* 概要:
// */
* //
*/
@EnableFeignClients
(
basePackages
=
"com.mmc.csf.release.feign"
)
// 所有FeignClient放在client-feign-springboot-starter里面进行管理
//@EnableCircuitBreaker
//@EnableEurekaClient
@EnableScheduling
@SpringBootApplication
public
class
ReleaseApplication
{
public
static
void
main
(
String
[]
args
)
{
...
...
@@ -21,7 +24,7 @@ public class ReleaseApplication {
}
@Bean
public
RestTemplate
restTemplate
(){
public
RestTemplate
restTemplate
()
{
return
new
RestTemplate
();
}
}
release-service/src/main/java/com/mmc/csf/release/controller/RequirementsController.java
浏览文件 @
4ea438a2
...
...
@@ -41,10 +41,20 @@ public class RequirementsController extends BaseController {
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
RequirementsTypeVO
.
class
)})
@GetMapping
(
"flowDictionary"
)
public
ResultBody
<
FlowDictionaryDTO
>
flowDictionary
()
{
return
requirementsService
.
flowDictionary
();
}
@ApiOperation
(
value
=
"流程字典(包含流程时间)"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
RequirementsTypeVO
.
class
)})
@GetMapping
(
"flowDictionaryAndTime"
)
public
ResultBody
<
FlowDictionaryAndTimeDTO
>
flowDictionaryAndTime
(
HttpServletRequest
request
,
@ApiParam
(
value
=
"发布服务需求id"
,
required
=
true
)
@RequestParam
Integer
requirementsInfoId
)
{
return
requirementsService
.
flowDictionaryAndTime
(
requirementsInfoId
);
}
@ApiOperation
(
value
=
"小程序——发布需求信息"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"publish"
)
...
...
@@ -91,6 +101,26 @@ public class RequirementsController extends BaseController {
return
requirementsService
.
updatePublish
(
requirementsInfoVO
,
request
);
}
@ApiOperation
(
value
=
"小程序——修改发布服务需求订单编号单独接口"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"updatePublisherNumber"
)
public
ResultBody
<
GetOrderNumberDTO
>
updatePublisherNumber
(
@RequestBody
GetOrderNumberUpdateVO
getOrderNumberUpdateVO
,
HttpServletRequest
request
)
{
Integer
userAccountId
=
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
();
getOrderNumberUpdateVO
.
setUserAccountId
(
userAccountId
);
return
requirementsService
.
updatePublisherNumber
(
getOrderNumberUpdateVO
,
request
);
}
@ApiOperation
(
value
=
"小程序-编辑——服务需求发布"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"updateServicePublish"
)
public
ResultBody
updateServicePublish
(
@RequestBody
@Validated
(
value
=
{
Update
.
class
})
ServiceRequirementsEditVO
requirementsInfoVO
,
HttpServletRequest
request
)
{
requirementsInfoVO
.
setUserAccountId
(
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
return
requirementsService
.
updateServicePublish
(
requirementsInfoVO
,
request
);
}
@ApiOperation
(
value
=
"小程序-删除——需求发布"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"deletePublish"
)
...
...
@@ -113,7 +143,6 @@ public class RequirementsController extends BaseController {
return
requirementsService
.
detailPublish
(
id
,
request
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
}
@ApiOperation
(
value
=
"new——小程序-—服务订单--我的发布"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"myPublish"
)
...
...
release-service/src/main/java/com/mmc/csf/release/dao/RequirementsDao.java
浏览文件 @
4ea438a2
package
com
.
mmc
.
csf
.
release
.
dao
;
import
com.mmc.csf.infomation.dto.*
;
import
com.mmc.csf.infomation.qo.IndustryCaseQO
;
import
com.mmc.csf.infomation.qo.MyPreemptQO
;
import
com.mmc.csf.infomation.qo.MyPublishQO
;
...
...
@@ -128,4 +129,22 @@ public interface RequirementsDao {
int
myPreemptCount
(
MyPreemptQO
param
);
List
<
RequirementsInfoDO
>
orderRequirements
(
String
format
);
void
updateServiceAmount
(
Integer
id
);
void
InsertRequirementsAmountLog
(
RequirementsInfoDO
requirementsInfoDO
);
void
updateAmount
(
RequirementsAmountDO
amountDO
);
void
updateRequirementsInfo
(
RequirementsInfoDO
infoDO
);
RequirementsServiceDTO
requirementsServiceDTO
(
Integer
requirementsInfoId
);
ServiceArriveSceneDTO
serviceArriveSceneDTO
(
Integer
requirementsInfoId
);
ServiceFulfilATaskDTO
serviceFulfilATaskDTO
(
Integer
requirementsInfoId
);
ServiceSettleAccountsDTO
settleAccountsDTO
(
Integer
requirementsInfoId
);
ServiceEvaluateDTO
serviceEvaluateDTO
(
Integer
requirementsInfoId
);
}
release-service/src/main/java/com/mmc/csf/release/entity/requirements/RequirementsAmountDO.java
浏览文件 @
4ea438a2
package
com
.
mmc
.
csf
.
release
.
entity
.
requirements
;
import
com.mmc.csf.config.IsNullConvertZero
;
import
com.mmc.csf.infomation.vo.ServiceRequirementsEditVO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
...
...
@@ -98,4 +99,10 @@ public class RequirementsAmountDO implements Serializable {
this
.
levelCashAmount
=
requirementsInfoDO
.
getLevelCashAmount
();
}
public
RequirementsAmountDO
(
ServiceRequirementsEditVO
requirementsEditVO
)
{
this
.
orderAmount
=
requirementsEditVO
.
getOrderAmount
();
this
.
wechatPayOrderNumber
=
requirementsEditVO
.
getWechatPayOrderNumber
();
this
.
requirementsInfoId
=
requirementsEditVO
.
getRequirementsInfoId
();
}
}
release-service/src/main/java/com/mmc/csf/release/entity/requirements/RequirementsInfoDO.java
浏览文件 @
4ea438a2
package
com
.
mmc
.
csf
.
release
.
entity
.
requirements
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.mmc.csf.config.IsNullConvertZero
;
import
com.mmc.csf.infomation.vo.RequirementsInfoVO
;
import
com.mmc.csf.infomation.vo.ServiceRequirementsEditVO
;
import
com.mmc.csf.release.model.group.Insert
;
import
com.mmc.csf.release.model.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -86,6 +88,7 @@ public class RequirementsInfoDO implements Serializable {
@ApiModelProperty
(
value
=
"服务名称"
,
example
=
"服务名称"
)
private
String
serviceName
;
@ApiModelProperty
(
value
=
"发布者支付总金额"
,
example
=
"发布者支付总金额"
)
@IsNullConvertZero
private
BigDecimal
totalAmount
;
@ApiModelProperty
(
value
=
"允许几人抢单"
,
example
=
"允许几人抢单"
)
private
Integer
repertory
;
...
...
@@ -103,14 +106,15 @@ public class RequirementsInfoDO implements Serializable {
private
String
orderStatus
;
private
Integer
publish
;
@IsNullConvertZero
private
BigDecimal
preemptTotalAmount
;
@IsNullConvertZero
private
BigDecimal
orderAmount
;
private
Integer
serviceFlowId
;
@ApiModelProperty
(
value
=
"修格后的任务佣金"
)
@IsNullConvertZero
private
BigDecimal
updateOrderAmount
;
@ApiModelProperty
(
value
=
"原因"
)
...
...
@@ -124,12 +128,13 @@ public class RequirementsInfoDO implements Serializable {
@ApiModelProperty
(
value
=
"发布者支付任务佣金 佣金金额"
)
@IsNullConvertZero
private
BigDecimal
cashAmount
;
@IsNullConvertZero
private
BigDecimal
weChat
;
@IsNullConvertZero
private
BigDecimal
salaryAmount
;
@ApiModelProperty
(
value
=
"抢单飞手用户id "
)
private
Integer
pilotCertificationUserId
;
...
...
@@ -137,8 +142,21 @@ public class RequirementsInfoDO implements Serializable {
private
String
flyerOpenid
;
@ApiModelProperty
(
value
=
"飞手获得任务佣金"
)
@IsNullConvertZero
private
BigDecimal
receiveSalaryAmount
;
@ApiModelProperty
(
value
=
"地区编码"
,
example
=
"307013"
)
private
String
adcode
;
@ApiModelProperty
(
value
=
"抢单级别金额"
)
@IsNullConvertZero
private
BigDecimal
orderLevelAmount
;
@IsNullConvertZero
private
BigDecimal
levelCashAmount
;
@IsNullConvertZero
private
BigDecimal
levelWeChatAmount
;
@IsNullConvertZero
private
BigDecimal
levelSalaryAmount
;
public
RequirementsInfoVO
buildRequirementsInfoVO
()
{
return
RequirementsInfoVO
.
builder
().
id
(
this
.
id
).
requirementTypeId
(
this
.
requirementTypeId
).
userAccountId
(
this
.
userAccountId
).
publishName
(
this
.
publishName
)
...
...
@@ -189,4 +207,18 @@ public class RequirementsInfoDO implements Serializable {
this
.
requireUrl
=
requirementsInfoVO
.
getRequireUrl
();
}
public
RequirementsInfoDO
(
ServiceRequirementsEditVO
requirementsEditVO
)
{
this
.
id
=
requirementsEditVO
.
getRequirementsInfoId
();
this
.
taskEndTime
=
requirementsEditVO
.
getTaskEndTime
();
this
.
taskStartTime
=
requirementsEditVO
.
getTaskStartTime
();
this
.
serviceId
=
requirementsEditVO
.
getServiceId
();
this
.
requireDescription
=
requirementsEditVO
.
getRequireDescription
();
this
.
taskAddress
=
requirementsEditVO
.
getTaskAddress
();
this
.
longitude
=
requirementsEditVO
.
getLongitude
();
this
.
latitude
=
requirementsEditVO
.
getLatitude
();
this
.
adcode
=
requirementsEditVO
.
getAdcode
();
this
.
orderAmount
=
requirementsEditVO
.
getOrderAmount
();
}
}
release-service/src/main/java/com/mmc/csf/release/entity/requirements/RequirementsServiceDO.java
浏览文件 @
4ea438a2
...
...
@@ -68,8 +68,10 @@ public class RequirementsServiceDO implements Serializable {
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"任务佣金"
)
@IsNullConvertZero
private
BigDecimal
percentagePenaltyOfOrder
;
@ApiModelProperty
(
value
=
"发布者订单的任务佣金"
)
@IsNullConvertZero
private
BigDecimal
orderAmount
;
@ApiModelProperty
(
value
=
"抢单者openid"
)
private
String
openid
;
...
...
@@ -79,4 +81,6 @@ public class RequirementsServiceDO implements Serializable {
this
.
pilotCertificationUserId
=
pilot
.
getUserAccountId
();
this
.
requirementsInfoId
=
requirementsInfoDO
.
getId
();
}
}
release-service/src/main/java/com/mmc/csf/release/service/RequirementsService.java
浏览文件 @
4ea438a2
...
...
@@ -2,10 +2,7 @@ package com.mmc.csf.release.service;
import
com.mmc.csf.common.util.page.PageResult
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.infomation.dto.FlowDictionaryDTO
;
import
com.mmc.csf.infomation.dto.ServiceArriveSceneDTO
;
import
com.mmc.csf.infomation.dto.ServiceFulfilATaskDTO
;
import
com.mmc.csf.infomation.dto.ServiceSettleAccountsDTO
;
import
com.mmc.csf.infomation.dto.*
;
import
com.mmc.csf.infomation.qo.IndustryCaseQO
;
import
com.mmc.csf.infomation.qo.MyPreemptQO
;
import
com.mmc.csf.infomation.qo.MyPublishQO
;
...
...
@@ -96,6 +93,8 @@ public interface RequirementsService {
ResultBody
publisherNumber
(
GetOrderNumberVO
getOrderNumberVO
,
HttpServletRequest
request
);
ResultBody
updatePublisherNumber
(
GetOrderNumberUpdateVO
getOrderNumberUpdateVO
,
HttpServletRequest
request
);
PageResult
myPreempt
(
Integer
userAccountId
,
MyPreemptQO
param
);
ResultBody
droneFlyerCancel
(
Integer
requirementsInfoId
,
Integer
userAccountId
,
HttpServletRequest
request
);
...
...
@@ -112,4 +111,8 @@ public interface RequirementsService {
ResultBody
confirmSettlement
(
Integer
userAccountId
,
Integer
requirementsInfoId
);
ResultBody
orderRequirements
(
String
format
);
ResultBody
updateServicePublish
(
ServiceRequirementsEditVO
requirementsInfoVO
,
HttpServletRequest
request
);
ResultBody
<
FlowDictionaryAndTimeDTO
>
flowDictionaryAndTime
(
Integer
requirementsInfoId
);
}
release-service/src/main/java/com/mmc/csf/release/service/impl/RequirementsServiceImpl.java
浏览文件 @
4ea438a2
...
...
@@ -299,8 +299,15 @@ public class RequirementsServiceImpl implements RequirementsService {
publisherWalletFlowVO
.
setUrgentYxjAmount
(
tempTotalAmount
);
requirementsInfoDO
.
setLevelCashAmount
(
tempTotalAmount
);
}
else
if
(
orderLevelEnum
.
equals
(
"TOP_ORDER"
))
{
publisherWalletFlowVO
.
setTopYxjAmount
(
cashAmt
);
requirementsInfoDO
.
setLevelCashAmount
(
tempTotalAmount
);
if
(
rushAndTop
.
compareTo
(
cashAmt
)
==
1
)
{
publisherWalletFlowVO
.
setTopYxjAmount
(
cashAmt
);
requirementsInfoDO
.
setLevelCashAmount
(
tempTotalAmount
);
}
else
if
(
rushAndTop
.
compareTo
(
cashAmt
)
==
-
1
)
{
// userCashAmt = cashAmt.subtract(rushAndTop);
publisherWalletFlowVO
.
setTopYxjAmount
(
rushAndTop
);
requirementsInfoDO
.
setLevelCashAmount
(
rushAndTop
);
}
}
tempTotalAmount
=
BigDecimal
.
ZERO
;
}
else
{
...
...
@@ -489,6 +496,117 @@ public class RequirementsServiceImpl implements RequirementsService {
}
@Override
public
ResultBody
<
GetOrderNumberDTO
>
updatePublisherNumber
(
GetOrderNumberUpdateVO
getOrderNumberUpdateVO
,
HttpServletRequest
request
)
{
RequirementsInfoDO
requirementsInfoDO
=
requirementsDao
.
publisherCancel
(
getOrderNumberUpdateVO
.
getRequirementsInfoId
(),
getOrderNumberUpdateVO
.
getUserAccountId
());
if
(
requirementsInfoDO
==
null
)
{
return
ResultBody
.
error
(
"只能修改自己发布的服务需求"
);
}
Integer
serviceFlowId
=
requirementsInfoDO
.
getServiceFlowId
();
if
(
serviceFlowId
!=
1
)
{
return
ResultBody
.
error
(
"只有未抢单的信息才能被修改"
);
}
WalletFlowVO
walletFlowVO
=
new
WalletFlowVO
();
PublisherWalletFlowVO
publisherWalletFlowVO
=
new
PublisherWalletFlowVO
();
IsNullConvertZeroUtil
.
checkIsNull
(
publisherWalletFlowVO
);
ApplyRefundVO
applyRefundVO
=
new
ApplyRefundVO
();
//先退款
if
(
requirementsInfoDO
.
getCashAmount
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
||
requirementsInfoDO
.
getSalaryAmount
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
{
publisherWalletFlowVO
.
setModeOfPayment
(
200
);
publisherWalletFlowVO
.
setUserAccountId
(
requirementsInfoDO
.
getUserAccountId
());
publisherWalletFlowVO
.
setOperateUserAccountId
(
requirementsInfoDO
.
getUserAccountId
());
publisherWalletFlowVO
.
setSalaryAmount
(
requirementsInfoDO
.
getSalaryAmount
());
publisherWalletFlowVO
.
setCashAmount
(
requirementsInfoDO
.
getCashAmount
());
walletFlowVO
.
setPublisherWalletFlowVO
(
publisherWalletFlowVO
);
flyerCancel
(
walletFlowVO
,
request
.
getHeader
(
"token"
));
}
//退回微信的钱
if
(
requirementsInfoDO
.
getWechatPayOrderNumber
()
!=
null
&&
requirementsInfoDO
.
getWeChat
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
{
BigDecimal
weChat
=
requirementsInfoDO
.
getWeChat
();
BigDecimal
multiply
=
weChat
.
multiply
(
new
BigDecimal
(
100
));
Long
longWeChat
=
multiply
.
longValue
();
applyRefundVO
.
setRefund
(
longWeChat
);
applyRefundVO
.
setOutTradeNo
(
requirementsInfoDO
.
getWechatPayOrderNumber
());
applyRefundVO
.
setReason
(
"退发布者微信支付的任务佣金"
);
applyRefund
(
applyRefundVO
,
request
.
getHeader
(
"token"
));
}
// requirementsDao.updateInfo(requirementsInfoDO.getId(), 7);
// requirementsDao.updateServiceAmount(requirementsInfoDO.getId());
RequirementsServiceDO
requirementsServiceDO
=
new
RequirementsServiceDO
();
//用户钱包信息接口
ResultBody
resultBody
=
getCurrentUserPayWalletInfo
(
request
);
GetOrderNumberDTO
orderNumberDTO
=
new
GetOrderNumberDTO
();
IsNullConvertZeroUtil
.
checkIsNull
(
orderNumberDTO
);
orderNumberDTO
.
setUserAccountId
(
getOrderNumberUpdateVO
.
getUserAccountId
());
PayWalletDTO
payWalletDTO
=
(
PayWalletDTO
)
resultBody
.
getResult
();
//用户云享金+用户佣金>总金额
//剩余后台云享金
BigDecimal
cashAmt
=
payWalletDTO
.
getCashAmt
();
//剩余佣金
BigDecimal
salaryAmt
=
payWalletDTO
.
getSalaryAmt
();
//需要支付的总金额
BigDecimal
orderAmount
=
getOrderNumberUpdateVO
.
getOrderAmount
();
String
paymentType
=
getOrderNumberUpdateVO
.
getPaymentType
();
String
[]
split
=
paymentType
.
split
(
","
);
Set
<
String
>
collect
=
Arrays
.
asList
(
split
).
stream
().
collect
(
Collectors
.
toSet
());
TreeSet
<
String
>
objects
=
new
TreeSet
<>(
collect
);
BigDecimal
tempTotalAmount
=
orderAmount
;
//不存在加急或者置顶
for
(
String
type
:
objects
)
{
switch
(
type
)
{
case
"1"
:
if
(!(
tempTotalAmount
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
))
{
if
(
cashAmt
.
compareTo
(
tempTotalAmount
)
==
1
||
cashAmt
.
compareTo
(
tempTotalAmount
)
==
0
)
{
requirementsServiceDO
.
setCashAmount
(
tempTotalAmount
);
// walletFlowVO.setCashAmount(tempTotalAmount);
tempTotalAmount
=
BigDecimal
.
ZERO
;
}
else
{
tempTotalAmount
=
tempTotalAmount
.
subtract
(
cashAmt
);
requirementsServiceDO
.
setCashAmount
(
cashAmt
);
// walletFlowVO.setCashAmount(cashAmt);
}
}
break
;
case
"2"
:
if
(!(
tempTotalAmount
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
))
{
if
(
salaryAmt
.
compareTo
(
tempTotalAmount
)
==
1
||
salaryAmt
.
compareTo
(
tempTotalAmount
)
==
0
)
{
requirementsServiceDO
.
setSalaryAmount
(
tempTotalAmount
);
tempTotalAmount
=
BigDecimal
.
ZERO
;
}
else
{
tempTotalAmount
=
tempTotalAmount
.
subtract
(
salaryAmt
);
requirementsServiceDO
.
setSalaryAmount
(
salaryAmt
);
}
}
break
;
case
"3"
:
if
(!(
tempTotalAmount
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
))
{
requirementsServiceDO
.
setWeChat
(
tempTotalAmount
);
tempTotalAmount
=
BigDecimal
.
ZERO
;
}
break
;
default
:
break
;
}
}
if
(
tempTotalAmount
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
//表示订单计算完成,需要支付的钱都算出来了
System
.
out
.
println
(
requirementsServiceDO
.
getWechatPayOrderNumber
());
if
(
orderNumberDTO
.
getWeChatPay
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
{
orderNumberDTO
.
setWeChatPay
(
requirementsServiceDO
.
getWeChat
());
orderNumberDTO
.
setPaymentOrderNumber
(
randomOrderCode
());
stringRedisTemplate
.
opsForValue
().
set
(
orderNumberDTO
.
getPaymentOrderNumber
(),
JsonUtil
.
parseObjToJson
(
orderNumberDTO
));
}
return
ResultBody
.
success
(
orderNumberDTO
);
}
else
{
//云享金和佣金扣除完成,但是还不足支付订单金额,并且没有选择微信支付,所以支付不合法
return
ResultBody
.
success
(
"下单失败"
);
}
}
@Override
public
PageResult
myPreempt
(
Integer
userAccountId
,
MyPreemptQO
param
)
{
Integer
pageNo
=
param
.
getPageNo
();
param
.
buildCurrentPage
();
...
...
@@ -880,12 +998,33 @@ public class RequirementsServiceImpl implements RequirementsService {
@Override
public
ResultBody
orderRequirements
(
String
format
)
{
List
<
RequirementsInfoDO
>
requirementsInfoDOS
=
requirementsDao
.
orderRequirements
(
format
);
IsNullConvertZeroUtil
.
checkIsNull
(
requirementsInfoDOS
);
WalletFlowVO
walletFlowVO
=
new
WalletFlowVO
();
PublisherWalletFlowVO
publisherWalletFlowVO
=
new
PublisherWalletFlowVO
();
IsNullConvertZeroUtil
.
checkIsNull
(
publisherWalletFlowVO
);
ApplyRefundVO
applyRefundVO
=
new
ApplyRefundVO
();
for
(
RequirementsInfoDO
requirementsInfoDO
:
requirementsInfoDOS
)
{
BigDecimal
cashAmount
=
requirementsInfoDO
.
getCashAmount
();
BigDecimal
salaryAmount
=
requirementsInfoDO
.
getSalaryAmount
();
BigDecimal
weChat
=
requirementsInfoDO
.
getWeChat
();
String
wechatPayOrderNumber
=
requirementsInfoDO
.
getWechatPayOrderNumber
();
if
(
requirementsInfoDO
.
getCashAmount
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
||
requirementsInfoDO
.
getSalaryAmount
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
{
publisherWalletFlowVO
.
setModeOfPayment
(
200
);
publisherWalletFlowVO
.
setUserAccountId
(
requirementsInfoDO
.
getUserAccountId
());
publisherWalletFlowVO
.
setOperateUserAccountId
(
requirementsInfoDO
.
getUserAccountId
());
publisherWalletFlowVO
.
setSalaryAmount
(
requirementsInfoDO
.
getSalaryAmount
());
publisherWalletFlowVO
.
setCashAmount
(
requirementsInfoDO
.
getCashAmount
());
walletFlowVO
.
setPublisherWalletFlowVO
(
publisherWalletFlowVO
);
flyerCancel
(
walletFlowVO
,
""
);
}
if
(
requirementsInfoDO
.
getWechatPayOrderNumber
()
!=
null
&&
requirementsInfoDO
.
getWeChat
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
{
BigDecimal
weChat
=
requirementsInfoDO
.
getWeChat
();
BigDecimal
multiply
=
weChat
.
multiply
(
new
BigDecimal
(
100
));
Long
longWeChat
=
multiply
.
longValue
();
applyRefundVO
.
setRefund
(
longWeChat
);
applyRefundVO
.
setOutTradeNo
(
requirementsInfoDO
.
getWechatPayOrderNumber
());
applyRefundVO
.
setReason
(
"退发布者微信支付的任务佣金"
);
applyRefund
(
applyRefundVO
,
""
);
}
requirementsDao
.
updateInfo
(
requirementsInfoDO
.
getId
(),
7
);
}
...
...
@@ -893,6 +1032,129 @@ public class RequirementsServiceImpl implements RequirementsService {
return
ResultBody
.
success
(
requirementsInfoDOS
);
}
@Override
public
ResultBody
updateServicePublish
(
ServiceRequirementsEditVO
requirementsEditVO
,
HttpServletRequest
request
)
{
RequirementsInfoDO
requirementsInfoDO
=
requirementsDao
.
publisherCancel
(
requirementsEditVO
.
getRequirementsInfoId
(),
requirementsEditVO
.
getUserAccountId
());
RequirementsAmountDO
amountDO
=
new
RequirementsAmountDO
(
requirementsEditVO
);
RequirementsInfoDO
infoDO
=
new
RequirementsInfoDO
(
requirementsEditVO
);
if
(
requirementsInfoDO
==
null
)
{
return
ResultBody
.
error
(
"只能修改自己发布的服务需求"
);
}
Integer
serviceFlowId
=
requirementsInfoDO
.
getServiceFlowId
();
if
(
serviceFlowId
!=
1
)
{
return
ResultBody
.
error
(
"只有未抢单的信息才能被修改"
);
}
WalletFlowVO
walletFlowVO
=
new
WalletFlowVO
();
PublisherWalletFlowVO
publisherWalletFlowVO
=
new
PublisherWalletFlowVO
();
IsNullConvertZeroUtil
.
checkIsNull
(
publisherWalletFlowVO
);
ApplyRefundVO
applyRefundVO
=
new
ApplyRefundVO
();
//用户钱包信息接口
ResultBody
resultBody
=
getCurrentUserPayWalletInfo
(
request
);
GetOrderNumberDTO
orderNumberDTO
=
new
GetOrderNumberDTO
();
orderNumberDTO
.
setUserAccountId
(
requirementsEditVO
.
getUserAccountId
());
PayWalletDTO
payWalletDTO
=
(
PayWalletDTO
)
resultBody
.
getResult
();
//剩余后台云享金
BigDecimal
cashAmt
=
payWalletDTO
.
getCashAmt
();
//剩余佣金
BigDecimal
salaryAmt
=
payWalletDTO
.
getSalaryAmt
();
BigDecimal
orderAmount
=
requirementsEditVO
.
getOrderAmount
();
String
paymentType
=
requirementsEditVO
.
getPaymentType
();
String
[]
split
=
paymentType
.
split
(
","
);
Set
<
String
>
collect
=
Arrays
.
asList
(
split
).
stream
().
collect
(
Collectors
.
toSet
());
TreeSet
<
String
>
objects
=
new
TreeSet
<>(
collect
);
//订单重新添加
// RequirementsInfoDO infoDO = new RequirementsInfoDO(requirementsEditVO);
BigDecimal
tempTotalAmount
=
new
BigDecimal
(
0
);
String
json
=
stringRedisTemplate
.
opsForValue
().
get
(
requirementsInfoDO
.
getWechatPayOrderNumber
()
+
requirementsInfoDO
.
getUserAccountId
());
GetOrderNumberDTO
getOrderNumberDTO
=
JSONObject
.
parseObject
(
json
,
GetOrderNumberDTO
.
class
);
if
(
getOrderNumberDTO
==
null
)
{
return
ResultBody
.
error
(
"订单支付失败"
);
}
tempTotalAmount
=
orderAmount
;
for
(
String
type
:
objects
)
{
switch
(
type
)
{
case
"1"
:
if
(!(
tempTotalAmount
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
))
{
if
(
cashAmt
.
compareTo
(
tempTotalAmount
)
==
1
||
cashAmt
.
compareTo
(
tempTotalAmount
)
==
0
)
{
amountDO
.
setCashAmount
(
tempTotalAmount
);
// walletFlowVO.setCashAmount(tempTotalAmount);
tempTotalAmount
=
BigDecimal
.
ZERO
;
}
else
{
tempTotalAmount
=
tempTotalAmount
.
subtract
(
cashAmt
);
amountDO
.
setCashAmount
(
cashAmt
);
// walletFlowVO.setCashAmount(cashAmt);
}
}
break
;
case
"2"
:
if
(!(
tempTotalAmount
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
))
{
if
(
salaryAmt
.
compareTo
(
tempTotalAmount
)
==
1
||
salaryAmt
.
compareTo
(
tempTotalAmount
)
==
0
)
{
amountDO
.
setSalaryAmount
(
tempTotalAmount
);
tempTotalAmount
=
BigDecimal
.
ZERO
;
}
else
{
tempTotalAmount
=
tempTotalAmount
.
subtract
(
salaryAmt
);
amountDO
.
setSalaryAmount
(
salaryAmt
);
}
}
break
;
case
"3"
:
if
(!(
tempTotalAmount
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
))
{
amountDO
.
setWeChat
(
tempTotalAmount
);
tempTotalAmount
=
BigDecimal
.
ZERO
;
}
break
;
default
:
break
;
}
}
if
(
tempTotalAmount
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
requirementsDao
.
InsertRequirementsAmountLog
(
requirementsInfoDO
);
requirementsDao
.
updateRequirementsInfo
(
infoDO
);
BigDecimal
add
=
amountDO
.
getOrderAmount
().
add
(
requirementsInfoDO
.
getOrderLevelAmount
());
amountDO
.
setTotalAmount
(
add
);
BigDecimal
totalAmount
=
amountDO
.
getTotalAmount
();
requirementsDao
.
updateAmount
(
amountDO
);
return
ResultBody
.
success
();
}
else
{
//云享金和佣金扣除完成,但是还不足支付订单金额,并且没有选择微信支付,所以支付不合法
return
ResultBody
.
success
(
"下单失败"
);
}
/*Integer publish = requirementsDao.findPublish(requirementsInfoDO);
if (publish == 0) {
return ResultBody.error(ResultEnum.YOU_CANNOT_MODIFY_REQUIREMENTS_PUBLISHED_BY_OTHERS);
}*/
// requirementsDao.updatePublish(requirementsInfoDO);
//return ResultBody.success();
// return null;
}
@Override
public
ResultBody
<
FlowDictionaryAndTimeDTO
>
flowDictionaryAndTime
(
Integer
requirementsInfoId
)
{
FlowDictionaryAndTimeDTO
flowDictionaryAndTimeDTO
=
new
FlowDictionaryAndTimeDTO
();
//抢单
RequirementsServiceDTO
requirementsServiceDTO
=
requirementsDao
.
requirementsServiceDTO
(
requirementsInfoId
);
flowDictionaryAndTimeDTO
.
setRequirementsServiceDTO
(
requirementsServiceDTO
);
//抵达现场
ServiceArriveSceneDTO
arriveSceneDTO
=
requirementsDao
.
serviceArriveSceneDTO
(
requirementsInfoId
);
flowDictionaryAndTimeDTO
.
setServiceArriveSceneDTO
(
arriveSceneDTO
);
//完成任务
ServiceFulfilATaskDTO
fulfilATaskDTO
=
requirementsDao
.
serviceFulfilATaskDTO
(
requirementsInfoId
);
flowDictionaryAndTimeDTO
.
setServiceFulfilATaskDTO
(
fulfilATaskDTO
);
//结算
ServiceSettleAccountsDTO
settleAccountsDTO
=
requirementsDao
.
settleAccountsDTO
(
requirementsInfoId
);
flowDictionaryAndTimeDTO
.
setServiceSettleAccountsDTO
(
settleAccountsDTO
);
//评价
ServiceEvaluateDTO
serviceEvaluateDTO
=
requirementsDao
.
serviceEvaluateDTO
(
requirementsInfoId
);
flowDictionaryAndTimeDTO
.
setServiceEvaluateDTO
(
serviceEvaluateDTO
);
return
ResultBody
.
success
(
flowDictionaryAndTimeDTO
);
}
@Override
public
ResultBody
publishService
(
ServiceRequirementsVO
serviceRequirementsVO
,
HttpServletRequest
request
)
{
...
...
@@ -954,8 +1216,16 @@ public class RequirementsServiceImpl implements RequirementsService {
publisherWalletFlowVO
.
setUrgentYxjAmount
(
tempTotalAmount
);
requirementsInfoDO
.
setLevelCashAmount
(
tempTotalAmount
);
}
else
if
(
orderLevelEnum
.
equals
(
"TOP_ORDER"
))
{
publisherWalletFlowVO
.
setTopYxjAmount
(
cashAmt
);
requirementsInfoDO
.
setLevelCashAmount
(
tempTotalAmount
);
if
(
rushAndTop
.
compareTo
(
cashAmt
)
==
1
)
{
publisherWalletFlowVO
.
setTopYxjAmount
(
cashAmt
);
requirementsInfoDO
.
setLevelCashAmount
(
tempTotalAmount
);
}
else
if
(
rushAndTop
.
compareTo
(
cashAmt
)
==
-
1
)
{
// userCashAmt = cashAmt.subtract(rushAndTop);
publisherWalletFlowVO
.
setTopYxjAmount
(
rushAndTop
);
requirementsInfoDO
.
setLevelCashAmount
(
rushAndTop
);
}
// publisherWalletFlowVO.setTopYxjAmount(cashAmt);
// requirementsInfoDO.setLevelCashAmount(tempTotalAmount);
}
tempTotalAmount
=
BigDecimal
.
ZERO
;
}
else
{
...
...
@@ -967,8 +1237,16 @@ public class RequirementsServiceImpl implements RequirementsService {
}
else
if
(
orderLevelEnum
.
equals
(
"TOP_ORDER"
))
{
System
.
out
.
println
(
cashAmt
);
publisherWalletFlowVO
.
setTopYxjAmount
(
cashAmt
);
requirementsInfoDO
.
setLevelCashAmount
(
cashAmt
);
//publisherWalletFlowVO.setTopYxjAmount(cashAmt);
//requirementsInfoDO.setLevelCashAmount(cashAmt);
if
(
rushAndTop
.
compareTo
(
cashAmt
)
==
1
)
{
publisherWalletFlowVO
.
setTopYxjAmount
(
cashAmt
);
requirementsInfoDO
.
setLevelCashAmount
(
tempTotalAmount
);
}
else
if
(
rushAndTop
.
compareTo
(
cashAmt
)
==
-
1
)
{
// userCashAmt = cashAmt.subtract(rushAndTop);
publisherWalletFlowVO
.
setTopYxjAmount
(
rushAndTop
);
requirementsInfoDO
.
setLevelCashAmount
(
rushAndTop
);
}
}
}
}
...
...
@@ -985,7 +1263,6 @@ public class RequirementsServiceImpl implements RequirementsService {
publisherWalletFlowVO
.
setTopSalaryAmount
(
tempTotalAmount
);
requirementsInfoDO
.
setLevelSalaryAmount
(
tempTotalAmount
);
}
tempTotalAmount
=
BigDecimal
.
ZERO
;
}
else
{
tempTotalAmount
=
tempTotalAmount
.
subtract
(
salaryAmt
);
...
...
@@ -1507,6 +1784,7 @@ public class RequirementsServiceImpl implements RequirementsService {
return
ResultBody
.
success
();
}
public
ResultBody
feignWalletFlow
(
PublisherWalletFlowVO
publisherWalletFlowVO
,
String
token
)
{
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
APPLICATION_JSON
);
...
...
release-service/src/main/java/com/mmc/csf/release/timerTask/ServiceTakeDownTask.java
浏览文件 @
4ea438a2
package
com
.
mmc
.
csf
.
release
.
timerTask
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.release.service.RequirementsService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
/**
* @Author small
* @Date 2023/8/24 20:59
* @Version 1.0
*/
/
*
@EnableScheduling
/
/
@EnableScheduling
@Component
public
class
ServiceTakeDownTask
{
@Autowired
private
RequirementsService
requirementsService
;
//0 30 0 * * ?
*
//0 30 0 * * ?
//* * * * * ?
@Scheduled(cron = "0 30 0 * * ?
*
")
@Scheduled
(
cron
=
"0 30 0 * * ?"
)
public
void
orderCheck
()
{
String
format
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
...
...
@@ -22,4 +31,4 @@ public class ServiceTakeDownTask {
System
.
out
.
println
(
resultBody
);
System
.
out
.
println
(
"查询订单失效"
);
}
}
*/
}
release-service/src/main/resources/mapper/requirements/RequirementsDao.xml
浏览文件 @
4ea438a2
...
...
@@ -31,11 +31,69 @@
#{latitude}, #{requireUrl}, #{publisherNumber});
</insert>
<insert
id=
"InsertRequirementsAmountLog"
parameterType=
"com.mmc.csf.release.entity.requirements.RequirementsInfoDO"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
INSERT INTO requirements_amount_log(requirements_info_id, user_account_id, create_time, update_time,
order_amount,
total_amount, order_level_amount, order_level, cash_amount, we_chat,
salary_amount, wechat_pay_order_number, level_cash_amount,
level_we_chat_amount, level_salary_amount)
VALUES (#{id}, #{userAccountId}, NOW(), NOW(), #{orderAmount},
#{totalAmount}, #{orderLevelAmount}, #{orderLevel}, #{cashAmount}, #{weChat},
#{salaryAmount}, #{wechatPayOrderNumber}, #{levelCashAmount}, #{levelWeChatAmount},
#{levelSalaryAmount});
</insert>
<update
id=
"solveRequire"
>
update requirements_info
set is_solved = 1
where id = #{requirementsInfoId}
</update>
<update
id=
"updateRequirementsInfo"
parameterType=
"com.mmc.csf.release.entity.requirements.RequirementsInfoDO"
>
update requirements_info
<set>
<if
test=
" requireDescription != null and requireDescription!='' "
>
require_description = #{requireDescription},
</if>
<if
test=
" taskStartTime != null "
>
task_start_time = #{taskStartTime},
</if>
<if
test=
" taskEndTime != null "
>
task_end_time = #{taskEndTime},
</if>
<if
test=
" taskAddress != null "
>
task_address = #{taskAddress},
</if>
<if
test=
" longitude != null "
>
longitude = #{longitude},
</if>
<if
test=
" insurance != null and insurance != ' ' "
>
insurance = #{insurance},
</if>
<if
test=
" adcode != null and adcode != ' ' "
>
adcode = #{adcode},
</if>
update_time=NOW(),
service_flow_id=1
</set>
where id=#{id}
</update>
<update
id=
"updateAmount"
parameterType=
"com.mmc.csf.release.entity.requirements.RequirementsAmountDO"
>
update requirements_amount
<set>
order_amount = #{orderAmount},
total_amount = #{totalAmount},
cash_amount = #{cashAmount},
we_chat = #{weChat},
salary_amount = #{salaryAmount},
<if
test=
" wechatPayOrderNumber != null and wechatPayOrderNumber != '' "
>
wechat_pay_order_number = #{wechatPayOrderNumber},
</if>
update_time=NOW()
</set>
where requirements_info_id=#{requirementsInfoId}
</update>
<delete
id=
"removeRequire"
>
delete
...
...
@@ -355,10 +413,11 @@
INSERT INTO requirements_service(requirements_info_id, pilot_certification_id,
pilot_certification_user_id, team_id, team_user_id, cash_amount, we_chat,
salary_amount,
wechat_pay_order_number, service_flow_id, preempt_total_amount, openid)
wechat_pay_order_number, service_flow_id, preempt_total_amount, openid,
create_time, update_time)
VALUES (#{requirementsInfoId}, #{pilotCertificationId}, #{pilotCertificationUserId},
#{teamId}, #{teamUserId}, #{cashAmount}, #{weChat}, #{salaryAmount}, #{wechatPayOrderNumber}, 2,
#{preemptTotalAmount}, #{openid});
#{preemptTotalAmount}, #{openid}
, NOW(), NOW()
);
</insert>
<insert
id=
"arriveAtTheScene"
parameterType=
"com.mmc.csf.release.entity.requirements.ServiceArriveSceneDO"
...
...
@@ -564,7 +623,6 @@
sf.flyer_port,
sf.order_status,
ri.publish,
rs.preempt_total_amount,
ra.order_level,
ra.order_amount,
ri.service_flow_id,
...
...
@@ -575,11 +633,20 @@
FROM requirements_info ri
LEFT JOIN requirements_type rt ON rt.id = ri.requirement_type_id
LEFT JOIN service_flow sf ON sf.id = ri.service_flow_id
LEFT JOIN requirements_amount ra ON ra.requirements_info_id = ri.id
INNER JOIN requirements_service rs ON ri.id = rs.requirements_info_id
INNER JOIN requirements_amount ra ON ra.requirements_info_id = ri.id
WHERE ri.service_flow_id = 1
AND publish = 1
and ri.task_end_time
<
#{format}
</select>
<update
id=
"updateServiceAmount"
>
UPDATE requirements_amount
set cash_amount= 0,
we_chat=0,
salary_amount=0,
wechat_pay_order_number= null,
update_time=NOW()
where requirements_info_id = #{id}
</update>
<select
id=
"droneFlyerCancel"
resultType=
"com.mmc.csf.release.entity.requirements.RequirementsServiceDO"
>
SELECT ri.id,
ri.task_title,
...
...
@@ -661,9 +728,11 @@
ri.service_flow_id,
rs.pilot_certification_user_id,
rs.openid as flyerOpenid,
ri.create_time
ri.create_time,
ra.order_level_amount
FROM requirements_info ri
LEFT JOIN requirements_type rt ON rt.id = ri.requirement_type_id
LEFT JOIN requirements_type rt
ON rt.id = ri.requirement_type_id
LEFT JOIN service_flow sf ON sf.id = ri.service_flow_id
LEFT JOIN requirements_amount ra ON ra.requirements_info_id = ri.id
LEFT JOIN requirements_service rs ON rs.requirements_info_id = ri.id
...
...
@@ -679,4 +748,132 @@
doing
FROM service_flow
</select>
<resultMap
id=
"resultMap"
type=
"com.mmc.csf.infomation.dto.RequirementsServiceDTO"
>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"requirementsInfoId"
column=
"requirements_info_id"
/>
<result
property=
"serviceFlowId"
column=
"service_flow"
/>
<collection
property=
"flowDictionaryDTO"
ofType=
"com.mmc.csf.infomation.dto.FlowDictionaryDTO"
select=
"selectServiceFlow"
column=
"{serviceFlowId=service_flow}"
>
</collection>
</resultMap>
<resultMap
id=
"resultMapCommon"
type=
"com.mmc.csf.infomation.dto.ServiceArriveSceneDTO"
>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"requirementsInfoId"
column=
"requirements_info_id"
/>
<result
property=
"serviceFlowId"
column=
"service_flow"
/>
<collection
property=
"flowDictionaryDTO"
ofType=
"com.mmc.csf.infomation.dto.FlowDictionaryDTO"
select=
"selectServiceFlow"
column=
"{serviceFlowId=service_flow_id}"
>
</collection>
</resultMap>
<resultMap
id=
"serviceFulfilATaskMap"
type=
"com.mmc.csf.infomation.dto.ServiceFulfilATaskDTO"
>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"requirementsInfoId"
column=
"requirements_info_id"
/>
<result
property=
"serviceFlowId"
column=
"service_flow"
/>
<collection
property=
"flowDictionaryDTO"
ofType=
"com.mmc.csf.infomation.dto.FlowDictionaryDTO"
select=
"selectServiceFlow"
column=
"{serviceFlowId=service_flow_id}"
>
</collection>
</resultMap>
<resultMap
id=
"settleAccountsMap"
type=
"com.mmc.csf.infomation.dto.ServiceSettleAccountsDTO"
>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"requirementsInfoId"
column=
"requirements_info_id"
/>
<result
property=
"serviceFlowId"
column=
"service_flow"
/>
<collection
property=
"flowDictionaryDTO"
ofType=
"com.mmc.csf.infomation.dto.FlowDictionaryDTO"
select=
"selectServiceFlow"
column=
"{serviceFlowId=service_flow_id}"
>
</collection>
</resultMap>
<resultMap
id=
"serviceEvaluateMap"
type=
"com.mmc.csf.infomation.dto.ServiceEvaluateDTO"
>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"requirementsInfoId"
column=
"requirements_info_id"
/>
<result
property=
"serviceFlowId"
column=
"service_flow"
/>
<collection
property=
"flowDictionaryDTO"
ofType=
"com.mmc.csf.infomation.dto.FlowDictionaryDTO"
select=
"selectServiceFlow"
column=
"{serviceFlowId=service_flow_id}"
>
</collection>
</resultMap>
<select
id=
"selectServiceFlow"
resultType=
"com.mmc.csf.infomation.dto.FlowDictionaryDTO"
>
SELECT id,
waiting,
order_status,
user_port,
flyer_port,
doing
FROM service_flow
where id = #{serviceFlowId}
</select>
<select
id=
"requirementsServiceDTO"
resultMap=
"resultMap"
>
select requirements_info_id, create_time, update_time, service_flow
from requirements_service
where requirements_info_id = #{requirementsInfoId}
</select>
<select
id=
"serviceArriveSceneDTO"
resultMap=
"resultMapCommon"
>
SELECT id,
longitude,
latitude,
scene_address,
scene_url,
user_account_id,
create_time,
update_time,
requirements_info_id,
service_flow_id
FROM service_arrive_scene
where requirements_info_id = #{requirementsInfoId}
</select>
<select
id=
"serviceFulfilATaskDTO"
resultMap=
"serviceFulfilATaskMap"
>
SELECT id,
task_describe,
task_url,
create_time,
update_time,
requirements_info_id,
user_account_id,
service_flow_id
FROM service_fulfil_a_task
WHERE requirements_info_id = #{requirementsInfoId}
</select>
<select
id=
"settleAccountsDTO"
resultMap=
"settleAccountsMap"
>
SELECT id,
order_amount,
requirements_info_id,
create_time,
update_time,
user_account_id,
service_flow_id
FROM service_settle_accounts
WHERE requirements_info_id = #{requirementsInfoId}
</select>
<select
id=
"serviceEvaluateDTO"
resultMap=
"serviceEvaluateMap"
>
SELECT id,
evaluation_content,
star_level,
evaluation_url,
create_time,
update_time,
requirements_info_id,
user_account_id,
service_flow_id
FROM service_evaluate
WHERE requirements_info_id = #{requirementsInfoId}
</select>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论