Merge branch 'master' of http://192.168.0.75:3000/liux/gs_sub_evaluate
This commit is contained in:
commit
7e678c83d9
|
|
@ -38,7 +38,7 @@ import java.util.regex.Pattern;
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/backstage/violations/")
|
@RequestMapping("/backstage/violations/")
|
||||||
public class ViolationController extends BaseController<ViolationBean> {
|
public class ViolationController extends BaseController<ViolationBean> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ViolationService service;
|
private ViolationService service;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
@ -252,7 +252,7 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
ar.setFailMsg("第" + errorNum + "行数据有误字段不能为空,导入失败");
|
ar.setFailMsg("第" + (errorNum-1) + "行数据有误字段不能为空,导入失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (wb != null) {
|
if (wb != null) {
|
||||||
|
|
@ -276,7 +276,7 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
String idCard = getValue(sheetRow.getCell(4)).trim();
|
String idCard = getValue(sheetRow.getCell(4)).trim();
|
||||||
String phone = translateToPlainStr(getValue(sheetRow.getCell(5)).trim());
|
String phone = translateToPlainStr(getValue(sheetRow.getCell(5)).trim());
|
||||||
if (StringUtils.isBlank(enterpriseName) || StringUtils.isBlank(socialCreditCode) || StringUtils.isBlank(setTime) || StringUtils.isBlank(corporateName) || StringUtils.isBlank(idCard) || StringUtils.isBlank(phone)) {
|
if (StringUtils.isBlank(enterpriseName) || StringUtils.isBlank(socialCreditCode) || StringUtils.isBlank(setTime) || StringUtils.isBlank(corporateName) || StringUtils.isBlank(idCard) || StringUtils.isBlank(phone)) {
|
||||||
ar.setFailMsg("第" + rownum + "行数据有误字段不能为空,导入失败");
|
ar.setFailMsg("第" + (rownum-1) + "行数据有误字段不能为空,导入失败");
|
||||||
ar.setRes(2);
|
ar.setRes(2);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
||||||
|
|
@ -299,11 +299,21 @@
|
||||||
// 告诉jQuery不要去设置Content-Type请求头
|
// 告诉jQuery不要去设置Content-Type请求头
|
||||||
contentType: false,
|
contentType: false,
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
layer.close(idx);
|
/* layer.close(idx);
|
||||||
layer.msg('导入成功', {icon: 1, time: 2000});
|
layer.msg('导入成功', {icon: 1, time: 2000});
|
||||||
search(1)
|
search(1)*/
|
||||||
|
if (data.res === 0) {
|
||||||
|
layer.close(idx);
|
||||||
|
layer.msg('导入失败' + data.resMsg, { icon: 1, time: 2000 });
|
||||||
|
} else {
|
||||||
|
layer.close(idx);
|
||||||
|
layer.msg('导入成功', { icon: 1, time: 2000 });
|
||||||
|
search(1)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
error: function (data) {
|
||||||
|
alert(data);
|
||||||
|
console.log("我不好",data)
|
||||||
layer.close(idx);
|
layer.close(idx);
|
||||||
layer.msg('导入成功', {icon: 2, time: 2000});
|
layer.msg('导入成功', {icon: 2, time: 2000});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue