功能完善
This commit is contained in:
parent
268c5321e4
commit
b333348e34
|
|
@ -92,6 +92,8 @@ public class BackReceiveController extends BaseController {
|
||||||
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){
|
||||||
|
return AjaxResult.error("该编码已接收");
|
||||||
}else {
|
}else {
|
||||||
return AjaxResult.error("接收失败");
|
return AjaxResult.error("接收失败");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public int setCodeBack(BackApplyInfo record) {
|
public int setCodeBack(BackApplyInfo record) {
|
||||||
int res;
|
int res=0;
|
||||||
try{
|
try{
|
||||||
BackApplyInfo[] arr = record.getArr();
|
BackApplyInfo[] arr = record.getArr();
|
||||||
if (arr.length>0){
|
if (arr.length>0){
|
||||||
|
|
@ -74,9 +74,13 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
//根据maId和taskId查询是否已接收
|
//根据maId和taskId查询是否已接收
|
||||||
int re = backReceiveMapper.selectCodeByMaIdAndTaskId(arr[i].getMaId(),record.getTaskId());
|
int re = backReceiveMapper.selectCodeByMaIdAndTaskId(arr[i].getMaId(),record.getTaskId());
|
||||||
if (re>0){
|
if (re>0){
|
||||||
throw new RuntimeException("该编码已接收");
|
res=-1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (res==-1){
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
int taskId = record.getTaskId();
|
int taskId = record.getTaskId();
|
||||||
//修改任务状态
|
//修改任务状态
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue