From a5cf4725b7586d845ebb03c704cbd8962130f175 Mon Sep 17 00:00:00 2001 From: liux <963924687@qq.com> Date: Fri, 16 Jan 2026 14:53:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=9B=B8=E5=85=B3=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReportInventoryBaseController.java | 8 ++++ .../service/impl/OrderGoodsServiceImpl.java | 21 +++++---- .../canteen/core/ims/vo/OrderSheet2VO.java | 9 ++-- .../ims/vo/ReportInventoryOutDetailVO.java | 45 +++++++++++++++---- .../zhhq/ZhhqPhysicalExaminationMapper.xml | 1 + 5 files changed, 63 insertions(+), 21 deletions(-) diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/ReportInventoryBaseController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/ReportInventoryBaseController.java index 5eeffbd..8c80aba 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/ReportInventoryBaseController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/ReportInventoryBaseController.java @@ -71,6 +71,14 @@ public class ReportInventoryBaseController extends BaseController { return getDataTable(list); } + @PostMapping({"/out_into/flowing/page/exprot"}) + @ApiOperation("出入库数据导出") + public void pageInventoryOutIntoFlowingExport(@Valid ReportInventoryOutDetailParam content,HttpServletResponse response) { + List list = reportInventoryBaseService.pageInventoryOutIntoFlowing(content); + ExcelUtil util = new ExcelUtil(ReportInventoryOutDetailVO.class); + util.exportExcel(response, list, "出入库流水"); + } + @GetMapping({"/out_into/statistics/page"}) @ApiOperation("出入库流水") public TableDataInfo pageInventoryOutIntoStatistics( ReportInventoryOutDetailParam content) { diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/impl/OrderGoodsServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/impl/OrderGoodsServiceImpl.java index 0fc1395..14c40cc 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/impl/OrderGoodsServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/impl/OrderGoodsServiceImpl.java @@ -433,7 +433,7 @@ public class OrderGoodsServiceImpl implements IOrderGoodsService { String type = orderSheet2VO.getType(); BigDecimal orderNum = orderSheet2VO.getOrderNum(); Long singlePrice = orderSheet2VO.getSinglePrice(); - Long totalPrice = orderSheet2VO.getTotalPrice()==0?null:orderSheet2VO.getTotalPrice(); + Long totalPrice = orderSheet2VO.getTotalPrice()==0?0:orderSheet2VO.getTotalPrice(); if(type ==null){ sb.append(" 商品类别不能为空,请填写原料或商品!"); @@ -461,18 +461,18 @@ public class OrderGoodsServiceImpl implements IOrderGoodsService { CookMaterial cookMaterial = null; CookMaterialType cookMaterialType = cookMaterialTypeMapper.selectCookMaterialTypeByMaterialTypeNameAndParentId(materialTypeName,parentId); if(cookMaterialType ==null){ - sb.append(" 类别缺失【"+materialTypeName+"】,请先添加!"); + sb.append(" 类别缺失【"+materialTypeName+"】,请先添加类别 '"+orderSheet2VO.getMaterialTypeName()+"'"); tf = false; }else { cookMaterial = cookMaterialMapper.selectCookMaterialByNameAndTypeIdAndType(materialName,cookMaterialType.getMaterialTypeId(),type); } if(cookMaterial == null){ - sb.append(" 原料或商品缺失【"+materialName+"】,请添加"); + sb.append(" 原料或商品缺失【"+materialName+"】,请添加原料或商品 '"+orderSheet2VO.getMaterialName()+"'"); tf = false; } ImsUnit imsUnit = imsUnitMapper.selectImsUnitByUnitName(unitName); if(imsUnit ==null){ - sb.append(" 单位缺失【"+materialName+"】,请添加"); + sb.append(" 单位缺失【"+materialName+"】,请添加单位 ‘"+orderSheet2VO.getUnitName()+"'"); tf = false; } if(orderNum ==null){ @@ -487,18 +487,21 @@ public class OrderGoodsServiceImpl implements IOrderGoodsService { sb.append(" 总价不能为空,请添加"); tf = false; } - if(BigDecimal.valueOf(totalPrice).compareTo(orderNum.multiply(BigDecimal.valueOf(singlePrice))) !=0){ - sb.append(materialName+" 总价不等于数量*单价,请检查"); - tf = false; + if(totalPrice !=0L && singlePrice !=0L){ + if(BigDecimal.valueOf(totalPrice).compareTo(orderNum.multiply(BigDecimal.valueOf(singlePrice))) !=0){ + sb.append(materialName+" 总价不等于数量*单价,请检查"); + tf = false; + } } + if(tf){ OrderGoodsDetailAdd orderGoodsDetailAdd = new OrderGoodsDetailAdd(); BeanUtil.copyProperties(orderSheet2VO, orderGoodsDetailAdd); orderGoodsDetailAdd.setMaterialId(cookMaterial.getMaterialId()); orderGoodsDetailAdd.setUnitId(imsUnit.getUnitId()); orderGoodsDetailAdd.setOrderNum(orderNum); - orderGoodsDetailAdd.setSinglePrice(singlePrice*100); - orderGoodsDetailAdd.setTotalPrice((totalPrice*100)); + orderGoodsDetailAdd.setSinglePrice(singlePrice); + orderGoodsDetailAdd.setTotalPrice((totalPrice)); orderGoodsDetailList.add(orderGoodsDetailAdd); materialIds.add(cookMaterial.getMaterialId()); diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/vo/OrderSheet2VO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/vo/OrderSheet2VO.java index 04f3b95..b9768c3 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/vo/OrderSheet2VO.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/vo/OrderSheet2VO.java @@ -35,16 +35,17 @@ public class OrderSheet2VO { @ApiModelProperty(value = "计量单位id") private String unitName; - /** 订货数量 */ - @Excel(name = "订货数量") - @ApiModelProperty(value = "订货数量") - private BigDecimal orderNum; /** 单价 */ @Excel(name = "单价") @ApiModelProperty(value = "单价") private Long singlePrice; + /** 订货数量 */ + @Excel(name = "订货数量") + @ApiModelProperty(value = "订货数量") + private BigDecimal orderNum; + /** 总金额 */ @Excel(name = "总金额") @ApiModelProperty(value = "总金额") diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/vo/ReportInventoryOutDetailVO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/vo/ReportInventoryOutDetailVO.java index c13e8aa..57596e0 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/vo/ReportInventoryOutDetailVO.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/vo/ReportInventoryOutDetailVO.java @@ -4,6 +4,7 @@ import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelProperty; import com.bonus.canteen.core.ims.converter.CustomNumberConverter; import com.bonus.canteen.core.ims.converter.OutTypeConverter; +import com.bonus.common.core.annotation.Excel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -16,51 +17,65 @@ import java.time.LocalDateTime; @Data public class ReportInventoryOutDetailVO { @ApiModelProperty("货品id") - @ExcelIgnore private Long materialId; - @ApiModelProperty("货品名称") - @ExcelProperty({"货品名称"}) - private String materialName; + + @ApiModelProperty("货品编码") @ExcelProperty({"货品编码"}) + @Excel(name = "货品编码", type = Excel.Type.EXPORT) private String materialCode; + + @ApiModelProperty("货品名称") + @ExcelProperty({"货品名称"}) + @Excel(name = "货品名称", type = Excel.Type.EXPORT) + private String materialName; + @ApiModelProperty("货品类别id") - @ExcelIgnore private Long materialTypeId; + @ApiModelProperty("货品类别") @ExcelProperty({"货品类别"}) + @Excel(name = "货品类别", type = Excel.Type.EXPORT) private String materialTypeName; + @ApiModelProperty("计量单位id") - @ExcelIgnore private Long unitId; private String size; @ApiModelProperty("计量单位") @ExcelProperty({"计量单位"}) + @Excel(name = "计量单位", type = Excel.Type.EXPORT) private String unitName; + @ApiModelProperty("单价") @ExcelProperty( value = {"单价(元)"}, converter = CustomNumberConverter.class ) + @Excel(name = "计量单位(元)", type = Excel.Type.EXPORT) private BigDecimal unitPrice; + @ApiModelProperty("所属区域") @ExcelProperty({"所属区域"}) + @Excel(name = "所属区域", type = Excel.Type.EXPORT) private String areaName; + @ApiModelProperty("仓库Id") - @ExcelIgnore private String warehouseId; + @ApiModelProperty("仓库") @ExcelProperty({"货品仓库"}) + @Excel(name = "货品仓库", type = Excel.Type.EXPORT) private String warehouseName; - @ApiModelProperty("出库类型") private String supplierId; + private String supplierName; @ApiModelProperty("出入库类型") @ExcelProperty(value = {"出入库类型"},converter = OutTypeConverter.class) + @Excel(name = "出入库类型", type = Excel.Type.EXPORT,readConverterExp="1=领取出库,2=报损出库,3=退货出库,4=调拨出库,5=即入即出,6=超市出库,7=盘点出库") private Integer outType; @ApiModelProperty("类型 1入库 2出库") @@ -68,16 +83,22 @@ public class ReportInventoryOutDetailVO { @ApiModelProperty("日期") @ExcelProperty({"出库时间"}) + @Excel(name = "出库时间", type = Excel.Type.EXPORT) private LocalDateTime outDate; + @ApiModelProperty("出库数量") @ExcelProperty({"出库数量"}) + @Excel(name = "出库数量", type = Excel.Type.EXPORT) private BigDecimal outNum; + @ApiModelProperty("出库金额") @ExcelProperty( value = {"出库金额(元)"}, converter = CustomNumberConverter.class ) + @Excel(name = "出库金额(元)", type = Excel.Type.EXPORT) private BigDecimal outAmount; + // @ApiModelProperty("结存数量") // @ExcelProperty({"结存数量"}) // private BigDecimal balanceCount; @@ -91,17 +112,25 @@ public class ReportInventoryOutDetailVO { @ExcelIgnore private String userId; private String fetchUserId; + @ApiModelProperty("领料人") @ExcelProperty({"领料人"}) + @Excel(name = "领料人", type = Excel.Type.EXPORT) private String fetchUserName; + @ApiModelProperty("生产日期") @ExcelProperty({"生产日期"}) + @Excel(name = "生产日期", type = Excel.Type.EXPORT) private LocalDate productDate; + @ApiModelProperty("过期日期") @ExcelProperty({"过期日期"}) + @Excel(name = "过期日期", type = Excel.Type.EXPORT) private LocalDate expireTime; + @ApiModelProperty("出库单号") @ExcelProperty({"出库单号"}) + @Excel(name = "出库单号", type = Excel.Type.EXPORT) private String recordId; } diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/zhhq/ZhhqPhysicalExaminationMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/zhhq/ZhhqPhysicalExaminationMapper.xml index 5b49293..a692ab6 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/zhhq/ZhhqPhysicalExaminationMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/zhhq/ZhhqPhysicalExaminationMapper.xml @@ -20,6 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" metabolism, fatLevel, bodyAge, + muscle, bodyFat from kitchen_staff_physical_examination where 1=1