30 changed files with 1509 additions and 131 deletions
@ -0,0 +1,103 @@ |
|||
package org.nl.wms.database.eas.controller; |
|||
|
|||
import java.util.List; |
|||
import java.util.Set; |
|||
|
|||
import org.nl.common.base.CommonPage; |
|||
import org.nl.common.base.CommonResult; |
|||
import org.nl.common.base.RestBusinessTemplate; |
|||
import org.nl.wms.database.eas.dao.AllocationBill2; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import lombok.RequiredArgsConstructor; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.http.HttpStatus; |
|||
import org.springframework.http.ResponseEntity; |
|||
import org.nl.common.logging.annotation.Log; |
|||
import org.nl.wms.database.eas.dto.AllocationBill2VO; |
|||
import org.nl.wms.database.eas.service.IallocationBill2Service; |
|||
|
|||
|
|||
/** |
|||
* 调拨单(AllocationBill2)控制层 |
|||
*/ |
|||
@RestController |
|||
@RequiredArgsConstructor |
|||
@RequestMapping("/api/allocationBill2") |
|||
@Slf4j |
|||
public class AllocationBill2Controller { |
|||
|
|||
|
|||
@Resource |
|||
private IallocationBill2Service allocationBill2Service; |
|||
|
|||
|
|||
/** |
|||
* 分页查询 |
|||
* |
|||
* @param params 传入分页条件或查询条件,例:{"page":"0","size":"10", "fuzzy":"熊一" } |
|||
*/ |
|||
@PostMapping("/page") |
|||
@Log("分页查询调拨单") |
|||
public ResponseEntity<CommonPage<AllocationBill2>> page(@RequestBody AllocationBill2VO params) { |
|||
return new ResponseEntity<>(allocationBill2Service.page(params), HttpStatus.OK); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 条件查询 |
|||
* |
|||
* @param params 传入查询条件,例:{"fuzzy":"熊一" } |
|||
*/ |
|||
@PostMapping("/query") |
|||
@Log("条件查询调拨单") |
|||
public CommonResult<List<AllocationBill2>> query(@RequestBody AllocationBill2VO params) { |
|||
return RestBusinessTemplate.execute(() -> allocationBill2Service.query(params)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 新增数据 |
|||
* |
|||
* @param entity 传入新增对象,例:{"name":"熊大", "age":"16" } |
|||
* @return 新增结果 |
|||
*/ |
|||
@PostMapping("/create") |
|||
@Log("新增调拨单") |
|||
public CommonResult create(@RequestBody AllocationBill2VO entity) { |
|||
return RestBusinessTemplate.execute(() -> allocationBill2Service.create(entity)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 修改数据 |
|||
* |
|||
* @param entity 传入修改对象包含主键,例:{"id":"1", "name":"熊二" } |
|||
* @return 修改结果 |
|||
*/ |
|||
@PostMapping("/update") |
|||
@Log("修改调拨单") |
|||
//@SaCheckPermission("@el.check(AllocationBill2:edit')")
|
|||
public CommonResult update(@RequestBody AllocationBill2VO entity) { |
|||
return RestBusinessTemplate.execute(() -> allocationBill2Service.update(entity)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 删除数据 |
|||
* |
|||
* @param ids 传入单个或多个主键Id,例:["1","2"] |
|||
* @return 删除结果 |
|||
*/ |
|||
@Log("删除调拨单") |
|||
//@SaCheckPermission("@el.check(AllocationBill2:del')")
|
|||
@PostMapping("/delete") |
|||
public CommonResult delete(@RequestBody Set<String> ids) { |
|||
return RestBusinessTemplate.execute(() -> allocationBill2Service.delete(ids)); |
|||
} |
|||
|
|||
|
|||
} |
|||
|
@ -0,0 +1,103 @@ |
|||
package org.nl.wms.database.eas.controller; |
|||
|
|||
import java.util.List; |
|||
import java.util.Set; |
|||
|
|||
import org.nl.common.base.CommonPage; |
|||
import org.nl.common.base.CommonResult; |
|||
import org.nl.common.base.RestBusinessTemplate; |
|||
import org.nl.wms.database.eas.dao.ReceiptBill2; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import lombok.RequiredArgsConstructor; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.http.HttpStatus; |
|||
import org.springframework.http.ResponseEntity; |
|||
import org.nl.common.logging.annotation.Log; |
|||
import org.nl.wms.database.eas.dto.ReceiptBill2VO; |
|||
import org.nl.wms.database.eas.service.IreceiptBill2Service; |
|||
|
|||
|
|||
/** |
|||
* 送货单(ReceiptBill2)控制层 |
|||
*/ |
|||
@RestController |
|||
@RequiredArgsConstructor |
|||
@RequestMapping("/api/receiptBill2") |
|||
@Slf4j |
|||
public class ReceiptBill2Controller { |
|||
|
|||
|
|||
@Resource |
|||
private IreceiptBill2Service receiptBill2Service; |
|||
|
|||
|
|||
/** |
|||
* 分页查询 |
|||
* |
|||
* @param params 传入分页条件或查询条件,例:{"page":"0","size":"10", "fuzzy":"熊一" } |
|||
*/ |
|||
@PostMapping("/page") |
|||
@Log("分页查询送货单") |
|||
public ResponseEntity<CommonPage<ReceiptBill2>> page(@RequestBody ReceiptBill2VO params) { |
|||
return new ResponseEntity<>(receiptBill2Service.page(params), HttpStatus.OK); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 条件查询 |
|||
* |
|||
* @param params 传入查询条件,例:{"fuzzy":"熊一" } |
|||
*/ |
|||
@PostMapping("/query") |
|||
@Log("条件查询送货单") |
|||
public CommonResult<List<ReceiptBill2>> query(@RequestBody ReceiptBill2VO params) { |
|||
return RestBusinessTemplate.execute(() -> receiptBill2Service.query(params)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 新增数据 |
|||
* |
|||
* @param entity 传入新增对象,例:{"name":"熊大", "age":"16" } |
|||
* @return 新增结果 |
|||
*/ |
|||
@PostMapping("/create") |
|||
@Log("新增送货单") |
|||
public CommonResult create(@RequestBody ReceiptBill2VO entity) { |
|||
return RestBusinessTemplate.execute(() -> receiptBill2Service.create(entity)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 修改数据 |
|||
* |
|||
* @param entity 传入修改对象包含主键,例:{"id":"1", "name":"熊二" } |
|||
* @return 修改结果 |
|||
*/ |
|||
@PostMapping("/update") |
|||
@Log("修改送货单") |
|||
//@SaCheckPermission("@el.check(ReceiptBill2:edit')")
|
|||
public CommonResult update(@RequestBody ReceiptBill2VO entity) { |
|||
return RestBusinessTemplate.execute(() -> receiptBill2Service.update(entity)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 删除数据 |
|||
* |
|||
* @param ids 传入单个或多个主键Id,例:["1","2"] |
|||
* @return 删除结果 |
|||
*/ |
|||
@Log("删除送货单") |
|||
//@SaCheckPermission("@el.check(ReceiptBill2:del')")
|
|||
@PostMapping("/delete") |
|||
public CommonResult delete(@RequestBody Set<String> ids) { |
|||
return RestBusinessTemplate.execute(() -> receiptBill2Service.delete(ids)); |
|||
} |
|||
|
|||
|
|||
} |
|||
|
@ -0,0 +1,131 @@ |
|||
package org.nl.wms.database.eas.dao; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.baomidou.mybatisplus.extension.activerecord.Model; |
|||
|
|||
|
|||
/** |
|||
* {@code @Description:} 调拨单(AllocationBill2)实体类 |
|||
* {@code @Author:} gbx |
|||
* |
|||
* @since 2024-05-27 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@TableName("allocation_bill2") |
|||
public class AllocationBill2 extends Model<AllocationBill2> { |
|||
|
|||
private static final long serialVersionUID = -7739291296662381393L; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 单据ID |
|||
*/ |
|||
private String djid; |
|||
|
|||
|
|||
/** |
|||
* 单据编号 |
|||
*/ |
|||
private String djbh; |
|||
|
|||
|
|||
/** |
|||
* 业务日期 |
|||
*/ |
|||
private String ywrq; |
|||
|
|||
|
|||
/** |
|||
* 表头备注 |
|||
*/ |
|||
private String btbz; |
|||
|
|||
|
|||
/** |
|||
* 分录序号 |
|||
*/ |
|||
private String flxh; |
|||
|
|||
|
|||
/** |
|||
* 分录ID |
|||
*/ |
|||
@TableId(value = "flid", type = IdType.NONE) |
|||
private String flid; |
|||
|
|||
|
|||
/** |
|||
* 计量单位 |
|||
*/ |
|||
private String jldw; |
|||
|
|||
|
|||
/** |
|||
* 数量 |
|||
*/ |
|||
private String sl; |
|||
|
|||
|
|||
/** |
|||
* 调出仓库编码 |
|||
*/ |
|||
private String dcckbm; |
|||
|
|||
|
|||
/** |
|||
* 调出库位编码 |
|||
*/ |
|||
private String dckwbm; |
|||
|
|||
|
|||
/** |
|||
* 调入仓库编码 |
|||
*/ |
|||
private String drckbm; |
|||
|
|||
|
|||
/** |
|||
* 调入库位编码 |
|||
*/ |
|||
private String drkwbm; |
|||
|
|||
|
|||
/** |
|||
* 计划调入日期 |
|||
*/ |
|||
private String jhdrrq; |
|||
|
|||
|
|||
/** |
|||
* 计划调出日期 |
|||
*/ |
|||
private String jhdcrq; |
|||
|
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String bz; |
|||
|
|||
|
|||
/** |
|||
* 获取主键值 |
|||
* |
|||
* @return 主键值 |
|||
*/ |
|||
@Override |
|||
protected Serializable pkVal() { |
|||
return this.djid; |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
|
@ -0,0 +1,107 @@ |
|||
package org.nl.wms.database.eas.dao; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.baomidou.mybatisplus.extension.activerecord.Model; |
|||
|
|||
|
|||
/** |
|||
* {@code @Description:} 送货单(ReceiptBill2)实体类 |
|||
* {@code @Author:} gbx |
|||
* |
|||
* @since 2024-05-27 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@TableName("receipt_bill2") |
|||
public class ReceiptBill2 extends Model<ReceiptBill2> { |
|||
|
|||
private static final long serialVersionUID = -7739291296662381393L; |
|||
//@TableId(value = "id", type = IdType.NONE)
|
|||
|
|||
|
|||
/** |
|||
* 送货单ID |
|||
*/ |
|||
private String djid; |
|||
|
|||
|
|||
/** |
|||
* 送货单号 |
|||
*/ |
|||
private String djbh; |
|||
|
|||
|
|||
/** |
|||
* 送货日期 |
|||
*/ |
|||
private String ywrq; |
|||
|
|||
|
|||
/** |
|||
* 收货数量 |
|||
*/ |
|||
private String shsl; |
|||
|
|||
|
|||
/** |
|||
* 收货组织编码 |
|||
*/ |
|||
private String zzbm; |
|||
|
|||
|
|||
/** |
|||
* 收货仓库编码 |
|||
*/ |
|||
private String ckbm; |
|||
|
|||
|
|||
/** |
|||
* 收货库位编码 |
|||
*/ |
|||
private String kwbm; |
|||
|
|||
|
|||
/** |
|||
* 分录ID |
|||
*/ |
|||
@TableId(value = "flid", type = IdType.NONE) |
|||
private String flid; |
|||
|
|||
|
|||
/** |
|||
* 分录序号 |
|||
*/ |
|||
private String flxh; |
|||
|
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String bz; |
|||
|
|||
|
|||
/** |
|||
* 表头备注 |
|||
*/ |
|||
private String btbz; |
|||
|
|||
|
|||
/** |
|||
* 获取主键值 |
|||
* |
|||
* @return 主键值 |
|||
*/ |
|||
@Override |
|||
protected Serializable pkVal() { |
|||
return this.djid; |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
|
@ -0,0 +1,15 @@ |
|||
package org.nl.wms.database.eas.dao.mapper; |
|||
|
|||
import org.nl.wms.database.eas.dao.AllocationBill2; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
|
|||
/** |
|||
* {@code @Description:} 调拨单(AllocationBill2)数据持久层 |
|||
* {@code @Author:} gbx |
|||
* |
|||
* @since 2024-05-27 |
|||
*/ |
|||
public interface AllocationBill2Mapper extends BaseMapper<AllocationBill2> { |
|||
|
|||
|
|||
} |
@ -0,0 +1,15 @@ |
|||
package org.nl.wms.database.eas.dao.mapper; |
|||
|
|||
import org.nl.wms.database.eas.dao.ReceiptBill2; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
|
|||
/** |
|||
* {@code @Description:} 送货单(ReceiptBill2)数据持久层 |
|||
* {@code @Author:} gbx |
|||
* |
|||
* @since 2024-05-27 |
|||
*/ |
|||
public interface ReceiptBill2Mapper extends BaseMapper<ReceiptBill2> { |
|||
|
|||
|
|||
} |
@ -0,0 +1,14 @@ |
|||
<?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.AllocationBill2Mapper"> |
|||
<insert id="insertBatch" keyProperty="djid" useGeneratedKeys="true"> |
|||
insert into allocation_bill2(djbh, ywrq, btbz, flxh, flid, jldw, sl, dcckbm, dckwbm, drckbm, drkwbm, jhdrrq, |
|||
jhdcrq, bz) |
|||
values |
|||
<foreach collection="entities" item="entity" separator=","> |
|||
(#{entity.djbh}, #{entity.ywrq}, #{entity.btbz}, #{entity.flxh}, #{entity.flid}, #{entity.jldw}, |
|||
#{entity.sl}, #{entity.dcckbm}, #{entity.dckwbm}, #{entity.drckbm}, #{entity.drkwbm}, #{entity.jhdrrq}, |
|||
#{entity.jhdcrq}, #{entity.bz}) |
|||
</foreach> |
|||
</insert> |
|||
</mapper> |
@ -0,0 +1,12 @@ |
|||
<?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.ReceiptBill2Mapper"> |
|||
<insert id="insertBatch" keyProperty="djid" useGeneratedKeys="true"> |
|||
insert into receipt_bill2(djbh, ywrq, shsl, zzbm, ckbm, kwbm, flid, flxh, bz, btbz) |
|||
values |
|||
<foreach collection="entities" item="entity" separator=","> |
|||
(#{entity.djbh}, #{entity.ywrq}, #{entity.shsl}, #{entity.zzbm}, #{entity.ckbm}, #{entity.kwbm}, |
|||
#{entity.flid}, #{entity.flxh}, #{entity.bz}, #{entity.btbz}) |
|||
</foreach> |
|||
</insert> |
|||
</mapper> |
@ -0,0 +1,89 @@ |
|||
package org.nl.wms.database.eas.dto; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
import lombok.*; |
|||
import lombok.Data; |
|||
import lombok.Builder; |
|||
|
|||
|
|||
/** |
|||
* {@code @Description:} 调拨单(AllocationBill2)数据传输类 |
|||
* {@code @Author:} gbx |
|||
* |
|||
* @since 2024-05-27 |
|||
*/ |
|||
@Data |
|||
@Builder |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class AllocationBill2Dto implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -7739291296662381396L; |
|||
|
|||
|
|||
/** |
|||
* 单据ID |
|||
*/ |
|||
private String djid; |
|||
/** |
|||
* 单据编号 |
|||
*/ |
|||
private String djbh; |
|||
/** |
|||
* 业务日期 |
|||
*/ |
|||
private String ywrq; |
|||
/** |
|||
* 表头备注 |
|||
*/ |
|||
private String btbz; |
|||
/** |
|||
* 分录序号 |
|||
*/ |
|||
private String flxh; |
|||
/** |
|||
* 分录ID |
|||
*/ |
|||
private String flid; |
|||
/** |
|||
* 计量单位 |
|||
*/ |
|||
private String jldw; |
|||
/** |
|||
* 数量 |
|||
*/ |
|||
private String sl; |
|||
/** |
|||
* 调出仓库编码 |
|||
*/ |
|||
private String dcckbm; |
|||
/** |
|||
* 调出库位编码 |
|||
*/ |
|||
private String dckwbm; |
|||
/** |
|||
* 调入仓库编码 |
|||
*/ |
|||
private String drckbm; |
|||
/** |
|||
* 调入库位编码 |
|||
*/ |
|||
private String drkwbm; |
|||
/** |
|||
* 计划调入日期 |
|||
*/ |
|||
private String jhdrrq; |
|||
/** |
|||
* 计划调出日期 |
|||
*/ |
|||
private String jhdcrq; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String bz; |
|||
|
|||
} |
|||
|
|||
|
|||
|
@ -0,0 +1,83 @@ |
|||
package org.nl.wms.database.eas.dto; |
|||
|
|||
|
|||
import lombok.Data; |
|||
import lombok.*; |
|||
import lombok.EqualsAndHashCode; |
|||
import org.nl.common.domain.query.BaseQuery; |
|||
import org.nl.wms.database.eas.dao.AllocationBill2; |
|||
|
|||
/** |
|||
* {@code @Description:} 调拨单(AllocationBill2)查询参数类 |
|||
* {@code @Author:} gbx |
|||
* |
|||
* @since 2024-05-27 |
|||
*/ |
|||
@Data |
|||
@Builder |
|||
@ToString |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
@EqualsAndHashCode(callSuper = false) |
|||
public class AllocationBill2VO extends BaseQuery<AllocationBill2> { |
|||
/** |
|||
* 单据ID |
|||
*/ |
|||
private String djid; |
|||
/** |
|||
* 单据编号 |
|||
*/ |
|||
private String djbh; |
|||
/** |
|||
* 业务日期 |
|||
*/ |
|||
private String ywrq; |
|||
/** |
|||
* 表头备注 |
|||
*/ |
|||
private String btbz; |
|||
/** |
|||
* 分录序号 |
|||
*/ |
|||
private String flxh; |
|||
/** |
|||
* 分录ID |
|||
*/ |
|||
private String flid; |
|||
/** |
|||
* 计量单位 |
|||
*/ |
|||
private String jldw; |
|||
/** |
|||
* 数量 |
|||
*/ |
|||
private String sl; |
|||
/** |
|||
* 调出仓库编码 |
|||
*/ |
|||
private String dcckbm; |
|||
/** |
|||
* 调出库位编码 |
|||
*/ |
|||
private String dckwbm; |
|||
/** |
|||
* 调入仓库编码 |
|||
*/ |
|||
private String drckbm; |
|||
/** |
|||
* 调入库位编码 |
|||
*/ |
|||
private String drkwbm; |
|||
/** |
|||
* 计划调入日期 |
|||
*/ |
|||
private String jhdrrq; |
|||
/** |
|||
* 计划调出日期 |
|||
*/ |
|||
private String jhdcrq; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String bz; |
|||
} |
@ -0,0 +1,73 @@ |
|||
package org.nl.wms.database.eas.dto; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
import lombok.*; |
|||
import lombok.Data; |
|||
import lombok.Builder; |
|||
|
|||
|
|||
/** |
|||
* {@code @Description:} 送货单(ReceiptBill2)数据传输类 |
|||
* {@code @Author:} gbx |
|||
* |
|||
* @since 2024-05-27 |
|||
*/ |
|||
@Data |
|||
@Builder |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class ReceiptBill2Dto implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -7739291296662381396L; |
|||
|
|||
|
|||
/** |
|||
* 送货单ID |
|||
*/ |
|||
private String djid; |
|||
/** |
|||
* 送货单号 |
|||
*/ |
|||
private String djbh; |
|||
/** |
|||
* 送货日期 |
|||
*/ |
|||
private String ywrq; |
|||
/** |
|||
* 收货数量 |
|||
*/ |
|||
private String shsl; |
|||
/** |
|||
* 收货组织编码 |
|||
*/ |
|||
private String zzbm; |
|||
/** |
|||
* 收货仓库编码 |
|||
*/ |
|||
private String ckbm; |
|||
/** |
|||
* 收货库位编码 |
|||
*/ |
|||
private String kwbm; |
|||
/** |
|||
* 分录ID |
|||
*/ |
|||
private String flid; |
|||
/** |
|||
* 分录序号 |
|||
*/ |
|||
private String flxh; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String bz; |
|||
/** |
|||
* 表头备注 |
|||
*/ |
|||
private String btbz; |
|||
|
|||
} |
|||
|
|||
|
|||
|
@ -0,0 +1,67 @@ |
|||
package org.nl.wms.database.eas.dto; |
|||
|
|||
|
|||
import lombok.Data; |
|||
import lombok.*; |
|||
import lombok.EqualsAndHashCode; |
|||
import org.nl.common.domain.query.BaseQuery; |
|||
import org.nl.wms.database.eas.dao.ReceiptBill2; |
|||
|
|||
/** |
|||
* {@code @Description:} 送货单(ReceiptBill2)查询参数类 |
|||
* {@code @Author:} gbx |
|||
* |
|||
* @since 2024-05-27 |
|||
*/ |
|||
@Data |
|||
@Builder |
|||
@ToString |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
@EqualsAndHashCode(callSuper = false) |
|||
public class ReceiptBill2VO extends BaseQuery<ReceiptBill2> { |
|||
/** |
|||
* 送货单ID |
|||
*/ |
|||
private String djid; |
|||
/** |
|||
* 送货单号 |
|||
*/ |
|||
private String djbh; |
|||
/** |
|||
* 送货日期 |
|||
*/ |
|||
private String ywrq; |
|||
/** |
|||
* 收货数量 |
|||
*/ |
|||
private String shsl; |
|||
/** |
|||
* 收货组织编码 |
|||
*/ |
|||
private String zzbm; |
|||
/** |
|||
* 收货仓库编码 |
|||
*/ |
|||
private String ckbm; |
|||
/** |
|||
* 收货库位编码 |
|||
*/ |
|||
private String kwbm; |
|||
/** |
|||
* 分录ID |
|||
*/ |
|||
private String flid; |
|||
/** |
|||
* 分录序号 |
|||
*/ |
|||
private String flxh; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String bz; |
|||
/** |
|||
* 表头备注 |
|||
*/ |
|||
private String btbz; |
|||
} |
@ -0,0 +1,63 @@ |
|||
package org.nl.wms.database.eas.service; |
|||
|
|||
import org.nl.common.base.CommonPage; |
|||
import org.nl.wms.database.eas.dao.AllocationBill2; |
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import org.nl.wms.database.eas.dto.AllocationBill2VO; |
|||
|
|||
import java.util.List; |
|||
import java.util.Set; |
|||
|
|||
|
|||
/** |
|||
* {@code @Description:} 调拨单(AllocationBill2)服务接口层 |
|||
* {@code @Author:} gbx |
|||
* |
|||
* @since 2024-05-27 |
|||
*/ |
|||
public interface IallocationBill2Service extends IService<AllocationBill2> { |
|||
|
|||
|
|||
/** |
|||
* 分页查询 |
|||
* |
|||
* @param params 查询条件 |
|||
* @return CommonPage<AllocationBill2> |
|||
*/ |
|||
CommonPage<AllocationBill2> page(AllocationBill2VO params); |
|||
|
|||
/** |
|||
* 条件查询 |
|||
* |
|||
* @param params 查询条件 |
|||
* @return List<AllocationBill2> |
|||
*/ |
|||
List<AllocationBill2> query(AllocationBill2VO params); |
|||
|
|||
|
|||
/** |
|||
* 创建 |
|||
* |
|||
* @param entity / |
|||
*/ |
|||
void create(AllocationBill2VO entity); |
|||
|
|||
|
|||
/** |
|||
* 编辑 |
|||
* |
|||
* @param entity / |
|||
*/ |
|||
void update(AllocationBill2VO entity); |
|||
|
|||
/** |
|||
* 多选删除 |
|||
* |
|||
* @param ids / |
|||
*/ |
|||
void delete(Set<String> ids); |
|||
|
|||
|
|||
} |
|||
|
|||
|
@ -0,0 +1,63 @@ |
|||
package org.nl.wms.database.eas.service; |
|||
|
|||
import org.nl.common.base.CommonPage; |
|||
import org.nl.wms.database.eas.dao.ReceiptBill2; |
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import org.nl.wms.database.eas.dto.ReceiptBill2VO; |
|||
|
|||
import java.util.List; |
|||
import java.util.Set; |
|||
|
|||
|
|||
/** |
|||
* {@code @Description:} 送货单(ReceiptBill2)服务接口层 |
|||
* {@code @Author:} gbx |
|||
* |
|||
* @since 2024-05-27 |
|||
*/ |
|||
public interface IreceiptBill2Service extends IService<ReceiptBill2> { |
|||
|
|||
|
|||
/** |
|||
* 分页查询 |
|||
* |
|||
* @param params 查询条件 |
|||
* @return CommonPage<ReceiptBill2> |
|||
*/ |
|||
CommonPage<ReceiptBill2> page(ReceiptBill2VO params); |
|||
|
|||
/** |
|||
* 条件查询 |
|||
* |
|||
* @param params 查询条件 |
|||
* @return List<ReceiptBill2> |
|||
*/ |
|||
List<ReceiptBill2> query(ReceiptBill2VO params); |
|||
|
|||
|
|||
/** |
|||
* 创建 |
|||
* |
|||
* @param entity / |
|||
*/ |
|||
void create(ReceiptBill2VO entity); |
|||
|
|||
|
|||
/** |
|||
* 编辑 |
|||
* |
|||
* @param entity / |
|||
*/ |
|||
void update(ReceiptBill2VO entity); |
|||
|
|||
/** |
|||
* 多选删除 |
|||
* |
|||
* @param ids / |
|||
*/ |
|||
void delete(Set<String> ids); |
|||
|
|||
|
|||
} |
|||
|
|||
|
@ -0,0 +1,135 @@ |
|||
package org.nl.wms.database.eas.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import org.nl.wms.database.eas.dao.AllocationBill2; |
|||
import org.nl.wms.database.eas.dto.AllocationBill2VO; |
|||
import org.nl.wms.database.eas.dao.mapper.AllocationBill2Mapper; |
|||
import org.nl.wms.database.eas.service.IallocationBill2Service; |
|||
import cn.hutool.core.date.DateUtil; |
|||
import org.nl.common.utils.SecurityUtils; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import org.springframework.stereotype.Service; |
|||
import cn.hutool.core.util.ObjectUtil; |
|||
import org.springframework.beans.BeanUtils; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
import org.nl.common.base.CommonPage; |
|||
|
|||
import java.util.Set; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* {@code @Description:} 调拨单(AllocationBill2)服务实现层 |
|||
* {@code @Author:} gbx |
|||
* |
|||
* @since 2024-05-27 |
|||
*/ |
|||
@Service("allocationBill2Service") |
|||
public class AllocationBill2ServiceImpl extends ServiceImpl<AllocationBill2Mapper, AllocationBill2> implements IallocationBill2Service { |
|||
|
|||
|
|||
@Resource |
|||
private AllocationBill2Mapper allocationBill2Mapper; |
|||
|
|||
|
|||
/** |
|||
* 分页查询 |
|||
* |
|||
* @param params 查询条件 |
|||
*/ |
|||
@Override |
|||
public CommonPage<AllocationBill2> page(AllocationBill2VO params) { |
|||
Page<AllocationBill2> result = allocationBill2Mapper.selectPage(new Page<>(params.getPage() + 1, params.getSize()), new QueryWrapper<AllocationBill2>() |
|||
.lambda() |
|||
// .like(StringUtils.isNotBlank(form.name()), User::getName, form.name())
|
|||
// .between(form.beginTime != null && form.endTime != null, User::getCreateTime, beginTime, endTime)
|
|||
// .in(form.Status != null, User::getStatus
|
|||
// , UserStatusEnum.NOT_SUBMITTED
|
|||
// , UserStatusEnum.TO_REVIEWED)
|
|||
// .orderByDesc(User::getId)
|
|||
//.eq(AllocationBill2::getIs_delete, 0)
|
|||
); |
|||
return CommonPage.getPage(result); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 根据条件查询 |
|||
* |
|||
* @param params 查询条件 |
|||
*/ |
|||
@Override |
|||
public List<AllocationBill2> query(AllocationBill2VO params) { |
|||
return allocationBill2Mapper.selectList(new QueryWrapper<AllocationBill2>() |
|||
.lambda() |
|||
.eq(ObjectUtil.isNotEmpty(params), AllocationBill2::getDjbh, params.getFuzzy()) |
|||
.or() |
|||
.eq(ObjectUtil.isNotEmpty(params), AllocationBill2::getDjid, params.getFuzzy()) |
|||
); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 创建 |
|||
* |
|||
* @param entity 对象实体 |
|||
*/ |
|||
@Override |
|||
public void create(AllocationBill2VO entity) { |
|||
allocationBill2Mapper.insert(getBasicInfo(entity, true)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 编辑 |
|||
* |
|||
* @param entity 对象实体 |
|||
*/ |
|||
@Override |
|||
public void update(AllocationBill2VO entity) { |
|||
// AllocationBill2 dto = allocationBill2Mapper.selectById(entity.getId());
|
|||
// if (dto == null) {
|
|||
// throw new BadRequestException("不存在该数据!");
|
|||
// }
|
|||
allocationBill2Mapper.updateById(getBasicInfo(entity, false)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 多选删除 |
|||
* |
|||
* @param ids 多个Id主键 |
|||
*/ |
|||
@Override |
|||
public void delete(Set<String> ids) { |
|||
// 物理删除
|
|||
allocationBill2Mapper.deleteBatchIds(ids); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 获取实体基础信息 |
|||
* |
|||
* @param entity 对象实体 |
|||
* @param isCreate 是否创建 |
|||
*/ |
|||
private AllocationBill2 getBasicInfo(AllocationBill2VO entity, boolean isCreate) { |
|||
// if (isCreate) {
|
|||
// entity.setId(IdUtil.getStringId());
|
|||
// entity.setCreate_id(Long.valueOf(SecurityUtils.getCurrentUserId()));
|
|||
// entity.setCreate_name(SecurityUtils.getCurrentNickName());
|
|||
// entity.setCreate_time(DateUtil.now());
|
|||
// }
|
|||
// entity.setUpdate_optid(Long.valueOf(SecurityUtils.getCurrentUserId()));
|
|||
// entity.setUpdate_optname(SecurityUtils.getCurrentNickName());
|
|||
// entity.setUpdate_time(DateUtil.now());
|
|||
AllocationBill2 allocationBill2 = new AllocationBill2(); |
|||
BeanUtils.copyProperties(entity, allocationBill2); |
|||
return allocationBill2; |
|||
} |
|||
|
|||
|
|||
} |
|||
|
@ -0,0 +1,135 @@ |
|||
package org.nl.wms.database.eas.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import org.nl.wms.database.eas.dao.ReceiptBill2; |
|||
import org.nl.wms.database.eas.dto.ReceiptBill2VO; |
|||
import org.nl.wms.database.eas.dao.mapper.ReceiptBill2Mapper; |
|||
import org.nl.wms.database.eas.service.IreceiptBill2Service; |
|||
import cn.hutool.core.date.DateUtil; |
|||
import org.nl.common.utils.SecurityUtils; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import org.springframework.stereotype.Service; |
|||
import cn.hutool.core.util.ObjectUtil; |
|||
import org.springframework.beans.BeanUtils; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
import org.nl.common.base.CommonPage; |
|||
|
|||
import java.util.Set; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* {@code @Description:} 送货单(ReceiptBill2)服务实现层 |
|||
* {@code @Author:} gbx |
|||
* |
|||
* @since 2024-05-27 |
|||
*/ |
|||
@Service("receiptBill2Service") |
|||
public class ReceiptBill2ServiceImpl extends ServiceImpl<ReceiptBill2Mapper, ReceiptBill2> implements IreceiptBill2Service { |
|||
|
|||
|
|||
@Resource |
|||
private ReceiptBill2Mapper receiptBill2Mapper; |
|||
|
|||
|
|||
/** |
|||
* 分页查询 |
|||
* |
|||
* @param params 查询条件 |
|||
*/ |
|||
@Override |
|||
public CommonPage<ReceiptBill2> page(ReceiptBill2VO params) { |
|||
Page<ReceiptBill2> result = receiptBill2Mapper.selectPage(new Page<>(params.getPage() + 1, params.getSize()), new QueryWrapper<ReceiptBill2>() |
|||
.lambda() |
|||
// .like(StringUtils.isNotBlank(form.name()), User::getName, form.name())
|
|||
// .between(form.beginTime != null && form.endTime != null, User::getCreateTime, beginTime, endTime)
|
|||
// .in(form.Status != null, User::getStatus
|
|||
// , UserStatusEnum.NOT_SUBMITTED
|
|||
// , UserStatusEnum.TO_REVIEWED)
|
|||
// .orderByDesc(User::getId)
|
|||
//.eq(ReceiptBill2::getIs_delete, 0)
|
|||
); |
|||
return CommonPage.getPage(result); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 根据条件查询 |
|||
* |
|||
* @param params 查询条件 |
|||
*/ |
|||
@Override |
|||
public List<ReceiptBill2> query(ReceiptBill2VO params) { |
|||
return receiptBill2Mapper.selectList(new QueryWrapper<ReceiptBill2>() |
|||
.lambda() |
|||
.eq(ObjectUtil.isNotEmpty(params), ReceiptBill2::getFlid, params.getFuzzy()) |
|||
.or() |
|||
.eq(ObjectUtil.isNotEmpty(params), ReceiptBill2::getDjid, params.getFuzzy()) |
|||
); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 创建 |
|||
* |
|||
* @param entity 对象实体 |
|||
*/ |
|||
@Override |
|||
public void create(ReceiptBill2VO entity) { |
|||
receiptBill2Mapper.insert(getBasicInfo(entity, true)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 编辑 |
|||
* |
|||
* @param entity 对象实体 |
|||
*/ |
|||
@Override |
|||
public void update(ReceiptBill2VO entity) { |
|||
// ReceiptBill2 dto = receiptBill2Mapper.selectById(entity.getId());
|
|||
// if (dto == null) {
|
|||
// throw new BadRequestException("不存在该数据!");
|
|||
// }
|
|||
receiptBill2Mapper.updateById(getBasicInfo(entity, false)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 多选删除 |
|||
* |
|||
* @param ids 多个Id主键 |
|||
*/ |
|||
@Override |
|||
public void delete(Set<String> ids) { |
|||
// 物理删除
|
|||
receiptBill2Mapper.deleteBatchIds(ids); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 获取实体基础信息 |
|||
* |
|||
* @param entity 对象实体 |
|||
* @param isCreate 是否创建 |
|||
*/ |
|||
private ReceiptBill2 getBasicInfo(ReceiptBill2VO entity, boolean isCreate) { |
|||
// if (isCreate) {
|
|||
// entity.setId(IdUtil.getStringId());
|
|||
// entity.setCreate_id(Long.valueOf(SecurityUtils.getCurrentUserId()));
|
|||
// entity.setCreate_name(SecurityUtils.getCurrentNickName());
|
|||
// entity.setCreate_time(DateUtil.now());
|
|||
// }
|
|||
// entity.setUpdate_optid(Long.valueOf(SecurityUtils.getCurrentUserId()));
|
|||
// entity.setUpdate_optname(SecurityUtils.getCurrentNickName());
|
|||
// entity.setUpdate_time(DateUtil.now());
|
|||
ReceiptBill2 receiptBill2 = new ReceiptBill2(); |
|||
BeanUtils.copyProperties(entity, receiptBill2); |
|||
return receiptBill2; |
|||
} |
|||
|
|||
|
|||
} |
|||
|
Loading…
Reference in new issue