psh
6 months ago
9 changed files with 327 additions and 13 deletions
@ -0,0 +1,38 @@ |
|||
package org.nl.wms.sch.data.controller; |
|||
|
|||
|
|||
import org.nl.wms.sch.data.service.MaterialDataService; |
|||
import org.nl.wms.sch.data.service.dto.MaterialDataDto; |
|||
import org.springframework.data.domain.Pageable; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.http.HttpStatus; |
|||
import org.springframework.http.ResponseEntity; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import io.swagger.annotations.*; |
|||
import java.io.IOException; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.Map; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
|
|||
/** |
|||
* @author psh |
|||
* @date 2024-05-17 |
|||
**/ |
|||
@RestController |
|||
@RequiredArgsConstructor |
|||
@Api(tags = "data管理") |
|||
@RequestMapping("/api/materialData") |
|||
@Slf4j |
|||
public class MaterialDataController { |
|||
|
|||
private final MaterialDataService materialDataService; |
|||
|
|||
@GetMapping |
|||
@ApiOperation("查询data") |
|||
//@PreAuthorize("@el.check('materialData:list')")
|
|||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page){ |
|||
return new ResponseEntity<>(materialDataService.queryAll(whereJson,page),HttpStatus.OK); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,28 @@ |
|||
package org.nl.wms.sch.data.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import org.nl.wms.sch.data.service.dto.MaterialDataDto; |
|||
import org.nl.wms.sch.material.service.dao.Material; |
|||
import org.springframework.data.domain.Pageable; |
|||
import java.util.Map; |
|||
import java.util.List; |
|||
import java.io.IOException; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
|
|||
/** |
|||
* @description 服务接口 |
|||
* @author psh |
|||
* @date 2024-05-17 |
|||
**/ |
|||
public interface MaterialDataService extends IService<MaterialDataDto> { |
|||
|
|||
/** |
|||
* 查询数据分页 |
|||
* @param whereJson 条件 |
|||
* @param page 分页参数 |
|||
* @return Map<String,Object> |
|||
*/ |
|||
Map<String,Object> queryAll(Map whereJson, Pageable page); |
|||
|
|||
|
|||
} |
@ -0,0 +1,13 @@ |
|||
package org.nl.wms.sch.data.service.dao.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.nl.wms.sch.data.service.dto.MaterialDataDto; |
|||
import org.nl.wms.sch.material.service.dao.Material; |
|||
|
|||
/** |
|||
* @author lyd |
|||
* @date 2023-05-16 |
|||
**/ |
|||
public interface MaterialDataMapper extends BaseMapper<MaterialDataDto> { |
|||
|
|||
} |
@ -0,0 +1,48 @@ |
|||
package org.nl.wms.sch.data.service.dto; |
|||
|
|||
import lombok.Data; |
|||
import java.sql.Timestamp; |
|||
import java.math.BigDecimal; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @description / |
|||
* @author psh |
|||
* @date 2024-05-17 |
|||
**/ |
|||
@Data |
|||
public class MaterialDataDto implements Serializable { |
|||
|
|||
/** 客户编码 */ |
|||
private String supplierCode; |
|||
|
|||
/** 客户名称 */ |
|||
private String supplierName; |
|||
|
|||
/** 物料编码 */ |
|||
private String productName; |
|||
|
|||
/** 规格 */ |
|||
private String specification; |
|||
|
|||
/** 来料批次 */ |
|||
private String batch; |
|||
|
|||
/** 棒源等级 */ |
|||
private String barLevel; |
|||
|
|||
/** 领料批次 */ |
|||
private String pickingBatch; |
|||
|
|||
/** 长度 */ |
|||
private BigDecimal length; |
|||
|
|||
/** 重量 */ |
|||
private BigDecimal weight; |
|||
|
|||
/** 日期 */ |
|||
private Timestamp createTime; |
|||
|
|||
/** 操作类型,1-来料,2-领料 */ |
|||
private Integer type; |
|||
} |
@ -0,0 +1,70 @@ |
|||
package org.nl.wms.sch.data.service.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.sql.Timestamp; |
|||
|
|||
/** |
|||
* @description / |
|||
* @author psh |
|||
* @date 2024-05-17 |
|||
**/ |
|||
@Data |
|||
public class MaterialDataQuery implements Serializable { |
|||
|
|||
/** 客户编码 */ |
|||
private String supplierCode; |
|||
|
|||
/** 客户名称 */ |
|||
private String supplierName; |
|||
|
|||
/** 物料编码 */ |
|||
private String productName; |
|||
|
|||
/** 规格 */ |
|||
private String specification; |
|||
|
|||
/** 来料批次 */ |
|||
private String batch; |
|||
|
|||
/** 棒源等级 */ |
|||
private String barLevel; |
|||
|
|||
/** 领料批次 */ |
|||
private String pickingBatch; |
|||
|
|||
/** 长度 */ |
|||
private BigDecimal length; |
|||
|
|||
/** 重量 */ |
|||
private BigDecimal weight; |
|||
|
|||
/** 日期 */ |
|||
private Timestamp createTime; |
|||
|
|||
/** 上月长度 */ |
|||
private BigDecimal sy_length; |
|||
|
|||
/** 上月重量 */ |
|||
private BigDecimal sy_weight; |
|||
|
|||
/** 来料长度 */ |
|||
private BigDecimal ll_length; |
|||
|
|||
/** 来料重量 */ |
|||
private BigDecimal ll_weight; |
|||
|
|||
/** 生产长度 */ |
|||
private BigDecimal sc_length; |
|||
|
|||
/** 生产重量 */ |
|||
private BigDecimal sc_weight; |
|||
|
|||
/** 结存长度 */ |
|||
private BigDecimal jc_length; |
|||
|
|||
/** 结存重量 */ |
|||
private BigDecimal jc_weight; |
|||
} |
@ -0,0 +1,44 @@ |
|||
package org.nl.wms.sch.data.service.impl; |
|||
|
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.nl.common.exception.BadRequestException; |
|||
import org.nl.wms.sch.data.service.MaterialDataService; |
|||
import org.nl.wms.sch.data.service.dao.mapper.MaterialDataMapper; |
|||
import org.nl.wms.sch.data.service.dto.MaterialDataDto; |
|||
import org.nl.wms.sch.material.service.dao.Material; |
|||
import org.nl.wms.sch.material.service.dao.mapper.MaterialMapper; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import org.springframework.data.domain.Pageable; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
import cn.hutool.core.date.DateUtil; |
|||
import cn.hutool.core.util.IdUtil; |
|||
import com.alibaba.fastjson.JSONArray; |
|||
import com.alibaba.fastjson.JSONObject; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import cn.hutool.core.util.ObjectUtil; |
|||
|
|||
/** |
|||
* @description 服务实现 |
|||
* @author psh |
|||
* @date 2024-05-17 |
|||
**/ |
|||
@Service |
|||
@RequiredArgsConstructor |
|||
@Slf4j |
|||
public class MaterialDataServiceImpl extends ServiceImpl<MaterialDataMapper, MaterialDataDto> implements MaterialDataService { |
|||
|
|||
@Override |
|||
public Map<String,Object> queryAll(Map whereJson, Pageable page){ |
|||
//todo
|
|||
return new HashMap<>(); |
|||
} |
|||
|
|||
} |
Loading…
Reference in new issue