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

添加同步删除事项接口

parent b8434159
......@@ -24,7 +24,7 @@ import java.util.List;
@Aspect
@Slf4j
@Component
//@Component
public class DataPermissionAspect {
@Autowired
......
......@@ -58,6 +58,10 @@ public class UploadServiceImpl implements UploadService {
throw new AppException("文件上传大小超过限制!");
}
if (null != fileName && fileName.length() > 50) {
throw new AppException("文件名称过长,无法上传!");
}
String rootPath = this.filePath.endsWith("/") ? this.filePath : this.filePath + "/";
String filePath = rootPath + (StringUtils.isEmpty(prePath) ? "" : prePath + "/");
......@@ -170,4 +174,14 @@ public class UploadServiceImpl implements UploadService {
}
}
public static void main(String[] args) {
String fileName="好.txt";
System.out.println(fileName.length());
}
}
\ No newline at end of file
......@@ -50,6 +50,11 @@ public class SyncMatterTaskImpl implements ITaskExcuteService {
stopWatch.stop();
log.info("同步站点部门完成,耗时:{}s", stopWatch.getLastTaskTimeMillis() / 1000);
log.info("开始同步事项==》{}", siteEntity.getSiteName());
stopWatch.start("同步删除本地多余的政务事项");
log.info("同步删除本地多余的政务事项");
matterExtService.syncDelMatterBySiteId(siteEntity, null);
stopWatch.stop();
log.info("同步删除本地多余的政务事项完成,耗时:{}s", stopWatch.getLastTaskTimeMillis() / 1000);
stopWatch.start("开始同步事项方法");
matterExtService.syncMatterBySiteId(siteEntity, null);
......
......@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import com.google.common.collect.Lists;
import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.common.Rest;
import com.mortals.framework.util.ThreadPool;
import com.mortals.xhx.common.code.DxTypeEnum;
import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.common.code.YesNoEnum;
......@@ -100,11 +101,17 @@ public class MatterExtServiceImpl extends AbstractCRUDServiceImpl<MatterExtDao,
}
log.info("开始更新事项详细!");
for (MatterEntity matterEntity : matterList) {
Rest<String> rest = matterService.buildMatterDetail(matterEntity, null);
if (rest.getCode() == YesNoEnum.YES.getValue()) {
matterEntity.setUpdateTime(new Date());
matterService.update(matterEntity, null);
}
Runnable runnable = new Runnable() {
@Override
public void run() {
Rest<String> rest = matterService.buildMatterDetail(matterEntity, null);
if (rest.getCode() == YesNoEnum.YES.getValue()) {
matterEntity.setUpdateTime(new Date());
matterService.update(matterEntity, null);
}
}
};
ThreadPool.getInstance().execute(runnable);
}
return Rest.ok();
}
......
......@@ -35,7 +35,11 @@ Content-Type: application/json
},{
"fieldName": "员工姓名",
"fieldValue": "%黄%"
},
{
"fieldValueList": ["员工姓名"]
}
],
"page": 1,
"size": 10
......
......@@ -4,8 +4,8 @@ POST {{baseUrl}}/site/business/interlist
Content-Type: application/json
{
"siteId": 22
"siteId": 1,
"size":100
}
......
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