D20006Service.java 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. package com.miniframe.bisiness.system;
  2. import java.util.Map;
  3. import com.miniframe.core.ExecProcessFlow;
  4. import com.miniframe.core.exception.BusinessException;
  5. import com.miniframe.core.ext.UtilTools;
  6. import com.miniframe.generate.business.system.model.D20006BaseModel;
  7. import com.miniframe.model.system.DPumpHf;
  8. import com.miniframe.model.system.dao.DPumpHfMapper;
  9. /**
  10. * 基础系统,“水泵水位流量删除”逻辑处理(重新生成不覆盖)。
  11. */
  12. public class D20006Service extends D20006BaseModel implements ExecProcessFlow {
  13. private static final long serialVersionUID = -7051358269847459502L;
  14. /**
  15. * 基础系统,“水泵水位流量删除”业务核心处理
  16. */
  17. public void transExecute() throws Exception {
  18. Integer pumphfid =this.getA_d20006().getPumphfid();
  19. DPumpHfMapper hfDao = UtilTools.getBean(DPumpHfMapper.class);
  20. DPumpHf hf=hfDao.selectByPrimaryKey(pumphfid);
  21. if(hf ==null){
  22. throw new BusinessException("EB3100035",new String[]{pumphfid.toString()});
  23. }
  24. hfDao.deleteByPrimaryKey(pumphfid);
  25. }
  26. /**
  27. * 基础系统,“水泵水位流量删除”业务前处理
  28. */
  29. public void preTransFlow() throws Exception {
  30. this.validater();
  31. }
  32. /**
  33. * 基础系统,“水泵水位流量删除”业务后处理
  34. */
  35. public void afterTransFlow() throws Exception {
  36. }
  37. /**
  38. * 基础系统,“水泵水位流量删除”逻辑入口处理方法
  39. */
  40. @SuppressWarnings("rawtypes")
  41. @Override
  42. public Map execute(Map vars) throws Exception {
  43. this.setTransMap(vars);
  44. preTransFlow();// 执行业务开始的规则检查和校验
  45. transExecute();// 执行核心业务段
  46. afterTransFlow();// 执行核心逻辑完成后的收尾逻辑
  47. return this.getTransMap();
  48. }
  49. }