diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java index 726af025..5c5ee449 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java @@ -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 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 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 map = new HashMap<>(); - map.put("depositoryId",depositoryId); - map.put("pid",pid); + map.put("depositoryId", depositoryId); + map.put("pid", pid); List midList = materialService.findInventoryForCompleteOutTask(map); if (midList.size() > 0) { List materialByIds = materialService.findMaterialByIds(midList); diff --git a/src/main/java/com/dreamchaser/depository_manage/pojo/ApplicationInRecordP.java b/src/main/java/com/dreamchaser/depository_manage/pojo/ApplicationInRecordP.java index bbaa21f5..dd89fe97 100644 --- a/src/main/java/com/dreamchaser/depository_manage/pojo/ApplicationInRecordP.java +++ b/src/main/java/com/dreamchaser/depository_manage/pojo/ApplicationInRecordP.java @@ -31,6 +31,11 @@ public class ApplicationInRecordP { */ private String applicantName; + /** + * 部门名称 + */ + private String adminorgName; + /** * 提交人id */ diff --git a/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java b/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java index 334c4149..d133e2ca 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java @@ -4237,6 +4237,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { applicationInRecord.setMversion("组合"); } ApplicationInRecordP ap = new ApplicationInRecordP(applicationInRecord); + ap.setAdminorgName(userByPortById.getMaindeparmentname()); result.add(ap); } return result; @@ -4291,6 +4292,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { applicationInRecord.setMversion("组合"); } ApplicationInRecordP arp = new ApplicationInRecordP(applicationInRecord); + arp.setAdminorgName(userByPortById.getMaindeparmentname()); result.add(arp); } @@ -4351,6 +4353,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { record.setApplicantTime(time); record.setApplyRemark(record.getApplyRemark() == null ? "" : record.getApplyRemark()); ApplicationOutRecordP recordP = new ApplicationOutRecordP(record); + recordP.setAdminorgName(userByPortById.getMaindeparmentname()); result.add(recordP); } return result; @@ -4422,6 +4425,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { recordP.setApplicantTime(time); recordP.setApplyRemark(recordP.getApplyRemark() == null ? "" : recordP.getApplyRemark()); ApplicationOutRecordP aorp = new ApplicationOutRecordP(recordP); + aorp.setAdminorgName(userByPortById.getMaindeparmentname()); result.add(aorp); } return result; diff --git a/src/main/resources/templates/pages/depository/table-in.html b/src/main/resources/templates/pages/depository/table-in.html index 914f05c7..2610a309 100644 --- a/src/main/resources/templates/pages/depository/table-in.html +++ b/src/main/resources/templates/pages/depository/table-in.html @@ -176,6 +176,7 @@ {field: 'quantity', width: 150, title: '数量', sort: true}, {field: 'depositoryName', width: 150, title: '仓库名称'}, {field: 'applicantName', width: 200, title: '提交人'}, + {field: 'adminorgName', width: 150, title: '提交人部门'}, {field: 'applicantTime', width: 200, title: '提交时间', sort: true}, {field: 'applyRemark', width: 200, title: '备注'}, {field: 'airstate', width: 200, title: '状态'}, diff --git a/src/main/resources/templates/pages/depository/table-in_mobile.html b/src/main/resources/templates/pages/depository/table-in_mobile.html index b2f4d43f..3f1a9922 100644 --- a/src/main/resources/templates/pages/depository/table-in_mobile.html +++ b/src/main/resources/templates/pages/depository/table-in_mobile.html @@ -133,7 +133,7 @@ brandItem = ""; } lis.push('
  • ' + result[i].applicantName + "的入库申请" + '

    '); + + result[i].id + ')">

    ' + result[i].adminorgName+"_"+result[i].applicantName + "的入库申请" + '

    '); lis.push('
    ' + '

    ' + "物料名称:"+ result[i].mname + '

    ' + '

    ' + "物料型号:"+result[i].mversion + '

    ' @@ -240,7 +240,7 @@ brandItem = ""; } lis.push('
  • ' + result[i].applicantName + "的入库申请" + '

    '); + + result[i].id + ')">

    ' + result[i].adminorgName+"_"+result[i].applicantName + "的入库申请" + '

    '); lis.push('
    ' + '

    ' + "物料名称:"+ result[i].mname + '

    ' + '

    ' + "物料型号:"+result[i].mversion + '

    ' diff --git a/src/main/resources/templates/pages/depository/table-out.html b/src/main/resources/templates/pages/depository/table-out.html index 30bcc443..d5d31ce6 100644 --- a/src/main/resources/templates/pages/depository/table-out.html +++ b/src/main/resources/templates/pages/depository/table-out.html @@ -188,6 +188,7 @@ } }, {field: 'applicantName', width: 150, title: '申请人'}, + {field: 'adminorgName', width: 150, title: '申请人部门'}, {field: 'applicantTime', width: 200, title: '申请时间', sort: true}, { field: 'istransfer', title: '是否为转移申请', minWidth: 120, templet: function (d) { diff --git a/src/main/resources/templates/pages/depository/table-out_mobile.html b/src/main/resources/templates/pages/depository/table-out_mobile.html index e8f66968..c870fd66 100644 --- a/src/main/resources/templates/pages/depository/table-out_mobile.html +++ b/src/main/resources/templates/pages/depository/table-out_mobile.html @@ -135,7 +135,7 @@ }); lis.push('
  • ' + result[i].applicantName + "的出库申请" + '

    '); + + result[i].id + ')">

    ' +result[i].adminorgName+"_"+ result[i].applicantName + "的出库申请" + '

    '); lis.push('
    ' + mnameItem + '

    ' + "申请总数:" + result[i].quantity + '

    ' @@ -266,7 +266,7 @@ for (let i = 0; i < result.length; i++) { lis.push('
  • ' + result[i].applicantName + "的出库申请" + '

    '); + + result[i].id + ')">

    ' +result[i].adminorgName+"_"+ result[i].applicantName + "的出库申请" + '

    '); lis.push('
    ' + '

    ' + result[i].mname + '

    ' + '

    ' + result[i].mversion + '

    '