文档库--导入
This commit is contained in:
+32
-2
@@ -1022,6 +1022,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
if(fieldDateList.contains(key)){
|
if(fieldDateList.contains(key)){
|
||||||
if (ObjectUtils.isNotEmpty(value)) {
|
if (ObjectUtils.isNotEmpty(value)) {
|
||||||
value = "str_to_date('" + value + "','%Y-%m-%d')";
|
value = "str_to_date('" + value + "','%Y-%m-%d')";
|
||||||
|
}else{
|
||||||
|
value = null;
|
||||||
}
|
}
|
||||||
valuesBuilder.append("," + value);
|
valuesBuilder.append("," + value);
|
||||||
}else {
|
}else {
|
||||||
@@ -3264,9 +3266,37 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
for (Map<String, String> stringStringMap : dataList) {
|
for (Map<String, String> stringStringMap : dataList) {
|
||||||
Map<String, Object> mapResult = new HashMap<>();
|
Map<String, Object> mapResult = new HashMap<>();
|
||||||
i++;
|
i++;
|
||||||
|
int countError = 0; //记录失败数据数量
|
||||||
|
String errorMsg = "第" + i + "行:";
|
||||||
|
//判断发布日期,新车型实施日期,在产车实施日期
|
||||||
|
|
||||||
|
// try {
|
||||||
|
// String issueTime = (String) stringStringMap.get("issue_time");
|
||||||
|
// if(StringUtils.isNotBlank(issueTime)){
|
||||||
|
// SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
// Date issueTimeDate = df.parse(issueTime);
|
||||||
|
// String implementTime = (String) stringStringMap.get("implement_time");//在产车实施日期
|
||||||
|
// String newCarimplementTime = (String) stringStringMap.get("xin1_che1_xing2_ren4_zheng4_shi2_jian1");//新车型实施日期
|
||||||
|
// if(StringUtils.isNotBlank(implementTime)){
|
||||||
|
// Date implementTimeDate = df.parse(implementTime);
|
||||||
|
// if (issueTimeDate.after(implementTimeDate)) {
|
||||||
|
// errorMsg += "发布日期不能大于在产车实施日期";
|
||||||
|
// countError++;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if(StringUtils.isNotBlank(newCarimplementTime)){
|
||||||
|
// Date newCarimplementTimeDate = df.parse(newCarimplementTime);
|
||||||
|
// if (issueTimeDate.after(newCarimplementTimeDate)) {
|
||||||
|
// errorMsg += "发布日期不能大于新车型实施日期";
|
||||||
|
// countError++;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// log.error("文档库导入失败导入");
|
||||||
|
// }
|
||||||
for (Map.Entry<String, String> entry : stringStringMap.entrySet()) {
|
for (Map.Entry<String, String> entry : stringStringMap.entrySet()) {
|
||||||
int countError = 0; //记录失败数据数量
|
|
||||||
String errorMsg = "第" + i + "行:";
|
|
||||||
String key = entry.getKey();
|
String key = entry.getKey();
|
||||||
if (key.contains("*")) {
|
if (key.contains("*")) {
|
||||||
key = key.replace("*", "");
|
key = key.replace("*", "");
|
||||||
|
|||||||
Reference in New Issue
Block a user