Merge branch 'dev' of http://192.168.0.56:3000/bonus/devicesmgt into dev
This commit is contained in:
commit
7a8b15a320
|
|
@ -32,7 +32,7 @@ public class BackReceiveController extends BaseController {
|
||||||
@GetMapping("getbackReceiveList")
|
@GetMapping("getbackReceiveList")
|
||||||
public AjaxResult getbackReceiveList(BackApplyInfo record) {
|
public AjaxResult getbackReceiveList(BackApplyInfo record) {
|
||||||
try {
|
try {
|
||||||
List<BackApplyInfo> list =backReceiveService.getbackReceiveList(record);
|
List<BackApplyInfo> list = backReceiveService.getbackReceiveList(record);
|
||||||
return success(list);
|
return success(list);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
@ -50,7 +50,7 @@ public class BackReceiveController extends BaseController {
|
||||||
@PostMapping("receiveView")
|
@PostMapping("receiveView")
|
||||||
public AjaxResult receiveView(@RequestBody BackApplyInfo record) {
|
public AjaxResult receiveView(@RequestBody BackApplyInfo record) {
|
||||||
try {
|
try {
|
||||||
List<BackApplyInfo> list =backReceiveService.receiveView(record);
|
List<BackApplyInfo> list = backReceiveService.receiveView(record);
|
||||||
return success(list);
|
return success(list);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
@ -68,10 +68,10 @@ public class BackReceiveController extends BaseController {
|
||||||
@PostMapping("setNumBack")
|
@PostMapping("setNumBack")
|
||||||
public AjaxResult setNumBack(@RequestBody BackApplyInfo record) {
|
public AjaxResult setNumBack(@RequestBody BackApplyInfo record) {
|
||||||
try {
|
try {
|
||||||
int res =backReceiveService.setNumBack(record);
|
int res = backReceiveService.setNumBack(record);
|
||||||
if (res>0){
|
if (res > 0) {
|
||||||
return AjaxResult.success("接收成功");
|
return AjaxResult.success("接收成功");
|
||||||
}else {
|
} else {
|
||||||
return AjaxResult.error("接收失败");
|
return AjaxResult.error("接收失败");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -89,12 +89,12 @@ public class BackReceiveController extends BaseController {
|
||||||
@PostMapping("setCodeBack")
|
@PostMapping("setCodeBack")
|
||||||
public AjaxResult setCodeBack(@RequestBody BackApplyInfo record) {
|
public AjaxResult setCodeBack(@RequestBody BackApplyInfo record) {
|
||||||
try {
|
try {
|
||||||
int res =backReceiveService.setCodeBack(record);
|
int res = backReceiveService.setCodeBack(record);
|
||||||
if (res>0){
|
if (res > 0) {
|
||||||
return AjaxResult.success("接收成功");
|
return AjaxResult.success("接收成功");
|
||||||
}else if (res==-1){
|
} else if (res == -1) {
|
||||||
return AjaxResult.error("该编码已接收");
|
return AjaxResult.error("该编码已接收");
|
||||||
}else {
|
} else {
|
||||||
return AjaxResult.error("接收失败");
|
return AjaxResult.error("接收失败");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -112,12 +112,12 @@ public class BackReceiveController extends BaseController {
|
||||||
@PostMapping("setRfidCodeBack")
|
@PostMapping("setRfidCodeBack")
|
||||||
public AjaxResult setRfidCodeBack(@RequestBody BackApplyInfo record) {
|
public AjaxResult setRfidCodeBack(@RequestBody BackApplyInfo record) {
|
||||||
try {
|
try {
|
||||||
int res =backReceiveService.setRfidCodeBack(record);
|
int res = backReceiveService.setRfidCodeBack(record);
|
||||||
if (res>0){
|
if (res > 0) {
|
||||||
return AjaxResult.success("接收成功");
|
return AjaxResult.success("接收成功");
|
||||||
}else if (res==-1){
|
} else if (res == -1) {
|
||||||
return AjaxResult.error("该RFID编码已接收");
|
return AjaxResult.error("该RFID编码已接收");
|
||||||
}else {
|
} else {
|
||||||
return AjaxResult.error("接收失败");
|
return AjaxResult.error("接收失败");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -129,10 +129,10 @@ public class BackReceiveController extends BaseController {
|
||||||
@PostMapping("endBack")
|
@PostMapping("endBack")
|
||||||
public AjaxResult endBack(@RequestBody BackApplyInfo record) {
|
public AjaxResult endBack(@RequestBody BackApplyInfo record) {
|
||||||
try {
|
try {
|
||||||
int res =backReceiveService.endBack(record);
|
int res = backReceiveService.endBack(record);
|
||||||
if (res>0){
|
if (res > 0) {
|
||||||
return AjaxResult.success("接收成功");
|
return AjaxResult.success("接收成功");
|
||||||
}else {
|
} else {
|
||||||
return AjaxResult.error("接收失败");
|
return AjaxResult.error("接收失败");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -144,8 +144,8 @@ public class BackReceiveController extends BaseController {
|
||||||
@PostMapping("codeQuery")
|
@PostMapping("codeQuery")
|
||||||
public AjaxResult codeQuery(@RequestBody BackApplyInfo record) {
|
public AjaxResult codeQuery(@RequestBody BackApplyInfo record) {
|
||||||
try {
|
try {
|
||||||
List<BackApplyInfo> list =backReceiveService.codeQuery(record);
|
List<BackApplyInfo> list = backReceiveService.codeQuery(record);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
@ -155,7 +155,7 @@ public class BackReceiveController extends BaseController {
|
||||||
@PostMapping("qrcodeQuery")
|
@PostMapping("qrcodeQuery")
|
||||||
public AjaxResult qrcodeQuery(@RequestBody BackApplyInfo record) {
|
public AjaxResult qrcodeQuery(@RequestBody BackApplyInfo record) {
|
||||||
try {
|
try {
|
||||||
List<BackApplyInfo> list =backReceiveService.qrcodeQuery(record);
|
List<BackApplyInfo> list = backReceiveService.qrcodeQuery(record);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
@ -166,7 +166,7 @@ public class BackReceiveController extends BaseController {
|
||||||
@PostMapping("rfidCodeQuery")
|
@PostMapping("rfidCodeQuery")
|
||||||
public AjaxResult rfidCodeQuery(@RequestBody BackApplyInfo record) {
|
public AjaxResult rfidCodeQuery(@RequestBody BackApplyInfo record) {
|
||||||
try {
|
try {
|
||||||
List<BackApplyInfo> list =backReceiveService.rfidCodeQuery(record);
|
List<BackApplyInfo> list = backReceiveService.rfidCodeQuery(record);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
@ -177,7 +177,7 @@ public class BackReceiveController extends BaseController {
|
||||||
@PostMapping("backReceiveRecord")
|
@PostMapping("backReceiveRecord")
|
||||||
public AjaxResult backReceiveRecord(@RequestBody BackApplyInfo record) {
|
public AjaxResult backReceiveRecord(@RequestBody BackApplyInfo record) {
|
||||||
try {
|
try {
|
||||||
List<BackApplyInfo> list =backReceiveService.backReceiveRecord(record);
|
List<BackApplyInfo> list = backReceiveService.backReceiveRecord(record);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.sgzb.app.controller;
|
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.LeaseApplyDetails;
|
||||||
import com.bonus.sgzb.app.domain.TmTask;
|
import com.bonus.sgzb.app.domain.TmTask;
|
||||||
import com.bonus.sgzb.app.service.LeaseOutDetailsService;
|
import com.bonus.sgzb.app.service.LeaseOutDetailsService;
|
||||||
|
|
@ -140,7 +141,11 @@ public class LeaseOutDetailsController extends BaseController {
|
||||||
@Log(title = "领料出库", businessType = BusinessType.UPDATE)
|
@Log(title = "领料出库", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping("/submitOutRfid")
|
@PostMapping("/submitOutRfid")
|
||||||
public AjaxResult submitOutRfid(@RequestBody List<LeaseOutDetails> recordList) {
|
public AjaxResult submitOutRfid(@RequestBody List<LeaseOutDetails> recordList) {
|
||||||
return leaseOutDetailsService.submitOutRfid(recordList);
|
if (CollUtil.isEmpty(recordList)){
|
||||||
|
return AjaxResult.error("请选择要出库的机具");
|
||||||
|
}else {
|
||||||
|
return leaseOutDetailsService.submitOutRfid(recordList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi
|
||||||
while (codeList.size() < dto.getNum()) {
|
while (codeList.size() < dto.getNum()) {
|
||||||
String code = FieldGenerator.generateField();
|
String code = FieldGenerator.generateField();
|
||||||
int count = selectByCode(code);
|
int count = selectByCode(code);
|
||||||
if (count == 0) {
|
if (count == 0 && !codeList.contains(code)) {
|
||||||
codeList.add(code);
|
codeList.add(code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue