|
|
|
@ -2079,8 +2079,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
if ("2".equals(spStatus)) { |
|
|
|
map.put("approverPass", 1); |
|
|
|
map.put("state", "已入库"); |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果驳回
|
|
|
|
map.put("state", "驳回"); |
|
|
|
map.put("approverPass", 2); |
|
|
|
@ -2094,14 +2093,14 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
// 获取具体入库订单
|
|
|
|
ApplicationInRecordP recordP = depositoryRecordMapper.findApplicationInRecordPById(id); |
|
|
|
|
|
|
|
if(Integer.compare(recordP.getAirapproverPass(),1) == 0){ |
|
|
|
if (Integer.compare(recordP.getAirapproverPass(), 1) == 0) { |
|
|
|
// 如果当前入库单已经被处理过,则跳过
|
|
|
|
continue; |
|
|
|
} |
|
|
|
// 获取当前入库对应的物料
|
|
|
|
Material materialById = materialMapper.findMaterialById(recordP.getMid()); |
|
|
|
|
|
|
|
if(recordP.getAirtoGroupId() != null){ |
|
|
|
if (recordP.getAirtoGroupId() != null) { |
|
|
|
// 如果该申请是组合入库下的申请
|
|
|
|
flagForGroupInfoInDepository = true; |
|
|
|
} |
|
|
|
@ -2136,8 +2135,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
Place placeById = placeMapper.findPlaceById(recordP.getPlaceId()); |
|
|
|
// 修改当前库存容量
|
|
|
|
updateInventoryInfoForApproval(paramForUpdateInventory, recordP.getQuantity(), materialById, placeById); |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果是拆单单位
|
|
|
|
|
|
|
|
// 查询拆单记录
|
|
|
|
@ -2188,17 +2186,22 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(!flagForGroupInfoInDepository) { |
|
|
|
if (!flagForGroupInfoInDepository) { |
|
|
|
map.put("id", sid); |
|
|
|
depositoryRecordMapper.updateApplicationInRecord(map); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
depositoryRecordMapper.deleteApplicationInRecordById(ObjectFormatUtil.toInteger(sid.trim())); |
|
|
|
String mainGidId = (String)redisTemplate.opsForHash().get(spNo, "mainGidId"); |
|
|
|
String replace = mainGidId.replace("[", "").replace("]", ""); |
|
|
|
map.put("id",replace); |
|
|
|
String mainGidId = (String) redisTemplate.opsForHash().get(spNo, "mainGidId"); |
|
|
|
String[] replace = mainGidId.replace("[", "").replace("]", "").split(","); |
|
|
|
for (String rid : replace |
|
|
|
) { |
|
|
|
if (!"".equals(rid)) { |
|
|
|
map.put("id", rid.trim()); |
|
|
|
depositoryRecordMapper.updateApplicationInRecord(map); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
redisTemplate.delete(spNo); |
|
|
|
} |
|
|
|
|
|
|
|
@ -2593,11 +2596,11 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
Object id = map.get("id"); // 主订单编号
|
|
|
|
// 获取当前审批结果
|
|
|
|
Integer approverPass = ObjectFormatUtil.toInteger(map.get("approverPass")); |
|
|
|
map.put("approverId",userToken.getId()); |
|
|
|
map.put("approverTime",System.currentTimeMillis()); |
|
|
|
if(Integer.compare(approverPass,1) == 0){ |
|
|
|
map.put("approverId", userToken.getId()); |
|
|
|
map.put("approverTime", System.currentTimeMillis()); |
|
|
|
if (Integer.compare(approverPass, 1) == 0) { |
|
|
|
// 如果审核通过
|
|
|
|
map.put("state","已入库"); |
|
|
|
map.put("state", "已入库"); |
|
|
|
|
|
|
|
|
|
|
|
// 获取具体入库订单
|
|
|
|
@ -2636,8 +2639,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
paramForUpdateInventory.put("producedDate", recordP.getMproducedDate()); |
|
|
|
Place placeById = placeMapper.findPlaceById(recordP.getPlaceId()); |
|
|
|
updateInventoryInfoForApproval(paramForUpdateInventory, recordP.getQuantity(), materialById, placeById); |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果是拆单单位
|
|
|
|
|
|
|
|
// 查询拆单记录
|
|
|
|
@ -2687,9 +2689,8 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
map.put("state","驳回"); |
|
|
|
} else { |
|
|
|
map.put("state", "驳回"); |
|
|
|
} |
|
|
|
return depositoryRecordMapper.updateApplicationInRecord(map); |
|
|
|
} |
|
|
|
|