pdi检验管理功能(所属仓库)修改
This commit is contained in:
parent
eafe4aeff3
commit
a4878dee0b
|
|
@ -65,6 +65,13 @@ public class ExternalPdiTaskRecordControllerService {
|
||||||
throw new NflgException(STATE.BusinessError, "PDI检测规则未发布,无法创建检测任务");
|
throw new NflgException(STATE.BusinessError, "PDI检测规则未发布,无法创建检测任务");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 库存检测(inspectionType=1)时,仓库编号必传
|
||||||
|
if (Objects.equals(rule.getInspectionType(), 1)) {
|
||||||
|
if (request.getWarehouseNo() == null || request.getWarehouseNo().isBlank()) {
|
||||||
|
throw new NflgException(STATE.BusinessError, "库存检测时仓库编号不能为空");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LocalDateTime submissionTime = LocalDateTime.now();
|
LocalDateTime submissionTime = LocalDateTime.now();
|
||||||
LocalDateTime requiredCompletionTime = submissionTime.plusDays(
|
LocalDateTime requiredCompletionTime = submissionTime.plusDays(
|
||||||
rule.getInspectionCycle() != null ? rule.getInspectionCycle() : 0
|
rule.getInspectionCycle() != null ? rule.getInspectionCycle() : 0
|
||||||
|
|
@ -77,6 +84,7 @@ public class ExternalPdiTaskRecordControllerService {
|
||||||
.setDeviceNo(request.getDeviceNo())
|
.setDeviceNo(request.getDeviceNo())
|
||||||
.setOrderNo(request.getOrderNo())
|
.setOrderNo(request.getOrderNo())
|
||||||
.setFactoryNo(request.getFactoryNo())
|
.setFactoryNo(request.getFactoryNo())
|
||||||
|
.setWarehouseNo(request.getWarehouseNo())
|
||||||
.setInspectionEnable(0)
|
.setInspectionEnable(0)
|
||||||
.setSubmissionTime(submissionTime)
|
.setSubmissionTime(submissionTime)
|
||||||
.setRequiredCompletionTime(requiredCompletionTime);
|
.setRequiredCompletionTime(requiredCompletionTime);
|
||||||
|
|
|
||||||
|
|
@ -39,4 +39,9 @@ public class QmsPdiTaskRecordAddQO {
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "工厂编号不能为空")
|
@NotBlank(message = "工厂编号不能为空")
|
||||||
private String factoryNo;
|
private String factoryNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库编号(可选,inspectionType=1库存检测时必传)
|
||||||
|
*/
|
||||||
|
private String warehouseNo;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,11 @@ public class QmsPdiTaskRecordDefectSearchQO {
|
||||||
*/
|
*/
|
||||||
private String factoryNo;
|
private String factoryNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库编号(可选)
|
||||||
|
*/
|
||||||
|
private String warehouseNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检验类型(可选):0=新机检测,1=库存检测
|
* 检验类型(可选):0=新机检测,1=库存检测
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,11 @@ public class QmsPdiTaskRecordSearchQO {
|
||||||
*/
|
*/
|
||||||
private String factoryNo;
|
private String factoryNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库编号(可选)
|
||||||
|
*/
|
||||||
|
private String warehouseNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检验类型(必传):0=静态,1=动态,2=特殊
|
* 检验类型(必传):0=静态,1=动态,2=特殊
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,11 @@ public class QmsPdiTaskRecordDefectPageVO {
|
||||||
*/
|
*/
|
||||||
private String factoryNo;
|
private String factoryNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库编号
|
||||||
|
*/
|
||||||
|
private String warehouseNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 质检类型(来自检测规则):0=新机检测,1=库存检测
|
* 质检类型(来自检测规则):0=新机检测,1=库存检测
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,11 @@ public class QmsPdiTaskRecordPageVO {
|
||||||
*/
|
*/
|
||||||
private String factoryNo;
|
private String factoryNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库编号
|
||||||
|
*/
|
||||||
|
private String warehouseNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 质检类型(来自检测规则)
|
* 质检类型(来自检测规则)
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -86,4 +86,9 @@ public class QmsPdiTaskRecord implements Serializable {
|
||||||
* 订单编号
|
* 订单编号
|
||||||
*/
|
*/
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库编号
|
||||||
|
*/
|
||||||
|
private String warehouseNo;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
t.device_no AS deviceNo,
|
t.device_no AS deviceNo,
|
||||||
t.order_no AS orderNo,
|
t.order_no AS orderNo,
|
||||||
t.factory_no AS factoryNo,
|
t.factory_no AS factoryNo,
|
||||||
|
t.warehouse_no AS warehouseNo,
|
||||||
r.inspection_type AS inspectionType,
|
r.inspection_type AS inspectionType,
|
||||||
r.inspection_version AS inspectionVersion,
|
r.inspection_version AS inspectionVersion,
|
||||||
r.machine_no AS machineNo,
|
r.machine_no AS machineNo,
|
||||||
|
|
@ -47,6 +48,9 @@
|
||||||
<if test="request.factoryNo != null and request.factoryNo != ''">
|
<if test="request.factoryNo != null and request.factoryNo != ''">
|
||||||
AND t.factory_no = #{request.factoryNo}
|
AND t.factory_no = #{request.factoryNo}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.warehouseNo != null and request.warehouseNo != ''">
|
||||||
|
AND t.warehouse_no = #{request.warehouseNo}
|
||||||
|
</if>
|
||||||
<!-- 合格物料过滤:inspection_enable=0/1不校验;inspection_enable=2校验自身结果+检测项结果(type=2除外) -->
|
<!-- 合格物料过滤:inspection_enable=0/1不校验;inspection_enable=2校验自身结果+检测项结果(type=2除外) -->
|
||||||
AND (
|
AND (
|
||||||
t.inspection_enable IN (0, 1)
|
t.inspection_enable IN (0, 1)
|
||||||
|
|
@ -73,6 +77,7 @@
|
||||||
t.device_no AS deviceNo,
|
t.device_no AS deviceNo,
|
||||||
t.order_no AS orderNo,
|
t.order_no AS orderNo,
|
||||||
t.factory_no AS factoryNo,
|
t.factory_no AS factoryNo,
|
||||||
|
t.warehouse_no AS warehouseNo,
|
||||||
r.inspection_type AS inspectionType,
|
r.inspection_type AS inspectionType,
|
||||||
r.inspection_version AS inspectionVersion,
|
r.inspection_version AS inspectionVersion,
|
||||||
r.machine_no AS machineNo,
|
r.machine_no AS machineNo,
|
||||||
|
|
@ -119,6 +124,9 @@
|
||||||
<if test="request.factoryNo != null and request.factoryNo != ''">
|
<if test="request.factoryNo != null and request.factoryNo != ''">
|
||||||
AND t.factory_no = #{request.factoryNo}
|
AND t.factory_no = #{request.factoryNo}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.warehouseNo != null and request.warehouseNo != ''">
|
||||||
|
AND t.warehouse_no = #{request.warehouseNo}
|
||||||
|
</if>
|
||||||
<if test="request.status != null">
|
<if test="request.status != null">
|
||||||
AND it.status = #{request.status}
|
AND it.status = #{request.status}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue