Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
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
1
Merge Requests
1
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
poc
poc-api
Commits
765ee98a
Commit
765ee98a
authored
Aug 19, 2025
by
R10
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
智写-问数-下载
parent
ab9772d0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
881 additions
and
170 deletions
+881
-170
BizAiLawyerWritingTemplateDownloadConvert.java
...aw/convert/BizAiLawyerWritingTemplateDownloadConvert.java
+53
-0
BizAiLawyerWritingTemplateDownloadDto.java
...om/poc/law/dto/BizAiLawyerWritingTemplateDownloadDto.java
+79
-0
BizAiLawyerWritingTemplateDownloadEntity.java
.../law/entity/BizAiLawyerWritingTemplateDownloadEntity.java
+94
-0
LegislativeDocumentResult.java
...entity/legislativeDocument/LegislativeDocumentResult.java
+5
-5
LawyerTemplateExtractServiceBuilder.java
...ctEntityStrategy/LawyerTemplateExtractServiceBuilder.java
+2
-2
TestEntity.java
...java/cn/com/poc/law/extractEntityStrategy/TestEntity.java
+59
-0
MotorVehicleDrivingComplaintType.java
...y/extractEntityType/MotorVehicleDrivingComplaintType.java
+268
-162
JacksonDateArrayDeSerializer.java
.../poc/law/jsonSerializer/JacksonDateArrayDeSerializer.java
+3
-0
BizAiLawyerWritingTemplateDownloadModel.java
...oc/law/model/BizAiLawyerWritingTemplateDownloadModel.java
+124
-0
BizAiLawyerWritingTemplateDownloadRepository.java
...ository/BizAiLawyerWritingTemplateDownloadRepository.java
+6
-0
BizAiLawyerWritingTemplateDownloadRest.java
.../poc/law/rest/BizAiLawyerWritingTemplateDownloadRest.java
+24
-0
BizAiLawyerWritingTemplateDownloadRestImpl.java
...rest/impl/BizAiLawyerWritingTemplateDownloadRestImpl.java
+51
-0
BizAiLawyerWritingTemplateDownloadService.java
...aw/service/BizAiLawyerWritingTemplateDownloadService.java
+21
-0
BizAiLawyerWritingTemplateDataServiceImpl.java
...rvice/impl/BizAiLawyerWritingTemplateDataServiceImpl.java
+4
-1
BizAiLawyerWritingTemplateDownloadServiceImpl.java
...e/impl/BizAiLawyerWritingTemplateDownloadServiceImpl.java
+88
-0
No files found.
src/main/java/cn/com/poc/law/convert/BizAiLawyerWritingTemplateDownloadConvert.java
0 → 100644
View file @
765ee98a
package
cn
.
com
.
poc
.
law
.
convert
;
import
cn.com.poc.law.model.BizAiLawyerWritingTemplateDownloadModel
;
import
cn.com.poc.law.entity.BizAiLawyerWritingTemplateDownloadEntity
;
import
cn.com.poc.law.dto.BizAiLawyerWritingTemplateDownloadDto
;
public
class
BizAiLawyerWritingTemplateDownloadConvert
{
public
static
BizAiLawyerWritingTemplateDownloadEntity
modelToEntity
(
BizAiLawyerWritingTemplateDownloadModel
model
){
BizAiLawyerWritingTemplateDownloadEntity
entity
=
new
BizAiLawyerWritingTemplateDownloadEntity
();
entity
.
setId
(
model
.
getId
());
entity
.
setTemplateCode
(
model
.
getTemplateCode
());
entity
.
setType
(
model
.
getType
());
entity
.
setName
(
model
.
getName
());
entity
.
setOption
(
model
.
getOption
());
entity
.
setEntityClass
(
model
.
getEntityClass
());
return
entity
;
}
public
static
BizAiLawyerWritingTemplateDownloadModel
entityToModel
(
BizAiLawyerWritingTemplateDownloadEntity
entity
){
BizAiLawyerWritingTemplateDownloadModel
model
=
new
BizAiLawyerWritingTemplateDownloadModel
();
model
.
setId
(
entity
.
getId
());
model
.
setTemplateCode
(
entity
.
getTemplateCode
());
model
.
setType
(
entity
.
getType
());
model
.
setName
(
entity
.
getName
());
model
.
setOption
(
entity
.
getOption
());
model
.
setEntityClass
(
entity
.
getEntityClass
());
return
model
;
}
public
static
BizAiLawyerWritingTemplateDownloadDto
entityToDto
(
BizAiLawyerWritingTemplateDownloadEntity
entity
){
BizAiLawyerWritingTemplateDownloadDto
dto
=
new
BizAiLawyerWritingTemplateDownloadDto
();
dto
.
setId
(
entity
.
getId
());
dto
.
setTemplateCode
(
entity
.
getTemplateCode
());
dto
.
setType
(
entity
.
getType
());
dto
.
setName
(
entity
.
getName
());
dto
.
setOption
(
entity
.
getOption
());
dto
.
setEntityClass
(
entity
.
getEntityClass
());
return
dto
;
}
public
static
BizAiLawyerWritingTemplateDownloadEntity
dtoToEntity
(
BizAiLawyerWritingTemplateDownloadDto
dto
){
BizAiLawyerWritingTemplateDownloadEntity
entity
=
new
BizAiLawyerWritingTemplateDownloadEntity
();
entity
.
setId
(
dto
.
getId
());
entity
.
setTemplateCode
(
dto
.
getTemplateCode
());
entity
.
setType
(
dto
.
getType
());
entity
.
setName
(
dto
.
getName
());
entity
.
setOption
(
dto
.
getOption
());
entity
.
setEntityClass
(
dto
.
getEntityClass
());
return
entity
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/law/dto/BizAiLawyerWritingTemplateDownloadDto.java
0 → 100644
View file @
765ee98a
package
cn
.
com
.
poc
.
law
.
dto
;
public
class
BizAiLawyerWritingTemplateDownloadDto
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Long
id
;
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
}
/** template_code
*
*/
private
java
.
lang
.
String
templateCode
;
public
java
.
lang
.
String
getTemplateCode
(){
return
this
.
templateCode
;
}
public
void
setTemplateCode
(
java
.
lang
.
String
templateCode
){
this
.
templateCode
=
templateCode
;
}
/** type
*
*/
private
java
.
lang
.
String
type
;
public
java
.
lang
.
String
getType
(){
return
this
.
type
;
}
public
void
setType
(
java
.
lang
.
String
type
){
this
.
type
=
type
;
}
/** name
*
*/
private
java
.
lang
.
String
name
;
public
java
.
lang
.
String
getName
(){
return
this
.
name
;
}
public
void
setName
(
java
.
lang
.
String
name
){
this
.
name
=
name
;
}
/** option
*
*/
private
java
.
lang
.
String
option
;
public
java
.
lang
.
String
getOption
(){
return
this
.
option
;
}
public
void
setOption
(
java
.
lang
.
String
option
){
this
.
option
=
option
;
}
/** entity_class
*
*/
private
java
.
lang
.
String
entityClass
;
public
java
.
lang
.
String
getEntityClass
(){
return
this
.
entityClass
;
}
public
void
setEntityClass
(
java
.
lang
.
String
entityClass
){
this
.
entityClass
=
entityClass
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/law/entity/BizAiLawyerWritingTemplateDownloadEntity.java
0 → 100644
View file @
765ee98a
package
cn
.
com
.
poc
.
law
.
entity
;
public
class
BizAiLawyerWritingTemplateDownloadEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Long
id
;
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
}
/** template_code
*
*/
private
java
.
lang
.
String
templateCode
;
public
java
.
lang
.
String
getTemplateCode
(){
return
this
.
templateCode
;
}
public
void
setTemplateCode
(
java
.
lang
.
String
templateCode
){
this
.
templateCode
=
templateCode
;
}
/** type
*
*/
private
java
.
lang
.
String
type
;
public
java
.
lang
.
String
getType
(){
return
this
.
type
;
}
public
void
setType
(
java
.
lang
.
String
type
){
this
.
type
=
type
;
}
/** name
*
*/
private
java
.
lang
.
String
name
;
public
java
.
lang
.
String
getName
(){
return
this
.
name
;
}
public
void
setName
(
java
.
lang
.
String
name
){
this
.
name
=
name
;
}
/** option
/** name
*
*/
private
java
.
lang
.
String
value
;
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
/** option
*
*/
private
java
.
lang
.
String
option
;
public
java
.
lang
.
String
getOption
(){
return
this
.
option
;
}
public
void
setOption
(
java
.
lang
.
String
option
){
this
.
option
=
option
;
}
/** entity_class
*
*/
private
java
.
lang
.
String
entityClass
;
public
java
.
lang
.
String
getEntityClass
(){
return
this
.
entityClass
;
}
public
void
setEntityClass
(
java
.
lang
.
String
entityClass
){
this
.
entityClass
=
entityClass
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/law/entity/legislativeDocument/LegislativeDocumentResult.java
View file @
765ee98a
...
...
@@ -7,11 +7,11 @@ package cn.com.poc.law.entity.legislativeDocument;
*/
public
class
LegislativeDocumentResult
{
CaseInfo
caseInfo
;
ConflictInfo
conflictInfo
;
SupplementaryInfo
supplementaryInfo
;
CaseContactInfo
caseContactInfo
;
ClientInfo
clientInfo
;
CaseInfo
caseInfo
=
new
CaseInfo
()
;
ConflictInfo
conflictInfo
=
new
ConflictInfo
()
;
SupplementaryInfo
supplementaryInfo
=
new
SupplementaryInfo
()
;
CaseContactInfo
caseContactInfo
=
new
CaseContactInfo
()
;
ClientInfo
clientInfo
=
new
ClientInfo
()
;
String
reply
;
public
CaseInfo
getCaseInfo
()
{
...
...
src/main/java/cn/com/poc/law/extractEntityStrategy/LawyerTemplateExtractServiceBuilder.java
View file @
765ee98a
package
cn
.
com
.
poc
.
law
.
extractEntityStrategy
;
import
cn.com.poc.law.extractEntityStrategy.extractEntityType.MotorVehicleDrivingComplaint
;
import
cn.com.poc.law.extractEntityStrategy.extractEntityType.MotorVehicleDrivingComplaint
Type
;
import
cn.com.yict.framemax.core.exception.BusinessException
;
import
org.springframework.beans.BeansException
;
import
org.springframework.context.ApplicationContext
;
...
...
@@ -15,7 +15,7 @@ public class LawyerTemplateExtractServiceBuilder implements ApplicationContextAw
public
ExtractEntityStrategy
getService
(
LawyerExtractTypeConstants
.
LawyerExtractTypeEnum
type
)
throws
Exception
{
if
(
LawyerExtractTypeConstants
.
LawyerExtractTypeEnum
.
motorVehicleDrivingComplaint
.
name
().
equals
(
type
.
name
()))
{
return
applicationContext
.
getBean
(
MotorVehicleDrivingComplaint
.
class
);
return
applicationContext
.
getBean
(
MotorVehicleDrivingComplaint
Type
.
class
);
}
throw
new
BusinessException
(
"选择模板异常!"
);
}
...
...
src/main/java/cn/com/poc/law/extractEntityStrategy/TestEntity.java
0 → 100644
View file @
765ee98a
package
cn
.
com
.
poc
.
law
.
extractEntityStrategy
;
/**
* @Author:Roger Wu
* @name:TestEntity
* @Date:2025-08-15 23:38
*/
public
class
TestEntity
{
private
String
type
;
private
String
name
;
private
String
value
;
private
String
optionValue
;
private
String
entityClass
;
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getOptionValue
()
{
return
optionValue
;
}
public
void
setOptionValue
(
String
optionValue
)
{
this
.
optionValue
=
optionValue
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
public
String
getEntityClass
()
{
return
entityClass
;
}
public
void
setEntityClass
(
String
entityClass
)
{
this
.
entityClass
=
entityClass
;
}
}
src/main/java/cn/com/poc/law/extractEntityStrategy/extractEntityType/MotorVehicleDrivingComplaint.java
→
src/main/java/cn/com/poc/law/extractEntityStrategy/extractEntityType/MotorVehicleDrivingComplaint
Type
.java
View file @
765ee98a
This diff is collapsed.
Click to expand it.
src/main/java/cn/com/poc/law/jsonSerializer/JacksonDateArrayDeSerializer.java
View file @
765ee98a
...
...
@@ -22,6 +22,9 @@ public class JacksonDateArrayDeSerializer extends JsonDeserializer<String> {
public
String
deserialize
(
JsonParser
p
,
DeserializationContext
ctxt
)
throws
IOException
,
JsonProcessingException
{
//[]
String
date
=
p
.
getText
();
if
(!
date
.
contains
(
"-"
))
{
return
date
;
}
try
{
// 解析为 Date 对象
return
String
.
valueOf
(
dateFormat
.
parse
(
date
).
getTime
());
...
...
src/main/java/cn/com/poc/law/model/BizAiLawyerWritingTemplateDownloadModel.java
0 → 100644
View file @
765ee98a
package
cn
.
com
.
poc
.
law
.
model
;
import
java.io.Serializable
;
import
cn.com.yict.framemax.data.model.BaseModelClass
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Id
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
/**
* Model class for biz_ai_lawyer_writing_template_download
* 法律文书模板导出
*/
@Entity
@Table
(
name
=
"biz_ai_lawyer_writing_template_download"
)
@DynamicInsert
@DynamicUpdate
public
class
BizAiLawyerWritingTemplateDownloadModel
extends
BaseModelClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Long
id
;
@Column
(
name
=
"id"
,
length
=
19
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
super
.
addValidField
(
"id"
);
}
/** template_code
*
*/
private
java
.
lang
.
String
templateCode
;
@Column
(
name
=
"template_code"
,
length
=
100
)
public
java
.
lang
.
String
getTemplateCode
(){
return
this
.
templateCode
;
}
public
void
setTemplateCode
(
java
.
lang
.
String
templateCode
){
this
.
templateCode
=
templateCode
;
super
.
addValidField
(
"templateCode"
);
}
/** type
*
*/
private
java
.
lang
.
String
type
;
@Column
(
name
=
"type"
,
length
=
255
)
public
java
.
lang
.
String
getType
(){
return
this
.
type
;
}
public
void
setType
(
java
.
lang
.
String
type
){
this
.
type
=
type
;
super
.
addValidField
(
"type"
);
}
/** name
*
*/
private
java
.
lang
.
String
name
;
@Column
(
name
=
"name"
,
length
=
100
)
public
java
.
lang
.
String
getName
(){
return
this
.
name
;
}
public
void
setName
(
java
.
lang
.
String
name
){
this
.
name
=
name
;
super
.
addValidField
(
"name"
);
}
/** option
*
*/
private
java
.
lang
.
String
option
;
@Column
(
name
=
"option"
,
length
=
100
)
public
java
.
lang
.
String
getOption
(){
return
this
.
option
;
}
public
void
setOption
(
java
.
lang
.
String
option
){
this
.
option
=
option
;
super
.
addValidField
(
"option"
);
}
/** entity_class
*
*/
private
java
.
lang
.
String
entityClass
;
@Column
(
name
=
"entity_class"
,
length
=
255
)
public
java
.
lang
.
String
getEntityClass
(){
return
this
.
entityClass
;
}
public
void
setEntityClass
(
java
.
lang
.
String
entityClass
){
this
.
entityClass
=
entityClass
;
super
.
addValidField
(
"entityClass"
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/law/repository/BizAiLawyerWritingTemplateDownloadRepository.java
0 → 100644
View file @
765ee98a
package
cn
.
com
.
poc
.
law
.
repository
;
import
cn.com.yict.framemax.data.repository.Repository
;
import
cn.com.poc.law.model.BizAiLawyerWritingTemplateDownloadModel
;
public
interface
BizAiLawyerWritingTemplateDownloadRepository
extends
Repository
<
BizAiLawyerWritingTemplateDownloadModel
,
java
.
lang
.
Long
>
{
}
\ No newline at end of file
src/main/java/cn/com/poc/law/rest/BizAiLawyerWritingTemplateDownloadRest.java
0 → 100644
View file @
765ee98a
package
cn
.
com
.
poc
.
law
.
rest
;
import
cn.com.yict.framemax.core.rest.BaseRest
;
import
cn.com.poc.law.dto.BizAiLawyerWritingTemplateDownloadDto
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
java.util.Collection
;
import
java.util.List
;
import
cn.com.yict.framemax.web.permission.Access
;
import
cn.com.yict.framemax.web.permission.Permission
;
import
org.springframework.web.bind.annotation.RequestBody
;
public
interface
BizAiLawyerWritingTemplateDownloadRest
extends
BaseRest
{
BizAiLawyerWritingTemplateDownloadDto
getById
(
java
.
lang
.
Long
id
)
throws
Exception
;
List
<
BizAiLawyerWritingTemplateDownloadDto
>
getList
(
BizAiLawyerWritingTemplateDownloadDto
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
BizAiLawyerWritingTemplateDownloadDto
save
(
BizAiLawyerWritingTemplateDownloadDto
dto
)
throws
Exception
;
BizAiLawyerWritingTemplateDownloadDto
update
(
BizAiLawyerWritingTemplateDownloadDto
dto
)
throws
Exception
;
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
;
}
\ No newline at end of file
src/main/java/cn/com/poc/law/rest/impl/BizAiLawyerWritingTemplateDownloadRestImpl.java
0 → 100644
View file @
765ee98a
package
cn
.
com
.
poc
.
law
.
rest
.
impl
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Component
;
import
cn.com.poc.law.rest.BizAiLawyerWritingTemplateDownloadRest
;
import
cn.com.poc.law.service.BizAiLawyerWritingTemplateDownloadService
;
import
cn.com.poc.law.dto.BizAiLawyerWritingTemplateDownloadDto
;
import
cn.com.poc.law.entity.BizAiLawyerWritingTemplateDownloadEntity
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
cn.com.poc.law.convert.BizAiLawyerWritingTemplateDownloadConvert
;
import
java.util.stream.Collectors
;
import
org.springframework.util.Assert
;
@Component
public
class
BizAiLawyerWritingTemplateDownloadRestImpl
implements
BizAiLawyerWritingTemplateDownloadRest
{
@Resource
private
BizAiLawyerWritingTemplateDownloadService
service
;
public
BizAiLawyerWritingTemplateDownloadDto
getById
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
return
BizAiLawyerWritingTemplateDownloadConvert
.
entityToDto
(
service
.
get
(
id
));
}
public
List
<
BizAiLawyerWritingTemplateDownloadDto
>
getList
(
BizAiLawyerWritingTemplateDownloadDto
dto
,
PagingInfo
pagingInfo
)
throws
Exception
{
return
service
.
findByExample
(
BizAiLawyerWritingTemplateDownloadConvert
.
dtoToEntity
(
dto
),
pagingInfo
)
.
stream
()
.
map
(
BizAiLawyerWritingTemplateDownloadConvert:
:
entityToDto
)
.
collect
(
Collectors
.
toList
());
}
public
BizAiLawyerWritingTemplateDownloadDto
save
(
BizAiLawyerWritingTemplateDownloadDto
dto
)
throws
Exception
{
Assert
.
notNull
(
dto
);
BizAiLawyerWritingTemplateDownloadEntity
entity
=
BizAiLawyerWritingTemplateDownloadConvert
.
dtoToEntity
(
dto
);
return
BizAiLawyerWritingTemplateDownloadConvert
.
entityToDto
(
service
.
save
(
entity
));
}
public
BizAiLawyerWritingTemplateDownloadDto
update
(
BizAiLawyerWritingTemplateDownloadDto
dto
)
throws
Exception
{
Assert
.
notNull
(
dto
);
BizAiLawyerWritingTemplateDownloadEntity
entity
=
BizAiLawyerWritingTemplateDownloadConvert
.
dtoToEntity
(
dto
);
return
BizAiLawyerWritingTemplateDownloadConvert
.
entityToDto
(
service
.
update
(
entity
));
}
public
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
service
.
deletedById
(
id
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/law/service/BizAiLawyerWritingTemplateDownloadService.java
0 → 100644
View file @
765ee98a
package
cn
.
com
.
poc
.
law
.
service
;
import
cn.com.yict.framemax.core.service.BaseService
;
import
cn.com.poc.law.entity.BizAiLawyerWritingTemplateDownloadEntity
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
java.util.Collection
;
import
java.util.List
;
public
interface
BizAiLawyerWritingTemplateDownloadService
extends
BaseService
{
BizAiLawyerWritingTemplateDownloadEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
;
List
<
BizAiLawyerWritingTemplateDownloadEntity
>
findByExample
(
BizAiLawyerWritingTemplateDownloadEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
BizAiLawyerWritingTemplateDownloadEntity
save
(
BizAiLawyerWritingTemplateDownloadEntity
entity
)
throws
Exception
;
BizAiLawyerWritingTemplateDownloadEntity
update
(
BizAiLawyerWritingTemplateDownloadEntity
entity
)
throws
Exception
;
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
;
}
\ No newline at end of file
src/main/java/cn/com/poc/law/service/impl/BizAiLawyerWritingTemplateDataServiceImpl.java
View file @
765ee98a
...
...
@@ -154,9 +154,12 @@ public class BizAiLawyerWritingTemplateDataServiceImpl extends BaseServiceImpl
}
ExtractEntityStrategy
extractEntityStrategy
=
LawyerTemplateExtractServiceBuilder
.
getService
(
LawyerExtractTypeConstants
.
LawyerExtractTypeEnum
.
get
(
models
.
get
(
0
).
getBizAiLawyerWritingTemplateCode
()));
JsonUtils
.
deSerialize
(
models
.
get
(
0
).
getBizAiLawyerWritingTemplateData
(),
LegalTemplateDto
.
class
);
// return extractEntityStrategy.downloadFile();
return
extractEntityStrategy
.
downloadFile
(
JsonUtils
.
deSerialize
(
models
.
get
(
0
).
getBizAiLawyerWritingTemplateData
(),
LegalTemplateDto
.
class
));
}
}
@Override
public
TemplateDataDetailDto
getTemplateDataDetail
(
String
dialoguesId
,
Long
userId
,
boolean
ifException
)
throws
Exception
{
BizAiDialoguesEntity
bizAiDialoguesEntity
=
new
BizAiDialoguesEntity
();
...
...
src/main/java/cn/com/poc/law/service/impl/BizAiLawyerWritingTemplateDownloadServiceImpl.java
0 → 100644
View file @
765ee98a
package
cn
.
com
.
poc
.
law
.
service
.
impl
;
import
cn.com.yict.framemax.core.service.impl.BaseServiceImpl
;
import
cn.com.poc.law.service.BizAiLawyerWritingTemplateDownloadService
;
import
cn.com.poc.law.model.BizAiLawyerWritingTemplateDownloadModel
;
import
cn.com.poc.law.entity.BizAiLawyerWritingTemplateDownloadEntity
;
import
cn.com.poc.law.convert.BizAiLawyerWritingTemplateDownloadConvert
;
import
cn.com.poc.law.repository.BizAiLawyerWritingTemplateDownloadRepository
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
org.springframework.stereotype.Service
;
import
org.apache.commons.collections4.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.stream.Collectors
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.util.Assert
;
@Service
public
class
BizAiLawyerWritingTemplateDownloadServiceImpl
extends
BaseServiceImpl
implements
BizAiLawyerWritingTemplateDownloadService
{
@Resource
private
BizAiLawyerWritingTemplateDownloadRepository
repository
;
public
BizAiLawyerWritingTemplateDownloadEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizAiLawyerWritingTemplateDownloadModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
==
null
){
return
null
;
}
return
BizAiLawyerWritingTemplateDownloadConvert
.
modelToEntity
(
model
);
}
public
List
<
BizAiLawyerWritingTemplateDownloadEntity
>
findByExample
(
BizAiLawyerWritingTemplateDownloadEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
{
List
<
BizAiLawyerWritingTemplateDownloadEntity
>
result
=
new
ArrayList
<
BizAiLawyerWritingTemplateDownloadEntity
>();
BizAiLawyerWritingTemplateDownloadModel
model
=
new
BizAiLawyerWritingTemplateDownloadModel
();
if
(
example
!=
null
){
model
=
BizAiLawyerWritingTemplateDownloadConvert
.
entityToModel
(
example
);
}
List
<
BizAiLawyerWritingTemplateDownloadModel
>
models
=
this
.
repository
.
findByExample
(
model
,
pagingInfo
);
if
(
CollectionUtils
.
isNotEmpty
(
models
))
{
result
=
models
.
stream
().
map
(
BizAiLawyerWritingTemplateDownloadConvert:
:
modelToEntity
).
collect
(
Collectors
.
toList
());
}
return
result
;
}
public
BizAiLawyerWritingTemplateDownloadEntity
save
(
BizAiLawyerWritingTemplateDownloadEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
entity
.
setId
(
null
);
BizAiLawyerWritingTemplateDownloadModel
model
=
BizAiLawyerWritingTemplateDownloadConvert
.
entityToModel
(
entity
);
BizAiLawyerWritingTemplateDownloadModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizAiLawyerWritingTemplateDownloadConvert
.
modelToEntity
(
saveModel
);
}
public
BizAiLawyerWritingTemplateDownloadEntity
update
(
BizAiLawyerWritingTemplateDownloadEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
Assert
.
notNull
(
entity
.
getId
(),
"update pk can not be null"
);
BizAiLawyerWritingTemplateDownloadModel
model
=
this
.
repository
.
get
(
entity
.
getId
());
if
(
entity
.
getTemplateCode
()
!=
null
){
model
.
setTemplateCode
(
entity
.
getTemplateCode
());
}
if
(
entity
.
getType
()
!=
null
){
model
.
setType
(
entity
.
getType
());
}
if
(
entity
.
getName
()
!=
null
){
model
.
setName
(
entity
.
getName
());
}
if
(
entity
.
getOption
()
!=
null
){
model
.
setOption
(
entity
.
getOption
());
}
if
(
entity
.
getEntityClass
()
!=
null
){
model
.
setEntityClass
(
entity
.
getEntityClass
());
}
BizAiLawyerWritingTemplateDownloadModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizAiLawyerWritingTemplateDownloadConvert
.
modelToEntity
(
saveModel
);
}
public
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizAiLawyerWritingTemplateDownloadModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
!=
null
){
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment