根据outSourceProcessSheetCode模糊查询

pull/451/head
starrysky 2019-10-06 17:09:28 +08:00
parent df952efdba
commit a32eac2321
7 changed files with 21 additions and 10 deletions

View File

@ -18,7 +18,8 @@ import java.util.stream.Collectors;
@AllArgsConstructor
public class JwtUser implements UserDetails {
@JsonIgnore
// @JsonIgnore
// TODO userId
private final Long id;
private final String username;

View File

@ -37,8 +37,8 @@ public class OutSourceInspectionCertificate implements Serializable {
private Boolean status;
// 所属委外加工单
@Column(name = "out_source_process_sheet_id")
private Long outSourceProcessSheetId;
@Column(name = "out_source_process_sheet_code")
private String outSourceProcessSheetCode;
// 制单人
@Column(name = "make_people_id")

View File

@ -18,7 +18,7 @@ public class CreateOutSourceInspectionCertificateRequest implements Serializable
// 所属委外加工单
private Long outSourceProcessSheetId;
private String outSourceProcessSheetCode;
// 制单人
private Long makePeopleId;

View File

@ -24,6 +24,8 @@ public class OutSourceInspectionCertificateProductRequest implements Serializabl
private String productName;
private Integer productNumber;
private String remark;
// 合格数量

View File

@ -25,7 +25,7 @@ public class OutSourceInspectionCertificateDTO implements Serializable {
private Boolean status;
// 所属委外加工单
private Long outSourceProcessSheetId;
private String outSourceProcessSheetCode;
// 制单人
private Long makePeopleId;
@ -39,5 +39,5 @@ public class OutSourceInspectionCertificateDTO implements Serializable {
private String remark;
// 委外验收单产品信息
private List<OutSourceInspectionCertificateProductDTO> outSourceInspectionCertificateDTOList;
private List<OutSourceInspectionCertificateProductDTO> outSourceInspectionCertificateProductList;
}

View File

@ -1,8 +1,6 @@
package me.zhengjie.modules.wms.outSourceProductSheet.service.dto;
import lombok.Data;
import java.sql.Timestamp;
import me.zhengjie.annotation.Query;
/**
* @author jie
@ -10,4 +8,7 @@ import me.zhengjie.annotation.Query;
*/
@Data
public class OutSourceInspectionCertificateQueryCriteria {
// 所属委外加工单
private String outSourceProcessSheetCode;
}

View File

@ -71,6 +71,13 @@ public class OutSourceInspectionCertificateServiceImpl implements OutSourceInspe
Predicate statusPredicate = criteriaBuilder.equal(root.get("status"), 1);
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)){
return null;
}else{
@ -113,7 +120,7 @@ public class OutSourceInspectionCertificateServiceImpl implements OutSourceInspe
List<OutSourceInspectionCertificateProduct> outSourceInspectionCertificateProductList = outSourceInspectionCertificateProductRepository.queryByOutSourceInspectionCertificateIdAndStatusTrue(id);
if(!CollectionUtils.isEmpty(outSourceInspectionCertificateProductList)){
List<OutSourceInspectionCertificateProductDTO> outSourceInspectionCertificateProductDTOList = outSourceInspectionCertificateProductMapper.toDto(outSourceInspectionCertificateProductList);
outSourceInspectionCertificateDTO.setOutSourceInspectionCertificateDTOList(outSourceInspectionCertificateProductDTOList);
outSourceInspectionCertificateDTO.setOutSourceInspectionCertificateProductList(outSourceInspectionCertificateProductDTOList);
}
return outSourceInspectionCertificateDTO;
}
@ -160,7 +167,7 @@ public class OutSourceInspectionCertificateServiceImpl implements OutSourceInspe
BeanUtils.copyProperties(outSourceInspectionCertificateProduct, outSourceInspectionCertificateProductDTO);
outSourceInspectionCertificateProductDTOList.add(outSourceInspectionCertificateProductDTO);
}
outSourceInspectionCertificateDTO.setOutSourceInspectionCertificateDTOList(outSourceInspectionCertificateProductDTOList);
outSourceInspectionCertificateDTO.setOutSourceInspectionCertificateProductList(outSourceInspectionCertificateProductDTOList);
}
return outSourceInspectionCertificateDTO;