This commit is contained in:
zhouzy062 2024-04-02 16:02:25 +08:00
commit 7a8b15a320
3 changed files with 28 additions and 23 deletions

View File

@ -32,7 +32,7 @@ public class BackReceiveController extends BaseController {
@GetMapping("getbackReceiveList")
public AjaxResult getbackReceiveList(BackApplyInfo record) {
try {
List<BackApplyInfo> list =backReceiveService.getbackReceiveList(record);
List<BackApplyInfo> list = backReceiveService.getbackReceiveList(record);
return success(list);
} catch (Exception e) {
throw new RuntimeException(e);
@ -50,7 +50,7 @@ public class BackReceiveController extends BaseController {
@PostMapping("receiveView")
public AjaxResult receiveView(@RequestBody BackApplyInfo record) {
try {
List<BackApplyInfo> list =backReceiveService.receiveView(record);
List<BackApplyInfo> list = backReceiveService.receiveView(record);
return success(list);
} catch (Exception e) {
throw new RuntimeException(e);
@ -68,10 +68,10 @@ public class BackReceiveController extends BaseController {
@PostMapping("setNumBack")
public AjaxResult setNumBack(@RequestBody BackApplyInfo record) {
try {
int res =backReceiveService.setNumBack(record);
if (res>0){
int res = backReceiveService.setNumBack(record);
if (res > 0) {
return AjaxResult.success("接收成功");
}else {
} else {
return AjaxResult.error("接收失败");
}
} catch (Exception e) {
@ -89,12 +89,12 @@ public class BackReceiveController extends BaseController {
@PostMapping("setCodeBack")
public AjaxResult setCodeBack(@RequestBody BackApplyInfo record) {
try {
int res =backReceiveService.setCodeBack(record);
if (res>0){
int res = backReceiveService.setCodeBack(record);
if (res > 0) {
return AjaxResult.success("接收成功");
}else if (res==-1){
} else if (res == -1) {
return AjaxResult.error("该编码已接收");
}else {
} else {
return AjaxResult.error("接收失败");
}
} catch (Exception e) {
@ -112,12 +112,12 @@ public class BackReceiveController extends BaseController {
@PostMapping("setRfidCodeBack")
public AjaxResult setRfidCodeBack(@RequestBody BackApplyInfo record) {
try {
int res =backReceiveService.setRfidCodeBack(record);
if (res>0){
int res = backReceiveService.setRfidCodeBack(record);
if (res > 0) {
return AjaxResult.success("接收成功");
}else if (res==-1){
} else if (res == -1) {
return AjaxResult.error("该RFID编码已接收");
}else {
} else {
return AjaxResult.error("接收失败");
}
} catch (Exception e) {
@ -129,10 +129,10 @@ public class BackReceiveController extends BaseController {
@PostMapping("endBack")
public AjaxResult endBack(@RequestBody BackApplyInfo record) {
try {
int res =backReceiveService.endBack(record);
if (res>0){
int res = backReceiveService.endBack(record);
if (res > 0) {
return AjaxResult.success("接收成功");
}else {
} else {
return AjaxResult.error("接收失败");
}
} catch (Exception e) {
@ -144,7 +144,7 @@ public class BackReceiveController extends BaseController {
@PostMapping("codeQuery")
public AjaxResult codeQuery(@RequestBody BackApplyInfo record) {
try {
List<BackApplyInfo> list =backReceiveService.codeQuery(record);
List<BackApplyInfo> list = backReceiveService.codeQuery(record);
return AjaxResult.success(list);
} catch (Exception e) {
throw new RuntimeException(e);
@ -155,7 +155,7 @@ public class BackReceiveController extends BaseController {
@PostMapping("qrcodeQuery")
public AjaxResult qrcodeQuery(@RequestBody BackApplyInfo record) {
try {
List<BackApplyInfo> list =backReceiveService.qrcodeQuery(record);
List<BackApplyInfo> list = backReceiveService.qrcodeQuery(record);
return AjaxResult.success(list);
} catch (Exception e) {
throw new RuntimeException(e);
@ -166,7 +166,7 @@ public class BackReceiveController extends BaseController {
@PostMapping("rfidCodeQuery")
public AjaxResult rfidCodeQuery(@RequestBody BackApplyInfo record) {
try {
List<BackApplyInfo> list =backReceiveService.rfidCodeQuery(record);
List<BackApplyInfo> list = backReceiveService.rfidCodeQuery(record);
return AjaxResult.success(list);
} catch (Exception e) {
throw new RuntimeException(e);
@ -177,7 +177,7 @@ public class BackReceiveController extends BaseController {
@PostMapping("backReceiveRecord")
public AjaxResult backReceiveRecord(@RequestBody BackApplyInfo record) {
try {
List<BackApplyInfo> list =backReceiveService.backReceiveRecord(record);
List<BackApplyInfo> list = backReceiveService.backReceiveRecord(record);
return AjaxResult.success(list);
} catch (Exception e) {
throw new RuntimeException(e);

View File

@ -1,5 +1,6 @@
package com.bonus.sgzb.app.controller;
import cn.hutool.core.collection.CollUtil;
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
import com.bonus.sgzb.app.domain.TmTask;
import com.bonus.sgzb.app.service.LeaseOutDetailsService;
@ -140,8 +141,12 @@ public class LeaseOutDetailsController extends BaseController {
@Log(title = "领料出库", businessType = BusinessType.UPDATE)
@PostMapping("/submitOutRfid")
public AjaxResult submitOutRfid(@RequestBody List<LeaseOutDetails> recordList) {
if (CollUtil.isEmpty(recordList)){
return AjaxResult.error("请选择要出库的机具");
}else {
return leaseOutDetailsService.submitOutRfid(recordList);
}
}
/**

View File

@ -55,7 +55,7 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi
while (codeList.size() < dto.getNum()) {
String code = FieldGenerator.generateField();
int count = selectByCode(code);
if (count == 0) {
if (count == 0 && !codeList.contains(code)) {
codeList.add(code);
}
}