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

ibiz4j 发布系统代码 [ibz-wf,统一工作流]

上级 464b5fca
...@@ -9,14 +9,6 @@ import GridViewEngine from './grid-view-engine'; ...@@ -9,14 +9,6 @@ import GridViewEngine from './grid-view-engine';
*/ */
export default class GridView8Engine extends GridViewEngine { export default class GridView8Engine extends GridViewEngine {
/**
* 表格部件
*
* @type {*}
* @memberof GridView8Engine
*/
protected grid: any;
/** /**
* 表格部件 * 表格部件
* *
......
...@@ -108,7 +108,7 @@ public class WFUser extends EntityMP implements Serializable { ...@@ -108,7 +108,7 @@ public class WFUser extends EntityMP implements Serializable {
/** /**
* 单位 * 单位
*/ */
@DEField(preType = DEPredefinedFieldType.ORGID) @DEField(name = "orgid", preType = DEPredefinedFieldType.ORGID)
@TableField(value = "orgid") @TableField(value = "orgid")
@JSONField(name = "orgid") @JSONField(name = "orgid")
@JsonProperty("orgid") @JsonProperty("orgid")
......
...@@ -191,8 +191,8 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl ...@@ -191,8 +191,8 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
*/ */
@Override @Override
public Page<WFGroup> searchDefault(WFGroupSearchContext context) { public Page<WFGroup> searchDefault(WFGroupSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFGroup> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFGroup> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFGroup>(pages.getRecords(), context.getPageable(), pages.getTotal()); return new PageImpl<WFGroup>(pages.getRecords(), context.getPageable(), pages.getTotal());
} }
......
...@@ -247,8 +247,8 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i ...@@ -247,8 +247,8 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
*/ */
@Override @Override
public Page<WFMember> searchDefault(WFMemberSearchContext context) { public Page<WFMember> searchDefault(WFMemberSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFMember> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFMember> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFMember>(pages.getRecords(), context.getPageable(), pages.getTotal()); return new PageImpl<WFMember>(pages.getRecords(), context.getPageable(), pages.getTotal());
} }
......
...@@ -184,8 +184,8 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit ...@@ -184,8 +184,8 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
*/ */
@Override @Override
public Page<WFProcessDefinition> searchDefault(WFProcessDefinitionSearchContext context) { public Page<WFProcessDefinition> searchDefault(WFProcessDefinitionSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFProcessDefinition> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFProcessDefinition> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFProcessDefinition>(pages.getRecords(), context.getPageable(), pages.getTotal()); return new PageImpl<WFProcessDefinition>(pages.getRecords(), context.getPageable(), pages.getTotal());
} }
......
...@@ -184,8 +184,8 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i ...@@ -184,8 +184,8 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
*/ */
@Override @Override
public Page<WFSystem> searchDefault(WFSystemSearchContext context) { public Page<WFSystem> searchDefault(WFSystemSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFSystem> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFSystem> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFSystem>(pages.getRecords(), context.getPageable(), pages.getTotal()); return new PageImpl<WFSystem>(pages.getRecords(), context.getPageable(), pages.getTotal());
} }
......
...@@ -187,8 +187,8 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme ...@@ -187,8 +187,8 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
*/ */
@Override @Override
public Page<WFUser> searchDefault(WFUserSearchContext context) { public Page<WFUser> searchDefault(WFUserSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFUser> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFUser> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFUser>(pages.getRecords(), context.getPageable(), pages.getTotal()); return new PageImpl<WFUser>(pages.getRecords(), context.getPageable(), pages.getTotal());
} }
......
...@@ -32,6 +32,7 @@ import org.springframework.util.ClassUtils; ...@@ -32,6 +32,7 @@ import org.springframework.util.ClassUtils;
import org.springframework.util.DigestUtils; import org.springframework.util.DigestUtils;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.core.annotation.Order;
import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamReader;
...@@ -52,6 +53,7 @@ import java.util.concurrent.ConcurrentMap; ...@@ -52,6 +53,7 @@ import java.util.concurrent.ConcurrentMap;
@Aspect @Aspect
@Component @Component
@Slf4j @Slf4j
@Order(100)
public class DELogicAspect { public class DELogicAspect {
private static BpmnXMLConverter bpmnXMLConverter = new BpmnXMLConverter(); private static BpmnXMLConverter bpmnXMLConverter = new BpmnXMLConverter();
......
...@@ -43,4 +43,9 @@ public class IBZWFFallback implements IBZWFFeignClient { ...@@ -43,4 +43,9 @@ public class IBZWFFallback implements IBZWFFeignClient {
return null; 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 ...@@ -37,4 +37,8 @@ public interface IBZWFFeignClient
@RequestMapping(method = RequestMethod.GET, value = "/{system}/{entity}/{businessKey}/dataaccessmode") @RequestMapping(method = RequestMethod.GET, value = "/{system}/{entity}/{businessKey}/dataaccessmode")
Integer getDataAccessMode(@PathVariable("system") String system, @PathVariable("entity") String entity, @PathVariable("businessKey") Serializable businessKey); 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; ...@@ -9,6 +9,8 @@ import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.context.request.NativeWebRequest; 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.DefaultProblem;
import org.zalando.problem.Problem; import org.zalando.problem.Problem;
import org.zalando.problem.ProblemBuilder; import org.zalando.problem.ProblemBuilder;
...@@ -105,4 +107,31 @@ public class ExceptionTranslator implements ProblemHandling { ...@@ -105,4 +107,31 @@ public class ExceptionTranslator implements ProblemHandling {
headers.add("X-ibz-params", entityName); headers.add("X-ibz-params", entityName);
return headers; 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{ ...@@ -67,6 +67,11 @@ public class SearchContextBase implements ISearchContext{
* 工作流流程标识 * 工作流流程标识
*/ */
public String processDefinitionKey; public String processDefinitionKey;
/**
* 工作流标识
*/
@JsonProperty("srfwf")
public String srfWF;
/** /**
* 获取工作流步骤标识 * 获取工作流步骤标识
......
...@@ -13,6 +13,7 @@ import org.springframework.security.core.Authentication; ...@@ -13,6 +13,7 @@ import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.GrantedAuthority;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import java.io.Serializable; import java.io.Serializable;
import java.lang.reflect.ParameterizedType; import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type; import java.lang.reflect.Type;
...@@ -300,20 +301,22 @@ public class AuthPermissionEvaluator implements PermissionEvaluator { ...@@ -300,20 +301,22 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
Map <String, DEField> preFields= DEFieldCacheMap.getDEFields(entityBase.getClass()); //从缓存中获取当前类预置属性 Map <String, DEField> preFields= DEFieldCacheMap.getDEFields(entityBase.getClass()); //从缓存中获取当前类预置属性
for (Map.Entry<String,DEField> entry : preFields.entrySet()){ for (Map.Entry<String,DEField> entry : preFields.entrySet()){
String fieldName=entry.getKey();//获取注解字段
DEField fieldAnnotation=entry.getValue();//获取注解值 DEField fieldAnnotation=entry.getValue();//获取注解值
String fieldName=fieldAnnotation.name();//获取注解字段
DEPredefinedFieldType prefieldType=fieldAnnotation.preType(); DEPredefinedFieldType prefieldType=fieldAnnotation.preType();
//用户配置系统预置属性-组织机构标识 if(!StringUtils.isEmpty(fieldName)){
if(prefieldType==prefieldType.ORGID){ //用户配置系统预置属性-组织机构标识
orgField=fieldName; if(prefieldType==prefieldType.ORGID){
} orgField=fieldName;
//用户配置系统预置属性-部门标识 }
if(prefieldType==prefieldType.ORGSECTORID){ //用户配置系统预置属性-部门标识
orgDeptField=fieldName; if(prefieldType==prefieldType.ORGSECTORID){
} orgDeptField=fieldName;
//用户配置系统预置属性-部门标识 }
if(prefieldType==prefieldType.CREATEMAN){ //用户配置系统预置属性-部门标识
createManField=fieldName; if(prefieldType==prefieldType.CREATEMAN){
createManField=fieldName;
}
} }
} }
permissionFiled.put("orgfield",orgField); permissionFiled.put("orgfield",orgField);
......
...@@ -20,7 +20,7 @@ public class AuthenticationEntryPoint implements org.springframework.security.we ...@@ -20,7 +20,7 @@ public class AuthenticationEntryPoint implements org.springframework.security.we
/** /**
* 当用户尝试访问安全的REST资源而不提供任何凭据时,将调用此方法发送401 响应 * 当用户尝试访问安全的REST资源而不提供任何凭据时,将调用此方法发送401 响应
*/ */
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException==null?"Unauthorized":authException.getMessage()); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "账号身份已过期,请重新登录。");
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册