|
@@ -1,45 +0,0 @@
|
|
|
-package com.lantone.qc.trans.taizhou;
|
|
|
-
|
|
|
-import com.google.common.collect.Lists;
|
|
|
-import com.lantone.qc.pub.model.doc.DutyShiftSystemDoc;
|
|
|
-import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
|
-import com.lantone.qc.trans.ModelDocTrans;
|
|
|
-import com.lantone.qc.trans.comsis.OrdinaryAssistant;
|
|
|
-import com.lantone.qc.dbanaly.facade.taizhou.TzXmlUtil;
|
|
|
-
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
-/**
|
|
|
- * @Description: 值班交接制度文档生成
|
|
|
- * @author: rengb
|
|
|
- * @time: 2020/3/17 13:24
|
|
|
- */
|
|
|
-public class TaiZhouDutyShiftSystemDocTrans extends ModelDocTrans {
|
|
|
-
|
|
|
- @Override
|
|
|
- public List<DutyShiftSystemDoc> extract(MedrecVo medrecVo) {
|
|
|
- List<DutyShiftSystemDoc> retList = Lists.newArrayList();
|
|
|
- List<Map<String, Object>> contentMaps = (List) medrecVo.getContent().get("content");
|
|
|
- contentMaps.forEach(contentMap -> {
|
|
|
- retList.add(getDutyShiftSystemDoc(contentMap));
|
|
|
- });
|
|
|
- return retList;
|
|
|
- }
|
|
|
-
|
|
|
- private DutyShiftSystemDoc getDutyShiftSystemDoc(Map<String, Object> contentMap) {
|
|
|
- String content = contentMap.get("xmlText").toString();
|
|
|
- Map<String, String> sourceMap = TzXmlUtil.getXmlToMapForTZ(content);
|
|
|
- sourceMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
|
|
|
- sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
|
- Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(TzXmlUtil.getXmlToMapForTZ(content), keyContrasts);
|
|
|
-
|
|
|
- DutyShiftSystemDoc dutyShiftSystemDoc = new DutyShiftSystemDoc();
|
|
|
- dutyShiftSystemDoc.setStructureMap(structureMap);
|
|
|
- dutyShiftSystemDoc.setPageData((Map) sourceMap);
|
|
|
- return dutyShiftSystemDoc;
|
|
|
- }
|
|
|
-
|
|
|
- private List<String> keyContrasts = Lists.newArrayList();
|
|
|
-
|
|
|
-}
|