|
@@ -348,9 +348,10 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
|
throw ExceptionResultEnum.ERROR.exception("流程类型只能为教务处或研究生");
|
|
|
}
|
|
|
String tableName = sopInfoListParam.getType().getTableName() + "_" + sopInfoListParam.getVersion();
|
|
|
- String fieldName = null, fieldValue = null;
|
|
|
+ String fieldName = null, fieldValue = null, fieldOrder = null;
|
|
|
StringJoiner stringJoinerView = new StringJoiner(",");
|
|
|
StringJoiner stringJoinerCondition = new StringJoiner("");
|
|
|
+ StringJoiner stringJoinerOrder = new StringJoiner("");
|
|
|
|
|
|
//显示字段
|
|
|
if (!CollectionUtils.isEmpty(sopInfoListParam.getFormWidgetMetadataViewList())) {
|
|
@@ -418,9 +419,18 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
|
}
|
|
|
fieldValue = !Objects.equals(stringJoinerCondition.toString().trim(), "") ? stringJoinerCondition.toString().trim() : null;
|
|
|
|
|
|
+ //排序字段
|
|
|
+ if (!CollectionUtils.isEmpty(sopInfoListParam.getFormWidgetMetadataOrderList())) {
|
|
|
+ for (FormWidgetMetadataParam f : sopInfoListParam.getFormWidgetMetadataOrderList()) {
|
|
|
+ stringJoinerOrder.add(f.getFieldId()).add(f.getOrder().getCode()).add(",");
|
|
|
+ }
|
|
|
+ fieldOrder = stringJoinerOrder.toString();
|
|
|
+ fieldOrder = fieldOrder.substring(0, fieldOrder.length() - 1);
|
|
|
+ }
|
|
|
+
|
|
|
SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
DataPermissionDto dpr = sysUserService.buildUserDataPermission(requestUser.getId());
|
|
|
- IPage<Map> list = this.baseMapper.list(new Page<>(sopInfoListParam.getPageNumber(), sopInfoListParam.getPageSize()), Objects.nonNull(sopInfoListParam.getType()) ? sopInfoListParam.getType().name() : null, sopInfoListParam.getServiceId(), tableName, fieldName, fieldValue, dpr);
|
|
|
+ IPage<Map> list = this.baseMapper.list(new Page<>(sopInfoListParam.getPageNumber(), sopInfoListParam.getPageSize()), Objects.nonNull(sopInfoListParam.getType()) ? sopInfoListParam.getType().name() : null, sopInfoListParam.getServiceId(), tableName, fieldName, fieldValue, dpr, fieldOrder);
|
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
for (Map m : list.getRecords()) {
|
|
|
String regionUserId = (String) m.get("region_user_id_1");
|