Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -307,6 +307,18 @@
|
||||
<version>5.23</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
<version>1.2.12</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>eu.bitwalker</groupId>
|
||||
<artifactId>UserAgentUtils</artifactId>
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package org.nl.wms.pdm.subpackage.controller;
|
||||
|
||||
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.pdm.subpackage.service.IPdmBiSubpackagerelationService;
|
||||
import org.nl.wms.pdm.subpackage.service.dto.SubPackageQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 子卷包装关系表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/pdmBiSubpackagerelation")
|
||||
public class PdmBiSubpackagerelationController {
|
||||
|
||||
@Autowired
|
||||
private IPdmBiSubpackagerelationService iPdmBiSubpackagerelationService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询子卷包装关系")
|
||||
public ResponseEntity<Object> query(SubPackageQuery query, PageQuery page){
|
||||
return new ResponseEntity<>(iPdmBiSubpackagerelationService.pageQuery(query,page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.nl.wms.pdm.subpackage.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.pdm.subpackage.service.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.wms.pdm.subpackage.service.dto.SubPackageQuery;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 子卷包装关系表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-14
|
||||
*/
|
||||
public interface IPdmBiSubpackagerelationService extends IService<PdmBiSubpackagerelation> {
|
||||
|
||||
/**
|
||||
* @param query /
|
||||
* @param page /
|
||||
* @return /
|
||||
*/
|
||||
Object pageQuery(SubPackageQuery query, PageQuery page);
|
||||
}
|
||||
@@ -0,0 +1,256 @@
|
||||
package org.nl.wms.pdm.subpackage.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 子卷包装关系表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("pdm_bi_subpackagerelation")
|
||||
public class PdmBiSubpackagerelation implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 子卷包装标识
|
||||
*/
|
||||
private String workorder_id;
|
||||
|
||||
/**
|
||||
* 木箱唯一码
|
||||
*/
|
||||
private String package_box_sn;
|
||||
|
||||
/**
|
||||
* 箱内子卷数量
|
||||
*/
|
||||
private BigDecimal quanlity_in_box;
|
||||
|
||||
/**
|
||||
* 木箱自身重量
|
||||
*/
|
||||
private BigDecimal box_weight;
|
||||
|
||||
/**
|
||||
* 保质期
|
||||
*/
|
||||
private String quality_guaran_period;
|
||||
|
||||
/**
|
||||
* 销售订单及行号
|
||||
*/
|
||||
private String sale_order_name;
|
||||
|
||||
/**
|
||||
* 客户编号
|
||||
*/
|
||||
private String customer_name;
|
||||
|
||||
/**
|
||||
* 客户名称
|
||||
*/
|
||||
private String customer_description;
|
||||
|
||||
/**
|
||||
* 产品编码
|
||||
*/
|
||||
private String product_name;
|
||||
|
||||
/**
|
||||
* 产品描述
|
||||
*/
|
||||
private String product_description;
|
||||
|
||||
/**
|
||||
* 入库日期
|
||||
*/
|
||||
private String date_of_FG_inbound;
|
||||
|
||||
/**
|
||||
* 子卷号
|
||||
*/
|
||||
private String container_name;
|
||||
|
||||
/**
|
||||
* 产品规格(幅宽)
|
||||
*/
|
||||
private String width;
|
||||
|
||||
/**
|
||||
* 产品厚度
|
||||
*/
|
||||
private String thickness;
|
||||
|
||||
/**
|
||||
* 单位面积质量
|
||||
*/
|
||||
private BigDecimal mass_per_unit_area;
|
||||
|
||||
/**
|
||||
* 净重
|
||||
*/
|
||||
private BigDecimal net_weight;
|
||||
|
||||
/**
|
||||
* 长度
|
||||
*/
|
||||
private BigDecimal length;
|
||||
|
||||
/**
|
||||
* 制造完成日期
|
||||
*/
|
||||
private String date_of_production;
|
||||
|
||||
/**
|
||||
* 计划外分切的子卷
|
||||
*/
|
||||
private Boolean is_un_plan_production;
|
||||
|
||||
/**
|
||||
* 子卷的物性值1
|
||||
*/
|
||||
private String un_plan_product_property1;
|
||||
|
||||
/**
|
||||
* 子卷的物性值2
|
||||
*/
|
||||
private String un_plan_product_property2;
|
||||
|
||||
/**
|
||||
* 子卷的物性值3
|
||||
*/
|
||||
private String un_plan_product_property3;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_id;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 是否需要重打外包装标签
|
||||
*/
|
||||
private Boolean isRePrintPackageBoxLabel;
|
||||
|
||||
/**
|
||||
* 是否需要拆包重打子卷标签
|
||||
*/
|
||||
private Boolean isUnPackBox;
|
||||
|
||||
/**
|
||||
* 木箱料号
|
||||
*/
|
||||
private String box_type;
|
||||
|
||||
/**
|
||||
* SAP批次
|
||||
*/
|
||||
private String sap_pcsn;
|
||||
|
||||
/**
|
||||
* 交货单号
|
||||
*/
|
||||
private String vbeln;
|
||||
|
||||
/**
|
||||
* 交货单行号
|
||||
*/
|
||||
private String posnr;
|
||||
|
||||
/**
|
||||
* 木箱长度
|
||||
*/
|
||||
private String box_length;
|
||||
|
||||
/**
|
||||
* 木箱宽度
|
||||
*/
|
||||
private String box_width;
|
||||
|
||||
/**
|
||||
* 木箱高度
|
||||
*/
|
||||
private String box_high;
|
||||
|
||||
/**
|
||||
* 销售订单描述
|
||||
*/
|
||||
private String sale_order_description;
|
||||
|
||||
/**
|
||||
* 客户要求规格幅宽
|
||||
*/
|
||||
private String width_standard;
|
||||
|
||||
/**
|
||||
* 物料标准厚度
|
||||
*/
|
||||
private String thickness_request;
|
||||
|
||||
/**
|
||||
* 实际木箱自身重量
|
||||
*/
|
||||
private BigDecimal real_weight;
|
||||
|
||||
/**
|
||||
* 包装关系类型
|
||||
*/
|
||||
private String sub_type;
|
||||
|
||||
/**
|
||||
* 客户需求抗拉下限
|
||||
*/
|
||||
private String demand_limit;
|
||||
|
||||
/**
|
||||
* 内控标准抗拉下限
|
||||
*/
|
||||
private String standard_limit;
|
||||
|
||||
/**
|
||||
* 生产实际抗拉值
|
||||
*/
|
||||
private String actual_value;
|
||||
|
||||
/**
|
||||
* 解绑删除标识
|
||||
*/
|
||||
private Boolean need_delete;
|
||||
|
||||
/**
|
||||
* 储存地点
|
||||
*/
|
||||
private String ext_code;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package org.nl.wms.pdm.subpackage.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.pdm.subpackage.service.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.wms.pdm.subpackage.service.dto.SubPackageQuery;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 子卷包装关系表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-14
|
||||
*/
|
||||
public interface PdmBiSubpackagerelationMapper extends BaseMapper<PdmBiSubpackagerelation> {
|
||||
|
||||
List<Map> getPageQuery(@Param("query") SubPackageQuery query, @Param("pageQuery") PageQuery pageQuery);
|
||||
}
|
||||
@@ -0,0 +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.pdm.subpackage.service.dao.mapper.PdmBiSubpackagerelationMapper">
|
||||
|
||||
<select id="getPageQuery" resultType="java.util.Map">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
pdm_bi_subpackagerelation
|
||||
<where>
|
||||
1 = 1
|
||||
|
||||
<if test="query.start_time != null">
|
||||
and create_time >= #{query.start_time}
|
||||
</if>
|
||||
|
||||
<if test="query.end_time != null">
|
||||
and #{query.end_time} >= create_time
|
||||
</if>
|
||||
|
||||
<if test="query.status != null and query.status != ''">
|
||||
and status = #{query.status}
|
||||
</if>
|
||||
|
||||
<if test="query.package_box_sn != null and query.package_box_sn != ''">
|
||||
and package_box_sn LIKE '%${query.package_box_sn}%'
|
||||
</if>
|
||||
|
||||
<if test="query.container_name != null and query.container_name != ''">
|
||||
and container_name LIKE '%${query.container_name}%'
|
||||
</if>
|
||||
|
||||
<if test="query.sap_pcsn != null and query.sap_pcsn != ''">
|
||||
and sap_pcsn LIKE '%${query.sap_pcsn}%'
|
||||
</if>
|
||||
|
||||
<if test="query.customer_name != null and query.customer_name != ''">
|
||||
and customer_name LIKE '%${query.customer_name}%'
|
||||
</if>
|
||||
|
||||
<if test="query.sale_order_name != null and query.sale_order_name != ''">
|
||||
and sale_order_name LIKE '%${query.sale_order_name}%'
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,36 @@
|
||||
package org.nl.wms.pdm.subpackage.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
import org.nl.common.domain.query.QParam;
|
||||
import org.nl.common.enums.QueryTEnum;
|
||||
import org.nl.wms.pdm.subpackage.service.dao.PdmBiSubpackagerelation;
|
||||
|
||||
/*
|
||||
* @author LXY
|
||||
* @Date 2023/11/10 14:49
|
||||
*/
|
||||
@Data
|
||||
public class SubPackageQuery extends BaseQuery<PdmBiSubpackagerelation> {
|
||||
|
||||
|
||||
private String package_box_sn;
|
||||
|
||||
private String sale_order_name;
|
||||
|
||||
private String customer_name;
|
||||
|
||||
private String container_name;
|
||||
|
||||
private String status;
|
||||
|
||||
private String sap_pcsn;
|
||||
|
||||
|
||||
@Override
|
||||
public void paramMapping() {
|
||||
super.doP.put("package_box_sn", QParam.builder().k(new String[]{"package_box_sn"}).type(QueryTEnum.LK).build());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package org.nl.wms.pdm.subpackage.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.nl.common.base.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.pdm.subpackage.service.IPdmBiSubpackagerelationService;
|
||||
import org.nl.wms.pdm.subpackage.service.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.wms.pdm.subpackage.service.dao.mapper.PdmBiSubpackagerelationMapper;
|
||||
import org.nl.wms.pdm.subpackage.service.dto.SubPackageQuery;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 子卷包装关系表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-14
|
||||
*/
|
||||
@Service
|
||||
public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpackagerelationMapper, PdmBiSubpackagerelation> implements IPdmBiSubpackagerelationService {
|
||||
|
||||
@Override
|
||||
public Object pageQuery(SubPackageQuery query, PageQuery pageQuery) {
|
||||
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
page.setOrderBy("package_box_sn DESC");
|
||||
List<Map> mst_detail = this.baseMapper.getPageQuery(query, pageQuery);
|
||||
|
||||
TableDataInfo<Map> build = TableDataInfo.build(mst_detail);
|
||||
build.setTotalElements(page.getTotal());
|
||||
return build;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package org.nl.wms.storage_manage.ios.controller.iostorInv;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.IStIvtIostorinvService;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dto.IostorInvQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 入库单主表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/stIvtIostorinv/inBill")
|
||||
public class StIvtIostorinvController {
|
||||
|
||||
@Autowired
|
||||
private IStIvtIostorinvService iStIvtIostorinvService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询入库单")
|
||||
public ResponseEntity<Object> query(IostorInvQuery query, PageQuery page){
|
||||
return new ResponseEntity<>(iStIvtIostorinvService.pageQuery(query,page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/queryBoxMater")
|
||||
@Log("查询入库单")
|
||||
public ResponseEntity<Object> queryBoxMater(@RequestBody JSONObject whereJson){
|
||||
return new ResponseEntity<>(iStIvtIostorinvService.queryBoxMater(whereJson), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package org.nl.wms.storage_manage.ios.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.config.MapOf;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* @author lxy
|
||||
* @Date 2023/11/14 20:11
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum IOSEnum {
|
||||
//出入库类型
|
||||
IO_TYPE(MapOf.of("入库", "0", "出库", "1","移库", "2")),
|
||||
|
||||
//出入单据状态
|
||||
BILL_STATUS(MapOf.of("生成", "10", "提交", "20","分配中", "30","分配完","40","完成","99")),
|
||||
|
||||
//出入单创建方式
|
||||
CREATE_MODE(MapOf.of("PC产生", "10", "终端产生", "20","外部接口产生", "30")),
|
||||
|
||||
//出入任务执行状态
|
||||
WORK_STATUS(MapOf.of("未生成", "10", "生成", "20","执行中", "30","完成","99")),
|
||||
|
||||
//入库单据类型
|
||||
IN_TYPE(MapOf.of("手工入库", "99")),
|
||||
|
||||
//出库单据类型
|
||||
OUT_TYPE(MapOf.of("手工出库", "99")),
|
||||
;
|
||||
|
||||
private Map<String, String> code;
|
||||
|
||||
public String code(String desc) {
|
||||
String code = this.getCode().get(desc);
|
||||
if (StringUtils.isNotEmpty(code)) {
|
||||
return code;
|
||||
}
|
||||
throw new BadRequestException(this.name() + "对应类型" + desc + "未定义");
|
||||
}
|
||||
|
||||
public String check(String code) {
|
||||
for (Map.Entry<String, String> entry : this.getCode().entrySet()) {
|
||||
if (entry.getValue().equals("code")) {
|
||||
return entry.getValue();
|
||||
}
|
||||
}
|
||||
throw new BadRequestException(this.name() + "对应类型" + code + "未定义");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.nl.wms.storage_manage.ios.service.iostorInv;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dto.IostorInvQuery;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 入库单主表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-10
|
||||
*/
|
||||
public interface IStIvtIostorinvService extends IService<StIvtIostorinv> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param query,page /
|
||||
* @return Object
|
||||
*/
|
||||
Object pageQuery(IostorInvQuery query, PageQuery page);
|
||||
|
||||
/**
|
||||
* 根据箱号查询子卷
|
||||
* @param whereJson 、
|
||||
* @return 、
|
||||
*/
|
||||
JSONArray queryBoxMater(JSONObject whereJson);
|
||||
}
|
||||
@@ -0,0 +1,345 @@
|
||||
package org.nl.wms.storage_manage.ios.service.iostorInv.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 出入库单主表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-10
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("st_ivt_iostorinv")
|
||||
public class StIvtIostorinv implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 出入单标识
|
||||
*/
|
||||
@TableId
|
||||
private String iostorinv_id;
|
||||
|
||||
/**
|
||||
* 单据编号
|
||||
*/
|
||||
private String bill_code;
|
||||
|
||||
/**
|
||||
* 出入类型
|
||||
*/
|
||||
private String io_type;
|
||||
|
||||
/**
|
||||
* 业务类型
|
||||
*/
|
||||
private String buss_type;
|
||||
|
||||
/**
|
||||
* 单据类型
|
||||
*/
|
||||
private String bill_type;
|
||||
|
||||
/**
|
||||
* 业务日期
|
||||
*/
|
||||
private String biz_date;
|
||||
|
||||
/**
|
||||
* 仓库标识
|
||||
*/
|
||||
private String stor_id;
|
||||
|
||||
/**
|
||||
* 仓库编码
|
||||
*/
|
||||
private String stor_code;
|
||||
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
private String stor_name;
|
||||
|
||||
/**
|
||||
* 来源方标识
|
||||
*/
|
||||
private String source_id;
|
||||
|
||||
/**
|
||||
* 来源方名称
|
||||
*/
|
||||
private String source_name;
|
||||
|
||||
/**
|
||||
* 来源方类型
|
||||
*/
|
||||
private String source_type;
|
||||
|
||||
/**
|
||||
* 总数量
|
||||
*/
|
||||
private BigDecimal total_qty;
|
||||
|
||||
/**
|
||||
* 总重量
|
||||
*/
|
||||
private BigDecimal total_weight;
|
||||
|
||||
/**
|
||||
* 明细数
|
||||
*/
|
||||
private BigDecimal detail_count;
|
||||
|
||||
/**
|
||||
* 单据状态
|
||||
*/
|
||||
private String bill_status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 生成方式
|
||||
*/
|
||||
private String create_mode;
|
||||
|
||||
/**
|
||||
* 制单人
|
||||
*/
|
||||
private String input_optid;
|
||||
|
||||
/**
|
||||
* 制单人姓名
|
||||
*/
|
||||
private String input_optname;
|
||||
|
||||
/**
|
||||
* 制单时间
|
||||
*/
|
||||
private String input_time;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_optid;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String update_optname;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 分配人
|
||||
*/
|
||||
private String dis_optid;
|
||||
|
||||
/**
|
||||
* 分配人姓名
|
||||
*/
|
||||
private String dis_optname;
|
||||
|
||||
/**
|
||||
* 分配时间
|
||||
*/
|
||||
private String dis_time;
|
||||
|
||||
/**
|
||||
* 确认人
|
||||
*/
|
||||
private String confirm_optid;
|
||||
|
||||
/**
|
||||
* 确认人姓名
|
||||
*/
|
||||
private String confirm_optname;
|
||||
|
||||
/**
|
||||
* 确认时间
|
||||
*/
|
||||
private String confirm_time;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private String sysdeptid;
|
||||
|
||||
/**
|
||||
* 公司ID
|
||||
*/
|
||||
private String syscompanyid;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Boolean is_delete;
|
||||
|
||||
/**
|
||||
* 是否已上传
|
||||
*/
|
||||
private Boolean is_upload;
|
||||
|
||||
/**
|
||||
* 回传人
|
||||
*/
|
||||
private String upload_optid;
|
||||
|
||||
/**
|
||||
* 回传时间
|
||||
*/
|
||||
private String upload_time;
|
||||
|
||||
/**
|
||||
* 是否冲销
|
||||
*/
|
||||
private Boolean is_writeoff;
|
||||
|
||||
/**
|
||||
* 冲销人
|
||||
*/
|
||||
private String writeoff_optid;
|
||||
|
||||
/**
|
||||
* 冲销时间
|
||||
*/
|
||||
private String writeoff_time;
|
||||
|
||||
/**
|
||||
* 收货单位
|
||||
*/
|
||||
private String consignee;
|
||||
|
||||
/**
|
||||
* 收货人
|
||||
*/
|
||||
private String receiver;
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
private String receiptaddress;
|
||||
|
||||
/**
|
||||
* 收货人联系电话
|
||||
*/
|
||||
private String receiptphone;
|
||||
|
||||
/**
|
||||
* 物流公司
|
||||
*/
|
||||
private String logisticscompany;
|
||||
|
||||
/**
|
||||
* 司机
|
||||
*/
|
||||
private String drivername;
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String carno;
|
||||
|
||||
/**
|
||||
* 司机联系电话
|
||||
*/
|
||||
private String driverphone;
|
||||
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
private String contractno;
|
||||
|
||||
/**
|
||||
* 送货单位
|
||||
*/
|
||||
private String deliveryunit;
|
||||
|
||||
/**
|
||||
* 送货方地址
|
||||
*/
|
||||
private String deliveryaddress;
|
||||
|
||||
/**
|
||||
* 送货方联系人
|
||||
*/
|
||||
private String deliveryname;
|
||||
|
||||
/**
|
||||
* 送货联系电话
|
||||
*/
|
||||
private String deliveryphone;
|
||||
|
||||
/**
|
||||
* 物流公司编码
|
||||
*/
|
||||
private String trans_code;
|
||||
|
||||
/**
|
||||
* 预估运费
|
||||
*/
|
||||
private BigDecimal estimated_freight;
|
||||
|
||||
/**
|
||||
* 客户编码
|
||||
*/
|
||||
private String cust_code;
|
||||
|
||||
/**
|
||||
* 移入仓库标识
|
||||
*/
|
||||
private String out_stor_id;
|
||||
|
||||
/**
|
||||
* 回传MES
|
||||
*/
|
||||
private Boolean upload_mes;
|
||||
|
||||
/**
|
||||
* 回传SAP
|
||||
*/
|
||||
private Boolean upload_sap;
|
||||
|
||||
/**
|
||||
* 运转费
|
||||
*/
|
||||
private BigDecimal run_freight;
|
||||
|
||||
/**
|
||||
* 卸车费
|
||||
*/
|
||||
private BigDecimal unload_freight;
|
||||
|
||||
/**
|
||||
* 其他费用
|
||||
*/
|
||||
private BigDecimal other_freight;
|
||||
|
||||
/**
|
||||
* 运单号
|
||||
*/
|
||||
private String order_number;
|
||||
|
||||
/**
|
||||
* 车型
|
||||
*/
|
||||
private String car_type;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package org.nl.wms.storage_manage.ios.service.iostorInv.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dto.IostorInvQuery;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 出入库单主表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-10
|
||||
*/
|
||||
public interface StIvtIostorinvMapper extends BaseMapper<StIvtIostorinv> {
|
||||
|
||||
List<Map> getPageQuery(@Param("query") IostorInvQuery query, @Param("pageQuery") PageQuery pageQuery);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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.storage_manage.ios.service.iostorInv.dao.mapper.StIvtIostorinvMapper">
|
||||
|
||||
<select id="getPageQuery" resultType="java.util.Map">
|
||||
SELECT
|
||||
mst.*
|
||||
FROM
|
||||
st_ivt_iostorinv mst
|
||||
<where>
|
||||
mst.is_delete = '0'
|
||||
AND
|
||||
io_type = '0'
|
||||
|
||||
<if test="query.start_time != null">
|
||||
and mst.create_time >= #{query.start_time}
|
||||
</if>
|
||||
<if test="query.end_time != null">
|
||||
and #{query.end_time} >= mst.create_time
|
||||
</if>
|
||||
<if test="query.stor_id != null and query.stor_id != ''">
|
||||
and mst.stor_id = #{query.stor_id}
|
||||
</if>
|
||||
<if test="query.bill_status != null and query.bill_status != ''">
|
||||
and mst.bill_status = #{query.bill_status}
|
||||
</if>
|
||||
<if test="query.bill_type != null and query.bill_type != ''">
|
||||
and mst.bill_type = #{query.bill_type}
|
||||
</if>
|
||||
<if test="query.bill_code != null and query.bill_code != ''">
|
||||
and mst.bill_code = #{query.bill_code}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,36 @@
|
||||
package org.nl.wms.storage_manage.ios.service.iostorInv.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
import org.nl.common.domain.query.QParam;
|
||||
import org.nl.common.enums.QueryTEnum;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||
|
||||
/*
|
||||
* @author LXY
|
||||
* @Date 2023/11/10 14:49
|
||||
*/
|
||||
@Data
|
||||
public class IostorInvQuery extends BaseQuery<StIvtIostorinv> {
|
||||
|
||||
|
||||
private String stor_id;
|
||||
|
||||
private String bill_status;
|
||||
|
||||
private String bill_type;
|
||||
|
||||
private String bill_code;
|
||||
|
||||
private String io_type;
|
||||
|
||||
private Boolean is_delete = false;
|
||||
|
||||
|
||||
@Override
|
||||
public void paramMapping() {
|
||||
super.doP.put("bill_code", QParam.builder().k(new String[]{"bill_code"}).type(QueryTEnum.LK).build());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package org.nl.wms.storage_manage.ios.service.iostorInv.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import oracle.sql.ROWID;
|
||||
import org.nl.common.base.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.pdm.subpackage.service.IPdmBiSubpackagerelationService;
|
||||
import org.nl.wms.pdm.subpackage.service.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.IStIvtIostorinvService;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dao.mapper.StIvtIostorinvMapper;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dto.IostorInvQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 出入库单主表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-10
|
||||
*/
|
||||
@Service
|
||||
public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper, StIvtIostorinv> implements IStIvtIostorinvService {
|
||||
|
||||
@Autowired
|
||||
private IPdmBiSubpackagerelationService iPdmBiSubpackagerelationService; // 子卷包装关系服务
|
||||
|
||||
@Override
|
||||
public Object pageQuery(IostorInvQuery query, PageQuery pageQuery) {
|
||||
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
page.setOrderBy("create_time DESC");
|
||||
List<Map> mst_detail = this.baseMapper.getPageQuery(query, pageQuery);
|
||||
|
||||
TableDataInfo<Map> build = TableDataInfo.build(mst_detail);
|
||||
build.setTotalElements(page.getTotal());
|
||||
return build;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray queryBoxMater(JSONObject whereJson) {
|
||||
JSONArray data = whereJson.getJSONArray("data");
|
||||
|
||||
List<PdmBiSubpackagerelation> resultList = iPdmBiSubpackagerelationService.list(
|
||||
new QueryWrapper<PdmBiSubpackagerelation>().lambda()
|
||||
.in(PdmBiSubpackagerelation::getPackage_box_sn,
|
||||
data.stream()
|
||||
.map(row -> JSON.parseObject(JSONObject.toJSONString(row)))
|
||||
.map(row -> row.getString("package_box_sn"))
|
||||
.collect(Collectors.toSet())
|
||||
)
|
||||
.orderByAsc(PdmBiSubpackagerelation::getPackage_box_sn)
|
||||
);
|
||||
|
||||
return JSONArray.parseArray(JSONObject.toJSONString(resultList));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user