|
@@ -1,5 +1,6 @@
|
|
package com.qmth.sop.business.service.impl;
|
|
package com.qmth.sop.business.service.impl;
|
|
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
@@ -464,14 +465,31 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
List<FlowFormWidgetResult> formProperty = flowTaskResult.getFormProperty();
|
|
List<FlowFormWidgetResult> formProperty = flowTaskResult.getFormProperty();
|
|
for (FlowFormWidgetResult f : formProperty) {
|
|
for (FlowFormWidgetResult f : formProperty) {
|
|
if (f.getFormId().contains(SystemConstant.REGION_USER_ID) && Objects.nonNull(f.getValue())) {
|
|
if (f.getFormId().contains(SystemConstant.REGION_USER_ID) && Objects.nonNull(f.getValue())) {
|
|
- regionUserId = Long.parseLong(f.getValue());
|
|
|
|
|
|
+ if (f.getInputType() == WidgetInputTypeEnum.STRING || f.getInputType() == WidgetInputTypeEnum.LONG) {
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(f.getValue());
|
|
|
|
+ String value = jsonObject.getString(SystemConstant.VALUE);
|
|
|
|
+ regionUserId = Long.parseLong(value);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (f.getFormId().contains(SystemConstant.ENGINEER_USER_ID) && Objects.nonNull(f.getValue())) {
|
|
if (f.getFormId().contains(SystemConstant.ENGINEER_USER_ID) && Objects.nonNull(f.getValue())) {
|
|
- engineerUserId = Long.parseLong(f.getValue());
|
|
|
|
|
|
+ if (f.getInputType() == WidgetInputTypeEnum.STRING || f.getInputType() == WidgetInputTypeEnum.LONG) {
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(f.getValue());
|
|
|
|
+ String value = jsonObject.getString(SystemConstant.VALUE);
|
|
|
|
+ engineerUserId = Long.parseLong(value);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (f.getFormId().contains(SystemConstant.ASSISTANT_ENGINEER_USER_ID) && Objects.nonNull(f.getValue())) {
|
|
if (f.getFormId().contains(SystemConstant.ASSISTANT_ENGINEER_USER_ID) && Objects.nonNull(f.getValue())) {
|
|
- String string = f.getValue().replaceAll("\\[", "").replaceAll("\\]", "");
|
|
|
|
- assistantEngineerUserIds = StringUtils.join(Arrays.asList(string), SystemConstant.LIST_JOIN_SPLIT);
|
|
|
|
|
|
+// String string = f.getValue().replaceAll("\\[", "").replaceAll("\\]", "");
|
|
|
|
+// assistantEngineerUserIds = StringUtils.join(Arrays.asList(string), SystemConstant.LIST_JOIN_SPLIT);
|
|
|
|
+ if (f.getInputType() == WidgetInputTypeEnum.ARRAY) {
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(f.getValue());
|
|
|
|
+ JSONArray jsonArray = jsonObject.getJSONArray(SystemConstant.VALUE);
|
|
|
|
+ StringJoiner stringJoiner = new StringJoiner(",");
|
|
|
|
+ for (int i = 0; i < jsonArray.size(); i++) {
|
|
|
|
+ stringJoiner.add(jsonArray.getString(i));
|
|
|
|
+ }
|
|
|
|
+ assistantEngineerUserIds = stringJoiner.toString();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (Objects.nonNull(regionUserId) && Objects.nonNull(engineerUserId) && Objects.nonNull(assistantEngineerUserIds)) {
|
|
if (Objects.nonNull(regionUserId) && Objects.nonNull(engineerUserId) && Objects.nonNull(assistantEngineerUserIds)) {
|
|
break;
|
|
break;
|