123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- 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.D10017BaseModel;
- import com.miniframe.generate.comm.system.D_D10017;
- import com.miniframe.model.system.DAccident;
- import com.miniframe.model.system.DJob;
- import com.miniframe.model.system.dao.DAccidentMapper;
- import com.miniframe.model.system.dao.DJobMapper;
- import tk.mybatis.mapper.util.StringUtil;
- /**
- * 基础系统,“求解任务信息”逻辑处理(重新生成不覆盖)。
- */
- public class D10017Service extends D10017BaseModel implements ExecProcessFlow {
-
- private static final long serialVersionUID = -7051358269847459502L;
-
- /**
- * 基础系统,“求解任务信息”业务核心处理
- */
- public void transExecute() throws Exception {
- Integer aid = this.getA_d10017().getAid();
- DAccidentMapper accidentMapper =UtilTools.getBean(DAccidentMapper.class);
- DAccident accident = accidentMapper.selectByPrimaryKey(aid);
- if(accident ==null ){
- throw new BusinessException("EB3000002");
- }
- if(accident.getJid()==null||accident.getJid()<=0){
- throw new BusinessException("EB3100012");
- }
- DJobMapper jobMapper = UtilTools.getBean(DJobMapper.class);
- DJob jb = jobMapper.selectByPrimaryKey(accident.getJid());
- D_D10017 rb =this.getD_d10017();
- rb.setJid(jb.getId());
- rb.setAid(jb.getAid());
- rb.setStarttime(jb.getStarttime());
- rb.setEndtime(jb.getEndtime());
- rb.setState(jb.getState());
- rb.setFaildes(jb.getFaildes());
- rb.setDt(jb.getDt());
- rb.setDx(jb.getDx());
- rb.setReportstep(jb.getReportstep());
- rb.setInteractionstep(jb.getInteractionstep());
- rb.setAcctime(jb.getAcctime());
- rb.setTotaltime(jb.getTotaltime());
- rb.setCoids(jb.getCoids());
- rb.setCocodes(jb.getCocodes());
- }
-
- /**
- * 基础系统,“求解任务信息”业务前处理
- */
- 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();
- }
- }
|