package com.miniframe.bisiness.system; import java.util.Map; import com.miniframe.core.ExecProcessFlow; import com.miniframe.core.exception.BusinessException; import com.miniframe.core.ext.UtilTools; import com.miniframe.generate.business.system.model.D000012BaseModel; import com.miniframe.model.system.DSourceVal; import com.miniframe.model.system.dao.DSourceValMapper; /** * 基础系统,“灾情点源检测数据修改”逻辑处理(重新生成不覆盖)。 */ public class D000012Service extends D000012BaseModel implements ExecProcessFlow { private static final long serialVersionUID = -7051358269847459502L; /** * 基础系统,“灾情点源检测数据修改”业务核心处理 */ public void transExecute() throws Exception { Double val1 =this.getA_d000012().getVal1(); Double val2 =this.getA_d000012().getVal2(); Double val3 =this.getA_d000012().getVal3(); Double val4 =this.getA_d000012().getVal4(); Integer svid =this.getA_d000012().getSvid(); DSourceValMapper dsvm= UtilTools.getBean(DSourceValMapper.class); DSourceVal dsv = dsvm.selectByPrimaryKey(svid); if(dsv==null){ throw new BusinessException("EB3000006");//检测数据不存在 } dsv.setTimeline(this.getA_d000012().getTimeline()); dsv.setVal1(val1.floatValue()); dsv.setVal2(val2.floatValue()); dsv.setVal3(val3.floatValue()); dsv.setVal4(val4.floatValue()); dsvm.updateByPrimaryKey(dsv); } /** * 基础系统,“灾情点源检测数据修改”业务前处理 */ 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(); } }