123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- package com.miniframe.bisiness.mdo;
- import java.util.Date;
- 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.mdo.model.MDO0004BaseModel;
- import com.miniframe.generate.comm.mdo.D_MDO0001_ROWS_RECODE;
- import com.miniframe.generate.comm.mdo.D_MDO0004;
- import com.miniframe.model.mdo.MdoMod;
- import com.miniframe.model.mdo.MdoProject;
- import com.miniframe.model.mdo.dao.MdoModMapper;
- import com.miniframe.model.mdo.dao.MdoProjectMapper;
- import com.miniframe.tools.XIDateTimeUtils;
- import javax.rmi.CORBA.Util;
- /**
- * 西工大系统,“根据模板添加工程”逻辑处理(重新生成不覆盖)。
- */
- public class MDO0004Service extends MDO0004BaseModel implements ExecProcessFlow {
-
- private static final long serialVersionUID = -7051358269847459502L;
-
- /**
- * 西工大系统,“根据模板添加工程”业务核心处理
- */
- public void transExecute() throws Exception {
- String mid =this.getA_mdo0004().getMid();
- String name= this.getA_mdo0004().getName();
- String remark =this.getA_mdo0004().getRemark();
- String uid =this.getA_mdohead().getUserId();
- MdoModMapper modDao = UtilTools.getBean(MdoModMapper.class);
- MdoMod mod =modDao.selectByPrimaryKey(mid);
- if(mod ==null){
- throw new BusinessException("");
- }
- MdoProjectMapper proDao =UtilTools.getBean(MdoProjectMapper.class);
- MdoProject pro =new MdoProject();
- Date nowDate = XIDateTimeUtils.getNowDate();
- pro.setId(UtilTools.getUUid());
- pro.setName(name);
- pro.setRemark(remark);
- pro.setIsshare(mod.getIsshare());
- pro.setImage(mod.getImage());
- pro.setFlow(mod.getFlow());
- pro.setUid(uid);
- pro.setCreateTime(nowDate);
- pro.setUpdateTime(nowDate);
- pro.setStype(mod.getStype());
- proDao.insert(pro);
- D_MDO0004 row =new D_MDO0004();
- row.setCreatetime(XIDateTimeUtils.getStrFromDate(pro.getCreateTime()));
- row.setUpdatetime(XIDateTimeUtils.getStrFromDate(pro.getUpdateTime()));
- row.setName(pro.getName());
- row.setFlow(pro.getFlow());
- row.setPid(pro.getId());
- row.setImage(pro.getImage());
- row.setIsshare(pro.getIsshare().toString());
- row.setRemark(pro.getRemark());
- row.setStype(pro.getStype());
- this.setD_mdo0004(row);
-
- }
-
- /**
- * 西工大系统,“根据模板添加工程”业务前处理
- */
- 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();
- }
- }
|