| | |
| | | import com.vincent.rsf.server.manager.controller.params.IsptOrderParam; |
| | | import com.vincent.rsf.server.manager.controller.params.QlyInspectAndItem; |
| | | import com.vincent.rsf.server.manager.entity.QlyInspect; |
| | | import com.vincent.rsf.server.manager.entity.QlyIsptItem; |
| | | import com.vincent.rsf.server.manager.service.QlyInspectService; |
| | | import com.vincent.rsf.server.manager.service.QlyIsptItemService; |
| | | import com.vincent.rsf.server.system.constant.SerialRuleCode; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import com.vincent.rsf.server.system.utils.SerialRuleUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @Slf4j |
| | | @Api(tags = "质检信息") |
| | | @RestController |
| | | public class QlyInspectController extends BaseController { |
| | | |
| | | @Autowired |
| | | private QlyInspectService qlyInspectService; |
| | | @Autowired |
| | | private QlyIsptItemService qlyIsptItemService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:qlyInspect:list')") |
| | | @PostMapping("/qlyInspect/page") |
| | |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:qlyInspect:update')") |
| | | @ApiOperation("审核确认") |
| | | @PostMapping("/qlyInspect/verify/complate/{id}") |
| | | public R verifyComplate(@PathVariable Long id) { |
| | | if (Objects.isNull(id)) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | return qlyInspectService.verifyComplate(id); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:qlyInspect:update')") |
| | | @OperationLog("Update 质检信息") |
| | | @PostMapping("/qlyInspect/update") |
| | | public R update(@RequestBody QlyInspect qlyInspect) { |
| | |
| | | return R.error("有明细单据已在质检中!!"); |
| | | } |
| | | if (!qlyInspectService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | return R.error("主单删除失败!!"); |
| | | } |
| | | |
| | | if (!qlyIsptItemService.remove(new LambdaQueryWrapper<QlyIsptItem>().in(QlyIsptItem::getIspectId, ids))) { |
| | | return R.error("明细删除失败!!"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |