From 82a16f8af6e17e84f8aa291432284c7cc4ed5ab4 Mon Sep 17 00:00:00 2001 From: zhengyf Date: Fri, 27 Jun 2025 10:39:15 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=96=B0=E5=A2=9E=E5=B8=81=E7=A7=8D?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E3=80=82=202=E3=80=81=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=BA=8B=E9=A1=B9=E5=88=86=E5=BD=95=E6=A8=A1=E6=9D=BF=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ae/comf/bd/controller/BdController.java | 16 +- .../ae/comf/bd/dao/IMdmDBQueryVODAO.java | 2 + .../comf/bd/dao/impl/MdmDBQueryVODAOImpl.java | 6 + .../ae/comf/bd/entity/vo/BdAccassitemVO.java | 4 +- .../ae/comf/bd/entity/vo/BdCurrtypeVO.java | 19 + .../ae/comf/bd/entity/vo/BdVoucherTypeVO.java | 1 + .../ae/comf/bd/entity/vo/MdmDBQueryVO.xml | 6 +- .../controller/TemplateAssistController.java | 89 +++ .../controller/TemplateController.java | 105 +++ .../dao/IAeConfVoucherTemplateAssistDao.java | 16 + .../dao/IAeConfVoucherTemplateDao.java | 15 + .../AeConfVoucherTemplateAssistDaoImpl.java | 21 + .../impl/AeConfVoucherTemplateDaoImpl.java | 17 + .../AeConfVoucherTemplateAssistEntity.java | 69 ++ .../AeConfVoucherTemplateAssistEntity.xml | 393 +++++++++++ .../entity/AeConfVoucherTemplateEntity.java | 133 ++++ .../entity/AeConfVoucherTemplateEntity.xml | 635 ++++++++++++++++++ .../IAeConfVoucherTemplateAssistService.java | 20 + .../IAeConfVoucherTemplateService.java | 20 + ...eConfVoucherTemplateAssistServiceImpl.java | 80 +++ .../AeConfVoucherTemplateServiceImpl.java | 166 +++++ 21 files changed, 1830 insertions(+), 3 deletions(-) create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/entity/vo/BdCurrtypeVO.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/controller/TemplateAssistController.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/controller/TemplateController.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/dao/IAeConfVoucherTemplateAssistDao.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/dao/IAeConfVoucherTemplateDao.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/dao/impl/AeConfVoucherTemplateAssistDaoImpl.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/dao/impl/AeConfVoucherTemplateDaoImpl.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/entity/AeConfVoucherTemplateAssistEntity.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/entity/AeConfVoucherTemplateAssistEntity.xml create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/entity/AeConfVoucherTemplateEntity.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/entity/AeConfVoucherTemplateEntity.xml create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/service/IAeConfVoucherTemplateAssistService.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/service/IAeConfVoucherTemplateService.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/service/impl/AeConfVoucherTemplateAssistServiceImpl.java create mode 100644 base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/service/impl/AeConfVoucherTemplateServiceImpl.java diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/controller/BdController.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/controller/BdController.java index b122ceb8..f4e33f9a 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/controller/BdController.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/controller/BdController.java @@ -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 list = mdmDBQueryVODAO.queryBdCurrtype(entity); + return getSuccessMessageEntity("请求成功", list); + } catch (Exception e) { + e.printStackTrace(); + return getFailureMessageEntity(e.getMessage()); + } + } + + // /** // * // */ diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/dao/IMdmDBQueryVODAO.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/dao/IMdmDBQueryVODAO.java index 0de43d26..6682a915 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/dao/IMdmDBQueryVODAO.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/dao/IMdmDBQueryVODAO.java @@ -16,4 +16,6 @@ public interface IMdmDBQueryVODAO extends IBaseDao { List queryBdBdinfoList(BdBdinfoEntity entity); List queryBdInfoBySubjass(BdAccassitemVO entity); List queryVoucherType(BdVoucherTypeVO entity); + List queryBdCurrtype(BdCurrtypeVO entity); + } diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/dao/impl/MdmDBQueryVODAOImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/dao/impl/MdmDBQueryVODAOImpl.java index 8706827f..dd6ee579 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/dao/impl/MdmDBQueryVODAOImpl.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/dao/impl/MdmDBQueryVODAOImpl.java @@ -54,4 +54,10 @@ public class MdmDBQueryVODAOImpl extends MybatisGenericDao return list; } + + @Override + public List queryBdCurrtype(BdCurrtypeVO entity) { + List list =(List) selectList("com.hzya.frame.voucher.ae.comf.bd.dao.impl.MdmDBQueryVODAOImpl.queryBdCurrtype", entity); + return list; + } } diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/entity/vo/BdAccassitemVO.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/entity/vo/BdAccassitemVO.java index 6d11ba5a..f49c3461 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/entity/vo/BdAccassitemVO.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/entity/vo/BdAccassitemVO.java @@ -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; diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/entity/vo/BdCurrtypeVO.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/entity/vo/BdCurrtypeVO.java new file mode 100644 index 00000000..6f4ba78e --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/entity/vo/BdCurrtypeVO.java @@ -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; +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/entity/vo/BdVoucherTypeVO.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/entity/vo/BdVoucherTypeVO.java index 29672445..1d4ff3eb 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/entity/vo/BdVoucherTypeVO.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/entity/vo/BdVoucherTypeVO.java @@ -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; diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/entity/vo/MdmDBQueryVO.xml b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/entity/vo/MdmDBQueryVO.xml index e86b9f0b..98b51fb3 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/entity/vo/MdmDBQueryVO.xml +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/bd/entity/vo/MdmDBQueryVO.xml @@ -133,11 +133,12 @@ + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/controller/TemplateAssistController.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/controller/TemplateAssistController.java new file mode 100644 index 00000000..f1c2e016 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/controller/TemplateAssistController.java @@ -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 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()); +// } +// } +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/controller/TemplateController.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/controller/TemplateController.java new file mode 100644 index 00000000..8be140bc --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/controller/TemplateController.java @@ -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 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()); +// } +// } +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/dao/IAeConfVoucherTemplateAssistDao.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/dao/IAeConfVoucherTemplateAssistDao.java new file mode 100644 index 00000000..28aea0ec --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/dao/IAeConfVoucherTemplateAssistDao.java @@ -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 { + + void saveEntity(AeConfVoucherTemplateAssistEntity assistEntity); +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/dao/IAeConfVoucherTemplateDao.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/dao/IAeConfVoucherTemplateDao.java new file mode 100644 index 00000000..36c1f7b1 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/dao/IAeConfVoucherTemplateDao.java @@ -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 { + +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/dao/impl/AeConfVoucherTemplateAssistDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/dao/impl/AeConfVoucherTemplateAssistDaoImpl.java new file mode 100644 index 00000000..3521b136 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/dao/impl/AeConfVoucherTemplateAssistDaoImpl.java @@ -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 implements IAeConfVoucherTemplateAssistDao{ + + @Override + public void saveEntity(AeConfVoucherTemplateAssistEntity assistEntity) { + + } +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/dao/impl/AeConfVoucherTemplateDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/dao/impl/AeConfVoucherTemplateDaoImpl.java new file mode 100644 index 00000000..c4196af0 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/dao/impl/AeConfVoucherTemplateDaoImpl.java @@ -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 implements IAeConfVoucherTemplateDao{ + +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/entity/AeConfVoucherTemplateAssistEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/entity/AeConfVoucherTemplateAssistEntity.java new file mode 100644 index 00000000..8e19c76f --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/entity/AeConfVoucherTemplateAssistEntity.java @@ -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; + +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/entity/AeConfVoucherTemplateAssistEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/entity/AeConfVoucherTemplateAssistEntity.xml new file mode 100644 index 00000000..209b3a4a --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/entity/AeConfVoucherTemplateAssistEntity.xml @@ -0,0 +1,393 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + + + insert into ae_conf_voucher_template_assist( + + 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_time , + create_user , + modify_time , + modify_time , + modify_user , + sts , + sts, + + )values( + + #{id} , + #{voucherTemplateId} , + #{fileId} , + #{fileCode} , + #{fileName} , + #{fileMapperId} , + #{fileMapperCode} , + #{fileMapperName} , + #{remark} , + #{def1} , + #{def2} , + #{def3} , + #{def4} , + #{def5} , + #{def6} , + #{def7} , + #{def8} , + #{def9} , + #{def10} , + #{create_time} , + now() , + #{createUser} , + #{modify_time} , + now() , + #{modifyUser} , + #{sts} , + 'Y', + + ) + + + + 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 + + (#{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') + + + + + 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 + + (#{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}) + + 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) + + + + update ae_conf_voucher_template_assist set + + voucher_template_id = #{voucherTemplateId}, + file_id = #{fileId}, + file_code = #{fileCode}, + file_name = #{fileName}, + file_mapper_id = #{fileMapperId}, + file_mapper_code = #{fileMapperCode}, + file_mapper_name = #{fileMapperName}, + remark = #{remark}, + def1 = #{def1}, + def2 = #{def2}, + def3 = #{def3}, + def4 = #{def4}, + def5 = #{def5}, + def6 = #{def6}, + def7 = #{def7}, + def8 = #{def8}, + def9 = #{def9}, + def10 = #{def10}, + create_time = #{create_time}, + create_time = now(), + create_user = #{createUser}, + modify_time = #{modify_time}, + modify_time = now(), + modify_user = #{modifyUser}, + sts = #{sts}, + + where id = #{id} + + + + update ae_conf_voucher_template_assist + set sts= 'N',modify_time = now() + where id = #{id} + + + + update ae_conf_voucher_template_assist set sts= 'N' ,modify_time = #{modify_time},modify_user_id = + #{modify_user_id} + + and id = #{id} + and voucher_template_id = #{voucherTemplateId} + and file_id = #{fileId} + and file_code = #{fileCode} + and file_name = #{fileName} + and file_mapper_id = #{fileMapperId} + and file_mapper_code = #{fileMapperCode} + and file_mapper_name = #{fileMapperName} + and remark = #{remark} + and def1 = #{def1} + and def2 = #{def2} + and def3 = #{def3} + and def4 = #{def4} + and def5 = #{def5} + and def6 = #{def6} + and def7 = #{def7} + and def8 = #{def8} + and def9 = #{def9} + and def10 = #{def10} + and create_user = #{createUser} + and modify_user = #{modifyUser} + and sts = #{sts} + and sts='Y' + + + + + delete + from ae_conf_voucher_template_assist + where id = #{id} + + + + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/entity/AeConfVoucherTemplateEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/entity/AeConfVoucherTemplateEntity.java new file mode 100644 index 00000000..eeda1d1f --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/entity/AeConfVoucherTemplateEntity.java @@ -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 assistEntityList; +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/entity/AeConfVoucherTemplateEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/entity/AeConfVoucherTemplateEntity.xml new file mode 100644 index 00000000..0e4c0a1c --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/entity/AeConfVoucherTemplateEntity.xml @@ -0,0 +1,635 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + + + insert into ae_conf_voucher_template( + + id , + pk_glorgbook , + mdm_id , + 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_time , + create_user , + modify_time , + modify_time , + modify_user , + sts , + sts, + + )values( + + #{id} , + #{mdmId} , + #{pkGlorgbook} , + #{glOrgbookCode} , + #{glOrgbookName} , + #{voucherTypeId} , + #{voucherTypeCode} , + #{voucherTypeName} , + #{businessUnitId}, + #{businessUnitCode}, + #{businessUnitName}, + + #{subjectClassificationId} , + + #{subjectClassificationCode} + , + + + #{subjectClassificationName} + , + + #{currencyField} , + #{abstractStr} , + #{abstractRes} , + #{exchangeRate} , + #{jNumField} , + #{jYbSumField} , + #{jBbSumField} , + #{dNumField} , + #{dYbSumField} , + #{dBbSumField} , + #{pkCashflow} , + #{pkSubrelation} , + #{remark} , + #{def1} , + #{def2} , + #{def3} , + #{def4} , + #{def5} , + #{def6} , + #{def7} , + #{def8} , + #{def9} , + #{def10} , + #{create_time} , + now() , + #{createUser} , + #{modify_time} , + now() , + #{modifyUser} , + #{sts} , + 'Y', + + ) + + + + 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 + + (#{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') + + + + + 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 + + (#{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}) + + 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) + + + + update ae_conf_voucher_template set + + mdm_id = #{mdmId}, + pk_glorgbook = #{pkGlorgbook}, + gl_orgbook_code = #{glOrgbookCode}, + gl_orgbook_name = #{glOrgbookName}, + voucher_type_id = #{voucherTypeId}, + voucher_type_code = #{voucherTypeCode}, + voucher_type_name = #{voucherTypeName}, + and business_unit_id = #{businessUnitId}, + and business_unit_code = #{businessUnitCode}, + and business_unit_name = #{businessUnitName}, + subject_classification_id = #{subjectClassificationId}, + subject_classification_code + = #{subjectClassificationCode}, + + subject_classification_name + = #{subjectClassificationName}, + + currency_field = #{currencyField}, + abstract_str = #{abstractStr}, + abstract_res = #{abstractRes}, + exchange_rate = #{exchangeRate}, + j_num_field = #{jNumField}, + j_yb_sum_field = #{jYbSumField}, + j_bb_sum_field = #{jBbSumField}, + d_num_field = #{dNumField}, + d_yb_sum_field = #{dYbSumField}, + d_bb_sum_field = #{dBbSumField}, + pk_cashflow = #{pkCashflow}, + pk_subrelation = #{pkSubrelation}, + remark = #{remark}, + def1 = #{def1}, + def2 = #{def2}, + def3 = #{def3}, + def4 = #{def4}, + def5 = #{def5}, + def6 = #{def6}, + def7 = #{def7}, + def8 = #{def8}, + def9 = #{def9}, + def10 = #{def10}, + create_time = #{create_time}, + create_time = now(), + create_user = #{createUser}, + modify_time = #{modify_time}, + modify_time = now(), + modify_user = #{modifyUser}, + sts = #{sts}, + + where id = #{id} + + + + update ae_conf_voucher_template + set sts= 'N',modify_time = now() + where id = #{id} + + + + update ae_conf_voucher_template set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} + + and id = #{id} + and pk_glorgbook = #{pkGlorgbook} + and gl_orgbook_code = #{glOrgbookCode} + and gl_orgbook_name = #{glOrgbookName} + and voucher_type_id = #{voucherTypeId} + and voucher_type_code = #{voucherTypeCode} + and voucher_type_name = #{voucherTypeName} + and subject_classification_id = #{subjectClassificationId} + and + subject_classification_code = #{subjectClassificationCode} + + and + subject_classification_name = #{subjectClassificationName} + + and currency_field = #{currencyField} + and abstract_str = #{abstractStr} + and abstract_res = #{abstractRes} + and exchange_rate = #{exchangeRate} + and j_num_field = #{jNumField} + and j_yb_sum_field = #{jYbSumField} + and j_bb_sum_field = #{jBbSumField} + and d_num_field = #{dNumField} + and d_yb_sum_field = #{dYbSumField} + and d_bb_sum_field = #{dBbSumField} + and pk_cashflow = #{pkCashflow} + and pk_subrelation = #{pkSubrelation} + and remark = #{remark} + and def1 = #{def1} + and def2 = #{def2} + and def3 = #{def3} + and def4 = #{def4} + and def5 = #{def5} + and def6 = #{def6} + and def7 = #{def7} + and def8 = #{def8} + and def9 = #{def9} + and def10 = #{def10} + and create_user = #{createUser} + and modify_user = #{modifyUser} + and sts = #{sts} + and sts='Y' + + + + + delete + from ae_conf_voucher_template + where id = #{id} + + + + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/service/IAeConfVoucherTemplateAssistService.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/service/IAeConfVoucherTemplateAssistService.java new file mode 100644 index 00000000..14995b39 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/service/IAeConfVoucherTemplateAssistService.java @@ -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{ + List queryByTemplateId(AeConfVoucherTemplateAssistEntity entity); + + AeConfVoucherTemplateAssistEntity saveEntity(AeConfVoucherTemplateAssistEntity entity); + AeConfVoucherTemplateAssistEntity updateEntity(AeConfVoucherTemplateAssistEntity entity); + AeConfVoucherTemplateAssistEntity deleteEntity(AeConfVoucherTemplateAssistEntity entity); +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/service/IAeConfVoucherTemplateService.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/service/IAeConfVoucherTemplateService.java new file mode 100644 index 00000000..70b5bd4c --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/service/IAeConfVoucherTemplateService.java @@ -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{ + List queryAll(AeConfVoucherTemplateEntity entity); + AeConfVoucherTemplateEntity queryById(AeConfVoucherTemplateEntity entity); + AeConfVoucherTemplateEntity saveEntity(AeConfVoucherTemplateEntity entity); + AeConfVoucherTemplateEntity updateEntity(AeConfVoucherTemplateEntity entity); + AeConfVoucherTemplateEntity deleteEntity(AeConfVoucherTemplateEntity entity); +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/service/impl/AeConfVoucherTemplateAssistServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/service/impl/AeConfVoucherTemplateAssistServiceImpl.java new file mode 100644 index 00000000..2891c4c3 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/service/impl/AeConfVoucherTemplateAssistServiceImpl.java @@ -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 implements IAeConfVoucherTemplateAssistService { + + private IAeConfVoucherTemplateAssistDao templateAssistDao; + + @Autowired + public void setAeConfVoucherTemplateAssistDao(IAeConfVoucherTemplateAssistDao dao) { + this.templateAssistDao = dao; + this.dao = dao; + } + + @Override + public List queryByTemplateId(AeConfVoucherTemplateAssistEntity entity) { + checkAssistNull("queryByTemplateId", entity); + List 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; + } + } + +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/service/impl/AeConfVoucherTemplateServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/service/impl/AeConfVoucherTemplateServiceImpl.java new file mode 100644 index 00000000..73543ea8 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/template/service/impl/AeConfVoucherTemplateServiceImpl.java @@ -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 implements IAeConfVoucherTemplateService { + + private IAeConfVoucherTemplateDao templateDao; + @Autowired + private IAeConfVoucherTemplateAssistDao templateAssistDao; + + @Autowired + public void setAeConfVoucherTemplateDao(IAeConfVoucherTemplateDao dao) { + this.templateDao = dao; + this.dao = dao; + } + + /** + * 根据 账簿、凭证类别、主数据查询列表 ,带出明细 + */ + @Override + public List queryAll(AeConfVoucherTemplateEntity entity) { + checkTempNull("queryAll", entity); + List query = templateDao.query(entity); + for (AeConfVoucherTemplateEntity aeConfVoucherTemplateEntity : query) { + queryAssistList(aeConfVoucherTemplateEntity); + } + return query; + } + + /** + * 根据 账簿、凭证类别、主数据查询列表 点击单条后展示明细行 + */ + @Override + public AeConfVoucherTemplateEntity queryById(AeConfVoucherTemplateEntity entity) { + checkTempNull("queryById", entity); + List 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 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 query = templateAssistDao.query(aeConfVoucherTemplateAssistEntity); + entity.setAssistEntityList(query); + } +}