From 4d8905f445b7e7e76d26c1f6a302f729ec74c092 Mon Sep 17 00:00:00 2001 From: zhengyf Date: Mon, 9 Jun 2025 08:46:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=BF=E8=84=89=EF=BC=9A1=E3=80=81=E7=A7=91?= =?UTF-8?q?=E7=9B=AE=E5=AF=B9=E7=85=A7=E6=96=B0=E5=A2=9E=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AeConfBusinessModuleMdmServiceImpl.java | 2 +- .../controller/ClassificationController.java | 55 +++- .../controller/ContrastController.java | 4 +- .../AeConfSubjectClassificationEntity.java | 308 +++++------------- .../AeConfSubjectClassificationEntity.xml | 81 +++-- .../entity/AeConfSubjectContrastBEntity.java | 51 +++ .../entity/AeConfSubjectContrastEntity.java | 4 +- .../IAeConfSubjectClassificationService.java | 9 +- .../IAeConfSubjectContrastService.java | 2 +- ...eConfSubjectClassificationServiceImpl.java | 103 +++++- .../AeConfSubjectContrastServiceImpl.java | 32 +- 11 files changed, 368 insertions(+), 283 deletions(-) diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/service/impl/AeConfBusinessModuleMdmServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/service/impl/AeConfBusinessModuleMdmServiceImpl.java index cc6f240e..904aa550 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/service/impl/AeConfBusinessModuleMdmServiceImpl.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/service/impl/AeConfBusinessModuleMdmServiceImpl.java @@ -115,7 +115,7 @@ public class AeConfBusinessModuleMdmServiceImpl extends BaseService query1 = aeConfBusinessModuleMdmDao.query(ae1); if (query1.size() > 0) { diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/controller/ClassificationController.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/controller/ClassificationController.java index 77599bf0..b6c616fa 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/controller/ClassificationController.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/controller/ClassificationController.java @@ -24,22 +24,53 @@ public class ClassificationController extends DefaultController { @Autowired private IAeConfSubjectClassificationService aeConfSubjectClassificationService; -// @RequestMapping(value = "/queryAll", method = RequestMethod.POST) -// public JsonResultEntity queryAll(@RequestBody AeConfSubjectContrastEntity entity){ -// try { -// List all = aeConfSubjectClassificationService.queryAll(entity); -// return getSuccessMessageEntity("请求成功",all); -// } catch (Exception e) { -// e.printStackTrace(); -// return getFailureMessageEntity("请求失败",e.getMessage()); -// } -// } + @RequestMapping(value = "/queryAll", method = RequestMethod.POST) + public JsonResultEntity queryAll(@RequestBody AeConfSubjectClassificationEntity entity){ + try { + List all = aeConfSubjectClassificationService.queryAll(entity); + return getSuccessMessageEntity("请求成功",all); + } catch (Exception e) { + e.printStackTrace(); + return getFailureMessageEntity("请求失败",e.getMessage()); + } + } + @RequestMapping(value = "/queryById", method = RequestMethod.POST) + public JsonResultEntity queryById(@RequestBody AeConfSubjectClassificationEntity entity){ + try { + AeConfSubjectClassificationEntity aeConfSubjectClassificationEntity = aeConfSubjectClassificationService.queryById(entity); + return getSuccessMessageEntity("请求成功",aeConfSubjectClassificationEntity); + } catch (Exception e) { + e.printStackTrace(); + return getFailureMessageEntity("请求失败",e.getMessage()); + } + } @RequestMapping(value = "/save", method = RequestMethod.POST) public JsonResultEntity save(@RequestBody AeConfSubjectClassificationEntity entity) { try { - List all = aeConfSubjectClassificationService.saveEntity(entity); - return getSuccessMessageEntity("请求成功", all); + AeConfSubjectClassificationEntity save = aeConfSubjectClassificationService.saveEntity(entity); + return getSuccessMessageEntity("请求成功", save); + } catch (Exception e) { + e.printStackTrace(); + return getFailureMessageEntity("请求失败", e.getMessage()); + } + } + @RequestMapping(value = "/update", method = RequestMethod.POST) + public JsonResultEntity update(@RequestBody AeConfSubjectClassificationEntity entity) { + try { + AeConfSubjectClassificationEntity update = aeConfSubjectClassificationService.updateEntity(entity); + return getSuccessMessageEntity("请求成功", update); + } catch (Exception e) { + e.printStackTrace(); + return getFailureMessageEntity("请求失败", e.getMessage()); + } + } + + @RequestMapping(value = "/delete", method = RequestMethod.POST) + public JsonResultEntity delete(@RequestBody AeConfSubjectClassificationEntity entity) { + try { + aeConfSubjectClassificationService.deleteEntity(entity); + return getSuccessMessageEntity("请求成功", null); } catch (Exception e) { e.printStackTrace(); return getFailureMessageEntity("请求失败", e.getMessage()); diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/controller/ContrastController.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/controller/ContrastController.java index 056fe73d..1ba31211 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/controller/ContrastController.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/controller/ContrastController.java @@ -80,8 +80,8 @@ public class ContrastController extends DefaultController { @RequestMapping(value = "/queryByInfluenceIds", method = RequestMethod.POST) public JsonResultEntity queryByInfluenceIds(@RequestBody AeConfSubjectContrastEntity entity){ try { - AeConfSubjectContrastEntity aeConfSubjectContrastEntity = aeConfSubjectContrastService.queryByInfluenceIds(entity); - return getSuccessMessageEntity("请求成功",aeConfSubjectContrastEntity); + List list = aeConfSubjectContrastService.queryByInfluenceIds(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/subject/entity/AeConfSubjectClassificationEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/entity/AeConfSubjectClassificationEntity.java index bed402ed..511c06de 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/entity/AeConfSubjectClassificationEntity.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/entity/AeConfSubjectClassificationEntity.java @@ -1,236 +1,106 @@ package com.hzya.frame.voucher.ae.comf.subject.entity; import java.util.Date; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonIgnore; import com.hzya.frame.web.entity.BaseEntity; +import lombok.Data; + /** * 会计事项(accounting_event)-配置-科目分类定义(AeConfSubjectClassification)实体类 * * @author zydd * @since 2025-06-06 17:00:57 */ +@Data public class AeConfSubjectClassificationEntity extends BaseEntity { - - /** 科目分类编码 */ - private String code; - /** 科目分类名称 */ - private String name; - /** 公司pk */ - private String pkCorp; - /** 账簿主键 */ - private String pkglorgbook; - /** 账簿编码 */ - private String glorgbookcode; - /** 账簿名称 */ - private String glorgbookname; - /** 影响因素定义ids */ - private String factorids; - /** 影响因素定义names */ - private String factornames; - /** 对照表id */ - private String contrastId; - /** 目标档案值(会计科目)-默认值,没有对照表时使用 */ - private String desdocvalueDefault; - /** 备注 */ - 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 String code; + /** + * 科目分类名称 + */ + private String name; + /** + * 模块id + */ + private String aeConfModuleId; + /** + * 公司pk + */ + private String pkCorp; + /** + * 账簿主键 + */ + private String pkglorgbook; + /** + * 账簿编码 + */ + private String glorgbookcode; + /** + * 账簿名称 + */ + private String glorgbookname; + /** + * 影响因素定义ids + */ + private String factorids; + /** + * 影响因素定义names + */ + private String factornames; + /** + * 对照表id + */ + private String contrastId; + private String contrastCode; + private String contrastName; + /** + * 目标档案值(会计科目)-默认值,没有对照表时使用 + */ + private String desdocvalueDefaultId; + private String desdocvalueDefaultName; + /** + * 备注 + */ + private String remark; + @JsonIgnore + private String def1; + @JsonIgnore + private String def2; + @JsonIgnore + private String def3; + @JsonIgnore + private String def4; + @JsonIgnore + private String def5; + @JsonIgnore + private String def6; + @JsonIgnore + private String def7; + @JsonIgnore + private String def8; + @JsonIgnore + private String def9; + @JsonIgnore + private String def10; + /** + * 创建人 + */ + private String createUser; + /** + * 修改人 + */ + private String modifyUser; - public String getCode() { - return code; - } + /** + * 科目对照子表 + */ + private List contrastBEntityList; - public void setCode(String code) { - this.code = code; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPkCorp() { - return pkCorp; - } - - public void setPkCorp(String pkCorp) { - this.pkCorp = pkCorp; - } - - public String getPkglorgbook() { - return pkglorgbook; - } - - public void setPkglorgbook(String pkglorgbook) { - this.pkglorgbook = pkglorgbook; - } - - public String getGlorgbookcode() { - return glorgbookcode; - } - - public void setGlorgbookcode(String glorgbookcode) { - this.glorgbookcode = glorgbookcode; - } - - public String getGlorgbookname() { - return glorgbookname; - } - - public void setGlorgbookname(String glorgbookname) { - this.glorgbookname = glorgbookname; - } - - public String getFactorids() { - return factorids; - } - - public void setFactorids(String factorids) { - this.factorids = factorids; - } - - public String getFactornames() { - return factornames; - } - - public void setFactornames(String factornames) { - this.factornames = factornames; - } - - public String getContrastId() { - return contrastId; - } - - public void setContrastId(String contrastId) { - this.contrastId = contrastId; - } - - public String getDesdocvalueDefault() { - return desdocvalueDefault; - } - - public void setDesdocvalueDefault(String desdocvalueDefault) { - this.desdocvalueDefault = desdocvalueDefault; - } - - 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; - } } diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/entity/AeConfSubjectClassificationEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/entity/AeConfSubjectClassificationEntity.xml index 3b71aa52..07b72e47 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/entity/AeConfSubjectClassificationEntity.xml +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/entity/AeConfSubjectClassificationEntity.xml @@ -7,6 +7,7 @@ + @@ -14,7 +15,10 @@ - + + + + @@ -37,15 +41,19 @@ id ,code ,name - ,pk_corp + ,aeConfModuleId + ,pk_corp ,pkglorgbook ,glorgbookcode ,glorgbookname ,factorIds ,factorNames ,contrast_id - ,desdocvalue_default - ,remark + ,contrast_code + ,contrast_name + ,desdocvalue_default_id + ,desdocvalue_default_name + ,remark ,def1 ,def2 ,def3 @@ -72,6 +80,7 @@ and id = #{id} and code = #{code} and name = #{name} + and aeConfModuleId = #{aeConfModuleId} and pk_corp = #{pkCorp} and pkglorgbook = #{pkglorgbook} and glorgbookcode = #{glorgbookcode} @@ -79,9 +88,10 @@ and factorIds = #{factorids} and factorNames = #{factornames} and contrast_id = #{contrastId} - and desdocvalue_default = - #{desdocvalueDefault} - + and contrast_code = #{contrastCode} + and contrast_name = #{contrastName} + and desdocvalue_default_id = #{desdocvalueDefaultId} + and desdocvalue_default_name = #{desdocvalueDefaultName} and remark = #{remark} and def1 = #{def1} and def2 = #{def2} @@ -110,6 +120,7 @@ and id = #{id} and code = #{code} and name = #{name} + and aeConfModuleId = #{aeConfModuleId} and pk_corp = #{pkCorp} and pkglorgbook = #{pkglorgbook} and glorgbookcode = #{glorgbookcode} @@ -117,9 +128,10 @@ and factorIds = #{factorids} and factorNames = #{factornames} and contrast_id = #{contrastId} - and desdocvalue_default = - #{desdocvalueDefault} - + and contrast_code = #{contrastCode} + and contrast_name = #{contrastName} + and desdocvalue_default_id = #{desdocvalueDefaultId} + and desdocvalue_default_name = #{desdocvalueDefaultName} and remark = #{remark} and def1 = #{def1} and def2 = #{def2} @@ -150,6 +162,7 @@ and id like concat('%',#{id},'%') and code like concat('%',#{code},'%') and name like concat('%',#{name},'%') + and aeConfModuleId like concat('%',#{aeConfModuleId},'%') and pk_corp like concat('%',#{pkCorp},'%') and pkglorgbook like concat('%',#{pkglorgbook},'%') @@ -163,9 +176,10 @@ and factorNames like concat('%',#{factornames},'%') and contrast_id like concat('%',#{contrastId},'%') - and desdocvalue_default like - concat('%',#{desdocvalueDefault},'%') - + and contrast_code like concat('%',#{contrastCode},'%') + and contrast_name like concat('%',#{contrastName},'%') + and desdocvalue_default_id like concat('%',#{desdocvalueDefaultId},'%') + and desdocvalue_default_name like concat('%',#{desdocvalueDefaultName},'%') and remark like concat('%',#{remark},'%') and def1 like concat('%',#{def1},'%') and def2 like concat('%',#{def2},'%') @@ -196,6 +210,7 @@ or id = #{id} or code = #{code} or name = #{name} + or aeConfModuleId = #{aeConfModuleId} or pk_corp = #{pkCorp} or pkglorgbook = #{pkglorgbook} or glorgbookcode = #{glorgbookcode} @@ -203,9 +218,8 @@ or factorIds = #{factorids} or factorNames = #{factornames} or contrast_id = #{contrastId} - or desdocvalue_default = - #{desdocvalueDefault} - + or desdocvalue_default_id = #{desdocvalueDefaultId} + or desdocvalue_default_name = #{desdocvalueDefaultName} or remark = #{remark} or def1 = #{def1} or def2 = #{def2} @@ -234,6 +248,7 @@ code , name , + aeConfModuleId , pk_corp , pkglorgbook , glorgbookcode , @@ -241,7 +256,10 @@ factorIds , factorNames , contrast_id , - desdocvalue_default , + contrast_code , + contrast_name , + desdocvalue_default_id , + desdocvalue_default_name , remark , def1 , def2 , @@ -266,6 +284,7 @@ #{code} , #{name} , + #{aeConfModuleId} , #{pkCorp} , #{pkglorgbook} , #{glorgbookcode} , @@ -273,7 +292,10 @@ #{factorids} , #{factornames} , #{contrastId} , - #{desdocvalueDefault} , + #{contrastCode} , + #{contrastName} , + #{desdocvalueDefaultId} , + #{desdocvalueDefaultName} , #{remark} , #{def1} , #{def2} , @@ -299,22 +321,22 @@ insert into ae_conf_subject_classification(code, name, pk_corp, pkglorgbook, glorgbookcode, glorgbookname, - factorIds, factorNames, contrast_id, desdocvalue_default, remark, def1, def2, def3, def4, def5, def6, def7, + factorIds, factorNames, contrast_id, desdocvalue_default_id, remark, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, create_time, create_user, modify_time, modify_user, sts, sts) values - (#{entity.code},#{entity.name},#{entity.pkCorp},#{entity.pkglorgbook},#{entity.glorgbookcode},#{entity.glorgbookname},#{entity.factorids},#{entity.factornames},#{entity.contrastId},#{entity.desdocvalueDefault},#{entity.remark},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.create_time},#{entity.createUser},#{entity.modify_time},#{entity.modifyUser},#{entity.sts}, + (#{entity.code},#{entity.name},#{entity.pkCorp},#{entity.pkglorgbook},#{entity.glorgbookcode},#{entity.glorgbookname},#{entity.factorids},#{entity.factornames},#{entity.contrastId},#{entity.desdocvalueDefaultId},#{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') insert into ae_conf_subject_classification(code, name, pk_corp, pkglorgbook, glorgbookcode, glorgbookname, - factorIds, factorNames, contrast_id, desdocvalue_default, remark, def1, def2, def3, def4, def5, def6, def7, + factorIds, factorNames, contrast_id, desdocvalue_default_id, remark, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, create_time, create_user, modify_time, modify_user, sts) values - (#{entity.code},#{entity.name},#{entity.pkCorp},#{entity.pkglorgbook},#{entity.glorgbookcode},#{entity.glorgbookname},#{entity.factorids},#{entity.factornames},#{entity.contrastId},#{entity.desdocvalueDefault},#{entity.remark},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.create_time},#{entity.createUser},#{entity.modify_time},#{entity.modifyUser},#{entity.sts}) + (#{entity.code},#{entity.name},#{entity.pkCorp},#{entity.pkglorgbook},#{entity.glorgbookcode},#{entity.glorgbookname},#{entity.factorids},#{entity.factornames},#{entity.contrastId},#{entity.desdocvalueDefaultId},#{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 code = values(code), @@ -326,7 +348,7 @@ factorIds = values(factorIds), factorNames = values(factorNames), contrast_id = values(contrast_id), - desdocvalue_default = values(desdocvalue_default), + desdocvalue_default_id = values(desdocvalue_default_id), remark = values(remark), def1 = values(def1), def2 = values(def2), @@ -351,6 +373,7 @@ code = #{code}, name = #{name}, + aeConfModuleId = #{aeConfModuleId}, pk_corp = #{pkCorp}, pkglorgbook = #{pkglorgbook}, glorgbookcode = #{glorgbookcode}, @@ -358,9 +381,10 @@ factorIds = #{factorids}, factorNames = #{factornames}, contrast_id = #{contrastId}, - desdocvalue_default = - #{desdocvalueDefault}, - + contrast_code = #{contrastCode}, + contrast_name = #{contrastName}, + desdocvalue_default_id = #{desdocvalueDefaultId}, + desdocvalue_default_name = #{desdocvalueDefaultName}, remark = #{remark}, def1 = #{def1}, def2 = #{def2}, @@ -405,9 +429,8 @@ and factorIds = #{factorids} and factorNames = #{factornames} and contrast_id = #{contrastId} - and desdocvalue_default = - #{desdocvalueDefault} - + and desdocvalue_default_id = #{desdocvalueDefaultId} + and desdocvalue_default_name = #{desdocvalueDefaultName} and remark = #{remark} and def1 = #{def1} and def2 = #{def2} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/entity/AeConfSubjectContrastBEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/entity/AeConfSubjectContrastBEntity.java index 8f2e078b..37801763 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/entity/AeConfSubjectContrastBEntity.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/entity/AeConfSubjectContrastBEntity.java @@ -2,6 +2,7 @@ package com.hzya.frame.voucher.ae.comf.subject.entity; import java.util.Date; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.hzya.frame.web.entity.BaseEntity; import lombok.Data; @@ -17,177 +18,227 @@ public class AeConfSubjectContrastBEntity extends BaseEntity { /** * 对照表id */ + @JsonIgnore private Long contrastId; /** * 公司pk */ + @JsonIgnore private String pkCorp; private String glorgname; /** * 目标档案id */ + @JsonIgnore private String pkAccsubj; /** * 目标档案值(会计科目) */ + @JsonIgnore private String desdocvalue; /** * 来源档案表1 */ + @JsonIgnore private String factortable1; /** * 来源档案表2 */ + @JsonIgnore private String factortable2; /** * 来源档案表3 */ + @JsonIgnore private String factortable3; /** * 来源档案表4 */ + @JsonIgnore private String factortable4; /** * 来源档案表5 */ + @JsonIgnore private String factortable5; /** * 来源档案表6 */ + @JsonIgnore private String factortable6; /** * 来源档案表7 */ + @JsonIgnore private String factortable7; /** * 来源档案表8 */ + @JsonIgnore private String factortable8; /** * 来源档案表9 */ + @JsonIgnore private String factortable9; /** * 来源档案主键1 */ + @JsonIgnore private String factorpk1; /** * 来源档案主键2 */ + @JsonIgnore private String factorpk2; /** * 来源档案主键3 */ + @JsonIgnore private String factorpk3; /** * 来源档案主键4 */ + @JsonIgnore private String factorpk4; /** * 来源档案主键5 */ + @JsonIgnore private String factorpk5; /** * 来源档案主键6 */ + @JsonIgnore private String factorpk6; /** * 来源档案主键7 */ + @JsonIgnore private String factorpk7; /** * 来源档案主键8 */ + @JsonIgnore private String factorpk8; /** * 来源档案主键9 */ + @JsonIgnore private String factorpk9; /** * 来源档案值1 */ + @JsonIgnore private String factorid1; /** * 来源档案值2 */ + @JsonIgnore private String factorid2; /** * 来源档案值3 */ + @JsonIgnore private String factorid3; /** * 来源档案值4 */ + @JsonIgnore private String factorid4; /** * 来源档案值5 */ + @JsonIgnore private String factorid5; /** * 来源档案值6 */ + @JsonIgnore private String factorid6; /** * 来源档案值7 */ + @JsonIgnore private String factorid7; /** * 来源档案值8 */ + @JsonIgnore private String factorid8; /** * 来源档案值9 */ + @JsonIgnore private String factorid9; /** * 来源档案名称1 */ + @JsonIgnore private String factorname1; /** * 来源档案名称2 */ + @JsonIgnore private String factorname2; /** * 来源档案名称3 */ + @JsonIgnore private String factorname3; /** * 来源档案名称4 */ + @JsonIgnore private String factorname4; /** * 来源档案名称5 */ + @JsonIgnore private String factorname5; /** * 来源档案名称6 */ + @JsonIgnore private String factorname6; /** * 来源档案名称7 */ + @JsonIgnore private String factorname7; /** * 来源档案名称8 */ + @JsonIgnore private String factorname8; /** * 来源档案名称9 */ + @JsonIgnore private String factorname9; /** * 备注 */ private String remark; + @JsonIgnore private String def1; + @JsonIgnore private String def2; + @JsonIgnore private String def3; + @JsonIgnore private String def4; + @JsonIgnore private String def5; + @JsonIgnore private String def6; + @JsonIgnore private String def7; + @JsonIgnore private String def8; + @JsonIgnore private String def9; + @JsonIgnore private String def10; /** * 创建人 diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/entity/AeConfSubjectContrastEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/entity/AeConfSubjectContrastEntity.java index 09817ba6..d896e158 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/entity/AeConfSubjectContrastEntity.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/entity/AeConfSubjectContrastEntity.java @@ -93,10 +93,10 @@ public class AeConfSubjectContrastEntity extends BaseEntity { private List contrastBEntityList; - - /** 多选来源档案时接收参数使用,在逐一保存自白哦 */ + /** */ private List mappingFileVOS; + private String aeConfModuleId; } diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/service/IAeConfSubjectClassificationService.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/service/IAeConfSubjectClassificationService.java index de0a019a..2e3746ba 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/service/IAeConfSubjectClassificationService.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/service/IAeConfSubjectClassificationService.java @@ -13,5 +13,12 @@ import java.util.List; * @since 2025-06-06 17:00:57 */ public interface IAeConfSubjectClassificationService extends IBaseService{ - List saveEntity(AeConfSubjectClassificationEntity entity); + List queryAll(AeConfSubjectClassificationEntity entity); + + AeConfSubjectClassificationEntity queryById(AeConfSubjectClassificationEntity entity); + AeConfSubjectClassificationEntity saveEntity(AeConfSubjectClassificationEntity entity); + + AeConfSubjectClassificationEntity updateEntity(AeConfSubjectClassificationEntity entity); + + void deleteEntity(AeConfSubjectClassificationEntity entity); } diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/service/IAeConfSubjectContrastService.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/service/IAeConfSubjectContrastService.java index 47f8f8ed..ffda164a 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/service/IAeConfSubjectContrastService.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/service/IAeConfSubjectContrastService.java @@ -20,5 +20,5 @@ public interface IAeConfSubjectContrastService extends IBaseService queryByInfluenceIds(AeConfSubjectContrastEntity entity); } diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/service/impl/AeConfSubjectClassificationServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/service/impl/AeConfSubjectClassificationServiceImpl.java index 91271af9..e5e74244 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/service/impl/AeConfSubjectClassificationServiceImpl.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/service/impl/AeConfSubjectClassificationServiceImpl.java @@ -1,12 +1,18 @@ package com.hzya.frame.voucher.ae.comf.subject.service.impl; +import cn.hutool.core.lang.Assert; +import com.hzya.frame.voucher.ae.comf.subject.dao.IAeConfSubjectContrastBDao; import com.hzya.frame.voucher.ae.comf.subject.entity.AeConfSubjectClassificationEntity; import com.hzya.frame.voucher.ae.comf.subject.dao.IAeConfSubjectClassificationDao; +import com.hzya.frame.voucher.ae.comf.subject.entity.AeConfSubjectContrastBEntity; import com.hzya.frame.voucher.ae.comf.subject.entity.AeConfSubjectContrastEntity; import com.hzya.frame.voucher.ae.comf.subject.service.IAeConfSubjectClassificationService; -import org.springframework.stereotype.Service; +import com.hzya.frame.voucher.ae.comf.subject.service.IAeConfSubjectContrastBService; +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; @@ -19,18 +25,97 @@ import java.util.List; */ @Service public class AeConfSubjectClassificationServiceImpl extends BaseService implements IAeConfSubjectClassificationService { - + private IAeConfSubjectClassificationDao aeConfSubjectClassificationDao; - + @Autowired - public void setAeConfSubjectClassificationDao(IAeConfSubjectClassificationDao dao) { - this.aeConfSubjectClassificationDao = dao; - this.dao = dao; - } + public void setAeConfSubjectClassificationDao(IAeConfSubjectClassificationDao dao) { + this.aeConfSubjectClassificationDao = dao; + this.dao = dao; + } + + @Autowired + private IAeConfSubjectContrastBService contrastBService; @Override - public List saveEntity(AeConfSubjectClassificationEntity entity) { + public List queryAll(AeConfSubjectClassificationEntity entity) { + Assert.notNull(entity.getPkCorp(), "查询科目分类定义时,公司主键不允许为空。"); + Assert.notNull(entity.getPkglorgbook(), "查询科目分类定义时,账簿主键不允许为空。"); + Assert.notNull(entity.getAeConfModuleId(), "查询科目分类定义时,业务模块id不允许为空。"); + List query = aeConfSubjectClassificationDao.query(entity); + for (AeConfSubjectClassificationEntity aeConfSubjectClassificationEntity : query) { + //查询科目对照子表 + queryaeConfSubjectContrastBList(aeConfSubjectClassificationEntity); + } + return query; + } - return null; + @Override + public AeConfSubjectClassificationEntity queryById(AeConfSubjectClassificationEntity entity) { + Assert.notNull(entity.getId(), "查询科目分类定义时,id不允许为空。"); + Assert.notNull(entity.getPkCorp(), "查询科目分类定义时,公司主键不允许为空。"); + Assert.notNull(entity.getPkglorgbook(), "查询科目分类定义时,账簿主键不允许为空。"); + Assert.notNull(entity.getAeConfModuleId(), "查询科目分类定义时,业务模块id不允许为空。"); + List query = aeConfSubjectClassificationDao.query(entity); + if (query.size() == 0 || query.size() > 1) { + return null; + } + AeConfSubjectClassificationEntity aeConfSubjectClassificationEntity = query.get(0); + //查询科目对照子表 + queryaeConfSubjectContrastBList(aeConfSubjectClassificationEntity); + return aeConfSubjectClassificationEntity; + } + + /** + * 科目分类定义 + */ + @Override + public AeConfSubjectClassificationEntity saveEntity(AeConfSubjectClassificationEntity entity) { + Assert.notNull(entity.getPkCorp(), "科目分类定义新增时,公司主键不允许为空。"); + Assert.notNull(entity.getPkglorgbook(), "科目分类定义新增时,核算账簿id不允许为空。"); + Assert.notNull(entity.getAeConfModuleId(), "科目分类定义新增时,业务模块id不允许为空。"); + Assert.notNull(entity.getGlorgbookcode(), "科目分类定义新增时,核算账簿编码不允许为空。"); + Assert.notNull(entity.getGlorgbookname(), "科目分类定义新增时,核算账簿名称不允许为空。"); + Assert.notNull(entity.getCode(), "科目分类定义新增时,编码不允许为空。"); + Assert.notNull(entity.getName(), "科目分类定义新增时,名称不允许为空。"); + AeConfSubjectClassificationEntity save = aeConfSubjectClassificationDao.save(entity); + //查询科目对照子表 + queryaeConfSubjectContrastBList(save); + + + return save; + } + + @Override + public AeConfSubjectClassificationEntity updateEntity(AeConfSubjectClassificationEntity entity) { + Assert.notNull(entity.getId(), "科目分类定义更新时,id不允许为空。"); + Assert.notNull(entity.getPkCorp(), "科目分类定义更新时,公司主键不允许为空。"); + Assert.notNull(entity.getAeConfModuleId(), "科目分类定义更新时,业务模块id不允许为空。"); + Assert.notNull(entity.getPkglorgbook(), "科目分类定义更新时,核算账簿id不允许为空。"); + Assert.notNull(entity.getGlorgbookcode(), "科目分类定义更新时,核算账簿编码不允许为空。"); + Assert.notNull(entity.getGlorgbookname(), "科目分类定义更新时,核算账簿名称不允许为空。"); + Assert.notNull(entity.getCode(), "科目分类定义更新时,编码不允许为空。"); + Assert.notNull(entity.getName(), "科目分类定义更新时,名称不允许为空。"); + AeConfSubjectClassificationEntity update = aeConfSubjectClassificationDao.update(entity); + //查询科目对照子表 + queryaeConfSubjectContrastBList(update); + return update; + } + + @Override + public void deleteEntity(AeConfSubjectClassificationEntity entity) { + Assert.notNull(entity.getId(), "科目分类定义删除时,id不允许为空。"); + aeConfSubjectClassificationDao.logicRemove(entity); + } + + + public void queryaeConfSubjectContrastBList(AeConfSubjectClassificationEntity entity) { + if (entity.getContrastId() != null || !"".equals(entity.getContrastId())) { + //查询科目对照子表 + AeConfSubjectContrastBEntity aeConfSubjectContrastBEntity = new AeConfSubjectContrastBEntity(); + aeConfSubjectContrastBEntity.setContrastId(Long.valueOf(entity.getContrastId())); + List bEntities = contrastBService.queryAllByContrastId(aeConfSubjectContrastBEntity); + entity.setContrastBEntityList(bEntities); + } } } diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/service/impl/AeConfSubjectContrastServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/service/impl/AeConfSubjectContrastServiceImpl.java index 0c12f199..b0478ba8 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/service/impl/AeConfSubjectContrastServiceImpl.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/subject/service/impl/AeConfSubjectContrastServiceImpl.java @@ -1,6 +1,7 @@ package com.hzya.frame.voucher.ae.comf.subject.service.impl; import cn.hutool.core.lang.Assert; +import com.hzya.frame.voucher.ae.comf.factor.entity.AeConfInfluenceFactorEntity; import com.hzya.frame.voucher.ae.comf.factor.service.IAeConfInfluenceFactorService; import com.hzya.frame.voucher.ae.comf.subject.dao.IAeConfSubjectContrastBDao; import com.hzya.frame.voucher.ae.comf.subject.entity.AeConfSubjectContrastBEntity; @@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired; import com.hzya.frame.basedao.service.impl.BaseService; import java.lang.reflect.Field; +import java.util.ArrayList; import java.util.List; /** @@ -169,16 +171,32 @@ public class AeConfSubjectContrastServiceImpl extends BaseService queryByInfluenceIds(AeConfSubjectContrastEntity entity) { Assert.notNull(entity.getSourceIds(), "根据影响因素ids查询时对照表时,来源档案ids不能为空!"); String sourceIds = entity.getSourceIds(); + String moduleId = entity.getAeConfModuleId(); String[] sourceIdSplit = sourceIds.split(","); - - iAeConfInfluenceFactorService.query(null); - - - - return null; + List sourceIdList = new ArrayList<>(); + for (String sourceId : sourceIdSplit) { + AeConfInfluenceFactorEntity aeConfInfluenceFactorEntity = new AeConfInfluenceFactorEntity(); + aeConfInfluenceFactorEntity.setAeConfModuleId(Long.valueOf(moduleId)); + aeConfInfluenceFactorEntity.setId(sourceId); + List query = iAeConfInfluenceFactorService.query(aeConfInfluenceFactorEntity); + if (query.size() == 0 || query.size() > 1) { + Assert.state(false, "根据模块id:{},影响因素id:{},未查询到或查到多个影响因素配置,请检查"); + } + sourceIdList.add(query.get(0).getMappingFileId()); + } + //将sourceIdList,用,拼接起来 + String result = String.join(",", sourceIdList); + System.out.println(result); + AeConfSubjectContrastEntity aeConfSubjectContrastEntity = new AeConfSubjectContrastEntity(); + aeConfSubjectContrastEntity.setSourceIds(result); + List query = aeConfSubjectContrastDao.query(aeConfSubjectContrastEntity); + if (query.size() == 0) { + return null; + } + return query; } }