主数据修改
This commit is contained in:
parent
2adb827e0d
commit
353dd95a60
|
@ -469,21 +469,21 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
if(mdmModuleDistributeEntities.get(i1).getDeleteApi() == null || "".equals(mdmModuleDistributeEntities.get(i1).getDeleteApi())){
|
||||
for (int i = 0; i < doObjects.size(); i++) {
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"3");
|
||||
saveMdmModuleSendLogEntity("2","删除接口未设置",mainDb,objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"3");
|
||||
}
|
||||
return ;
|
||||
}
|
||||
SysApplicationApiEntity apiEntity = sysApplicationApiDao.get(mdmModuleDistributeEntities.get(i1).getDeleteApi());
|
||||
if(apiEntity == null || apiEntity.getId() == null ){
|
||||
for (int i = 0; i < doObjects.size(); i++) {
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"3");
|
||||
saveMdmModuleSendLogEntity("2","删除接口未找到",mainDb,objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"3");
|
||||
}
|
||||
return ;
|
||||
}
|
||||
SysApplicationEntity sysApplicationEntity = sysApplicationDao.get(apiEntity.getAppId());
|
||||
if(sysApplicationEntity == null || sysApplicationEntity.getId() == null ){
|
||||
for (int i = 0; i < doObjects.size(); i++) {
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),null,apiEntity.getApiName(),doObjects.get(i).toJSONString(),"3");
|
||||
saveMdmModuleSendLogEntity("2","删除接口的应用未找到",mainDb,objects.get(i).getString("id"),null,apiEntity.getApiName(),doObjects.get(i).toJSONString(),"3");
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
@ -493,7 +493,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
scriptEntity = sysApplicationScriptDao.get(mdmModuleDistributeEntities.get(i1).getDeleteScript());
|
||||
if(scriptEntity == null || scriptEntity.getId() == null ){
|
||||
for (int i = 0; i < doObjects.size(); i++) {
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"3");
|
||||
saveMdmModuleSendLogEntity("2","删除接口脚本未找到",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"3");
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
@ -539,7 +539,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
querys = jsonResultEntity.getQuerys();
|
||||
bodys = jsonResultEntity.getBodys();
|
||||
}catch (Exception e){
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"3");
|
||||
saveMdmModuleSendLogEntity("2","脚本处理失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"3");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -555,11 +555,11 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
|
||||
if(jsonResultEntity.isFlag()){
|
||||
//保存日志
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"3");
|
||||
saveMdmModuleSendLogEntity("1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"3");
|
||||
continue;
|
||||
}else {
|
||||
//保存日志
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"3");
|
||||
saveMdmModuleSendLogEntity("2","转发失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"3");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -618,21 +618,21 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
if(mdmModuleDistributeEntities.get(i1).getUpdateApi() == null || "".equals(mdmModuleDistributeEntities.get(i1).getUpdateApi())){
|
||||
for (int i = 0; i < doObjects.size(); i++) {
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"2");
|
||||
saveMdmModuleSendLogEntity("2","修改接口未设置",mainDb,objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"2");
|
||||
}
|
||||
return ;
|
||||
}
|
||||
SysApplicationApiEntity apiEntity = sysApplicationApiDao.get(mdmModuleDistributeEntities.get(i1).getUpdateApi());
|
||||
if(apiEntity == null || apiEntity.getId() == null ){
|
||||
for (int i = 0; i < doObjects.size(); i++) {
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"2");
|
||||
saveMdmModuleSendLogEntity("2","修改接口未查找到",mainDb,objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"2");
|
||||
}
|
||||
return ;
|
||||
}
|
||||
SysApplicationEntity sysApplicationEntity = sysApplicationDao.get(apiEntity.getAppId());
|
||||
if(sysApplicationEntity == null || sysApplicationEntity.getId() == null ){
|
||||
for (int i = 0; i < doObjects.size(); i++) {
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),null,apiEntity.getApiName(),doObjects.get(i).toJSONString(),"2");
|
||||
saveMdmModuleSendLogEntity("2","应用未查找到",mainDb,objects.get(i).getString("id"),null,apiEntity.getApiName(),doObjects.get(i).toJSONString(),"2");
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
@ -642,7 +642,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
scriptEntity = sysApplicationScriptDao.get(mdmModuleDistributeEntities.get(i1).getUpdateScript());
|
||||
if(scriptEntity == null || scriptEntity.getId() == null ){
|
||||
for (int i = 0; i < doObjects.size(); i++) {
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"2");
|
||||
saveMdmModuleSendLogEntity("2","脚本未查找到",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"2");
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
@ -679,7 +679,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
querys = jsonResultEntity.getQuerys();
|
||||
bodys = jsonResultEntity.getBodys();
|
||||
}catch (Exception e){
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"2");
|
||||
saveMdmModuleSendLogEntity("2","脚本处理失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"2");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -695,11 +695,11 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
|
||||
if(jsonResultEntity.isFlag()){
|
||||
//保存日志
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"2");
|
||||
saveMdmModuleSendLogEntity("1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"2");
|
||||
continue;
|
||||
}else {
|
||||
//保存日志
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"2");
|
||||
saveMdmModuleSendLogEntity("2","转发失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"2");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -765,21 +765,21 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
if(mdmModuleDistributeEntities.get(i1).getAddApi() == null || "".equals(mdmModuleDistributeEntities.get(i1).getAddApi())){
|
||||
for (int i = 0; i < doObjects.size(); i++) {
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"1");
|
||||
saveMdmModuleSendLogEntity("2","新增接口未设置",mainDb,objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"1");
|
||||
}
|
||||
return ;
|
||||
}
|
||||
SysApplicationApiEntity apiEntity = sysApplicationApiDao.get(mdmModuleDistributeEntities.get(i1).getAddApi());
|
||||
if(apiEntity == null || apiEntity.getId() == null ){
|
||||
for (int i = 0; i < doObjects.size(); i++) {
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"1");
|
||||
saveMdmModuleSendLogEntity("2","新增接口未查找到",mainDb,objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"1");
|
||||
}
|
||||
return ;
|
||||
}
|
||||
SysApplicationEntity sysApplicationEntity = sysApplicationDao.get(apiEntity.getAppId());
|
||||
if(sysApplicationEntity == null || sysApplicationEntity.getId() == null ){
|
||||
for (int i = 0; i < doObjects.size(); i++) {
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),null,apiEntity.getApiName(),doObjects.get(i).toJSONString(),"1");
|
||||
saveMdmModuleSendLogEntity("2","应用未查找到",mainDb,objects.get(i).getString("id"),null,apiEntity.getApiName(),doObjects.get(i).toJSONString(),"1");
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
@ -789,7 +789,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
scriptEntity = sysApplicationScriptDao.get(mdmModuleDistributeEntities.get(i1).getAddScript());
|
||||
if(scriptEntity == null || scriptEntity.getId() == null ){
|
||||
for (int i = 0; i < doObjects.size(); i++) {
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"1");
|
||||
saveMdmModuleSendLogEntity("2","脚本未查找到",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"1");
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
@ -835,7 +835,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
querys = jsonResultEntity.getQuerys();
|
||||
bodys = jsonResultEntity.getBodys();
|
||||
}catch (Exception e){
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"1");
|
||||
saveMdmModuleSendLogEntity("2","脚本处理失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"1");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -851,11 +851,11 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
|
||||
if(jsonResultEntity.isFlag()){
|
||||
//保存日志
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"1");
|
||||
saveMdmModuleSendLogEntity("1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"1");
|
||||
continue;
|
||||
}else {
|
||||
//保存日志
|
||||
saveMdmModuleSendLogEntity(objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"1");
|
||||
saveMdmModuleSendLogEntity("2","转发失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"1");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -877,8 +877,9 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
}
|
||||
|
||||
private void saveMdmModuleSendLogEntity(String formmain_id,String target_app,String target_api,String source_data, String option_type) {
|
||||
private void saveMdmModuleSendLogEntity(String dataType,String remark,String dbname,String formmain_id, String target_app, String target_api, String source_data, String option_type) {
|
||||
MdmModuleSendLogEntity mdmModuleSendLogEntity = new MdmModuleSendLogEntity();
|
||||
mdmModuleSendLogEntity.setTableName(dbname+"_send_log");
|
||||
mdmModuleSendLogEntity.setCreate();
|
||||
mdmModuleSendLogEntity.setId(UUIDUtils.getUUID());
|
||||
mdmModuleSendLogEntity.setSts("Y");
|
||||
|
@ -893,6 +894,8 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
mdmModuleSendLogEntity.setTargetApi(target_api);
|
||||
mdmModuleSendLogEntity.setSourceData(source_data);
|
||||
mdmModuleSendLogEntity.setOptionType(option_type);
|
||||
mdmModuleSendLogEntity.setDataType(dataType);
|
||||
mdmModuleSendLogEntity.setRemark(remark);
|
||||
mdmModuleSendLogDao.save(mdmModuleSendLogEntity);
|
||||
}
|
||||
|
||||
|
|
|
@ -54,8 +54,8 @@ public class temButtom {
|
|||
public void test01() {
|
||||
String a = AESUtil.encrypt("hzya@1314");
|
||||
System.out.println(a);
|
||||
|
||||
//String sa= "{\n \\"status\\": \\"success\\",\n \\"data\\": \\"[{\\\\"pk_corp\\\\":\\\\"1001\\\\",\\\\"unitcode\\\\":\\\\"01\\\\",\\\\"unitname\\\\":\\\\"临安奥星电子股份有限公司\\\\",\\\\"createdate\\\\":\\\\"2024-04-24\\\\",\\\\"deptattr\\\\":\\\\"1\\\\",\\\\"deptname\\\\":\\\\"DEV测试一级部门\\\\",\\\\"deptcode\\\\":\\\\"99\\\\",\\\\"pk_deptdoc\\\\":\\\\"1001F1100000000067AS\\\\"}]\\",\n \\"taskNumber\\": \\"202404250041\\"\n}";
|
||||
String b = AESUtil.decrypt("62e4295b615a30dbf3b8ee96f41c820b");
|
||||
System.out.println(b);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -554,7 +554,7 @@ where id = #{id}
|
|||
${item.getValueByType('a.')}
|
||||
</foreach>
|
||||
</if>
|
||||
and a.sts='Y'
|
||||
and a.sts='Y' and a.data_status != 'N'
|
||||
<if test="detailQueryCondition != null and detailQueryCondition.size>0">
|
||||
<foreach collection="detailQueryCondition" item="item" index="index">
|
||||
AND a.id IN (
|
||||
|
@ -594,7 +594,7 @@ where id = #{id}
|
|||
</trim>
|
||||
)
|
||||
</if>
|
||||
and sts = 'Y'
|
||||
and sts = 'Y' and data_status != 'N'
|
||||
</trim>
|
||||
order by sorts asc
|
||||
</select>
|
||||
|
@ -608,7 +608,7 @@ where id = #{id}
|
|||
from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id !='' ">and id = #{id}</if>
|
||||
and sts = 'Y'
|
||||
and sts = 'Y' and data_status != 'N'
|
||||
</trim>
|
||||
order by sorts asc
|
||||
</select>
|
||||
|
@ -620,7 +620,7 @@ where id = #{id}
|
|||
${label},
|
||||
${upId}
|
||||
from ${tableName}
|
||||
where sts = 'Y'
|
||||
where sts = 'Y' and data_status != 'N'
|
||||
order by sorts asc
|
||||
</select>
|
||||
<!-- 查询符合条件的数量 -->
|
||||
|
|
|
@ -388,4 +388,13 @@ public interface IMdmModuleService extends IBaseService<MdmModuleEntity, String>
|
|||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmMainDBField(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-分发设置-列表获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmDistributeByMdmCode(JSONObject jsonObject);
|
||||
}
|
||||
|
|
|
@ -311,6 +311,7 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
|
|||
}
|
||||
entity.setCreate();
|
||||
mdmModuleDao.save(entity);
|
||||
entity = mdmModuleDao.get(entity.getId());
|
||||
return BaseResult.getSuccessMessageEntity("保存成功",entity);
|
||||
}
|
||||
|
||||
|
@ -631,11 +632,28 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
|
|||
data_type.setQueryType("1");
|
||||
data_type.setListType("1");
|
||||
data_type.setViewType("1");
|
||||
data_type.setFiledLength("255");
|
||||
data_type.setFiledLength("50");
|
||||
data_type.setCreate();
|
||||
data_type.setDataType("1");
|
||||
mdmModuleDbFiledsEntities.add(data_type);
|
||||
|
||||
MdmModuleDbFiledsEntity remark = new MdmModuleDbFiledsEntity();
|
||||
remark.setMdmId(entity.getMdmId());
|
||||
remark.setDbId(entity.getId());
|
||||
remark.setEnName("remark");
|
||||
remark.setChName("备注");
|
||||
remark.setFiledType("3");
|
||||
remark.setAddType("1");
|
||||
remark.setUpdateType("1");
|
||||
remark.setShowType("1");
|
||||
remark.setQueryType("1");
|
||||
remark.setListType("1");
|
||||
remark.setViewType("1");
|
||||
remark.setFiledLength("255");
|
||||
remark.setCreate();
|
||||
remark.setDataType("1");
|
||||
mdmModuleDbFiledsEntities.add(remark);
|
||||
|
||||
MdmModuleDbFiledsEntity code = new MdmModuleDbFiledsEntity();
|
||||
code.setMdmId(entity.getMdmId());
|
||||
code.setDbId(entity.getId());
|
||||
|
@ -774,6 +792,40 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
|
|||
option_type.setCreate();
|
||||
option_type.setDataType("1");
|
||||
mdmModuleDbFiledsEntities.add(option_type);
|
||||
|
||||
MdmModuleDbFiledsEntity data_type = new MdmModuleDbFiledsEntity();
|
||||
data_type.setMdmId(entity.getMdmId());
|
||||
data_type.setDbId(entity.getId());
|
||||
data_type.setEnName("data_type");
|
||||
data_type.setChName("状态");
|
||||
data_type.setFiledType("3");
|
||||
data_type.setAddType("1");
|
||||
data_type.setUpdateType("1");
|
||||
data_type.setShowType("1");
|
||||
data_type.setQueryType("1");
|
||||
data_type.setListType("1");
|
||||
data_type.setViewType("1");
|
||||
data_type.setFiledLength("255");
|
||||
data_type.setCreate();
|
||||
data_type.setDataType("1");
|
||||
mdmModuleDbFiledsEntities.add(data_type);
|
||||
|
||||
MdmModuleDbFiledsEntity remark = new MdmModuleDbFiledsEntity();
|
||||
remark.setMdmId(entity.getMdmId());
|
||||
remark.setDbId(entity.getId());
|
||||
remark.setEnName("remark");
|
||||
remark.setChName("备注");
|
||||
remark.setFiledType("3");
|
||||
remark.setAddType("1");
|
||||
remark.setUpdateType("1");
|
||||
remark.setShowType("1");
|
||||
remark.setQueryType("1");
|
||||
remark.setListType("1");
|
||||
remark.setViewType("1");
|
||||
remark.setFiledLength("255");
|
||||
remark.setCreate();
|
||||
remark.setDataType("1");
|
||||
mdmModuleDbFiledsEntities.add(remark);
|
||||
}
|
||||
if ("2".equals(entity.getDbType()) || "1".equals(entity.getDbType())) {
|
||||
MdmModuleDbFiledsEntity data_status = new MdmModuleDbFiledsEntity();
|
||||
|
@ -786,8 +838,8 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
|
|||
data_status.setUpdateType("2");
|
||||
data_status.setShowType("2");
|
||||
data_status.setQueryType("2");
|
||||
data_status.setListType("1");
|
||||
data_status.setViewType("1");
|
||||
data_status.setListType("2");
|
||||
data_status.setViewType("2");
|
||||
data_status.setFiledLength("1");
|
||||
data_status.setCreate();
|
||||
data_status.setDataType("1");
|
||||
|
@ -2616,4 +2668,27 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
|
|||
}
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功", list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 主数据-分发设置-列表获取
|
||||
* @Date 11:43 上午 2024/6/11
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity queryMdmDistributeByMdmCode(JSONObject object) {
|
||||
MdmModuleDistributeEntity entity = getData("jsonStr", object, MdmModuleDistributeEntity.class);
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
if (entity.getMdmCode() == null || "".equals(entity.getMdmCode())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleEntity mdmModuleEntity = mdmServiceCache.getMdmModuleEntity(entity.getMdmCode());
|
||||
entity.setMdmId(mdmModuleEntity.getId());
|
||||
List<MdmModuleDistributeEntity> list = mdmModuleDistributeDao.queryBase(entity);
|
||||
return BaseResult.getSuccessMessageEntity("获取分发设置成功", list);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,5 +11,6 @@ import com.hzya.frame.basedao.dao.IBaseDao;
|
|||
*/
|
||||
public interface IMdmModuleDistributeDao extends IBaseDao<MdmModuleDistributeEntity, String> {
|
||||
|
||||
Integer queryCountUse(MdmModuleDistributeEntity mdmModuleDistributeEntity);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,9 @@ import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
|
|||
import com.hzya.frame.mdm.mdmModuleDistribute.dao.IMdmModuleDistributeDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* 主数据功能应用分发表(MdmModuleDistribute)表数据库访问层
|
||||
*
|
||||
|
@ -12,6 +15,11 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|||
*/
|
||||
@Repository(value = "MdmModuleDistributeDaoImpl")
|
||||
public class MdmModuleDistributeDaoImpl extends MybatisGenericDao<MdmModuleDistributeEntity, String> implements IMdmModuleDistributeDao{
|
||||
|
||||
|
||||
@Override
|
||||
public Integer queryCountUse(MdmModuleDistributeEntity mdmModuleDistributeEntity) {
|
||||
Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "queryCountUse", mdmModuleDistributeEntity);
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
private String mdmId;
|
||||
/** 应用id */
|
||||
private String appId;
|
||||
/** 应用id */
|
||||
private Long mdmCode;
|
||||
/** 触发类型 0、手动1、自动 */
|
||||
private String enabledType;
|
||||
/** 修改接口 */
|
||||
|
@ -40,6 +42,13 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
/** 公司id */
|
||||
private List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities;
|
||||
|
||||
public Long getMdmCode() {
|
||||
return mdmCode;
|
||||
}
|
||||
|
||||
public void setMdmCode(Long mdmCode) {
|
||||
this.mdmCode = mdmCode;
|
||||
}
|
||||
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
|
@ -144,5 +153,7 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
public void setMdmModuleDistributeDetailEntities(List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities) {
|
||||
this.mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailEntities;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -324,6 +324,16 @@ update mdm_module_distribute set sts= 'N' ,modify_time = #{modify_time},modify_
|
|||
<delete id="entity_delete">
|
||||
delete from mdm_module_distribute where id = #{id}
|
||||
</delete>
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="queryCountUse" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity">
|
||||
select count(1) from mdm_module_distribute
|
||||
where sts='Y' and (
|
||||
<trim prefixOverrides="or" >
|
||||
<if test="updateScript != null and updateScript != ''"> or update_script = #{updateScript} </if>
|
||||
<if test="addScript != null and addScript != ''"> or add_script = #{addScript} </if>
|
||||
<if test="deleteScript != null and deleteScript != ''"> or delete_script = #{deleteScript} </if>
|
||||
</trim>
|
||||
)
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -19,6 +19,8 @@ public class MdmModuleOptionLogEntity extends BaseEntity {
|
|||
private String sourceName;
|
||||
/** 状态 1、成功2、失败 */
|
||||
private String dataType;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
/** 编码 */
|
||||
private String code;
|
||||
/** source_data */
|
||||
|
@ -30,6 +32,15 @@ public class MdmModuleOptionLogEntity extends BaseEntity {
|
|||
/** 公司id */
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<result property="sourceName" column="source_name" jdbcType="VARCHAR"/>
|
||||
<result property="dataType" column="data_type" jdbcType="VARCHAR"/>
|
||||
<result property="code" column="code" jdbcType="VARCHAR"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="sourceData" column="source_data" jdbcType="VARCHAR"/>
|
||||
<result property="optionType" column="option_type" jdbcType="VARCHAR"/>
|
||||
<result property="optionName" column="option_name" jdbcType="VARCHAR"/>
|
||||
|
@ -27,7 +28,8 @@
|
|||
,source_name
|
||||
,data_type
|
||||
,code
|
||||
,source_data
|
||||
,remark
|
||||
,source_data
|
||||
,option_type
|
||||
,option_name
|
||||
,sorts
|
||||
|
@ -55,6 +57,7 @@
|
|||
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
|
||||
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
|
||||
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
|
||||
<if test="optionName != null and optionName != ''"> and option_name = #{optionName} </if>
|
||||
|
@ -81,6 +84,7 @@
|
|||
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
|
||||
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
|
||||
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
|
||||
<if test="optionName != null and optionName != ''"> and option_name = #{optionName} </if>
|
||||
|
@ -109,6 +113,7 @@
|
|||
<if test="sourceName != null and sourceName != ''"> and source_name like concat('%',#{sourceName},'%') </if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type like concat('%',#{dataType},'%') </if>
|
||||
<if test="code != null and code != ''"> and code like concat('%',#{code},'%') </if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%',#{remark},'%') </if>
|
||||
<if test="sourceData != null and sourceData != ''"> and source_data like concat('%',#{sourceData},'%') </if>
|
||||
<if test="optionType != null and optionType != ''"> and option_type like concat('%',#{optionType},'%') </if>
|
||||
<if test="optionName != null and optionName != ''"> and option_name like concat('%',#{optionName},'%') </if>
|
||||
|
@ -122,7 +127,7 @@
|
|||
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts desc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
|
@ -137,6 +142,7 @@
|
|||
<if test="sourceName != null and sourceName != ''"> or source_name = #{sourceName} </if>
|
||||
<if test="dataType != null and dataType != ''"> or data_type = #{dataType} </if>
|
||||
<if test="code != null and code != ''"> or code = #{code} </if>
|
||||
<if test="remark != null and remark != ''"> or remark = #{remark} </if>
|
||||
<if test="sourceData != null and sourceData != ''"> or source_data = #{sourceData} </if>
|
||||
<if test="optionType != null and optionType != ''"> or option_type = #{optionType} </if>
|
||||
<if test="optionName != null and optionName != ''"> or option_name = #{optionName} </if>
|
||||
|
@ -163,6 +169,7 @@
|
|||
<if test="sourceName != null and sourceName != ''"> source_name , </if>
|
||||
<if test="dataType != null and dataType != ''"> data_type , </if>
|
||||
<if test="code != null and code != ''"> code , </if>
|
||||
<if test="remark != null and remark != ''"> remark , </if>
|
||||
<if test="sourceData != null and sourceData != ''"> source_data , </if>
|
||||
<if test="optionType != null and optionType != ''"> option_type , </if>
|
||||
<if test="optionName != null and optionName != ''"> option_name , </if>
|
||||
|
@ -183,6 +190,7 @@
|
|||
<if test="sourceName != null and sourceName != ''"> #{sourceName} ,</if>
|
||||
<if test="dataType != null and dataType != ''"> #{dataType} ,</if>
|
||||
<if test="code != null and code != ''"> #{code} ,</if>
|
||||
<if test="remark != null and remark != ''"> #{remark} ,</if>
|
||||
<if test="sourceData != null and sourceData != ''"> #{sourceData} ,</if>
|
||||
<if test="optionType != null and optionType != ''"> #{optionType} ,</if>
|
||||
<if test="optionName != null and optionName != ''"> #{optionName} ,</if>
|
||||
|
@ -200,24 +208,25 @@
|
|||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into ${tableName}(formmain_id, source_name,data_type, code, source_data, option_type, option_name, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
insert into ${tableName}(formmain_id, source_name,data_type, code,remark, source_data, option_type, option_name, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.formmainId},#{entity.sourceName},#{entity.dataType},#{entity.code},#{entity.sourceData},#{entity.optionType},#{entity.optionName},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
|
||||
(#{entity.formmainId},#{entity.sourceName},#{entity.dataType},#{entity.code},#{entity.remark},#{entity.sourceData},#{entity.optionType},#{entity.optionName},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" >
|
||||
insert into ${tableName}(formmain_id, source_name,data_type, code, source_data, option_type, option_name, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
insert into ${tableName}(formmain_id, source_name,data_type, code, remark, source_data, option_type, option_name, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.formmainId},#{entity.sourceName},#{entity.dataType},#{entity.code},#{entity.sourceData},#{entity.optionType},#{entity.optionName},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
|
||||
(#{entity.formmainId},#{entity.sourceName},#{entity.dataType},#{entity.code},#{entity.remark},#{entity.sourceData},#{entity.optionType},#{entity.optionName},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
formmain_id = values(formmain_id),
|
||||
source_name = values(source_name),
|
||||
data_type = values(data_type),
|
||||
code = values(code),
|
||||
remark = values(remark),
|
||||
source_data = values(source_data),
|
||||
option_type = values(option_type),
|
||||
option_name = values(option_name),
|
||||
|
@ -236,6 +245,7 @@ update ${tableName} set
|
|||
<if test="sourceName != null and sourceName != ''"> source_name = #{sourceName},</if>
|
||||
<if test="dataType != null and dataType != ''"> data_type = #{dataType},</if>
|
||||
<if test="code != null and code != ''"> code = #{code},</if>
|
||||
<if test="remark != null and remark != ''"> remark = #{remark},</if>
|
||||
<if test="sourceData != null and sourceData != ''"> source_data = #{sourceData},</if>
|
||||
<if test="optionType != null and optionType != ''"> option_type = #{optionType},</if>
|
||||
<if test="optionName != null and optionName != ''"> option_name = #{optionName},</if>
|
||||
|
@ -263,6 +273,7 @@ update ${tableName} set sts= 'N' ,modify_time = #{modify_time},modify_user_id =
|
|||
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
|
||||
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
|
||||
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
|
||||
<if test="optionName != null and optionName != ''"> and option_name = #{optionName} </if>
|
||||
|
|
|
@ -21,11 +21,30 @@ public class MdmModuleSendLogEntity extends BaseEntity {
|
|||
private String targetApi;
|
||||
/** 源数据 */
|
||||
private String sourceData;
|
||||
/** 状态 1、成功2、失败 */
|
||||
private String dataType;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
/** 操作类型 1新增2、修改3、删除*/
|
||||
private String optionType;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
public void setDataType(String dataType) {
|
||||
this.dataType = dataType;
|
||||
}
|
||||
|
||||
public String getFormmainId() {
|
||||
return formmainId;
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
<result property="targetApi" column="target_api" jdbcType="VARCHAR"/>
|
||||
<result property="sourceData" column="source_data" jdbcType="VARCHAR"/>
|
||||
<result property="optionType" column="option_type" jdbcType="VARCHAR"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="dataType" column="data_type" jdbcType="VARCHAR"/>
|
||||
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
|
@ -26,7 +28,9 @@
|
|||
,target_api
|
||||
,source_data
|
||||
,option_type
|
||||
,sorts
|
||||
,remark
|
||||
,data_type
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
|
@ -53,6 +57,8 @@
|
|||
<if test="targetApi != null and targetApi != ''"> and target_api = #{targetApi} </if>
|
||||
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
|
||||
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
|
@ -77,6 +83,8 @@
|
|||
<if test="targetApi != null and targetApi != ''"> and target_api = #{targetApi} </if>
|
||||
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
|
||||
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
|
@ -103,6 +111,8 @@
|
|||
<if test="targetApi != null and targetApi != ''"> and target_api like concat('%',#{targetApi},'%') </if>
|
||||
<if test="sourceData != null and sourceData != ''"> and source_data like concat('%',#{sourceData},'%') </if>
|
||||
<if test="optionType != null and optionType != ''"> and option_type like concat('%',#{optionType},'%') </if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%',#{remark},'%') </if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type like concat('%',#{dataType},'%') </if>
|
||||
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
|
||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
||||
|
@ -113,7 +123,7 @@
|
|||
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts desc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
|
@ -129,6 +139,8 @@
|
|||
<if test="targetApi != null and targetApi != ''"> or target_api = #{targetApi} </if>
|
||||
<if test="sourceData != null and sourceData != ''"> or source_data = #{sourceData} </if>
|
||||
<if test="optionType != null and optionType != ''"> or option_type = #{optionType} </if>
|
||||
<if test="remark != null and remark != ''"> or remark = #{remark} </if>
|
||||
<if test="dataType != null and dataType != ''"> or data_type = #{dataType} </if>
|
||||
<if test="sorts != null"> or sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
||||
|
@ -153,6 +165,8 @@
|
|||
<if test="targetApi != null and targetApi != ''"> target_api , </if>
|
||||
<if test="sourceData != null and sourceData != ''"> source_data , </if>
|
||||
<if test="optionType != null and optionType != ''"> option_type , </if>
|
||||
<if test="remark != null and remark != ''"> remark , </if>
|
||||
<if test="dataType != null and dataType != ''"> data_type , </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>
|
||||
|
@ -171,6 +185,8 @@
|
|||
<if test="targetApi != null and targetApi != ''"> #{targetApi} ,</if>
|
||||
<if test="sourceData != null and sourceData != ''"> #{sourceData} ,</if>
|
||||
<if test="optionType != null and optionType != ''"> #{optionType} ,</if>
|
||||
<if test="remark != null and remark != ''"> #{remark} ,</if>
|
||||
<if test="dataType != null and dataType != ''"> #{dataType} ,</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>
|
||||
|
@ -185,18 +201,18 @@
|
|||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into ${tableName}(formmain_id, target_app, target_api, source_data, option_type, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
insert into ${tableName}(formmain_id, target_app, target_api, source_data, option_type,remark,data_type, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.formmainId},#{entity.targetApp},#{entity.targetApi},#{entity.sourceData},#{entity.optionType},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
|
||||
(#{entity.formmainId},#{entity.targetApp},#{entity.targetApi},#{entity.sourceData},#{entity.optionType},#{entity.remark},#{entity.dataType},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" >
|
||||
insert into ${tableName}(formmain_id, target_app, target_api, source_data, option_type, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
insert into ${tableName}(formmain_id, target_app, target_api, source_data, option_type,remark,data_type, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.formmainId},#{entity.targetApp},#{entity.targetApi},#{entity.sourceData},#{entity.optionType},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
|
||||
(#{entity.formmainId},#{entity.targetApp},#{entity.targetApi},#{entity.sourceData},#{entity.optionType},#{entity.remark},#{entity.dataType},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
formmain_id = values(formmain_id),
|
||||
|
@ -204,6 +220,8 @@
|
|||
target_api = values(target_api),
|
||||
source_data = values(source_data),
|
||||
option_type = values(option_type),
|
||||
remark = values(remark),
|
||||
data_type = values(data_type),
|
||||
create_user_id = values(create_user_id),
|
||||
create_time = values(create_time),
|
||||
modify_user_id = values(modify_user_id),
|
||||
|
@ -220,6 +238,8 @@ update ${tableName} set
|
|||
<if test="targetApi != null and targetApi != ''"> target_api = #{targetApi},</if>
|
||||
<if test="sourceData != null and sourceData != ''"> source_data = #{sourceData},</if>
|
||||
<if test="optionType != null and optionType != ''"> option_type = #{optionType},</if>
|
||||
<if test="remark != null and remark != ''"> remark = #{remark},</if>
|
||||
<if test="dataType != null and dataType != ''"> data_type = #{dataType},</if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||
|
@ -245,6 +265,8 @@ update ${tableName} set sts= 'N' ,modify_time = #{modify_time},modify_user_id =
|
|||
<if test="targetApi != null and targetApi != ''"> and target_api = #{targetApi} </if>
|
||||
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
|
||||
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
|
|
|
@ -110,14 +110,14 @@ public interface IMdmService {
|
|||
* @Date 9:40 上午 2023/10/18
|
||||
**/
|
||||
JsonResultEntity deleteMdmShowDetailsData(JSONObject jsonObject);
|
||||
///**
|
||||
// * @param jsonObject
|
||||
// * @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
// * @Author lvleigang
|
||||
// * @Description 处理分发数据
|
||||
// * @Date 9:40 上午 2023/10/18
|
||||
// **/
|
||||
//JsonResultEntity doMdmDistribute(JSONObject jsonObject);
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 处理分发数据
|
||||
* @Date 9:40 上午 2023/10/18
|
||||
**/
|
||||
JsonResultEntity doMdmDistribute(JSONObject jsonObject);
|
||||
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -11,6 +11,8 @@ import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.mdm.mdmModuleDistribute.dao.IMdmModuleDistributeDao;
|
||||
import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
|
||||
import com.hzya.frame.serviceUtil.DsDataSourceUtil;
|
||||
import com.hzya.frame.sysnew.application.api.dao.ISysApplicationApiDao;
|
||||
import com.hzya.frame.sysnew.application.api.entity.SysApplicationApiDto;
|
||||
|
@ -104,7 +106,8 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
private ISysMessageManageDao sysMessageManageDao;
|
||||
@Resource
|
||||
private ISysMessageManageDetailDao sysMessageManageDetailDao; //明细表
|
||||
|
||||
@Resource
|
||||
private IMdmModuleDistributeDao mdmModuleDistributeDao;
|
||||
@Resource
|
||||
private IIntegrationTaskCacheableService iIntegrationTaskCacheableService;
|
||||
@Resource
|
||||
|
@ -631,6 +634,8 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
SysApplicationEntity sysApplicationEntity = new SysApplicationEntity();
|
||||
sysApplicationEntity.setId(entity.getId());
|
||||
/** 应用logo(地址或者id) */
|
||||
sysApplicationEntity.setAppType(entity.getAppType());
|
||||
/** 应用logo(地址或者id) */
|
||||
sysApplicationEntity.setAppLogo(entity.getAppLogo());
|
||||
/** 应用是否启用(1、启用 2、停用) */
|
||||
sysApplicationEntity.setAppStatus(entity.getAppStatus());
|
||||
|
@ -2369,6 +2374,14 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
if (entity.getId() == null || "".equals(entity.getId())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleDistributeEntity mdmModuleDistributeEntity = new MdmModuleDistributeEntity();
|
||||
mdmModuleDistributeEntity.setAddScript(entity.getId());
|
||||
mdmModuleDistributeEntity.setUpdateScript(entity.getId());
|
||||
mdmModuleDistributeEntity.setDeleteScript(entity.getId());
|
||||
Integer a = mdmModuleDistributeDao.queryCountUse(mdmModuleDistributeEntity);
|
||||
if(a > 0){
|
||||
return BaseResult.getFailureMessageEntity("脚本已经被使用,请先取消关联");
|
||||
}
|
||||
entity.setUpdate();
|
||||
sysApplicationScriptDao.logicRemoveMultiCondition(entity);
|
||||
return BaseResult.getSuccessMessageEntity("删除脚本成功");
|
||||
|
|
Loading…
Reference in New Issue