1、新增币种查询。

2、新增事项分录模板模块
This commit is contained in:
zhengyf 2025-06-27 10:39:15 +08:00
parent 36f00eac70
commit 82a16f8af6
21 changed files with 1830 additions and 3 deletions

View File

@ -19,7 +19,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -302,6 +301,21 @@ public class BdController extends DefaultController {
}
/**
* 币种查询
*/
@RequestMapping(value = "/queryBdCurrtype", method = RequestMethod.POST)
public JsonResultEntity queryBdCurrtype(@RequestBody BdCurrtypeVO entity) {
try {
List<BdCurrtypeVO> list = mdmDBQueryVODAO.queryBdCurrtype(entity);
return getSuccessMessageEntity("请求成功", list);
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
// /**
// *
// */

View File

@ -16,4 +16,6 @@ public interface IMdmDBQueryVODAO extends IBaseDao<MdmDBQueryVO, String> {
List<BdBdinfoEntity> queryBdBdinfoList(BdBdinfoEntity entity);
List<BdAccassitemVO> queryBdInfoBySubjass(BdAccassitemVO entity);
List<BdVoucherTypeVO> queryVoucherType(BdVoucherTypeVO entity);
List<BdCurrtypeVO> queryBdCurrtype(BdCurrtypeVO entity);
}

View File

@ -54,4 +54,10 @@ public class MdmDBQueryVODAOImpl extends MybatisGenericDao<MdmDBQueryVO, String>
return list;
}
@Override
public List<BdCurrtypeVO> queryBdCurrtype(BdCurrtypeVO entity) {
List<BdCurrtypeVO> list =(List<BdCurrtypeVO>) selectList("com.hzya.frame.voucher.ae.comf.bd.dao.impl.MdmDBQueryVODAOImpl.queryBdCurrtype", entity);
return list;
}
}

View File

@ -1,5 +1,6 @@
package com.hzya.frame.voucher.ae.comf.bd.entity.vo;
import com.hzya.frame.web.entity.BaseEntity;
import lombok.Data;
/**
@ -7,7 +8,8 @@ import lombok.Data;
* 会计辅助核算项目
*/
@Data
public class BdAccassitemVO {
public class BdAccassitemVO extends BaseEntity {
private String id;
private String pkAccassitem;
private String code;
private String name;

View File

@ -0,0 +1,19 @@
package com.hzya.frame.voucher.ae.comf.bd.entity.vo;
import com.hzya.frame.web.entity.BaseEntity;
import lombok.Data;
/**
* Created by zydd on 2025-06-27 09:52
* 币种表
*/
@Data
public class BdCurrtypeVO extends BaseEntity {
private String id;
private String pkCurrtype;
private String code;
private String name;
private String currtypesign;
private String dr;
private String ts;
}

View File

@ -9,6 +9,7 @@ import lombok.Data;
*/
@Data
public class BdVoucherTypeVO extends BaseEntity {
private String id;
private String pkVouchertype;
private String code;
private String name;

View File

@ -133,11 +133,12 @@
<select id="queryBdInfoBySubjass" parameterType="com.hzya.frame.voucher.ae.comf.bd.entity.vo.BdAccassitemVO" resultType="com.hzya.frame.voucher.ae.comf.bd.entity.vo.BdAccassitemVO">
SELECT pk_accassitem,code,name,pk_defdef,classid,tablename,tablepkname,dr,ts FROM mdm_bd_accassitem
SELECT id,pk_accassitem,code,name,pk_defdef,classid,tablename,tablepkname,dr,ts FROM mdm_bd_accassitem
</select>
<select id="queryVoucherType" parameterType="com.hzya.frame.voucher.ae.comf.bd.entity.vo.BdVoucherTypeVO" resultType="com.hzya.frame.voucher.ae.comf.bd.entity.vo.BdVoucherTypeVO">
SELECT
id,
pk_vouchertype as pkVouchertype,
code,
name,
@ -149,6 +150,9 @@
ts
FROM mdm_bd_vouchertype
</select>
<select id="queryBdCurrtype" parameterType="com.hzya.frame.voucher.ae.comf.bd.entity.vo.BdCurrtypeVO" resultType="com.hzya.frame.voucher.ae.comf.bd.entity.vo.BdCurrtypeVO">
SELECT id,pk_currtype as pkCurrtype,code,name,currtypesign,dr,ts from mdm_bd_currtype
</select>
</mapper>

View File

@ -0,0 +1,89 @@
package com.hzya.frame.voucher.ae.comf.template.controller;
import com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateAssistEntity;
import com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateEntity;
import com.hzya.frame.voucher.ae.comf.template.service.IAeConfVoucherTemplateAssistService;
import com.hzya.frame.voucher.ae.comf.template.service.IAeConfVoucherTemplateService;
import com.hzya.frame.web.action.DefaultController;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* Created by zydd on 2025-06-25 16:51
*/
@RestController
@RequestMapping("/ae/conf/temp/assist")
public class TemplateAssistController extends DefaultController {
@Autowired
private IAeConfVoucherTemplateService templateService;
@Autowired
private IAeConfVoucherTemplateAssistService templateAssistService;
/**
* 查询全部
*/
@RequestMapping(value = "/queryByTemplateId", method = RequestMethod.POST)
public JsonResultEntity queryByTemplateId(@RequestBody AeConfVoucherTemplateAssistEntity entity) {
try {
List<AeConfVoucherTemplateAssistEntity> list = templateAssistService.queryByTemplateId(entity);
return getSuccessMessageEntity("请求成功", list);
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
@RequestMapping(value = "/save", method = RequestMethod.POST)
public JsonResultEntity saveEntity(@RequestBody AeConfVoucherTemplateAssistEntity entity) {
try {
AeConfVoucherTemplateAssistEntity list = templateAssistService.saveEntity(entity);
return getSuccessMessageEntity("请求成功", list);
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
@RequestMapping(value = "/update", method = RequestMethod.POST)
public JsonResultEntity updateEntity(@RequestBody AeConfVoucherTemplateAssistEntity entity) {
try {
AeConfVoucherTemplateAssistEntity list = templateAssistService.updateEntity(entity);
return getSuccessMessageEntity("请求成功", list);
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
@RequestMapping(value = "/delete", method = RequestMethod.POST)
public JsonResultEntity deleteEntity(@RequestBody AeConfVoucherTemplateAssistEntity entity) {
try {
AeConfVoucherTemplateAssistEntity list = templateAssistService.deleteEntity(entity);
return getSuccessMessageEntity("请求成功", list);
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
// /**
// *
// */
// @RequestMapping(value = "/", method = RequestMethod.POST)
// public JsonResultEntity (@RequestBody entity) {
// try {
// List<> list = mdmDBQueryVODAO.(entity);
// return getSuccessMessageEntity("请求成功", list);
// } catch (Exception e) {
// e.printStackTrace();
// return getFailureMessageEntity(e.getMessage());
// }
// }
}

View File

@ -0,0 +1,105 @@
package com.hzya.frame.voucher.ae.comf.template.controller;
import com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateEntity;
import com.hzya.frame.voucher.ae.comf.template.service.IAeConfVoucherTemplateService;
import com.hzya.frame.web.action.DefaultController;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* Created by zydd on 2025-06-25 16:51
*/
@RestController
@RequestMapping("/ae/conf/temp")
public class TemplateController extends DefaultController {
@Autowired
private IAeConfVoucherTemplateService templateService;
/**
* 查询全部
*/
@RequestMapping(value = "/queryAll", method = RequestMethod.POST)
public JsonResultEntity queryAll(@RequestBody AeConfVoucherTemplateEntity entity) {
try {
List<AeConfVoucherTemplateEntity> list = templateService.queryAll(entity);
return getSuccessMessageEntity("请求成功", list);
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
/**
* 根据id查询
*/
@RequestMapping(value = "/queryById", method = RequestMethod.POST)
public JsonResultEntity queryById(@RequestBody AeConfVoucherTemplateEntity entity) {
try {
AeConfVoucherTemplateEntity aeConfVoucherTemplateEntity = templateService.queryById(entity);
return getSuccessMessageEntity("请求成功", aeConfVoucherTemplateEntity);
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
/**
*
*/
@RequestMapping(value = "/save", method = RequestMethod.POST)
public JsonResultEntity save(@RequestBody AeConfVoucherTemplateEntity entity) {
try {
AeConfVoucherTemplateEntity aeConfVoucherTemplateEntity = templateService.saveEntity(entity);
return getSuccessMessageEntity("请求成功", aeConfVoucherTemplateEntity);
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
@RequestMapping(value = "/update", method = RequestMethod.POST)
public JsonResultEntity updateEntity(@RequestBody AeConfVoucherTemplateEntity entity) {
try {
AeConfVoucherTemplateEntity aeConfVoucherTemplateEntity = templateService.updateEntity(entity);
return getSuccessMessageEntity("请求成功", aeConfVoucherTemplateEntity);
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
@RequestMapping(value = "/delete", method = RequestMethod.POST)
public JsonResultEntity deleteEntity(@RequestBody AeConfVoucherTemplateEntity entity) {
try {
AeConfVoucherTemplateEntity aeConfVoucherTemplateEntity = templateService.deleteEntity(entity);
return getSuccessMessageEntity("请求成功", aeConfVoucherTemplateEntity);
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
// /**
// *
// */
// @RequestMapping(value = "/", method = RequestMethod.POST)
// public JsonResultEntity (@RequestBody entity) {
// try {
// List<> list = mdmDBQueryVODAO.(entity);
// return getSuccessMessageEntity("请求成功", list);
// } catch (Exception e) {
// e.printStackTrace();
// return getFailureMessageEntity(e.getMessage());
// }
// }
}

View File

@ -0,0 +1,16 @@
package com.hzya.frame.voucher.ae.comf.template.dao;
import com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateAssistEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* (ae_conf_voucher_template_assist: table)表数据库访问层
*
* @author zydd
* @since 2025-06-25 16:31:32
*/
public interface IAeConfVoucherTemplateAssistDao extends IBaseDao<AeConfVoucherTemplateAssistEntity, String> {
void saveEntity(AeConfVoucherTemplateAssistEntity assistEntity);
}

View File

@ -0,0 +1,15 @@
package com.hzya.frame.voucher.ae.comf.template.dao;
import com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* (ae_conf_voucher_template: table)表数据库访问层
*
* @author zydd
* @since 2025-06-25 16:22:52
*/
public interface IAeConfVoucherTemplateDao extends IBaseDao<AeConfVoucherTemplateEntity, String> {
}

View File

@ -0,0 +1,21 @@
package com.hzya.frame.voucher.ae.comf.template.dao.impl;
import com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateAssistEntity;
import com.hzya.frame.voucher.ae.comf.template.dao.IAeConfVoucherTemplateAssistDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* (AeConfVoucherTemplateAssist)表数据库访问层
*
* @author zydd
* @since 2025-06-25 16:31:32
*/
@Repository
public class AeConfVoucherTemplateAssistDaoImpl extends MybatisGenericDao<AeConfVoucherTemplateAssistEntity, String> implements IAeConfVoucherTemplateAssistDao{
@Override
public void saveEntity(AeConfVoucherTemplateAssistEntity assistEntity) {
}
}

View File

@ -0,0 +1,17 @@
package com.hzya.frame.voucher.ae.comf.template.dao.impl;
import com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateEntity;
import com.hzya.frame.voucher.ae.comf.template.dao.IAeConfVoucherTemplateDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* (AeConfVoucherTemplate)表数据库访问层
*
* @author zydd
* @since 2025-06-25 16:22:52
*/
@Repository
public class AeConfVoucherTemplateDaoImpl extends MybatisGenericDao<AeConfVoucherTemplateEntity, String> implements IAeConfVoucherTemplateDao{
}

View File

@ -0,0 +1,69 @@
package com.hzya.frame.voucher.ae.comf.template.entity;
import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity;
import lombok.Data;
/**
* (AeConfVoucherTemplateAssist)实体类
*
* @author zydd
* @since 2025-06-25 16:31:32
*/
@Data
public class AeConfVoucherTemplateAssistEntity extends BaseEntity {
/**
* 关联模板id
*/
private Long voucherTemplateId;
/**
* 档案主数据id
*/
private String fileId;
/**
* 档案编码
*/
private String fileCode;
/**
* 档案名称
*/
private String fileName;
/**
* 档案明细id
*/
private String fileMapperId;
/**
* 档案明细code
*/
private String fileMapperCode;
/**
* 档案明细name
*/
private String fileMapperName;
/**
* 备注
*/
private String remark;
private String def1;
private String def2;
private String def3;
private String def4;
private String def5;
private String def6;
private String def7;
private String def8;
private String def9;
private String def10;
/**
* 创建人
*/
private String createUser;
/**
* 修改人
*/
private String modifyUser;
}

View File

@ -0,0 +1,393 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.voucher.ae.comf.template.dao.impl.AeConfVoucherTemplateAssistDaoImpl">
<resultMap id="get-AeConfVoucherTemplateAssistEntity-result"
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="remark" column="remark" jdbcType="VARCHAR"/>
<result property="def1" column="def1" jdbcType="VARCHAR"/>
<result property="def2" column="def2" jdbcType="VARCHAR"/>
<result property="def3" column="def3" jdbcType="VARCHAR"/>
<result property="def4" column="def4" jdbcType="VARCHAR"/>
<result property="def5" column="def5" jdbcType="VARCHAR"/>
<result property="def6" column="def6" jdbcType="VARCHAR"/>
<result property="def7" column="def7" jdbcType="VARCHAR"/>
<result property="def8" column="def8" jdbcType="VARCHAR"/>
<result property="def9" column="def9" jdbcType="VARCHAR"/>
<result property="def10" column="def10" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="createUser" column="create_user" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="modifyUser" column="modify_user" jdbcType="VARCHAR"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<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
,remark
,def1
,def2
,def3
,def4
,def5
,def6
,def7
,def8
,def9
,def10
,create_time
,create_user
,modify_time
,modify_user
,sts
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-AeConfVoucherTemplateAssistEntity-result"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateAssistEntity">
select
<include refid="AeConfVoucherTemplateAssistEntity_Base_Column_List"/>
from ae_conf_voucher_template_assist
<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="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>
<if test="def3 != null and def3 != ''">and def3 = #{def3}</if>
<if test="def4 != null and def4 != ''">and def4 = #{def4}</if>
<if test="def5 != null and def5 != ''">and def5 = #{def5}</if>
<if test="def6 != null and def6 != ''">and def6 = #{def6}</if>
<if test="def7 != null and def7 != ''">and def7 = #{def7}</if>
<if test="def8 != null and def8 != ''">and def8 = #{def8}</if>
<if test="def9 != null and def9 != ''">and def9 = #{def9}</if>
<if test="def10 != null and def10 != ''">and def10 = #{def10}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="createUser != null and createUser != ''">and create_user = #{createUser}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="modifyUser != null and modifyUser != ''">and modify_user = #{modifyUser}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
and sts='Y'
</trim>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateAssistEntity">
select count(1) from ae_conf_voucher_template_assist
<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="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>
<if test="def3 != null and def3 != ''">and def3 = #{def3}</if>
<if test="def4 != null and def4 != ''">and def4 = #{def4}</if>
<if test="def5 != null and def5 != ''">and def5 = #{def5}</if>
<if test="def6 != null and def6 != ''">and def6 = #{def6}</if>
<if test="def7 != null and def7 != ''">and def7 = #{def7}</if>
<if test="def8 != null and def8 != ''">and def8 = #{def8}</if>
<if test="def9 != null and def9 != ''">and def9 = #{def9}</if>
<if test="def10 != null and def10 != ''">and def10 = #{def10}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="createUser != null and createUser != ''">and create_user = #{createUser}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="modifyUser != null and modifyUser != ''">and modify_user = #{modifyUser}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
and sts='Y'
</trim>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-AeConfVoucherTemplateAssistEntity-result"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateAssistEntity">
select
<include refid="AeConfVoucherTemplateAssistEntity_Base_Column_List"/>
from ae_conf_voucher_template_assist
<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="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>
<if test="def3 != null and def3 != ''">and def3 like concat('%',#{def3},'%')</if>
<if test="def4 != null and def4 != ''">and def4 like concat('%',#{def4},'%')</if>
<if test="def5 != null and def5 != ''">and def5 like concat('%',#{def5},'%')</if>
<if test="def6 != null and def6 != ''">and def6 like concat('%',#{def6},'%')</if>
<if test="def7 != null and def7 != ''">and def7 like concat('%',#{def7},'%')</if>
<if test="def8 != null and def8 != ''">and def8 like concat('%',#{def8},'%')</if>
<if test="def9 != null and def9 != ''">and def9 like concat('%',#{def9},'%')</if>
<if test="def10 != null and def10 != ''">and def10 like concat('%',#{def10},'%')</if>
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
<if test="createUser != null and createUser != ''">and create_user like concat('%',#{createUser},'%')</if>
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
<if test="modifyUser != null and modifyUser != ''">and modify_user like concat('%',#{modifyUser},'%')</if>
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
and sts='Y'
</trim>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="AeConfVoucherTemplateAssistentity_list_or" resultMap="get-AeConfVoucherTemplateAssistEntity-result"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateAssistEntity">
select
<include refid="AeConfVoucherTemplateAssistEntity_Base_Column_List"/>
from ae_conf_voucher_template_assist
<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="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>
<if test="def3 != null and def3 != ''">or def3 = #{def3}</if>
<if test="def4 != null and def4 != ''">or def4 = #{def4}</if>
<if test="def5 != null and def5 != ''">or def5 = #{def5}</if>
<if test="def6 != null and def6 != ''">or def6 = #{def6}</if>
<if test="def7 != null and def7 != ''">or def7 = #{def7}</if>
<if test="def8 != null and def8 != ''">or def8 = #{def8}</if>
<if test="def9 != null and def9 != ''">or def9 = #{def9}</if>
<if test="def10 != null and def10 != ''">or def10 = #{def10}</if>
<if test="create_time != null">or create_time = #{create_time}</if>
<if test="createUser != null and createUser != ''">or create_user = #{createUser}</if>
<if test="modify_time != null">or modify_time = #{modify_time}</if>
<if test="modifyUser != null and modifyUser != ''">or modify_user = #{modifyUser}</if>
<if test="sts != null and sts != ''">or sts = #{sts}</if>
and sts='Y'
</trim>
</select>
<!--新增所有列-->
<insert id="entity_insert"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateAssistEntity"
keyProperty="id" useGeneratedKeys="true">
insert into ae_conf_voucher_template_assist(
<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="remark != null and remark != ''">remark ,</if>
<if test="def1 != null and def1 != ''">def1 ,</if>
<if test="def2 != null and def2 != ''">def2 ,</if>
<if test="def3 != null and def3 != ''">def3 ,</if>
<if test="def4 != null and def4 != ''">def4 ,</if>
<if test="def5 != null and def5 != ''">def5 ,</if>
<if test="def6 != null and def6 != ''">def6 ,</if>
<if test="def7 != null and def7 != ''">def7 ,</if>
<if test="def8 != null and def8 != ''">def8 ,</if>
<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>
</trim>
)values(
<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="remark != null and remark != ''">#{remark} ,</if>
<if test="def1 != null and def1 != ''">#{def1} ,</if>
<if test="def2 != null and def2 != ''">#{def2} ,</if>
<if test="def3 != null and def3 != ''">#{def3} ,</if>
<if test="def4 != null and def4 != ''">#{def4} ,</if>
<if test="def5 != null and def5 != ''">#{def5} ,</if>
<if test="def6 != null and def6 != ''">#{def6} ,</if>
<if test="def7 != null and def7 != ''">#{def7} ,</if>
<if test="def8 != null and def8 != ''">#{def8} ,</if>
<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>
</trim>
)
</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)
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},
'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)
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})
</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),
remark = values(remark),
def1 = values(def1),
def2 = values(def2),
def3 = values(def3),
def4 = values(def4),
def5 = values(def5),
def6 = values(def6),
def7 = values(def7),
def8 = values(def8),
def9 = values(def9),
def10 = values(def10),
create_time = values(create_time),
create_user = values(create_user),
modify_time = values(modify_time),
modify_user = values(modify_user),
sts = values(sts)
</insert>
<!--通过主键修改方法-->
<update id="entity_update"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateAssistEntity">
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="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>
<if test="def3 != null and def3 != ''">def3 = #{def3},</if>
<if test="def4 != null and def4 != ''">def4 = #{def4},</if>
<if test="def5 != null and def5 != ''">def5 = #{def5},</if>
<if test="def6 != null and def6 != ''">def6 = #{def6},</if>
<if test="def7 != null and def7 != ''">def7 = #{def7},</if>
<if test="def8 != null and def8 != ''">def8 = #{def8},</if>
<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>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<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()
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateAssistEntity">
update ae_conf_voucher_template_assist 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="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="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>
<if test="def3 != null and def3 != ''">and def3 = #{def3}</if>
<if test="def4 != null and def4 != ''">and def4 = #{def4}</if>
<if test="def5 != null and def5 != ''">and def5 = #{def5}</if>
<if test="def6 != null and def6 != ''">and def6 = #{def6}</if>
<if test="def7 != null and def7 != ''">and def7 = #{def7}</if>
<if test="def8 != null and def8 != ''">and def8 = #{def8}</if>
<if test="def9 != null and def9 != ''">and def9 = #{def9}</if>
<if test="def10 != null and def10 != ''">and def10 = #{def10}</if>
<if test="createUser != null and createUser != ''">and create_user = #{createUser}</if>
<if test="modifyUser != null and modifyUser != ''">and modify_user = #{modifyUser}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete
from ae_conf_voucher_template_assist
where id = #{id}
</delete>
</mapper>

View File

@ -0,0 +1,133 @@
package com.hzya.frame.voucher.ae.comf.template.entity;
import java.util.Date;
import java.util.List;
import com.hzya.frame.web.entity.BaseEntity;
import lombok.Data;
/**
* (AeConfVoucherTemplate)实体类
*
* @author zydd
* @since 2025-06-25 16:22:52
*/
@Data
public class AeConfVoucherTemplateEntity extends BaseEntity {
/**
* 主数据id
*/
private String mdmId;
/**
* 账薄主键
*/
private String pkGlorgbook;
/**
* 账簿编码
*/
private String glOrgbookCode;
/**
* 账簿名称
*/
private String glOrgbookName;
/**
* 凭证类别ID
*/
private String voucherTypeId;
/**
* 凭证类别code
*/
private String voucherTypeCode;
/**
* 凭证类别name
*/
private String voucherTypeName;
/**
* 业务单元
*/
private String businessUnitId;
private String businessUnitCode;
private String businessUnitName;
/**
* 会计科目分类定义
*/
private Long subjectClassificationId;
private String subjectClassificationCode;
private String subjectClassificationName;
/**
* 币种字段
*/
private String currencyField;
/**
* 摘要前端传入
*/
private String abstractStr;
/**
* 摘要拼接之后
*/
private String abstractRes;
/**
* 汇率
*/
private String exchangeRate;
/**
* 借方数量字段
*/
private String jNumField;
/**
* 借方原币金额字段
*/
private String jYbSumField;
/**
* 借方本币金额字段
*/
private String jBbSumField;
/**
* 贷方数量字段
*/
private String dNumField;
/**
* 贷方原币金额字段
*/
private String dYbSumField;
/**
* 贷方本币金额字段
*/
private String dBbSumField;
/**
* 现金流量项目主键
*/
private String pkCashflow;
/**
* 现金流量项目明细主键
*/
private String pkSubrelation;
/**
* 备注
*/
private String remark;
private String def1;
private String def2;
private String def3;
private String def4;
private String def5;
private String def6;
private String def7;
private String def8;
private String def9;
private String def10;
/**
* 创建人
*/
private String createUser;
/**
* 修改人
*/
private String modifyUser;
private List<AeConfVoucherTemplateAssistEntity> assistEntityList;
}

View File

@ -0,0 +1,635 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.voucher.ae.comf.template.dao.impl.AeConfVoucherTemplateDaoImpl">
<resultMap id="get-AeConfVoucherTemplateEntity-result"
type="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateEntity">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="pkGlorgbook" column="pk_glorgbook" jdbcType="VARCHAR"/>
<result property="glOrgbookCode" column="gl_orgbook_code" jdbcType="VARCHAR"/>
<result property="glOrgbookName" column="gl_orgbook_name" jdbcType="VARCHAR"/>
<result property="voucherTypeId" column="voucher_type_id" jdbcType="VARCHAR"/>
<result property="voucherTypeCode" column="voucher_type_code" jdbcType="VARCHAR"/>
<result property="voucherTypeName" column="voucher_type_name" jdbcType="VARCHAR"/>
<result property="businessUnitId" column="business_unit_id" jdbcType="VARCHAR"/>
<result property="businessUnitCode" column="business_unit_code" jdbcType="VARCHAR"/>
<result property="businessUnitName" column="business_unit_name" jdbcType="VARCHAR"/>
<result property="subjectClassificationId" column="subject_classification_id" jdbcType="INTEGER"/>
<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="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="jYbSumField" column="j_yb_sum_field" jdbcType="VARCHAR"/>
<result property="jBbSumField" column="j_bb_sum_field" jdbcType="VARCHAR"/>
<result property="dNumField" column="d_num_field" jdbcType="VARCHAR"/>
<result property="dYbSumField" column="d_yb_sum_field" jdbcType="VARCHAR"/>
<result property="dBbSumField" column="d_bb_sum_field" 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"/>
<result property="def1" column="def1" jdbcType="VARCHAR"/>
<result property="def2" column="def2" jdbcType="VARCHAR"/>
<result property="def3" column="def3" jdbcType="VARCHAR"/>
<result property="def4" column="def4" jdbcType="VARCHAR"/>
<result property="def5" column="def5" jdbcType="VARCHAR"/>
<result property="def6" column="def6" jdbcType="VARCHAR"/>
<result property="def7" column="def7" jdbcType="VARCHAR"/>
<result property="def8" column="def8" jdbcType="VARCHAR"/>
<result property="def9" column="def9" jdbcType="VARCHAR"/>
<result property="def10" column="def10" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="createUser" column="create_user" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="modifyUser" column="modify_user" jdbcType="VARCHAR"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id="AeConfVoucherTemplateEntity_Base_Column_List">
id
,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
,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
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-AeConfVoucherTemplateEntity-result"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateEntity">
select
<include refid="AeConfVoucherTemplateEntity_Base_Column_List"/>
from ae_conf_voucher_template
<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}</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="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="jYbSumField != null and jYbSumField != ''">and j_yb_sum_field = #{jYbSumField}</if>
<if test="jBbSumField != null and jBbSumField != ''">and j_bb_sum_field = #{jBbSumField}</if>
<if test="dNumField != null and dNumField != ''">and d_num_field = #{dNumField}</if>
<if test="dYbSumField != null and dYbSumField != ''">and d_yb_sum_field = #{dYbSumField}</if>
<if test="dBbSumField != null and dBbSumField != ''">and d_bb_sum_field = #{dBbSumField}</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>
<if test="def1 != null and def1 != ''">and def1 = #{def1}</if>
<if test="def2 != null and def2 != ''">and def2 = #{def2}</if>
<if test="def3 != null and def3 != ''">and def3 = #{def3}</if>
<if test="def4 != null and def4 != ''">and def4 = #{def4}</if>
<if test="def5 != null and def5 != ''">and def5 = #{def5}</if>
<if test="def6 != null and def6 != ''">and def6 = #{def6}</if>
<if test="def7 != null and def7 != ''">and def7 = #{def7}</if>
<if test="def8 != null and def8 != ''">and def8 = #{def8}</if>
<if test="def9 != null and def9 != ''">and def9 = #{def9}</if>
<if test="def10 != null and def10 != ''">and def10 = #{def10}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="createUser != null and createUser != ''">and create_user = #{createUser}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="modifyUser != null and modifyUser != ''">and modify_user = #{modifyUser}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
and sts='Y'
</trim>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateEntity">
select count(1) from ae_conf_voucher_template
<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}</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="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="jYbSumField != null and jYbSumField != ''">and j_yb_sum_field = #{jYbSumField}</if>
<if test="jBbSumField != null and jBbSumField != ''">and j_bb_sum_field = #{jBbSumField}</if>
<if test="dNumField != null and dNumField != ''">and d_num_field = #{dNumField}</if>
<if test="dYbSumField != null and dYbSumField != ''">and d_yb_sum_field = #{dYbSumField}</if>
<if test="dBbSumField != null and dBbSumField != ''">and d_bb_sum_field = #{dBbSumField}</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>
<if test="def1 != null and def1 != ''">and def1 = #{def1}</if>
<if test="def2 != null and def2 != ''">and def2 = #{def2}</if>
<if test="def3 != null and def3 != ''">and def3 = #{def3}</if>
<if test="def4 != null and def4 != ''">and def4 = #{def4}</if>
<if test="def5 != null and def5 != ''">and def5 = #{def5}</if>
<if test="def6 != null and def6 != ''">and def6 = #{def6}</if>
<if test="def7 != null and def7 != ''">and def7 = #{def7}</if>
<if test="def8 != null and def8 != ''">and def8 = #{def8}</if>
<if test="def9 != null and def9 != ''">and def9 = #{def9}</if>
<if test="def10 != null and def10 != ''">and def10 = #{def10}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="createUser != null and createUser != ''">and create_user = #{createUser}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="modifyUser != null and modifyUser != ''">and modify_user = #{modifyUser}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
and sts='Y'
</trim>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-AeConfVoucherTemplateEntity-result"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateEntity">
select
<include refid="AeConfVoucherTemplateEntity_Base_Column_List"/>
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="glOrgbookCode != null and glOrgbookCode != ''">and gl_orgbook_code like
concat('%',#{glOrgbookCode},'%')
</if>
<if test="glOrgbookName != null and glOrgbookName != ''">and gl_orgbook_name like
concat('%',#{glOrgbookName},'%')
</if>
<if test="voucherTypeId != null and voucherTypeId != ''">and voucher_type_id like
concat('%',#{voucherTypeId},'%')
</if>
<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="subjectClassificationId != null">and subject_classification_id like
concat('%',#{subjectClassificationId},'%')
</if>
<if test="subjectClassificationCode != null and subjectClassificationCode != ''">and
subject_classification_code like concat('%',#{subjectClassificationCode},'%')
</if>
<if test="subjectClassificationName != null and subjectClassificationName != ''">and
subject_classification_name like concat('%',#{subjectClassificationName},'%')
</if>
<if test="currencyField != null and currencyField != ''">and currency_field like
concat('%',#{currencyField},'%')
</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},'%')
</if>
<if test="exchangeRate != null and exchangeRate != ''">and exchange_rate like
concat('%',#{exchangeRate},'%')
</if>
<if test="jNumField != null and jNumField != ''">and j_num_field like concat('%',#{jNumField},'%')</if>
<if test="jYbSumField != null and jYbSumField != ''">and j_yb_sum_field like
concat('%',#{jYbSumField},'%')
</if>
<if test="jBbSumField != null and jBbSumField != ''">and j_bb_sum_field like
concat('%',#{jBbSumField},'%')
</if>
<if test="dNumField != null and dNumField != ''">and d_num_field like concat('%',#{dNumField},'%')</if>
<if test="dYbSumField != null and dYbSumField != ''">and d_yb_sum_field like
concat('%',#{dYbSumField},'%')
</if>
<if test="dBbSumField != null and dBbSumField != ''">and d_bb_sum_field like
concat('%',#{dBbSumField},'%')
</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},'%')
</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>
<if test="def3 != null and def3 != ''">and def3 like concat('%',#{def3},'%')</if>
<if test="def4 != null and def4 != ''">and def4 like concat('%',#{def4},'%')</if>
<if test="def5 != null and def5 != ''">and def5 like concat('%',#{def5},'%')</if>
<if test="def6 != null and def6 != ''">and def6 like concat('%',#{def6},'%')</if>
<if test="def7 != null and def7 != ''">and def7 like concat('%',#{def7},'%')</if>
<if test="def8 != null and def8 != ''">and def8 like concat('%',#{def8},'%')</if>
<if test="def9 != null and def9 != ''">and def9 like concat('%',#{def9},'%')</if>
<if test="def10 != null and def10 != ''">and def10 like concat('%',#{def10},'%')</if>
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
<if test="createUser != null and createUser != ''">and create_user like concat('%',#{createUser},'%')</if>
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
<if test="modifyUser != null and modifyUser != ''">and modify_user like concat('%',#{modifyUser},'%')</if>
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
and sts='Y'
</trim>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="AeConfVoucherTemplateentity_list_or" resultMap="get-AeConfVoucherTemplateEntity-result"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateEntity">
select
<include refid="AeConfVoucherTemplateEntity_Base_Column_List"/>
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="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="subjectClassificationId != null">or subject_classification_id = #{subjectClassificationId}</if>
<if test="subjectClassificationCode != null and subjectClassificationCode != ''">or
subject_classification_code = #{subjectClassificationCode}
</if>
<if test="subjectClassificationName != null and subjectClassificationName != ''">or
subject_classification_name = #{subjectClassificationName}
</if>
<if test="currencyField != null and currencyField != ''">or currency_field = #{currencyField}</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="jYbSumField != null and jYbSumField != ''">or j_yb_sum_field = #{jYbSumField}</if>
<if test="jBbSumField != null and jBbSumField != ''">or j_bb_sum_field = #{jBbSumField}</if>
<if test="dNumField != null and dNumField != ''">or d_num_field = #{dNumField}</if>
<if test="dYbSumField != null and dYbSumField != ''">or d_yb_sum_field = #{dYbSumField}</if>
<if test="dBbSumField != null and dBbSumField != ''">or d_bb_sum_field = #{dBbSumField}</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>
<if test="def1 != null and def1 != ''">or def1 = #{def1}</if>
<if test="def2 != null and def2 != ''">or def2 = #{def2}</if>
<if test="def3 != null and def3 != ''">or def3 = #{def3}</if>
<if test="def4 != null and def4 != ''">or def4 = #{def4}</if>
<if test="def5 != null and def5 != ''">or def5 = #{def5}</if>
<if test="def6 != null and def6 != ''">or def6 = #{def6}</if>
<if test="def7 != null and def7 != ''">or def7 = #{def7}</if>
<if test="def8 != null and def8 != ''">or def8 = #{def8}</if>
<if test="def9 != null and def9 != ''">or def9 = #{def9}</if>
<if test="def10 != null and def10 != ''">or def10 = #{def10}</if>
<if test="create_time != null">or create_time = #{create_time}</if>
<if test="createUser != null and createUser != ''">or create_user = #{createUser}</if>
<if test="modify_time != null">or modify_time = #{modify_time}</if>
<if test="modifyUser != null and modifyUser != ''">or modify_user = #{modifyUser}</if>
<if test="sts != null and sts != ''">or sts = #{sts}</if>
and sts='Y'
</trim>
</select>
<!--新增所有列-->
<insert id="entity_insert"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateEntity" keyProperty="id"
useGeneratedKeys="true">
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="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="subjectClassificationId != null">subject_classification_id ,</if>
<if test="subjectClassificationCode != null and subjectClassificationCode != ''">subject_classification_code
,
</if>
<if test="subjectClassificationName != null and subjectClassificationName != ''">subject_classification_name
,
</if>
<if test="currencyField != null and currencyField != ''">currency_field ,</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="jYbSumField != null and jYbSumField != ''">j_yb_sum_field ,</if>
<if test="jBbSumField != null and jBbSumField != ''">j_bb_sum_field ,</if>
<if test="dNumField != null and dNumField != ''">d_num_field ,</if>
<if test="dYbSumField != null and dYbSumField != ''">d_yb_sum_field ,</if>
<if test="dBbSumField != null and dBbSumField != ''">d_bb_sum_field ,</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>
<if test="def1 != null and def1 != ''">def1 ,</if>
<if test="def2 != null and def2 != ''">def2 ,</if>
<if test="def3 != null and def3 != ''">def3 ,</if>
<if test="def4 != null and def4 != ''">def4 ,</if>
<if test="def5 != null and def5 != ''">def5 ,</if>
<if test="def6 != null and def6 != ''">def6 ,</if>
<if test="def7 != null and def7 != ''">def7 ,</if>
<if test="def8 != null and def8 != ''">def8 ,</if>
<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>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null">#{id} ,</if>
<if test="mdmId != null and mdmId != ''">#{mdmId} ,</if>
<if test="pkGlorgbook != null and pkGlorgbook != ''">#{pkGlorgbook} ,</if>
<if test="glOrgbookCode != null and glOrgbookCode != ''">#{glOrgbookCode} ,</if>
<if test="glOrgbookName != null and glOrgbookName != ''">#{glOrgbookName} ,</if>
<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="subjectClassificationId != null">#{subjectClassificationId} ,</if>
<if test="subjectClassificationCode != null and subjectClassificationCode != ''">
#{subjectClassificationCode}
,
</if>
<if test="subjectClassificationName != null and subjectClassificationName != ''">
#{subjectClassificationName}
,
</if>
<if test="currencyField != null and currencyField != ''">#{currencyField} ,</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="jYbSumField != null and jYbSumField != ''">#{jYbSumField} ,</if>
<if test="jBbSumField != null and jBbSumField != ''">#{jBbSumField} ,</if>
<if test="dNumField != null and dNumField != ''">#{dNumField} ,</if>
<if test="dYbSumField != null and dYbSumField != ''">#{dYbSumField} ,</if>
<if test="dBbSumField != null and dBbSumField != ''">#{dBbSumField} ,</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>
<if test="def1 != null and def1 != ''">#{def1} ,</if>
<if test="def2 != null and def2 != ''">#{def2} ,</if>
<if test="def3 != null and def3 != ''">#{def3} ,</if>
<if test="def4 != null and def4 != ''">#{def4} ,</if>
<if test="def5 != null and def5 != ''">#{def5} ,</if>
<if test="def6 != null and def6 != ''">#{def6} ,</if>
<if test="def7 != null and def7 != ''">#{def7} ,</if>
<if test="def8 != null and def8 != ''">#{def8} ,</if>
<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>
</trim>
)
</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)
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},
'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)
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})
</foreach>
on duplicate key update
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),
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),
abstract_str = values(abstract_str),
abstract_res = values(abstract_res),
exchange_rate = values(exchange_rate),
j_num_field = values(j_num_field),
j_yb_sum_field = values(j_yb_sum_field),
j_bb_sum_field = values(j_bb_sum_field),
d_num_field = values(d_num_field),
d_yb_sum_field = values(d_yb_sum_field),
d_bb_sum_field = values(d_bb_sum_field),
pk_cashflow = values(pk_cashflow),
pk_subrelation = values(pk_subrelation),
remark = values(remark),
def1 = values(def1),
def2 = values(def2),
def3 = values(def3),
def4 = values(def4),
def5 = values(def5),
def6 = values(def6),
def7 = values(def7),
def8 = values(def8),
def9 = values(def9),
def10 = values(def10),
create_time = values(create_time),
create_user = values(create_user),
modify_time = values(modify_time),
modify_user = values(modify_user),
sts = values(sts)
</insert>
<!--通过主键修改方法-->
<update id="entity_update"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateEntity">
update ae_conf_voucher_template set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if>
<if test="pkGlorgbook != null and pkGlorgbook != ''">pk_glorgbook = #{pkGlorgbook},</if>
<if test="glOrgbookCode != null and glOrgbookCode != ''">gl_orgbook_code = #{glOrgbookCode},</if>
<if test="glOrgbookName != null and glOrgbookName != ''">gl_orgbook_name = #{glOrgbookName},</if>
<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="subjectClassificationId != null">subject_classification_id = #{subjectClassificationId},</if>
<if test="subjectClassificationCode != null and subjectClassificationCode != ''">subject_classification_code
= #{subjectClassificationCode},
</if>
<if test="subjectClassificationName != null and subjectClassificationName != ''">subject_classification_name
= #{subjectClassificationName},
</if>
<if test="currencyField != null and currencyField != ''">currency_field = #{currencyField},</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="jYbSumField != null and jYbSumField != ''">j_yb_sum_field = #{jYbSumField},</if>
<if test="jBbSumField != null and jBbSumField != ''">j_bb_sum_field = #{jBbSumField},</if>
<if test="dNumField != null and dNumField != ''">d_num_field = #{dNumField},</if>
<if test="dYbSumField != null and dYbSumField != ''">d_yb_sum_field = #{dYbSumField},</if>
<if test="dBbSumField != null and dBbSumField != ''">d_bb_sum_field = #{dBbSumField},</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>
<if test="def1 != null and def1 != ''">def1 = #{def1},</if>
<if test="def2 != null and def2 != ''">def2 = #{def2},</if>
<if test="def3 != null and def3 != ''">def3 = #{def3},</if>
<if test="def4 != null and def4 != ''">def4 = #{def4},</if>
<if test="def5 != null and def5 != ''">def5 = #{def5},</if>
<if test="def6 != null and def6 != ''">def6 = #{def6},</if>
<if test="def7 != null and def7 != ''">def7 = #{def7},</if>
<if test="def8 != null and def8 != ''">def8 = #{def8},</if>
<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>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<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()
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateEntity">
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="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="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="currencyField != null and currencyField != ''">and currency_field = #{currencyField}</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="jYbSumField != null and jYbSumField != ''">and j_yb_sum_field = #{jYbSumField}</if>
<if test="jBbSumField != null and jBbSumField != ''">and j_bb_sum_field = #{jBbSumField}</if>
<if test="dNumField != null and dNumField != ''">and d_num_field = #{dNumField}</if>
<if test="dYbSumField != null and dYbSumField != ''">and d_yb_sum_field = #{dYbSumField}</if>
<if test="dBbSumField != null and dBbSumField != ''">and d_bb_sum_field = #{dBbSumField}</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>
<if test="def1 != null and def1 != ''">and def1 = #{def1}</if>
<if test="def2 != null and def2 != ''">and def2 = #{def2}</if>
<if test="def3 != null and def3 != ''">and def3 = #{def3}</if>
<if test="def4 != null and def4 != ''">and def4 = #{def4}</if>
<if test="def5 != null and def5 != ''">and def5 = #{def5}</if>
<if test="def6 != null and def6 != ''">and def6 = #{def6}</if>
<if test="def7 != null and def7 != ''">and def7 = #{def7}</if>
<if test="def8 != null and def8 != ''">and def8 = #{def8}</if>
<if test="def9 != null and def9 != ''">and def9 = #{def9}</if>
<if test="def10 != null and def10 != ''">and def10 = #{def10}</if>
<if test="createUser != null and createUser != ''">and create_user = #{createUser}</if>
<if test="modifyUser != null and modifyUser != ''">and modify_user = #{modifyUser}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete
from ae_conf_voucher_template
where id = #{id}
</delete>
</mapper>

View File

@ -0,0 +1,20 @@
package com.hzya.frame.voucher.ae.comf.template.service;
import com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateAssistEntity;
import com.hzya.frame.basedao.service.IBaseService;
import java.util.List;
/**
* (AeConfVoucherTemplateAssist)表服务接口
*
* @author zydd
* @since 2025-06-25 16:31:32
*/
public interface IAeConfVoucherTemplateAssistService extends IBaseService<AeConfVoucherTemplateAssistEntity, String>{
List<AeConfVoucherTemplateAssistEntity> queryByTemplateId(AeConfVoucherTemplateAssistEntity entity);
AeConfVoucherTemplateAssistEntity saveEntity(AeConfVoucherTemplateAssistEntity entity);
AeConfVoucherTemplateAssistEntity updateEntity(AeConfVoucherTemplateAssistEntity entity);
AeConfVoucherTemplateAssistEntity deleteEntity(AeConfVoucherTemplateAssistEntity entity);
}

View File

@ -0,0 +1,20 @@
package com.hzya.frame.voucher.ae.comf.template.service;
import com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateEntity;
import com.hzya.frame.basedao.service.IBaseService;
import java.util.List;
/**
* (AeConfVoucherTemplate)表服务接口
*
* @author zydd
* @since 2025-06-25 16:22:52
*/
public interface IAeConfVoucherTemplateService extends IBaseService<AeConfVoucherTemplateEntity, String>{
List<AeConfVoucherTemplateEntity> queryAll(AeConfVoucherTemplateEntity entity);
AeConfVoucherTemplateEntity queryById(AeConfVoucherTemplateEntity entity);
AeConfVoucherTemplateEntity saveEntity(AeConfVoucherTemplateEntity entity);
AeConfVoucherTemplateEntity updateEntity(AeConfVoucherTemplateEntity entity);
AeConfVoucherTemplateEntity deleteEntity(AeConfVoucherTemplateEntity entity);
}

View File

@ -0,0 +1,80 @@
package com.hzya.frame.voucher.ae.comf.template.service.impl;
import cn.hutool.core.lang.Assert;
import com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateAssistEntity;
import com.hzya.frame.voucher.ae.comf.template.dao.IAeConfVoucherTemplateAssistDao;
import com.hzya.frame.voucher.ae.comf.template.service.IAeConfVoucherTemplateAssistService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
import java.util.List;
/**
* (AeConfVoucherTemplateAssist)表服务实现类
*
* @author zydd
* @since 2025-06-25 16:31:32
*/
@Service
public class AeConfVoucherTemplateAssistServiceImpl extends BaseService<AeConfVoucherTemplateAssistEntity, String> implements IAeConfVoucherTemplateAssistService {
private IAeConfVoucherTemplateAssistDao templateAssistDao;
@Autowired
public void setAeConfVoucherTemplateAssistDao(IAeConfVoucherTemplateAssistDao dao) {
this.templateAssistDao = dao;
this.dao = dao;
}
@Override
public List<AeConfVoucherTemplateAssistEntity> queryByTemplateId(AeConfVoucherTemplateAssistEntity entity) {
checkAssistNull("queryByTemplateId", entity);
List<AeConfVoucherTemplateAssistEntity> query = templateAssistDao.query(entity);
return query;
}
@Override
public AeConfVoucherTemplateAssistEntity saveEntity(AeConfVoucherTemplateAssistEntity entity) {
checkAssistNull("saveEntity", entity);
AeConfVoucherTemplateAssistEntity save = templateAssistDao.save(entity);
return save;
}
@Override
public AeConfVoucherTemplateAssistEntity updateEntity(AeConfVoucherTemplateAssistEntity entity) {
checkAssistNull("updateEntity", entity);
AeConfVoucherTemplateAssistEntity update = templateAssistDao.update(entity);
return entity;
}
@Override
public AeConfVoucherTemplateAssistEntity deleteEntity(AeConfVoucherTemplateAssistEntity entity) {
checkAssistNull("deleteEntity", entity);
templateAssistDao.logicRemove(entity);
return null;
}
public void checkAssistNull(String type, AeConfVoucherTemplateAssistEntity entity) {
switch (type) {
case "queryByTemplateId":
Assert.notNull(entity.getVoucherTemplateId(), "根据事项分录模板ID查询辅助核算时不能为空");
break;
case "saveEntity":
Assert.notNull(entity.getVoucherTemplateId(), "辅助核算新增时事项分录模板ID不能为空");
Assert.notNull(entity.getFileId(), "辅助核算新增时档案主数据id不能为空");
Assert.notNull(entity.getFileMapperId(), "辅助核算新增时档案明细id不能为空");
break;
case "updateEntity":
Assert.notNull(entity.getId(), "辅助核算更新时辅助核算明细id不能为空");
Assert.notNull(entity.getFileId(), "辅助核算更新时档案主数据id不能为空");
Assert.notNull(entity.getFileMapperId(), "辅助核算更新时档案明细id不能为空");
break;
case "deleteEntity":
Assert.notNull(entity.getId(), "辅助核算删除时辅助核算明细id不能为空");
break;
}
}
}

View File

@ -0,0 +1,166 @@
package com.hzya.frame.voucher.ae.comf.template.service.impl;
import cn.hutool.core.lang.Assert;
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;
import com.hzya.frame.voucher.ae.comf.template.dao.IAeConfVoucherTemplateDao;
import com.hzya.frame.voucher.ae.comf.template.service.IAeConfVoucherTemplateService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import com.hzya.frame.basedao.service.impl.BaseService;
import java.util.List;
/**
* (AeConfVoucherTemplate)表服务实现类
*
* @author zydd
* @since 2025-06-25 16:22:52
*/
@Service
public class AeConfVoucherTemplateServiceImpl extends BaseService<AeConfVoucherTemplateEntity, String> implements IAeConfVoucherTemplateService {
private IAeConfVoucherTemplateDao templateDao;
@Autowired
private IAeConfVoucherTemplateAssistDao templateAssistDao;
@Autowired
public void setAeConfVoucherTemplateDao(IAeConfVoucherTemplateDao dao) {
this.templateDao = dao;
this.dao = dao;
}
/**
* 根据 账簿凭证类别主数据查询列表 带出明细
*/
@Override
public List<AeConfVoucherTemplateEntity> queryAll(AeConfVoucherTemplateEntity entity) {
checkTempNull("queryAll", entity);
List<AeConfVoucherTemplateEntity> query = templateDao.query(entity);
for (AeConfVoucherTemplateEntity aeConfVoucherTemplateEntity : query) {
queryAssistList(aeConfVoucherTemplateEntity);
}
return query;
}
/**
* 根据 账簿凭证类别主数据查询列表 点击单条后展示明细行
*/
@Override
public AeConfVoucherTemplateEntity queryById(AeConfVoucherTemplateEntity entity) {
checkTempNull("queryById", entity);
List<AeConfVoucherTemplateEntity> query = templateDao.query(entity);
if (query.size() == 0 || query.size() > 1) {
Assert.state(false, "根据id{},未查询到或存在多条模板信息");
}
queryAssistList(query.get(0));
return query.get(0);
}
/**
* 保存实体
*/
@Override
public AeConfVoucherTemplateEntity saveEntity(AeConfVoucherTemplateEntity entity) {
checkTempNull("saveEntity", entity);
AeConfVoucherTemplateEntity save = templateDao.save(entity);
//保存子表
if (entity.getAssistEntityList() != null && entity.getAssistEntityList().size() != 0) {
String tempId = save.getId();
for (AeConfVoucherTemplateAssistEntity assistEntity : entity.getAssistEntityList()) {
assistEntity.setVoucherTemplateId(Long.valueOf(tempId));
templateAssistDao.save(assistEntity);
}
}
return save;
}
@Override
public AeConfVoucherTemplateEntity updateEntity(AeConfVoucherTemplateEntity entity) {
checkTempNull("updateEntity", entity);
templateDao.update(entity);
return null;
}
/**
* 顺便删除对应的辅助核算
*/
@Override
public AeConfVoucherTemplateEntity deleteEntity(AeConfVoucherTemplateEntity entity) {
checkTempNull("deleteEntity", entity);
templateDao.logicRemove(entity);
queryAssistList(entity);
List<AeConfVoucherTemplateAssistEntity> assistEntityList = entity.getAssistEntityList();
if (assistEntityList != null && assistEntityList.size() != 0) {
for (AeConfVoucherTemplateAssistEntity aeConfVoucherTemplateAssistEntity : assistEntityList) {
templateAssistDao.logicRemove(aeConfVoucherTemplateAssistEntity);
}
}
return null;
}
/**
* 根据类型校验必填字段
*/
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.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更新时凭证类别主键不能为空");
break;
case "deleteEntity":
Assert.notNull(entity.getId(), "根据id删除时id不能为空");
break;
}
}
public void checkTempAssist(String type, AeConfVoucherTemplateEntity entity) {
}
/**
* 查询辅助核算
*/
public void queryAssistList(AeConfVoucherTemplateEntity entity) {
AeConfVoucherTemplateAssistEntity aeConfVoucherTemplateAssistEntity = new AeConfVoucherTemplateAssistEntity();
aeConfVoucherTemplateAssistEntity.setVoucherTemplateId(Long.valueOf(entity.getId()));
List<AeConfVoucherTemplateAssistEntity> query = templateAssistDao.query(aeConfVoucherTemplateAssistEntity);
entity.setAssistEntityList(query);
}
}