|
|
@ -155,6 +155,7 @@ public class ScmApplyInboundService extends MybatisBaseService<ScmApplyInboundMa |
|
|
|
// todo: 这里根据具体业务调整查询条件
|
|
|
|
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
|
|
|
QueryWrapper<ScmApplyInbound> qw = new QueryWrapper<>(); |
|
|
|
qw.eq("sai.useOrgSid", query.getCreateOrgSid()); |
|
|
|
if (StringUtils.isNotBlank(query.getPurchaseOrderNo())) { |
|
|
|
qw.like("sai.purchaseOrderNo", query.getPurchaseOrderNo()); |
|
|
|
} |
|
|
@ -164,7 +165,14 @@ public class ScmApplyInboundService extends MybatisBaseService<ScmApplyInboundMa |
|
|
|
if (StringUtils.isNotBlank(query.getPcApplicationCode())) { |
|
|
|
qw.like("sai.pcApplicationCode", query.getPcApplicationCode()); |
|
|
|
} |
|
|
|
qw.eq("sai.useOrgSid", query.getCreateOrgSid()); |
|
|
|
if (StringUtils.isNotBlank(query.getNodeState())) { |
|
|
|
qw.like("sai.nodeState", query.getNodeState()); |
|
|
|
} |
|
|
|
String createStartTime = query.getCreateStartTime(); |
|
|
|
String createEndTime = query.getCreateEndTime(); |
|
|
|
qw.apply(StringUtils.isNotEmpty(createStartTime), "date_format (sai.createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')"). |
|
|
|
apply(StringUtils.isNotEmpty(createEndTime), "date_format (sai.createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')" |
|
|
|
); |
|
|
|
return qw; |
|
|
|
} |
|
|
|
|
|
|
@ -1042,7 +1050,7 @@ public class ScmApplyInboundService extends MybatisBaseService<ScmApplyInboundMa |
|
|
|
} |
|
|
|
//判断相同车架号在整个集团中是否存在非退库的
|
|
|
|
Integer count = baseVehicleFeign.selectVinNo(scmApplyInboundVehicleDto.getVinNo().substring(scmApplyInboundVehicleDto.getVinNo().length() - 8)).getData(); |
|
|
|
if (count > 0){ |
|
|
|
if (count > 0) { |
|
|
|
return new ResultBean().fail().setMsg(scmApplyInboundVehicleDto.getVinNo() + "在集团中存在未退库的车辆,无法入库"); |
|
|
|
} |
|
|
|
} |
|
|
|