提交 ffb7d7c6 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码 [ibz-dict,字典]

上级 0dfa4433
......@@ -9,14 +9,6 @@ import GridViewEngine from './grid-view-engine';
*/
export default class GridView8Engine extends GridViewEngine {
/**
* 表格部件
*
* @type {*}
* @memberof GridView8Engine
*/
protected grid: any;
/**
* 表格部件
*
......
......@@ -11,6 +11,7 @@ function getLocaleResourceBase(){
enable: commonLogic.appcommonhandle("是否有效",null),
updatedate: commonLogic.appcommonhandle("最后修改时间",null),
createdate: commonLogic.appcommonhandle("创建时间",null),
ext_params: commonLogic.appcommonhandle("扩展参数",null),
},
views: {
gridview: {
......
......@@ -11,6 +11,7 @@ function getLocaleResourceBase(){
enable: commonLogic.appcommonhandle("是否有效",null),
updatedate: commonLogic.appcommonhandle("最后修改时间",null),
createdate: commonLogic.appcommonhandle("创建时间",null),
ext_params: commonLogic.appcommonhandle("扩展参数",null),
},
views: {
gridview: {
......
......@@ -11,6 +11,7 @@ function getLocaleResourceBase(){
enable: commonLogic.appcommonhandle("是否有效",null),
updatedate: commonLogic.appcommonhandle("最后修改时间",null),
createdate: commonLogic.appcommonhandle("创建时间",null),
ext_params: commonLogic.appcommonhandle("扩展参数",null),
},
views: {
gridview: {
......
......@@ -39,6 +39,9 @@ export default class PickupViewpickupviewpanelModel {
{
name: 'createdate',
},
{
name: 'ext_params',
},
]
}
......
......@@ -187,8 +187,8 @@ public class DictCatalogServiceImpl extends ServiceImpl<DictCatalogMapper, DictC
*/
@Override
public Page<DictCatalog> searchDefault(DictCatalogSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<DictCatalog> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<DictCatalog>(pages.getRecords(), context.getPageable(), pages.getTotal());
com.baomidou.mybatisplus.extension.plugins.pagination.Page<DictCatalog> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<DictCatalog>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
......@@ -203,8 +203,8 @@ public class DictOptionServiceImpl extends ServiceImpl<DictOptionMapper, DictOpt
*/
@Override
public Page<DictOption> searchDefault(DictOptionSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<DictOption> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<DictOption>(pages.getRecords(), context.getPageable(), pages.getTotal());
com.baomidou.mybatisplus.extension.plugins.pagination.Page<DictOption> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<DictOption>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
......@@ -4,7 +4,7 @@
<!--输出实体[DICT_CATALOG]数据结构 -->
<changeSet author="root" id="tab-dict_catalog-4-1">
<changeSet author="root" id="tab-dict_catalog-7-1">
<createTable tableName="IBZDICTCATALOG">
<column name="CID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DICT_CATALOG_CID"/>
......@@ -23,6 +23,8 @@
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="EXTPARAMS" remarks="" type="TEXT(1048576)">
</column>
</createTable>
</changeSet>
......
......@@ -7,7 +7,7 @@
<![CDATA[select t1.* from (SELECT t1.`CCODE`, t1.`CGROUP`, t1.`CID`, t1.`CNAME`, t1.`CREATEDATE`, t1.`ENABLE`, t1.`MEMO`, t1.`UPDATEDATE` FROM `IBZDICTCATALOG` t1 ) t1 where cid=#{id}]]>
</select>
<select id="selectById" resultMap="DictCatalogResultMap" databaseId="oracle">
<![CDATA[select t1.* from (SELECT t1.CCODE, t1.CGROUP, t1.CID, t1.CNAME, t1.CREATEDATE, t1.ENABLE, t1.MEMO, t1.UPDATEDATE FROM IBZDICTCATALOG t1 ) t1 where cid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.CCODE, t1.CGROUP, t1.CID, t1.CNAME, t1.CREATEDATE, t1.ENABLE, t1.EXTPARAMS, t1.MEMO, t1.UPDATEDATE FROM IBZDICTCATALOG t1 ) t1 where cid=#{id}]]>
</select>
<select id="selectById" resultMap="DictCatalogResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.CCODE, t1.CGROUP, t1.CID, t1.CNAME, t1.CREATEDATE, t1.ENABLE, t1.MEMO, t1.UPDATEDATE FROM IBZDICTCATALOG t1 ) t1 where cid=#{id}]]>
......@@ -59,7 +59,7 @@
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="oracle">
<![CDATA[ SELECT t1.CCODE, t1.CGROUP, t1.CID, t1.CNAME, t1.CREATEDATE, t1.ENABLE, t1.MEMO, t1.UPDATEDATE FROM IBZDICTCATALOG t1
<![CDATA[ SELECT t1.CCODE, t1.CGROUP, t1.CID, t1.CNAME, t1.CREATEDATE, t1.ENABLE, t1.EXTPARAMS, t1.MEMO, t1.UPDATEDATE FROM IBZDICTCATALOG t1
WHERE t1.ENABLE = 1
]]>
</sql>
......
......@@ -123,6 +123,20 @@
"key_field":0,
"show_order":9,
"major_field":0
},
{
"fieldname":"EXTPARAMS" ,
"codename":"Ext_params",
"field_logic_name":"扩展参数",
"entity_name":"DICT_CATALOG",
"field_type":"LONGTEXT",
"nullable":1,
"physical_field":1,
"data_type":"TEXT",
"data_length":1048576,
"key_field":0,
"show_order":20,
"major_field":0
}
],
"subEntitys":[
......
......@@ -113,6 +113,16 @@ public class DictCatalogDTO extends DTOBase implements Serializable {
@ApiModelProperty("创建时间")
private Timestamp createdate;
/**
* 属性 [EXTPARAMS]
*
*/
@JSONField(name = "ext_params")
@JsonProperty("ext_params")
@Size(min = 0, max = 1048576, message = "内容长度必须小于等于[1048576]")
@ApiModelProperty("扩展参数")
private String extParams;
/**
* 设置 [CCODE]
......@@ -146,6 +156,14 @@ public class DictCatalogDTO extends DTOBase implements Serializable {
this.modify("memo",memo);
}
/**
* 设置 [EXTPARAMS]
*/
public void setExtParams(String extParams){
this.extParams = extParams ;
this.modify("extparams",extParams);
}
}
......
......@@ -32,6 +32,7 @@ import org.springframework.util.ClassUtils;
import org.springframework.util.DigestUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.core.annotation.Order;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamReader;
......@@ -52,6 +53,7 @@ import java.util.concurrent.ConcurrentMap;
@Aspect
@Component
@Slf4j
@Order(100)
public class DELogicAspect {
private static BpmnXMLConverter bpmnXMLConverter = new BpmnXMLConverter();
......
......@@ -43,4 +43,9 @@ public class IBZWFFallback implements IBZWFFeignClient {
return null;
}
@Override
public Map<String, Map<String, Object>> getMyTask(String system, String appName, String entity) {
return null;
}
}
......@@ -37,4 +37,8 @@ public interface IBZWFFeignClient
@RequestMapping(method = RequestMethod.GET, value = "/{system}/{entity}/{businessKey}/dataaccessmode")
Integer getDataAccessMode(@PathVariable("system") String system, @PathVariable("entity") String entity, @PathVariable("businessKey") Serializable businessKey);
@RequestMapping(method = RequestMethod.GET, value = "/{system}-app-{appname}/{entity}/mytasks")
Map<String,Map<String,Object>> getMyTask(@PathVariable("system") String system,@PathVariable("appname") String appName,
@PathVariable("entity") String entity);
}
......@@ -9,6 +9,8 @@ import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.multipart.MaxUploadSizeExceededException;
import org.zalando.problem.DefaultProblem;
import org.zalando.problem.Problem;
import org.zalando.problem.ProblemBuilder;
......@@ -105,4 +107,31 @@ public class ExceptionTranslator implements ProblemHandling {
headers.add("X-ibz-params", entityName);
return headers;
}
/**
* 上传文件大小超出限制异常
*/
@Value("${spring.servlet.multipart.max-file-size}")
private String maxFileSize;
@ExceptionHandler(MaxUploadSizeExceededException.class)
public ResponseEntity<Problem> handlerMaxUploadFile(MaxUploadSizeExceededException ex,NativeWebRequest request){
Problem problem = Problem.builder()
.withStatus(Status.BAD_REQUEST)
.withDetail("上传文件不能大于"+maxFileSize)
.with("message", "上传文件不能大于"+maxFileSize)
.with("exmessage",""+ex.getMessage())
.build();
return create(ex, problem, request);
}
@ExceptionHandler(Exception.class)
public ResponseEntity<Problem> handlerTest(Exception ex,NativeWebRequest request){
Problem problem = Problem.builder()
.withStatus(Status.INTERNAL_SERVER_ERROR)
.withDetail("内部服务器异常")
.with("message", "内部服务器异常")
.with("exmessage",""+ex.getMessage())
.build();
return create(ex, problem, request);
}
}
......@@ -67,6 +67,11 @@ public class SearchContextBase implements ISearchContext{
* 工作流流程标识
*/
public String processDefinitionKey;
/**
* 工作流标识
*/
@JsonProperty("srfwf")
public String srfWF;
/**
* 获取工作流步骤标识
......
......@@ -13,6 +13,7 @@ import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import java.io.Serializable;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
......@@ -300,20 +301,22 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
Map <String, DEField> preFields= DEFieldCacheMap.getDEFields(entityBase.getClass()); //从缓存中获取当前类预置属性
for (Map.Entry<String,DEField> entry : preFields.entrySet()){
String fieldName=entry.getKey();//获取注解字段
DEField fieldAnnotation=entry.getValue();//获取注解值
String fieldName=fieldAnnotation.name();//获取注解字段
DEPredefinedFieldType prefieldType=fieldAnnotation.preType();
//用户配置系统预置属性-组织机构标识
if(prefieldType==prefieldType.ORGID){
orgField=fieldName;
}
//用户配置系统预置属性-部门标识
if(prefieldType==prefieldType.ORGSECTORID){
orgDeptField=fieldName;
}
//用户配置系统预置属性-部门标识
if(prefieldType==prefieldType.CREATEMAN){
createManField=fieldName;
if(!StringUtils.isEmpty(fieldName)){
//用户配置系统预置属性-组织机构标识
if(prefieldType==prefieldType.ORGID){
orgField=fieldName;
}
//用户配置系统预置属性-部门标识
if(prefieldType==prefieldType.ORGSECTORID){
orgDeptField=fieldName;
}
//用户配置系统预置属性-部门标识
if(prefieldType==prefieldType.CREATEMAN){
createManField=fieldName;
}
}
}
permissionFiled.put("orgfield",orgField);
......
......@@ -20,7 +20,7 @@ public class AuthenticationEntryPoint implements org.springframework.security.we
/**
* 当用户尝试访问安全的REST资源而不提供任何凭据时,将调用此方法发送401 响应
*/
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException==null?"Unauthorized":authException.getMessage());
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "账号身份已过期,请重新登录。");
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册