62 lines
1.7 KiB
Java
62 lines
1.7 KiB
Java
package com.zcloud.controller.gatemachine;
|
||
|
||
import com.zcloud.controller.base.BaseController;
|
||
import com.zcloud.entity.Page;
|
||
import com.zcloud.entity.PageData;
|
||
import com.zcloud.service.gatemachine.GateMachineService;
|
||
import com.zcloud.util.Jurisdiction;
|
||
import com.zcloud.util.ReturnMap;
|
||
import org.springframework.web.bind.annotation.RequestMapping;
|
||
import org.springframework.web.bind.annotation.RestController;
|
||
|
||
import javax.annotation.Resource;
|
||
import java.util.ArrayList;
|
||
|
||
/**
|
||
* 说明:TODO
|
||
* 作者:wangxuan
|
||
* 官网:www.zcloudchina.com
|
||
*/
|
||
@RestController
|
||
@RequestMapping("/gateMachine")
|
||
public class GateMachineController extends BaseController {
|
||
|
||
@Resource
|
||
private GateMachineService gateMachineService;
|
||
|
||
|
||
|
||
@RequestMapping(value = "/page")
|
||
public ReturnMap page(Page page) {
|
||
PageData pageData = this.getPageData();
|
||
page.setPd(pageData);
|
||
ArrayList<PageData> data = gateMachineService.getDatalistpage(page);
|
||
ReturnMap returnMap = new ReturnMap();
|
||
returnMap.put("varList", data);
|
||
returnMap.put("page", page);
|
||
return returnMap;
|
||
}
|
||
|
||
|
||
@RequestMapping(value = "/edit")
|
||
public ReturnMap edit() {
|
||
PageData pd = this.getPageData();
|
||
gateMachineService.edit(pd);
|
||
return ReturnMap.ok();
|
||
}
|
||
@RequestMapping(value = "/removeByIds")
|
||
public ReturnMap removeByIds() {
|
||
PageData pageData = this.getPageData();
|
||
gateMachineService.removeByIds(pageData);
|
||
return ReturnMap.ok();
|
||
}
|
||
@RequestMapping(value = "/add")
|
||
public ReturnMap add() {
|
||
PageData pageData = this.getPageData();
|
||
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||
gateMachineService.save(pageData);
|
||
return ReturnMap.ok();
|
||
}
|
||
|
||
}
|