parent
5f53def846
commit
10ae5aabea
|
@ -506,10 +506,12 @@ public class IdentificationPartsController extends BaseController {
|
|||
@SuppressWarnings("unchecked")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@DockAnnotation
|
||||
public Object readExcel(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
StringBuffer errorStr = new StringBuffer();
|
||||
List<PageData> pageDataList = new ArrayList<>();
|
||||
if (null != file && !file.isEmpty()) {
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||
if (!"xls".equals(suffixName)) {
|
||||
|
@ -612,6 +614,7 @@ public class IdentificationPartsController extends BaseController {
|
|||
}
|
||||
if(Tools.isEmpty(errorStr.toString())) {
|
||||
for (PageData pageData : saveList) {
|
||||
pageDataList.add(pageData);
|
||||
identificationpartsService.save(pageData);
|
||||
}
|
||||
errorStr.append("成功导入"+saveList.size()+"条数据!");
|
||||
|
@ -638,6 +641,7 @@ public class IdentificationPartsController extends BaseController {
|
|||
map.put("result", errInfo); //返回结果
|
||||
map.put("isExcel","1"); //返回类型
|
||||
map.put("resultStr", errorStr.toString());
|
||||
map.put("dockData", JSON.toJSONString(pageDataList));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
|
@ -808,6 +808,7 @@ public class RiskPointController extends BaseController {
|
|||
@SuppressWarnings("unchecked")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@DockAnnotation
|
||||
public Object readExcel2(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
|
@ -815,6 +816,7 @@ public class RiskPointController extends BaseController {
|
|||
pdPublic = this.getPageData();
|
||||
StringBuffer errorStr = new StringBuffer();
|
||||
List<PageData> rList = new ArrayList<PageData>();
|
||||
List<PageData> pageDataList = new ArrayList<>();
|
||||
if (null != file && !file.isEmpty()) {
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||
if (!"xls".equals(suffixName)) {
|
||||
|
@ -1040,6 +1042,7 @@ public class RiskPointController extends BaseController {
|
|||
|
||||
if(Tools.isEmpty(errorStr.toString())) {
|
||||
for(PageData r:rList) {
|
||||
pageDataList.add(r);
|
||||
riskpointService.save(r);
|
||||
PageData riskcheckitem = new PageData();
|
||||
riskcheckitem.put("RISKCHECKITEM_ID", this.get32UUID()); //主键
|
||||
|
@ -1064,6 +1067,8 @@ public class RiskPointController extends BaseController {
|
|||
map.put("msg",errorStr.toString()); //返回结果
|
||||
map.put("isExcel","1"); //返回类型
|
||||
map.put("resultStr", errorStr.toString());
|
||||
pdPublic.put("pageDataList",JSON.toJSONString(pageDataList));
|
||||
map.put("dockData", JSON.toJSONString(pdPublic));
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -407,11 +407,13 @@ public class RiskUnitController extends BaseController {
|
|||
@SuppressWarnings("unchecked")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@DockAnnotation
|
||||
public Object readExcel(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
String errInfo = "success";
|
||||
String type = "warning";
|
||||
StringBuffer errorStr = new StringBuffer();
|
||||
List<PageData> pageDataList = new ArrayList<>();
|
||||
if (null != file && !file.isEmpty()) {
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||
if (!"xls".equals(suffixName)) {
|
||||
|
@ -510,6 +512,7 @@ public class RiskUnitController extends BaseController {
|
|||
}
|
||||
if (Tools.isEmpty(errorStr.toString())) {
|
||||
for (PageData riskunit : riskunitList) {
|
||||
pageDataList.add(riskunit);
|
||||
riskunitService.save(riskunit);
|
||||
}
|
||||
errorStr.append("成功导入" + riskunitList.size() + "条数据!");
|
||||
|
@ -533,6 +536,7 @@ public class RiskUnitController extends BaseController {
|
|||
map.put("msg", errorStr.toString()); //返回结果
|
||||
map.put("type", type); //返回结果
|
||||
map.put("isExcel", "1"); //返回类型
|
||||
map.put("dockData", JSON.toJSONString(pageDataList));
|
||||
map.put("resultStr", errorStr.toString());
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -132,6 +132,7 @@ public class MfolderController extends BaseController {
|
|||
@RequestMapping(value = "/batchUpload")
|
||||
@RequiresPermissions("mfolder:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object batchUpload(@RequestParam(value = "FFILE", required = false) MultipartFile[] files,
|
||||
@RequestParam(value = "NAME", required = false) String NAME,
|
||||
@RequestParam(value = "PARENT_ID", required = false) String PARENT_ID,
|
||||
|
@ -184,6 +185,7 @@ public class MfolderController extends BaseController {
|
|||
}
|
||||
}
|
||||
}
|
||||
map.put("dockData", JSON.toJSONString(pd));
|
||||
map.put("result", errInfo); // 返回结果
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -1949,11 +1949,18 @@ public class UsersController extends BaseController {
|
|||
// @RequiresPermissions("fromExcel")
|
||||
@SuppressWarnings("unchecked")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object readExcel3(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception {
|
||||
String errInfo = "success";
|
||||
Map<String, Object> retMap = new HashMap<>();
|
||||
PageData pd = new PageData();
|
||||
StringBuffer msgString = new StringBuffer();
|
||||
List<PageData> departmentServiceList = new ArrayList<>();
|
||||
List<PageData> crewServiceList = new ArrayList<>();
|
||||
List<PageData> postServiceList = new ArrayList<>();
|
||||
List<PageData> usersServiceList = new ArrayList<>();
|
||||
List<PageData> userInfoServiceList = new ArrayList<>();
|
||||
List<PageData> dictionariesCorpServiceList = new ArrayList<>();
|
||||
String type = "";
|
||||
if (null != file && !file.isEmpty()) {
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||
|
@ -2150,6 +2157,7 @@ public class UsersController extends BaseController {
|
|||
userPd.put("WORKING_DATE", pageData.getString("var8"));
|
||||
userPd.put("DEPARTMENT_ID", realDept);
|
||||
userPd.put("INCUMBENCY", pageData.getString("var9"));
|
||||
userPd.put("CARDNO", pageData.getString("var10"));
|
||||
addUser.put(pageData.getString("var4"), userPd);
|
||||
} else {
|
||||
msgString.append("第" + i + "行用户重复;");
|
||||
|
@ -2170,6 +2178,7 @@ public class UsersController extends BaseController {
|
|||
dept.put("PARENT_ID", corpId);
|
||||
dept.put("DEP_ORDER", deptOrder);
|
||||
dept.put("ISSUPERVISE", "0");
|
||||
departmentServiceList.add(dept);
|
||||
departmentService.save(dept);
|
||||
deptOrder++;
|
||||
}
|
||||
|
@ -2185,6 +2194,7 @@ public class UsersController extends BaseController {
|
|||
dept.put("PARENT_ID", deptIdAndBauziId[0]);
|
||||
dept.put("DEP_ORDER", deptOrder);
|
||||
dept.put("ISSUPERVISE", "0");
|
||||
crewServiceList.add(dept);
|
||||
departmentService.save(dept);
|
||||
}
|
||||
for (Map.Entry<String, String> entry : addPostMap.entrySet()) { //岗位
|
||||
|
@ -2201,6 +2211,7 @@ public class UsersController extends BaseController {
|
|||
post.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
post.put("OPERATOR", Jurisdiction.getUSER_ID());
|
||||
post.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||
postServiceList.add(post);
|
||||
postService.save(post);
|
||||
}
|
||||
for (Map.Entry<String, Object> entry : addUser.entrySet()) {
|
||||
|
@ -2219,6 +2230,7 @@ public class UsersController extends BaseController {
|
|||
userPd.put("ISMAIN", "0");
|
||||
userPd.put("SORT", "0");
|
||||
userPd.put("ISDELETE", "0");
|
||||
userPd.put("CARDNO", pageData.get("CARDNO"));
|
||||
|
||||
// 判断是否添加在线学习人员字段信息
|
||||
if (
|
||||
|
@ -2230,6 +2242,7 @@ public class UsersController extends BaseController {
|
|||
) {
|
||||
userPd.put("IS_ONLINELEARNING", "1");
|
||||
}
|
||||
usersServiceList.add(userPd);
|
||||
usersService.saveUser(userPd);
|
||||
|
||||
PageData userInfo = new PageData();
|
||||
|
@ -2262,6 +2275,7 @@ public class UsersController extends BaseController {
|
|||
userInfo.put("INCUMBENCY", dictionaries.get("DICTIONARIES_ID"));
|
||||
}
|
||||
}
|
||||
userInfoServiceList.add(userInfo);
|
||||
userInfoService.save(userInfo);
|
||||
}
|
||||
|
||||
|
@ -2279,6 +2293,7 @@ public class UsersController extends BaseController {
|
|||
dicCorp.put("OPERATOR", Jurisdiction.getUSER_ID());
|
||||
dicCorp.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||
dicCorp.put("ISDELETE", "0");
|
||||
dictionariesCorpServiceList.add(dicCorp);
|
||||
dictionariesCorpService.save(dicCorp);
|
||||
}
|
||||
for (Map.Entry<String, String> entry : addzhichengMap.entrySet()) {
|
||||
|
@ -2295,6 +2310,7 @@ public class UsersController extends BaseController {
|
|||
dicCorp.put("OPERATOR", Jurisdiction.getUSER_ID());
|
||||
dicCorp.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||
dicCorp.put("ISDELETE", "0");
|
||||
dictionariesCorpServiceList.add(dicCorp);
|
||||
dictionariesCorpService.save(dicCorp);
|
||||
}
|
||||
File old = new File(filePath, fileName);
|
||||
|
@ -2303,6 +2319,14 @@ public class UsersController extends BaseController {
|
|||
retMap.put("msg", msgString.toString()); //返回结果
|
||||
retMap.put("type", type); //返回结果
|
||||
retMap.put("result", errInfo); //返回结果
|
||||
PageData pageData = new PageData();
|
||||
pageData.put("departmentServiceList", departmentServiceList);
|
||||
pageData.put("crewServiceList", crewServiceList);
|
||||
pageData.put("postServiceList", postServiceList);
|
||||
pageData.put("usersServiceList", usersServiceList);
|
||||
pageData.put("userInfoServiceList", userInfoServiceList);
|
||||
pageData.put("dictionariesCorpServiceList", dictionariesCorpServiceList);
|
||||
retMap.put("dockData", JSON.toJSONString(pageData));
|
||||
return retMap;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue