mirror of https://github.com/elunez/eladmin
根据outSourceProcessSheetCode模糊查询
parent
df952efdba
commit
a32eac2321
|
@ -18,7 +18,8 @@ import java.util.stream.Collectors;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class JwtUser implements UserDetails {
|
public class JwtUser implements UserDetails {
|
||||||
|
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
|
// TODO userId
|
||||||
private final Long id;
|
private final Long id;
|
||||||
|
|
||||||
private final String username;
|
private final String username;
|
||||||
|
|
|
@ -37,8 +37,8 @@ public class OutSourceInspectionCertificate implements Serializable {
|
||||||
private Boolean status;
|
private Boolean status;
|
||||||
|
|
||||||
// 所属委外加工单
|
// 所属委外加工单
|
||||||
@Column(name = "out_source_process_sheet_id")
|
@Column(name = "out_source_process_sheet_code")
|
||||||
private Long outSourceProcessSheetId;
|
private String outSourceProcessSheetCode;
|
||||||
|
|
||||||
// 制单人
|
// 制单人
|
||||||
@Column(name = "make_people_id")
|
@Column(name = "make_people_id")
|
||||||
|
|
|
@ -18,7 +18,7 @@ public class CreateOutSourceInspectionCertificateRequest implements Serializable
|
||||||
|
|
||||||
|
|
||||||
// 所属委外加工单
|
// 所属委外加工单
|
||||||
private Long outSourceProcessSheetId;
|
private String outSourceProcessSheetCode;
|
||||||
|
|
||||||
// 制单人
|
// 制单人
|
||||||
private Long makePeopleId;
|
private Long makePeopleId;
|
||||||
|
|
|
@ -24,6 +24,8 @@ public class OutSourceInspectionCertificateProductRequest implements Serializabl
|
||||||
|
|
||||||
private String productName;
|
private String productName;
|
||||||
|
|
||||||
|
private Integer productNumber;
|
||||||
|
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
// 合格数量
|
// 合格数量
|
||||||
|
|
|
@ -25,7 +25,7 @@ public class OutSourceInspectionCertificateDTO implements Serializable {
|
||||||
private Boolean status;
|
private Boolean status;
|
||||||
|
|
||||||
// 所属委外加工单
|
// 所属委外加工单
|
||||||
private Long outSourceProcessSheetId;
|
private String outSourceProcessSheetCode;
|
||||||
|
|
||||||
// 制单人
|
// 制单人
|
||||||
private Long makePeopleId;
|
private Long makePeopleId;
|
||||||
|
@ -39,5 +39,5 @@ public class OutSourceInspectionCertificateDTO implements Serializable {
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
// 委外验收单产品信息
|
// 委外验收单产品信息
|
||||||
private List<OutSourceInspectionCertificateProductDTO> outSourceInspectionCertificateDTOList;
|
private List<OutSourceInspectionCertificateProductDTO> outSourceInspectionCertificateProductList;
|
||||||
}
|
}
|
|
@ -1,8 +1,6 @@
|
||||||
package me.zhengjie.modules.wms.outSourceProductSheet.service.dto;
|
package me.zhengjie.modules.wms.outSourceProductSheet.service.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import java.sql.Timestamp;
|
|
||||||
import me.zhengjie.annotation.Query;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author jie
|
* @author jie
|
||||||
|
@ -10,4 +8,7 @@ import me.zhengjie.annotation.Query;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class OutSourceInspectionCertificateQueryCriteria {
|
public class OutSourceInspectionCertificateQueryCriteria {
|
||||||
|
|
||||||
|
// 所属委外加工单
|
||||||
|
private String outSourceProcessSheetCode;
|
||||||
}
|
}
|
|
@ -71,6 +71,13 @@ public class OutSourceInspectionCertificateServiceImpl implements OutSourceInspe
|
||||||
Predicate statusPredicate = criteriaBuilder.equal(root.get("status"), 1);
|
Predicate statusPredicate = criteriaBuilder.equal(root.get("status"), 1);
|
||||||
targetPredicateList.add(statusPredicate);
|
targetPredicateList.add(statusPredicate);
|
||||||
|
|
||||||
|
|
||||||
|
String outSourceProcessSheetCode = criteria.getOutSourceProcessSheetCode();
|
||||||
|
if(!StringUtils.isEmpty(outSourceProcessSheetCode)){
|
||||||
|
Predicate outSourceProcessSheetCodePredicate = criteriaBuilder.like(root.get("outSourceProcessSheetCode"), "%"+ outSourceProcessSheetCode + "%");
|
||||||
|
targetPredicateList.add(outSourceProcessSheetCodePredicate);
|
||||||
|
}
|
||||||
|
|
||||||
if(CollectionUtils.isEmpty(targetPredicateList)){
|
if(CollectionUtils.isEmpty(targetPredicateList)){
|
||||||
return null;
|
return null;
|
||||||
}else{
|
}else{
|
||||||
|
@ -113,7 +120,7 @@ public class OutSourceInspectionCertificateServiceImpl implements OutSourceInspe
|
||||||
List<OutSourceInspectionCertificateProduct> outSourceInspectionCertificateProductList = outSourceInspectionCertificateProductRepository.queryByOutSourceInspectionCertificateIdAndStatusTrue(id);
|
List<OutSourceInspectionCertificateProduct> outSourceInspectionCertificateProductList = outSourceInspectionCertificateProductRepository.queryByOutSourceInspectionCertificateIdAndStatusTrue(id);
|
||||||
if(!CollectionUtils.isEmpty(outSourceInspectionCertificateProductList)){
|
if(!CollectionUtils.isEmpty(outSourceInspectionCertificateProductList)){
|
||||||
List<OutSourceInspectionCertificateProductDTO> outSourceInspectionCertificateProductDTOList = outSourceInspectionCertificateProductMapper.toDto(outSourceInspectionCertificateProductList);
|
List<OutSourceInspectionCertificateProductDTO> outSourceInspectionCertificateProductDTOList = outSourceInspectionCertificateProductMapper.toDto(outSourceInspectionCertificateProductList);
|
||||||
outSourceInspectionCertificateDTO.setOutSourceInspectionCertificateDTOList(outSourceInspectionCertificateProductDTOList);
|
outSourceInspectionCertificateDTO.setOutSourceInspectionCertificateProductList(outSourceInspectionCertificateProductDTOList);
|
||||||
}
|
}
|
||||||
return outSourceInspectionCertificateDTO;
|
return outSourceInspectionCertificateDTO;
|
||||||
}
|
}
|
||||||
|
@ -160,7 +167,7 @@ public class OutSourceInspectionCertificateServiceImpl implements OutSourceInspe
|
||||||
BeanUtils.copyProperties(outSourceInspectionCertificateProduct, outSourceInspectionCertificateProductDTO);
|
BeanUtils.copyProperties(outSourceInspectionCertificateProduct, outSourceInspectionCertificateProductDTO);
|
||||||
outSourceInspectionCertificateProductDTOList.add(outSourceInspectionCertificateProductDTO);
|
outSourceInspectionCertificateProductDTOList.add(outSourceInspectionCertificateProductDTO);
|
||||||
}
|
}
|
||||||
outSourceInspectionCertificateDTO.setOutSourceInspectionCertificateDTOList(outSourceInspectionCertificateProductDTOList);
|
outSourceInspectionCertificateDTO.setOutSourceInspectionCertificateProductList(outSourceInspectionCertificateProductDTOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
return outSourceInspectionCertificateDTO;
|
return outSourceInspectionCertificateDTO;
|
||||||
|
|
Loading…
Reference in New Issue