|
|
|
@ -1959,11 +1959,11 @@ public class PageController { |
|
|
|
Inventory inventoryById = materialService.findInventoryById(applicationOutRecordMin.getMid()); |
|
|
|
// 获取出库物料仓库信息
|
|
|
|
Integer depositoryId = applicationOutRecordMin.getDepositoryId(); |
|
|
|
if(!depositoryIdList.contains(depositoryId)){ |
|
|
|
if (!depositoryIdList.contains(depositoryId)) { |
|
|
|
depositoryIdList.add(depositoryId); |
|
|
|
} |
|
|
|
Integer placeId = applicationOutRecordMin.getPlaceId(); |
|
|
|
if(!placeIdList.contains(placeId)){ |
|
|
|
if (!placeIdList.contains(placeId)) { |
|
|
|
placeIdList.add(placeId); |
|
|
|
} |
|
|
|
applicationOutRecordMin.setMname(inventoryById.getMname()); |
|
|
|
@ -1973,7 +1973,7 @@ public class PageController { |
|
|
|
if ("-1".equals(unit)) { |
|
|
|
if (inventoryById.getPrice() != null) { |
|
|
|
double amounts = ObjectFormatUtil.multiply(inventoryById.getPrice(), applicationOutRecordMin.getQuantity()); |
|
|
|
sumPrice = ObjectFormatUtil.sum(sumPrice,amounts); |
|
|
|
sumPrice = ObjectFormatUtil.sum(sumPrice, amounts); |
|
|
|
|
|
|
|
} |
|
|
|
sumUnit.append(inventoryById.getUnit()).append(","); |
|
|
|
@ -1990,7 +1990,7 @@ public class PageController { |
|
|
|
if (inventoryById.getPrice() != null) { |
|
|
|
BigDecimal bd = BigDecimal.valueOf((inventoryById.getPrice() / scale * applicationOutRecordMin.getQuantity())); |
|
|
|
double v = bd.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
sumPrice = ObjectFormatUtil.sum(sumPrice,v); |
|
|
|
sumPrice = ObjectFormatUtil.sum(sumPrice, v); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -2026,8 +2026,8 @@ public class PageController { |
|
|
|
depositoryManagerNames.append(user.getName()).append(","); |
|
|
|
} |
|
|
|
List<Depository> depositoryByIds = depositoryService.findDepositoryByIds(depositoryIdList); |
|
|
|
for (Depository depository:depositoryByIds |
|
|
|
) { |
|
|
|
for (Depository depository : depositoryByIds |
|
|
|
) { |
|
|
|
depositoryName.append(depository.getDname()).append(","); |
|
|
|
} |
|
|
|
|
|
|
|
@ -2110,12 +2110,11 @@ public class PageController { |
|
|
|
} |
|
|
|
applicationInRecordPById.setAirapproverName(airapproverName.toString()); |
|
|
|
} |
|
|
|
mv.addObject("record", applicationInRecordPById); |
|
|
|
mv.addObject("placeCode", placeCode); |
|
|
|
|
|
|
|
if (Integer.compare(flagForGroup, 2) != 0) { |
|
|
|
// 如果不是组合
|
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(applicationInRecordPById.getApplicantId(), userKey, token); |
|
|
|
applicationInRecordPById.setApplicantName(userByPort.getName()); |
|
|
|
applicationInRecordPById.setApplicantName(userByPort.getMaindeparmentname() + "_" + userByPort.getName()); |
|
|
|
applicationInRecordPById.setApplicantTime(DateUtil.TimeStampToDateTime(Long.valueOf(applicationInRecordPById.getApplicantTime()))); |
|
|
|
if (applicationInRecordPById.getPrice() != null) { |
|
|
|
applicationInRecordPById.setPrice(applicationInRecordPById.getPrice() / 100); |
|
|
|
@ -2134,6 +2133,8 @@ public class PageController { |
|
|
|
mv.addObject("groupInfoList", groupInfoList); |
|
|
|
mv.setViewName("pages/application/form-step-look_group"); |
|
|
|
} |
|
|
|
mv.addObject("record", applicationInRecordPById); |
|
|
|
mv.addObject("placeCode", placeCode); |
|
|
|
} else { |
|
|
|
throw new MyException("缺少必要参数!"); |
|
|
|
} |
|
|
|
@ -2411,7 +2412,7 @@ public class PageController { |
|
|
|
if (inventoryById.getPrice() != null) { |
|
|
|
BigDecimal bd = BigDecimal.valueOf(inventoryById.getPrice() * recordMinP.getQuantity()); |
|
|
|
double v = bd.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
sumPrice = ObjectFormatUtil.sum(sumPrice,v); |
|
|
|
sumPrice = ObjectFormatUtil.sum(sumPrice, v); |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
@ -2428,7 +2429,7 @@ public class PageController { |
|
|
|
if (inventoryById.getPrice() != null) { |
|
|
|
BigDecimal bd = BigDecimal.valueOf((inventoryById.getPrice() / scale * recordMinP.getQuantity())); |
|
|
|
double v = bd.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
sumPrice = ObjectFormatUtil.sum(sumPrice,v); |
|
|
|
sumPrice = ObjectFormatUtil.sum(sumPrice, v); |
|
|
|
} |
|
|
|
} |
|
|
|
recordMinPList.add(recordMinP); |
|
|
|
@ -2451,9 +2452,9 @@ public class PageController { |
|
|
|
List<Place> placeByIdS = placeService.findPlaceByIdS(placeIdList); |
|
|
|
for (Place place : placeByIdS) { |
|
|
|
int placeId = place.getId(); |
|
|
|
if(placeId == 0){ |
|
|
|
if (placeId == 0) { |
|
|
|
placeCode.append("默认库位").append(","); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
placeCode.append(place.getKingdeecode()).append(","); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -2517,7 +2518,7 @@ public class PageController { |
|
|
|
mv.addObject("display", "none"); |
|
|
|
|
|
|
|
} |
|
|
|
applicationOutRecordPById.setApplicantName(userByPort.getName()); |
|
|
|
applicationOutRecordPById.setApplicantName(userByPort.getMaindeparmentname() + "_" + userByPort.getName()); |
|
|
|
applicationOutRecordPById.setDepartmentheadName(departmentHeadName.toString()); |
|
|
|
applicationOutRecordPById.setDepositoryManagerName(depositoryManagerNames.toString()); |
|
|
|
applicationOutRecordPById.setApplicantTime(DateUtil.TimeStampToDateTime(Long.valueOf(applicationOutRecordPById.getApplicantTime()))); |
|
|
|
@ -3108,8 +3109,8 @@ public class PageController { |
|
|
|
public ModelAndView ScanBarOrQrCodeOut_selectMaterial(Integer pid, String mcode, Integer depositoryId) { |
|
|
|
ModelAndView mv = new ModelAndView(); |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
map.put("depositoryId",depositoryId); |
|
|
|
map.put("pid",pid); |
|
|
|
map.put("depositoryId", depositoryId); |
|
|
|
map.put("pid", pid); |
|
|
|
List<Integer> midList = materialService.findInventoryForCompleteOutTask(map); |
|
|
|
if (midList.size() > 0) { |
|
|
|
List<Inventory> materialByIds = materialService.findMaterialByIds(midList); |
|
|
|
|