parent
0d46d345b1
commit
424925cf9e
123 changed files with 3946 additions and 74 deletions
@ -0,0 +1,25 @@ |
||||
package org.springblade.job.processor.quality; |
||||
|
||||
import jakarta.annotation.Resource; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.desk.quality.feign.IIotHardnessClient; |
||||
import org.springframework.stereotype.Component; |
||||
import tech.powerjob.worker.core.processor.ProcessResult; |
||||
import tech.powerjob.worker.core.processor.TaskContext; |
||||
import tech.powerjob.worker.core.processor.sdk.BasicProcessor; |
||||
import tech.powerjob.worker.log.OmsLogger; |
||||
|
||||
@Component |
||||
@Slf4j |
||||
public class IotHardnessDeleteProcessor implements BasicProcessor { |
||||
|
||||
@Resource |
||||
private IIotHardnessClient client; |
||||
|
||||
@Override |
||||
public ProcessResult process(TaskContext context) throws Exception { |
||||
OmsLogger omsLogger = context.getOmsLogger(); |
||||
Integer deleted = client.deleteHistory(); |
||||
return new ProcessResult(true); |
||||
} |
||||
} |
||||
@ -0,0 +1,18 @@ |
||||
package org.springblade.desk.quality.feign; |
||||
|
||||
import org.springblade.core.launch.constant.AppConstant; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
||||
@FeignClient( |
||||
value = AppConstant.APPLICATION_DESK_NAME |
||||
) |
||||
public interface IIotHardnessClient { |
||||
|
||||
String API_PREFIX = "/feign/client/qa/iot-hardness"; |
||||
|
||||
String DELETE_HISTORY = API_PREFIX + "/delete-history"; |
||||
|
||||
@GetMapping("DELETE_HISTORY") |
||||
public Integer deleteHistory(); |
||||
} |
||||
@ -0,0 +1,18 @@ |
||||
package org.springblade.desk.quality.feign; |
||||
|
||||
import org.springblade.core.launch.constant.AppConstant; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
||||
@FeignClient( |
||||
value = AppConstant.APPLICATION_DESK_NAME |
||||
) |
||||
public interface IIotThicknessClient { |
||||
|
||||
String API_PREFIX = "/feign/client/qa/iot-thickness"; |
||||
|
||||
String DELETE_HISTORY = API_PREFIX + "/delete-history"; |
||||
|
||||
@GetMapping("DELETE_HISTORY") |
||||
public Integer deleteHistory(); |
||||
} |
||||
@ -0,0 +1,15 @@ |
||||
package org.springblade.desk.quality.constant; |
||||
|
||||
public interface InspectionTaskConst { |
||||
|
||||
|
||||
/** |
||||
* 热表 |
||||
*/ |
||||
Integer TYPE_1 = 1; |
||||
|
||||
/** |
||||
* 烧结 |
||||
*/ |
||||
Integer TYPE_2 = 2; |
||||
} |
||||
@ -0,0 +1,139 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.Parameter; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import jakarta.servlet.http.HttpServletResponse; |
||||
import jakarta.validation.Valid; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.excel.util.ExcelUtil; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.annotation.IsAdmin; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springblade.desk.quality.excel.gen.IotHardnessGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.IotHardness; |
||||
import org.springblade.desk.quality.pojo.vo.gen.IotHardnessGenVO; |
||||
import org.springblade.desk.quality.service.gen.IIotHardnessGenService; |
||||
import org.springblade.desk.quality.wrapper.gen.IotHardnessGenWrapper; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* [IOT硬度] 控制器 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-16 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/iotHardness") |
||||
@Tag(name = "[IOT硬度]", description = "[IOT硬度]接口") |
||||
public class IotHardnessController extends BladeController { |
||||
|
||||
private final IIotHardnessGenService iotHardnessGenService; |
||||
|
||||
/** |
||||
* [IOT硬度] 详情 |
||||
*/ |
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 1) |
||||
@Operation(summary = "详情", description = "传入iotHardness") |
||||
public R<IotHardnessGenVO> detail(IotHardness iotHardness) { |
||||
IotHardness detail = iotHardnessGenService.getOne(Condition.getQueryWrapper(iotHardness)); |
||||
return R.data(IotHardnessGenWrapper.build().entityVO(detail)); |
||||
} |
||||
|
||||
/** |
||||
* [IOT硬度] 分页 |
||||
*/ |
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 2) |
||||
@Operation(summary = "分页", description = "传入iotHardness") |
||||
public R<IPage<IotHardnessGenVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> iotHardness, Query query) { |
||||
IPage<IotHardness> pages = iotHardnessGenService.page(Condition.getPage(query), Condition.getQueryWrapper(iotHardness, IotHardness.class)); |
||||
return R.data(IotHardnessGenWrapper.build().pageVO(pages)); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* [IOT硬度] 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@ApiOperationSupport(order = 3) |
||||
@Operation(summary = "分页", description = "传入iotHardness") |
||||
public R<IPage<IotHardnessGenVO>> page(IotHardnessGenVO iotHardness, Query query) { |
||||
IPage<IotHardnessGenVO> pages = iotHardnessGenService.selectIotHardnessPage(Condition.getPage(query), iotHardness); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* [IOT硬度] 新增 |
||||
*/ |
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 4) |
||||
@Operation(summary = "新增", description = "传入iotHardness") |
||||
public R save(@Valid @RequestBody IotHardness iotHardness) { |
||||
return R.status(iotHardnessGenService.save(iotHardness)); |
||||
} |
||||
|
||||
/** |
||||
* [IOT硬度] 修改 |
||||
*/ |
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 5) |
||||
@Operation(summary = "修改", description = "传入iotHardness") |
||||
public R update(@Valid @RequestBody IotHardness iotHardness) { |
||||
return R.status(iotHardnessGenService.updateById(iotHardness)); |
||||
} |
||||
|
||||
/** |
||||
* [IOT硬度] 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 6) |
||||
@Operation(summary = "新增或修改", description = "传入iotHardness") |
||||
public R submit(@Valid @RequestBody IotHardness iotHardness) { |
||||
return R.status(iotHardnessGenService.saveOrUpdate(iotHardness)); |
||||
} |
||||
|
||||
/** |
||||
* [IOT硬度] 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 7) |
||||
@Operation(summary = "逻辑删除", description = "传入ids") |
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(iotHardnessGenService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@IsAdmin |
||||
@GetMapping("/export-iotHardness") |
||||
@ApiOperationSupport(order = 8) |
||||
@Operation(summary = "导出数据", description = "传入iotHardness") |
||||
public void exportIotHardness(@Parameter(hidden = true) @RequestParam Map<String, Object> iotHardness, BladeUser bladeUser, HttpServletResponse response) { |
||||
QueryWrapper<IotHardness> queryWrapper = Condition.getQueryWrapper(iotHardness, IotHardness.class); |
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(IotHardness::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
//queryWrapper.lambda().eq(IotHardnessEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||
List<IotHardnessGenExcel> list = iotHardnessGenService.exportIotHardness(queryWrapper); |
||||
ExcelUtil.export(response, "[IOT硬度]数据" + DateUtil.time(), "[IOT硬度]数据表", list, IotHardnessGenExcel.class); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,139 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.Parameter; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import jakarta.servlet.http.HttpServletResponse; |
||||
import jakarta.validation.Valid; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.excel.util.ExcelUtil; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.annotation.IsAdmin; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springblade.desk.quality.excel.gen.IotThicknessGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.IotThickness; |
||||
import org.springblade.desk.quality.pojo.vo.gen.IotThicknessGenVO; |
||||
import org.springblade.desk.quality.service.gen.IIotThicknessGenService; |
||||
import org.springblade.desk.quality.wrapper.gen.IotThicknessGenWrapper; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* [IOT硬度] 控制器 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-16 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/iotThickness") |
||||
@Tag(name = "[IOT硬度]", description = "[IOT硬度]接口") |
||||
public class IotThicknessController extends BladeController { |
||||
|
||||
private final IIotThicknessGenService iotThicknessGenService; |
||||
|
||||
/** |
||||
* [IOT硬度] 详情 |
||||
*/ |
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 1) |
||||
@Operation(summary = "详情", description = "传入iotThickness") |
||||
public R<IotThicknessGenVO> detail(IotThickness iotThickness) { |
||||
IotThickness detail = iotThicknessGenService.getOne(Condition.getQueryWrapper(iotThickness)); |
||||
return R.data(IotThicknessGenWrapper.build().entityVO(detail)); |
||||
} |
||||
|
||||
/** |
||||
* [IOT硬度] 分页 |
||||
*/ |
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 2) |
||||
@Operation(summary = "分页", description = "传入iotThickness") |
||||
public R<IPage<IotThicknessGenVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> iotThickness, Query query) { |
||||
IPage<IotThickness> pages = iotThicknessGenService.page(Condition.getPage(query), Condition.getQueryWrapper(iotThickness, IotThickness.class)); |
||||
return R.data(IotThicknessGenWrapper.build().pageVO(pages)); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* [IOT硬度] 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@ApiOperationSupport(order = 3) |
||||
@Operation(summary = "分页", description = "传入iotThickness") |
||||
public R<IPage<IotThicknessGenVO>> page(IotThicknessGenVO iotThickness, Query query) { |
||||
IPage<IotThicknessGenVO> pages = iotThicknessGenService.selectIotThicknessPage(Condition.getPage(query), iotThickness); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* [IOT硬度] 新增 |
||||
*/ |
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 4) |
||||
@Operation(summary = "新增", description = "传入iotThickness") |
||||
public R save(@Valid @RequestBody IotThickness iotThickness) { |
||||
return R.status(iotThicknessGenService.save(iotThickness)); |
||||
} |
||||
|
||||
/** |
||||
* [IOT硬度] 修改 |
||||
*/ |
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 5) |
||||
@Operation(summary = "修改", description = "传入iotThickness") |
||||
public R update(@Valid @RequestBody IotThickness iotThickness) { |
||||
return R.status(iotThicknessGenService.updateById(iotThickness)); |
||||
} |
||||
|
||||
/** |
||||
* [IOT硬度] 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 6) |
||||
@Operation(summary = "新增或修改", description = "传入iotThickness") |
||||
public R submit(@Valid @RequestBody IotThickness iotThickness) { |
||||
return R.status(iotThicknessGenService.saveOrUpdate(iotThickness)); |
||||
} |
||||
|
||||
/** |
||||
* [IOT硬度] 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 7) |
||||
@Operation(summary = "逻辑删除", description = "传入ids") |
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(iotThicknessGenService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@IsAdmin |
||||
@GetMapping("/export-iotThickness") |
||||
@ApiOperationSupport(order = 8) |
||||
@Operation(summary = "导出数据", description = "传入iotThickness") |
||||
public void exportIotThickness(@Parameter(hidden = true) @RequestParam Map<String, Object> iotThickness, BladeUser bladeUser, HttpServletResponse response) { |
||||
QueryWrapper<IotThickness> queryWrapper = Condition.getQueryWrapper(iotThickness, IotThickness.class); |
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(IotThickness::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
//queryWrapper.lambda().eq(IotThicknessEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||
List<IotThicknessGenExcel> list = iotThicknessGenService.exportIotThickness(queryWrapper); |
||||
ExcelUtil.export(response, "[IOT硬度]数据" + DateUtil.time(), "[IOT硬度]数据表", list, IotThicknessGenExcel.class); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,139 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.Parameter; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import jakarta.servlet.http.HttpServletResponse; |
||||
import jakarta.validation.Valid; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.excel.util.ExcelUtil; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.annotation.IsAdmin; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springblade.desk.quality.excel.gen.TraceChainGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.TraceChain; |
||||
import org.springblade.desk.quality.pojo.vo.gen.TraceChainGenVO; |
||||
import org.springblade.desk.quality.service.gen.ITraceChainGenService; |
||||
import org.springblade.desk.quality.wrapper.gen.TraceChainGenWrapper; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* [追溯链条] 控制器 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/traceChain") |
||||
@Tag(name = "[追溯链条]", description = "[追溯链条]接口") |
||||
public class TraceChainController extends BladeController { |
||||
|
||||
private final ITraceChainGenService traceChainGenService; |
||||
|
||||
/** |
||||
* [追溯链条] 详情 |
||||
*/ |
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 1) |
||||
@Operation(summary = "详情", description = "传入traceChain") |
||||
public R<TraceChainGenVO> detail(TraceChain traceChain) { |
||||
TraceChain detail = traceChainGenService.getOne(Condition.getQueryWrapper(traceChain)); |
||||
return R.data(TraceChainGenWrapper.build().entityVO(detail)); |
||||
} |
||||
|
||||
/** |
||||
* [追溯链条] 分页 |
||||
*/ |
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 2) |
||||
@Operation(summary = "分页", description = "传入traceChain") |
||||
public R<IPage<TraceChainGenVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> traceChain, Query query) { |
||||
IPage<TraceChain> pages = traceChainGenService.page(Condition.getPage(query), Condition.getQueryWrapper(traceChain, TraceChain.class)); |
||||
return R.data(TraceChainGenWrapper.build().pageVO(pages)); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* [追溯链条] 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@ApiOperationSupport(order = 3) |
||||
@Operation(summary = "分页", description = "传入traceChain") |
||||
public R<IPage<TraceChainGenVO>> page(TraceChainGenVO traceChain, Query query) { |
||||
IPage<TraceChainGenVO> pages = traceChainGenService.selectTraceChainPage(Condition.getPage(query), traceChain); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* [追溯链条] 新增 |
||||
*/ |
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 4) |
||||
@Operation(summary = "新增", description = "传入traceChain") |
||||
public R save(@Valid @RequestBody TraceChain traceChain) { |
||||
return R.status(traceChainGenService.save(traceChain)); |
||||
} |
||||
|
||||
/** |
||||
* [追溯链条] 修改 |
||||
*/ |
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 5) |
||||
@Operation(summary = "修改", description = "传入traceChain") |
||||
public R update(@Valid @RequestBody TraceChain traceChain) { |
||||
return R.status(traceChainGenService.updateById(traceChain)); |
||||
} |
||||
|
||||
/** |
||||
* [追溯链条] 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 6) |
||||
@Operation(summary = "新增或修改", description = "传入traceChain") |
||||
public R submit(@Valid @RequestBody TraceChain traceChain) { |
||||
return R.status(traceChainGenService.saveOrUpdate(traceChain)); |
||||
} |
||||
|
||||
/** |
||||
* [追溯链条] 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 7) |
||||
@Operation(summary = "逻辑删除", description = "传入ids") |
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(traceChainGenService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@IsAdmin |
||||
@GetMapping("/export-traceChain") |
||||
@ApiOperationSupport(order = 8) |
||||
@Operation(summary = "导出数据", description = "传入traceChain") |
||||
public void exportTraceChain(@Parameter(hidden = true) @RequestParam Map<String, Object> traceChain, BladeUser bladeUser, HttpServletResponse response) { |
||||
QueryWrapper<TraceChain> queryWrapper = Condition.getQueryWrapper(traceChain, TraceChain.class); |
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(TraceChain::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
//queryWrapper.lambda().eq(TraceChainEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||
List<TraceChainGenExcel> list = traceChainGenService.exportTraceChain(queryWrapper); |
||||
ExcelUtil.export(response, "[追溯链条]数据" + DateUtil.time(), "[追溯链条]数据表", list, TraceChainGenExcel.class); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,139 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.Parameter; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import jakarta.servlet.http.HttpServletResponse; |
||||
import jakarta.validation.Valid; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.excel.util.ExcelUtil; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.annotation.IsAdmin; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springblade.desk.quality.excel.gen.TraceEventGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.TraceEvent; |
||||
import org.springblade.desk.quality.pojo.vo.gen.TraceEventGenVO; |
||||
import org.springblade.desk.quality.service.gen.ITraceEventGenService; |
||||
import org.springblade.desk.quality.wrapper.gen.TraceEventGenWrapper; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* [追溯事件] 控制器 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/traceEvent") |
||||
@Tag(name = "[追溯事件]", description = "[追溯事件]接口") |
||||
public class TraceEventController extends BladeController { |
||||
|
||||
private final ITraceEventGenService traceEventGenService; |
||||
|
||||
/** |
||||
* [追溯事件] 详情 |
||||
*/ |
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 1) |
||||
@Operation(summary = "详情", description = "传入traceEvent") |
||||
public R<TraceEventGenVO> detail(TraceEvent traceEvent) { |
||||
TraceEvent detail = traceEventGenService.getOne(Condition.getQueryWrapper(traceEvent)); |
||||
return R.data(TraceEventGenWrapper.build().entityVO(detail)); |
||||
} |
||||
|
||||
/** |
||||
* [追溯事件] 分页 |
||||
*/ |
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 2) |
||||
@Operation(summary = "分页", description = "传入traceEvent") |
||||
public R<IPage<TraceEventGenVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> traceEvent, Query query) { |
||||
IPage<TraceEvent> pages = traceEventGenService.page(Condition.getPage(query), Condition.getQueryWrapper(traceEvent, TraceEvent.class)); |
||||
return R.data(TraceEventGenWrapper.build().pageVO(pages)); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* [追溯事件] 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@ApiOperationSupport(order = 3) |
||||
@Operation(summary = "分页", description = "传入traceEvent") |
||||
public R<IPage<TraceEventGenVO>> page(TraceEventGenVO traceEvent, Query query) { |
||||
IPage<TraceEventGenVO> pages = traceEventGenService.selectTraceEventPage(Condition.getPage(query), traceEvent); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* [追溯事件] 新增 |
||||
*/ |
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 4) |
||||
@Operation(summary = "新增", description = "传入traceEvent") |
||||
public R save(@Valid @RequestBody TraceEvent traceEvent) { |
||||
return R.status(traceEventGenService.save(traceEvent)); |
||||
} |
||||
|
||||
/** |
||||
* [追溯事件] 修改 |
||||
*/ |
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 5) |
||||
@Operation(summary = "修改", description = "传入traceEvent") |
||||
public R update(@Valid @RequestBody TraceEvent traceEvent) { |
||||
return R.status(traceEventGenService.updateById(traceEvent)); |
||||
} |
||||
|
||||
/** |
||||
* [追溯事件] 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 6) |
||||
@Operation(summary = "新增或修改", description = "传入traceEvent") |
||||
public R submit(@Valid @RequestBody TraceEvent traceEvent) { |
||||
return R.status(traceEventGenService.saveOrUpdate(traceEvent)); |
||||
} |
||||
|
||||
/** |
||||
* [追溯事件] 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 7) |
||||
@Operation(summary = "逻辑删除", description = "传入ids") |
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(traceEventGenService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@IsAdmin |
||||
@GetMapping("/export-traceEvent") |
||||
@ApiOperationSupport(order = 8) |
||||
@Operation(summary = "导出数据", description = "传入traceEvent") |
||||
public void exportTraceEvent(@Parameter(hidden = true) @RequestParam Map<String, Object> traceEvent, BladeUser bladeUser, HttpServletResponse response) { |
||||
QueryWrapper<TraceEvent> queryWrapper = Condition.getQueryWrapper(traceEvent, TraceEvent.class); |
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(TraceEvent::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
//queryWrapper.lambda().eq(TraceEventEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||
List<TraceEventGenExcel> list = traceEventGenService.exportTraceEvent(queryWrapper); |
||||
ExcelUtil.export(response, "[追溯事件]数据" + DateUtil.time(), "[追溯事件]数据表", list, TraceEventGenExcel.class); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,139 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.Parameter; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import jakarta.servlet.http.HttpServletResponse; |
||||
import jakarta.validation.Valid; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.excel.util.ExcelUtil; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.annotation.IsAdmin; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springblade.desk.quality.excel.gen.TraceItemGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.TraceItem; |
||||
import org.springblade.desk.quality.pojo.vo.gen.TraceItemGenVO; |
||||
import org.springblade.desk.quality.service.gen.ITraceItemGenService; |
||||
import org.springblade.desk.quality.wrapper.gen.TraceItemGenWrapper; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* [追溯明细] 控制器 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/traceItem") |
||||
@Tag(name = "[追溯明细]", description = "[追溯明细]接口") |
||||
public class TraceItemController extends BladeController { |
||||
|
||||
private final ITraceItemGenService traceItemGenService; |
||||
|
||||
/** |
||||
* [追溯明细] 详情 |
||||
*/ |
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 1) |
||||
@Operation(summary = "详情", description = "传入traceItem") |
||||
public R<TraceItemGenVO> detail(TraceItem traceItem) { |
||||
TraceItem detail = traceItemGenService.getOne(Condition.getQueryWrapper(traceItem)); |
||||
return R.data(TraceItemGenWrapper.build().entityVO(detail)); |
||||
} |
||||
|
||||
/** |
||||
* [追溯明细] 分页 |
||||
*/ |
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 2) |
||||
@Operation(summary = "分页", description = "传入traceItem") |
||||
public R<IPage<TraceItemGenVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> traceItem, Query query) { |
||||
IPage<TraceItem> pages = traceItemGenService.page(Condition.getPage(query), Condition.getQueryWrapper(traceItem, TraceItem.class)); |
||||
return R.data(TraceItemGenWrapper.build().pageVO(pages)); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* [追溯明细] 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@ApiOperationSupport(order = 3) |
||||
@Operation(summary = "分页", description = "传入traceItem") |
||||
public R<IPage<TraceItemGenVO>> page(TraceItemGenVO traceItem, Query query) { |
||||
IPage<TraceItemGenVO> pages = traceItemGenService.selectTraceItemPage(Condition.getPage(query), traceItem); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* [追溯明细] 新增 |
||||
*/ |
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 4) |
||||
@Operation(summary = "新增", description = "传入traceItem") |
||||
public R save(@Valid @RequestBody TraceItem traceItem) { |
||||
return R.status(traceItemGenService.save(traceItem)); |
||||
} |
||||
|
||||
/** |
||||
* [追溯明细] 修改 |
||||
*/ |
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 5) |
||||
@Operation(summary = "修改", description = "传入traceItem") |
||||
public R update(@Valid @RequestBody TraceItem traceItem) { |
||||
return R.status(traceItemGenService.updateById(traceItem)); |
||||
} |
||||
|
||||
/** |
||||
* [追溯明细] 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 6) |
||||
@Operation(summary = "新增或修改", description = "传入traceItem") |
||||
public R submit(@Valid @RequestBody TraceItem traceItem) { |
||||
return R.status(traceItemGenService.saveOrUpdate(traceItem)); |
||||
} |
||||
|
||||
/** |
||||
* [追溯明细] 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 7) |
||||
@Operation(summary = "逻辑删除", description = "传入ids") |
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(traceItemGenService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@IsAdmin |
||||
@GetMapping("/export-traceItem") |
||||
@ApiOperationSupport(order = 8) |
||||
@Operation(summary = "导出数据", description = "传入traceItem") |
||||
public void exportTraceItem(@Parameter(hidden = true) @RequestParam Map<String, Object> traceItem, BladeUser bladeUser, HttpServletResponse response) { |
||||
QueryWrapper<TraceItem> queryWrapper = Condition.getQueryWrapper(traceItem, TraceItem.class); |
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(TraceItem::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
//queryWrapper.lambda().eq(TraceItemEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||
List<TraceItemGenExcel> list = traceItemGenService.exportTraceItem(queryWrapper); |
||||
ExcelUtil.export(response, "[追溯明细]数据" + DateUtil.time(), "[追溯明细]数据表", list, TraceItemGenExcel.class); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,95 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.excel.gen; |
||||
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serial; |
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.time.LocalDateTime; |
||||
|
||||
|
||||
/** |
||||
* [IOT硬度] Excel实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-16 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class IotHardnessGenExcel implements Serializable { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("编码") |
||||
private String code; |
||||
/** |
||||
* 使用标记位 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("使用标记位") |
||||
private Long flagUse; |
||||
/** |
||||
* 读取标记位 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("读取标记位") |
||||
private Long flagRead; |
||||
/** |
||||
* 设备号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("设备号") |
||||
private String equipmentCode; |
||||
/** |
||||
* 批次号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("批次号") |
||||
private String batchNo; |
||||
/** |
||||
* 检测内容 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("检测内容") |
||||
private String data; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("排序") |
||||
private Long sort; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("备注") |
||||
private String remark; |
||||
/** |
||||
* 数据上传时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("数据上传时间") |
||||
private LocalDateTime uploadDate; |
||||
/** |
||||
* [设备]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[设备]id") |
||||
private BigDecimal equipmentId; |
||||
|
||||
} |
||||
@ -0,0 +1,95 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.excel.gen; |
||||
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serial; |
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.time.LocalDateTime; |
||||
|
||||
|
||||
/** |
||||
* [IOT硬度] Excel实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-16 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class IotThicknessGenExcel implements Serializable { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("编码") |
||||
private String code; |
||||
/** |
||||
* 使用标记位 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("使用标记位") |
||||
private Long flagUse; |
||||
/** |
||||
* 读取标记位 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("读取标记位") |
||||
private Long flagRead; |
||||
/** |
||||
* 设备号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("设备号") |
||||
private String equipmentCode; |
||||
/** |
||||
* 批次号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("批次号") |
||||
private String batchNo; |
||||
/** |
||||
* 检测内容 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("检测内容") |
||||
private String data; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("排序") |
||||
private Long sort; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("备注") |
||||
private String remark; |
||||
/** |
||||
* 数据上传时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("数据上传时间") |
||||
private LocalDateTime uploadDate; |
||||
/** |
||||
* [设备]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[设备]id") |
||||
private BigDecimal equipmentId; |
||||
|
||||
} |
||||
@ -0,0 +1,119 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.excel.gen; |
||||
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serial; |
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.time.LocalDateTime; |
||||
|
||||
|
||||
/** |
||||
* [追溯链条] Excel实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class TraceChainGenExcel implements Serializable { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("编码") |
||||
private String code; |
||||
/** |
||||
* [追溯链条]类型 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[追溯链条]类型") |
||||
private Long traceChainType; |
||||
/** |
||||
* 名称 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("名称") |
||||
private String name; |
||||
/** |
||||
* [制品]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[制品]id") |
||||
private BigDecimal productId; |
||||
/** |
||||
* [工单]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[工单]id") |
||||
private BigDecimal workOrderId; |
||||
/** |
||||
* [工序]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[工序]id") |
||||
private BigDecimal processId; |
||||
/** |
||||
* 追溯操作人[用户]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("追溯操作人[用户]id") |
||||
private BigDecimal traceUserId; |
||||
/** |
||||
* 制品序列号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("制品序列号") |
||||
private Long productSn; |
||||
/** |
||||
* 工单编号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("工单编号") |
||||
private Long workOrderCode; |
||||
/** |
||||
* 工序编号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("工序编号") |
||||
private Long processCode; |
||||
/** |
||||
* 追溯时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("追溯时间") |
||||
private LocalDateTime traceDate; |
||||
/** |
||||
* 追溯结果 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("追溯结果") |
||||
private String traceResult; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("排序") |
||||
private Long sort; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("备注") |
||||
private String remark; |
||||
|
||||
} |
||||
@ -0,0 +1,95 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.excel.gen; |
||||
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serial; |
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.time.LocalDateTime; |
||||
|
||||
|
||||
/** |
||||
* [追溯事件] Excel实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class TraceEventGenExcel implements Serializable { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("编码") |
||||
private String code; |
||||
/** |
||||
* [追溯事件]类型 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[追溯事件]类型") |
||||
private Long eventType; |
||||
/** |
||||
* 名称 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("名称") |
||||
private String name; |
||||
/** |
||||
* [追溯链条]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[追溯链条]id") |
||||
private BigDecimal traceChainId; |
||||
/** |
||||
* 操作[用户]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("操作[用户]id") |
||||
private BigDecimal operateUserId; |
||||
/** |
||||
* 事件时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("事件时间") |
||||
private LocalDateTime eventDate; |
||||
/** |
||||
* 关联序列号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("关联序列号") |
||||
private String relatedSn; |
||||
/** |
||||
* 事件描述 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("事件描述") |
||||
private String eventDesc; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("排序") |
||||
private Long sort; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("备注") |
||||
private String remark; |
||||
|
||||
} |
||||
@ -0,0 +1,112 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.excel.gen; |
||||
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serial; |
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
|
||||
|
||||
/** |
||||
* [追溯明细] Excel实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class TraceItemGenExcel implements Serializable { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("编码") |
||||
private String code; |
||||
/** |
||||
* 类型 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("类型") |
||||
private Long traceItemType; |
||||
/** |
||||
* 名称 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("名称") |
||||
private String name; |
||||
/** |
||||
* [追溯链条]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[追溯链条]id") |
||||
private BigDecimal qaTraceChainId; |
||||
/** |
||||
* [工序]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[工序]id") |
||||
private BigDecimal processId; |
||||
/** |
||||
* 物料/半成品/成品序列号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("物料/半成品/成品序列号") |
||||
private Long itemSn; |
||||
/** |
||||
* 型号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("型号") |
||||
private Long itemModel; |
||||
/** |
||||
* 批次号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("批次号") |
||||
private Long itemBatchCode; |
||||
/** |
||||
* [工序]编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[工序]编码") |
||||
private Long processCode; |
||||
/** |
||||
* 使用数量 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("使用数量") |
||||
private Long usedQuantity; |
||||
/** |
||||
* 父项序列号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("父项序列号") |
||||
private Long parentItemSn; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("排序") |
||||
private Long sort; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("备注") |
||||
private String remark; |
||||
|
||||
} |
||||
@ -0,0 +1,19 @@ |
||||
package org.springblade.desk.quality.feign; |
||||
|
||||
import io.swagger.v3.oas.annotations.Hidden; |
||||
import jakarta.annotation.Resource; |
||||
import org.springblade.desk.quality.service.IotHardnessService; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
@RestController |
||||
@Hidden |
||||
public class IotHardnessClient implements IIotHardnessClient { |
||||
|
||||
@Resource |
||||
private IotHardnessService service; |
||||
|
||||
@Override |
||||
public Integer deleteHistory() { |
||||
return service.deleteHistory(); |
||||
} |
||||
} |
||||
@ -0,0 +1,19 @@ |
||||
package org.springblade.desk.quality.feign; |
||||
|
||||
import io.swagger.v3.oas.annotations.Hidden; |
||||
import jakarta.annotation.Resource; |
||||
import org.springblade.desk.quality.service.IotThicknessService; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
@RestController |
||||
@Hidden |
||||
public class IotThicknessClient implements IIotThicknessClient { |
||||
|
||||
@Resource |
||||
private IotThicknessService service; |
||||
|
||||
@Override |
||||
public Integer deleteHistory() { |
||||
return service.deleteHistory(); |
||||
} |
||||
} |
||||
@ -0,0 +1,41 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.mapper.gen; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.springblade.desk.quality.excel.gen.IotHardnessGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.IotHardness; |
||||
import org.springblade.desk.quality.pojo.vo.gen.IotHardnessGenVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* [IOT硬度] Mapper 接口 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-16 |
||||
*/ |
||||
public interface IotHardnessGenMapper extends BaseMapper<IotHardness> { |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param iotHardness 查询参数 |
||||
* @return List<IotHardnessVO> |
||||
*/ |
||||
List<IotHardnessGenVO> selectIotHardnessPage(IPage page, IotHardnessGenVO iotHardness); |
||||
|
||||
/** |
||||
* 获取导出数据 |
||||
* |
||||
* @param queryWrapper 查询条件 |
||||
* @return List<IotHardnessExcel> |
||||
*/ |
||||
List<IotHardnessGenExcel> exportIotHardness(@Param("ew") Wrapper<IotHardness> queryWrapper); |
||||
|
||||
} |
||||
@ -0,0 +1,27 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="org.springblade.desk.quality.mapper.gen.IotHardnessGenMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="iotHardnessResultMap" type="org.springblade.desk.quality.pojo.entity.IotHardness"> |
||||
<result column="CODE" property="code"/> |
||||
<result column="FLAG_USE" property="flagUse"/> |
||||
<result column="FLAG_READ" property="flagRead"/> |
||||
<result column="EQUIPMENT_CODE" property="equipmentCode"/> |
||||
<result column="BATCH_NO" property="batchNo"/> |
||||
<result column="DATA" property="data"/> |
||||
<result column="SORT" property="sort"/> |
||||
<result column="REMARK" property="remark"/> |
||||
<result column="UPLOAD_DATE" property="uploadDate"/> |
||||
<result column="EQUIPMENT_ID" property="equipmentId"/> |
||||
</resultMap> |
||||
|
||||
<select id="selectIotHardnessPage" resultMap="iotHardnessResultMap"> |
||||
SELECT * FROM QA_IOT_HARDNESS WHERE is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="exportIotHardness" resultType="org.springblade.desk.quality.excel.gen.IotHardnessGenExcel"> |
||||
SELECT * FROM QA_IOT_HARDNESS ${ew.customSqlSegment} |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -0,0 +1,41 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.mapper.gen; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.springblade.desk.quality.excel.gen.IotThicknessGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.IotThickness; |
||||
import org.springblade.desk.quality.pojo.vo.gen.IotThicknessGenVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* [IOT硬度] Mapper 接口 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-16 |
||||
*/ |
||||
public interface IotThicknessGenMapper extends BaseMapper<IotThickness> { |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param iotThickness 查询参数 |
||||
* @return List<IotThicknessVO> |
||||
*/ |
||||
List<IotThicknessGenVO> selectIotThicknessPage(IPage page, IotThicknessGenVO iotThickness); |
||||
|
||||
/** |
||||
* 获取导出数据 |
||||
* |
||||
* @param queryWrapper 查询条件 |
||||
* @return List<IotThicknessExcel> |
||||
*/ |
||||
List<IotThicknessGenExcel> exportIotThickness(@Param("ew") Wrapper<IotThickness> queryWrapper); |
||||
|
||||
} |
||||
@ -0,0 +1,27 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="org.springblade.desk.quality.mapper.gen.IotThicknessGenMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="iotThicknessResultMap" type="org.springblade.desk.quality.pojo.entity.IotThickness"> |
||||
<result column="CODE" property="code"/> |
||||
<result column="FLAG_USE" property="flagUse"/> |
||||
<result column="FLAG_READ" property="flagRead"/> |
||||
<result column="EQUIPMENT_CODE" property="equipmentCode"/> |
||||
<result column="BATCH_NO" property="batchNo"/> |
||||
<result column="DATA" property="data"/> |
||||
<result column="SORT" property="sort"/> |
||||
<result column="REMARK" property="remark"/> |
||||
<result column="UPLOAD_DATE" property="uploadDate"/> |
||||
<result column="EQUIPMENT_ID" property="equipmentId"/> |
||||
</resultMap> |
||||
|
||||
<select id="selectIotThicknessPage" resultMap="iotThicknessResultMap"> |
||||
SELECT * FROM QA_IOT_THICKNESS WHERE is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="exportIotThickness" resultType="org.springblade.desk.quality.excel.gen.IotThicknessGenExcel"> |
||||
SELECT * FROM QA_IOT_THICKNESS ${ew.customSqlSegment} |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -0,0 +1,41 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.mapper.gen; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.springblade.desk.quality.excel.gen.TraceChainGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.TraceChain; |
||||
import org.springblade.desk.quality.pojo.vo.gen.TraceChainGenVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* [追溯链条] Mapper 接口 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
public interface TraceChainGenMapper extends BaseMapper<TraceChain> { |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param traceChain 查询参数 |
||||
* @return List<TraceChainVO> |
||||
*/ |
||||
List<TraceChainGenVO> selectTraceChainPage(IPage page, TraceChainGenVO traceChain); |
||||
|
||||
/** |
||||
* 获取导出数据 |
||||
* |
||||
* @param queryWrapper 查询条件 |
||||
* @return List<TraceChainExcel> |
||||
*/ |
||||
List<TraceChainGenExcel> exportTraceChain(@Param("ew") Wrapper<TraceChain> queryWrapper); |
||||
|
||||
} |
||||
@ -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="org.springblade.desk.quality.mapper.gen.TraceChainGenMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="traceChainResultMap" type="org.springblade.desk.quality.pojo.entity.TraceChain"> |
||||
<result column="CODE" property="code"/> |
||||
<result column="TRACE_CHAIN_TYPE" property="traceChainType"/> |
||||
<result column="NAME" property="name"/> |
||||
<result column="PRODUCT_ID" property="productId"/> |
||||
<result column="WORK_ORDER_ID" property="workOrderId"/> |
||||
<result column="PROCESS_ID" property="processId"/> |
||||
<result column="TRACE_USER_ID" property="traceUserId"/> |
||||
<result column="PRODUCT_SN" property="productSn"/> |
||||
<result column="WORK_ORDER_CODE" property="workOrderCode"/> |
||||
<result column="PROCESS_CODE" property="processCode"/> |
||||
<result column="TRACE_DATE" property="traceDate"/> |
||||
<result column="TRACE_RESULT" property="traceResult"/> |
||||
<result column="SORT" property="sort"/> |
||||
<result column="REMARK" property="remark"/> |
||||
</resultMap> |
||||
|
||||
<select id="selectTraceChainPage" resultMap="traceChainResultMap"> |
||||
SELECT * FROM QA_TRACE_CHAIN WHERE is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="exportTraceChain" resultType="org.springblade.desk.quality.excel.gen.TraceChainGenExcel"> |
||||
SELECT * FROM QA_TRACE_CHAIN ${ew.customSqlSegment} |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -0,0 +1,41 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.mapper.gen; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.springblade.desk.quality.excel.gen.TraceEventGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.TraceEvent; |
||||
import org.springblade.desk.quality.pojo.vo.gen.TraceEventGenVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* [追溯事件] Mapper 接口 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
public interface TraceEventGenMapper extends BaseMapper<TraceEvent> { |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param traceEvent 查询参数 |
||||
* @return List<TraceEventVO> |
||||
*/ |
||||
List<TraceEventGenVO> selectTraceEventPage(IPage page, TraceEventGenVO traceEvent); |
||||
|
||||
/** |
||||
* 获取导出数据 |
||||
* |
||||
* @param queryWrapper 查询条件 |
||||
* @return List<TraceEventExcel> |
||||
*/ |
||||
List<TraceEventGenExcel> exportTraceEvent(@Param("ew") Wrapper<TraceEvent> queryWrapper); |
||||
|
||||
} |
||||
@ -0,0 +1,27 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="org.springblade.desk.quality.mapper.gen.TraceEventGenMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="traceEventResultMap" type="org.springblade.desk.quality.pojo.entity.TraceEvent"> |
||||
<result column="CODE" property="code"/> |
||||
<result column="EVENT_TYPE" property="eventType"/> |
||||
<result column="NAME" property="name"/> |
||||
<result column="TRACE_CHAIN_ID" property="traceChainId"/> |
||||
<result column="OPERATE_USER_ID" property="operateUserId"/> |
||||
<result column="EVENT_DATE" property="eventDate"/> |
||||
<result column="RELATED_SN" property="relatedSn"/> |
||||
<result column="EVENT_DESC" property="eventDesc"/> |
||||
<result column="SORT" property="sort"/> |
||||
<result column="REMARK" property="remark"/> |
||||
</resultMap> |
||||
|
||||
<select id="selectTraceEventPage" resultMap="traceEventResultMap"> |
||||
SELECT * FROM QA_TRACE_EVENT WHERE is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="exportTraceEvent" resultType="org.springblade.desk.quality.excel.gen.TraceEventGenExcel"> |
||||
SELECT * FROM QA_TRACE_EVENT ${ew.customSqlSegment} |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -0,0 +1,41 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.mapper.gen; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.springblade.desk.quality.excel.gen.TraceItemGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.TraceItem; |
||||
import org.springblade.desk.quality.pojo.vo.gen.TraceItemGenVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* [追溯明细] Mapper 接口 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
public interface TraceItemGenMapper extends BaseMapper<TraceItem> { |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param traceItem 查询参数 |
||||
* @return List<TraceItemVO> |
||||
*/ |
||||
List<TraceItemGenVO> selectTraceItemPage(IPage page, TraceItemGenVO traceItem); |
||||
|
||||
/** |
||||
* 获取导出数据 |
||||
* |
||||
* @param queryWrapper 查询条件 |
||||
* @return List<TraceItemExcel> |
||||
*/ |
||||
List<TraceItemGenExcel> exportTraceItem(@Param("ew") Wrapper<TraceItem> queryWrapper); |
||||
|
||||
} |
||||
@ -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="org.springblade.desk.quality.mapper.gen.TraceItemGenMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="traceItemResultMap" type="org.springblade.desk.quality.pojo.entity.TraceItem"> |
||||
<result column="CODE" property="code"/> |
||||
<result column="TRACE_ITEM_TYPE" property="traceItemType"/> |
||||
<result column="NAME" property="name"/> |
||||
<result column="QA_TRACE_CHAIN_ID" property="qaTraceChainId"/> |
||||
<result column="PROCESS_ID" property="processId"/> |
||||
<result column="ITEM_SN" property="itemSn"/> |
||||
<result column="ITEM_MODEL" property="itemModel"/> |
||||
<result column="ITEM_BATCH_CODE" property="itemBatchCode"/> |
||||
<result column="PROCESS_CODE" property="processCode"/> |
||||
<result column="USED_QUANTITY" property="usedQuantity"/> |
||||
<result column="PARENT_ITEM_SN" property="parentItemSn"/> |
||||
<result column="SORT" property="sort"/> |
||||
<result column="REMARK" property="remark"/> |
||||
</resultMap> |
||||
|
||||
<select id="selectTraceItemPage" resultMap="traceItemResultMap"> |
||||
SELECT * FROM QA_TRACE_ITEM WHERE is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="exportTraceItem" resultType="org.springblade.desk.quality.excel.gen.TraceItemGenExcel"> |
||||
SELECT * FROM QA_TRACE_ITEM ${ew.customSqlSegment} |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -0,0 +1,24 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.pojo.dto.gen; |
||||
|
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.desk.quality.pojo.entity.IotHardness; |
||||
|
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* [IOT硬度] 数据传输对象实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-16 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class IotHardnessGenDTO extends IotHardness { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,24 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.pojo.dto.gen; |
||||
|
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.desk.quality.pojo.entity.IotThickness; |
||||
|
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* [IOT硬度] 数据传输对象实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-16 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class IotThicknessGenDTO extends IotThickness { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,24 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.pojo.dto.gen; |
||||
|
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.desk.quality.pojo.entity.TraceChain; |
||||
|
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* [追溯链条] 数据传输对象实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class TraceChainGenDTO extends TraceChain { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,24 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.pojo.dto.gen; |
||||
|
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.desk.quality.pojo.entity.TraceEvent; |
||||
|
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* [追溯事件] 数据传输对象实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class TraceEventGenDTO extends TraceEvent { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,24 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.pojo.dto.gen; |
||||
|
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.desk.quality.pojo.entity.TraceItem; |
||||
|
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* [追溯明细] 数据传输对象实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class TraceItemGenDTO extends TraceItem { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,124 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.pojo.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
import java.io.Serial; |
||||
import java.math.BigDecimal; |
||||
import java.time.LocalDateTime; |
||||
|
||||
/** |
||||
* [IOT硬度] 实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-16 |
||||
*/ |
||||
@Data |
||||
@TableName("QA_IOT_HARDNESS") |
||||
@Schema(description = "IotHardness Entity对象") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class IotHardness extends BaseEntity { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
public static final String COL_CODE = "CODE"; |
||||
/** |
||||
* 使用标记位 |
||||
*/ |
||||
public static final String COL_FLAG_USE = "FLAG_USE"; |
||||
/** |
||||
* 读取标记位 |
||||
*/ |
||||
public static final String COL_FLAG_READ = "FLAG_READ"; |
||||
/** |
||||
* 设备号 |
||||
*/ |
||||
public static final String COL_EQUIPMENT_CODE = "EQUIPMENT_CODE"; |
||||
/** |
||||
* 批次号 |
||||
*/ |
||||
public static final String COL_BATCH_NO = "BATCH_NO"; |
||||
/** |
||||
* 检测内容 |
||||
*/ |
||||
public static final String COL_DATA = "DATA"; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
public static final String COL_SORT = "SORT"; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
public static final String COL_REMARK = "REMARK"; |
||||
/** |
||||
* 数据上传时间 |
||||
*/ |
||||
public static final String COL_UPLOAD_DATE = "UPLOAD_DATE"; |
||||
/** |
||||
* [设备]id |
||||
*/ |
||||
public static final String COL_EQUIPMENT_ID = "EQUIPMENT_ID"; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
@Schema(description = "编码") |
||||
private String code; |
||||
/** |
||||
* 使用标记位 |
||||
*/ |
||||
@Schema(description = "使用标记位") |
||||
private Long flagUse; |
||||
/** |
||||
* 读取标记位 |
||||
*/ |
||||
@Schema(description = "读取标记位") |
||||
private Long flagRead; |
||||
/** |
||||
* 设备号 |
||||
*/ |
||||
@Schema(description = "设备号") |
||||
private String equipmentCode; |
||||
/** |
||||
* 批次号 |
||||
*/ |
||||
@Schema(description = "批次号") |
||||
private String batchNo; |
||||
/** |
||||
* 检测内容 |
||||
*/ |
||||
@Schema(description = "检测内容") |
||||
private String data; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
@Schema(description = "排序") |
||||
private Long sort; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@Schema(description = "备注") |
||||
private String remark; |
||||
/** |
||||
* 数据上传时间 |
||||
*/ |
||||
@Schema(description = "数据上传时间") |
||||
private LocalDateTime uploadDate; |
||||
/** |
||||
* [设备]id |
||||
*/ |
||||
@Schema(description = "[设备]id") |
||||
private BigDecimal equipmentId; |
||||
|
||||
} |
||||
@ -0,0 +1,123 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.pojo.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import java.io.Serial; |
||||
import java.math.BigDecimal; |
||||
import java.time.LocalDateTime; |
||||
|
||||
/** |
||||
* [IOT硬度] 实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-16 |
||||
*/ |
||||
@Data |
||||
@TableName("QA_IOT_THICKNESS") |
||||
@Schema(description = "IotThickness Entity对象") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class IotThickness extends BaseEntity { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
public static final String COL_CODE = "CODE"; |
||||
/** |
||||
* 使用标记位 |
||||
*/ |
||||
public static final String COL_FLAG_USE = "FLAG_USE"; |
||||
/** |
||||
* 读取标记位 |
||||
*/ |
||||
public static final String COL_FLAG_READ = "FLAG_READ"; |
||||
/** |
||||
* 设备号 |
||||
*/ |
||||
public static final String COL_EQUIPMENT_CODE = "EQUIPMENT_CODE"; |
||||
/** |
||||
* 批次号 |
||||
*/ |
||||
public static final String COL_BATCH_NO = "BATCH_NO"; |
||||
/** |
||||
* 检测内容 |
||||
*/ |
||||
public static final String COL_DATA = "DATA"; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
public static final String COL_SORT = "SORT"; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
public static final String COL_REMARK = "REMARK"; |
||||
/** |
||||
* 数据上传时间 |
||||
*/ |
||||
public static final String COL_UPLOAD_DATE = "UPLOAD_DATE"; |
||||
/** |
||||
* [设备]id |
||||
*/ |
||||
public static final String COL_EQUIPMENT_ID = "EQUIPMENT_ID"; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
@Schema(description = "编码") |
||||
private String code; |
||||
/** |
||||
* 使用标记位 |
||||
*/ |
||||
@Schema(description = "使用标记位") |
||||
private Long flagUse; |
||||
/** |
||||
* 读取标记位 |
||||
*/ |
||||
@Schema(description = "读取标记位") |
||||
private Long flagRead; |
||||
/** |
||||
* 设备号 |
||||
*/ |
||||
@Schema(description = "设备号") |
||||
private String equipmentCode; |
||||
/** |
||||
* 批次号 |
||||
*/ |
||||
@Schema(description = "批次号") |
||||
private String batchNo; |
||||
/** |
||||
* 检测内容 |
||||
*/ |
||||
@Schema(description = "检测内容") |
||||
private String data; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
@Schema(description = "排序") |
||||
private Long sort; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@Schema(description = "备注") |
||||
private String remark; |
||||
/** |
||||
* 数据上传时间 |
||||
*/ |
||||
@Schema(description = "数据上传时间") |
||||
private LocalDateTime uploadDate; |
||||
/** |
||||
* [设备]id |
||||
*/ |
||||
@Schema(description = "[设备]id") |
||||
private BigDecimal equipmentId; |
||||
|
||||
} |
||||
@ -0,0 +1,159 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.pojo.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import java.io.Serial; |
||||
import java.math.BigDecimal; |
||||
import java.time.LocalDateTime; |
||||
|
||||
/** |
||||
* [追溯链条] 实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
@Data |
||||
@TableName("QA_TRACE_CHAIN") |
||||
@Schema(description = "TraceChain Entity对象") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class TraceChain extends BaseEntity { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
public static final String COL_CODE = "CODE"; |
||||
/** |
||||
* [追溯链条]类型 |
||||
*/ |
||||
public static final String COL_TRACE_CHAIN_TYPE = "TRACE_CHAIN_TYPE"; |
||||
/** |
||||
* 名称 |
||||
*/ |
||||
public static final String COL_NAME = "NAME"; |
||||
/** |
||||
* [制品]id |
||||
*/ |
||||
public static final String COL_PRODUCT_ID = "PRODUCT_ID"; |
||||
/** |
||||
* [工单]id |
||||
*/ |
||||
public static final String COL_WORK_ORDER_ID = "WORK_ORDER_ID"; |
||||
/** |
||||
* [工序]id |
||||
*/ |
||||
public static final String COL_PROCESS_ID = "PROCESS_ID"; |
||||
/** |
||||
* 追溯操作人[用户]id |
||||
*/ |
||||
public static final String COL_TRACE_USER_ID = "TRACE_USER_ID"; |
||||
/** |
||||
* 制品序列号 |
||||
*/ |
||||
public static final String COL_PRODUCT_SN = "PRODUCT_SN"; |
||||
/** |
||||
* 工单编号 |
||||
*/ |
||||
public static final String COL_WORK_ORDER_CODE = "WORK_ORDER_CODE"; |
||||
/** |
||||
* 工序编号 |
||||
*/ |
||||
public static final String COL_PROCESS_CODE = "PROCESS_CODE"; |
||||
/** |
||||
* 追溯时间 |
||||
*/ |
||||
public static final String COL_TRACE_DATE = "TRACE_DATE"; |
||||
/** |
||||
* 追溯结果 |
||||
*/ |
||||
public static final String COL_TRACE_RESULT = "TRACE_RESULT"; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
public static final String COL_SORT = "SORT"; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
public static final String COL_REMARK = "REMARK"; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
@Schema(description = "编码") |
||||
private String code; |
||||
/** |
||||
* [追溯链条]类型 |
||||
*/ |
||||
@Schema(description = "[追溯链条]类型") |
||||
private Long traceChainType; |
||||
/** |
||||
* 名称 |
||||
*/ |
||||
@Schema(description = "名称") |
||||
private String name; |
||||
/** |
||||
* [制品]id |
||||
*/ |
||||
@Schema(description = "[制品]id") |
||||
private BigDecimal productId; |
||||
/** |
||||
* [工单]id |
||||
*/ |
||||
@Schema(description = "[工单]id") |
||||
private BigDecimal workOrderId; |
||||
/** |
||||
* [工序]id |
||||
*/ |
||||
@Schema(description = "[工序]id") |
||||
private BigDecimal processId; |
||||
/** |
||||
* 追溯操作人[用户]id |
||||
*/ |
||||
@Schema(description = "追溯操作人[用户]id") |
||||
private BigDecimal traceUserId; |
||||
/** |
||||
* 制品序列号 |
||||
*/ |
||||
@Schema(description = "制品序列号") |
||||
private Long productSn; |
||||
/** |
||||
* 工单编号 |
||||
*/ |
||||
@Schema(description = "工单编号") |
||||
private Long workOrderCode; |
||||
/** |
||||
* 工序编号 |
||||
*/ |
||||
@Schema(description = "工序编号") |
||||
private Long processCode; |
||||
/** |
||||
* 追溯时间 |
||||
*/ |
||||
@Schema(description = "追溯时间") |
||||
private LocalDateTime traceDate; |
||||
/** |
||||
* 追溯结果 |
||||
*/ |
||||
@Schema(description = "追溯结果") |
||||
private String traceResult; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
@Schema(description = "排序") |
||||
private Long sort; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@Schema(description = "备注") |
||||
private String remark; |
||||
|
||||
} |
||||
@ -0,0 +1,123 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.pojo.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import java.io.Serial; |
||||
import java.math.BigDecimal; |
||||
import java.time.LocalDateTime; |
||||
|
||||
/** |
||||
* [追溯事件] 实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
@Data |
||||
@TableName("QA_TRACE_EVENT") |
||||
@Schema(description = "TraceEvent Entity对象") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class TraceEvent extends BaseEntity { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
public static final String COL_CODE = "CODE"; |
||||
/** |
||||
* [追溯事件]类型 |
||||
*/ |
||||
public static final String COL_EVENT_TYPE = "EVENT_TYPE"; |
||||
/** |
||||
* 名称 |
||||
*/ |
||||
public static final String COL_NAME = "NAME"; |
||||
/** |
||||
* [追溯链条]id |
||||
*/ |
||||
public static final String COL_TRACE_CHAIN_ID = "TRACE_CHAIN_ID"; |
||||
/** |
||||
* 操作[用户]id |
||||
*/ |
||||
public static final String COL_OPERATE_USER_ID = "OPERATE_USER_ID"; |
||||
/** |
||||
* 事件时间 |
||||
*/ |
||||
public static final String COL_EVENT_DATE = "EVENT_DATE"; |
||||
/** |
||||
* 关联序列号 |
||||
*/ |
||||
public static final String COL_RELATED_SN = "RELATED_SN"; |
||||
/** |
||||
* 事件描述 |
||||
*/ |
||||
public static final String COL_EVENT_DESC = "EVENT_DESC"; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
public static final String COL_SORT = "SORT"; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
public static final String COL_REMARK = "REMARK"; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
@Schema(description = "编码") |
||||
private String code; |
||||
/** |
||||
* [追溯事件]类型 |
||||
*/ |
||||
@Schema(description = "[追溯事件]类型") |
||||
private Long eventType; |
||||
/** |
||||
* 名称 |
||||
*/ |
||||
@Schema(description = "名称") |
||||
private String name; |
||||
/** |
||||
* [追溯链条]id |
||||
*/ |
||||
@Schema(description = "[追溯链条]id") |
||||
private BigDecimal traceChainId; |
||||
/** |
||||
* 操作[用户]id |
||||
*/ |
||||
@Schema(description = "操作[用户]id") |
||||
private BigDecimal operateUserId; |
||||
/** |
||||
* 事件时间 |
||||
*/ |
||||
@Schema(description = "事件时间") |
||||
private LocalDateTime eventDate; |
||||
/** |
||||
* 关联序列号 |
||||
*/ |
||||
@Schema(description = "关联序列号") |
||||
private String relatedSn; |
||||
/** |
||||
* 事件描述 |
||||
*/ |
||||
@Schema(description = "事件描述") |
||||
private String eventDesc; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
@Schema(description = "排序") |
||||
private Long sort; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@Schema(description = "备注") |
||||
private String remark; |
||||
|
||||
} |
||||
@ -0,0 +1,149 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.pojo.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import java.io.Serial; |
||||
import java.math.BigDecimal; |
||||
|
||||
/** |
||||
* [追溯明细] 实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
@Data |
||||
@TableName("QA_TRACE_ITEM") |
||||
@Schema(description = "TraceItem Entity对象") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class TraceItem extends BaseEntity { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
public static final String COL_CODE = "CODE"; |
||||
/** |
||||
* 类型 |
||||
*/ |
||||
public static final String COL_TRACE_ITEM_TYPE = "TRACE_ITEM_TYPE"; |
||||
/** |
||||
* 名称 |
||||
*/ |
||||
public static final String COL_NAME = "NAME"; |
||||
/** |
||||
* [追溯链条]id |
||||
*/ |
||||
public static final String COL_QA_TRACE_CHAIN_ID = "QA_TRACE_CHAIN_ID"; |
||||
/** |
||||
* [工序]id |
||||
*/ |
||||
public static final String COL_PROCESS_ID = "PROCESS_ID"; |
||||
/** |
||||
* 物料/半成品/成品序列号 |
||||
*/ |
||||
public static final String COL_ITEM_SN = "ITEM_SN"; |
||||
/** |
||||
* 型号 |
||||
*/ |
||||
public static final String COL_ITEM_MODEL = "ITEM_MODEL"; |
||||
/** |
||||
* 批次号 |
||||
*/ |
||||
public static final String COL_ITEM_BATCH_CODE = "ITEM_BATCH_CODE"; |
||||
/** |
||||
* [工序]编码 |
||||
*/ |
||||
public static final String COL_PROCESS_CODE = "PROCESS_CODE"; |
||||
/** |
||||
* 使用数量 |
||||
*/ |
||||
public static final String COL_USED_QUANTITY = "USED_QUANTITY"; |
||||
/** |
||||
* 父项序列号 |
||||
*/ |
||||
public static final String COL_PARENT_ITEM_SN = "PARENT_ITEM_SN"; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
public static final String COL_SORT = "SORT"; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
public static final String COL_REMARK = "REMARK"; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
@Schema(description = "编码") |
||||
private String code; |
||||
/** |
||||
* 类型 |
||||
*/ |
||||
@Schema(description = "类型") |
||||
private Long traceItemType; |
||||
/** |
||||
* 名称 |
||||
*/ |
||||
@Schema(description = "名称") |
||||
private String name; |
||||
/** |
||||
* [追溯链条]id |
||||
*/ |
||||
@Schema(description = "[追溯链条]id") |
||||
private BigDecimal qaTraceChainId; |
||||
/** |
||||
* [工序]id |
||||
*/ |
||||
@Schema(description = "[工序]id") |
||||
private BigDecimal processId; |
||||
/** |
||||
* 物料/半成品/成品序列号 |
||||
*/ |
||||
@Schema(description = "物料/半成品/成品序列号") |
||||
private Long itemSn; |
||||
/** |
||||
* 型号 |
||||
*/ |
||||
@Schema(description = "型号") |
||||
private Long itemModel; |
||||
/** |
||||
* 批次号 |
||||
*/ |
||||
@Schema(description = "批次号") |
||||
private Long itemBatchCode; |
||||
/** |
||||
* [工序]编码 |
||||
*/ |
||||
@Schema(description = "[工序]编码") |
||||
private Long processCode; |
||||
/** |
||||
* 使用数量 |
||||
*/ |
||||
@Schema(description = "使用数量") |
||||
private Long usedQuantity; |
||||
/** |
||||
* 父项序列号 |
||||
*/ |
||||
@Schema(description = "父项序列号") |
||||
private Long parentItemSn; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
@Schema(description = "排序") |
||||
private Long sort; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@Schema(description = "备注") |
||||
private String remark; |
||||
|
||||
} |
||||
@ -0,0 +1,11 @@ |
||||
package org.springblade.desk.quality.pojo.request; |
||||
|
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.desk.quality.pojo.entity.InspectionTask; |
||||
|
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class InspectionTaskSearch extends InspectionTask { |
||||
|
||||
} |
||||
@ -0,0 +1,24 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.pojo.vo.gen; |
||||
|
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.desk.quality.pojo.entity.IotHardness; |
||||
|
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* [IOT硬度] 视图实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-16 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class IotHardnessGenVO extends IotHardness { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,24 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.pojo.vo.gen; |
||||
|
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.desk.quality.pojo.entity.IotThickness; |
||||
|
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* [IOT硬度] 视图实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-16 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class IotThicknessGenVO extends IotThickness { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,24 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.pojo.vo.gen; |
||||
|
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.desk.quality.pojo.entity.TraceChain; |
||||
|
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* [追溯链条] 视图实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class TraceChainGenVO extends TraceChain { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,24 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.pojo.vo.gen; |
||||
|
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.desk.quality.pojo.entity.TraceEvent; |
||||
|
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* [追溯事件] 视图实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class TraceEventGenVO extends TraceEvent { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,24 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.pojo.vo.gen; |
||||
|
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.desk.quality.pojo.entity.TraceItem; |
||||
|
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* [追溯明细] 视图实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-17 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class TraceItemGenVO extends TraceItem { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,29 @@ |
||||
package org.springblade.desk.quality.service; |
||||
|
||||
import jakarta.annotation.Resource; |
||||
import lombok.Data; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.desk.quality.mapper.gen.IotHardnessGenMapper; |
||||
import org.springframework.stereotype.Service; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
|
||||
import java.util.List; |
||||
|
||||
@Service |
||||
@Data |
||||
@Slf4j |
||||
public class IotHardnessDeleteService { |
||||
@Resource |
||||
private IotHardnessGenMapper genMapper; |
||||
|
||||
/** |
||||
* 分批独立事务。 |
||||
* |
||||
* @param ids |
||||
* @return |
||||
*/ |
||||
@Transactional(rollbackFor = Exception.class) |
||||
public Integer deleteHistoryOneBatch(List<Long> ids) { |
||||
return genMapper.deleteByIds(ids); |
||||
} |
||||
} |
||||
@ -0,0 +1,63 @@ |
||||
package org.springblade.desk.quality.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import jakarta.annotation.Resource; |
||||
import lombok.Data; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.desk.quality.constant.ColBase; |
||||
import org.springblade.desk.quality.mapper.gen.IotHardnessGenMapper; |
||||
import org.springblade.desk.quality.pojo.entity.IotHardness; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.time.LocalDateTime; |
||||
import java.util.List; |
||||
|
||||
@Service |
||||
@Data |
||||
@Slf4j |
||||
public class IotHardnessService { |
||||
|
||||
public static final Integer BATCH_SIZE = 1000; |
||||
|
||||
@Resource |
||||
private IotHardnessGenMapper genMapper; |
||||
@Resource |
||||
private IotHardnessDeleteService deleteService; |
||||
|
||||
/** |
||||
* 物理删除历史数据 |
||||
* |
||||
* @return |
||||
*/ |
||||
public Integer deleteHistory() { |
||||
LocalDateTime day7ago = LocalDateTime.now().minusDays(7); |
||||
QueryWrapper<IotHardness> qw = new QueryWrapper<>(); |
||||
qw.lt(ColBase.CREATE_TIME, day7ago); |
||||
qw.select(ColBase.ID); |
||||
List<IotHardness> list = genMapper.selectList(qw); |
||||
if (list.isEmpty()) { |
||||
log.info("没有超过七天的删除数据。"); |
||||
return 0; |
||||
} |
||||
int totalDeleted = 0; |
||||
int currentPage = 1; |
||||
while (true) { |
||||
IPage<IotHardness> page = new Page<>(currentPage, BATCH_SIZE); |
||||
IPage<IotHardness> resultPage = genMapper.selectPage(page, qw); |
||||
List<IotHardness> currentBatch = resultPage.getRecords(); |
||||
if (currentBatch.isEmpty()) { |
||||
break; |
||||
} |
||||
List<Long> ids = list.stream() |
||||
.map(IotHardness::getId) |
||||
.toList(); |
||||
int deletedCount = deleteService.deleteHistoryOneBatch(ids); |
||||
totalDeleted = totalDeleted + deletedCount; |
||||
currentPage = currentPage + 1; |
||||
} |
||||
return totalDeleted; |
||||
} |
||||
} |
||||
@ -0,0 +1,30 @@ |
||||
package org.springblade.desk.quality.service; |
||||
|
||||
import jakarta.annotation.Resource; |
||||
import lombok.Data; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.desk.quality.mapper.gen.IotThicknessGenMapper; |
||||
import org.springframework.stereotype.Service; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
|
||||
import java.util.List; |
||||
|
||||
@Service |
||||
@Data |
||||
@Slf4j |
||||
public class IotThicknessDeleteService { |
||||
|
||||
@Resource |
||||
private IotThicknessGenMapper genMapper; |
||||
|
||||
/** |
||||
* 分批独立事务。 |
||||
* |
||||
* @param ids |
||||
* @return |
||||
*/ |
||||
@Transactional(rollbackFor = Exception.class) |
||||
public Integer deleteHistoryOneBatch(List<Long> ids) { |
||||
return genMapper.deleteByIds(ids); |
||||
} |
||||
} |
||||
@ -0,0 +1,63 @@ |
||||
package org.springblade.desk.quality.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import jakarta.annotation.Resource; |
||||
import lombok.Data; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.desk.quality.constant.ColBase; |
||||
import org.springblade.desk.quality.mapper.gen.IotThicknessGenMapper; |
||||
import org.springblade.desk.quality.pojo.entity.IotThickness; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.time.LocalDateTime; |
||||
import java.util.List; |
||||
|
||||
@Service |
||||
@Data |
||||
@Slf4j |
||||
public class IotThicknessService { |
||||
|
||||
public static final Integer BATCH_SIZE = 1000; |
||||
|
||||
@Resource |
||||
private IotThicknessGenMapper genMapper; |
||||
@Resource |
||||
private IotThicknessDeleteService deleteService; |
||||
|
||||
/** |
||||
* 物理删除历史数据 |
||||
* |
||||
* @return |
||||
*/ |
||||
public Integer deleteHistory() { |
||||
LocalDateTime day7ago = LocalDateTime.now().minusDays(7); |
||||
QueryWrapper<IotThickness> qw = new QueryWrapper<>(); |
||||
qw.lt(ColBase.CREATE_TIME, day7ago); |
||||
qw.select(ColBase.ID); |
||||
List<IotThickness> list = genMapper.selectList(qw); |
||||
if (list.isEmpty()) { |
||||
log.info("没有超过七天的删除数据。"); |
||||
return 0; |
||||
} |
||||
int totalDeleted = 0; |
||||
int currentPage = 1; |
||||
while (true) { |
||||
IPage<IotThickness> page = new Page<>(currentPage, BATCH_SIZE); |
||||
IPage<IotThickness> resultPage = genMapper.selectPage(page, qw); |
||||
List<IotThickness> currentBatch = resultPage.getRecords(); |
||||
if (currentBatch.isEmpty()) { |
||||
break; |
||||
} |
||||
List<Long> ids = list.stream() |
||||
.map(IotThickness::getId) |
||||
.toList(); |
||||
int deletedCount = deleteService.deleteHistoryOneBatch(ids); |
||||
totalDeleted = totalDeleted + deletedCount; |
||||
currentPage = currentPage + 1; |
||||
} |
||||
return totalDeleted; |
||||
} |
||||
} |
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue