修改OTA批量编辑
This commit is contained in:
+8
-4
@@ -1098,7 +1098,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
List<String> idList = list.stream()
|
||||
.filter(e -> StringUtils.isNotBlank(e.getProjectVersion()))
|
||||
.map(OtaManageApplyEO::getProjectVersion).distinct().collect(Collectors.toList());
|
||||
List<ProjectLibraryBase> proList = projectLibraryBaseService.queryList(idList);
|
||||
List<ProjectLibraryBase> proList = projectLibraryBaseService.getListByIds(idList);
|
||||
for (ProjectLibraryBase plb : proList) {
|
||||
res.put(plb.getId(), plb.getShowName());
|
||||
}
|
||||
@@ -1173,15 +1173,15 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
conSb.append(user.getUsername()).append(" : ");
|
||||
conSbEn.append(user.getUsername()).append(" : ");
|
||||
if (StringUtils.isNotEmpty(oma.getProjectVersion())) {
|
||||
conSb.append("‘项目版本‘ 由 ‘空‘").append(" 改为 ‘").append(proNameMap.get(oma.getProjectVersion())).append("‘.");
|
||||
conSb.append("‘项目版本‘ 由 ‘null‘").append(" 改为 ‘").append(proNameMap.get(oma.getProjectVersion())).append("‘.");
|
||||
conSbEn.append("‘Project Version‘ change from ‘null‘").append(" to ‘").append(proNameMap.get(oma.getProjectVersion())).append("‘.");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(oma.getAttestationSchedule())) {
|
||||
conSb.append("‘认证进度‘ 由 ‘空‘").append(" 改为 ‘").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getName()).append("‘.");
|
||||
conSb.append("‘认证进度‘ 由 ‘null‘").append(" 改为 ‘").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getName()).append("‘.");
|
||||
conSbEn.append("‘Homologation Progress‘ change from ‘null‘").append(" to ‘").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getValue()).append("‘.");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(oma.getRemark()) && !oma.getRemark().equals("--")) {
|
||||
conSb.append("‘备注‘ 由 ‘空‘").append(" 改为 ‘").append(oma.getRemark()).append("‘.");
|
||||
conSb.append("‘备注‘ 由 ‘null‘").append(" 改为 ‘").append(oma.getRemark()).append("‘.");
|
||||
conSbEn.append("‘Remark‘ change from ‘null‘").append(" to ‘").append(oma.getRemark()).append("‘.");
|
||||
}
|
||||
his.setContentCn(conSb.toString());
|
||||
@@ -1191,6 +1191,10 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
}
|
||||
}
|
||||
if (saveList.size() > 0) {
|
||||
List<String> delList = saveList.stream()
|
||||
.filter(e -> StringUtils.isNotBlank(e.getId()))
|
||||
.map(OtaManageApplyEO::getId).distinct().collect(Collectors.toList());
|
||||
this.deleteByIds(delList);
|
||||
this.saveOrUpdateBatch(saveList);
|
||||
otaManageHistoryService.saveBatch(hisList);
|
||||
}
|
||||
|
||||
+4
@@ -26,4 +26,8 @@ public interface ProjectLibraryBaseMapper extends BaseMapper<ProjectLibraryBase>
|
||||
List<ProjectLibraryBase> queryById(String id);
|
||||
|
||||
ProjectLibraryBase selectProjectName(@Param("projectLibraryId") String projectLibraryId);
|
||||
|
||||
List<ProjectLibraryBase> getListByIds(@Param("idList") List<String> idList);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+10
@@ -290,4 +290,14 @@
|
||||
WHERE
|
||||
plb.id = #{projectLibraryId}
|
||||
</select>
|
||||
|
||||
<select id="getListByIds" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
|
||||
|
||||
<include refid="select_item"/>
|
||||
where plb.id in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
order by plb.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+2
@@ -186,4 +186,6 @@ public interface IProjectLibraryBaseService extends IService<ProjectLibraryBase>
|
||||
Result<?> overallReplacementUser(JSONObject json);
|
||||
|
||||
List<ProjectLibraryBase> queryList(List<String> projectIdList);
|
||||
|
||||
List<ProjectLibraryBase> getListByIds(List<String> projectIdList);
|
||||
}
|
||||
|
||||
+9
@@ -3525,6 +3525,15 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
List<ProjectLibraryBase> res = this.list(queryWrapper);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectLibraryBase> getListByIds(List<String> projectIdList) {
|
||||
List<ProjectLibraryBase> res = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(projectIdList)){
|
||||
res = this.getBaseMapper().getListByIds(projectIdList);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user