工作组导入
This commit is contained in:
+20
-15
@@ -76,26 +76,31 @@ public class WgdCgfyServiceImpl extends ServiceImpl<WgdCgfyDao, WgdCgfy> impleme
|
|||||||
public List<WgdCgfy> importCgfy(MultipartFile file, StringBuilder stringBuilder) {
|
public List<WgdCgfy> importCgfy(MultipartFile file, StringBuilder stringBuilder) {
|
||||||
|
|
||||||
List<WgdCgfy> res= ExcelImportUtilByWk.readExcelpublic(WgdCgfy.class,file);
|
List<WgdCgfy> res= ExcelImportUtilByWk.readExcelpublic(WgdCgfy.class,file);
|
||||||
|
if (res != null){
|
||||||
|
QueryWrapper<WgdCgfy> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.select(WgdCgfy.class, info -> !info.getColumn().equals("id"));
|
||||||
|
List<WgdCgfy> wgdCgfy=iWgdCgfyService.list(queryWrapper);
|
||||||
|
List<WgdCgfy> remove=new ArrayList<>();
|
||||||
|
wgdCgfy.forEach(WgbWbtj -> {
|
||||||
|
WgbWbtj.setId(null);
|
||||||
|
if (res.contains(WgbWbtj)){
|
||||||
|
remove.add(WgbWbtj);
|
||||||
|
}
|
||||||
|
|
||||||
QueryWrapper<WgdCgfy> queryWrapper = new QueryWrapper<>();
|
});
|
||||||
queryWrapper.select(WgdCgfy.class, info -> !info.getColumn().equals("id"));
|
res.removeAll(remove);
|
||||||
List<WgdCgfy> wgdCgfy=iWgdCgfyService.list(queryWrapper);
|
res.forEach(wgdAssocInfo -> {
|
||||||
List<WgdCgfy> remove=new ArrayList<>();
|
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||||
wgdCgfy.forEach(WgbWbtj -> {
|
});
|
||||||
WgbWbtj.setId(null);
|
if (res.size()>0 && iWgdCgfyService.saveOrUpdateBatch(res)) {
|
||||||
if (res.contains(WgbWbtj)){
|
return res;
|
||||||
remove.add(WgbWbtj);
|
}else {
|
||||||
|
stringBuilder.append("表格数据全部重复");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
|
||||||
res.removeAll(remove);
|
|
||||||
res.forEach(wgdAssocInfo -> {
|
|
||||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
|
||||||
});
|
|
||||||
if (res.size()>0 && iWgdCgfyService.saveOrUpdateBatch(res)) {
|
|
||||||
return res;
|
return res;
|
||||||
}else {
|
}else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+21
-17
@@ -75,27 +75,31 @@ public class WgdFyfyServiceImpl extends ServiceImpl<WgdFyfyDao, WgdFyfy> impleme
|
|||||||
@Override
|
@Override
|
||||||
public List<WgdFyfy> importFyfy(MultipartFile file, StringBuilder stringBuilder) {
|
public List<WgdFyfy> importFyfy(MultipartFile file, StringBuilder stringBuilder) {
|
||||||
List<WgdFyfy> res= ExcelImportUtilByWk.readExcelpublic(WgdFyfy.class,file);
|
List<WgdFyfy> res= ExcelImportUtilByWk.readExcelpublic(WgdFyfy.class,file);
|
||||||
|
if (res != null){
|
||||||
|
QueryWrapper<WgdFyfy> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.select(WgdFyfy.class, info -> !info.getColumn().equals("id"));
|
||||||
|
List<WgdFyfy> wgdFyfy=iWgdFyfyService.list(queryWrapper);
|
||||||
|
List<WgdFyfy> remove=new ArrayList<>();
|
||||||
|
wgdFyfy.forEach(WgbWbtj -> {
|
||||||
|
WgbWbtj.setId(null);
|
||||||
|
if (res.contains(WgbWbtj)){
|
||||||
|
remove.add(WgbWbtj);
|
||||||
|
}
|
||||||
|
|
||||||
QueryWrapper<WgdFyfy> queryWrapper = new QueryWrapper<>();
|
});
|
||||||
queryWrapper.select(WgdFyfy.class, info -> !info.getColumn().equals("id"));
|
res.removeAll(remove);
|
||||||
List<WgdFyfy> wgdFyfy=iWgdFyfyService.list(queryWrapper);
|
res.forEach(wgdAssocInfo -> {
|
||||||
List<WgdFyfy> remove=new ArrayList<>();
|
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||||
wgdFyfy.forEach(WgbWbtj -> {
|
});
|
||||||
WgbWbtj.setId(null);
|
if (res.size()>0 && iWgdFyfyService.saveOrUpdateBatch(res)) {
|
||||||
if (res.contains(WgbWbtj)){
|
return res;
|
||||||
remove.add(WgbWbtj);
|
}else {
|
||||||
|
stringBuilder.append("表格数据全部重复");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
|
||||||
res.removeAll(remove);
|
|
||||||
res.forEach(wgdAssocInfo -> {
|
|
||||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
|
||||||
});
|
|
||||||
if (res.size()>0 && iWgdFyfyService.saveOrUpdateBatch(res)) {
|
|
||||||
return res;
|
return res;
|
||||||
}else {
|
}else {
|
||||||
stringBuilder.append("表格数据全部重复");
|
return null;
|
||||||
}
|
}
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+32
-27
@@ -80,38 +80,43 @@ public class WgdSrbServiceImpl extends ServiceImpl<WgdSrbDao, WgdSrb> implements
|
|||||||
public List<WgdSrb> importSrb(MultipartFile file, StringBuilder stringBuilder) {
|
public List<WgdSrb> importSrb(MultipartFile file, StringBuilder stringBuilder) {
|
||||||
|
|
||||||
List<WgdSrb> res= ExcelImportUtilByWk.readExcelpublic(WgdSrb.class,file);
|
List<WgdSrb> res= ExcelImportUtilByWk.readExcelpublic(WgdSrb.class,file);
|
||||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
if (res != null){
|
||||||
int i=1;
|
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
for (WgdSrb wgdSrb: res) {
|
int i=1;
|
||||||
try {
|
for (WgdSrb wgdSrb: res) {
|
||||||
if (null!=wgdSrb.getTime() && !"".equals(wgdSrb.getTime())) {
|
try {
|
||||||
wgdSrb.setTime(wgdSrb.getTime());
|
if (null!=wgdSrb.getTime() && !"".equals(wgdSrb.getTime())) {
|
||||||
|
wgdSrb.setTime(wgdSrb.getTime());
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
stringBuilder.append("第"+i+"行第5列入账时间填写不符合格式要求请检查;");
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
i++;
|
||||||
stringBuilder.append("第"+i+"行第5列入账时间填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
QueryWrapper<WgdSrb> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.select(WgdSrb.class, info -> !info.getColumn().equals("id"));
|
|
||||||
List<WgdSrb> wgdSrb=iWgdSrbService.list(queryWrapper);
|
|
||||||
List<WgdSrb> remove=new ArrayList<>();
|
|
||||||
wgdSrb.forEach(WgbWbtj -> {
|
|
||||||
WgbWbtj.setId(null);
|
|
||||||
if (res.contains(WgbWbtj)){
|
|
||||||
remove.add(WgbWbtj);
|
|
||||||
}
|
}
|
||||||
|
QueryWrapper<WgdSrb> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.select(WgdSrb.class, info -> !info.getColumn().equals("id"));
|
||||||
|
List<WgdSrb> wgdSrb=iWgdSrbService.list(queryWrapper);
|
||||||
|
List<WgdSrb> remove=new ArrayList<>();
|
||||||
|
wgdSrb.forEach(WgbWbtj -> {
|
||||||
|
WgbWbtj.setId(null);
|
||||||
|
if (res.contains(WgbWbtj)){
|
||||||
|
remove.add(WgbWbtj);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
res.removeAll(remove);
|
res.removeAll(remove);
|
||||||
res.forEach(wgdAssocInfo -> {
|
res.forEach(wgdAssocInfo -> {
|
||||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||||
});
|
});
|
||||||
if (res.size()>0 && iWgdSrbService.saveOrUpdateBatch(res)) {
|
if (res.size()>0 && iWgdSrbService.saveOrUpdateBatch(res)) {
|
||||||
|
return res;
|
||||||
|
}else {
|
||||||
|
stringBuilder.append("表格数据全部重复");
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}else {
|
}else {
|
||||||
stringBuilder.append("表格数据全部重复");
|
return null;
|
||||||
}
|
}
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+87
-82
@@ -77,94 +77,99 @@ public class WgdWbtjServiceImpl extends ServiceImpl<WgdWbtjDao, WgdWbtj> impleme
|
|||||||
@Override
|
@Override
|
||||||
public List<WgdWbtj> importWbtj(MultipartFile file, StringBuilder stringBuilder) {
|
public List<WgdWbtj> importWbtj(MultipartFile file, StringBuilder stringBuilder) {
|
||||||
List<WgdWbtj> res= ExcelImportUtilByWk.readExcelpublic(WgdWbtj.class,file);
|
List<WgdWbtj> res= ExcelImportUtilByWk.readExcelpublic(WgdWbtj.class,file);
|
||||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
if (res != null){
|
||||||
int i=1;
|
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
for (WgdWbtj wgdWbtj: res) {
|
int i=1;
|
||||||
if (null == wgdWbtj.getHost() || "".equals(wgdWbtj.getHost())){
|
for (WgdWbtj wgdWbtj: res) {
|
||||||
stringBuilder.append("第" + i + "行第1列主办单位填写不符合格式要求请检查;");
|
if (null == wgdWbtj.getHost() || "".equals(wgdWbtj.getHost())){
|
||||||
}
|
stringBuilder.append("第" + i + "行第1列主办单位填写不符合格式要求请检查;");
|
||||||
if (null == wgdWbtj.getMeeting() || "".equals(wgdWbtj.getMeeting())){
|
|
||||||
stringBuilder.append("第" + i + "行第2列会议名称填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == wgdWbtj.getPlace() || "".equals(wgdWbtj.getPlace())){
|
|
||||||
stringBuilder.append("第" + i + "行第4列会议地点填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == wgdWbtj.getContributions() || "".equals(wgdWbtj.getContributions())){
|
|
||||||
stringBuilder.append("第" + i + "行第5列会费标准填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == wgdWbtj.getExpenses() || "".equals(wgdWbtj.getExpenses())){
|
|
||||||
stringBuilder.append("第" + i + "行第7列费用列支填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == wgdWbtj.getUser() || "".equals(wgdWbtj.getUser())){
|
|
||||||
stringBuilder.append("第" + i + "行第8列参会人员填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == wgdWbtj.getLeadership() || "".equals(wgdWbtj.getLeadership())){
|
|
||||||
stringBuilder.append("第" + i + "行第9列主管领导填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == wgdWbtj.getParticipants() || "".equals(wgdWbtj.getParticipants())){
|
|
||||||
stringBuilder.append("第" + i + "行第10列参会单位填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == wgdWbtj.getIssues() || "".equals(wgdWbtj.getIssues())){
|
|
||||||
stringBuilder.append("第" + i + "行第13列主要议题填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (null!=wgdWbtj.getTime() && !"".equals(wgdWbtj.getTime())) {
|
|
||||||
wgdWbtj.setTime(wgdWbtj.getTime());
|
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
if (null == wgdWbtj.getMeeting() || "".equals(wgdWbtj.getMeeting())){
|
||||||
stringBuilder.append("第"+i+"行第3列会议时间填写不符合格式要求请检查;");
|
stringBuilder.append("第" + i + "行第2列会议名称填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
if (null == wgdWbtj.getPlace() || "".equals(wgdWbtj.getPlace())){
|
||||||
|
stringBuilder.append("第" + i + "行第4列会议地点填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
if (null == wgdWbtj.getContributions() || "".equals(wgdWbtj.getContributions())){
|
||||||
|
stringBuilder.append("第" + i + "行第5列会费标准填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
if (null == wgdWbtj.getExpenses() || "".equals(wgdWbtj.getExpenses())){
|
||||||
|
stringBuilder.append("第" + i + "行第7列费用列支填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
if (null == wgdWbtj.getUser() || "".equals(wgdWbtj.getUser())){
|
||||||
|
stringBuilder.append("第" + i + "行第8列参会人员填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
if (null == wgdWbtj.getLeadership() || "".equals(wgdWbtj.getLeadership())){
|
||||||
|
stringBuilder.append("第" + i + "行第9列主管领导填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
if (null == wgdWbtj.getParticipants() || "".equals(wgdWbtj.getParticipants())){
|
||||||
|
stringBuilder.append("第" + i + "行第10列参会单位填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
if (null == wgdWbtj.getIssues() || "".equals(wgdWbtj.getIssues())){
|
||||||
|
stringBuilder.append("第" + i + "行第13列主要议题填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (null!=wgdWbtj.getTime() && !"".equals(wgdWbtj.getTime())) {
|
||||||
|
wgdWbtj.setTime(wgdWbtj.getTime());
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
stringBuilder.append("第"+i+"行第3列会议时间填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
i++;
|
QueryWrapper<WgdWbtj> queryWrapper = new QueryWrapper<>();
|
||||||
}
|
queryWrapper.select(WgdWbtj.class,tableFieldInfo -> !tableFieldInfo.getColumn().equals("id"));
|
||||||
QueryWrapper<WgdWbtj> queryWrapper = new QueryWrapper<>();
|
List<WgdWbtj> WgdWbtjs=iWgdWbtjService.list(queryWrapper);
|
||||||
queryWrapper.select(WgdWbtj.class,tableFieldInfo -> !tableFieldInfo.getColumn().equals("id"));
|
List<WgdWbtj> remove=new ArrayList<>();
|
||||||
List<WgdWbtj> WgdWbtjs=iWgdWbtjService.list(queryWrapper);
|
WgdWbtjs.forEach(WgbWbtj -> {
|
||||||
List<WgdWbtj> remove=new ArrayList<>();
|
WgbWbtj.setId(null);
|
||||||
WgdWbtjs.forEach(WgbWbtj -> {
|
if (res.contains(WgbWbtj)){
|
||||||
WgbWbtj.setId(null);
|
remove.add(WgbWbtj);
|
||||||
if (res.contains(WgbWbtj)){
|
|
||||||
remove.add(WgbWbtj);
|
|
||||||
}
|
|
||||||
res.forEach(resWbtj->{
|
|
||||||
if (null == resWbtj.getHost() || "".equals(resWbtj.getHost())){
|
|
||||||
remove.add(resWbtj);
|
|
||||||
}
|
}
|
||||||
if (null == resWbtj.getMeeting() || "".equals(resWbtj.getMeeting())){
|
res.forEach(resWbtj->{
|
||||||
remove.add(resWbtj);
|
if (null == resWbtj.getHost() || "".equals(resWbtj.getHost())){
|
||||||
}
|
remove.add(resWbtj);
|
||||||
if (null == resWbtj.getPlace() || "".equals(resWbtj.getPlace())){
|
}
|
||||||
remove.add(resWbtj);
|
if (null == resWbtj.getMeeting() || "".equals(resWbtj.getMeeting())){
|
||||||
}
|
remove.add(resWbtj);
|
||||||
if (null == resWbtj.getContributions() || "".equals(resWbtj.getContributions())){
|
}
|
||||||
remove.add(resWbtj);
|
if (null == resWbtj.getPlace() || "".equals(resWbtj.getPlace())){
|
||||||
}
|
remove.add(resWbtj);
|
||||||
if (null == resWbtj.getExpenses() || "".equals(resWbtj.getExpenses())){
|
}
|
||||||
remove.add(resWbtj);
|
if (null == resWbtj.getContributions() || "".equals(resWbtj.getContributions())){
|
||||||
}
|
remove.add(resWbtj);
|
||||||
if (null == resWbtj.getUser() || "".equals(resWbtj.getUser())){
|
}
|
||||||
remove.add(resWbtj);
|
if (null == resWbtj.getExpenses() || "".equals(resWbtj.getExpenses())){
|
||||||
}
|
remove.add(resWbtj);
|
||||||
if (null == resWbtj.getLeadership() || "".equals(resWbtj.getLeadership())){
|
}
|
||||||
remove.add(resWbtj);
|
if (null == resWbtj.getUser() || "".equals(resWbtj.getUser())){
|
||||||
}
|
remove.add(resWbtj);
|
||||||
if (null == resWbtj.getParticipants() || "".equals(resWbtj.getParticipants())){
|
}
|
||||||
remove.add(resWbtj);
|
if (null == resWbtj.getLeadership() || "".equals(resWbtj.getLeadership())){
|
||||||
}
|
remove.add(resWbtj);
|
||||||
if (null == resWbtj.getIssues() || "".equals(resWbtj.getIssues())){
|
}
|
||||||
remove.add(resWbtj);
|
if (null == resWbtj.getParticipants() || "".equals(resWbtj.getParticipants())){
|
||||||
}
|
remove.add(resWbtj);
|
||||||
});
|
}
|
||||||
|
if (null == resWbtj.getIssues() || "".equals(resWbtj.getIssues())){
|
||||||
|
remove.add(resWbtj);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
res.removeAll(remove);
|
res.removeAll(remove);
|
||||||
res.forEach(WgbWbtj -> {
|
res.forEach(WgbWbtj -> {
|
||||||
WgbWbtj.setId(String.valueOf(UUID.randomUUID()));
|
WgbWbtj.setId(String.valueOf(UUID.randomUUID()));
|
||||||
});
|
});
|
||||||
if (res.size()>0 && iWgdWbtjService.saveOrUpdateBatch(res)) {
|
if (res.size()>0 && iWgdWbtjService.saveOrUpdateBatch(res)) {
|
||||||
|
return res;
|
||||||
|
}else {
|
||||||
|
stringBuilder.append("表格数据全部重复");
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}else {
|
}else {
|
||||||
stringBuilder.append("表格数据全部重复");
|
return null;
|
||||||
}
|
}
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+71
-66
@@ -79,78 +79,83 @@ public class WgdWbxdServiceImpl extends ServiceImpl<WgdWbxdDao, WgdWbxd> impleme
|
|||||||
|
|
||||||
|
|
||||||
List<WgdWbxd> res= ExcelImportUtilByWk.readExcelpublic(WgdWbxd.class,file);
|
List<WgdWbxd> res= ExcelImportUtilByWk.readExcelpublic(WgdWbxd.class,file);
|
||||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
if (res != null){
|
||||||
int i=1;
|
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
for (WgdWbxd wgdWbxd: res) {
|
int i=1;
|
||||||
if (null == wgdWbxd.getName() || "".equals(wgdWbxd.getName())){
|
for (WgdWbxd wgdWbxd: res) {
|
||||||
stringBuilder.append("第" + i + "行第3列标准名称填写不符合格式要求请检查;");
|
if (null == wgdWbxd.getName() || "".equals(wgdWbxd.getName())){
|
||||||
}
|
stringBuilder.append("第" + i + "行第3列标准名称填写不符合格式要求请检查;");
|
||||||
if (null == wgdWbxd.getType() || "".equals(wgdWbxd.getType())){
|
|
||||||
stringBuilder.append("第" + i + "行第6列标类型填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == wgdWbxd.getPreside() || "".equals(wgdWbxd.getPreside())){
|
|
||||||
stringBuilder.append("第" + i + "行第7列主持或参与填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == wgdWbxd.getParticipants() || "".equals(wgdWbxd.getParticipants())){
|
|
||||||
stringBuilder.append("第" + i + "行第14列参与人填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (null!=wgdWbxd.getDataStart() && !"".equals(wgdWbxd.getDataStart())) {
|
|
||||||
wgdWbxd.setDataStart(wgdWbxd.getDataStart());
|
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
if (null == wgdWbxd.getType() || "".equals(wgdWbxd.getType())){
|
||||||
stringBuilder.append("第"+i+"行第8列发布日期填写不符合格式要求请检查;");
|
stringBuilder.append("第" + i + "行第6列标类型填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
if (null == wgdWbxd.getPreside() || "".equals(wgdWbxd.getPreside())){
|
||||||
|
stringBuilder.append("第" + i + "行第7列主持或参与填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
if (null == wgdWbxd.getParticipants() || "".equals(wgdWbxd.getParticipants())){
|
||||||
|
stringBuilder.append("第" + i + "行第14列参与人填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (null!=wgdWbxd.getDataStart() && !"".equals(wgdWbxd.getDataStart())) {
|
||||||
|
wgdWbxd.setDataStart(wgdWbxd.getDataStart());
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
stringBuilder.append("第"+i+"行第8列发布日期填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (null!=wgdWbxd.getDataImplement() && !"".equals(wgdWbxd.getDataImplement())) {
|
||||||
|
wgdWbxd.setDataImplement(wgdWbxd.getDataImplement());
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
stringBuilder.append("第"+i+"行第9列实施日期填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (null!=wgdWbxd.getDataRecord() && !"".equals(wgdWbxd.getDataRecord())) {
|
||||||
|
wgdWbxd.setDataRecord(wgdWbxd.getDataRecord());
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
stringBuilder.append("第"+i+"行第12列备案时间填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
try {
|
QueryWrapper<WgdWbxd> queryWrapper = new QueryWrapper<>();
|
||||||
if (null!=wgdWbxd.getDataImplement() && !"".equals(wgdWbxd.getDataImplement())) {
|
queryWrapper.select(WgdWbxd.class, info -> !info.getColumn().equals("id"));
|
||||||
wgdWbxd.setDataImplement(wgdWbxd.getDataImplement());
|
List<WgdWbxd> wgdAssocInfos=iWgdWbxdService.list(queryWrapper);
|
||||||
|
List<WgdWbxd> remove=new ArrayList<>();
|
||||||
|
wgdAssocInfos.forEach(WgbWbtj -> {
|
||||||
|
WgbWbtj.setId(null);
|
||||||
|
if (res.contains(WgbWbtj)){
|
||||||
|
remove.add(WgbWbtj);
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
res.forEach(resWBxd->{
|
||||||
stringBuilder.append("第"+i+"行第9列实施日期填写不符合格式要求请检查;");
|
if (null == resWBxd.getName() || "".equals(resWBxd.getName())){
|
||||||
}
|
remove.add(resWBxd);
|
||||||
try {
|
}
|
||||||
if (null!=wgdWbxd.getDataRecord() && !"".equals(wgdWbxd.getDataRecord())) {
|
if (null == resWBxd.getType() || "".equals(resWBxd.getType())){
|
||||||
wgdWbxd.setDataRecord(wgdWbxd.getDataRecord());
|
remove.add(resWBxd);
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
if (null == resWBxd.getPreside() || "".equals(resWBxd.getPreside())){
|
||||||
stringBuilder.append("第"+i+"行第12列备案时间填写不符合格式要求请检查;");
|
remove.add(resWBxd);
|
||||||
}
|
}
|
||||||
i++;
|
if (null == resWBxd.getParticipants() || "".equals(resWBxd.getParticipants())){
|
||||||
}
|
remove.add(resWBxd);
|
||||||
QueryWrapper<WgdWbxd> queryWrapper = new QueryWrapper<>();
|
}
|
||||||
queryWrapper.select(WgdWbxd.class, info -> !info.getColumn().equals("id"));
|
});
|
||||||
List<WgdWbxd> wgdAssocInfos=iWgdWbxdService.list(queryWrapper);
|
|
||||||
List<WgdWbxd> remove=new ArrayList<>();
|
|
||||||
wgdAssocInfos.forEach(WgbWbtj -> {
|
|
||||||
WgbWbtj.setId(null);
|
|
||||||
if (res.contains(WgbWbtj)){
|
|
||||||
remove.add(WgbWbtj);
|
|
||||||
}
|
|
||||||
res.forEach(resWBxd->{
|
|
||||||
if (null == resWBxd.getName() || "".equals(resWBxd.getName())){
|
|
||||||
remove.add(resWBxd);
|
|
||||||
}
|
|
||||||
if (null == resWBxd.getType() || "".equals(resWBxd.getType())){
|
|
||||||
remove.add(resWBxd);
|
|
||||||
}
|
|
||||||
if (null == resWBxd.getPreside() || "".equals(resWBxd.getPreside())){
|
|
||||||
remove.add(resWBxd);
|
|
||||||
}
|
|
||||||
if (null == resWBxd.getParticipants() || "".equals(resWBxd.getParticipants())){
|
|
||||||
remove.add(resWBxd);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
res.removeAll(remove);
|
res.removeAll(remove);
|
||||||
res.forEach(wgdAssocInfo -> {
|
res.forEach(wgdAssocInfo -> {
|
||||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||||
});
|
});
|
||||||
if (res.size()>0 && iWgdWbxdService.saveOrUpdateBatch(res)) {
|
if (res.size()>0 && iWgdWbxdService.saveOrUpdateBatch(res)) {
|
||||||
|
return res;
|
||||||
|
}else {
|
||||||
|
stringBuilder.append("表格数据全部重复");
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}else {
|
}else {
|
||||||
stringBuilder.append("表格数据全部重复");
|
return null;
|
||||||
}
|
}
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+26
-22
@@ -75,32 +75,36 @@ public class WgdZcbServiceImpl extends ServiceImpl<WgdZcbDao, WgdZcb> implements
|
|||||||
public List<WgdZcb> importZcb(MultipartFile file, StringBuilder stringBuilder) {
|
public List<WgdZcb> importZcb(MultipartFile file, StringBuilder stringBuilder) {
|
||||||
|
|
||||||
List<WgdZcb> res= ExcelImportUtilByWk.readExcelpublic(WgdZcb.class,file);
|
List<WgdZcb> res= ExcelImportUtilByWk.readExcelpublic(WgdZcb.class,file);
|
||||||
|
if (res != null){
|
||||||
QueryWrapper<WgdZcb> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<WgdZcb> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.select(WgdZcb.class, info -> !info.getColumn().equals("id"));
|
queryWrapper.select(WgdZcb.class, info -> !info.getColumn().equals("id"));
|
||||||
List<WgdZcb> wgdZcb=iWgdZcbService.list(queryWrapper);
|
List<WgdZcb> wgdZcb=iWgdZcbService.list(queryWrapper);
|
||||||
List<WgdZcb> remove=new ArrayList<>();
|
List<WgdZcb> remove=new ArrayList<>();
|
||||||
wgdZcb.forEach(WgbWbtj -> {
|
wgdZcb.forEach(WgbWbtj -> {
|
||||||
WgbWbtj.setId(null);
|
WgbWbtj.setId(null);
|
||||||
if (res.contains(WgbWbtj)){
|
if (res.contains(WgbWbtj)){
|
||||||
remove.add(WgbWbtj);
|
remove.add(WgbWbtj);
|
||||||
}
|
|
||||||
res.forEach(resZcb->{
|
|
||||||
if (null!=resZcb.getAnnexs() && !"".equals(resZcb.getAnnexs())) {
|
|
||||||
resZcb.setAnnexs(null);
|
|
||||||
}
|
}
|
||||||
});
|
res.forEach(resZcb->{
|
||||||
|
if (null!=resZcb.getAnnexs() && !"".equals(resZcb.getAnnexs())) {
|
||||||
|
resZcb.setAnnexs(null);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
res.removeAll(remove);
|
res.removeAll(remove);
|
||||||
res.forEach(wgdAssocInfo -> {
|
res.forEach(wgdAssocInfo -> {
|
||||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||||
});
|
});
|
||||||
if (res.size()>0 && iWgdZcbService.saveOrUpdateBatch(res)) {
|
if (res.size()>0 && iWgdZcbService.saveOrUpdateBatch(res)) {
|
||||||
|
return res;
|
||||||
|
}else {
|
||||||
|
stringBuilder.append("表格数据全部重复");
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}else {
|
}else {
|
||||||
stringBuilder.append("表格数据全部重复");
|
return null;
|
||||||
}
|
}
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+49
-44
@@ -90,57 +90,62 @@ public class WgdAssocCostServiceImpl extends ServiceImpl<WgdAssocCostDao, WgdAss
|
|||||||
@Override
|
@Override
|
||||||
public List<WgdAssocCost> importAssocCosts(MultipartFile file, StringBuilder stringBuilder) {
|
public List<WgdAssocCost> importAssocCosts(MultipartFile file, StringBuilder stringBuilder) {
|
||||||
List<WgdAssocCost> res= ExcelImportUtilByWk.readExcelpublic(WgdAssocCost.class,file);
|
List<WgdAssocCost> res= ExcelImportUtilByWk.readExcelpublic(WgdAssocCost.class,file);
|
||||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
if (res != null){
|
||||||
int i=1;
|
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
for (WgdAssocCost wgdAssocCost: res) {
|
int i=1;
|
||||||
if (null == wgdAssocCost.getScName() || "".equals(wgdAssocCost.getScName())){
|
for (WgdAssocCost wgdAssocCost: res) {
|
||||||
stringBuilder.append("第" + i + "行第1列协会名称-标委会填写不符合格式要求请检查;");
|
if (null == wgdAssocCost.getScName() || "".equals(wgdAssocCost.getScName())){
|
||||||
}
|
stringBuilder.append("第" + i + "行第1列协会名称-标委会填写不符合格式要求请检查;");
|
||||||
if (null == wgdAssocCost.getWgName() || "".equals(wgdAssocCost.getWgName())){
|
|
||||||
stringBuilder.append("第" + i + "行第3列协会名称-工作组填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == wgdAssocCost.getCostOutlay() || "".equals(wgdAssocCost.getCostOutlay())){
|
|
||||||
stringBuilder.append("第" + i + "行第6列费用列支填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == wgdAssocCost.getAnnualPayment() || "".equals(wgdAssocCost.getAnnualPayment())){
|
|
||||||
stringBuilder.append("第" + i + "行第7列每年缴费情况填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
QueryWrapper<WgdAssocCost> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.select(WgdAssocCost.class, info -> !info.getColumn().equals("id"));
|
|
||||||
List<WgdAssocCost> wgdAssocCost=iWgdAssocCostService.list(queryWrapper);
|
|
||||||
List<WgdAssocCost> remove=new ArrayList<>();
|
|
||||||
wgdAssocCost.forEach(WgbWbtj -> {
|
|
||||||
WgbWbtj.setId(null);
|
|
||||||
if (res.contains(WgbWbtj)){
|
|
||||||
remove.add(WgbWbtj);
|
|
||||||
}
|
|
||||||
res.forEach(resAssoc->{
|
|
||||||
if (null == resAssoc.getScName() || "".equals(resAssoc.getScName())){
|
|
||||||
remove.add(resAssoc);
|
|
||||||
}
|
}
|
||||||
if (null == resAssoc.getWgName() || "".equals(resAssoc.getWgName())){
|
if (null == wgdAssocCost.getWgName() || "".equals(wgdAssocCost.getWgName())){
|
||||||
remove.add(resAssoc);
|
stringBuilder.append("第" + i + "行第3列协会名称-工作组填写不符合格式要求请检查;");
|
||||||
}
|
}
|
||||||
if (null == resAssoc.getCostOutlay() || "".equals(resAssoc.getCostOutlay())){
|
if (null == wgdAssocCost.getCostOutlay() || "".equals(wgdAssocCost.getCostOutlay())){
|
||||||
remove.add(resAssoc);
|
stringBuilder.append("第" + i + "行第6列费用列支填写不符合格式要求请检查;");
|
||||||
}
|
}
|
||||||
if (null == resAssoc.getAnnualPayment() || "".equals(resAssoc.getAnnualPayment())){
|
if (null == wgdAssocCost.getAnnualPayment() || "".equals(wgdAssocCost.getAnnualPayment())){
|
||||||
remove.add(resAssoc);
|
stringBuilder.append("第" + i + "行第7列每年缴费情况填写不符合格式要求请检查;");
|
||||||
}
|
}
|
||||||
});
|
i++;
|
||||||
|
}
|
||||||
|
QueryWrapper<WgdAssocCost> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.select(WgdAssocCost.class, info -> !info.getColumn().equals("id"));
|
||||||
|
List<WgdAssocCost> wgdAssocCost=iWgdAssocCostService.list(queryWrapper);
|
||||||
|
List<WgdAssocCost> remove=new ArrayList<>();
|
||||||
|
wgdAssocCost.forEach(WgbWbtj -> {
|
||||||
|
WgbWbtj.setId(null);
|
||||||
|
if (res.contains(WgbWbtj)){
|
||||||
|
remove.add(WgbWbtj);
|
||||||
|
}
|
||||||
|
res.forEach(resAssoc->{
|
||||||
|
if (null == resAssoc.getScName() || "".equals(resAssoc.getScName())){
|
||||||
|
remove.add(resAssoc);
|
||||||
|
}
|
||||||
|
if (null == resAssoc.getWgName() || "".equals(resAssoc.getWgName())){
|
||||||
|
remove.add(resAssoc);
|
||||||
|
}
|
||||||
|
if (null == resAssoc.getCostOutlay() || "".equals(resAssoc.getCostOutlay())){
|
||||||
|
remove.add(resAssoc);
|
||||||
|
}
|
||||||
|
if (null == resAssoc.getAnnualPayment() || "".equals(resAssoc.getAnnualPayment())){
|
||||||
|
remove.add(resAssoc);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
res.removeAll(remove);
|
res.removeAll(remove);
|
||||||
res.forEach(wgdAssocInfo -> {
|
res.forEach(wgdAssocInfo -> {
|
||||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||||
});
|
});
|
||||||
if (res.size()>0 && iWgdAssocCostService.saveOrUpdateBatch(res)) {
|
if (res.size()>0 && iWgdAssocCostService.saveOrUpdateBatch(res)) {
|
||||||
|
return res;
|
||||||
|
}else {
|
||||||
|
stringBuilder.append("表格数据全部重复");
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}else {
|
}else {
|
||||||
stringBuilder.append("表格数据全部重复");
|
return null;
|
||||||
}
|
}
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+75
-70
@@ -79,84 +79,89 @@ public class WgdAssocInfoServiceImpl extends ServiceImpl<WgdAssocInfoDao, WgdAss
|
|||||||
@Override
|
@Override
|
||||||
public List<WgdAssocInfo> delWithWkData(MultipartFile file, StringBuilder stringBuilder) {
|
public List<WgdAssocInfo> delWithWkData(MultipartFile file, StringBuilder stringBuilder) {
|
||||||
List<WgdAssocInfo> res= ExcelImportUtilByWk.readExcelpublic(WgdAssocInfo.class,file);
|
List<WgdAssocInfo> res= ExcelImportUtilByWk.readExcelpublic(WgdAssocInfo.class,file);
|
||||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
if (res != null){
|
||||||
int i=1;
|
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
for (WgdAssocInfo importExcelDTO: res) {
|
int i=1;
|
||||||
if (null == importExcelDTO.getScName() || "".equals(importExcelDTO.getScName())){
|
for (WgdAssocInfo importExcelDTO: res) {
|
||||||
stringBuilder.append("第" + i + "行第1列协会名称-标委会填写不符合格式要求请检查;");
|
if (null == importExcelDTO.getScName() || "".equals(importExcelDTO.getScName())){
|
||||||
}
|
stringBuilder.append("第" + i + "行第1列协会名称-标委会填写不符合格式要求请检查;");
|
||||||
if (null == importExcelDTO.getSscName() || "".equals(importExcelDTO.getSscName())){
|
|
||||||
stringBuilder.append("第" + i + "行第2列协会名称-分标委填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == importExcelDTO.getWgName() || "".equals(importExcelDTO.getWgName())){
|
|
||||||
stringBuilder.append("第" + i + "行第3列协会名称-工作组填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == importExcelDTO.getRole() || "".equals(importExcelDTO.getRole())){
|
|
||||||
stringBuilder.append("第" + i + "行第4列会员角色填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == importExcelDTO.getAttend() || "".equals(importExcelDTO.getAttend())){
|
|
||||||
stringBuilder.append("第" + i + "行第5列参与人填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (null!=importExcelDTO.getIniTime() && !"".equals(importExcelDTO.getIniTime())) {
|
|
||||||
importExcelDTO.setIniTime(importExcelDTO.getIniTime());
|
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
if (null == importExcelDTO.getSscName() || "".equals(importExcelDTO.getSscName())){
|
||||||
stringBuilder.append("第"+i+"行第9列初始入会时间填写不符合格式要求请检查;");
|
stringBuilder.append("第" + i + "行第2列协会名称-分标委填写不符合格式要求请检查;");
|
||||||
}
|
}
|
||||||
try {
|
if (null == importExcelDTO.getWgName() || "".equals(importExcelDTO.getWgName())){
|
||||||
if (null!=importExcelDTO.getCurTime() && !"".equals(importExcelDTO.getCurTime())) {
|
stringBuilder.append("第" + i + "行第3列协会名称-工作组填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
if (null == importExcelDTO.getRole() || "".equals(importExcelDTO.getRole())){
|
||||||
|
stringBuilder.append("第" + i + "行第4列会员角色填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
if (null == importExcelDTO.getAttend() || "".equals(importExcelDTO.getAttend())){
|
||||||
|
stringBuilder.append("第" + i + "行第5列参与人填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (null!=importExcelDTO.getIniTime() && !"".equals(importExcelDTO.getIniTime())) {
|
||||||
|
importExcelDTO.setIniTime(importExcelDTO.getIniTime());
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
stringBuilder.append("第"+i+"行第9列初始入会时间填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (null!=importExcelDTO.getCurTime() && !"".equals(importExcelDTO.getCurTime())) {
|
||||||
|
|
||||||
importExcelDTO.setCurTime(importExcelDTO.getCurTime());
|
importExcelDTO.setCurTime(importExcelDTO.getCurTime());
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
stringBuilder.append("第"+i+"行第10列本届入会时间填写不符合格式要求请检查;");
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
try {
|
||||||
stringBuilder.append("第"+i+"行第10列本届入会时间填写不符合格式要求请检查;");
|
if (null!=importExcelDTO.getLastPayTime() && !"".equals(importExcelDTO.getLastPayTime())) {
|
||||||
|
importExcelDTO.setLastPayTime(importExcelDTO.getLastPayTime());
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
stringBuilder.append("第"+i+"行第13列上次缴纳时间填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
try {
|
QueryWrapper<WgdAssocInfo> queryWrapper = new QueryWrapper<>();
|
||||||
if (null!=importExcelDTO.getLastPayTime() && !"".equals(importExcelDTO.getLastPayTime())) {
|
queryWrapper.select(WgdAssocInfo.class, info -> !info.getColumn().equals("id"));
|
||||||
importExcelDTO.setLastPayTime(importExcelDTO.getLastPayTime());
|
List<WgdAssocInfo> wgdAssocInfos=iWgdAssocInfoService.list(queryWrapper);
|
||||||
}
|
List<WgdAssocInfo> remove=new ArrayList<>();
|
||||||
}catch (Exception e){
|
wgdAssocInfos.forEach(WgbWbtj -> {
|
||||||
stringBuilder.append("第"+i+"行第13列上次缴纳时间填写不符合格式要求请检查;");
|
WgbWbtj.setId(null);
|
||||||
}
|
if (res.contains(WgbWbtj)){
|
||||||
i++;
|
remove.add(WgbWbtj);
|
||||||
}
|
|
||||||
QueryWrapper<WgdAssocInfo> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.select(WgdAssocInfo.class, info -> !info.getColumn().equals("id"));
|
|
||||||
List<WgdAssocInfo> wgdAssocInfos=iWgdAssocInfoService.list(queryWrapper);
|
|
||||||
List<WgdAssocInfo> remove=new ArrayList<>();
|
|
||||||
wgdAssocInfos.forEach(WgbWbtj -> {
|
|
||||||
WgbWbtj.setId(null);
|
|
||||||
if (res.contains(WgbWbtj)){
|
|
||||||
remove.add(WgbWbtj);
|
|
||||||
}
|
|
||||||
res.forEach(resOne->{
|
|
||||||
if (null == resOne.getScName() || "".equals(resOne.getScName())){
|
|
||||||
remove.add(resOne);
|
|
||||||
}
|
|
||||||
if (null == resOne.getSscName() || "".equals(resOne.getSscName())){
|
|
||||||
remove.add(resOne);
|
|
||||||
}
|
|
||||||
if (null == resOne.getWgName() || "".equals(resOne.getWgName())){
|
|
||||||
remove.add(resOne);
|
|
||||||
}
|
|
||||||
if (null == resOne.getRole() || "".equals(resOne.getRole())){
|
|
||||||
remove.add(resOne);
|
|
||||||
}
|
|
||||||
if (null == resOne.getAttend() || "".equals(resOne.getAttend())){
|
|
||||||
remove.add(resOne);
|
|
||||||
}
|
}
|
||||||
|
res.forEach(resOne->{
|
||||||
|
if (null == resOne.getScName() || "".equals(resOne.getScName())){
|
||||||
|
remove.add(resOne);
|
||||||
|
}
|
||||||
|
if (null == resOne.getSscName() || "".equals(resOne.getSscName())){
|
||||||
|
remove.add(resOne);
|
||||||
|
}
|
||||||
|
if (null == resOne.getWgName() || "".equals(resOne.getWgName())){
|
||||||
|
remove.add(resOne);
|
||||||
|
}
|
||||||
|
if (null == resOne.getRole() || "".equals(resOne.getRole())){
|
||||||
|
remove.add(resOne);
|
||||||
|
}
|
||||||
|
if (null == resOne.getAttend() || "".equals(resOne.getAttend())){
|
||||||
|
remove.add(resOne);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
res.removeAll(remove);
|
||||||
res.removeAll(remove);
|
res.forEach(wgdAssocInfo -> {
|
||||||
res.forEach(wgdAssocInfo -> {
|
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
});
|
||||||
});
|
if (res.size()>0 && iWgdAssocInfoService.saveOrUpdateBatch(res)) {
|
||||||
if (res.size()>0 && iWgdAssocInfoService.saveOrUpdateBatch(res)) {
|
return res;
|
||||||
|
}else {
|
||||||
|
stringBuilder.append("表格数据全部重复");
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}else {
|
}else {
|
||||||
stringBuilder.append("表格数据全部重复");
|
return null;
|
||||||
}
|
}
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+68
-63
@@ -81,75 +81,80 @@ public class WgdCommiInfoServiceImpl extends ServiceImpl<WgdCommiInfoDao, WgdCom
|
|||||||
@Override
|
@Override
|
||||||
public List<WgdCommiInfo> importCommiInfo(MultipartFile file, StringBuilder stringBuilder) {
|
public List<WgdCommiInfo> importCommiInfo(MultipartFile file, StringBuilder stringBuilder) {
|
||||||
List<WgdCommiInfo> res= ExcelImportUtilByWk.readExcelpublic(WgdCommiInfo.class,file);
|
List<WgdCommiInfo> res= ExcelImportUtilByWk.readExcelpublic(WgdCommiInfo.class,file);
|
||||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
if (res != null){
|
||||||
int i=1;
|
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
for (WgdCommiInfo wgdCommiInfo: res) {
|
int i=1;
|
||||||
if (null == wgdCommiInfo.getScName() || "".equals(wgdCommiInfo.getScName())){
|
for (WgdCommiInfo wgdCommiInfo: res) {
|
||||||
stringBuilder.append("第" + i + "行第2列协会名称-标委会填写不符合格式要求请检查;");
|
if (null == wgdCommiInfo.getScName() || "".equals(wgdCommiInfo.getScName())){
|
||||||
}
|
stringBuilder.append("第" + i + "行第2列协会名称-标委会填写不符合格式要求请检查;");
|
||||||
if (null == wgdCommiInfo.getSscName() || "".equals(wgdCommiInfo.getSscName())){
|
|
||||||
stringBuilder.append("第" + i + "行第3列协会名称-分标委填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == wgdCommiInfo.getWgName() || "".equals(wgdCommiInfo.getWgName())){
|
|
||||||
stringBuilder.append("第" + i + "行第4列协会名称-工作组填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == wgdCommiInfo.getRole() || "".equals(wgdCommiInfo.getRole())){
|
|
||||||
stringBuilder.append("第" + i + "行第6列会员角色填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == wgdCommiInfo.getAttend() || "".equals(wgdCommiInfo.getAttend())){
|
|
||||||
stringBuilder.append("第" + i + "行第7列参与人填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
if (null == wgdCommiInfo.getTel() || "".equals(wgdCommiInfo.getTel())){
|
|
||||||
stringBuilder.append("第" + i + "行第10列参与人填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (null!=wgdCommiInfo.getCurTime() && !"".equals(wgdCommiInfo.getCurTime())) {
|
|
||||||
wgdCommiInfo.setCurTime(wgdCommiInfo.getCurTime());
|
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
if (null == wgdCommiInfo.getSscName() || "".equals(wgdCommiInfo.getSscName())){
|
||||||
stringBuilder.append("第"+i+"行第5列本届入会时间填写不符合格式要求请检查;");
|
stringBuilder.append("第" + i + "行第3列协会名称-分标委填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
if (null == wgdCommiInfo.getWgName() || "".equals(wgdCommiInfo.getWgName())){
|
||||||
|
stringBuilder.append("第" + i + "行第4列协会名称-工作组填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
if (null == wgdCommiInfo.getRole() || "".equals(wgdCommiInfo.getRole())){
|
||||||
|
stringBuilder.append("第" + i + "行第6列会员角色填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
if (null == wgdCommiInfo.getAttend() || "".equals(wgdCommiInfo.getAttend())){
|
||||||
|
stringBuilder.append("第" + i + "行第7列参与人填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
if (null == wgdCommiInfo.getTel() || "".equals(wgdCommiInfo.getTel())){
|
||||||
|
stringBuilder.append("第" + i + "行第10列参与人填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (null!=wgdCommiInfo.getCurTime() && !"".equals(wgdCommiInfo.getCurTime())) {
|
||||||
|
wgdCommiInfo.setCurTime(wgdCommiInfo.getCurTime());
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
stringBuilder.append("第"+i+"行第5列本届入会时间填写不符合格式要求请检查;");
|
||||||
|
}
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
i++;
|
QueryWrapper<WgdCommiInfo> queryWrapper = new QueryWrapper<>();
|
||||||
}
|
queryWrapper.select(WgdCommiInfo.class, info -> !info.getColumn().equals("id"));
|
||||||
QueryWrapper<WgdCommiInfo> queryWrapper = new QueryWrapper<>();
|
List<WgdCommiInfo> wgdCommiInfo=iWgdCommiInfoService.list(queryWrapper);
|
||||||
queryWrapper.select(WgdCommiInfo.class, info -> !info.getColumn().equals("id"));
|
List<WgdCommiInfo> remove=new ArrayList<>();
|
||||||
List<WgdCommiInfo> wgdCommiInfo=iWgdCommiInfoService.list(queryWrapper);
|
wgdCommiInfo.forEach(WgbWbtj -> {
|
||||||
List<WgdCommiInfo> remove=new ArrayList<>();
|
WgbWbtj.setId(null);
|
||||||
wgdCommiInfo.forEach(WgbWbtj -> {
|
if (res.contains(WgbWbtj)){
|
||||||
WgbWbtj.setId(null);
|
remove.add(WgbWbtj);
|
||||||
if (res.contains(WgbWbtj)){
|
|
||||||
remove.add(WgbWbtj);
|
|
||||||
}
|
|
||||||
res.forEach(resCommiInfo->{
|
|
||||||
if (null == resCommiInfo.getScName() || "".equals(resCommiInfo.getScName())){
|
|
||||||
remove.add(resCommiInfo);
|
|
||||||
}
|
|
||||||
if (null == resCommiInfo.getSscName() || "".equals(resCommiInfo.getSscName())){
|
|
||||||
remove.add(resCommiInfo);
|
|
||||||
}
|
|
||||||
if (null == resCommiInfo.getWgName() || "".equals(resCommiInfo.getWgName())){
|
|
||||||
remove.add(resCommiInfo);
|
|
||||||
}
|
|
||||||
if (null == resCommiInfo.getRole() || "".equals(resCommiInfo.getRole())){
|
|
||||||
remove.add(resCommiInfo);
|
|
||||||
}
|
|
||||||
if (null == resCommiInfo.getAttend() || "".equals(resCommiInfo.getAttend())){
|
|
||||||
remove.add(resCommiInfo);
|
|
||||||
}
|
|
||||||
if (null == resCommiInfo.getTel() || "".equals(resCommiInfo.getTel())){
|
|
||||||
remove.add(resCommiInfo);
|
|
||||||
}
|
}
|
||||||
|
res.forEach(resCommiInfo->{
|
||||||
|
if (null == resCommiInfo.getScName() || "".equals(resCommiInfo.getScName())){
|
||||||
|
remove.add(resCommiInfo);
|
||||||
|
}
|
||||||
|
if (null == resCommiInfo.getSscName() || "".equals(resCommiInfo.getSscName())){
|
||||||
|
remove.add(resCommiInfo);
|
||||||
|
}
|
||||||
|
if (null == resCommiInfo.getWgName() || "".equals(resCommiInfo.getWgName())){
|
||||||
|
remove.add(resCommiInfo);
|
||||||
|
}
|
||||||
|
if (null == resCommiInfo.getRole() || "".equals(resCommiInfo.getRole())){
|
||||||
|
remove.add(resCommiInfo);
|
||||||
|
}
|
||||||
|
if (null == resCommiInfo.getAttend() || "".equals(resCommiInfo.getAttend())){
|
||||||
|
remove.add(resCommiInfo);
|
||||||
|
}
|
||||||
|
if (null == resCommiInfo.getTel() || "".equals(resCommiInfo.getTel())){
|
||||||
|
remove.add(resCommiInfo);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
res.removeAll(remove);
|
||||||
res.removeAll(remove);
|
res.forEach(wgdAssocInfo -> {
|
||||||
res.forEach(wgdAssocInfo -> {
|
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
});
|
||||||
});
|
if (res.size()>0 && iWgdCommiInfoService.saveOrUpdateBatch(res)) {
|
||||||
if (res.size()>0 && iWgdCommiInfoService.saveOrUpdateBatch(res)) {
|
return res;
|
||||||
|
}else {
|
||||||
|
stringBuilder.append("表格数据全部重复");
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}else {
|
}else {
|
||||||
stringBuilder.append("表格数据全部重复");
|
return null;
|
||||||
}
|
}
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+21
-17
@@ -76,27 +76,31 @@ public class WgdExReviseCostServiceImpl extends ServiceImpl<WgdExReviseCostDao,
|
|||||||
@Override
|
@Override
|
||||||
public List<WgdExReviseCost> importExReviseCost(MultipartFile file, StringBuilder stringBuilder) {
|
public List<WgdExReviseCost> importExReviseCost(MultipartFile file, StringBuilder stringBuilder) {
|
||||||
List<WgdExReviseCost> res= ExcelImportUtilByWk.readExcelpublic(WgdExReviseCost.class,file);
|
List<WgdExReviseCost> res= ExcelImportUtilByWk.readExcelpublic(WgdExReviseCost.class,file);
|
||||||
|
if (res != null){
|
||||||
|
QueryWrapper<WgdExReviseCost> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.select(WgdExReviseCost.class, info -> !info.getColumn().equals("id"));
|
||||||
|
List<WgdExReviseCost> wgdExReviseCost=iWgdExReviseCostService.list(queryWrapper);
|
||||||
|
List<WgdExReviseCost> remove=new ArrayList<>();
|
||||||
|
wgdExReviseCost.forEach(WgbWbtj -> {
|
||||||
|
WgbWbtj.setId(null);
|
||||||
|
if (res.contains(WgbWbtj)){
|
||||||
|
remove.add(WgbWbtj);
|
||||||
|
}
|
||||||
|
|
||||||
QueryWrapper<WgdExReviseCost> queryWrapper = new QueryWrapper<>();
|
});
|
||||||
queryWrapper.select(WgdExReviseCost.class, info -> !info.getColumn().equals("id"));
|
res.removeAll(remove);
|
||||||
List<WgdExReviseCost> wgdExReviseCost=iWgdExReviseCostService.list(queryWrapper);
|
res.forEach(wgdAssocInfo -> {
|
||||||
List<WgdExReviseCost> remove=new ArrayList<>();
|
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||||
wgdExReviseCost.forEach(WgbWbtj -> {
|
});
|
||||||
WgbWbtj.setId(null);
|
if (res.size()>0 && iWgdExReviseCostService.saveOrUpdateBatch(res)) {
|
||||||
if (res.contains(WgbWbtj)){
|
return res;
|
||||||
remove.add(WgbWbtj);
|
}else {
|
||||||
|
stringBuilder.append("表格数据全部重复");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
|
||||||
res.removeAll(remove);
|
|
||||||
res.forEach(wgdAssocInfo -> {
|
|
||||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
|
||||||
});
|
|
||||||
if (res.size()>0 && iWgdExReviseCostService.saveOrUpdateBatch(res)) {
|
|
||||||
return res;
|
return res;
|
||||||
}else {
|
}else {
|
||||||
stringBuilder.append("表格数据全部重复");
|
return null;
|
||||||
}
|
}
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+32
-27
@@ -78,38 +78,43 @@ public class WgdMeetCostServiceImpl extends ServiceImpl<WgdMeetCostDao, WgdMeetC
|
|||||||
@Override
|
@Override
|
||||||
public List<WgdMeetCost> importMeetCost(MultipartFile file, StringBuilder stringBuilder) {
|
public List<WgdMeetCost> importMeetCost(MultipartFile file, StringBuilder stringBuilder) {
|
||||||
List<WgdMeetCost> res= ExcelImportUtilByWk.readExcelpublic(WgdMeetCost.class,file);
|
List<WgdMeetCost> res= ExcelImportUtilByWk.readExcelpublic(WgdMeetCost.class,file);
|
||||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
if (res != null){
|
||||||
int i=1;
|
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
for (WgdMeetCost wgdCommiInfo: res) {
|
int i=1;
|
||||||
try {
|
for (WgdMeetCost wgdCommiInfo: res) {
|
||||||
if (null!=wgdCommiInfo.getMeetTime() && !"".equals(wgdCommiInfo.getMeetTime())) {
|
try {
|
||||||
wgdCommiInfo.setMeetTime(wgdCommiInfo.getMeetTime());
|
if (null!=wgdCommiInfo.getMeetTime() && !"".equals(wgdCommiInfo.getMeetTime())) {
|
||||||
|
wgdCommiInfo.setMeetTime(wgdCommiInfo.getMeetTime());
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
stringBuilder.append("第"+i+"行第3列本届会议时间填写不符合格式要求请检查;");
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
i++;
|
||||||
stringBuilder.append("第"+i+"行第3列本届会议时间填写不符合格式要求请检查;");
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
QueryWrapper<WgdMeetCost> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.select(WgdMeetCost.class, info -> !info.getColumn().equals("id"));
|
|
||||||
List<WgdMeetCost> wgdMeetCost=iWgdMeetCostService.list(queryWrapper);
|
|
||||||
List<WgdMeetCost> remove=new ArrayList<>();
|
|
||||||
wgdMeetCost.forEach(WgbWbtj -> {
|
|
||||||
WgbWbtj.setId(null);
|
|
||||||
if (res.contains(WgbWbtj)){
|
|
||||||
remove.add(WgbWbtj);
|
|
||||||
}
|
}
|
||||||
|
QueryWrapper<WgdMeetCost> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.select(WgdMeetCost.class, info -> !info.getColumn().equals("id"));
|
||||||
|
List<WgdMeetCost> wgdMeetCost=iWgdMeetCostService.list(queryWrapper);
|
||||||
|
List<WgdMeetCost> remove=new ArrayList<>();
|
||||||
|
wgdMeetCost.forEach(WgbWbtj -> {
|
||||||
|
WgbWbtj.setId(null);
|
||||||
|
if (res.contains(WgbWbtj)){
|
||||||
|
remove.add(WgbWbtj);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
res.removeAll(remove);
|
res.removeAll(remove);
|
||||||
res.forEach(wgdAssocInfo -> {
|
res.forEach(wgdAssocInfo -> {
|
||||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||||
});
|
});
|
||||||
if (res.size()>0 && iWgdMeetCostService.saveOrUpdateBatch(res)) {
|
if (res.size()>0 && iWgdMeetCostService.saveOrUpdateBatch(res)) {
|
||||||
|
return res;
|
||||||
|
}else {
|
||||||
|
stringBuilder.append("表格数据全部重复");
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}else {
|
}else {
|
||||||
stringBuilder.append("表格数据全部重复");
|
return null;
|
||||||
}
|
}
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user