| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.controller.params.QlyInspectAndItem; |
| | | import com.vincent.rsf.server.manager.entity.QlyInspect; |
| | | import com.vincent.rsf.server.manager.service.QlyInspectService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @Api(tags = "质检") |
| | | @Api(tags = "质检信息") |
| | | @RestController |
| | | public class QlyInspectController extends BaseController { |
| | | |
| | |
| | | return R.ok().add(qlyInspectService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PostMapping("/qlyInspect/all/save") |
| | | @PreAuthorize("'manager:qlyInspect:save'") |
| | | @ApiOperation("单据及明细保存") |
| | | public R allSvae(@RequestBody QlyInspectAndItem params) { |
| | | if (Objects.isNull(params)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | return R.ok(qlyInspectService.allSave(params)); |
| | | } |
| | | |
| | | @PostMapping("/qlyInspect/reports") |
| | | @ApiOperation("获取已上报单据明细") |
| | | @PreAuthorize("hasAuthority('manager:qlyInspect:list')") |
| | | public R listByAsnCode(@RequestBody Map<String, Object> map) { |
| | | if (Objects.isNull(map)) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | return R.ok(qlyInspectService.listByAsn(map)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:qlyInspect:list')") |
| | | @PostMapping("/qlyInspect/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |