|
|
@ -2,12 +2,15 @@ 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.spare.entity.SpReceiveEntity; |
|
|
|
import com.hnac.hzims.spare.entity.SpReceiveEntity; |
|
|
|
import com.hnac.hzims.spare.service.ISpReceiveService; |
|
|
|
import com.hnac.hzims.spare.service.ISpReceiveService; |
|
|
|
import com.hnac.hzims.spare.vo.SpReceiveVO; |
|
|
|
import com.hnac.hzims.spare.vo.SpReceiveVO; |
|
|
|
|
|
|
|
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; |
|
|
@ -32,6 +35,7 @@ import javax.validation.Valid; |
|
|
|
@AllArgsConstructor |
|
|
|
@AllArgsConstructor |
|
|
|
@RequestMapping("/sp_receive") |
|
|
|
@RequestMapping("/sp_receive") |
|
|
|
@Api(value = "领用单管理", tags = "领用单管理") |
|
|
|
@Api(value = "领用单管理", tags = "领用单管理") |
|
|
|
|
|
|
|
@Business(module = AssetsConstants.APP_NAME,value = "消息推送统计管理",ignore = false) |
|
|
|
public class SpReceiveController extends BladeController { |
|
|
|
public class SpReceiveController extends BladeController { |
|
|
|
|
|
|
|
|
|
|
|
private final ISpReceiveService sp_receiveService; |
|
|
|
private final ISpReceiveService sp_receiveService; |
|
|
@ -42,6 +46,7 @@ public class SpReceiveController extends BladeController { |
|
|
|
@GetMapping("/detail") |
|
|
|
@GetMapping("/detail") |
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
@ApiOperation(value = "详情", notes = "传入sp_receive") |
|
|
|
@ApiOperation(value = "详情", notes = "传入sp_receive") |
|
|
|
|
|
|
|
@Operate(label = "领用单详情",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,ignore = false) |
|
|
|
public R<SpReceiveVO> detail(SpReceiveEntity sp_receive) { |
|
|
|
public R<SpReceiveVO> detail(SpReceiveEntity sp_receive) { |
|
|
|
SpReceiveVO detail = sp_receiveService.getDetail(sp_receive); |
|
|
|
SpReceiveVO detail = sp_receiveService.getDetail(sp_receive); |
|
|
|
return R.data(detail); |
|
|
|
return R.data(detail); |
|
|
@ -54,6 +59,7 @@ public class SpReceiveController extends BladeController { |
|
|
|
@GetMapping("/list") |
|
|
|
@GetMapping("/list") |
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
@ApiOperation(value = "分页", notes = "传入sp_receive") |
|
|
|
@ApiOperation(value = "分页", notes = "传入sp_receive") |
|
|
|
|
|
|
|
@Operate(label = "领用单分页",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,ignore = false) |
|
|
|
@OperationAnnotation(moduleName = "资产管理",title = "工具领用",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, |
|
|
|
@OperationAnnotation(moduleName = "资产管理",title = "工具领用",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, |
|
|
|
action = "分页查询工具领用列表") |
|
|
|
action = "分页查询工具领用列表") |
|
|
|
public R<IPage<SpReceiveVO>> list(SpReceiveVO receiveVO, Query query) { |
|
|
|
public R<IPage<SpReceiveVO>> list(SpReceiveVO receiveVO, Query query) { |
|
|
@ -67,6 +73,7 @@ public class SpReceiveController extends BladeController { |
|
|
|
@PostMapping("/save") |
|
|
|
@PostMapping("/save") |
|
|
|
@ApiOperationSupport(order = 4) |
|
|
|
@ApiOperationSupport(order = 4) |
|
|
|
@ApiOperation(value = "新增", notes = "传入sp_receive") |
|
|
|
@ApiOperation(value = "新增", notes = "传入sp_receive") |
|
|
|
|
|
|
|
@Operate(label = "领用单新增",type = com.hnac.hzinfo.log.contants.BusinessType.INSERT,ignore = false) |
|
|
|
public R save(@Valid @RequestBody SpReceiveEntity sp_receive) { |
|
|
|
public R save(@Valid @RequestBody SpReceiveEntity sp_receive) { |
|
|
|
return R.status(sp_receiveService.save(sp_receive)); |
|
|
|
return R.status(sp_receiveService.save(sp_receive)); |
|
|
|
} |
|
|
|
} |
|
|
@ -77,6 +84,7 @@ public class SpReceiveController extends BladeController { |
|
|
|
@PostMapping("/update") |
|
|
|
@PostMapping("/update") |
|
|
|
@ApiOperationSupport(order = 5) |
|
|
|
@ApiOperationSupport(order = 5) |
|
|
|
@ApiOperation(value = "修改", notes = "传入sp_receive") |
|
|
|
@ApiOperation(value = "修改", notes = "传入sp_receive") |
|
|
|
|
|
|
|
@Operate(label = "领用单修改",type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE,ignore = false) |
|
|
|
public R update(@Valid @RequestBody SpReceiveEntity sp_receive) { |
|
|
|
public R update(@Valid @RequestBody SpReceiveEntity sp_receive) { |
|
|
|
return R.status(sp_receiveService.updateById(sp_receive)); |
|
|
|
return R.status(sp_receiveService.updateById(sp_receive)); |
|
|
|
} |
|
|
|
} |
|
|
@ -87,6 +95,7 @@ public class SpReceiveController extends BladeController { |
|
|
|
@PostMapping("/submit") |
|
|
|
@PostMapping("/submit") |
|
|
|
@ApiOperationSupport(order = 6) |
|
|
|
@ApiOperationSupport(order = 6) |
|
|
|
@ApiOperation(value = "新增或修改", notes = "传入sp_receive") |
|
|
|
@ApiOperation(value = "新增或修改", notes = "传入sp_receive") |
|
|
|
|
|
|
|
@Operate(label = "领用单新增或修改",type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE,ignore = false) |
|
|
|
public R submit(@Valid @RequestBody SpReceiveEntity sp_receive) { |
|
|
|
public R submit(@Valid @RequestBody SpReceiveEntity sp_receive) { |
|
|
|
return R.status(sp_receiveService.saveOrUpdate(sp_receive)); |
|
|
|
return R.status(sp_receiveService.saveOrUpdate(sp_receive)); |
|
|
|
} |
|
|
|
} |
|
|
@ -98,6 +107,7 @@ public class SpReceiveController 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_receiveService.deleteLogic(Func.toLongList(ids))); |
|
|
|
return R.status(sp_receiveService.deleteLogic(Func.toLongList(ids))); |
|
|
|
} |
|
|
|
} |
|
|
@ -115,6 +125,7 @@ public class SpReceiveController extends BladeController { |
|
|
|
@PostMapping("/returns") |
|
|
|
@PostMapping("/returns") |
|
|
|
@ApiOperationSupport(order = 4) |
|
|
|
@ApiOperationSupport(order = 4) |
|
|
|
@ApiOperation(value = "退回", notes = "传入sp_receive") |
|
|
|
@ApiOperation(value = "退回", notes = "传入sp_receive") |
|
|
|
|
|
|
|
@Operate(label = "领用单退回",type = com.hnac.hzinfo.log.contants.BusinessType.OTHER,ignore = false) |
|
|
|
public R returns(@Valid @RequestBody SpReceiveVO sp_receive) { |
|
|
|
public R returns(@Valid @RequestBody SpReceiveVO sp_receive) { |
|
|
|
return R.status(sp_receiveService.returns(sp_receive)); |
|
|
|
return R.status(sp_receiveService.returns(sp_receive)); |
|
|
|
} |
|
|
|
} |
|
|
|