fix: 小修补
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
package cn.code.nl.module.lms.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 装箱区货位状态枚举 box_type_status
|
||||
* @Author: liyongde
|
||||
* @Date: 2026/8/10 16:48
|
||||
*/
|
||||
@Getter
|
||||
public enum BoxPointStatusEnum {
|
||||
/**
|
||||
* 空位
|
||||
*/
|
||||
EMPTY(1, "空位"),
|
||||
/**
|
||||
* 空载具
|
||||
*/
|
||||
EMPTY_CONTAINER(2, "空载具"),
|
||||
/**
|
||||
* 有子卷
|
||||
*/
|
||||
HAS_SUB_ROLL(3, "有子卷"),
|
||||
/**
|
||||
* 合格品
|
||||
*/
|
||||
QUALIFIED(4, "合格品"),
|
||||
/**
|
||||
* 管制品
|
||||
*/
|
||||
CONTROLLED(5, "管制品");
|
||||
|
||||
/**
|
||||
* 字典键值
|
||||
*/
|
||||
private final Integer code;
|
||||
/**
|
||||
* 字典标签
|
||||
*/
|
||||
private final String desc;
|
||||
|
||||
BoxPointStatusEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code获取对应枚举
|
||||
* @param code 编码
|
||||
* @return 匹配的枚举,未找到返回null
|
||||
*/
|
||||
public static BoxPointStatusEnum getByCode(Integer code) {
|
||||
for (BoxPointStatusEnum statusEnum : values()) {
|
||||
if (statusEnum.getCode().equals(code)) {
|
||||
return statusEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package cn.code.nl.module.lms.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 装箱区货位类型枚举 box_point_type
|
||||
* @Author: liyongde
|
||||
* @Date: 2026/8/10 16:47
|
||||
*/
|
||||
@Getter
|
||||
public enum BoxPointTypeEnum {
|
||||
|
||||
/**
|
||||
* 下线点
|
||||
*/
|
||||
OFFLINE_POINT(1, "下线点"),
|
||||
/**
|
||||
* 待检点
|
||||
*/
|
||||
INSPECTION_PENDING_POINT(2, "待检点"),
|
||||
/**
|
||||
* 不合格点
|
||||
*/
|
||||
UNQUALIFIED_POINT(3, "不合格点"),
|
||||
/**
|
||||
* 装箱点
|
||||
*/
|
||||
PACKING_POINT(4, "装箱点"),
|
||||
/**
|
||||
* 装箱对接点
|
||||
*/
|
||||
PACKING_DOCK_POINT(5, "装箱对接点");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
||||
BoxPointTypeEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据编码获取对应枚举
|
||||
* @param code 字典键值
|
||||
* @return 匹配枚举,无匹配返回null
|
||||
*/
|
||||
public static BoxPointTypeEnum getByCode(Integer code) {
|
||||
for (BoxPointTypeEnum item : values()) {
|
||||
if (item.getCode().equals(code)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -92,5 +92,10 @@ public class PackagePointDO extends BaseDO {
|
||||
*/
|
||||
private String waitPointType;
|
||||
|
||||
/**
|
||||
* 锁类型
|
||||
*/
|
||||
private String lockStatus;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package cn.code.nl.module.lms.job.box;
|
||||
|
||||
import cn.code.nl.framework.tenant.core.job.TenantJob;
|
||||
import cn.code.nl.module.lms.service.packagepoint.PackageBoxBusinessService;
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 装箱区域定时器
|
||||
* @Author: liyongde
|
||||
* @Date: 2026/8/10 16:56
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class BoxAutoJob {
|
||||
|
||||
@Resource
|
||||
private PackageBoxBusinessService packageBoxBusinessService;
|
||||
|
||||
/**
|
||||
* 子卷下线送到待检区任务定时器
|
||||
*/
|
||||
@XxlJob("autoSendSubRollTaskJob")
|
||||
@TenantJob
|
||||
public void autoSendSubRollTaskJob() {
|
||||
log.info("子卷下线送到待检区任务创建开始.....");
|
||||
XxlJobHelper.log("子卷下线送到待检区任务创建开始");
|
||||
|
||||
|
||||
|
||||
String msg = "子卷下线送到待检区任务创建结束";
|
||||
XxlJobHelper.log(msg);
|
||||
XxlJobHelper.handleSuccess(msg);
|
||||
log.info(msg);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 子卷下线补充空架子定时器
|
||||
*/
|
||||
@XxlJob("autoSubRollDownCallEmptyJob")
|
||||
@TenantJob
|
||||
public void autoSubRollDownCallEmptyJob() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
*
|
||||
* @Author: liyongde
|
||||
* @Date: 2026/8/10 16:56
|
||||
*/
|
||||
package cn.code.nl.module.lms.job;
|
||||
@@ -0,0 +1,9 @@
|
||||
package cn.code.nl.module.lms.service.packagepoint;
|
||||
|
||||
/**
|
||||
* 装箱业务服务类
|
||||
* @Author: liyongde
|
||||
* @Date: 2026/8/10 17:15
|
||||
*/
|
||||
public interface PackageBoxBusinessService {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package cn.code.nl.module.lms.service.packagepoint;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
*
|
||||
* @Author: liyongde
|
||||
* @Date: 2026/8/10 17:16
|
||||
*/
|
||||
@Service
|
||||
public class PackageBoxBusinessServiceImpl implements PackageBoxBusinessService{
|
||||
}
|
||||
@@ -1,24 +1,19 @@
|
||||
package cn.code.nl.module.lms.service.packagepoint;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.code.nl.module.lms.controller.admin.packagepoint.vo.*;
|
||||
import cn.code.nl.module.lms.dal.dataobject.packagepoint.PackagePointDO;
|
||||
import cn.code.nl.framework.common.pojo.PageResult;
|
||||
import cn.code.nl.framework.common.pojo.PageParam;
|
||||
import cn.code.nl.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.code.nl.module.lms.controller.admin.packagepoint.vo.PackagePointPageReqVO;
|
||||
import cn.code.nl.module.lms.controller.admin.packagepoint.vo.PackagePointSaveReqVO;
|
||||
import cn.code.nl.module.lms.dal.dataobject.packagepoint.PackagePointDO;
|
||||
import cn.code.nl.module.lms.dal.mysql.packagepoint.PackagePointMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static cn.code.nl.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.code.nl.framework.common.util.collection.CollectionUtils.convertList;
|
||||
import static cn.code.nl.framework.common.util.collection.CollectionUtils.diffList;
|
||||
import static cn.code.nl.module.lms.enums.ErrorCodeConstants.*;
|
||||
import static cn.code.nl.module.lms.enums.ErrorCodeConstants.PACKAGE_POINT_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 装箱区点位库存 Service 实现类
|
||||
|
||||
@@ -11,7 +11,7 @@ import {getRangePickerDefaultProps} from '#/utils';
|
||||
export function useFormSchema(): VbenFormSchema[] {
|
||||
return [
|
||||
{
|
||||
fieldName: 'point_id',
|
||||
fieldName: 'pointId',
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
triggerFields: [''],
|
||||
|
||||
@@ -16,7 +16,7 @@ import { useFormSchema } from '../data';
|
||||
const emit = defineEmits(['success']);
|
||||
const formData = ref<LmsPackagePointApi.PackagePoint>();
|
||||
const getTitle = computed(() => {
|
||||
return formData.value?.id
|
||||
return formData.value?.pointId
|
||||
? $t('ui.actionTitle.edit', ['装箱区点位库存'])
|
||||
: $t('ui.actionTitle.create', ['装箱区点位库存']);
|
||||
});
|
||||
@@ -44,7 +44,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||
// 提交表单
|
||||
const data = (await formApi.getValues()) as LmsPackagePointApi.PackagePoint;
|
||||
try {
|
||||
await (formData.value?.id ? updatePackagePoint(data) : createPackagePoint(data));
|
||||
await (formData.value?.pointId ? updatePackagePoint(data) : createPackagePoint(data));
|
||||
// 关闭并提示
|
||||
await modalApi.close();
|
||||
emit('success');
|
||||
@@ -60,12 +60,12 @@ const [Modal, modalApi] = useVbenModal({
|
||||
}
|
||||
// 加载数据
|
||||
const data = modalApi.getData<LmsPackagePointApi.PackagePoint>();
|
||||
if (!data || !data.id) {
|
||||
if (!data || !data.pointId) {
|
||||
return;
|
||||
}
|
||||
modalApi.lock();
|
||||
try {
|
||||
formData.value = await getPackagePoint(data.id);
|
||||
formData.value = await getPackagePoint(data.pointId);
|
||||
// 设置到 values
|
||||
await formApi.setValues(formData.value);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user