feat: 车间任务新增任务编号

This commit is contained in:
weizhiqiang 2024-11-08 08:42:01 +08:00
parent 9f363bc99c
commit 091a1a661d
2 changed files with 12 additions and 0 deletions

View file

@ -36,6 +36,10 @@ public class MachinProcedureFarm extends OperatorUserInfo {
@ApiModelProperty(value = "主键id。为空时新增不为空时编辑")
private String id;
@TableField(value = "odd_number", updateStrategy = FieldStrategy.NEVER)
@Property(value = "单据编号", fuzzyLike = true)
private String oddNumber;
@TableField(value = "machin_id", updateStrategy = FieldStrategy.NEVER)
@ApiModelProperty(value = "加工单id")
private String machinId;

View file

@ -4,6 +4,7 @@
package com.skyeye.machinprocedure.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ObjectUtil;
@ -97,6 +98,13 @@ public class MachinProcedureFarmServiceImpl extends SkyeyeBusinessServiceImpl<Ma
return beans;
}
@Override
public void createPrepose(MachinProcedureFarm entity) {
Map<String, Object> business = BeanUtil.beanToMap(entity);
String oddNumber = iCodeRuleService.getNextCodeByClassName(this.getClass().getName(), business);
entity.setOddNumber(oddNumber);
}
@Override
public MachinProcedureFarm selectById(String id) {
MachinProcedureFarm machinProcedureFarm = super.selectById(id);