parent
7f3089638d
commit
ccb139cf1c
40 changed files with 1567 additions and 195 deletions
@ -0,0 +1,61 @@ |
||||
package org.springblade.desk.dashboard.pojo.entity; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* 零件基础信息实体类 |
||||
* |
||||
* @author |
||||
* @since |
||||
*/ |
||||
@Data |
||||
@TableName("DS_PART_BASICS") |
||||
@Schema(description = "DsPartBasics对象") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class DsPartBasicsEntity extends BaseEntity { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
|
||||
/** |
||||
* 零件号 |
||||
*/ |
||||
@Schema(description = "零件号") |
||||
private String partCode; |
||||
|
||||
/** |
||||
* 零件名称 |
||||
*/ |
||||
@Schema(description = "零件名称") |
||||
private String partName; |
||||
|
||||
/** |
||||
* 产品型号 |
||||
*/ |
||||
@Schema(description = "产品型号") |
||||
private String productType; |
||||
|
||||
/** |
||||
* 是否烧结产品 |
||||
*/ |
||||
@Schema(description = "是否烧结产品") |
||||
private String isSintering; |
||||
|
||||
/** |
||||
* 是否玻璃饼 |
||||
*/ |
||||
@Schema(description = "是否玻璃饼") |
||||
private String isClassCake; |
||||
|
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@Schema(description = "备注") |
||||
private String remarks; |
||||
|
||||
} |
||||
@ -0,0 +1,121 @@ |
||||
package org.springblade.desk.dashboard.pojo.entity; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.util.Date; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author: 没有这张表 只是查询用于接收 |
||||
* @create: 2026-03-14 |
||||
*/ |
||||
@Data |
||||
public class DsPartSub { |
||||
|
||||
/** |
||||
* 插针 |
||||
*/ |
||||
public static Short SIN_TER_TYPE_CZ = 1; |
||||
/** |
||||
* 壳体 |
||||
*/ |
||||
public static Short SIN_TER_TYPE_KT = 2; |
||||
/** |
||||
* 自制玻璃饼 |
||||
*/ |
||||
public static Short SIN_TER_TYPE_BLB = 3; |
||||
/** |
||||
* 其他 |
||||
*/ |
||||
public static Short SIN_TER_TYPE_QT = 4; |
||||
/** |
||||
* 石墨模 |
||||
*/ |
||||
public static Short SIN_TER_TYPE_SMM = 5; |
||||
public static Map<String, String> subTypeMap = new HashMap<>(6); |
||||
public static Map<Short, String> sinTerTypeMap = new HashMap<>(6); |
||||
|
||||
static { |
||||
subTypeMap.put("A", "组合件"); |
||||
subTypeMap.put("M", "零件"); |
||||
subTypeMap.put("R", "原材料"); |
||||
subTypeMap.put("B", "外购件"); |
||||
subTypeMap.put("P", "虚拟件"); |
||||
subTypeMap.put("G", "产品"); |
||||
|
||||
sinTerTypeMap.put(SIN_TER_TYPE_CZ, "插针"); |
||||
sinTerTypeMap.put(SIN_TER_TYPE_KT, "壳体"); |
||||
sinTerTypeMap.put(SIN_TER_TYPE_BLB, "自制玻璃饼"); |
||||
sinTerTypeMap.put(SIN_TER_TYPE_QT, "其他"); |
||||
sinTerTypeMap.put(SIN_TER_TYPE_SMM, "石墨模"); |
||||
} |
||||
|
||||
/** |
||||
* 流水号 |
||||
*/ |
||||
private Long psId; |
||||
/** |
||||
* 零件号 |
||||
*/ |
||||
private String partCode; |
||||
/** |
||||
* 子件号 |
||||
*/ |
||||
private String subCode; |
||||
/** |
||||
* 子件名称 |
||||
*/ |
||||
private String subName; |
||||
/** |
||||
* 定额 |
||||
*/ |
||||
private Double quota; |
||||
/** |
||||
* 子件类型 |
||||
* A代表组合件,M代表零件,R代表原材料,B代表外购件,P代表虚拟件,G代表产品 |
||||
*/ |
||||
private String subType; |
||||
/** |
||||
* 烧结子件种类 |
||||
* 1插针,2壳体,3自制玻璃饼,4其它,5石墨模 |
||||
*/ |
||||
private Integer sinTerType; |
||||
/** |
||||
* 材料 |
||||
*/ |
||||
private String material; |
||||
/** |
||||
* 面积 |
||||
*/ |
||||
private Double area; |
||||
/** |
||||
* 镀种 |
||||
*/ |
||||
private String plate; |
||||
/** |
||||
* 产品系列 |
||||
*/ |
||||
private String productType; |
||||
/** |
||||
* 镀层代号 |
||||
*/ |
||||
private String plateCode; |
||||
/** |
||||
* 镀层厚度 |
||||
*/ |
||||
private String plateThickness; |
||||
/** |
||||
* 修改时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
/** |
||||
* 配置码 |
||||
*/ |
||||
private String configNo; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
private String memo; |
||||
} |
||||
@ -0,0 +1,42 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.dashboard.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.springblade.desk.dashboard.pojo.entity.DsPartBasicsEntity; |
||||
|
||||
/** |
||||
* 零件基础信息表 Mapper 接口 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
public interface DsPartBasicsMapper extends BaseMapper<DsPartBasicsEntity> { |
||||
|
||||
|
||||
DsPartBasicsEntity selectPartCode(@Param("partCode") String partCode); |
||||
} |
||||
@ -0,0 +1,10 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="org.springblade.desk.dashboard.mapper.DsPartBasicsMapper"> |
||||
|
||||
|
||||
<select id="selectPartCode" resultType="org.springblade.desk.dashboard.pojo.entity.DsPartBasicsEntity"> |
||||
select id, part_code, part_name, product_type, is_sintering, is_class_cake, create_time, create_user, create_dept, update_time, update_user, remarks, status, is_deleted |
||||
from DS_PART_BASICS where PART_CODE = #{partCode} |
||||
</select> |
||||
</mapper> |
||||
@ -0,0 +1,45 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.dashboard.service; |
||||
|
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.desk.dashboard.pojo.entity.DsPartBasicsEntity; |
||||
|
||||
/** |
||||
* 零件基础信息表 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
public interface IDsPartBasicsService extends BaseService<DsPartBasicsEntity> { |
||||
|
||||
/** |
||||
* 根据零件号查询 |
||||
* @param partCode |
||||
* @return |
||||
*/ |
||||
DsPartBasicsEntity selectByPartCode(String partCode); |
||||
} |
||||
@ -0,0 +1,52 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.dashboard.service.impl; |
||||
|
||||
import org.checkerframework.checker.units.qual.A; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.desk.dashboard.mapper.DsPartBasicsMapper; |
||||
import org.springblade.desk.dashboard.pojo.entity.DsPartBasicsEntity; |
||||
import org.springblade.desk.dashboard.service.IDsPartBasicsService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* 零件基础信息 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
@Service |
||||
public class DsPartBasicsServiceImpl extends BaseServiceImpl<DsPartBasicsMapper, DsPartBasicsEntity> implements IDsPartBasicsService { |
||||
|
||||
@Autowired |
||||
DsPartBasicsMapper partBasicsMapper; |
||||
|
||||
@Override |
||||
public DsPartBasicsEntity selectByPartCode(String partCode) { |
||||
return partBasicsMapper.selectPartCode(partCode); |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,36 @@ |
||||
package org.springblade.desk.dashboard.utils; |
||||
|
||||
/** |
||||
* @author: liweidong |
||||
* @create: 2026-03-14 |
||||
*/ |
||||
public class IncrementNumberUtil { |
||||
/** |
||||
* 字符串数值递增转换核心方法 |
||||
* @param input 输入的字符串(可为 null/空/非数字/数字) |
||||
* @return 转换后的字符串结果 |
||||
*/ |
||||
public static String convertNumber(String input) { |
||||
// 1. 处理空值/空字符串:直接返回 "1"
|
||||
if (input == null || input.trim().isEmpty()) { |
||||
return "1"; |
||||
} |
||||
|
||||
try { |
||||
// 2. 将字符串转为整数(处理首尾空格)
|
||||
int num = Integer.parseInt(input.trim()); |
||||
|
||||
// 3. 处理负数:返回 "1"
|
||||
if (num < 0) { |
||||
return "1"; |
||||
} |
||||
|
||||
// 4. 正常逻辑:非负整数 +1 后转回字符串
|
||||
return String.valueOf(num + 1); |
||||
|
||||
} catch (NumberFormatException e) { |
||||
// 5. 处理非数字字符串(如"abc"、"12a"):返回 "1"
|
||||
return "1"; |
||||
} |
||||
} |
||||
} |
||||
Loading…
Reference in new issue