D10017Service.java 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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.D10017BaseModel;
  7. import com.miniframe.generate.comm.system.D_D10017;
  8. import com.miniframe.model.system.DAccident;
  9. import com.miniframe.model.system.DJob;
  10. import com.miniframe.model.system.dao.DAccidentMapper;
  11. import com.miniframe.model.system.dao.DJobMapper;
  12. import tk.mybatis.mapper.util.StringUtil;
  13. /**
  14. * 基础系统,“求解任务信息”逻辑处理(重新生成不覆盖)。
  15. */
  16. public class D10017Service extends D10017BaseModel implements ExecProcessFlow {
  17. private static final long serialVersionUID = -7051358269847459502L;
  18. /**
  19. * 基础系统,“求解任务信息”业务核心处理
  20. */
  21. public void transExecute() throws Exception {
  22. Integer aid = this.getA_d10017().getAid();
  23. DAccidentMapper accidentMapper =UtilTools.getBean(DAccidentMapper.class);
  24. DAccident accident = accidentMapper.selectByPrimaryKey(aid);
  25. if(accident ==null ){
  26. throw new BusinessException("EB3000002");
  27. }
  28. if(accident.getJid()==null||accident.getJid()<=0){
  29. throw new BusinessException("EB3100012");
  30. }
  31. DJobMapper jobMapper = UtilTools.getBean(DJobMapper.class);
  32. DJob jb = jobMapper.selectByPrimaryKey(accident.getJid());
  33. D_D10017 rb =this.getD_d10017();
  34. rb.setJid(jb.getId());
  35. rb.setAid(jb.getAid());
  36. rb.setStarttime(jb.getStarttime());
  37. rb.setEndtime(jb.getEndtime());
  38. rb.setState(jb.getState());
  39. rb.setFaildes(jb.getFaildes());
  40. rb.setDt(jb.getDt());
  41. rb.setDx(jb.getDx());
  42. rb.setReportstep(jb.getReportstep());
  43. rb.setInteractionstep(jb.getInteractionstep());
  44. rb.setAcctime(jb.getAcctime());
  45. rb.setTotaltime(jb.getTotaltime());
  46. rb.setCoids(jb.getCoids());
  47. rb.setCocodes(jb.getCocodes());
  48. }
  49. /**
  50. * 基础系统,“求解任务信息”业务前处理
  51. */
  52. public void preTransFlow() throws Exception {
  53. this.validater();
  54. }
  55. /**
  56. * 基础系统,“求解任务信息”业务后处理
  57. */
  58. public void afterTransFlow() throws Exception {
  59. }
  60. /**
  61. * 基础系统,“求解任务信息”逻辑入口处理方法
  62. */
  63. @SuppressWarnings("rawtypes")
  64. @Override
  65. public Map execute(Map vars) throws Exception {
  66. this.setTransMap(vars);
  67. preTransFlow();// 执行业务开始的规则检查和校验
  68. transExecute();// 执行核心业务段
  69. afterTransFlow();// 执行核心逻辑完成后的收尾逻辑
  70. return this.getTransMap();
  71. }
  72. }