ソースを参照

修复小程序的流程签名看不见的问题

ouyj 2 週間 前
コミット
38ce4b4c38

+ 15 - 3
src/main/bpm/com/yw/bpm/client/action/BpmClientFlowDetailAction.java

@@ -26,6 +26,8 @@ import com.yw.bpm.instance.model.TacheInstance;
 import com.yw.bpm.instance.service.FlowService;
 import com.yw.bpm.seal.dao.SealDao;
 import com.yw.bpm.seal.model.SealInfo;
+import com.yw.bpm.system.dao.SystemDao;
+import com.yw.bpm.system.model.SystemFile;
 import com.yw.bpm.system.util.JsonUtil;
 import com.yw.core.clientImpl.model.ResultVo;
 import com.yw.core.clientImpl.service.RequestAbs;
@@ -124,6 +126,7 @@ public class BpmClientFlowDetailAction extends RequestAbs {
 				FormSealInfoDao bpmFormSealDao = (FormSealInfoDao) cxt.getBean("bpmFormSealDao");
 				SealDao bpmSealDao = (SealDao) cxt.getBean("bpmSealDao");
 				UploadFileService uploadFileService = (UploadFileService) cxt.getBean("uploadFileService");
+				SystemDao bpmSystemDao = (SystemDao) cxt.getBean("bpmSystemDao");
 				String formId = "";
 				String formInsId = "";
 				Map<String, Object> fileMap = new HashMap<String, Object>();
@@ -219,9 +222,18 @@ public class BpmClientFlowDetailAction extends RequestAbs {
 										defaultValue = sealId;
 									} else {
 										SealInfo sealInfo = bpmSealDao.getSealInfoById(sealId);
-										defaultValue = sealInfo.getSealFileId().getUniversalid();
-										sealImgPath = sealInfo.getSealFileId().getPath();
-										element.put("sealImgPath", sealImgPath);
+										if(sealInfo != null){
+											defaultValue = sealInfo.getSealFileId().getUniversalid();
+											sealImgPath = sealInfo.getSealFileId().getPath();
+											element.put("sealImgPath", sealImgPath); 
+										}else{
+											defaultValue = sealId;
+											SystemFile infoPathFile = bpmSystemDao.getFileInfoById(sealId);
+											if(infoPathFile != null){
+												sealImgPath = infoPathFile.getPath();
+												element.put("sealImgPath", sealImgPath);
+											} 
+										}  
 									}
 								}
 							}

+ 15 - 5
src/main/bpm/com/yw/bpm/client/action/BpmClientFlowFormAction.java

@@ -29,6 +29,7 @@ import com.yw.bpm.instance.model.TacheInstance;
 import com.yw.bpm.instance.service.FlowService;
 import com.yw.bpm.seal.dao.SealDao;
 import com.yw.bpm.seal.model.SealInfo;
+import com.yw.bpm.system.dao.SystemDao;
 import com.yw.bpm.system.model.SystemFile;
 import com.yw.bpm.system.util.JsonUtil;
 import com.yw.core.clientImpl.model.ResultVo;
@@ -132,6 +133,7 @@ public class BpmClientFlowFormAction extends RequestAbs {
 				SealDao bpmSealDao = (SealDao) cxt.getBean("bpmSealDao");
 				FlowDao bpmFlowDao = (FlowDao) cxt.getBean("bpmFlowDao");
 				UploadFileService uploadFileService = (UploadFileService) cxt.getBean("uploadFileService");
+				SystemDao bpmSystemDao = (SystemDao) cxt.getBean("bpmSystemDao");
 				String formId = "";
 				String formInsId = "";
 				String formInfo = "";
@@ -242,12 +244,20 @@ public class BpmClientFlowFormAction extends RequestAbs {
 									String type = formSealInfo.getType();
 									if ("1".equals(type)) {
 										defaultValue = sealId;
-									} else {
+									} else { 
 										SealInfo sealInfo = bpmSealDao.getSealInfoById(sealId);
-//										defaultValue = sealInfo.getSealFileId().getUniversalid();
-										defaultValue = sealInfo.getSealFileId().getUniversalid();
-										sealImgPath = sealInfo.getSealFileId().getPath();
-										element.put("sealImgPath", sealImgPath);
+										if(sealInfo != null){
+											defaultValue = sealInfo.getSealFileId().getUniversalid();
+											sealImgPath = sealInfo.getSealFileId().getPath();
+											element.put("sealImgPath", sealImgPath); 
+										}else{
+											defaultValue = sealId;
+											SystemFile infoPathFile = bpmSystemDao.getFileInfoById(sealId);
+											if(infoPathFile != null){
+												sealImgPath = infoPathFile.getPath();
+												element.put("sealImgPath", sealImgPath);
+											} 
+										}  
 									}
 								}
 							}