From 7902b211978b2307dcdfcfbd5c0170115dbfef75 Mon Sep 17 00:00:00 2001 From: mashuai Date: Tue, 28 Oct 2025 16:48:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E9=97=A8=E8=AF=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BackApplyInfoController.java | 11 +++++++ .../material/back/domain/ExitPermit.java | 8 +++++ .../back/mapper/BackApplyInfoMapper.java | 7 +++++ .../back/service/IBackApplyInfoService.java | 7 +++++ .../impl/BackApplyInfoServiceImpl.java | 10 ++++++ .../basic/controller/BmReportController.java | 1 + .../domain/report/PurChaseReportInfo.java | 7 +++++ .../service/impl/BmReportServiceImpl.java | 3 ++ .../material/repair/domain/RepairCost.java | 2 +- .../material/back/BackApplyInfoMapper.xml | 31 +++++++++++++++++-- .../mapper/material/basic/BmReportMapper.xml | 21 +++++++++++-- .../mapper/material/common/SelectMapper.xml | 6 ---- 12 files changed, 102 insertions(+), 12 deletions(-) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/controller/BackApplyInfoController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/controller/BackApplyInfoController.java index 5dc7ebde..ebc6869e 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/controller/BackApplyInfoController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/controller/BackApplyInfoController.java @@ -597,6 +597,17 @@ public class BackApplyInfoController extends BaseController { } + @ApiOperation(value = "出门证领料单号下拉") + @GetMapping("/getCodeList") + public AjaxResult getCodeList(ExitPermit bean) { + try { + return AjaxResult.success(backApplyInfoService.getCodeList(bean)); + } catch (Exception e) { + return AjaxResult.success(); + } + + } + /** * 新增出门证 */ diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/ExitPermit.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/ExitPermit.java index 2c1da586..5d874bb5 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/ExitPermit.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/ExitPermit.java @@ -37,6 +37,9 @@ public class ExitPermit implements Serializable { @ApiModelProperty(value = "日期") private String addDate; + @ApiModelProperty(value = "领料单号") + private String code; + /** * 创建人 @@ -67,4 +70,9 @@ public class ExitPermit implements Serializable { private String endTime; + /** + * 单号来源 + */ + private String source; + } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/mapper/BackApplyInfoMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/mapper/BackApplyInfoMapper.java index bb937c27..787b38b5 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/mapper/BackApplyInfoMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/mapper/BackApplyInfoMapper.java @@ -517,4 +517,11 @@ public interface BackApplyInfoMapper { BackApplyDetails selectCheckREDetails(BackApplyDetails details); BackApplyDetails selectIsFinishByMaId(Long maId); + + /** + * 出门证领料单号下拉 + * @param bean + * @return + */ + List getCodeList(ExitPermit bean); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/IBackApplyInfoService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/IBackApplyInfoService.java index 1d3b2617..ed5878b0 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/IBackApplyInfoService.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/IBackApplyInfoService.java @@ -251,5 +251,12 @@ public interface IBackApplyInfoService { int syncProjectDetails(BackApplyInfo backApplyInfo); AjaxResult selectBackApplyInfoByIdClz(Long id, String keyWord); + + /** + * 出门证领料单号下拉 + * @param bean + * @return + */ + List getCodeList(ExitPermit bean); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java index 8a985216..daf03340 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java @@ -404,6 +404,16 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService { return ajaxResult; } + /** + * 出门证领料单号下拉 + * @param bean + * @return + */ + @Override + public List getCodeList(ExitPermit bean) { + return backApplyInfoMapper.getCodeList(bean); + } + /** * 检查是否有编码设备 */ diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/controller/BmReportController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/controller/BmReportController.java index 5440f773..6d126922 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/controller/BmReportController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/controller/BmReportController.java @@ -60,6 +60,7 @@ public class BmReportController extends BaseController { reportInfo.setPurchasePrice(info.getPurchasePrice()); reportInfo.setPurchasePriceNoTax(info.getPurchasePriceNoTax()); reportInfo.setPendingInputNum(info.getPendingInputNum()); + reportInfo.setNotPassNum(info.getNotPassNum()); } return AjaxResult.success(reportInfo); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/report/PurChaseReportInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/report/PurChaseReportInfo.java index f4e7435e..6219713a 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/report/PurChaseReportInfo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/report/PurChaseReportInfo.java @@ -46,6 +46,10 @@ public class PurChaseReportInfo { @Excel(name = "验收合格数量", cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT) private BigDecimal passNum; + @ApiModelProperty(value = "未验收数量") + @Excel(name = "未验收数量", cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT) + private BigDecimal notPassNum; + @ApiModelProperty(value = "入库数量") @Excel(name = "入库数量", cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT) private BigDecimal inputNum; @@ -102,4 +106,7 @@ public class PurChaseReportInfo { private String keyWord; private Long userId; + + @ApiModelProperty(value = "状态(已验收1,未入库2)") + private String status; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/impl/BmReportServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/impl/BmReportServiceImpl.java index 52aac128..231927f0 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/impl/BmReportServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/impl/BmReportServiceImpl.java @@ -45,6 +45,7 @@ public class BmReportServiceImpl implements BmReportService { BigDecimal totalPurchasePrice = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP); BigDecimal totalPurchasePriceNoTax = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP); BigDecimal totalPendingInputNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP); + BigDecimal totalNotPassNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP); List list = bmReportMapper.getPurChaseReportList(bean); if (CollectionUtils.isNotEmpty(list)) { for (PurChaseReportInfo purChaseReportInfo : list) { @@ -54,6 +55,7 @@ public class BmReportServiceImpl implements BmReportService { totalPurchasePrice = totalPurchasePrice.add(purChaseReportInfo.getPurchasePrice()); totalPurchasePriceNoTax = totalPurchasePriceNoTax.add(purChaseReportInfo.getPurchasePriceNoTax()); totalPendingInputNum = totalPendingInputNum.add(purChaseReportInfo.getPendingInputNum()); + totalNotPassNum = totalNotPassNum.add(purChaseReportInfo.getNotPassNum()); } } if (bean.getIsExport() == 0) { @@ -64,6 +66,7 @@ public class BmReportServiceImpl implements BmReportService { info.setPurchasePrice(totalPurchasePrice); info.setPurchasePriceNoTax(totalPurchasePriceNoTax); info.setPendingInputNum(totalPendingInputNum); + info.setNotPassNum(totalNotPassNum); info.setUnitName("合计"); list.add(0, info); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/repair/domain/RepairCost.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/repair/domain/RepairCost.java index eb66a77f..0643ad69 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/repair/domain/RepairCost.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/repair/domain/RepairCost.java @@ -72,7 +72,7 @@ public class RepairCost extends BaseEntity { @ApiModelProperty(value = "委外维修费用") private BigDecimal outSourceCosts; - /** 维修方式(1内部2返厂3报废) */ + /** 维修方式(1内部2返厂3报废4现场维修) */ @Excel(name = "维修方式", readConverterExp = "1=内部2返厂3报废") private String repairType; diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml index b6f6713b..b0710ca5 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml @@ -800,8 +800,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - insert into bm_exit_permit (material,name,car_code,add_date,create_by,create_time) - values (#{material}, #{name}, #{carCode}, #{addDate}, #{createBy}, now()) + insert into bm_exit_permit (material,name,car_code,add_date,create_by,create_time,code) + values (#{material}, #{name}, #{carCode}, #{addDate}, #{createBy}, now(), #{code}) INSERT INTO archives_record_info @@ -1507,7 +1507,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" `name`, material, car_code as carCode, - add_date as addDate + add_date as addDate, + code as code FROM bm_exit_permit WHERE @@ -1629,4 +1630,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" limit 1 + + diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmReportMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmReportMapper.xml index 7d1928f1..fb3addcb 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmReportMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmReportMapper.xml @@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mt1.unit_name as unitName, IFNULL(pcd.purchase_num, 0) as purchaseNum, IFNULL(pcd.check_num, 0) as passNum, + IFNULL(pcd.purchase_num, 0) - IFNULL(pcd.check_num, 0) as notPassNum, IFNULL(pcd.input_num, 0) as inputNum, IFNULL(pcd.purchase_price, 0) as purchasePrice, IFNULL(pcd.purchase_tax_price, 0) as purchasePriceNoTax, @@ -42,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id LEFT JOIN ma_type_manage mtm ON mt4.type_id = mtm.type_id WHERE - pcd.check_num > 0 and tt.task_type = 0 + tt.task_type = 0 and mtm.user_id = #{userId} @@ -58,7 +59,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - ORDER BY pcd.input_time DESC + + + + and IFNULL(pcd.check_num, 0) > 0 + + + and ( + IFNULL(pcd.input_num, 0) = 0 + or IFNULL(pcd.check_num, 0) > IFNULL(pcd.input_num, 0) + ) + + + and 1 = 1 + + + + ORDER BY pcd.input_time