D000012Service.java 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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.D000012BaseModel;
  7. import com.miniframe.model.system.DSourceVal;
  8. import com.miniframe.model.system.dao.DSourceValMapper;
  9. /**
  10. * 基础系统,“灾情点源检测数据修改”逻辑处理(重新生成不覆盖)。
  11. */
  12. public class D000012Service extends D000012BaseModel implements ExecProcessFlow {
  13. private static final long serialVersionUID = -7051358269847459502L;
  14. /**
  15. * 基础系统,“灾情点源检测数据修改”业务核心处理
  16. */
  17. public void transExecute() throws Exception {
  18. Double val1 =this.getA_d000012().getVal1();
  19. Double val2 =this.getA_d000012().getVal2();
  20. Double val3 =this.getA_d000012().getVal3();
  21. Double val4 =this.getA_d000012().getVal4();
  22. Integer svid =this.getA_d000012().getSvid();
  23. DSourceValMapper dsvm= UtilTools.getBean(DSourceValMapper.class);
  24. DSourceVal dsv = dsvm.selectByPrimaryKey(svid);
  25. if(dsv==null){
  26. throw new BusinessException("EB3000006");//检测数据不存在
  27. }
  28. dsv.setTimeline(this.getA_d000012().getTimeline());
  29. dsv.setVal1(val1.floatValue());
  30. dsv.setVal2(val2.floatValue());
  31. dsv.setVal3(val3.floatValue());
  32. dsv.setVal4(val4.floatValue());
  33. dsvm.updateByPrimaryKey(dsv);
  34. }
  35. /**
  36. * 基础系统,“灾情点源检测数据修改”业务前处理
  37. */
  38. public void preTransFlow() throws Exception {
  39. this.validater();
  40. }
  41. /**
  42. * 基础系统,“灾情点源检测数据修改”业务后处理
  43. */
  44. public void afterTransFlow() throws Exception {
  45. }
  46. /**
  47. * 基础系统,“灾情点源检测数据修改”逻辑入口处理方法
  48. */
  49. @SuppressWarnings("rawtypes")
  50. @Override
  51. public Map execute(Map vars) throws Exception {
  52. this.setTransMap(vars);
  53. preTransFlow();// 执行业务开始的规则检查和校验
  54. transExecute();// 执行核心业务段
  55. afterTransFlow();// 执行核心逻辑完成后的收尾逻辑
  56. return this.getTransMap();
  57. }
  58. }