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
1fb05371
Commit
1fb05371
authored
Jun 21, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
7af2f1c8
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
164 additions
and
162 deletions
+164
-162
AlertForm.java
...om/yeejoin/amos/boot/module/jcs/api/entity/AlertForm.java
+3
-3
AlertFormType.java
...eejoin/amos/boot/module/jcs/api/entity/AlertFormType.java
+3
-3
AlertFormValue.java
...ejoin/amos/boot/module/jcs/api/entity/AlertFormValue.java
+7
-7
AlertFormMapper.java
...join/amos/boot/module/jcs/api/mapper/AlertFormMapper.java
+2
-2
AlertFormTypeMapper.java
.../amos/boot/module/jcs/api/mapper/AlertFormTypeMapper.java
+2
-2
AlertFormValueMapper.java
...amos/boot/module/jcs/api/mapper/AlertFormValueMapper.java
+2
-2
IAlertFormService.java
...n/amos/boot/module/jcs/api/service/IAlertFormService.java
+2
-2
IAlertFormTypeService.java
...os/boot/module/jcs/api/service/IAlertFormTypeService.java
+2
-2
IAlertFormValueService.java
...s/boot/module/jcs/api/service/IAlertFormValueService.java
+2
-2
AlertCalledVo.java
...om/yeejoin/amos/boot/module/jcs/api/vo/AlertCalledVo.java
+4
-4
AlertFormTypeVo.java
.../yeejoin/amos/boot/module/jcs/api/vo/AlertFormTypeVo.java
+3
-3
AlertFormValueVo.java
...yeejoin/amos/boot/module/jcs/api/vo/AlertFormValueVo.java
+4
-4
AlertFormVo.java
.../com/yeejoin/amos/boot/module/jcs/api/vo/AlertFormVo.java
+6
-6
FormList.java
...ava/com/yeejoin/amos/boot/module/jcs/api/vo/FormList.java
+10
-10
AlertCalledController.java
...boot/module/jcs/biz/controller/AlertCalledController.java
+9
-9
AlertFormController.java
...s/boot/module/jcs/biz/controller/AlertFormController.java
+35
-35
AlertFormTypeController.java
...ot/module/jcs/biz/controller/AlertFormTypeController.java
+27
-27
AlertFormValueController.java
...t/module/jcs/biz/controller/AlertFormValueController.java
+27
-27
AlertFormServiceImpl.java
...oot/module/jcs/biz/service/impl/AlertFormServiceImpl.java
+6
-4
AlertFormTypeServiceImpl.java
...module/jcs/biz/service/impl/AlertFormTypeServiceImpl.java
+4
-4
AlertFormValueServiceImpl.java
...odule/jcs/biz/service/impl/AlertFormValueServiceImpl.java
+4
-4
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/entity/AlertF
ro
m.java
→
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/entity/AlertF
or
m.java
View file @
1fb05371
...
...
@@ -21,9 +21,9 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"jc_alert_f
ro
m"
)
@ApiModel
(
value
=
"AlertF
ro
m对象"
,
description
=
"警情表单"
)
public
class
AlertF
ro
m
extends
BaseEntity
{
@TableName
(
"jc_alert_f
or
m"
)
@ApiModel
(
value
=
"AlertF
or
m对象"
,
description
=
"警情表单"
)
public
class
AlertF
or
m
extends
BaseEntity
{
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/entity/AlertF
ro
mType.java
→
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/entity/AlertF
or
mType.java
View file @
1fb05371
...
...
@@ -21,9 +21,9 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"jc_alert_f
ro
m_type"
)
@ApiModel
(
value
=
"AlertF
ro
mType对象"
,
description
=
"动态表单类型"
)
public
class
AlertF
ro
mType
extends
BaseEntity
{
@TableName
(
"jc_alert_f
or
m_type"
)
@ApiModel
(
value
=
"AlertF
or
mType对象"
,
description
=
"动态表单类型"
)
public
class
AlertF
or
mType
extends
BaseEntity
{
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/entity/AlertF
ro
mValue.java
→
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/entity/AlertF
or
mValue.java
View file @
1fb05371
...
...
@@ -21,15 +21,15 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"jc_alert_f
ro
m_value"
)
@ApiModel
(
value
=
"AlertF
ro
mValue对象"
,
description
=
""
)
public
class
AlertF
ro
mValue
extends
BaseEntity
{
@TableName
(
"jc_alert_f
or
m_value"
)
@ApiModel
(
value
=
"AlertF
or
mValue对象"
,
description
=
""
)
public
class
AlertF
or
mValue
extends
BaseEntity
{
@ApiModelProperty
(
value
=
"表单id"
)
private
Long
alertF
ro
mId
;
private
Long
alertF
or
mId
;
@ApiModelProperty
(
value
=
"警情id"
)
private
Long
alertCalledId
;
...
...
@@ -54,13 +54,13 @@ public class AlertFromValue extends BaseEntity {
public
AlertF
ro
mValue
()
{
public
AlertF
or
mValue
()
{
super
();
}
public
AlertF
romValue
(
Long
alertFro
mId
,
String
fieldName
,
String
fieldCode
)
{
public
AlertF
ormValue
(
Long
alertFor
mId
,
String
fieldName
,
String
fieldCode
)
{
super
();
this
.
alertF
romId
=
alertFro
mId
;
this
.
alertF
ormId
=
alertFor
mId
;
this
.
fieldName
=
fieldName
;
this
.
fieldCode
=
fieldCode
;
}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/AlertF
ro
mMapper.java
→
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/AlertF
or
mMapper.java
View file @
1fb05371
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
ro
m
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
or
m
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
...
...
@@ -9,6 +9,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author tb
* @date 2021-06-17
*/
public
interface
AlertF
romMapper
extends
BaseMapper
<
AlertFro
m
>
{
public
interface
AlertF
ormMapper
extends
BaseMapper
<
AlertFor
m
>
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/AlertF
ro
mTypeMapper.java
→
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/AlertF
or
mTypeMapper.java
View file @
1fb05371
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFromType
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormType
;
/**
* 动态表单类型 Mapper 接口
...
...
@@ -9,6 +9,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author tb
* @date 2021-06-17
*/
public
interface
AlertF
romTypeMapper
extends
BaseMapper
<
AlertFro
mType
>
{
public
interface
AlertF
ormTypeMapper
extends
BaseMapper
<
AlertFor
mType
>
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/AlertF
ro
mValueMapper.java
→
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/AlertF
or
mValueMapper.java
View file @
1fb05371
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
ro
mValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
or
mValue
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
...
...
@@ -9,6 +9,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author tb
* @date 2021-06-17
*/
public
interface
AlertF
romValueMapper
extends
BaseMapper
<
AlertFro
mValue
>
{
public
interface
AlertF
ormValueMapper
extends
BaseMapper
<
AlertFor
mValue
>
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IAlertF
ro
mService.java
→
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IAlertF
or
mService.java
View file @
1fb05371
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
ro
m
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
or
m
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
...
...
@@ -9,6 +9,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @author tb
* @date 2021-06-17
*/
public
interface
IAlertF
romService
extends
IService
<
AlertFro
m
>
{
public
interface
IAlertF
ormService
extends
IService
<
AlertFor
m
>
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IAlertF
ro
mTypeService.java
→
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IAlertF
or
mTypeService.java
View file @
1fb05371
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFromType
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormType
;
/**
* 动态表单类型 服务类
...
...
@@ -9,6 +9,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @author tb
* @date 2021-06-17
*/
public
interface
IAlertF
romTypeService
extends
IService
<
AlertFro
mType
>
{
public
interface
IAlertF
ormTypeService
extends
IService
<
AlertFor
mType
>
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IAlertF
ro
mValueService.java
→
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IAlertF
or
mValueService.java
View file @
1fb05371
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFromValue
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
/**
* 服务类
...
...
@@ -9,6 +9,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @author tb
* @date 2021-06-17
*/
public
interface
IAlertF
romValueService
extends
IService
<
AlertFro
mValue
>
{
public
interface
IAlertF
ormValueService
extends
IService
<
AlertFor
mValue
>
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/vo/AlertCalledVo.java
View file @
1fb05371
...
...
@@ -6,7 +6,7 @@ import java.util.List;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
ro
mValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
or
mValue
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -30,11 +30,11 @@ public class AlertCalledVo{
private
AlertCalled
alertCalled
;
@ApiModelProperty
(
value
=
"动态表单值"
)
private
List
<
AlertF
romValue
>
alertFro
mValue
;
private
List
<
AlertF
ormValue
>
alertFor
mValue
;
public
AlertCalledVo
(
AlertCalled
alertCalled
,
List
<
AlertF
romValue
>
alertFro
mValue
)
{
public
AlertCalledVo
(
AlertCalled
alertCalled
,
List
<
AlertF
ormValue
>
alertFor
mValue
)
{
this
.
alertCalled
=
alertCalled
;
this
.
alertF
romValue
=
alertFro
mValue
;
this
.
alertF
ormValue
=
alertFor
mValue
;
}
public
AlertCalledVo
()
{
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/vo/AlertF
ro
mTypeVo.java
→
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/vo/AlertF
or
mTypeVo.java
View file @
1fb05371
...
...
@@ -20,9 +20,9 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
*/
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"jc_alert_f
ro
m_type"
)
@ApiModel
(
value
=
"AlertF
ro
mTypeVo"
,
description
=
"动态表单类型"
)
public
class
AlertF
ro
mTypeVo
{
@TableName
(
"jc_alert_f
or
m_type"
)
@ApiModel
(
value
=
"AlertF
or
mTypeVo"
,
description
=
"动态表单类型"
)
public
class
AlertF
or
mTypeVo
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/vo/AlertF
ro
mValueVo.java
→
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/vo/AlertF
or
mValueVo.java
View file @
1fb05371
...
...
@@ -20,15 +20,15 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
*/
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"jc_alert_f
ro
m_value"
)
@ApiModel
(
value
=
"AlertF
ro
mValueVo"
,
description
=
""
)
public
class
AlertF
ro
mValueVo
{
@TableName
(
"jc_alert_f
or
m_value"
)
@ApiModel
(
value
=
"AlertF
or
mValueVo"
,
description
=
""
)
public
class
AlertF
or
mValueVo
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"表单id"
)
private
Integer
alertF
ro
mId
;
private
Integer
alertF
or
mId
;
@ApiModelProperty
(
value
=
"警情id"
)
private
Long
alertCalledId
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/vo/AlertF
ro
mVo.java
→
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/vo/AlertF
or
mVo.java
View file @
1fb05371
...
...
@@ -2,8 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.api.vo;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFromValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -21,7 +20,7 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
* @date 2021-06-17
*/
@Data
public
class
AlertF
ro
mVo
{
public
class
AlertF
or
mVo
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -39,11 +38,12 @@ public class AlertFromVo{
private
Items
data
;
@ApiModelProperty
(
value
=
"提交表单附加字段"
)
private
AlertFromValue
formItemDescr
;
public
AlertFromVo
()
{
private
AlertFormValue
formItemDescr
;
public
AlertFormVo
()
{
super
();
}
public
AlertF
romVo
(
String
key
,
String
label
,
String
type
,
Items
data
,
AlertFro
mValue
formItemDescr
)
{
public
AlertF
ormVo
(
String
key
,
String
label
,
String
type
,
Items
data
,
AlertFor
mValue
formItemDescr
)
{
super
();
this
.
key
=
key
;
this
.
label
=
label
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/vo/F
ro
mList.java
→
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/vo/F
or
mList.java
View file @
1fb05371
...
...
@@ -10,14 +10,14 @@ import org.apache.velocity.runtime.directive.Foreach;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
ro
m
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
ro
mValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
or
m
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
or
mValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.DataDictionary
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IDataDictionaryService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IFireTeamService
;
@Component
public
class
F
ro
mList
{
public
class
F
or
mList
{
/**
* 数据字典
*
...
...
@@ -25,22 +25,22 @@ public class FromList {
@Autowired
IDataDictionaryService
iDataDictionaryService
;
public
List
<
AlertF
romVo
>
getFromlist
(
List
<
AlertFro
m
>
list
)
{
public
List
<
AlertF
ormVo
>
getFormlist
(
List
<
AlertFor
m
>
list
)
{
List
<
AlertF
romVo
>
listfrom
=
new
ArrayList
<
AlertFro
mVo
>();
List
<
AlertF
ormVo
>
listfrom
=
new
ArrayList
<
AlertFor
mVo
>();
// 组装数据
for
(
AlertF
ro
m
alertFrom
:
list
)
{
for
(
AlertF
or
m
alertFrom
:
list
)
{
if
(
alertFrom
.
getFieldType
().
equals
(
"string"
)||
alertFrom
.
getFieldType
().
equals
(
"date"
)||
alertFrom
.
getFieldType
().
equals
(
"textarea"
))
{
AlertF
romVo
vo
=
new
AlertFro
mVo
(
alertFrom
.
getFieldCode
(),
alertFrom
.
getFieldName
(),
alertFrom
.
getFieldType
(),
null
,
new
AlertF
ro
mValue
(
alertFrom
.
getSequenceNbr
(),
alertFrom
.
getFieldName
(),
alertFrom
.
getFieldCode
()));
AlertF
ormVo
vo
=
new
AlertFor
mVo
(
alertFrom
.
getFieldCode
(),
alertFrom
.
getFieldName
(),
alertFrom
.
getFieldType
(),
null
,
new
AlertF
or
mValue
(
alertFrom
.
getSequenceNbr
(),
alertFrom
.
getFieldName
(),
alertFrom
.
getFieldCode
()));
listfrom
.
add
(
vo
);
}
else
{
// 查询数据项
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
columnMap
.
put
(
"type"
,
alertFrom
.
getFieldValueCode
());
Collection
<
DataDictionary
>
listDataDictionary
=
iDataDictionaryService
.
listByMap
(
columnMap
);
AlertF
romVo
vo
=
new
AlertFro
mVo
(
alertFrom
.
getFieldCode
(),
alertFrom
.
getFieldName
(),
alertFrom
.
getFieldType
(),
new
Items
(
getdata
(
listDataDictionary
)),
new
AlertF
ro
mValue
(
alertFrom
.
getSequenceNbr
(),
alertFrom
.
getFieldName
(),
alertFrom
.
getFieldCode
()));
AlertF
ormVo
vo
=
new
AlertFor
mVo
(
alertFrom
.
getFieldCode
(),
alertFrom
.
getFieldName
(),
alertFrom
.
getFieldType
(),
new
Items
(
getdata
(
listDataDictionary
)),
new
AlertF
or
mValue
(
alertFrom
.
getSequenceNbr
(),
alertFrom
.
getFieldName
(),
alertFrom
.
getFieldCode
()));
listfrom
.
add
(
vo
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertCalledController.java
View file @
1fb05371
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
ro
mValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
or
mValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersJacket
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertF
ro
mValueService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertF
or
mValueService
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.AlertCalledListVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.AlertCalledVo
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -45,7 +45,7 @@ public class AlertCalledController extends BaseController {
@Autowired
IAlertCalledService
iAlertCalledService
;
@Autowired
IAlertF
romValueService
iAlertFro
mValueService
;
IAlertF
ormValueService
iAlertFor
mValueService
;
/**
* 新增警情接警记录
...
...
@@ -69,13 +69,13 @@ public class AlertCalledController extends BaseController {
}
iAlertCalledService
.
save
(
alertCalled
);
// 动态表单
List
<
AlertF
romValue
>
alertFromValuelist
=
alertCalledVo
.
getAlertFro
mValue
();
List
<
AlertF
ormValue
>
alertFormValuelist
=
alertCalledVo
.
getAlertFor
mValue
();
// 填充警情主键
alertF
romValuelist
.
stream
().
forEach
(
alertFro
mValue
->
{
alertF
ro
mValue
.
setAlertCalledId
(
alertCalled
.
getSequenceNbr
());
alertF
ormValuelist
.
stream
().
forEach
(
alertFor
mValue
->
{
alertF
or
mValue
.
setAlertCalledId
(
alertCalled
.
getSequenceNbr
());
});
// 保存动态表单数据
iAlertF
romValueService
.
saveBatch
(
alertFro
mValuelist
);
iAlertF
ormValueService
.
saveBatch
(
alertFor
mValuelist
);
iAlertCalledService
.
save
(
alertCalled
);
return
CommonResponseUtil
.
success
(
alertCalledVo
);
}
...
...
@@ -120,8 +120,8 @@ public class AlertCalledController extends BaseController {
QueryWrapper
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
// 警情动态表单数据
List
<
AlertF
romValue
>
alertFromValue
=
iAlertFro
mValueService
.
list
(
queryWrapper
);
AlertCalledVo
alertCalledVo
=
new
AlertCalledVo
(
alertCalled
,
alertF
ro
mValue
);
List
<
AlertF
ormValue
>
alertFormValue
=
iAlertFor
mValueService
.
list
(
queryWrapper
);
AlertCalledVo
alertCalledVo
=
new
AlertCalledVo
(
alertCalled
,
alertF
or
mValue
);
return
CommonResponseUtil
.
success
(
alertCalledVo
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertF
ro
mController.java
→
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertF
or
mController.java
View file @
1fb05371
...
...
@@ -6,17 +6,17 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertF
ro
mService
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.AlertF
ro
mVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.F
ro
mList
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertF
or
mService
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.AlertF
or
mVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.F
or
mList
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
ro
m
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
ro
mValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
or
m
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
or
mValue
;
import
com.yeejoin.amos.boot.biz.common.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -34,13 +34,13 @@ import java.util.List;
*/
@RestController
@Api
(
tags
=
"警情表单Api"
)
@RequestMapping
(
value
=
"/jcs/alert-
fro
m"
)
public
class
AlertF
ro
mController
extends
BaseController
{
@RequestMapping
(
value
=
"/jcs/alert-
For
m"
)
public
class
AlertF
or
mController
extends
BaseController
{
@Autowired
IAlertF
romService
iAlertFro
mService
;
IAlertF
ormService
iAlertFor
mService
;
@Autowired
F
romList
fro
mList
;
F
ormList
For
mList
;
/**
* 新增警情表单
* @return
...
...
@@ -48,8 +48,8 @@ public class AlertFromController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增警情表单"
,
notes
=
"新增警情表单"
)
public
boolean
saveAlertF
rom
(
HttpServletRequest
request
,
@RequestBody
AlertFrom
alertFro
m
){
return
iAlertF
romService
.
save
(
alertFro
m
);
public
boolean
saveAlertF
orm
(
HttpServletRequest
request
,
@RequestBody
AlertForm
alertFor
m
){
return
iAlertF
ormService
.
save
(
alertFor
m
);
}
/**
...
...
@@ -61,7 +61,7 @@ public class AlertFromController extends BaseController {
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
public
boolean
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iAlertF
ro
mService
.
removeById
(
id
);
return
iAlertF
or
mService
.
removeById
(
id
);
}
...
...
@@ -74,8 +74,8 @@ public class AlertFromController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改警情表单"
,
notes
=
"修改警情表单"
)
public
boolean
updateByIdAlertF
rom
(
HttpServletRequest
request
,
@RequestBody
AlertFrom
alertFro
m
){
return
iAlertF
romService
.
updateById
(
alertFro
m
);
public
boolean
updateByIdAlertF
orm
(
HttpServletRequest
request
,
@RequestBody
AlertForm
alertFor
m
){
return
iAlertF
ormService
.
updateById
(
alertFor
m
);
}
...
...
@@ -88,8 +88,8 @@ public class AlertFromController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
AlertF
ro
m
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iAlertF
ro
mService
.
getById
(
id
);
public
AlertF
or
m
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iAlertF
or
mService
.
getById
(
id
);
}
...
...
@@ -101,15 +101,15 @@ public class AlertFromController extends BaseController {
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/
fro
m/{code}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/
For
m/{code}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
ResponseModel
selectF
ro
mdItem
(
HttpServletRequest
request
,
@PathVariable
String
code
){
public
ResponseModel
selectF
or
mdItem
(
HttpServletRequest
request
,
@PathVariable
String
code
){
QueryWrapper
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_type_code"
,
code
);
//警情动态表单数据
List
<
AlertF
rom
>
alertFromValue
=
iAlertFro
mService
.
list
(
queryWrapper
);
List
<
AlertF
orm
>
alertFormValue
=
iAlertFor
mService
.
list
(
queryWrapper
);
List
<
AlertF
romVo
>
list
=
fromList
.
getFromlist
(
alertFro
mValue
);
List
<
AlertF
ormVo
>
list
=
FormList
.
getFormlist
(
alertFor
mValue
);
return
CommonResponseUtil
.
success
(
list
);
...
...
@@ -128,43 +128,43 @@ public class AlertFromController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
IPage
<
AlertF
rom
>
listPage
(
String
pageNum
,
String
pageSize
,
AlertFrom
alertFro
m
){
public
IPage
<
AlertF
orm
>
listPage
(
String
pageNum
,
String
pageSize
,
AlertForm
alertFor
m
){
Page
<
AlertF
ro
m
>
pageBean
;
QueryWrapper
<
AlertF
rom
>
alertFro
mQueryWrapper
=
new
QueryWrapper
<>();
Class
<?
extends
AlertF
rom
>
aClass
=
alertFro
m
.
getClass
();
Page
<
AlertF
or
m
>
pageBean
;
QueryWrapper
<
AlertF
orm
>
alertFor
mQueryWrapper
=
new
QueryWrapper
<>();
Class
<?
extends
AlertF
orm
>
aClass
=
alertFor
m
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
field
.
setAccessible
(
true
);
Object
o
=
field
.
get
(
alertF
ro
m
);
Object
o
=
field
.
get
(
alertF
or
m
);
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
String
name
=
NameUtils
.
camel2Underline
(
field
.
getName
());
if
(
type
.
equals
(
Integer
.
class
))
{
Integer
fileValue
=
(
Integer
)
field
.
get
(
alertF
ro
m
);
alertF
ro
mQueryWrapper
.
eq
(
name
,
fileValue
);
Integer
fileValue
=
(
Integer
)
field
.
get
(
alertF
or
m
);
alertF
or
mQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
alertF
ro
m
);
alertF
ro
mQueryWrapper
.
eq
(
name
,
fileValue
);
Long
fileValue
=
(
Long
)
field
.
get
(
alertF
or
m
);
alertF
or
mQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
alertF
ro
m
);
alertF
ro
mQueryWrapper
.
eq
(
name
,
fileValue
);
String
fileValue
=
(
String
)
field
.
get
(
alertF
or
m
);
alertF
or
mQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
String
fileValue
=
(
String
)
field
.
get
(
alertF
ro
m
);
alertF
ro
mQueryWrapper
.
eq
(
name
,
fileValue
);
String
fileValue
=
(
String
)
field
.
get
(
alertF
or
m
);
alertF
or
mQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
}
});
IPage
<
AlertF
ro
m
>
page
;
IPage
<
AlertF
or
m
>
page
;
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
}
else
{
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
page
=
iAlertF
romService
.
page
(
pageBean
,
alertFro
mQueryWrapper
);
page
=
iAlertF
ormService
.
page
(
pageBean
,
alertFor
mQueryWrapper
);
return
page
;
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertF
ro
mTypeController.java
→
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertF
or
mTypeController.java
View file @
1fb05371
...
...
@@ -6,7 +6,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertF
ro
mTypeService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertF
or
mTypeService
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -14,7 +14,7 @@ import javax.servlet.http.HttpServletRequest;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
ro
mType
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
or
mType
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
@@ -29,11 +29,11 @@ import java.util.Arrays;
*/
@RestController
@Api
(
tags
=
"动态表单类型Api"
)
@RequestMapping
(
value
=
"/jcs/alert-
fro
m-type"
)
public
class
AlertF
ro
mTypeController
extends
BaseController
{
@RequestMapping
(
value
=
"/jcs/alert-
For
m-type"
)
public
class
AlertF
or
mTypeController
extends
BaseController
{
@Autowired
IAlertF
romTypeService
iAlertFro
mTypeService
;
IAlertF
ormTypeService
iAlertFor
mTypeService
;
/**
* 新增动态表单类型
...
...
@@ -42,8 +42,8 @@ public class AlertFromTypeController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增动态表单类型"
,
notes
=
"新增动态表单类型"
)
public
boolean
saveAlertF
romType
(
HttpServletRequest
request
,
@RequestBody
AlertFromType
alertFro
mType
){
return
iAlertF
romTypeService
.
save
(
alertFro
mType
);
public
boolean
saveAlertF
ormType
(
HttpServletRequest
request
,
@RequestBody
AlertFormType
alertFor
mType
){
return
iAlertF
ormTypeService
.
save
(
alertFor
mType
);
}
/**
...
...
@@ -55,7 +55,7 @@ public class AlertFromTypeController extends BaseController {
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
public
boolean
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iAlertF
ro
mTypeService
.
removeById
(
id
);
return
iAlertF
or
mTypeService
.
removeById
(
id
);
}
...
...
@@ -68,8 +68,8 @@ public class AlertFromTypeController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改动态表单类型"
,
notes
=
"修改动态表单类型"
)
public
boolean
updateByIdAlertF
romType
(
HttpServletRequest
request
,
@RequestBody
AlertFromType
alertFro
mType
){
return
iAlertF
romTypeService
.
updateById
(
alertFro
mType
);
public
boolean
updateByIdAlertF
ormType
(
HttpServletRequest
request
,
@RequestBody
AlertFormType
alertFor
mType
){
return
iAlertF
ormTypeService
.
updateById
(
alertFor
mType
);
}
...
...
@@ -82,8 +82,8 @@ public class AlertFromTypeController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
AlertF
ro
mType
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iAlertF
ro
mTypeService
.
getById
(
id
);
public
AlertF
or
mType
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iAlertF
or
mTypeService
.
getById
(
id
);
}
...
...
@@ -95,43 +95,43 @@ public class AlertFromTypeController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
IPage
<
AlertF
romType
>
listPage
(
String
pageNum
,
String
pageSize
,
AlertFromType
alertFro
mType
){
public
IPage
<
AlertF
ormType
>
listPage
(
String
pageNum
,
String
pageSize
,
AlertFormType
alertFor
mType
){
Page
<
AlertF
ro
mType
>
pageBean
;
QueryWrapper
<
AlertF
romType
>
alertFro
mTypeQueryWrapper
=
new
QueryWrapper
<>();
Class
<?
extends
AlertF
romType
>
aClass
=
alertFro
mType
.
getClass
();
Page
<
AlertF
or
mType
>
pageBean
;
QueryWrapper
<
AlertF
ormType
>
alertFor
mTypeQueryWrapper
=
new
QueryWrapper
<>();
Class
<?
extends
AlertF
ormType
>
aClass
=
alertFor
mType
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
field
.
setAccessible
(
true
);
Object
o
=
field
.
get
(
alertF
ro
mType
);
Object
o
=
field
.
get
(
alertF
or
mType
);
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
String
name
=
NameUtils
.
camel2Underline
(
field
.
getName
());
if
(
type
.
equals
(
Integer
.
class
))
{
Integer
fileValue
=
(
Integer
)
field
.
get
(
alertF
ro
mType
);
alertF
ro
mTypeQueryWrapper
.
eq
(
name
,
fileValue
);
Integer
fileValue
=
(
Integer
)
field
.
get
(
alertF
or
mType
);
alertF
or
mTypeQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
alertF
ro
mType
);
alertF
ro
mTypeQueryWrapper
.
eq
(
name
,
fileValue
);
Long
fileValue
=
(
Long
)
field
.
get
(
alertF
or
mType
);
alertF
or
mTypeQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
alertF
ro
mType
);
alertF
ro
mTypeQueryWrapper
.
eq
(
name
,
fileValue
);
String
fileValue
=
(
String
)
field
.
get
(
alertF
or
mType
);
alertF
or
mTypeQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
String
fileValue
=
(
String
)
field
.
get
(
alertF
ro
mType
);
alertF
ro
mTypeQueryWrapper
.
eq
(
name
,
fileValue
);
String
fileValue
=
(
String
)
field
.
get
(
alertF
or
mType
);
alertF
or
mTypeQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
}
});
IPage
<
AlertF
ro
mType
>
page
;
IPage
<
AlertF
or
mType
>
page
;
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
}
else
{
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
page
=
iAlertF
romTypeService
.
page
(
pageBean
,
alertFro
mTypeQueryWrapper
);
page
=
iAlertF
ormTypeService
.
page
(
pageBean
,
alertFor
mTypeQueryWrapper
);
return
page
;
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertF
ro
mValueController.java
→
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertF
or
mValueController.java
View file @
1fb05371
...
...
@@ -6,7 +6,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertF
ro
mValueService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertF
or
mValueService
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -14,7 +14,7 @@ import javax.servlet.http.HttpServletRequest;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
ro
mValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
or
mValue
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
@@ -29,11 +29,11 @@ import java.util.Arrays;
*/
@RestController
@Api
(
tags
=
"Api"
)
@RequestMapping
(
value
=
"/jcs/alert-
fro
m-value"
)
public
class
AlertF
ro
mValueController
extends
BaseController
{
@RequestMapping
(
value
=
"/jcs/alert-
For
m-value"
)
public
class
AlertF
or
mValueController
extends
BaseController
{
@Autowired
IAlertF
romValueService
iAlertFro
mValueService
;
IAlertF
ormValueService
iAlertFor
mValueService
;
/**
* 新增
...
...
@@ -42,8 +42,8 @@ public class AlertFromValueController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
boolean
saveAlertF
romValue
(
HttpServletRequest
request
,
@RequestBody
AlertFromValue
alertFro
mValue
){
return
iAlertF
romValueService
.
save
(
alertFro
mValue
);
public
boolean
saveAlertF
ormValue
(
HttpServletRequest
request
,
@RequestBody
AlertFormValue
alertFor
mValue
){
return
iAlertF
ormValueService
.
save
(
alertFor
mValue
);
}
/**
...
...
@@ -55,7 +55,7 @@ public class AlertFromValueController extends BaseController {
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
public
boolean
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iAlertF
ro
mValueService
.
removeById
(
id
);
return
iAlertF
or
mValueService
.
removeById
(
id
);
}
...
...
@@ -68,8 +68,8 @@ public class AlertFromValueController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改"
,
notes
=
"修改"
)
public
boolean
updateByIdAlertF
romValue
(
HttpServletRequest
request
,
@RequestBody
AlertFromValue
alertFro
mValue
){
return
iAlertF
romValueService
.
updateById
(
alertFro
mValue
);
public
boolean
updateByIdAlertF
ormValue
(
HttpServletRequest
request
,
@RequestBody
AlertFormValue
alertFor
mValue
){
return
iAlertF
ormValueService
.
updateById
(
alertFor
mValue
);
}
...
...
@@ -82,8 +82,8 @@ public class AlertFromValueController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
AlertF
ro
mValue
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iAlertF
ro
mValueService
.
getById
(
id
);
public
AlertF
or
mValue
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iAlertF
or
mValueService
.
getById
(
id
);
}
...
...
@@ -95,43 +95,43 @@ public class AlertFromValueController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
IPage
<
AlertF
romValue
>
listPage
(
String
pageNum
,
String
pageSize
,
AlertFromValue
alertFro
mValue
){
public
IPage
<
AlertF
ormValue
>
listPage
(
String
pageNum
,
String
pageSize
,
AlertFormValue
alertFor
mValue
){
Page
<
AlertF
ro
mValue
>
pageBean
;
QueryWrapper
<
AlertF
romValue
>
alertFro
mValueQueryWrapper
=
new
QueryWrapper
<>();
Class
<?
extends
AlertF
romValue
>
aClass
=
alertFro
mValue
.
getClass
();
Page
<
AlertF
or
mValue
>
pageBean
;
QueryWrapper
<
AlertF
ormValue
>
alertFor
mValueQueryWrapper
=
new
QueryWrapper
<>();
Class
<?
extends
AlertF
ormValue
>
aClass
=
alertFor
mValue
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
field
.
setAccessible
(
true
);
Object
o
=
field
.
get
(
alertF
ro
mValue
);
Object
o
=
field
.
get
(
alertF
or
mValue
);
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
String
name
=
NameUtils
.
camel2Underline
(
field
.
getName
());
if
(
type
.
equals
(
Integer
.
class
))
{
Integer
fileValue
=
(
Integer
)
field
.
get
(
alertF
ro
mValue
);
alertF
ro
mValueQueryWrapper
.
eq
(
name
,
fileValue
);
Integer
fileValue
=
(
Integer
)
field
.
get
(
alertF
or
mValue
);
alertF
or
mValueQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
alertF
ro
mValue
);
alertF
ro
mValueQueryWrapper
.
eq
(
name
,
fileValue
);
Long
fileValue
=
(
Long
)
field
.
get
(
alertF
or
mValue
);
alertF
or
mValueQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
alertF
ro
mValue
);
alertF
ro
mValueQueryWrapper
.
eq
(
name
,
fileValue
);
String
fileValue
=
(
String
)
field
.
get
(
alertF
or
mValue
);
alertF
or
mValueQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
String
fileValue
=
(
String
)
field
.
get
(
alertF
ro
mValue
);
alertF
ro
mValueQueryWrapper
.
eq
(
name
,
fileValue
);
String
fileValue
=
(
String
)
field
.
get
(
alertF
or
mValue
);
alertF
or
mValueQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
}
});
IPage
<
AlertF
ro
mValue
>
page
;
IPage
<
AlertF
or
mValue
>
page
;
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
}
else
{
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
page
=
iAlertF
romValueService
.
page
(
pageBean
,
alertFro
mValueQueryWrapper
);
page
=
iAlertF
ormValueService
.
page
(
pageBean
,
alertFor
mValueQueryWrapper
);
return
page
;
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertF
ro
mServiceImpl.java
→
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertF
or
mServiceImpl.java
View file @
1fb05371
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFrom
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.AlertFromMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertFromService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertForm
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.AlertFormMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertFormService
;
import
org.springframework.stereotype.Service
;
/**
...
...
@@ -13,6 +15,6 @@ import org.springframework.stereotype.Service;
* @date 2021-06-17
*/
@Service
public
class
AlertF
romServiceImpl
extends
ServiceImpl
<
AlertFromMapper
,
AlertFrom
>
implements
IAlertFro
mService
{
public
class
AlertF
ormServiceImpl
extends
ServiceImpl
<
AlertFormMapper
,
AlertForm
>
implements
IAlertFor
mService
{
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertF
ro
mTypeServiceImpl.java
→
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertF
or
mTypeServiceImpl.java
View file @
1fb05371
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
ro
mType
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.AlertF
ro
mTypeMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertF
ro
mTypeService
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
or
mType
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.AlertF
or
mTypeMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertF
or
mTypeService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
...
...
@@ -13,6 +13,6 @@ import org.springframework.stereotype.Service;
* @date 2021-06-17
*/
@Service
public
class
AlertF
romTypeServiceImpl
extends
ServiceImpl
<
AlertFromTypeMapper
,
AlertFromType
>
implements
IAlertFro
mTypeService
{
public
class
AlertF
ormTypeServiceImpl
extends
ServiceImpl
<
AlertFormTypeMapper
,
AlertFormType
>
implements
IAlertFor
mTypeService
{
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertF
ro
mValueServiceImpl.java
→
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertF
or
mValueServiceImpl.java
View file @
1fb05371
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
ro
mValue
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.AlertF
ro
mValueMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertF
ro
mValueService
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertF
or
mValue
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.AlertF
or
mValueMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertF
or
mValueService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
...
...
@@ -13,6 +13,6 @@ import org.springframework.stereotype.Service;
* @date 2021-06-17
*/
@Service
public
class
AlertF
romValueServiceImpl
extends
ServiceImpl
<
AlertFromValueMapper
,
AlertFromValue
>
implements
IAlertFro
mValueService
{
public
class
AlertF
ormValueServiceImpl
extends
ServiceImpl
<
AlertFormValueMapper
,
AlertFormValue
>
implements
IAlertFor
mValueService
{
}
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