소스 검색

管道修改

huangxingxing 9 달 전
부모
커밋
40d88c5289
1개의 변경된 파일23개의 추가작업 그리고 15개의 파일을 삭제
  1. 23 15
      src/main/java/com/miniframe/bisiness/system/D10002Service.java

+ 23 - 15
src/main/java/com/miniframe/bisiness/system/D10002Service.java

@@ -40,18 +40,17 @@ public class D10002Service extends D10002BaseModel implements ExecProcessFlow {
 		String roughCoeName=this.getA_d10002().getRoughCoeName();
 		String code =this.getA_d10002().getCode();
 
-
 		String gfid = this.getA_d10002().getGfid();
 		String bfid = this.getA_d10002().getBfid();
 		SysFileMapper sysFileMapper = UtilTools.getBean(SysFileMapper.class);
 		SysFile gf = sysFileMapper.selectByPrimaryKey(gfid);
-		if (gf == null) {
-			throw new BusinessException("EB3100020");
-		}
+//		if (gf == null) {
+////			throw new BusinessException("EB3100020");
+//		}
 		SysFile bf = sysFileMapper.selectByPrimaryKey(bfid);
-		if (bf == null) {
-			throw new BusinessException("EB3100021");
-		}
+//		if (bf == null) {
+////			throw new BusinessException("EB3100021");
+//		}
 
 		DNodeMapper nodeMapper =UtilTools.getBean(DNodeMapper.class);
 		DNode sNode = nodeMapper.selectByPrimaryKey(snId);
@@ -107,11 +106,16 @@ public class D10002Service extends D10002BaseModel implements ExecProcessFlow {
 		pipe.setSectionPara4(Float.valueOf(!StringUtil.isEmpty(sectionPara4)?sectionPara4:"0"));
 		pipe.setSectionPara5(Float.valueOf(!StringUtil.isEmpty(sectionPara5)?sectionPara5:"0"));
 		pipe.setCode(code);
-		pipe.setGfid(gf.getId());
-		pipe.setGfname(gf.getFilename());
-		pipe.setBfid(bf.getId());
-		pipe.setBfname(bf.getFilename());
 		pipe.setRoughCoeName(roughCoeName);
+		if(gf!=null){
+			pipe.setGfid(gf.getId());
+			pipe.setGfname(gf.getFilename());
+
+		}
+		if(bf!=null){
+			pipe.setBfid(bf.getId());
+			pipe.setBfname(bf.getFilename());
+		}
 		dPipeDao.updateByPrimaryKey(pipe);
 	}
 
@@ -142,10 +146,14 @@ public class D10002Service extends D10002BaseModel implements ExecProcessFlow {
 		pipe.setSectionPara4(Float.valueOf(!StringUtil.isEmpty(sectionPara4)?sectionPara4:"0"));
 		pipe.setSectionPara5(Float.valueOf(!StringUtil.isEmpty(sectionPara5)?sectionPara5:"0"));
 		pipe.setCode(code);
-		pipe.setGfid(gf.getId());
-		pipe.setGfname(gf.getFilename());
-		pipe.setBfid(bf.getId());
-		pipe.setBfname(bf.getFilename());
+		if(gf!=null){
+			pipe.setGfid(gf.getId());
+			pipe.setGfname(gf.getFilename());
+		}
+		if(bf!=null){
+			pipe.setBfid(bf.getId());
+			pipe.setBfname(bf.getFilename());
+		}
 		pipe.setRoughCoeName(roughCoeName);
 		dPipeDao.insertSelective(pipe);
 	}