From e446d1d43b1d92edbb852f54e212d9f1f67fb735 Mon Sep 17 00:00:00 2001 From: limingyu Date: Mon, 8 Jan 2024 18:36:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=B9=E7=A7=8D=E4=BD=9C=E4=B8=9A=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/bus/SpecialUserController.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/main/java/com/zcloud/controller/bus/SpecialUserController.java b/src/main/java/com/zcloud/controller/bus/SpecialUserController.java index 7199fc23..a9ec9962 100644 --- a/src/main/java/com/zcloud/controller/bus/SpecialUserController.java +++ b/src/main/java/com/zcloud/controller/bus/SpecialUserController.java @@ -6,6 +6,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import com.alibaba.fastjson.JSON; +import com.zcloud.aspect.DockAnnotation; import com.zcloud.service.system.UsersService; import com.zcloud.util.Jurisdiction; import org.springframework.beans.factory.annotation.Autowired; @@ -45,18 +47,25 @@ public class SpecialUserController extends BaseController { @RequestMapping(value="/add") @RequiresPermissions("specialuser:add") @ResponseBody + @DockAnnotation(isAdd = true) public Object add() throws Exception{ Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); + PageData dockData = new PageData(); // 主要对接数据 + + PageData blindPageData = new PageData(); // pd对接数据 pd.put("SPECIALUSER_ID", this.get32UUID()); //主键 pd.put("CREATOR", Jurisdiction.getUSER_ID()); pd.put("CREATTIME", DateUtil.date2Str(new Date())); pd.put("OPERATOR",Jurisdiction.getUSER_ID()); pd.put("OPERATTIME",DateUtil.date2Str(new Date())); pd.put("ISDELETE","0"); + blindPageData.putAll(pd); + dockData.put("dockData", JSON.toJSONString(blindPageData)); specialuserService.save(pd); + map.put("dockData", JSON.toJSONString(dockData)); map.put("result", errInfo); return map; } @@ -68,11 +77,14 @@ public class SpecialUserController extends BaseController { @RequestMapping(value="/delete") @RequiresPermissions("specialuser:del") @ResponseBody + @DockAnnotation public Object delete() throws Exception{ Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); + PageData dockData = new PageData(); // 主要对接数据 + // 修改与删除功能仅企业主账号可操作,并仅可修改与删除本单位添加的特种人员信息 String corpID = Jurisdiction.getCORPINFO_ID(); // 登录企业信息 @@ -103,7 +115,11 @@ public class SpecialUserController extends BaseController { pd.put("OPERATOR",Jurisdiction.getUSER_ID()); pd.put("ISDELETE","0"); pd = this.getPageData(); + PageData blindPageData = new PageData(); // pd对接数据 + blindPageData.putAll(pd); + dockData.put("dockData", JSON.toJSONString(blindPageData)); specialuserService.delete(pd); + map.put("dockData", JSON.toJSONString(dockData)); map.put("result", errInfo); //返回结果 return map; } @@ -115,11 +131,13 @@ public class SpecialUserController extends BaseController { @RequestMapping(value="/edit") @RequiresPermissions("specialuser:edit") @ResponseBody + @DockAnnotation public Object edit() throws Exception{ Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); + PageData dockData = new PageData(); // 修改与删除功能仅企业主账号可操作,并仅可修改与删除本单位添加的特种人员信息 String corpID = Jurisdiction.getCORPINFO_ID(); // 登录企业信息 @@ -145,7 +163,11 @@ public class SpecialUserController extends BaseController { map.put("msg", "您不是企业主账号!请联系企业主账号进行修改!"); return map; } + PageData blindPageData = new PageData(); // pd对接数据 + blindPageData.putAll(pd); + dockData.put("dockData", JSON.toJSONString(blindPageData)); specialuserService.edit(pd); + map.put("dockData", JSON.toJSONString(dockData)); map.put("result", errInfo); return map; } @@ -198,11 +220,16 @@ public class SpecialUserController extends BaseController { @RequestMapping(value="/deleteAll") @RequiresPermissions("specialuser:del") @ResponseBody + @DockAnnotation public Object deleteAll() throws Exception{ Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); + PageData dockData = new PageData(); + PageData blindPageData = new PageData(); // pd对接数据 + blindPageData.putAll(pd); + dockData.put("dockData", JSON.toJSONString(blindPageData)); String DATA_IDS = pd.getString("DATA_IDS"); if(Tools.notEmpty(DATA_IDS)){ String ArrayDATA_IDS[] = DATA_IDS.split(","); @@ -211,6 +238,7 @@ public class SpecialUserController extends BaseController { }else{ errInfo = "fail"; } + map.put("dockData", JSON.toJSONString(dockData)); map.put("result", errInfo); //返回结果 return map; }