Merge branch 'dev' of http://192.168.2.237:3000/root/kangarooDataCenterV3 into yingdesai
This commit is contained in:
commit
5fd2c7de9a
|
@ -12,6 +12,7 @@ public class MdmDistributeDto {
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private List<MdmModuleDistributeEntity> mdmModuleDistributeEntities;
|
private List<MdmModuleDistributeEntity> mdmModuleDistributeEntities;
|
||||||
|
|
||||||
public List<MdmModuleDistributeEntity> getMdmModuleDistributeEntities() {
|
public List<MdmModuleDistributeEntity> getMdmModuleDistributeEntities() {
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.hzya.frame.mdm.mdmModule.dao;
|
package com.hzya.frame.mdm.mdmModule.dao;
|
||||||
|
|
||||||
import com.hzya.frame.mdm.entity.MdmDataDto;
|
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.MdmDto;
|
||||||
import com.hzya.frame.mdm.entity.MdmQuery;
|
import com.hzya.frame.mdm.entity.MdmQuery;
|
||||||
import com.hzya.frame.mdm.entity.MdmVo;
|
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);
|
List<HashMap<String, Object>> querySelectData(MdmDto entity);
|
||||||
|
|
||||||
Integer deleteChilder(FormmainDeleteDto formmainDeleteDto);
|
Integer deleteChilder(FormmainDeleteDto formmainDeleteDto);
|
||||||
|
|
||||||
|
Integer saveDistribute(MdmDistributeEntity mdmDistributeEntity);
|
||||||
|
|
||||||
|
Integer updateDistribute(MdmDistributeEntity mdmDistributeEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.hzya.frame.mdm.mdmModule.dao.impl;
|
package com.hzya.frame.mdm.mdmModule.dao.impl;
|
||||||
|
|
||||||
import com.hzya.frame.mdm.entity.MdmDataDto;
|
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.MdmDto;
|
||||||
import com.hzya.frame.mdm.entity.MdmQuery;
|
import com.hzya.frame.mdm.entity.MdmQuery;
|
||||||
import com.hzya.frame.mdm.entity.MdmVo;
|
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
|
@Override
|
||||||
public HashMap<String, Object> queryTemplateDataOne(MdmDto entity) {
|
public HashMap<String, Object> queryTemplateDataOne(MdmDto entity) {
|
||||||
HashMap<String, Object> o = (HashMap<String, Object>) super.selectOne(getSqlIdPrifx() + "queryTemplateDataOne", entity);
|
HashMap<String, Object> o = (HashMap<String, Object>) super.selectOne(getSqlIdPrifx() + "queryTemplateDataOne", entity);
|
||||||
|
|
|
@ -696,5 +696,58 @@ where id = #{id}
|
||||||
</trim>
|
</trim>
|
||||||
order by sorts asc
|
order by sorts asc
|
||||||
</select>
|
</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>
|
</mapper>
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ import com.hzya.frame.mdm.entity.MdmDbFiledVo;
|
||||||
import com.hzya.frame.mdm.entity.MdmDbVo;
|
import com.hzya.frame.mdm.entity.MdmDbVo;
|
||||||
import com.hzya.frame.mdm.entity.MdmDetailViewVo;
|
import com.hzya.frame.mdm.entity.MdmDetailViewVo;
|
||||||
import com.hzya.frame.mdm.entity.MdmDistributeDto;
|
import com.hzya.frame.mdm.entity.MdmDistributeDto;
|
||||||
|
import com.hzya.frame.mdm.entity.MdmDistributeEntity;
|
||||||
import com.hzya.frame.mdm.entity.MdmDistributeVo;
|
import com.hzya.frame.mdm.entity.MdmDistributeVo;
|
||||||
import com.hzya.frame.mdm.entity.MdmDto;
|
import com.hzya.frame.mdm.entity.MdmDto;
|
||||||
import com.hzya.frame.mdm.entity.MdmModuleViewDto;
|
import com.hzya.frame.mdm.entity.MdmModuleViewDto;
|
||||||
|
@ -58,6 +59,8 @@ import com.hzya.frame.sys.roleModule.dao.IRoleModuleMapper;
|
||||||
import com.hzya.frame.sys.roleModule.entity.RoleModule;
|
import com.hzya.frame.sys.roleModule.entity.RoleModule;
|
||||||
import com.hzya.frame.sys.userRole.dao.IUserRoleMapper;
|
import com.hzya.frame.sys.userRole.dao.IUserRoleMapper;
|
||||||
import com.hzya.frame.sys.userRole.entity.UserRole;
|
import com.hzya.frame.sys.userRole.entity.UserRole;
|
||||||
|
import com.hzya.frame.sysnew.application.plugin.dao.ISysApplicationPluginDao;
|
||||||
|
import com.hzya.frame.sysnew.application.plugin.entity.SysApplicationPluginEntity;
|
||||||
import com.hzya.frame.sysnew.buttonConfig.dao.ISysButtonConfigDao;
|
import com.hzya.frame.sysnew.buttonConfig.dao.ISysButtonConfigDao;
|
||||||
import com.hzya.frame.sysnew.buttonConfig.entity.SysButtonConfigEntity;
|
import com.hzya.frame.sysnew.buttonConfig.entity.SysButtonConfigEntity;
|
||||||
import com.hzya.frame.sysnew.menuConfig.dao.ISysMenuConfigDao;
|
import com.hzya.frame.sysnew.menuConfig.dao.ISysMenuConfigDao;
|
||||||
|
@ -66,6 +69,8 @@ import com.hzya.frame.util.PluginUtils;
|
||||||
import com.hzya.frame.uuid.UUIDUtils;
|
import com.hzya.frame.uuid.UUIDUtils;
|
||||||
import com.hzya.frame.web.entity.BaseResult;
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
@ -83,6 +88,8 @@ import java.util.stream.Collectors;
|
||||||
*/
|
*/
|
||||||
@Service(value = "mdmService")
|
@Service(value = "mdmService")
|
||||||
public class MdmServiceImpl implements IMdmService {
|
public class MdmServiceImpl implements IMdmService {
|
||||||
|
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
protected IModuleMapper moduleMapper;
|
protected IModuleMapper moduleMapper;
|
||||||
@Resource
|
@Resource
|
||||||
|
@ -114,11 +121,12 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
@Resource
|
@Resource
|
||||||
private IMdmTableCodeRuleDao mdmTableCodeRuleDao;//模版数据表编码规则表
|
private IMdmTableCodeRuleDao mdmTableCodeRuleDao;//模版数据表编码规则表
|
||||||
@Resource
|
@Resource
|
||||||
protected IUserRoleMapper userRoleMapper;
|
protected ISysApplicationPluginDao sysApplicationPluginDao;
|
||||||
@Resource
|
@Resource
|
||||||
private ISysMenuConfigDao sysMenuConfigDao;
|
private ISysMenuConfigDao sysMenuConfigDao;
|
||||||
@Resource
|
@Resource
|
||||||
private ISysButtonConfigDao sysButtonConfigDao;
|
private ISysButtonConfigDao sysButtonConfigDao;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param object
|
* @param object
|
||||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
|
@ -299,23 +307,22 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
//查询数据源表
|
//查询数据源表
|
||||||
entity.setSts("Y");
|
entity.setSts("Y");
|
||||||
List<MdmModuleDbEntity> dblist = mdmModuleDbDao.queryBase(entity);
|
List<MdmModuleDbEntity> dblist = mdmModuleDbDao.queryBase(entity);
|
||||||
if(dblist != null && dblist.size() == 1 ){
|
if (dblist != null && dblist.size() == 1) {
|
||||||
MdmModuleDbFiledsEntity queryDbFiled= new MdmModuleDbFiledsEntity();
|
MdmModuleDbFiledsEntity queryDbFiled = new MdmModuleDbFiledsEntity();
|
||||||
queryDbFiled.setSts("Y");
|
queryDbFiled.setSts("Y");
|
||||||
queryDbFiled.setDbId(dblist.get(0).getId());
|
queryDbFiled.setDbId(dblist.get(0).getId());
|
||||||
List<MdmModuleDbFiledsEntity> list = mdmModuleDbFiledsDao.queryBase(queryDbFiled);
|
List<MdmModuleDbFiledsEntity> list = mdmModuleDbFiledsDao.queryBase(queryDbFiled);
|
||||||
MdmModuleDbFiledsEntity mdmModuleDbFiledsEntity = new MdmModuleDbFiledsEntity();
|
MdmModuleDbFiledsEntity mdmModuleDbFiledsEntity = new MdmModuleDbFiledsEntity();
|
||||||
mdmModuleDbFiledsEntity.setChName("id");
|
mdmModuleDbFiledsEntity.setChName("id");
|
||||||
mdmModuleDbFiledsEntity.setEnName("id");
|
mdmModuleDbFiledsEntity.setEnName("id");
|
||||||
list.add(0,mdmModuleDbFiledsEntity);
|
list.add(0, mdmModuleDbFiledsEntity);
|
||||||
return BaseResult.getSuccessMessageEntity("查询数据成功", list);
|
return BaseResult.getSuccessMessageEntity("查询数据成功", list);
|
||||||
}else {
|
} else {
|
||||||
return BaseResult.getFailureMessageEntity("服务不存在");
|
return BaseResult.getFailureMessageEntity("服务不存在");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param object
|
* @param object
|
||||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
|
@ -337,15 +344,15 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
entity.setSts("Y");
|
entity.setSts("Y");
|
||||||
entity.setDbType("1");
|
entity.setDbType("1");
|
||||||
List<MdmModuleDbEntity> mdmModuleDbEntityList = mdmModuleDbDao.queryBase(entity);
|
List<MdmModuleDbEntity> mdmModuleDbEntityList = mdmModuleDbDao.queryBase(entity);
|
||||||
if(mdmModuleDbEntityList != null && mdmModuleDbEntityList.size() == 1){
|
if (mdmModuleDbEntityList != null && mdmModuleDbEntityList.size() == 1) {
|
||||||
MdmModuleDbFiledsEntity mdmModuleDbFiledsEntity = new MdmModuleDbFiledsEntity();
|
MdmModuleDbFiledsEntity mdmModuleDbFiledsEntity = new MdmModuleDbFiledsEntity();
|
||||||
mdmModuleDbFiledsEntity.setSts("Y");
|
mdmModuleDbFiledsEntity.setSts("Y");
|
||||||
mdmModuleDbFiledsEntity.setDbId(mdmModuleDbEntityList.get(0).getId());
|
mdmModuleDbFiledsEntity.setDbId(mdmModuleDbEntityList.get(0).getId());
|
||||||
List<MdmModuleDbFiledsEntity> list = mdmModuleDbFiledsDao.queryBase(mdmModuleDbFiledsEntity);
|
List<MdmModuleDbFiledsEntity> list = mdmModuleDbFiledsDao.queryBase(mdmModuleDbFiledsEntity);
|
||||||
return BaseResult.getSuccessMessageEntity("查询数据成功", list);
|
return BaseResult.getSuccessMessageEntity("查询数据成功", list);
|
||||||
}else if(mdmModuleDbEntityList != null && mdmModuleDbEntityList.size() == 0){
|
} else if (mdmModuleDbEntityList != null && mdmModuleDbEntityList.size() == 0) {
|
||||||
return BaseResult.getFailureMessageEntity("请先配置数据源");
|
return BaseResult.getFailureMessageEntity("请先配置数据源");
|
||||||
}else {
|
} else {
|
||||||
return BaseResult.getFailureMessageEntity("查询数据失败");
|
return BaseResult.getFailureMessageEntity("查询数据失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -485,7 +492,7 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
deleteOldData.setModify_user_id(StpUtil.getLoginIdAsString());
|
deleteOldData.setModify_user_id(StpUtil.getLoginIdAsString());
|
||||||
deleteOldData.setModify_time(new Date());
|
deleteOldData.setModify_time(new Date());
|
||||||
mdmTableCodeRuleDao.logicRemoveMultiCondition(deleteOldData);
|
mdmTableCodeRuleDao.logicRemoveMultiCondition(deleteOldData);
|
||||||
if(mdmTableCodeRuleEntityList != null && mdmTableCodeRuleEntityList.size() > 0){
|
if (mdmTableCodeRuleEntityList != null && mdmTableCodeRuleEntityList.size() > 0) {
|
||||||
for (int i = 0; i < mdmTableCodeRuleEntityList.size(); i++) {
|
for (int i = 0; i < mdmTableCodeRuleEntityList.size(); i++) {
|
||||||
MdmTableCodeRuleEntity mdmTableCodeRuleEntity = mdmTableCodeRuleEntityList.get(i);
|
MdmTableCodeRuleEntity mdmTableCodeRuleEntity = mdmTableCodeRuleEntityList.get(i);
|
||||||
mdmTableCodeRuleEntity.setMdmId(entity.getId());
|
mdmTableCodeRuleEntity.setMdmId(entity.getId());
|
||||||
|
@ -734,18 +741,18 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param
|
||||||
|
* @return java.util.List<com.hzya.frame.mdm.entity.DbFiledsDto>
|
||||||
* @Author lvleigang
|
* @Author lvleigang
|
||||||
* @Description 设置分发表字段
|
* @Description 设置分发表字段
|
||||||
* @Date 8:49 上午 2023/11/9
|
* @Date 8:49 上午 2023/11/9
|
||||||
* @param
|
|
||||||
* @return java.util.List<com.hzya.frame.mdm.entity.DbFiledsDto>
|
|
||||||
**/
|
**/
|
||||||
private List<DbFiledsDto> getDistribute() {
|
private List<DbFiledsDto> getDistribute() {
|
||||||
List<DbFiledsDto> dbFiledsDtos = new ArrayList<>();
|
List<DbFiledsDto> dbFiledsDtos = new ArrayList<>();
|
||||||
dbFiledsDtos.add(new DbFiledsDto("1", "数据id","formmain_id", "3", "50"));
|
dbFiledsDtos.add(new DbFiledsDto("1", "数据id", "formmain_id", "3", "50"));
|
||||||
dbFiledsDtos.add(new DbFiledsDto("1", "应用id","app_id", "3", "50"));
|
dbFiledsDtos.add(new DbFiledsDto("1", "应用id", "app_id", "3", "50"));
|
||||||
dbFiledsDtos.add(new DbFiledsDto("1", "状态1、发送成功 2、发送中 3、发送失败","status", "3", "50"));
|
dbFiledsDtos.add(new DbFiledsDto("1", "状态1、发送成功 2、发送中 3、发送失败", "status", "3", "50"));
|
||||||
dbFiledsDtos.add(new DbFiledsDto("1", "描述","msg", "3", "50"));
|
dbFiledsDtos.add(new DbFiledsDto("1", "描述", "msg", "3", "50"));
|
||||||
return dbFiledsDtos;
|
return dbFiledsDtos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -979,9 +986,9 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
module.setFormId(entity.getId());
|
module.setFormId(entity.getId());
|
||||||
module.setParentMenuId("ea22757e99c144fb9ef381dd322e233c");
|
module.setParentMenuId("ea22757e99c144fb9ef381dd322e233c");
|
||||||
module.setMenuName(moduleEntity.getMdmName());
|
module.setMenuName(moduleEntity.getMdmName());
|
||||||
module.setMenuEnglishName("integrationOptionAdmin"+moduleEntity.getMdmCode());
|
module.setMenuEnglishName("integrationOptionAdmin" + moduleEntity.getMdmCode());
|
||||||
module.setMenuIcon(null);//模块图标
|
module.setMenuIcon(null);//模块图标
|
||||||
module.setRoute("integrationOptionAdmin/"+moduleEntity.getMdmCode());//路由地址
|
module.setRoute("integrationOptionAdmin/" + moduleEntity.getMdmCode());//路由地址
|
||||||
module.setMenuPage("integrationOptionV2/index");//一级Layout 二级 ParntView 三级component
|
module.setMenuPage("integrationOptionV2/index");//一级Layout 二级 ParntView 三级component
|
||||||
module.setRemark("主数据生成菜单");
|
module.setRemark("主数据生成菜单");
|
||||||
module.setVisibles("0");
|
module.setVisibles("0");
|
||||||
|
@ -1049,13 +1056,13 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
sc.setCreate();
|
sc.setCreate();
|
||||||
sysButtonConfigDao.save(sc);
|
sysButtonConfigDao.save(sc);
|
||||||
SysButtonConfigEntity ck = new SysButtonConfigEntity();
|
SysButtonConfigEntity ck = new SysButtonConfigEntity();
|
||||||
ck.setCode("dele");
|
ck.setCode("view");
|
||||||
ck.setNameCh("查看");
|
ck.setNameCh("查看");
|
||||||
ck.setNameEn("dele");
|
ck.setNameEn("view");
|
||||||
ck.setMenuId(module.getId());
|
ck.setMenuId(module.getId());
|
||||||
ck.setIconName("");
|
ck.setIconName("");
|
||||||
ck.setStyles("");
|
ck.setStyles("");
|
||||||
ck.setBtnFunction("dele");
|
ck.setBtnFunction("view");
|
||||||
ck.setRemark("主数据查看按钮");
|
ck.setRemark("主数据查看按钮");
|
||||||
ck.setCreate();
|
ck.setCreate();
|
||||||
sysButtonConfigDao.save(ck);
|
sysButtonConfigDao.save(ck);
|
||||||
|
@ -1503,7 +1510,7 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
mdmModuleViewDetailEntity.setViewType("1");
|
mdmModuleViewDetailEntity.setViewType("1");
|
||||||
List<MdmModuleViewDetailEntity> queryList = mdmModuleViewDetailDao.queryBase(mdmModuleViewDetailEntity);
|
List<MdmModuleViewDetailEntity> queryList = mdmModuleViewDetailDao.queryBase(mdmModuleViewDetailEntity);
|
||||||
//设置字段
|
//设置字段
|
||||||
List<MdmViewFiledVo> queryListVo = setQueryList(mdmModuleDbEntityList, mdmModuleDbFiledsEntityList, mdmModuleDbFiledsRuleEntityList, queryList,false);
|
List<MdmViewFiledVo> queryListVo = setQueryList(mdmModuleDbEntityList, mdmModuleDbFiledsEntityList, mdmModuleDbFiledsRuleEntityList, queryList, false);
|
||||||
mdmViewVo.setQueryList(queryListVo);
|
mdmViewVo.setQueryList(queryListVo);
|
||||||
|
|
||||||
//查询用户设置字段
|
//查询用户设置字段
|
||||||
|
@ -1529,17 +1536,17 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
} else {
|
} else {
|
||||||
dolistList = listList;
|
dolistList = listList;
|
||||||
}
|
}
|
||||||
List<MdmViewFiledVo> listListVo = setQueryList(mdmModuleDbEntityList, mdmModuleDbFiledsEntityList, mdmModuleDbFiledsRuleEntityList, dolistList,true);
|
List<MdmViewFiledVo> listListVo = setQueryList(mdmModuleDbEntityList, mdmModuleDbFiledsEntityList, mdmModuleDbFiledsRuleEntityList, dolistList, true);
|
||||||
mdmViewVo.setListList(listListVo);
|
mdmViewVo.setListList(listListVo);
|
||||||
|
|
||||||
List<MdmViewButtonVo> buttonList = new ArrayList<>();
|
List<MdmViewButtonVo> buttonList = new ArrayList<>();
|
||||||
buttonList.add(new MdmViewButtonVo("new","新建"));
|
buttonList.add(new MdmViewButtonVo("new", "新建"));
|
||||||
buttonList.add(new MdmViewButtonVo("resize","重置"));
|
buttonList.add(new MdmViewButtonVo("resize", "重置"));
|
||||||
buttonList.add(new MdmViewButtonVo("search","查询"));
|
buttonList.add(new MdmViewButtonVo("search", "查询"));
|
||||||
buttonList.add(new MdmViewButtonVo("edit","修改"));
|
buttonList.add(new MdmViewButtonVo("edit", "修改"));
|
||||||
buttonList.add(new MdmViewButtonVo("dele","删除"));
|
buttonList.add(new MdmViewButtonVo("dele", "删除"));
|
||||||
buttonList.add(new MdmViewButtonVo("view","查看"));
|
buttonList.add(new MdmViewButtonVo("view", "查看"));
|
||||||
buttonList.add(new MdmViewButtonVo("send","下发"));
|
buttonList.add(new MdmViewButtonVo("send", "下发"));
|
||||||
mdmViewVo.setButtonList(buttonList);
|
mdmViewVo.setButtonList(buttonList);
|
||||||
return BaseResult.getSuccessMessageEntity("获取字段成功", mdmViewVo);
|
return BaseResult.getSuccessMessageEntity("获取字段成功", mdmViewVo);
|
||||||
}
|
}
|
||||||
|
@ -1645,7 +1652,7 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
* @Description 根据字段设置返回前台字段
|
* @Description 根据字段设置返回前台字段
|
||||||
* @Date 4:11 下午 2023/10/26
|
* @Date 4:11 下午 2023/10/26
|
||||||
**/
|
**/
|
||||||
private List<MdmViewFiledVo> setQueryList(List<MdmModuleDbEntity> mdmModuleDbEntityList, List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntityList, List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntityList, List<MdmModuleViewDetailEntity> queryList,boolean flag) {
|
private List<MdmViewFiledVo> setQueryList(List<MdmModuleDbEntity> mdmModuleDbEntityList, List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntityList, List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntityList, List<MdmModuleViewDetailEntity> queryList, boolean flag) {
|
||||||
List<MdmViewFiledVo> mdmViewFiledVos = new ArrayList<>();
|
List<MdmViewFiledVo> mdmViewFiledVos = new ArrayList<>();
|
||||||
|
|
||||||
if (queryList != null && queryList.size() > 0) {
|
if (queryList != null && queryList.size() > 0) {
|
||||||
|
@ -1690,9 +1697,9 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
mdmViewFiledVo.setEnName("document_rule");//英文名
|
mdmViewFiledVo.setEnName("document_rule");//英文名
|
||||||
mdmViewFiledVo.setChName("单据编码");//中文名
|
mdmViewFiledVo.setChName("单据编码");//中文名
|
||||||
mdmViewFiledVo.setDbType("1");//类型 1、主表 2、明细
|
mdmViewFiledVo.setDbType("1");//类型 1、主表 2、明细
|
||||||
if(mdmModuleDbEntityList != null && mdmModuleDbEntityList.size() > 0){
|
if (mdmModuleDbEntityList != null && mdmModuleDbEntityList.size() > 0) {
|
||||||
for (int i = 0; i < mdmModuleDbEntityList.size(); i++) {
|
for (int i = 0; i < mdmModuleDbEntityList.size(); i++) {
|
||||||
if("1".equals(mdmModuleDbEntityList.get(i).getDbType())){
|
if ("1".equals(mdmModuleDbEntityList.get(i).getDbType())) {
|
||||||
mdmViewFiledVo.setDbName(mdmModuleDbEntityList.get(i).getDbName());//表名
|
mdmViewFiledVo.setDbName(mdmModuleDbEntityList.get(i).getDbName());//表名
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1733,11 +1740,11 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
msgRule.add(msgRulerow);
|
msgRule.add(msgRulerow);
|
||||||
msgRule.add(msgRuleTitie);
|
msgRule.add(msgRuleTitie);
|
||||||
mdmViewFiledVo.setRuleList(msgRule);
|
mdmViewFiledVo.setRuleList(msgRule);
|
||||||
mdmViewFiledVos.add(0,mdmViewFiledVo);
|
mdmViewFiledVos.add(0, mdmViewFiledVo);
|
||||||
|
|
||||||
//添加分发数量
|
//添加分发数量
|
||||||
if(flag){
|
if (flag) {
|
||||||
addFfsl(mdmModuleDbEntityList,mdmViewFiledVos);
|
addFfsl(mdmModuleDbEntityList, mdmViewFiledVos);
|
||||||
}
|
}
|
||||||
return mdmViewFiledVos;
|
return mdmViewFiledVos;
|
||||||
}
|
}
|
||||||
|
@ -1750,9 +1757,9 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
mdmViewFiledVo.setEnName("qwqwasdasdzxasda");//英文名
|
mdmViewFiledVo.setEnName("qwqwasdasdzxasda");//英文名
|
||||||
mdmViewFiledVo.setChName("分发数量");//中文名
|
mdmViewFiledVo.setChName("分发数量");//中文名
|
||||||
mdmViewFiledVo.setDbType("1");//类型 1、主表 2、明细
|
mdmViewFiledVo.setDbType("1");//类型 1、主表 2、明细
|
||||||
if(mdmModuleDbEntityList != null && mdmModuleDbEntityList.size() > 0){
|
if (mdmModuleDbEntityList != null && mdmModuleDbEntityList.size() > 0) {
|
||||||
for (int i = 0; i < mdmModuleDbEntityList.size(); i++) {
|
for (int i = 0; i < mdmModuleDbEntityList.size(); i++) {
|
||||||
if("1".equals(mdmModuleDbEntityList.get(i).getDbType())){
|
if ("1".equals(mdmModuleDbEntityList.get(i).getDbType())) {
|
||||||
mdmViewFiledVo.setDbName(mdmModuleDbEntityList.get(i).getDbName());//表名
|
mdmViewFiledVo.setDbName(mdmModuleDbEntityList.get(i).getDbName());//表名
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1851,7 +1858,7 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
}
|
}
|
||||||
mdmModuleDbEntity = mdmModuleDbEntityList.get(0);
|
mdmModuleDbEntity = mdmModuleDbEntityList.get(0);
|
||||||
Map<String, Object> queryData = new HashMap<>();
|
Map<String, Object> queryData = new HashMap<>();
|
||||||
queryData.put("tableName", mdmModuleDbEntity.getDbName()+"_distribute");//表名
|
queryData.put("tableName", mdmModuleDbEntity.getDbName() + "_distribute");//表名
|
||||||
queryData.put("id", entity.getId());//字段
|
queryData.put("id", entity.getId());//字段
|
||||||
List<MdmDistributeVo> datas = mdmModuleDbDao.getServiceByDistributeIdNoCase(queryData);
|
List<MdmDistributeVo> datas = mdmModuleDbDao.getServiceByDistributeIdNoCase(queryData);
|
||||||
List<MdmDistributeVo> returnData = new ArrayList<>();
|
List<MdmDistributeVo> returnData = new ArrayList<>();
|
||||||
|
@ -1861,17 +1868,17 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
mdmModuleDistributeEntity.setMdmId(mdmModuleEntities.get(0).getId());
|
mdmModuleDistributeEntity.setMdmId(mdmModuleEntities.get(0).getId());
|
||||||
mdmModuleDistributeEntity.setSts("Y");
|
mdmModuleDistributeEntity.setSts("Y");
|
||||||
List<MdmModuleDistributeEntity> mdmModuleDistributeEntities = mdmModuleDistributeDao.queryBase(mdmModuleDistributeEntity);
|
List<MdmModuleDistributeEntity> mdmModuleDistributeEntities = mdmModuleDistributeDao.queryBase(mdmModuleDistributeEntity);
|
||||||
if(datas != null && datas.size() > 0){
|
if (datas != null && datas.size() > 0) {
|
||||||
if(mdmModuleDistributeEntities != null && mdmModuleDistributeEntities.size() > 0){
|
if (mdmModuleDistributeEntities != null && mdmModuleDistributeEntities.size() > 0) {
|
||||||
for (int i = 0; i < mdmModuleDistributeEntities.size(); i++) {
|
for (int i = 0; i < mdmModuleDistributeEntities.size(); i++) {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
for (int i1 = 0; i1 < datas.size(); i1++) {
|
for (int i1 = 0; i1 < datas.size(); i1++) {
|
||||||
if(datas.get(i1).getAppId().equals(mdmModuleDistributeEntities.get(i).getAppId())){
|
if (datas.get(i1).getAppId().equals(mdmModuleDistributeEntities.get(i).getAppId())) {
|
||||||
flag = true;
|
flag = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!flag){
|
if (!flag) {
|
||||||
MdmDistributeVo mdmDistributeVo = new MdmDistributeVo();
|
MdmDistributeVo mdmDistributeVo = new MdmDistributeVo();
|
||||||
mdmDistributeVo.setAppId(mdmModuleDistributeEntities.get(i).getAppId());
|
mdmDistributeVo.setAppId(mdmModuleDistributeEntities.get(i).getAppId());
|
||||||
mdmDistributeVo.setStatus("4");
|
mdmDistributeVo.setStatus("4");
|
||||||
|
@ -1881,8 +1888,8 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
returnData.addAll(datas);
|
returnData.addAll(datas);
|
||||||
}else {
|
} else {
|
||||||
if(mdmModuleDistributeEntities != null && mdmModuleDistributeEntities.size() > 0){
|
if (mdmModuleDistributeEntities != null && mdmModuleDistributeEntities.size() > 0) {
|
||||||
for (int i = 0; i < mdmModuleDistributeEntities.size(); i++) {
|
for (int i = 0; i < mdmModuleDistributeEntities.size(); i++) {
|
||||||
MdmDistributeVo mdmDistributeVo = new MdmDistributeVo();
|
MdmDistributeVo mdmDistributeVo = new MdmDistributeVo();
|
||||||
mdmDistributeVo.setAppId(mdmModuleDistributeEntities.get(i).getAppId());
|
mdmDistributeVo.setAppId(mdmModuleDistributeEntities.get(i).getAppId());
|
||||||
|
@ -1892,8 +1899,9 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return BaseResult.getSuccessMessageEntity("查询数据成功",returnData);
|
return BaseResult.getSuccessMessageEntity("查询数据成功", returnData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param object
|
* @param object
|
||||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
|
@ -1924,6 +1932,7 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
return BaseResult.getSuccessMessageEntity("查询数据成功", mapList);
|
return BaseResult.getSuccessMessageEntity("查询数据成功", mapList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param object
|
* @param object
|
||||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
|
@ -1973,7 +1982,7 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
if (!checkStr(entity.getValue())) {
|
if (!checkStr(entity.getValue())) {
|
||||||
return BaseResult.getFailureMessageEntity("请先传递存储字段");
|
return BaseResult.getFailureMessageEntity("请先传递存储字段");
|
||||||
}
|
}
|
||||||
if(entity.getId().contains(",")){
|
if (entity.getId().contains(",")) {
|
||||||
String[] strArray = entity.getId().split(","); // 使用逗号和空格作为分隔符
|
String[] strArray = entity.getId().split(","); // 使用逗号和空格作为分隔符
|
||||||
entity.setIds(strArray);
|
entity.setIds(strArray);
|
||||||
List<HashMap<String, Object>> mapList = mdmModuleDao.queryTemplateDataMore(entity);
|
List<HashMap<String, Object>> mapList = mdmModuleDao.queryTemplateDataMore(entity);
|
||||||
|
@ -1981,9 +1990,9 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
List<HashMap<String, Object>> returnList = new ArrayList<>();
|
List<HashMap<String, Object>> returnList = new ArrayList<>();
|
||||||
return BaseResult.getSuccessMessageEntity("查询数据成功", returnList);
|
return BaseResult.getSuccessMessageEntity("查询数据成功", returnList);
|
||||||
}
|
}
|
||||||
List<HashMap<String, Object>> returnList = gettochilder(strArray,0,mapList);
|
List<HashMap<String, Object>> returnList = gettochilder(strArray, 0, mapList);
|
||||||
return BaseResult.getSuccessMessageEntity("查询数据成功", returnList);
|
return BaseResult.getSuccessMessageEntity("查询数据成功", returnList);
|
||||||
}else {
|
} else {
|
||||||
HashMap<String, Object> mapList = mdmModuleDao.queryTemplateDataOne(entity);
|
HashMap<String, Object> mapList = mdmModuleDao.queryTemplateDataOne(entity);
|
||||||
if (mapList == null || mapList.size() == 0) {
|
if (mapList == null || mapList.size() == 0) {
|
||||||
List<HashMap<String, Object>> returnList = new ArrayList<>();
|
List<HashMap<String, Object>> returnList = new ArrayList<>();
|
||||||
|
@ -1993,7 +2002,7 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
returnList.add(mapList);
|
returnList.add(mapList);
|
||||||
return BaseResult.getSuccessMessageEntity("查询数据成功", returnList);
|
return BaseResult.getSuccessMessageEntity("查询数据成功", returnList);
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
List<HashMap<String, Object>> mapList = mdmModuleDao.queryDataAll(entity);
|
List<HashMap<String, Object>> mapList = mdmModuleDao.queryDataAll(entity);
|
||||||
List<HashMap<String, Object>> returnList = new ArrayList<>();
|
List<HashMap<String, Object>> returnList = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -2013,16 +2022,16 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return BaseResult.getSuccessMessageEntity("查询数据成功",returnList);
|
return BaseResult.getSuccessMessageEntity("查询数据成功", returnList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<HashMap<String, Object>> gettochilder(String[] strArray, int i, List<HashMap<String, Object>> mapList) {
|
private List<HashMap<String, Object>> gettochilder(String[] strArray, int i, List<HashMap<String, Object>> mapList) {
|
||||||
List<HashMap<String, Object>> maps = new ArrayList<>();
|
List<HashMap<String, Object>> maps = new ArrayList<>();
|
||||||
for (int i1 = 0; i1 < mapList.size(); i1++) {
|
for (int i1 = 0; i1 < mapList.size(); i1++) {
|
||||||
if(strArray[i].equals(mapList.get(i1).get("id").toString())){
|
if (strArray[i].equals(mapList.get(i1).get("id").toString())) {
|
||||||
if(strArray.length >= (i+2) ) {
|
if (strArray.length >= (i + 2)) {
|
||||||
mapList.get(i1).put("children",gettochilder(strArray,i+1,mapList));
|
mapList.get(i1).put("children", gettochilder(strArray, i + 1, mapList));
|
||||||
}
|
}
|
||||||
maps.add(mapList.get(i1));
|
maps.add(mapList.get(i1));
|
||||||
break;
|
break;
|
||||||
|
@ -2060,7 +2069,7 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
for (int i = 0; i < mapList.size(); i++) {
|
for (int i = 0; i < mapList.size(); i++) {
|
||||||
//等于上级id的时候
|
//等于上级id的时候
|
||||||
if (stringObjectHashMap.equals(mapList.get(i).get(entity.getUpId()))) {
|
if (stringObjectHashMap.equals(mapList.get(i).get(entity.getUpId()))) {
|
||||||
List<HashMap<String, Object>> children = getchilder(mapList.get(i).get(entity.getUpId())+","+mapList.get(i).get("qsdfg"), mapList, entity);
|
List<HashMap<String, Object>> children = getchilder(mapList.get(i).get(entity.getUpId()) + "," + mapList.get(i).get("qsdfg"), mapList, entity);
|
||||||
HashMap<String, Object> re = new HashMap<>();
|
HashMap<String, Object> re = new HashMap<>();
|
||||||
re.put("id", mapList.get(i).get("qsdfg"));
|
re.put("id", mapList.get(i).get("qsdfg"));
|
||||||
re.put("label", mapList.get(i).get(entity.getLabel()));
|
re.put("label", mapList.get(i).get(entity.getLabel()));
|
||||||
|
@ -2074,6 +2083,7 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
}
|
}
|
||||||
return returnList;
|
return returnList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param object
|
* @param object
|
||||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
|
@ -2168,7 +2178,7 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
for (int i1 = 0; i1 < mdmModuleDbFiledsEntityList.size(); i1++) {
|
for (int i1 = 0; i1 < mdmModuleDbFiledsEntityList.size(); i1++) {
|
||||||
if (mdmModuleDbEntityList.get(i).getId().equals(mdmModuleDbFiledsEntityList.get(i1).getDbId())) {
|
if (mdmModuleDbEntityList.get(i).getId().equals(mdmModuleDbFiledsEntityList.get(i1).getDbId())) {
|
||||||
for (int b = 0; b < mdmModuleViewDetailEntityList.size(); b++) {
|
for (int b = 0; b < mdmModuleViewDetailEntityList.size(); b++) {
|
||||||
if(mdmModuleViewDetailEntityList.get(b).getViewFiled().equals(mdmModuleDbFiledsEntityList.get(i1).getId())){
|
if (mdmModuleViewDetailEntityList.get(b).getViewFiled().equals(mdmModuleDbFiledsEntityList.get(i1).getId())) {
|
||||||
mainMdmModuleDbFileds.add(mdmModuleDbFiledsEntityList.get(i1));
|
mainMdmModuleDbFileds.add(mdmModuleDbFiledsEntityList.get(i1));
|
||||||
List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRules = new ArrayList<>();
|
List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRules = new ArrayList<>();
|
||||||
//循环字段属性
|
//循环字段属性
|
||||||
|
@ -2195,7 +2205,7 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
for (int i1 = 0; i1 < mdmModuleDbFiledsEntityList.size(); i1++) {
|
for (int i1 = 0; i1 < mdmModuleDbFiledsEntityList.size(); i1++) {
|
||||||
if (mdmModuleDbEntityList.get(i).getId().equals(mdmModuleDbFiledsEntityList.get(i1).getDbId())) {
|
if (mdmModuleDbEntityList.get(i).getId().equals(mdmModuleDbFiledsEntityList.get(i1).getDbId())) {
|
||||||
for (int b = 0; b < mdmModuleViewDetailEntityList.size(); b++) {
|
for (int b = 0; b < mdmModuleViewDetailEntityList.size(); b++) {
|
||||||
if(mdmModuleViewDetailEntityList.get(b).getViewFiled().equals(mdmModuleDbFiledsEntityList.get(i1).getId())){
|
if (mdmModuleViewDetailEntityList.get(b).getViewFiled().equals(mdmModuleDbFiledsEntityList.get(i1).getId())) {
|
||||||
sublistMdmModuleDbFileds.add(mdmModuleDbFiledsEntityList.get(i1));
|
sublistMdmModuleDbFileds.add(mdmModuleDbFiledsEntityList.get(i1));
|
||||||
List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRules = new ArrayList<>();
|
List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRules = new ArrayList<>();
|
||||||
//循环字段属性
|
//循环字段属性
|
||||||
|
@ -2221,14 +2231,14 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
mdmViewVo.setMainMdmModuleDb(mainMdmModuleDb);
|
mdmViewVo.setMainMdmModuleDb(mainMdmModuleDb);
|
||||||
//主数据子表
|
//主数据子表
|
||||||
List<MdmModuleDbEntity> mdmModuleDb = new ArrayList<>();
|
List<MdmModuleDbEntity> mdmModuleDb = new ArrayList<>();
|
||||||
if(sublistMdmModuleDb != null && sublistMdmModuleDb.size() > 0){
|
if (sublistMdmModuleDb != null && sublistMdmModuleDb.size() > 0) {
|
||||||
for (int i = 0; i < sublistMdmModuleDb.size(); i++) {
|
for (int i = 0; i < sublistMdmModuleDb.size(); i++) {
|
||||||
if(sublistMdmModuleDb.get(i).getSublistMdmModuleDbFileds() != null && sublistMdmModuleDb.get(i).getSublistMdmModuleDbFileds().size() > 0 ){
|
if (sublistMdmModuleDb.get(i).getSublistMdmModuleDbFileds() != null && sublistMdmModuleDb.get(i).getSublistMdmModuleDbFileds().size() > 0) {
|
||||||
mdmModuleDb.add(sublistMdmModuleDb.get(i));
|
mdmModuleDb.add(sublistMdmModuleDb.get(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if("5".equals(showType)){
|
if ("5".equals(showType)) {
|
||||||
MdmModuleDbEntity mdmModuleDbEntity = new MdmModuleDbEntity();
|
MdmModuleDbEntity mdmModuleDbEntity = new MdmModuleDbEntity();
|
||||||
mdmModuleDbEntity.setDbName(mainMdmModuleDb.getDbName() + "_distribute");
|
mdmModuleDbEntity.setDbName(mainMdmModuleDb.getDbName() + "_distribute");
|
||||||
mdmModuleDbEntity.setRemark(mainMdmModuleDb.getRemark() + "分发表");
|
mdmModuleDbEntity.setRemark(mainMdmModuleDb.getRemark() + "分发表");
|
||||||
|
@ -2240,7 +2250,6 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
mdmViewVo.setSublistMdmModuleDb(mdmModuleDb);
|
mdmViewVo.setSublistMdmModuleDb(mdmModuleDb);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
mdmViewVo.setMainMdmModuleDb(mainMdmModuleDb);
|
mdmViewVo.setMainMdmModuleDb(mainMdmModuleDb);
|
||||||
mdmViewVo.setSublistMdmModuleDb(sublistMdmModuleDb);
|
mdmViewVo.setSublistMdmModuleDb(sublistMdmModuleDb);
|
||||||
|
@ -2346,7 +2355,6 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
mdmModuleDbFiledsEntityList.add(statusFiled);
|
mdmModuleDbFiledsEntityList.add(statusFiled);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//msg
|
//msg
|
||||||
MdmModuleDbFiledsEntity msgFiled = new MdmModuleDbFiledsEntity();
|
MdmModuleDbFiledsEntity msgFiled = new MdmModuleDbFiledsEntity();
|
||||||
msgFiled.setChName("描述");
|
msgFiled.setChName("描述");
|
||||||
|
@ -2468,25 +2476,25 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
//查询数据
|
//查询数据
|
||||||
Map<String, Object> queryData = new HashMap<>();
|
Map<String, Object> queryData = new HashMap<>();
|
||||||
queryData.put("tableName", mdmModuleDbEntityList.get(i).getDbName());//表名
|
queryData.put("tableName", mdmModuleDbEntityList.get(i).getDbName());//表名
|
||||||
if("1".equals(mdmModuleDbEntityList.get(i).getDbType())){
|
if ("1".equals(mdmModuleDbEntityList.get(i).getDbType())) {
|
||||||
queryData.put("detailFlag", false);//是否明细
|
queryData.put("detailFlag", false);//是否明细
|
||||||
queryData.put("id", entity.getId());//字段
|
queryData.put("id", entity.getId());//字段
|
||||||
HashMap<String, Object> datas = mdmModuleDbDao.getServiceDataById(queryData);
|
HashMap<String, Object> datas = mdmModuleDbDao.getServiceDataById(queryData);
|
||||||
jsonObject.put(mdmModuleDbEntityList.get(i).getDbName(),datas);
|
jsonObject.put(mdmModuleDbEntityList.get(i).getDbName(), datas);
|
||||||
tablename = mdmModuleDbEntityList.get(i).getDbName()+"_distribute";
|
tablename = mdmModuleDbEntityList.get(i).getDbName() + "_distribute";
|
||||||
}else {
|
} else {
|
||||||
queryData.put("detailFlag", true);//是否明细
|
queryData.put("detailFlag", true);//是否明细
|
||||||
queryData.put("id", entity.getId());//字段
|
queryData.put("id", entity.getId());//字段
|
||||||
List<HashMap<String, Object>> datas = mdmModuleDbDao.getServiceByFormmainId(queryData);
|
List<HashMap<String, Object>> datas = mdmModuleDbDao.getServiceByFormmainId(queryData);
|
||||||
jsonObject.put(mdmModuleDbEntityList.get(i).getDbName(),datas);
|
jsonObject.put(mdmModuleDbEntityList.get(i).getDbName(), datas);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(tablename != null && !"".equals(tablename)){
|
if (tablename != null && !"".equals(tablename)) {
|
||||||
Map<String, Object> queryData = new HashMap<>();
|
Map<String, Object> queryData = new HashMap<>();
|
||||||
queryData.put("tableName", tablename);//表名
|
queryData.put("tableName", tablename);//表名
|
||||||
queryData.put("id", entity.getId());//字段
|
queryData.put("id", entity.getId());//字段
|
||||||
List<HashMap<String, Object>> datas = mdmModuleDbDao.getServiceByDistributeId(queryData);
|
List<HashMap<String, Object>> datas = mdmModuleDbDao.getServiceByDistributeId(queryData);
|
||||||
jsonObject.put(tablename,datas);
|
jsonObject.put(tablename, datas);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2494,7 +2502,6 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param object
|
* @param object
|
||||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
|
@ -2529,7 +2536,7 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
if (mdmModuleDbEntityList == null || mdmModuleDbEntityList.size() == 0) {
|
if (mdmModuleDbEntityList == null || mdmModuleDbEntityList.size() == 0) {
|
||||||
return BaseResult.getFailureMessageEntity("系统错误");
|
return BaseResult.getFailureMessageEntity("系统错误");
|
||||||
}
|
}
|
||||||
String res = checkDataOnly(jsonObject.getInteger("mdmCode"),saveData,true,mdmModuleEntity,mdmModuleDbEntityList);
|
String res = checkDataOnly(jsonObject.getInteger("mdmCode"), saveData, true, mdmModuleEntity, mdmModuleDbEntityList);
|
||||||
|
|
||||||
if (res == null || "".equals(res)) {
|
if (res == null || "".equals(res)) {
|
||||||
return BaseResult.getSuccessMessageEntity("修改数据成功");
|
return BaseResult.getSuccessMessageEntity("修改数据成功");
|
||||||
|
@ -2539,7 +2546,6 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param object
|
* @param object
|
||||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
|
@ -2574,7 +2580,7 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
if (mdmModuleDbEntityList == null || mdmModuleDbEntityList.size() == 0) {
|
if (mdmModuleDbEntityList == null || mdmModuleDbEntityList.size() == 0) {
|
||||||
return BaseResult.getFailureMessageEntity("系统错误");
|
return BaseResult.getFailureMessageEntity("系统错误");
|
||||||
}
|
}
|
||||||
String res = checkDataOnly(jsonObject.getInteger("mdmCode"),saveData,false,mdmModuleEntity,mdmModuleDbEntityList);
|
String res = checkDataOnly(jsonObject.getInteger("mdmCode"), saveData, false, mdmModuleEntity, mdmModuleDbEntityList);
|
||||||
|
|
||||||
if (res == null || "".equals(res)) {
|
if (res == null || "".equals(res)) {
|
||||||
return BaseResult.getSuccessMessageEntity("保存数据成功");
|
return BaseResult.getSuccessMessageEntity("保存数据成功");
|
||||||
|
@ -2637,8 +2643,8 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
formmainDeleteDto.setId(jsonObject.getString("id"));
|
formmainDeleteDto.setId(jsonObject.getString("id"));
|
||||||
formmainDeleteDto.setLoginId(StpUtil.getLoginIdAsString());
|
formmainDeleteDto.setLoginId(StpUtil.getLoginIdAsString());
|
||||||
formmainDeleteDto.setTableName(mdmModuleDbEntityList.get(i).getDbName());
|
formmainDeleteDto.setTableName(mdmModuleDbEntityList.get(i).getDbName());
|
||||||
if(mdmModuleViewEntity != null && mdmModuleViewEntity.getViewName() != null && "1".equals(mdmModuleViewEntity.getViewName() ) &&
|
if (mdmModuleViewEntity != null && mdmModuleViewEntity.getViewName() != null && "1".equals(mdmModuleViewEntity.getViewName()) &&
|
||||||
mdmModuleViewEntity.getUpIdFiled() != null && !"".equals(mdmModuleViewEntity.getUpIdFiled() )){
|
mdmModuleViewEntity.getUpIdFiled() != null && !"".equals(mdmModuleViewEntity.getUpIdFiled())) {
|
||||||
formmainDeleteDto.setUpIdFiled(mdmModuleViewEntity.getUpIdFiled());
|
formmainDeleteDto.setUpIdFiled(mdmModuleViewEntity.getUpIdFiled());
|
||||||
|
|
||||||
Map<String, Object> queryData = new HashMap<>();
|
Map<String, Object> queryData = new HashMap<>();
|
||||||
|
@ -2647,19 +2653,19 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
queryData.put("id", jsonObject.getString("id"));//字段
|
queryData.put("id", jsonObject.getString("id"));//字段
|
||||||
HashMap<String, Object> datas = mdmModuleDbDao.getServiceDataById(queryData);
|
HashMap<String, Object> datas = mdmModuleDbDao.getServiceDataById(queryData);
|
||||||
String upValue = null;
|
String upValue = null;
|
||||||
if(datas != null && datas.get(mdmModuleViewEntity.getUpIdFiled()) != null){
|
if (datas != null && datas.get(mdmModuleViewEntity.getUpIdFiled()) != null) {
|
||||||
upValue = datas.get(mdmModuleViewEntity.getUpIdFiled()).toString();
|
upValue = datas.get(mdmModuleViewEntity.getUpIdFiled()).toString();
|
||||||
}
|
}
|
||||||
if(upValue != null ){
|
if (upValue != null) {
|
||||||
formmainDeleteDto.setUpIdFiledValue(upValue+","+jsonObject.getString("id"));
|
formmainDeleteDto.setUpIdFiledValue(upValue + "," + jsonObject.getString("id"));
|
||||||
}else {
|
} else {
|
||||||
formmainDeleteDto.setUpIdFiledValue(jsonObject.getString("id"));
|
formmainDeleteDto.setUpIdFiledValue(jsonObject.getString("id"));
|
||||||
}
|
}
|
||||||
mdmModuleDao.deleteChilder(formmainDeleteDto);
|
mdmModuleDao.deleteChilder(formmainDeleteDto);
|
||||||
}
|
}
|
||||||
mdmModuleDao.deleteTemplateById(formmainDeleteDto);
|
mdmModuleDao.deleteTemplateById(formmainDeleteDto);
|
||||||
|
|
||||||
}else {
|
} else {
|
||||||
//删除明细
|
//删除明细
|
||||||
FormmainDeleteDto formmainDeleteDto = new FormmainDeleteDto();
|
FormmainDeleteDto formmainDeleteDto = new FormmainDeleteDto();
|
||||||
formmainDeleteDto.setFormmain_id(jsonObject.getString("id"));
|
formmainDeleteDto.setFormmain_id(jsonObject.getString("id"));
|
||||||
|
@ -2672,7 +2678,6 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param object
|
* @param object
|
||||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
|
@ -2696,36 +2701,152 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
if (!checkData(jsonObject, "dataType")) {
|
if (!checkData(jsonObject, "dataType")) {
|
||||||
return BaseResult.getFailureMessageEntity("请先传递要删除的数据");
|
return BaseResult.getFailureMessageEntity("请先传递要删除的数据");
|
||||||
}
|
}
|
||||||
//TODO 后续完成下发或者删除业务
|
if("2".equals(jsonObject.getString("dataType"))){
|
||||||
|
boolean flag = false;
|
||||||
//1、根据服务名查询分发数据
|
//1、根据服务名查询分发数据
|
||||||
MdmModuleEntity mdmModuleEntity = new MdmModuleEntity();
|
MdmModuleEntity mdmModuleEntity = new MdmModuleEntity();
|
||||||
mdmModuleEntity.setMdmCode(jsonObject.getInteger("mdmCode"));
|
mdmModuleEntity.setMdmCode(jsonObject.getInteger("mdmCode"));
|
||||||
mdmModuleEntity.setSts("Y");
|
mdmModuleEntity.setSts("Y");
|
||||||
List<MdmModuleEntity> mdmModuleEntities = mdmModuleDao.queryBase(mdmModuleEntity);
|
List<MdmModuleEntity> mdmModuleEntities = mdmModuleDao.queryBase(mdmModuleEntity);
|
||||||
//if()
|
if (mdmModuleEntities != null && mdmModuleEntities.size() == 1) {
|
||||||
|
MdmModuleDbEntity mdmModuleDbEntity = new MdmModuleDbEntity();
|
||||||
|
mdmModuleDbEntity.setMdmId(mdmModuleEntities.get(0).getId());
|
||||||
|
mdmModuleDbEntity.setDbType("1");
|
||||||
|
mdmModuleDbEntity.setSts("Y");
|
||||||
|
List<MdmModuleDbEntity> mdmModuleDbEntities = mdmModuleDbDao.queryBase(mdmModuleDbEntity);
|
||||||
|
if (mdmModuleDbEntities != null && mdmModuleDbEntities.size() == 1) {
|
||||||
|
mdmModuleDbEntity = mdmModuleDbEntities.get(0);
|
||||||
|
}
|
||||||
MdmModuleDistributeEntity mdmModuleDistributeEntity = new MdmModuleDistributeEntity();
|
MdmModuleDistributeEntity mdmModuleDistributeEntity = new MdmModuleDistributeEntity();
|
||||||
//mdmModuleDistributeEntity
|
mdmModuleDistributeEntity.setAppId(jsonObject.getString("appID"));
|
||||||
//mdmModuleDistributeDao.
|
mdmModuleDistributeEntity.setMdmId(mdmModuleEntities.get(0).getId());
|
||||||
|
List<MdmModuleDistributeEntity> mdmModuleDistributeEntities = mdmModuleDistributeDao.queryBase(mdmModuleDistributeEntity);
|
||||||
|
if (mdmModuleDistributeEntities != null && mdmModuleDistributeEntities.size() == 1) {
|
||||||
|
if (mdmModuleDistributeEntities.get(0).getAddType() != null && "1".equals(mdmModuleDistributeEntities.get(0).getAddType())) {
|
||||||
//2、查找插件
|
//2、查找插件
|
||||||
|
if (mdmModuleDistributeEntities.get(0).getAddPlug() != null && !"".equals(mdmModuleDistributeEntities.get(0).getAddPlug())) {
|
||||||
|
//2、查找插件
|
||||||
|
SysApplicationPluginEntity sysApplicationPluginEntity = sysApplicationPluginDao.get(mdmModuleDistributeEntities.get(0).getAddPlug());
|
||||||
|
if(sysApplicationPluginEntity.getPluginCode() != null && !"".equals(sysApplicationPluginEntity.getPluginCode())){
|
||||||
//3、调用插件
|
//3、调用插件
|
||||||
//PluginBaseEntity pluginBaseEntity = PluginUtils.getPluginsById(jsonObjectStr.getString("plug_id"));
|
PluginBaseEntity pluginBaseEntity = PluginUtils.getPluginsById(sysApplicationPluginEntity.getPluginCode());
|
||||||
//JsonResultEntity s = pluginBaseEntity.executeBusiness(jsonObjectStr);
|
try {
|
||||||
|
JsonResultEntity s = pluginBaseEntity.executeBusiness(jsonObject);
|
||||||
|
flag = true;
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("插件处理失败"+e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//TODO 连线
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(mdmModuleDbEntity.getDbName()!= null && !"".equals(mdmModuleDbEntity.getDbName())) {
|
||||||
|
MdmDistributeEntity mdmDistributeEntity = new MdmDistributeEntity();
|
||||||
|
mdmDistributeEntity.setCreate();
|
||||||
|
mdmDistributeEntity.setTableName(mdmModuleDbEntity.getDbName()+"_distribute");
|
||||||
|
mdmDistributeEntity.setFormmainId(jsonObject.getString("id"));
|
||||||
|
mdmDistributeEntity.setAppId(jsonObject.getString("appID"));
|
||||||
|
mdmDistributeEntity.setStatus("1");
|
||||||
|
mdmDistributeEntity.setMsg("发送成功");
|
||||||
|
if (!flag) {
|
||||||
|
mdmDistributeEntity.setStatus("3");
|
||||||
|
mdmDistributeEntity.setMsg("发送失败");
|
||||||
|
}
|
||||||
|
mdmModuleDao.saveDistribute(mdmDistributeEntity);
|
||||||
|
return BaseResult.getSuccessMessageEntity("下发数据成功");
|
||||||
|
|
||||||
|
}else {
|
||||||
|
return BaseResult.getFailureMessageEntity("系统错误");
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
return BaseResult.getFailureMessageEntity("系统错误");
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (!checkData(jsonObject, "distributeID")) {
|
||||||
|
return BaseResult.getFailureMessageEntity("请先传递分发数据");
|
||||||
|
}
|
||||||
|
boolean flag = false;
|
||||||
|
//1、根据服务名查询分发数据
|
||||||
|
MdmModuleEntity mdmModuleEntity = new MdmModuleEntity();
|
||||||
|
mdmModuleEntity.setMdmCode(jsonObject.getInteger("mdmCode"));
|
||||||
|
mdmModuleEntity.setSts("Y");
|
||||||
|
List<MdmModuleEntity> mdmModuleEntities = mdmModuleDao.queryBase(mdmModuleEntity);
|
||||||
|
if (mdmModuleEntities != null && mdmModuleEntities.size() == 1) {
|
||||||
|
MdmModuleDbEntity mdmModuleDbEntity = new MdmModuleDbEntity();
|
||||||
|
mdmModuleDbEntity.setMdmId(mdmModuleEntities.get(0).getId());
|
||||||
|
mdmModuleDbEntity.setDbType("1");
|
||||||
|
mdmModuleDbEntity.setSts("Y");
|
||||||
|
List<MdmModuleDbEntity> mdmModuleDbEntities = mdmModuleDbDao.queryBase(mdmModuleDbEntity);
|
||||||
|
if (mdmModuleDbEntities != null && mdmModuleDbEntities.size() == 1) {
|
||||||
|
mdmModuleDbEntity = mdmModuleDbEntities.get(0);
|
||||||
|
}
|
||||||
|
MdmModuleDistributeEntity mdmModuleDistributeEntity = new MdmModuleDistributeEntity();
|
||||||
|
mdmModuleDistributeEntity.setAppId(jsonObject.getString("appID"));
|
||||||
|
mdmModuleDistributeEntity.setMdmId(mdmModuleEntities.get(0).getId());
|
||||||
|
List<MdmModuleDistributeEntity> mdmModuleDistributeEntities = mdmModuleDistributeDao.queryBase(mdmModuleDistributeEntity);
|
||||||
|
if (mdmModuleDistributeEntities != null && mdmModuleDistributeEntities.size() == 1) {
|
||||||
|
if (mdmModuleDistributeEntities.get(0).getDeleteType() != null && "1".equals(mdmModuleDistributeEntities.get(0).getDeleteType())) {
|
||||||
|
//2、查找插件
|
||||||
|
if (mdmModuleDistributeEntities.get(0).getDeletePlug() != null && !"".equals(mdmModuleDistributeEntities.get(0).getDeletePlug())) {
|
||||||
|
//2、查找插件
|
||||||
|
SysApplicationPluginEntity sysApplicationPluginEntity = sysApplicationPluginDao.get(mdmModuleDistributeEntities.get(0).getDeletePlug());
|
||||||
|
if(sysApplicationPluginEntity.getPluginCode() != null && !"".equals(sysApplicationPluginEntity.getPluginCode())){
|
||||||
|
//3、调用插件
|
||||||
|
PluginBaseEntity pluginBaseEntity = PluginUtils.getPluginsById(sysApplicationPluginEntity.getPluginCode());
|
||||||
|
try {
|
||||||
|
JsonResultEntity s = pluginBaseEntity.executeBusiness(jsonObject);
|
||||||
|
flag = true;
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("插件处理失败"+e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//TODO 连线
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(mdmModuleDbEntity.getDbName()!= null && !"".equals(mdmModuleDbEntity.getDbName())) {
|
||||||
|
//删除数据
|
||||||
|
MdmDistributeEntity mdmDistributeEntity = new MdmDistributeEntity();
|
||||||
|
mdmDistributeEntity.setId(jsonObject.getString("distributeID"));
|
||||||
|
mdmDistributeEntity.setTableName(mdmModuleDbEntity.getDbName()+"_distribute");
|
||||||
|
mdmDistributeEntity.setFormmainId(jsonObject.getString("id"));
|
||||||
|
mdmDistributeEntity.setAppId(jsonObject.getString("appID"));
|
||||||
|
mdmDistributeEntity.setStatus("1");
|
||||||
|
mdmDistributeEntity.setMsg("删除成功");
|
||||||
|
if (!flag) {
|
||||||
|
mdmDistributeEntity.setStatus("3");
|
||||||
|
mdmDistributeEntity.setMsg("删除失败");
|
||||||
|
}
|
||||||
|
mdmModuleDao.updateDistribute(mdmDistributeEntity);
|
||||||
|
return BaseResult.getSuccessMessageEntity("删除数据成功");
|
||||||
|
|
||||||
|
}else {
|
||||||
|
return BaseResult.getFailureMessageEntity("系统错误");
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
return BaseResult.getFailureMessageEntity("系统错误");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return BaseResult.getSuccessMessageEntity("处理分发数据成功");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author lvleigang
|
|
||||||
* @Description 校验数据
|
|
||||||
* @Date 11:20 上午 2023/11/6
|
|
||||||
* @param mdmCode
|
* @param mdmCode
|
||||||
* @param saveData
|
* @param saveData
|
||||||
* @param mdmModuleEntity
|
* @param mdmModuleEntity
|
||||||
* @param mdmModuleDbEntityList
|
* @param mdmModuleDbEntityList
|
||||||
* @param flag 修改 新增
|
* @param flag 修改 新增
|
||||||
* @return java.lang.String
|
* @return java.lang.String
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 校验数据
|
||||||
|
* @Date 11:20 上午 2023/11/6
|
||||||
**/
|
**/
|
||||||
private String checkDataOnly(Integer mdmCode, JSONObject saveData,boolean flag,MdmModuleEntity mdmModuleEntity,List<MdmModuleDbEntity> mdmModuleDbEntityList) {
|
private String checkDataOnly(Integer mdmCode, JSONObject saveData, boolean flag, MdmModuleEntity mdmModuleEntity, List<MdmModuleDbEntity> mdmModuleDbEntityList) {
|
||||||
StringBuffer str = new StringBuffer();
|
StringBuffer str = new StringBuffer();
|
||||||
|
|
||||||
//查询字段
|
//查询字段
|
||||||
|
@ -2737,32 +2858,32 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
mdmModuleDbFiledsEntity.setRoleValue("true");
|
mdmModuleDbFiledsEntity.setRoleValue("true");
|
||||||
List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntityList = mdmModuleDbFiledsDao.queryBase(mdmModuleDbFiledsEntity);
|
List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntityList = mdmModuleDbFiledsDao.queryBase(mdmModuleDbFiledsEntity);
|
||||||
|
|
||||||
if(mdmModuleDbFiledsEntityList != null && mdmModuleDbFiledsEntityList.size() > 0){
|
if (mdmModuleDbFiledsEntityList != null && mdmModuleDbFiledsEntityList.size() > 0) {
|
||||||
for (int i = 0; i < mdmModuleDbEntityList.size(); i++) {
|
for (int i = 0; i < mdmModuleDbEntityList.size(); i++) {
|
||||||
if ("1".equals(mdmModuleDbEntityList.get(i).getDbType())) {
|
if ("1".equals(mdmModuleDbEntityList.get(i).getDbType())) {
|
||||||
JSONObject jsonObject = saveData.getJSONObject(mdmModuleDbEntityList.get(i).getDbName());
|
JSONObject jsonObject = saveData.getJSONObject(mdmModuleDbEntityList.get(i).getDbName());
|
||||||
for (int i1 = 0; i1 < mdmModuleDbFiledsEntityList.size(); i1++) {
|
for (int i1 = 0; i1 < mdmModuleDbFiledsEntityList.size(); i1++) {
|
||||||
if(mdmModuleDbFiledsEntityList.get(i1).getDbId().equals(mdmModuleDbEntityList.get(i).getId())){
|
if (mdmModuleDbFiledsEntityList.get(i1).getDbId().equals(mdmModuleDbEntityList.get(i).getId())) {
|
||||||
if(jsonObject.get(mdmModuleDbFiledsEntityList.get(i1).getEnName()) == null || "".equals(jsonObject.getString(mdmModuleDbFiledsEntityList.get(i1).getEnName()))){
|
if (jsonObject.get(mdmModuleDbFiledsEntityList.get(i1).getEnName()) == null || "".equals(jsonObject.getString(mdmModuleDbFiledsEntityList.get(i1).getEnName()))) {
|
||||||
if(str.toString() != null && !"".equals(str.toString())){
|
if (str.toString() != null && !"".equals(str.toString())) {
|
||||||
str.append(";");
|
str.append(";");
|
||||||
}
|
}
|
||||||
str.append(mdmModuleDbEntityList.get(i).getRemark()+"的"+mdmModuleDbFiledsEntityList.get(i1).getChName()+"不为空");
|
str.append(mdmModuleDbEntityList.get(i).getRemark() + "的" + mdmModuleDbFiledsEntityList.get(i1).getChName() + "不为空");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
JSONArray jsonArray = saveData.getJSONArray(mdmModuleDbEntityList.get(i).getDbName());
|
JSONArray jsonArray = saveData.getJSONArray(mdmModuleDbEntityList.get(i).getDbName());
|
||||||
if(jsonArray != null && jsonArray.size() > 0){
|
if (jsonArray != null && jsonArray.size() > 0) {
|
||||||
for (int i1 = 0; i1 < mdmModuleDbFiledsEntityList.size(); i1++) {
|
for (int i1 = 0; i1 < mdmModuleDbFiledsEntityList.size(); i1++) {
|
||||||
if(mdmModuleDbFiledsEntityList.get(i1).getDbId().equals(mdmModuleDbEntityList.get(i).getId())){
|
if (mdmModuleDbFiledsEntityList.get(i1).getDbId().equals(mdmModuleDbEntityList.get(i).getId())) {
|
||||||
for (int i2 = 0; i2 < jsonArray.size(); i2++) {
|
for (int i2 = 0; i2 < jsonArray.size(); i2++) {
|
||||||
JSONObject jsonObject = jsonArray.getJSONObject(i2);
|
JSONObject jsonObject = jsonArray.getJSONObject(i2);
|
||||||
if(jsonObject.get(mdmModuleDbFiledsEntityList.get(i1).getEnName()) == null || "".equals(jsonObject.getString(mdmModuleDbFiledsEntityList.get(i1).getEnName()))){
|
if (jsonObject.get(mdmModuleDbFiledsEntityList.get(i1).getEnName()) == null || "".equals(jsonObject.getString(mdmModuleDbFiledsEntityList.get(i1).getEnName()))) {
|
||||||
if(str.toString() != null && !"".equals(str.toString())){
|
if (str.toString() != null && !"".equals(str.toString())) {
|
||||||
str.append(";");
|
str.append(";");
|
||||||
}
|
}
|
||||||
str.append(mdmModuleDbEntityList.get(i).getRemark()+"的"+mdmModuleDbFiledsEntityList.get(i1).getChName()+"不为空");
|
str.append(mdmModuleDbEntityList.get(i).getRemark() + "的" + mdmModuleDbFiledsEntityList.get(i1).getChName() + "不为空");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2783,51 +2904,51 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
|
|
||||||
List<MdmModuleDbFiledsEntity> onlyEntityList = mdmModuleDbFiledsDao.queryBase(onlyFiledsEntity);
|
List<MdmModuleDbFiledsEntity> onlyEntityList = mdmModuleDbFiledsDao.queryBase(onlyFiledsEntity);
|
||||||
|
|
||||||
if(onlyEntityList != null && onlyEntityList.size() > 0){
|
if (onlyEntityList != null && onlyEntityList.size() > 0) {
|
||||||
for (int i = 0; i < mdmModuleDbEntityList.size(); i++) {
|
for (int i = 0; i < mdmModuleDbEntityList.size(); i++) {
|
||||||
if ("1".equals(mdmModuleDbEntityList.get(i).getDbType())) {
|
if ("1".equals(mdmModuleDbEntityList.get(i).getDbType())) {
|
||||||
JSONObject jsonObject = saveData.getJSONObject(mdmModuleDbEntityList.get(i).getDbName());
|
JSONObject jsonObject = saveData.getJSONObject(mdmModuleDbEntityList.get(i).getDbName());
|
||||||
for (int i1 = 0; i1 < onlyEntityList.size(); i1++) {
|
for (int i1 = 0; i1 < onlyEntityList.size(); i1++) {
|
||||||
if(onlyEntityList.get(i1).getDbId().equals(mdmModuleDbEntityList.get(i).getId())){
|
if (onlyEntityList.get(i1).getDbId().equals(mdmModuleDbEntityList.get(i).getId())) {
|
||||||
//校验唯一
|
//校验唯一
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
map.put("tableName",mdmModuleDbEntityList.get(i).getDbName());
|
map.put("tableName", mdmModuleDbEntityList.get(i).getDbName());
|
||||||
if(flag){
|
if (flag) {
|
||||||
map.put("id",jsonObject.getString("id"));
|
map.put("id", jsonObject.getString("id"));
|
||||||
}
|
}
|
||||||
map.put("filedName",onlyEntityList.get(i1).getEnName());
|
map.put("filedName", onlyEntityList.get(i1).getEnName());
|
||||||
map.put("filedValue",jsonObject.getString(onlyEntityList.get(i1).getEnName()));
|
map.put("filedValue", jsonObject.getString(onlyEntityList.get(i1).getEnName()));
|
||||||
Integer count = mdmModuleDao.checkData(map);
|
Integer count = mdmModuleDao.checkData(map);
|
||||||
if(count > 0){
|
if (count > 0) {
|
||||||
if(str.toString() != null && !"".equals(str.toString())){
|
if (str.toString() != null && !"".equals(str.toString())) {
|
||||||
str.append(";");
|
str.append(";");
|
||||||
}
|
}
|
||||||
str.append(mdmModuleDbEntityList.get(i).getRemark()+"的"+mdmModuleDbFiledsEntityList.get(i1).getChName()+"已存在");
|
str.append(mdmModuleDbEntityList.get(i).getRemark() + "的" + mdmModuleDbFiledsEntityList.get(i1).getChName() + "已存在");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
JSONArray jsonArray = saveData.getJSONArray(mdmModuleDbEntityList.get(i).getDbName());
|
JSONArray jsonArray = saveData.getJSONArray(mdmModuleDbEntityList.get(i).getDbName());
|
||||||
if(jsonArray != null && jsonArray.size() > 0){
|
if (jsonArray != null && jsonArray.size() > 0) {
|
||||||
for (int i1 = 0; i1 < onlyEntityList.size(); i1++) {
|
for (int i1 = 0; i1 < onlyEntityList.size(); i1++) {
|
||||||
if(onlyEntityList.get(i1).getDbId().equals(mdmModuleDbEntityList.get(i).getId())){
|
if (onlyEntityList.get(i1).getDbId().equals(mdmModuleDbEntityList.get(i).getId())) {
|
||||||
for (int i2 = 0; i2 < jsonArray.size(); i2++) {
|
for (int i2 = 0; i2 < jsonArray.size(); i2++) {
|
||||||
JSONObject jsonObject = jsonArray.getJSONObject(i2);
|
JSONObject jsonObject = jsonArray.getJSONObject(i2);
|
||||||
|
|
||||||
//校验唯一
|
//校验唯一
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
map.put("tableName",mdmModuleDbEntityList.get(i).getDbName());
|
map.put("tableName", mdmModuleDbEntityList.get(i).getDbName());
|
||||||
if(flag){
|
if (flag) {
|
||||||
map.put("id",jsonObject.getString("id"));
|
map.put("id", jsonObject.getString("id"));
|
||||||
}
|
}
|
||||||
map.put("filedName",onlyEntityList.get(i1).getEnName());
|
map.put("filedName", onlyEntityList.get(i1).getEnName());
|
||||||
map.put("filedValue",jsonObject.getString(onlyEntityList.get(i1).getEnName()));
|
map.put("filedValue", jsonObject.getString(onlyEntityList.get(i1).getEnName()));
|
||||||
Integer count = mdmModuleDao.checkData(map);
|
Integer count = mdmModuleDao.checkData(map);
|
||||||
if(count > 0){
|
if (count > 0) {
|
||||||
if(str.toString() != null && !"".equals(str.toString())){
|
if (str.toString() != null && !"".equals(str.toString())) {
|
||||||
str.append(";");
|
str.append(";");
|
||||||
}
|
}
|
||||||
str.append(mdmModuleDbEntityList.get(i).getRemark()+"的"+mdmModuleDbFiledsEntityList.get(i1).getChName()+"已存在");
|
str.append(mdmModuleDbEntityList.get(i).getRemark() + "的" + mdmModuleDbFiledsEntityList.get(i1).getChName() + "已存在");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2862,25 +2983,25 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
List<MdmTableCodeRuleEntity> mdmTableCodeRuleEntities = mdmTableCodeRuleDao.queryBase(mdmTableCodeRuleEntity);
|
List<MdmTableCodeRuleEntity> mdmTableCodeRuleEntities = mdmTableCodeRuleDao.queryBase(mdmTableCodeRuleEntity);
|
||||||
StringBuffer document_rule = new StringBuffer();
|
StringBuffer document_rule = new StringBuffer();
|
||||||
Integer document_rule_num = 0;
|
Integer document_rule_num = 0;
|
||||||
if(mdmTableCodeRuleEntities != null && mdmTableCodeRuleEntities.size() > 0){
|
if (mdmTableCodeRuleEntities != null && mdmTableCodeRuleEntities.size() > 0) {
|
||||||
for (int i1 = 0; i1 < mdmTableCodeRuleEntities.size(); i1++) {
|
for (int i1 = 0; i1 < mdmTableCodeRuleEntities.size(); i1++) {
|
||||||
//1、连接符号 2、字符串 3、日期 4、流水号
|
//1、连接符号 2、字符串 3、日期 4、流水号
|
||||||
if("1".equals(mdmTableCodeRuleEntities.get(i1).getDbType())){
|
if ("1".equals(mdmTableCodeRuleEntities.get(i1).getDbType())) {
|
||||||
document_rule.append("-");
|
document_rule.append("-");
|
||||||
}else if("2".equals(mdmTableCodeRuleEntities.get(i1).getDbType())){
|
} else if ("2".equals(mdmTableCodeRuleEntities.get(i1).getDbType())) {
|
||||||
document_rule.append(mdmTableCodeRuleEntities.get(i1).getDbValue());
|
document_rule.append(mdmTableCodeRuleEntities.get(i1).getDbValue());
|
||||||
}else if("3".equals(mdmTableCodeRuleEntities.get(i1).getDbType())){
|
} else if ("3".equals(mdmTableCodeRuleEntities.get(i1).getDbType())) {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat(mdmTableCodeRuleEntities.get(i1).getDbValue());//要转换的时间格式
|
SimpleDateFormat sdf = new SimpleDateFormat(mdmTableCodeRuleEntities.get(i1).getDbValue());//要转换的时间格式
|
||||||
String stra = sdf.format(new Date());
|
String stra = sdf.format(new Date());
|
||||||
document_rule.append(stra);
|
document_rule.append(stra);
|
||||||
}else if("4".equals(mdmTableCodeRuleEntities.get(i1).getDbType())){
|
} else if ("4".equals(mdmTableCodeRuleEntities.get(i1).getDbType())) {
|
||||||
document_rule_num = mdmTableCodeRuleEntities.get(i1).getDbValue().length();
|
document_rule_num = mdmTableCodeRuleEntities.get(i1).getDbValue().length();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<MdmDataFiledDto> mdmDataFiledDtos = new ArrayList<>();
|
List<MdmDataFiledDto> mdmDataFiledDtos = new ArrayList<>();
|
||||||
for (int i1 = 0; i1 < fileds.size(); i1++) {
|
for (int i1 = 0; i1 < fileds.size(); i1++) {
|
||||||
if(jsonObject.get(fileds.get(i1).getEnName()) != null ){
|
if (jsonObject.get(fileds.get(i1).getEnName()) != null) {
|
||||||
MdmDataFiledDto mdmDataFiledDto = new MdmDataFiledDto();
|
MdmDataFiledDto mdmDataFiledDto = new MdmDataFiledDto();
|
||||||
mdmDataFiledDto.setFiledsName(fileds.get(i1).getEnName());
|
mdmDataFiledDto.setFiledsName(fileds.get(i1).getEnName());
|
||||||
mdmDataFiledDto.setFiledsValue(jsonObject.getString(fileds.get(i1).getEnName()));
|
mdmDataFiledDto.setFiledsValue(jsonObject.getString(fileds.get(i1).getEnName()));
|
||||||
|
@ -2892,11 +3013,11 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
mdmDataFiledDto.setFiledsValue(StpUtil.getLoginIdAsString());
|
mdmDataFiledDto.setFiledsValue(StpUtil.getLoginIdAsString());
|
||||||
mdmDataFiledDtos.add(mdmDataFiledDto);
|
mdmDataFiledDtos.add(mdmDataFiledDto);
|
||||||
mdmDataDto.setMdmDataFiledDtos(mdmDataFiledDtos);
|
mdmDataDto.setMdmDataFiledDtos(mdmDataFiledDtos);
|
||||||
if(flag){
|
if (flag) {
|
||||||
mdmDataDto.setId(jsonObject.getString("id"));
|
mdmDataDto.setId(jsonObject.getString("id"));
|
||||||
id = jsonObject.getString("id");
|
id = jsonObject.getString("id");
|
||||||
int a = mdmModuleDao.updateForm(mdmDataDto);
|
int a = mdmModuleDao.updateForm(mdmDataDto);
|
||||||
}else {
|
} else {
|
||||||
|
|
||||||
mdmDataDto.setDbType(mdmModuleDbEntityList.get(i).getDbType());
|
mdmDataDto.setDbType(mdmModuleDbEntityList.get(i).getDbType());
|
||||||
mdmDataDto.setDocumentRule(document_rule.toString());
|
mdmDataDto.setDocumentRule(document_rule.toString());
|
||||||
|
@ -2921,7 +3042,7 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
mdmModuleDao.deleteTemplateById(formmainDeleteDto);
|
mdmModuleDao.deleteTemplateById(formmainDeleteDto);
|
||||||
|
|
||||||
JSONArray jsonArray = saveData.getJSONArray(mdmModuleDbEntityList.get(i).getDbName());
|
JSONArray jsonArray = saveData.getJSONArray(mdmModuleDbEntityList.get(i).getDbName());
|
||||||
if(jsonArray != null && jsonArray.size() > 0){
|
if (jsonArray != null && jsonArray.size() > 0) {
|
||||||
MdmModuleDbFiledsEntity mdmModuleDbFiledsEntity1 = new MdmModuleDbFiledsEntity();
|
MdmModuleDbFiledsEntity mdmModuleDbFiledsEntity1 = new MdmModuleDbFiledsEntity();
|
||||||
mdmModuleDbFiledsEntity1.setMdmId(mdmModuleEntity.getId());
|
mdmModuleDbFiledsEntity1.setMdmId(mdmModuleEntity.getId());
|
||||||
mdmModuleDbFiledsEntity1.setDbId(mdmModuleDbEntityList.get(i).getId());
|
mdmModuleDbFiledsEntity1.setDbId(mdmModuleDbEntityList.get(i).getId());
|
||||||
|
@ -2951,14 +3072,14 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
mdmDataFiledDtos.add(formain_id);
|
mdmDataFiledDtos.add(formain_id);
|
||||||
|
|
||||||
mdmDataDto.setMdmDataFiledDtos(mdmDataFiledDtos);
|
mdmDataDto.setMdmDataFiledDtos(mdmDataFiledDtos);
|
||||||
if(jsonObject.getString("id") != null ){
|
if (jsonObject.getString("id") != null) {
|
||||||
MdmDataFiledDto sts = new MdmDataFiledDto();
|
MdmDataFiledDto sts = new MdmDataFiledDto();
|
||||||
sts.setFiledsName("sts");
|
sts.setFiledsName("sts");
|
||||||
sts.setFiledsValue("Y");
|
sts.setFiledsValue("Y");
|
||||||
mdmDataFiledDtos.add(sts);
|
mdmDataFiledDtos.add(sts);
|
||||||
mdmDataDto.setId(jsonObject.getString("id"));
|
mdmDataDto.setId(jsonObject.getString("id"));
|
||||||
int a = mdmModuleDao.updateForm(mdmDataDto);
|
int a = mdmModuleDao.updateForm(mdmDataDto);
|
||||||
}else {
|
} else {
|
||||||
MdmDataFiledDto ids = new MdmDataFiledDto();
|
MdmDataFiledDto ids = new MdmDataFiledDto();
|
||||||
ids.setFiledsName("id");
|
ids.setFiledsName("id");
|
||||||
ids.setFiledsValue(UUIDUtils.getUUID());
|
ids.setFiledsValue(UUIDUtils.getUUID());
|
||||||
|
|
|
@ -347,4 +347,14 @@ public interface ISysApplicationService extends IBaseService<SysApplicationEntit
|
||||||
* @Date 11:52 上午 2024/3/27
|
* @Date 11:52 上午 2024/3/27
|
||||||
**/
|
**/
|
||||||
JsonResultEntity queryEntity(JSONObject jsonObject);
|
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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2193,4 +2193,28 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
||||||
List<SysApplicationEntity> list = sysApplicationDao.queryByLike(entity);
|
List<SysApplicationEntity> list = sysApplicationDao.queryByLike(entity);
|
||||||
return BaseResult.getSuccessMessageEntity("查询数据成功", list);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@ package com.hzya.frame.sysnew.buttonConfig.dao;
|
||||||
import com.hzya.frame.sysnew.buttonConfig.entity.SysButtonConfigEntity;
|
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)表数据库访问层
|
* 按钮配置表(sys_button_config: table)表数据库访问层
|
||||||
*
|
*
|
||||||
|
@ -11,5 +13,6 @@ import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
*/
|
*/
|
||||||
public interface ISysButtonConfigDao extends IBaseDao<SysButtonConfigEntity, String> {
|
public interface ISysButtonConfigDao extends IBaseDao<SysButtonConfigEntity, String> {
|
||||||
|
|
||||||
|
List<SysButtonConfigEntity> getUserButton(SysButtonConfigEntity entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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.entity.SysButtonConfigEntity;
|
||||||
import com.hzya.frame.sysnew.buttonConfig.dao.ISysButtonConfigDao;
|
import com.hzya.frame.sysnew.buttonConfig.dao.ISysButtonConfigDao;
|
||||||
|
import com.hzya.frame.sysnew.menuConfig.entity.SysMenuConfigEntity;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按钮配置表(SysButtonConfig)表数据库访问层
|
* 按钮配置表(SysButtonConfig)表数据库访问层
|
||||||
*
|
*
|
||||||
|
@ -13,5 +17,10 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
@Repository(value = "SysButtonConfigDaoImpl")
|
@Repository(value = "SysButtonConfigDaoImpl")
|
||||||
public class SysButtonConfigDaoImpl extends MybatisGenericDao<SysButtonConfigEntity, String> implements ISysButtonConfigDao{
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,8 @@ public class SysButtonConfigEntity extends BaseEntity {
|
||||||
private String remark;
|
private String remark;
|
||||||
/** 公司id */
|
/** 公司id */
|
||||||
private String companyId;
|
private String companyId;
|
||||||
|
/** 公司id */
|
||||||
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否选中
|
* 是否选中
|
||||||
|
@ -112,5 +114,13 @@ public class SysButtonConfigEntity extends BaseEntity {
|
||||||
public void setCheck(boolean check) {
|
public void setCheck(boolean check) {
|
||||||
this.check = check;
|
this.check = check;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(String userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -288,6 +288,45 @@ update sys_button_config set sts= 'N' ,modify_time = #{modify_time},modify_user
|
||||||
<delete id="entity_delete">
|
<delete id="entity_delete">
|
||||||
delete from sys_button_config where id = #{id}
|
delete from sys_button_config where id = #{id}
|
||||||
</delete>
|
</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>
|
</mapper>
|
||||||
|
|
||||||
|
|
|
@ -66,4 +66,14 @@ public interface ISysButtonConfigService extends IBaseService<SysButtonConfigEnt
|
||||||
* @Date 2:37 下午 2024/3/27
|
* @Date 2:37 下午 2024/3/27
|
||||||
**/
|
**/
|
||||||
JsonResultEntity deleteEntity(JSONObject jsonObject);
|
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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,10 @@ import com.github.pagehelper.PageInfo;
|
||||||
import com.hzya.frame.sysnew.buttonConfig.entity.SysButtonConfigEntity;
|
import com.hzya.frame.sysnew.buttonConfig.entity.SysButtonConfigEntity;
|
||||||
import com.hzya.frame.sysnew.buttonConfig.dao.ISysButtonConfigDao;
|
import com.hzya.frame.sysnew.buttonConfig.dao.ISysButtonConfigDao;
|
||||||
import com.hzya.frame.sysnew.buttonConfig.service.ISysButtonConfigService;
|
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.dao.ISysPopedomOperateDao;
|
||||||
import com.hzya.frame.sysnew.popedomOperate.entity.SysPopedomOperateEntity;
|
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.BaseResult;
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -187,4 +189,27 @@ public class SysButtonConfigServiceImpl extends BaseService<SysButtonConfigEntit
|
||||||
}
|
}
|
||||||
return true;
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,9 @@ package com.hzya.frame.sysnew.integtationTaskLivingDetails.dao;
|
||||||
|
|
||||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
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)表数据库访问层
|
* 集成任务-实例详情(integration_task_living_details: table)表数据库访问层
|
||||||
|
@ -29,5 +32,13 @@ public interface IIntegrationTaskLivingDetailsDao extends IBaseDao<IntegrationTa
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int deleteById(String id);
|
int deleteById(String id);
|
||||||
|
|
||||||
|
List<IntegrationTaskLivingDetailsVo> queryPageLeftTask(IntegrationTaskLivingDetailsVo entity);
|
||||||
|
|
||||||
|
Integer entity_updatebyid(IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity);
|
||||||
|
|
||||||
|
IntegrationTaskLivingDetailsEntity queryEntity(IntegrationTaskLivingDetailsEntity entity);
|
||||||
|
|
||||||
|
Integer deleteEntity(IntegrationTaskLivingDetailsEntity deleteEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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.entity.IntegrationTaskLivingDetailsEntity;
|
||||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsVo;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 集成任务-实例详情(IntegrationTaskLivingDetails)表数据库访问层
|
* 集成任务-实例详情(IntegrationTaskLivingDetails)表数据库访问层
|
||||||
*
|
*
|
||||||
|
@ -27,5 +31,26 @@ public class IntegrationTaskLivingDetailsDaoImpl extends MybatisGenericDao<Integ
|
||||||
public int deleteById(String id) {
|
public int deleteById(String id) {
|
||||||
return super.delete("com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.impl.IntegrationTaskLivingDetailsDaoImpl.entity_logicDelete_for_uuid",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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -543,6 +543,197 @@ update integration_task_living_details set sts= 'N' ,modify_time = #{modify_tim
|
||||||
<delete id="entity_delete">
|
<delete id="entity_delete">
|
||||||
delete from integration_task_living_details where id = #{id}
|
delete from integration_task_living_details where id = #{id}
|
||||||
</delete>
|
</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>
|
</mapper>
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -53,4 +53,61 @@ public interface IIntegrationTaskLivingDetailsService extends IBaseService<Integ
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
JsonResultEntity updateLogFailToSuccess(IntegrationTaskLivingDetailsEntity entity)throws Exception;
|
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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,39 @@
|
||||||
package com.hzya.frame.sysnew.integtationTaskLivingDetails.service.impl;
|
package com.hzya.frame.sysnew.integtationTaskLivingDetails.service.impl;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
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.entity.IntegrationTaskLivingDetailsEntity;
|
||||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
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.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
||||||
import com.hzya.frame.sysnew.integtationTaskLog.entity.IntegrationTaskLogEntity;
|
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.UUIDLong;
|
||||||
|
import com.hzya.frame.uuid.UUIDUtils;
|
||||||
import com.hzya.frame.web.entity.BaseResult;
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
import com.hzya.frame.web.exception.BaseSystemException;
|
import com.hzya.frame.web.exception.BaseSystemException;
|
||||||
|
import org.springframework.core.task.TaskExecutor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
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)表服务实现类
|
* 集成任务-实例详情(IntegrationTaskLivingDetails)表服务实现类
|
||||||
*
|
*
|
||||||
|
@ -25,7 +44,11 @@ import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
public class IntegrationTaskLivingDetailsServiceImpl extends BaseService<IntegrationTaskLivingDetailsEntity, String> implements IIntegrationTaskLivingDetailsService {
|
public class IntegrationTaskLivingDetailsServiceImpl extends BaseService<IntegrationTaskLivingDetailsEntity, String> implements IIntegrationTaskLivingDetailsService {
|
||||||
|
|
||||||
private IIntegrationTaskLivingDetailsDao integrationTaskLivingDetailsDao;
|
private IIntegrationTaskLivingDetailsDao integrationTaskLivingDetailsDao;
|
||||||
|
@Resource
|
||||||
|
private TaskExecutor taskExecutor;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BaseDaoUtilImpl baseDaoUtilImpl;
|
||||||
@Autowired
|
@Autowired
|
||||||
public void setIntegrationTaskLivingDetailsDao(IIntegrationTaskLivingDetailsDao dao) {
|
public void setIntegrationTaskLivingDetailsDao(IIntegrationTaskLivingDetailsDao dao) {
|
||||||
this.integrationTaskLivingDetailsDao = dao;
|
this.integrationTaskLivingDetailsDao = dao;
|
||||||
|
@ -194,5 +217,199 @@ public class IntegrationTaskLivingDetailsServiceImpl extends BaseService<Integra
|
||||||
// throw new BaseSystemException("推送状态不可为空,请传入");
|
// 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("删除成功");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,6 +99,7 @@ public class SysMenuConfigServiceImpl extends BaseService<SysMenuConfigEntity, S
|
||||||
moduleVo.setName(sysMenuConfigEntity.getMenuEnglishName());
|
moduleVo.setName(sysMenuConfigEntity.getMenuEnglishName());
|
||||||
moduleVo.setComponent(sysMenuConfigEntity.getMenuPage());
|
moduleVo.setComponent(sysMenuConfigEntity.getMenuPage());
|
||||||
JSONObject meta = new JSONObject();
|
JSONObject meta = new JSONObject();
|
||||||
|
meta.put("id", sysMenuConfigEntity.getId());
|
||||||
meta.put("title", sysMenuConfigEntity.getMenuName());
|
meta.put("title", sysMenuConfigEntity.getMenuName());
|
||||||
meta.put("icon", sysMenuConfigEntity.getMenuIcon());
|
meta.put("icon", sysMenuConfigEntity.getMenuIcon());
|
||||||
if("0".equals(sysMenuConfigEntity.getVisibles())){
|
if("0".equals(sysMenuConfigEntity.getVisibles())){
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
<if test="companyId != null and companyId != ''">and company_id like concat('%',#{companyId},'%')</if>
|
<if test="companyId != null and companyId != ''">and company_id like concat('%',#{companyId},'%')</if>
|
||||||
and sts='Y'
|
and sts='Y'
|
||||||
</trim>
|
</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>
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue