利用低代码平台构建领域驱动设计(DDD)的解决方案

2024-08-30 02:04

本文主要是介绍利用低代码平台构建领域驱动设计(DDD)的解决方案,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

前言

随着企业数字化转型的需求日益增长,低代码平台作为一种快速开发和部署业务应用的方法,正在获得更多关注。领域驱动设计(DDD)是一种软件架构风格,旨在更好地满足复杂业务需求。结合这两者可以创建灵活且可维护的应用程序。

在本应用中,我们将利用低代码平台的灵活性和DDD的架构优势来构建一个可持续的解决方案。

本文将以一个最常见的实例来展开分析。

一,模型构建

模型构建,主要是根据数据库表,将结构化数据关系(1:1,1:N,N:N)对应完成ormaping映射。实例中采用使用了一个单表模型做演示。同时将在资源库这一层抽象出的接口信息,通过注解完成在DDD领域模型中的注册,使得持久层的操作可见可用。具体的操作办法如下:

(1)进入资源库管理:

资源库是领域模型仓储库的一个具体事项方式,主要管理数据库资源以及已经完成映射的,DAO类库以及其相应的接口操作库。

(2)添加库表资源

完成数据连接导入后可以动态获取库表及业务视图,完成库表导入后由资源库完成相应的代码构建工作。

(3)开始构建

代码构建主要是基于已经建立的持久化模型,根据模版管理库构建对应的代码结构。

添加图片注释,不超过 140 字(可选)

(4)查看构建结果(代码)

完成构建后就可以在线查看生成代码了。

添加图片注释,不超过 140 字(可选)

(5)编译代码

完成代码构建后,可以自动或手工完成相关的代码编译工作,编译完成后相应类库信息会同步到领域模型库中,方便领域模型根据模版构建相应的聚合应用体系。

添加图片注释,不超过 140 字(可选)

(6)代码示例

相关代码示例如下:

贫血模型接口(I**Class)

package com.ds.test.repository.leaveapplication.module;import com.ds.enums.db.*;
import com.ds.enums.*;
import com.ds.esd.tool.ui.enums.*;
import java.util.*;
import com.ds.common.database.dao.*;
import com.ds.esd.custom.module.annotation.*;
import com.ds.web.annotation.*;
import com.ds.esd.custom.action.module.*;
import com.ds.esd.custom.annotation.*;
import com.ds.esd.custom.bean.enums.*;
import com.ds.esb.config.*;
import com.ds.esb.config.formula.*;
import com.ds.common.*;
import com.ds.esd.custom.api.annotation.*;
import com.ds.esd.annotation.*;
import com.ds.esd.custom.enums.*;
import com.ds.esd.custom.api.enums.*;
import com.ds.esd.custom.titleblock.enums.*;
import com.ds.esd.custom.tree.enums.*;
import com.ds.esd.custom.form.enums.*;
import com.ds.esd.custom.nav.enums.*;
import com.ds.esd.custom.grid.enums.*;
import com.ds.esd.custom.gallery.enums.*;
import com.ds.test.repository.leaveapplication.module.*;
import com.ds.test.repository.leaveapplication.service.*;@DBTable(configKey="fdt",cname="请假审批单表",primaryKey="uuid",tableName="leaveapplication")@RepositoryAnnotation@Entitypublic interface ILeaveapplication  {@Uid@DBField(cnName="主键",length=36,dbFieldName="uuid")public String getUuid();public void setUuid(String  uuid);@CustomAnnotation(caption="学号")@DBField(cnName="学号",length=10,dbFieldName="studentid")public String getStudentid();public void setStudentid(String  studentid);@CustomAnnotation(caption="姓名")@DBField(cnName="姓名",length=50,dbFieldName="studentname")public String getStudentname();public void setStudentname(String  studentname);@CustomAnnotation(caption="专业/方向")@DBField(cnName="专业/方向",length=50,dbFieldName="major")public String getMajor();public void setMajor(String  major);@CustomAnnotation(caption="导师")@DBField(cnName="导师",length=50,dbFieldName="advisor")public String getAdvisor();public void setAdvisor(String  advisor);@CustomAnnotation(caption="请假日期")@ComboInputAnnotation(inputType=ComboInputType.date)@FieldAnnotation(componentType=ComponentType.ComboInput)@DBField(cnName="请假日期",length=0,dbType=ColType.DATE,dbFieldName="leavedate")public Date getLeavedate();public void setLeavedate(Date  leavedate);@CustomAnnotation(caption="请假时间")@ComboInputAnnotation(inputType=ComboInputType.time)@FieldAnnotation(componentType=ComponentType.ComboInput)@DBField(cnName="请假时间",length=0,dbType=ColType.TIME,dbFieldName="leavetime")public Date getLeavetime();public void setLeavetime(Date  leavetime);@CustomAnnotation(caption="请假课程")@DBField(cnName="请假课程",length=50,dbFieldName="coursename")public String getCoursename();public void setCoursename(String  coursename);@CustomAnnotation(caption="任课老师")@DBField(cnName="任课老师",length=50,dbFieldName="instructor")public String getInstructor();public void setInstructor(String  instructor);@CustomAnnotation(caption="请假事由")@FieldAnnotation(componentType=ComponentType.MultiLines,colSpan=-1,manualHeight=200)@DBField(cnName="请假事由",length=0,dbType=ColType.TEXT,dbFieldName="reason")public String getReason();public void setReason(String  reason);@CustomAnnotation(caption="审批状态")@DBField(cnName="审批状态",length=10,dbFieldName="approvalstatus")public String getApprovalstatus();public void setApprovalstatus(String  approvalstatus);@CustomAnnotation(caption="审批人")@DBField(cnName="审批人",length=50,dbFieldName="approvalperson")public String getApprovalperson();public void setApprovalperson(String  approvalperson);@CustomAnnotation(caption="审批单位")@DBField(cnName="审批单位",length=50,dbFieldName="approvalunit")public String getApprovalunit();public void setApprovalunit(String  approvalunit);@CustomAnnotation(caption="activityHist")@DBField(cnName="activityHist",dbFieldName="activityhistoryid")public String getActivityhistoryid();public void setActivityhistoryid(String  activityhistoryid);@CustomAnnotation(caption="activityInst")@DBField(cnName="activityInst",dbFieldName="activityinstid")public String getActivityinstid();public void setActivityinstid(String  activityinstid);@CustomAnnotation(caption="userId")@DBField(cnName="userId",dbFieldName="userid")public String getUserid();public void setUserid(String  userid);@CustomAnnotation(caption="processInstI")@DBField(cnName="processInstI",dbFieldName="processinstid")public String getProcessinstid();public void setProcessinstid(String  processinstid);}

数据映射(实体Bean)

 
package com.ds.test.repository.leaveapplication.module;import com.ds.enums.db.*;
import com.ds.enums.*;
import com.ds.esd.tool.ui.enums.*;
import java.util.*;
import com.ds.common.database.dao.*;
import com.ds.esd.custom.module.annotation.*;
import com.ds.web.annotation.*;
import com.ds.esd.custom.action.module.*;
import com.ds.esd.custom.annotation.*;
import com.ds.esd.custom.bean.enums.*;
import com.ds.esb.config.*;
import com.ds.esb.config.formula.*;
import com.ds.common.*;
import com.ds.esd.custom.api.annotation.*;
import com.ds.esd.annotation.*;
import com.ds.esd.custom.enums.*;
import com.ds.esd.custom.api.enums.*;
import com.ds.esd.custom.titleblock.enums.*;
import com.ds.esd.custom.tree.enums.*;
import com.ds.esd.custom.form.enums.*;
import com.ds.esd.custom.nav.enums.*;
import com.ds.esd.custom.grid.enums.*;
import com.ds.esd.custom.gallery.enums.*;
import com.ds.test.repository.leaveapplication.module.*;
import com.ds.test.repository.leaveapplication.service.*;@DBTable(configKey="fdt",cname="请假审批单表",primaryKey="uuid",tableName="leaveapplication")@RepositoryAnnotation@Entity
public class Leaveapplication  {@Uid@DBField(cnName="主键",length=36,dbFieldName="uuid")public String uuid;		@CustomAnnotation(caption="学号")@DBField(cnName="学号",length=10,dbFieldName="studentid")public String studentid;@CustomAnnotation(caption="姓名")@DBField(cnName="姓名",length=50,dbFieldName="studentname")public String studentname;@CustomAnnotation(caption="专业/方向")@DBField(cnName="专业/方向",length=50,dbFieldName="major")public String major;@CustomAnnotation(caption="导师")@DBField(cnName="导师",length=50,dbFieldName="advisor")public String advisor;@CustomAnnotation(caption="请假日期")@ComboInputAnnotation(inputType=ComboInputType.date)@FieldAnnotation(componentType=ComponentType.ComboInput)@DBField(cnName="请假日期",length=0,dbType=ColType.DATE,dbFieldName="leavedate")public Date leavedate;@CustomAnnotation(caption="请假时间")@ComboInputAnnotation(inputType=ComboInputType.time)@FieldAnnotation(componentType=ComponentType.ComboInput)@DBField(cnName="请假时间",length=0,dbType=ColType.TIME,dbFieldName="leavetime")public Date leavetime;@CustomAnnotation(caption="请假课程")@DBField(cnName="请假课程",length=50,dbFieldName="coursename")public String coursename;@CustomAnnotation(caption="任课老师")@DBField(cnName="任课老师",length=50,dbFieldName="instructor")public String instructor;@CustomAnnotation(caption="请假事由")@FieldAnnotation(componentType=ComponentType.MultiLines,colSpan=-1,manualHeight=200)@DBField(cnName="请假事由",length=0,dbType=ColType.TEXT,dbFieldName="reason")public String reason;@CustomAnnotation(caption="审批状态")@DBField(cnName="审批状态",length=10,dbFieldName="approvalstatus")public String approvalstatus;@CustomAnnotation(caption="审批人")@DBField(cnName="审批人",length=50,dbFieldName="approvalperson")public String approvalperson;@CustomAnnotation(caption="审批单位")@DBField(cnName="审批单位",length=50,dbFieldName="approvalunit")public String approvalunit;@CustomAnnotation(caption="activityHist")@DBField(cnName="activityHist",dbFieldName="activityhistoryid")public String activityhistoryid;@CustomAnnotation(caption="activityInst")@DBField(cnName="activityInst",dbFieldName="activityinstid")public String activityinstid;@CustomAnnotation(caption="userId")@DBField(cnName="userId",dbFieldName="userid")public String userid;@CustomAnnotation(caption="processInstI")@DBField(cnName="processInstI",dbFieldName="processinstid")public String processinstid;public String getUuid(){return uuid; }public void setUuid(String  uuid){this.uuid = uuid;}public String getStudentid(){return studentid; }public void setStudentid(String  studentid){this.studentid = studentid;}public String getStudentname(){return studentname; }public void setStudentname(String  studentname){this.studentname = studentname;}public String getMajor(){return major; }public void setMajor(String  major){this.major = major;}public String getAdvisor(){return advisor; }public void setAdvisor(String  advisor){this.advisor = advisor;}public Date getLeavedate(){return leavedate; }public void setLeavedate(Date  leavedate){this.leavedate = leavedate;}public Date getLeavetime(){return leavetime; }public void setLeavetime(Date  leavetime){this.leavetime = leavetime;}public String getCoursename(){return coursename; }public void setCoursename(String  coursename){this.coursename = coursename;}public String getInstructor(){return instructor; }public void setInstructor(String  instructor){this.instructor = instructor;}public String getReason(){return reason; }public void setReason(String  reason){this.reason = reason;}public String getApprovalstatus(){return approvalstatus; }public void setApprovalstatus(String  approvalstatus){this.approvalstatus = approvalstatus;}public String getApprovalperson(){return approvalperson; }public void setApprovalperson(String  approvalperson){this.approvalperson = approvalperson;}public String getApprovalunit(){return approvalunit; }public void setApprovalunit(String  approvalunit){this.approvalunit = approvalunit;}public String getActivityhistoryid(){return activityhistoryid; }public void setActivityhistoryid(String  activityhistoryid){this.activityhistoryid = activityhistoryid;}public String getActivityinstid(){return activityinstid; }public void setActivityinstid(String  activityinstid){this.activityinstid = activityinstid;}public String getUserid(){return userid; }public void setUserid(String  userid){this.userid = userid;}public String getProcessinstid(){return processinstid; }public void setProcessinstid(String  processinstid){this.processinstid = processinstid;}}

数据接口(定义)

 
package com.ds.test.repository.leaveapplication.service;import com.ds.enums.db.*;
import com.ds.enums.*;
import com.ds.esd.tool.ui.enums.*;
import java.util.*;
import com.ds.common.database.dao.*;
import com.ds.esd.custom.module.annotation.*;
import com.ds.web.annotation.*;
import com.ds.esd.custom.action.module.*;
import com.ds.esd.custom.annotation.*;
import com.ds.esd.custom.bean.enums.*;
import com.ds.esb.config.*;
import com.ds.esb.config.formula.*;
import com.ds.common.*;
import com.ds.esd.custom.api.annotation.*;
import com.ds.esd.annotation.*;
import com.ds.esd.custom.enums.*;
import com.ds.esd.custom.api.enums.*;
import com.ds.esd.custom.titleblock.enums.*;
import com.ds.esd.custom.tree.enums.*;
import com.ds.esd.custom.form.enums.*;
import com.ds.esd.custom.nav.enums.*;
import com.ds.esd.custom.grid.enums.*;
import com.ds.esd.custom.gallery.enums.*;
import com.ds.test.repository.leaveapplication.module.*;
import com.ds.test.repository.leaveapplication.service.*;
@Aggregation(type = AggregationType.aggregationEntity,entityClass=Leaveapplication.class,rootClass= LeaveapplicationService.class)
public interface LeaveapplicationService{@ModuleAnnotation(moduleViewType = ModuleViewType.GridConfig)@APIEventAnnotation(bindMenu = {CustomMenuItem.reload}, autoRun = true, customRequestData = RequestPathEnum.ctx)public List<Leaveapplication> findAll()throws JDSException;public List<Leaveapplication> findByWhere(String where)throws JDSException;@APIEventAnnotation(bindMenu = {CustomMenuItem.search})public List<Leaveapplication> find(Leaveapplication  leaveapplication)throws JDSException;@ModuleAnnotation(moduleViewType = ModuleViewType.FormConfig)@APIEventAnnotation(bindFormEvent = CustomFormEvent.formLoad,bindGridEvent = {CustomGridEvent.editor},  autoRun = true,customRequestData = RequestPathEnum.ctx, customResponseData = ResponsePathEnum.form)public Leaveapplication getLeaveapplicationInfo(String uuid) throws JDSException;@APIEventAnnotation(bindMenu = {CustomMenuItem.save}, callback = {CustomCallBack.ReloadParent, CustomCallBack.Close})public Leaveapplication update( Leaveapplication  leaveapplication) throws JDSException ;@APIEventAnnotation(bindMenu = {CustomMenuItem.delete}, callback = CustomCallBack.Reload)public Boolean delete(String uuid) throws JDSException ;}

数据接口(实现)

 
package com.ds.test.repository.leaveapplication.service;import com.ds.enums.db.*;
import com.ds.enums.*;
import com.ds.esd.tool.ui.enums.*;
import java.util.*;
import com.ds.common.database.dao.*;
import com.ds.esd.custom.module.annotation.*;
import com.ds.web.annotation.*;
import com.ds.esd.custom.action.module.*;
import com.ds.esd.custom.annotation.*;
import com.ds.esd.custom.bean.enums.*;
import com.ds.esb.config.*;
import com.ds.esb.config.formula.*;
import com.ds.common.*;
import com.ds.esd.custom.api.annotation.*;
import com.ds.esd.annotation.*;
import com.ds.esd.custom.enums.*;
import com.ds.esd.custom.api.enums.*;
import com.ds.esd.custom.titleblock.enums.*;
import com.ds.esd.custom.tree.enums.*;
import com.ds.esd.custom.form.enums.*;
import com.ds.esd.custom.nav.enums.*;
import com.ds.esd.custom.grid.enums.*;
import com.ds.esd.custom.gallery.enums.*;
import com.ds.test.repository.leaveapplication.module.*;
import com.ds.test.repository.leaveapplication.service.*;@EsbBeanAnnotation
public class LeaveapplicationServiceImpl  implements LeaveapplicationService{public List<Leaveapplication> findAll()throws JDSException{List<Leaveapplication> leaveapplicationList = new ArrayList<>();DAO dao = null;try {DAOFactory factory = new DAOFactory(Leaveapplication.class);dao = factory.getDAO();leaveapplicationList = dao.findAll();} catch (Exception e) {e.printStackTrace();throw new JDSException(e);} finally {if (dao != null) {dao.close();}}return leaveapplicationList;}public List<Leaveapplication> findByWhere(String where)throws JDSException{List<Leaveapplication> leaveapplicationList = new ArrayList<>();DAO dao =null;try {DAOFactory factory = new DAOFactory(Leaveapplication.class);dao = factory.getDAO();leaveapplicationList = dao.find(where);} catch (Exception e) {e.printStackTrace();throw new JDSException(e);} finally {if (dao != null) {dao.close();}}return leaveapplicationList;}public List<Leaveapplication> find(Leaveapplication  leaveapplication)throws JDSException{List<Leaveapplication> leaveapplicationList = new ArrayList<>();DAO dao = null;try {DAOFactory factory = new DAOFactory(Leaveapplication.class);dao = factory.getDAO();leaveapplicationList = dao.find(leaveapplication);} catch (Exception e) {e.printStackTrace();throw new JDSException(e);} finally {if (dao != null) {dao.close();}}return leaveapplicationList;}public Leaveapplication getLeaveapplicationInfo(String uuid) throws JDSException {Leaveapplication leaveapplication = null;DAO<Leaveapplication> dao =null;try {DAOFactory factory = new DAOFactory(Leaveapplication.class);dao = factory.getDAO();if (uuid==null||uuid.equals("")){leaveapplication=  dao.createBean();}else{leaveapplication=  dao.findByPrimaryKey(uuid);}} catch (Exception e) {e.printStackTrace();throw new JDSException(e);} finally {if (dao != null) {dao.close();}}return   leaveapplication;}public Leaveapplication update( Leaveapplication  leaveapplication) throws JDSException {DAO<Leaveapplication> dao = null;try {DAOFactory factory = new DAOFactory(Leaveapplication.class);dao = factory.getDAO();dao.update(leaveapplication);} catch (Exception e) {e.printStackTrace();throw new JDSException(e);} finally {if (dao != null) {dao.close();}}return leaveapplication;}public Boolean delete(String uuid) throws JDSException {DAO<Leaveapplication> dao =null;try {DAOFactory factory = new DAOFactory(Leaveapplication.class);dao = factory.getDAO();if (uuid.indexOf(";") > -1) {for (String uid : uuid.split(";")) {dao.delete(uid);}} else {dao.delete(uuid);}} catch (Exception e) {e.printStackTrace();throw new JDSException(e);} finally {if (dao != null) {dao.close();}}return true;}}

二,应用聚合

聚合应用是领域模型建模中最为重要的一个环节,这个环节的重点是将,资源库相应的操作接口转换为领域模型应用,通过web聚合器输出位web 引用发布,同时将实体操作转换为领域事件供DDD内部完成调度处理。而聚合应用则是将视图与模型有机结合实现聚合实体以及聚合根应用。同时抽取相应的数据字典以及应用域作为上层的支撑。

(1)导入资源库接口转换为通用聚合实体

(2)查看调整聚合实体配置

(3)查看调整聚合实体代码结构

(4)聚合实体配置

(5)领域事件

(6)实现代码

package com.ds.test.domain.leaveapplication.api;import com.ds.esd.custom.module.annotation.*;
import org.springframework.web.bind.annotation.*;
import com.ds.esd.custom.api.annotation.*;
import com.ds.esd.custom.annotation.*;
import com.ds.test.repository.leaveapplication.service.*;
import com.ds.test.repository.leaveapplication.module.*;
import com.ds.esb.config.*;
import com.ds.esb.config.formula.*;
import java.util.*;
import com.ds.web.util.*;
import com.ds.jds.core.esb.*;
import com.ds.config.*;
import com.ds.esd.custom.enums.*;
import com.ds.esd.custom.api.enums.*;
import com.ds.esd.tool.ui.enums.*;
import com.ds.web.annotation.*;
import com.ds.enums.*;
import com.ds.esd.annotation.*;
import com.ds.esd.custom.bean.enums.*;
import com.ds.enums.db.*;
import org.springframework.stereotype.*;
import org.springframework.core.annotation.*;
import com.ds.esd.custom.action.module.*;
import com.ds.esd.custom.titleblock.enums.*;
import com.ds.esd.custom.tree.enums.*;
import com.ds.esd.custom.form.enums.*;
import com.ds.esd.custom.nav.enums.*;
import com.ds.esd.custom.grid.enums.*;
import com.ds.esd.custom.gallery.enums.*;
import com.ds.esd.custom.annotation.toolbar.*;
import com.ds.test.domain.leaveapplication.*;
import com.ds.test.domain.leaveapplication.api.*;
import test.leaveapplication.*;@Aggregation(rootClass=LeaveapplicationService.class,entityClass=Leaveapplication.class,type=AggregationType.aggregationEntity)@RequestMapping(value="/test/leaveapplication")@Controller
public interface LeaveapplicationServiceAPI  {@APIEventAnnotation(bindMenu=CustomMenuItem.reload,customRequestData=RequestPathEnum.ctx,autoRun=true)@ModuleAnnotation(moduleViewType=ModuleViewType.GridConfig)@GridViewAnnotation@CustomAnnotation@RequestMapping(value="FindAll")@ResponseBodypublic   ListResultModel<List<FindAll>>  findAll ();@APIEventAnnotation(bindFormEvent=CustomFormEvent.formLoad,customRequestData=RequestPathEnum.ctx,autoRun=true,bindGridEvent=CustomGridEvent.editor,customResponseData=ResponsePathEnum.form)@ModuleAnnotation(moduleViewType=ModuleViewType.FormConfig)@FormViewAnnotation@RequestMapping(value="LeaveapplicationInfo")@ResponseBodypublic   ResultModel<LeaveapplicationInfo>  getLeaveapplicationInfo (String uuid);@APIEventAnnotation(bindMenu=CustomMenuItem.save,callback={CustomCallBack.ReloadParent,CustomCallBack.Close})public   ResultModel<Leaveapplication>  update (@RequestBody Leaveapplication leaveapplication);@APIEventAnnotation(bindMenu=CustomMenuItem.search)public   ListResultModel<List<Leaveapplication>>  find (Leaveapplication leaveapplication);@APIEventAnnotation(bindMenu=CustomMenuItem.delete,callback=CustomCallBack.Reload)@RequestMapping(value="delete")@ResponseBodypublic   ResultModel<Boolean>  delete (String uuid);@RequestMapping(value="findByWhere")@ResponseBodypublic   ListResultModel<List<Leaveapplication>>  findByWhere (String where);}
 

三,视图修饰

(1)视图结构

视图域是在完成初步聚合实体建模后,根据具体的模型来构建视图体系,这些体系中根据实体的结构来构建视图的结构,最终通过,代码的方式展现处理。

视图模版种类:

视图模版具体化后工程结构:

(2)视图配置

(3)视图修饰

为列表增加菜单

为列表增加分页栏

为表单字段子域配置

配置 模块编译输出

(4)列表视图源码

package test.leaveapplication;import com.ds.config.*;
import java.util.*;
import com.ds.esd.custom.grid.annotation.*;
import com.ds.enums.*;
import com.ds.web.annotation.*;
import com.ds.esd.custom.grid.enums.*;
import com.ds.esd.tool.ui.enums.*;
import com.ds.enums.db.*;
import org.springframework.stereotype.*;
import org.springframework.core.annotation.*;
import com.ds.esd.custom.module.annotation.*;
import com.ds.esd.custom.action.module.*;
import com.ds.esd.custom.annotation.*;
import com.ds.esd.custom.bean.enums.*;
import com.ds.esd.custom.annotation.toolbar.*;
import org.springframework.web.bind.annotation.*;@PageBar@GridRowCmd@MenuBarMenu(domainId="test")@RowHead@GridAnnotation(uidColumn="uuid",customMenu={GridMenu.Delete,GridMenu.Reload,GridMenu.Add})public interface FindAll {@CustomAnnotation(caption="请假事由")@GridColItemAnnotation(width="8.0em")public String getReason();public void setReason(String   reason);@CustomAnnotation(caption="专业/方向")@GridColItemAnnotation(width="8.0em")public String getMajor();public void setMajor(String   major);@CustomAnnotation(caption="userId")@GridColItemAnnotation(width="8.0em")public String getUserid();public void setUserid(String   userid);@CustomAnnotation(caption="学号")@GridColItemAnnotation(width="8.0em")public String getStudentid();public void setStudentid(String   studentid);@CustomAnnotation(caption="姓名")@GridColItemAnnotation(width="8.0em")public String getStudentname();public void setStudentname(String   studentname);@CustomAnnotation(caption="请假日期")@GridColItemAnnotation(width="8.0em",inputType=ComboInputType.date)public Date getLeavedate();public void setLeavedate(Date   leavedate);@CustomAnnotation(caption="任课老师")@GridColItemAnnotation(width="8.0em")public String getInstructor();public void setInstructor(String   instructor);@CustomAnnotation(caption="请假时间")@GridColItemAnnotation(width="8.0em",inputType=ComboInputType.time)public Date getLeavetime();public void setLeavetime(Date   leavetime);@CustomAnnotation(caption="请假课程")@GridColItemAnnotation(width="8.0em")public String getCoursename();public void setCoursename(String   coursename);@CustomAnnotation(caption="processInstI")@GridColItemAnnotation(width="8.0em")public String getProcessinstid();public void setProcessinstid(String   processinstid);@CustomAnnotation(caption="导师")@GridColItemAnnotation(width="8.0em")public String getAdvisor();public void setAdvisor(String   advisor);@CustomAnnotation(caption="审批单位")@GridColItemAnnotation(width="8.0em")public String getApprovalunit();public void setApprovalunit(String   approvalunit);@CustomAnnotation(caption="审批状态")@GridColItemAnnotation(width="8.0em")public String getApprovalstatus();public void setApprovalstatus(String   approvalstatus);@CustomAnnotation(caption="审批人")@GridColItemAnnotation(width="8.0em")public String getApprovalperson();public void setApprovalperson(String   approvalperson);@CustomAnnotation(caption="activityInst")@GridColItemAnnotation(width="8.0em")public String getActivityinstid();public void setActivityinstid(String   activityinstid);@CustomAnnotation(caption="activityHist")@GridColItemAnnotation(width="8.0em")public String getActivityhistoryid();public void setActivityhistoryid(String   activityhistoryid);@CustomAnnotation(uid=true,hidden=true,index=1)@GridColItemAnnotation(width="8.0em")public String getUuid();public void setUuid(String   uuid);@CustomAnnotation(index=17)@GridColItemAnnotation(width="8.0em",flexSize=true)public String getFormTitle();public void setFormTitle(String   formTitle);}

(5)表单视图源码

package test.leaveapplication;import com.ds.config.*;
import java.util.*;
import com.ds.esd.custom.grid.annotation.*;
import com.ds.enums.*;
import com.ds.web.annotation.*;
import com.ds.esd.custom.grid.enums.*;
import com.ds.esd.tool.ui.enums.*;
import com.ds.enums.db.*;
import org.springframework.stereotype.*;
import org.springframework.core.annotation.*;
import com.ds.esd.custom.module.annotation.*;
import com.ds.esd.custom.action.module.*;
import com.ds.esd.custom.annotation.*;
import com.ds.esd.custom.bean.enums.*;
import com.ds.esd.custom.annotation.toolbar.*;
import org.springframework.web.bind.annotation.*;
import com.ds.esd.custom.form.action.*;
import com.ds.esd.custom.form.*;
import com.ds.esd.custom.form.annotation.*;
import com.ds.esd.tool.ui.component.form.formlayout.*;
import com.ds.esd.custom.toolbar.*;
import com.ds.esd.custom.form.enums.*;
import com.ds.esd.dsm.view.field.*;
import com.alibaba.fastjson.annotation.*;
import com.alibaba.fastjson.serializer.*;
import com.alibaba.fastjson.parser.*;
import com.ds.common.util.*;
import com.ds.esd.tool.ui.component.*;
import com.ds.esd.editor.extmenu.*;
import com.ds.esd.custom.bean.*;
import com.ds.esb.config.formula.*;
import com.ds.esd.tool.ui.module.*;
import com.ds.esd.custom.*;
import com.ds.esd.tool.ui.component.navigation.*;
import com.ds.esd.tool.ui.component.form.*;
import com.ds.web.*;
import com.ds.esd.custom.enums.*;
import com.ds.esd.dsm.aggregation.*;
import com.ds.esd.custom.field.*;
import com.ds.esd.custom.field.combo.*;@FormAnnotationpublic interface LeaveapplicationInfo  {@FieldAnnotation(componentType=ComponentType.Label,colSpan=-1,manualHeight=60)@CustomAnnotation(index=30,caption="LeaveapplicationInfo")@LabelAnnotation(hAlign=HAlignType.center,fontSize="3em")public String getFormTitle();public void setFormTitle(String   formTitle);@FieldAnnotation(componentType=ComponentType.ComboInput,colSpan=-1)@CustomAnnotation(index=1,caption="请假事由")public String getReason();public void setReason(String   reason);@CustomAnnotation(index=2,caption="专业/方向")@InputAnnotationpublic String getMajor();public void setMajor(String   major);@FieldAnnotation(componentType=ComponentType.ComboInput)@CustomAnnotation(index=3,caption="请假时间")@ComboDateAnnotationpublic Date getLeavetime();public void setLeavetime(Date   leavetime);@CustomAnnotation(index=4,caption="导师")@InputAnnotationpublic String getAdvisor();public void setAdvisor(String   advisor);@FieldAnnotation(componentType=ComponentType.ComboInput)@CustomAnnotation(index=5,caption="请假日期")@ComboDateAnnotationpublic Date getLeavedate();public void setLeavedate(Date   leavedate);@FieldAnnotation(componentType=ComponentType.HiddenInput)@CustomAnnotation(index=6,caption="processInstI")@InputAnnotationpublic String getProcessinstid();public void setProcessinstid(String   processinstid);@CustomAnnotation(index=7,caption="学号")@InputAnnotationpublic String getStudentid();public void setStudentid(String   studentid);@CustomAnnotation(index=8,caption="姓名")@InputAnnotationpublic String getStudentname();public void setStudentname(String   studentname);@CustomAnnotation(index=9,caption="审批单位")@InputAnnotationpublic String getApprovalunit();public void setApprovalunit(String   approvalunit);@CustomAnnotation(index=10,caption="请假课程")@InputAnnotationpublic String getCoursename();public void setCoursename(String   coursename);@CustomAnnotation(index=11,caption="任课老师")@InputAnnotationpublic String getInstructor();public void setInstructor(String   instructor);@FieldAnnotation(componentType=ComponentType.HiddenInput)@CustomAnnotation(index=12,caption="userId")@InputAnnotationpublic String getUserid();public void setUserid(String   userid);@FieldAnnotation(componentType=ComponentType.HiddenInput)@CustomAnnotation(index=13,caption="activityHist")@InputAnnotationpublic String getActivityhistoryid();public void setActivityhistoryid(String   activityhistoryid);@CustomAnnotation(index=14,caption="审批状态")@InputAnnotationpublic String getApprovalstatus();public void setApprovalstatus(String   approvalstatus);@CustomAnnotation(index=15,caption="审批人")@InputAnnotationpublic String getApprovalperson();public void setApprovalperson(String   approvalperson);@FieldAnnotation(componentType=ComponentType.HiddenInput)@CustomAnnotation(index=16,caption="activityInst")@InputAnnotationpublic String getActivityinstid();public void setActivityinstid(String   activityinstid);@FieldAnnotation(componentType=ComponentType.HiddenInput)@CustomAnnotation(uid=true,hidden=true,index=17)public String getUuid();public void setUuid(String   uuid);}

四,路由关联

(1)事件绑定

(2)路由关联

这篇关于利用低代码平台构建领域驱动设计(DDD)的解决方案的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1119492

相关文章

C#使用SQLite进行大数据量高效处理的代码示例

《C#使用SQLite进行大数据量高效处理的代码示例》在软件开发中,高效处理大数据量是一个常见且具有挑战性的任务,SQLite因其零配置、嵌入式、跨平台的特性,成为许多开发者的首选数据库,本文将深入探... 目录前言准备工作数据实体核心技术批量插入:从乌龟到猎豹的蜕变分页查询:加载百万数据异步处理:拒绝界面

用js控制视频播放进度基本示例代码

《用js控制视频播放进度基本示例代码》写前端的时候,很多的时候是需要支持要网页视频播放的功能,下面这篇文章主要给大家介绍了关于用js控制视频播放进度的相关资料,文中通过代码介绍的非常详细,需要的朋友可... 目录前言html部分:JavaScript部分:注意:总结前言在javascript中控制视频播放

Linux samba共享慢的原因及解决方案

《Linuxsamba共享慢的原因及解决方案》:本文主要介绍Linuxsamba共享慢的原因及解决方案,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录linux samba共享慢原因及解决问题表现原因解决办法总结Linandroidux samba共享慢原因及解决

Spring Boot 3.4.3 基于 Spring WebFlux 实现 SSE 功能(代码示例)

《SpringBoot3.4.3基于SpringWebFlux实现SSE功能(代码示例)》SpringBoot3.4.3结合SpringWebFlux实现SSE功能,为实时数据推送提供... 目录1. SSE 简介1.1 什么是 SSE?1.2 SSE 的优点1.3 适用场景2. Spring WebFlu

java之Objects.nonNull用法代码解读

《java之Objects.nonNull用法代码解读》:本文主要介绍java之Objects.nonNull用法代码,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐... 目录Java之Objects.nonwww.chinasem.cnNull用法代码Objects.nonN

SpringBoot实现MD5加盐算法的示例代码

《SpringBoot实现MD5加盐算法的示例代码》加盐算法是一种用于增强密码安全性的技术,本文主要介绍了SpringBoot实现MD5加盐算法的示例代码,文中通过示例代码介绍的非常详细,对大家的学习... 目录一、什么是加盐算法二、如何实现加盐算法2.1 加盐算法代码实现2.2 注册页面中进行密码加盐2.

一文详解如何从零构建Spring Boot Starter并实现整合

《一文详解如何从零构建SpringBootStarter并实现整合》SpringBoot是一个开源的Java基础框架,用于创建独立、生产级的基于Spring框架的应用程序,:本文主要介绍如何从... 目录一、Spring Boot Starter的核心价值二、Starter项目创建全流程2.1 项目初始化(

python+opencv处理颜色之将目标颜色转换实例代码

《python+opencv处理颜色之将目标颜色转换实例代码》OpenCV是一个的跨平台计算机视觉库,可以运行在Linux、Windows和MacOS操作系统上,:本文主要介绍python+ope... 目录下面是代码+ 效果 + 解释转HSV: 关于颜色总是要转HSV的掩膜再标注总结 目标:将红色的部分滤

使用Java实现通用树形结构构建工具类

《使用Java实现通用树形结构构建工具类》这篇文章主要为大家详细介绍了如何使用Java实现通用树形结构构建工具类,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 目录完整代码一、设计思想与核心功能二、核心实现原理1. 数据结构准备阶段2. 循环依赖检测算法3. 树形结构构建4. 搜索子

找不到Anaconda prompt终端的原因分析及解决方案

《找不到Anacondaprompt终端的原因分析及解决方案》因为anaconda还没有初始化,在安装anaconda的过程中,有一行是否要添加anaconda到菜单目录中,由于没有勾选,导致没有菜... 目录问题原因问http://www.chinasem.cn题解决安装了 Anaconda 却找不到 An