领料单空值保护
This commit is contained in:
parent
4a57f9a3bc
commit
5853bd9621
|
|
@ -551,9 +551,8 @@ public class TmTaskController extends BaseController {
|
||||||
tmTaskService.edit(task);
|
tmTaskService.edit(task);
|
||||||
return AjaxResult.success("修改成功");
|
return AjaxResult.success("修改成功");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return AjaxResult.error("修改失败");
|
return AjaxResult.error("修改失败"+e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ public interface TmTaskService{
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(TmTask record);
|
int updateByPrimaryKeySelective(TmTask record);
|
||||||
|
|
||||||
int edit(TmTask tmTask);
|
int edit(TmTask tmTask) throws Exception;
|
||||||
int editCq(TmTask tmTask);
|
int editCq(TmTask tmTask);
|
||||||
|
|
||||||
Integer getAgreementIdByUnit(TmTask task);
|
Integer getAgreementIdByUnit(TmTask task);
|
||||||
|
|
|
||||||
|
|
@ -1021,7 +1021,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public int edit(TmTask tmTask) {
|
public int edit(TmTask tmTask) throws Exception {
|
||||||
int res = 0;
|
int res = 0;
|
||||||
//修改任务信息(tm_task)
|
//修改任务信息(tm_task)
|
||||||
this.updateByPrimaryKeySelective(tmTask);
|
this.updateByPrimaryKeySelective(tmTask);
|
||||||
|
|
@ -1053,6 +1053,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
|
throw new Exception(e.getMessage());
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
@ -1198,6 +1199,9 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
Long taskId = task.getTaskId();
|
Long taskId = task.getTaskId();
|
||||||
if (CollUtil.isNotEmpty(leaseApplyDetails)) {
|
if (CollUtil.isNotEmpty(leaseApplyDetails)) {
|
||||||
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
||||||
|
if (leaseApplyDetail.getPreNum() == null || leaseApplyDetail.getPreNum().equals(0)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
LeaseApplyInfo leaseApplyInfos = new LeaseApplyInfo();
|
LeaseApplyInfo leaseApplyInfos = new LeaseApplyInfo();
|
||||||
if (leaseApplyDetail.getCompanyId() == null) {
|
if (leaseApplyDetail.getCompanyId() == null) {
|
||||||
leaseApplyInfos = leaseApplyInfoMapper.selectByTaskIdAndCompIdCq(String.valueOf(taskId));
|
leaseApplyInfos = leaseApplyInfoMapper.selectByTaskIdAndCompIdCq(String.valueOf(taskId));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue