代码更新
This commit is contained in:
parent
8472f12a30
commit
268c5321e4
|
|
@ -35,6 +35,7 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
|||
|
||||
/**
|
||||
* 根据任务id查询出库数据
|
||||
*
|
||||
* @param parentId 任务id
|
||||
* @return 出库数据集合
|
||||
*/
|
||||
|
|
@ -45,6 +46,7 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
|||
|
||||
/**
|
||||
* 领料出库处理
|
||||
*
|
||||
* @param record 出库对象
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -55,9 +57,9 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
|||
if (StringUtils.isNull(record)) {
|
||||
return AjaxResult.error("领料出库失败,请检查参数是否填写完整!");
|
||||
}
|
||||
if (!(Integer.valueOf(0) == record.getMaId())){
|
||||
if (!(Integer.valueOf(0) == record.getMaId() || record.getMaId() == null)) {
|
||||
String status = leaseOutDetailsMapper.getMachineStatus(record);
|
||||
if (!maStatus.equals(status)){
|
||||
if (!maStatus.equals(status)) {
|
||||
return AjaxResult.error("领料出库失败,该设备不是在库状态!");
|
||||
}
|
||||
}
|
||||
|
|
@ -80,23 +82,23 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
|||
if (insertSelectiveNum > 0) {
|
||||
if (updateMaTypeStockNum > 0) {
|
||||
// if (updateMaMachineStatus > 0) {
|
||||
// if (insertAgreementInfo > 0) {
|
||||
// if (insertAgreementInfo > 0) {
|
||||
List<LeaseApplyDetails> leaseApplyDetailsList = leaseApplyDetailsMapper.getByParentId(record.getParentId());
|
||||
int i = 0;
|
||||
for (LeaseApplyDetails bean : leaseApplyDetailsList){
|
||||
if (Objects.equals(bean.getPreNum(), bean.getAlNum())){
|
||||
for (LeaseApplyDetails bean : leaseApplyDetailsList) {
|
||||
if (Objects.equals(bean.getPreNum(), bean.getAlNum())) {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
String taskId = leaseOutDetailsMapper.getTaskId(record.getParentId());
|
||||
if (i == leaseApplyDetailsList.size()){
|
||||
leaseOutDetailsMapper.updateTaskStatus(taskId,35);
|
||||
}else {
|
||||
leaseOutDetailsMapper.updateTaskStatus(taskId,34);
|
||||
if (i == leaseApplyDetailsList.size()) {
|
||||
leaseOutDetailsMapper.updateTaskStatus(taskId, 35);
|
||||
} else {
|
||||
leaseOutDetailsMapper.updateTaskStatus(taskId, 34);
|
||||
}
|
||||
return AjaxResult.success("领料出库成功!");
|
||||
// }
|
||||
// return AjaxResult.error("领料出库失败,插入任务协议信息错误!");
|
||||
// }
|
||||
// return AjaxResult.error("领料出库失败,插入任务协议信息错误!");
|
||||
// }
|
||||
// return AjaxResult.error("领料出库失败,最后更新设备状态错误!");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue