Commit baa769c6 authored by 赵啸非's avatar 赵啸非

添加自定义导入修改

parent 99d9dc1a
...@@ -83,6 +83,14 @@ public class MatterCustomImportEntity extends BaseEntityLong { ...@@ -83,6 +83,14 @@ public class MatterCustomImportEntity extends BaseEntityLong {
private String eventTypeShow; private String eventTypeShow;
/**
* 网站名称
*/
@Excel(name = "网站名称")
private String webName;
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(this.areaCode, this.getMatterName()); return Objects.hash(this.areaCode, this.getMatterName());
......
...@@ -19,6 +19,7 @@ import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; ...@@ -19,6 +19,7 @@ import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.DataUtil; import com.mortals.framework.util.DataUtil;
import com.mortals.framework.util.ThreadPool; import com.mortals.framework.util.ThreadPool;
import com.mortals.xhx.base.framework.config.InterceptorConfig; import com.mortals.xhx.base.framework.config.InterceptorConfig;
import com.mortals.xhx.common.code.AppTypeEnum;
import com.mortals.xhx.common.code.FiletypeEnum; import com.mortals.xhx.common.code.FiletypeEnum;
import com.mortals.xhx.common.code.SourceEnum; import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
...@@ -2155,15 +2156,58 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -2155,15 +2156,58 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
matterFlowlimitService.save(matterFlowlimitEntities); matterFlowlimitService.save(matterFlowlimitEntities);
//新增渠道
MatterChannelEntity matterChannelEntity = new MatterChannelEntity();
matterChannelEntity.initAttrValue();
matterChannelEntity.setMatterId(matterEntity.getId());
matterChannelEntity.setMatterCode(matterEntity.getMatterNo());
matterChannelEntity.setMatterName(matterEntity.getMatterName());
matterChannelEntity.setName(matterCustomImportEntity.getWebName());
matterChannelEntity.setUrl(matterCustomImportEntity.getNetApplyUrl());
matterChannelEntity.setCreateTime(new Date());
matterChannelEntity.setCreateUserId(1L);
matterChannelService.save(matterChannelEntity);
SucessCount++; SucessCount++;
} else { } else {
log.info("事项已存在,更新事项:" + matterEntity.getMatterName()); log.info("事项已存在,更新事项:" + matterEntity.getMatterName());
BeanUtils.copyProperties(matterCustomImportEntity, matterEntity, new String[]{"id","areaCode", "deptName", "matterName"}); BeanUtils.copyProperties(matterCustomImportEntity, matterEntity, new String[]{"id","areaCode", "deptName", "matterName"});
matterEntity.setUpdateTime(new Date()); matterEntity.setUpdateTime(new Date());
matterEntity.setUpdateUserId(1L); matterEntity.setUpdateUserId(1L);
this.dao.update(matterEntity); this.dao.update(matterEntity);
MatterChannelQuery channelQuery = new MatterChannelQuery();
channelQuery.setMatterId(matterEntity.getId());
channelQuery.setAppType(0);
List<MatterChannelEntity> matterChannelEntities = matterChannelService.find(channelQuery);
if(!ObjectUtils.isEmpty(matterChannelEntities)){
MatterChannelEntity matterChannelEntity = matterChannelEntities.get(0);
matterChannelEntity.setName(matterCustomImportEntity.getWebName());
matterChannelEntity.setUrl(matterCustomImportEntity.getNetApplyUrl());
matterChannelEntity.setUpdateTime(new Date());
matterChannelEntity.setUpdateUserId(1L);
matterChannelService.update(matterChannelEntity);
}else{
//新增渠道
MatterChannelEntity matterChannelEntity = new MatterChannelEntity();
matterChannelEntity.initAttrValue();
matterChannelEntity.setMatterId(matterEntity.getId());
matterChannelEntity.setMatterCode(matterEntity.getMatterNo());
matterChannelEntity.setMatterName(matterEntity.getMatterName());
matterChannelEntity.setName(matterCustomImportEntity.getWebName());
matterChannelEntity.setUrl(matterCustomImportEntity.getNetApplyUrl());
matterChannelEntity.setCreateTime(new Date());
matterChannelEntity.setCreateUserId(1L);
matterChannelService.save(matterChannelEntity);
}
updateCount++; updateCount++;
// failCount++; // failCount++;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment