diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryRecordRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryRecordRest.java index 3a4f194007..71c8fbd173 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryRecordRest.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryRecordRest.java @@ -117,6 +117,13 @@ public class WmsInventoryRecordRest { return rb.success(); } + @ApiOperation("新增出入库记录") + @PostMapping("/saveRecord") + public ResultBean saveRecord(@RequestBody WmsInventoryRecordDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryRecordService.saveRecord(dto); + return rb.success(); + } @ApiOperation("根据sid批量删除") @PostMapping("/delBySids") diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsShelfBillRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsShelfBillRest.java index 43139c1e2b..0bf809877c 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsShelfBillRest.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsShelfBillRest.java @@ -99,4 +99,16 @@ public class WmsShelfBillRest { public ResultBean shelvesSave(@RequestBody AppSaveBillRecordDto dto) { return wmsShelfBillService.shelvesSave(dto); } + + @ApiOperation("上架记录") + @GetMapping("shelvesRecord/{sid}") + public ResultBean shelvesRecord(@PathVariable("sid") String sid) { + return wmsShelfBillService.shelvesRecord(sid); + } + + @ApiOperation("上架单详情") + @GetMapping("shelvesDetails/{sid}") + public ResultBean shelvesDetails(@PathVariable("sid") String sid) { + return wmsShelfBillService.shelvesDetails(sid); + } } diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventory.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventory.java index 522fc03084..3fa019db0d 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventory.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventory.java @@ -1,5 +1,6 @@ package com.yxt.wms.biz.inventory.wmsinventory; +import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import com.yxt.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModelProperty; @@ -14,8 +15,9 @@ import java.util.UUID; * @date 2024/2/28 8:38 */ @Data +@TableName("wms_inventory") public class WmsInventory extends BaseEntity { - + @ApiModelProperty("批次号") private String batchNumber; @ApiModelProperty("商品ID(唯一编码,入库时生成,生成规则为商品编码+YYMMdd+4位流水)") @@ -42,6 +44,8 @@ public class WmsInventory extends BaseEntity { private BigDecimal pickCount; @ApiModelProperty("冻结量") private BigDecimal freezeCount; + @ApiModelProperty("入库单价") + private BigDecimal cost; @ApiModelProperty("仓库sid") private String warehouseSid; @ApiModelProperty("仓库名称") diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecord.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecord.java index e14ac6a75f..d87ab180db 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecord.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecord.java @@ -98,5 +98,14 @@ public class WmsInventoryRecord extends BaseEntity { private String warehouseRackSid; // 库位sid @ApiModelProperty("库位编号") private String warehouseRackCode; // 库位编号 - + @ApiModelProperty("入库单价") + private BigDecimal cost; + @ApiModelProperty("税率") + private BigDecimal tax; + @ApiModelProperty("入库金额") + private BigDecimal amount; + @ApiModelProperty("经办人sid") + private String handlerSid; // 库位sid + @ApiModelProperty("经办人") + private String handlerName; // 库位编号 } diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordDto.java index 73ec98db71..34a0db58e9 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordDto.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordDto.java @@ -55,6 +55,8 @@ public class WmsInventoryRecordDto implements Dto { @ApiModelProperty("库存sid") private String inventorySid; // 库存sid + @ApiModelProperty("创建人sid") + private String createBySid; // 商品ID @ApiModelProperty("商品ID") private String goodsID; // 商品ID @ApiModelProperty("来源单sid(业务单sid)") @@ -86,11 +88,11 @@ public class WmsInventoryRecordDto implements Dto { @ApiModelProperty("规格型号") private String goodsSkuOwnSpec; // 规格型号 @ApiModelProperty("出入库后的库存量") - private BigDecimal currentCount; // 出入库后的库存量 + private String currentCount; // 出入库后的库存量 @ApiModelProperty("计量单位") private String unit; // 计量单位 @ApiModelProperty("数量") - private BigDecimal count; // 数量 + private String count; // 数量 @ApiModelProperty("仓库sid") private String warehouseSid; // 仓库sid @ApiModelProperty("仓库名称") @@ -99,5 +101,19 @@ public class WmsInventoryRecordDto implements Dto { private String warehouseRackSid; // 库位sid @ApiModelProperty("库位编号") private String warehouseRackCode; // 库位编号 + @ApiModelProperty("入库单价") + private String cost; + @ApiModelProperty("税率") + private String tax; + @ApiModelProperty("入库金额") + private String amount; + @ApiModelProperty("经办人sid") + private String handlerSid; // 库位sid + @ApiModelProperty("经办人") + private String handlerName; // 库位编号 + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("使用组织sid") + private String useOrgSid; -} \ No newline at end of file +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordMapper.java index 9ea6fbccb3..4f3cb9bc40 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordMapper.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordMapper.java @@ -82,4 +82,8 @@ public interface WmsInventoryRecordMapper extends BaseMapper List listExcel(@Param(Constants.WRAPPER) QueryWrapper qw); List getDetailsList(String sid); -} \ No newline at end of file + + List selBySourceSid(String sid); + + List selBySourceSidAndSkuCode(@Param("sid") String sid,@Param("goodsSkuCode") String goodsSkuCode); +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordMapper.xml index 0e9370f28a..1966711242 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordMapper.xml +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordMapper.xml @@ -144,4 +144,23 @@ from wms_inventory_record w where w.inventorySid = #{sid} - \ No newline at end of file + + + diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordService.java index e799d81697..5b13bc9a6c 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordService.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryrecord/WmsInventoryRecordService.java @@ -28,6 +28,8 @@ package com.yxt.wms.biz.inventory.wmsinventoryrecord; import cn.hutool.core.bean.BeanUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventory; +import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryService; import com.yxt.wms.biz.inventory.wmsinventoryrecord.report.*; import com.yxt.wms.biz.inventory.wmsoldinventory.WmsOldInventoryDetailsListVo; import org.apache.commons.lang3.StringUtils; @@ -37,11 +39,16 @@ import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Collections; +import java.util.Date; import java.util.List; /** @@ -59,6 +66,10 @@ import java.util.List; */ @Service public class WmsInventoryRecordService extends MybatisBaseService { + + @Autowired + private WmsInventoryService wmsInventoryService; + private QueryWrapper createQueryWrapper(WmsInventoryRecordQuery query) { // todo: 这里根据具体业务调整查询条件 // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); @@ -315,4 +326,28 @@ public class WmsInventoryRecordService extends MybatisBaseService getDetailsList(String sid) { return baseMapper.getDetailsList(sid); } -} \ No newline at end of file + + public void saveRecord(WmsInventoryRecordDto dto) { + WmsInventory wmsInventory = new WmsInventory(); + BeanUtil.copyProperties(dto,wmsInventory,"id","sid"); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + try { + wmsInventory.setFirstInDate(sdf.parse(sdf.format(new Date()))); + } catch (ParseException e) { + e.printStackTrace(); + } + wmsInventoryService.insert(wmsInventory); + WmsInventoryRecord inventoryRecord = new WmsInventoryRecord(); + BeanUtil.copyProperties(dto,inventoryRecord,"id","sid"); + inventoryRecord.setInventorySid(wmsInventory.getSid()); + baseMapper.insert(inventoryRecord); + } + + public List selBySourceSid(String sid) { + return baseMapper.selBySourceSid(sid); + } + + public List selBySourceSidAndSkuCode(String sid, String goodsSkuCode) { + return baseMapper.selBySourceSidAndSkuCode(sid,goodsSkuCode); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillService.java index a9a791c680..64fa5d2d28 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillService.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsoutbill/WmsOutBillService.java @@ -205,7 +205,7 @@ public class WmsOutBillService extends MybatisBaseService getDetailsInit(String sid); List selectByBillSid(@Param("sid") String sid, @Param("sidList") List sidList); + + WmsReceiptBillDetail selectByBillSidAndGoodsSkuCode(@Param("sourceBillSid")String sourceBillSid, @Param("goodsSkuCode")String goodsSkuCode); } diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailMapper.xml index 798407ce14..96fe0ad56e 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailMapper.xml +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailMapper.xml @@ -45,4 +45,9 @@ + diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailService.java index b250da84cf..0a2ceb783c 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailService.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsreceiptbilldetail/WmsReceiptBillDetailService.java @@ -74,4 +74,8 @@ public class WmsReceiptBillDetailService extends MybatisBaseService selectByBillSid(String sid, List sidList) { return baseMapper.selectByBillSid(sid, sidList); } + + public WmsReceiptBillDetail selectByBillSidAndGoodsSkuCode(String sourceBillSid, String goodsSkuCode) { + return baseMapper.selectByBillSidAndGoodsSkuCode(sourceBillSid,goodsSkuCode); + } } diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillService.java index ea9df62351..aa9719d02c 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillService.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillService.java @@ -12,20 +12,17 @@ import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; import com.yxt.wms.biz.base.wmswarehouserack.WmsHouseInfoVo; import com.yxt.wms.biz.base.wmswarehouserack.WmsWarehouseRackService; -import com.yxt.wms.biz.inventory.wmsansbill.WmsAnsBillVo; -import com.yxt.wms.biz.inventory.wmsansbilldetail.WmsAnsListDetailsVo; import com.yxt.wms.biz.inventory.wmsgoodstag.WmsGoodsTag; import com.yxt.wms.biz.inventory.wmsgoodstag.WmsGoodsTagService; import com.yxt.wms.biz.inventory.wmsinventory.WmsInventorySaveDto; import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryService; +import com.yxt.wms.biz.inventory.wmsinventoryrecord.WmsInventoryRecord; import com.yxt.wms.biz.inventory.wmsinventoryrecord.WmsInventoryRecordDto; import com.yxt.wms.biz.inventory.wmsinventoryrecord.WmsInventoryRecordService; import com.yxt.wms.biz.inventory.wmsreceiptbill.WmsReceiptBill; import com.yxt.wms.biz.inventory.wmsreceiptbill.WmsReceiptBillService; import com.yxt.wms.biz.inventory.wmsreceiptbilldetail.WmsReceiptBillDetail; -import com.yxt.wms.biz.inventory.wmsreceiptbilldetail.WmsReceiptBillDetailDto2; import com.yxt.wms.biz.inventory.wmsreceiptbilldetail.WmsReceiptBillDetailService; -import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatch; import com.yxt.wms.biz.inventory.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchService; import com.yxt.wms.biz.inventory.wmsshelfbill.app.*; import com.yxt.wms.biz.inventory.wmsshelfbilldetail.*; @@ -39,6 +36,7 @@ import com.yxt.wms.feign.portal.sysuser.SysUserFeign; import com.yxt.wms.feign.portal.sysuser.SysUserVo; import com.yxt.wms.utils.BillNo; import com.yxt.wms.utils.Rule; +import org.apache.ibatis.scripting.xmltags.IfSqlNode; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.stereotype.Service; @@ -46,6 +44,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.math.BigDecimal; +import java.text.SimpleDateFormat; import java.util.*; /** @@ -269,7 +268,7 @@ public class WmsShelfBillService extends MybatisBaseService split = Arrays.asList(orgPath.split("/")); + if (split.size() > 1) { + //获取本级sid获取本级部门信息 + SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(split.get(split.size() - 2)).getData(); + SysOrganizationVo sysOrganization1 = sysOrganizationFeign.fetchBySid(split.get(split.size() - 1)).getData(); + deptSid = sysOrganization1.getSid(); + } else { + SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(split.get(0)).getData(); + deptSid = sysOrganization.getSid(); + } + createOrgSid = sysStaffOrgFeign.getOrgSidByPath(orgPath).getData(); + } String shelvesId = dto.getShelvesSid(); WmsShelfBill wmsShelfBill = fetchBySid(shelvesId); String sourceBillSid = wmsShelfBill.getSourceBillSid(); @@ -594,6 +612,39 @@ public class WmsShelfBillService extends MybatisBaseService vos = wmsShelfBillDetailService.selectByMainSid(dto.getShelvesSid()); if (!vos.isEmpty()) { @@ -635,4 +686,111 @@ public class WmsShelfBillService extends MybatisBaseService shelvesRecord(String sid) { + ResultBean rb = ResultBean.fireFail(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + AppRecordVo vo = new AppRecordVo(); + List records = new ArrayList<>();//上架记录 + WmsShelfBill wmsShelfBill = fetchBySid(sid); + if (null != wmsShelfBill) { + vo.setShelvesId(wmsShelfBill.getBillNo()); + vo.setReceivingId(wmsShelfBill.getSourceBillNo()); + vo.setShelvesCreateTime(DateUtil.formatDate(wmsShelfBill.getCreateTime())); + WmsReceiptBill wmsReceiptBill = wmsReceiptBillService.fetchBySid(wmsShelfBill.getSourceBillSid()); + if (null != wmsReceiptBill) { + vo.setReceivingUser(wmsReceiptBill.getCreateByName()); + } + vo.setShelvesState(wmsShelfBill.getBillStateValue()); + List wmsInventoryRecords = wmsInventoryRecordService.selBySourceSid(sid); + if (!wmsInventoryRecords.isEmpty()) { + for (WmsInventoryRecord record : wmsInventoryRecords) { + AppRecordListVo appRecordListVo = new AppRecordListVo(); + appRecordListVo.setGoodsName(record.getGoodsSpuName()); + WmsShelfBillDetail shelfBillDetail = wmsShelfBillDetailService.selByBillSidAndSkuCode(sid, record.getGoodsSkuCode()); + if (null != shelfBillDetail) { + BigDecimal count = new BigDecimal("0"); + BigDecimal acCount = new BigDecimal("0"); + if (null != shelfBillDetail.getCount()) { + count = shelfBillDetail.getCount(); + } + if (null != shelfBillDetail.getActualCount()) { + acCount = shelfBillDetail.getActualCount(); + } + String n = String.valueOf(count.intValue()); + String c = String.valueOf(acCount.intValue()); + appRecordListVo.setCount(n + "/" + c); + } + List detailsList = new ArrayList<>(); + List wmsInventoryRecordList = wmsInventoryRecordService.selBySourceSidAndSkuCode(sid, record.getGoodsSkuCode()); + if (!wmsInventoryRecordList.isEmpty()) { + for (WmsInventoryRecord inventoryRecord : wmsInventoryRecordList) { + AppRecordListVo.AppRecordListDetailsDto detailsDto = new AppRecordListVo.AppRecordListDetailsDto(); + detailsDto.setGoodsID(inventoryRecord.getGoodsID()); + String houseName = ""; + String rockCode = ""; + if (StringUtils.isNotBlank(inventoryRecord.getWarehouseName())) { + houseName = inventoryRecord.getWarehouseName(); + } + if (StringUtils.isNotBlank(inventoryRecord.getWarehouseRackCode())) { + rockCode = inventoryRecord.getWarehouseRackCode(); + } + detailsDto.setHouseName(houseName + rockCode); + detailsDto.setShows(inventoryRecord.getHandlerName() + "于" + sdf.format(inventoryRecord.getCreateTime()) + "上架" + inventoryRecord.getCount().intValue() + inventoryRecord.getUnit()); + detailsList.add(detailsDto); + } + appRecordListVo.setDetailsList(detailsList); + } + records.add(appRecordListVo); + } + vo.setRecords(records); + } + } + return rb.success().setData(vo); + } + + public ResultBean shelvesDetails(String sid) { + ResultBean rb = ResultBean.fireFail(); + AppDetailsVo vo = new AppDetailsVo(); + List goodsList = new ArrayList<>(); + WmsShelfBill wmsShelfBill = fetchBySid(sid); + if (null != wmsShelfBill) { + vo.setShelvesId(wmsShelfBill.getBillNo()); + vo.setReceivingId(wmsShelfBill.getSourceBillNo()); + vo.setShelvesCreateTime(DateUtil.formatDate(wmsShelfBill.getCreateTime())); + WmsReceiptBill wmsReceiptBill = wmsReceiptBillService.fetchBySid(wmsShelfBill.getSourceBillSid()); + if (null != wmsReceiptBill) { + vo.setReceivingUser(wmsReceiptBill.getCreateByName()); + } + vo.setShelvesState(wmsShelfBill.getBillStateValue()); + if (StringUtils.isNotBlank(wmsShelfBill.getRemarks())) { + vo.setRemarks(wmsShelfBill.getRemarks()); + } + if (StringUtils.isNotBlank(wmsShelfBill.getUpShelfName())) { + vo.setShelvesUsers(wmsShelfBill.getUpShelfName()); + } + List details = wmsShelfBillDetailService.selectByMainSid(sid); + if (!details.isEmpty()) { + for (WmsShelfBillDetail detail : details) { + AppDetailsVo.AppDetailsListVo dVo = new AppDetailsVo.AppDetailsListVo(); + BeanUtil.copyProperties(detail, dVo); + dVo.setGoodsName(detail.getGoodsSpuName()); + BigDecimal count = new BigDecimal("0"); + BigDecimal acCount = new BigDecimal("0"); + if (null != detail.getCount()) { + count = detail.getCount(); + } + if (null != detail.getActualCount()) { + acCount = detail.getActualCount(); + } + String n = String.valueOf(count.subtract(acCount).intValue()); + String c = String.valueOf(acCount.intValue()); + dVo.setActualNoCount(c + "/" + n); + goodsList.add(dVo); + } + vo.setGoodsList(goodsList); + } + } + return rb.success().setData(vo); + } } diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/app/AppDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/app/AppDetailsVo.java new file mode 100644 index 0000000000..5bc3f14bb5 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/app/AppDetailsVo.java @@ -0,0 +1,68 @@ +package com.yxt.wms.biz.inventory.wmsshelfbill.app; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Fan + * @description + * @date 2024/5/31 8:56 + */ +@Data +public class AppDetailsVo { + + /** + * 上架单编号 + */ + private String shelvesId; + /** + * 收货单号 + */ + private String receivingId; + /** + * 上架单创建时间 + */ + private String shelvesCreateTime; + /** + * 收货人 + */ + private String receivingUser; + /** + * 单据状态 + */ + private String shelvesState; + /** + * 上架人 + */ + private String shelvesUsers; + private String remarks;//备注 + private List goodsList = new ArrayList<>(); + + @Data + public static class AppDetailsListVo { + /** + * 商品名称 + */ + private String goodsName; + @ApiModelProperty("商品编码") + private String goodsSkuCode; + //规格 + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; + //单位 + @ApiModelProperty("计量单位") + private String unit; + @ApiModelProperty("需上架数量") + private String count; + @ApiModelProperty("已上/未上架数量") + private String actualNoCount; + //载具编号 + private String packageNo; + + + } + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/app/AppRecordListVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/app/AppRecordListVo.java new file mode 100644 index 0000000000..c3fa06312d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/app/AppRecordListVo.java @@ -0,0 +1,35 @@ +package com.yxt.wms.biz.inventory.wmsshelfbill.app; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Fan + * @description + * @date 2024/5/31 8:43 + */ +@Data +public class AppRecordListVo { + + private String goodsName; // 商品名称 + private String count;//需上架/已上架 + private List detailsList = new ArrayList<>(); + @Data + public static class AppRecordListDetailsDto { + /** + * 商品id + */ + private String goodsID; + /** + * 库位 库区名+库位码 + */ + private String houseName; + /** + * 说明 + */ + private String shows; + } + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/app/AppRecordVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/app/AppRecordVo.java new file mode 100644 index 0000000000..23d32fc5e7 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/app/AppRecordVo.java @@ -0,0 +1,38 @@ +package com.yxt.wms.biz.inventory.wmsshelfbill.app; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Fan + * @description + * @date 2024/5/31 8:41 + */ +@Data +public class AppRecordVo { + /** + * 上架单编号 + */ + private String shelvesId; + /** + * 收货单号 + */ + private String receivingId; + /** + * 收货人 + */ + private String receivingUser; + /** + * 单据状态 + */ + private String shelvesState; + /** + * 上架单创建时间 + */ + private String shelvesCreateTime; + + private List records = new ArrayList<>();//上架记录 + +}