MDO0052Service.java 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. package com.miniframe.bisiness.mdo;
  2. import java.util.ArrayList;
  3. import java.util.List;
  4. import java.util.Map;
  5. import com.miniframe.core.ExecProcessFlow;
  6. import com.miniframe.core.ext.UtilTools;
  7. import com.miniframe.generate.business.mdo.model.MDO0052BaseModel;
  8. import com.miniframe.generate.comm.mdo.D_MDO0052_PARAMS_RECODE;
  9. import com.miniframe.model.mdo.MdoProInoutPara;
  10. import com.miniframe.model.mdo.MdoProInoutParaSQLBuilder;
  11. import com.miniframe.model.mdo.dao.MdoProInoutParaMapper;
  12. /**
  13. * 西工大系统,“流查询”逻辑处理(重新生成不覆盖)。
  14. */
  15. public class MDO0052Service extends MDO0052BaseModel implements ExecProcessFlow {
  16. private static final long serialVersionUID = -7051358269847459502L;
  17. /**
  18. * 西工大系统,“流查询”业务核心处理
  19. */
  20. public void transExecute() throws Exception {
  21. String pid = this.getA_mdo0052().getPid();
  22. String comid = this.getA_mdo0052().getComid();
  23. int type =this.getA_mdo0052().getType();
  24. MdoProInoutParaMapper outDao = UtilTools.getBean(MdoProInoutParaMapper.class);
  25. MdoProInoutParaSQLBuilder outsb = new MdoProInoutParaSQLBuilder();
  26. MdoProInoutParaSQLBuilder.Criteria outsc = outsb.createCriteria();
  27. outsc.andPidEqualTo(pid);
  28. outsc.andFatheridEqualTo(comid);
  29. outsc.andTypeEqualTo(2);
  30. outsc.andFlagEqualTo(1);
  31. List<MdoProInoutPara> parList = outDao.selectByExample(outsb);
  32. List<D_MDO0052_PARAMS_RECODE> rows = new ArrayList<>();
  33. for (MdoProInoutPara p:parList) {
  34. D_MDO0052_PARAMS_RECODE row = new D_MDO0052_PARAMS_RECODE();
  35. row.setCode(p.getCode());
  36. row.setParamid(p.getId());
  37. row.setName(p.getName());
  38. row.setComtype(p.getComtype());
  39. row.setSteamflag(p.getSteamflag()==null?1:p.getSteamflag());
  40. row.setSteamtype(p.getSteamtype()==null?1:p.getSteamtype());
  41. if(2==type){//求解组件到优化组件 排除求解组件到求解组件已设置的数据
  42. if(p.getSteamtype()!=null&&p.getSteamtype().equals("3")){
  43. continue;
  44. }
  45. }else if(3==type){//求解组件到求解组件 排除求解组件到优化组件已设置的数据
  46. if(p.getSteamtype()!=null
  47. &&(p.getSteamtype().equals("1")||p.getSteamtype().equals("2")
  48. )){
  49. continue;
  50. }
  51. }
  52. rows.add(row);
  53. }
  54. this.getD_mdo0052().setParams(rows);
  55. }
  56. /**
  57. * 西工大系统,“流查询”业务前处理
  58. */
  59. public void preTransFlow() throws Exception {
  60. this.validater();
  61. }
  62. /**
  63. * 西工大系统,“流查询”业务后处理
  64. */
  65. public void afterTransFlow() throws Exception {
  66. }
  67. /**
  68. * 西工大系统,“流查询”逻辑入口处理方法
  69. */
  70. @SuppressWarnings("rawtypes")
  71. @Override
  72. public Map execute(Map vars) throws Exception {
  73. this.setTransMap(vars);
  74. preTransFlow();// 执行业务开始的规则检查和校验
  75. transExecute();// 执行核心业务段
  76. afterTransFlow();// 执行核心逻辑完成后的收尾逻辑
  77. return this.getTransMap();
  78. }
  79. }