Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
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
项目统一框架
amos-boot-biz
Commits
7269594a
Commit
7269594a
authored
Aug 09, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口测试修正
parent
0f0285dd
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
84 additions
and
51 deletions
+84
-51
BaseDto.java
...in/java/com/yeejoin/amos/boot/biz/common/dto/BaseDto.java
+7
-1
IDispatchPaperService.java
...os/boot/module/tzs/api/service/IDispatchPaperService.java
+3
-3
DispatchPaperController.java
...ot/module/tzs/biz/controller/DispatchPaperController.java
+5
-12
AlertCalledServiceImpl.java
...t/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
+6
-6
DispatchPaperServiceImpl.java
...module/tzs/biz/service/impl/DispatchPaperServiceImpl.java
+36
-16
DispatchTaskServiceImpl.java
.../module/tzs/biz/service/impl/DispatchTaskServiceImpl.java
+22
-12
RescueProcessServiceImpl.java
...module/tzs/biz/service/impl/RescueProcessServiceImpl.java
+5
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/dto/BaseDto.java
View file @
7269594a
...
...
@@ -5,6 +5,8 @@ import java.util.Date;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -30,10 +32,14 @@ public class BaseDto implements Serializable{
protected
Date
recDate
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"更新人"
)
@ApiModelProperty
(
value
=
"更新人
id
"
)
protected
String
recUserId
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"更新人"
)
protected
String
recUserName
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"是否删除"
)
private
Boolean
isDelete
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/service/IDispatchPaperService.java
View file @
7269594a
...
...
@@ -34,7 +34,7 @@ public interface IDispatchPaperService {
* @param alertId
* @return
*/
DispatchSaveFeedbackDto
getDispatchSaveFeedbackDtoByAlertId
(
Long
alertId
,
AgencyUserModel
feedbackUser
);
DispatchSaveFeedbackDto
getDispatchSaveFeedbackDtoByAlertId
(
Long
alertId
);
/**
* 坐席填写救援回访相关信息
...
...
@@ -48,7 +48,7 @@ public interface IDispatchPaperService {
* @param alertId
* @return
*/
DispatchRepairFeedbackDto
getDispatchRepairFeedbackDtoByAlertId
(
Long
alertId
,
AgencyUserModel
feedbackUser
);
DispatchRepairFeedbackDto
getDispatchRepairFeedbackDtoByAlertId
(
Long
alertId
);
/**
...
...
@@ -63,7 +63,7 @@ public interface IDispatchPaperService {
* @param alertId
* @return
*/
DispatchConsultFeedbackDto
getDispatchConsultFeedbackDtoByAlertId
(
Long
alertId
,
AgencyUserModel
feedbackUser
);
DispatchConsultFeedbackDto
getDispatchConsultFeedbackDtoByAlertId
(
Long
alertId
);
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/DispatchPaperController.java
View file @
7269594a
...
...
@@ -54,10 +54,8 @@ public class DispatchPaperController extends BaseController {
@GetMapping
(
value
=
"/feedback/save/{alertId}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过警情id 获取 救援回访相关信息"
,
notes
=
"通过警情id 获取 救援回访相关信息"
)
public
ResponseModel
<
DispatchSaveFeedbackDto
>
getSaveFeedback
(
@PathVariable
Long
alertId
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
null
!=
redisUtils
.
get
(
buildKey
(
getToken
()))
?
redisUtils
.
get
(
buildKey
(
getToken
())).
toString
()
:
null
,
ReginParams
.
class
);
DispatchSaveFeedbackDto
dispatchSaveFeedbackDto
=
dispatchPaperServiceImpl
.
getDispatchSaveFeedbackDtoByAlertId
(
alertId
,
reginParams
.
getUserModel
());
DispatchSaveFeedbackDto
dispatchSaveFeedbackDto
=
dispatchPaperServiceImpl
.
getDispatchSaveFeedbackDtoByAlertId
(
alertId
);
return
ResponseHelper
.
buildResponse
(
dispatchSaveFeedbackDto
);
}
...
...
@@ -85,10 +83,8 @@ public class DispatchPaperController extends BaseController {
@GetMapping
(
value
=
"/feedback/repair/{alertId}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过警情id 获取 维修回访相关信息"
,
notes
=
"通过警情id 获取 维修回访相关信息"
)
public
ResponseModel
<
DispatchRepairFeedbackDto
>
getRepairFeedBack
(
@PathVariable
Long
alertId
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
null
!=
redisUtils
.
get
(
buildKey
(
getToken
()))
?
redisUtils
.
get
(
buildKey
(
getToken
())).
toString
()
:
null
,
ReginParams
.
class
);
DispatchRepairFeedbackDto
dispatchRepairFeedbackDto
=
dispatchPaperServiceImpl
.
getDispatchRepairFeedbackDtoByAlertId
(
alertId
,
reginParams
.
getUserModel
());
DispatchRepairFeedbackDto
dispatchRepairFeedbackDto
=
dispatchPaperServiceImpl
.
getDispatchRepairFeedbackDtoByAlertId
(
alertId
);
return
ResponseHelper
.
buildResponse
(
dispatchRepairFeedbackDto
);
}
...
...
@@ -116,10 +112,7 @@ public class DispatchPaperController extends BaseController {
@GetMapping
(
value
=
"/feedback/consult/{alertId}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过警情id 获取 投诉回访相关信息"
,
notes
=
"通过警情id 获取 投诉回访相关信息"
)
public
ResponseModel
<
DispatchConsultFeedbackDto
>
getConsultFeedBack
(
@PathVariable
Long
alertId
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
null
!=
redisUtils
.
get
(
buildKey
(
getToken
()))
?
redisUtils
.
get
(
buildKey
(
getToken
())).
toString
()
:
null
,
ReginParams
.
class
);
DispatchConsultFeedbackDto
dispatchConsultFeedbackDto
=
dispatchPaperServiceImpl
.
getDispatchConsultFeedbackDtoByAlertId
(
alertId
,
reginParams
.
getUserModel
());
DispatchConsultFeedbackDto
dispatchConsultFeedbackDto
=
dispatchPaperServiceImpl
.
getDispatchConsultFeedbackDtoByAlertId
(
alertId
);
return
ResponseHelper
.
buildResponse
(
dispatchConsultFeedbackDto
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
View file @
7269594a
...
...
@@ -77,10 +77,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Override
public
Object
selectAlertCalledById
(
Long
id
)
{
if
(
redisUtils
.
hasKey
(
RedisKey
.
ALERTCALLED_ID
+
id
)){
/*
if(redisUtils.hasKey(RedisKey.ALERTCALLED_ID+id)){
Object obj= redisUtils.get(RedisKey.ALERTCALLED_ID+id);
return
obj
;
}
else
{
return
JSON.toJavaObject((JSON) obj,AlertCalledFormDto.class)
;
}else{
*/
// 警情基本信息
AlertCalled
alertCalled
=
this
.
getById
(
id
);
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
...
...
@@ -97,7 +97,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
AlertCalledDto
alertCalledDto
=
BeanDtoVoUtils
.
convert
(
alertCalled
,
AlertCalledDto
.
class
);
AlertCalledVo
alertCalledVo
=
AlertBeanDtoVoUtils
.
convertAlertCalledDtoToVo
(
alertCalledDto
);
QueryWrapper
<
Elevator
>
elevatorQueryWrapper
=
new
QueryWrapper
<>();
elevatorQueryWrapper
.
eq
(
"rescue_code"
,
Integer
.
parseInt
(
alertCalled
.
getDeviceId
()
));
elevatorQueryWrapper
.
eq
(
"rescue_code"
,
alertCalled
.
getDeviceId
(
));
elevatorQueryWrapper
.
eq
(
"register_code"
,
alertCalled
.
getRegistrationCode
());
Elevator
elevator
=
iElevatorService
.
getOne
(
elevatorQueryWrapper
);
if
(
null
!=
elevator
)
{
...
...
@@ -112,9 +112,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
AlertCalledFormDto
alertCalledFormVo
=
new
AlertCalledFormDto
(
alertCalledVo
,
formValue
);
redisUtils
.
set
(
RedisKey
.
ALERTCALLED_ID
+
id
,
JSON
.
toJSON
(
alertCalledFormVo
),
time
);
//
redisUtils.set(RedisKey.ALERTCALLED_ID+id, JSON.toJSON(alertCalledFormVo),time);
return
alertCalledFormVo
;
}
//
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/DispatchPaperServiceImpl.java
View file @
7269594a
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/DispatchTaskServiceImpl.java
View file @
7269594a
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchPaperFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchTaskDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.RescueProcessDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.DispatchPaper
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.DispatchTask
;
...
...
@@ -93,7 +94,17 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
// 创建派遣单
dispatchTaskDto
.
setDispatchTime
(
new
Date
());
DispatchTask
dispatchTask
=
BeanDtoVoUtils
.
convert
(
dispatchTaskDto
,
DispatchTask
.
class
);
dispatchTask
.
setPaperId
(
dispatchPaperDto
.
getSequenceNbr
());
dispatchTask
.
setPaperId
(
dispatchPaperDto
.
getDispatchPaper
().
getSequenceNbr
());
if
(
dispatchPaper
.
getRepairOrgTaskId
()
!=
null
&&
(
dispatchTask
.
getOrgTypeCode
().
equals
(
"levelOneUnit"
)
||
dispatchTask
.
getOrgTypeCode
().
equals
(
"levelTwoUnit"
)))
{
throw
new
BadRequest
(
"已经派遣过其他力量调派"
);
}
if
(
dispatchPaper
.
getUseOrgTaskId
()
!=
null
&&
dispatchTask
.
getOrgTypeCode
().
equals
(
"useUnit"
))
{
throw
new
BadRequest
(
"已经派遣过使用单位"
);
}
if
(
dispatchPaper
.
getRepairOrgTaskId
()
!=
null
&&
dispatchTask
.
getOrgTypeCode
().
equals
(
"repairUnit"
)
)
{
throw
new
BadRequest
(
"已经派遣过维修单位调派"
);
}
flag
=
this
.
save
(
dispatchTask
);
if
(
flag
)
{
// 创建好派遣任务单以后根据任务单类型修改派遣单信息
// 社会信用代码 根据类型查找放入
...
...
@@ -103,6 +114,14 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
UseUnit
useUnit
=
iUseUnitService
.
getById
(
dispatchTask
.
getResponseOrgId
());
dispatchPaper
.
setUseOrgId
(
useUnit
.
getSequenceNbr
());
dispatchPaper
.
setUseOrgTaskId
(
dispatchTask
.
getSequenceNbr
());
if
(
dispatchPaper
.
getAlertCode
().
equals
(
"KRJY"
))
{
dynamicFormAlert
.
stream
().
forEach
(
alertFormValue
->
{
if
(
alertFormValue
.
getFieldCode
().
equals
(
"dispatch_status"
))
{
alertFormValue
.
setFieldValue
(
"已派遣"
);
alertFormValue
.
setFieldValueCode
(
"hasDispatched"
);
}
});
}
break
;
case
"repairUnit"
:
maintenanceUnit
=
iMaintenanceUnitService
.
getById
(
dispatchTask
.
getResponseOrgId
());
...
...
@@ -110,9 +129,6 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
dispatchPaper
.
setRepairOrgTaskId
(
dispatchTask
.
getSequenceNbr
());
break
;
case
"levelOneUnit"
:
if
(
dispatchPaper
.
getRepairOrgId
()
!=
null
)
{
// 已经派遣过调派
throw
new
BadRequest
(
"已经派遣过其他力量调派"
);
}
else
{
maintenanceUnit
=
iMaintenanceUnitService
.
getById
(
dispatchTask
.
getResponseOrgId
());
String
socialCreditCode
=
maintenanceUnit
.
getSocialCreditCode
();
dispatchPaper
.
setRepairOrgId
(
maintenanceUnit
.
getSequenceNbr
());
...
...
@@ -129,13 +145,8 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
alertFormValue
.
setFieldValue
(
socialCreditCode
);
}
});
}
break
;
case
"levelTwoUnit"
:
if
(
dispatchPaper
.
getRepairOrgId
()
!=
null
)
{
// 已经派遣过调派
throw
new
BadRequest
(
"已经派遣过其他力量调派"
);
}
else
{
RescueStation
rescueStation
=
iRescueStationService
.
getById
(
dispatchTask
.
getResponseOrgId
());
dispatchPaper
.
setRepairOrgId
(
rescueStation
.
getSequenceNbr
());
dispatchPaper
.
setRepairOrgTaskId
(
dispatchTask
.
getSequenceNbr
());
...
...
@@ -149,13 +160,12 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
alertFormValue
.
setFieldValueCode
(
"levelTwoUnit"
);
}
});
}
break
;
}
// 保存派遣单
dispatchPaperServiceImpl
.
save
(
dispatchPaper
);
dispatchPaperServiceImpl
.
updateById
(
dispatchPaper
);
// 保存动态表单数据
iAlertFormValueService
.
saveBatch
(
dynamicFormAlert
);
iAlertFormValueService
.
updateBatchById
(
dynamicFormAlert
);
}
return
flag
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/RescueProcessServiceImpl.java
View file @
7269594a
...
...
@@ -88,7 +88,7 @@ public class RescueProcessServiceImpl extends BaseService<RescueProcessDto,Rescu
QueryWrapper
<
RescueProcess
>
templateQueryWrapper
=
new
QueryWrapper
<>();
templateQueryWrapper
.
eq
(
"alert_id"
,
rescueProcessDto
.
getAlertId
());
RescueProcess
rescueProcess
=
this
.
getOne
(
templateQueryWrapper
);
if
(
rescueProcess
!
=
null
)
if
(
rescueProcess
=
=
null
)
throw
new
BadRequest
(
"救援过程信息未找到"
);
if
(
rescueProcessDto
.
getDispatchByUser
())
{
// 手动更新了派遣信息为三级派遣
// 判断是否存在派遣单 不存在先创建派遣单
...
...
@@ -136,6 +136,10 @@ public class RescueProcessServiceImpl extends BaseService<RescueProcessDto,Rescu
iAlertFormValueService
.
saveBatch
(
dynamicFormAlert
);
}
}
rescueProcessDto
.
setSequenceNbr
(
rescueProcess
.
getSequenceNbr
());
rescueProcessDto
.
setRecDate
(
rescueProcess
.
getRecDate
());
rescueProcessDto
.
setRecUserId
(
rescueProcess
.
getRecUserId
());
rescueProcessDto
.
setRecUserName
(
rescueProcess
.
getRecUserName
());
rescueProcess
=
BeanDtoVoUtils
.
convert
(
rescueProcessDto
,
RescueProcess
.
class
);
return
this
.
updateById
(
rescueProcess
);
}
...
...
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