This commit is contained in:
闫阳 2023-02-22 15:59:13 +08:00
parent 8f3da0bf2e
commit 1d8aff98c7
76 changed files with 5168 additions and 24 deletions

View File

@ -0,0 +1,7 @@
-- 菜单初始SQL
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1626059890161434625, 1067246875800000035, '包装箱拆合箱历史表', 'packing/changePackagingBoxHistory', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1626059890161434626, 1626059890161434625, '查看', NULL, 'packing:changePackagingBoxHistory:page,packing:changePackagingBoxHistory:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1626059890161434627, 1626059890161434625, '新增', NULL, 'packing:changePackagingBoxHistory:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1626059890161434628, 1626059890161434625, '修改', NULL, 'packing:changePackagingBoxHistory:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1626059890161434629, 1626059890161434625, '删除', NULL, 'packing:changePackagingBoxHistory:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1626059890161434630, 1626059890161434625, '导出', NULL, 'packing:changePackagingBoxHistory:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now());

View File

@ -0,0 +1,7 @@
-- 菜单初始SQL
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1627506543435272194, 1067246875800000035, '打印标签模板表', 'packing/printModel', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627506543435272195, 1627506543435272194, '查看', NULL, 'packing:printModel:page,packing:printModel:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627506543435272196, 1627506543435272194, '新增', NULL, 'packing:printModel:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627506543435272197, 1627506543435272194, '修改', NULL, 'packing:printModel:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627506543435272198, 1627506543435272194, '删除', NULL, 'packing:printModel:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627506543435272199, 1627506543435272194, '导出', NULL, 'packing:printModel:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now());

View File

@ -0,0 +1,7 @@
-- 菜单初始SQL
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1627488175458189314, 1067246875800000035, '基板补偿功率 表', 'packing/woCompensationPower', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627488175458189315, 1627488175458189314, '查看', NULL, 'packing:woCompensationPower:page,packing:woCompensationPower:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627488175458189316, 1627488175458189314, '新增', NULL, 'packing:woCompensationPower:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627488175458189317, 1627488175458189314, '修改', NULL, 'packing:woCompensationPower:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627488175458189318, 1627488175458189314, '删除', NULL, 'packing:woCompensationPower:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627488175458189319, 1627488175458189314, '导出', NULL, 'packing:woCompensationPower:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now());

View File

@ -0,0 +1,7 @@
-- 菜单初始SQL
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1627855073022648322, 1067246875800000035, '包装箱基板关联表 ( 基板表 )', 'packing/woPackagingBoxSubstrate', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627855073022648323, 1627855073022648322, '查看', NULL, 'packing:woPackagingBoxSubstrate:page,packing:woPackagingBoxSubstrate:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627855073022648324, 1627855073022648322, '新增', NULL, 'packing:woPackagingBoxSubstrate:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627855073022648325, 1627855073022648322, '修改', NULL, 'packing:woPackagingBoxSubstrate:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627855073022648326, 1627855073022648322, '删除', NULL, 'packing:woPackagingBoxSubstrate:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627855073022648327, 1627855073022648322, '导出', NULL, 'packing:woPackagingBoxSubstrate:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now());

View File

@ -0,0 +1,7 @@
-- 菜单初始SQL
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1628230581925277697, 1067246875800000035, '包装箱表', 'code/woPackagingBox', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1628230581925277698, 1628230581925277697, '查看', NULL, 'code:woPackagingBox:page,code:woPackagingBox:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1628230581925277699, 1628230581925277697, '新增', NULL, 'code:woPackagingBox:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1628230581925277700, 1628230581925277697, '修改', NULL, 'code:woPackagingBox:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1628230581925277701, 1628230581925277697, '删除', NULL, 'code:woPackagingBox:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1628230581925277702, 1628230581925277697, '导出', NULL, 'code:woPackagingBox:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now());

View File

@ -0,0 +1,7 @@
-- 菜单初始SQL
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1627603723110080513, 1067246875800000035, '包装箱打印历史表', 'packing/woPackagingPrintHistory', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627603723110080514, 1627603723110080513, '查看', NULL, 'packing:woPackagingPrintHistory:page,packing:woPackagingPrintHistory:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627603723110080515, 1627603723110080513, '新增', NULL, 'packing:woPackagingPrintHistory:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627603723110080516, 1627603723110080513, '修改', NULL, 'packing:woPackagingPrintHistory:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627603723110080517, 1627603723110080513, '删除', NULL, 'packing:woPackagingPrintHistory:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627603723110080518, 1627603723110080513, '导出', NULL, 'packing:woPackagingPrintHistory:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now());

View File

@ -0,0 +1,7 @@
-- 菜单初始SQL
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1627486255993688065, 1067246875800000035, '功率等级 表', 'packing/woPowerLevel', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627486255993688066, 1627486255993688065, '查看', NULL, 'packing:woPowerLevel:page,packing:woPowerLevel:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627486255993688067, 1627486255993688065, '新增', NULL, 'packing:woPowerLevel:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627486255993688068, 1627486255993688065, '修改', NULL, 'packing:woPowerLevel:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627486255993688069, 1627486255993688065, '删除', NULL, 'packing:woPowerLevel:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627486255993688070, 1627486255993688065, '导出', NULL, 'packing:woPowerLevel:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now());

View File

@ -0,0 +1,683 @@
/*
* Copyright (c) 2019.
* http://www.ulabcare.com
*/
package com.cnbm.admin.utils;
/**
* <p>
* 编号生成帮助类
* 以2+8+6形式生成2位编号类型前缀+8位年月日+6位自增序列号
* 2位编号类型前缀定义如下
* 1x患者相关编号以 '1' 开头(病例号:10 )
* 2x订单相关编号以 '2' 开头如订单编号=20
* 3x: 支付相关编号以 '3' 开头如系统内部支付订单号=30
* (未完待续...)
* </P>
*
* @author FanYi
* @date 2019-01-03
* @since 1.0
*/
public class CodeGeneratorHelper {
/**
* 订单编号
*/
public static final String ORDER_CODE = "ORDER_CODE";
/**
* 工艺编号
*/
public static final String PROCESS_FLOW_CODE = "PROCESS_FLOW_CODE";
/**
* 工艺设备点编号
*/
public static final String PROCESS_FLOW_EQUIPMENT_CODE = "PROCESS_FLOW_EQUIPMENT_CODE";
/**
* BOM编号
*/
public static final String BOM_CODE = "BOM_CODE";
/**
* 基板编号
*/
public static final String SUBSTRATESU_CODE = "SUBSTRATESU_CODE";
/**
* 报警等级编号
*/
public static final String ALARM_GRADE_CODE = "ALARM_GRADE_CODE";
/**
* 物料信息编号
*/
public static final String MATERIAL_CODE = "MATERIAL_CODE";
/**
* 物料信息编号
*/
public static final String EQUIPMENT_MATERIAL_BOM_CODE = "EQUIPMENT_MATERIAL_BOM_CODE";
/**
* 区域编号
*/
public static final String AREA_CODE = "AREA_CODE";
/**
* 缓存区编号
*/
public static final String CACHE_CODE = "CACHE_CODE";
/**
* 设备报警编号
*/
public static final String EQUIPMENT_ALARM_CODE = "EQUIPMENT_ALARM_CODE";
/**
* 设备保养计划单号
*/
public static final String EQUIPMENT_MAINTENANCE_PLAN_CODE = "EQUIPMENT_MAINTENANCE_PLAN_CODE";
/**
* 设备保养记录单号
*/
public static final String EQUIPMENT_MAINTENANCE_LOG_CODE = "EQUIPMENT_MAINTENANCE_LOG_CODE";
/**
* 设备类型编号
*/
public static final String EQUIPMENT_TYPE_CODE = "EQUIPMENT_TYPE_CODE";
/**
* 保养周期编号
*/
public static final String MAINTENANCE_PERIOD_CODE = "MAINTENANCE_PERIOD_CODE";
/**
* 维修类型编号
*/
public static final String MAINTENANCE_TYPE_CODE = "MAINTENANCE_TYPE_CODE";
/**
* 物料类型编号
*/
public static final String MATERIAL_TYPE_CODE = "MATERIAL_TYPE_CODE";
/**
* 设备参数编号 编号
*/
public static final String EQUIPMENT_PARAMETER_CODE = "EQUIPMENT_PARAMETER_CODE";
/**
* 设备编号
*/
public static final String EQUIPMENT_CODE = "EQUIPMENT_CODE";
/**
* 库位编号
*/
public static final String STOCK_CODE = "STOCK_CODE";
/**
* 库位位置编号
*/
public static final String STOCK_POSITION_CODE = "STOCK_POSITION_CODE";
/**
* 货架编号
*/
public static final String SHELF_CODE = "SHELF_CODE";
/**
* 废品报废编号
*/
public static final String SCRAP_CODE = "SCRAP_CODE";
/**
* 连线设备编号
*/
public static final String CONNECTING_DEVICE_CODE = "CONNECTING_DEVICE_CODE";
/**
* 报警类型编号
*/
public static final String ALARM_TYPE_CODE = "ALARM_TYPE_CODE";
/**
* 报警信息编号
*/
public static final String ALARM_CODE = "ALARM_CODE";
/**
* 物料批次编号
*/
public static final String MATERIAL_DATE_CODE = "MATERIAL_DATE_CODE";
/**
* 储存箱编号
*/
public static final String STORAGE_BOX_CODE = "STORAGE_BOX_CODE";
/**
* 工序编号
*/
public static final String SEQUENCE_CODE = "SEQUENCE_CODE";
private static final String DETECT_EQUIPMENT_SYSTEM_CODE = "DETECT_EQUIPMENT_SYSTEM_CODE";
/**
* 标签编码
*/
public static final String PRINT_MODEL_CODE = "PRINT_MODEL";
/**
* 生成物料批次编号
*
* @return 物料批次编号
*/
public static String getMaterialDateCode() {
return IDGenerator.gen("PC", "yyyyMMdd", 6, MATERIAL_DATE_CODE);
}
/**
* 连线设备属性编号
*/
public static final String CONNECTING_DEVICE_ATTR_CODE = "CONNECTING_DEVICE_ATTR_CODE";
/**
* 工厂编号
*/
public static final String FACTORY_CODE = "FACTORY_CODE";
/**
* 产线编号
*/
public static final String PRODUCTION_LINE_CODE = "PRODUCTION_LINE_CODE";
/**
* 设备类型报警明细编号
*/
public static final String EQUIPMENT_TYPE_ALARM_CODE = "EQUIPMENT_TYPE_ALARM_CODE";
/**
* 工单编号
*/
public static final String WORK_ORDER_CODE = "WORK_ORDER_CODE";
/**
* 报废类型编号
*/
public static final String SCRAP_TYPE_INFORMATION_CODE = "SCRAP_TYPE_INFORMATION_CODE";
/**
* 报废原因编号
*/
public static final String SCRAP_INFORMATION_CODE = "SCRAP_INFORMATION_CODE";
/**
* 报废原因编号
*/
public static final String SUBSTRATE_BATCH_INFO_CODE = "SUBSTRATE_BATCH_INFO_CODE";
/**
* 检测下发区域编号
*/
public static final String DETECT_DISTRIBUTION_AREA_CODE = "DETECT_DISTRIBUTION_AREA_CODE";
/**
* 离线检测参数编码
*/
public static final String OFFLINE_DETECT_PARAM_CODE = "OFFLINE_DETECT_PARAM_CODE";
/**
* 设备配方CODE
*/
public static final String EQUIPMENT_RECIPE_CODE = "EQUIPMENT_RECIPE_CODE";
/**
* 设备事件CODE
*/
public static final String EQUIPMENT_EVENT_CODE = "EQUIPMENT_EVENT_CODE";
/**
* 设备分组CODE
*/
public static final String EQUIPMENT_GROUP_CODE = "EQUIPMENT_GROUP_CODE";
/**
* power class CODE
*/
public static final String POWER_CLASSIFICATION_CODE = "POWER_CLASSIFICATION_CODE";
/**
* power class CODE
*/
public static final String EQUIPMENT_REPAIR_CODE = "EQUIPMENT_REPAIR_CODE";
/**
* 存储箱 CODE
*/
public static final String STORAGE_TANK_CODE = "STORAGE_TANK_CODE";
/**
* 权限 CODE
*/
public static final String ROLE_CODE = "STORAGE_TANK_CODE";
/**
* 权限CODE
*
* @return 权限CODE
*/
public static String getRoleCode() {
return IDGenerator.gen("ROLE", "yyyyMMdd", 6, ROLE_CODE);
}
/**
* 存储箱CODE
*
* @return 存储箱CODE
*/
public static String getStorageTankCode() {
return IDGenerator.gen("CCX", "yyyyMMdd", 6, STORAGE_TANK_CODE);
}
/**
* 生成工艺设备点CODE
*
* @return 工艺设备点CODE
*/
public static String getEquipmentRepairCode() {
return IDGenerator.gen("SBWX", "yyyyMMdd", 6, EQUIPMENT_REPAIR_CODE);
}
/**
* 生成工艺设备点CODE
*
* @return 工艺设备点CODE
*/
public static String getProcessFlowEquipmentGroupCode() {
return IDGenerator.gen("GYSBD", "yyyyMMdd", 6, PROCESS_FLOW_EQUIPMENT_CODE);
}
/**
* 生成设备分组CODE
*
* @return 设备分组CODE
*/
public static String getEquipmentGroupCode() {
return IDGenerator.gen("SBFZ", "yyyyMMdd", 6, EQUIPMENT_GROUP_CODE);
}
/**
* 生成设备事件CODE
*
* @return 生成设备事件CODE
*/
public static String getEquipmentEventCode() {
return IDGenerator.gen("SBSJ", "yyyyMMdd", 6, EQUIPMENT_EVENT_CODE);
}
/**
* 生成设备配方编码
*
* @return 生成设备配方编码
*/
public static String getEquipmentRecipeCode() {
return IDGenerator.gen("SBPF", "yyyyMMdd", 6, EQUIPMENT_RECIPE_CODE);
}
/**
* 生成离线检测参数编码
*
* @return 生成离线检测参数编码
*/
public static String getOfflineDetectParamCode() {
return IDGenerator.gen("LXCS", "yyyyMMdd", 6, OFFLINE_DETECT_PARAM_CODE);
}
/**
* 生成设备类型报警明细编号
*
* @return 设备类型报警明细编号
*/
public static String getEquipmentTypeAlarmCode() {
return IDGenerator.gen("20", "yyyyMMdd", 6, EQUIPMENT_TYPE_ALARM_CODE);
}
/**
* 生成设备类型报警明细编号
*
* @return 设备类型报警明细编号
*/
public static String getStorageBoxCode() {
return IDGenerator.gen("CCX", "yyyyMMdd", 6, STORAGE_BOX_CODE);
}
/**
* 生成订单编号
*
* @return 订单编号
*/
public static String getOrderCode() {
return IDGenerator.gen("20", "yyyyMMdd", 6, ORDER_CODE);
}
/**
* 生成工艺编号
*
* @return 工艺编号
*/
public static String getProcessFlowCode() {
return IDGenerator.gen("GY", "yyyyMMdd", 6, PROCESS_FLOW_CODE);
}
/**
* 生成基板编号
*
* @return 基板编号
*/
public static String getSubstrateCode() {
return IDGenerator.gen("JB", "yyyyMMdd", 6, SUBSTRATESU_CODE);
}
/**
* 生成BOM编号
*
* @return BOM编号
*/
public static String getBomCode() {
return IDGenerator.gen("BOM", "yyyyMMdd", 6, BOM_CODE);
}
/**
* 生成编号
*
* @return 编号
*/
public static String getCode(String code) {
return IDGenerator.gen("20", "yyyyMMdd", 6, code);
}
/**
* 生成报警等级编号
*
* @return 编号
*/
public static String getAlarmGradeCode() {
return IDGenerator.gen("BJDJ", "yyyyMMdd", 6, ALARM_GRADE_CODE);
}
/**
* 生成物料信息编号
*
* @return 编号
*/
public static String getMaterialCode() {
return IDGenerator.gen("WLXX", "yyyyMMdd", 6, MATERIAL_CODE);
}
/**
* 生成设备物料Bom 编号
*
* @return 编号
*/
public static String getEquipmentMaterialBomCode() {
return IDGenerator.gen("SBWLBOM", "yyyyMMdd", 6, EQUIPMENT_MATERIAL_BOM_CODE);
}
/**
* 生成设备参数 编号
*
* @return 编号
*/
public static String getEquipmentParameterCode() {
return IDGenerator.gen("SBCS", "yyyyMMdd", 6, EQUIPMENT_PARAMETER_CODE);
}
/**
* 生成区域编号
*
* @return 编号
*/
public static String getAreaCode() {
return IDGenerator.gen("QY", "yyyyMMdd", 6, AREA_CODE);
}
/**
* 生成缓存区编号
*
* @return 编号
*/
public static String getCacheCode() {
return IDGenerator.gen("HCQ", "yyyyMMdd", 6, CACHE_CODE);
}
/**
* 生成设备报警编号
*
* @return 编号
*/
public static String getEquipmentAlarmCode() {
return IDGenerator.gen("SBBJ", "yyyyMMdd", 6, EQUIPMENT_ALARM_CODE);
}
/**
* 生成设备保养计划编号
*
* @return 编号
*/
public static String getEquipmentMaintenancePlanCode() {
return IDGenerator.gen("SBBYJH", "yyyyMMdd", 6, EQUIPMENT_MAINTENANCE_PLAN_CODE);
}
/**
* 生成设备保养记录编号
*
* @return 编号
*/
public static String getEquipmentMaintenanceLogCode() {
return IDGenerator.gen("SBBYJL", "yyyyMMdd", 6, EQUIPMENT_MAINTENANCE_LOG_CODE);
}
/**
* 生成设备类型编号
*
* @return 编号
*/
public static String getEquipmentTypeCode() {
return IDGenerator.gen("SBLX", "yyyyMMdd", 6, EQUIPMENT_TYPE_CODE);
}
/**
* 生成保养周期编号
*
* @return 编号
*/
public static String getMaintenancePeriodCode() {
return IDGenerator.gen("BYZQ", "yyyyMMdd", 6, MAINTENANCE_PERIOD_CODE);
}
/**
* 生成维修类型编号
*
* @return 编号
*/
public static String getMaintenanceTypeCode() {
return IDGenerator.gen("WXLX", "yyyyMMdd", 6, MAINTENANCE_TYPE_CODE);
}
/**
* 生成物料类型编号
*
* @return 编号
*/
public static String getMaterialTypeCode() {
return IDGenerator.gen("WLLX", "yyyyMMdd", 6, MATERIAL_TYPE_CODE);
}
/**
* 生成设备编号
*
* @return 编号
*/
public static String getEquipmentCode() {
return IDGenerator.gen("SB", "yyyyMMdd", 6, EQUIPMENT_CODE);
}
/**
* 生成库位位置编号
*
* @return 编号
*/
public static String getStockPositionCode() {
return IDGenerator.gen("KWWZ", "yyyyMMdd", 6, STOCK_POSITION_CODE);
}
/**
* 生成库位编号
*
* @return 编号
*/
public static String getStockCode() {
return IDGenerator.gen("KW", "yyyyMMdd", 6, STOCK_CODE);
}
/**
* 生成货架编号
*
* @return 编号
*/
public static String getShelfCode() {
return IDGenerator.gen("HJ", "yyyyMMdd", 6, SHELF_CODE);
}
/**
* 生成废品报废编号
*
* @return 编号
*/
public static String getScrapCode() {
return IDGenerator.gen("FPBF", "yyyyMMdd", 6, SCRAP_CODE);
}
/**
* 生成连线设备编号
*
* @return 编号
*/
public static String getConnectingDeviceCode() {
return IDGenerator.gen("LXSB", "yyyyMMdd", 6, CONNECTING_DEVICE_CODE);
}
/**
* 生成报警类型编号
*
* @return 编号
*/
public static String getAlarmTypeCode() {
return IDGenerator.gen("BJLX", "yyyyMMdd", 6, ALARM_TYPE_CODE);
}
/**
* 生成报警信息编号
*
* @return 编号
*/
public static String getAlarmCode() {
return IDGenerator.gen("BJXX", "yyyyMMdd", 6, ALARM_CODE);
}
/**
* 生成连线设备属性编号
*
* @return 编号
*/
public static String getConnectingDeviceAttrCode() {
return IDGenerator.gen("LXSBSX", "yyyyMMdd", 6, CONNECTING_DEVICE_ATTR_CODE);
}
/**
* 生成工厂编号
*
* @return 编号
*/
public static String getFactoryCode() {
return IDGenerator.gen("GC", "yyyyMMdd", 6, FACTORY_CODE);
}
/**
* 生成产线编号
*
* @return 编号
*/
public static String getProductionLineCode() {
return IDGenerator.gen("CX", "yyyyMMdd", 6, PRODUCTION_LINE_CODE);
}
/**
* 生成工单编号
*
* @return 编号
*/
public static String getWorkOrderCode() {
return IDGenerator.gen("ZGD", "yyyyMMdd", 6, WORK_ORDER_CODE);
}
/**
* 生成报废类型编号
*
* @return 编号
*/
public static String getScrapTypeInformationCode() {
return IDGenerator.gen("BFLX", "yyyyMMdd", 6, SCRAP_TYPE_INFORMATION_CODE);
}
/**
* 生成报废原因编号
*
* @return 编号
*/
public static String getScrapInformationCode() {
return IDGenerator.gen("BFYY", "yyyyMMdd", 6, SCRAP_INFORMATION_CODE);
}
public static String getSubstrateBatchInfoCode() {
return IDGenerator.gen("PC", "yyyyMMdd", 6, SUBSTRATE_BATCH_INFO_CODE);
}
/**
* 生成工序编号
*
* @return
*/
public static String getSequenceCode() {
return IDGenerator.gen("20", "yyyyMMdd", 6, SEQUENCE_CODE);
}
/**
* 生成检测下发区域编号
*
* @return
*/
public static String getDetectDistributionAreaCode() {
return IDGenerator.gen("JCQY", "yyyyMMdd", 6, DETECT_DISTRIBUTION_AREA_CODE);
}
public static String getDetectEquipmentSystemCode() {
return IDGenerator.gen("LX", "yyyyMMdd", 6, DETECT_EQUIPMENT_SYSTEM_CODE);
}
public static String getPowerClassificationCode() {
return IDGenerator.gen("PC", "yyyyMMdd", 6, POWER_CLASSIFICATION_CODE);
}
public static String getPrintModelCode() {
return IDGenerator.gen("PM", "yyyyMMdd", 6, PRINT_MODEL_CODE);
}
}

View File

@ -0,0 +1,213 @@
package com.cnbm.admin.utils;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* id生成器使用redis自增接口实现
* TODO 待完善
*
* @author jiff
* @date 2018-12-1
* @since 1.0
*/
@Component
public class IDGenerator {
private RedisTemplate redisTemplate;
private static IDGenerator idGenerator;
/**
* 4位年格式
*/
public static final String PATTERN_YYYY = "yyyy";
/**
* 6位年月格式
*/
public static final String PATTERN_YYYYMM = "yyyyMM";
/**
* 8位年月日格式
*/
public static final String PATTERN_YYYYMMDD = "yyyyMMdd";
/**
* 10位年月日时格式
*/
public static final String PATTERN_YYYYMMDDHH = "yyyyMMddHH";
/**
* 12位年月日时分格式
*/
public static final String PATTERN_YYYYMMDDHHMM = "yyyyMMddHHmm";
/**
* 最大序列号长度
*/
private static final int MAX_SEQUENCE_LENGTH = 20;
/**
* 最大随机数长度
*/
private static final int MAX_RANDOM_LENGTH = 10;
/**
* 序列命名空间
*/
private static final String KEY_PREFIX_SEQUENCE = "SEQUENCE_";
private static final Map<String, SimpleDateFormat> commonDateFormats = new HashMap<>();
private static final List<DecimalFormat> sequenceFormats = new ArrayList<>();
static {
commonDateFormats.put(PATTERN_YYYY, new SimpleDateFormat(PATTERN_YYYY));
commonDateFormats.put(PATTERN_YYYYMM, new SimpleDateFormat(
PATTERN_YYYYMM));
commonDateFormats.put(PATTERN_YYYYMMDD, new SimpleDateFormat(
PATTERN_YYYYMMDD));
commonDateFormats.put(PATTERN_YYYYMMDDHH, new SimpleDateFormat(
PATTERN_YYYYMMDDHH));
commonDateFormats.put(PATTERN_YYYYMMDDHHMM, new SimpleDateFormat(
PATTERN_YYYYMMDDHHMM));
StringBuilder sequencePattern = new StringBuilder(MAX_SEQUENCE_LENGTH);
for (int i = 0; i < MAX_SEQUENCE_LENGTH; i++) {
sequencePattern.append("0");
sequenceFormats.add(new DecimalFormat(sequencePattern.toString()));
}
}
@Autowired(required = false)
public void setRedisTemplate(RedisTemplate redisTemplate) {
RedisSerializer stringSerializer = new StringRedisSerializer();
//设置序列化Key的实例化对象
redisTemplate.setKeySerializer(stringSerializer);
//设置序列化Value的实例化对象
redisTemplate.setValueSerializer(new GenericJackson2JsonRedisSerializer());
redisTemplate.setHashKeySerializer(stringSerializer);
redisTemplate.setHashValueSerializer(new GenericJackson2JsonRedisSerializer());
redisTemplate.setStringSerializer(stringSerializer);
redisTemplate.afterPropertiesSet();
this.redisTemplate = redisTemplate;
}
@PostConstruct
private void init() {
idGenerator = this;
idGenerator.redisTemplate = this.redisTemplate;
}
/**
* 生成主键
*
* @param sequenceName 序列名
* @return 主键
*/
public static long gen(String sequenceName) {
return idGenerator.redisTemplate.opsForValue().increment(
KEY_PREFIX_SEQUENCE + sequenceName, 1);
}
/**
* 生成主键
*
* @param prefix 前缀为空或null时则不使用前缀
* @param pattern 时间戳格式为空或null时不使用时间戳已定义5种格式{@link #PATTERN_YYYY}{@link #PATTERN_YYYYMM}{@link #PATTERN_YYYYMMDD}{@link #PATTERN_YYYYMMDDHH}{@link #PATTERN_YYYYMMDDHHMM}
* @param sequenceLength 序列长度大于0时有效否则使用序列原始值最多{@value #MAX_SEQUENCE_LENGTH}超过{@value #MAX_SEQUENCE_LENGTH}默认为{@value #MAX_SEQUENCE_LENGTH}
* @param sequenceName 序列名为空或null时则不生成序列值
* @return prefix+timestamp+sequence
*/
public static String gen(String prefix, String pattern, int sequenceLength,
String sequenceName) {
return gen(prefix, pattern, sequenceLength, sequenceName, 0);
}
/**
* 生成主键
*
* @param prefix 前缀为空或null时则不使用前缀
* @param pattern 时间戳格式为空或null时不使用时间戳已定义5种格式{@link #PATTERN_YYYY}{@link #PATTERN_YYYYMM}{@link #PATTERN_YYYYMMDD}{@link #PATTERN_YYYYMMDDHH}{@link #PATTERN_YYYYMMDDHHMM}
* @param sequenceLength 序列长度大于0时有效否则使用序列原始值最多{@value #MAX_SEQUENCE_LENGTH}超过{@value #MAX_SEQUENCE_LENGTH}默认为{@value #MAX_SEQUENCE_LENGTH}
* @param sequenceName 序列名为空或null时则不生成序列值
* @param randomLength 随机数长度大于0时有效最多{@value #MAX_RANDOM_LENGTH}超过{@value #MAX_RANDOM_LENGTH}默认为{@value #MAX_RANDOM_LENGTH}
* @return prefix+timestamp+sequence+random
*/
public static String gen(String prefix, String pattern, int sequenceLength,
String sequenceName, int randomLength) {
StringBuilder ids = new StringBuilder();
if (!isEmpty(prefix)) {
ids.append(prefix);
}
String timestamp = null;
if (!isEmpty(pattern)) {
timestamp = getFormattedDate(pattern);
}
if (timestamp != null) {
ids.append(timestamp);
}
if (!isEmpty(sequenceName)) {
long sequence = gen(sequenceName);
if (sequenceLength > 0) {
if (sequenceLength > MAX_SEQUENCE_LENGTH) {
sequenceLength = MAX_SEQUENCE_LENGTH;
}
String formatSequence = sequenceFormats.get(sequenceLength - 1)
.format(sequence);
if (formatSequence.length() > sequenceLength) {
formatSequence = formatSequence.substring(formatSequence
.length() - sequenceLength);
}
ids.append(formatSequence);
} else {
ids.append(sequence);
}
}
//随机数长度大于0时添加随机数
if (randomLength > 0) {
String random = RandomStringUtils.randomNumeric(randomLength);
ids.append(random);
}
return ids.toString();
}
private static String getFormattedDate(String pattern) {
SimpleDateFormat sdf = commonDateFormats.get(pattern);
if (sdf == null) {
try {
sdf = new SimpleDateFormat(pattern);
} catch (Exception e) {
e.printStackTrace();
}
}
if (sdf == null) {
return null;
}
java.util.Date now = new java.util.Date();
return sdf.format(now);
}
private static boolean isEmpty(String str) {
if (str == null || str.trim().isEmpty()) {
return true;
}
return false;
}
public static void main(String[] args) {
for (int i = 0; i < 100; i++) {
System.out.println(RandomStringUtils.randomNumeric(1));
System.out.println(RandomStringUtils.randomNumeric(2));
System.out.println(RandomStringUtils.randomNumeric(4));
}
System.out.println(new DecimalFormat("00").format(103));
System.out.println(new DecimalFormat("000").format(13));
}
}

View File

@ -6,8 +6,9 @@
<select id="getList" resultType="com.cnbm.admin.entity.SysDeptEntity">
select t1.*,(select t2.name from sys_dept t2 where t2.id=t1.pid)parentName from sys_dept t1
<where>
t1.valid = 1
<if test="deptIdList != null">
t1.id in
and t1.id in
<foreach item="id" collection="deptIdList" open="(" separator="," close=")">
#{id}
</foreach>
@ -18,15 +19,15 @@
<select id="getById" resultType="com.cnbm.admin.entity.SysDeptEntity">
select t1.*,(select t2.name from sys_dept t2 where t2.id=t1.pid)parentName from sys_dept t1
where t1.id = #{value}
where t1.id = #{value} AND t1.valid = 1
</select>
<select id="getIdAndPidList" resultType="com.cnbm.admin.entity.SysDeptEntity">
select t1.id, t1.pid from sys_dept t1
select t1.id, t1.pid from sys_dept t1 AND t1.valid = 1
</select>
<select id="getSubDeptIdList" resultType="long">
select id from sys_dept where pids like #{id}
select id from sys_dept where pids like #{id} AND valid = 1
</select>
</mapper>

View File

@ -4,7 +4,7 @@
<mapper namespace="com.cnbm.admin.dao.SysDictDataDao">
<select id="getDictDataList" resultType="com.cnbm.admin.entity.DictData">
select dict_type_id, dict_label, dict_value from sys_dict_data order by dict_type_id, sort
select dict_type_id, dict_label, dict_value from sys_dict_data WHERE valid = 1 order by dict_type_id, sort
</select>
</mapper>

View File

@ -4,7 +4,7 @@
<mapper namespace="com.cnbm.admin.dao.SysDictTypeDao">
<select id="getDictTypeList" resultType="com.cnbm.admin.entity.DictType">
select id, dict_type from sys_dict_type order by dict_type, sort
select id, dict_type from sys_dict_type WHERE valid = 1 order by dict_type, sort
</select>
</mapper>

View File

@ -5,14 +5,15 @@
<select id="getById" resultType="com.cnbm.admin.entity.SysMenuEntity">
select t1.*, (select name from sys_menu t2 where t2.id=t1.pid) as parentName from sys_menu t1
where t1.id = #{id}
where t1.id = #{id} AND t1.valid = 1
</select>
<select id="getMenuList" resultType="com.cnbm.admin.entity.SysMenuEntity">
select t1.* from sys_menu t1
<where>
t1.valid = 1
<if test="type != null">
t1.type = #{type}
and t1.type = #{type}
</if>
</where>
order by t1.sort asc
@ -22,7 +23,7 @@
select t3.* from sys_role_user t1
left join sys_role_menu t2 on t1.role_id = t2.role_id
left join sys_menu t3 on t2.menu_id = t3.id
where t1.user_id = #{userId}
where t1.user_id = #{userId} AND t1.valid = 1
<if test="type != null">
and t3.type = #{type}
</if>
@ -32,15 +33,15 @@
<select id="getUserPermissionsList" resultType="string">
select t3.permissions from sys_role_user t1 left join sys_role_menu t2 on t1.role_id = t2.role_id
left join sys_menu t3 on t2.menu_id = t3.id
where t1.user_id = #{userId} order by t3.sort asc
where t1.user_id = #{userId} AND t1.valid = 1 order by t3.sort asc
</select>
<select id="getPermissionsList" resultType="string">
select permissions from sys_menu
select permissions from sys_menu WHERE valid = 1
</select>
<select id="getListPid" resultType="com.cnbm.admin.entity.SysMenuEntity">
select * from sys_menu where pid = #{value}
select * from sys_menu where pid = #{value} AND valid = 1
</select>
</mapper>

View File

@ -5,7 +5,7 @@
<!-- 根据参数编码查询value -->
<select id="getValueByCode" resultType="String">
select param_value from sys_params where param_code = #{value}
select param_value from sys_params where param_code = #{value} AND valid = 1
</select>
<!-- 获取参数编码列表 -->
@ -14,10 +14,11 @@
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
AND valid = 1
</select>
<!-- 根据参数编码更新value -->
<update id="updateValueByCode">
update sys_params set param_value = #{paramValue} where param_code = #{paramCode}
update sys_params set param_value = #{paramValue} where param_code = #{paramCode} AND valid = 1
</update>
</mapper>

View File

@ -4,12 +4,13 @@
<mapper namespace="com.cnbm.admin.dao.SysRoleDataScopeDao">
<select id="getDeptIdList" resultType="long">
select dept_id from sys_role_data_scope where role_id = #{value}
select dept_id from sys_role_data_scope where role_id = #{value} AND valid = 1
</select>
<select id="getDataScopeList" resultType="long">
select t2.dept_id from sys_role_user t1, sys_role_data_scope t2
where t1.user_id = #{value} and t1.role_id = t2.role_id
AND t1.valid = 1
</select>
<delete id="deleteByRoleIds">
@ -17,6 +18,7 @@
<foreach item="roleId" collection="array" open="(" separator="," close=")">
#{roleId}
</foreach>
AND valid = 1
</delete>
</mapper>

View File

@ -4,7 +4,7 @@
<mapper namespace="com.cnbm.admin.dao.SysRoleMenuDao">
<select id="getMenuIdList" resultType="long">
select menu_id from sys_role_menu where role_id = #{value}
select menu_id from sys_role_menu where role_id = #{value} AND valid = 1
</select>
<delete id="deleteByRoleIds">
@ -12,9 +12,10 @@
<foreach item="roleId" collection="array" open="(" separator="," close=")">
#{roleId}
</foreach>
AND valid = 1
</delete>
<delete id="deleteByMenuId">
delete from sys_role_menu where menu_id = #{value}
delete from sys_role_menu where menu_id = #{value} AND valid = 1
</delete>
</mapper>

View File

@ -8,6 +8,7 @@
<foreach item="roleId" collection="array" open="(" separator="," close=")">
#{roleId}
</foreach>
AND valid = 1
</delete>
<delete id="deleteByUserIds">
@ -15,10 +16,11 @@
<foreach item="userId" collection="array" open="(" separator="," close=")">
#{userId}
</foreach>
AND valid = 1
</delete>
<select id="getRoleIdList" resultType="long">
select role_id from sys_role_user where user_id = #{value}
select role_id from sys_role_user where user_id = #{value} AND valid = 1
</select>
</mapper>

View File

@ -5,7 +5,7 @@
<select id="getList" resultType="com.cnbm.admin.entity.SysUserEntity">
select t1.*, (select t2.name from sys_dept t2 where t2.id=t1.dept_id) deptName from sys_user t1
where t1.super_admin = 0
where t1.super_admin = 0 AND t1.valid = 1
<if test="username != null and username.trim() != ''">
and t1.username like #{username}
</if>
@ -25,19 +25,19 @@
<select id="getById" resultType="com.cnbm.admin.entity.SysUserEntity">
select t1.*, (select t2.name from sys_dept t2 where t2.id=t1.dept_id) deptName from sys_user t1
where t1.id = #{value}
where t1.id = #{value} AND t1.valid = 1
</select>
<select id="getByUsername" resultType="com.cnbm.admin.entity.SysUserEntity">
select * from sys_user where username = #{value}
select * from sys_user where username = #{value} AND valid = 1
</select>
<update id="updatePassword">
update sys_user set password = #{newPassword} where id = #{id}
update sys_user set password = #{newPassword} where id = #{id} AND valid = 1
</update>
<select id="getCountByDeptId" resultType="int">
select count(*) from sys_user where dept_id = #{value}
select count(*) from sys_user where dept_id = #{value} AND valid = 1
</select>
<select id="getUserIdListByDeptId" resultType="Long">
@ -45,6 +45,7 @@
<foreach item="deptId" collection="list" open="(" separator="," close=")">
#{deptId}
</foreach>
AND valid = 1
</select>
</mapper>

View File

@ -10,7 +10,7 @@ import java.nio.file.Paths;
* @Version 1.0
*/
public class DataConfig {
public static final String url = "jdbc:mysql://mysql.picaiba.com:30307/ym_pass?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true";
public static final String url = "jdbc:mysql://mysql.picaiba.com:30307/mt_cigs4?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true";
public static final String username = "root";
public static final String password = "1qaz@WSX3edc$RFV";
}

View File

@ -23,5 +23,20 @@
<artifactId>ym-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.cnbm</groupId>
<artifactId>ym-core</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
</dependency>
<dependency>
<groupId>com.cnbm</groupId>
<artifactId>ym-admin</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,120 @@
package com.cnbm.packing.controller;
import com.cnbm.admin.annotation.LogOperation;
import com.cnbm.common.constant.Constant;
import com.cnbm.common.page.PageData;
import com.cnbm.common.utils.ExcelUtils;
import com.cnbm.common.utils.Result;
import com.cnbm.common.validator.AssertUtils;
import com.cnbm.common.validator.ValidatorUtils;
import com.cnbm.common.validator.group.AddGroup;
import com.cnbm.common.validator.group.DefaultGroup;
import com.cnbm.common.validator.group.UpdateGroup;
import com.cnbm.packing.dto.ChangePackagingBoxHistoryDTO;
import com.cnbm.packing.excel.ChangePackagingBoxHistoryExcel;
import com.cnbm.packing.service.ChangePackagingBoxHistoryServiceBiz;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
/**
* 包装箱拆合箱历史表 前端控制器
*
* @author packingGenerator
* @since 2023-02-16
*/
@RestController
@RequestMapping("/packing/changePackagingBoxHistory")
@Api(tags="包装箱拆合箱历史表")
public class ChangePackagingBoxHistoryController {
@Autowired
private ChangePackagingBoxHistoryServiceBiz changePackagingBoxHistoryService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataTypeClass = LocalDateTime.class),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class),
@ApiImplicitParam(name = "type", value = "类型1=加入包装箱2=移除包装箱3=换箱", paramType = "query", dataTypeClass=Integer.class)
})
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:page')")
public Result<PageData<ChangePackagingBoxHistoryDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<ChangePackagingBoxHistoryDTO> page = changePackagingBoxHistoryService.page(params);
return new Result<PageData<ChangePackagingBoxHistoryDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:info')")
public Result<ChangePackagingBoxHistoryDTO> get(@PathVariable("id") Long id){
ChangePackagingBoxHistoryDTO data = changePackagingBoxHistoryService.get(id);
return new Result<ChangePackagingBoxHistoryDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:save')")
public Result<Long> save(@RequestBody ChangePackagingBoxHistoryDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
changePackagingBoxHistoryService.save(dto);
return new Result<Long>().ok(dto.getId());
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:update')")
public Result<Long> update(@RequestBody ChangePackagingBoxHistoryDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
changePackagingBoxHistoryService.update(dto);
return new Result<Long>().ok(dto.getId());
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:delete')")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
changePackagingBoxHistoryService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<ChangePackagingBoxHistoryDTO> list = changePackagingBoxHistoryService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, ChangePackagingBoxHistoryExcel.class);
}
}

View File

@ -0,0 +1,131 @@
package com.cnbm.packing.controller;
import com.cnbm.admin.annotation.LogOperation;
import com.cnbm.common.constant.Constant;
import com.cnbm.common.page.PageData;
import com.cnbm.common.utils.ExcelUtils;
import com.cnbm.common.utils.Result;
import com.cnbm.common.validator.AssertUtils;
import com.cnbm.common.validator.ValidatorUtils;
import com.cnbm.common.validator.group.AddGroup;
import com.cnbm.common.validator.group.DefaultGroup;
import com.cnbm.common.validator.group.UpdateGroup;
import com.cnbm.packing.dto.PrintModelDTO;
import com.cnbm.packing.excel.PrintModelExcel;
import com.cnbm.packing.service.PrintModelServiceBiz;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
/**
* 打印标签模板表 前端控制器
*
* @author packingGenerator
* @since 2023-02-15
*/
@RestController
@RequestMapping("/packing/printModel")
@Api(tags="打印标签模板表")
public class PrintModelController {
@Autowired
private PrintModelServiceBiz printModelService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "name", value = "标签名称", paramType = "query", dataTypeClass = String.class)
})
// @PreAuthorize("@ex.hasAuthority('packing:printModel:page')")
public Result<PageData<PrintModelDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<PrintModelDTO> page = printModelService.page(params);
return new Result<PageData<PrintModelDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @PreAuthorize("@ex.hasAuthority('packing:printModel:info')")
public Result<PrintModelDTO> get(@PathVariable("id") Long id){
PrintModelDTO data = printModelService.get(id);
return new Result<PrintModelDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @PreAuthorize("@ex.hasAuthority('packing:printModel:save')")
public Result<Long> save(@RequestBody PrintModelDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
printModelService.save(dto);
return new Result<Long>().ok(dto.getId());
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @PreAuthorize("@ex.hasAuthority('packing:printModel:update')")
public Result<Long> update(@RequestBody PrintModelDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
printModelService.update(dto);
return new Result<Long>().ok(dto.getId());
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @PreAuthorize("@ex.hasAuthority('packing:printModel:delete')")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
printModelService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @PreAuthorize("@ex.hasAuthority('packing:printModel:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<PrintModelDTO> list = printModelService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, PrintModelExcel.class);
}
@PostMapping(value = "list")
@ApiOperation(value = "获取班组列表")
@LogOperation("获取班组列表")
public List<PrintModelDTO> list() { return printModelService.list(); }
@PostMapping(value = "get-packing")
@ApiOperation(value = "获取标签编码")
@LogOperation("获取标签编码")
private Result<String> getCode() {
String packing = printModelService.getCode();
return new Result<String>().ok(packing);
}
}

View File

@ -0,0 +1,122 @@
package com.cnbm.packing.controller;
import com.cnbm.admin.annotation.LogOperation;
import com.cnbm.common.constant.Constant;
import com.cnbm.common.page.PageData;
import com.cnbm.common.utils.ExcelUtils;
import com.cnbm.common.utils.Result;
import com.cnbm.common.validator.AssertUtils;
import com.cnbm.common.validator.ValidatorUtils;
import com.cnbm.common.validator.group.AddGroup;
import com.cnbm.common.validator.group.DefaultGroup;
import com.cnbm.common.validator.group.UpdateGroup;
import com.cnbm.packing.dto.WoCompensationPowerDTO;
import com.cnbm.packing.excel.WoCompensationPowerExcel;
import com.cnbm.packing.service.WoCompensationPowerServiceBiz;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 基板补偿功率 前端控制器
*
* @author packingGenerator
* @since 2023-02-20
*/
@RestController
@RequestMapping("/packing/woCompensationPower")
@Api(tags="基板补偿功率 表")
public class WoCompensationPowerController {
@Autowired
private WoCompensationPowerServiceBiz woCompensationPowerService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "lineBody", value = "线体", paramType = "query", dataTypeClass = Integer.class)
})
// @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:page')")
public Result<PageData<WoCompensationPowerDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<WoCompensationPowerDTO> page = woCompensationPowerService.page(params);
return new Result<PageData<WoCompensationPowerDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:info')")
public Result<WoCompensationPowerDTO> get(@PathVariable("id") Long id){
WoCompensationPowerDTO data = woCompensationPowerService.get(id);
return new Result<WoCompensationPowerDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:save')")
public Result<Long> save(@RequestBody WoCompensationPowerDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
woCompensationPowerService.save(dto);
return new Result<Long>().ok(dto.getId());
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:update')")
public Result<Long> update(@RequestBody WoCompensationPowerDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
woCompensationPowerService.update(dto);
return new Result<Long>().ok(dto.getId());
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:delete')")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
woCompensationPowerService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @PreAuthorize("@ex.hasAuthority('packing:woCompensationPower:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<WoCompensationPowerDTO> list = woCompensationPowerService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, WoCompensationPowerExcel.class);
}
@PostMapping(value = "list")
@ApiOperation(value = "获取基板补偿功率")
@LogOperation("获取基板补偿功率")
public List<WoCompensationPowerDTO> list() { return woCompensationPowerService.list(); }
}

View File

@ -0,0 +1,129 @@
package com.cnbm.packing.controller;
import com.cnbm.admin.annotation.LogOperation;
import com.cnbm.common.constant.Constant;
import com.cnbm.common.page.PageData;
import com.cnbm.common.utils.ExcelUtils;
import com.cnbm.common.utils.Result;
import com.cnbm.common.validator.AssertUtils;
import com.cnbm.common.validator.ValidatorUtils;
import com.cnbm.common.validator.group.AddGroup;
import com.cnbm.common.validator.group.DefaultGroup;
import com.cnbm.common.validator.group.UpdateGroup;
import com.cnbm.packing.dto.PrintModelDTO;
import com.cnbm.packing.dto.WoPackagingBoxDTO;
import com.cnbm.packing.excel.WoPackagingBoxExcel;
import com.cnbm.packing.service.WoPackagingBoxServiceBiz;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
/**
* 包装箱表 前端控制器
*
* @author packingGenerator
* @since 2023-02-15
*/
@RestController
@RequestMapping("/packing/woPackagingBox")
@Api(tags="包装箱表")
public class WoPackagingBoxController {
@Autowired
private WoPackagingBoxServiceBiz woPackagingBoxService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataTypeClass = LocalDateTime.class),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class),
@ApiImplicitParam(name = "boxNo", value = "boxid", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "lineBody", value = "线体", paramType = "query", dataTypeClass = Integer.class),
@ApiImplicitParam(name = "printStatus", value = "打印状态0、未打印1、已打印", paramType = "query", dataTypeClass = Integer.class),
@ApiImplicitParam(name = "model", value = "模式1-手动模式2-自动模式", paramType = "query", dataTypeClass = Integer.class)
})
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:page')")
public Result<PageData<WoPackagingBoxDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<WoPackagingBoxDTO> page = woPackagingBoxService.page(params);
return new Result<PageData<WoPackagingBoxDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:info')")
public Result<WoPackagingBoxDTO> get(@PathVariable("id") Long id){
WoPackagingBoxDTO data = woPackagingBoxService.get(id);
return new Result<WoPackagingBoxDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:save')")
public Result<Long> save(@RequestBody WoPackagingBoxDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
woPackagingBoxService.save(dto);
return new Result<Long>().ok(dto.getId());
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:update')")
public Result<Long> update(@RequestBody WoPackagingBoxDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
woPackagingBoxService.update(dto);
return new Result<Long>().ok(dto.getId());
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:delete')")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
woPackagingBoxService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<WoPackagingBoxDTO> list = woPackagingBoxService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, WoPackagingBoxExcel.class);
}
@PostMapping(value = "list")
@ApiOperation(value = "获取列表")
@LogOperation("获取列表")
public List<WoPackagingBoxDTO> list() { return woPackagingBoxService.list(); }
}

View File

@ -0,0 +1,220 @@
package com.cnbm.packing.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.cnbm.admin.annotation.LogOperation;
import com.cnbm.common.constant.Constant;
import com.cnbm.common.page.PageData;
import com.cnbm.common.utils.ExcelUtils;
import com.cnbm.common.utils.Result;
import com.cnbm.common.validator.AssertUtils;
import com.cnbm.common.validator.ValidatorUtils;
import com.cnbm.common.validator.group.AddGroup;
import com.cnbm.common.validator.group.DefaultGroup;
import com.cnbm.common.validator.group.UpdateGroup;
import com.cnbm.packing.dto.WoPackagingBoxSubstrateDTO;
import com.cnbm.packing.entity.WoPackagingBox;
import com.cnbm.packing.entity.WoPackagingBoxSubstrate;
import com.cnbm.packing.excel.WoPackagingBoxSubstrateExcel;
import com.cnbm.packing.mapper.WoPackagingBoxMapper;
import com.cnbm.packing.mapper.WoPackagingBoxSubstrateMapper;
import com.cnbm.packing.service.WoPackagingBoxSubstrateServiceBiz;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 包装箱基板关联表 前端控制器
*
* @author codeGenerator
* @since 2023-02-16
*/
@RestController
@RequestMapping("/packing/woPackagingBoxSubstrate")
@Api(tags="包装箱基板关联表")
public class WoPackagingBoxSubstrateController {
@Autowired
private WoPackagingBoxSubstrateServiceBiz woPackagingBoxSubstrateService;
@Autowired
private WoPackagingBoxSubstrateMapper woPackagingBoxSubstrateMapper;
@Autowired
private WoPackagingBoxMapper woPackagingBoxMapper;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "packagingBoxId", value = "包装箱IDBoxId", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "woSubstrateId", value = "基板ID关联T_SUBSTRATE表", paramType = "query", dataTypeClass = String.class)
})
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:page')")
public Result<PageData<WoPackagingBoxSubstrateDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<WoPackagingBoxSubstrateDTO> page = woPackagingBoxSubstrateService.page(params);
return new Result<PageData<WoPackagingBoxSubstrateDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:info')")
public Result<WoPackagingBoxSubstrateDTO> get(@PathVariable("id") Long id){
WoPackagingBoxSubstrateDTO data = woPackagingBoxSubstrateService.get(id);
return new Result<WoPackagingBoxSubstrateDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:save')")
public Result<Long> save(@RequestBody WoPackagingBoxSubstrateDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
woPackagingBoxSubstrateService.save(dto);
return new Result<Long>().ok(dto.getId());
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:update')")
public Result<Long> update(@RequestBody WoPackagingBoxSubstrateDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
woPackagingBoxSubstrateService.update(dto);
return new Result<Long>().ok(dto.getId());
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:delete')")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
woPackagingBoxSubstrateService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingBoxSubstrate:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<WoPackagingBoxSubstrateDTO> list = woPackagingBoxSubstrateService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, WoPackagingBoxSubstrateExcel.class);
}
@PostMapping("removeSubstrate")
@ApiOperation("移箱")
@LogOperation("移箱")
public Result removeSubstrate(@RequestBody Long id){
woPackagingBoxSubstrateService.removeSubstrate(id);
return new Result();
}
@PostMapping("insertSubstrate")
@ApiOperation("合箱")
@LogOperation("合箱")
public Result insertSubstrate(@RequestBody WoPackagingBoxSubstrateDTO dto){
String woSubstrateId = dto.getWoSubstrateId();
//验证模组是否存在
QueryWrapper<WoPackagingBoxSubstrate> substrateQueryWrapper1 = new QueryWrapper<>();
substrateQueryWrapper1.eq(StringUtils.isNotBlank(woSubstrateId), "woSubstrateId", woSubstrateId);
if(woPackagingBoxSubstrateMapper.selectCount(substrateQueryWrapper1 )== 0){
return new Result().error(1,"该模组不存在,请重新输入");
}
WoPackagingBoxSubstrate substrate = woPackagingBoxSubstrateMapper.selectList(substrateQueryWrapper1).get(0);
//验证模组是否包装箱为空
if(substrate.getPackagingBoxId()!=null){
return new Result().error(1,"该模组在其他包装箱内");
}
//验证slot是否被占用
QueryWrapper<WoPackagingBoxSubstrate> substrateQueryWrapper2 = new QueryWrapper<>();
substrateQueryWrapper2.eq(StringUtils.isNotBlank(dto.getPackagingBoxId()), "packagingBoxId", dto.getPackagingBoxId());
substrateQueryWrapper2.eq(ObjectUtils.isNotNull(dto.getSlot()), "slot", dto.getSlot());
if(woPackagingBoxSubstrateMapper.selectCount(substrateQueryWrapper2) != 0){
return new Result().error(1,"该slot已被占用");
}
//验证该模组的线体功率等级是否BoxID的线体功率等级一致一致保存成功数据发生更新不一致则显示保存失败数据不发生更新
String packagingBoxId = dto.getPackagingBoxId();
QueryWrapper<WoPackagingBox> boxQueryWrapper = new QueryWrapper<>();
boxQueryWrapper.eq(StringUtils.isNotBlank(packagingBoxId), "boxNo", packagingBoxId);
WoPackagingBox box = woPackagingBoxMapper.selectList(boxQueryWrapper).get(0);
if((substrate.getLineBody()==box.getLineBody()) && (substrate.getPowerLevel()==box.getPowerLevel()) )
{
dto.setId(substrate.getId());
woPackagingBoxSubstrateService.insertSubstrate(dto);
return new Result();
}
else{
return new Result().error(1,"保存失败");
}
}
@PostMapping("replaceSubstrate")
@ApiOperation("换箱")
@LogOperation("换箱")
public Result replaceSubstrate(@RequestBody WoPackagingBoxSubstrateDTO[] dtos){
woPackagingBoxSubstrateService.replaceSubstrate(dtos);
return new Result();
}
@PostMapping("slotValidation")
@ApiOperation("slot是否占用验证")
@LogOperation("slot是否占用验证")
public boolean slotValidation(@RequestBody WoPackagingBoxSubstrateDTO dto){
QueryWrapper<WoPackagingBoxSubstrate> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(dto.getPackagingBoxId()), "packagingBoxId", dto.getPackagingBoxId());
wrapper.eq(ObjectUtils.isNotNull(dto.getSlot()), "slot", dto.getSlot());
if(woPackagingBoxSubstrateMapper.selectCount(wrapper) == 0){
return true;
}
else {
return false;
}
}
@PostMapping("batchInsert")
@ApiOperation("手动装箱")
@LogOperation("手动装箱")
public Result batchInsert(@RequestBody WoPackagingBoxSubstrateDTO[] lists){
woPackagingBoxSubstrateService.batchInsert(lists);
return new Result();
}
}

View File

@ -0,0 +1,156 @@
package com.cnbm.packing.controller;
import com.cnbm.admin.annotation.LogOperation;
import com.cnbm.admin.enums.WhetherEnum;
import com.cnbm.common.constant.Constant;
import com.cnbm.common.page.PageData;
import com.cnbm.common.utils.ExcelUtils;
import com.cnbm.common.utils.Result;
import com.cnbm.common.validator.AssertUtils;
import com.cnbm.common.validator.ValidatorUtils;
import com.cnbm.common.validator.group.AddGroup;
import com.cnbm.common.validator.group.DefaultGroup;
import com.cnbm.common.validator.group.UpdateGroup;
import com.cnbm.packing.dto.WoPackagingBoxDTO;
import com.cnbm.packing.dto.WoPackagingPrintHistoryDTO;
import com.cnbm.packing.entity.WoPackagingBox;
import com.cnbm.packing.excel.WoPackagingPrintHistoryExcel;
import com.cnbm.packing.service.WoPackagingBoxServiceBiz;
import com.cnbm.packing.service.WoPackagingPrintHistoryServiceBiz;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
/**
* 包装箱打印历史表 前端控制器
*
* @author packingGenerator
* @since 2023-02-15
*/
@RestController
@RequestMapping("/packing/woPackagingPrintHistory")
@Api(tags="包装箱打印历史表")
public class WoPackagingPrintHistoryController {
@Autowired
private WoPackagingPrintHistoryServiceBiz woPackagingPrintHistoryService;
@Autowired
private WoPackagingBoxServiceBiz woPackagingBoxServiceBiz;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataTypeClass = LocalDateTime.class),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class),
@ApiImplicitParam(name = "boxNo", value = "包装箱编号", paramType = "query", dataTypeClass = String.class)
})
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:page')")
public Result<PageData<WoPackagingPrintHistoryDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<WoPackagingPrintHistoryDTO> page = woPackagingPrintHistoryService.page(params);
return new Result<PageData<WoPackagingPrintHistoryDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:info')")
public Result<WoPackagingPrintHistoryDTO> get(@PathVariable("id") Long id){
WoPackagingPrintHistoryDTO data = woPackagingPrintHistoryService.get(id);
return new Result<WoPackagingPrintHistoryDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:save')")
public Result<Long> save(@RequestBody WoPackagingPrintHistoryDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
woPackagingPrintHistoryService.save(dto);
return new Result<Long>().ok(dto.getId());
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:update')")
public Result<Long> update(@RequestBody WoPackagingPrintHistoryDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
woPackagingPrintHistoryService.update(dto);
return new Result<Long>().ok(dto.getId());
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:delete')")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
woPackagingPrintHistoryService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @PreAuthorize("@ex.hasAuthority('packing:woPackagingPrintHistory:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<WoPackagingPrintHistoryDTO> list = woPackagingPrintHistoryService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, WoPackagingPrintHistoryExcel.class);
}
@PostMapping("print")
@ApiOperation("打印")
@LogOperation("打印")
public Result<Long> print(@RequestBody Long id) {
WoPackagingBoxDTO woPackagingBox = woPackagingBoxServiceBiz.get(id);
WoPackagingPrintHistoryDTO woPackagingPrintHistory = new WoPackagingPrintHistoryDTO();
BeanUtils.copyProperties(woPackagingBox, woPackagingPrintHistory);
woPackagingPrintHistory.setId(null);
woPackagingPrintHistory.setPrintTime(LocalDateTime.now());
//效验数据
ValidatorUtils.validateEntity(woPackagingPrintHistory, AddGroup.class, DefaultGroup.class);
woPackagingPrintHistoryService.save(woPackagingPrintHistory);
//更新包装箱表中打印状态和时间
woPackagingBox.setPrintTime(woPackagingPrintHistory.getPrintTime());
if(woPackagingBox.getPrintStatus()==0){
woPackagingBox.setPrintCount(1);
woPackagingBox.setPrintStatus(WhetherEnum.YES.getValue());
}
else{
woPackagingBox.setPrintCount(woPackagingBox.getPrintCount()+1);
}
return new Result<Long>().ok(woPackagingPrintHistory.getId());
}
}

View File

@ -0,0 +1,122 @@
package com.cnbm.packing.controller;
import com.cnbm.admin.annotation.LogOperation;
import com.cnbm.common.constant.Constant;
import com.cnbm.common.page.PageData;
import com.cnbm.common.utils.ExcelUtils;
import com.cnbm.common.utils.Result;
import com.cnbm.common.validator.AssertUtils;
import com.cnbm.common.validator.ValidatorUtils;
import com.cnbm.common.validator.group.AddGroup;
import com.cnbm.common.validator.group.DefaultGroup;
import com.cnbm.common.validator.group.UpdateGroup;
import com.cnbm.packing.dto.WoPowerLevelDTO;
import com.cnbm.packing.excel.WoPowerLevelExcel;
import com.cnbm.packing.service.WoPowerLevelServiceBiz;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 功率等级 前端控制器
*
* @author packingGenerator
* @since 2023-02-15
*/
@RestController
@RequestMapping("/packing/woPowerLevel")
@Api(tags="功率等级 表")
public class WoPowerLevelController {
@Autowired
private WoPowerLevelServiceBiz woPowerLevelService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "lineBody", value = "线体", paramType = "query", dataTypeClass = Integer.class)
})
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:page')")
public Result<PageData<WoPowerLevelDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<WoPowerLevelDTO> page = woPowerLevelService.page(params);
return new Result<PageData<WoPowerLevelDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:info')")
public Result<WoPowerLevelDTO> get(@PathVariable("id") Long id){
WoPowerLevelDTO data = woPowerLevelService.get(id);
return new Result<WoPowerLevelDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:save')")
public Result<Long> save(@RequestBody WoPowerLevelDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
woPowerLevelService.save(dto);
return new Result<Long>().ok(dto.getId());
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:update')")
public Result<Long> update(@RequestBody WoPowerLevelDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
woPowerLevelService.update(dto);
return new Result<Long>().ok(dto.getId());
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:delete')")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
woPowerLevelService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @PreAuthorize("@ex.hasAuthority('packing:woPowerLevel:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<WoPowerLevelDTO> list = woPowerLevelService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, WoPowerLevelExcel.class);
}
@PostMapping(value = "list")
@ApiOperation(value = "获取功率等级")
@LogOperation("获取功率等级")
public List<WoPowerLevelDTO> list() { return woPowerLevelService.list(); }
}

View File

@ -0,0 +1,78 @@
package com.cnbm.packing.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 包装箱拆合箱历史表
*
* @author codeGenerator
* @since 2023-02-16
*/
@Data
@ApiModel(value = "包装箱拆合箱历史表DTO对象")
public class ChangePackagingBoxHistoryDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
private Long id;
@ApiModelProperty(value = "基板ID或模组id")
private String substrateId;
@ApiModelProperty(value = "源包装箱box no, 关联t_wo_packaging_box.box_no 字段")
private String sourceBoxNo;
@ApiModelProperty(value = "源箱slot")
private Integer sourceSlot;
@ApiModelProperty(value = "离开时间")
private LocalDateTime leaveTime;
@ApiModelProperty(value = "目标箱box no, 关联t_wo_packaging_box.box_no 字段")
private String targetBoxNo;
@ApiModelProperty(value = "目标箱slot")
private Integer targetSlot;
@ApiModelProperty(value = "进入时间")
private LocalDateTime inputTime;
@ApiModelProperty(value = "等级")
private String grade;
@ApiModelProperty(value = "类型1=加入包装箱2=移除包装箱3=换箱")
private Integer type;
@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用")
private Integer valid;
@ApiModelProperty(value = "创建人")
private Long creatorId;
@ApiModelProperty(value = "创建人姓名")
private String creatorName;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "更新人")
private Long updaterId;
@ApiModelProperty(value = "更新人姓名")
private String updaterName;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updateTime;
@ApiModelProperty(value = "版本号")
private Integer version;
}

View File

@ -0,0 +1,80 @@
package com.cnbm.packing.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.math.BigDecimal;
/**
* 打印标签模板表
*
* @author codeGenerator
* @since 2023-02-20
*/
@Data
@ApiModel(value = "打印标签模板表DTO对象")
public class PrintModelDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "编码")
private String code;
@ApiModelProperty(value = "班组名称")
private String name;
@ApiModelProperty(value = "启用状态:0 、停用1、启用")
private Integer enabled;
@ApiModelProperty(value = "创建人")
private Long creatorId;
@ApiModelProperty(value = "创建人姓名")
private String creatorName;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "更新人")
private Long updaterId;
@ApiModelProperty(value = "更新人姓名")
private String updaterName;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updateTime;
@ApiModelProperty(value = "版本号")
private Integer version;
@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用")
private Integer valid;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "类型0模组标签1等级标签")
private Integer type;
@ApiModelProperty(value = "是否默认模板01")
private Integer isDefault;
@ApiModelProperty(value = "是否要预览01")
private Integer isPreview;
@ApiModelProperty(value = "模板内容")
private String content;
@ApiModelProperty(value = "线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)")
private Integer lineBody;
}

View File

@ -0,0 +1,72 @@
package com.cnbm.packing.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 基板补偿功率
*
* @author codeGenerator
* @since 2023-02-20
*/
@Data
@ApiModel(value = "基板补偿功率 表DTO对象")
public class WoCompensationPowerDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
private Long id;
@ApiModelProperty(value = "实际功率下限,(现场人员手动录入),如果实际功率不在范围,那么实际功率就是补偿功率")
private Float actlPmppLow;
@ApiModelProperty(value = "实际功率上限,(现场人员手动录入),如果实际功率不在范围,那么实际功率就是补偿功率")
private Float actlPmppHigh;
@ApiModelProperty(value = "计算公式")
private String formula;
@ApiModelProperty(value = "线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)")
private Integer lineBody;
@ApiModelProperty(value = "系数a,(手动录入)")
private Float coefficientA;
@ApiModelProperty(value = "系数b,(手动录入)")
private Float coefficientB;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用")
private Integer valid;
@ApiModelProperty(value = "创建人")
private Long creatorId;
@ApiModelProperty(value = "创建人姓名")
private String creatorName;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "更新人")
private Long updaterId;
@ApiModelProperty(value = "更新人姓名")
private String updaterName;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updateTime;
@ApiModelProperty(value = "版本号")
private Integer version;
}

View File

@ -0,0 +1,113 @@
package com.cnbm.packing.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.math.BigDecimal;
/**
* 包装箱表
*
* @author codeGenerator
* @since 2023-02-20
*/
@Data
@ApiModel(value = "包装箱表DTO对象")
public class WoPackagingBoxDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
private Long id;
@ApiModelProperty(value = "订单ID")
private Long orderId;
@ApiModelProperty(value = "工单ID舍弃啊")
private Long workOrderId;
@ApiModelProperty(value = "包装箱编号这个就是boxId,关联 t_wo_packaging_box表的 boxId")
private String boxNo;
@ApiModelProperty(value = "功率,单位瓦(舍弃)")
private Integer power;
@ApiModelProperty(value = "等级(舍弃)")
private Integer grade;
@ApiModelProperty(value = "基板数量每个包装箱最大20片舍弃")
private Integer substrateQuantity;
@ApiModelProperty(value = "装箱完成时间,指的是包装完成时间")
private LocalDateTime packagingTime;
@ApiModelProperty(value = "打印时间(最近一次打印时间)")
private LocalDateTime printTime;
@ApiModelProperty(value = "打印状态0、未打印1、已打印")
private Integer printStatus;
@ApiModelProperty(value = "报工状态0、未报工1、已报工(舍弃)")
private Integer completionReportingStatus;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用")
private Integer valid;
@ApiModelProperty(value = "创建人")
private Long creatorId;
@ApiModelProperty(value = "创建人姓名")
private String creatorName;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "更新人")
private Long updaterId;
@ApiModelProperty(value = "更新人姓名")
private String updaterName;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updateTime;
@ApiModelProperty(value = "版本号")
private Integer version;
@ApiModelProperty(value = "离开产线时间(舍弃)")
private LocalDateTime leaveLineTime;
@ApiModelProperty(value = "下片端口id舍弃")
private String portId;
@ApiModelProperty(value = "打印次数")
private Integer printCount;
@ApiModelProperty(value = "功率等级")
private String powerLevel;
@ApiModelProperty(value = "客户id舍弃")
private Long customerId;
@ApiModelProperty(value = "SAP MATERIAL,从t_wo_power_level 对应过来的")
private String sapMaterial;
@ApiModelProperty(value = "线体,从t_wo_power_level 对应过来的1=F ; 2=S")
private Integer lineBody;
@ApiModelProperty(value = "模式1-手动模式2-自动模式")
private Integer model;
@ApiModelProperty(value = "是否到达包装台1=到达2=未达到")
private Integer isArrived;
}

View File

@ -0,0 +1,74 @@
package com.cnbm.packing.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.math.BigDecimal;
/**
* 包装箱基板关联表 ( 基板表 )
*
* @author codeGenerator
* @since 2023-02-21
*/
@Data
@ApiModel(value = "包装箱基板关联表 ( 基板表 )DTO对象")
public class WoPackagingBoxSubstrateDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
private Long id;
@ApiModelProperty(value = "包装箱IDBoxId")
private String packagingBoxId;
@ApiModelProperty(value = "基板ID")
private String woSubstrateId;
@ApiModelProperty(value = "创建人")
private Long creatorId;
@ApiModelProperty(value = "创建人姓名")
private String creatorName;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "更新人")
private Long updaterId;
@ApiModelProperty(value = "更新人姓名")
private String updaterName;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updateTime;
@ApiModelProperty(value = "版本号")
private Integer version;
@ApiModelProperty(value = "箱中位置")
private Integer slot;
@ApiModelProperty(value = "进入时间")
private LocalDateTime inputTime;
@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用")
private Integer valid;
@ApiModelProperty(value = "SAP MATERIAL,从t_wo_power_level 对应过来的")
private String sapMaterial;
@ApiModelProperty(value = "线体,从t_wo_power_level 对应过来的1=F ; 2=S")
private Integer lineBody;
@ApiModelProperty(value = "功率等级")
private String powerLevel;
}

View File

@ -0,0 +1,78 @@
package com.cnbm.packing.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 包装箱打印历史表
*
* @author codeGenerator
* @since 2023-02-15
*/
@Data
@ApiModel(value = "包装箱打印历史表DTO对象")
public class WoPackagingPrintHistoryDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
private Long id;
@ApiModelProperty(value = "包装箱编号关联t_wo_packaging_box.box_no")
private String boxNo;
@ApiModelProperty(value = "打印时间")
private LocalDateTime printTime;
@ApiModelProperty(value = "报工时间")
private LocalDateTime completionReportingTime;
@ApiModelProperty(value = "打印状态0、未打印1、已打印")
private Integer printStatus;
@ApiModelProperty(value = "报工状态0、未报工1、已报工, 指的是向ERP报工")
private Integer completionReportingStatus;
@ApiModelProperty(value = "移箱时间,指的是 箱子离开产线时间")
private LocalDateTime leaveLineTime;
@ApiModelProperty(value = "下片端口id")
private String portId;
@ApiModelProperty(value = "打印次数")
private Integer printCount;
@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用")
private Integer valid;
@ApiModelProperty(value = "创建人")
private Long creatorId;
@ApiModelProperty(value = "创建人姓名")
private String creatorName;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "更新人")
private Long updaterId;
@ApiModelProperty(value = "更新人姓名")
private String updaterName;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updateTime;
@ApiModelProperty(value = "版本号")
private Integer version;
@ApiModelProperty(value = "备注")
private String remark;
}

View File

@ -0,0 +1,83 @@
package com.cnbm.packing.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.math.BigDecimal;
/**
* 功率等级
*
* @author codeGenerator
* @since 2023-02-20
*/
@Data
@ApiModel(value = "功率等级 表DTO对象")
public class WoPowerLevelDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
private Long id;
@ApiModelProperty(value = "功率等级名称,(现场人员手动录入)")
private Integer powerClass;
@ApiModelProperty(value = "pmpp_low,(现场人员手动录入)")
private Float pmppLow;
@ApiModelProperty(value = "pmpp_high,(现场人员手动录入)")
private Float pmppHigh;
@ApiModelProperty(value = "物料号,(现场人员手动录入)")
private String sapMaterialNum;
@ApiModelProperty(value = "线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)")
private Integer lineBody;
@ApiModelProperty(value = "lable_voc,(手动录入)")
private BigDecimal lableVoc;
@ApiModelProperty(value = "lable_isc,(手动录入)")
private BigDecimal lableIsc;
@ApiModelProperty(value = "lable_vmpp,(手动录入)")
private BigDecimal lableVmpp;
@ApiModelProperty(value = "lable_impp,(手动录入)")
private BigDecimal lableImpp;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用")
private Integer valid;
@ApiModelProperty(value = "创建人")
private Long creatorId;
@ApiModelProperty(value = "创建人姓名")
private String creatorName;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "更新人")
private Long updaterId;
@ApiModelProperty(value = "更新人姓名")
private String updaterName;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updateTime;
@ApiModelProperty(value = "版本号")
private Integer version;
}

View File

@ -0,0 +1,118 @@
package com.cnbm.packing.entity;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* <p>
* 包装箱拆合箱历史表
* </p>
*
* @author codeGenerator
* @since 2023-02-16
*/
@Data
@TableName("t_change_packaging_box_history")
@ApiModel(value = "ChangePackagingBoxHistory对象", description = "包装箱拆合箱历史表")
public class ChangePackagingBoxHistory implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("ID")
private Long id;
@ApiModelProperty("基板ID或模组id")
private String substrateId;
@ApiModelProperty("源包装箱box no, 关联t_wo_packaging_box.box_no 字段")
private String sourceBoxNo;
@ApiModelProperty("源箱slot")
private Integer sourceSlot;
@ApiModelProperty("离开时间")
private LocalDateTime leaveTime;
@ApiModelProperty("目标箱box no, 关联t_wo_packaging_box.box_no 字段")
private String targetBoxNo;
@ApiModelProperty("目标箱slot")
private Integer targetSlot;
@ApiModelProperty("进入时间")
private LocalDateTime inputTime;
@ApiModelProperty("等级")
private String grade;
@ApiModelProperty("类型1=加入包装箱2=移除包装箱3=换箱")
private Integer type;
@ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
@TableLogic
private Integer valid;
@ApiModelProperty("创建人")
private Long creatorId;
@ApiModelProperty("创建人姓名")
private String creatorName;
@ApiModelProperty("创建时间")
private LocalDateTime createTime;
@ApiModelProperty("更新人")
private Long updaterId;
@ApiModelProperty("更新人姓名")
private String updaterName;
@ApiModelProperty("更新时间")
private LocalDateTime updateTime;
@ApiModelProperty("版本号")
private Integer version;
public static final String ID = "ID";
public static final String SUBSTRATE_ID = "SUBSTRATE_ID";
public static final String SOURCE_BOX_NO = "SOURCE_BOX_NO";
public static final String SOURCE_SLOT = "SOURCE_SLOT";
public static final String LEAVE_TIME = "LEAVE_TIME";
public static final String TARGET_BOX_NO = "TARGET_BOX_NO";
public static final String TARGET_SLOT = "TARGET_SLOT";
public static final String INPUT_TIME = "INPUT_TIME";
public static final String GRADE = "GRADE";
public static final String TYPE = "TYPE";
public static final String VALID = "VALID";
public static final String CREATOR_ID = "CREATOR_ID";
public static final String CREATOR_NAME = "CREATOR_NAME";
public static final String CREATE_TIME = "CREATE_TIME";
public static final String UPDATER_ID = "UPDATER_ID";
public static final String UPDATER_NAME = "UPDATER_NAME";
public static final String UPDATE_TIME = "UPDATE_TIME";
public static final String VERSION = "VERSION";
}

View File

@ -0,0 +1,118 @@
package com.cnbm.packing.entity;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* <p>
* 打印标签模板表
* </p>
*
* @author codeGenerator
* @since 2023-02-20
*/
@Data
@TableName("t_print_model")
@ApiModel(value = "PrintModel对象", description = "打印标签模板表")
public class PrintModel implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("编码")
private String code;
@ApiModelProperty("班组名称")
private String name;
@ApiModelProperty("启用状态:0 、停用1、启用")
private Integer enabled;
@ApiModelProperty("创建人")
private Long creatorId;
@ApiModelProperty("创建人姓名")
private String creatorName;
@ApiModelProperty("创建时间")
private LocalDateTime createTime;
@ApiModelProperty("更新人")
private Long updaterId;
@ApiModelProperty("更新人姓名")
private String updaterName;
@ApiModelProperty("更新时间")
private LocalDateTime updateTime;
@ApiModelProperty("版本号")
private Integer version;
@ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
@TableLogic
private Integer valid;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("类型0模组标签1等级标签")
private Integer type;
@ApiModelProperty("是否默认模板01")
private Integer isDefault;
@ApiModelProperty("是否要预览01")
private Integer isPreview;
@ApiModelProperty("模板内容")
private String content;
@ApiModelProperty("线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)")
private Integer lineBody;
public static final String ID = "ID";
public static final String CODE = "CODE";
public static final String NAME = "NAME";
public static final String ENABLED = "ENABLED";
public static final String CREATOR_ID = "CREATOR_ID";
public static final String CREATOR_NAME = "CREATOR_NAME";
public static final String CREATE_TIME = "CREATE_TIME";
public static final String UPDATER_ID = "UPDATER_ID";
public static final String UPDATER_NAME = "UPDATER_NAME";
public static final String UPDATE_TIME = "UPDATE_TIME";
public static final String VERSION = "VERSION";
public static final String VALID = "VALID";
public static final String REMARK = "REMARK";
public static final String TYPE = "TYPE";
public static final String IS_DEFAULT = "IS_DEFAULT";
public static final String IS_PREVIEW = "IS_PREVIEW";
public static final String CONTENT = "CONTENT";
public static final String LINE_BODY = "line_body";
}

View File

@ -0,0 +1,109 @@
package com.cnbm.packing.entity;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 基板补偿功率
* </p>
*
* @author codeGenerator
* @since 2023-02-20
*/
@Data
@TableName("t_wo_compensation_power")
@ApiModel(value = "WoCompensationPower对象", description = "基板补偿功率 表")
public class WoCompensationPower implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("ID")
private Long id;
@ApiModelProperty("实际功率下限,(现场人员手动录入),如果实际功率不在范围,那么实际功率就是补偿功率")
private Float actlPmppLow;
@ApiModelProperty("实际功率上限,(现场人员手动录入),如果实际功率不在范围,那么实际功率就是补偿功率")
private Float actlPmppHigh;
@ApiModelProperty("计算公式")
private String formula;
@ApiModelProperty("线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)")
private Integer lineBody;
@ApiModelProperty("系数a,(手动录入)")
private Float coefficientA;
@ApiModelProperty("系数b,(手动录入)")
private Float coefficientB;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
@TableLogic
private Integer valid;
@ApiModelProperty("创建人")
private Long creatorId;
@ApiModelProperty("创建人姓名")
private String creatorName;
@ApiModelProperty("创建时间")
private LocalDateTime createTime;
@ApiModelProperty("更新人")
private Long updaterId;
@ApiModelProperty("更新人姓名")
private String updaterName;
@ApiModelProperty("更新时间")
private LocalDateTime updateTime;
@ApiModelProperty("版本号")
private Integer version;
public static final String ID = "id";
public static final String ACTL_PMPP_LOW = "actl_pmpp_low";
public static final String ACTL_PMPP_HIGH = "actl_pmpp_high";
public static final String FORMULA = "formula";
public static final String LINE_BODY = "line_body";
public static final String COEFFICIENT_A = "coefficient_a";
public static final String COEFFICIENT_B = "coefficient_b";
public static final String REMARK = "remark";
public static final String VALID = "valid";
public static final String CREATOR_ID = "creator_id";
public static final String CREATOR_NAME = "creator_name";
public static final String CREATE_TIME = "create_time";
public static final String UPDATER_ID = "updater_id";
public static final String UPDATER_NAME = "updater_name";
public static final String UPDATE_TIME = "update_time";
public static final String VERSION = "version";
}

View File

@ -0,0 +1,173 @@
package com.cnbm.packing.entity;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* <p>
* 包装箱表
* </p>
*
* @author codeGenerator
* @since 2023-02-20
*/
@Data
@TableName("t_wo_packaging_box")
@ApiModel(value = "WoPackagingBox对象", description = "包装箱表")
public class WoPackagingBox implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("ID")
private Long id;
@ApiModelProperty("订单ID")
private Long orderId;
@ApiModelProperty("工单ID舍弃啊")
private Long workOrderId;
@ApiModelProperty("包装箱编号这个就是boxId,关联 t_wo_packaging_box表的 boxId")
private String boxNo;
@ApiModelProperty("功率,单位瓦(舍弃)")
private Integer power;
@ApiModelProperty("等级(舍弃)")
private Integer grade;
@ApiModelProperty("基板数量每个包装箱最大20片舍弃")
private Integer substrateQuantity;
@ApiModelProperty("装箱完成时间,指的是包装完成时间")
private LocalDateTime packagingTime;
@ApiModelProperty("打印时间(最近一次打印时间)")
private LocalDateTime printTime;
@ApiModelProperty("打印状态0、未打印1、已打印")
private Integer printStatus;
@ApiModelProperty("报工状态0、未报工1、已报工(舍弃)")
private Integer completionReportingStatus;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
@TableLogic
private Integer valid;
@ApiModelProperty("创建人")
private Long creatorId;
@ApiModelProperty("创建人姓名")
private String creatorName;
@ApiModelProperty("创建时间")
private LocalDateTime createTime;
@ApiModelProperty("更新人")
private Long updaterId;
@ApiModelProperty("更新人姓名")
private String updaterName;
@ApiModelProperty("更新时间")
private LocalDateTime updateTime;
@ApiModelProperty("版本号")
private Integer version;
@ApiModelProperty("离开产线时间(舍弃)")
private LocalDateTime leaveLineTime;
@ApiModelProperty("下片端口id舍弃")
private String portId;
@ApiModelProperty("打印次数")
private Integer printCount;
@ApiModelProperty("功率等级")
private String powerLevel;
@ApiModelProperty("客户id舍弃")
private Long customerId;
@ApiModelProperty("SAP MATERIAL,从t_wo_power_level 对应过来的")
private String sapMaterial;
@ApiModelProperty("线体,从t_wo_power_level 对应过来的1=F ; 2=S")
private Integer lineBody;
@ApiModelProperty("模式1-手动模式2-自动模式")
private Integer model;
@ApiModelProperty("是否到达包装台1=到达2=未达到")
private Integer isArrived;
public static final String ID = "ID";
public static final String ORDER_ID = "ORDER_ID";
public static final String WORK_ORDER_ID = "WORK_ORDER_ID";
public static final String BOX_NO = "BOX_NO";
public static final String POWER = "POWER";
public static final String GRADE = "GRADE";
public static final String SUBSTRATE_QUANTITY = "SUBSTRATE_QUANTITY";
public static final String PACKAGING_TIME = "PACKAGING_TIME";
public static final String PRINT_TIME = "PRINT_TIME";
public static final String PRINT_STATUS = "PRINT_STATUS";
public static final String COMPLETION_REPORTING_STATUS = "COMPLETION_REPORTING_STATUS";
public static final String REMARK = "REMARK";
public static final String VALID = "VALID";
public static final String CREATOR_ID = "CREATOR_ID";
public static final String CREATOR_NAME = "CREATOR_NAME";
public static final String CREATE_TIME = "CREATE_TIME";
public static final String UPDATER_ID = "UPDATER_ID";
public static final String UPDATER_NAME = "UPDATER_NAME";
public static final String UPDATE_TIME = "UPDATE_TIME";
public static final String VERSION = "VERSION";
public static final String LEAVE_LINE_TIME = "LEAVE_LINE_TIME";
public static final String PORT_ID = "PORT_ID";
public static final String PRINT_COUNT = "PRINT_COUNT";
public static final String POWER_LEVEL = "POWER_LEVEL";
public static final String CUSTOMER_ID = "CUSTOMER_ID";
public static final String SAP_MATERIAL = "SAP_MATERIAL";
public static final String LINE_BODY = "LINE_BODY";
public static final String MODEL = "model";
public static final String IS_ARRIVED = "is_arrived";
}

View File

@ -0,0 +1,108 @@
package com.cnbm.packing.entity;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* <p>
* 包装箱基板关联表 ( 基板表 )
* </p>
*
* @author codeGenerator
* @since 2023-02-21
*/
@Data
@TableName("t_wo_packaging_box_substrate")
@ApiModel(value = "WoPackagingBoxSubstrate对象", description = "包装箱基板关联表 ( 基板表 )")
public class WoPackagingBoxSubstrate implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("ID")
private Long id;
@ApiModelProperty("包装箱IDBoxId")
private String packagingBoxId;
@ApiModelProperty("基板ID")
private String woSubstrateId;
@ApiModelProperty("创建人")
private Long creatorId;
@ApiModelProperty("创建人姓名")
private String creatorName;
@ApiModelProperty("创建时间")
private LocalDateTime createTime;
@ApiModelProperty("更新人")
private Long updaterId;
@ApiModelProperty("更新人姓名")
private String updaterName;
@ApiModelProperty("更新时间")
private LocalDateTime updateTime;
@ApiModelProperty("版本号")
private Integer version;
@ApiModelProperty("箱中位置")
private Integer slot;
@ApiModelProperty("进入时间")
private LocalDateTime inputTime;
@ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
@TableLogic
private Integer valid;
@ApiModelProperty("SAP MATERIAL,从t_wo_power_level 对应过来的")
private String sapMaterial;
@ApiModelProperty("线体,从t_wo_power_level 对应过来的1=F ; 2=S")
private Integer lineBody;
@ApiModelProperty("功率等级")
private String powerLevel;
public static final String ID = "ID";
public static final String PACKAGING_BOX_ID = "PACKAGING_BOX_ID";
public static final String WO_SUBSTRATE_ID = "WO_SUBSTRATE_ID";
public static final String CREATOR_ID = "CREATOR_ID";
public static final String CREATOR_NAME = "CREATOR_NAME";
public static final String CREATE_TIME = "CREATE_TIME";
public static final String UPDATER_ID = "UPDATER_ID";
public static final String UPDATER_NAME = "UPDATER_NAME";
public static final String UPDATE_TIME = "UPDATE_TIME";
public static final String VERSION = "VERSION";
public static final String SLOT = "SLOT";
public static final String INPUT_TIME = "INPUT_TIME";
public static final String VALID = "VALID";
public static final String SAP_MATERIAL = "SAP_MATERIAL";
public static final String LINE_BODY = "LINE_BODY";
public static final String POWER_LEVEL = "POWER_LEVEL";
}

View File

@ -0,0 +1,119 @@
package com.cnbm.packing.entity;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 包装箱打印历史表
* </p>
*
* @author codeGenerator
* @since 2023-02-15
*/
@Data
@TableName("t_wo_packaging_print_history")
@ApiModel(value = "WoPackagingPrintHistory对象", description = "包装箱打印历史表")
public class WoPackagingPrintHistory implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("ID")
private Long id;
@ApiModelProperty("包装箱编号关联t_wo_packaging_box.box_no")
private String boxNo;
@ApiModelProperty("打印时间")
private LocalDateTime printTime;
@ApiModelProperty("报工时间")
private LocalDateTime completionReportingTime;
@ApiModelProperty("打印状态0、未打印1、已打印")
private Integer printStatus;
@ApiModelProperty("报工状态0、未报工1、已报工, 指的是向ERP报工")
private Integer completionReportingStatus;
@ApiModelProperty("移箱时间,指的是 箱子离开产线时间")
private LocalDateTime leaveLineTime;
@ApiModelProperty("下片端口id")
private String portId;
@ApiModelProperty("打印次数")
private Integer printCount;
@ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
@TableLogic
private Integer valid;
@ApiModelProperty("创建人")
private Long creatorId;
@ApiModelProperty("创建人姓名")
private String creatorName;
@ApiModelProperty("创建时间")
private LocalDateTime createTime;
@ApiModelProperty("更新人")
private Long updaterId;
@ApiModelProperty("更新人姓名")
private String updaterName;
@ApiModelProperty("更新时间")
private LocalDateTime updateTime;
@ApiModelProperty("版本号")
private Integer version;
@ApiModelProperty("备注")
private String remark;
public static final String ID = "ID";
public static final String BOX_NO = "BOX_NO";
public static final String PRINT_TIME = "PRINT_TIME";
public static final String COMPLETION_REPORTING_TIME = "COMPLETION_REPORTING_TIME";
public static final String PRINT_STATUS = "PRINT_STATUS";
public static final String COMPLETION_REPORTING_STATUS = "COMPLETION_REPORTING_STATUS";
public static final String LEAVE_LINE_TIME = "LEAVE_LINE_TIME";
public static final String PORT_ID = "PORT_ID";
public static final String PRINT_COUNT = "PRINT_COUNT";
public static final String VALID = "VALID";
public static final String CREATOR_ID = "CREATOR_ID";
public static final String CREATOR_NAME = "CREATOR_NAME";
public static final String CREATE_TIME = "CREATE_TIME";
public static final String UPDATER_ID = "UPDATER_ID";
public static final String UPDATER_NAME = "UPDATER_NAME";
public static final String UPDATE_TIME = "UPDATE_TIME";
public static final String VERSION = "VERSION";
public static final String REMARK = "REMARK";
}

View File

@ -0,0 +1,124 @@
package com.cnbm.packing.entity;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* <p>
* 功率等级
* </p>
*
* @author codeGenerator
* @since 2023-02-20
*/
@Data
@TableName("t_wo_power_level")
@ApiModel(value = "WoPowerLevel对象", description = "功率等级 表")
public class WoPowerLevel implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("ID")
private Long id;
@ApiModelProperty("功率等级名称,(现场人员手动录入)")
private Integer powerClass;
@ApiModelProperty("pmpp_low,(现场人员手动录入)")
private Float pmppLow;
@ApiModelProperty("pmpp_high,(现场人员手动录入)")
private Float pmppHigh;
@ApiModelProperty("物料号,(现场人员手动录入)")
private String sapMaterialNum;
@ApiModelProperty("线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)")
private Integer lineBody;
@ApiModelProperty("lable_voc,(手动录入)")
private BigDecimal lableVoc;
@ApiModelProperty("lable_isc,(手动录入)")
private BigDecimal lableIsc;
@ApiModelProperty("lable_vmpp,(手动录入)")
private BigDecimal lableVmpp;
@ApiModelProperty("lable_impp,(手动录入)")
private BigDecimal lableImpp;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
@TableLogic
private Integer valid;
@ApiModelProperty("创建人")
private Long creatorId;
@ApiModelProperty("创建人姓名")
private String creatorName;
@ApiModelProperty("创建时间")
private LocalDateTime createTime;
@ApiModelProperty("更新人")
private Long updaterId;
@ApiModelProperty("更新人姓名")
private String updaterName;
@ApiModelProperty("更新时间")
private LocalDateTime updateTime;
@ApiModelProperty("版本号")
private Integer version;
public static final String ID = "id";
public static final String POWER_CLASS = "power_class";
public static final String PMPP_LOW = "pmpp_low";
public static final String PMPP_HIGH = "pmpp_high";
public static final String SAP_MATERIAL_NUM = "sap_material_num";
public static final String LINE_BODY = "line_body";
public static final String LABLE_VOC = "lable_voc";
public static final String LABLE_ISC = "lable_isc";
public static final String LABLE_VMPP = "lable_vmpp";
public static final String LABLE_IMPP = "lable_impp";
public static final String REMARK = "remark";
public static final String VALID = "valid";
public static final String CREATOR_ID = "creator_id";
public static final String CREATOR_NAME = "creator_name";
public static final String CREATE_TIME = "create_time";
public static final String UPDATER_ID = "updater_id";
public static final String UPDATER_NAME = "updater_name";
public static final String UPDATE_TIME = "update_time";
public static final String VERSION = "version";
}

View File

@ -0,0 +1,56 @@
package com.cnbm.packing.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.time.LocalDateTime;
import java.math.BigDecimal;
import java.util.Date;
/**
* 包装箱拆合箱历史表
*
* @author codeGenerator
* @since 2023-02-16
*/
@Data
public class ChangePackagingBoxHistoryExcel {
@Excel(name = "ID")
private Long id;
@Excel(name = "基板ID或模组id")
private String substrateId;
@Excel(name = "源包装箱box no, 关联t_wo_packaging_box.box_no 字段")
private String sourceBoxNo;
@Excel(name = "源箱slot")
private Integer sourceSlot;
@Excel(name = "离开时间")
private LocalDateTime leaveTime;
@Excel(name = "目标箱box no, 关联t_wo_packaging_box.box_no 字段")
private String targetBoxNo;
@Excel(name = "目标箱slot")
private Integer targetSlot;
@Excel(name = "进入时间")
private LocalDateTime inputTime;
@Excel(name = "等级")
private String grade;
@Excel(name = "类型1=加入包装箱2=移除包装箱3=换箱")
private Integer type;
@Excel(name = "删除标志,是否有效:1 可用 0不可用")
private Integer valid;
@Excel(name = "创建人")
private Long creatorId;
@Excel(name = "创建人姓名")
private String creatorName;
@Excel(name = "创建时间")
private LocalDateTime createTime;
@Excel(name = "更新人")
private Long updaterId;
@Excel(name = "更新人姓名")
private String updaterName;
@Excel(name = "更新时间")
private LocalDateTime updateTime;
@Excel(name = "版本号")
private Integer version;
}

View File

@ -0,0 +1,56 @@
package com.cnbm.packing.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.time.LocalDateTime;
import java.math.BigDecimal;
import java.util.Date;
/**
* 打印标签模板表
*
* @author codeGenerator
* @since 2023-02-20
*/
@Data
public class PrintModelExcel {
@Excel(name = "id")
private Long id;
@Excel(name = "编码")
private String code;
@Excel(name = "班组名称")
private String name;
@Excel(name = "启用状态:0 、停用1、启用")
private Integer enabled;
@Excel(name = "创建人")
private Long creatorId;
@Excel(name = "创建人姓名")
private String creatorName;
@Excel(name = "创建时间")
private LocalDateTime createTime;
@Excel(name = "更新人")
private Long updaterId;
@Excel(name = "更新人姓名")
private String updaterName;
@Excel(name = "更新时间")
private LocalDateTime updateTime;
@Excel(name = "版本号")
private Integer version;
@Excel(name = "删除标志,是否有效:1 可用 0不可用")
private Integer valid;
@Excel(name = "备注")
private String remark;
@Excel(name = "类型0模组标签1等级标签")
private Integer type;
@Excel(name = "是否默认模板01")
private Integer isDefault;
@Excel(name = "是否要预览01")
private Integer isPreview;
@Excel(name = "模板内容")
private String content;
@Excel(name = "线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)")
private Integer lineBody;
}

View File

@ -0,0 +1,49 @@
package com.cnbm.packing.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 基板补偿功率
*
* @author codeGenerator
* @since 2023-02-20
*/
@Data
public class WoCompensationPowerExcel {
@Excel(name = "ID")
private Long id;
@Excel(name = "实际功率下限,(现场人员手动录入),如果实际功率不在范围,那么实际功率就是补偿功率")
private Float actlPmppLow;
@Excel(name = "实际功率上限,(现场人员手动录入),如果实际功率不在范围,那么实际功率就是补偿功率")
private Float actlPmppHigh;
@Excel(name = "计算公式")
private String formula;
@Excel(name = "线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)")
private Integer lineBody;
@Excel(name = "系数a,(手动录入)")
private Float coefficientA;
@Excel(name = "系数b,(手动录入)")
private Float coefficientB;
@Excel(name = "备注")
private String remark;
@Excel(name = "删除标志,是否有效:1 可用 0不可用")
private Integer valid;
@Excel(name = "创建人")
private Long creatorId;
@Excel(name = "创建人姓名")
private String creatorName;
@Excel(name = "创建时间")
private LocalDateTime createTime;
@Excel(name = "更新人")
private Long updaterId;
@Excel(name = "更新人姓名")
private String updaterName;
@Excel(name = "更新时间")
private LocalDateTime updateTime;
@Excel(name = "版本号")
private Integer version;
}

View File

@ -0,0 +1,78 @@
package com.cnbm.packing.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.time.LocalDateTime;
import java.math.BigDecimal;
import java.util.Date;
/**
* 包装箱表
*
* @author codeGenerator
* @since 2023-02-20
*/
@Data
public class WoPackagingBoxExcel {
@Excel(name = "ID")
private Long id;
@Excel(name = "订单ID")
private Long orderId;
@Excel(name = "工单ID舍弃啊")
private Long workOrderId;
@Excel(name = "包装箱编号这个就是boxId,关联 t_wo_packaging_box表的 boxId")
private String boxNo;
@Excel(name = "功率,单位瓦(舍弃)")
private Integer power;
@Excel(name = "等级(舍弃)")
private Integer grade;
@Excel(name = "基板数量每个包装箱最大20片舍弃")
private Integer substrateQuantity;
@Excel(name = "装箱完成时间,指的是包装完成时间")
private LocalDateTime packagingTime;
@Excel(name = "打印时间(最近一次打印时间)")
private LocalDateTime printTime;
@Excel(name = "打印状态0、未打印1、已打印")
private Integer printStatus;
@Excel(name = "报工状态0、未报工1、已报工(舍弃)")
private Integer completionReportingStatus;
@Excel(name = "备注")
private String remark;
@Excel(name = "删除标志,是否有效:1 可用 0不可用")
private Integer valid;
@Excel(name = "创建人")
private Long creatorId;
@Excel(name = "创建人姓名")
private String creatorName;
@Excel(name = "创建时间")
private LocalDateTime createTime;
@Excel(name = "更新人")
private Long updaterId;
@Excel(name = "更新人姓名")
private String updaterName;
@Excel(name = "更新时间")
private LocalDateTime updateTime;
@Excel(name = "版本号")
private Integer version;
@Excel(name = "离开产线时间(舍弃)")
private LocalDateTime leaveLineTime;
@Excel(name = "下片端口id舍弃")
private String portId;
@Excel(name = "打印次数")
private Integer printCount;
@Excel(name = "功率等级")
private String powerLevel;
@Excel(name = "客户id舍弃")
private Long customerId;
@Excel(name = "SAP MATERIAL,从t_wo_power_level 对应过来的")
private String sapMaterial;
@Excel(name = "线体,从t_wo_power_level 对应过来的1=F ; 2=S")
private Integer lineBody;
@Excel(name = "模式1-手动模式2-自动模式")
private Integer model;
@Excel(name = "是否到达包装台1=到达2=未达到")
private Integer isArrived;
}

View File

@ -0,0 +1,52 @@
package com.cnbm.packing.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.time.LocalDateTime;
import java.math.BigDecimal;
import java.util.Date;
/**
* 包装箱基板关联表 ( 基板表 )
*
* @author codeGenerator
* @since 2023-02-21
*/
@Data
public class WoPackagingBoxSubstrateExcel {
@Excel(name = "ID")
private Long id;
@Excel(name = "包装箱IDBoxId")
private String packagingBoxId;
@Excel(name = "基板ID")
private String woSubstrateId;
@Excel(name = "创建人")
private Long creatorId;
@Excel(name = "创建人姓名")
private String creatorName;
@Excel(name = "创建时间")
private LocalDateTime createTime;
@Excel(name = "更新人")
private Long updaterId;
@Excel(name = "更新人姓名")
private String updaterName;
@Excel(name = "更新时间")
private LocalDateTime updateTime;
@Excel(name = "版本号")
private Integer version;
@Excel(name = "箱中位置")
private Integer slot;
@Excel(name = "进入时间")
private LocalDateTime inputTime;
@Excel(name = "删除标志,是否有效:1 可用 0不可用")
private Integer valid;
@Excel(name = "SAP MATERIAL,从t_wo_power_level 对应过来的")
private String sapMaterial;
@Excel(name = "线体,从t_wo_power_level 对应过来的1=F ; 2=S")
private Integer lineBody;
@Excel(name = "功率等级")
private String powerLevel;
}

View File

@ -0,0 +1,53 @@
package com.cnbm.packing.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 包装箱打印历史表
*
* @author codeGenerator
* @since 2023-02-15
*/
@Data
public class WoPackagingPrintHistoryExcel {
@Excel(name = "ID")
private Long id;
@Excel(name = "包装箱编号关联t_wo_packaging_box.box_no")
private String boxNo;
@Excel(name = "打印时间")
private LocalDateTime printTime;
@Excel(name = "报工时间")
private LocalDateTime completionReportingTime;
@Excel(name = "打印状态0、未打印1、已打印")
private Integer printStatus;
@Excel(name = "报工状态0、未报工1、已报工, 指的是向ERP报工")
private Integer completionReportingStatus;
@Excel(name = "移箱时间,指的是 箱子离开产线时间")
private LocalDateTime leaveLineTime;
@Excel(name = "下片端口id")
private String portId;
@Excel(name = "打印次数")
private Integer printCount;
@Excel(name = "删除标志,是否有效:1 可用 0不可用")
private Integer valid;
@Excel(name = "创建人")
private Long creatorId;
@Excel(name = "创建人姓名")
private String creatorName;
@Excel(name = "创建时间")
private LocalDateTime createTime;
@Excel(name = "更新人")
private Long updaterId;
@Excel(name = "更新人姓名")
private String updaterName;
@Excel(name = "更新时间")
private LocalDateTime updateTime;
@Excel(name = "版本号")
private Integer version;
@Excel(name = "备注")
private String remark;
}

View File

@ -0,0 +1,58 @@
package com.cnbm.packing.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.time.LocalDateTime;
import java.math.BigDecimal;
import java.util.Date;
/**
* 功率等级
*
* @author codeGenerator
* @since 2023-02-20
*/
@Data
public class WoPowerLevelExcel {
@Excel(name = "ID")
private Long id;
@Excel(name = "功率等级名称,(现场人员手动录入)")
private Integer powerClass;
@Excel(name = "pmpp_low,(现场人员手动录入)")
private Float pmppLow;
@Excel(name = "pmpp_high,(现场人员手动录入)")
private Float pmppHigh;
@Excel(name = "物料号,(现场人员手动录入)")
private String sapMaterialNum;
@Excel(name = "线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)")
private Integer lineBody;
@Excel(name = "lable_voc,(手动录入)")
private BigDecimal lableVoc;
@Excel(name = "lable_isc,(手动录入)")
private BigDecimal lableIsc;
@Excel(name = "lable_vmpp,(手动录入)")
private BigDecimal lableVmpp;
@Excel(name = "lable_impp,(手动录入)")
private BigDecimal lableImpp;
@Excel(name = "备注")
private String remark;
@Excel(name = "删除标志,是否有效:1 可用 0不可用")
private Integer valid;
@Excel(name = "创建人")
private Long creatorId;
@Excel(name = "创建人姓名")
private String creatorName;
@Excel(name = "创建时间")
private LocalDateTime createTime;
@Excel(name = "更新人")
private Long updaterId;
@Excel(name = "更新人姓名")
private String updaterName;
@Excel(name = "更新时间")
private LocalDateTime updateTime;
@Excel(name = "版本号")
private Integer version;
}

View File

@ -0,0 +1,21 @@
package com.cnbm.packing.mapper;
import com.cnbm.common.dao.BaseDao;
import com.cnbm.packing.dto.ChangePackagingBoxHistoryDTO;
import com.cnbm.packing.entity.ChangePackagingBoxHistory;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 包装箱拆合箱历史表
*
* @author codeGenerator
* @since 2023-02-16
*/
@Mapper
public interface ChangePackagingBoxHistoryMapper extends BaseDao<ChangePackagingBoxHistory> {
List<ChangePackagingBoxHistoryDTO> list();
}

View File

@ -0,0 +1,21 @@
package com.cnbm.packing.mapper;
import com.cnbm.common.dao.BaseDao;
import com.cnbm.packing.dto.PrintModelDTO;
import com.cnbm.packing.entity.PrintModel;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 打印标签模板表
*
* @author codeGenerator
* @since 2023-02-15
*/
@Mapper
public interface PrintModelMapper extends BaseDao<PrintModel> {
List<PrintModelDTO> list();
}

View File

@ -0,0 +1,21 @@
package com.cnbm.packing.mapper;
import com.cnbm.common.dao.BaseDao;
import com.cnbm.packing.dto.WoCompensationPowerDTO;
import com.cnbm.packing.entity.WoCompensationPower;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 基板补偿功率
*
* @author codeGenerator
* @since 2023-02-20
*/
@Mapper
public interface WoCompensationPowerMapper extends BaseDao<WoCompensationPower> {
List<WoCompensationPowerDTO> list();
}

View File

@ -0,0 +1,27 @@
package com.cnbm.packing.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cnbm.common.dao.BaseDao;
import com.cnbm.common.page.PageData;
import com.cnbm.packing.dto.WoPackagingBoxDTO;
import com.cnbm.packing.dto.WoPowerLevelDTO;
import com.cnbm.packing.entity.WoPackagingBox;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 包装箱表
*
* @author codeGenerator
* @since 2023-02-15
*/
@Mapper
public interface WoPackagingBoxMapper extends BaseDao<WoPackagingBox> {
List<WoPackagingBoxDTO> list();
}

View File

@ -0,0 +1,16 @@
package com.cnbm.packing.mapper;
import com.cnbm.common.dao.BaseDao;
import com.cnbm.packing.entity.WoPackagingBoxSubstrate;
import org.apache.ibatis.annotations.Mapper;
/**
* 包装箱基板关联表
*
* @author codeGenerator
* @since 2023-02-16
*/
@Mapper
public interface WoPackagingBoxSubstrateMapper extends BaseDao<WoPackagingBoxSubstrate> {
}

View File

@ -0,0 +1,21 @@
package com.cnbm.packing.mapper;
import com.cnbm.common.dao.BaseDao;
import com.cnbm.packing.dto.WoPackagingPrintHistoryDTO;
import com.cnbm.packing.entity.WoPackagingPrintHistory;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 包装箱打印历史表
*
* @author codeGenerator
* @since 2023-02-15
*/
@Mapper
public interface WoPackagingPrintHistoryMapper extends BaseDao<WoPackagingPrintHistory> {
List<WoPackagingPrintHistoryDTO> list();
}

View File

@ -0,0 +1,21 @@
package com.cnbm.packing.mapper;
import com.cnbm.common.dao.BaseDao;
import com.cnbm.packing.dto.WoPowerLevelDTO;
import com.cnbm.packing.entity.WoPowerLevel;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 功率等级
*
* @author codeGenerator
* @since 2023-02-15
*/
@Mapper
public interface WoPowerLevelMapper extends BaseDao<WoPowerLevel> {
List<WoPowerLevelDTO> list();
}

View File

@ -0,0 +1,29 @@
package com.cnbm.packing.service;
import com.cnbm.common.page.PageData;
import com.cnbm.common.service.CrudService;
import com.cnbm.packing.dto.ChangePackagingBoxHistoryDTO;
import com.cnbm.packing.dto.ChangePackagingBoxHistoryDTO;
import com.cnbm.packing.entity.ChangePackagingBoxHistory;
import java.util.Map;
/**
* 包装箱拆合箱历史表
*
* @author codeGenerator
* @since 2023-02-16
*/
public interface ChangePackagingBoxHistoryServiceBiz extends CrudService<ChangePackagingBoxHistory, ChangePackagingBoxHistoryDTO> {
PageData<ChangePackagingBoxHistoryDTO> page (Map<String, Object> params);
ChangePackagingBoxHistoryDTO get(Long id);
void save(ChangePackagingBoxHistoryDTO dto);
void update(ChangePackagingBoxHistoryDTO dto);
void delete(Long[] ids);
}

View File

@ -0,0 +1,34 @@
package com.cnbm.packing.service;
import com.cnbm.common.page.PageData;
import com.cnbm.common.service.CrudService;
import com.cnbm.packing.dto.PrintModelDTO;
import com.cnbm.packing.dto.PrintModelDTO;
import com.cnbm.packing.entity.PrintModel;
import java.util.List;
import java.util.Map;
/**
* 打印标签模板表
*
* @author codeGenerator
* @since 2023-02-15
*/
public interface PrintModelServiceBiz extends CrudService<PrintModel, PrintModelDTO> {
PageData<PrintModelDTO> page (Map<String, Object> params);
PrintModelDTO get(Long id);
void save(PrintModelDTO dto);
void update(PrintModelDTO dto);
void delete(Long[] ids);
List<PrintModelDTO> list();
String getCode();
}

View File

@ -0,0 +1,31 @@
package com.cnbm.packing.service;
import com.cnbm.common.page.PageData;
import com.cnbm.common.service.CrudService;
import com.cnbm.packing.dto.WoCompensationPowerDTO;
import com.cnbm.packing.entity.WoCompensationPower;
import java.util.List;
import java.util.Map;
/**
* 基板补偿功率
*
* @author codeGenerator
* @since 2023-02-20
*/
public interface WoCompensationPowerServiceBiz extends CrudService<WoCompensationPower, WoCompensationPowerDTO> {
PageData<WoCompensationPowerDTO> page (Map<String, Object> params);
WoCompensationPowerDTO get(Long id);
void save(WoCompensationPowerDTO dto);
void update(WoCompensationPowerDTO dto);
void delete(Long[] ids);
List<WoCompensationPowerDTO> list();
}

View File

@ -0,0 +1,32 @@
package com.cnbm.packing.service;
import com.cnbm.common.page.PageData;
import com.cnbm.common.service.CrudService;
import com.cnbm.packing.dto.WoPackagingBoxDTO;
import com.cnbm.packing.dto.WoPackagingBoxDTO;
import com.cnbm.packing.entity.WoPackagingBox;
import java.util.List;
import java.util.Map;
/**
* 包装箱表
*
* @author codeGenerator
* @since 2023-02-15
*/
public interface WoPackagingBoxServiceBiz extends CrudService<WoPackagingBox, WoPackagingBoxDTO> {
PageData<WoPackagingBoxDTO> page (Map<String, Object> params);
WoPackagingBoxDTO get(Long id);
void save(WoPackagingBoxDTO dto);
void update(WoPackagingBoxDTO dto);
void delete(Long[] ids);
List<WoPackagingBoxDTO> list();
}

View File

@ -0,0 +1,36 @@
package com.cnbm.packing.service;
import com.cnbm.common.page.PageData;
import com.cnbm.common.service.CrudService;
import com.cnbm.packing.dto.WoPackagingBoxSubstrateDTO;
import com.cnbm.packing.entity.WoPackagingBoxSubstrate;
import java.util.Map;
/**
* 包装箱基板关联表
*
* @author codeGenerator
* @since 2023-02-16
*/
public interface WoPackagingBoxSubstrateServiceBiz extends CrudService<WoPackagingBoxSubstrate, WoPackagingBoxSubstrateDTO> {
PageData<WoPackagingBoxSubstrateDTO> page (Map<String, Object> params);
WoPackagingBoxSubstrateDTO get(Long id);
void save(WoPackagingBoxSubstrateDTO dto);
void update(WoPackagingBoxSubstrateDTO dto);
void delete(Long[] ids);
void removeSubstrate(Long id);
void insertSubstrate(WoPackagingBoxSubstrateDTO dto);
void replaceSubstrate(WoPackagingBoxSubstrateDTO[] dtos);
void batchInsert(WoPackagingBoxSubstrateDTO[] lists);
}

View File

@ -0,0 +1,31 @@
package com.cnbm.packing.service;
import com.cnbm.common.page.PageData;
import com.cnbm.common.service.CrudService;
import com.cnbm.packing.dto.WoPackagingPrintHistoryDTO;
import com.cnbm.packing.entity.WoPackagingPrintHistory;
import java.util.List;
import java.util.Map;
/**
* 包装箱打印历史表
*
* @author codeGenerator
* @since 2023-02-15
*/
public interface WoPackagingPrintHistoryServiceBiz extends CrudService<WoPackagingPrintHistory, WoPackagingPrintHistoryDTO> {
PageData<WoPackagingPrintHistoryDTO> page (Map<String, Object> params);
WoPackagingPrintHistoryDTO get(Long id);
void save(WoPackagingPrintHistoryDTO dto);
void update(WoPackagingPrintHistoryDTO dto);
void delete(Long[] ids);
List<WoPackagingPrintHistoryDTO> list();
}

View File

@ -0,0 +1,31 @@
package com.cnbm.packing.service;
import com.cnbm.common.page.PageData;
import com.cnbm.common.service.CrudService;
import com.cnbm.packing.dto.WoPowerLevelDTO;
import com.cnbm.packing.entity.WoPowerLevel;
import java.util.List;
import java.util.Map;
/**
* 功率等级
*
* @author codeGenerator
* @since 2023-02-15
*/
public interface WoPowerLevelServiceBiz extends CrudService<WoPowerLevel, WoPowerLevelDTO> {
PageData<WoPowerLevelDTO> page (Map<String, Object> params);
WoPowerLevelDTO get(Long id);
void save(WoPowerLevelDTO dto);
void update(WoPowerLevelDTO dto);
void delete(Long[] ids);
List<WoPowerLevelDTO> list();
}

View File

@ -0,0 +1,85 @@
package com.cnbm.packing.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.cnbm.common.page.PageData;
import com.cnbm.common.service.impl.CrudServiceImpl;
import com.cnbm.common.utils.ConvertUtils;
import com.cnbm.packing.dto.ChangePackagingBoxHistoryDTO;
import com.cnbm.packing.dto.ChangePackagingBoxHistoryDTO;
import com.cnbm.packing.entity.ChangePackagingBoxHistory;
import com.cnbm.packing.entity.ChangePackagingBoxHistory;
import com.cnbm.packing.entity.WoPowerLevel;
import com.cnbm.packing.mapper.ChangePackagingBoxHistoryMapper;
import com.cnbm.packing.service.ChangePackagingBoxHistoryServiceBiz;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.Map;
/**
* 包装箱拆合箱历史表
*
* @author codeGenerator
* @since 2023-02-16
*/
@Service
public class ChangePackagingBoxHistoryServiceBizImpl extends CrudServiceImpl<ChangePackagingBoxHistoryMapper, ChangePackagingBoxHistory, ChangePackagingBoxHistoryDTO> implements ChangePackagingBoxHistoryServiceBiz {
@Override
public QueryWrapper<ChangePackagingBoxHistory> getWrapper(Map<String, Object> params){
LocalDateTime startTime = (LocalDateTime) params.get("startTime");
LocalDateTime endTime = (LocalDateTime) params.get("endTime");
QueryWrapper<ChangePackagingBoxHistory> wrapper = new QueryWrapper<>();
wrapper.between(startTime!=null && endTime!=null,ChangePackagingBoxHistory.INPUT_TIME, startTime, endTime);
wrapper.between(startTime!=null && endTime!=null,ChangePackagingBoxHistory.LEAVE_TIME, startTime, endTime);
if(params.get("type")!=null) {
Integer type = Integer.parseInt( params.get("type").toString());
wrapper.eq(ObjectUtils.isNotNull(type), ChangePackagingBoxHistory.TYPE, type);
}
return wrapper;
}
@Override
public PageData<ChangePackagingBoxHistoryDTO> page (Map<String, Object> params){
IPage<ChangePackagingBoxHistory> page = baseDao.selectPage(
getPage(params, ChangePackagingBoxHistory.CREATE_TIME, true),
getWrapper(params)
);
return getPageData(page, ChangePackagingBoxHistoryDTO.class);
}
@Override
public ChangePackagingBoxHistoryDTO get(Long id) {
ChangePackagingBoxHistory entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, ChangePackagingBoxHistoryDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(ChangePackagingBoxHistoryDTO dto) {
ChangePackagingBoxHistory entity = ConvertUtils.sourceToTarget(dto, ChangePackagingBoxHistory.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(ChangePackagingBoxHistoryDTO dto) {
ChangePackagingBoxHistory entity = ConvertUtils.sourceToTarget(dto, ChangePackagingBoxHistory.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(Long[] ids) {
//删除
deleteBatchIds(Arrays.asList(ids));
}
}

View File

@ -0,0 +1,95 @@
package com.cnbm.packing.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cnbm.admin.utils.CodeGeneratorHelper;
import com.cnbm.common.page.PageData;
import com.cnbm.common.service.impl.CrudServiceImpl;
import com.cnbm.common.utils.ConvertUtils;
import com.cnbm.packing.dto.PrintModelDTO;
import com.cnbm.packing.entity.PrintModel;
import com.cnbm.packing.mapper.PrintModelMapper;
import com.cnbm.packing.service.PrintModelServiceBiz;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 打印标签模板表
*
* @author codeGenerator
* @since 2023-02-15
*/
@Service
public class PrintModelServiceBizImpl extends CrudServiceImpl<PrintModelMapper, PrintModel, PrintModelDTO> implements PrintModelServiceBiz {
@Autowired
private PrintModelMapper mapper;
@Override
public QueryWrapper<PrintModel> getWrapper(Map<String, Object> params){
String name = (String)params.get("name");
QueryWrapper<PrintModel> wrapper = new QueryWrapper<>();
wrapper.like(StringUtils.isNotBlank(name), PrintModel.NAME, name);
return wrapper;
}
@Override
public PageData<PrintModelDTO> page (Map<String, Object> params){
IPage<PrintModel> page = baseDao.selectPage(
getPage(params, PrintModel.ID, true),
getWrapper(params)
);
return getPageData(page, PrintModelDTO.class);
}
@Override
public PrintModelDTO get(Long id) {
PrintModel entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, PrintModelDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(PrintModelDTO dto) {
PrintModel entity = ConvertUtils.sourceToTarget(dto, PrintModel.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(PrintModelDTO dto) {
PrintModel entity = ConvertUtils.sourceToTarget(dto, PrintModel.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(Long[] ids) {
//删除
deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional(rollbackFor = Exception.class)
public List<PrintModelDTO> list() {
List<PrintModelDTO> list = mapper.list();
return list;
}
@Override
@Transactional(rollbackFor = Exception.class)
public String getCode() {
return CodeGeneratorHelper.getPrintModelCode();
}
}

View File

@ -0,0 +1,90 @@
package com.cnbm.packing.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.cnbm.common.page.PageData;
import com.cnbm.common.service.impl.CrudServiceImpl;
import com.cnbm.common.utils.ConvertUtils;
import com.cnbm.packing.dto.WoCompensationPowerDTO;
import com.cnbm.packing.entity.WoCompensationPower;
import com.cnbm.packing.entity.WoPowerLevel;
import com.cnbm.packing.mapper.WoCompensationPowerMapper;
import com.cnbm.packing.service.WoCompensationPowerServiceBiz;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 基板补偿功率
*
* @author codeGenerator
* @since 2023-02-20
*/
@Service
public class WoCompensationPowerServiceBizImpl extends CrudServiceImpl<WoCompensationPowerMapper, WoCompensationPower, WoCompensationPowerDTO> implements WoCompensationPowerServiceBiz {
@Autowired
private WoCompensationPowerMapper mapper;
@Override
public QueryWrapper<WoCompensationPower> getWrapper(Map<String, Object> params){
QueryWrapper<WoCompensationPower> wrapper = new QueryWrapper<>();
if(params.get("lineBody")!=null) {
Integer lineBody = Integer.parseInt(params.get("lineBody").toString());
wrapper.eq(ObjectUtils.isNotNull(lineBody), WoCompensationPower.LINE_BODY, lineBody);
}
return wrapper;
}
@Override
public PageData<WoCompensationPowerDTO> page (Map<String, Object> params){
IPage<WoCompensationPower> page = baseDao.selectPage(
getPage(params, WoCompensationPower.ID, true),
getWrapper(params)
);
return getPageData(page, WoCompensationPowerDTO.class);
}
@Override
public WoCompensationPowerDTO get(Long id) {
WoCompensationPower entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, WoCompensationPowerDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(WoCompensationPowerDTO dto) {
WoCompensationPower entity = ConvertUtils.sourceToTarget(dto, WoCompensationPower.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(WoCompensationPowerDTO dto) {
WoCompensationPower entity = ConvertUtils.sourceToTarget(dto, WoCompensationPower.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(Long[] ids) {
//删除
deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional(rollbackFor = Exception.class)
public List<WoCompensationPowerDTO> list() {
List<WoCompensationPowerDTO> list = mapper.list();
return list;
}
}

View File

@ -0,0 +1,113 @@
package com.cnbm.packing.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cnbm.common.page.PageData;
import com.cnbm.common.service.impl.CrudServiceImpl;
import com.cnbm.common.utils.ConvertUtils;
import com.cnbm.packing.dto.WoPackagingBoxDTO;
import com.cnbm.packing.dto.WoPackagingBoxDTO;
import com.cnbm.packing.dto.WoPowerLevelDTO;
import com.cnbm.packing.entity.WoPackagingBox;
import com.cnbm.packing.entity.WoPackagingBox;
import com.cnbm.packing.entity.WoPowerLevel;
import com.cnbm.packing.mapper.WoPackagingBoxMapper;
import com.cnbm.packing.mapper.WoPackagingBoxMapper;
import com.cnbm.packing.service.WoPackagingBoxServiceBiz;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 包装箱表
*
* @author codeGenerator
* @since 2023-02-15
*/
@Service
public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBoxMapper, WoPackagingBox, WoPackagingBoxDTO> implements WoPackagingBoxServiceBiz {
@Autowired
private WoPackagingBoxMapper mapper;
@Override
public QueryWrapper<WoPackagingBox> getWrapper(Map<String, Object> params){
LocalDateTime startTime = (LocalDateTime) params.get("startTime");
LocalDateTime endTime = (LocalDateTime) params.get("endTime");
String boxNo = (String) params.get("boxNo");
QueryWrapper<WoPackagingBox> wrapper = new QueryWrapper<>();
wrapper.between(startTime!=null && endTime!=null,WoPackagingBox.PACKAGING_TIME, startTime, endTime);
wrapper.like(StringUtils.isNotBlank(boxNo), WoPackagingBox.BOX_NO, boxNo);
if(params.get("lineBody")!=null) {
Integer lineBody = Integer.parseInt(params.get("lineBody").toString());
wrapper.eq(ObjectUtils.isNotNull(lineBody), WoPackagingBox.LINE_BODY, lineBody);
}
if(params.get("lineBody")!=null) {
Integer printStatus = Integer.parseInt(params.get("printStatus").toString());
wrapper.eq(ObjectUtils.isNotNull(printStatus), WoPackagingBox.PRINT_STATUS, printStatus);
}
if(params.get("lineBody")!=null) {
Integer model = Integer.parseInt(params.get("model").toString());
wrapper.eq(ObjectUtils.isNotNull(model), WoPackagingBox.MODEL, model);
}
return wrapper;
}
@Override
public PageData<WoPackagingBoxDTO> page (Map<String, Object> params){
IPage<WoPackagingBox> page = baseDao.selectPage(
getPage(params, WoPackagingBox.CREATE_TIME, false),
getWrapper(params)
);
return getPageData(page, WoPackagingBoxDTO.class);
}
@Override
public WoPackagingBoxDTO get(Long id) {
WoPackagingBox entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, WoPackagingBoxDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(WoPackagingBoxDTO dto) {
WoPackagingBox entity = ConvertUtils.sourceToTarget(dto, WoPackagingBox.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(WoPackagingBoxDTO dto) {
WoPackagingBox entity = ConvertUtils.sourceToTarget(dto, WoPackagingBox.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(Long[] ids) {
//删除
deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional(rollbackFor = Exception.class)
public List<WoPackagingBoxDTO> list() {
List<WoPackagingBoxDTO> list = mapper.list();
return list;
}
}

View File

@ -0,0 +1,165 @@
package com.cnbm.packing.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cnbm.common.page.PageData;
import com.cnbm.common.service.impl.CrudServiceImpl;
import com.cnbm.common.utils.ConvertUtils;
import com.cnbm.common.validator.ValidatorUtils;
import com.cnbm.common.validator.group.AddGroup;
import com.cnbm.common.validator.group.DefaultGroup;
import com.cnbm.packing.dto.WoPackagingBoxSubstrateDTO;
import com.cnbm.packing.entity.ChangePackagingBoxHistory;
import com.cnbm.packing.entity.WoPackagingBoxSubstrate;
import com.cnbm.packing.mapper.WoPackagingBoxMapper;
import com.cnbm.packing.mapper.WoPackagingBoxSubstrateMapper;
import com.cnbm.packing.service.ChangePackagingBoxHistoryServiceBiz;
import com.cnbm.packing.service.WoPackagingBoxSubstrateServiceBiz;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.Map;
/**
* 包装箱基板关联表
*
* @author codeGenerator
* @since 2023-02-16
*/
@Service
public class WoPackagingBoxSubstrateServiceBizImpl extends CrudServiceImpl<WoPackagingBoxSubstrateMapper, WoPackagingBoxSubstrate, WoPackagingBoxSubstrateDTO> implements WoPackagingBoxSubstrateServiceBiz {
@Autowired
private ChangePackagingBoxHistoryServiceBiz changePackagingBoxHistoryService;
@Resource
private WoPackagingBoxMapper woPackagingBoxMapper;
@Resource
private WoPackagingBoxSubstrateMapper woPackagingBoxSubstrateMapper;
@Override
public QueryWrapper<WoPackagingBoxSubstrate> getWrapper(Map<String, Object> params){
String packagingBoxId = (String) params.get("packagingBoxId");
String woSubstrateId = (String)params.get("woSubstrateId");
QueryWrapper<WoPackagingBoxSubstrate> wrapper = new QueryWrapper<>();
wrapper.like(StringUtils.isNotBlank(packagingBoxId), WoPackagingBoxSubstrate.PACKAGING_BOX_ID, packagingBoxId);
wrapper.like(StringUtils.isNotBlank(woSubstrateId), WoPackagingBoxSubstrate.WO_SUBSTRATE_ID, woSubstrateId);
return wrapper;
}
@Override
public PageData<WoPackagingBoxSubstrateDTO> page (Map<String, Object> params){
IPage<WoPackagingBoxSubstrate> page = baseDao.selectPage(
getPage(params, WoPackagingBoxSubstrate.SLOT, true),
getWrapper(params)
);
return getPageData(page, WoPackagingBoxSubstrateDTO.class);
}
@Override
public WoPackagingBoxSubstrateDTO get(Long id) {
WoPackagingBoxSubstrate entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, WoPackagingBoxSubstrateDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(WoPackagingBoxSubstrateDTO dto) {
WoPackagingBoxSubstrate entity = ConvertUtils.sourceToTarget(dto, WoPackagingBoxSubstrate.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(WoPackagingBoxSubstrateDTO dto) {
WoPackagingBoxSubstrate entity = ConvertUtils.sourceToTarget(dto, WoPackagingBoxSubstrate.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(Long[] ids) {
//删除
deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional(rollbackFor = Exception.class)
public void removeSubstrate(Long id) {
WoPackagingBoxSubstrate entity = baseDao.selectById(id);
//移箱写入包装箱拆合箱历史表
ChangePackagingBoxHistory changePackagingBoxHistory = new ChangePackagingBoxHistory();
changePackagingBoxHistory.setSubstrateId(entity.getWoSubstrateId());
changePackagingBoxHistory.setSourceBoxNo(entity.getPackagingBoxId());
changePackagingBoxHistory.setSourceSlot(entity.getSlot());
changePackagingBoxHistory.setLeaveTime(LocalDateTime.now());
changePackagingBoxHistory.setType(2);
changePackagingBoxHistoryService.insert(changePackagingBoxHistory);
//模组从该包装箱中移出该模组变为未绑定BoxID的模组
entity.setPackagingBoxId(null);
entity.setSlot(null);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void insertSubstrate(WoPackagingBoxSubstrateDTO dto) {
WoPackagingBoxSubstrate entity = baseDao.selectById(dto.getId());
//合箱写入包装箱拆合箱历史表
ChangePackagingBoxHistory changePackagingBoxHistory = new ChangePackagingBoxHistory();
changePackagingBoxHistory.setSubstrateId(dto.getWoSubstrateId());
changePackagingBoxHistory.setTargetBoxNo(dto.getPackagingBoxId());
changePackagingBoxHistory.setTargetSlot(dto.getSlot());
changePackagingBoxHistory.setInputTime(LocalDateTime.now());
changePackagingBoxHistory.setType(1);
changePackagingBoxHistoryService.insert(changePackagingBoxHistory);
//更新
entity.setPackagingBoxId(dto.getPackagingBoxId());
entity.setSlot(dto.getSlot());
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void replaceSubstrate(WoPackagingBoxSubstrateDTO[] dtos) {
for(WoPackagingBoxSubstrateDTO dto : dtos){
WoPackagingBoxSubstrate entity = baseDao.selectById(dto.getId());
//换箱写入包装箱拆合箱历史表
ChangePackagingBoxHistory changePackagingBoxHistory = new ChangePackagingBoxHistory();
changePackagingBoxHistory.setSubstrateId(dto.getWoSubstrateId());
changePackagingBoxHistory.setTargetBoxNo(entity.getPackagingBoxId());
changePackagingBoxHistory.setTargetSlot(entity.getSlot());
changePackagingBoxHistory.setTargetBoxNo(dto.getPackagingBoxId());
changePackagingBoxHistory.setTargetSlot(dto.getSlot());
changePackagingBoxHistory.setType(3);
changePackagingBoxHistoryService.insert(changePackagingBoxHistory);
//更新
entity.setPackagingBoxId(dto.getPackagingBoxId());
entity.setSlot(dto.getSlot());
updateById(entity);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void batchInsert(WoPackagingBoxSubstrateDTO[] lists) {
for(WoPackagingBoxSubstrateDTO dto:lists){
if(dto.getWoSubstrateId()==null){
dto.setWoSubstrateId("无码");
}
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
WoPackagingBoxSubstrate entity = ConvertUtils.sourceToTarget(dto, WoPackagingBoxSubstrate.class);
insert(entity);
}
}
}

View File

@ -0,0 +1,96 @@
package com.cnbm.packing.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.cnbm.common.page.PageData;
import com.cnbm.common.service.impl.CrudServiceImpl;
import com.cnbm.common.utils.ConvertUtils;
import com.cnbm.packing.dto.WoPackagingPrintHistoryDTO;
import com.cnbm.packing.dto.WoPackagingPrintHistoryDTO;
import com.cnbm.packing.entity.WoPackagingBox;
import com.cnbm.packing.entity.WoPackagingPrintHistory;
import com.cnbm.packing.entity.WoPackagingPrintHistory;
import com.cnbm.packing.mapper.WoPackagingPrintHistoryMapper;
import com.cnbm.packing.mapper.WoPackagingPrintHistoryMapper;
import com.cnbm.packing.service.WoPackagingPrintHistoryServiceBiz;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 包装箱打印历史表
*
* @author codeGenerator
* @since 2023-02-15
*/
@Service
public class WoPackagingPrintHistoryServiceBizImpl extends CrudServiceImpl<WoPackagingPrintHistoryMapper, WoPackagingPrintHistory, WoPackagingPrintHistoryDTO> implements WoPackagingPrintHistoryServiceBiz {
@Autowired
private WoPackagingPrintHistoryMapper mapper;
@Override
public QueryWrapper<WoPackagingPrintHistory> getWrapper(Map<String, Object> params){
LocalDateTime startTime = (LocalDateTime) params.get("startTime");
LocalDateTime endTime = (LocalDateTime) params.get("endTime");
String boxNo = (String) params.get("boxNo");
QueryWrapper<WoPackagingPrintHistory> wrapper = new QueryWrapper<>();
wrapper.between(startTime!=null && endTime!=null, WoPackagingPrintHistory.PRINT_TIME, startTime, endTime);
wrapper.like(StringUtils.isNotBlank(boxNo), WoPackagingPrintHistory.BOX_NO, boxNo);
return wrapper;
}
@Override
public PageData<WoPackagingPrintHistoryDTO> page (Map<String, Object> params){
IPage<WoPackagingPrintHistory> page = baseDao.selectPage(
getPage(params, WoPackagingPrintHistory.PRINT_TIME, false),
getWrapper(params)
);
return getPageData(page, WoPackagingPrintHistoryDTO.class);
}
@Override
public WoPackagingPrintHistoryDTO get(Long id) {
WoPackagingPrintHistory entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, WoPackagingPrintHistoryDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(WoPackagingPrintHistoryDTO dto) {
WoPackagingPrintHistory entity = ConvertUtils.sourceToTarget(dto, WoPackagingPrintHistory.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(WoPackagingPrintHistoryDTO dto) {
WoPackagingPrintHistory entity = ConvertUtils.sourceToTarget(dto, WoPackagingPrintHistory.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(Long[] ids) {
//删除
deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional(rollbackFor = Exception.class)
public List<WoPackagingPrintHistoryDTO> list() {
List<WoPackagingPrintHistoryDTO> list = mapper.list();
return list;
}
}

View File

@ -0,0 +1,90 @@
package com.cnbm.packing.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.cnbm.common.page.PageData;
import com.cnbm.common.service.impl.CrudServiceImpl;
import com.cnbm.common.utils.ConvertUtils;
import com.cnbm.packing.dto.WoPowerLevelDTO;
import com.cnbm.packing.entity.WoPowerLevel;
import com.cnbm.packing.mapper.WoPowerLevelMapper;
import com.cnbm.packing.service.WoPowerLevelServiceBiz;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 功率等级
*
* @author codeGenerator
* @since 2023-02-15
*/
@Service
public class WoPowerLevelServiceBizImpl extends CrudServiceImpl<WoPowerLevelMapper, WoPowerLevel, WoPowerLevelDTO> implements WoPowerLevelServiceBiz {
@Autowired
private WoPowerLevelMapper mapper;
@Override
public QueryWrapper<WoPowerLevel> getWrapper(Map<String, Object> params){
QueryWrapper<WoPowerLevel> wrapper = new QueryWrapper<>();
if(params.get("lineBody")!=null) {
Integer lineBody = Integer.parseInt(params.get("lineBody").toString());
wrapper.eq(ObjectUtils.isNotNull(lineBody), WoPowerLevel.LINE_BODY, lineBody);
}
return wrapper;
}
@Override
public PageData<WoPowerLevelDTO> page (Map<String, Object> params){
IPage<WoPowerLevel> page = baseDao.selectPage(
getPage(params, WoPowerLevel.ID, true),
getWrapper(params)
);
return getPageData(page, WoPowerLevelDTO.class);
}
@Override
public WoPowerLevelDTO get(Long id) {
WoPowerLevel entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, WoPowerLevelDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(WoPowerLevelDTO dto) {
WoPowerLevel entity = ConvertUtils.sourceToTarget(dto, WoPowerLevel.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(WoPowerLevelDTO dto) {
WoPowerLevel entity = ConvertUtils.sourceToTarget(dto, WoPowerLevel.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(Long[] ids) {
//删除
deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional(rollbackFor = Exception.class)
public List<WoPowerLevelDTO> list() {
List<WoPowerLevelDTO> list = mapper.list();
return list;
}
}

View File

@ -0,0 +1,30 @@
<?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="com.cnbm.packing.mapper.ChangePackagingBoxHistoryMapper">
<resultMap type="com.cnbm.packing.entity.ChangePackagingBoxHistory" id="ChangePackagingBoxHistoryMap">
<id column="ID" property="id" />
<id column="SUBSTRATE_ID" property="substrateId" />
<id column="SOURCE_BOX_NO" property="sourceBoxNo" />
<id column="SOURCE_SLOT" property="sourceSlot" />
<id column="LEAVE_TIME" property="leaveTime" />
<id column="TARGET_BOX_NO" property="targetBoxNo" />
<id column="TARGET_SLOT" property="targetSlot" />
<id column="INPUT_TIME" property="inputTime" />
<id column="GRADE" property="grade" />
<id column="TYPE" property="type" />
<id column="VALID" property="valid" />
<id column="CREATOR_ID" property="creatorId" />
<id column="CREATOR_NAME" property="creatorName" />
<id column="CREATE_TIME" property="createTime" />
<id column="UPDATER_ID" property="updaterId" />
<id column="UPDATER_NAME" property="updaterName" />
<id column="UPDATE_TIME" property="updateTime" />
<id column="VERSION" property="version" />
</resultMap>
<select id="list" resultType="com.cnbm.packing.dto.ChangePackagingBoxHistoryDTO">
select * from t_change_packaging_box_history
order by id asc
</select>
</mapper>

View File

@ -0,0 +1,31 @@
<?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="com.cnbm.packing.mapper.PrintModelMapper">
<resultMap type="com.cnbm.packing.entity.PrintModel" id="PrintModelMap">
<id column="ID" property="id" />
<id column="CODE" property="code" />
<id column="NAME" property="name" />
<id column="ENABLED" property="enabled" />
<id column="CREATOR_ID" property="creatorId" />
<id column="CREATOR_NAME" property="creatorName" />
<id column="CREATE_TIME" property="createTime" />
<id column="UPDATER_ID" property="updaterId" />
<id column="UPDATER_NAME" property="updaterName" />
<id column="UPDATE_TIME" property="updateTime" />
<id column="VERSION" property="version" />
<id column="VALID" property="valid" />
<id column="REMARK" property="remark" />
<id column="TYPE" property="type" />
<id column="IS_DEFAULT" property="isDefault" />
<id column="IS_PREVIEW" property="isPreview" />
<id column="CONTENT" property="content" />
<id column="line_body" property="lineBody" />
</resultMap>
<select id="list" resultType="com.cnbm.packing.dto.PrintModelDTO">
select * from t_print_model
order by id asc
</select>
</mapper>

View File

@ -0,0 +1,28 @@
<?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="com.cnbm.packing.mapper.WoCompensationPowerMapper">
<resultMap type="com.cnbm.packing.entity.WoCompensationPower" id="WoCompensationPowerMap">
<id column="id" property="id" />
<id column="actl_pmpp_low" property="actlPmppLow" />
<id column="actl_pmpp_high" property="actlPmppHigh" />
<id column="formula" property="formula" />
<id column="line_body" property="lineBody" />
<id column="coefficient_a" property="coefficientA" />
<id column="coefficient_b" property="coefficientB" />
<id column="remark" property="remark" />
<id column="valid" property="valid" />
<id column="creator_id" property="creatorId" />
<id column="creator_name" property="creatorName" />
<id column="create_time" property="createTime" />
<id column="updater_id" property="updaterId" />
<id column="updater_name" property="updaterName" />
<id column="update_time" property="updateTime" />
<id column="version" property="version" />
</resultMap>
<select id="list" resultType="com.cnbm.packing.dto.WoCompensationPowerDTO">
select * from t_wo_compensation_power
order by id asc
</select>
</mapper>

View File

@ -0,0 +1,41 @@
<?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="com.cnbm.packing.mapper.WoPackagingBoxMapper">
<resultMap type="com.cnbm.packing.entity.WoPackagingBox" id="WoPackagingBoxMap">
<id column="ID" property="id" />
<id column="ORDER_ID" property="orderId" />
<id column="WORK_ORDER_ID" property="workOrderId" />
<id column="BOX_NO" property="boxNo" />
<id column="POWER" property="power" />
<id column="GRADE" property="grade" />
<id column="SUBSTRATE_QUANTITY" property="substrateQuantity" />
<id column="PACKAGING_TIME" property="packagingTime" />
<id column="PRINT_TIME" property="printTime" />
<id column="PRINT_STATUS" property="printStatus" />
<id column="COMPLETION_REPORTING_STATUS" property="completionReportingStatus" />
<id column="REMARK" property="remark" />
<id column="VALID" property="valid" />
<id column="CREATOR_ID" property="creatorId" />
<id column="CREATOR_NAME" property="creatorName" />
<id column="CREATE_TIME" property="createTime" />
<id column="UPDATER_ID" property="updaterId" />
<id column="UPDATER_NAME" property="updaterName" />
<id column="UPDATE_TIME" property="updateTime" />
<id column="VERSION" property="version" />
<id column="LEAVE_LINE_TIME" property="leaveLineTime" />
<id column="PORT_ID" property="portId" />
<id column="PRINT_COUNT" property="printCount" />
<id column="POWER_LEVEL" property="powerLevel" />
<id column="CUSTOMER_ID" property="customerId" />
<id column="SAP_MATERIAL" property="sapMaterial" />
<id column="LINE_BODY" property="lineBody" />
<id column="model" property="model" />
<id column="is_arrived" property="isArrived" />
</resultMap>
<select id="list" resultType="com.cnbm.packing.dto.WoPackagingBoxDTO">
select * from t_wo_packaging_box
order by id asc
</select>
</mapper>

View File

@ -0,0 +1,29 @@
<?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="com.cnbm.packing.mapper.WoPackagingBoxSubstrateMapper">
<resultMap type="com.cnbm.packing.entity.WoPackagingBoxSubstrate" id="WoPackagingBoxSubstrateMap">
<id column="ID" property="id" />
<id column="PACKAGING_BOX_ID" property="packagingBoxId" />
<id column="WO_SUBSTRATE_ID" property="woSubstrateId" />
<id column="CREATOR_ID" property="creatorId" />
<id column="CREATOR_NAME" property="creatorName" />
<id column="CREATE_TIME" property="createTime" />
<id column="UPDATER_ID" property="updaterId" />
<id column="UPDATER_NAME" property="updaterName" />
<id column="UPDATE_TIME" property="updateTime" />
<id column="VERSION" property="version" />
<id column="SLOT" property="slot" />
<id column="INPUT_TIME" property="inputTime" />
<id column="VALID" property="valid" />
<id column="SAP_MATERIAL" property="sapMaterial" />
<id column="LINE_BODY" property="lineBody" />
<id column="POWER_LEVEL" property="powerLevel" />
</resultMap>
<select id="list" resultType="com.cnbm.packing.dto.WoPackagingBoxSubstrateDTO">
select * from t_wo_packaging_box_substrate
order by id asc
</select>
</mapper>

View File

@ -0,0 +1,30 @@
<?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="com.cnbm.packing.mapper.WoPackagingPrintHistoryMapper">
<resultMap type="com.cnbm.packing.entity.WoPackagingPrintHistory" id="WoPackagingPrintHistoryMap">
<id column="ID" property="id" />
<id column="BOX_NO" property="boxNo" />
<id column="PRINT_TIME" property="printTime" />
<id column="COMPLETION_REPORTING_TIME" property="completionReportingTime" />
<id column="PRINT_STATUS" property="printStatus" />
<id column="COMPLETION_REPORTING_STATUS" property="completionReportingStatus" />
<id column="LEAVE_LINE_TIME" property="leaveLineTime" />
<id column="PORT_ID" property="portId" />
<id column="PRINT_COUNT" property="printCount" />
<id column="VALID" property="valid" />
<id column="CREATOR_ID" property="creatorId" />
<id column="CREATOR_NAME" property="creatorName" />
<id column="CREATE_TIME" property="createTime" />
<id column="UPDATER_ID" property="updaterId" />
<id column="UPDATER_NAME" property="updaterName" />
<id column="UPDATE_TIME" property="updateTime" />
<id column="VERSION" property="version" />
<id column="REMARK" property="remark" />
</resultMap>
<select id="list" resultType="com.cnbm.packing.dto.WoPackagingPrintHistoryDTO">
select * from t_wo_packaging_print_history
order by id asc
</select>
</mapper>

View File

@ -0,0 +1,31 @@
<?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="com.cnbm.packing.mapper.WoPowerLevelMapper">
<resultMap type="com.cnbm.packing.entity.WoPowerLevel" id="WoPowerLevelMap">
<id column="id" property="id" />
<id column="power_class" property="powerClass" />
<id column="pmpp_low" property="pmppLow" />
<id column="pmpp_high" property="pmppHigh" />
<id column="sap_material_num" property="sapMaterialNum" />
<id column="line_body" property="lineBody" />
<id column="lable_voc" property="lableVoc" />
<id column="lable_isc" property="lableIsc" />
<id column="lable_vmpp" property="lableVmpp" />
<id column="lable_impp" property="lableImpp" />
<id column="remark" property="remark" />
<id column="valid" property="valid" />
<id column="creator_id" property="creatorId" />
<id column="creator_name" property="creatorName" />
<id column="create_time" property="createTime" />
<id column="updater_id" property="updaterId" />
<id column="updater_name" property="updaterName" />
<id column="update_time" property="updateTime" />
<id column="version" property="version" />
</resultMap>
<select id="list" resultType="com.cnbm.packing.dto.WoPowerLevelDTO">
select * from t_wo_power_level
order by id asc
</select>
</mapper>