فهرست منبع

管道修改BUG

huangxingxing 1 سال پیش
والد
کامیت
44fba7904d
1فایلهای تغییر یافته به همراه15 افزوده شده و 0 حذف شده
  1. 15 0
      src/main/java/com/miniframe/bisiness/system/D10002Service.java

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

@@ -49,6 +49,7 @@ public class D10002Service extends D10002BaseModel implements ExecProcessFlow {
 			savePipe(dPipeDao, name, snId, enId, roughCoe, sectionType, sectionPara1, sectionPara2, sectionPara3, sectionPara4, sectionPara5);
 			savePipe(dPipeDao, name, snId, enId, roughCoe, sectionType, sectionPara1, sectionPara2, sectionPara3, sectionPara4, sectionPara5);
 		}else{//修改
 		}else{//修改
 			DPipe pipe =dPipeDao.selectByPrimaryKey(pid);
 			DPipe pipe =dPipeDao.selectByPrimaryKey(pid);
+			pdSnIdEnIdNotPid(dPipeDao,snId,enId,pid);
 			if(pipe==null){
 			if(pipe==null){
 				throw new BusinessException("EB3100002");
 				throw new BusinessException("EB3100002");
 			}
 			}
@@ -57,6 +58,20 @@ public class D10002Service extends D10002BaseModel implements ExecProcessFlow {
 
 
 	}
 	}
 
 
+
+	public void pdSnIdEnIdNotPid(DPipeMapper dPipeDao,Integer snId,Integer enId, Integer pid) throws BusinessException {
+		DPipeSQLBuilder sb =new DPipeSQLBuilder();
+		DPipeSQLBuilder.Criteria sc = sb.createCriteria();
+		sc.andSnidEqualTo(snId);
+		sc.andEnidEqualTo(enId);
+		sc.andIdNotEqualTo(pid);
+		DPipe pip = dPipeDao.selectOneByExample(sb);
+		if(pip!=null){
+			throw new BusinessException("EB3100001");
+		}
+	}
+
+
 	private void updatePipe(DPipeMapper dPipeDao, String name, Integer snId, Integer enId, String roughCoe, String sectionType, String sectionPara1, String sectionPara2, String sectionPara3, String sectionPara4, String sectionPara5, DPipe pipe) {
 	private void updatePipe(DPipeMapper dPipeDao, String name, Integer snId, Integer enId, String roughCoe, String sectionType, String sectionPara1, String sectionPara2, String sectionPara3, String sectionPara4, String sectionPara5, DPipe pipe) {
 		pipe.setName(name);
 		pipe.setName(name);
 		pipe.setSnid(snId);
 		pipe.setSnid(snId);