|
@@ -1,6 +1,8 @@
|
|
|
package com.qmth.sop.business.service.impl;
|
|
|
|
|
|
import com.alibaba.excel.EasyExcel;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -92,6 +94,8 @@ public class TBCrmDetailServiceImpl extends ServiceImpl<TBCrmDetailMapper, TBCrm
|
|
|
throw ExceptionResultEnum.ERROR.exception("教务处sop公用控件未设置");
|
|
|
}
|
|
|
crmProjectResult.setProcessVar(JacksonUtil.parseJson(flowFormWidgetResultList));
|
|
|
+ } else {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception(tbService.getType().getTitle() + "暂不支持创建sop");
|
|
|
}
|
|
|
}
|
|
|
return crmProjectResult;
|
|
@@ -108,6 +112,15 @@ public class TBCrmDetailServiceImpl extends ServiceImpl<TBCrmDetailMapper, TBCrm
|
|
|
public boolean sopVarSave(CrmDetailSopParam crmDetailSopParam) {
|
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
TBCrm tbCrm = tbCrmService.findByCrmNo(crmDetailSopParam.getCrmNo());
|
|
|
+ List<FlowFormWidgetResult> flowFormWidgetResultList = JSONArray.parseArray(crmDetailSopParam.getProcessVar(),
|
|
|
+ FlowFormWidgetResult.class);
|
|
|
+ for (FlowFormWidgetResult f : flowFormWidgetResultList) {
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(f.getValue());
|
|
|
+ String value = jsonObject.getString(SystemConstant.VALUE);
|
|
|
+ if (Objects.isNull(value)) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception(f.getTitle() + "不能为空");
|
|
|
+ }
|
|
|
+ }
|
|
|
tbCrm.updateProcessVar(crmDetailSopParam.getProcessVar(), sysUser.getId());
|
|
|
return tbCrmService.updateById(tbCrm);
|
|
|
}
|