2024-01-08 18:07:37 +08:00
|
|
|
|
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;
|
2024-01-09 16:01:16 +08:00
|
|
|
|
import com.zcloud.util.Jurisdiction;
|
2024-01-08 18:07:37 +08:00
|
|
|
|
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();
|
2024-01-09 16:01:16 +08:00
|
|
|
|
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
2024-01-08 18:07:37 +08:00
|
|
|
|
gateMachineService.save(pageData);
|
|
|
|
|
return ReturnMap.ok();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|