12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- package com.miniframe.bisiness.mdo;
- import java.util.ArrayList;
- import java.util.List;
- import java.util.Map;
- import com.miniframe.core.ExecProcessFlow;
- import com.miniframe.core.ext.UtilTools;
- import com.miniframe.generate.business.mdo.model.MDO0052BaseModel;
- import com.miniframe.generate.comm.mdo.D_MDO0052_PARAMS_RECODE;
- import com.miniframe.model.mdo.MdoProInoutPara;
- import com.miniframe.model.mdo.MdoProInoutParaSQLBuilder;
- import com.miniframe.model.mdo.dao.MdoProInoutParaMapper;
- /**
- * 西工大系统,“流查询”逻辑处理(重新生成不覆盖)。
- */
- public class MDO0052Service extends MDO0052BaseModel implements ExecProcessFlow {
-
- private static final long serialVersionUID = -7051358269847459502L;
-
- /**
- * 西工大系统,“流查询”业务核心处理
- */
- public void transExecute() throws Exception {
- String pid = this.getA_mdo0052().getPid();
- String comid = this.getA_mdo0052().getComid();
- int type =this.getA_mdo0052().getType();
- MdoProInoutParaMapper outDao = UtilTools.getBean(MdoProInoutParaMapper.class);
- MdoProInoutParaSQLBuilder outsb = new MdoProInoutParaSQLBuilder();
- MdoProInoutParaSQLBuilder.Criteria outsc = outsb.createCriteria();
- outsc.andPidEqualTo(pid);
- outsc.andFatheridEqualTo(comid);
- outsc.andTypeEqualTo(2);
- outsc.andFlagEqualTo(1);
- List<MdoProInoutPara> parList = outDao.selectByExample(outsb);
- List<D_MDO0052_PARAMS_RECODE> rows = new ArrayList<>();
- for (MdoProInoutPara p:parList) {
- D_MDO0052_PARAMS_RECODE row = new D_MDO0052_PARAMS_RECODE();
- row.setCode(p.getCode());
- row.setParamid(p.getId());
- row.setName(p.getName());
- row.setComtype(p.getComtype());
- row.setSteamflag(p.getSteamflag()==null?1:p.getSteamflag());
- row.setSteamtype(p.getSteamtype()==null?1:p.getSteamtype());
- if(2==type){//求解组件到优化组件 排除求解组件到求解组件已设置的数据
- if(p.getSteamtype()!=null&&p.getSteamtype().equals("3")){
- continue;
- }
- }else if(3==type){//求解组件到求解组件 排除求解组件到优化组件已设置的数据
- if(p.getSteamtype()!=null
- &&(p.getSteamtype().equals("1")||p.getSteamtype().equals("2")
- )){
- continue;
- }
- }
- rows.add(row);
- }
- this.getD_mdo0052().setParams(rows);
- }
-
- /**
- * 西工大系统,“流查询”业务前处理
- */
- public void preTransFlow() throws Exception {
- this.validater();
- }
-
- /**
- * 西工大系统,“流查询”业务后处理
- */
- public void afterTransFlow() throws Exception {
-
- }
-
- /**
- * 西工大系统,“流查询”逻辑入口处理方法
- */
- @SuppressWarnings("rawtypes")
- @Override
- public Map execute(Map vars) throws Exception {
- this.setTransMap(vars);
- preTransFlow();// 执行业务开始的规则检查和校验
- transExecute();// 执行核心业务段
- afterTransFlow();// 执行核心逻辑完成后的收尾逻辑
- return this.getTransMap();
- }
- }
|