|
|
|
@ -18,10 +18,7 @@ import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
@ -66,9 +63,9 @@ public class MesReworkTaskController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("/reworkRecord")
|
|
|
|
|
@PostMapping("/reworkRecord")
|
|
|
|
|
@ApiOperation(value = "返工")
|
|
|
|
|
public ResultBean reworkRecord(long[] inspectionDetailIds) {
|
|
|
|
|
public ResultBean reworkRecord(@RequestBody Long[] inspectionDetailIds) {
|
|
|
|
|
try {
|
|
|
|
|
for (long inspectionDetailId : inspectionDetailIds) {
|
|
|
|
|
mesReworkTaskService.reworkRecord(inspectionDetailId);
|
|
|
|
@ -86,7 +83,7 @@ public class MesReworkTaskController {
|
|
|
|
|
public ResultBean assemblyQuery(MesReworkTaskRequestModel requestModel) {
|
|
|
|
|
// 数据校验
|
|
|
|
|
ValidatorBean.checkNotNull(requestModel.getCustSn(), "客户条码不能为空");
|
|
|
|
|
ValidatorBean.checkNotNull(requestModel.getPartNo(), "零件号不能为空");
|
|
|
|
|
/*ValidatorBean.checkNotNull(requestModel.getPartNo(), "零件号不能为空");*/
|
|
|
|
|
try {
|
|
|
|
|
List<MesProductionAssembly> mesProductionRecords = mesReworkTaskService.assemblyQuery(requestModel);
|
|
|
|
|
return ResultBean.success("返工成功").setResultObject(mesProductionRecords);
|
|
|
|
@ -103,9 +100,9 @@ public class MesReworkTaskController {
|
|
|
|
|
try {
|
|
|
|
|
// 数据校验
|
|
|
|
|
ValidatorBean.checkNotNull(requestModel.getCustSn(), "客户条码不能为空");
|
|
|
|
|
ValidatorBean.checkNotNull(requestModel.getPartNo(), "零件号不能为空");
|
|
|
|
|
/*ValidatorBean.checkNotNull(requestModel.getPartNo(), "零件号不能为空");*/
|
|
|
|
|
ValidatorBean.checkNotNull(requestModel.getSn(), "替换条码不能为空");
|
|
|
|
|
ValidatorBean.checkNotNull(requestModel.getDetailId(), "缺陷位置id不能为空");
|
|
|
|
|
ValidatorBean.checkNotNull(requestModel.getDetailIds(), "缺陷位置id不能为空");
|
|
|
|
|
|
|
|
|
|
mesReworkTaskService.assemblySnRepeat(requestModel);
|
|
|
|
|
return ResultBean.success("返工成功");
|
|
|
|
|