package com.miniframe.bisiness.system; 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.system.model.D10028BaseModel; import com.miniframe.generate.comm.system.D_D10028_ROWS_RECODE; import com.miniframe.model.system.DThreshold; import com.miniframe.model.system.DThresholdSQLBuilder; import com.miniframe.model.system.dao.DThresholdMapper; /** * 基础系统,“报警设置查询”逻辑处理(重新生成不覆盖)。 */ public class D10028Service extends D10028BaseModel implements ExecProcessFlow { private static final long serialVersionUID = -7051358269847459502L; /** * 基础系统,“报警设置查询”业务核心处理 */ public void transExecute() throws Exception { String stype =this.getA_d10028().getStype(); DThresholdMapper dTMapper = UtilTools.getBean(DThresholdMapper.class); DThresholdSQLBuilder sb = new DThresholdSQLBuilder(); DThresholdSQLBuilder.Criteria sc = sb.createCriteria(); sc.andStypeEqualTo(stype); sb.setOrderByClause("id ASC"); List dtList =dTMapper.selectByExample(sb); List rows =new ArrayList<>(); for (DThreshold dt :dtList ) { D_D10028_ROWS_RECODE row =new D_D10028_ROWS_RECODE(); row.setId(dt.getId()); row.setGrade(dt.getGrade()); row.setCo2(dt.getCo2()); row.setHeight(dt.getHeight()); row.setSo2(dt.getSo2()); row.setStype(dt.getStype()); row.setCh4(dt.getCh4()); row.setTemperature(dt.getTemperature()); rows.add(row); } this.getD_d10028().setRows(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(); } }