diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/controller/InfluenceFactorController.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/controller/InfluenceFactorController.java index f5387ef0..1fbcefd3 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/controller/InfluenceFactorController.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/controller/InfluenceFactorController.java @@ -89,6 +89,16 @@ public class InfluenceFactorController extends DefaultController { return getFailureMessageEntity("请求失败",e.getMessage()); } } - + //根据业务模块id查询相关影响因素列表 + @RequestMapping(value = "/queryFluenceFactorsByModuleId", method = RequestMethod.POST) + public JsonResultEntity queryFluenceFactorsByModuleId(@RequestBody AeConfInfluenceFactorEntity entity) { + try { + List all = iAeConfInfluenceFactorService.queryFluenceFactorsByModuleId(entity); + return getSuccessMessageEntity("请求成功",all); + } catch (Exception e) { + e.printStackTrace(); + return getFailureMessageEntity("请求失败",e.getMessage()); + } + } } diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/controller/InfluenceFactorCorrelationController.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/controller/InfluenceFactorCorrelationController.java new file mode 100644 index 00000000..35f27749 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/controller/InfluenceFactorCorrelationController.java @@ -0,0 +1,92 @@ +package com.hzya.frame.voucher.ae.comf.factor.controller; + +import com.github.pagehelper.PageInfo; +import com.hzya.frame.voucher.ae.comf.factor.entity.AeConfInfluenceFactorCorrelationEntity; +import com.hzya.frame.voucher.ae.comf.factor.service.IAeConfInfluenceFactorCorrelationService; +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; +import java.util.Map; + +/** + * Created by zydd on 2025-05-23 09:53 + * 会计事项(accounting_event)-配置-影响因素设置,存在关联ncc的自定义档案 + */ +@RestController +@RequestMapping("/ae/conf/influenceFactorCorrelation") +public class InfluenceFactorCorrelationController extends DefaultController { + @Autowired + private IAeConfInfluenceFactorCorrelationService aeConfInfluenceFactorCorrelationService; + +// @RequestMapping(value = "/queryPaged", method = RequestMethod.POST) +// public JsonResultEntity queryPaged(@RequestBody AeConfInfluenceFactorEntity entity) { +// try { +// PageInfo pageInfo = aeConfInfluenceFactorCorrelationService.queryEntityPaged(entity); +// return getSuccessMessageEntity("请求成功",pageInfo); +// } catch (Exception e) { +// e.printStackTrace(); +// return getFailureMessageEntity("请求失败",e.getMessage()); +// } +// } + + @RequestMapping(value = "/queryAll", method = RequestMethod.POST) + public JsonResultEntity queryAll(@RequestBody AeConfInfluenceFactorCorrelationEntity entity) { + try { + List all = aeConfInfluenceFactorCorrelationService.queryAll(entity); + return getSuccessMessageEntity("请求成功",all); + } catch (Exception e) { + e.printStackTrace(); + return getFailureMessageEntity("请求失败",e.getMessage()); + } + } + @RequestMapping(value = "/queryByMdmId", method = RequestMethod.POST) + public JsonResultEntity queryByMdmId(@RequestBody AeConfInfluenceFactorCorrelationEntity entity) { + try { + List all = aeConfInfluenceFactorCorrelationService.queryByMdmId(entity); + return getSuccessMessageEntity("请求成功",all); + } catch (Exception e) { + e.printStackTrace(); + return getFailureMessageEntity("请求失败",e.getMessage()); + } + } + + @RequestMapping(value = "/saveList", method = RequestMethod.POST) + public JsonResultEntity saveList(@RequestBody List list) { + try { + List all = aeConfInfluenceFactorCorrelationService.saveList(list); + return getSuccessMessageEntity("请求成功",all); + } catch (Exception e) { + e.printStackTrace(); + return getFailureMessageEntity("请求失败",e.getMessage()); + } + } + + @RequestMapping(value = "/updateList", method = RequestMethod.POST) + public JsonResultEntity updateList(@RequestBody List list) { + try { + List all = aeConfInfluenceFactorCorrelationService.updateList(list); + return getSuccessMessageEntity("请求成功",all); + } catch (Exception e) { + e.printStackTrace(); + return getFailureMessageEntity("请求失败",e.getMessage()); + } + } + + @RequestMapping(value = "/deleteList", method = RequestMethod.POST) + public JsonResultEntity deleteList(@RequestBody List list) { + try { + Map map = aeConfInfluenceFactorCorrelationService.deleteList(list); + return getSuccessMessageEntity("请求成功",map); + } catch (Exception e) { + e.printStackTrace(); + return getFailureMessageEntity("请求失败",e.getMessage()); + } + } + +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/dao/IAeConfInfluenceFactorCorrelationDao.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/dao/IAeConfInfluenceFactorCorrelationDao.java new file mode 100644 index 00000000..e2826b23 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/dao/IAeConfInfluenceFactorCorrelationDao.java @@ -0,0 +1,15 @@ +package com.hzya.frame.voucher.ae.comf.factor.dao; + +import com.hzya.frame.voucher.ae.comf.factor.entity.AeConfInfluenceFactorCorrelationEntity; +import com.hzya.frame.basedao.dao.IBaseDao; + +/** + * 会计事项(accounting_event)-配置-影响因素关联设置(ae_conf_influence_factor_correlation: table)表数据库访问层 + * + * @author zydd + * @since 2025-05-27 09:07:42 + */ +public interface IAeConfInfluenceFactorCorrelationDao extends IBaseDao { + +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/dao/impl/AeConfInfluenceFactorCorrelationDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/dao/impl/AeConfInfluenceFactorCorrelationDaoImpl.java new file mode 100644 index 00000000..4d011581 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/dao/impl/AeConfInfluenceFactorCorrelationDaoImpl.java @@ -0,0 +1,17 @@ +package com.hzya.frame.voucher.ae.comf.factor.dao.impl; + +import com.hzya.frame.voucher.ae.comf.factor.entity.AeConfInfluenceFactorCorrelationEntity; +import com.hzya.frame.voucher.ae.comf.factor.dao.IAeConfInfluenceFactorCorrelationDao; +import org.springframework.stereotype.Repository; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +/** + * 会计事项(accounting_event)-配置-影响因素关联设置(AeConfInfluenceFactorCorrelation)表数据库访问层 + * + * @author zydd + * @since 2025-05-27 09:07:42 + */ +@Repository +public class AeConfInfluenceFactorCorrelationDaoImpl extends MybatisGenericDao implements IAeConfInfluenceFactorCorrelationDao{ + +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/entity/AeConfInfluenceFactorCorrelationEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/entity/AeConfInfluenceFactorCorrelationEntity.java new file mode 100644 index 00000000..22761698 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/entity/AeConfInfluenceFactorCorrelationEntity.java @@ -0,0 +1,76 @@ +package com.hzya.frame.voucher.ae.comf.factor.entity; + +import java.util.List; + +import com.hzya.frame.voucher.ae.comf.factor.entity.vo.MappingFieldVO; +import com.hzya.frame.web.entity.BaseEntity; +import lombok.Data; + +/** + * 会计事项(accounting_event)-配置-影响因素关联设置(AeConfInfluenceFactorCorrelation)实体类 + * + * @author zydd + * @since 2025-05-27 09:07:42 + */ +@Data +public class AeConfInfluenceFactorCorrelationEntity extends BaseEntity { + + /** + * 影响因素id + */ + private Long factorId; + /** + * 影响因素name + */ + private String factorName; + /** + * 主数据id + */ + private String mdmId; + /** + * 主数据code + */ + private String mdmCode; + /** + * 主数据name + */ + private String mdmName; + /** + * 映射字段id + */ + private String mappingFieldId; + /** + * 映射字段code + */ + private String mappingFieldCode; + /** + * 映射字段name + */ + private String mappingFieldName; + /** + * 备注 + */ + 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; + + List mappingFieldList; + +} + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/entity/AeConfInfluenceFactorCorrelationEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/entity/AeConfInfluenceFactorCorrelationEntity.xml new file mode 100644 index 00000000..0a238c67 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/entity/AeConfInfluenceFactorCorrelationEntity.xml @@ -0,0 +1,419 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + ,factor_id + ,factor_name + ,mdm_id + ,mdm_code + ,mdm_name + ,mapping_field_id + ,mapping_field_code + ,mapping_field_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_influence_factor_correlation( + + id , + factor_id , + factor_name , + mdm_id , + mdm_code , + mdm_name , + mapping_field_id , + mapping_field_code , + mapping_field_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} , + #{factorId} , + #{factorName} , + #{mdmId} , + #{mdmCode} , + #{mdmName} , + #{mappingFieldId} , + #{mappingFieldCode} , + #{mappingFieldName} , + #{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_influence_factor_correlation(factor_id, factor_name, mdm_id, mdm_code, mdm_name, + mapping_field_id, mapping_field_code, mapping_field_name, remark, def1, def2, def3, def4, def5, def6, def7, + def8, def9, def10, create_time, create_user, modify_time, modify_user, sts, sts) + values + + (#{entity.factorId},#{entity.factorName},#{entity.mdmId},#{entity.mdmCode},#{entity.mdmName},#{entity.mappingFieldId},#{entity.mappingFieldCode},#{entity.mappingFieldName},#{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_influence_factor_correlation(factor_id, factor_name, mdm_id, mdm_code, mdm_name, + mapping_field_id, mapping_field_code, mapping_field_name, remark, def1, def2, def3, def4, def5, def6, def7, + def8, def9, def10, create_time, create_user, modify_time, modify_user, sts) + values + + (#{entity.factorId},#{entity.factorName},#{entity.mdmId},#{entity.mdmCode},#{entity.mdmName},#{entity.mappingFieldId},#{entity.mappingFieldCode},#{entity.mappingFieldName},#{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}) + + on duplicate key update + factor_id = values(factor_id), + factor_name = values(factor_name), + mdm_id = values(mdm_id), + mdm_code = values(mdm_code), + mdm_name = values(mdm_name), + mapping_field_id = values(mapping_field_id), + mapping_field_code = values(mapping_field_code), + mapping_field_name = values(mapping_field_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_influence_factor_correlation set + + factor_id = #{factorId}, + factor_name = #{factorName}, + mdm_id = #{mdmId}, + mdm_code = #{mdmCode}, + mdm_name = #{mdmName}, + mapping_field_id = #{mappingFieldId}, + mapping_field_code = #{mappingFieldCode}, + + mapping_field_name = #{mappingFieldName}, + + remark = #{remark}, + def1 = #{def1}, + def2 = #{def2}, + def3 = #{def3}, + def4 = #{def4}, + def5 = #{def5}, + def6 = #{def6}, + def7 = #{def7}, + def8 = #{def8}, + def9 = #{def9}, + def10 = #{def10}, + now(), + modify_user = #{modifyUser}, + sts = #{sts}, + + where id = #{id} + + + + update ae_conf_influence_factor_correlation + set sts= 'N', + modify_time = now(), + ,modify_user = #{modifyUser} + where id = #{id} + + + + update ae_conf_influence_factor_correlation set sts= 'N' ,modify_time = #{modify_time},modify_user_id = + #{modify_user_id} + + and id = #{id} + and factor_id = #{factorId} + and factor_name = #{factorName} + and mdm_id = #{mdmId} + and mdm_code = #{mdmCode} + and mdm_name = #{mdmName} + and mapping_field_id = #{mappingFieldId} + and mapping_field_code = + #{mappingFieldCode} + + and mapping_field_name = + #{mappingFieldName} + + 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_influence_factor_correlation + where id = #{id} + + + + diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/entity/AeConfInfluenceFactorEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/entity/AeConfInfluenceFactorEntity.xml index b48da03f..e06e869d 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/entity/AeConfInfluenceFactorEntity.xml +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/entity/AeConfInfluenceFactorEntity.xml @@ -63,9 +63,7 @@ and id = #{id} and ae_conf_module_id = #{aeConfModuleId} - and ae_conf_module_name = - #{aeConfModuleName} - + and ae_conf_module_name = #{aeConfModuleName} and factor_name = #{factorName} and mapping_file_id = #{mappingFileId} and mapping_file_code = #{mappingFileCode} @@ -445,6 +443,24 @@ LEFT JOIN ae_conf_business_module ae_conf_business_module ON ae_conf_business_module.id=ae_conf_influence_factor.ae_conf_module_id WHERE ae_conf_influence_factor.sts='Y' + and ae_conf_influence_factor.id = #{id} + and ae_conf_influence_factor.ae_conf_module_id = #{aeConfModuleId} + and ae_conf_influence_factor.ae_conf_module_name = #{aeConfModuleName} + and ae_conf_influence_factor.factor_name = #{factorName} + and ae_conf_influence_factor.mapping_file_id = #{mappingFileId} + and ae_conf_influence_factor.mapping_file_code = #{mappingFileCode} + and ae_conf_influence_factor.mapping_file_name = #{mappingFileName} + and ae_conf_influence_factor.remark = #{remark} + and ae_conf_influence_factor.def1 = #{def1} + and ae_conf_influence_factor.def2 = #{def2} + and ae_conf_influence_factor.def3 = #{def3} + and ae_conf_influence_factor.def4 = #{def4} + and ae_conf_influence_factor.def5 = #{def5} + and ae_conf_influence_factor.def6 = #{def6} + and ae_conf_influence_factor.def7 = #{def7} + and ae_conf_influence_factor.def8 = #{def8} + and ae_conf_influence_factor.def9 = #{def9} + and ae_conf_influence_factor.def10 = #{def10} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/entity/vo/MappingFieldVO.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/entity/vo/MappingFieldVO.java new file mode 100644 index 00000000..a198b1f0 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/entity/vo/MappingFieldVO.java @@ -0,0 +1,23 @@ +package com.hzya.frame.voucher.ae.comf.factor.entity.vo; + +import lombok.Data; + +/** + * Created by zydd on 2025-05-27 09:59 + */ +@Data +public class MappingFieldVO { + /** + * 映射字段id + */ + private String mappingFieldId; + /** + * 映射字段code + */ + private String mappingFieldCode; + /** + * 映射字段name + */ + private String mappingFieldName; + +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/service/IAeConfInfluenceFactorCorrelationService.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/service/IAeConfInfluenceFactorCorrelationService.java new file mode 100644 index 00000000..08a06475 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/service/IAeConfInfluenceFactorCorrelationService.java @@ -0,0 +1,25 @@ +package com.hzya.frame.voucher.ae.comf.factor.service; + +import com.github.pagehelper.PageInfo; +import com.hzya.frame.voucher.ae.comf.factor.entity.AeConfInfluenceFactorCorrelationEntity; +import com.hzya.frame.basedao.service.IBaseService; + +import java.util.List; +import java.util.Map; + +/** + * 会计事项(accounting_event)-配置-影响因素关联设置(AeConfInfluenceFactorCorrelation)表服务接口 + * + * @author zydd + * @since 2025-05-27 09:07:42 + */ +public interface IAeConfInfluenceFactorCorrelationService extends IBaseService { + List queryByMdmId(AeConfInfluenceFactorCorrelationEntity entity); + + List queryAll(AeConfInfluenceFactorCorrelationEntity entity); + + List saveList(List list); + List updateList(List list); + + Map deleteList(List list); +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/service/IAeConfInfluenceFactorService.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/service/IAeConfInfluenceFactorService.java index 633e32de..0eec5606 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/service/IAeConfInfluenceFactorService.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/service/IAeConfInfluenceFactorService.java @@ -18,4 +18,6 @@ public interface IAeConfInfluenceFactorService extends IBaseService queryAll(AeConfInfluenceFactorEntity entity); AeConfInfluenceFactorEntity queryById(AeConfInfluenceFactorEntity entity); AeConfInfluenceFactorEntity updateById(AeConfInfluenceFactorEntity entity); + + List queryFluenceFactorsByModuleId(AeConfInfluenceFactorEntity entity); } diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/service/impl/AeConfInfluenceFactorCorrelationServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/service/impl/AeConfInfluenceFactorCorrelationServiceImpl.java new file mode 100644 index 00000000..d8040787 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/service/impl/AeConfInfluenceFactorCorrelationServiceImpl.java @@ -0,0 +1,110 @@ +package com.hzya.frame.voucher.ae.comf.factor.service.impl; + +import cn.hutool.core.lang.Assert; +import cn.hutool.json.JSONUtil; +import com.hzya.frame.voucher.ae.comf.factor.entity.AeConfInfluenceFactorCorrelationEntity; +import com.hzya.frame.voucher.ae.comf.factor.dao.IAeConfInfluenceFactorCorrelationDao; +import com.hzya.frame.voucher.ae.comf.factor.service.IAeConfInfluenceFactorCorrelationService; +import org.springframework.stereotype.Service; +import org.springframework.beans.factory.annotation.Autowired; + + +import com.hzya.frame.basedao.service.impl.BaseService; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 会计事项(accounting_event)-配置-影响因素关联设置(AeConfInfluenceFactorCorrelation)表服务实现类 + * + * @author zydd + * @since 2025-05-27 09:07:42 + */ +@Service +public class AeConfInfluenceFactorCorrelationServiceImpl extends BaseService implements IAeConfInfluenceFactorCorrelationService { + + private IAeConfInfluenceFactorCorrelationDao aeConfInfluenceFactorCorrelationDao; + + @Autowired + public void setAeConfInfluenceFactorCorrelationDao(IAeConfInfluenceFactorCorrelationDao dao) { + this.aeConfInfluenceFactorCorrelationDao = dao; + this.dao = dao; + } + + @Override + public List queryAll(AeConfInfluenceFactorCorrelationEntity entity) { + return null; + } + + @Override + public List queryByMdmId(AeConfInfluenceFactorCorrelationEntity entity) { + Assert.notNull(entity.getMdmId(), "查询影响因素关联时,主数据id不能为空!"); + List query = aeConfInfluenceFactorCorrelationDao.query(entity); + return query; + } + + @Override + public List saveList(List list) { + if (list.size() == 0) { + Assert.state(false, "影响因素关联时保存时,数据不能为空,请检查!"); + } + for (AeConfInfluenceFactorCorrelationEntity factorCorrelation : list) { + Assert.notNull(factorCorrelation.getMdmId(), "影响因素关联保存时,主数据id不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + Assert.notNull(factorCorrelation.getMdmCode(), "影响因素关联保存时,主数据code不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + Assert.notNull(factorCorrelation.getMdmName(), "影响因素关联保存时,主数据name不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + Assert.notNull(factorCorrelation.getFactorId(), "影响因素关联保存时,影响因素id不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + Assert.notNull(factorCorrelation.getFactorName(), "影响因素关联保存时,影响因素name不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + Assert.notNull(factorCorrelation.getMappingFieldId(), "影响因素关联保存时,映射字段id不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + Assert.notNull(factorCorrelation.getMappingFieldCode(), "影响因素关联保存时,映射字段code不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + Assert.notNull(factorCorrelation.getMappingFieldName(), "影响因素关联保存时,映射字段name不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + } + List saveList = new ArrayList<>(); + for (AeConfInfluenceFactorCorrelationEntity factorCorrelation : list) { + AeConfInfluenceFactorCorrelationEntity save = aeConfInfluenceFactorCorrelationDao.save(factorCorrelation); + saveList.add(save); + } + return saveList; + } + + @Override + public List updateList(List list) { + if (list.size() == 0) { + Assert.state(false, "影响因素关联时更新时,数据不能为空,请检查!"); + } + for (AeConfInfluenceFactorCorrelationEntity factorCorrelation : list) { + Assert.notNull(factorCorrelation.getId(), "影响因素关联保存时,因素关联id不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + Assert.notNull(factorCorrelation.getMdmId(), "影响因素关联保存时,主数据id不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + Assert.notNull(factorCorrelation.getMdmCode(), "影响因素关联保存时,主数据code不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + Assert.notNull(factorCorrelation.getMdmName(), "影响因素关联保存时,主数据name不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + Assert.notNull(factorCorrelation.getFactorId(), "影响因素关联保存时,影响因素id不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + Assert.notNull(factorCorrelation.getFactorName(), "影响因素关联保存时,影响因素name不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + Assert.notNull(factorCorrelation.getMappingFieldId(), "影响因素关联保存时,映射字段id不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + Assert.notNull(factorCorrelation.getMappingFieldCode(), "影响因素关联保存时,映射字段code不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + Assert.notNull(factorCorrelation.getMappingFieldName(), "影响因素关联保存时,映射字段name不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + } + List updateList = new ArrayList<>(); + for (AeConfInfluenceFactorCorrelationEntity factorCorrelation : list) { + AeConfInfluenceFactorCorrelationEntity save = aeConfInfluenceFactorCorrelationDao.update(factorCorrelation); + updateList.add(save); + } + return updateList; + } + + @Override + public Map deleteList(List list) { + if (list.size() == 0) { + Assert.state(false, "影响因素关联删除时,数据不能为空,请检查!"); + } + for (AeConfInfluenceFactorCorrelationEntity factorCorrelation : list) { + Assert.notNull(factorCorrelation.getId(), "影响因素关联删除时,因素关联id不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation)); + } + Map deleteMap = new HashMap<>(); + for (AeConfInfluenceFactorCorrelationEntity factorCorrelation : list) { + int i = aeConfInfluenceFactorCorrelationDao.logicRemove(factorCorrelation); + deleteMap.put(factorCorrelation.getId(), i); + } + return deleteMap; + } +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/service/impl/AeConfInfluenceFactorServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/service/impl/AeConfInfluenceFactorServiceImpl.java index 129ddb64..4e381114 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/service/impl/AeConfInfluenceFactorServiceImpl.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/factor/service/impl/AeConfInfluenceFactorServiceImpl.java @@ -87,6 +87,12 @@ public class AeConfInfluenceFactorServiceImpl extends BaseService queryFluenceFactorsByModuleId(AeConfInfluenceFactorEntity entity) { + Assert.notNull(entity.getAeConfModuleId(), "根据业务模块id查询影响因素设置时,业务模块id不能为空"); + List list = aeConfInfluenceFactorDao.queryAll(entity); + return list; + } } diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/controller/MdmController.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/controller/MdmController.java index d2488fdd..0a550391 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/controller/MdmController.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/controller/MdmController.java @@ -2,7 +2,12 @@ package com.hzya.frame.voucher.ae.comf.module.controller; import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity; import com.hzya.frame.mdm.mdmModule.service.IMdmModuleService; +import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity; +import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity; +import com.hzya.frame.mdm.mdmModuleDbFileds.service.IMdmModuleDbFiledsService; import com.hzya.frame.voucher.ae.comf.module.entity.AeConfBusinessModuleMdmEntity; +import com.hzya.frame.voucher.ae.comf.module.entity.MdmAndFiledsVO; +import com.hzya.frame.voucher.ae.comf.module.service.IMdmService; import com.hzya.frame.web.action.DefaultController; import com.hzya.frame.web.entity.JsonResultEntity; import org.springframework.beans.factory.annotation.Autowired; @@ -23,6 +28,11 @@ public class MdmController extends DefaultController { @Autowired private IMdmModuleService mdmModuleService; + @Autowired + private IMdmModuleDbFiledsService mdmModuleDbFiledsService; + @Autowired + private IMdmService mdmService; + @RequestMapping(value = "/queryAll", method = RequestMethod.POST) public JsonResultEntity queryAll(@RequestBody MdmModuleEntity entity){ @@ -34,7 +44,28 @@ public class MdmController extends DefaultController { e.printStackTrace(); return getFailureMessageEntity("请求失败", e.getMessage()); } + } + @RequestMapping(value = "/queryFiledsByDbId", method = RequestMethod.POST) + public JsonResultEntity queryFiledsByDbId(@RequestBody MdmModuleDbFiledsEntity entity){ + try { + List all = mdmModuleDbFiledsService.query(entity); + return getSuccessMessageEntity("请求成功",all); + } catch (Exception e) { + e.printStackTrace(); + return getFailureMessageEntity("请求失败", e.getMessage()); + } + } + + @RequestMapping(value = "/queryMdmAndFiledsByMdmId", method = RequestMethod.POST) + public JsonResultEntity queryMdmAndFiledsByMdmId(@RequestBody MdmModuleDbEntity entity){ + try { + List all = mdmService.queryMdmAndFiledsByMdmId(entity); + return getSuccessMessageEntity("请求成功",all); + } catch (Exception e) { + e.printStackTrace(); + return getFailureMessageEntity("请求失败", e.getMessage()); + } } diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/entity/MdmAndFiledsVO.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/entity/MdmAndFiledsVO.java new file mode 100644 index 00000000..09517c4c --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/entity/MdmAndFiledsVO.java @@ -0,0 +1,11 @@ +package com.hzya.frame.voucher.ae.comf.module.entity; + +import lombok.Data; + +/** + * Created by zydd on 2025-05-27 15:08 + * 单据、字段VO + */ +@Data +public class MdmAndFiledsVO { +} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/service/IMdmService.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/service/IMdmService.java new file mode 100644 index 00000000..bdb00f16 --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/service/IMdmService.java @@ -0,0 +1,13 @@ +package com.hzya.frame.voucher.ae.comf.module.service; + +import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity; +import com.hzya.frame.voucher.ae.comf.module.entity.MdmAndFiledsVO; + +import java.util.List; + +/** + * Created by zydd on 2025-05-27 15:06 + */ +public interface IMdmService { + List queryMdmAndFiledsByMdmId(MdmModuleDbEntity entity); +} 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 19df8682..0d911a72 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 @@ -1,6 +1,7 @@ package com.hzya.frame.voucher.ae.comf.module.service.impl; import cn.hutool.core.lang.Assert; +import cn.hutool.json.JSONUtil; import com.github.pagehelper.PageInfo; import com.hzya.frame.mdm.mdmModule.dao.IMdmModuleDao; import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity; @@ -9,7 +10,7 @@ import com.hzya.frame.voucher.ae.comf.module.entity.AeConfBusinessModuleEntity; import com.hzya.frame.voucher.ae.comf.module.entity.AeConfBusinessModuleMdmEntity; import com.hzya.frame.voucher.ae.comf.module.dao.IAeConfBusinessModuleMdmDao; import com.hzya.frame.voucher.ae.comf.module.service.IAeConfBusinessModuleMdmService; -import org.springframework.stereotype.Service; +import org.springframework.stereotype.Service; import org.springframework.beans.factory.annotation.Autowired; import com.hzya.frame.basedao.service.impl.BaseService; @@ -24,124 +25,124 @@ import java.util.stream.Collectors; */ @Service public class AeConfBusinessModuleMdmServiceImpl extends BaseService implements IAeConfBusinessModuleMdmService { - + private IAeConfBusinessModuleMdmDao aeConfBusinessModuleMdmDao; - + @Autowired - public void setaeConfBusinessModuleMdmDao(IAeConfBusinessModuleMdmDao dao) { - this.aeConfBusinessModuleMdmDao = dao; - this.dao = dao; - } + public void setaeConfBusinessModuleMdmDao(IAeConfBusinessModuleMdmDao dao) { + this.aeConfBusinessModuleMdmDao = dao; + this.dao = dao; + } - @Autowired - private IMdmModuleDao mdmModuleDao; - @Autowired - private IAeConfBusinessModuleDao aeConfBusinessModuleDao; + @Autowired + private IMdmModuleDao mdmModuleDao; + @Autowired + private IAeConfBusinessModuleDao aeConfBusinessModuleDao; - @Override - public List queryAll(AeConfBusinessModuleMdmEntity entity) { - List all = aeConfBusinessModuleMdmDao.query(entity); - return all; - } + @Override + public List queryAll(AeConfBusinessModuleMdmEntity entity) { + List all = aeConfBusinessModuleMdmDao.query(entity); + return all; + } - /** - * 查询全部业务业务模块,里面包含主数据 - */ - @Override - public List queryModuleIncludeMdmList(AeConfBusinessModuleMdmEntity entity) { - List all = new ArrayList<>(); - List aeConfBusinessModuleMdmEntityList = aeConfBusinessModuleMdmDao.query(entity); - Map> collect = - aeConfBusinessModuleMdmEntityList.stream().collect(Collectors.groupingBy(index -> index.getAeConfModuleId() + "###" + index.getAeConfModuleName())); - Set>> entries = collect.entrySet(); - for (Map.Entry> entry : entries) { - String key = entry.getKey();//moduleId###moduleName - List value = entry.getValue(); - List mdmList = new ArrayList<>(); - for (AeConfBusinessModuleMdmEntity aeConfBusinessModuleMdmEntity : value) { - MdmModuleEntity mdmModuleEntity = new MdmModuleEntity(); - mdmModuleEntity.setMdmCode(Long.valueOf(aeConfBusinessModuleMdmEntity.getMdmCode())); - mdmModuleEntity.setMdmName(aeConfBusinessModuleMdmEntity.getMdmName()); - mdmList.add(mdmModuleEntity); - } + /** + * 查询全部业务业务模块,里面包含主数据 + */ + @Override + public List queryModuleIncludeMdmList(AeConfBusinessModuleMdmEntity entity) { + List all = new ArrayList<>(); + List aeConfBusinessModuleMdmEntityList = aeConfBusinessModuleMdmDao.query(entity); + Map> collect = + aeConfBusinessModuleMdmEntityList.stream().collect(Collectors.groupingBy(index -> index.getAeConfModuleId() + "###" + index.getAeConfModuleName())); + Set>> entries = collect.entrySet(); + for (Map.Entry> entry : entries) { + String key = entry.getKey();//moduleId###moduleName + List value = entry.getValue(); + List mdmList = new ArrayList<>(); + for (AeConfBusinessModuleMdmEntity aeConfBusinessModuleMdmEntity : value) { + MdmModuleEntity mdmModuleEntity = new MdmModuleEntity(); + mdmModuleEntity.setMdmCode(Long.valueOf(aeConfBusinessModuleMdmEntity.getMdmCode())); + mdmModuleEntity.setMdmName(aeConfBusinessModuleMdmEntity.getMdmName()); + mdmList.add(mdmModuleEntity); + } - AeConfBusinessModuleMdmEntity aeConfBusinessModuleMdmEntity = new AeConfBusinessModuleMdmEntity(); - String[] split = key.split("###"); - aeConfBusinessModuleMdmEntity.setAeConfModuleId(Long.valueOf(split[0])); - aeConfBusinessModuleMdmEntity.setAeConfModuleName(split[1]); - aeConfBusinessModuleMdmEntity.setMdmModuleEntity(mdmList); - all.add(aeConfBusinessModuleMdmEntity); - } - return all; - } + AeConfBusinessModuleMdmEntity aeConfBusinessModuleMdmEntity = new AeConfBusinessModuleMdmEntity(); + String[] split = key.split("###"); + aeConfBusinessModuleMdmEntity.setAeConfModuleId(Long.valueOf(split[0])); + aeConfBusinessModuleMdmEntity.setAeConfModuleName(split[1]); + aeConfBusinessModuleMdmEntity.setMdmModuleEntity(mdmList); + all.add(aeConfBusinessModuleMdmEntity); + } + return all; + } - /** - * 根据模块id查询主数据 - */ - @Override - public List queryMdmsByModuleId(AeConfBusinessModuleMdmEntity entity){ - Assert.notNull(entity.getAeConfModuleId(),"查询主数据列表时,业务模块id不能为空"); - List all = aeConfBusinessModuleMdmDao.query(entity); - return all; - } + /** + * 根据模块id查询主数据 + */ + @Override + public List queryMdmsByModuleId(AeConfBusinessModuleMdmEntity entity) { + Assert.notNull(entity.getAeConfModuleId(), "查询主数据列表时,业务模块id不能为空"); + List all = aeConfBusinessModuleMdmDao.query(entity); + return all; + } - @Override - public List saveList(List list) { - if(list.size()==0){ - Assert.state(false,"业务模块-主数据保存时,数据不能为空,请检查!"); - } - for (AeConfBusinessModuleMdmEntity moduleMdmEntity : list) { - Assert.notNull(moduleMdmEntity.getAeConfModuleId(),"业务模块-主数据保存时,业务模块id不能为空,请检查!"); - Assert.notNull(moduleMdmEntity.getAeConfModuleName(),"业务模块-主数据保存时,业务模块name不能为空,请检查!"); - Assert.notNull(moduleMdmEntity.getMdmId(),"业务模块-主数据保存时,主数据id不能为空,请检查!"); - Assert.notNull(moduleMdmEntity.getMdmCode(),"业务模块-主数据保存时,主数据code不能为空,请检查!"); - Assert.notNull(moduleMdmEntity.getMdmName(),"业务模块-主数据保存时,主数据name不能为空,请检查!"); - } - List saveList=new ArrayList<>(); - for (AeConfBusinessModuleMdmEntity aeConfBusinessModuleMdmEntity : list) { - AeConfBusinessModuleMdmEntity save = aeConfBusinessModuleMdmDao.save(aeConfBusinessModuleMdmEntity); - saveList.add(save); - } - return saveList; - } + @Override + public List saveList(List list) { + if (list.size() == 0) { + Assert.state(false, "业务模块-主数据保存时,数据不能为空,请检查!"); + } + for (AeConfBusinessModuleMdmEntity moduleMdmEntity : list) { + Assert.notNull(moduleMdmEntity.getAeConfModuleId(), "业务模块-主数据保存时,业务模块id不能为空,请检查!检验数据为:{}", JSONUtil.toJsonStr(moduleMdmEntity)); + Assert.notNull(moduleMdmEntity.getAeConfModuleName(), "业务模块-主数据保存时,业务模块name不能为空,请检查!检验数据为:{}", JSONUtil.toJsonStr(moduleMdmEntity)); + Assert.notNull(moduleMdmEntity.getMdmId(), "业务模块-主数据保存时,主数据id不能为空,请检查!检验数据为:{}", JSONUtil.toJsonStr(moduleMdmEntity)); + Assert.notNull(moduleMdmEntity.getMdmCode(), "业务模块-主数据保存时,主数据code不能为空,请检查!检验数据为:{}", JSONUtil.toJsonStr(moduleMdmEntity)); + Assert.notNull(moduleMdmEntity.getMdmName(), "业务模块-主数据保存时,主数据name不能为空,请检查!检验数据为:{}", JSONUtil.toJsonStr(moduleMdmEntity)); + } + List saveList = new ArrayList<>(); + for (AeConfBusinessModuleMdmEntity aeConfBusinessModuleMdmEntity : list) { + AeConfBusinessModuleMdmEntity save = aeConfBusinessModuleMdmDao.save(aeConfBusinessModuleMdmEntity); + saveList.add(save); + } + return saveList; + } - @Override - public List updateList(List list) { - if(list.size()==0){ - Assert.state(false,"业务模块-主数据更新时,数据不能为空,请检查!"); - } - for (AeConfBusinessModuleMdmEntity moduleMdmEntity : list) { - Assert.notNull(moduleMdmEntity.getId(),"业务模块-主数据保存时,业务模块-主数据id不能为空,请检查!"); - Assert.notNull(moduleMdmEntity.getAeConfModuleId(),"业务模块-主数据保存时,业务模块id不能为空,请检查!"); - Assert.notNull(moduleMdmEntity.getAeConfModuleName(),"业务模块-主数据保存时,业务模块name不能为空,请检查!"); - Assert.notNull(moduleMdmEntity.getMdmId(),"业务模块-主数据保存时,主数据id不能为空,请检查!"); - Assert.notNull(moduleMdmEntity.getMdmCode(),"业务模块-主数据保存时,主数据code不能为空,请检查!"); - Assert.notNull(moduleMdmEntity.getMdmName(),"业务模块-主数据保存时,主数据name不能为空,请检查!"); - } - List updateList=new ArrayList<>(); - for (AeConfBusinessModuleMdmEntity aeConfBusinessModuleMdmEntity : list) { - AeConfBusinessModuleMdmEntity update = aeConfBusinessModuleMdmDao.update(aeConfBusinessModuleMdmEntity); - updateList.add(update); - } - return updateList; - } + @Override + public List updateList(List list) { + if (list.size() == 0) { + Assert.state(false, "业务模块-主数据更新时,数据不能为空,请检查!"); + } + for (AeConfBusinessModuleMdmEntity moduleMdmEntity : list) { + Assert.notNull(moduleMdmEntity.getId(), "业务模块-主数据保存时,业务模块-主数据id不能为空,请检查!检验数据为:{}", JSONUtil.toJsonStr(moduleMdmEntity)); + Assert.notNull(moduleMdmEntity.getAeConfModuleId(), "业务模块-主数据保存时,业务模块id不能为空,请检查!检验数据为:{}", JSONUtil.toJsonStr(moduleMdmEntity)); + Assert.notNull(moduleMdmEntity.getAeConfModuleName(), "业务模块-主数据保存时,业务模块name不能为空,请检查!检验数据为:{}", JSONUtil.toJsonStr(moduleMdmEntity)); + Assert.notNull(moduleMdmEntity.getMdmId(), "业务模块-主数据保存时,主数据id不能为空,请检查!检验数据为:{}", JSONUtil.toJsonStr(moduleMdmEntity)); + Assert.notNull(moduleMdmEntity.getMdmCode(), "业务模块-主数据保存时,主数据code不能为空,请检查!检验数据为:{}", JSONUtil.toJsonStr(moduleMdmEntity)); + Assert.notNull(moduleMdmEntity.getMdmName(), "业务模块-主数据保存时,主数据name不能为空,请检查!检验数据为:{}", JSONUtil.toJsonStr(moduleMdmEntity)); + } + List updateList = new ArrayList<>(); + for (AeConfBusinessModuleMdmEntity aeConfBusinessModuleMdmEntity : list) { + AeConfBusinessModuleMdmEntity update = aeConfBusinessModuleMdmDao.update(aeConfBusinessModuleMdmEntity); + updateList.add(update); + } + return updateList; + } - @Override - public Map deleteList(List list) { - if(list.size()==0){ - Assert.state(false,"业务模块-主数据删除时,数据不能为空,请检查!"); - } - for (AeConfBusinessModuleMdmEntity moduleMdmEntity : list) { - Assert.notNull(moduleMdmEntity.getId(),"业务模块-主数据删除时,业务模块-主数据id不能为空,请检查!"); - } - Map deleteMap=new HashMap<>(); - for (AeConfBusinessModuleMdmEntity aeConfBusinessModuleMdmEntity : list) { - int i = aeConfBusinessModuleMdmDao.logicRemove(aeConfBusinessModuleMdmEntity); - deleteMap.put(aeConfBusinessModuleMdmEntity.getId(),i); - } - return deleteMap; - } + @Override + public Map deleteList(List list) { + if (list.size() == 0) { + Assert.state(false, "业务模块-主数据删除时,数据不能为空,请检查!"); + } + for (AeConfBusinessModuleMdmEntity moduleMdmEntity : list) { + Assert.notNull(moduleMdmEntity.getId(), "业务模块-主数据删除时,业务模块-主数据id不能为空,请检查!检验数据为:{}", JSONUtil.toJsonStr(moduleMdmEntity)); + } + Map deleteMap = new HashMap<>(); + for (AeConfBusinessModuleMdmEntity aeConfBusinessModuleMdmEntity : list) { + int i = aeConfBusinessModuleMdmDao.logicRemove(aeConfBusinessModuleMdmEntity); + deleteMap.put(aeConfBusinessModuleMdmEntity.getId(), i); + } + return deleteMap; + } } diff --git a/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/service/impl/MdmServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/service/impl/MdmServiceImpl.java new file mode 100644 index 00000000..6fb0a09b --- /dev/null +++ b/base-buildpackage/src/main/java/com/hzya/frame/voucher/ae/comf/module/service/impl/MdmServiceImpl.java @@ -0,0 +1,51 @@ +package com.hzya.frame.voucher.ae.comf.module.service.impl; + +import cn.hutool.core.lang.Assert; +import com.hzya.frame.mdm.mdmModuleDb.dao.IMdmModuleDbDao; +import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity; +import com.hzya.frame.mdm.mdmModuleDbFileds.dao.IMdmModuleDbFiledsDao; +import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity; +import com.hzya.frame.mdm.mdmModuleDbFiledsRule.dao.IMdmModuleDbFiledsRuleDao; +import com.hzya.frame.voucher.ae.comf.module.service.IMdmService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by zydd on 2025-05-27 15:06 + */ +@Service +public class MdmServiceImpl implements IMdmService { + + @Autowired + private IMdmModuleDbDao mdmModuleDbDao; + @Autowired + private IMdmModuleDbFiledsDao mdmModuleDbFiledsDao; + @Autowired + private IMdmModuleDbFiledsRuleDao mdmModuleDbFiledsRuleDao; + + + //根据单据id查询表以及相关字段 + @Override + public List queryMdmAndFiledsByMdmId(MdmModuleDbEntity entity) { + Assert.notNull(entity.getMdmId(),"根据"); + List res=new ArrayList<>(); + //查询单据 + List mdmModuleDbEntityList = mdmModuleDbDao.query(entity); + //查询字段,1、主表 2、明细 3、操作日志 4、下发日志 + for (MdmModuleDbEntity mdmModuleDbEntity : mdmModuleDbEntityList) { + if("3".equals(mdmModuleDbEntity.getDbType())||"4".equals(mdmModuleDbEntity.getDbType())){ + continue; + } + MdmModuleDbFiledsEntity mdmModuleDbFiledsEntity = new MdmModuleDbFiledsEntity(); + mdmModuleDbFiledsEntity.setDbId(mdmModuleDbEntity.getId()); + List filedList = mdmModuleDbFiledsDao.query(mdmModuleDbFiledsEntity); + mdmModuleDbEntity.setSublistMdmModuleDbFileds(filedList); + res.add(mdmModuleDbEntity); + } + + return res; + } +} diff --git a/base-common/src/main/java/com/hzya/frame/util/AESUtil.java b/base-common/src/main/java/com/hzya/frame/util/AESUtil.java index 349869d8..57737619 100644 --- a/base-common/src/main/java/com/hzya/frame/util/AESUtil.java +++ b/base-common/src/main/java/com/hzya/frame/util/AESUtil.java @@ -5,6 +5,8 @@ import cn.hutool.crypto.SecureUtil; import cn.hutool.crypto.symmetric.SymmetricAlgorithm; import cn.hutool.crypto.symmetric.SymmetricCrypto; +import static cn.hutool.crypto.CipherMode.encrypt; + /** * @Description AES加密解密 * @Author xiang2lin @@ -77,4 +79,9 @@ public class AESUtil { return null; } + public static void main(String[] args) { + String data = "201103"; + String encrypt1 = encrypt(data); + System.out.println(encrypt1); + } }