1、新增凭证类型模块

This commit is contained in:
zhengyf 2025-07-03 17:04:47 +08:00
parent c9fd7fd682
commit ce64c5c219
9 changed files with 748 additions and 5 deletions

View File

@ -97,6 +97,7 @@ public class BdController extends DefaultController {
MdmDbFiledVO mdmDbFiledVO = new MdmDbFiledVO(); MdmDbFiledVO mdmDbFiledVO = new MdmDbFiledVO();
mdmDbFiledVO.setMdmType("1");//1档案 2单据 mdmDbFiledVO.setMdmType("1");//1档案 2单据
mdmDbFiledVO.setMdmId(entity.getPkBdinfo()); mdmDbFiledVO.setMdmId(entity.getPkBdinfo());
mdmDbFiledVO.setDbName(entity.getDbName());
List<MdmDbFiledVO> all = new ArrayList<>(); List<MdmDbFiledVO> all = new ArrayList<>();
List<MdmDbFiledVO> mdmDbFiledVOList = mdmDbFiledVODAO.queryMdmDbFiledVO(mdmDbFiledVO); List<MdmDbFiledVO> mdmDbFiledVOList = mdmDbFiledVODAO.queryMdmDbFiledVO(mdmDbFiledVO);

View File

@ -0,0 +1,95 @@
package com.hzya.frame.voucher.ae.comf.template.controller;
import com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateTypeEntity;
import com.hzya.frame.voucher.ae.comf.template.service.IAeConfVoucherTemplateTypeService;
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/type")
public class TemplateTypeController extends DefaultController {
@Autowired
private IAeConfVoucherTemplateTypeService templateTypeService;
/**
* 查询全部
*/
@RequestMapping(value = "/queryAll", method = RequestMethod.POST)
public JsonResultEntity queryAll(@RequestBody AeConfVoucherTemplateTypeEntity entity) {
try {
List<AeConfVoucherTemplateTypeEntity> list = templateTypeService.queryAll(entity);
return getSuccessMessageEntity("请求成功", list);
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
@RequestMapping(value = "/queryByMdmId", method = RequestMethod.POST)
public JsonResultEntity queryByMdmId(@RequestBody AeConfVoucherTemplateTypeEntity entity) {
try {
List<AeConfVoucherTemplateTypeEntity> list = templateTypeService.queryByMdmId(entity);
return getSuccessMessageEntity("请求成功", list);
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
@RequestMapping(value = "/save", method = RequestMethod.POST)
public JsonResultEntity saveEntity(@RequestBody AeConfVoucherTemplateTypeEntity entity) {
try {
AeConfVoucherTemplateTypeEntity save = templateTypeService.saveEntity(entity);
return getSuccessMessageEntity("请求成功", save);
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
@RequestMapping(value = "/update", method = RequestMethod.POST)
public JsonResultEntity updateEntity(@RequestBody AeConfVoucherTemplateTypeEntity entity) {
try {
AeConfVoucherTemplateTypeEntity update = templateTypeService.updateEntity(entity);
return getSuccessMessageEntity("请求成功", update);
} catch (Exception e) {
e.printStackTrace();
return getFailureMessageEntity(e.getMessage());
}
}
@RequestMapping(value = "/delete", method = RequestMethod.POST)
public JsonResultEntity deleteEntity(@RequestBody AeConfVoucherTemplateTypeEntity entity) {
try {
AeConfVoucherTemplateTypeEntity update = templateTypeService.deleteEntity(entity);
return getSuccessMessageEntity("请求成功");
} 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,15 @@
package com.hzya.frame.voucher.ae.comf.template.dao;
import com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateTypeEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* (ae_conf_voucher_template_type: table)表数据库访问层
*
* @author zydd
* @since 2025-07-03 15:27:25
*/
public interface IAeConfVoucherTemplateTypeDao extends IBaseDao<AeConfVoucherTemplateTypeEntity, String> {
}

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.AeConfVoucherTemplateTypeEntity;
import com.hzya.frame.voucher.ae.comf.template.dao.IAeConfVoucherTemplateTypeDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* (AeConfVoucherTemplateType)表数据库访问层
*
* @author zydd
* @since 2025-07-03 15:27:25
*/
@Repository
public class AeConfVoucherTemplateTypeDaoImpl extends MybatisGenericDao<AeConfVoucherTemplateTypeEntity, String> implements IAeConfVoucherTemplateTypeDao{
}

View File

@ -0,0 +1,173 @@
package com.hzya.frame.voucher.ae.comf.template.entity;
import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity;
/**
* (AeConfVoucherTemplateType)实体类
*
* @author zydd
* @since 2025-07-03 15:27:25
*/
public class AeConfVoucherTemplateTypeEntity extends BaseEntity {
private String code;
private String name;
/**
* 主数据id
*/
private String mdmId;
/**
* 备注
*/
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;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
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 String getMdmId() {
return mdmId;
}
public void setMdmId(String mdmId) {
this.mdmId = mdmId;
}
}

View File

@ -0,0 +1,339 @@
<?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.AeConfVoucherTemplateTypeDaoImpl">
<resultMap id="get-AeConfVoucherTemplateTypeEntity-result"
type="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateTypeEntity">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="code" column="code" jdbcType="VARCHAR"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" 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="AeConfVoucherTemplateTypeEntity_Base_Column_List">
id
,code
,name
,remark
,mdm_id
,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-AeConfVoucherTemplateTypeEntity-result"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateTypeEntity">
select
<include refid="AeConfVoucherTemplateTypeEntity_Base_Column_List"/>
from ae_conf_voucher_template_type
<trim prefix="where" prefixOverrides="and">
<if test="id != null">and id = #{id}</if>
<if test="code != null and code != ''">and code = #{code}</if>
<if test="name != null and name != ''">and name = #{name}</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</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.AeConfVoucherTemplateTypeEntity">
select count(1) from ae_conf_voucher_template_type
<trim prefix="where" prefixOverrides="and">
<if test="id != null">and id = #{id}</if>
<if test="code != null and code != ''">and code = #{code}</if>
<if test="name != null and name != ''">and name = #{name}</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</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-AeConfVoucherTemplateTypeEntity-result"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateTypeEntity">
select
<include refid="AeConfVoucherTemplateTypeEntity_Base_Column_List"/>
from ae_conf_voucher_template_type
<trim prefix="where" prefixOverrides="and">
<if test="id != null">and id like concat('%',#{id},'%')</if>
<if test="code != null and code != ''">and code like concat('%',#{code},'%')</if>
<if test="name != null and name != ''">and name like concat('%',#{name},'%')</if>
<if test="remark != null and remark != ''">and remark like concat('%',#{remark},'%')</if>
<if test="mdmId != null and mdmId != ''">and mdm_id like concat('%',#{mdmId},'%')</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="AeConfVoucherTemplateTypeentity_list_or" resultMap="get-AeConfVoucherTemplateTypeEntity-result"
parameterType="com.hzya.frame.voucher.ae.comf.template.entity.AeConfVoucherTemplateTypeEntity">
select
<include refid="AeConfVoucherTemplateTypeEntity_Base_Column_List"/>
from ae_conf_voucher_template_type
<trim prefix="where" prefixOverrides="and">
<if test="id != null">or id = #{id}</if>
<if test="code != null and code != ''">or code = #{code}</if>
<if test="name != null and name != ''">or name = #{name}</if>
<if test="remark != null and remark != ''">or remark = #{remark}</if>
<if test="mdmId != null and mdmId != ''">or mdm_id = #{mdmId}</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.AeConfVoucherTemplateTypeEntity"
keyProperty="id" useGeneratedKeys="true">
insert into ae_conf_voucher_template_type(
<trim suffix="" suffixOverrides=",">
<if test="id != null">id ,</if>
<if test="code != null and code != ''">code ,</if>
<if test="name != null and name != ''">name ,</if>
<if test="remark != null and remark != ''">remark ,</if>
<if test="mdmId != null and mdmId != ''">mdm_id ,</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="code != null and code != ''">#{code} ,</if>
<if test="name != null and name != ''">#{name} ,</if>
<if test="remark != null and remark != ''">#{remark} ,</if>
<if test="mdmId != null and mdmId != ''">#{mdmId} ,</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_type(code, 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.code},#{entity.name},#{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_type(code, 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.code},#{entity.name},#{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
code = values(code),
name = values(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.AeConfVoucherTemplateTypeEntity">
update ae_conf_voucher_template_type set
<trim suffix="" suffixOverrides=",">
<if test="code != null and code != ''">code = #{code},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</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="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.AeConfVoucherTemplateTypeEntity">
update ae_conf_voucher_template_type
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.AeConfVoucherTemplateTypeEntity">
update ae_conf_voucher_template_type 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="code != null and code != ''">and code = #{code}</if>
<if test="name != null and name != ''">and name = #{name}</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_type
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.AeConfVoucherTemplateTypeEntity;
import com.hzya.frame.basedao.service.IBaseService;
import java.util.List;
/**
* (AeConfVoucherTemplateType)表服务接口
*
* @author zydd
* @since 2025-07-03 15:27:25
*/
public interface IAeConfVoucherTemplateTypeService extends IBaseService<AeConfVoucherTemplateTypeEntity, String>{
List<AeConfVoucherTemplateTypeEntity> queryAll(AeConfVoucherTemplateTypeEntity entity);
List<AeConfVoucherTemplateTypeEntity> queryByMdmId(AeConfVoucherTemplateTypeEntity entity);
AeConfVoucherTemplateTypeEntity saveEntity(AeConfVoucherTemplateTypeEntity entity);
AeConfVoucherTemplateTypeEntity updateEntity(AeConfVoucherTemplateTypeEntity entity);
AeConfVoucherTemplateTypeEntity deleteEntity(AeConfVoucherTemplateTypeEntity entity);
}

View File

@ -213,10 +213,6 @@ public class AeConfVoucherTemplateServiceImpl extends BaseService<AeConfVoucherT
} }
// /** // /**
// * 校验摘要并拿到最终字符串 // * 校验摘要并拿到最终字符串
// */ // */
@ -424,7 +420,7 @@ public class AeConfVoucherTemplateServiceImpl extends BaseService<AeConfVoucherT
Assert.notNull(entity.getId(), "更新辅助核算时id不能为空"); Assert.notNull(entity.getId(), "更新辅助核算时id不能为空");
break; break;
case "deleteEntity": case "deleteEntity":
Assert.notNull(entity.getId(), "更新辅助核算时id不能为空"); Assert.notNull(entity.getId(), "删除辅助核算时id不能为空");
break; break;
} }
} }

View File

@ -0,0 +1,87 @@
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.AeConfVoucherTemplateTypeEntity;
import com.hzya.frame.voucher.ae.comf.template.dao.IAeConfVoucherTemplateTypeDao;
import com.hzya.frame.voucher.ae.comf.template.service.IAeConfVoucherTemplateTypeService;
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;
/**
* (AeConfVoucherTemplateType)表服务实现类
*
* @author zydd
* @since 2025-07-03 15:27:25
*/
@Service
public class AeConfVoucherTemplateTypeServiceImpl extends BaseService<AeConfVoucherTemplateTypeEntity, String> implements IAeConfVoucherTemplateTypeService {
private IAeConfVoucherTemplateTypeDao aeConfVoucherTemplateTypeDao;
@Autowired
public void setAeConfVoucherTemplateTypeDao(IAeConfVoucherTemplateTypeDao dao) {
this.aeConfVoucherTemplateTypeDao = dao;
this.dao = dao;
}
@Override
public List<AeConfVoucherTemplateTypeEntity> queryAll(AeConfVoucherTemplateTypeEntity entity) {
checkTempTypeNull("queryAll", entity);
List<AeConfVoucherTemplateTypeEntity> query = aeConfVoucherTemplateTypeDao.query(entity);
return query;
}
@Override
public List<AeConfVoucherTemplateTypeEntity> queryByMdmId(AeConfVoucherTemplateTypeEntity entity) {
checkTempTypeNull("queryByMdmId", entity);
List<AeConfVoucherTemplateTypeEntity> query = aeConfVoucherTemplateTypeDao.query(entity);
return query;
}
@Override
public AeConfVoucherTemplateTypeEntity saveEntity(AeConfVoucherTemplateTypeEntity entity) {
checkTempTypeNull("saveEntity", entity);
AeConfVoucherTemplateTypeEntity save = aeConfVoucherTemplateTypeDao.save(entity);
return save;
}
@Override
public AeConfVoucherTemplateTypeEntity updateEntity(AeConfVoucherTemplateTypeEntity entity) {
checkTempTypeNull("updateEntity", entity);
AeConfVoucherTemplateTypeEntity update = aeConfVoucherTemplateTypeDao.update(entity);
return entity;
}
@Override
public AeConfVoucherTemplateTypeEntity deleteEntity(AeConfVoucherTemplateTypeEntity entity) {
checkTempTypeNull("deleteEntity", entity);
int i = aeConfVoucherTemplateTypeDao.logicRemove(entity);
return null;
}
public void checkTempTypeNull(String type, AeConfVoucherTemplateTypeEntity entity) {
switch (type){
case "queryAll":
Assert.notNull(entity.getMdmId(), "查询全部时主数据id不能为空");
break;
case "queryByMdmId":
Assert.notNull(entity.getMdmId(), "根据主数据id查询全部时主数据id不能为空");
break;
case "saveEntity":
Assert.notNull(entity.getMdmId(), "新增模板类型时主数据id不能为空");
Assert.notNull(entity.getName(), "新增模板类型时,模板名称不能为空");
break;
case "updateEntity":
Assert.notNull(entity.getId(), "修改模板类型时id不能为空");
Assert.notNull(entity.getName(), "修改模板类型时,模板名称不能为空");
break;
case "deleteEntity":
Assert.notNull(entity.getId(), "删除模板类型时id不能为空");
break;
}
}
}