package com.miniframe.bisiness.es; import java.util.Map; import com.miniframe.core.ExecProcessFlow; import com.miniframe.core.exception.BusinessException; import com.miniframe.core.ext.UtilTools; import com.miniframe.generate.business.es.model.ES0007BaseModel; import com.miniframe.model.es.EsProCom; import com.miniframe.model.es.EsProComCon; import com.miniframe.model.es.EsProComConSQLBuilder; import com.miniframe.model.es.EsProComSQLBuilder; import com.miniframe.model.es.dao.EsProComConMapper; import com.miniframe.model.es.dao.EsProComMapper; /** * 无锡发动机,“项目组件删除连线”逻辑处理(重新生成不覆盖)。 */ public class ES0007Service extends ES0007BaseModel implements ExecProcessFlow { private static final long serialVersionUID = -7051358269847459502L; /** * 无锡发动机,“项目组件删除连线”业务核心处理 */ public void transExecute() throws Exception { String npcId = this.getA_es0007().getNpcId(); String pcId = this.getA_es0007().getPcId(); Integer type = this.getA_es0007().getType(); EsProComMapper cdao = UtilTools.getBean(EsProComMapper.class); EsProCom proCom= cdao.selectByPrimaryKey(pcId); EsProCom nProCom =cdao.selectByPrimaryKey(npcId); if(nProCom==null){ throw new BusinessException(""); } if(nProCom.getComId()!="3"){ throw new BusinessException(""); } if(proCom==null){ throw new BusinessException(""); } EsProComConMapper pccdao =UtilTools.getBean(EsProComConMapper.class); EsProComConSQLBuilder pccsb = new EsProComConSQLBuilder(); EsProComConSQLBuilder.Criteria pccsc = pccsb.createCriteria(); pccsc.andNpcIdEqualTo(npcId); pccsc.andPcIdEqualTo(pcId); pccsc.andTypeEqualTo(Short.valueOf(type.toString())); pccdao.deleteByExample(pccsb); } /** * 无锡发动机,“项目组件删除连线”业务前处理 */ public void preTransFlow() throws Exception { this.validater(); } /** * 无锡发动机,“项目组件删除连线”业务后处理 */ public void afterTransFlow() throws Exception { } /** * 无锡发动机,“项目组件删除连线”逻辑入口处理方法 */ @SuppressWarnings("rawtypes") @Override public Map execute(Map vars) throws Exception { this.setTransMap(vars); preTransFlow();// 执行业务开始的规则检查和校验 transExecute();// 执行核心业务段 afterTransFlow();// 执行核心逻辑完成后的收尾逻辑 return this.getTransMap(); } }