重点工程部分代码

pull/14/head
z 2023-12-19 17:06:28 +08:00
parent fbc6be15c1
commit 0679647cfd
2 changed files with 11 additions and 0 deletions

View File

@ -1,5 +1,7 @@
package com.zcloud.controller.keyProjects;
import com.alibaba.fastjson.JSON;
import com.zcloud.aspect.DockAnnotation;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
@ -37,6 +39,7 @@ public class PersonnelManagementController extends BaseController {
@RequestMapping(value = "/add")
@RequiresPermissions("personnelmanagement:add")
@ResponseBody
@DockAnnotation(isAdd = true)
public Object add() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -50,6 +53,7 @@ public class PersonnelManagementController extends BaseController {
pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("PHONENUM"), Const.DEFAULT_PASSWORD).toString());
personnelmanagementService.save(pd);
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(pd));
return map;
}

View File

@ -1,5 +1,7 @@
package com.zcloud.controller.keyProjects;
import com.alibaba.fastjson.JSON;
import com.zcloud.aspect.DockAnnotation;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
@ -41,6 +43,7 @@ public class UnitsController extends BaseController {
@RequestMapping(value = "/add")
@RequiresPermissions("units:add")
@ResponseBody
@DockAnnotation(isAdd = true)
public Object add(@RequestParam(value = "file", required = false) MultipartFile file) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -69,6 +72,7 @@ public class UnitsController extends BaseController {
}
// List<PageData> list = unitsService.listAll(pd);
unitsService.save(pd);
map.put("dockData", JSON.toJSONString(pd));
map.put("result", errInfo);
return map;
}
@ -82,6 +86,7 @@ public class UnitsController extends BaseController {
@RequestMapping(value = "/delete")
@RequiresPermissions("units:del")
@ResponseBody
@DockAnnotation
public Object delete() throws Exception {
Map<String, String> map = new HashMap<String, String>();
String errInfo = "success";
@ -108,6 +113,7 @@ public class UnitsController extends BaseController {
@RequestMapping(value = "/edit")
@RequiresPermissions("units:edit")
@ResponseBody
@DockAnnotation(isAdd = true)
public Object edit(@RequestParam(value = "file", required = false) MultipartFile file) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -236,6 +242,7 @@ public class UnitsController extends BaseController {
@RequestMapping(value = "/deleteAll")
@RequiresPermissions("units:del")
@ResponseBody
@DockAnnotation
public Object deleteAll() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";