Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
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
hubin
long-tern-care-service
Commits
68c687d0
Commit
68c687d0
authored
Feb 15, 2022
by
黄荣荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
评定相关功能
parent
3e5bc2af
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
748 additions
and
18 deletions
+748
-18
pom.xml
assessment/assessment-service/pom.xml
+1
-0
TaskController.java
...main/java/com/hungraim/ltc/controller/TaskController.java
+256
-15
TaskMapper.java
...ervice/src/main/java/com/hungraim/ltc/dao/TaskMapper.java
+2
-0
PageDto.java
...t-service/src/main/java/com/hungraim/ltc/dto/PageDto.java
+10
-0
QueryDto.java
...-service/src/main/java/com/hungraim/ltc/dto/QueryDto.java
+25
-0
TaskService.java
...e/src/main/java/com/hungraim/ltc/service/TaskService.java
+28
-0
TppesApiException.java
...main/java/com/hungraim/ltc/service/TppesApiException.java
+18
-0
TaskServiceImpl.java
...n/java/com/hungraim/ltc/service/impl/TaskServiceImpl.java
+167
-3
ChDisableEvaluateMapper.xml
...ice/src/main/resources/mapper/ChDisableEvaluateMapper.xml
+22
-0
TaskGroupInfoByPageVO.java
...ungraim/ltc/pojo/vo/assessment/TaskGroupInfoByPageVO.java
+40
-0
SignatureUtil.java
...re/src/main/java/com/hungraim/ltc/util/SignatureUtil.java
+0
-0
SocketCallUtil.java
...e/src/main/java/com/hungraim/ltc/util/SocketCallUtil.java
+173
-0
pom.xml
pom.xml
+6
-0
No files found.
assessment/assessment-service/pom.xml
View file @
68c687d0
...
@@ -84,6 +84,7 @@
...
@@ -84,6 +84,7 @@
<version>
0.0.1
</version>
<version>
0.0.1
</version>
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
assessment/assessment-service/src/main/java/com/hungraim/ltc/controller/TaskController.java
View file @
68c687d0
package
com
.
hungraim
.
ltc
.
controller
;
package
com
.
hungraim
.
ltc
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.dto.QueryDto
;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.assessment.ChAprReport
;
import
com.hungraim.ltc.pojo.entity.assessment.ChAprTask
;
import
com.hungraim.ltc.pojo.entity.assessment.ChRefuseReason
;
import
com.hungraim.ltc.pojo.entity.assessment.ChRefuseReason
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel
;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.service.TaskService
;
import
com.hungraim.ltc.service.TaskService
;
import
com.hungraim.ltc.service.TppesApiException
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.ResultCode
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.*
;
import
java.util.List
;
/**
/**
* 失能评定Controller
* 失能评定Controller
...
@@ -127,16 +131,16 @@ public class TaskController {
...
@@ -127,16 +131,16 @@ public class TaskController {
/**
/**
* 评定报告新增
* 评定报告新增
*
*
@param reportDetailVo
* @param taskId 评定任务id
//
* @param taskId 评定任务id
* @param person1 鉴定人员1id
//
* @param person1 鉴定人员1id
* @param person2 鉴定人员2id
//
* @param person2 鉴定人员2id
* @param person3 鉴定人员3id
//
* @param person3 鉴定人员3id
* @param evaluateTime 评估时间 格式:2020-11-12
//
* @param evaluateTime 评估时间 格式:2020-11-12
* @param disableLevelId 失能等级id
//
* @param disableLevelId 失能等级id
* @param polNo 保单号
//
* @param polNo 保单号
* @param remark 备注
//
* @param remark 备注
* @param fileDataList 附件
//
* @param fileDataList 附件
*/
*/
@RequestMapping
(
"/addReport"
)
@RequestMapping
(
"/addReport"
)
public
Result
addReport
(
ReportDetailVO
reportDetailVo
)
{
public
Result
addReport
(
ReportDetailVO
reportDetailVo
)
{
...
@@ -383,4 +387,241 @@ public class TaskController {
...
@@ -383,4 +387,241 @@ public class TaskController {
return
Result
.
success
();
return
Result
.
success
();
}
}
/**
* 查询鉴定任务组信息
* @return
* @author wqs
*/
@ResponseBody
@RequestMapping
(
value
=
"/chIpad/queryAppraisalInfo"
,
method
=
RequestMethod
.
POST
)
public
String
queryAppraisalInfo
(
@RequestBody
QueryDto
queryDto
)
throws
TppesApiException
{
//pad端优化 增加任务预约日期1 任务预约日期2
List
<
TaskGroupInfoVO
>
resultMap
=
taskService
.
queryAppraisalInfo
(
queryDto
.
getAprEmpId
(),
queryDto
.
getAppointStartTime
(),
queryDto
.
getAppointEndTime
(),
queryDto
.
getQueryBeginDate
(),
queryDto
.
getQueryEndDate
(),
queryDto
.
getGroupNum
(),
queryDto
.
getPageNo
(),
queryDto
.
getPageSize
());
//pad端增加两个字段
String
json
=
JSON
.
toJSONString
(
resultMap
);
return
json
;
}
/**
* 查询鉴定任务组信息
* @return
* @author wqs
*/
@ResponseBody
@RequestMapping
(
value
=
"/chIpad/queryAppraisalInfoByPage"
)
public
String
queryAppraisalInfoByPage
(
@RequestBody
QueryDto
queryDto
)
throws
TppesApiException
{
//pad端优化 增加任务预约日期1 任务预约日期2
Page
<
TaskGroupInfoByPageVO
>
resultMap
=
taskService
.
queryAppraisalInfoByPage
(
queryDto
.
getAprEmpId
(),
queryDto
.
getAppointStartTime
(),
queryDto
.
getAppointEndTime
(),
queryDto
.
getQueryBeginDate
(),
queryDto
.
getQueryEndDate
(),
queryDto
.
getGroupNum
(),
queryDto
.
getPageNo
(),
queryDto
.
getPageSize
());
//pad端增加两个字段
String
json
=
JSON
.
toJSONString
(
resultMap
);
return
json
;
}
/**
* 鉴定人员鉴定任务详情获取
* @return
* @author wqs
*/
@RequestMapping
(
value
=
"/chIpad/taskDetailInfo"
)
public
IPage
<
ChAprTask
>
taskDetailInfo
(
@RequestBody
QueryDto
queryDto
)
throws
TppesApiException
{
//pad端优化 增加两个字段 是为了传到详情页面展示
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
if
(
queryDto
.
getPageNo
()==
null
||
""
.
equals
(
queryDto
.
getPageNo
())){
queryDto
.
setPageNo
(
1
);
}
IPage
<
ChAprTask
>
resultMap
=
taskService
.
apprTaskDetailInfo
(
queryDto
.
getAppointStartTime
(),
queryDto
.
getAppointEndTime
(),
queryDto
.
getStatus
(),
queryDto
.
getTaskGroupNo
(),
queryDto
.
getPageNo
(),
queryDto
.
getPageSize
());
//pad端优化 增加三个字段 任务预约日期1 任务预约日期2 状态
return
resultMap
;
}
/**
* 单条任务拒绝
* @return
* @author wqs
*/
@ResponseBody
@RequestMapping
(
value
=
"/chIpad/taskRefuseCause"
)
public
Result
taskRefuseCause
(
@RequestBody
QueryDto
queryDto
)
throws
com
.
hungraim
.
ltc
.
service
.
TppesApiException
{
String
json
=
""
;
String
optType
=
"1"
;
//操作类型 0-鉴定机构管理人员操作,1-鉴定人员操作;
//List<Map<String,Object>> aprList= (List<Map<String, Object>>) request.getSession().getAttribute("aprList");//鉴定机构
// String aprEmpId=String.valueOf(aprList.get(0).get("empId"));//操作人id
//String aprOrganId=String.valueOf(aprList.get(0).get("organId")); //操作机构id
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
optTime
=
sdf
.
format
(
new
Date
());
//操作时间YYYY-MM-DD HH24:MM:SS
//logger.info("调用ipadSurveyReportService.taskRefuseCause接口传入参数:"+taskId+" "+optType+" "
// + aprOrganId+" "+ aprEmpId+" "+ optTime+" "+ refuseReason+" " + refuseRemark+" " + status + " " + taskGroupNo);
Result
<
Object
>
objectResult
=
taskService
.
taskRefuseCause
(
queryDto
.
getTaskId
(),
optType
,
queryDto
.
getOrganId
(),
queryDto
.
getEmpId
(),
optTime
,
queryDto
.
getRefuseReason
(),
queryDto
.
getRefuseRemark
(),
queryDto
.
getStatus
(),
queryDto
.
getTaskGroupNo
(),
queryDto
.
getTaskPushId
());
if
(!
ResultCode
.
SUCCESS
.
getCode
().
equals
(
objectResult
.
getCode
()))
{
//失败
return
Result
.
failed
(
objectResult
.
getMsg
());
}
return
Result
.
success
();
}
/**
* 开始鉴定任务
* @return
* @author wqs
*/
@ResponseBody
@RequestMapping
(
value
=
"/chIpad/startApprTask"
)
public
Result
startApprTask
(
@RequestBody
QueryDto
queryDto
)
throws
com
.
hungraim
.
ltc
.
service
.
TppesApiException
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<
String
,
Object
>();
String
json
=
""
;
//List<Map<String,Object>> aprList= (List<Map<String, Object>>) request.getSession().getAttribute("aprList");//鉴定机构
//logger.info("开始评定aprList: " + aprList);
String
operationId
=
queryDto
.
getEmpId
();
//操作人id
String
operationOrganId
=
queryDto
.
getOrganId
();
//操作机构id
//logger.info("调用ipadSurveyReportService.taskRefuseCause接口传入参数:"+taskId+" "+operationId+" " + operationOrganId+" "+ taskGroupNo);
Result
<
Object
>
objectResult
=
taskService
.
startApprTask
(
queryDto
.
getTaskId
(),
operationId
,
operationOrganId
,
queryDto
.
getTaskGroupNo
());
if
(!
ResultCode
.
SUCCESS
.
getCode
().
equals
(
objectResult
.
getCode
()))
{
//失败
return
Result
.
failed
(
objectResult
.
getMsg
());
}
return
Result
.
success
();
}
/**
* 单条任务详情
* @return
* @author wqs
*/
@ResponseBody
@RequestMapping
(
value
=
"/chIpad/singleTaskDetails"
)
public
String
singleTaskDetails
(
HttpServletRequest
request
,
@RequestBody
QueryDto
queryDto
)
throws
com
.
hungraim
.
ltc
.
service
.
TppesApiException
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<
String
,
Object
>();
ChAprTask
chAprTask
=
new
ChAprTask
();
String
json
=
""
;
String
chPadCityFlag
=
(
String
)
request
.
getSession
().
getAttribute
(
"chPadCityFlag"
);
if
(
null
!=
chPadCityFlag
&&
"320200"
.
equals
(
chPadCityFlag
)){
//无锡用户调用无锡单条任务详情接口
//logger.info("调用ipadSurveyReportService.singleTaskDetailsWuXi接口传入参数:"+taskId);
chAprTask
=
taskService
.
singleTaskDetailsWuXi
(
queryDto
.
getTaskId
(),
queryDto
.
getTaskGroupNo
(),
queryDto
.
getTaskPushId
());
}
else
{
//logger.info("调用ipadSurveyReportService.singleTaskDetails接口传入参数:"+taskId);
chAprTask
=
taskService
.
singleTaskDetails
(
queryDto
.
getTaskId
(),
queryDto
.
getTaskGroupNo
(),
queryDto
.
getTaskPushId
());
}
json
=
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
(
chAprTask
);
//logger.info("resultMap"+resultMap);
return
json
;
}
/**
* 报告查看 获取鉴定报告详情
* @return
* @author wqs
*/
@RequestMapping
(
value
=
"/chIpad/taskReportDetails"
)
public
ChAprReport
taskReportDetails
(
HttpServletRequest
request
,
@RequestBody
QueryDto
queryDto
)
throws
com
.
hungraim
.
ltc
.
service
.
TppesApiException
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<
String
,
Object
>();
String
disabInfoId
=
request
.
getParameter
(
"disabInfoId"
);
String
chPadCityFlag
=
(
String
)
request
.
getSession
().
getAttribute
(
"chPadCityFlag"
);
ChAprReport
chAprReport
=
taskService
.
taskReportDetails
(
queryDto
.
getTaskId
());
return
chAprReport
;
/*if("01".equals(flag)){
//失能人员、鉴定人员信息展示页面
return new ModelAndView("disApprInfo");
}else if("02".equals(flag)){
//评分结果展示
return new ModelAndView("disApprScore");
}else if("03".equals(flag)){
//失能人员鉴定图片展示
return new ModelAndView("disAttach");
}else if("04".equals(flag)){
//鉴定结果展示
return new ModelAndView("disApprResult");
}else{
//没有值回到登录页面
return new ModelAndView("ipadChLogin");
}*/
}
@RequestMapping
(
"/chIpad/findReportVideo"
)
@ResponseBody
public
String
findReportVideo
(
String
taskId
){
List
<
Map
<
String
,
Object
>>
list
=
taskService
.
findReportVideo
(
taskId
);
String
json
=
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
(
list
);
return
json
;
}
@RequestMapping
(
"/chIpad/uploadVideo"
)
@ResponseBody
public
Result
uploadVideo
(
String
taskId
,
String
videoUrl
,
String
videoName
,
HttpServletRequest
req
,
String
fileId
){
Map
<
String
,
Object
>
userMap
=
(
Map
<
String
,
Object
>)
req
.
getSession
().
getAttribute
(
"ipadChUserMap"
);
String
padUserName
=
(
String
)
userMap
.
get
(
"chName"
);
int
i
=
taskService
.
uploadVideo
(
taskId
,
videoUrl
,
videoName
,
padUserName
,
fileId
);
if
(
i
>
0
){
return
Result
.
success
();
}
else
{
return
Result
.
failed
();
}
}
@RequestMapping
(
"/chIpad/deleteVodFile"
)
@ResponseBody
public
Result
deleteVodFile
(
@RequestParam
String
fileId
,
@RequestParam
String
taskId
){
//文件ID和评定任务ID
Result
<
Object
>
objectResult
=
taskService
.
deleteVodFile
(
fileId
,
taskId
);
if
(!
ResultCode
.
SUCCESS
.
getCode
().
equals
(
objectResult
.
getCode
()))
{
//失败
return
Result
.
failed
(
objectResult
.
getMsg
());
}
return
Result
.
success
();
}
/**
* 合并项目相同的项
* @param chPfList
* @return
*/
public
List
<
List
<
Map
<
String
,
Object
>>>
changeList
(
List
<
Map
<
String
,
Object
>>
chPfList
)
{
List
<
List
<
Map
<
String
,
Object
>>>
resultList
=
new
ArrayList
<
List
<
Map
<
String
,
Object
>>>();
if
(
chPfList
!=
null
&&
chPfList
.
size
()
>
0
)
{
List
<
String
>
itemList
=
new
ArrayList
<
String
>();
for
(
int
i
=
0
;
i
<
chPfList
.
size
();
i
++)
{
String
itemName
=
String
.
valueOf
(
chPfList
.
get
(
i
).
get
(
"itemName"
));
if
(
itemList
.
size
()
==
0
)
{
itemList
.
add
(
itemName
);
List
<
Map
<
String
,
Object
>>
chList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
chList
.
add
(
chPfList
.
get
(
i
));
resultList
.
add
(
chList
);
}
else
{
String
isExist
=
"N"
;
tips1:
for
(
int
j
=
0
;
j
<
itemList
.
size
();
j
++)
{
String
itemName2
=
itemList
.
get
(
j
);
if
(
itemName
.
equals
(
itemName2
))
{
isExist
=
"Y"
;
List
<
Map
<
String
,
Object
>>
chList
=
resultList
.
get
(
j
);
if
(
chList
!=
null
)
{
chList
.
add
(
chPfList
.
get
(
i
));
resultList
.
set
(
j
,
chList
);
}
break
tips1
;
}
}
if
(
"N"
.
equals
(
isExist
))
{
itemList
.
add
(
itemName
);
List
<
Map
<
String
,
Object
>>
chList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
chList
.
add
(
chPfList
.
get
(
i
));
resultList
.
add
(
chList
);
}
}
}
}
return
resultList
;
}
}
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/dao/TaskMapper.java
View file @
68c687d0
...
@@ -57,4 +57,6 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
...
@@ -57,4 +57,6 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
List
<
AllotTaskHisVO
>
allotTaskHisList
(
@Param
(
"taskId"
)
Integer
taskId
);
List
<
AllotTaskHisVO
>
allotTaskHisList
(
@Param
(
"taskId"
)
Integer
taskId
);
Page
<
ReTaskDistributionVO
>
reTaskDistributionList
(
Page
<
ReTaskDistributionVO
>
page
,
@Param
(
"organIds"
)
List
<
Long
>
organIds
,
String
districtProvincial
,
String
districtCity
,
String
districtArea
,
String
realName
,
String
certiCode
);
Page
<
ReTaskDistributionVO
>
reTaskDistributionList
(
Page
<
ReTaskDistributionVO
>
page
,
@Param
(
"organIds"
)
List
<
Long
>
organIds
,
String
districtProvincial
,
String
districtCity
,
String
districtArea
,
String
realName
,
String
certiCode
);
Page
<
TaskGroupInfoByPageVO
>
taskGroupInfoListByPage
(
String
aprEmpId
,
String
appointStartTime
,
String
appointEndTime
,
String
queryBeginDate
,
String
queryEndDate
,
String
groupNo
,
Integer
pageNo
,
Integer
pageSize
);
}
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/dto/PageDto.java
0 → 100644
View file @
68c687d0
package
com
.
hungraim
.
ltc
.
dto
;
import
lombok.Data
;
@Data
public
class
PageDto
{
private
Integer
pageNo
=
1
;
private
Integer
pageSize
=
10
;
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/dto/QueryDto.java
0 → 100644
View file @
68c687d0
package
com
.
hungraim
.
ltc
.
dto
;
import
lombok.Data
;
@Data
public
class
QueryDto
extends
PageDto
{
private
String
aprEmpId
;
private
String
appointStartTime
;
private
String
appointEndTime
;
private
String
queryBeginDate
;
private
String
queryEndDate
;
private
String
groupNum
;
private
String
status
;
private
String
taskGroupNo
;
private
String
empId
;
private
String
organId
;
private
String
taskId
;
private
String
refuseReason
;
private
String
refuseRemark
;
private
String
taskPushId
;
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/service/TaskService.java
View file @
68c687d0
package
com
.
hungraim
.
ltc
.
service
;
package
com
.
hungraim
.
ltc
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.assessment.ChAprReport
;
import
com.hungraim.ltc.pojo.entity.assessment.ChAprTask
;
import
com.hungraim.ltc.pojo.entity.assessment.ChRefuseReason
;
import
com.hungraim.ltc.pojo.entity.assessment.ChRefuseReason
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel
;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
...
@@ -10,6 +13,7 @@ import org.springframework.stereotype.Service;
...
@@ -10,6 +13,7 @@ import org.springframework.stereotype.Service;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 失能评定Service
* 失能评定Service
...
@@ -54,4 +58,28 @@ public interface TaskService {
...
@@ -54,4 +58,28 @@ public interface TaskService {
List
<
ChRefuseReason
>
refuseReasonList
();
List
<
ChRefuseReason
>
refuseReasonList
();
Result
<
List
<
ChFndAttach
>>
reportFileList
(
Long
reportId
);
Result
<
List
<
ChFndAttach
>>
reportFileList
(
Long
reportId
);
Result
<
Object
>
taskRefuseCause
(
String
taskId
,
String
optType
,
String
aprOrganId
,
String
aprEmpId
,
String
optTime
,
String
refuseReason
,
String
refuseRemark
,
String
status
,
String
taskGroupNo
,
String
taskPushId
)
throws
TppesApiException
;
Result
<
Object
>
deleteVodFile
(
String
fileId
,
String
taskId
);
int
uploadVideo
(
String
taskId
,
String
videoUrl
,
String
videoName
,
String
padUserName
,
String
fileId
);
List
<
Map
<
String
,
Object
>>
findReportVideo
(
String
taskId
);
Result
<
Object
>
startApprTask
(
String
taskId
,
String
operationId
,
String
operationOrganId
,
String
taskGroupNo
)
throws
TppesApiException
;
List
<
TaskGroupInfoVO
>
queryAppraisalInfo
(
String
aprEmpId
,
String
appointStartTime
,
String
appointEndTime
,
String
queryBeginDate
,
String
queryEndDate
,
String
groupNum
,
Integer
pageNo
,
Integer
pageSize
);
Page
<
TaskGroupInfoByPageVO
>
queryAppraisalInfoByPage
(
String
aprEmpId
,
String
appointStartTime
,
String
appointEndTime
,
String
queryBeginDate
,
String
queryEndDate
,
String
groupNum
,
Integer
pageNo
,
Integer
pageSize
);
ChAprReport
taskReportDetails
(
String
taskId
)
throws
TppesApiException
;
ChAprTask
singleTaskDetails
(
String
taskId
,
String
taskGroupNo
,
String
taskPushId
)
throws
TppesApiException
;
ChAprTask
singleTaskDetailsWuXi
(
String
taskId
,
String
taskGroupNo
,
String
taskPushId
)
throws
TppesApiException
;
ChAprReport
queryAprReportForWUXI
(
String
taskId
)
throws
TppesApiException
;
IPage
<
ChAprTask
>
apprTaskDetailInfo
(
String
appointStartTime
,
String
appointEndTime
,
String
status
,
String
taskGroupNo
,
Integer
pageNo
,
Integer
pageSize
)
throws
TppesApiException
;
}
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/service/TppesApiException.java
0 → 100644
View file @
68c687d0
package
com
.
hungraim
.
ltc
.
service
;
public
class
TppesApiException
extends
Exception
{
private
static
final
long
serialVersionUID
=
8755420483172678311L
;
public
TppesApiException
()
{
super
();
}
public
TppesApiException
(
String
message
)
{
super
(
message
);
}
public
TppesApiException
(
String
message
,
Throwable
cause
)
{
super
(
message
,
cause
);
}
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/service/impl/TaskServiceImpl.java
View file @
68c687d0
...
@@ -3,6 +3,8 @@ package com.hungraim.ltc.service.impl;
...
@@ -3,6 +3,8 @@ package com.hungraim.ltc.service.impl;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.api.AttachFeignService
;
import
com.hungraim.ltc.api.AttachFeignService
;
import
com.hungraim.ltc.dao.*
;
import
com.hungraim.ltc.dao.*
;
...
@@ -13,6 +15,7 @@ import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
...
@@ -13,6 +15,7 @@ import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.pojo.vo.system.AttachUpdateVo
;
import
com.hungraim.ltc.pojo.vo.system.AttachUpdateVo
;
import
com.hungraim.ltc.service.TaskService
;
import
com.hungraim.ltc.service.TaskService
;
import
com.hungraim.ltc.service.TppesApiException
;
import
com.hungraim.ltc.util.AttachType
;
import
com.hungraim.ltc.util.AttachType
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.ResultCode
;
...
@@ -24,9 +27,7 @@ import org.springframework.beans.BeanUtils;
...
@@ -24,9 +27,7 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Arrays
;
import
java.util.*
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* @author czz
* @author czz
...
@@ -461,4 +462,166 @@ public class TaskServiceImpl implements TaskService {
...
@@ -461,4 +462,166 @@ public class TaskServiceImpl implements TaskService {
}
}
return
listResult
;
return
listResult
;
}
}
/**
* 单条任务拒绝
* @return
*/
@Override
public
Result
<
Object
>
taskRefuseCause
(
String
taskId
,
String
optType
,
String
aprOrganId
,
String
aprEmpId
,
String
optTime
,
String
refuseReason
,
String
refuseRemark
,
String
status
,
String
taskGroupNo
,
String
taskPushId
)
throws
TppesApiException
{
if
(
taskId
!=
""
&&
taskId
!=
null
){
ChAprTask
task
=
taskMapper
.
selectById
(
taskId
);
if
(
task
!=
null
)
{
task
.
setTaskStatus
(
0
);
taskMapper
.
updateById
(
task
);
return
Result
.
success
();
}
}
return
Result
.
failed
();
}
/**
* 开始鉴定
* @return
*/
@Override
public
Result
<
Object
>
startApprTask
(
String
taskId
,
String
operationId
,
String
operationOrganId
,
String
taskGroupNo
)
throws
TppesApiException
{
if
(
taskId
!=
""
&&
taskId
!=
null
){
ChAprTask
task
=
taskMapper
.
selectById
(
taskId
);
if
(
task
!=
null
)
{
task
.
setAprType
(
0
);
taskMapper
.
updateById
(
task
);
return
Result
.
success
();
}
}
return
Result
.
failed
();
}
@Override
public
Result
<
Object
>
deleteVodFile
(
String
fileId
,
String
taskId
)
{
return
Result
.
success
();
}
@Override
public
int
uploadVideo
(
String
taskId
,
String
videoUrl
,
String
videoName
,
String
padUserName
,
String
fileId
)
{
return
1
;
}
@Override
public
List
<
Map
<
String
,
Object
>>
findReportVideo
(
String
taskId
)
{
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<
Map
<
String
,
Object
>>();
return
list
;
}
/**
* 查询鉴定任务组信息
*
* @return
* @author fanglg
*/
@Override
public
List
<
TaskGroupInfoVO
>
queryAppraisalInfo
(
String
aprEmpId
,
String
appointStartTime
,
String
appointEndTime
,
String
queryBeginDate
,
String
queryEndDate
,
String
groupNum
,
Integer
pageNo
,
Integer
pageSize
)
{
List
<
TaskGroupInfoVO
>
taskGroupInfoVOIList
=
taskMapper
.
taskGroupInfoList
(
groupNum
);
return
taskGroupInfoVOIList
;
}
/**
* 查询鉴定任务组信息
*
* @return
* @author fanglg
*/
@Override
public
Page
<
TaskGroupInfoByPageVO
>
queryAppraisalInfoByPage
(
String
aprEmpId
,
String
appointStartTime
,
String
appointEndTime
,
String
queryBeginDate
,
String
queryEndDate
,
String
groupNum
,
Integer
pageNo
,
Integer
pageSize
)
{
Page
<
TaskGroupInfoByPageVO
>
taskGroupInfoVOIList
=
taskMapper
.
taskGroupInfoListByPage
(
aprEmpId
,
appointStartTime
,
appointEndTime
,
queryBeginDate
,
queryEndDate
,
groupNum
,
pageNo
,
pageSize
);
return
taskGroupInfoVOIList
;
}
/**
* 获取鉴定报告详情
* @return
*/
@Override
public
ChAprReport
taskReportDetails
(
String
taskId
)
throws
TppesApiException
{
LambdaQueryWrapper
<
ChAprReport
>
wrapper
=
Wrappers
.
lambdaQuery
();
wrapper
.
eq
(
ChAprReport:
:
getTaskId
,
taskId
);
ChAprReport
chAprReport
=
aprReportMapper
.
selectOne
(
wrapper
);
return
chAprReport
;
}
/**
* 单条任务详情
* @return
*/
@Override
public
ChAprTask
singleTaskDetails
(
String
taskId
,
String
taskGroupNo
,
String
taskPushId
)
throws
TppesApiException
{
LambdaQueryWrapper
<
ChAprTask
>
wrapper
=
Wrappers
.
lambdaQuery
();
wrapper
.
eq
(
ChAprTask:
:
getTaskId
,
taskId
);
ChAprTask
aprTask
=
taskMapper
.
selectOne
(
wrapper
);
return
aprTask
;
}
/**
* 无锡单条任务详情
* @return
*/
@Override
public
ChAprTask
singleTaskDetailsWuXi
(
String
taskId
,
String
taskGroupNo
,
String
taskPushId
)
throws
TppesApiException
{
LambdaQueryWrapper
<
ChAprTask
>
wrapper
=
Wrappers
.
lambdaQuery
();
wrapper
.
eq
(
ChAprTask:
:
getTaskId
,
taskId
);
ChAprTask
aprTask
=
taskMapper
.
selectOne
(
wrapper
);
return
aprTask
;
}
/**
* 获取无锡鉴定报告详情
* @return
*/
@Override
public
ChAprReport
queryAprReportForWUXI
(
String
taskId
)
throws
TppesApiException
{
LambdaQueryWrapper
<
ChAprReport
>
wrapper
=
Wrappers
.
lambdaQuery
();
wrapper
.
eq
(
ChAprReport:
:
getTaskId
,
taskId
);
ChAprReport
chAprReport
=
aprReportMapper
.
selectOne
(
wrapper
);
return
chAprReport
;
}
/**
* 鉴定人员鉴定任务详情获取
* @return
*/
@Override
public
IPage
<
ChAprTask
>
apprTaskDetailInfo
(
String
appointStartTime
,
String
appointEndTime
,
String
status
,
String
taskGroupNo
,
Integer
pageNo
,
Integer
pageSize
)
throws
TppesApiException
{
LambdaQueryWrapper
<
ChAprTask
>
wrapper
=
Wrappers
.
lambdaQuery
();
/*if(appointStartTime!=null && !"".equals(appointStartTime)){
wrapper.gt("appointStartTime",appointStartTime);
}
if(appointEndTime!=null && !"".equals(appointEndTime)){
wrapper.lt("appointEndTime",appointEndTime);
}
if(status!=null && !"".equals(status)){
wrapper.eq("status",status);
}
wrapper.eq("taskGroupNo",taskGroupNo);*/
Page
<
ChAprTask
>
page
=
new
Page
<>(
pageNo
,
pageSize
,
false
);
IPage
<
ChAprTask
>
chAprTaskPage
=
taskMapper
.
selectPage
(
page
,
wrapper
);
return
chAprTaskPage
;
}
}
}
\ No newline at end of file
assessment/assessment-service/src/main/resources/mapper/ChDisableEvaluateMapper.xml
View file @
68c687d0
...
@@ -383,4 +383,25 @@
...
@@ -383,4 +383,25 @@
</where>
</where>
</select>
</select>
<select
id=
"taskGroupInfoListByPage"
resultType=
"com.hungraim.ltc.pojo.vo.assessment.TaskGroupInfoByPageVO"
>
select
push.assign_time "date",
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) districtProvincial,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.DISTRICT_CITY = dis.DISTRICT_CODE) districPity,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea,
push.Group_number groupNo,
emp.real_name aprEmpName,
emp.certi_code idCard,
push.task_push_id taskGroupNo
from ch_apr_task_push push
left join ch_apr_task task on push.task_id = task.task_id
left join CH_FND_ORGAN organ on organ.organ_id = task.organ_id
left join ch_disable_info disable on task.disable_info_id = disable.disab_info_id
left join ch_apr_emp emp on emp.emp_id = push.emp_id
</select>
</mapper>
</mapper>
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/assessment/TaskGroupInfoByPageVO.java
0 → 100644
View file @
68c687d0
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
assessment
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 评定任务分组管理列表详情
*/
@Data
public
class
TaskGroupInfoByPageVO
{
/**
* 分组日期
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
date
;
/**
* 评定起点地址
*/
private
String
address
;
/**
* 组号
*/
private
String
groupNo
;
/**
* 评定组长姓名
*/
private
String
aprEmpName
;
/**
* 评定组长身份证号码
*/
private
String
idCard
;
/**
* 组号
*/
private
String
taskGroupNo
;
}
common/common-core/src/main/java/com/hungraim/ltc/util/SignatureUtil.java
0 → 100644
View file @
68c687d0
This source diff could not be displayed because it is too large. You can
view the blob
instead.
common/common-core/src/main/java/com/hungraim/ltc/util/SocketCallUtil.java
0 → 100644
View file @
68c687d0
package
com
.
hungraim
.
ltc
.
util
;
import
com.alibaba.fastjson.JSONObject
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
java.io.*
;
import
java.net.Socket
;
import
java.net.URLDecoder
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.Iterator
;
import
java.util.List
;
public
class
SocketCallUtil
{
private
final
static
Logger
logger
=
LogManager
.
getLogger
(
SocketCallUtil
.
class
);
/**
* 调用前置机
* @param ip
* @param port
* @param jsonStr 需要传输给前置机的报文
* @return
* @throws Exception
*/
public
static
String
callSocket
(
String
ip
,
int
port
,
String
jsonStr
)
{
Socket
socket
=
null
;
InputStream
in
=
null
;
PrintWriter
out
=
null
;
try
{
socket
=
new
Socket
(
ip
,
port
);
out
=
new
PrintWriter
(
new
OutputStreamWriter
(
socket
.
getOutputStream
(),
"utf-8"
));
jsonStr
=
URLEncoder
.
encode
(
jsonStr
,
"UTF-8"
);
String
oraMessage
=
"http://iai.tencentcloudapi.com/Method=TCY&outputStr="
+
jsonStr
;
String
length8Str
=
getByteLength8
(
oraMessage
);
String
message
=
"readFully"
+
length8Str
+
"nodecrypt"
+
oraMessage
;
out
.
print
(
message
);
out
.
flush
();
in
=
socket
.
getInputStream
();
Thread
.
sleep
(
1000
);
byte
[]
buf
=
new
byte
[
1024
];
List
<
Byte
>
byteList
=
new
ArrayList
<
Byte
>();
while
((
in
.
read
(
buf
))
!=
-
1
)
{
for
(
byte
bt
:
buf
)
{
byteList
.
add
(
bt
);
}
}
byte
[]
b
=
new
byte
[
byteList
.
size
()];
int
i
=
0
;
Iterator
<
Byte
>
iterator
=
byteList
.
iterator
();
while
(
iterator
.
hasNext
())
{
b
[
i
]
=
iterator
.
next
();
i
++;
}
byte
[]
byteLength8
=
new
byte
[
8
];
System
.
arraycopy
(
b
,
0
,
byteLength8
,
0
,
8
);
int
length8
=
Integer
.
parseInt
(
new
String
(
byteLength8
));
byte
[]
bytes
=
new
byte
[
length8
];
System
.
arraycopy
(
b
,
8
,
bytes
,
0
,
length8
);
return
URLDecoder
.
decode
(
new
String
(
bytes
,
"UTF-8"
),
"UTF-8"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
"调用前置机异常"
;
}
finally
{
try
{
in
.
close
();
out
.
close
();
if
(!
socket
.
isClosed
())
{
socket
.
close
();
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
/**
* 获取byte字符的8位长度(不足八位左补零) add by oydg 20140902
*
* @param content
* @return
*/
private
static
String
getByteLength8
(
String
content
)
{
String
length8
=
""
;
if
(
null
==
content
)
{
return
length8
;
}
String
length
=
(
content
.
length
()
+
8
)
+
""
;
int
size
=
length
.
length
();
for
(
int
i
=
0
;
i
<
8
-
size
;
i
++)
{
length
=
"0"
+
length
;
}
length8
=
length
;
return
length8
;
}
/**
* 通过socket连接前置机进行互联网接口的对接
*
* @param socketIp 前置机IP
* @param socketPort 前置机端口
* @param url 目标请求的URL
* @param characterEncoding 字符集编码
* @param isProxy 是否开启代理请求
* @return
*/
public
static
String
commentSocketUtil
(
String
socketIp
,
int
socketPort
,
String
url
,
String
input
,
String
characterEncoding
,
String
isProxy
)
{
Socket
socket
=
null
;
try
{
socket
=
new
Socket
(
socketIp
,
socketPort
);
JSONObject
json
=
new
JSONObject
();
json
.
put
(
"openProxy"
,
isProxy
);
//必传 启用代理 TRUE、FALSE,一般传TRUE,不要传FALSE
json
.
put
(
"encode"
,
characterEncoding
);
//非必传,不传默认UTF-8,如http(s)接口提供方反馈中文乱码,按对方编码设置
json
.
put
(
"contentType"
,
"application/json"
);
//非必传 Content-Type 按实际需要填写
if
(
"deleteVideoFile"
.
equals
(
input
)){
json
.
put
(
"requestMethod"
,
"GET"
);
//必传 POST、GET
}
else
{
json
.
put
(
"requestMethod"
,
"POST"
);
//必传 POST、GET
json
.
put
(
"outputString"
,
input
);
//参数
}
String
jsonStr
=
URLEncoder
.
encode
(
json
.
toString
(),
characterEncoding
);
String
oraMessage
=
url
+
"Method=WAN&outputStr="
+
jsonStr
;
String
length8Str
=
getByteLength8
(
oraMessage
);
logger
.
info
(
"开始连接前置机,请求的目标地址为:"
+
url
);
if
(
socket
.
isConnected
())
{
InputStream
in
=
new
BufferedInputStream
(
socket
.
getInputStream
());
OutputStream
out
=
socket
.
getOutputStream
();
String
message
=
"readFully"
+
length8Str
+
"nodecrypt"
+
oraMessage
;
out
.
write
((
message
).
getBytes
());
out
.
flush
();
byte
htmlByte
[]
=
readInputStream
(
in
);
String
result
=
new
String
(
htmlByte
,
characterEncoding
);
logger
.
info
(
"前置机返回外部接口信息:"
+
url
);
return
result
;
}
else
{
logger
.
info
(
"程序正常,但是连接前置机失败!"
);
return
"程序正常,但是连接前置机失败!"
;
}
}
catch
(
Exception
e
)
{
logger
.
info
(
"前置机socket访问外部接口连接失败:"
+
e
.
getStackTrace
());
return
"查询失败"
;
}
finally
{
if
(!
socket
.
isClosed
())
{
try
{
socket
.
close
();
}
catch
(
Exception
e
)
{
logger
.
info
(
"关闭前置机socket连接错误:"
+
e
.
getStackTrace
());
}
}
}
}
/**
* 流转byte[],无需修改
*
* @param inStream
* @return
* @throws Exception
*/
private
static
byte
[]
readInputStream
(
InputStream
inStream
)
throws
Exception
{
ByteArrayOutputStream
outStream
=
new
ByteArrayOutputStream
();
byte
[]
buffer
=
new
byte
[
9024
];
int
len
=
0
;
while
((
len
=
inStream
.
read
(
buffer
))
!=
-
1
)
{
outStream
.
write
(
buffer
,
0
,
len
);
}
inStream
.
close
();
return
outStream
.
toByteArray
();
}
}
pom.xml
View file @
68c687d0
...
@@ -54,6 +54,12 @@
...
@@ -54,6 +54,12 @@
<artifactId>
lombok
</artifactId>
<artifactId>
lombok
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
<version>
1.2.69
</version>
</dependency>
</dependencies>
</dependencies>
...
...
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