|
|
|
@ -607,7 +607,7 @@ public class GroupServiceImpl implements GroupService { |
|
|
|
} |
|
|
|
} |
|
|
|
// 用于统计出库物料总数
|
|
|
|
Integer quantityForTotal = 0; |
|
|
|
double quantityForTotal = 0; |
|
|
|
|
|
|
|
// 用于统计出库物料金额总数
|
|
|
|
double priceForTotal = 0; |
|
|
|
@ -654,7 +654,7 @@ public class GroupServiceImpl implements GroupService { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
paramForOut.put("quantity", quantityForTotal); |
|
|
|
paramForOut.put("quantity", quantityForTotal * 100); |
|
|
|
paramForOut.put("price", priceForTotal); |
|
|
|
paramForOut.put("applicantTime", System.currentTimeMillis()); |
|
|
|
paramForOut.put("istransfer", 2); |
|
|
|
@ -671,7 +671,7 @@ public class GroupServiceImpl implements GroupService { |
|
|
|
parentId = paramForOut.get("id"); |
|
|
|
|
|
|
|
// 插入子订单
|
|
|
|
result += insertApplicationOutMinRecord(userToken, code, parentId, gid, quantityForGroup, depositoryIdList); |
|
|
|
result += insertApplicationOutMinRecord(map, code, parentId, gid, quantityForGroup, depositoryIdList); |
|
|
|
|
|
|
|
if (params != null && params.size() > 0) { |
|
|
|
// 如果提交的不是单个
|
|
|
|
@ -693,7 +693,7 @@ public class GroupServiceImpl implements GroupService { |
|
|
|
quantityForTotal += quantityForGroup * groupInfo.getQuantity(); |
|
|
|
priceForTotal += inventory.get(0).getPrice() * 100 * quantityForGroup; |
|
|
|
} |
|
|
|
result += insertApplicationOutMinRecord(userToken, code, parentId, gid, quantityForGroup, depositoryIdList); |
|
|
|
result += insertApplicationOutMinRecord(map, code, parentId, gid, quantityForGroup, depositoryIdList); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
@ -951,7 +951,7 @@ public class GroupServiceImpl implements GroupService { |
|
|
|
/** |
|
|
|
* 用于插入子出库订单 |
|
|
|
* |
|
|
|
* @param userToken 申请人 |
|
|
|
* @param map 申请条件 |
|
|
|
* @param code 出库单号 |
|
|
|
* @param parentId 主单号 |
|
|
|
* @param gid 组合id |
|
|
|
@ -959,7 +959,7 @@ public class GroupServiceImpl implements GroupService { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Integer insertApplicationOutMinRecord(UserByPort userToken, String code, Object parentId, Integer gid, Integer quantityForGroup, List<Integer> depositoryIdList) { |
|
|
|
public Integer insertApplicationOutMinRecord(Map<String,Object> map, String code, Object parentId, Integer gid, Integer quantityForGroup, List<Integer> depositoryIdList) { |
|
|
|
|
|
|
|
// 用于存储申请数
|
|
|
|
Integer result = 0; |
|
|
|
@ -1056,10 +1056,14 @@ public class GroupServiceImpl implements GroupService { |
|
|
|
paramForOutMin.put("unit", groupInfo.getUnit()); |
|
|
|
paramForOutMin.put("mid", mid); |
|
|
|
paramForOutMin.put("trueOut", 0); |
|
|
|
paramForOutMin.put("quantity", quantity); |
|
|
|
paramForOutMin.put("quantity", quantity * 100); |
|
|
|
paramForOutMin.put("code", code); |
|
|
|
paramForOutMin.put("placeId", 0); |
|
|
|
paramForOutMin.put("constructionUnitId", map.get("constructionUnitId")); |
|
|
|
paramForOutMin.put("adminorgId", map.get("adminorgId")); |
|
|
|
|
|
|
|
result += depositoryRecordMapper.insertApplicationOutRecordMin(paramForOutMin); |
|
|
|
|
|
|
|
} else { |
|
|
|
throw new MyException(groupInfo.getMname() + ",库存不足"); |
|
|
|
} |
|
|
|
|