7 changed files with 84 additions and 196 deletions
@ -1,184 +0,0 @@ |
|||||
package org.nl.wms.st.instor.rest; |
|
||||
|
|
||||
import com.alibaba.fastjson.JSONObject; |
|
||||
import lombok.RequiredArgsConstructor; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.nl.modules.logging.annotation.Log; |
|
||||
import org.nl.wms.st.instor.service.CheckService; |
|
||||
import org.springframework.data.domain.Pageable; |
|
||||
import org.springframework.http.HttpStatus; |
|
||||
import org.springframework.http.ResponseEntity; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
|
|
||||
import javax.servlet.http.HttpServletResponse; |
|
||||
import java.io.IOException; |
|
||||
import java.util.Map; |
|
||||
|
|
||||
/** |
|
||||
* 盘点功能 |
|
||||
*/ |
|
||||
@RestController |
|
||||
@RequiredArgsConstructor |
|
||||
@RequestMapping("/api/check") |
|
||||
@Slf4j |
|
||||
public class CheckController { |
|
||||
private final CheckService checkService; |
|
||||
|
|
||||
@GetMapping |
|
||||
@Log("查询盘点单") |
|
||||
|
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) { |
|
||||
return new ResponseEntity<>(checkService.pageQuery(whereJson, page), HttpStatus.OK); |
|
||||
} |
|
||||
|
|
||||
@GetMapping("/getDtlView") |
|
||||
@Log("查询盘点单明细详情") |
|
||||
|
|
||||
public ResponseEntity<Object> getDtlView(@RequestParam Map whereJson, Pageable page) { |
|
||||
return new ResponseEntity<>(checkService.getDtlView(whereJson, page), HttpStatus.OK); |
|
||||
} |
|
||||
|
|
||||
@GetMapping("/getExceptionDispose") |
|
||||
@Log("查询盘点单明细异常") |
|
||||
|
|
||||
public ResponseEntity<Object> getExceptionDispose(@RequestParam Map whereJson, Pageable page) { |
|
||||
return new ResponseEntity<>(checkService.getExceptionDispose(whereJson, page), HttpStatus.OK); |
|
||||
} |
|
||||
|
|
||||
@GetMapping("/getOutBillDtl") |
|
||||
@Log("查询移库单") |
|
||||
|
|
||||
public ResponseEntity<Object> getOutBillDtl(@RequestParam Map whereJson) { |
|
||||
return new ResponseEntity<>(checkService.getOutBillDtl(whereJson), HttpStatus.OK); |
|
||||
} |
|
||||
|
|
||||
@GetMapping("/getOutBillDtl2") |
|
||||
@Log("查询盘点单明细2") |
|
||||
|
|
||||
public ResponseEntity<Object> getOutBillDtl2(@RequestParam Map whereJson) { |
|
||||
return new ResponseEntity<>(checkService.getOutBillDtl2(whereJson), HttpStatus.OK); |
|
||||
} |
|
||||
|
|
||||
@GetMapping("/getOutBillDis") |
|
||||
@Log("查询移库单") |
|
||||
|
|
||||
public ResponseEntity<Object> getOutBillDis(@RequestParam Map whereJson) { |
|
||||
return new ResponseEntity<>(checkService.getOutBillDis(whereJson), HttpStatus.OK); |
|
||||
} |
|
||||
|
|
||||
@Log("删除移库单") |
|
||||
|
|
||||
@DeleteMapping |
|
||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids) { |
|
||||
checkService.deleteAll(ids); |
|
||||
return new ResponseEntity<>(HttpStatus.OK); |
|
||||
} |
|
||||
|
|
||||
@PutMapping |
|
||||
@Log("修改盘点单") |
|
||||
|
|
||||
public ResponseEntity<Object> update(@RequestBody JSONObject whereJson) { |
|
||||
checkService.update(whereJson); |
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
|
||||
} |
|
||||
|
|
||||
@PostMapping() |
|
||||
@Log("新增盘点单") |
|
||||
|
|
||||
public ResponseEntity<Object> insertDtl(@RequestBody JSONObject whereJson) { |
|
||||
checkService.insertDtl(whereJson); |
|
||||
return new ResponseEntity<>(HttpStatus.CREATED); |
|
||||
} |
|
||||
|
|
||||
@PostMapping("/allInsert") |
|
||||
@Log("新增全部在库木箱") |
|
||||
|
|
||||
public ResponseEntity<Object> allInsert(@RequestBody JSONObject whereJson) { |
|
||||
checkService.allInsert(whereJson); |
|
||||
return new ResponseEntity<>(HttpStatus.CREATED); |
|
||||
} |
|
||||
|
|
||||
@GetMapping("/getStructIvt") |
|
||||
@Log("查询可盘点库存") |
|
||||
|
|
||||
public ResponseEntity<Object> getStructIvt(@RequestParam Map whereJson, Pageable page) { |
|
||||
return new ResponseEntity<>(checkService.getStructIvt(whereJson, page), HttpStatus.OK); |
|
||||
} |
|
||||
|
|
||||
@PostMapping("/confirm") |
|
||||
@Log("盘点确定") |
|
||||
|
|
||||
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) { |
|
||||
checkService.confirm(whereJson); |
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
|
||||
} |
|
||||
|
|
||||
@GetMapping("/getInvTypes") |
|
||||
@Log("查询单据字段") |
|
||||
|
|
||||
public ResponseEntity<Object> getInvTypes() { |
|
||||
return new ResponseEntity<>(checkService.getInvTypes(), HttpStatus.OK); |
|
||||
} |
|
||||
|
|
||||
@PostMapping("/handdown") |
|
||||
@Log("移库单手动下发") |
|
||||
|
|
||||
public ResponseEntity<Object> handdown(@RequestBody JSONObject whereJson) { |
|
||||
checkService.handdown(whereJson); |
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
|
||||
} |
|
||||
|
|
||||
@PostMapping("/saveCheck") |
|
||||
@Log("盘点保存") |
|
||||
|
|
||||
public ResponseEntity<Object> saveCheck(@RequestBody JSONObject whereJson) { |
|
||||
checkService.saveCheck(whereJson); |
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
|
||||
} |
|
||||
|
|
||||
@PostMapping("/process0") |
|
||||
@Log("财务为准") |
|
||||
|
|
||||
public ResponseEntity<Object> process0(@RequestBody JSONObject whereJson) { |
|
||||
checkService.process0(whereJson); |
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
|
||||
} |
|
||||
|
|
||||
@PostMapping("/process1") |
|
||||
@Log("实物为准") |
|
||||
|
|
||||
public ResponseEntity<Object> process1(@RequestBody JSONObject whereJson) { |
|
||||
checkService.process1(whereJson); |
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
@GetMapping(value = "/download") |
|
||||
public void download(HttpServletResponse response, @RequestParam Map whereJson) throws IOException { |
|
||||
checkService.download(checkService.getOutBillDtl(whereJson), response); |
|
||||
} |
|
||||
|
|
||||
@PostMapping("/disposeConfirm") |
|
||||
@Log("处理确认") |
|
||||
|
|
||||
public ResponseEntity<Object> disposeConfirm(@RequestBody JSONObject whereJson) { |
|
||||
checkService.disposeConfirm(whereJson); |
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
|
||||
} |
|
||||
|
|
||||
@PostMapping("/confirmBtn") |
|
||||
@Log("强制确认") |
|
||||
|
|
||||
public ResponseEntity<Object> confirmBtn(@RequestBody JSONObject whereJson) { |
|
||||
checkService.confirmBtn(whereJson); |
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
|
||||
} |
|
||||
|
|
||||
@PostMapping("/repairSubmit") |
|
||||
@Log("补录明细") |
|
||||
|
|
||||
public ResponseEntity<Object> repairSubmit(@RequestBody JSONObject whereJson) { |
|
||||
checkService.repairSubmit(whereJson); |
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
|
||||
} |
|
||||
} |
|
Loading…
Reference in new issue