|
@@ -5,6 +5,8 @@ import com.miniframe.core.ExecProcessFlow;
|
|
|
import com.miniframe.core.exception.BusinessException;
|
|
|
import com.miniframe.core.ext.UtilTools;
|
|
|
import com.miniframe.generate.business.system.model.D10001BaseModel;
|
|
|
+import com.miniframe.mappers.system.dao.CodeOnlyOneMapper;
|
|
|
+import com.miniframe.mappers.system.dao.FkMapper;
|
|
|
import com.miniframe.model.system.DNode;
|
|
|
import com.miniframe.model.system.dao.DNodeMapper;
|
|
|
|
|
@@ -21,7 +23,13 @@ public class D10001Service extends D10001BaseModel implements ExecProcessFlow {
|
|
|
public void transExecute() throws Exception {
|
|
|
DNodeMapper dNodeDao = UtilTools.getBean(DNodeMapper.class);
|
|
|
Integer nid = this.getA_d10001().getNid();
|
|
|
- findById(dNodeDao,nid);
|
|
|
+ DNode node=findById(dNodeDao,nid);
|
|
|
+ FkMapper fkdao =UtilTools.getBean(FkMapper.class);
|
|
|
+ Integer nodeNum =fkdao.getNodeNum(nid);
|
|
|
+ if(nodeNum!=0){
|
|
|
+ throw new BusinessException("EB3100040",new String[]{node.getCode()});
|
|
|
+ }
|
|
|
+
|
|
|
dNodeDao.deleteByPrimaryKey(nid);
|
|
|
}
|
|
|
|