|
@@ -88,7 +88,6 @@ import io.swagger.annotations.ApiOperation;
|
|
* @date 2019年6月11日
|
|
* @date 2019年6月11日
|
|
* @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
|
|
* @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
|
|
*/
|
|
*/
|
|
-@Transactional
|
|
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("${$rmp.ctr.basic}/org")
|
|
@RequestMapping("${$rmp.ctr.basic}/org")
|
|
public class OrgController extends ControllerSupport {
|
|
public class OrgController extends ControllerSupport {
|
|
@@ -775,6 +774,7 @@ public class OrgController extends ControllerSupport {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "新增顶级机构", notes = "新增")
|
|
@ApiOperation(value = "新增顶级机构", notes = "新增")
|
|
@PostMapping("addRootOrg")
|
|
@PostMapping("addRootOrg")
|
|
|
|
+ @Transactional
|
|
public OrgEntity addRootOrg(@RequestBody OrgDomain domain) {
|
|
public OrgEntity addRootOrg(@RequestBody OrgDomain domain) {
|
|
trim(domain, true);
|
|
trim(domain, true);
|
|
|
|
|
|
@@ -818,6 +818,7 @@ public class OrgController extends ControllerSupport {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "更新顶级机构", notes = "更新")
|
|
@ApiOperation(value = "更新顶级机构", notes = "更新")
|
|
@PutMapping("updateRootOrg")
|
|
@PutMapping("updateRootOrg")
|
|
|
|
+ @Transactional
|
|
public OrgEntity updateRootOrg(@RequestBody OrgDomain domain) {
|
|
public OrgEntity updateRootOrg(@RequestBody OrgDomain domain) {
|
|
trim(domain, true);
|
|
trim(domain, true);
|
|
|
|
|
|
@@ -868,6 +869,7 @@ public class OrgController extends ControllerSupport {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "新增子机构", notes = "新增")
|
|
@ApiOperation(value = "新增子机构", notes = "新增")
|
|
@PostMapping("addSubOrg")
|
|
@PostMapping("addSubOrg")
|
|
|
|
+ @Transactional
|
|
public OrgEntity addSubOrg(@RequestBody OrgDomain domain) {
|
|
public OrgEntity addSubOrg(@RequestBody OrgDomain domain) {
|
|
trim(domain, true);
|
|
trim(domain, true);
|
|
|
|
|
|
@@ -918,6 +920,7 @@ public class OrgController extends ControllerSupport {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "更新子机构", notes = "更新")
|
|
@ApiOperation(value = "更新子机构", notes = "更新")
|
|
@PutMapping("updateSubOrg")
|
|
@PutMapping("updateSubOrg")
|
|
|
|
+ @Transactional
|
|
public OrgEntity updateSubOrg(@RequestBody OrgDomain domain) {
|
|
public OrgEntity updateSubOrg(@RequestBody OrgDomain domain) {
|
|
trim(domain, true);
|
|
trim(domain, true);
|
|
|
|
|
|
@@ -976,6 +979,7 @@ public class OrgController extends ControllerSupport {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "禁用机构", notes = "禁用")
|
|
@ApiOperation(value = "禁用机构", notes = "禁用")
|
|
@PutMapping("disable/{ids}")
|
|
@PutMapping("disable/{ids}")
|
|
|
|
+ @Transactional
|
|
public void disableOrgs(@PathVariable String ids) {
|
|
public void disableOrgs(@PathVariable String ids) {
|
|
List<Long> orgIdList = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
List<Long> orgIdList = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
@@ -1018,6 +1022,7 @@ public class OrgController extends ControllerSupport {
|
|
|
|
|
|
@ApiOperation(value = "保存机构属性", notes = "")
|
|
@ApiOperation(value = "保存机构属性", notes = "")
|
|
@PutMapping("saveOrgProperties")
|
|
@PutMapping("saveOrgProperties")
|
|
|
|
+ @Transactional
|
|
public void saveOrgProperties(@RequestBody SaveOrgPropertiesDomain domain) {
|
|
public void saveOrgProperties(@RequestBody SaveOrgPropertiesDomain domain) {
|
|
Long orgId = domain.getOrgId();
|
|
Long orgId = domain.getOrgId();
|
|
Map<String, String> properties = domain.getProperties();
|
|
Map<String, String> properties = domain.getProperties();
|
|
@@ -1126,6 +1131,7 @@ public class OrgController extends ControllerSupport {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "导入logo", notes = "导入logo")
|
|
@ApiOperation(value = "导入logo", notes = "导入logo")
|
|
@PostMapping("importLogo/{orgId}")
|
|
@PostMapping("importLogo/{orgId}")
|
|
|
|
+ @Transactional
|
|
public String importLogo(@PathVariable Long orgId, HttpServletRequest request,
|
|
public String importLogo(@PathVariable Long orgId, HttpServletRequest request,
|
|
@RequestParam CommonsMultipartFile file) throws IOException {
|
|
@RequestParam CommonsMultipartFile file) throws IOException {
|
|
|
|
|
|
@@ -1223,6 +1229,7 @@ public class OrgController extends ControllerSupport {
|
|
|
|
|
|
@ApiOperation(value = "删除子机构", notes = "")
|
|
@ApiOperation(value = "删除子机构", notes = "")
|
|
@DeleteMapping("deleteSubOrg/{orgId}")
|
|
@DeleteMapping("deleteSubOrg/{orgId}")
|
|
|
|
+ @Transactional
|
|
public void deleteSubOrg(@PathVariable Long orgId) {
|
|
public void deleteSubOrg(@PathVariable Long orgId) {
|
|
orgService.deleteSubOrg(orgId, false);
|
|
orgService.deleteSubOrg(orgId, false);
|
|
}
|
|
}
|
|
@@ -1236,6 +1243,7 @@ public class OrgController extends ControllerSupport {
|
|
|
|
|
|
@ApiOperation(value = "导入子机构", notes = "")
|
|
@ApiOperation(value = "导入子机构", notes = "")
|
|
@PostMapping("importSubOrg")
|
|
@PostMapping("importSubOrg")
|
|
|
|
+ @Transactional
|
|
public Map<String, Object> importSubOrg(@RequestParam CommonsMultipartFile file) {
|
|
public Map<String, Object> importSubOrg(@RequestParam CommonsMultipartFile file) {
|
|
DiskFileItem item = (DiskFileItem) file.getFileItem();
|
|
DiskFileItem item = (DiskFileItem) file.getFileItem();
|
|
File storeLocation = item.getStoreLocation();
|
|
File storeLocation = item.getStoreLocation();
|