|
|
@ -2,12 +2,16 @@ package com.hnac.hzims.spare.controller; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
|
|
|
|
import com.hnac.hzims.AssetsConstants; |
|
|
|
import com.hnac.hzims.common.logs.annotation.OperationAnnotation; |
|
|
|
import com.hnac.hzims.common.logs.annotation.OperationAnnotation; |
|
|
|
import com.hnac.hzims.common.logs.enums.BusinessType; |
|
|
|
import com.hnac.hzims.common.logs.enums.BusinessType; |
|
|
|
import com.hnac.hzims.common.logs.enums.OperatorType; |
|
|
|
import com.hnac.hzims.common.logs.enums.OperatorType; |
|
|
|
|
|
|
|
import com.hnac.hzims.message.MessageConstants; |
|
|
|
import com.hnac.hzims.spare.entity.SpAllocationEntity; |
|
|
|
import com.hnac.hzims.spare.entity.SpAllocationEntity; |
|
|
|
import com.hnac.hzims.spare.service.ISpAllocationService; |
|
|
|
import com.hnac.hzims.spare.service.ISpAllocationService; |
|
|
|
import com.hnac.hzims.spare.vo.SpAllocationVO; |
|
|
|
import com.hnac.hzims.spare.vo.SpAllocationVO; |
|
|
|
|
|
|
|
import com.hnac.hzinfo.log.annotation.Business; |
|
|
|
|
|
|
|
import com.hnac.hzinfo.log.annotation.Operate; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
@ -34,6 +38,7 @@ import javax.validation.Valid; |
|
|
|
@AllArgsConstructor |
|
|
|
@AllArgsConstructor |
|
|
|
@RequestMapping("/sp_allocation") |
|
|
|
@RequestMapping("/sp_allocation") |
|
|
|
@Api(value = "调拨单管理", tags = "调拨单管理") |
|
|
|
@Api(value = "调拨单管理", tags = "调拨单管理") |
|
|
|
|
|
|
|
@Business(module = AssetsConstants.APP_NAME,value = "消息推送统计管理",ignore = false) |
|
|
|
public class SpAllocationController extends BladeController { |
|
|
|
public class SpAllocationController extends BladeController { |
|
|
|
|
|
|
|
|
|
|
|
private final ISpAllocationService sp_allocationService; |
|
|
|
private final ISpAllocationService sp_allocationService; |
|
|
@ -44,6 +49,7 @@ public class SpAllocationController extends BladeController { |
|
|
|
@GetMapping("/detail") |
|
|
|
@GetMapping("/detail") |
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
@ApiOperation(value = "详情", notes = "传入sp_allocation") |
|
|
|
@ApiOperation(value = "详情", notes = "传入sp_allocation") |
|
|
|
|
|
|
|
@Operate(label = "调拨单详情",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,ignore = false) |
|
|
|
public R<SpAllocationVO> detail(SpAllocationEntity sp_allocation) { |
|
|
|
public R<SpAllocationVO> detail(SpAllocationEntity sp_allocation) { |
|
|
|
SpAllocationVO detail = sp_allocationService.getDetail(sp_allocation); |
|
|
|
SpAllocationVO detail = sp_allocationService.getDetail(sp_allocation); |
|
|
|
return R.data(detail); |
|
|
|
return R.data(detail); |
|
|
@ -56,6 +62,7 @@ public class SpAllocationController extends BladeController { |
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
@ApiOperation(value = "分页", notes = "传入sp_allocation") |
|
|
|
@ApiOperation(value = "分页", notes = "传入sp_allocation") |
|
|
|
@ApiIgnore |
|
|
|
@ApiIgnore |
|
|
|
|
|
|
|
@Operate(label = "调拨单分页查询",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,ignore = false) |
|
|
|
public R<IPage<SpAllocationEntity>> list(SpAllocationEntity sp_allocation, Query query) { |
|
|
|
public R<IPage<SpAllocationEntity>> list(SpAllocationEntity sp_allocation, Query query) { |
|
|
|
IPage<SpAllocationEntity> pages = sp_allocationService.page(Condition.getPage(query), Condition.getQueryWrapper(sp_allocation)); |
|
|
|
IPage<SpAllocationEntity> pages = sp_allocationService.page(Condition.getPage(query), Condition.getQueryWrapper(sp_allocation)); |
|
|
|
return R.data(pages); |
|
|
|
return R.data(pages); |
|
|
@ -67,6 +74,7 @@ public class SpAllocationController extends BladeController { |
|
|
|
@GetMapping("/pageList") |
|
|
|
@GetMapping("/pageList") |
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
@ApiOperation(value = "分页", notes = "传入sp_allocation") |
|
|
|
@ApiOperation(value = "分页", notes = "传入sp_allocation") |
|
|
|
|
|
|
|
@Operate(label = "资产管理-调拨单详情",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,ignore = false) |
|
|
|
@OperationAnnotation(moduleName = "资产管理", |
|
|
|
@OperationAnnotation(moduleName = "资产管理", |
|
|
|
title = "调泼单",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, |
|
|
|
title = "调泼单",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, |
|
|
|
action = "分页查询调泼单列表") |
|
|
|
action = "分页查询调泼单列表") |
|
|
@ -81,6 +89,7 @@ public class SpAllocationController extends BladeController { |
|
|
|
@PostMapping("/save") |
|
|
|
@PostMapping("/save") |
|
|
|
@ApiOperationSupport(order = 4) |
|
|
|
@ApiOperationSupport(order = 4) |
|
|
|
@ApiOperation(value = "新增", notes = "传入sp_allocation") |
|
|
|
@ApiOperation(value = "新增", notes = "传入sp_allocation") |
|
|
|
|
|
|
|
@Operate(label = "调拨单新增",type = com.hnac.hzinfo.log.contants.BusinessType.INSERT,ignore = false) |
|
|
|
public R save(@Valid @RequestBody SpAllocationEntity sp_allocation) { |
|
|
|
public R save(@Valid @RequestBody SpAllocationEntity sp_allocation) { |
|
|
|
return R.status(sp_allocationService.save(sp_allocation)); |
|
|
|
return R.status(sp_allocationService.save(sp_allocation)); |
|
|
|
} |
|
|
|
} |
|
|
@ -91,6 +100,7 @@ public class SpAllocationController extends BladeController { |
|
|
|
@PostMapping("/update") |
|
|
|
@PostMapping("/update") |
|
|
|
@ApiOperationSupport(order = 5) |
|
|
|
@ApiOperationSupport(order = 5) |
|
|
|
@ApiOperation(value = "修改", notes = "传入sp_allocation") |
|
|
|
@ApiOperation(value = "修改", notes = "传入sp_allocation") |
|
|
|
|
|
|
|
@Operate(label = "调拨单修改",type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE,ignore = false) |
|
|
|
public R update(@Valid @RequestBody SpAllocationEntity sp_allocation) { |
|
|
|
public R update(@Valid @RequestBody SpAllocationEntity sp_allocation) { |
|
|
|
return R.status(sp_allocationService.updateById(sp_allocation)); |
|
|
|
return R.status(sp_allocationService.updateById(sp_allocation)); |
|
|
|
} |
|
|
|
} |
|
|
@ -100,6 +110,7 @@ public class SpAllocationController extends BladeController { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@PostMapping("/submit") |
|
|
|
@PostMapping("/submit") |
|
|
|
@ApiOperationSupport(order = 6) |
|
|
|
@ApiOperationSupport(order = 6) |
|
|
|
|
|
|
|
@Operate(label = "调拨单新增或修改",type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE,ignore = false) |
|
|
|
@ApiOperation(value = "新增或修改", notes = "传入sp_allocation") |
|
|
|
@ApiOperation(value = "新增或修改", notes = "传入sp_allocation") |
|
|
|
public R submit(@Valid @RequestBody SpAllocationEntity sp_allocation) { |
|
|
|
public R submit(@Valid @RequestBody SpAllocationEntity sp_allocation) { |
|
|
|
return R.status(sp_allocationService.saveOrUpdate(sp_allocation)); |
|
|
|
return R.status(sp_allocationService.saveOrUpdate(sp_allocation)); |
|
|
@ -112,6 +123,7 @@ public class SpAllocationController extends BladeController { |
|
|
|
@PostMapping("/remove") |
|
|
|
@PostMapping("/remove") |
|
|
|
@ApiOperationSupport(order = 7) |
|
|
|
@ApiOperationSupport(order = 7) |
|
|
|
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
|
|
|
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
|
|
|
|
|
|
|
@Operate(label = "调拨单逻辑删除",type = com.hnac.hzinfo.log.contants.BusinessType.DELETE,ignore = false) |
|
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
return R.status(sp_allocationService.deleteLogic(Func.toLongList(ids))); |
|
|
|
return R.status(sp_allocationService.deleteLogic(Func.toLongList(ids))); |
|
|
|
} |
|
|
|
} |
|
|
|