fix(触发全检/抽检):
1.生产批与检验任务关系表表名改为 z_qms_production_lot_inspect_task_relation 2.增加非空校验
This commit is contained in:
parent
d675714b6b
commit
d9dc3fdeca
@ -10,7 +10,6 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
@ -20,14 +19,14 @@ import java.time.LocalDateTime;
|
||||
* @date 2024-12-10 14:06:33
|
||||
*/
|
||||
@Data
|
||||
@TableName("z_production_lot_inspect_task_relation")
|
||||
@TableName("z_qms_production_lot_inspect_task_relation")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "生产批与检验任务关系表")
|
||||
public class ZProductionLotInspectTaskRelation extends Model<ZProductionLotInspectTaskRelation> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final String KW_Z_PRODUCTION_LOT_INSPECT_TASK_RELATION_BO = "ZProductionLotInspectTaskRelationBO";
|
||||
public static final String KW_Z_PRODUCTION_LOT_INSPECT_TASK_RELATION_BO = "ZQmsProductionLotInspectTaskRelationBO";
|
||||
|
||||
/**
|
||||
* 主键
|
||||
|
||||
@ -562,6 +562,8 @@ public class QmsInspecJobServiceImpl extends ServiceImpl<QmsInspecJobMapper, Qms
|
||||
String operation = inspecJob.getOperation();
|
||||
// 获取 检验细类
|
||||
String qcSubCategories = inspecJob.getQcSubCategories();
|
||||
// 非空校验
|
||||
nonEmptyCheck(lotNo, operation, qcSubCategories);
|
||||
// 获取 触发点
|
||||
String triggerPoint = inspecJob.getTriggerPoint();
|
||||
// 获取用户
|
||||
@ -591,6 +593,24 @@ public class QmsInspecJobServiceImpl extends ServiceImpl<QmsInspecJobMapper, Qms
|
||||
throw BusinessException.build("站点[" + site + "],生产批号[" + lotNo + "],工序[" + operation + "],检验细类[" + qcSubCategories + "]在[生产批与检验任务关系表]已存在");
|
||||
}
|
||||
}
|
||||
|
||||
// 校验
|
||||
private void nonEmptyCheck(String lotNo , String operation, String qcSubCategories) {
|
||||
// 如果 生产批号lotNo 为空,则报错
|
||||
if (StrUtil.isBlank(lotNo)) {
|
||||
throw BusinessException.build("往[生产批与检验任务关系表]插入数据时,生产批号不能为空");
|
||||
}
|
||||
|
||||
// 如果 工序operation 为空,则报错
|
||||
if (StrUtil.isBlank(operation)) {
|
||||
throw BusinessException.build("往[生产批与检验任务关系表]插入数据时,工序不能为空");
|
||||
}
|
||||
|
||||
// 如果 检验细类qcSubCategories 为空,则报错
|
||||
if (StrUtil.isBlank(qcSubCategories)) {
|
||||
throw BusinessException.build("往[生产批与检验任务关系表]插入数据时,检验细类不能为空");
|
||||
}
|
||||
}
|
||||
private void toSpc(QmsInspecJob job) {
|
||||
String site = TenantContextHolder.getTenantId();
|
||||
String url = remoteParamService.getByKey("SPC_RESTFUL_URL", SecurityConstants.FROM_IN).getData();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user