This commit is contained in:
xiang2lin 2024-05-16 16:55:29 +08:00
commit 5fd2c7de9a
22 changed files with 1483 additions and 259 deletions

View File

@ -12,6 +12,7 @@ public class MdmDistributeDto {
private String id;
private List<MdmModuleDistributeEntity> mdmModuleDistributeEntities;
public List<MdmModuleDistributeEntity> getMdmModuleDistributeEntities() {

View File

@ -0,0 +1,53 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.web.entity.BaseEntity;
public class MdmDistributeEntity extends BaseEntity {
private String tableName;
private String formmainId;
private String appId;
private String status;//1发送成功 2发送中 3发送失败 4未发送
private String msg;
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public String getFormmainId() {
return formmainId;
}
public void setFormmainId(String formmainId) {
this.formmainId = formmainId;
}
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}

View File

@ -1,6 +1,7 @@
package com.hzya.frame.mdm.mdmModule.dao;
import com.hzya.frame.mdm.entity.MdmDataDto;
import com.hzya.frame.mdm.entity.MdmDistributeEntity;
import com.hzya.frame.mdm.entity.MdmDto;
import com.hzya.frame.mdm.entity.MdmQuery;
import com.hzya.frame.mdm.entity.MdmVo;
@ -49,5 +50,9 @@ public interface IMdmModuleDao extends IBaseDao<MdmModuleEntity, String> {
List<HashMap<String, Object>> querySelectData(MdmDto entity);
Integer deleteChilder(FormmainDeleteDto formmainDeleteDto);
Integer saveDistribute(MdmDistributeEntity mdmDistributeEntity);
Integer updateDistribute(MdmDistributeEntity mdmDistributeEntity);
}

View File

@ -1,6 +1,7 @@
package com.hzya.frame.mdm.mdmModule.dao.impl;
import com.hzya.frame.mdm.entity.MdmDataDto;
import com.hzya.frame.mdm.entity.MdmDistributeEntity;
import com.hzya.frame.mdm.entity.MdmDto;
import com.hzya.frame.mdm.entity.MdmQuery;
import com.hzya.frame.mdm.entity.MdmVo;
@ -123,6 +124,17 @@ public class MdmModuleDaoImpl extends MybatisGenericDao<MdmModuleEntity, String>
}
@Override
public Integer saveDistribute(MdmDistributeEntity mdmDistributeEntity) {
Integer o = super.insert(getSqlIdPrifx() + "saveDistribute", mdmDistributeEntity);
return o;
}
@Override
public Integer updateDistribute(MdmDistributeEntity mdmDistributeEntity) {
Integer o = super.update(getSqlIdPrifx() + "updateDistribute", mdmDistributeEntity);
return o;
}
@Override
public HashMap<String, Object> queryTemplateDataOne(MdmDto entity) {
HashMap<String, Object> o = (HashMap<String, Object>) super.selectOne(getSqlIdPrifx() + "queryTemplateDataOne", entity);

View File

@ -696,5 +696,58 @@ where id = #{id}
</trim>
order by sorts asc
</select>
<insert id="saveDistribute" parameterType="com.hzya.frame.mdm.entity.MdmDistributeEntity" >
insert into ${tableName}(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
<if test="formmainId != null and formmainId != ''">formmain_id ,</if>
<if test="appId != null and appId != ''">app_id ,</if>
<if test="status != null and status != ''">status ,</if>
<if test="msg != null and msg != ''">msg ,</if>
<if test="sorts != null">sorts ,</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
<if test="create_time != null">create_time ,</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
<if test="modify_time != null">modify_time ,</if>
<if test="sts != null and sts != ''">sts ,</if>
<if test="org_id != null and org_id != ''">org_id ,</if>
<if test="companyId != null and companyId != ''">company_id ,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">#{id} ,</if>
<if test="formmainId != null and formmainId != ''">#{formmainId} ,</if>
<if test="appId != null and appId != ''">#{appId} ,</if>
<if test="status != null and status != ''">#{status} ,</if>
<if test="msg != null and msg != ''">#{msg} ,</if>
<if test="sorts != null">#{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
<if test="create_time != null">#{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
<if test="modify_time != null">#{modify_time} ,</if>
<if test="sts != null and sts != ''">#{sts} ,</if>
<if test="org_id != null and org_id != ''">#{org_id} ,</if>
<if test="companyId != null and companyId != ''">#{companyId} ,</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<update id="updateDistribute" parameterType="com.hzya.frame.mdm.entity.MdmDistributeEntity">
update ${tableName} set
<trim suffix="" suffixOverrides=",">
<if test="formmainId != null and formmainId != ''">formmain_id = #{formmainId},</if>
<if test="appId != null and appId != ''">app_id = #{appId},</if>
<if test="status != null ">status = #{status},</if>
<if test="msg != null and msg != ''">msg = #{msg},</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null">modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''">sts = #{sts},</if>
<if test="org_id != null and org_id != ''">org_id = #{org_id},</if>
</trim>
where id = #{id}
</update>
</mapper>

View File

@ -347,4 +347,14 @@ public interface ISysApplicationService extends IBaseService<SysApplicationEntit
* @Date 11:52 上午 2024/3/27
**/
JsonResultEntity queryEntity(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 查询应用插件列表和api
* @Date 11:52 上午 2024/3/27
**/
JsonResultEntity queryPlugAndApi(JSONObject jsonObject);
}

View File

@ -2193,4 +2193,28 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
List<SysApplicationEntity> list = sysApplicationDao.queryByLike(entity);
return BaseResult.getSuccessMessageEntity("查询数据成功", list);
}
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 查询应用插件列表和api
* @Date 11:52 上午 2024/3/27
**/
@Override
public JsonResultEntity queryPlugAndApi(JSONObject jsonObject) {
SysApplicationPluginEntity entity = getData("jsonStr", jsonObject, SysApplicationPluginEntity.class);
if (entity == null || entity.getAppId() == null || "".equals(entity.getAppId()) || entity.getId() == null || "".equals(entity.getId())) {
return BaseResult.getFailureMessageEntity("系统错误");
}
SysApplicationPluginEntity sysApplicationPluginEntity = new SysApplicationPluginEntity();
sysApplicationPluginEntity.setAppId(entity.getAppId());
List<SysApplicationPluginEntity> sysApplicationPluginEntities = sysApplicationPluginDao.queryBase(sysApplicationPluginEntity);
SysApplicationApiEntity sysApplicationApiEntity = sysApplicationApiDao.get(entity.getId());
JSONObject jsonObject1 = new JSONObject();
jsonObject1.put("app",sysApplicationPluginEntities);
jsonObject1.put("api",sysApplicationApiEntity);
return BaseResult.getSuccessMessageEntity("查询数据成功", jsonObject1);
}
}

View File

@ -1,7 +1,9 @@
package com.hzya.frame.sysnew.buttonConfig.dao;
import com.hzya.frame.sysnew.buttonConfig.entity.SysButtonConfigEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.basedao.dao.IBaseDao;
import java.util.List;
/**
* 按钮配置表(sys_button_config: table)表数据库访问层
@ -11,5 +13,6 @@ import com.hzya.frame.basedao.dao.IBaseDao;
*/
public interface ISysButtonConfigDao extends IBaseDao<SysButtonConfigEntity, String> {
List<SysButtonConfigEntity> getUserButton(SysButtonConfigEntity entity);
}

View File

@ -2,8 +2,12 @@ package com.hzya.frame.sysnew.buttonConfig.dao.impl;
import com.hzya.frame.sysnew.buttonConfig.entity.SysButtonConfigEntity;
import com.hzya.frame.sysnew.buttonConfig.dao.ISysButtonConfigDao;
import com.hzya.frame.sysnew.menuConfig.entity.SysMenuConfigEntity;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import java.util.List;
/**
* 按钮配置表(SysButtonConfig)表数据库访问层
*
@ -12,6 +16,11 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao;
*/
@Repository(value = "SysButtonConfigDaoImpl")
public class SysButtonConfigDaoImpl extends MybatisGenericDao<SysButtonConfigEntity, String> implements ISysButtonConfigDao{
@Override
public List<SysButtonConfigEntity> getUserButton(SysButtonConfigEntity entity) {
List<SysButtonConfigEntity> o = super.query(getSqlIdPrifx() + "getUserButton", entity);
return o;
}
}

View File

@ -28,6 +28,8 @@ public class SysButtonConfigEntity extends BaseEntity {
private String remark;
/** 公司id */
private String companyId;
/** 公司id */
private String userId;
/**
* 是否选中
@ -112,5 +114,13 @@ public class SysButtonConfigEntity extends BaseEntity {
public void setCheck(boolean check) {
this.check = check;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
}

View File

@ -288,6 +288,45 @@ update sys_button_config set sts= 'N' ,modify_time = #{modify_time},modify_user
<delete id="entity_delete">
delete from sys_button_config where id = #{id}
</delete>
<select id="getUserButton" resultMap="get-SysButtonConfigEntity-result" parameterType = "com.hzya.frame.sysnew.buttonConfig.entity.SysButtonConfigEntity">
SELECT
*
FROM
sys_button_config
WHERE
(
id IN (
SELECT
operate
FROM
sys_popedom_operate
WHERE
menu_id = #{menuId}
AND object_id = #{userId}
AND kind_id = '1'
AND sts = 'Y'
)
OR id IN (
SELECT
operate
FROM
sys_popedom_operate
WHERE
object_id IN (
SELECT
role_id
FROM
sys_user_roles
WHERE
user_id = #{userId}
AND sts = 'Y'
)
AND menu_id = #{menuId}
AND kind_id = '2'
AND sts = 'Y'
))
AND sts = 'Y'
order by sorts asc
</select>
</mapper>

View File

@ -66,4 +66,14 @@ public interface ISysButtonConfigService extends IBaseService<SysButtonConfigEnt
* @Date 2:37 下午 2024/3/27
**/
JsonResultEntity deleteEntity(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 获取用户按钮
* @Date 2:37 下午 2024/3/27
**/
JsonResultEntity getUserButton(JSONObject jsonObject);
}

View File

@ -6,8 +6,10 @@ import com.github.pagehelper.PageInfo;
import com.hzya.frame.sysnew.buttonConfig.entity.SysButtonConfigEntity;
import com.hzya.frame.sysnew.buttonConfig.dao.ISysButtonConfigDao;
import com.hzya.frame.sysnew.buttonConfig.service.ISysButtonConfigService;
import com.hzya.frame.sysnew.menuConfig.entity.SysMenuConfigEntity;
import com.hzya.frame.sysnew.popedomOperate.dao.ISysPopedomOperateDao;
import com.hzya.frame.sysnew.popedomOperate.entity.SysPopedomOperateEntity;
import com.hzya.frame.sysnew.user.entity.SysUserEntity;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.springframework.stereotype.Service;
@ -187,4 +189,27 @@ public class SysButtonConfigServiceImpl extends BaseService<SysButtonConfigEntit
}
return true;
}
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 获取用户按钮
* @Date 2:37 下午 2024/3/27
**/
@Override
public JsonResultEntity getUserButton(JSONObject jsonObject) {
SysButtonConfigEntity entity = getData("jsonStr", jsonObject, SysButtonConfigEntity.class);
if (entity == null) {
return BaseResult.getFailureMessageEntity("系统错误");
}
if (entity.getUserId() == null || "".equals(entity.getUserId())) {
return BaseResult.getFailureMessageEntity("系统错误");
}
if (entity.getMenuId() == null || "".equals(entity.getMenuId())) {
return BaseResult.getFailureMessageEntity("系统错误");
}
List<SysButtonConfigEntity> sysButtonConfigEntities = sysButtonConfigDao.getUserButton(entity);
return BaseResult.getSuccessMessageEntity("查询按钮成功",sysButtonConfigEntities);
}
}

View File

@ -1,7 +1,10 @@
package com.hzya.frame.sysnew.integtationTaskLivingDetails.dao;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsVo;
import java.util.List;
/**
* 集成任务-实例详情(integration_task_living_details: table)表数据库访问层
@ -29,5 +32,13 @@ public interface IIntegrationTaskLivingDetailsDao extends IBaseDao<IntegrationTa
*/
int deleteById(String id);
List<IntegrationTaskLivingDetailsVo> queryPageLeftTask(IntegrationTaskLivingDetailsVo entity);
Integer entity_updatebyid(IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity);
IntegrationTaskLivingDetailsEntity queryEntity(IntegrationTaskLivingDetailsEntity entity);
Integer deleteEntity(IntegrationTaskLivingDetailsEntity deleteEntity);
}

View File

@ -2,8 +2,12 @@ package com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.impl;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsVo;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import java.util.List;
/**
* 集成任务-实例详情(IntegrationTaskLivingDetails)表数据库访问层
*
@ -27,5 +31,26 @@ public class IntegrationTaskLivingDetailsDaoImpl extends MybatisGenericDao<Integ
public int deleteById(String id) {
return super.delete("com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.impl.IntegrationTaskLivingDetailsDaoImpl.entity_logicDelete_for_uuid",id);
}
@Override
public List<IntegrationTaskLivingDetailsVo> queryPageLeftTask(IntegrationTaskLivingDetailsVo entity) {
List<IntegrationTaskLivingDetailsVo> o = (List<IntegrationTaskLivingDetailsVo>) super.selectList(getSqlIdPrifx() + "queryPageLeftTask", entity);
return o;
}
@Override
public Integer entity_updatebyid(IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity) {
return super.update(getSqlIdPrifx() + "entity_updatebyid", integrationTaskLivingDetailsEntity);
}
@Override
public Integer deleteEntity(IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity) {
return super.update(getSqlIdPrifx() + "deleteEntity", integrationTaskLivingDetailsEntity);
}
@Override
public IntegrationTaskLivingDetailsEntity queryEntity(IntegrationTaskLivingDetailsEntity entity) {
return (IntegrationTaskLivingDetailsEntity) super.selectOne(getSqlIdPrifx() + "queryEntity", entity);
}
}

View File

@ -543,6 +543,197 @@ update integration_task_living_details set sts= 'N' ,modify_time = #{modify_tim
<delete id="entity_delete">
delete from integration_task_living_details where id = #{id}
</delete>
<!--通过ID获取数据 -->
<select id="entity_get" resultMap="get-IntegrationTaskLivingDetailsEntity-result">
select
<include refid="IntegrationTaskLivingDetailsEntity_Base_Column_List" />
from <choose>
<when test=" newState != null and newState.trim() != '' and newState == 'N'.toString()">
integration_task_living_details
</when>
<otherwise>
integration_task_living_details_success
</otherwise>
</choose> where id = #{id} and sts='Y'
</select>
<!--通过ID获取数据 -->
<select id="queryEntity" resultMap="get-IntegrationTaskLivingDetailsEntity-result" parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
select
<include refid="IntegrationTaskLivingDetailsEntity_Base_Column_List" />
from
<choose>
<when test=" newState != null and newState.trim() != '' and newState == 'N'.toString()">
integration_task_living_details
</when>
<otherwise>
integration_task_living_details_success
</otherwise>
</choose> where id = #{id} and sts='Y'
</select>
<sql id="IntegrationTaskLivingDetailsVo_Base_Column_List">
id,
task_linving_id,
result,
query_condition,
root_app_pk,
root_app_bill,
root_app_new_data,
new_transmit_info,
new_push_date,
repair_pust,
sence_id,
plugin_id,
new_state,
business_date,
create_time,
create_user_id,
modify_time,
modify_user_id,
sts,
new_system_primary,
new_system_number,
processor,
processor_name,
processing_remarks,
processing_time
</sql>
<resultMap id="get-IntegrationTaskLivingDetailsVo-result" type="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsVo">
<!--无备注 -->
<result property="id" column="id" />
<!--集成任务-实例_id -->
<result property="task_linving_id" column="task_linving_id" />
<!--返回结果 -->
<result property="result" column="result" />
<!--原始查询条件 -->
<result property="query_condition" column="query_condition" />
<!--源系统主键 -->
<result property="root_app_pk" column="root_app_pk" />
<!--原系统单据 -->
<result property="root_app_bill" column="root_app_bill" />
<!--最新源系统数据详情 -->
<result property="root_app_new_data" column="root_app_new_data" />
<!--最新传输信息 -->
<result property="new_transmit_info" column="new_transmit_info" />
<!--最新推送时间 -->
<result property="new_push_date" column="new_push_date" />
<!--是否补推(Y是N不是) -->
<result property="repair_pust" column="repair_pust" />
<!-- 场景id-->
<result property="sence_id" column="sence_id"/>
<!-- 插件id-->
<result property="plugin_id" column="plugin_id"/>
<!-- 推送状态-->
<result property="new_state" column="new_state"/>
<!-- 单据业务日期-->
<result property="business_date" column="business_date"/>
<!--创建时间 -->
<result property="create_time" column="create_time" />
<!--创建人id -->
<result property="create_user_id" column="create_user_id" />
<!--修改时间 -->
<result property="modify_time" column="modify_time" />
<!--修改人id -->
<result property="modify_user_id" column="modify_user_id" />
<!--状态(Y正常N删除) -->
<result property="sts" column="sts" />
<!-- 下游系统主键 -->
<result property="new_system_primary" column="new_system_primary" />
<!--下游系统单号 -->
<result property="new_system_number" column="new_system_number" />
<!--处理⼈ -->
<result property="processor" column="processor" />
<!--处理⼈名称 -->
<result property="processor_name" column="processor_name" />
<!-- 处理备注 -->
<result property="processing_remarks" column="processing_remarks" />
<!--处理时间 -->
<result property="processing_time" column="processing_time" />
</resultMap>
<!-- 分页查询列表 采用like格式 -->
<select id="queryPageLeftTask" resultMap="get-IntegrationTaskLivingDetailsVo-result" parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsVo">
select
<include refid="IntegrationTaskLivingDetailsVo_Base_Column_List" />
from
<choose>
<when test=" new_state != null and new_state.trim() != '' and new_state == 'N'.toString()">
integration_task_living_details
</when>
<otherwise>
integration_task_living_details_success
</otherwise>
</choose>
<trim prefix="where" prefixOverrides="and">
<if test="id != null ">id = #{id}</if>
<if test="task_linving_id != null "> and task_linving_id = #{task_linving_id}</if>
<if test="result != null and result !='' "> and result like concat('%',#{result},'%') </if>
<if test="query_condition != null and query_condition !='' "> and query_condition like concat('%',#{query_condition},'%') </if>
<if test="root_app_pk != null and root_app_pk !='' "> and root_app_pk like concat('%',#{root_app_pk},'%') </if>
<if test="root_app_bill != null and root_app_bill !='' "> and root_app_bill like concat(#{root_app_bill},'%') </if>
<if test="root_app_new_data != null and root_app_new_data !='' "> and root_app_new_data like concat('%',#{root_app_new_data},'%') </if>
<if test="new_transmit_info != null and new_transmit_info !='' "> and new_transmit_info like concat('%',#{new_transmit_info},'%') </if>
<if test="new_push_date != null and new_push_date !='' "> <![CDATA[ AND DATE_FORMAT(new_push_date , '%Y-%m-%d') = #{new_push_date} ]]> </if>
<if test="repair_pust != null and repair_pust !='' "> and repair_pust like concat('%',#{repair_pust},'%') </if>
<if test="sence_id != null and sence_id !='' "> and sence_id like concat('%',#{sence_id},'%') </if>
<if test="plugin_id != null and plugin_id !='' "> and plugin_id like concat(#{plugin_id},'%') </if>
<if test="new_state != null and new_state !='' "> and new_state like concat(#{new_state},'%') </if>
<if test="business_date != null and business_date !='' "> <![CDATA[ AND DATE_FORMAT(business_date , '%Y-%m-%d') = str_to_date(#{business_date},'%Y-%m-%d') ]]> </if>
<if test="create_time != null and create_time !='' "> and create_time like concat('%',#{create_time},'%') </if>
<if test="create_user_id != null and create_user_id !='' "> and create_user_id like concat('%',#{create_user_id},'%') </if>
<if test="modify_time != null and modify_time !='' "> and modify_time like concat('%',#{modify_time},'%') </if>
<if test="modify_user_id != null and modify_user_id !='' "> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
<if test="sts != null and sts !='' "> and sts like concat(#{sts},'%') </if>
<if test="new_system_primary != null and new_system_primary !='' "> and new_system_primary like concat('%',#{new_system_primary},'%') </if>
<if test="new_system_number != null and new_system_number !='' "> and new_system_number like concat(#{new_system_number},'%') </if>
<if test="processor != null and processor !='' "> and processor like concat('%',#{processor},'%') </if>
<if test="processor_name != null and processor_name !='' "> and processor_name like concat('%',#{processor_name},'%') </if>
<if test="processing_remarks != null and processing_remarks !='' "> and processing_remarks like concat('%',#{processing_remarks},'%') </if>
<if test="processing_time != null and processing_time !='' "> and processing_time like concat('%',#{processing_time},'%') </if>
and sts='Y'
</trim>
order by modify_time desc
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 修改:按主键修改 -->
<update id="entity_updatebyid" parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
update integration_task_living_details set
<trim suffix="" suffixOverrides=",">
<if test="result != null and result !='' "> result = #{result},</if>
<if test="query_condition != null and query_condition !='' "> query_condition = #{query_condition},</if>
<if test="root_app_pk != null and root_app_pk !='' "> root_app_pk = #{root_app_pk},</if>
<if test="root_app_bill != null and root_app_bill !='' "> root_app_bill = #{root_app_bill},</if>
<if test="root_app_new_data != null and root_app_new_data !='' "> root_app_new_data = #{root_app_new_data},</if>
<if test="new_transmit_info != null and new_transmit_info !='' "> new_transmit_info = #{new_transmit_info},</if>
<if test="new_push_date != null ">new_push_date = #{new_push_date},</if>
<if test="repair_pust != null and repair_pust !='' "> repair_pust = #{repair_pust},</if>
<if test="sence_id != null and sence_id !='' "> sence_id = #{sence_id},</if>
<if test="plugin_id != null and plugin_id !='' "> plugin_id = #{plugin_id},</if>
<if test="new_state != null and new_state !='' "> new_state = #{new_state},</if>
<if test="business_date != null and business_date !='' "> business_date = #{business_date},</if>
<if test="create_user_id != null and create_user_id !='' "> create_user_id = #{create_user_id},</if>
<if test="modify_user_id != null and modify_user_id !='' "> modify_user_id = #{modify_user_id},</if>
<if test="new_system_primary != null and new_system_primary !='' "> new_system_primary = #{new_system_primary},</if>
<if test="new_system_number != null and new_system_number !='' "> new_system_number = #{new_system_number},</if>
<if test="processor != null and processor !='' "> processor = #{processor},</if>
<if test="processor_name != null and processor_name !='' "> processor_name = #{processor_name},</if>
<if test="processing_remarks != null and processing_remarks !='' "> processing_remarks = #{processing_remarks},</if>
<if test="processing_time != null "> processing_time = #{processing_time},</if>
<if test="modify_time != null "> modify_time =#{modify_time} </if>
<if test="modify_time == null "> modify_time = now()</if>
</trim>
where id = #{id}
</update>
<update id="deleteEntity" parameterType = "com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity" >
update <choose>
<when test=" newState != null and newState.trim() != '' and newState == 'N'.toString()">
integration_task_living_details
</when>
<otherwise>
integration_task_living_details_success
</otherwise>
</choose> set sts= 'N'
where id = #{id}
</update>
</mapper>

View File

@ -0,0 +1,347 @@
package com.hzya.frame.sysnew.integtationTaskLivingDetails.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hzya.frame.web.entity.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @description: 集成任务实例详情 entity
* @tableName: integration_task_living_details
* @entityName: IntegrationTaskLivingDetailsEntity
* @author: gjh
* @history: 1.0
*/
public class IntegrationTaskLivingDetailsVo extends BaseEntity {
/** task_name */
private String task_name;
/** integration_task_id */
private String task_id;
/**
* 集成任务-实例_id
*/
private String task_linving_id;
/**
* 返回结果
*/
private String result;
/**
* 原始查询条件
*/
private String query_condition;
/**
* 源系统主键
*/
private String root_app_pk;
/**
* 原系统单据
*/
private String root_app_bill;
/**
* 最新源系统数据详情(上游系统入参)
*/
private String root_app_new_data;
/**
* 最新传输信息(下游系统返回结果)
*/
private String new_transmit_info;
private String new_push_date;
/**
* 是否补推(Y是N不是)
*/
private String repair_pust;
//场景id
private String sence_id;
// 插件id
private String plugin_id;
// 插件名称
private String plugin_name;
/**
* 推送状态
*/
private String new_state;
/**
* 作为查询条件的推送状态
*/
private String param_new_state;
/**
* 单据业务日期
*/
private String business_date;
/**
* 下游系统主键
*/
private String new_system_primary;
/**
* 下游系统单号
*/
private String new_system_number;
/**
* 处理
*/
private String processor;
/**
* 处理名称
*/
private String processor_name;
/**
* 处理备注
*/
private String processing_remarks;
/**
* 处理时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date processing_time;
public String getParam_new_state() {
return param_new_state;
}
public void setParam_new_state(String param_new_state) {
this.param_new_state = param_new_state;
}
public String getBusiness_date() {
return business_date;
}
public void setBusiness_date(String business_date) {
this.business_date = business_date;
}
public String getNew_state() {
return new_state;
}
public void setNew_state(String new_state) {
this.new_state = new_state;
}
public String getSence_id() {
return sence_id;
}
public void setSence_id(String sence_id) {
this.sence_id = sence_id;
}
/**
* 集成任务-实例_id
*/
public void setTask_linving_id(String task_linving_id) {
this.task_linving_id = task_linving_id;
}
/**
* 集成任务-实例_id
*/
public String getTask_linving_id() {
return task_linving_id;
}
/**
* 返回结果
*/
public void setResult(String result) {
this.result = result;
}
/**
* 返回结果
*/
public String getResult() {
return result;
}
/**
* 原始查询条件
*/
public void setQuery_condition(String query_condition) {
this.query_condition = query_condition;
}
/**
* 原始查询条件
*/
public String getQuery_condition() {
return query_condition;
}
/**
* 源系统主键
*/
public void setRoot_app_pk(String root_app_pk) {
this.root_app_pk = root_app_pk;
}
/**
* 源系统主键
*/
public String getRoot_app_pk() {
return root_app_pk;
}
/**
* 原系统单据
*/
public void setRoot_app_bill(String root_app_bill) {
this.root_app_bill = root_app_bill;
}
/**
* 原系统单据
*/
public String getRoot_app_bill() {
return root_app_bill;
}
/**
* 最新源系统数据详情
*/
public void setRoot_app_new_data(String root_app_new_data) {
this.root_app_new_data = root_app_new_data;
}
/**
* 最新源系统数据详情
*/
public String getRoot_app_new_data() {
return root_app_new_data;
}
/**
* 最新传输信息
*/
public void setNew_transmit_info(String new_transmit_info) {
this.new_transmit_info = new_transmit_info;
}
/**
* 最新传输信息
*/
public String getNew_transmit_info() {
return new_transmit_info;
}
public String getNew_push_date() {
return new_push_date;
}
public void setNew_push_date(String new_push_date) {
this.new_push_date = new_push_date;
}
/**
* 是否补推(Y是N不是)
*/
public void setRepair_pust(String repair_pust) {
this.repair_pust = repair_pust;
}
/**
* 是否补推(Y是N不是)
*/
public String getRepair_pust() {
return repair_pust;
}
public String getPlugin_id() {
return plugin_id;
}
public void setPlugin_id(String plugin_id) {
this.plugin_id = plugin_id;
}
public String getTask_name() {
return task_name;
}
public void setTask_name(String task_name) {
this.task_name = task_name;
}
public String getTask_id() {
return task_id;
}
public void setTask_id(String task_id) {
this.task_id = task_id;
}
public String getPlugin_name() {
return plugin_name;
}
public void setPlugin_name(String plugin_name) {
this.plugin_name = plugin_name;
}
public String getNew_system_primary() {
return new_system_primary;
}
public void setNew_system_primary(String new_system_primary) {
this.new_system_primary = new_system_primary;
}
public String getNew_system_number() {
return new_system_number;
}
public void setNew_system_number(String new_system_number) {
this.new_system_number = new_system_number;
}
public String getProcessor() {
return processor;
}
public void setProcessor(String processor) {
this.processor = processor;
}
public String getProcessor_name() {
return processor_name;
}
public void setProcessor_name(String processor_name) {
this.processor_name = processor_name;
}
public String getProcessing_remarks() {
return processing_remarks;
}
public void setProcessing_remarks(String processing_remarks) {
this.processing_remarks = processing_remarks;
}
public Date getProcessing_time() {
return processing_time;
}
public void setProcessing_time(Date processing_time) {
this.processing_time = processing_time;
}
}

View File

@ -53,4 +53,61 @@ public interface IIntegrationTaskLivingDetailsService extends IBaseService<Integ
*
*/
JsonResultEntity updateLogFailToSuccess(IntegrationTaskLivingDetailsEntity entity)throws Exception;
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 查询列表 分页
* @Date 2:18 下午 2023/7/17
**/
JsonResultEntity queryPage(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 获取数据 根据id
* @Date 2:18 下午 2023/7/17
**/
JsonResultEntity queryEntity(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 批量推送
* @Date 2:18 下午 2023/7/17
**/
JsonResultEntity batchPush(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 重新推送
* @Date 2:18 下午 2023/7/17
**/
JsonResultEntity repush(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 手工处理
* @Date 2:18 下午 2023/7/17
**/
JsonResultEntity manualProcessing(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 删除
* @Date 2:18 下午 2023/7/17
**/
JsonResultEntity deleteEntity(JSONObject jsonObject);
}

View File

@ -1,20 +1,39 @@
package com.hzya.frame.sysnew.integtationTaskLivingDetails.service.impl;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.basedao.entity.ConditionType;
import com.hzya.frame.basedao.entity.ConnectType;
import com.hzya.frame.basedao.entity.WhereCriterion;
import com.hzya.frame.basedao.service.impl.BaseDaoUtilImpl;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsVo;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
import com.hzya.frame.sysnew.integtationTaskLog.entity.IntegrationTaskLogEntity;
import com.hzya.frame.util.PluginUtils;
import com.hzya.frame.uuid.UUIDLong;
import com.hzya.frame.uuid.UUIDUtils;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import com.hzya.frame.web.exception.BaseSystemException;
import org.springframework.core.task.TaskExecutor;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
/**
* 集成任务-实例详情(IntegrationTaskLivingDetails)表服务实现类
*
@ -25,7 +44,11 @@ import com.hzya.frame.basedao.service.impl.BaseService;
public class IntegrationTaskLivingDetailsServiceImpl extends BaseService<IntegrationTaskLivingDetailsEntity, String> implements IIntegrationTaskLivingDetailsService {
private IIntegrationTaskLivingDetailsDao integrationTaskLivingDetailsDao;
@Resource
private TaskExecutor taskExecutor;
@Autowired
private BaseDaoUtilImpl baseDaoUtilImpl;
@Autowired
public void setIntegrationTaskLivingDetailsDao(IIntegrationTaskLivingDetailsDao dao) {
this.integrationTaskLivingDetailsDao = dao;
@ -194,5 +217,199 @@ public class IntegrationTaskLivingDetailsServiceImpl extends BaseService<Integra
// throw new BaseSystemException("推送状态不可为空,请传入");
// }
}
/**
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 查询列表 分页
* @Date 2:18 下午 2023/7/17
**/
@Override
public JsonResultEntity queryPage(JSONObject object) {
IntegrationTaskLivingDetailsVo entity = getData("jsonStr", object, IntegrationTaskLivingDetailsVo.class);
//判断分页
if (entity == null || entity.getPageNum() == null || entity.getPageSize() == null) {
return BaseResult.getFailureMessageEntity("分页查询参数不存在");
}
if(entity.getNew_state() == null || "".equals(entity.getNew_state()) ){
return BaseResult.getFailureMessageEntity("请先选择数据状态");
}
PageHelper.startPage(entity.getPageNum(), entity.getPageSize());
List<IntegrationTaskLivingDetailsVo> integrationTaskLivingDetailsEntityList = integrationTaskLivingDetailsDao.queryPageLeftTask(entity);
if (integrationTaskLivingDetailsEntityList != null && integrationTaskLivingDetailsEntityList.size() > 0) {
for (int i = 0; i < integrationTaskLivingDetailsEntityList.size(); i++) {
PluginBaseEntity pluginBaseEntity = PluginUtils.getPluginsById(integrationTaskLivingDetailsEntityList.get(i).getPlugin_id());
if (pluginBaseEntity != null) {
integrationTaskLivingDetailsEntityList.get(i).setPlugin_name(pluginBaseEntity.getPluginName());
}
}
}
PageInfo pageInfo = new PageInfo(integrationTaskLivingDetailsEntityList);
return BaseResult.getSuccessMessageEntity("查询数据成功", pageInfo);
}
/**
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 获取数据 根据id
* @Date 2:18 下午 2023/7/17
**/
@Override
public JsonResultEntity queryEntity(JSONObject object) {
IntegrationTaskLivingDetailsEntity entity = getData("jsonStr", object, IntegrationTaskLivingDetailsEntity.class);
//判断分页
if (entity == null || entity.getId() == null || "".equals(entity.getId())) {
return BaseResult.getFailureMessageEntity("请先传递请求主键");
}
if(entity.getNewState() == null || "".equals(entity.getNewState()) ){
return BaseResult.getFailureMessageEntity("系统错误");
}
IntegrationTaskLivingDetailsEntity appApi = integrationTaskLivingDetailsDao.queryEntity(entity);
return BaseResult.getSuccessMessageEntity("查询数据成功", appApi);
}
/**
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 批量推送
* @Date 2:18 下午 2023/7/17
**/
@Override
public JsonResultEntity batchPush(JSONObject object) {
if(object.get("jsonStr") == null ){
return BaseResult.getFailureMessageEntity("请先选择要推送的数据");
}
List<IntegrationTaskLivingDetailsEntity> jsonArray = JSONArray.parseArray(object.getString("jsonStr"),IntegrationTaskLivingDetailsEntity.class);
if(jsonArray != null && jsonArray.size() > 0){
for (int i = 0; i < jsonArray.size(); i++) {
String plugin_id = jsonArray.get(i).getPluginId();
PluginBaseEntity pluginBaseEntity = PluginUtils.getPluginsById(plugin_id);
JSONObject send = new JSONObject();
send.put("type", "details_error");
send.put("pluginId", plugin_id);
send.put("integration_task_living_details_id", jsonArray.get(i).getId());
try {
taskExecutor.execute(() -> {
try {
pluginBaseEntity.executeBusiness(send);
} catch (Exception e) {
logger.error("执行任务失败"+e.getMessage());
}
});
} catch (Exception e) {
logger.error("执行任务失败"+e.getMessage());
}
}
}
return BaseResult.getSuccessMessageEntity("重新推送成功");
}
/**
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 重新推送
* @Date 2:18 下午 2023/7/17
**/
@Override
public JsonResultEntity repush(JSONObject object) {
JSONObject jsonObject = getstrObj("jsonStr", object);
String id = jsonObject.getString("id");
String status = jsonObject.getString("new_state");
if (!checkStr(id)) {
return BaseResult.getFailureMessageEntity("请先选择要推送的数据");
}
if (!checkStr(status)) {
return BaseResult.getFailureMessageEntity("请先选择要推送的数据");
}
IntegrationTaskLivingDetailsEntity queryEntity = new IntegrationTaskLivingDetailsEntity();
queryEntity.setNewState(status);
queryEntity.setId(id);
IntegrationTaskLivingDetailsEntity entity = integrationTaskLivingDetailsDao.queryEntity(queryEntity);
String plugin_id = entity.getPluginId();
PluginBaseEntity pluginBaseEntity = PluginUtils.getPluginsById(plugin_id);
JSONObject send = new JSONObject();
send.put("type", "details_error");
send.put("pluginId", plugin_id);
send.put("integration_task_living_details_id", id);
try {
pluginBaseEntity.executeBusiness(send);
return BaseResult.getSuccessMessageEntity("重新推送成功");
} catch (Exception e) {
return BaseResult.getFailureMessageEntity("重新推送失败");
}
}
/**
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 手工处理
* @Date 2:18 下午 2023/7/17
**/
@Override
public JsonResultEntity manualProcessing(JSONObject object) {
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = getData("jsonStr", object, IntegrationTaskLivingDetailsEntity.class);
if (integrationTaskLivingDetailsEntity == null && integrationTaskLivingDetailsEntity.getId() != null && !"".equals(integrationTaskLivingDetailsEntity.getId())) {
return BaseResult.getFailureMessageEntity("请求参数不存在");
}
IntegrationTaskLivingDetailsEntity entity = integrationTaskLivingDetailsDao.queryEntity(integrationTaskLivingDetailsEntity);
if("N".equals(integrationTaskLivingDetailsEntity.getNewState())){
integrationTaskLivingDetailsDao.deleteById(integrationTaskLivingDetailsEntity.getId());
entity.setId(UUIDUtils.getUUID());
}
entity.setModify_user_id(StpUtil.getLoginIdAsString());
entity.setModify_time(new Date());
entity.setProcessor(StpUtil.getLoginIdAsString());
//检查用户名密码是否正确
List<WhereCriterion> whereList = new ArrayList<>();
WhereCriterion passwordCondition = new WhereCriterion("", "id", ConditionType.等于.getValue(), StpUtil.getLoginIdAsString(), "", ConnectType.AND);
whereList.add(passwordCondition);
HashMap<String, Object> userMap = baseDaoUtilImpl.selectOne("sys_user", whereList);
entity.setProcessorName(userMap.get("login_code").toString());
entity.setProcessingTime(new Date());
entity.setNewState("H");
entity.setProcessingRemarks(integrationTaskLivingDetailsEntity.getProcessingRemarks());
if("N".equals(integrationTaskLivingDetailsEntity.getNewState())){
integrationTaskLivingDetailsDao.saveSuccessLog(entity);
}else {
integrationTaskLivingDetailsDao.update(entity);
}
return BaseResult.getSuccessMessageEntity("手工处理成功");
}
/**
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 删除
* @Date 2:18 下午 2023/7/17
**/
@Override
public JsonResultEntity deleteEntity(JSONObject object) {
IntegrationTaskLivingDetailsEntity entity = getData("jsonStr", object, IntegrationTaskLivingDetailsEntity.class);
//判断编码是否重复
if (entity == null) {
return BaseResult.getFailureMessageEntity("请先选择数据");
}
if (entity.getId() == null || "".equals(entity.getId())) {
return BaseResult.getFailureMessageEntity("请先选择数据");
}
if (entity.getNewState() == null || "".equals(entity.getNewState())) {
return BaseResult.getFailureMessageEntity("请先选择数据");
}
//删除
IntegrationTaskLivingDetailsEntity deleteEntity = new IntegrationTaskLivingDetailsEntity();
deleteEntity.setId(entity.getId());
deleteEntity.setModify_user_id(StpUtil.getLoginIdAsString());
deleteEntity.setModify_time(new Date());
deleteEntity.setSts("Y");
deleteEntity.setNewState(entity.getNewState());
integrationTaskLivingDetailsDao.deleteEntity(deleteEntity);
return BaseResult.getSuccessMessageEntity("删除成功");
}
}

View File

@ -99,6 +99,7 @@ public class SysMenuConfigServiceImpl extends BaseService<SysMenuConfigEntity, S
moduleVo.setName(sysMenuConfigEntity.getMenuEnglishName());
moduleVo.setComponent(sysMenuConfigEntity.getMenuPage());
JSONObject meta = new JSONObject();
meta.put("id", sysMenuConfigEntity.getId());
meta.put("title", sysMenuConfigEntity.getMenuName());
meta.put("icon", sysMenuConfigEntity.getMenuIcon());
if("0".equals(sysMenuConfigEntity.getVisibles())){

View File

@ -115,7 +115,7 @@
<if test="companyId != null and companyId != ''">and company_id like concat('%',#{companyId},'%')</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort == null or sort == ''.toString() ">order by sorts desc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>