特种作业人员对接
parent
b59f7dee6d
commit
e446d1d43b
|
@ -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<String,Object> map = new HashMap<String,Object>();
|
||||
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<String,String> map = new HashMap<String,String>();
|
||||
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<String,Object> map = new HashMap<String,Object>();
|
||||
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<String,Object> map = new HashMap<String,Object>();
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue