修改了质检物料的相关接口
This commit is contained in:
parent
265fd6c54f
commit
8c9ebde6d3
|
|
@ -20,6 +20,11 @@ import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质检物料入库单
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("qc")
|
@RequestMapping("qc")
|
||||||
public class QCReceiptController {
|
public class QCReceiptController {
|
||||||
|
|
@ -33,12 +38,23 @@ public class QCReceiptController {
|
||||||
@Resource
|
@Resource
|
||||||
private SrmMaterialReceiptScanCodesRepository srmMaterialReceiptCanCodesRepository;
|
private SrmMaterialReceiptScanCodesRepository srmMaterialReceiptCanCodesRepository;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质检物料入库单列表
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@PostMapping("search")
|
@PostMapping("search")
|
||||||
@ApiMark(moduleName = "质检物料入库单", apiName = "入库列表")
|
@ApiMark(moduleName = "质检物料入库单", apiName = "入库列表")
|
||||||
public ApiResult<PageData<QCReceiptVO>> search(@Valid @RequestBody QCReceiptQO request) {
|
public ApiResult<PageData<QCReceiptVO>> search(@Valid @RequestBody QCReceiptQO request) {
|
||||||
return ApiResult.success(qcReceiveService.search(request));
|
return ApiResult.success(qcReceiveService.search(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质检物料入库单详情
|
||||||
|
* @param inId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@GetMapping("getItems")
|
@GetMapping("getItems")
|
||||||
@ApiMark(moduleName = "质检物料入库单", apiName = "入库详情")
|
@ApiMark(moduleName = "质检物料入库单", apiName = "入库详情")
|
||||||
public ApiResult<List<QCReceiveTaskItemVO>> search(@RequestParam Long inId) {
|
public ApiResult<List<QCReceiveTaskItemVO>> search(@RequestParam Long inId) {
|
||||||
|
|
@ -46,6 +62,11 @@ public class QCReceiptController {
|
||||||
.lambdaQuery().eq(WmsQcReceiveItem::getReceiveId, inId).list()));
|
.lambdaQuery().eq(WmsQcReceiveItem::getReceiveId, inId).list()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质检物料入库单扫码详情
|
||||||
|
* @param orderItemId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@GetMapping("getScanCodes")
|
@GetMapping("getScanCodes")
|
||||||
@ApiMark(moduleName = "质检物料入库单", apiName = "获取扫码的详情信息")
|
@ApiMark(moduleName = "质检物料入库单", apiName = "获取扫码的详情信息")
|
||||||
public ApiResult<List<PDAScanCodeVO>> getScanCodes(@RequestParam String orderItemId) {
|
public ApiResult<List<PDAScanCodeVO>> getScanCodes(@RequestParam String orderItemId) {
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,11 @@ import cn.hutool.core.date.DateTime;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class QCReceiptQO extends PageQO {
|
public class QCReceiptQO extends SearchBaseQO {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 送货单号
|
* 送货单号
|
||||||
|
|
@ -26,22 +28,30 @@ public class QCReceiptQO extends PageQO {
|
||||||
/**
|
/**
|
||||||
* 送货开始时间
|
* 送货开始时间
|
||||||
*/
|
*/
|
||||||
private DateTime deliveryStartDate;
|
private LocalDate deliveryStartDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 送货结束时间
|
* 送货结束时间
|
||||||
*/
|
*/
|
||||||
private DateTime deliveryEndDate;
|
private LocalDate deliveryEndDate;
|
||||||
|
|
||||||
|
public LocalDate getDeliveryEndDate() {
|
||||||
|
return deliveryEndDate == null ? null : deliveryEndDate.plusDays(1);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 收货开始时间
|
* 收货开始时间
|
||||||
*/
|
*/
|
||||||
private DateTime receiveStartDate;
|
private LocalDate receiveStartDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 收货结束时间
|
* 收货结束时间
|
||||||
*/
|
*/
|
||||||
private DateTime receiveEndDate;
|
private LocalDate receiveEndDate;
|
||||||
|
|
||||||
|
public LocalDate getReceiveEndDate() {
|
||||||
|
return receiveEndDate == null ? null : receiveEndDate.plusDays(1);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入库单号
|
* 入库单号
|
||||||
|
|
|
||||||
|
|
@ -121,15 +121,4 @@ public class QCReceiveTaskItemVO {
|
||||||
*/
|
*/
|
||||||
private String materialDocYear;
|
private String materialDocYear;
|
||||||
|
|
||||||
/**
|
|
||||||
* 入库时间
|
|
||||||
*/
|
|
||||||
private LocalDateTime updateTime;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 入库人姓名
|
|
||||||
*/
|
|
||||||
private String updateUserName;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -141,19 +141,4 @@ public class WmsQcReceiveItem implements Serializable {
|
||||||
* 物料年度凭证
|
* 物料年度凭证
|
||||||
*/
|
*/
|
||||||
private String materialDocYear;
|
private String materialDocYear;
|
||||||
|
|
||||||
/**
|
|
||||||
* 入库时间
|
|
||||||
*/
|
|
||||||
private LocalDateTime updateTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 入库人ID
|
|
||||||
*/
|
|
||||||
private Long updateUserId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 入库人姓名
|
|
||||||
*/
|
|
||||||
private String updateUserName;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.nflg.wms.repository.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.nflg.wms.common.pojo.qo.QCReceiptQO;
|
import com.nflg.wms.common.pojo.qo.QCReceiptQO;
|
||||||
import com.nflg.wms.common.pojo.vo.QCReceiptVO;
|
import com.nflg.wms.common.pojo.vo.QCReceiptVO;
|
||||||
import com.nflg.wms.common.pojo.vo.QCTaskVO;
|
import com.nflg.wms.common.pojo.vo.QCTaskVO;
|
||||||
|
|
@ -21,5 +22,5 @@ public interface WmsQcReceiveMapper extends BaseMapper<WmsQcReceive> {
|
||||||
|
|
||||||
List<QCTaskVO> getTasks(String orderNo);
|
List<QCTaskVO> getTasks(String orderNo);
|
||||||
|
|
||||||
IPage<QCReceiptVO> search(QCReceiptQO request);
|
IPage<QCReceiptVO> search(QCReceiptQO request, Page<Object> objectPage);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.nflg.wms.repository.service.impl;
|
package com.nflg.wms.repository.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.nflg.wms.common.pojo.PageData;
|
import com.nflg.wms.common.pojo.PageData;
|
||||||
import com.nflg.wms.common.pojo.qo.QCReceiptQO;
|
import com.nflg.wms.common.pojo.qo.QCReceiptQO;
|
||||||
import com.nflg.wms.common.pojo.vo.POReceiptVO;
|
import com.nflg.wms.common.pojo.vo.POReceiptVO;
|
||||||
|
|
@ -32,7 +33,7 @@ public class WmsQcReceiveServiceImpl extends ServiceImpl<WmsQcReceiveMapper, Wms
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<QCReceiptVO> search(QCReceiptQO request) {
|
public IPage<QCReceiptVO> search(QCReceiptQO request) {
|
||||||
return baseMapper.search(request);
|
return baseMapper.search(request, new Page<>(request.getPage(), request.getPageSize()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,46 +19,35 @@
|
||||||
wms_srm_order b on a.order_no=b.note_num
|
wms_srm_order b on a.order_no=b.note_num
|
||||||
left join user_supplier c on b.supplier_num=c.supplier_code
|
left join user_supplier c on b.supplier_num=c.supplier_code
|
||||||
<where>
|
<where>
|
||||||
<if test="request.inNum !=null and request.inNum !='' ">
|
<if test="request.inNum !=null and request.inNum !=''">
|
||||||
and a.in_num like concat('%', #{request.inNum}, '%')
|
and a.in_num like concat('%', #{request.inNum}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.orderNo !=null and request.orderNo !=''">
|
||||||
<if test="request.orderNo !=null and request.orderNo !='' ">
|
|
||||||
and b.note_num like concat('%', #{request.orderNo}, '%')
|
and b.note_num like concat('%', #{request.orderNo}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.supplierNum !=null and request.supplierNum !=''">
|
||||||
<if test="request.supplierNum !=null and request.supplierNum !='' ">
|
and b.supplier_num = #{request.supplierNum}
|
||||||
and b.supplier_num =#{request.supplierNum}
|
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|
||||||
<if test="request.receiveStartDate !=null">
|
<if test="request.receiveStartDate !=null">
|
||||||
and a.create_time >= #{request.receiveStartDate}
|
and a.create_time >= #{request.receiveStartDate}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="request.receiveEndDate !=null">
|
<if test="request.receiveEndDate !=null">
|
||||||
and a.create_time <= #{request.receiveEndDate}
|
and a.create_time <= #{request.receiveEndDate}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="request.deliveryStartDate !=null">
|
<if test="request.deliveryStartDate !=null">
|
||||||
and b.delivery_note_date >=
|
and b.delivery_note_date >=
|
||||||
#{request.deliveryStartDate, jdbcType=TIMESTAMP, javaType=java.time.LocalDate, typeHandler=org.apache.ibatis.type.LocalDateTypeHandler}
|
#{request.deliveryStartDate}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="request.deliveryEndDate !=null">
|
<if test="request.deliveryEndDate !=null">
|
||||||
and b.delivery_note_date <=
|
and b.delivery_note_date <=
|
||||||
#{request.deliveryEndDate, jdbcType=TIMESTAMP, javaType=java.time.LocalDate, typeHandler=org.apache.ibatis.type.LocalDateTypeHandler}
|
#{request.deliveryEndDate}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|
||||||
<if test="request.inStartDate !=null">
|
<if test="request.inStartDate !=null">
|
||||||
and a.update_time >= #{request.inStartDate}
|
and a.update_time >= #{request.inStartDate}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="request.inEndDate !=null">
|
<if test="request.inEndDate !=null">
|
||||||
and a.update_time <= #{request.inEndDate}
|
and a.update_time <= #{request.inEndDate}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
order by a.create_time desc
|
order by a.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -41,38 +41,27 @@
|
||||||
wms_srm_order b on a.order_no = b.note_num
|
wms_srm_order b on a.order_no = b.note_num
|
||||||
left join user_supplier c on b.supplier_num = c.supplier_code
|
left join user_supplier c on b.supplier_num = c.supplier_code
|
||||||
<where>
|
<where>
|
||||||
<if test="request.inNum !=null and request.inNum !='' ">
|
<if test="request.inNum !=null and request.inNum !=''">
|
||||||
and a.in_num like concat('%', #{request.inNum}, '%')
|
and a.in_no like concat('%', #{request.inNum}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.orderNo !=null and request.orderNo !=''">
|
||||||
<if test="request.orderNo !=null and request.orderNo !='' ">
|
|
||||||
and b.note_num like concat('%', #{request.orderNo}, '%')
|
and b.note_num like concat('%', #{request.orderNo}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.supplierNum !=null and request.supplierNum !=''">
|
||||||
<if test="request.supplierNum !=null and request.supplierNum !='' ">
|
|
||||||
and b.supplier_num =#{request.supplierNum}
|
and b.supplier_num =#{request.supplierNum}
|
||||||
</if>
|
</if>
|
||||||
<if test="request.itemCode !=null and request.itemCode !='' ">
|
<if test="request.receiveStartDate !=null">
|
||||||
and EXISTS (select 1 from wms_srm_order_item where a.id=wms_srm_order_item.order_id and
|
|
||||||
wms_srm_order_item.item_code like concat('%', #{request.itemCode}, '%')
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<if test="request.receiveStartDate !=null and request.receiveStartDate !='' ">
|
|
||||||
and a.create_time >= #{request.receiveStartDate}
|
and a.create_time >= #{request.receiveStartDate}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.receiveEndDate !=null">
|
||||||
<if test="request.receiveEndDate !=null and request.receiveEndDate !='' ">
|
|
||||||
and a.create_time < #{request.receiveEndDate}
|
and a.create_time < #{request.receiveEndDate}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.deliveryStartDate !=null">
|
||||||
<if test="request.deliveryStartDate !=null and request.deliveryStartDate !='' ">
|
and b.delivery_note_date >= #{request.deliveryStartDate}
|
||||||
and a.delivery_note_date >= #{request.deliveryStartDate}
|
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.deliveryEndDate !=null">
|
||||||
<if test="request.deliveryEndDate !=null and request.deliveryEndDate !='' ">
|
and b.delivery_note_date < #{request.deliveryEndDate}
|
||||||
and a.delivery_note_date < #{request.deliveryEndDate}
|
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
order by a.create_time desc
|
order by a.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue