1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package pwc.taxtech.atms.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.IdModel;
import pwc.taxtech.atms.dto.OrganizationStructureDto;
import pwc.taxtech.atms.dto.OrganizationStructureInputDto;
import pwc.taxtech.atms.service.impl.OrganizationStructureServiceImpl;
import java.util.List;
@RestController
@RequestMapping("/api/v1/organizationstructure")
public class OrganizationStructureController {
private static Logger logger = LoggerFactory.getLogger(OrganizationStructureController.class);
@Autowired
private OrganizationStructureServiceImpl organizationStructureService;
// @ApiOperation(value = "主数据机构层级查询")
@RequestMapping(value = "/getlist", method = RequestMethod.GET)
public @ResponseBody
List<OrganizationStructureDto> getOrganizationStructures() {
logger.debug("OrganizationStructureController /getlist");
return organizationStructureService.getOrganizationStructures();
}
// @ApiOperation(value = "主数据机构层级增加")
// @ApiImplicitParam(name = "organizationStructureDtoList", value = "organizationStructureDto List", required = true, dataType = "List<OrganizationStructureDto>")
@RequestMapping(value = "/add", method = RequestMethod.POST)
public void addOrganizationStructures(@RequestBody List<OrganizationStructureInputDto> organizationStructureDtoList) {
logger.debug("OrganizationStructureController /add");
organizationStructureService.addOrganizationStructures(organizationStructureDtoList);
}
// @ApiOperation(value = "主数据机构层级删除")
// @ApiImplicitParam(name = "idModel", value = "idModel", required = true, dataType = "IdModel")
@RequestMapping(value = "/delete", method = RequestMethod.POST)
public @ResponseBody
Integer deleteOrganizationStructure(@RequestBody IdModel idModel) {
logger.debug("OrganizationStructureController /delete");
return organizationStructureService.deleteOrganizationStructure(idModel);
}
// @ApiOperation(value = "主数据机构层级修改")
// @ApiImplicitParam(name = "organizationStructureDtoList", value = "organizationStructureDto List", required = true, dataType = "List<OrganizationStructureDto>")
@RequestMapping(method = RequestMethod.PUT)
public @ResponseBody
Boolean updateOrganizationStructure(@RequestBody List<OrganizationStructureInputDto> organizationStructureDtoList) {
logger.debug("OrganizationStructureController update");
return organizationStructureService.updateOrganizationStructures(organizationStructureDtoList);
}
}