add: 增加收货单等新功能;
This commit is contained in:
@@ -8,7 +8,9 @@ import org.nl.common.base.CommonPage;
|
||||
import org.nl.common.base.CommonResult;
|
||||
import org.nl.common.base.RestBusinessTemplate;
|
||||
import org.nl.common.base.ResultCode;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.wms.database.eas.dao.AllocationBill;
|
||||
import org.nl.wms.database.eas.dto.AllocationBillQuery;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -23,7 +25,7 @@ import org.nl.wms.database.eas.service.IallocationBillService;
|
||||
|
||||
|
||||
/**
|
||||
* (AllocationBill)控制层
|
||||
* 诺力三期WMS出入库新增功能
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@@ -36,6 +38,18 @@ public class AllocationBillController {
|
||||
private IallocationBillService allocationBillService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询调拨单据
|
||||
*
|
||||
* @param params 传入分页条件或查询条件,例:{"page":"0","size":"10", "fuzzy":"熊一" }
|
||||
*/
|
||||
@PostMapping("/allocationPage")
|
||||
@Log("分页查询")
|
||||
public ResponseEntity<CommonPage<AllocationBill>> allocationPage(@RequestBody AllocationBillQuery params) {
|
||||
return new ResponseEntity<>(allocationBillService.allocationPage(params), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
@@ -43,7 +57,7 @@ public class AllocationBillController {
|
||||
*/
|
||||
@PostMapping("/page")
|
||||
@Log("分页查询")
|
||||
public ResponseEntity<CommonPage<AllocationBill>> page(@RequestBody AllocationBillVO params) {
|
||||
public ResponseEntity<CommonPage<AllocationBill>> page(@RequestBody AllocationBillQuery params) {
|
||||
return new ResponseEntity<>(allocationBillService.page(params), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -61,19 +75,17 @@ public class AllocationBillController {
|
||||
|
||||
/**
|
||||
* 单据直接调拨
|
||||
*
|
||||
* @param ids 传入审核对象主键,例:{"id":"1"}
|
||||
* @return 单据直接调拨
|
||||
*/
|
||||
@PostMapping("/allocationConfirm")
|
||||
@PostMapping("/confirm")
|
||||
@Log("单据直接调拨")
|
||||
@SaIgnore
|
||||
//@SaCheckPermission("@el.check(allocationConfirm:edit')")
|
||||
public CommonResult allocationConfirm(@RequestBody List<String> ids) {
|
||||
if (ids == null || ids.isEmpty()) {
|
||||
return CommonResult.failed(ResultCode.FAILED);
|
||||
public CommonResult confirm(@RequestBody List<AllocationBillVO> params) {
|
||||
if (params.isEmpty()) {
|
||||
throw new BadRequestException("参数为空!");
|
||||
}
|
||||
return RestBusinessTemplate.execute(() -> allocationBillService.allocationConfirm(ids));
|
||||
// return RestBusinessTemplate.execute(() -> allocationBillService.allocationConfirm(params));
|
||||
return RestBusinessTemplate.execute(() -> null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -84,29 +84,6 @@ public class EasOutInBillController {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询调拨单据
|
||||
*
|
||||
* @param params 传入分页条件或查询条件,例:{"page":"0","size":"10", "fuzzy":"熊一" }
|
||||
*/
|
||||
@PostMapping("/allocationPage")
|
||||
@Log("分页查询")
|
||||
public ResponseEntity<CommonPage<AllocationBill>> allocationPage(@RequestBody AllocationBillQuery params) {
|
||||
return new ResponseEntity<>(easOutInBillService.allocationPage(params), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询收货单据
|
||||
*
|
||||
* @param params 传入分页条件或查询条件,例:{"page":"0","size":"10", "fuzzy":"熊一" }
|
||||
*/
|
||||
@PostMapping("/receiptPage")
|
||||
@Log("分页查询")
|
||||
public ResponseEntity<CommonPage<ReceiptBill>> receiptPage(@RequestBody ReceiptBillQuery params) {
|
||||
return new ResponseEntity<>(easOutInBillService.receiptPage(params), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询出入库单据
|
||||
|
||||
@@ -8,7 +8,10 @@ import org.nl.common.base.CommonPage;
|
||||
import org.nl.common.base.CommonResult;
|
||||
import org.nl.common.base.RestBusinessTemplate;
|
||||
import org.nl.common.base.ResultCode;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.wms.database.eas.dao.ReceiptBill;
|
||||
import org.nl.wms.database.eas.dto.ReceiptBillQuery;
|
||||
import org.nl.wms.ext.srm.WmsToSrmService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -23,7 +26,7 @@ import org.nl.wms.database.eas.service.IreceiptBillService;
|
||||
|
||||
|
||||
/**
|
||||
* (ReceiptBill)控制层
|
||||
* 诺力三期WMS出入库新增功能1
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@@ -35,6 +38,17 @@ public class ReceiptBillController {
|
||||
@Resource
|
||||
private IreceiptBillService receiptBillService;
|
||||
|
||||
/**
|
||||
* 查询收货单据
|
||||
*
|
||||
* @param params 传入分页条件或查询条件,例:{"page":"0","size":"10", "fuzzy":"熊一" }
|
||||
*/
|
||||
@PostMapping("/receiptPage")
|
||||
@Log("分页查询")
|
||||
public ResponseEntity<CommonPage<ReceiptBill>> receiptPage(@RequestBody ReceiptBillQuery params) {
|
||||
return new ResponseEntity<>(receiptBillService.receiptPage(params), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
@@ -63,18 +77,18 @@ public class ReceiptBillController {
|
||||
/**
|
||||
* 收货单确认
|
||||
*
|
||||
* @param ids 传入审核对象主键,例:{"id":"1"}
|
||||
* @return 收货单确认
|
||||
*/
|
||||
@PostMapping("/receiptConfirm")
|
||||
@PostMapping("/confirm")
|
||||
@Log("收货单确认")
|
||||
@SaIgnore
|
||||
//@SaCheckPermission("@el.check(receiptConfirm:edit')")
|
||||
public CommonResult receiptConfirm(@RequestBody List<String> ids) {
|
||||
if (ids == null || ids.isEmpty()) {
|
||||
return CommonResult.failed(ResultCode.FAILED);
|
||||
public CommonResult confirm(@RequestBody List<ReceiptBillVO> params) {
|
||||
if (params.isEmpty()) {
|
||||
throw new BadRequestException("参数为空!");
|
||||
}
|
||||
return RestBusinessTemplate.execute(() -> receiptBillService.receiptConfirm(ids));
|
||||
// return RestBusinessTemplate.execute(() -> receiptBillService.receiptConfirm(params));
|
||||
return RestBusinessTemplate.execute(() -> null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,133 +21,53 @@ import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
public class AllocationBill extends Model<AllocationBill> {
|
||||
|
||||
private static final long serialVersionUID = -7739291296662381393L;
|
||||
//@TableId(value = "id", type = IdType.NONE)
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 单据ID
|
||||
*/
|
||||
@TableId(value = "djid", type = IdType.NONE)
|
||||
private String djid;
|
||||
|
||||
|
||||
/**
|
||||
* 单据编号
|
||||
*/
|
||||
|
||||
private String djbh;
|
||||
|
||||
|
||||
/**
|
||||
* 业务类型
|
||||
*/
|
||||
private String ywlx;
|
||||
|
||||
|
||||
/**
|
||||
* 业务日期
|
||||
*/
|
||||
|
||||
private String ywrq;
|
||||
|
||||
|
||||
/**
|
||||
* 调出库存组织编码
|
||||
*/
|
||||
private String dckcbm;
|
||||
|
||||
|
||||
/**
|
||||
* 调出库存组织名称
|
||||
*/
|
||||
private String dckcmc;
|
||||
|
||||
|
||||
/**
|
||||
* 调入库存组织编码
|
||||
*/
|
||||
private String drkcbm;
|
||||
|
||||
|
||||
/**
|
||||
* 调入库存组织名称
|
||||
*/
|
||||
private String drkcmc;
|
||||
|
||||
|
||||
/**
|
||||
* 调出部门
|
||||
*/
|
||||
private String dcbm;
|
||||
|
||||
|
||||
/**
|
||||
* 调入部门
|
||||
*/
|
||||
private String drbm;
|
||||
|
||||
|
||||
/**
|
||||
* 表头备注
|
||||
*/
|
||||
|
||||
private String btbz;
|
||||
|
||||
|
||||
/**
|
||||
* 制单时间
|
||||
*/
|
||||
private String cjsj;
|
||||
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String cjr;
|
||||
|
||||
|
||||
/**
|
||||
* 单据状态
|
||||
*/
|
||||
private String djzt;
|
||||
|
||||
|
||||
/**
|
||||
* 分录ID
|
||||
*/
|
||||
private String flid;
|
||||
|
||||
|
||||
/**
|
||||
* 分录序号
|
||||
*/
|
||||
|
||||
private String flxh;
|
||||
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String wlbm;
|
||||
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
* 分录id
|
||||
*/
|
||||
private String wlmc;
|
||||
|
||||
private String flid;
|
||||
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String ggxh;
|
||||
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String pc;
|
||||
|
||||
|
||||
/**
|
||||
* 辅助属性
|
||||
*/
|
||||
private String fzsx;
|
||||
|
||||
|
||||
/**
|
||||
@@ -155,90 +75,34 @@ public class AllocationBill extends Model<AllocationBill> {
|
||||
*/
|
||||
private String jldw;
|
||||
|
||||
|
||||
/**
|
||||
* 基本计量单位
|
||||
*/
|
||||
private String jbjldw;
|
||||
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private String sl;
|
||||
|
||||
|
||||
/**
|
||||
* 基本数量
|
||||
*/
|
||||
private String jbsl;
|
||||
|
||||
|
||||
/**
|
||||
* 库存类型
|
||||
*/
|
||||
private String kclx;
|
||||
|
||||
|
||||
/**
|
||||
* 库存状态
|
||||
*/
|
||||
private String kczt;
|
||||
|
||||
|
||||
/**
|
||||
* 调出仓库编码
|
||||
* 调出仓库
|
||||
*/
|
||||
private String dcckbm;
|
||||
|
||||
|
||||
/**
|
||||
* 调出仓库名称
|
||||
*/
|
||||
private String dcckmc;
|
||||
|
||||
|
||||
/**
|
||||
* 调出库位编码
|
||||
* 调出库位
|
||||
*/
|
||||
private String dckwbm;
|
||||
|
||||
|
||||
/**
|
||||
* 调出库位名称
|
||||
*/
|
||||
private String dckwmc;
|
||||
|
||||
|
||||
/**
|
||||
* 调入仓库编码
|
||||
* 调入仓库
|
||||
*/
|
||||
private String drckbm;
|
||||
|
||||
|
||||
/**
|
||||
* 调入仓库名称
|
||||
*/
|
||||
private String drckmc;
|
||||
|
||||
|
||||
/**
|
||||
* 调入库位编码
|
||||
* 调入库位
|
||||
*/
|
||||
private String drkwbm;
|
||||
|
||||
|
||||
/**
|
||||
* 调入库位名称
|
||||
*/
|
||||
private String drkwmc;
|
||||
|
||||
|
||||
/**
|
||||
* 跟踪号
|
||||
*/
|
||||
private String gzh;
|
||||
|
||||
|
||||
/**
|
||||
* 计划调入日期
|
||||
@@ -247,16 +111,14 @@ public class AllocationBill extends Model<AllocationBill> {
|
||||
|
||||
|
||||
/**
|
||||
* 计划调出日期
|
||||
* 计划调入日期
|
||||
*/
|
||||
private String jhdcrq;
|
||||
|
||||
|
||||
/**
|
||||
* 分录备注
|
||||
* 备注
|
||||
*/
|
||||
private String flbz;
|
||||
|
||||
private String bz;
|
||||
|
||||
/**
|
||||
* 获取主键值
|
||||
|
||||
@@ -21,7 +21,13 @@ import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
public class ReceiptBill extends Model<ReceiptBill> {
|
||||
|
||||
private static final long serialVersionUID = -7739291296662381393L;
|
||||
//@TableId(value = "id", type = IdType.NONE)
|
||||
|
||||
|
||||
/**
|
||||
* 送货单id
|
||||
*/
|
||||
@TableId(value = "djid", type = IdType.NONE)
|
||||
private String djid;
|
||||
|
||||
|
||||
/**
|
||||
@@ -31,63 +37,11 @@ public class ReceiptBill extends Model<ReceiptBill> {
|
||||
|
||||
|
||||
/**
|
||||
* 送贷日期
|
||||
* 送货日期
|
||||
*/
|
||||
private String ywrq;
|
||||
|
||||
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
private String tjsj;
|
||||
|
||||
|
||||
/**
|
||||
* 采购订单号
|
||||
*/
|
||||
private String cgbh;
|
||||
|
||||
|
||||
/**
|
||||
* 采购公司
|
||||
*/
|
||||
private String cggs;
|
||||
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String wlbm;
|
||||
|
||||
|
||||
/**
|
||||
* 物科名称
|
||||
*/
|
||||
private String wlmc;
|
||||
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String ggxh;
|
||||
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String jldw;
|
||||
|
||||
|
||||
/**
|
||||
* 订单量
|
||||
*/
|
||||
private String ddsl;
|
||||
|
||||
|
||||
/**
|
||||
* 本次送货数量
|
||||
*/
|
||||
private String bcshsl;
|
||||
|
||||
|
||||
/**
|
||||
@@ -96,119 +50,48 @@ public class ReceiptBill extends Model<ReceiptBill> {
|
||||
private String shsl;
|
||||
|
||||
|
||||
/**
|
||||
* 件数
|
||||
*/
|
||||
private String num;
|
||||
|
||||
|
||||
/**
|
||||
* 收货组织
|
||||
* 收货组织编码
|
||||
*/
|
||||
private String zzbm;
|
||||
|
||||
|
||||
/**
|
||||
* 收货仓库
|
||||
* 收货仓库编码
|
||||
*/
|
||||
private String zzmc;
|
||||
private String ckbm;
|
||||
|
||||
/**
|
||||
* 收货库位编码
|
||||
*/
|
||||
private String kwbm;
|
||||
|
||||
|
||||
/**
|
||||
* 收货库位
|
||||
* 分录ID
|
||||
*/
|
||||
private String shcw;
|
||||
private String flid;
|
||||
|
||||
|
||||
/**
|
||||
* 是否质检
|
||||
* 分录序号
|
||||
*/
|
||||
private String sfzj;
|
||||
private String flxh;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String bz;
|
||||
|
||||
|
||||
/**
|
||||
* 批次管理
|
||||
* 表头备注
|
||||
*/
|
||||
private String pcgl;
|
||||
private String btbz;
|
||||
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String pc;
|
||||
|
||||
|
||||
/**
|
||||
* 所属厂区
|
||||
*/
|
||||
private String sscq;
|
||||
|
||||
|
||||
/**
|
||||
* 供应商编码
|
||||
*/
|
||||
private String gysbm;
|
||||
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
private String gys;
|
||||
|
||||
|
||||
/**
|
||||
* 到货日期
|
||||
*/
|
||||
private String dhrq;
|
||||
|
||||
|
||||
/**
|
||||
* 创建入编码
|
||||
*/
|
||||
private String cjr;
|
||||
|
||||
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
private String cjrq;
|
||||
|
||||
|
||||
/**
|
||||
* 采购员
|
||||
*/
|
||||
private String cgy;
|
||||
|
||||
|
||||
/**
|
||||
* 送货人
|
||||
*/
|
||||
private String shy;
|
||||
|
||||
|
||||
/**
|
||||
* 收货人
|
||||
*/
|
||||
private String shr;
|
||||
|
||||
|
||||
/**
|
||||
* 预计到货日期
|
||||
*/
|
||||
private String yjdhrq;
|
||||
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
private String shdz;
|
||||
|
||||
|
||||
/**
|
||||
* 包装类别
|
||||
*/
|
||||
private String bzlb;
|
||||
|
||||
|
||||
/**
|
||||
* 获取主键值
|
||||
@@ -217,7 +100,7 @@ public class ReceiptBill extends Model<ReceiptBill> {
|
||||
*/
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.djbh;
|
||||
return this.djid;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,6 +15,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface AllocationBillMapper extends BaseMapper<AllocationBill> {
|
||||
|
||||
@Select("SELECT COUNT(*) FROM receiptBill")
|
||||
@DS("oracle_eas")
|
||||
Long getAllocationCount();
|
||||
|
||||
@DS("oracle_eas")
|
||||
Page<AllocationBill> allocationPage(Page<AllocationBill> page, @Param("fuzzy") String fuzzy);
|
||||
|
||||
|
||||
@Select("SELECT COUNT(*) FROM EAS_NOBLE.receiptBill WHERE DJBH = #{djbh}")
|
||||
@DS("oracle_eas")
|
||||
Long getTotalCount(@Param("djbh") String djbh);
|
||||
|
||||
@@ -45,14 +45,7 @@ public interface EasOutInBillMapper extends BaseMapper<EasOutInBill> {
|
||||
@DS("oracle_eas")
|
||||
List<WarehouseInfo> getWarehouseInfo();
|
||||
|
||||
@Select("SELECT COUNT(*) FROM receiptBill")
|
||||
@DS("oracle_eas")
|
||||
Long getTotalCount();
|
||||
|
||||
@DS("oracle_eas")
|
||||
Page<AllocationBill> allocationPage(Page<AllocationBill> page, @Param("fuzzy") String fuzzy);
|
||||
|
||||
@DS("mysql_srm")
|
||||
Page<ReceiptBill> receiptPage(Page<ReceiptBill> page, @Param("fuzzy") String fuzzy);
|
||||
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* @since 2024-05-25
|
||||
*/
|
||||
public interface ReceiptBillMapper extends BaseMapper<ReceiptBill> {
|
||||
@DS("mysql_srm")
|
||||
Page<ReceiptBill> receiptPage(Page<ReceiptBill> page, @Param("fuzzy") String fuzzy);
|
||||
|
||||
@DS("mysql_srm")
|
||||
Page<ReceiptBill> receiptDetailPage(Page<ReceiptBill> page, @Param("djbh") String djbh, @Param("fuzzy") String fuzzy);
|
||||
|
||||
@@ -1,7 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.database.eas.dao.mapper.AllocationBillMapper">
|
||||
<select id="allocationDetailPage" resultType="org.nl.wms.database.eas.dao.AllocationBill">
|
||||
<select id="allocationPage" resultType="org.nl.wms.database.eas.dto.AllocationBillQuery">
|
||||
WITH ranked_data AS (
|
||||
SELECT
|
||||
t.*,
|
||||
ROW_NUMBER() OVER (PARTITION BY djbh ORDER BY jhdrrq DESC) AS rn
|
||||
FROM
|
||||
EAS_NOBLE.V_UC_STOCKTRANSFERBILL t
|
||||
),
|
||||
grouped_data AS (
|
||||
SELECT *
|
||||
FROM
|
||||
ranked_data
|
||||
WHERE
|
||||
rn = 1
|
||||
)
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT
|
||||
temp.*,
|
||||
ROWNUM AS row_num
|
||||
FROM (
|
||||
SELECT *
|
||||
FROM grouped_data
|
||||
WHERE
|
||||
<if test="fuzzy != null and fuzzy != ''">
|
||||
(djbh LIKE '%' || #{fuzzy} || '%' OR
|
||||
wlbm LIKE '%' || #{fuzzy} || '%' OR
|
||||
wlmc LIKE '%' || #{fuzzy} || '%' OR
|
||||
ggxh LIKE '%' || #{fuzzy} || '%' OR
|
||||
dckcmc LIKE '%' || #{fuzzy} || '%' OR
|
||||
dcckmc LIKE '%' || #{fuzzy} || '%' OR
|
||||
drkcmc LIKE '%' || #{fuzzy} || '%' OR)
|
||||
</if>
|
||||
ORDER BY jhdrrq DESC
|
||||
) temp
|
||||
WHERE
|
||||
<![CDATA[ ROWNUM <= #{size} * #{page} ]]>
|
||||
)
|
||||
WHERE <![CDATA[ row_num > #{size} * (#{page} - 1) ]]>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="allocationDetailPage" resultType="org.nl.wms.database.eas.dto.AllocationBillQuery">
|
||||
SELECT *
|
||||
FROM EAS_NOBLE.allocation
|
||||
WHERE DJBH = #{djbh}
|
||||
|
||||
@@ -9,74 +9,6 @@
|
||||
WHERE djzt = '提交'
|
||||
</select>
|
||||
|
||||
<select id="allocationPage" resultType="org.nl.wms.database.eas.dao.AllocationBill">
|
||||
WITH ranked_data AS (
|
||||
SELECT
|
||||
t.*,
|
||||
ROW_NUMBER() OVER (PARTITION BY djbh ORDER BY jhdrrq DESC) AS rn
|
||||
FROM
|
||||
EAS_NOBLE.V_UC_STOCKTRANSFERBILL t
|
||||
),
|
||||
grouped_data AS (
|
||||
SELECT *
|
||||
FROM
|
||||
ranked_data
|
||||
WHERE
|
||||
rn = 1
|
||||
)
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT
|
||||
temp.*,
|
||||
ROWNUM AS row_num
|
||||
FROM (
|
||||
SELECT *
|
||||
FROM grouped_data
|
||||
WHERE
|
||||
<if test="fuzzy != null and fuzzy != ''">
|
||||
(djbh LIKE '%' || #{fuzzy} || '%' OR
|
||||
wlbm LIKE '%' || #{fuzzy} || '%' OR
|
||||
wlmc LIKE '%' || #{fuzzy} || '%' OR
|
||||
ggxh LIKE '%' || #{fuzzy} || '%' OR
|
||||
dckcmc LIKE '%' || #{fuzzy} || '%' OR
|
||||
dcckmc LIKE '%' || #{fuzzy} || '%' OR
|
||||
drkcmc LIKE '%' || #{fuzzy} || '%' OR)
|
||||
</if>
|
||||
ORDER BY jhdrrq DESC
|
||||
) temp
|
||||
WHERE
|
||||
<![CDATA[ ROWNUM <= #{size} * #{page} ]]>
|
||||
)
|
||||
WHERE <![CDATA[ row_num > #{size} * (#{page} - 1) ]]>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="receiptPage" resultType="org.nl.wms.database.eas.dao.ReceiptBill">
|
||||
SELECT *
|
||||
FROM EAS_NOBLE.receiptBill
|
||||
<if test="fuzzy != null and fuzzy != ''">
|
||||
WHERE djbh LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR wlmc LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR ggxh LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR fzsl LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR jldw LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR sl LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR kclx LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR kczt LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR dcck LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR dccw LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR drck LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR drcw LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR trackno LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR ywrq LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR bz LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
</if>
|
||||
GROUP BY
|
||||
djbh
|
||||
ORDER BY djbh ASC
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryBillList" resultType="org.nl.wms.database.eas.dto.EasOutInBillDto">
|
||||
SELECT
|
||||
djid as billId,
|
||||
|
||||
@@ -1,7 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.database.eas.dao.mapper.ReceiptBillMapper">
|
||||
<select id="receiptDetailPage" resultType="org.nl.wms.database.eas.dao.ReceiptBill">
|
||||
<select id="receiptPage" resultType="org.nl.wms.database.eas.dto.ReceiptBillQuery">
|
||||
SELECT *
|
||||
FROM EAS_NOBLE.receiptBill
|
||||
<if test="fuzzy != null and fuzzy != ''">
|
||||
WHERE djbh LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR wlmc LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR ggxh LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR fzsl LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR jldw LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR sl LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR kclx LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR kczt LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR dcck LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR dccw LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR drck LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR drcw LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR trackno LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR ywrq LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
OR bz LIKE CONCAT('%', #{fuzzy}, '%')
|
||||
</if>
|
||||
GROUP BY
|
||||
djbh
|
||||
ORDER BY djbh ASC
|
||||
</select>
|
||||
<select id="receiptDetailPage" resultType="org.nl.wms.database.eas.dto.ReceiptBillQuery">
|
||||
SELECT *
|
||||
FROM EAS_NOBLE.receiptBill
|
||||
WHERE DJBH = #{djbh}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
package org.nl.wms.database.eas.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* {@code @Description:} (AllocationBill)数据传输类
|
||||
* {@code @Author:} gbx
|
||||
*
|
||||
* @since 2024-05-25
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AllocationBillDetailDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7739291296662381396L;
|
||||
|
||||
|
||||
/**
|
||||
* 分录序号
|
||||
*/
|
||||
|
||||
private String seq;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 分录id
|
||||
*/
|
||||
|
||||
private String entryId;
|
||||
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private String qty;
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
private String unitNo;
|
||||
|
||||
|
||||
/**
|
||||
* 调入仓库
|
||||
*/
|
||||
private String receiptWarehouseNo;
|
||||
|
||||
/**
|
||||
* 调入库位
|
||||
*/
|
||||
private String receiptLocationNo;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 调出仓库
|
||||
*/
|
||||
private String issueWarehouseNo;
|
||||
|
||||
/**
|
||||
* 调出库位
|
||||
*/
|
||||
private String issueLocationNo;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 计划调入日期
|
||||
*/
|
||||
private String receiptPlanDate;
|
||||
|
||||
|
||||
/**
|
||||
* 计划调入日期
|
||||
*/
|
||||
private String issuePlanDate;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.nl.wms.database.eas.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.*;
|
||||
import lombok.Data;
|
||||
@@ -21,163 +22,41 @@ public class AllocationBillDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7739291296662381396L;
|
||||
|
||||
|
||||
/**
|
||||
* 单据ID
|
||||
*/
|
||||
private String djid;
|
||||
/**
|
||||
* 单据编号
|
||||
*/
|
||||
private String djbh;
|
||||
|
||||
private String billId;
|
||||
|
||||
/**
|
||||
* 业务类型
|
||||
* 单据编号
|
||||
*/
|
||||
private String ywlx;
|
||||
|
||||
private String billNo;
|
||||
|
||||
/**
|
||||
* 业务日期
|
||||
*/
|
||||
private String ywrq;
|
||||
|
||||
private String bizDate;
|
||||
|
||||
|
||||
/**
|
||||
* 调出库存组织编码
|
||||
* 操作人
|
||||
*/
|
||||
private String dckcbm;
|
||||
/**
|
||||
* 调出库存组织名称
|
||||
*/
|
||||
private String dckcmc;
|
||||
/**
|
||||
* 调入库存组织编码
|
||||
*/
|
||||
private String drkcbm;
|
||||
/**
|
||||
* 调入库存组织名称
|
||||
*/
|
||||
private String drkcmc;
|
||||
/**
|
||||
* 调出部门
|
||||
*/
|
||||
private String dcbm;
|
||||
/**
|
||||
* 调入部门
|
||||
*/
|
||||
private String drbm;
|
||||
private String inWhUser;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 表头备注
|
||||
*/
|
||||
private String btbz;
|
||||
/**
|
||||
* 制单时间
|
||||
*/
|
||||
private String cjsj;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String cjr;
|
||||
/**
|
||||
* 单据状态
|
||||
*/
|
||||
private String djzt;
|
||||
/**
|
||||
* 分录ID
|
||||
*/
|
||||
private String flid;
|
||||
/**
|
||||
* 分录序号
|
||||
*/
|
||||
private String flxh;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String wlbm;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
private String wlmc;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String ggxh;
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String pc;
|
||||
/**
|
||||
* 辅助属性
|
||||
*/
|
||||
private String fzsx;
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
private String jldw;
|
||||
/**
|
||||
* 基本计量单位
|
||||
*/
|
||||
private String jbjldw;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private String sl;
|
||||
/**
|
||||
* 基本数量
|
||||
*/
|
||||
private String jbsl;
|
||||
/**
|
||||
* 库存类型
|
||||
*/
|
||||
private String kclx;
|
||||
/**
|
||||
* 库存状态
|
||||
*/
|
||||
private String kczt;
|
||||
/**
|
||||
* 调出仓库编码
|
||||
*/
|
||||
private String dcckbm;
|
||||
/**
|
||||
* 调出仓库名称
|
||||
*/
|
||||
private String dcckmc;
|
||||
/**
|
||||
* 调出库位编码
|
||||
*/
|
||||
private String dckwbm;
|
||||
/**
|
||||
* 调出库位名称
|
||||
*/
|
||||
private String dckwmc;
|
||||
/**
|
||||
* 调入仓库编码
|
||||
*/
|
||||
private String drckbm;
|
||||
/**
|
||||
* 调入仓库名称
|
||||
*/
|
||||
private String drckmc;
|
||||
/**
|
||||
* 调入库位编码
|
||||
*/
|
||||
private String drkwbm;
|
||||
/**
|
||||
* 调入库位名称
|
||||
*/
|
||||
private String drkwmc;
|
||||
/**
|
||||
* 跟踪号
|
||||
*/
|
||||
private String gzh;
|
||||
/**
|
||||
* 计划调入日期
|
||||
*/
|
||||
private String jhdrrq;
|
||||
/**
|
||||
* 计划调出日期
|
||||
*/
|
||||
private String jhdcrq;
|
||||
/**
|
||||
* 分录备注
|
||||
*/
|
||||
private String flbz;
|
||||
|
||||
private String description;
|
||||
|
||||
|
||||
List<AllocationBillDetailDto> entrys;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -15,159 +15,233 @@ import org.nl.common.domain.query.BaseQuery;
|
||||
public class AllocationBillQuery extends BaseQuery<AllocationBillQuery> {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 单据ID
|
||||
*/
|
||||
private String djid;
|
||||
|
||||
/**
|
||||
* 单据编号
|
||||
*/
|
||||
private String djbh;
|
||||
|
||||
|
||||
/**
|
||||
* 业务类型
|
||||
*/
|
||||
private String ywlx;
|
||||
|
||||
|
||||
/**
|
||||
* 业务日期
|
||||
*/
|
||||
private String ywrq;
|
||||
|
||||
|
||||
/**
|
||||
* 调出库存组织编码
|
||||
*/
|
||||
private String dckcbm;
|
||||
|
||||
|
||||
/**
|
||||
* 调出库存组织名称
|
||||
*/
|
||||
private String dckcmc;
|
||||
|
||||
|
||||
/**
|
||||
* 调入库存组织编码
|
||||
*/
|
||||
private String drkcbm;
|
||||
|
||||
|
||||
/**
|
||||
* 调入库存组织名称
|
||||
*/
|
||||
private String drkcmc;
|
||||
|
||||
|
||||
/**
|
||||
* 调出部门
|
||||
*/
|
||||
private String dcbm;
|
||||
|
||||
|
||||
/**
|
||||
* 调入部门
|
||||
*/
|
||||
private String drbm;
|
||||
|
||||
|
||||
/**
|
||||
* 表头备注
|
||||
*/
|
||||
private String btbz;
|
||||
|
||||
|
||||
/**
|
||||
* 制单时间
|
||||
*/
|
||||
private String cjsj;
|
||||
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String cjr;
|
||||
|
||||
|
||||
/**
|
||||
* 单据状态
|
||||
*/
|
||||
private String djzt;
|
||||
|
||||
|
||||
/**
|
||||
* 分录ID
|
||||
*/
|
||||
private String flid;
|
||||
|
||||
|
||||
/**
|
||||
* 分录序号
|
||||
*/
|
||||
private String flxh;
|
||||
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String wlbm;
|
||||
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
private String wlmc;
|
||||
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String ggxh;
|
||||
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String pc;
|
||||
|
||||
|
||||
/**
|
||||
* 辅助属性
|
||||
*/
|
||||
private String fzsx;
|
||||
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
private String jldw;
|
||||
|
||||
|
||||
/**
|
||||
* 基本计量单位
|
||||
*/
|
||||
private String jbjldw;
|
||||
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private String sl;
|
||||
|
||||
|
||||
/**
|
||||
* 基本数量
|
||||
*/
|
||||
private String jbsl;
|
||||
|
||||
|
||||
/**
|
||||
* 库存类型
|
||||
*/
|
||||
private String kclx;
|
||||
|
||||
|
||||
/**
|
||||
* 库存状态
|
||||
*/
|
||||
private String kczt;
|
||||
|
||||
|
||||
/**
|
||||
* 调出仓库编码
|
||||
*/
|
||||
private String dcckbm;
|
||||
|
||||
|
||||
/**
|
||||
* 调出仓库名称
|
||||
*/
|
||||
private String dcckmc;
|
||||
|
||||
|
||||
/**
|
||||
* 调出库位编码
|
||||
*/
|
||||
private String dckwbm;
|
||||
|
||||
|
||||
/**
|
||||
* 调出库位名称
|
||||
*/
|
||||
private String dckwmc;
|
||||
|
||||
|
||||
/**
|
||||
* 调入仓库编码
|
||||
*/
|
||||
private String drckbm;
|
||||
|
||||
|
||||
/**
|
||||
* 调入仓库名称
|
||||
*/
|
||||
private String drckmc;
|
||||
|
||||
|
||||
/**
|
||||
* 调入库位编码
|
||||
*/
|
||||
private String drkwbm;
|
||||
|
||||
|
||||
/**
|
||||
* 调入库位名称
|
||||
*/
|
||||
private String drkwmc;
|
||||
|
||||
|
||||
/**
|
||||
* 跟踪号
|
||||
*/
|
||||
private String gzh;
|
||||
|
||||
|
||||
/**
|
||||
* 计划调入日期
|
||||
*/
|
||||
private String jhdrrq;
|
||||
|
||||
|
||||
/**
|
||||
* 计划调出日期
|
||||
*/
|
||||
private String jhdcrq;
|
||||
|
||||
|
||||
/**
|
||||
* 分录备注
|
||||
*/
|
||||
@@ -175,5 +249,4 @@ public class AllocationBillQuery extends BaseQuery<AllocationBillQuery> {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -21,159 +21,90 @@ import org.nl.wms.database.eas.dao.AllocationBill;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class AllocationBillVO extends BaseQuery<AllocationBill> {
|
||||
/**
|
||||
* 单据ID
|
||||
* 单据id
|
||||
*/
|
||||
|
||||
private String djid;
|
||||
|
||||
/**
|
||||
* 单据编号
|
||||
*/
|
||||
|
||||
private String djbh;
|
||||
/**
|
||||
* 业务类型
|
||||
*/
|
||||
private String ywlx;
|
||||
|
||||
/**
|
||||
* 业务日期
|
||||
*/
|
||||
|
||||
private String ywrq;
|
||||
/**
|
||||
* 调出库存组织编码
|
||||
*/
|
||||
private String dckcbm;
|
||||
/**
|
||||
* 调出库存组织名称
|
||||
*/
|
||||
private String dckcmc;
|
||||
/**
|
||||
* 调入库存组织编码
|
||||
*/
|
||||
private String drkcbm;
|
||||
/**
|
||||
* 调入库存组织名称
|
||||
*/
|
||||
private String drkcmc;
|
||||
/**
|
||||
* 调出部门
|
||||
*/
|
||||
private String dcbm;
|
||||
/**
|
||||
* 调入部门
|
||||
*/
|
||||
private String drbm;
|
||||
|
||||
|
||||
/**
|
||||
* 表头备注
|
||||
*/
|
||||
|
||||
private String btbz;
|
||||
/**
|
||||
* 制单时间
|
||||
*/
|
||||
private String cjsj;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String cjr;
|
||||
/**
|
||||
* 单据状态
|
||||
*/
|
||||
private String djzt;
|
||||
/**
|
||||
* 分录ID
|
||||
*/
|
||||
private String flid;
|
||||
|
||||
|
||||
/**
|
||||
* 分录序号
|
||||
*/
|
||||
|
||||
private String flxh;
|
||||
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
* 分录id
|
||||
*/
|
||||
private String wlbm;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
private String wlmc;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String ggxh;
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String pc;
|
||||
/**
|
||||
* 辅助属性
|
||||
*/
|
||||
private String fzsx;
|
||||
|
||||
private String flid;
|
||||
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
private String jldw;
|
||||
/**
|
||||
* 基本计量单位
|
||||
*/
|
||||
private String jbjldw;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private String sl;
|
||||
|
||||
|
||||
/**
|
||||
* 基本数量
|
||||
*/
|
||||
private String jbsl;
|
||||
/**
|
||||
* 库存类型
|
||||
*/
|
||||
private String kclx;
|
||||
/**
|
||||
* 库存状态
|
||||
*/
|
||||
private String kczt;
|
||||
/**
|
||||
* 调出仓库编码
|
||||
* 调出仓库
|
||||
*/
|
||||
private String dcckbm;
|
||||
|
||||
/**
|
||||
* 调出仓库名称
|
||||
*/
|
||||
private String dcckmc;
|
||||
/**
|
||||
* 调出库位编码
|
||||
* 调出库位
|
||||
*/
|
||||
private String dckwbm;
|
||||
|
||||
/**
|
||||
* 调出库位名称
|
||||
*/
|
||||
private String dckwmc;
|
||||
/**
|
||||
* 调入仓库编码
|
||||
* 调入仓库
|
||||
*/
|
||||
private String drckbm;
|
||||
|
||||
/**
|
||||
* 调入仓库名称
|
||||
*/
|
||||
private String drckmc;
|
||||
/**
|
||||
* 调入库位编码
|
||||
* 调入库位
|
||||
*/
|
||||
private String drkwbm;
|
||||
/**
|
||||
* 调入库位名称
|
||||
*/
|
||||
private String drkwmc;
|
||||
/**
|
||||
* 跟踪号
|
||||
*/
|
||||
private String gzh;
|
||||
|
||||
|
||||
/**
|
||||
* 计划调入日期
|
||||
*/
|
||||
private String jhdrrq;
|
||||
|
||||
|
||||
/**
|
||||
* 计划调出日期
|
||||
* 计划调入日期
|
||||
*/
|
||||
private String jhdcrq;
|
||||
|
||||
/**
|
||||
* 分录备注
|
||||
* 备注
|
||||
*/
|
||||
private String flbz;
|
||||
private String bz;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.database.eas.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AllocationEasData {
|
||||
|
||||
private String type ="WMS";
|
||||
|
||||
|
||||
private String method="DealDbBill";
|
||||
|
||||
|
||||
private AllocationBillDto data;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package org.nl.wms.database.eas.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* {@code @Description:} (ReceiptBill)数据传输类
|
||||
* {@code @Author:} gbx
|
||||
*
|
||||
* @since 2024-05-25
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ReceiptBillDetailDto implements Serializable {
|
||||
|
||||
/**
|
||||
* 送货单号
|
||||
*/
|
||||
private String entryId;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 收货数量
|
||||
*/
|
||||
private String shsl;
|
||||
|
||||
|
||||
/**
|
||||
* 收货仓库编码
|
||||
*/
|
||||
private String ckbm;
|
||||
|
||||
/**
|
||||
* 收货库位编码
|
||||
*/
|
||||
private String kwbm;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.nl.wms.database.eas.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.*;
|
||||
import lombok.Data;
|
||||
@@ -19,133 +20,42 @@ import lombok.Builder;
|
||||
@AllArgsConstructor
|
||||
public class ReceiptBillDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7739291296662381396L;
|
||||
/**
|
||||
* eas单据id
|
||||
*/
|
||||
private String billId;
|
||||
|
||||
|
||||
/**
|
||||
* 送货单号
|
||||
* eas单据编号
|
||||
*/
|
||||
private String djbh;
|
||||
private String billNo;
|
||||
|
||||
/**
|
||||
* 送贷日期
|
||||
* 操作人
|
||||
*/
|
||||
private String ywrq;
|
||||
private String inWhUser;
|
||||
|
||||
|
||||
/**
|
||||
* 提交时间
|
||||
* 业务日期
|
||||
*/
|
||||
private String tjsj;
|
||||
private String bizDate;
|
||||
|
||||
|
||||
/**
|
||||
* 采购订单号
|
||||
* 业务类型
|
||||
*/
|
||||
private String cgbh;
|
||||
private String billType;
|
||||
|
||||
|
||||
/**
|
||||
* 采购公司
|
||||
* 备注
|
||||
*/
|
||||
private String cggs;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String wlbm;
|
||||
/**
|
||||
* 物科名称
|
||||
*/
|
||||
private String wlmc;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String ggxh;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String jldw;
|
||||
/**
|
||||
* 订单量
|
||||
*/
|
||||
private String ddsl;
|
||||
/**
|
||||
* 本次送货数量
|
||||
*/
|
||||
private String bcshsl;
|
||||
/**
|
||||
* 收货数量
|
||||
*/
|
||||
private String shsl;
|
||||
/**
|
||||
* 件数
|
||||
*/
|
||||
private String num;
|
||||
/**
|
||||
* 收货组织
|
||||
*/
|
||||
private String zzbm;
|
||||
/**
|
||||
* 收货仓库
|
||||
*/
|
||||
private String zzmc;
|
||||
/**
|
||||
* 收货库位
|
||||
*/
|
||||
private String shcw;
|
||||
/**
|
||||
* 是否质检
|
||||
*/
|
||||
private String sfzj;
|
||||
/**
|
||||
* 批次管理
|
||||
*/
|
||||
private String pcgl;
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String pc;
|
||||
/**
|
||||
* 所属厂区
|
||||
*/
|
||||
private String sscq;
|
||||
/**
|
||||
* 供应商编码
|
||||
*/
|
||||
private String gysbm;
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
private String gys;
|
||||
/**
|
||||
* 到货日期
|
||||
*/
|
||||
private String dhrq;
|
||||
/**
|
||||
* 创建入编码
|
||||
*/
|
||||
private String cjr;
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
private String cjrq;
|
||||
/**
|
||||
* 采购员
|
||||
*/
|
||||
private String cgy;
|
||||
/**
|
||||
* 送货人
|
||||
*/
|
||||
private String shy;
|
||||
/**
|
||||
* 收货人
|
||||
*/
|
||||
private String shr;
|
||||
/**
|
||||
* 预计到货日期
|
||||
*/
|
||||
private String yjdhrq;
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
private String shdz;
|
||||
/**
|
||||
* 包装类别
|
||||
*/
|
||||
private String bzlb;
|
||||
private String description;
|
||||
|
||||
|
||||
List<ReceiptBillDetailDto> entrys;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -17,166 +17,242 @@ import org.nl.common.domain.query.BaseQuery;
|
||||
public class ReceiptBillQuery extends BaseQuery<ReceiptBillQuery> {
|
||||
|
||||
|
||||
/**
|
||||
* 送货单号
|
||||
*/
|
||||
|
||||
private String djid;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 送货单号
|
||||
*/
|
||||
@TableId(value = "djbh", type = IdType.NONE)
|
||||
private String djbh;
|
||||
|
||||
|
||||
/**
|
||||
* 送贷日期
|
||||
* 送货日期
|
||||
*/
|
||||
private String ywrq;
|
||||
|
||||
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
private String tjsj;
|
||||
|
||||
|
||||
/**
|
||||
* 采购订单号
|
||||
*/
|
||||
private String cgbh;
|
||||
|
||||
|
||||
/**
|
||||
* 采购公司
|
||||
*/
|
||||
private String cggs;
|
||||
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String wlbm;
|
||||
|
||||
|
||||
/**
|
||||
* 物科名称
|
||||
*/
|
||||
private String wlmc;
|
||||
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String ggxh;
|
||||
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String jldw;
|
||||
|
||||
|
||||
/**
|
||||
* 订单量
|
||||
*/
|
||||
private String ddsl;
|
||||
|
||||
|
||||
/**
|
||||
* 本次送货数量
|
||||
*/
|
||||
private String bcshsl;
|
||||
|
||||
|
||||
/**
|
||||
* 收货数量
|
||||
*/
|
||||
private String shsl;
|
||||
|
||||
|
||||
/**
|
||||
* 件数
|
||||
*/
|
||||
private String num;
|
||||
|
||||
/**
|
||||
* 收货组织
|
||||
*/
|
||||
private String zzbm;
|
||||
|
||||
/**
|
||||
* 收货仓库
|
||||
*/
|
||||
private String zzmc;
|
||||
|
||||
/**
|
||||
* 收货库位
|
||||
*/
|
||||
private String shcw;
|
||||
|
||||
/**
|
||||
* 是否质检
|
||||
*/
|
||||
private String sfzj;
|
||||
|
||||
|
||||
/**
|
||||
* 批次管理
|
||||
*/
|
||||
private String pcgl;
|
||||
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String pc;
|
||||
|
||||
|
||||
/**
|
||||
* 所属厂区
|
||||
*/
|
||||
private String sscq;
|
||||
|
||||
|
||||
/**
|
||||
* 供应商编码
|
||||
*/
|
||||
private String gysbm;
|
||||
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
private String gys;
|
||||
|
||||
|
||||
/**
|
||||
* 到货日期
|
||||
*/
|
||||
private String dhrq;
|
||||
|
||||
|
||||
/**
|
||||
* 创建入编码
|
||||
*/
|
||||
private String cjr;
|
||||
|
||||
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
private String cjrq;
|
||||
|
||||
|
||||
/**
|
||||
* 采购员
|
||||
*/
|
||||
private String cgy;
|
||||
|
||||
|
||||
/**
|
||||
* 送货人
|
||||
*/
|
||||
private String shy;
|
||||
|
||||
|
||||
/**
|
||||
* 收货人
|
||||
*/
|
||||
private String shr;
|
||||
|
||||
|
||||
/**
|
||||
* 预计到货日期
|
||||
*/
|
||||
private String yjdhrq;
|
||||
private String yjdhrq;
|
||||
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
private String shdz;
|
||||
|
||||
|
||||
/**
|
||||
* 包装类别
|
||||
*/
|
||||
private String bzlb;
|
||||
|
||||
|
||||
/**
|
||||
* 收货组织编码
|
||||
*/
|
||||
private String zzbm;
|
||||
|
||||
|
||||
/**
|
||||
* 收货组织名称
|
||||
*/
|
||||
private String zzmc;
|
||||
|
||||
|
||||
/**
|
||||
* 收货仓库名称
|
||||
*/
|
||||
private String ckmc;
|
||||
|
||||
/**
|
||||
* 收货仓库编码
|
||||
*/
|
||||
private String ckbm;
|
||||
|
||||
/**
|
||||
* 收货库位编码
|
||||
*/
|
||||
private String kwbm;
|
||||
|
||||
/**
|
||||
* 收货库位名称
|
||||
*/
|
||||
private String kwmc;
|
||||
|
||||
/**
|
||||
* 单据状态
|
||||
*/
|
||||
private String djzt;
|
||||
|
||||
|
||||
/**
|
||||
* 分录ID
|
||||
*/
|
||||
private String flid;
|
||||
|
||||
|
||||
/**
|
||||
* 分录序号
|
||||
*/
|
||||
private String flxh;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String bz;
|
||||
|
||||
|
||||
/**
|
||||
* 表头备注
|
||||
*/
|
||||
private String btbz;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package org.nl.wms.database.eas.dto;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
import lombok.*;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -20,128 +22,72 @@ import org.nl.wms.database.eas.dao.ReceiptBill;
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ReceiptBillVO extends BaseQuery<ReceiptBill> {
|
||||
|
||||
/**
|
||||
* 送货单id
|
||||
*/
|
||||
private String djid;
|
||||
|
||||
/**
|
||||
* 送货单号
|
||||
*/
|
||||
private String djbh;
|
||||
|
||||
|
||||
/**
|
||||
* 送贷日期
|
||||
* 送货日期
|
||||
*/
|
||||
private String ywrq;
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
private String tjsj;
|
||||
/**
|
||||
* 采购订单号
|
||||
*/
|
||||
private String cgbh;
|
||||
/**
|
||||
* 采购公司
|
||||
*/
|
||||
private String cggs;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String wlbm;
|
||||
/**
|
||||
* 物科名称
|
||||
*/
|
||||
private String wlmc;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String ggxh;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String jldw;
|
||||
/**
|
||||
* 订单量
|
||||
*/
|
||||
private String ddsl;
|
||||
/**
|
||||
* 本次送货数量
|
||||
*/
|
||||
private String bcshsl;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 收货数量
|
||||
*/
|
||||
private String shsl;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 件数
|
||||
*/
|
||||
private String num;
|
||||
/**
|
||||
* 收货组织
|
||||
* 收货组织编码
|
||||
*/
|
||||
private String zzbm;
|
||||
|
||||
|
||||
/**
|
||||
* 收货仓库
|
||||
* 收货仓库编码
|
||||
*/
|
||||
private String zzmc;
|
||||
private String ckbm;
|
||||
|
||||
/**
|
||||
* 收货库位
|
||||
* 收货库位编码
|
||||
*/
|
||||
private String shcw;
|
||||
private String kwbm;
|
||||
|
||||
|
||||
/**
|
||||
* 是否质检
|
||||
* 分录ID
|
||||
*/
|
||||
private String sfzj;
|
||||
private String flid;
|
||||
|
||||
|
||||
/**
|
||||
* 批次管理
|
||||
* 分录序号
|
||||
*/
|
||||
private String pcgl;
|
||||
private String flxh;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
* 备注
|
||||
*/
|
||||
private String pc;
|
||||
private String bz;
|
||||
|
||||
|
||||
/**
|
||||
* 所属厂区
|
||||
* 表头备注
|
||||
*/
|
||||
private String sscq;
|
||||
/**
|
||||
* 供应商编码
|
||||
*/
|
||||
private String gysbm;
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
private String gys;
|
||||
/**
|
||||
* 到货日期
|
||||
*/
|
||||
private String dhrq;
|
||||
/**
|
||||
* 创建入编码
|
||||
*/
|
||||
private String cjr;
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
private String cjrq;
|
||||
/**
|
||||
* 采购员
|
||||
*/
|
||||
private String cgy;
|
||||
/**
|
||||
* 送货人
|
||||
*/
|
||||
private String shy;
|
||||
/**
|
||||
* 收货人
|
||||
*/
|
||||
private String shr;
|
||||
/**
|
||||
* 预计到货日期
|
||||
*/
|
||||
private String yjdhrq;
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
private String shdz;
|
||||
/**
|
||||
* 包装类别
|
||||
*/
|
||||
private String bzlb;
|
||||
private String btbz;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.nl.wms.database.eas.service;
|
||||
import org.nl.common.base.CommonPage;
|
||||
import org.nl.wms.database.eas.dao.AllocationBill;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.database.eas.dto.AllocationBillQuery;
|
||||
import org.nl.wms.database.eas.dto.AllocationBillVO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -18,13 +19,22 @@ import java.util.Set;
|
||||
public interface IallocationBillService extends IService<AllocationBill> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询调拨单据
|
||||
*
|
||||
* @param params 查询条件
|
||||
* @return IPage<EasOutInBill>
|
||||
*/
|
||||
CommonPage<AllocationBill> allocationPage(AllocationBillQuery params);
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param params 查询条件
|
||||
* @return CommonPage<AllocationBill>
|
||||
*/
|
||||
CommonPage<AllocationBill> page(AllocationBillVO params);
|
||||
CommonPage<AllocationBill> page(AllocationBillQuery params);
|
||||
|
||||
/**
|
||||
* 条件查询
|
||||
@@ -38,9 +48,9 @@ public interface IallocationBillService extends IService<AllocationBill> {
|
||||
/**
|
||||
* 单据直接调拨
|
||||
*
|
||||
* @param ids /
|
||||
* @param params /
|
||||
*/
|
||||
void allocationConfirm(List<String> ids);
|
||||
void allocationConfirm(List<AllocationBillVO> params);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
|
||||
@@ -55,21 +55,7 @@ public interface IeasOutInBillService extends IService<EasOutInBill> {
|
||||
*/
|
||||
CommonPage<EasOutInBill> page(EasOutInBillQuery params);
|
||||
|
||||
/**
|
||||
* 查询调拨单据
|
||||
*
|
||||
* @param params 查询条件
|
||||
* @return IPage<EasOutInBill>
|
||||
*/
|
||||
CommonPage<AllocationBill> allocationPage(AllocationBillQuery params);
|
||||
|
||||
/**
|
||||
* 查询收货单据
|
||||
*
|
||||
* @param params 查询条件
|
||||
* @return IPage<EasOutInBill>
|
||||
*/
|
||||
CommonPage<ReceiptBill> receiptPage(ReceiptBillQuery params);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.nl.wms.database.eas.service;
|
||||
import org.nl.common.base.CommonPage;
|
||||
import org.nl.wms.database.eas.dao.ReceiptBill;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.database.eas.dto.ReceiptBillQuery;
|
||||
import org.nl.wms.database.eas.dto.ReceiptBillVO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -17,6 +18,13 @@ import java.util.Set;
|
||||
*/
|
||||
public interface IreceiptBillService extends IService<ReceiptBill> {
|
||||
|
||||
/**
|
||||
* 查询收货单据
|
||||
*
|
||||
* @param params 查询条件
|
||||
* @return IPage<EasOutInBill>
|
||||
*/
|
||||
CommonPage<ReceiptBill> receiptPage(ReceiptBillQuery params);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
@@ -37,9 +45,9 @@ public interface IreceiptBillService extends IService<ReceiptBill> {
|
||||
/**
|
||||
* 收货单确认
|
||||
*
|
||||
* @param ids /
|
||||
* @param params /
|
||||
*/
|
||||
void receiptConfirm(List<String> ids);
|
||||
void receiptConfirm(List<ReceiptBillVO> params);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
package org.nl.wms.database.eas.service.impl;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.database.eas.dao.AllocationBill;
|
||||
import org.nl.wms.database.eas.dto.AllocationBillVO;
|
||||
import org.nl.wms.database.eas.dto.*;
|
||||
import org.nl.wms.database.eas.dao.mapper.AllocationBillMapper;
|
||||
import org.nl.wms.database.eas.service.IallocationBillService;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.wms.ext.eas.WmsToEasService;
|
||||
import org.nl.wms.ext.srm.WmsToSrmService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@@ -18,8 +24,11 @@ import javax.annotation.Resource;
|
||||
import org.nl.common.base.CommonPage;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* {@code @Description:} (AllocationBill)服务实现层
|
||||
@@ -35,21 +44,71 @@ public class AllocationBillServiceImpl extends ServiceImpl<AllocationBillMapper,
|
||||
private AllocationBillMapper allocationBillMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private WmsToEasService wmsToEasService;
|
||||
|
||||
/**
|
||||
* 查询调拨单据
|
||||
*
|
||||
* @param params 查询条件
|
||||
*/
|
||||
@Override
|
||||
@SaIgnore
|
||||
public CommonPage<AllocationBill> allocationPage(AllocationBillQuery params) {
|
||||
// 查询总记录数
|
||||
long totalCount = allocationBillMapper.getAllocationCount();
|
||||
Page<AllocationBill> pageObject = new Page<>(params.getPage(), params.getSize());
|
||||
Page<AllocationBill> allocationBills = allocationBillMapper.allocationPage(pageObject, params.getFuzzy());
|
||||
return CommonPage.getPage(allocationBills, totalCount);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param params 查询条件
|
||||
*/
|
||||
@Override
|
||||
public CommonPage<AllocationBill> page(AllocationBillVO params) {
|
||||
public CommonPage<AllocationBill> page(AllocationBillQuery params) {
|
||||
if (StringUtils.isBlank(params.getDjbh())) {
|
||||
throw new BadRequestException("单据编号不能为空");
|
||||
}
|
||||
// 查询总记录数
|
||||
long totalCount = allocationBillMapper.getTotalCount(params.getDjbh());
|
||||
Page<AllocationBill> pageObject = new Page<>(params.getPage(), params.getSize());
|
||||
Page<AllocationBill> receiptBills = allocationBillMapper.allocationDetailPage(pageObject, params.getDjbh(), params.getFuzzy());
|
||||
return CommonPage.getPage(receiptBills, totalCount);
|
||||
Page<AllocationBill> allocationBills = allocationBillMapper.allocationDetailPage(pageObject, params.getDjbh(), params.getFuzzy());
|
||||
List<AllocationBill> allocationBillList = allocationBills.getRecords();
|
||||
if (!allocationBillList.isEmpty()) {
|
||||
// 获取更新列表
|
||||
List<AllocationBill> updateList = allocationBillMapper.selectList(
|
||||
new LambdaQueryWrapper<AllocationBill>().eq(AllocationBill::getDjid, allocationBillList.get(0).getDjid()));
|
||||
if (!updateList.isEmpty()) {
|
||||
Map<String, AllocationBill> updateMap = updateList.stream()
|
||||
.collect(Collectors.toMap(AllocationBill::getFlid, updateBill -> updateBill));
|
||||
// 替换为修改记录
|
||||
allocationBillList = allocationBillList.stream()
|
||||
.map(allocationBill -> {
|
||||
AllocationBill updatedBill = updateMap.get(allocationBill.getFlid());
|
||||
if (updatedBill != null) {
|
||||
allocationBill.setYwrq(updatedBill.getYwrq());
|
||||
allocationBill.setBtbz(updatedBill.getBtbz());
|
||||
allocationBill.setJldw(updatedBill.getJldw());
|
||||
allocationBill.setSl(updatedBill.getSl());
|
||||
allocationBill.setDcckbm(updatedBill.getDcckbm());
|
||||
allocationBill.setDckwbm(updatedBill.getDckwbm());
|
||||
allocationBill.setDrckbm(updatedBill.getDrckbm());
|
||||
allocationBill.setDrkwbm(updatedBill.getDrkwbm());
|
||||
allocationBill.setJhdrrq(updatedBill.getJhdrrq());
|
||||
allocationBill.setJhdcrq(updatedBill.getJhdcrq());
|
||||
allocationBill.setBz(updatedBill.getBz());
|
||||
}
|
||||
return allocationBill;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
allocationBills.setRecords(allocationBillList);
|
||||
return CommonPage.getPage(allocationBills, totalCount);
|
||||
}
|
||||
|
||||
|
||||
@@ -83,13 +142,49 @@ public class AllocationBillServiceImpl extends ServiceImpl<AllocationBillMapper,
|
||||
* 单据直接调拨
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void allocationConfirm(List<String> ids) {
|
||||
|
||||
|
||||
public void allocationConfirm(List<AllocationBillVO> params) {
|
||||
AllocationBillDto allocationBillDto = new AllocationBillDto();
|
||||
allocationBillDto.setBillId(params.get(0).getDjid());
|
||||
allocationBillDto.setBillNo(params.get(0).getDjbh());
|
||||
allocationBillDto.setBizDate(params.get(0).getYwrq());
|
||||
allocationBillDto.setDescription(params.get(0).getBz());
|
||||
allocationBillDto.setInWhUser(SecurityUtils.getCurrentNickName() == null ? "admin" : SecurityUtils.getCurrentNickName());
|
||||
List<AllocationBillDetailDto> entrys = new ArrayList<>();
|
||||
params.forEach(r -> {
|
||||
AllocationBillDetailDto dto = new AllocationBillDetailDto();
|
||||
dto.setSeq(r.getFlxh());
|
||||
dto.setEntryId(r.getFlid());
|
||||
dto.setQty(r.getSl());
|
||||
dto.setUnitNo(r.getJldw());
|
||||
dto.setReceiptWarehouseNo(r.getDrckbm());
|
||||
dto.setReceiptLocationNo(r.getDrkwbm());
|
||||
dto.setIssueWarehouseNo(r.getDcckbm());
|
||||
dto.setIssueLocationNo(r.getDckwbm());
|
||||
dto.setReceiptPlanDate(r.getJhdrrq());
|
||||
dto.setIssuePlanDate(r.getJhdcrq());
|
||||
dto.setRemark(r.getBz());
|
||||
entrys.add(dto);
|
||||
}
|
||||
);
|
||||
allocationBillDto.setEntrys(entrys);
|
||||
MsgDto msgDto;
|
||||
AllocationEasData easData = new AllocationEasData();
|
||||
easData.setData(allocationBillDto);
|
||||
String billJson = com.alibaba.fastjson.JSON.toJSONString(easData, SerializerFeature.WriteMapNullValue);
|
||||
try {
|
||||
msgDto = wmsToEasService.sendWebService(billJson);
|
||||
if (msgDto != null) {
|
||||
if (msgDto.getResult() == 0) {
|
||||
throw new BadRequestException(msgDto.getMsg());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("推送Eas单据失败,单据号为:[" + params.get(0).getDjbh() + "]异常原因:" + e.toString());
|
||||
throw new BadRequestException(e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 修改调拨单
|
||||
*/
|
||||
|
||||
@@ -135,34 +135,8 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询收货单据
|
||||
*
|
||||
* @param params 查询条件
|
||||
*/
|
||||
@Override
|
||||
@SaIgnore
|
||||
public CommonPage<ReceiptBill> receiptPage(ReceiptBillQuery params) {
|
||||
Page<ReceiptBill> pageObject = new Page<>(params.getPage(), params.getSize());
|
||||
Page<ReceiptBill> receiptBills = easOutInBillMapper.receiptPage(pageObject, params.getFuzzy());
|
||||
return CommonPage.getPage(receiptBills);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询调拨单据
|
||||
*
|
||||
* @param params 查询条件
|
||||
*/
|
||||
@Override
|
||||
@SaIgnore
|
||||
public CommonPage<AllocationBill> allocationPage(AllocationBillQuery params) {
|
||||
// 查询总记录数
|
||||
long totalCount = easOutInBillMapper.getTotalCount();
|
||||
Page<AllocationBill> pageObject = new Page<>(params.getPage(), params.getSize());
|
||||
Page<AllocationBill> allocationBills = easOutInBillMapper.allocationPage(pageObject, params.getFuzzy());
|
||||
return CommonPage.getPage(allocationBills, totalCount);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
package org.nl.wms.database.eas.service.impl;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.database.eas.dao.AllocationBill;
|
||||
import org.nl.wms.database.eas.dao.ReceiptBill;
|
||||
import org.nl.wms.database.eas.dto.ReceiptBillVO;
|
||||
import org.nl.wms.database.eas.dto.*;
|
||||
import org.nl.wms.database.eas.dao.mapper.ReceiptBillMapper;
|
||||
import org.nl.wms.database.eas.service.IreceiptBillService;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.wms.ext.srm.WmsToSrmService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@@ -18,8 +24,11 @@ import javax.annotation.Resource;
|
||||
import org.nl.common.base.CommonPage;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* {@code @Description:} (ReceiptBill)服务实现层
|
||||
@@ -34,6 +43,22 @@ public class ReceiptBillServiceImpl extends ServiceImpl<ReceiptBillMapper, Recei
|
||||
@Resource
|
||||
private ReceiptBillMapper receiptBillMapper;
|
||||
|
||||
@Resource
|
||||
private WmsToSrmService wmsToSrmService;
|
||||
|
||||
/**
|
||||
* 查询收货单据
|
||||
*
|
||||
* @param params 查询条件
|
||||
*/
|
||||
@Override
|
||||
@SaIgnore
|
||||
public CommonPage<ReceiptBill> receiptPage(ReceiptBillQuery params) {
|
||||
Page<ReceiptBill> pageObject = new Page<>(params.getPage(), params.getSize());
|
||||
Page<ReceiptBill> receiptBills = receiptBillMapper.receiptPage(pageObject, params.getFuzzy());
|
||||
return CommonPage.getPage(receiptBills);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
@@ -47,10 +72,34 @@ public class ReceiptBillServiceImpl extends ServiceImpl<ReceiptBillMapper, Recei
|
||||
}
|
||||
Page<ReceiptBill> pageObject = new Page<>(params.getPage(), params.getSize());
|
||||
Page<ReceiptBill> receiptBills = receiptBillMapper.receiptDetailPage(pageObject, params.getDjbh(), params.getFuzzy());
|
||||
List<ReceiptBill> receiptBillList = receiptBills.getRecords();
|
||||
if (!receiptBillList.isEmpty()) {
|
||||
List<ReceiptBill> updateList = receiptBillMapper.selectList(
|
||||
new LambdaQueryWrapper<ReceiptBill>().eq(ReceiptBill::getDjid, receiptBillList.get(0).getDjid()));
|
||||
if (!updateList.isEmpty()) {
|
||||
Map<String, ReceiptBill> updateMap = updateList.stream()
|
||||
.collect(Collectors.toMap(ReceiptBill::getFlid, updateBill -> updateBill));
|
||||
//替换修改记录
|
||||
receiptBillList = receiptBillList.stream()
|
||||
.map(receiptBill -> {
|
||||
ReceiptBill updatedBill = updateMap.get(receiptBill.getFlid());
|
||||
if (updatedBill != null) {
|
||||
receiptBill.setYwrq(updatedBill.getYwrq());
|
||||
receiptBill.setKwbm(updatedBill.getKwbm());
|
||||
receiptBill.setCkbm(updatedBill.getCkbm());
|
||||
receiptBill.setShsl(updatedBill.getShsl());
|
||||
receiptBill.setBz(updatedBill.getBz());
|
||||
receiptBill.setBtbz(updatedBill.getBtbz());
|
||||
}
|
||||
return receiptBill;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
receiptBills.setRecords(receiptBillList);
|
||||
return CommonPage.getPage(receiptBills);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据条件查询
|
||||
*
|
||||
@@ -62,7 +111,7 @@ public class ReceiptBillServiceImpl extends ServiceImpl<ReceiptBillMapper, Recei
|
||||
.lambda()
|
||||
.eq(ObjectUtil.isNotEmpty(params), ReceiptBill::getDjbh, params.getFuzzy())
|
||||
.or()
|
||||
.eq(ObjectUtil.isNotEmpty(params), ReceiptBill::getWlbm, params.getFuzzy())
|
||||
.eq(ObjectUtil.isNotEmpty(params), ReceiptBill::getCkbm, params.getFuzzy())
|
||||
);
|
||||
}
|
||||
|
||||
@@ -71,9 +120,38 @@ public class ReceiptBillServiceImpl extends ServiceImpl<ReceiptBillMapper, Recei
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void receiptConfirm(List<String> ids) {
|
||||
|
||||
|
||||
public void receiptConfirm(List<ReceiptBillVO> params) {
|
||||
ReceiptBillDto receiptBillDto = new ReceiptBillDto();
|
||||
receiptBillDto.setBillId(params.get(0).getDjid());
|
||||
receiptBillDto.setBillNo(params.get(0).getDjbh());
|
||||
receiptBillDto.setBillType("SHDJ");
|
||||
receiptBillDto.setInWhUser(SecurityUtils.getCurrentNickName() == null ? "admin" : SecurityUtils.getCurrentNickName());
|
||||
receiptBillDto.setDescription(params.get(0).getBtbz());
|
||||
receiptBillDto.setBizDate(params.get(0).getYwrq());
|
||||
List<ReceiptBillDetailDto> entrys = new ArrayList<>();
|
||||
params.forEach(r -> {
|
||||
ReceiptBillDetailDto dto = new ReceiptBillDetailDto();
|
||||
dto.setCkbm(r.getCkbm());
|
||||
dto.setKwbm(r.getKwbm());
|
||||
dto.setEntryId(r.getFlid());
|
||||
dto.setShsl(r.getShsl());
|
||||
entrys.add(dto);
|
||||
}
|
||||
);
|
||||
receiptBillDto.setEntrys(entrys);
|
||||
try {
|
||||
SrmMsgDto srmMsgDto;
|
||||
String billJson = com.alibaba.fastjson.JSON.toJSONString(receiptBillDto, SerializerFeature.WriteMapNullValue);
|
||||
srmMsgDto = wmsToSrmService.sendWebPostData(billJson);
|
||||
if (srmMsgDto != null) {
|
||||
if ("false".equals(srmMsgDto.getSuccess())) {
|
||||
throw new BadRequestException(srmMsgDto.getMessage());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("推送Eas单据失败,单据号为:[" + params.get(0).getDjbh() + "]异常原因:" + e.toString());
|
||||
throw new BadRequestException(e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +166,6 @@ public class ReceiptBillServiceImpl extends ServiceImpl<ReceiptBillMapper, Recei
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 修改收货单
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user