diff --git a/javascript/xuanran.wang/xk_hospital/ModelConfig.js b/javascript/xuanran.wang/xk_hospital/ModelConfig.js
new file mode 100644
index 0000000..6895850
--- /dev/null
+++ b/javascript/xuanran.wang/xk_hospital/ModelConfig.js
@@ -0,0 +1,48 @@
+const detailTable = "detail_1";
+// 多选字段
+const detailMultiFieldId = ModeForm.convertFieldNameToId("model_field", detailTable);
+// 单选字段
+const detailRadioFieldId = ModeForm.convertFieldNameToId("model_field_ass", detailTable);
+// 表单字段名字段
+const detailFieldNameId = ModeForm.convertFieldNameToId("model_field_name", detailTable);
+// 所属表
+const detailFieldTableNameId = ModeForm.convertFieldNameToId("table_name", detailTable);
+// 主表还是明细
+const detailMainOrDetailId = ModeForm.convertFieldNameToId("main_or_detail", detailTable);
+$(()=>{
+ let chose = {};
+ ModeForm.bindDetailFieldChangeEvent(detailMultiFieldId, (id, index, val)=>{
+ console.log('id : ', id);
+ console.log('index : ', index);
+ console.log('val : ', val);
+ if(!val){
+ return;
+ }
+ let fieldMameArr = [];
+ let tableNameArr = [];
+ let mainOrDetailArr = [];
+ val.split(',').forEach(id=>{
+ ModeForm.changeFieldValue(`${detailRadioFieldId}_${index}`, {
+ value: id,
+ specialobj:[
+ {id:id, name:"field"}
+ ]
+ })
+ setTimeout(()=>{
+ let detailFieldNameIdValue = ModeForm.getFieldValue(`${detailFieldNameId}_${index}`)
+ let detailFieldTableNameValue = ModeForm.getFieldValue(`${detailFieldTableNameId}_${index}`)
+ let detailMainOrDetailValue = ModeForm.getFieldValue(`${detailMainOrDetailId}_${index}`);
+ fieldMameArr.push(detailFieldNameIdValue);
+ tableNameArr.push(detailFieldTableNameValue);
+ mainOrDetailArr.push(detailMainOrDetailValue);
+ },0);
+ })
+ console.log('fieldMameArr : ', fieldMameArr)
+ console.log('tableNameArr : ', tableNameArr)
+ console.log('mainOrDetailArr : ', mainOrDetailArr)
+
+ ModeForm.changeFieldValue(`${detailFieldNameId}_${index}`,{value:fieldMameArr.join(',')})
+ ModeForm.changeFieldValue(`${detailFieldTableNameId}_${index}`,{value:tableNameArr.join(',')})
+ ModeForm.changeFieldValue(`${detailMainOrDetailId}_${index}`,{value:mainOrDetailArr.join(',')})
+ })
+})
\ No newline at end of file
diff --git a/src/main/java/aiyh/utils/interfaces/script_util/CusScriptFunInterface.java b/src/main/java/aiyh/utils/interfaces/script_util/CusScriptFunInterface.java
new file mode 100644
index 0000000..664a7c1
--- /dev/null
+++ b/src/main/java/aiyh/utils/interfaces/script_util/CusScriptFunInterface.java
@@ -0,0 +1,10 @@
+package aiyh.utils.interfaces.script_util;
+
+/**
+ *
script util 自定义方法
+ *
+ * @author xuanran.wang
+ * @date 2023/7/25 16:41
+ */
+public interface CusScriptFunInterface {
+}
diff --git a/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/entity/CheckErrorInfo.java b/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/entity/CheckErrorInfo.java
new file mode 100644
index 0000000..57c997c
--- /dev/null
+++ b/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/entity/CheckErrorInfo.java
@@ -0,0 +1,25 @@
+package weaver.xuanran.wang.xk_hospital.model_check.entity;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ *
+ *
+ * @author xuanran.wang
+ * @date 2023/7/25 15:08
+ */
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class CheckErrorInfo {
+ private String tableName;
+ private String dataId;
+ private String errorFieldName;
+ private String errorMsg;
+ private Object currentValue;
+ private String mainId;
+}
diff --git a/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/entity/ModelFieldInfo.java b/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/entity/ModelFieldInfo.java
new file mode 100644
index 0000000..028b6d0
--- /dev/null
+++ b/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/entity/ModelFieldInfo.java
@@ -0,0 +1,16 @@
+package weaver.xuanran.wang.xk_hospital.model_check.entity;
+
+import lombok.Data;
+
+/**
+ *
+ *
+ * @author xuanran.wang
+ * @date 2023/7/26 14:37
+ */
+@Data
+public class ModelFieldInfo {
+ private String fieldName;
+ private String tableName;
+ private int viewType;
+}
diff --git a/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/entity/XkModelCusCheckConfig.java b/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/entity/XkModelCusCheckConfig.java
new file mode 100644
index 0000000..435f27c
--- /dev/null
+++ b/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/entity/XkModelCusCheckConfig.java
@@ -0,0 +1,21 @@
+package weaver.xuanran.wang.xk_hospital.model_check.entity;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 胸科医院 建模数据校验配置主表对象
+ *
+ * @author xuanran.wang
+ * @date 2023/7/24 15:00
+ */
+@Data
+public class XkModelCusCheckConfig {
+ private int modelTable;
+ private String modelTableName;
+ private String onlyMark;
+ private String cusText;
+ private List filedConfigList;
+ private List filedGroupConfigList;
+}
diff --git a/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/entity/XkModelCusCheckFiledConfig.java b/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/entity/XkModelCusCheckFiledConfig.java
new file mode 100644
index 0000000..c013272
--- /dev/null
+++ b/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/entity/XkModelCusCheckFiledConfig.java
@@ -0,0 +1,27 @@
+package weaver.xuanran.wang.xk_hospital.model_check.entity;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 胸科医院 建模数据校验配置明细1 字段配置对象
+ *
+ * @author xuanran.wang
+ * @date 2023/7/24 15:00
+ */
+@Data
+public class XkModelCusCheckFiledConfig {
+ private String mainId;
+ private String modelField;
+ private int checkRule;
+ private String customerValue;
+ private String checkExpression;
+ private String errorMsg;
+ private int controlLevel;
+ private String fieldDbType;
+ private String modelTable;
+ private String modelTableName;
+ private List modelFieldNameList;
+ private String cusWhere;
+}
diff --git a/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/entity/XkModelCusCheckFiledGroupConfig.java b/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/entity/XkModelCusCheckFiledGroupConfig.java
new file mode 100644
index 0000000..6ec4282
--- /dev/null
+++ b/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/entity/XkModelCusCheckFiledGroupConfig.java
@@ -0,0 +1,16 @@
+package weaver.xuanran.wang.xk_hospital.model_check.entity;
+
+import lombok.Data;
+
+/**
+ * 胸科医院 建模数据校验配置明细2 字段组配置对象
+ *
+ * @author xuanran.wang
+ * @date 2023/7/24 15:00
+ */
+@Data
+public class XkModelCusCheckFiledGroupConfig {
+ private int conditionName;
+ private int conditionRule;
+ private String customerValue;
+}
diff --git a/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/job/XkModelCusCheckJob.java b/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/job/XkModelCusCheckJob.java
new file mode 100644
index 0000000..4a291a0
--- /dev/null
+++ b/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/job/XkModelCusCheckJob.java
@@ -0,0 +1,26 @@
+package weaver.xuanran.wang.xk_hospital.model_check.job;
+
+import aiyh.utils.action.CusBaseCronJob;
+import aiyh.utils.annotation.PrintParamMark;
+import aiyh.utils.annotation.RequiredMark;
+
+import java.io.IOException;
+
+/**
+ * 建模字段校验
+ *
+ * @author xuanran.wang
+ * @date 2023/7/24 16:02
+ */
+public class XkModelCusCheckJob extends CusBaseCronJob {
+
+ @RequiredMark
+ @PrintParamMark
+ private String onlyMark;
+
+ @Override
+ public void runCode() throws IOException {
+
+ }
+
+}
diff --git a/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/mapper/XkModelCusCheckMapper.java b/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/mapper/XkModelCusCheckMapper.java
new file mode 100644
index 0000000..f270ea0
--- /dev/null
+++ b/src/main/java/weaver/xuanran/wang/xk_hospital/model_check/mapper/XkModelCusCheckMapper.java
@@ -0,0 +1,79 @@
+package weaver.xuanran.wang.xk_hospital.model_check.mapper;
+
+import aiyh.utils.annotation.recordset.*;
+import weaver.xuanran.wang.xk_hospital.model_check.entity.ModelFieldInfo;
+import weaver.xuanran.wang.xk_hospital.model_check.entity.XkModelCusCheckConfig;
+import weaver.xuanran.wang.xk_hospital.model_check.entity.XkModelCusCheckFiledConfig;
+import weaver.xuanran.wang.xk_hospital.model_check.entity.XkModelCusCheckFiledGroupConfig;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 胸科医院建模数据自定义校验
+ *
+ * @author xuanran.wang
+ * @date 2023/7/24 15:18
+ */
+@SqlMapper
+public interface XkModelCusCheckMapper {
+
+ /**
+ * 查询明细1配置
+ */
+ @Select("select a.*, a.mainid main_id, b.tablename model_table_name " +
+ "from $t{modelTableName}_dt2 a " +
+ "left join workflow_mode_table_view b " +
+ "on a.model_table = b.id " +
+ "where enable = 0")
+ @Associations( @Association(property = "modelFieldNameList", column = "model_field", id = @Id(value = String.class,methodId = 1)))
+ List queryConditionList(@ParamMapper("modelTableName")String modelTableName);
+
+ /**
+ * 查询字段信息
+ * @param fieldIds 字段名
+ */
+ @AssociationMethod(value = 1)
+ @Select("select a.fieldname field_name, a.tablename table_name, b.viewtype view_type " +
+ "from workflow_field_table_view a " +
+ "left join workflow_billfield b " +
+ "on a.id = b.id " +
+ "where a.id in ( $t{fieldIds} )")
+ List queryFieldName(@ParamMapper("fieldIds") String fieldIds);
+
+ /**
+ * 查询明细2配置
+ * @param mainId 主数据id
+ */
+ @Select("select * from uf_xk_model_data_cus_check_dt2 where mainid = #{mainId} and enable = 0")
+ @CollectionMethod(2)
+ List queryAssignmentList(@ParamMapper("mainId")int mainId);
+
+ @Select("select * from $t{tableName} $t{where}")
+ List