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