This commit is contained in:
@@ -16,6 +16,7 @@ import tech.riemann.ims.dto.request.ReviewDTO;
|
||||
import tech.riemann.ims.dto.response.ApplyDTO;
|
||||
import tech.riemann.ims.dto.response.ComparisonResDTO;
|
||||
import tech.riemann.ims.dto.response.StockDetailInfo;
|
||||
import tech.riemann.ims.dto.response.WaitScanInfo;
|
||||
import tech.riemann.ims.entity.material.*;
|
||||
import tech.riemann.ims.enums.*;
|
||||
import tech.riemann.ims.service.material.*;
|
||||
@@ -179,6 +180,12 @@ public class ApplyFormController {
|
||||
.build()));
|
||||
}
|
||||
|
||||
@GetMapping("wait-scan-data/{applyId}")
|
||||
@Operation(summary = "获取盘点的待扫码信息")
|
||||
public List<WaitScanInfo> getWaitScanData(@Parameter(description = "申请单ID") @PathVariable(name = "applyId") Long applyId){
|
||||
return applyDetailService.getWaitScanData(applyId);
|
||||
}
|
||||
|
||||
@PostMapping("scan-data/{applyId}")
|
||||
@Operation(summary = "提交盘点扫码数据")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package tech.riemann.ims.dto.response;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author mayong
|
||||
* @since 2024/12/11 14:07
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class WaitScanInfo {
|
||||
|
||||
@Schema(description = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料数量")
|
||||
private Integer count;
|
||||
}
|
||||
@@ -1,11 +1,16 @@
|
||||
package tech.riemann.ims.mapper.material;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tech.riemann.ims.dto.response.WaitScanInfo;
|
||||
import tech.riemann.ims.entity.material.ApplyDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author mayong
|
||||
* @since 2024/11/28 15:38
|
||||
*/
|
||||
public interface ApplyDetailMapper extends BaseMapper<ApplyDetail> {
|
||||
List<WaitScanInfo> getWaitScanData(@Param("applyId") Long applyId);
|
||||
}
|
||||
|
||||
@@ -2,11 +2,16 @@ package tech.riemann.ims.service.material;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nutz.spring.boot.service.interfaces.IdNameEntityService;
|
||||
import tech.riemann.ims.dto.response.WaitScanInfo;
|
||||
import tech.riemann.ims.entity.material.ApplyDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author mayong
|
||||
* @since 2024/11/28 15:41
|
||||
*/
|
||||
public interface IApplyDetailService extends IService<ApplyDetail>, IdNameEntityService<ApplyDetail> {
|
||||
|
||||
List<WaitScanInfo> getWaitScanData(Long applyId);
|
||||
}
|
||||
|
||||
@@ -4,10 +4,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tech.riemann.ims.dto.response.WaitScanInfo;
|
||||
import tech.riemann.ims.entity.material.ApplyDetail;
|
||||
import tech.riemann.ims.mapper.material.ApplyDetailMapper;
|
||||
import tech.riemann.ims.service.material.IApplyDetailService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author mayong
|
||||
* @since 2024/11/28 15:36
|
||||
@@ -22,4 +25,9 @@ public class ApplyDetailServiceImpl extends ServiceImpl<ApplyDetailMapper, Apply
|
||||
public Dao dao() {
|
||||
return dao;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WaitScanInfo> getWaitScanData(Long applyId) {
|
||||
return baseMapper.getWaitScanData(applyId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,10 +110,10 @@ springdoc:
|
||||
customer:
|
||||
theme: feeling-blue
|
||||
title: 库管系统
|
||||
url: https://www.riemann.tech
|
||||
url: https://ims.riemann.tech
|
||||
config-url: /v3/api-docs/swagger-config
|
||||
server:
|
||||
url: http://localhost:7777
|
||||
url: http://localhost:8888
|
||||
description: 物料库存管理系统
|
||||
info:
|
||||
title: 库管系统
|
||||
@@ -126,7 +126,7 @@ springdoc:
|
||||
contact:
|
||||
email: product@ipmt.online
|
||||
name: ETP
|
||||
url: https://www.riemann.tech
|
||||
url: https://ims.riemann.tech
|
||||
swagger-ui:
|
||||
enabled: true
|
||||
group-configs:
|
||||
|
||||
20
src/main/resources/mapper/ApplyDetailMapper.xml
Normal file
20
src/main/resources/mapper/ApplyDetailMapper.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="tech.riemann.ims.mapper.material.ApplyDetailMapper">
|
||||
|
||||
<resultMap id="resultMap" type="tech.riemann.ims.dto.response.WaitScanInfo">
|
||||
<result property="count" column="m_stock" />
|
||||
<result property="materialName" column="m_name" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getWaitScanData" resultMap="resultMap">
|
||||
SELECT
|
||||
m.m_name,
|
||||
m.m_stock
|
||||
FROM
|
||||
t_apply_detail d
|
||||
LEFT JOIN t_material m ON m.id = d.ad_material_id
|
||||
WHERE
|
||||
d.ad_apply_id = #{applyId}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user