D10027Service.java 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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.D10027BaseModel;
  7. import com.miniframe.model.system.DGasGatherArea;
  8. import com.miniframe.model.system.dao.DGasGatherAreaMapper;
  9. /**
  10. * 基础系统,“瓦斯积聚区修改”逻辑处理(重新生成不覆盖)。
  11. */
  12. public class D10027Service extends D10027BaseModel implements ExecProcessFlow {
  13. private static final long serialVersionUID = -7051358269847459502L;
  14. /**
  15. * 基础系统,“瓦斯积聚区修改”业务核心处理
  16. */
  17. public void transExecute() throws Exception {
  18. String type =this.getA_d10027().getType();
  19. Integer ggid =this.getA_d10027().getGgid();
  20. Double gasdensity =this.getA_d10027().getGasdensity();
  21. DGasGatherAreaMapper ggMapper = UtilTools.getBean(DGasGatherAreaMapper.class);
  22. DGasGatherArea gg =ggMapper.selectByPrimaryKey(ggid);
  23. if(gg==null){
  24. throw new BusinessException("EB3100024");
  25. }
  26. gg.setType(type);
  27. gg.setGasdensity(gasdensity.floatValue());
  28. ggMapper.updateByPrimaryKey(gg);
  29. }
  30. /**
  31. * 基础系统,“瓦斯积聚区修改”业务前处理
  32. */
  33. public void preTransFlow() throws Exception {
  34. this.validater();
  35. }
  36. /**
  37. * 基础系统,“瓦斯积聚区修改”业务后处理
  38. */
  39. public void afterTransFlow() throws Exception {
  40. }
  41. /**
  42. * 基础系统,“瓦斯积聚区修改”逻辑入口处理方法
  43. */
  44. @SuppressWarnings("rawtypes")
  45. @Override
  46. public Map execute(Map vars) throws Exception {
  47. this.setTransMap(vars);
  48. preTransFlow();// 执行业务开始的规则检查和校验
  49. transExecute();// 执行核心业务段
  50. afterTransFlow();// 执行核心逻辑完成后的收尾逻辑
  51. return this.getTransMap();
  52. }
  53. }