广脉:1、新增影响因素关联相关接口
This commit is contained in:
parent
93d141640f
commit
a3a8cc3143
|
@ -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<AeConfInfluenceFactorEntity> all = iAeConfInfluenceFactorService.queryFluenceFactorsByModuleId(entity);
|
||||
return getSuccessMessageEntity("请求成功",all);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return getFailureMessageEntity("请求失败",e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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<AeConfInfluenceFactorCorrelationEntity> 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<AeConfInfluenceFactorCorrelationEntity> 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<AeConfInfluenceFactorCorrelationEntity> list) {
|
||||
try {
|
||||
List<AeConfInfluenceFactorCorrelationEntity> 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<AeConfInfluenceFactorCorrelationEntity> list) {
|
||||
try {
|
||||
List<AeConfInfluenceFactorCorrelationEntity> 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<AeConfInfluenceFactorCorrelationEntity> list) {
|
||||
try {
|
||||
Map<String, Integer> map = aeConfInfluenceFactorCorrelationService.deleteList(list);
|
||||
return getSuccessMessageEntity("请求成功",map);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return getFailureMessageEntity("请求失败",e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -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<AeConfInfluenceFactorCorrelationEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -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<AeConfInfluenceFactorCorrelationEntity, String> implements IAeConfInfluenceFactorCorrelationDao{
|
||||
|
||||
}
|
||||
|
|
@ -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<MappingFieldVO> mappingFieldList;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,419 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.voucher.ae.comf.factor.dao.impl.AeConfInfluenceFactorCorrelationDaoImpl">
|
||||
|
||||
<resultMap id="get-AeConfInfluenceFactorCorrelationEntity-result"
|
||||
type="com.hzya.frame.voucher.ae.comf.factor.entity.AeConfInfluenceFactorCorrelationEntity">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="factorId" column="factor_id" jdbcType="INTEGER"/>
|
||||
<result property="factorName" column="factor_name" jdbcType="VARCHAR"/>
|
||||
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
|
||||
<result property="mdmCode" column="mdm_code" jdbcType="VARCHAR"/>
|
||||
<result property="mdmName" column="mdm_name" jdbcType="VARCHAR"/>
|
||||
<result property="mappingFieldId" column="mapping_field_id" jdbcType="VARCHAR"/>
|
||||
<result property="mappingFieldCode" column="mapping_field_code" jdbcType="VARCHAR"/>
|
||||
<result property="mappingFieldName" column="mapping_field_name" jdbcType="VARCHAR"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="def1" column="def1" jdbcType="VARCHAR"/>
|
||||
<result property="def2" column="def2" jdbcType="VARCHAR"/>
|
||||
<result property="def3" column="def3" jdbcType="VARCHAR"/>
|
||||
<result property="def4" column="def4" jdbcType="VARCHAR"/>
|
||||
<result property="def5" column="def5" jdbcType="VARCHAR"/>
|
||||
<result property="def6" column="def6" jdbcType="VARCHAR"/>
|
||||
<result property="def7" column="def7" jdbcType="VARCHAR"/>
|
||||
<result property="def8" column="def8" jdbcType="VARCHAR"/>
|
||||
<result property="def9" column="def9" jdbcType="VARCHAR"/>
|
||||
<result property="def10" column="def10" jdbcType="VARCHAR"/>
|
||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createUser" column="create_user" jdbcType="VARCHAR"/>
|
||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="modifyUser" column="modify_user" jdbcType="VARCHAR"/>
|
||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id="AeConfInfluenceFactorCorrelationEntity_Base_Column_List">
|
||||
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
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-AeConfInfluenceFactorCorrelationEntity-result"
|
||||
parameterType="com.hzya.frame.voucher.ae.comf.factor.entity.AeConfInfluenceFactorCorrelationEntity">
|
||||
select
|
||||
<include refid="AeConfInfluenceFactorCorrelationEntity_Base_Column_List"/>
|
||||
from ae_conf_influence_factor_correlation
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null">and id = #{id}</if>
|
||||
<if test="factorId != null">and factor_id = #{factorId}</if>
|
||||
<if test="factorName != null and factorName != ''">and factor_name = #{factorName}</if>
|
||||
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
|
||||
<if test="mdmCode != null and mdmCode != ''">and mdm_code = #{mdmCode}</if>
|
||||
<if test="mdmName != null and mdmName != ''">and mdm_name = #{mdmName}</if>
|
||||
<if test="mappingFieldId != null and mappingFieldId != ''">and mapping_field_id = #{mappingFieldId}</if>
|
||||
<if test="mappingFieldCode != null and mappingFieldCode != ''">and mapping_field_code =
|
||||
#{mappingFieldCode}
|
||||
</if>
|
||||
<if test="mappingFieldName != null and mappingFieldName != ''">and mapping_field_name =
|
||||
#{mappingFieldName}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
<if test="def1 != null and def1 != ''">and def1 = #{def1}</if>
|
||||
<if test="def2 != null and def2 != ''">and def2 = #{def2}</if>
|
||||
<if test="def3 != null and def3 != ''">and def3 = #{def3}</if>
|
||||
<if test="def4 != null and def4 != ''">and def4 = #{def4}</if>
|
||||
<if test="def5 != null and def5 != ''">and def5 = #{def5}</if>
|
||||
<if test="def6 != null and def6 != ''">and def6 = #{def6}</if>
|
||||
<if test="def7 != null and def7 != ''">and def7 = #{def7}</if>
|
||||
<if test="def8 != null and def8 != ''">and def8 = #{def8}</if>
|
||||
<if test="def9 != null and def9 != ''">and def9 = #{def9}</if>
|
||||
<if test="def10 != null and def10 != ''">and def10 = #{def10}</if>
|
||||
<if test="create_time != null">and create_time = #{create_time}</if>
|
||||
<if test="createUser != null and createUser != ''">and create_user = #{createUser}</if>
|
||||
<if test="modify_time != null">and modify_time = #{modify_time}</if>
|
||||
<if test="modifyUser != null and modifyUser != ''">and modify_user = #{modifyUser}</if>
|
||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="entity_count" resultType="Integer"
|
||||
parameterType="com.hzya.frame.voucher.ae.comf.factor.entity.AeConfInfluenceFactorCorrelationEntity">
|
||||
select count(1) from ae_conf_influence_factor_correlation
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null">and id = #{id}</if>
|
||||
<if test="factorId != null">and factor_id = #{factorId}</if>
|
||||
<if test="factorName != null and factorName != ''">and factor_name = #{factorName}</if>
|
||||
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
|
||||
<if test="mdmCode != null and mdmCode != ''">and mdm_code = #{mdmCode}</if>
|
||||
<if test="mdmName != null and mdmName != ''">and mdm_name = #{mdmName}</if>
|
||||
<if test="mappingFieldId != null and mappingFieldId != ''">and mapping_field_id = #{mappingFieldId}</if>
|
||||
<if test="mappingFieldCode != null and mappingFieldCode != ''">and mapping_field_code =
|
||||
#{mappingFieldCode}
|
||||
</if>
|
||||
<if test="mappingFieldName != null and mappingFieldName != ''">and mapping_field_name =
|
||||
#{mappingFieldName}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
<if test="def1 != null and def1 != ''">and def1 = #{def1}</if>
|
||||
<if test="def2 != null and def2 != ''">and def2 = #{def2}</if>
|
||||
<if test="def3 != null and def3 != ''">and def3 = #{def3}</if>
|
||||
<if test="def4 != null and def4 != ''">and def4 = #{def4}</if>
|
||||
<if test="def5 != null and def5 != ''">and def5 = #{def5}</if>
|
||||
<if test="def6 != null and def6 != ''">and def6 = #{def6}</if>
|
||||
<if test="def7 != null and def7 != ''">and def7 = #{def7}</if>
|
||||
<if test="def8 != null and def8 != ''">and def8 = #{def8}</if>
|
||||
<if test="def9 != null and def9 != ''">and def9 = #{def9}</if>
|
||||
<if test="def10 != null and def10 != ''">and def10 = #{def10}</if>
|
||||
<if test="create_time != null">and create_time = #{create_time}</if>
|
||||
<if test="createUser != null and createUser != ''">and create_user = #{createUser}</if>
|
||||
<if test="modify_time != null">and modify_time = #{modify_time}</if>
|
||||
<if test="modifyUser != null and modifyUser != ''">and modify_user = #{modifyUser}</if>
|
||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-AeConfInfluenceFactorCorrelationEntity-result"
|
||||
parameterType="com.hzya.frame.voucher.ae.comf.factor.entity.AeConfInfluenceFactorCorrelationEntity">
|
||||
select
|
||||
<include refid="AeConfInfluenceFactorCorrelationEntity_Base_Column_List"/>
|
||||
from ae_conf_influence_factor_correlation
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null">and id like concat('%',#{id},'%')</if>
|
||||
<if test="factorId != null">and factor_id like concat('%',#{factorId},'%')</if>
|
||||
<if test="factorName != null and factorName != ''">and factor_name like concat('%',#{factorName},'%')</if>
|
||||
<if test="mdmId != null and mdmId != ''">and mdm_id like concat('%',#{mdmId},'%')</if>
|
||||
<if test="mdmCode != null and mdmCode != ''">and mdm_code like concat('%',#{mdmCode},'%')</if>
|
||||
<if test="mdmName != null and mdmName != ''">and mdm_name like concat('%',#{mdmName},'%')</if>
|
||||
<if test="mappingFieldId != null and mappingFieldId != ''">and mapping_field_id like
|
||||
concat('%',#{mappingFieldId},'%')
|
||||
</if>
|
||||
<if test="mappingFieldCode != null and mappingFieldCode != ''">and mapping_field_code like
|
||||
concat('%',#{mappingFieldCode},'%')
|
||||
</if>
|
||||
<if test="mappingFieldName != null and mappingFieldName != ''">and mapping_field_name like
|
||||
concat('%',#{mappingFieldName},'%')
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">and remark like concat('%',#{remark},'%')</if>
|
||||
<if test="def1 != null and def1 != ''">and def1 like concat('%',#{def1},'%')</if>
|
||||
<if test="def2 != null and def2 != ''">and def2 like concat('%',#{def2},'%')</if>
|
||||
<if test="def3 != null and def3 != ''">and def3 like concat('%',#{def3},'%')</if>
|
||||
<if test="def4 != null and def4 != ''">and def4 like concat('%',#{def4},'%')</if>
|
||||
<if test="def5 != null and def5 != ''">and def5 like concat('%',#{def5},'%')</if>
|
||||
<if test="def6 != null and def6 != ''">and def6 like concat('%',#{def6},'%')</if>
|
||||
<if test="def7 != null and def7 != ''">and def7 like concat('%',#{def7},'%')</if>
|
||||
<if test="def8 != null and def8 != ''">and def8 like concat('%',#{def8},'%')</if>
|
||||
<if test="def9 != null and def9 != ''">and def9 like concat('%',#{def9},'%')</if>
|
||||
<if test="def10 != null and def10 != ''">and def10 like concat('%',#{def10},'%')</if>
|
||||
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
|
||||
<if test="createUser != null and createUser != ''">and create_user like concat('%',#{createUser},'%')</if>
|
||||
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
|
||||
<if test="modifyUser != null and modifyUser != ''">and modify_user like concat('%',#{modifyUser},'%')</if>
|
||||
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="AeConfInfluenceFactorCorrelationentity_list_or"
|
||||
resultMap="get-AeConfInfluenceFactorCorrelationEntity-result"
|
||||
parameterType="com.hzya.frame.voucher.ae.comf.factor.entity.AeConfInfluenceFactorCorrelationEntity">
|
||||
select
|
||||
<include refid="AeConfInfluenceFactorCorrelationEntity_Base_Column_List"/>
|
||||
from ae_conf_influence_factor_correlation
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null">or id = #{id}</if>
|
||||
<if test="factorId != null">or factor_id = #{factorId}</if>
|
||||
<if test="factorName != null and factorName != ''">or factor_name = #{factorName}</if>
|
||||
<if test="mdmId != null and mdmId != ''">or mdm_id = #{mdmId}</if>
|
||||
<if test="mdmCode != null and mdmCode != ''">or mdm_code = #{mdmCode}</if>
|
||||
<if test="mdmName != null and mdmName != ''">or mdm_name = #{mdmName}</if>
|
||||
<if test="mappingFieldId != null and mappingFieldId != ''">or mapping_field_id = #{mappingFieldId}</if>
|
||||
<if test="mappingFieldCode != null and mappingFieldCode != ''">or mapping_field_code = #{mappingFieldCode}
|
||||
</if>
|
||||
<if test="mappingFieldName != null and mappingFieldName != ''">or mapping_field_name = #{mappingFieldName}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">or remark = #{remark}</if>
|
||||
<if test="def1 != null and def1 != ''">or def1 = #{def1}</if>
|
||||
<if test="def2 != null and def2 != ''">or def2 = #{def2}</if>
|
||||
<if test="def3 != null and def3 != ''">or def3 = #{def3}</if>
|
||||
<if test="def4 != null and def4 != ''">or def4 = #{def4}</if>
|
||||
<if test="def5 != null and def5 != ''">or def5 = #{def5}</if>
|
||||
<if test="def6 != null and def6 != ''">or def6 = #{def6}</if>
|
||||
<if test="def7 != null and def7 != ''">or def7 = #{def7}</if>
|
||||
<if test="def8 != null and def8 != ''">or def8 = #{def8}</if>
|
||||
<if test="def9 != null and def9 != ''">or def9 = #{def9}</if>
|
||||
<if test="def10 != null and def10 != ''">or def10 = #{def10}</if>
|
||||
<if test="create_time != null">or create_time = #{create_time}</if>
|
||||
<if test="createUser != null and createUser != ''">or create_user = #{createUser}</if>
|
||||
<if test="modify_time != null">or modify_time = #{modify_time}</if>
|
||||
<if test="modifyUser != null and modifyUser != ''">or modify_user = #{modifyUser}</if>
|
||||
<if test="sts != null and sts != ''">or sts = #{sts}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert"
|
||||
parameterType="com.hzya.frame.voucher.ae.comf.factor.entity.AeConfInfluenceFactorCorrelationEntity"
|
||||
keyProperty="id" useGeneratedKeys="true">
|
||||
insert into ae_conf_influence_factor_correlation(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null">id ,</if>
|
||||
<if test="factorId != null">factor_id ,</if>
|
||||
<if test="factorName != null and factorName != ''">factor_name ,</if>
|
||||
<if test="mdmId != null and mdmId != ''">mdm_id ,</if>
|
||||
<if test="mdmCode != null and mdmCode != ''">mdm_code ,</if>
|
||||
<if test="mdmName != null and mdmName != ''">mdm_name ,</if>
|
||||
<if test="mappingFieldId != null and mappingFieldId != ''">mapping_field_id ,</if>
|
||||
<if test="mappingFieldCode != null and mappingFieldCode != ''">mapping_field_code ,</if>
|
||||
<if test="mappingFieldName != null and mappingFieldName != ''">mapping_field_name ,</if>
|
||||
<if test="remark != null and remark != ''">remark ,</if>
|
||||
<if test="def1 != null and def1 != ''">def1 ,</if>
|
||||
<if test="def2 != null and def2 != ''">def2 ,</if>
|
||||
<if test="def3 != null and def3 != ''">def3 ,</if>
|
||||
<if test="def4 != null and def4 != ''">def4 ,</if>
|
||||
<if test="def5 != null and def5 != ''">def5 ,</if>
|
||||
<if test="def6 != null and def6 != ''">def6 ,</if>
|
||||
<if test="def7 != null and def7 != ''">def7 ,</if>
|
||||
<if test="def8 != null and def8 != ''">def8 ,</if>
|
||||
<if test="def9 != null and def9 != ''">def9 ,</if>
|
||||
<if test="def10 != null and def10 != ''">def10 ,</if>
|
||||
<if test="create_time != null">create_time ,</if>
|
||||
<if test="create_time == null">create_time ,</if>
|
||||
<if test="createUser != null and createUser != ''">create_user ,</if>
|
||||
<if test="modify_time != null">modify_time ,</if>
|
||||
<if test="modify_time == null">modify_time ,</if>
|
||||
<if test="modifyUser != null and modifyUser != ''">modify_user ,</if>
|
||||
<if test="sts != null and sts != ''">sts ,</if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null">#{id} ,</if>
|
||||
<if test="factorId != null">#{factorId} ,</if>
|
||||
<if test="factorName != null and factorName != ''">#{factorName} ,</if>
|
||||
<if test="mdmId != null and mdmId != ''">#{mdmId} ,</if>
|
||||
<if test="mdmCode != null and mdmCode != ''">#{mdmCode} ,</if>
|
||||
<if test="mdmName != null and mdmName != ''">#{mdmName} ,</if>
|
||||
<if test="mappingFieldId != null and mappingFieldId != ''">#{mappingFieldId} ,</if>
|
||||
<if test="mappingFieldCode != null and mappingFieldCode != ''">#{mappingFieldCode} ,</if>
|
||||
<if test="mappingFieldName != null and mappingFieldName != ''">#{mappingFieldName} ,</if>
|
||||
<if test="remark != null and remark != ''">#{remark} ,</if>
|
||||
<if test="def1 != null and def1 != ''">#{def1} ,</if>
|
||||
<if test="def2 != null and def2 != ''">#{def2} ,</if>
|
||||
<if test="def3 != null and def3 != ''">#{def3} ,</if>
|
||||
<if test="def4 != null and def4 != ''">#{def4} ,</if>
|
||||
<if test="def5 != null and def5 != ''">#{def5} ,</if>
|
||||
<if test="def6 != null and def6 != ''">#{def6} ,</if>
|
||||
<if test="def7 != null and def7 != ''">#{def7} ,</if>
|
||||
<if test="def8 != null and def8 != ''">#{def8} ,</if>
|
||||
<if test="def9 != null and def9 != ''">#{def9} ,</if>
|
||||
<if test="def10 != null and def10 != ''">#{def10} ,</if>
|
||||
<if test="create_time != null">#{create_time} ,</if>
|
||||
<if test="create_time == null">now() ,</if>
|
||||
<if test="createUser != null and createUser != ''">#{createUser} ,</if>
|
||||
<if test="modify_time != null">#{modify_time} ,</if>
|
||||
<if test="modify_time == null">now() ,</if>
|
||||
<if test="modifyUser != null and modifyUser != ''">#{modifyUser} ,</if>
|
||||
<if test="sts != null and sts != ''">#{sts} ,</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into ae_conf_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
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{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')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
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
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{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})
|
||||
</foreach>
|
||||
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)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update"
|
||||
parameterType="com.hzya.frame.voucher.ae.comf.factor.entity.AeConfInfluenceFactorCorrelationEntity">
|
||||
update ae_conf_influence_factor_correlation set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="factorId != null">factor_id = #{factorId},</if>
|
||||
<if test="factorName != null and factorName != ''">factor_name = #{factorName},</if>
|
||||
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if>
|
||||
<if test="mdmCode != null and mdmCode != ''">mdm_code = #{mdmCode},</if>
|
||||
<if test="mdmName != null and mdmName != ''">mdm_name = #{mdmName},</if>
|
||||
<if test="mappingFieldId != null and mappingFieldId != ''">mapping_field_id = #{mappingFieldId},</if>
|
||||
<if test="mappingFieldCode != null and mappingFieldCode != ''">mapping_field_code = #{mappingFieldCode},
|
||||
</if>
|
||||
<if test="mappingFieldName != null and mappingFieldName != ''">mapping_field_name = #{mappingFieldName},
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="def1 != null and def1 != ''">def1 = #{def1},</if>
|
||||
<if test="def2 != null and def2 != ''">def2 = #{def2},</if>
|
||||
<if test="def3 != null and def3 != ''">def3 = #{def3},</if>
|
||||
<if test="def4 != null and def4 != ''">def4 = #{def4},</if>
|
||||
<if test="def5 != null and def5 != ''">def5 = #{def5},</if>
|
||||
<if test="def6 != null and def6 != ''">def6 = #{def6},</if>
|
||||
<if test="def7 != null and def7 != ''">def7 = #{def7},</if>
|
||||
<if test="def8 != null and def8 != ''">def8 = #{def8},</if>
|
||||
<if test="def9 != null and def9 != ''">def9 = #{def9},</if>
|
||||
<if test="def10 != null and def10 != ''">def10 = #{def10},</if>
|
||||
<if test="modify_time == null">now(),</if>
|
||||
<if test="modifyUser != null and modifyUser != ''">modify_user = #{modifyUser},</if>
|
||||
<if test="sts != null and sts != ''">sts = #{sts},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete"
|
||||
parameterType="com.hzya.frame.voucher.ae.comf.factor.entity.AeConfInfluenceFactorCorrelationEntity">
|
||||
update ae_conf_influence_factor_correlation
|
||||
set sts= 'N',
|
||||
modify_time = now(),
|
||||
<if test="modifyUser != null and modifyUser != ''">,modify_user = #{modifyUser}</if>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition"
|
||||
parameterType="com.hzya.frame.voucher.ae.comf.factor.entity.AeConfInfluenceFactorCorrelationEntity">
|
||||
update ae_conf_influence_factor_correlation set sts= 'N' ,modify_time = #{modify_time},modify_user_id =
|
||||
#{modify_user_id}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null">and id = #{id}</if>
|
||||
<if test="factorId != null">and factor_id = #{factorId}</if>
|
||||
<if test="factorName != null and factorName != ''">and factor_name = #{factorName}</if>
|
||||
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
|
||||
<if test="mdmCode != null and mdmCode != ''">and mdm_code = #{mdmCode}</if>
|
||||
<if test="mdmName != null and mdmName != ''">and mdm_name = #{mdmName}</if>
|
||||
<if test="mappingFieldId != null and mappingFieldId != ''">and mapping_field_id = #{mappingFieldId}</if>
|
||||
<if test="mappingFieldCode != null and mappingFieldCode != ''">and mapping_field_code =
|
||||
#{mappingFieldCode}
|
||||
</if>
|
||||
<if test="mappingFieldName != null and mappingFieldName != ''">and mapping_field_name =
|
||||
#{mappingFieldName}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
<if test="def1 != null and def1 != ''">and def1 = #{def1}</if>
|
||||
<if test="def2 != null and def2 != ''">and def2 = #{def2}</if>
|
||||
<if test="def3 != null and def3 != ''">and def3 = #{def3}</if>
|
||||
<if test="def4 != null and def4 != ''">and def4 = #{def4}</if>
|
||||
<if test="def5 != null and def5 != ''">and def5 = #{def5}</if>
|
||||
<if test="def6 != null and def6 != ''">and def6 = #{def6}</if>
|
||||
<if test="def7 != null and def7 != ''">and def7 = #{def7}</if>
|
||||
<if test="def8 != null and def8 != ''">and def8 = #{def8}</if>
|
||||
<if test="def9 != null and def9 != ''">and def9 = #{def9}</if>
|
||||
<if test="def10 != null and def10 != ''">and def10 = #{def10}</if>
|
||||
<if test="createUser != null and createUser != ''">and create_user = #{createUser}</if>
|
||||
<if test="modifyUser != null and modifyUser != ''">and modify_user = #{modifyUser}</if>
|
||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete
|
||||
from ae_conf_influence_factor_correlation
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -63,9 +63,7 @@
|
|||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null">and id = #{id}</if>
|
||||
<if test="aeConfModuleId != null">and ae_conf_module_id = #{aeConfModuleId}</if>
|
||||
<if test="aeConfModuleName != null and aeConfModuleName != ''">and ae_conf_module_name =
|
||||
#{aeConfModuleName}
|
||||
</if>
|
||||
<if test="aeConfModuleName != null and aeConfModuleName != ''">and ae_conf_module_name = #{aeConfModuleName}</if>
|
||||
<if test="factorName != null and factorName != ''">and factor_name = #{factorName}</if>
|
||||
<if test="mappingFileId != null and mappingFileId != ''">and mapping_file_id = #{mappingFileId}</if>
|
||||
<if test="mappingFileCode != null and mappingFileCode != ''">and mapping_file_code = #{mappingFileCode}</if>
|
||||
|
@ -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'
|
||||
<if test="id != null">and ae_conf_influence_factor.id = #{id}</if>
|
||||
<if test="aeConfModuleId != null">and ae_conf_influence_factor.ae_conf_module_id = #{aeConfModuleId}</if>
|
||||
<if test="aeConfModuleName != null and aeConfModuleName != ''">and ae_conf_influence_factor.ae_conf_module_name = #{aeConfModuleName}</if>
|
||||
<if test="factorName != null and factorName != ''">and ae_conf_influence_factor.factor_name = #{factorName}</if>
|
||||
<if test="mappingFileId != null and mappingFileId != ''">and ae_conf_influence_factor.mapping_file_id = #{mappingFileId}</if>
|
||||
<if test="mappingFileCode != null and mappingFileCode != ''">and ae_conf_influence_factor.mapping_file_code = #{mappingFileCode}</if>
|
||||
<if test="mappingFileName != null and mappingFileName != ''">and ae_conf_influence_factor.mapping_file_name = #{mappingFileName}</if>
|
||||
<if test="remark != null and remark != ''">and ae_conf_influence_factor.remark = #{remark}</if>
|
||||
<if test="def1 != null and def1 != ''">and ae_conf_influence_factor.def1 = #{def1}</if>
|
||||
<if test="def2 != null and def2 != ''">and ae_conf_influence_factor.def2 = #{def2}</if>
|
||||
<if test="def3 != null and def3 != ''">and ae_conf_influence_factor.def3 = #{def3}</if>
|
||||
<if test="def4 != null and def4 != ''">and ae_conf_influence_factor.def4 = #{def4}</if>
|
||||
<if test="def5 != null and def5 != ''">and ae_conf_influence_factor.def5 = #{def5}</if>
|
||||
<if test="def6 != null and def6 != ''">and ae_conf_influence_factor.def6 = #{def6}</if>
|
||||
<if test="def7 != null and def7 != ''">and ae_conf_influence_factor.def7 = #{def7}</if>
|
||||
<if test="def8 != null and def8 != ''">and ae_conf_influence_factor.def8 = #{def8}</if>
|
||||
<if test="def9 != null and def9 != ''">and ae_conf_influence_factor.def9 = #{def9}</if>
|
||||
<if test="def10 != null and def10 != ''">and ae_conf_influence_factor.def10 = #{def10}</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
|
@ -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<AeConfInfluenceFactorCorrelationEntity, String> {
|
||||
List<AeConfInfluenceFactorCorrelationEntity> queryByMdmId(AeConfInfluenceFactorCorrelationEntity entity);
|
||||
|
||||
List<AeConfInfluenceFactorCorrelationEntity> queryAll(AeConfInfluenceFactorCorrelationEntity entity);
|
||||
|
||||
List<AeConfInfluenceFactorCorrelationEntity> saveList(List<AeConfInfluenceFactorCorrelationEntity> list);
|
||||
List<AeConfInfluenceFactorCorrelationEntity> updateList(List<AeConfInfluenceFactorCorrelationEntity> list);
|
||||
|
||||
Map<String, Integer> deleteList(List<AeConfInfluenceFactorCorrelationEntity> list);
|
||||
}
|
|
@ -18,4 +18,6 @@ public interface IAeConfInfluenceFactorService extends IBaseService<AeConfInflue
|
|||
List<AeConfInfluenceFactorEntity> queryAll(AeConfInfluenceFactorEntity entity);
|
||||
AeConfInfluenceFactorEntity queryById(AeConfInfluenceFactorEntity entity);
|
||||
AeConfInfluenceFactorEntity updateById(AeConfInfluenceFactorEntity entity);
|
||||
|
||||
List<AeConfInfluenceFactorEntity> queryFluenceFactorsByModuleId(AeConfInfluenceFactorEntity entity);
|
||||
}
|
||||
|
|
|
@ -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<AeConfInfluenceFactorCorrelationEntity, String> implements IAeConfInfluenceFactorCorrelationService {
|
||||
|
||||
private IAeConfInfluenceFactorCorrelationDao aeConfInfluenceFactorCorrelationDao;
|
||||
|
||||
@Autowired
|
||||
public void setAeConfInfluenceFactorCorrelationDao(IAeConfInfluenceFactorCorrelationDao dao) {
|
||||
this.aeConfInfluenceFactorCorrelationDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AeConfInfluenceFactorCorrelationEntity> queryAll(AeConfInfluenceFactorCorrelationEntity entity) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AeConfInfluenceFactorCorrelationEntity> queryByMdmId(AeConfInfluenceFactorCorrelationEntity entity) {
|
||||
Assert.notNull(entity.getMdmId(), "查询影响因素关联时,主数据id不能为空!");
|
||||
List<AeConfInfluenceFactorCorrelationEntity> query = aeConfInfluenceFactorCorrelationDao.query(entity);
|
||||
return query;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AeConfInfluenceFactorCorrelationEntity> saveList(List<AeConfInfluenceFactorCorrelationEntity> 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<AeConfInfluenceFactorCorrelationEntity> saveList = new ArrayList<>();
|
||||
for (AeConfInfluenceFactorCorrelationEntity factorCorrelation : list) {
|
||||
AeConfInfluenceFactorCorrelationEntity save = aeConfInfluenceFactorCorrelationDao.save(factorCorrelation);
|
||||
saveList.add(save);
|
||||
}
|
||||
return saveList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AeConfInfluenceFactorCorrelationEntity> updateList(List<AeConfInfluenceFactorCorrelationEntity> 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<AeConfInfluenceFactorCorrelationEntity> updateList = new ArrayList<>();
|
||||
for (AeConfInfluenceFactorCorrelationEntity factorCorrelation : list) {
|
||||
AeConfInfluenceFactorCorrelationEntity save = aeConfInfluenceFactorCorrelationDao.update(factorCorrelation);
|
||||
updateList.add(save);
|
||||
}
|
||||
return updateList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Integer> deleteList(List<AeConfInfluenceFactorCorrelationEntity> list) {
|
||||
if (list.size() == 0) {
|
||||
Assert.state(false, "影响因素关联删除时,数据不能为空,请检查!");
|
||||
}
|
||||
for (AeConfInfluenceFactorCorrelationEntity factorCorrelation : list) {
|
||||
Assert.notNull(factorCorrelation.getId(), "影响因素关联删除时,因素关联id不能为空!检验数据为:{}", JSONUtil.toJsonStr(factorCorrelation));
|
||||
}
|
||||
Map<String, Integer> deleteMap = new HashMap<>();
|
||||
for (AeConfInfluenceFactorCorrelationEntity factorCorrelation : list) {
|
||||
int i = aeConfInfluenceFactorCorrelationDao.logicRemove(factorCorrelation);
|
||||
deleteMap.put(factorCorrelation.getId(), i);
|
||||
}
|
||||
return deleteMap;
|
||||
}
|
||||
}
|
|
@ -87,6 +87,12 @@ public class AeConfInfluenceFactorServiceImpl extends BaseService<AeConfInfluenc
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int logicRemove(AeConfInfluenceFactorEntity entity) throws Exception {
|
||||
Assert.notNull(entity.getId(), "删除影响因素设置时,影响因素id不能为空");
|
||||
return aeConfInfluenceFactorDao.logicRemove(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据AeConfInfluenceFactorEntity entity中的aeConfModuleId查询业务模块名称,并将名称赋值给aeConfModuleName
|
||||
*
|
||||
|
@ -102,4 +108,12 @@ public class AeConfInfluenceFactorServiceImpl extends BaseService<AeConfInfluenc
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<AeConfInfluenceFactorEntity> queryFluenceFactorsByModuleId(AeConfInfluenceFactorEntity entity) {
|
||||
Assert.notNull(entity.getAeConfModuleId(), "根据业务模块id查询影响因素设置时,业务模块id不能为空");
|
||||
List<AeConfInfluenceFactorEntity> list = aeConfInfluenceFactorDao.queryAll(entity);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<MdmModuleDbFiledsEntity> 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<MdmModuleDbEntity> all = mdmService.queryMdmAndFiledsByMdmId(entity);
|
||||
return getSuccessMessageEntity("请求成功",all);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return getFailureMessageEntity("请求失败", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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 {
|
||||
}
|
|
@ -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<MdmModuleDbEntity> queryMdmAndFiledsByMdmId(MdmModuleDbEntity entity);
|
||||
}
|
|
@ -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<AeConfBusinessModuleMdmEntity, String> 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<AeConfBusinessModuleMdmEntity> queryAll(AeConfBusinessModuleMdmEntity entity) {
|
||||
List<AeConfBusinessModuleMdmEntity> all = aeConfBusinessModuleMdmDao.query(entity);
|
||||
return all;
|
||||
}
|
||||
@Override
|
||||
public List<AeConfBusinessModuleMdmEntity> queryAll(AeConfBusinessModuleMdmEntity entity) {
|
||||
List<AeConfBusinessModuleMdmEntity> all = aeConfBusinessModuleMdmDao.query(entity);
|
||||
return all;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全部业务业务模块,里面包含主数据
|
||||
*/
|
||||
@Override
|
||||
public List<AeConfBusinessModuleMdmEntity> queryModuleIncludeMdmList(AeConfBusinessModuleMdmEntity entity) {
|
||||
List<AeConfBusinessModuleMdmEntity> all = new ArrayList<>();
|
||||
List<AeConfBusinessModuleMdmEntity> aeConfBusinessModuleMdmEntityList = aeConfBusinessModuleMdmDao.query(entity);
|
||||
Map<String, List<AeConfBusinessModuleMdmEntity>> collect =
|
||||
aeConfBusinessModuleMdmEntityList.stream().collect(Collectors.groupingBy(index -> index.getAeConfModuleId() + "###" + index.getAeConfModuleName()));
|
||||
Set<Map.Entry<String, List<AeConfBusinessModuleMdmEntity>>> entries = collect.entrySet();
|
||||
for (Map.Entry<String, List<AeConfBusinessModuleMdmEntity>> entry : entries) {
|
||||
String key = entry.getKey();//moduleId###moduleName
|
||||
List<AeConfBusinessModuleMdmEntity> value = entry.getValue();
|
||||
List<MdmModuleEntity> 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<AeConfBusinessModuleMdmEntity> queryModuleIncludeMdmList(AeConfBusinessModuleMdmEntity entity) {
|
||||
List<AeConfBusinessModuleMdmEntity> all = new ArrayList<>();
|
||||
List<AeConfBusinessModuleMdmEntity> aeConfBusinessModuleMdmEntityList = aeConfBusinessModuleMdmDao.query(entity);
|
||||
Map<String, List<AeConfBusinessModuleMdmEntity>> collect =
|
||||
aeConfBusinessModuleMdmEntityList.stream().collect(Collectors.groupingBy(index -> index.getAeConfModuleId() + "###" + index.getAeConfModuleName()));
|
||||
Set<Map.Entry<String, List<AeConfBusinessModuleMdmEntity>>> entries = collect.entrySet();
|
||||
for (Map.Entry<String, List<AeConfBusinessModuleMdmEntity>> entry : entries) {
|
||||
String key = entry.getKey();//moduleId###moduleName
|
||||
List<AeConfBusinessModuleMdmEntity> value = entry.getValue();
|
||||
List<MdmModuleEntity> 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<AeConfBusinessModuleMdmEntity> queryMdmsByModuleId(AeConfBusinessModuleMdmEntity entity){
|
||||
Assert.notNull(entity.getAeConfModuleId(),"查询主数据列表时,业务模块id不能为空");
|
||||
List<AeConfBusinessModuleMdmEntity> all = aeConfBusinessModuleMdmDao.query(entity);
|
||||
return all;
|
||||
}
|
||||
/**
|
||||
* 根据模块id查询主数据
|
||||
*/
|
||||
@Override
|
||||
public List<AeConfBusinessModuleMdmEntity> queryMdmsByModuleId(AeConfBusinessModuleMdmEntity entity) {
|
||||
Assert.notNull(entity.getAeConfModuleId(), "查询主数据列表时,业务模块id不能为空");
|
||||
List<AeConfBusinessModuleMdmEntity> all = aeConfBusinessModuleMdmDao.query(entity);
|
||||
return all;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AeConfBusinessModuleMdmEntity> saveList(List<AeConfBusinessModuleMdmEntity> 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<AeConfBusinessModuleMdmEntity> saveList=new ArrayList<>();
|
||||
for (AeConfBusinessModuleMdmEntity aeConfBusinessModuleMdmEntity : list) {
|
||||
AeConfBusinessModuleMdmEntity save = aeConfBusinessModuleMdmDao.save(aeConfBusinessModuleMdmEntity);
|
||||
saveList.add(save);
|
||||
}
|
||||
return saveList;
|
||||
}
|
||||
@Override
|
||||
public List<AeConfBusinessModuleMdmEntity> saveList(List<AeConfBusinessModuleMdmEntity> 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<AeConfBusinessModuleMdmEntity> saveList = new ArrayList<>();
|
||||
for (AeConfBusinessModuleMdmEntity aeConfBusinessModuleMdmEntity : list) {
|
||||
AeConfBusinessModuleMdmEntity save = aeConfBusinessModuleMdmDao.save(aeConfBusinessModuleMdmEntity);
|
||||
saveList.add(save);
|
||||
}
|
||||
return saveList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AeConfBusinessModuleMdmEntity> updateList(List<AeConfBusinessModuleMdmEntity> 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<AeConfBusinessModuleMdmEntity> updateList=new ArrayList<>();
|
||||
for (AeConfBusinessModuleMdmEntity aeConfBusinessModuleMdmEntity : list) {
|
||||
AeConfBusinessModuleMdmEntity update = aeConfBusinessModuleMdmDao.update(aeConfBusinessModuleMdmEntity);
|
||||
updateList.add(update);
|
||||
}
|
||||
return updateList;
|
||||
}
|
||||
@Override
|
||||
public List<AeConfBusinessModuleMdmEntity> updateList(List<AeConfBusinessModuleMdmEntity> 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<AeConfBusinessModuleMdmEntity> updateList = new ArrayList<>();
|
||||
for (AeConfBusinessModuleMdmEntity aeConfBusinessModuleMdmEntity : list) {
|
||||
AeConfBusinessModuleMdmEntity update = aeConfBusinessModuleMdmDao.update(aeConfBusinessModuleMdmEntity);
|
||||
updateList.add(update);
|
||||
}
|
||||
return updateList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String,Integer> deleteList(List<AeConfBusinessModuleMdmEntity> list) {
|
||||
if(list.size()==0){
|
||||
Assert.state(false,"业务模块-主数据删除时,数据不能为空,请检查!");
|
||||
}
|
||||
for (AeConfBusinessModuleMdmEntity moduleMdmEntity : list) {
|
||||
Assert.notNull(moduleMdmEntity.getId(),"业务模块-主数据删除时,业务模块-主数据id不能为空,请检查!");
|
||||
}
|
||||
Map<String,Integer> deleteMap=new HashMap<>();
|
||||
for (AeConfBusinessModuleMdmEntity aeConfBusinessModuleMdmEntity : list) {
|
||||
int i = aeConfBusinessModuleMdmDao.logicRemove(aeConfBusinessModuleMdmEntity);
|
||||
deleteMap.put(aeConfBusinessModuleMdmEntity.getId(),i);
|
||||
}
|
||||
return deleteMap;
|
||||
}
|
||||
@Override
|
||||
public Map<String, Integer> deleteList(List<AeConfBusinessModuleMdmEntity> list) {
|
||||
if (list.size() == 0) {
|
||||
Assert.state(false, "业务模块-主数据删除时,数据不能为空,请检查!");
|
||||
}
|
||||
for (AeConfBusinessModuleMdmEntity moduleMdmEntity : list) {
|
||||
Assert.notNull(moduleMdmEntity.getId(), "业务模块-主数据删除时,业务模块-主数据id不能为空,请检查!检验数据为:{}", JSONUtil.toJsonStr(moduleMdmEntity));
|
||||
}
|
||||
Map<String, Integer> deleteMap = new HashMap<>();
|
||||
for (AeConfBusinessModuleMdmEntity aeConfBusinessModuleMdmEntity : list) {
|
||||
int i = aeConfBusinessModuleMdmDao.logicRemove(aeConfBusinessModuleMdmEntity);
|
||||
deleteMap.put(aeConfBusinessModuleMdmEntity.getId(), i);
|
||||
}
|
||||
return deleteMap;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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<MdmModuleDbEntity> queryMdmAndFiledsByMdmId(MdmModuleDbEntity entity) {
|
||||
Assert.notNull(entity.getMdmId(),"根据");
|
||||
List<MdmModuleDbEntity> res=new ArrayList<>();
|
||||
//查询单据
|
||||
List<MdmModuleDbEntity> 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<MdmModuleDbFiledsEntity> filedList = mdmModuleDbFiledsDao.query(mdmModuleDbFiledsEntity);
|
||||
mdmModuleDbEntity.setSublistMdmModuleDbFileds(filedList);
|
||||
res.add(mdmModuleDbEntity);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue