|
|
@@ -14,14 +14,19 @@ import java.util.Map;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
-import com.lc.ibps.base.framework.table.ICommonDao;
|
|
|
+import com.lc.ibps.bpmn.api.cmd.ProcInstCmd;
|
|
|
+import com.lc.ibps.bpmn.api.define.IBpmDefineReader;
|
|
|
+import com.lc.ibps.bpmn.api.model.define.IBpmProcDefine;
|
|
|
+import com.lc.ibps.bpmn.api.model.define.IBpmProcExtendDefine;
|
|
|
import com.lc.ibps.bpmn.api.service.BpmProcInstService;
|
|
|
+import com.lc.ibps.bpmn.domain.BpmInstHis;
|
|
|
+import com.lc.ibps.bpmn.persistence.entity.BpmInstHisPo;
|
|
|
+import com.lc.ibps.bpmn.repository.BpmInstHisRepository;
|
|
|
+import com.lc.ibps.bpmn.repository.BpmInstRepository;
|
|
|
import com.lc.ibps.components.poi.excel.entity.enmus.ExcelType;
|
|
|
import com.lc.ibps.components.poi.excel.export.styler.ExcelExportStylerColorImpl;
|
|
|
-import com.lc.ibps.components.poi.excel.export.styler.ExcelExportStylerDefaultImpl;
|
|
|
import org.apache.commons.lang3.ArrayUtils;
|
|
|
import org.apache.commons.lang3.BooleanUtils;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
import org.apache.poi.ss.usermodel.Workbook;
|
|
|
import org.slf4j.event.Level;
|
|
|
@@ -145,7 +150,13 @@ public class DataTemplateProvider extends GenericProvider implements IDataTempla
|
|
|
private BoInstanceTxService boInstanceTxService;
|
|
|
|
|
|
@Resource
|
|
|
- private ICommonDao<?> commonDao;
|
|
|
+ private BpmInstRepository bpmInstRepository;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private BpmInstHisRepository bpmInstHisRepository;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private IBpmDefineReader bpmDefineReader;
|
|
|
|
|
|
@ApiOperation(value = "数据模版列表(分页条件查询)数据", notes = "数据模版列表(分页条件查询)数据")
|
|
|
@Override
|
|
|
@@ -1536,6 +1547,19 @@ public class DataTemplateProvider extends GenericProvider implements IDataTempla
|
|
|
|
|
|
// 保存数据
|
|
|
BoResultVo resultVo = boInstanceService.save(saveType, dataObject);
|
|
|
+ BpmInstHisPo bpmInstHisPo = bpmInstHisRepository.getByBizKey(dataTemplateRequestVo.getPk());
|
|
|
+ if (BeanUtils.isNotEmpty(bpmInstHisPo)){
|
|
|
+ IBpmProcDefine<IBpmProcExtendDefine> processDef = bpmDefineReader.getBpmProcDefine(bpmInstHisPo.getProcDefId());
|
|
|
+ ProcInstCmd procInstCmd = null;
|
|
|
+ procInstCmd.setCurUserName(ContextUtil.getCurrentUserId());
|
|
|
+ procInstCmd.setBusinessKey(dataTemplateRequestVo.getPk());
|
|
|
+ procInstCmd.setBusData(dataTemplateRequestVo.getData());
|
|
|
+ String subject = bpmInstRepository.getSubject(processDef,procInstCmd,null);
|
|
|
+ BpmInstHis instHis = bpmInstHisRepository.newInstance();
|
|
|
+ bpmInstHisPo.setSubject(subject);
|
|
|
+ instHis.save(bpmInstHisPo);
|
|
|
+ }
|
|
|
+
|
|
|
result.addVariable("id", resultVo.getResultId());
|
|
|
result.setMessage(I18nUtil.getMessage("com.lc.ibps.form.provider.DataTemplateProvider.saveFormDataVo"));
|
|
|
} catch (Exception e) {
|