1、新增事项分录模板模块

This commit is contained in:
zhengyf 2025-06-30 08:31:34 +08:00
parent 82a16f8af6
commit 647815da80
14 changed files with 1197 additions and 234 deletions

View File

@ -16,6 +16,7 @@
</resultMap>
<!-- 查询的字段-->
<sql id="OrgBookVO_Base_Column_List">
id,
pkentityorg,
glorgcode,
glorgname,
@ -31,6 +32,7 @@
<select id="queryOrgBookVO" resultMap="get-OrgBookVO-result"
parameterType="com.hzya.frame.voucher.ae.comf.bd.entity.vo.OrgBookVO">
SELECT
glorgbook.id AS id,
glorgbook.pk_glorgbook AS pkglorgbook,
glorgbook.gl_orgbook_code AS glorgbookcode,
glorgbook.gl_orgbook_name AS glorgbookname,

View File

@ -68,5 +68,15 @@ public class MdmController extends DefaultController {
}
}
@RequestMapping(value = "/queryMdmAndFiledssByMdmId", method = RequestMethod.POST)
public JsonResultEntity queryMdmAndFiledssByMdmId(@RequestBody MdmModuleDbEntity entity) {
try {
List<MdmModuleDbEntity> all = mdmService.queryMdmAndFiledssByMdmId(entity);
return getSuccessMessageEntity("请求成功", all);
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
}

View File

@ -69,7 +69,7 @@ public class MdmFileMappingController extends DefaultController {
@RequestMapping(value = "/queryMdmAndFiledssByMdmId", method = RequestMethod.POST)
public JsonResultEntity queryMdmAndFiledssByMdmId(@RequestBody MdmModuleDbEntity entity) {
try {
MdmModuleDbEntity all = mdmService.queryMdmAndFiledssByMdmId(entity);
List<MdmModuleDbEntity> all = mdmService.queryMdmAndFiledssByMdmId(entity);
return getSuccessMessageEntity("请求成功", all);
} catch (Exception e) {
e.printStackTrace();

View File

@ -11,5 +11,5 @@ import java.util.List;
public interface IMdmService {
List<MdmModuleDbEntity> queryMdmAndFiledsByMdmId(MdmModuleDbEntity entity);
MdmModuleDbEntity queryMdmAndFiledssByMdmId(MdmModuleDbEntity entity);
List<MdmModuleDbEntity> queryMdmAndFiledssByMdmId(MdmModuleDbEntity entity);
}

View File

@ -65,13 +65,14 @@ public class MdmServiceImpl implements IMdmService {
* @return
*/
@Override
public MdmModuleDbEntity queryMdmAndFiledssByMdmId(MdmModuleDbEntity entity) {
public List<MdmModuleDbEntity> queryMdmAndFiledssByMdmId(MdmModuleDbEntity entity) {
i = 0;
List<MdmModuleDbEntity> mdmModuleDbEntityList = queryMdmAndFiledsByMdmId(entity);
if (mdmModuleDbEntityList == null || mdmModuleDbEntityList.size() == 0) {
return null;
}
MdmModuleDbEntity mdmModuleDbEntity = mdmModuleDbEntityList.get(0);
for (MdmModuleDbEntity mdmModuleDbEntity : mdmModuleDbEntityList) {
List<MdmModuleDbFiledsEntity> sublistMdmModuleDbFileds = mdmModuleDbEntity.getSublistMdmModuleDbFileds();
//查询每个字段的rule
List<MdmModuleDbFiledsEntity> dbEntities = new ArrayList<>();
@ -100,7 +101,8 @@ public class MdmServiceImpl implements IMdmService {
}
}
return mdmModuleDbEntity;
}
return mdmModuleDbEntityList;
}
/**
@ -108,7 +110,7 @@ public class MdmServiceImpl implements IMdmService {
* 根据rule form_name='typeOptionRuleForm' rule_code='service'
*/
public void queryFiledsByDbname(MdmModuleDbFiledsEntity dbfiledEntity, MdmModuleDbFiledsRuleEntity filedRule) {
if (i >= 3) {
if (i >= 5) {
Assert.state(false, "字段:{}关联层数超过3层请查询是否存在死循环嵌套", dbfiledEntity.getChName());
}
i++;

View File

@ -39,7 +39,7 @@ public class AeConfSubjectClassificationServiceImpl extends BaseService<AeConfSu
@Override
public List<AeConfSubjectClassificationEntity> queryAll(AeConfSubjectClassificationEntity entity) {
Assert.notNull(entity.getPkCorp(), "查询科目分类定义时,公司主键不允许为空。");
// Assert.notNull(entity.getPkCorp(), "查询科目分类定义时,公司主键不允许为空。");
Assert.notNull(entity.getPkglorgbook(), "查询科目分类定义时,账簿主键不允许为空。");
Assert.notNull(entity.getAeConfModuleId(), "查询科目分类定义时业务模块id不允许为空。");
List<AeConfSubjectClassificationEntity> query = aeConfSubjectClassificationDao.query(entity);

View File

@ -87,6 +87,24 @@ public class TemplateController extends DefaultController {
}
}
/**
* 摘要校验
*/
@RequestMapping(value = "/checkAbstract", method = RequestMethod.POST)
public JsonResultEntity checkAbstract(@RequestBody AeConfVoucherTemplateEntity entity) {
try {
boolean status = templateService.checkAbstract(entity);
if(status){
return getSuccessMessageEntity("校验成功");
}else {
return getFailureMessageEntity("校验失败");
}
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
// /**

View File

@ -9,7 +9,7 @@ import lombok.Data;
* (AeConfVoucherTemplateAssist)实体类
*
* @author zydd
* @since 2025-06-25 16:31:32
* @since 2025-06-27 16:42:32
*/
@Data
public class AeConfVoucherTemplateAssistEntity extends BaseEntity {
@ -21,27 +21,27 @@ public class AeConfVoucherTemplateAssistEntity extends BaseEntity {
/**
* 档案主数据id
*/
private String fileId;
private String mdmId;
/**
* 档案编码
*/
private String fileCode;
private String mdmCode;
/**
* 档案名称
*/
private String fileName;
private String mdmName;
/**
* 档案明细id
* 字段id
*/
private String fileMapperId;
private String fieldId;
/**
* 档案明细code
* 字段编码
*/
private String fileMapperCode;
private String fieldCode;
/**
* 档案明细name
* 字段名称
*/
private String fileMapperName;
private String fieldName;
/**
* 备注
*/
@ -65,5 +65,6 @@ public class AeConfVoucherTemplateAssistEntity extends BaseEntity {
*/
private String modifyUser;
}

View File

@ -6,12 +6,12 @@
type="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateAssistEntity">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="voucherTemplateId" column="voucher_template_id" jdbcType="INTEGER"/>
<result property="fileId" column="file_id" jdbcType="VARCHAR"/>
<result property="fileCode" column="file_code" jdbcType="VARCHAR"/>
<result property="fileName" column="file_name" jdbcType="VARCHAR"/>
<result property="fileMapperId" column="file_mapper_id" jdbcType="VARCHAR"/>
<result property="fileMapperCode" column="file_mapper_code" jdbcType="VARCHAR"/>
<result property="fileMapperName" column="file_mapper_name" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="mdmCode" column="mdm_code" jdbcType="VARCHAR"/>
<result property="mdmName" column="mdm_name" jdbcType="VARCHAR"/>
<result property="fieldId" column="field_id" jdbcType="VARCHAR"/>
<result property="fieldCode" column="field_code" jdbcType="VARCHAR"/>
<result property="fieldName" column="field_name" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="def1" column="def1" jdbcType="VARCHAR"/>
<result property="def2" column="def2" jdbcType="VARCHAR"/>
@ -33,12 +33,12 @@
<sql id="AeConfVoucherTemplateAssistEntity_Base_Column_List">
id
,voucher_template_id
,file_id
,file_code
,file_name
,file_mapper_id
,file_mapper_code
,file_mapper_name
,mdm_id
,mdm_code
,mdm_name
,field_id
,field_code
,field_name
,remark
,def1
,def2
@ -65,12 +65,12 @@
<trim prefix="where" prefixOverrides="and">
<if test="id != null">and id = #{id}</if>
<if test="voucherTemplateId != null">and voucher_template_id = #{voucherTemplateId}</if>
<if test="fileId != null and fileId != ''">and file_id = #{fileId}</if>
<if test="fileCode != null and fileCode != ''">and file_code = #{fileCode}</if>
<if test="fileName != null and fileName != ''">and file_name = #{fileName}</if>
<if test="fileMapperId != null and fileMapperId != ''">and file_mapper_id = #{fileMapperId}</if>
<if test="fileMapperCode != null and fileMapperCode != ''">and file_mapper_code = #{fileMapperCode}</if>
<if test="fileMapperName != null and fileMapperName != ''">and file_mapper_name = #{fileMapperName}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="mdmCode != null and mdmCode != ''">and mdm_code = #{mdmCode}</if>
<if test="mdmName != null and mdmName != ''">and mdm_name = #{mdmName}</if>
<if test="fieldId != null and fieldId != ''">and field_id = #{fieldId}</if>
<if test="fieldCode != null and fieldCode != ''">and field_code = #{fieldCode}</if>
<if test="fieldName != null and fieldName != ''">and field_name = #{fieldName}</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
<if test="def1 != null and def1 != ''">and def1 = #{def1}</if>
<if test="def2 != null and def2 != ''">and def2 = #{def2}</if>
@ -98,12 +98,12 @@
<trim prefix="where" prefixOverrides="and">
<if test="id != null">and id = #{id}</if>
<if test="voucherTemplateId != null">and voucher_template_id = #{voucherTemplateId}</if>
<if test="fileId != null and fileId != ''">and file_id = #{fileId}</if>
<if test="fileCode != null and fileCode != ''">and file_code = #{fileCode}</if>
<if test="fileName != null and fileName != ''">and file_name = #{fileName}</if>
<if test="fileMapperId != null and fileMapperId != ''">and file_mapper_id = #{fileMapperId}</if>
<if test="fileMapperCode != null and fileMapperCode != ''">and file_mapper_code = #{fileMapperCode}</if>
<if test="fileMapperName != null and fileMapperName != ''">and file_mapper_name = #{fileMapperName}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="mdmCode != null and mdmCode != ''">and mdm_code = #{mdmCode}</if>
<if test="mdmName != null and mdmName != ''">and mdm_name = #{mdmName}</if>
<if test="fieldId != null and fieldId != ''">and field_id = #{fieldId}</if>
<if test="fieldCode != null and fieldCode != ''">and field_code = #{fieldCode}</if>
<if test="fieldName != null and fieldName != ''">and field_name = #{fieldName}</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
<if test="def1 != null and def1 != ''">and def1 = #{def1}</if>
<if test="def2 != null and def2 != ''">and def2 = #{def2}</if>
@ -133,18 +133,12 @@
<trim prefix="where" prefixOverrides="and">
<if test="id != null">and id like concat('%',#{id},'%')</if>
<if test="voucherTemplateId != null">and voucher_template_id like concat('%',#{voucherTemplateId},'%')</if>
<if test="fileId != null and fileId != ''">and file_id like concat('%',#{fileId},'%')</if>
<if test="fileCode != null and fileCode != ''">and file_code like concat('%',#{fileCode},'%')</if>
<if test="fileName != null and fileName != ''">and file_name like concat('%',#{fileName},'%')</if>
<if test="fileMapperId != null and fileMapperId != ''">and file_mapper_id like
concat('%',#{fileMapperId},'%')
</if>
<if test="fileMapperCode != null and fileMapperCode != ''">and file_mapper_code like
concat('%',#{fileMapperCode},'%')
</if>
<if test="fileMapperName != null and fileMapperName != ''">and file_mapper_name like
concat('%',#{fileMapperName},'%')
</if>
<if test="mdmId != null and mdmId != ''">and mdm_id like concat('%',#{mdmId},'%')</if>
<if test="mdmCode != null and mdmCode != ''">and mdm_code like concat('%',#{mdmCode},'%')</if>
<if test="mdmName != null and mdmName != ''">and mdm_name like concat('%',#{mdmName},'%')</if>
<if test="fieldId != null and fieldId != ''">and field_id like concat('%',#{fieldId},'%')</if>
<if test="fieldCode != null and fieldCode != ''">and field_code like concat('%',#{fieldCode},'%')</if>
<if test="fieldName != null and fieldName != ''">and field_name like concat('%',#{fieldName},'%')</if>
<if test="remark != null and remark != ''">and remark like concat('%',#{remark},'%')</if>
<if test="def1 != null and def1 != ''">and def1 like concat('%',#{def1},'%')</if>
<if test="def2 != null and def2 != ''">and def2 like concat('%',#{def2},'%')</if>
@ -174,12 +168,12 @@
<trim prefix="where" prefixOverrides="and">
<if test="id != null">or id = #{id}</if>
<if test="voucherTemplateId != null">or voucher_template_id = #{voucherTemplateId}</if>
<if test="fileId != null and fileId != ''">or file_id = #{fileId}</if>
<if test="fileCode != null and fileCode != ''">or file_code = #{fileCode}</if>
<if test="fileName != null and fileName != ''">or file_name = #{fileName}</if>
<if test="fileMapperId != null and fileMapperId != ''">or file_mapper_id = #{fileMapperId}</if>
<if test="fileMapperCode != null and fileMapperCode != ''">or file_mapper_code = #{fileMapperCode}</if>
<if test="fileMapperName != null and fileMapperName != ''">or file_mapper_name = #{fileMapperName}</if>
<if test="mdmId != null and mdmId != ''">or mdm_id = #{mdmId}</if>
<if test="mdmCode != null and mdmCode != ''">or mdm_code = #{mdmCode}</if>
<if test="mdmName != null and mdmName != ''">or mdm_name = #{mdmName}</if>
<if test="fieldId != null and fieldId != ''">or field_id = #{fieldId}</if>
<if test="fieldCode != null and fieldCode != ''">or field_code = #{fieldCode}</if>
<if test="fieldName != null and fieldName != ''">or field_name = #{fieldName}</if>
<if test="remark != null and remark != ''">or remark = #{remark}</if>
<if test="def1 != null and def1 != ''">or def1 = #{def1}</if>
<if test="def2 != null and def2 != ''">or def2 = #{def2}</if>
@ -208,12 +202,12 @@
<trim suffix="" suffixOverrides=",">
<if test="id != null">id ,</if>
<if test="voucherTemplateId != null">voucher_template_id ,</if>
<if test="fileId != null and fileId != ''">file_id ,</if>
<if test="fileCode != null and fileCode != ''">file_code ,</if>
<if test="fileName != null and fileName != ''">file_name ,</if>
<if test="fileMapperId != null and fileMapperId != ''">file_mapper_id ,</if>
<if test="fileMapperCode != null and fileMapperCode != ''">file_mapper_code ,</if>
<if test="fileMapperName != null and fileMapperName != ''">file_mapper_name ,</if>
<if test="mdmId != null and mdmId != ''">mdm_id ,</if>
<if test="mdmCode != null and mdmCode != ''">mdm_code ,</if>
<if test="mdmName != null and mdmName != ''">mdm_name ,</if>
<if test="fieldId != null and fieldId != ''">field_id ,</if>
<if test="fieldCode != null and fieldCode != ''">field_code ,</if>
<if test="fieldName != null and fieldName != ''">field_name ,</if>
<if test="remark != null and remark != ''">remark ,</if>
<if test="def1 != null and def1 != ''">def1 ,</if>
<if test="def2 != null and def2 != ''">def2 ,</if>
@ -226,10 +220,8 @@
<if test="def9 != null and def9 != ''">def9 ,</if>
<if test="def10 != null and def10 != ''">def10 ,</if>
<if test="create_time != null">create_time ,</if>
<if test="create_time == null">create_time ,</if>
<if test="createUser != null and createUser != ''">create_user ,</if>
<if test="modify_time != null">modify_time ,</if>
<if test="modify_time == null">modify_time ,</if>
<if test="modifyUser != null and modifyUser != ''">modify_user ,</if>
<if test="sts != null and sts != ''">sts ,</if>
<if test="sts == null ">sts,</if>
@ -238,12 +230,12 @@
<trim suffix="" suffixOverrides=",">
<if test="id != null">#{id} ,</if>
<if test="voucherTemplateId != null">#{voucherTemplateId} ,</if>
<if test="fileId != null and fileId != ''">#{fileId} ,</if>
<if test="fileCode != null and fileCode != ''">#{fileCode} ,</if>
<if test="fileName != null and fileName != ''">#{fileName} ,</if>
<if test="fileMapperId != null and fileMapperId != ''">#{fileMapperId} ,</if>
<if test="fileMapperCode != null and fileMapperCode != ''">#{fileMapperCode} ,</if>
<if test="fileMapperName != null and fileMapperName != ''">#{fileMapperName} ,</if>
<if test="mdmId != null and mdmId != ''">#{mdmId} ,</if>
<if test="mdmCode != null and mdmCode != ''">#{mdmCode} ,</if>
<if test="mdmName != null and mdmName != ''">#{mdmName} ,</if>
<if test="fieldId != null and fieldId != ''">#{fieldId} ,</if>
<if test="fieldCode != null and fieldCode != ''">#{fieldCode} ,</if>
<if test="fieldName != null and fieldName != ''">#{fieldName} ,</if>
<if test="remark != null and remark != ''">#{remark} ,</if>
<if test="def1 != null and def1 != ''">#{def1} ,</if>
<if test="def2 != null and def2 != ''">#{def2} ,</if>
@ -256,10 +248,8 @@
<if test="def9 != null and def9 != ''">#{def9} ,</if>
<if test="def10 != null and def10 != ''">#{def10} ,</if>
<if test="create_time != null">#{create_time} ,</if>
<if test="create_time == null">now() ,</if>
<if test="createUser != null and createUser != ''">#{createUser} ,</if>
<if test="modify_time != null">#{modify_time} ,</if>
<if test="modify_time == null">now() ,</if>
<if test="modifyUser != null and modifyUser != ''">#{modifyUser} ,</if>
<if test="sts != null and sts != ''">#{sts} ,</if>
<if test="sts == null ">'Y',</if>
@ -268,32 +258,32 @@
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into ae_conf_voucher_template_assist(voucher_template_id, file_id, file_code, file_name, file_mapper_id,
file_mapper_code, file_mapper_name, remark, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10,
create_time, create_user, modify_time, modify_user, sts, sts)
insert into ae_conf_voucher_template_assist(voucher_template_id, mdm_id, mdm_code, mdm_name, field_id,
field_code, field_name, remark, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, create_time,
create_user, modify_time, modify_user, sts, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.voucherTemplateId},#{entity.fileId},#{entity.fileCode},#{entity.fileName},#{entity.fileMapperId},#{entity.fileMapperCode},#{entity.fileMapperName},#{entity.remark},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},now(),#{entity.createUser},now(),#{entity.modifyUser},#{entity.sts},
(#{entity.voucherTemplateId},#{entity.mdmId},#{entity.mdmCode},#{entity.mdmName},#{entity.fieldId},#{entity.fieldCode},#{entity.fieldName},#{entity.remark},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.create_time},#{entity.createUser},#{entity.modify_time},#{entity.modifyUser},#{entity.sts},
'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into ae_conf_voucher_template_assist(voucher_template_id, file_id, file_code, file_name, file_mapper_id,
file_mapper_code, file_mapper_name, remark, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10,
create_time, create_user, modify_time, modify_user, sts)
insert into ae_conf_voucher_template_assist(voucher_template_id, mdm_id, mdm_code, mdm_name, field_id,
field_code, field_name, remark, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, create_time,
create_user, modify_time, modify_user, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.voucherTemplateId},#{entity.fileId},#{entity.fileCode},#{entity.fileName},#{entity.fileMapperId},#{entity.fileMapperCode},#{entity.fileMapperName},#{entity.remark},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.create_time},#{entity.createUser},#{entity.modify_time},#{entity.modifyUser},#{entity.sts})
(#{entity.voucherTemplateId},#{entity.mdmId},#{entity.mdmCode},#{entity.mdmName},#{entity.fieldId},#{entity.fieldCode},#{entity.fieldName},#{entity.remark},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.create_time},#{entity.createUser},#{entity.modify_time},#{entity.modifyUser},#{entity.sts})
</foreach>
on duplicate key update
voucher_template_id = values(voucher_template_id),
file_id = values(file_id),
file_code = values(file_code),
file_name = values(file_name),
file_mapper_id = values(file_mapper_id),
file_mapper_code = values(file_mapper_code),
file_mapper_name = values(file_mapper_name),
mdm_id = values(mdm_id),
mdm_code = values(mdm_code),
mdm_name = values(mdm_name),
field_id = values(field_id),
field_code = values(field_code),
field_name = values(field_name),
remark = values(remark),
def1 = values(def1),
def2 = values(def2),
@ -317,12 +307,12 @@
update ae_conf_voucher_template_assist set
<trim suffix="" suffixOverrides=",">
<if test="voucherTemplateId != null">voucher_template_id = #{voucherTemplateId},</if>
<if test="fileId != null and fileId != ''">file_id = #{fileId},</if>
<if test="fileCode != null and fileCode != ''">file_code = #{fileCode},</if>
<if test="fileName != null and fileName != ''">file_name = #{fileName},</if>
<if test="fileMapperId != null and fileMapperId != ''">file_mapper_id = #{fileMapperId},</if>
<if test="fileMapperCode != null and fileMapperCode != ''">file_mapper_code = #{fileMapperCode},</if>
<if test="fileMapperName != null and fileMapperName != ''">file_mapper_name = #{fileMapperName},</if>
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if>
<if test="mdmCode != null and mdmCode != ''">mdm_code = #{mdmCode},</if>
<if test="mdmName != null and mdmName != ''">mdm_name = #{mdmName},</if>
<if test="fieldId != null and fieldId != ''">field_id = #{fieldId},</if>
<if test="fieldCode != null and fieldCode != ''">field_code = #{fieldCode},</if>
<if test="fieldName != null and fieldName != ''">field_name = #{fieldName},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="def1 != null and def1 != ''">def1 = #{def1},</if>
<if test="def2 != null and def2 != ''">def2 = #{def2},</if>
@ -335,10 +325,8 @@
<if test="def9 != null and def9 != ''">def9 = #{def9},</if>
<if test="def10 != null and def10 != ''">def10 = #{def10},</if>
<if test="create_time != null">create_time = #{create_time},</if>
<if test="create_time == null">create_time = now(),</if>
<if test="createUser != null and createUser != ''">create_user = #{createUser},</if>
<if test="modify_time != null">modify_time = #{modify_time},</if>
<if test="modify_time == null">modify_time = now(),</if>
<if test="modifyUser != null and modifyUser != ''">modify_user = #{modifyUser},</if>
<if test="sts != null and sts != ''">sts = #{sts},</if>
</trim>
@ -348,7 +336,8 @@
<update id="entity_logicDelete"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateAssistEntity">
update ae_conf_voucher_template_assist
set sts= 'N',modify_time = now()
set sts= 'N',
modify_time =now()
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
@ -359,12 +348,12 @@
<trim prefix="where" prefixOverrides="and">
<if test="id != null">and id = #{id}</if>
<if test="voucherTemplateId != null">and voucher_template_id = #{voucherTemplateId}</if>
<if test="fileId != null and fileId != ''">and file_id = #{fileId}</if>
<if test="fileCode != null and fileCode != ''">and file_code = #{fileCode}</if>
<if test="fileName != null and fileName != ''">and file_name = #{fileName}</if>
<if test="fileMapperId != null and fileMapperId != ''">and file_mapper_id = #{fileMapperId}</if>
<if test="fileMapperCode != null and fileMapperCode != ''">and file_mapper_code = #{fileMapperCode}</if>
<if test="fileMapperName != null and fileMapperName != ''">and file_mapper_name = #{fileMapperName}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="mdmCode != null and mdmCode != ''">and mdm_code = #{mdmCode}</if>
<if test="mdmName != null and mdmName != ''">and mdm_name = #{mdmName}</if>
<if test="fieldId != null and fieldId != ''">and field_id = #{fieldId}</if>
<if test="fieldCode != null and fieldCode != ''">and field_code = #{fieldCode}</if>
<if test="fieldName != null and fieldName != ''">and field_name = #{fieldName}</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
<if test="def1 != null and def1 != ''">and def1 = #{def1}</if>
<if test="def2 != null and def2 != ''">and def2 = #{def2}</if>

View File

@ -10,9 +10,8 @@ import lombok.Data;
* (AeConfVoucherTemplate)实体类
*
* @author zydd
* @since 2025-06-25 16:22:52
* @since 2025-06-27 14:57:25
*/
@Data
public class AeConfVoucherTemplateEntity extends BaseEntity {
/**
@ -47,9 +46,14 @@ public class AeConfVoucherTemplateEntity extends BaseEntity {
* 业务单元
*/
private String businessUnitId;
/**
* 业务单元code
*/
private String businessUnitCode;
/**
* 业务单元name
*/
private String businessUnitName;
/**
* 会计科目分类定义
*/
@ -60,6 +64,12 @@ public class AeConfVoucherTemplateEntity extends BaseEntity {
* 币种字段
*/
private String currencyField;
private String currencyFieldCode;
private String currencyFieldName;
/**
* 币种
*/
private String pkCurrtype;
/**
* 摘要前端传入
*/
@ -76,26 +86,39 @@ public class AeConfVoucherTemplateEntity extends BaseEntity {
* 借方数量字段
*/
private String jNumField;
private String jNumFieldCode;
private String jNumFieldName;
/**
* 借方原币金额字段
*/
private String jYbSumField;
private String jYbSumFieldCode;
private String jYbSumFieldName;
/**
* 借方本币金额字段
*/
private String jBbSumField;
private String jBbSumFieldCode;
private String jBbSumFieldName;
/**
* 贷方数量字段
*/
private String dNumField;
private String dNumFieldCode;
private String dNumFieldName;
/**
* 贷方原币金额字段
*/
private String dYbSumField;
private String dYbSumFieldCode;
private String dYbSumFieldName;
/**
* 贷方本币金额字段
*/
private String dBbSumField;
private String dBbSumFieldCode;
private String dBbSumFieldName;
/**
* 现金流量项目主键
*/
@ -127,7 +150,439 @@ public class AeConfVoucherTemplateEntity extends BaseEntity {
*/
private String modifyUser;
private List<AeConfVoucherTemplateAssistEntity> assistEntityList;
public String getMdmId() {
return mdmId;
}
public void setMdmId(String mdmId) {
this.mdmId = mdmId;
}
public String getPkGlorgbook() {
return pkGlorgbook;
}
public void setPkGlorgbook(String pkGlorgbook) {
this.pkGlorgbook = pkGlorgbook;
}
public String getGlOrgbookCode() {
return glOrgbookCode;
}
public void setGlOrgbookCode(String glOrgbookCode) {
this.glOrgbookCode = glOrgbookCode;
}
public String getGlOrgbookName() {
return glOrgbookName;
}
public void setGlOrgbookName(String glOrgbookName) {
this.glOrgbookName = glOrgbookName;
}
public String getVoucherTypeId() {
return voucherTypeId;
}
public void setVoucherTypeId(String voucherTypeId) {
this.voucherTypeId = voucherTypeId;
}
public String getVoucherTypeCode() {
return voucherTypeCode;
}
public void setVoucherTypeCode(String voucherTypeCode) {
this.voucherTypeCode = voucherTypeCode;
}
public String getVoucherTypeName() {
return voucherTypeName;
}
public void setVoucherTypeName(String voucherTypeName) {
this.voucherTypeName = voucherTypeName;
}
public String getBusinessUnitId() {
return businessUnitId;
}
public void setBusinessUnitId(String businessUnitId) {
this.businessUnitId = businessUnitId;
}
public String getBusinessUnitCode() {
return businessUnitCode;
}
public void setBusinessUnitCode(String businessUnitCode) {
this.businessUnitCode = businessUnitCode;
}
public String getBusinessUnitName() {
return businessUnitName;
}
public void setBusinessUnitName(String businessUnitName) {
this.businessUnitName = businessUnitName;
}
public Long getSubjectClassificationId() {
return subjectClassificationId;
}
public void setSubjectClassificationId(Long subjectClassificationId) {
this.subjectClassificationId = subjectClassificationId;
}
public String getSubjectClassificationCode() {
return subjectClassificationCode;
}
public void setSubjectClassificationCode(String subjectClassificationCode) {
this.subjectClassificationCode = subjectClassificationCode;
}
public String getSubjectClassificationName() {
return subjectClassificationName;
}
public void setSubjectClassificationName(String subjectClassificationName) {
this.subjectClassificationName = subjectClassificationName;
}
public String getCurrencyField() {
return currencyField;
}
public void setCurrencyField(String currencyField) {
this.currencyField = currencyField;
}
public String getCurrencyFieldCode() {
return currencyFieldCode;
}
public void setCurrencyFieldCode(String currencyFieldCode) {
this.currencyFieldCode = currencyFieldCode;
}
public String getCurrencyFieldName() {
return currencyFieldName;
}
public void setCurrencyFieldName(String currencyFieldName) {
this.currencyFieldName = currencyFieldName;
}
public String getPkCurrtype() {
return pkCurrtype;
}
public void setPkCurrtype(String pkCurrtype) {
this.pkCurrtype = pkCurrtype;
}
public String getAbstractStr() {
return abstractStr;
}
public void setAbstractStr(String abstractStr) {
this.abstractStr = abstractStr;
}
public String getAbstractRes() {
return abstractRes;
}
public void setAbstractRes(String abstractRes) {
this.abstractRes = abstractRes;
}
public String getExchangeRate() {
return exchangeRate;
}
public void setExchangeRate(String exchangeRate) {
this.exchangeRate = exchangeRate;
}
public String getjNumField() {
return jNumField;
}
public void setjNumField(String jNumField) {
this.jNumField = jNumField;
}
public String getjNumFieldCode() {
return jNumFieldCode;
}
public void setjNumFieldCode(String jNumFieldCode) {
this.jNumFieldCode = jNumFieldCode;
}
public String getjNumFieldName() {
return jNumFieldName;
}
public void setjNumFieldName(String jNumFieldName) {
this.jNumFieldName = jNumFieldName;
}
public String getjYbSumField() {
return jYbSumField;
}
public void setjYbSumField(String jYbSumField) {
this.jYbSumField = jYbSumField;
}
public String getjYbSumFieldCode() {
return jYbSumFieldCode;
}
public void setjYbSumFieldCode(String jYbSumFieldCode) {
this.jYbSumFieldCode = jYbSumFieldCode;
}
public String getjYbSumFieldName() {
return jYbSumFieldName;
}
public void setjYbSumFieldName(String jYbSumFieldName) {
this.jYbSumFieldName = jYbSumFieldName;
}
public String getjBbSumField() {
return jBbSumField;
}
public void setjBbSumField(String jBbSumField) {
this.jBbSumField = jBbSumField;
}
public String getjBbSumFieldCode() {
return jBbSumFieldCode;
}
public void setjBbSumFieldCode(String jBbSumFieldCode) {
this.jBbSumFieldCode = jBbSumFieldCode;
}
public String getjBbSumFieldName() {
return jBbSumFieldName;
}
public void setjBbSumFieldName(String jBbSumFieldName) {
this.jBbSumFieldName = jBbSumFieldName;
}
public String getdNumField() {
return dNumField;
}
public void setdNumField(String dNumField) {
this.dNumField = dNumField;
}
public String getdNumFieldCode() {
return dNumFieldCode;
}
public void setdNumFieldCode(String dNumFieldCode) {
this.dNumFieldCode = dNumFieldCode;
}
public String getdNumFieldName() {
return dNumFieldName;
}
public void setdNumFieldName(String dNumFieldName) {
this.dNumFieldName = dNumFieldName;
}
public String getdYbSumField() {
return dYbSumField;
}
public void setdYbSumField(String dYbSumField) {
this.dYbSumField = dYbSumField;
}
public String getdYbSumFieldCode() {
return dYbSumFieldCode;
}
public void setdYbSumFieldCode(String dYbSumFieldCode) {
this.dYbSumFieldCode = dYbSumFieldCode;
}
public String getdYbSumFieldName() {
return dYbSumFieldName;
}
public void setdYbSumFieldName(String dYbSumFieldName) {
this.dYbSumFieldName = dYbSumFieldName;
}
public String getdBbSumField() {
return dBbSumField;
}
public void setdBbSumField(String dBbSumField) {
this.dBbSumField = dBbSumField;
}
public String getdBbSumFieldCode() {
return dBbSumFieldCode;
}
public void setdBbSumFieldCode(String dBbSumFieldCode) {
this.dBbSumFieldCode = dBbSumFieldCode;
}
public String getdBbSumFieldName() {
return dBbSumFieldName;
}
public void setdBbSumFieldName(String dBbSumFieldName) {
this.dBbSumFieldName = dBbSumFieldName;
}
public String getPkCashflow() {
return pkCashflow;
}
public void setPkCashflow(String pkCashflow) {
this.pkCashflow = pkCashflow;
}
public String getPkSubrelation() {
return pkSubrelation;
}
public void setPkSubrelation(String pkSubrelation) {
this.pkSubrelation = pkSubrelation;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getDef1() {
return def1;
}
public void setDef1(String def1) {
this.def1 = def1;
}
public String getDef2() {
return def2;
}
public void setDef2(String def2) {
this.def2 = def2;
}
public String getDef3() {
return def3;
}
public void setDef3(String def3) {
this.def3 = def3;
}
public String getDef4() {
return def4;
}
public void setDef4(String def4) {
this.def4 = def4;
}
public String getDef5() {
return def5;
}
public void setDef5(String def5) {
this.def5 = def5;
}
public String getDef6() {
return def6;
}
public void setDef6(String def6) {
this.def6 = def6;
}
public String getDef7() {
return def7;
}
public void setDef7(String def7) {
this.def7 = def7;
}
public String getDef8() {
return def8;
}
public void setDef8(String def8) {
this.def8 = def8;
}
public String getDef9() {
return def9;
}
public void setDef9(String def9) {
this.def9 = def9;
}
public String getDef10() {
return def10;
}
public void setDef10(String def10) {
this.def10 = def10;
}
public String getCreateUser() {
return createUser;
}
public void setCreateUser(String createUser) {
this.createUser = createUser;
}
public String getModifyUser() {
return modifyUser;
}
public void setModifyUser(String modifyUser) {
this.modifyUser = modifyUser;
}
public List<AeConfVoucherTemplateAssistEntity> getAssistEntityList() {
return assistEntityList;
}
public void setAssistEntityList(List<AeConfVoucherTemplateAssistEntity> assistEntityList) {
this.assistEntityList = assistEntityList;
}
}

View File

@ -19,15 +19,30 @@
<result property="subjectClassificationCode" column="subject_classification_code" jdbcType="VARCHAR"/>
<result property="subjectClassificationName" column="subject_classification_name" jdbcType="VARCHAR"/>
<result property="currencyField" column="currency_field" jdbcType="VARCHAR"/>
<result property="currencyFieldCode" column="currency_field_code" jdbcType="VARCHAR"/>
<result property="currencyFieldName" column="currency_field_name" jdbcType="VARCHAR"/>
<result property="pkCurrtype" column="pk_currtype" jdbcType="VARCHAR"/>
<result property="abstractStr" column="abstract_str" jdbcType="VARCHAR"/>
<result property="abstractRes" column="abstract_res" jdbcType="VARCHAR"/>
<result property="exchangeRate" column="exchange_rate" jdbcType="VARCHAR"/>
<result property="jNumField" column="j_num_field" jdbcType="VARCHAR"/>
<result property="jNumFieldCode" column="j_num_field_code" jdbcType="VARCHAR"/>
<result property="jNumFieldName" column="j_num_field_name" jdbcType="VARCHAR"/>
<result property="jYbSumField" column="j_yb_sum_field" jdbcType="VARCHAR"/>
<result property="jYbSumFieldCode" column="j_yb_sum_field_code" jdbcType="VARCHAR"/>
<result property="jYbSumFieldName" column="j_yb_sum_field_name" jdbcType="VARCHAR"/>
<result property="jBbSumField" column="j_bb_sum_field" jdbcType="VARCHAR"/>
<result property="jBbSumFieldCode" column="j_bb_sum_field_code" jdbcType="VARCHAR"/>
<result property="jBbSumFieldName" column="j_bb_sum_field_name" jdbcType="VARCHAR"/>
<result property="dNumField" column="d_num_field" jdbcType="VARCHAR"/>
<result property="dNumFieldCode" column="d_num_field_code" jdbcType="VARCHAR"/>
<result property="dNumFieldName" column="d_num_field_name" jdbcType="VARCHAR"/>
<result property="dYbSumField" column="d_yb_sum_field" jdbcType="VARCHAR"/>
<result property="dYbSumFieldCode" column="d_yb_sum_field_code" jdbcType="VARCHAR"/>
<result property="dYbSumFieldName" column="d_yb_sum_field_name" jdbcType="VARCHAR"/>
<result property="dBbSumField" column="d_bb_sum_field" jdbcType="VARCHAR"/>
<result property="dBbSumFieldCode" column="d_bb_sum_field_code" jdbcType="VARCHAR"/>
<result property="dBbSumFieldName" column="d_bb_sum_field_name" jdbcType="VARCHAR"/>
<result property="pkCashflow" column="pk_cashflow" jdbcType="VARCHAR"/>
<result property="pkSubrelation" column="pk_subrelation" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
@ -64,15 +79,30 @@
,subject_classification_code
,subject_classification_name
,currency_field
,currency_field_code
,currency_field_name
,pk_currtype
,abstract_str
,abstract_res
,exchange_rate
,j_num_field
,j_num_field_code
,j_num_field_name
,j_yb_sum_field
,j_yb_sum_field_code
,j_yb_sum_field_name
,j_bb_sum_field
,j_bb_sum_field_code
,j_bb_sum_field_name
,d_num_field
,d_num_field_code
,d_num_field_name
,d_yb_sum_field
,d_yb_sum_field_code
,d_yb_sum_field_name
,d_bb_sum_field
,d_bb_sum_field_code
,d_bb_sum_field_name
,pk_cashflow
,pk_subrelation
,remark
@ -108,21 +138,56 @@
<if test="voucherTypeCode != null and voucherTypeCode != ''">and voucher_type_code = #{voucherTypeCode}</if>
<if test="voucherTypeName != null and voucherTypeName != ''">and voucher_type_name = #{voucherTypeName}</if>
<if test="businessUnitId != null and businessUnitId != ''">and business_unit_id = #{businessUnitId}</if>
<if test="businessUnitCode != null and businessUnitCode != ''">and business_unit_code = #{businessUnitCode}</if>
<if test="businessUnitName != null and businessUnitName != ''">and business_unit_name = #{businessUnitName}</if>
<if test="businessUnitCode != null and businessUnitCode != ''">and business_unit_code =
#{businessUnitCode}
</if>
<if test="businessUnitName != null and businessUnitName != ''">and business_unit_name =
#{businessUnitName}
</if>
<if test="subjectClassificationId != null">and subject_classification_id = #{subjectClassificationId}</if>
<if test="subjectClassificationCode != null and subjectClassificationCode != ''">and subject_classification_code = #{subjectClassificationCode}</if>
<if test="subjectClassificationName != null and subjectClassificationName != ''">and subject_classification_name = #{subjectClassificationName}</if>
<if test="subjectClassificationCode != null and subjectClassificationCode != ''">and
subject_classification_code = #{subjectClassificationCode}
</if>
<if test="subjectClassificationName != null and subjectClassificationName != ''">and
subject_classification_name = #{subjectClassificationName}
</if>
<if test="currencyField != null and currencyField != ''">and currency_field = #{currencyField}</if>
<if test="currencyFieldCode != null and currencyFieldCode != ''">and currency_field_code =
#{currencyFieldCode}
</if>
<if test="currencyFieldName != null and currencyFieldName != ''">and currency_field_name =
#{currencyFieldName}
</if>
<if test="pkCurrtype != null and pkCurrtype != ''">and pk_currtype = #{pkCurrtype}</if>
<if test="abstractStr != null and abstractStr != ''">and abstract_str = #{abstractStr}</if>
<if test="abstractRes != null and abstractRes != ''">and abstract_res = #{abstractRes}</if>
<if test="exchangeRate != null and exchangeRate != ''">and exchange_rate = #{exchangeRate}</if>
<if test="jNumField != null and jNumField != ''">and j_num_field = #{jNumField}</if>
<if test="jNumFieldCode != null and jNumFieldCode != ''">and j_num_field_code = #{jNumFieldCode}</if>
<if test="jNumFieldName != null and jNumFieldName != ''">and j_num_field_name = #{jNumFieldName}</if>
<if test="jYbSumField != null and jYbSumField != ''">and j_yb_sum_field = #{jYbSumField}</if>
<if test="jYbSumFieldCode != null and jYbSumFieldCode != ''">and j_yb_sum_field_code = #{jYbSumFieldCode}
</if>
<if test="jYbSumFieldName != null and jYbSumFieldName != ''">and j_yb_sum_field_name = #{jYbSumFieldName}
</if>
<if test="jBbSumField != null and jBbSumField != ''">and j_bb_sum_field = #{jBbSumField}</if>
<if test="jBbSumFieldCode != null and jBbSumFieldCode != ''">and j_bb_sum_field_code = #{jBbSumFieldCode}
</if>
<if test="jBbSumFieldName != null and jBbSumFieldName != ''">and j_bb_sum_field_name = #{jBbSumFieldName}
</if>
<if test="dNumField != null and dNumField != ''">and d_num_field = #{dNumField}</if>
<if test="dNumFieldCode != null and dNumFieldCode != ''">and d_num_field_code = #{dNumFieldCode}</if>
<if test="dNumFieldName != null and dNumFieldName != ''">and d_num_field_name = #{dNumFieldName}</if>
<if test="dYbSumField != null and dYbSumField != ''">and d_yb_sum_field = #{dYbSumField}</if>
<if test="dYbSumFieldCode != null and dYbSumFieldCode != ''">and d_yb_sum_field_code = #{dYbSumFieldCode}
</if>
<if test="dYbSumFieldName != null and dYbSumFieldName != ''">and d_yb_sum_field_name = #{dYbSumFieldName}
</if>
<if test="dBbSumField != null and dBbSumField != ''">and d_bb_sum_field = #{dBbSumField}</if>
<if test="dBbSumFieldCode != null and dBbSumFieldCode != ''">and d_bb_sum_field_code = #{dBbSumFieldCode}
</if>
<if test="dBbSumFieldName != null and dBbSumFieldName != ''">and d_bb_sum_field_name = #{dBbSumFieldName}
</if>
<if test="pkCashflow != null and pkCashflow != ''">and pk_cashflow = #{pkCashflow}</if>
<if test="pkSubrelation != null and pkSubrelation != ''">and pk_subrelation = #{pkSubrelation}</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
@ -159,21 +224,56 @@
<if test="voucherTypeCode != null and voucherTypeCode != ''">and voucher_type_code = #{voucherTypeCode}</if>
<if test="voucherTypeName != null and voucherTypeName != ''">and voucher_type_name = #{voucherTypeName}</if>
<if test="businessUnitId != null and businessUnitId != ''">and business_unit_id = #{businessUnitId}</if>
<if test="businessUnitCode != null and businessUnitCode != ''">and business_unit_code = #{businessUnitCode}</if>
<if test="businessUnitName != null and businessUnitName != ''">and business_unit_name = #{businessUnitName}</if>
<if test="businessUnitCode != null and businessUnitCode != ''">and business_unit_code =
#{businessUnitCode}
</if>
<if test="businessUnitName != null and businessUnitName != ''">and business_unit_name =
#{businessUnitName}
</if>
<if test="subjectClassificationId != null">and subject_classification_id = #{subjectClassificationId}</if>
<if test="subjectClassificationCode != null and subjectClassificationCode != ''">and subject_classification_code = #{subjectClassificationCode}</if>
<if test="subjectClassificationName != null and subjectClassificationName != ''">and subject_classification_name = #{subjectClassificationName}</if>
<if test="subjectClassificationCode != null and subjectClassificationCode != ''">and
subject_classification_code = #{subjectClassificationCode}
</if>
<if test="subjectClassificationName != null and subjectClassificationName != ''">and
subject_classification_name = #{subjectClassificationName}
</if>
<if test="currencyField != null and currencyField != ''">and currency_field = #{currencyField}</if>
<if test="currencyFieldCode != null and currencyFieldCode != ''">and currency_field_code =
#{currencyFieldCode}
</if>
<if test="currencyFieldName != null and currencyFieldName != ''">and currency_field_name =
#{currencyFieldName}
</if>
<if test="pkCurrtype != null and pkCurrtype != ''">and pk_currtype = #{pkCurrtype}</if>
<if test="abstractStr != null and abstractStr != ''">and abstract_str = #{abstractStr}</if>
<if test="abstractRes != null and abstractRes != ''">and abstract_res = #{abstractRes}</if>
<if test="exchangeRate != null and exchangeRate != ''">and exchange_rate = #{exchangeRate}</if>
<if test="jNumField != null and jNumField != ''">and j_num_field = #{jNumField}</if>
<if test="jNumFieldCode != null and jNumFieldCode != ''">and j_num_field_code = #{jNumFieldCode}</if>
<if test="jNumFieldName != null and jNumFieldName != ''">and j_num_field_name = #{jNumFieldName}</if>
<if test="jYbSumField != null and jYbSumField != ''">and j_yb_sum_field = #{jYbSumField}</if>
<if test="jYbSumFieldCode != null and jYbSumFieldCode != ''">and j_yb_sum_field_code = #{jYbSumFieldCode}
</if>
<if test="jYbSumFieldName != null and jYbSumFieldName != ''">and j_yb_sum_field_name = #{jYbSumFieldName}
</if>
<if test="jBbSumField != null and jBbSumField != ''">and j_bb_sum_field = #{jBbSumField}</if>
<if test="jBbSumFieldCode != null and jBbSumFieldCode != ''">and j_bb_sum_field_code = #{jBbSumFieldCode}
</if>
<if test="jBbSumFieldName != null and jBbSumFieldName != ''">and j_bb_sum_field_name = #{jBbSumFieldName}
</if>
<if test="dNumField != null and dNumField != ''">and d_num_field = #{dNumField}</if>
<if test="dNumFieldCode != null and dNumFieldCode != ''">and d_num_field_code = #{dNumFieldCode}</if>
<if test="dNumFieldName != null and dNumFieldName != ''">and d_num_field_name = #{dNumFieldName}</if>
<if test="dYbSumField != null and dYbSumField != ''">and d_yb_sum_field = #{dYbSumField}</if>
<if test="dYbSumFieldCode != null and dYbSumFieldCode != ''">and d_yb_sum_field_code = #{dYbSumFieldCode}
</if>
<if test="dYbSumFieldName != null and dYbSumFieldName != ''">and d_yb_sum_field_name = #{dYbSumFieldName}
</if>
<if test="dBbSumField != null and dBbSumField != ''">and d_bb_sum_field = #{dBbSumField}</if>
<if test="dBbSumFieldCode != null and dBbSumFieldCode != ''">and d_bb_sum_field_code = #{dBbSumFieldCode}
</if>
<if test="dBbSumFieldName != null and dBbSumFieldName != ''">and d_bb_sum_field_name = #{dBbSumFieldName}
</if>
<if test="pkCashflow != null and pkCashflow != ''">and pk_cashflow = #{pkCashflow}</if>
<if test="pkSubrelation != null and pkSubrelation != ''">and pk_subrelation = #{pkSubrelation}</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
@ -204,8 +304,9 @@
from ae_conf_voucher_template
<trim prefix="where" prefixOverrides="and">
<if test="id != null">and id like concat('%',#{id},'%')</if>
<if test="pkGlorgbook != null and pkGlorgbook != ''">and pk_glorgbook like concat('%',#{pkGlorgbook},'%')</if>
<if test="mdmId != null and mdmId != ''">and mdm_id like concat('%',#{mdmId},'%')</if>
<if test="pkGlorgbook != null and pkGlorgbook != ''">and pk_glorgbook like concat('%',#{pkGlorgbook},'%')
</if>
<if test="glOrgbookCode != null and glOrgbookCode != ''">and gl_orgbook_code like
concat('%',#{glOrgbookCode},'%')
</if>
@ -218,10 +319,18 @@
<if test="voucherTypeCode != null and voucherTypeCode != ''">and voucher_type_code like
concat('%',#{voucherTypeCode},'%')
</if>
<if test="voucherTypeName != null and voucherTypeName != ''">and voucher_type_name like concat('%',#{voucherTypeName},'%')</if>
<if test="businessUnitId != null and businessUnitId != ''">and business_unit_id like concat('%', #{businessUnitId},'%')</if>
<if test="businessUnitCode != null and businessUnitCode != ''">and business_unit_code like concat('%', #{businessUnitCode},'%')</if>
<if test="businessUnitName != null and businessUnitName != ''">and business_unit_name like concat('%', #{businessUnitName},'%')</if>
<if test="voucherTypeName != null and voucherTypeName != ''">and voucher_type_name like
concat('%',#{voucherTypeName},'%')
</if>
<if test="businessUnitId != null and businessUnitId != ''">and business_unit_id like
concat('%',#{businessUnitId},'%')
</if>
<if test="businessUnitCode != null and businessUnitCode != ''">and business_unit_code like
concat('%',#{businessUnitCode},'%')
</if>
<if test="businessUnitName != null and businessUnitName != ''">and business_unit_name like
concat('%',#{businessUnitName},'%')
</if>
<if test="subjectClassificationId != null">and subject_classification_id like
concat('%',#{subjectClassificationId},'%')
</if>
@ -234,6 +343,13 @@
<if test="currencyField != null and currencyField != ''">and currency_field like
concat('%',#{currencyField},'%')
</if>
<if test="currencyFieldCode != null and currencyFieldCode != ''">and currency_field_code like
concat('%',#{currencyFieldCode},'%')
</if>
<if test="currencyFieldName != null and currencyFieldName != ''">and currency_field_name like
concat('%',#{currencyFieldName},'%')
</if>
<if test="pkCurrtype != null and pkCurrtype != ''">and pk_currtype like concat('%',#{pkCurrtype},'%')</if>
<if test="abstractStr != null and abstractStr != ''">and abstract_str like concat('%',#{abstractStr},'%')
</if>
<if test="abstractRes != null and abstractRes != ''">and abstract_res like concat('%',#{abstractRes},'%')
@ -242,19 +358,55 @@
concat('%',#{exchangeRate},'%')
</if>
<if test="jNumField != null and jNumField != ''">and j_num_field like concat('%',#{jNumField},'%')</if>
<if test="jNumFieldCode != null and jNumFieldCode != ''">and j_num_field_code like
concat('%',#{jNumFieldCode},'%')
</if>
<if test="jNumFieldName != null and jNumFieldName != ''">and j_num_field_name like
concat('%',#{jNumFieldName},'%')
</if>
<if test="jYbSumField != null and jYbSumField != ''">and j_yb_sum_field like
concat('%',#{jYbSumField},'%')
</if>
<if test="jYbSumFieldCode != null and jYbSumFieldCode != ''">and j_yb_sum_field_code like
concat('%',#{jYbSumFieldCode},'%')
</if>
<if test="jYbSumFieldName != null and jYbSumFieldName != ''">and j_yb_sum_field_name like
concat('%',#{jYbSumFieldName},'%')
</if>
<if test="jBbSumField != null and jBbSumField != ''">and j_bb_sum_field like
concat('%',#{jBbSumField},'%')
</if>
<if test="jBbSumFieldCode != null and jBbSumFieldCode != ''">and j_bb_sum_field_code like
concat('%',#{jBbSumFieldCode},'%')
</if>
<if test="jBbSumFieldName != null and jBbSumFieldName != ''">and j_bb_sum_field_name like
concat('%',#{jBbSumFieldName},'%')
</if>
<if test="dNumField != null and dNumField != ''">and d_num_field like concat('%',#{dNumField},'%')</if>
<if test="dNumFieldCode != null and dNumFieldCode != ''">and d_num_field_code like
concat('%',#{dNumFieldCode},'%')
</if>
<if test="dNumFieldName != null and dNumFieldName != ''">and d_num_field_name like
concat('%',#{dNumFieldName},'%')
</if>
<if test="dYbSumField != null and dYbSumField != ''">and d_yb_sum_field like
concat('%',#{dYbSumField},'%')
</if>
<if test="dYbSumFieldCode != null and dYbSumFieldCode != ''">and d_yb_sum_field_code like
concat('%',#{dYbSumFieldCode},'%')
</if>
<if test="dYbSumFieldName != null and dYbSumFieldName != ''">and d_yb_sum_field_name like
concat('%',#{dYbSumFieldName},'%')
</if>
<if test="dBbSumField != null and dBbSumField != ''">and d_bb_sum_field like
concat('%',#{dBbSumField},'%')
</if>
<if test="dBbSumFieldCode != null and dBbSumFieldCode != ''">and d_bb_sum_field_code like
concat('%',#{dBbSumFieldCode},'%')
</if>
<if test="dBbSumFieldName != null and dBbSumFieldName != ''">and d_bb_sum_field_name like
concat('%',#{dBbSumFieldName},'%')
</if>
<if test="pkCashflow != null and pkCashflow != ''">and pk_cashflow like concat('%',#{pkCashflow},'%')</if>
<if test="pkSubrelation != null and pkSubrelation != ''">and pk_subrelation like
concat('%',#{pkSubrelation},'%')
@ -287,16 +439,18 @@
from ae_conf_voucher_template
<trim prefix="where" prefixOverrides="and">
<if test="id != null">or id = #{id}</if>
<if test="pkGlorgbook != null and pkGlorgbook != ''">or pk_glorgbook = #{pkGlorgbook}</if>
<if test="mdmId != null and mdmId != ''">or mdm_id = #{mdmId}</if>
<if test="pkGlorgbook != null and pkGlorgbook != ''">or pk_glorgbook = #{pkGlorgbook}</if>
<if test="glOrgbookCode != null and glOrgbookCode != ''">or gl_orgbook_code = #{glOrgbookCode}</if>
<if test="glOrgbookName != null and glOrgbookName != ''">or gl_orgbook_name = #{glOrgbookName}</if>
<if test="voucherTypeId != null and voucherTypeId != ''">or voucher_type_id = #{voucherTypeId}</if>
<if test="voucherTypeCode != null and voucherTypeCode != ''">or voucher_type_code = #{voucherTypeCode}</if>
<if test="voucherTypeName != null and voucherTypeName != ''">or voucher_type_name = #{voucherTypeName}</if>
<if test="businessUnitId != null and businessUnitId != ''">or business_unit_id = #{businessUnitId}</if>
<if test="businessUnitCode != null and businessUnitCode != ''">or business_unit_code = #{businessUnitCode}</if>
<if test="businessUnitName != null and businessUnitName != ''">or business_unit_name = #{businessUnitName}</if>
<if test="businessUnitCode != null and businessUnitCode != ''">or business_unit_code = #{businessUnitCode}
</if>
<if test="businessUnitName != null and businessUnitName != ''">or business_unit_name = #{businessUnitName}
</if>
<if test="subjectClassificationId != null">or subject_classification_id = #{subjectClassificationId}</if>
<if test="subjectClassificationCode != null and subjectClassificationCode != ''">or
subject_classification_code = #{subjectClassificationCode}
@ -305,15 +459,42 @@
subject_classification_name = #{subjectClassificationName}
</if>
<if test="currencyField != null and currencyField != ''">or currency_field = #{currencyField}</if>
<if test="currencyFieldCode != null and currencyFieldCode != ''">or currency_field_code =
#{currencyFieldCode}
</if>
<if test="currencyFieldName != null and currencyFieldName != ''">or currency_field_name =
#{currencyFieldName}
</if>
<if test="pkCurrtype != null and pkCurrtype != ''">or pk_currtype = #{pkCurrtype}</if>
<if test="abstractStr != null and abstractStr != ''">or abstract_str = #{abstractStr}</if>
<if test="abstractRes != null and abstractRes != ''">or abstract_res = #{abstractRes}</if>
<if test="exchangeRate != null and exchangeRate != ''">or exchange_rate = #{exchangeRate}</if>
<if test="jNumField != null and jNumField != ''">or j_num_field = #{jNumField}</if>
<if test="jNumFieldCode != null and jNumFieldCode != ''">or j_num_field_code = #{jNumFieldCode}</if>
<if test="jNumFieldName != null and jNumFieldName != ''">or j_num_field_name = #{jNumFieldName}</if>
<if test="jYbSumField != null and jYbSumField != ''">or j_yb_sum_field = #{jYbSumField}</if>
<if test="jYbSumFieldCode != null and jYbSumFieldCode != ''">or j_yb_sum_field_code = #{jYbSumFieldCode}
</if>
<if test="jYbSumFieldName != null and jYbSumFieldName != ''">or j_yb_sum_field_name = #{jYbSumFieldName}
</if>
<if test="jBbSumField != null and jBbSumField != ''">or j_bb_sum_field = #{jBbSumField}</if>
<if test="jBbSumFieldCode != null and jBbSumFieldCode != ''">or j_bb_sum_field_code = #{jBbSumFieldCode}
</if>
<if test="jBbSumFieldName != null and jBbSumFieldName != ''">or j_bb_sum_field_name = #{jBbSumFieldName}
</if>
<if test="dNumField != null and dNumField != ''">or d_num_field = #{dNumField}</if>
<if test="dNumFieldCode != null and dNumFieldCode != ''">or d_num_field_code = #{dNumFieldCode}</if>
<if test="dNumFieldName != null and dNumFieldName != ''">or d_num_field_name = #{dNumFieldName}</if>
<if test="dYbSumField != null and dYbSumField != ''">or d_yb_sum_field = #{dYbSumField}</if>
<if test="dYbSumFieldCode != null and dYbSumFieldCode != ''">or d_yb_sum_field_code = #{dYbSumFieldCode}
</if>
<if test="dYbSumFieldName != null and dYbSumFieldName != ''">or d_yb_sum_field_name = #{dYbSumFieldName}
</if>
<if test="dBbSumField != null and dBbSumField != ''">or d_bb_sum_field = #{dBbSumField}</if>
<if test="dBbSumFieldCode != null and dBbSumFieldCode != ''">or d_bb_sum_field_code = #{dBbSumFieldCode}
</if>
<if test="dBbSumFieldName != null and dBbSumFieldName != ''">or d_bb_sum_field_name = #{dBbSumFieldName}
</if>
<if test="pkCashflow != null and pkCashflow != ''">or pk_cashflow = #{pkCashflow}</if>
<if test="pkSubrelation != null and pkSubrelation != ''">or pk_subrelation = #{pkSubrelation}</if>
<if test="remark != null and remark != ''">or remark = #{remark}</if>
@ -343,16 +524,16 @@
insert into ae_conf_voucher_template(
<trim suffix="" suffixOverrides=",">
<if test="id != null">id ,</if>
<if test="pkGlorgbook != null and pkGlorgbook != ''">pk_glorgbook ,</if>
<if test="mdmId != null and mdmId != ''">mdm_id ,</if>
<if test="pkGlorgbook != null and pkGlorgbook != ''">pk_glorgbook ,</if>
<if test="glOrgbookCode != null and glOrgbookCode != ''">gl_orgbook_code ,</if>
<if test="glOrgbookName != null and glOrgbookName != ''">gl_orgbook_name ,</if>
<if test="voucherTypeId != null and voucherTypeId != ''">voucher_type_id ,</if>
<if test="voucherTypeCode != null and voucherTypeCode != ''">voucher_type_code ,</if>
<if test="voucherTypeName != null and voucherTypeName != ''">voucher_type_name ,</if>
<if test="businessUnitId != null and businessUnitId != ''"> business_unit_id ,</if>
<if test="businessUnitCode != null and businessUnitCode != ''"> business_unit_code ,</if>
<if test="businessUnitName != null and businessUnitName != ''"> business_unit_name ,</if>
<if test="businessUnitId != null and businessUnitId != ''">business_unit_id ,</if>
<if test="businessUnitCode != null and businessUnitCode != ''">business_unit_code ,</if>
<if test="businessUnitName != null and businessUnitName != ''">business_unit_name ,</if>
<if test="subjectClassificationId != null">subject_classification_id ,</if>
<if test="subjectClassificationCode != null and subjectClassificationCode != ''">subject_classification_code
,
@ -361,15 +542,30 @@
,
</if>
<if test="currencyField != null and currencyField != ''">currency_field ,</if>
<if test="currencyFieldCode != null and currencyFieldCode != ''">currency_field_code ,</if>
<if test="currencyFieldName != null and currencyFieldName != ''">currency_field_name ,</if>
<if test="pkCurrtype != null and pkCurrtype != ''">pk_currtype ,</if>
<if test="abstractStr != null and abstractStr != ''">abstract_str ,</if>
<if test="abstractRes != null and abstractRes != ''">abstract_res ,</if>
<if test="exchangeRate != null and exchangeRate != ''">exchange_rate ,</if>
<if test="jNumField != null and jNumField != ''">j_num_field ,</if>
<if test="jNumFieldCode != null and jNumFieldCode != ''">j_num_field_code ,</if>
<if test="jNumFieldName != null and jNumFieldName != ''">j_num_field_name ,</if>
<if test="jYbSumField != null and jYbSumField != ''">j_yb_sum_field ,</if>
<if test="jYbSumFieldCode != null and jYbSumFieldCode != ''">j_yb_sum_field_code ,</if>
<if test="jYbSumFieldName != null and jYbSumFieldName != ''">j_yb_sum_field_name ,</if>
<if test="jBbSumField != null and jBbSumField != ''">j_bb_sum_field ,</if>
<if test="jBbSumFieldCode != null and jBbSumFieldCode != ''">j_bb_sum_field_code ,</if>
<if test="jBbSumFieldName != null and jBbSumFieldName != ''">j_bb_sum_field_name ,</if>
<if test="dNumField != null and dNumField != ''">d_num_field ,</if>
<if test="dNumFieldCode != null and dNumFieldCode != ''">d_num_field_code ,</if>
<if test="dNumFieldName != null and dNumFieldName != ''">d_num_field_name ,</if>
<if test="dYbSumField != null and dYbSumField != ''">d_yb_sum_field ,</if>
<if test="dYbSumFieldCode != null and dYbSumFieldCode != ''">d_yb_sum_field_code ,</if>
<if test="dYbSumFieldName != null and dYbSumFieldName != ''">d_yb_sum_field_name ,</if>
<if test="dBbSumField != null and dBbSumField != ''">d_bb_sum_field ,</if>
<if test="dBbSumFieldCode != null and dBbSumFieldCode != ''">d_bb_sum_field_code ,</if>
<if test="dBbSumFieldName != null and dBbSumFieldName != ''">d_bb_sum_field_name ,</if>
<if test="pkCashflow != null and pkCashflow != ''">pk_cashflow ,</if>
<if test="pkSubrelation != null and pkSubrelation != ''">pk_subrelation ,</if>
<if test="remark != null and remark != ''">remark ,</if>
@ -402,29 +598,41 @@
<if test="voucherTypeId != null and voucherTypeId != ''">#{voucherTypeId} ,</if>
<if test="voucherTypeCode != null and voucherTypeCode != ''">#{voucherTypeCode} ,</if>
<if test="voucherTypeName != null and voucherTypeName != ''">#{voucherTypeName} ,</if>
<if test="businessUnitId != null and businessUnitId != ''">#{businessUnitId},</if>
<if test="businessUnitCode != null and businessUnitCode != ''">#{businessUnitCode},</if>
<if test="businessUnitName != null and businessUnitName != ''">#{businessUnitName},</if>
<if test="businessUnitId != null and businessUnitId != ''">#{businessUnitId} ,</if>
<if test="businessUnitCode != null and businessUnitCode != ''">#{businessUnitCode} ,</if>
<if test="businessUnitName != null and businessUnitName != ''">#{businessUnitName} ,</if>
<if test="subjectClassificationId != null">#{subjectClassificationId} ,</if>
<if test="subjectClassificationCode != null and subjectClassificationCode != ''">
#{subjectClassificationCode}
,
#{subjectClassificationCode} ,
</if>
<if test="subjectClassificationName != null and subjectClassificationName != ''">
#{subjectClassificationName}
,
#{subjectClassificationName} ,
</if>
<if test="currencyField != null and currencyField != ''">#{currencyField} ,</if>
<if test="currencyFieldCode != null and currencyFieldCode != ''">#{currencyFieldCode} ,</if>
<if test="currencyFieldName != null and currencyFieldName != ''">#{currencyFieldName} ,</if>
<if test="pkCurrtype != null and pkCurrtype != ''">#{pkCurrtype} ,</if>
<if test="abstractStr != null and abstractStr != ''">#{abstractStr} ,</if>
<if test="abstractRes != null and abstractRes != ''">#{abstractRes} ,</if>
<if test="exchangeRate != null and exchangeRate != ''">#{exchangeRate} ,</if>
<if test="jNumField != null and jNumField != ''">#{jNumField} ,</if>
<if test="jNumFieldCode != null and jNumFieldCode != ''">#{jNumFieldCode} ,</if>
<if test="jNumFieldName != null and jNumFieldName != ''">#{jNumFieldName} ,</if>
<if test="jYbSumField != null and jYbSumField != ''">#{jYbSumField} ,</if>
<if test="jYbSumFieldCode != null and jYbSumFieldCode != ''">#{jYbSumFieldCode} ,</if>
<if test="jYbSumFieldName != null and jYbSumFieldName != ''">#{jYbSumFieldName} ,</if>
<if test="jBbSumField != null and jBbSumField != ''">#{jBbSumField} ,</if>
<if test="jBbSumFieldCode != null and jBbSumFieldCode != ''">#{jBbSumFieldCode} ,</if>
<if test="jBbSumFieldName != null and jBbSumFieldName != ''">#{jBbSumFieldName} ,</if>
<if test="dNumField != null and dNumField != ''">#{dNumField} ,</if>
<if test="dNumFieldCode != null and dNumFieldCode != ''">#{dNumFieldCode} ,</if>
<if test="dNumFieldName != null and dNumFieldName != ''">#{dNumFieldName} ,</if>
<if test="dYbSumField != null and dYbSumField != ''">#{dYbSumField} ,</if>
<if test="dYbSumFieldCode != null and dYbSumFieldCode != ''">#{dYbSumFieldCode} ,</if>
<if test="dYbSumFieldName != null and dYbSumFieldName != ''">#{dYbSumFieldName} ,</if>
<if test="dBbSumField != null and dBbSumField != ''">#{dBbSumField} ,</if>
<if test="dBbSumFieldCode != null and dBbSumFieldCode != ''">#{dBbSumFieldCode} ,</if>
<if test="dBbSumFieldName != null and dBbSumFieldName != ''">#{dBbSumFieldName} ,</if>
<if test="pkCashflow != null and pkCashflow != ''">#{pkCashflow} ,</if>
<if test="pkSubrelation != null and pkSubrelation != ''">#{pkSubrelation} ,</if>
<if test="remark != null and remark != ''">#{remark} ,</if>
@ -451,50 +659,75 @@
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into ae_conf_voucher_template(pk_glorgbook, gl_orgbook_code, gl_orgbook_name, voucher_type_id,
voucher_type_code, voucher_type_name, subject_classification_id, subject_classification_code,
subject_classification_name, currency_field, abstract_str, abstract_res, exchange_rate, j_num_field,
j_yb_sum_field, j_bb_sum_field, d_num_field, d_yb_sum_field, d_bb_sum_field, pk_cashflow, pk_subrelation,
remark, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, create_time, create_user, modify_time,
modify_user, sts, sts)
insert into ae_conf_voucher_template(mdm_id, pk_glorgbook, gl_orgbook_code, gl_orgbook_name, voucher_type_id,
voucher_type_code, voucher_type_name, business_unit_id, business_unit_code, business_unit_name,
subject_classification_id, subject_classification_code, subject_classification_name, currency_field,
currency_field_code, currency_field_name, pk_currtype, abstract_str, abstract_res, exchange_rate, j_num_field,
j_num_field_code, j_num_field_name, j_yb_sum_field, j_yb_sum_field_code, j_yb_sum_field_name, j_bb_sum_field,
j_bb_sum_field_code, j_bb_sum_field_name, d_num_field, d_num_field_code, d_num_field_name, d_yb_sum_field,
d_yb_sum_field_code, d_yb_sum_field_name, d_bb_sum_field, d_bb_sum_field_code, d_bb_sum_field_name, pk_cashflow,
pk_subrelation, remark, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, create_time, create_user,
modify_time, modify_user, sts, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.pkGlorgbook},#{entity.glOrgbookCode},#{entity.glOrgbookName},#{entity.voucherTypeId},#{entity.voucherTypeCode},#{entity.voucherTypeName},#{entity.subjectClassificationId},#{entity.subjectClassificationCode},#{entity.subjectClassificationName},#{entity.currencyField},#{entity.abstractStr},#{entity.abstractRes},#{entity.exchangeRate},#{entity.jNumField},#{entity.jYbSumField},#{entity.jBbSumField},#{entity.dNumField},#{entity.dYbSumField},#{entity.dBbSumField},#{entity.pkCashflow},#{entity.pkSubrelation},#{entity.remark},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},now(),#{entity.createUser},now(),#{entity.modifyUser},#{entity.sts},
(#{entity.mdmId},#{entity.pkGlorgbook},#{entity.glOrgbookCode},#{entity.glOrgbookName},#{entity.voucherTypeId},#{entity.voucherTypeCode},#{entity.voucherTypeName},#{entity.businessUnitId},#{entity.businessUnitCode},#{entity.businessUnitName},#{entity.subjectClassificationId},#{entity.subjectClassificationCode},#{entity.subjectClassificationName},#{entity.currencyField},#{entity.currencyFieldCode},#{entity.currencyFieldName},#{entity.pkCurrtype},#{entity.abstractStr},#{entity.abstractRes},#{entity.exchangeRate},#{entity.jNumField},#{entity.jNumFieldCode},#{entity.jNumFieldName},#{entity.jYbSumField},#{entity.jYbSumFieldCode},#{entity.jYbSumFieldName},#{entity.jBbSumField},#{entity.jBbSumFieldCode},#{entity.jBbSumFieldName},#{entity.dNumField},#{entity.dNumFieldCode},#{entity.dNumFieldName},#{entity.dYbSumField},#{entity.dYbSumFieldCode},#{entity.dYbSumFieldName},#{entity.dBbSumField},#{entity.dBbSumFieldCode},#{entity.dBbSumFieldName},#{entity.pkCashflow},#{entity.pkSubrelation},#{entity.remark},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.create_time},#{entity.createUser},#{entity.modify_time},#{entity.modifyUser},#{entity.sts},
'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into ae_conf_voucher_template(pk_glorgbook, gl_orgbook_code, gl_orgbook_name, voucher_type_id,
voucher_type_code, voucher_type_name, subject_classification_id, subject_classification_code,
subject_classification_name, currency_field, abstract_str, abstract_res, exchange_rate, j_num_field,
j_yb_sum_field, j_bb_sum_field, d_num_field, d_yb_sum_field, d_bb_sum_field, pk_cashflow, pk_subrelation,
remark, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, create_time, create_user, modify_time,
modify_user, sts)
insert into ae_conf_voucher_template(mdm_id, pk_glorgbook, gl_orgbook_code, gl_orgbook_name, voucher_type_id,
voucher_type_code, voucher_type_name, business_unit_id, business_unit_code, business_unit_name,
subject_classification_id, subject_classification_code, subject_classification_name, currency_field,
currency_field_code, currency_field_name, pk_currtype, abstract_str, abstract_res, exchange_rate, j_num_field,
j_num_field_code, j_num_field_name, j_yb_sum_field, j_yb_sum_field_code, j_yb_sum_field_name, j_bb_sum_field,
j_bb_sum_field_code, j_bb_sum_field_name, d_num_field, d_num_field_code, d_num_field_name, d_yb_sum_field,
d_yb_sum_field_code, d_yb_sum_field_name, d_bb_sum_field, d_bb_sum_field_code, d_bb_sum_field_name, pk_cashflow,
pk_subrelation, remark, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, create_time, create_user,
modify_time, modify_user, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.pkGlorgbook},#{entity.glOrgbookCode},#{entity.glOrgbookName},#{entity.voucherTypeId},#{entity.voucherTypeCode},#{entity.voucherTypeName},#{entity.subjectClassificationId},#{entity.subjectClassificationCode},#{entity.subjectClassificationName},#{entity.currencyField},#{entity.abstractStr},#{entity.abstractRes},#{entity.exchangeRate},#{entity.jNumField},#{entity.jYbSumField},#{entity.jBbSumField},#{entity.dNumField},#{entity.dYbSumField},#{entity.dBbSumField},#{entity.pkCashflow},#{entity.pkSubrelation},#{entity.remark},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.create_time},#{entity.createUser},#{entity.modify_time},#{entity.modifyUser},#{entity.sts})
(#{entity.mdmId},#{entity.pkGlorgbook},#{entity.glOrgbookCode},#{entity.glOrgbookName},#{entity.voucherTypeId},#{entity.voucherTypeCode},#{entity.voucherTypeName},#{entity.businessUnitId},#{entity.businessUnitCode},#{entity.businessUnitName},#{entity.subjectClassificationId},#{entity.subjectClassificationCode},#{entity.subjectClassificationName},#{entity.currencyField},#{entity.currencyFieldCode},#{entity.currencyFieldName},#{entity.pkCurrtype},#{entity.abstractStr},#{entity.abstractRes},#{entity.exchangeRate},#{entity.jNumField},#{entity.jNumFieldCode},#{entity.jNumFieldName},#{entity.jYbSumField},#{entity.jYbSumFieldCode},#{entity.jYbSumFieldName},#{entity.jBbSumField},#{entity.jBbSumFieldCode},#{entity.jBbSumFieldName},#{entity.dNumField},#{entity.dNumFieldCode},#{entity.dNumFieldName},#{entity.dYbSumField},#{entity.dYbSumFieldCode},#{entity.dYbSumFieldName},#{entity.dBbSumField},#{entity.dBbSumFieldCode},#{entity.dBbSumFieldName},#{entity.pkCashflow},#{entity.pkSubrelation},#{entity.remark},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.create_time},#{entity.createUser},#{entity.modify_time},#{entity.modifyUser},#{entity.sts})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
pk_glorgbook = values(pk_glorgbook),
gl_orgbook_code = values(gl_orgbook_code),
gl_orgbook_name = values(gl_orgbook_name),
voucher_type_id = values(voucher_type_id),
voucher_type_code = values(voucher_type_code),
voucher_type_name = values(voucher_type_name),
business_unit_id = values(business_unit_id),
business_unit_code = values(business_unit_code),
business_unit_name = values(business_unit_name),
subject_classification_id = values(subject_classification_id),
subject_classification_code = values(subject_classification_code),
subject_classification_name = values(subject_classification_name),
currency_field = values(currency_field),
currency_field_code = values(currency_field_code),
currency_field_name = values(currency_field_name),
pk_currtype = values(pk_currtype),
abstract_str = values(abstract_str),
abstract_res = values(abstract_res),
exchange_rate = values(exchange_rate),
j_num_field = values(j_num_field),
j_num_field_code = values(j_num_field_code),
j_num_field_name = values(j_num_field_name),
j_yb_sum_field = values(j_yb_sum_field),
j_yb_sum_field_code = values(j_yb_sum_field_code),
j_yb_sum_field_name = values(j_yb_sum_field_name),
j_bb_sum_field = values(j_bb_sum_field),
j_bb_sum_field_code = values(j_bb_sum_field_code),
j_bb_sum_field_name = values(j_bb_sum_field_name),
d_num_field = values(d_num_field),
d_num_field_code = values(d_num_field_code),
d_num_field_name = values(d_num_field_name),
d_yb_sum_field = values(d_yb_sum_field),
d_yb_sum_field_code = values(d_yb_sum_field_code),
d_yb_sum_field_name = values(d_yb_sum_field_name),
d_bb_sum_field = values(d_bb_sum_field),
d_bb_sum_field_code = values(d_bb_sum_field_code),
d_bb_sum_field_name = values(d_bb_sum_field_name),
pk_cashflow = values(pk_cashflow),
pk_subrelation = values(pk_subrelation),
remark = values(remark),
@ -526,9 +759,11 @@
<if test="voucherTypeId != null and voucherTypeId != ''">voucher_type_id = #{voucherTypeId},</if>
<if test="voucherTypeCode != null and voucherTypeCode != ''">voucher_type_code = #{voucherTypeCode},</if>
<if test="voucherTypeName != null and voucherTypeName != ''">voucher_type_name = #{voucherTypeName},</if>
<if test="businessUnitId != null and businessUnitId != ''">and business_unit_id = #{businessUnitId},</if>
<if test="businessUnitCode != null and businessUnitCode != ''">and business_unit_code = #{businessUnitCode},</if>
<if test="businessUnitName != null and businessUnitName != ''">and business_unit_name = #{businessUnitName},</if>
<if test="businessUnitId != null and businessUnitId != ''">business_unit_id = #{businessUnitId},</if>
<if test="businessUnitCode != null and businessUnitCode != ''">business_unit_code = #{businessUnitCode},
</if>
<if test="businessUnitName != null and businessUnitName != ''">business_unit_name = #{businessUnitName},
</if>
<if test="subjectClassificationId != null">subject_classification_id = #{subjectClassificationId},</if>
<if test="subjectClassificationCode != null and subjectClassificationCode != ''">subject_classification_code
= #{subjectClassificationCode},
@ -537,15 +772,34 @@
= #{subjectClassificationName},
</if>
<if test="currencyField != null and currencyField != ''">currency_field = #{currencyField},</if>
<if test="currencyFieldCode != null and currencyFieldCode != ''">currency_field_code =
#{currencyFieldCode},
</if>
<if test="currencyFieldName != null and currencyFieldName != ''">currency_field_name =
#{currencyFieldName},
</if>
<if test="pkCurrtype != null and pkCurrtype != ''">pk_currtype = #{pkCurrtype},</if>
<if test="abstractStr != null and abstractStr != ''">abstract_str = #{abstractStr},</if>
<if test="abstractRes != null and abstractRes != ''">abstract_res = #{abstractRes},</if>
<if test="exchangeRate != null and exchangeRate != ''">exchange_rate = #{exchangeRate},</if>
<if test="jNumField != null and jNumField != ''">j_num_field = #{jNumField},</if>
<if test="jNumFieldCode != null and jNumFieldCode != ''">j_num_field_code = #{jNumFieldCode},</if>
<if test="jNumFieldName != null and jNumFieldName != ''">j_num_field_name = #{jNumFieldName},</if>
<if test="jYbSumField != null and jYbSumField != ''">j_yb_sum_field = #{jYbSumField},</if>
<if test="jYbSumFieldCode != null and jYbSumFieldCode != ''">j_yb_sum_field_code = #{jYbSumFieldCode},</if>
<if test="jYbSumFieldName != null and jYbSumFieldName != ''">j_yb_sum_field_name = #{jYbSumFieldName},</if>
<if test="jBbSumField != null and jBbSumField != ''">j_bb_sum_field = #{jBbSumField},</if>
<if test="jBbSumFieldCode != null and jBbSumFieldCode != ''">j_bb_sum_field_code = #{jBbSumFieldCode},</if>
<if test="jBbSumFieldName != null and jBbSumFieldName != ''">j_bb_sum_field_name = #{jBbSumFieldName},</if>
<if test="dNumField != null and dNumField != ''">d_num_field = #{dNumField},</if>
<if test="dNumFieldCode != null and dNumFieldCode != ''">d_num_field_code = #{dNumFieldCode},</if>
<if test="dNumFieldName != null and dNumFieldName != ''">d_num_field_name = #{dNumFieldName},</if>
<if test="dYbSumField != null and dYbSumField != ''">d_yb_sum_field = #{dYbSumField},</if>
<if test="dYbSumFieldCode != null and dYbSumFieldCode != ''">d_yb_sum_field_code = #{dYbSumFieldCode},</if>
<if test="dYbSumFieldName != null and dYbSumFieldName != ''">d_yb_sum_field_name = #{dYbSumFieldName},</if>
<if test="dBbSumField != null and dBbSumField != ''">d_bb_sum_field = #{dBbSumField},</if>
<if test="dBbSumFieldCode != null and dBbSumFieldCode != ''">d_bb_sum_field_code = #{dBbSumFieldCode},</if>
<if test="dBbSumFieldName != null and dBbSumFieldName != ''">d_bb_sum_field_name = #{dBbSumFieldName},</if>
<if test="pkCashflow != null and pkCashflow != ''">pk_cashflow = #{pkCashflow},</if>
<if test="pkSubrelation != null and pkSubrelation != ''">pk_subrelation = #{pkSubrelation},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
@ -560,10 +814,8 @@
<if test="def9 != null and def9 != ''">def9 = #{def9},</if>
<if test="def10 != null and def10 != ''">def10 = #{def10},</if>
<if test="create_time != null">create_time = #{create_time},</if>
<if test="create_time == null">create_time = now(),</if>
<if test="createUser != null and createUser != ''">create_user = #{createUser},</if>
<if test="modify_time != null">modify_time = #{modify_time},</if>
<if test="modify_time == null">modify_time = now(),</if>
<if test="modifyUser != null and modifyUser != ''">modify_user = #{modifyUser},</if>
<if test="sts != null and sts != ''">sts = #{sts},</if>
</trim>
@ -573,7 +825,8 @@
<update id="entity_logicDelete"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateEntity">
update ae_conf_voucher_template
set sts= 'N',modify_time = now()
set sts= 'N',
modify_time = now()
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
@ -582,12 +835,20 @@
update ae_conf_voucher_template set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="pkGlorgbook != null and pkGlorgbook != ''">and pk_glorgbook = #{pkGlorgbook}</if>
<if test="glOrgbookCode != null and glOrgbookCode != ''">and gl_orgbook_code = #{glOrgbookCode}</if>
<if test="glOrgbookName != null and glOrgbookName != ''">and gl_orgbook_name = #{glOrgbookName}</if>
<if test="voucherTypeId != null and voucherTypeId != ''">and voucher_type_id = #{voucherTypeId}</if>
<if test="voucherTypeCode != null and voucherTypeCode != ''">and voucher_type_code = #{voucherTypeCode}</if>
<if test="voucherTypeName != null and voucherTypeName != ''">and voucher_type_name = #{voucherTypeName}</if>
<if test="businessUnitId != null and businessUnitId != ''">and business_unit_id = #{businessUnitId}</if>
<if test="businessUnitCode != null and businessUnitCode != ''">and business_unit_code =
#{businessUnitCode}
</if>
<if test="businessUnitName != null and businessUnitName != ''">and business_unit_name =
#{businessUnitName}
</if>
<if test="subjectClassificationId != null">and subject_classification_id = #{subjectClassificationId}</if>
<if test="subjectClassificationCode != null and subjectClassificationCode != ''">and
subject_classification_code = #{subjectClassificationCode}
@ -596,15 +857,42 @@
subject_classification_name = #{subjectClassificationName}
</if>
<if test="currencyField != null and currencyField != ''">and currency_field = #{currencyField}</if>
<if test="currencyFieldCode != null and currencyFieldCode != ''">and currency_field_code =
#{currencyFieldCode}
</if>
<if test="currencyFieldName != null and currencyFieldName != ''">and currency_field_name =
#{currencyFieldName}
</if>
<if test="pkCurrtype != null and pkCurrtype != ''">and pk_currtype = #{pkCurrtype}</if>
<if test="abstractStr != null and abstractStr != ''">and abstract_str = #{abstractStr}</if>
<if test="abstractRes != null and abstractRes != ''">and abstract_res = #{abstractRes}</if>
<if test="exchangeRate != null and exchangeRate != ''">and exchange_rate = #{exchangeRate}</if>
<if test="jNumField != null and jNumField != ''">and j_num_field = #{jNumField}</if>
<if test="jNumFieldCode != null and jNumFieldCode != ''">and j_num_field_code = #{jNumFieldCode}</if>
<if test="jNumFieldName != null and jNumFieldName != ''">and j_num_field_name = #{jNumFieldName}</if>
<if test="jYbSumField != null and jYbSumField != ''">and j_yb_sum_field = #{jYbSumField}</if>
<if test="jYbSumFieldCode != null and jYbSumFieldCode != ''">and j_yb_sum_field_code = #{jYbSumFieldCode}
</if>
<if test="jYbSumFieldName != null and jYbSumFieldName != ''">and j_yb_sum_field_name = #{jYbSumFieldName}
</if>
<if test="jBbSumField != null and jBbSumField != ''">and j_bb_sum_field = #{jBbSumField}</if>
<if test="jBbSumFieldCode != null and jBbSumFieldCode != ''">and j_bb_sum_field_code = #{jBbSumFieldCode}
</if>
<if test="jBbSumFieldName != null and jBbSumFieldName != ''">and j_bb_sum_field_name = #{jBbSumFieldName}
</if>
<if test="dNumField != null and dNumField != ''">and d_num_field = #{dNumField}</if>
<if test="dNumFieldCode != null and dNumFieldCode != ''">and d_num_field_code = #{dNumFieldCode}</if>
<if test="dNumFieldName != null and dNumFieldName != ''">and d_num_field_name = #{dNumFieldName}</if>
<if test="dYbSumField != null and dYbSumField != ''">and d_yb_sum_field = #{dYbSumField}</if>
<if test="dYbSumFieldCode != null and dYbSumFieldCode != ''">and d_yb_sum_field_code = #{dYbSumFieldCode}
</if>
<if test="dYbSumFieldName != null and dYbSumFieldName != ''">and d_yb_sum_field_name = #{dYbSumFieldName}
</if>
<if test="dBbSumField != null and dBbSumField != ''">and d_bb_sum_field = #{dBbSumField}</if>
<if test="dBbSumFieldCode != null and dBbSumFieldCode != ''">and d_bb_sum_field_code = #{dBbSumFieldCode}
</if>
<if test="dBbSumFieldName != null and dBbSumFieldName != ''">and d_bb_sum_field_name = #{dBbSumFieldName}
</if>
<if test="pkCashflow != null and pkCashflow != ''">and pk_cashflow = #{pkCashflow}</if>
<if test="pkSubrelation != null and pkSubrelation != ''">and pk_subrelation = #{pkSubrelation}</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>

View File

@ -17,4 +17,6 @@ public interface IAeConfVoucherTemplateService extends IBaseService<AeConfVouche
AeConfVoucherTemplateEntity saveEntity(AeConfVoucherTemplateEntity entity);
AeConfVoucherTemplateEntity updateEntity(AeConfVoucherTemplateEntity entity);
AeConfVoucherTemplateEntity deleteEntity(AeConfVoucherTemplateEntity entity);
boolean checkAbstract(AeConfVoucherTemplateEntity entity);
}

View File

@ -63,13 +63,13 @@ public class AeConfVoucherTemplateAssistServiceImpl extends BaseService<AeConfVo
break;
case "saveEntity":
Assert.notNull(entity.getVoucherTemplateId(), "辅助核算新增时事项分录模板ID不能为空");
Assert.notNull(entity.getFileId(), "辅助核算新增时档案主数据id不能为空");
Assert.notNull(entity.getFileMapperId(), "辅助核算新增时档案明细id不能为空");
Assert.notNull(entity.getMdmId(), "辅助核算新增时档案主数据id不能为空");
Assert.notNull(entity.getFieldId(), "辅助核算新增时档案明细id不能为空");
break;
case "updateEntity":
Assert.notNull(entity.getId(), "辅助核算更新时辅助核算明细id不能为空");
Assert.notNull(entity.getFileId(), "辅助核算更新时档案主数据id不能为空");
Assert.notNull(entity.getFileMapperId(), "辅助核算更新时档案明细id不能为空");
Assert.notNull(entity.getMdmId(), "辅助核算更新时档案主数据id不能为空");
Assert.notNull(entity.getFieldId(), "辅助核算更新时档案明细id不能为空");
break;
case "deleteEntity":
Assert.notNull(entity.getId(), "辅助核算删除时辅助核算明细id不能为空");

View File

@ -1,6 +1,18 @@
package com.hzya.frame.voucher.ae.comf.template.service.impl;
import cn.hutool.core.lang.Assert;
import com.hzya.frame.mdm.mdmModule.dao.IMdmModuleDao;
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
import com.hzya.frame.mdm.mdmModule.service.IMdmModuleService;
import com.hzya.frame.mdm.mdmModuleDb.dao.IMdmModuleDbDao;
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
import com.hzya.frame.mdm.mdmModuleDbFileds.dao.IMdmModuleDbFiledsDao;
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
import com.hzya.frame.mdm.mdmModuleDbFileds.service.IMdmModuleDbFiledsService;
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.dao.IMdmModuleDbFiledsRuleDao;
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity;
import com.hzya.frame.voucher.ae.comf.subject.dao.IAeConfSubjectClassificationDao;
import com.hzya.frame.voucher.ae.comf.subject.entity.AeConfSubjectClassificationEntity;
import com.hzya.frame.voucher.ae.comf.template.dao.IAeConfVoucherTemplateAssistDao;
import com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateAssistEntity;
import com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateEntity;
@ -13,6 +25,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import com.hzya.frame.basedao.service.impl.BaseService;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* (AeConfVoucherTemplate)表服务实现类
@ -26,6 +40,17 @@ public class AeConfVoucherTemplateServiceImpl extends BaseService<AeConfVoucherT
private IAeConfVoucherTemplateDao templateDao;
@Autowired
private IAeConfVoucherTemplateAssistDao templateAssistDao;
@Autowired
private IAeConfSubjectClassificationDao subjectClassificationDao;
@Autowired
private IMdmModuleDao mdmModuleDao;
@Autowired
private IMdmModuleDbDao mdmModuleDbDao;
@Autowired
private IMdmModuleDbFiledsDao mdmModuleDbFiledsDao;
@Autowired
private IMdmModuleDbFiledsRuleDao mdmModuleDbFiledsRuleDao;
@Autowired
public void setAeConfVoucherTemplateDao(IAeConfVoucherTemplateDao dao) {
@ -66,6 +91,21 @@ public class AeConfVoucherTemplateServiceImpl extends BaseService<AeConfVoucherT
@Override
public AeConfVoucherTemplateEntity saveEntity(AeConfVoucherTemplateEntity entity) {
checkTempNull("saveEntity", entity);
//校验摘要
checkAbstract(entity);
//转换摘要
transformAbstract(entity);
//查询分类定义
AeConfSubjectClassificationEntity classificationEntity = new AeConfSubjectClassificationEntity();
classificationEntity.setId(String.valueOf(entity.getSubjectClassificationId()));
List<AeConfSubjectClassificationEntity> query = subjectClassificationDao.query(classificationEntity);
AeConfSubjectClassificationEntity ification = query.get(0);
entity.setSubjectClassificationCode(ification.getCode());
entity.setSubjectClassificationName(ification.getName());
AeConfVoucherTemplateEntity save = templateDao.save(entity);
//保存子表
if (entity.getAssistEntityList() != null && entity.getAssistEntityList().size() != 0) {
@ -79,11 +119,30 @@ public class AeConfVoucherTemplateServiceImpl extends BaseService<AeConfVoucherT
}
/**
* 删除所有辅助核算重新新增
*/
@Override
public AeConfVoucherTemplateEntity updateEntity(AeConfVoucherTemplateEntity entity) {
checkTempNull("updateEntity", entity);
templateDao.update(entity);
return null;
//查询之前的辅助核算
AeConfVoucherTemplateAssistEntity templateAssistEntity = new AeConfVoucherTemplateAssistEntity();
templateAssistEntity.setVoucherTemplateId(Long.valueOf(entity.getId()));
List<AeConfVoucherTemplateAssistEntity> query = templateAssistDao.query(templateAssistEntity);
for (AeConfVoucherTemplateAssistEntity aeConfVoucherTemplateAssistEntity : query) {
templateAssistDao.logicRemove(aeConfVoucherTemplateAssistEntity);
}
List<AeConfVoucherTemplateAssistEntity> assistEntityList = entity.getAssistEntityList();
for (AeConfVoucherTemplateAssistEntity aeConfVoucherTemplateAssistEntity : assistEntityList) {
checkTempAssist("saveEntity", aeConfVoucherTemplateAssistEntity);
aeConfVoucherTemplateAssistEntity.setId(null);
templateAssistDao.save(aeConfVoucherTemplateAssistEntity);
}
return entity;
}
/**
@ -98,6 +157,7 @@ public class AeConfVoucherTemplateServiceImpl extends BaseService<AeConfVoucherT
List<AeConfVoucherTemplateAssistEntity> assistEntityList = entity.getAssistEntityList();
if (assistEntityList != null && assistEntityList.size() != 0) {
for (AeConfVoucherTemplateAssistEntity aeConfVoucherTemplateAssistEntity : assistEntityList) {
checkTempAssist("deleteEntity", aeConfVoucherTemplateAssistEntity);
templateAssistDao.logicRemove(aeConfVoucherTemplateAssistEntity);
}
}
@ -106,54 +166,145 @@ public class AeConfVoucherTemplateServiceImpl extends BaseService<AeConfVoucherT
return null;
}
// @Override
// public boolean checkAbstract(AeConfVoucherTemplateEntity entity) {
// boolean flag = false;
// String abstractRes = entity.getAbstractRes();
// String[] split = abstractRes.split("\\+");
// System.out.println(split);
// for (String str : split) {
// if (str.startsWith("@@$")) {//单据字段
// // 使用正则表达式匹配 @@$对象名.字段名
// Pattern pattern = Pattern.compile("@@\\$(.*?)\\.(.*)");
// Matcher matcher = pattern.matcher(str);
// if (matcher.find()) {
// String objectName = matcher.group(1); // 对象名"销售订单明细"
// String fieldName = matcher.group(2); // 字段名"原币-原始单据业务发生币种"
//
// System.out.println("对象名: " + objectName);
// System.out.println("字段名: " + fieldName);
// } else {
// return flag;
// }
// }
// }
// return flag;
//
// }
@Override
public boolean checkAbstract(AeConfVoucherTemplateEntity entity) {
boolean flag = true;
String abstractRes = entity.getAbstractRes();
String[] split = abstractRes.split("\\+");
System.out.println(split);
for (String str : split) {
if (str.startsWith("@@$")) {//单据字段
// 使用正则表达式匹配 @@$对象名.字段名
String substring = str.substring(3, str.length());
String[] subSplit = substring.split("\\.");
int length = subSplit.length;
switch (length) {
case 1://表名
flag = false;
break;
case 2://表名.字段
MdmModuleDbEntity mdmModuleDbEntity2 = queryDb(entity.getMdmId(), subSplit[0]);
if (mdmModuleDbEntity2 == null) {
flag = false;
}
//获取db_id
String dbId2 = mdmModuleDbEntity2.getId();
MdmModuleDbFiledsEntity mdmModuleDbFiledsEntity2 = queryFileds(dbId2, subSplit[1]);
if (mdmModuleDbFiledsEntity2 == null) {
flag = false;
}
System.out.println(2);
break;
case 3://表名.字段.字段,需要查询倒数第二次字段关联的表
MdmModuleDbEntity mdmModuleDbEntity3 = queryDb(entity.getMdmId(), subSplit[0]);
if (mdmModuleDbEntity3 == null) {
flag = false;
}
//获取db_id
String dbId3 = mdmModuleDbEntity3.getId();
MdmModuleDbFiledsEntity mdmModuleDbFiledsEntity3 = queryFileds(dbId3, subSplit[1]);
if (mdmModuleDbFiledsEntity3 == null) {
flag = false;
}
//获取关联表
System.out.println(3);
break;
case 4://表名.字段.字段.字段
break;
}
}
}
return flag;
}
/**
* 根据类型校验必填字段
* 查询数据表
*/
public void checkTempNull(String type, AeConfVoucherTemplateEntity entity) {
public MdmModuleDbEntity queryDb(String mdmId, String remark) {
MdmModuleDbEntity mdmModuleDbEntity = new MdmModuleDbEntity();
mdmModuleDbEntity.setMdmId(mdmId);
mdmModuleDbEntity.setRemark(remark);
List<MdmModuleDbEntity> dbList = mdmModuleDbDao.query(mdmModuleDbEntity);
if (dbList.size() == 0 || dbList.size() > 1) {
return null;
}
return dbList.get(0);
}
/**
* 查询字段们
*/
public MdmModuleDbFiledsEntity queryFileds(String dbId, String filedName) {
MdmModuleDbFiledsEntity mdmModuleDbFiledsEntity = new MdmModuleDbFiledsEntity();
mdmModuleDbFiledsEntity.setDbId(dbId);
List<MdmModuleDbFiledsEntity> filedsList = mdmModuleDbFiledsDao.query(mdmModuleDbFiledsEntity);
for (MdmModuleDbFiledsEntity dbFiledsEntity : filedsList) {
if (filedName.equals(dbFiledsEntity.getChName())) {
return dbFiledsEntity;
}
}
return null;
}
/**
* 查找字段关联表
*/
public MdmModuleDbFiledsEntity queryFiledRelevanceDb(MdmModuleDbFiledsEntity filedsEntity) {
//查询字段的rules
MdmModuleDbFiledsRuleEntity mdmModuleDbFiledsRuleEntity = new MdmModuleDbFiledsRuleEntity();
mdmModuleDbFiledsRuleEntity.setFiledId(filedsEntity.getId());
List<MdmModuleDbFiledsRuleEntity> ruleList = mdmModuleDbFiledsRuleDao.query(mdmModuleDbFiledsRuleEntity);
return null;
}
private void transformAbstract(AeConfVoucherTemplateEntity entity) {
}
public void checkTempAssist(String type, AeConfVoucherTemplateAssistEntity entity) {
switch (type) {
case "queryAll":
Assert.notNull(entity.getMdmId(), "查询全部时主数id据不能为空");
Assert.notNull(entity.getPkGlorgbook(), "查询全部时,账簿主键不能为空");
Assert.notNull(entity.getVoucherTypeId(), "查询全部时,凭证类别主键不能为空");
break;
case "queryById":
Assert.notNull(entity.getId(), "根据id查询全部时id不能为空");
Assert.notNull(entity.getMdmId(), "根据id查询全部时主数id据不能为空");
Assert.notNull(entity.getPkGlorgbook(), "根据id查询全部时账簿主键不能为空");
Assert.notNull(entity.getVoucherTypeId(), "根据id查询全部时凭证类别主键不能为空");
break;
case "saveEntity":
Assert.notNull(entity.getMdmId(), "事项分录模板配置新增时主数id据不能为空");
Assert.notNull(entity.getPkGlorgbook(), "事项分录模板配置新增时,账簿主键不能为空");
Assert.notNull(entity.getGlOrgbookCode(), "事项分录模板配置新增时,账簿编码不能为空");
Assert.notNull(entity.getGlOrgbookName(), "事项分录模板配置新增时,账簿名称不能为空");
Assert.notNull(entity.getVoucherTypeId(), "事项分录模板配置新增时,凭证类别主键不能为空");
Assert.notNull(entity.getVoucherTypeName(), "事项分录模板配置新增时,凭证类别名称不能为空");
Assert.notNull(entity.getAbstractStr(), "事项分录模板配置新增时,摘要不能为空");
// Assert.notNull(entity.getJNumField(), "事项分录模板配置新增时,借方数量字段不能为空");
// Assert.notNull(entity.getJYbSumField(), "事项分录模板配置新增时,借方原币金额字段不能为空");
// Assert.notNull(entity.getJBbSumField(), "事项分录模板配置新增时,借方本币金额字段不能为空");
// Assert.notNull(entity.getDNumField(), "事项分录模板配置新增时,贷方数量字段不能为空");
// Assert.notNull(entity.getDYbSumField(), "事项分录模板配置新增时,贷方原币金额字段不能为空");
// Assert.notNull(entity.getDBbSumField(), "事项分录模板配置新增时,贷方本币金额字段不能为空");
Assert.notNull(entity.getPkCashflow(), "事项分录模板配置新增时,现金流量项目不能为空");
break;
case "updateEntity":
Assert.notNull(entity.getId(), "根据id更新时id不能为空");
Assert.notNull(entity.getMdmId(), "根据id更新时主数id据不能为空");
Assert.notNull(entity.getPkGlorgbook(), "根据id更新时账簿主键不能为空");
Assert.notNull(entity.getVoucherTypeId(), "根据id更新时凭证类别主键不能为空");
Assert.notNull(entity.getId(), "更新辅助核算时id不能为空");
break;
case "deleteEntity":
Assert.notNull(entity.getId(), "根据id删除时id不能为空");
Assert.notNull(entity.getId(), "更新辅助核算时id不能为空");
break;
}
}
public void checkTempAssist(String type, AeConfVoucherTemplateEntity entity) {
}
/**
* 查询辅助核算
*/
@ -163,4 +314,49 @@ public class AeConfVoucherTemplateServiceImpl extends BaseService<AeConfVoucherT
List<AeConfVoucherTemplateAssistEntity> query = templateAssistDao.query(aeConfVoucherTemplateAssistEntity);
entity.setAssistEntityList(query);
}
/**
* 根据类型校验必填字段
*/
public void checkTempNull(String type, AeConfVoucherTemplateEntity entity) {
switch (type) {
case "queryAll":
Assert.notNull(entity.getMdmId(), "查询全部时主数据id不能为空");
Assert.notNull(entity.getPkGlorgbook(), "查询全部时,账簿主键不能为空");
Assert.notNull(entity.getVoucherTypeId(), "查询全部时,凭证类别主键不能为空");
break;
case "queryById":
Assert.notNull(entity.getId(), "根据id查询全部时id不能为空");
Assert.notNull(entity.getMdmId(), "根据id查询全部时主数据id不能为空");
Assert.notNull(entity.getPkGlorgbook(), "根据id查询全部时账簿主键不能为空");
Assert.notNull(entity.getVoucherTypeId(), "根据id查询全部时凭证类别主键不能为空");
break;
case "saveEntity":
Assert.notNull(entity.getMdmId(), "事项分录模板配置新增时主数据id不能为空");
Assert.notNull(entity.getPkGlorgbook(), "事项分录模板配置新增时,账簿主键不能为空");
Assert.notNull(entity.getGlOrgbookCode(), "事项分录模板配置新增时,账簿编码不能为空");
Assert.notNull(entity.getGlOrgbookName(), "事项分录模板配置新增时,账簿名称不能为空");
Assert.notNull(entity.getVoucherTypeId(), "事项分录模板配置新增时,凭证类别主键不能为空");
Assert.notNull(entity.getVoucherTypeName(), "事项分录模板配置新增时,凭证类别名称不能为空");
Assert.notNull(entity.getAbstractRes(), "事项分录模板配置新增时,摘要不能为空");
// Assert.notNull(entity.getJNumField(), "事项分录模板配置新增时,借方数量字段不能为空");
// Assert.notNull(entity.getJYbSumField(), "事项分录模板配置新增时,借方原币金额字段不能为空");
// Assert.notNull(entity.getJBbSumField(), "事项分录模板配置新增时,借方本币金额字段不能为空");
// Assert.notNull(entity.getDNumField(), "事项分录模板配置新增时,贷方数量字段不能为空");
// Assert.notNull(entity.getDYbSumField(), "事项分录模板配置新增时,贷方原币金额字段不能为空");
// Assert.notNull(entity.getDBbSumField(), "事项分录模板配置新增时,贷方本币金额字段不能为空");
Assert.notNull(entity.getPkCashflow(), "事项分录模板配置新增时,现金流量项目不能为空");
break;
case "updateEntity":
Assert.notNull(entity.getId(), "根据id更新时id不能为空");
Assert.notNull(entity.getMdmId(), "根据id更新时主数据id不能为空");
Assert.notNull(entity.getPkGlorgbook(), "根据id更新时账簿主键不能为空");
Assert.notNull(entity.getVoucherTypeId(), "根据id更新时凭证类别主键不能为空");
break;
case "deleteEntity":
Assert.notNull(entity.getId(), "根据id删除时id不能为空");
break;
}
}
}