diff --git a/service/src/main/java/com/hzya/frame/mdm/service/impl/MdmServiceImpl.java b/service/src/main/java/com/hzya/frame/mdm/service/impl/MdmServiceImpl.java index 5d75b322..cbd420df 100644 --- a/service/src/main/java/com/hzya/frame/mdm/service/impl/MdmServiceImpl.java +++ b/service/src/main/java/com/hzya/frame/mdm/service/impl/MdmServiceImpl.java @@ -1056,13 +1056,13 @@ public class MdmServiceImpl implements IMdmService { sc.setCreate(); sysButtonConfigDao.save(sc); SysButtonConfigEntity ck = new SysButtonConfigEntity(); - ck.setCode("dele"); + ck.setCode("view"); ck.setNameCh("查看"); - ck.setNameEn("dele"); + ck.setNameEn("view"); ck.setMenuId(module.getId()); ck.setIconName(""); ck.setStyles(""); - ck.setBtnFunction("dele"); + ck.setBtnFunction("view"); ck.setRemark("主数据查看按钮"); ck.setCreate(); sysButtonConfigDao.save(ck); diff --git a/service/src/main/java/com/hzya/frame/sysnew/application/service/ISysApplicationService.java b/service/src/main/java/com/hzya/frame/sysnew/application/service/ISysApplicationService.java index 88c81fc1..a4711b39 100644 --- a/service/src/main/java/com/hzya/frame/sysnew/application/service/ISysApplicationService.java +++ b/service/src/main/java/com/hzya/frame/sysnew/application/service/ISysApplicationService.java @@ -347,4 +347,14 @@ public interface ISysApplicationService extends IBaseService 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 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); + } } diff --git a/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/dao/ISysButtonConfigDao.java b/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/dao/ISysButtonConfigDao.java index cb9aa600..d8863927 100644 --- a/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/dao/ISysButtonConfigDao.java +++ b/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/dao/ISysButtonConfigDao.java @@ -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 { + List getUserButton(SysButtonConfigEntity entity); } diff --git a/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/dao/impl/SysButtonConfigDaoImpl.java b/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/dao/impl/SysButtonConfigDaoImpl.java index a816c9b8..c6ce01dd 100644 --- a/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/dao/impl/SysButtonConfigDaoImpl.java +++ b/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/dao/impl/SysButtonConfigDaoImpl.java @@ -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 implements ISysButtonConfigDao{ - + + @Override + public List getUserButton(SysButtonConfigEntity entity) { + List o = super.query(getSqlIdPrifx() + "getUserButton", entity); + return o; + } } diff --git a/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/entity/SysButtonConfigEntity.java b/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/entity/SysButtonConfigEntity.java index e39fed69..93827ed1 100644 --- a/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/entity/SysButtonConfigEntity.java +++ b/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/entity/SysButtonConfigEntity.java @@ -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; + } } diff --git a/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/entity/SysButtonConfigEntity.xml b/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/entity/SysButtonConfigEntity.xml index 9fdabc17..11817e90 100644 --- a/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/entity/SysButtonConfigEntity.xml +++ b/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/entity/SysButtonConfigEntity.xml @@ -288,6 +288,45 @@ update sys_button_config set sts= 'N' ,modify_time = #{modify_time},modify_user delete from sys_button_config where id = #{id} - + diff --git a/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/service/ISysButtonConfigService.java b/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/service/ISysButtonConfigService.java index c29ccdf0..acbf4d05 100644 --- a/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/service/ISysButtonConfigService.java +++ b/service/src/main/java/com/hzya/frame/sysnew/buttonConfig/service/ISysButtonConfigService.java @@ -66,4 +66,14 @@ public interface ISysButtonConfigService extends IBaseService sysButtonConfigEntities = sysButtonConfigDao.getUserButton(entity); + return BaseResult.getSuccessMessageEntity("查询按钮成功",sysButtonConfigEntities); + } } diff --git a/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/dao/IIntegrationTaskLivingDetailsDao.java b/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/dao/IIntegrationTaskLivingDetailsDao.java index bead3beb..5e902dd0 100644 --- a/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/dao/IIntegrationTaskLivingDetailsDao.java +++ b/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/dao/IIntegrationTaskLivingDetailsDao.java @@ -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 queryPageLeftTask(IntegrationTaskLivingDetailsVo entity); + + Integer entity_updatebyid(IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity); + + IntegrationTaskLivingDetailsEntity queryEntity(IntegrationTaskLivingDetailsEntity entity); + + Integer deleteEntity(IntegrationTaskLivingDetailsEntity deleteEntity); } diff --git a/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/dao/impl/IntegrationTaskLivingDetailsDaoImpl.java b/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/dao/impl/IntegrationTaskLivingDetailsDaoImpl.java index 1a353642..a810e396 100644 --- a/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/dao/impl/IntegrationTaskLivingDetailsDaoImpl.java +++ b/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/dao/impl/IntegrationTaskLivingDetailsDaoImpl.java @@ -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 queryPageLeftTask(IntegrationTaskLivingDetailsVo entity) { + List o = (List) 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); + } } diff --git a/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/entity/IntegrationTaskLivingDetailsEntity.xml b/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/entity/IntegrationTaskLivingDetailsEntity.xml index 025035b2..3042faaf 100644 --- a/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/entity/IntegrationTaskLivingDetailsEntity.xml +++ b/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/entity/IntegrationTaskLivingDetailsEntity.xml @@ -535,6 +535,197 @@ update integration_task_living_details set sts= 'N' ,modify_time = #{modify_tim delete from integration_task_living_details where id = #{id} + + + + + + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + update integration_task_living_details set + + result = #{result}, + query_condition = #{query_condition}, + root_app_pk = #{root_app_pk}, + root_app_bill = #{root_app_bill}, + root_app_new_data = #{root_app_new_data}, + new_transmit_info = #{new_transmit_info}, + new_push_date = #{new_push_date}, + repair_pust = #{repair_pust}, + sence_id = #{sence_id}, + plugin_id = #{plugin_id}, + new_state = #{new_state}, + business_date = #{business_date}, + create_user_id = #{create_user_id}, + modify_user_id = #{modify_user_id}, + new_system_primary = #{new_system_primary}, + new_system_number = #{new_system_number}, + processor = #{processor}, + processor_name = #{processor_name}, + processing_remarks = #{processing_remarks}, + processing_time = #{processing_time}, + modify_time =#{modify_time} + modify_time = now() + + where id = #{id} + + +update + + integration_task_living_details + + + integration_task_living_details_success + + set sts= 'N' +where id = #{id} + diff --git a/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/entity/IntegrationTaskLivingDetailsVo.java b/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/entity/IntegrationTaskLivingDetailsVo.java new file mode 100644 index 00000000..2e349368 --- /dev/null +++ b/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/entity/IntegrationTaskLivingDetailsVo.java @@ -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; + } +} diff --git a/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/service/IIntegrationTaskLivingDetailsService.java b/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/service/IIntegrationTaskLivingDetailsService.java index bbaf4243..cb8e1ea6 100644 --- a/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/service/IIntegrationTaskLivingDetailsService.java +++ b/service/src/main/java/com/hzya/frame/sysnew/integtationTaskLivingDetails/service/IIntegrationTaskLivingDetailsService.java @@ -53,4 +53,61 @@ public interface IIntegrationTaskLivingDetailsService extends IBaseService 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 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 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 whereList = new ArrayList<>(); + WhereCriterion passwordCondition = new WhereCriterion("", "id", ConditionType.等于.getValue(), StpUtil.getLoginIdAsString(), "", ConnectType.AND); + whereList.add(passwordCondition); + HashMap 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("删除成功"); + } } diff --git a/service/src/main/java/com/hzya/frame/sysnew/menuConfig/service/impl/SysMenuConfigServiceImpl.java b/service/src/main/java/com/hzya/frame/sysnew/menuConfig/service/impl/SysMenuConfigServiceImpl.java index dcaa4352..9cd32b9e 100644 --- a/service/src/main/java/com/hzya/frame/sysnew/menuConfig/service/impl/SysMenuConfigServiceImpl.java +++ b/service/src/main/java/com/hzya/frame/sysnew/menuConfig/service/impl/SysMenuConfigServiceImpl.java @@ -99,6 +99,7 @@ public class SysMenuConfigServiceImpl extends BaseService