diff --git a/common/common-botp/pom.xml b/common/common-botp/pom.xml
new file mode 100644
index 0000000..1fc7b12
--- /dev/null
+++ b/common/common-botp/pom.xml
@@ -0,0 +1,71 @@
+
+
+
+ common
+ apelet
+ 1.0.0
+
+ 4.0.0
+
+ common-botp
+ jar
+ 1.0.0
+
+
+
+ apelet
+ common-core
+ 1.0.0
+
+
+ apelet
+ common-generator
+ 1.0.3
+
+
+ apelet
+ common-online
+ 1.0.3
+ compile
+
+
+ apelet
+ common-dbutil
+ 1.0.0
+ compile
+
+
+ io.swagger.core.v3
+ swagger-annotations
+ 2.2.19
+ compile
+
+
+ apelet
+ common-orm
+ 1.0.2
+ compile
+
+
+ apelet
+ common-sequence
+ 1.0.0
+ compile
+
+
+ org.jodd
+ jodd-core
+ 5.1.6
+ compile
+
+
+ org.jetbrains
+ annotations
+ 24.0.1
+ compile
+
+
+
+
diff --git a/common/common-botp/src/main/java/apelet/common/botp/controller/BillBaseController.java b/common/common-botp/src/main/java/apelet/common/botp/controller/BillBaseController.java
new file mode 100644
index 0000000..6f127f9
--- /dev/null
+++ b/common/common-botp/src/main/java/apelet/common/botp/controller/BillBaseController.java
@@ -0,0 +1,123 @@
+package apelet.common.botp.controller;
+
+import apelet.common.botp.service.IBillBaseService;
+import apelet.common.core.annotation.MyRequestBody;
+import apelet.common.core.base.controller.BaseController;
+import apelet.common.core.object.*;
+import apelet.common.core.util.MyPageUtil;
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.github.pagehelper.Page;
+import org.apache.commons.lang3.ObjectUtils;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Soon
+ * @version 1.0
+ * Create by 2024/2/28 8:29
+ */
+public abstract class BillBaseController extends BaseController {
+
+
+
+ protected abstract IBillBaseService billservice();
+
+ /**
+ * 列表接口
+ * @param m
+ * @param orderParam
+ * @param pageParam
+ * @param traceParamDto
+ * @return
+ */
+ public ResponseResult> listBill(M m,
+ MyOrderParam orderParam,
+ MyPageParam pageParam,
+ TraceParamDto traceParamDto
+ ) {
+ Page pageList = billservice().listBill(m,orderParam,pageParam,traceParamDto);
+ long totalCount = pageList.getTotal();
+ MyPageData result = MyPageUtil.makeResponseData(pageList, totalCount);
+
+ String tableName = m.getClass().getAnnotation(TableName.class).value();
+ result.setTableName(tableName);
+ List dataList = result.getDataList();
+ if (dataList.size()>0){
+ List vos = new ArrayList<>();
+ for (M m1 : dataList) {
+ M o = (M) BeanUtil.copyProperties(m1, m.getClass());
+ vos.add(o);
+ }
+ MyPageData voData = BeanUtil.copyProperties(result, MyPageData.class);
+ voData.setDataList(vos);
+ voData.setTableName(tableName);
+ return ResponseResult.success(voData);
+ }
+ //正常的返回
+ return ResponseResult.success(result);
+ }
+
+ /**
+ * 单据保存接口,包括保存单据分录
+ * @param m
+ * @param crDto
+ * @return
+ */
+ public ResponseResult> saveBill(M m, @MyRequestBody List crDto){
+ billservice().saveBill(m,crDto);
+ return ResponseResult.success("新增成功");
+
+ }
+
+ /**
+ * 单据提交接口 ,包括保存单据分录
+ * @param processDefinitionKey 流程标识
+ * @param m 单据实体
+ * @param crDto 关联关系
+ * @return
+ */
+ public ResponseResult> submitBill(String processDefinitionKey,M m, @MyRequestBody List crDto){
+ billservice().submitBill(processDefinitionKey,m,crDto);
+ return ResponseResult.success("提交成功");
+ }
+
+ /**
+ * 单据提交接口
+ * @param processDefinitionKey 流程标识
+ * @param id 单据id
+ * @return
+ */
+ public ResponseResult> submitBillKey(String processDefinitionKey,Long id){
+ billservice().submitBillKey(processDefinitionKey,id);
+ return ResponseResult.success("提交成功");
+ }
+
+
+ /**
+ * 单据详情
+ * @param id
+ * @return
+ */
+ public ResponseResult detailBill(Long id){
+ M m = billservice().detailBill((K) id);
+ if (ObjectUtils.isNotEmpty(m)){
+ //获取vo实体
+ V v = this.convertToVo(m, null);
+ return ResponseResult.success(v);
+ }
+ return (ResponseResult) ResponseResult.success("未查到相应数据,id为"+id);
+ }
+
+ /**
+ * 删除单据,包括分录数据关联删除
+ * @param ids id逗号隔开
+ * @return
+ */
+ public ResponseResult> removeBillById(String ids){
+ billservice().removeBillById(ids);
+ return ResponseResult.success("删除成功");
+ }
+}
diff --git a/common/common-botp/src/main/java/apelet/common/botp/controller/ConvertFieldmappingEntryController.java b/common/common-botp/src/main/java/apelet/common/botp/controller/ConvertFieldmappingEntryController.java
new file mode 100644
index 0000000..4fe943e
--- /dev/null
+++ b/common/common-botp/src/main/java/apelet/common/botp/controller/ConvertFieldmappingEntryController.java
@@ -0,0 +1,51 @@
+package apelet.common.botp.controller;
+
+
+import apelet.common.botp.model.ConvertFieldmappingEntry;
+import apelet.common.botp.service.IConvertFieldmappingEntryService;
+import apelet.common.core.annotation.MyRequestBody;
+import apelet.common.core.object.*;
+import apelet.common.core.util.MyPageUtil;
+import com.github.pagehelper.Page;
+import com.github.pagehelper.page.PageMethod;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author admin
+ * @since 2024-01-18 10:31:58
+ */
+@RestController
+@RequestMapping("/botp/ConvertFieldmappingEntry")
+public class ConvertFieldmappingEntryController {
+ @Autowired
+ private IConvertFieldmappingEntryService IConvertFieldmappingEntryService;
+
+ /**
+ * 分页查询
+ * */
+ @PostMapping(value = "/list")
+ public ResponseResult> list(@MyRequestBody ConvertFieldmappingEntry convertFieldmappingEntry,
+ @MyRequestBody MyOrderParam orderParam,
+ @MyRequestBody MyPageParam pageParam) {
+ if (pageParam != null) {
+ PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
+ }
+ String orderBy = MyOrderParam.buildOrderBy(orderParam, ConvertFieldmappingEntry.class);
+ List list =
+ IConvertFieldmappingEntryService.getConvertFieldmappingEntryListWithRelation(convertFieldmappingEntry,orderBy);
+ long totalCount = 0L;
+ if (list instanceof Page) {
+ totalCount = ((Page) list).getTotal();
+ }
+ MyPageData result = MyPageUtil.makeResponseData(list, totalCount);
+ //正常的返回
+ return ResponseResult.success(result);
+ }
+
+
+}
diff --git a/common/common-botp/src/main/java/apelet/common/botp/controller/ConvertPluginEntryController.java b/common/common-botp/src/main/java/apelet/common/botp/controller/ConvertPluginEntryController.java
new file mode 100644
index 0000000..543f877
--- /dev/null
+++ b/common/common-botp/src/main/java/apelet/common/botp/controller/ConvertPluginEntryController.java
@@ -0,0 +1,53 @@
+package apelet.common.botp.controller;
+
+import apelet.common.botp.model.ConvertPluginEntry;
+import apelet.common.botp.service.IConvertPluginEntryService;
+import apelet.common.core.annotation.MyRequestBody;
+import apelet.common.core.object.*;
+import apelet.common.core.util.MyPageUtil;
+import com.github.pagehelper.Page;
+import com.github.pagehelper.page.PageMethod;
+import io.swagger.v3.oas.annotations.media.Schema;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author admin
+ * @since 2024-01-18 10:31:58
+ */
+@RestController
+@RequestMapping("/botp/ConvertPluginEntry")
+public class ConvertPluginEntryController {
+ @Autowired
+ private IConvertPluginEntryService IConvertPluginEntryService;
+
+
+ /**
+ * 分页查询
+ * */
+ @PostMapping(value = "/list")
+ @Schema(description = "list")
+ public ResponseResult> list(@MyRequestBody ConvertPluginEntry convertPluginEntry,
+ @MyRequestBody MyOrderParam orderParam,
+ @MyRequestBody MyPageParam pageParam) {
+ if (pageParam != null) {
+ PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
+ }
+ String orderBy = MyOrderParam.buildOrderBy(orderParam, ConvertPluginEntry.class);
+ List list =
+ IConvertPluginEntryService.getConvertPluginEntryListWithRelation(convertPluginEntry,orderBy);
+ long totalCount = 0L;
+ if (list instanceof Page) {
+ totalCount = ((Page) list).getTotal();
+ }
+ MyPageData result = MyPageUtil.makeResponseData(list, totalCount);
+ //正常的返回
+ return ResponseResult.success(result);
+ }
+
+
+}
diff --git a/common/common-botp/src/main/java/apelet/common/botp/controller/ConvertRelationController.java b/common/common-botp/src/main/java/apelet/common/botp/controller/ConvertRelationController.java
new file mode 100644
index 0000000..b558eeb
--- /dev/null
+++ b/common/common-botp/src/main/java/apelet/common/botp/controller/ConvertRelationController.java
@@ -0,0 +1,155 @@
+package apelet.common.botp.controller;
+
+import apelet.common.botp.model.ConvertRelation;
+import apelet.common.botp.service.IConvertRelationService;
+import apelet.common.core.annotation.MyRequestBody;
+import apelet.common.core.constant.ErrorCodeEnum;
+import apelet.common.core.object.*;
+import apelet.common.core.util.MyPageUtil;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.github.pagehelper.Page;
+import com.github.pagehelper.page.PageMethod;
+import io.swagger.v3.oas.annotations.media.Schema;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author admin
+ * @since 2024-01-18 10:31:58
+ */
+@RestController
+@RequestMapping("/botp/ConvertRelation")
+public class ConvertRelationController {
+ @Autowired
+ private IConvertRelationService IConvertRelationService;
+
+ @RequestMapping("/transform")
+ public ResponseResult> transform(JSONObject transformJson) {
+ List qq = new ArrayList<>();
+ //转换规则Id
+ String botpId = transformJson.getString("botpId");
+
+ //源单据标识
+ String srcBill = transformJson.getString("srcBill");
+
+ //目标单据标识
+ String destBill = transformJson.getString("destBill");
+
+ //源单据ID
+ String srcBillId = transformJson.getString("srcBillId");
+
+ List transformList = IConvertRelationService.transform(botpId, srcBill, destBill, srcBillId);
+ return ResponseResult.success(transformList);
+
+ }
+
+
+ @RequestMapping("/transformT")
+ public ResponseResult> transformT(JSONObject transformJson) {
+ List qq = new ArrayList<>();
+ //转换规则Id
+ String botpId = transformJson.getString("botpId");
+
+ //源单据标识
+ String srcBill = transformJson.getString("srcBill");
+
+ //目标单据标识
+ String destBill = transformJson.getString("destBill");
+
+ //源单据ID
+ JSONArray srcBillArray = transformJson.getJSONArray("srcBillList");
+ List srcBilList = JSONObject.parseArray(srcBillArray.toJSONString(), String.class);
+ List transformList = IConvertRelationService.transformT(botpId, srcBill, destBill, srcBilList);
+ return ResponseResult.success(transformList);
+
+ }
+
+ @RequestMapping("/getConvertRelation")
+ public ResponseResult> getConvertRelation(String billId, String billType, String traceType) {
+ List