Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
PS
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBizPOC_20003
PS
提交
a3f3a874
提交
a3f3a874
编写于
4月 08, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
daa0e6ee
变更
9
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
258 行增加
和
1 行删除
+258
-1
PS.java
...-app-web/src/main/java/com/ibiz/web/module/domain/PS.java
+33
-0
PS.java
ps-core/src/main/java/com/ibiz/core/module/domain/PS.java
+36
-0
PSImstateDefault.java
.../ibiz/core/module/valuerule/anno/ps/PSImstateDefault.java
+32
-0
PSImstateDefaultValidator.java
...ule/valuerule/validator/ps/PSImstateDefaultValidator.java
+67
-0
PS.java
ps-core/src/main/java/com/ibiz/core/repository/po/PS.java
+12
-0
T_PSRepositoryImpl.java
...main/java/com/ibiz/mybatis/module/T_PSRepositoryImpl.java
+4
-0
T_PSImpl.java
...is/src/main/java/com/ibiz/mybatis/module/po/T_PSImpl.java
+33
-0
T_PSMapper.xml
...ybatis/src/main/resources/mapper/module/ps/T_PSMapper.xml
+2
-1
PSDTO.java
...ice-web/src/main/java/com/ibiz/service/web/dto/PSDTO.java
+39
-0
未找到文件。
ps-app/ps-app-web/src/main/java/com/ibiz/web/module/domain/PS.java
浏览文件 @
a3f3a874
...
...
@@ -85,6 +85,14 @@ public class PS implements Serializable {
@JsonIgnore
private
boolean
ngridDirtyFlag
;
/**
* 重要事项状态
*/
private
String
imstate
;
@JsonIgnore
private
boolean
imstateDirtyFlag
;
/**
* 获取 [更新时间]
...
...
@@ -286,6 +294,31 @@ public class PS implements Serializable {
return
this
.
ngridDirtyFlag
;
}
/**
* 获取 [重要事项状态]
*/
@JsonProperty
(
"imstate"
)
public
String
getImstate
(){
return
this
.
imstate
;
}
/**
* 设置 [重要事项状态]
*/
@JsonProperty
(
"imstate"
)
public
void
setImstate
(
String
imstate
){
this
.
imstate
=
imstate
;
this
.
imstateDirtyFlag
=
true
;
}
/**
* 获取 [重要事项状态]脏标记
*/
@JsonIgnore
public
boolean
getImstateDirtyFlag
(){
return
this
.
imstateDirtyFlag
;
}
}
ps-core/src/main/java/com/ibiz/core/module/domain/PS.java
浏览文件 @
a3f3a874
...
...
@@ -94,6 +94,15 @@ public class PS implements Serializable {
@JSONField
(
serialize
=
false
)
private
boolean
ngridDirtyFlag
;
/**
* 重要事项状态
*/
private
String
imstate
;
@JsonIgnore
@JSONField
(
serialize
=
false
)
private
boolean
imstateDirtyFlag
;
/**
* 获取 [更新时间]
...
...
@@ -311,6 +320,33 @@ public class PS implements Serializable {
public
boolean
getNgridDirtyFlag
(){
return
this
.
ngridDirtyFlag
;
}
/**
* 获取 [重要事项状态]
*/
@JsonProperty
(
"imstate"
)
@JSONField
(
name
=
"imstate"
)
public
String
getImstate
(){
return
this
.
imstate
;
}
/**
* 设置 [重要事项状态]
*/
@JsonProperty
(
"imstate"
)
@JSONField
(
name
=
"imstate"
)
public
void
setImstate
(
String
imstate
){
this
.
imstate
=
imstate
;
this
.
imstateDirtyFlag
=
true
;
}
/**
* 获取 [重要事项状态]脏标记
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
boolean
getImstateDirtyFlag
(){
return
this
.
imstateDirtyFlag
;
}
}
ps-core/src/main/java/com/ibiz/core/module/valuerule/anno/ps/PSImstateDefault.java
0 → 100644
浏览文件 @
a3f3a874
package
com
.
ibiz
.
core
.
module
.
valuerule
.
anno
.
ps
;
import
com.ibiz.core.module.valuerule.validator.ps.PSImstateDefaultValidator
;
import
javax.validation.Constraint
;
import
javax.validation.Payload
;
import
java.lang.annotation.*
;
/**
* 值规则注解
* 实体:PS
* 属性:Imstate
* 值规则:Default
*/
@Target
({
ElementType
.
METHOD
,
ElementType
.
FIELD
,
ElementType
.
PARAMETER
})
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Documented
@Constraint
(
validatedBy
=
{
PSImstateDefaultValidator
.
class
})
public
@interface
PSImstateDefault
{
//是否默认检查
boolean
flag
()
default
true
;
//值规则名称
String
info
()
default
"默认规则"
;
//值规则信息,如果为空,使用值规则名称。
String
message
()
default
"内容长度必须小于等于[100]"
;
Class
<?>[]
groups
()
default
{};
Class
<?
extends
Payload
>[]
payload
()
default
{};
}
ps-core/src/main/java/com/ibiz/core/module/valuerule/validator/ps/PSImstateDefaultValidator.java
0 → 100644
浏览文件 @
a3f3a874
package
com
.
ibiz
.
core
.
module
.
valuerule
.
validator
.
ps
;
import
lombok.extern.slf4j.Slf4j
;
import
com.ibiz.util.valuerule.DefaultValueRule
;
import
com.ibiz.util.valuerule.VRCondition
;
import
com.ibiz.util.valuerule.condition.*
;
import
com.ibiz.core.module.valuerule.anno.ps.PSImstateDefault
;
import
org.springframework.stereotype.Component
;
import
org.springframework.validation.Errors
;
import
org.springframework.validation.Validator
;
import
javax.validation.ConstraintValidator
;
import
javax.validation.ConstraintValidatorContext
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.math.BigInteger
;
import
java.util.HashMap
;
import
java.math.BigDecimal
;
/**
* 值规则注解解析类
* 实体:PS
* 属性:Imstate
* 值规则:Default
* 值规则信息:内容长度必须小于等于[100]
*/
@Slf4j
@Component
(
"PSImstateDefaultValidator"
)
public
class
PSImstateDefaultValidator
implements
ConstraintValidator
<
PSImstateDefault
,
String
>,
Validator
{
private
static
final
String
MESSAGE
=
"值规则校验失败:【内容长度必须小于等于[100]】"
;
@Override
public
boolean
isValid
(
String
value
,
ConstraintValidatorContext
context
)
{
boolean
isValid
=
doValidate
(
value
);
if
(!
isValid
)
{
context
.
disableDefaultConstraintViolation
();
context
.
buildConstraintViolationWithTemplate
(
MESSAGE
)
.
addConstraintViolation
();
}
return
doValidate
(
value
);
}
@Override
public
boolean
supports
(
Class
<?>
aClass
)
{
return
true
;
}
@Override
public
void
validate
(
Object
o
,
Errors
errors
)
{
if
(
o
!=
null
&&
supports
(
o
.
getClass
())){
if
(!
doValidate
((
String
)
o
)){
errors
.
reject
(
MESSAGE
);
}
}
}
public
boolean
doValidate
(
String
value
)
{
DefaultValueRule
<
String
>
valueRule
=
new
DefaultValueRule
<>(
"默认值规则"
,
MESSAGE
,
"Imstate"
,
value
)
//字符串长度,重复检查模式,重复值范围,基础值规则,是否递归检查。
.
init
(
100
,
"NONE"
,
null
,
null
,
false
);
return
valueRule
.
isValid
();
}
}
ps-core/src/main/java/com/ibiz/core/repository/po/PS.java
浏览文件 @
a3f3a874
...
...
@@ -107,4 +107,16 @@ public interface PS{
*/
boolean
getNgridDirtyFlag
();
/**
* 重要事项状态
*/
String
getImstate
();
void
setImstate
(
String
imstate
);
/**
* 获取 [重要事项状态]脏标记
*/
boolean
getImstateDirtyFlag
();
}
ps-mybatis/src/main/java/com/ibiz/mybatis/module/T_PSRepositoryImpl.java
浏览文件 @
a3f3a874
...
...
@@ -130,6 +130,8 @@ public class T_PSRepositoryImpl extends ServiceImpl<T_PSMapper, T_PSImpl> implem
domain
.
setPSId
(
po
.
getPSId
());
//if(po.getNgridDirtyFlag())
domain
.
setNgrid
(
po
.
getNgrid
());
//if(po.getImstateDirtyFlag())
domain
.
setImstate
(
po
.
getImstate
());
return
domain
;
}
...
...
@@ -161,6 +163,8 @@ public class T_PSRepositoryImpl extends ServiceImpl<T_PSMapper, T_PSImpl> implem
po
.
setPSId
(
domain
.
getPSId
());
if
(
domain
.
getNgridDirtyFlag
())
po
.
setNgrid
(
domain
.
getNgrid
());
if
(
domain
.
getImstateDirtyFlag
())
po
.
setImstate
(
domain
.
getImstate
());
return
po
;
}
...
...
ps-mybatis/src/main/java/com/ibiz/mybatis/module/po/T_PSImpl.java
浏览文件 @
a3f3a874
...
...
@@ -114,6 +114,17 @@ public class T_PSImpl implements PS,Serializable {
@TableField
(
exist
=
false
)
private
boolean
ngridDirtyFlag
;
/**
* [重要事项状态]
*/
private
String
imstate
;
/**
* [重要事项状态]脏标记
*/
@JsonIgnore
@TableField
(
exist
=
false
)
private
boolean
imstateDirtyFlag
;
/**
* 获取 [更新时间]
*/
...
...
@@ -290,4 +301,26 @@ public class T_PSImpl implements PS,Serializable {
public
boolean
getNgridDirtyFlag
(){
return
this
.
ngridDirtyFlag
;
}
/**
* 获取 [重要事项状态]
*/
public
String
getImstate
(){
return
this
.
imstate
;
}
/**
* 设置 [重要事项状态]
*/
public
void
setImstate
(
String
imstate
){
this
.
imstate
=
imstate
;
this
.
imstateDirtyFlag
=
true
;
}
/**
* 获取 [重要事项状态]脏标记
*/
@JsonIgnore
public
boolean
getImstateDirtyFlag
(){
return
this
.
imstateDirtyFlag
;
}
}
\ No newline at end of file
ps-mybatis/src/main/resources/mapper/module/ps/T_PSMapper.xml
浏览文件 @
a3f3a874
...
...
@@ -16,6 +16,7 @@
<if
test=
"true == et.createManDirtyFlag"
>
createman = #{et.createMan},
</if>
<if
test=
"true == et.pSIdDirtyFlag"
>
psid = #{et.pSId},
</if>
<if
test=
"true == et.ngridDirtyFlag"
>
ngrid = #{et.ngrid},
</if>
<if
test=
"true == et.imstateDirtyFlag"
>
imstate = #{et.imstate},
</if>
</trim>
where t.psid = #{et.pSId}
</update>
...
...
@@ -33,7 +34,7 @@
<!--输出平台内配置的数据查询[DEFAULT]-->
<select
id=
"searchDefault"
parameterType=
"com.ibiz.core.module.filter.PSSearchContext"
resultMap=
"T_PSResultMap"
databaseId=
"mysql"
>
select t1.* from (
<![CDATA[ SELECT t1.`BZ`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`NGRID`, t1.`PSID`, t1.`PSNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_PS` t1 ]]>
<![CDATA[ SELECT t1.`BZ`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`
IMSTATE`, t1.`
NGRID`, t1.`PSID`, t1.`PSNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_PS` t1 ]]>
<![CDATA[ ]]>
)t1
<where><if
test=
"ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere"
>
${ew.sqlSegment}
</if></where>
...
...
ps-service/ps-service-web/src/main/java/com/ibiz/service/web/dto/PSDTO.java
浏览文件 @
a3f3a874
...
...
@@ -106,6 +106,16 @@ public class PSDTO implements Serializable {
@JsonIgnore
private
boolean
ngridDirtyFlag
;
/**
* 属性 [IMSTATE]
*
*/
@PSImstateDefault
(
info
=
"默认规则"
)
private
String
imstate
;
@JsonIgnore
private
boolean
imstateDirtyFlag
;
/**
* 获取 [UPDATEDATE]
...
...
@@ -307,6 +317,31 @@ public class PSDTO implements Serializable {
return
ngridDirtyFlag
;
}
/**
* 获取 [IMSTATE]
*/
@JsonProperty
(
"imstate"
)
public
String
getImstate
(){
return
imstate
;
}
/**
* 设置 [IMSTATE]
*/
@JsonProperty
(
"imstate"
)
public
void
setImstate
(
String
imstate
){
this
.
imstate
=
imstate
;
this
.
imstateDirtyFlag
=
true
;
}
/**
* 获取 [IMSTATE]脏标记
*/
@JsonIgnore
public
boolean
getImstateDirtyFlag
(){
return
imstateDirtyFlag
;
}
public
PS
toDO
()
{
...
...
@@ -327,6 +362,8 @@ public class PSDTO implements Serializable {
srfdomain
.
setPSId
(
pSId
);
if
(
getNgridDirtyFlag
())
srfdomain
.
setNgrid
(
ngrid
);
if
(
getImstateDirtyFlag
())
srfdomain
.
setImstate
(
imstate
);
return
srfdomain
;
}
...
...
@@ -350,6 +387,8 @@ public class PSDTO implements Serializable {
this
.
setPSId
(
srfdomain
.
getPSId
());
if
(
srfdomain
.
getNgridDirtyFlag
())
this
.
setNgrid
(
srfdomain
.
getNgrid
());
if
(
srfdomain
.
getImstateDirtyFlag
())
this
.
setImstate
(
srfdomain
.
getImstate
());
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录