parent
00950dc0cc
commit
b6ddb553fc
68 changed files with 2624 additions and 204 deletions
@ -0,0 +1 @@ |
||||
package org.springblade.desk.zz; |
||||
@ -0,0 +1,27 @@ |
||||
package org.springblade.job.processor.quality; |
||||
|
||||
import jakarta.annotation.Resource; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.desk.quality.feign.ILquidTankTaskClient; |
||||
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; |
||||
|
||||
@Slf4j |
||||
@Component |
||||
public class LquidTankTaskProcessor implements BasicProcessor { |
||||
|
||||
@Resource |
||||
private ILquidTankTaskClient lquidTankTaskClient; |
||||
|
||||
@Override |
||||
public ProcessResult process(TaskContext context) throws Exception { |
||||
OmsLogger omsLogger = context.getOmsLogger(); |
||||
omsLogger.info("InspectionTaskGenJob start"); |
||||
lquidTankTaskClient.generate(); |
||||
omsLogger.info("InspectionTaskGenJob end"); |
||||
return null; |
||||
} |
||||
} |
||||
@ -0,0 +1,21 @@ |
||||
package org.springblade.desk.quality.feign; |
||||
|
||||
import org.springblade.core.launch.constant.AppConstant; |
||||
import org.springblade.desk.quality.pojo.entity.LiquidTankTask; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
||||
import java.util.List; |
||||
|
||||
@FeignClient( |
||||
value = AppConstant.APPLICATION_DESK_NAME |
||||
) |
||||
public interface ILquidTankTaskClient { |
||||
|
||||
String API_PREFIX = "/feign/client/lquid-tank-task"; |
||||
|
||||
String GENERATE = API_PREFIX + "/generate"; |
||||
|
||||
@GetMapping(GENERATE) |
||||
public List<LiquidTankTask> generate(); |
||||
} |
||||
@ -0,0 +1,246 @@ |
||||
/** |
||||
* 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-14 |
||||
*/ |
||||
@Data |
||||
@Schema(description = "LiquidTankTask Entity对象") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class LiquidTankTask extends BaseEntity { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* [槽液检测任务]编码 |
||||
*/ |
||||
@Schema(description = "[槽液检测任务]编码") |
||||
private String code; |
||||
/** |
||||
* 类型 |
||||
*/ |
||||
@Schema(description = "类型") |
||||
private Long liquidTankTaskType; |
||||
/** |
||||
* 名称 |
||||
*/ |
||||
@Schema(description = "名称") |
||||
private String name; |
||||
/** |
||||
* [槽液]id |
||||
*/ |
||||
@Schema(description = "[槽液]id") |
||||
private Long liquidTankId; |
||||
/** |
||||
* [作业中心]id |
||||
*/ |
||||
@Schema(description = "[作业中心]id") |
||||
private Long workCenterId; |
||||
/** |
||||
* 药品[物料]id |
||||
*/ |
||||
@Schema(description = "药品[物料]id") |
||||
private Long drugMaterialId; |
||||
/** |
||||
* [槽液]编号 |
||||
*/ |
||||
@Schema(description = "[槽液]编号") |
||||
private String liquidTankCode; |
||||
/** |
||||
* 待测成分 |
||||
*/ |
||||
@Schema(description = "待测成分") |
||||
private String testElement; |
||||
/** |
||||
* 药品名称 |
||||
*/ |
||||
@Schema(description = "药品名称") |
||||
private String drugName; |
||||
/** |
||||
* 药品[物料]编码 |
||||
*/ |
||||
@Schema(description = "药品[物料]编码") |
||||
private String drugMaterialCode; |
||||
/** |
||||
* 药品物料名称 |
||||
*/ |
||||
@Schema(description = "药品物料名称") |
||||
private String drugMaterialName; |
||||
/** |
||||
* 工艺含量 |
||||
*/ |
||||
@Schema(description = "工艺含量") |
||||
private String processContent; |
||||
/** |
||||
* 目标值 |
||||
*/ |
||||
@Schema(description = "目标值") |
||||
private BigDecimal targetValue; |
||||
/** |
||||
* 目标上下限 |
||||
*/ |
||||
@Schema(description = "目标上下限") |
||||
private String bound; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
@Schema(description = "排序") |
||||
private Long sort; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@Schema(description = "备注") |
||||
private String remark; |
||||
/** |
||||
* 添加点 |
||||
*/ |
||||
@Schema(description = "添加点") |
||||
private BigDecimal fillingLocation; |
||||
/** |
||||
* 电导率测量值 |
||||
*/ |
||||
@Schema(description = "电导率测量值") |
||||
private BigDecimal conductivityTestValue; |
||||
/** |
||||
* 体积 |
||||
*/ |
||||
@Schema(description = "体积") |
||||
private BigDecimal volume; |
||||
/** |
||||
* 单位 |
||||
*/ |
||||
@Schema(description = "单位") |
||||
private BigDecimal unit; |
||||
/** |
||||
* [计量单位]id |
||||
*/ |
||||
@Schema(description = "[计量单位]id") |
||||
private BigDecimal unitId; |
||||
/** |
||||
* 加药量单位 |
||||
*/ |
||||
@Schema(description = "加药量单位") |
||||
private String addUnit; |
||||
/** |
||||
* 加药量[计量单位]id |
||||
*/ |
||||
@Schema(description = "加药量[计量单位]id") |
||||
private BigDecimal addUnitId; |
||||
/** |
||||
* 分析周期 |
||||
*/ |
||||
@Schema(description = "分析周期") |
||||
private Integer analysisCycle; |
||||
/** |
||||
* 有效期 |
||||
*/ |
||||
@Schema(description = "有效期") |
||||
private LocalDateTime validDate; |
||||
/** |
||||
* 上次化验日期 |
||||
*/ |
||||
@Schema(description = "上次化验日期") |
||||
private LocalDateTime lastTest; |
||||
/** |
||||
* 槽液到期日期 |
||||
*/ |
||||
@Schema(description = "槽液到期日期") |
||||
private LocalDateTime expiryDate; |
||||
/** |
||||
* 化验人[用户]id |
||||
*/ |
||||
@Schema(description = "化验人[用户]id") |
||||
private BigDecimal testUserId; |
||||
/** |
||||
* 工艺主管[用户]id |
||||
*/ |
||||
@Schema(description = "工艺主管[用户]id") |
||||
private BigDecimal processUserId; |
||||
/** |
||||
* 测量值 |
||||
*/ |
||||
@Schema(description = "测量值") |
||||
private BigDecimal testValue; |
||||
/** |
||||
* 需添加量 |
||||
*/ |
||||
@Schema(description = "需添加量") |
||||
private BigDecimal needAddValue; |
||||
/** |
||||
* 实际添加量 |
||||
*/ |
||||
@Schema(description = "实际添加量") |
||||
private BigDecimal actualAddValue; |
||||
/** |
||||
* 加药后含量 |
||||
*/ |
||||
@Schema(description = "加药后含量") |
||||
private BigDecimal afterAddValue; |
||||
/** |
||||
* [班组]id |
||||
*/ |
||||
@Schema(description = "[班组]id") |
||||
private BigDecimal teamId; |
||||
/** |
||||
* 参数录入时间 |
||||
*/ |
||||
@Schema(description = "参数录入时间") |
||||
private LocalDateTime entryDate; |
||||
/** |
||||
* 确认时间 |
||||
*/ |
||||
@Schema(description = "确认时间") |
||||
private LocalDateTime confirmDate; |
||||
/** |
||||
* 送出[用户]id |
||||
*/ |
||||
@Schema(description = "送出[用户]id") |
||||
private BigDecimal sendUserId; |
||||
/** |
||||
* 送出时间 |
||||
*/ |
||||
@Schema(description = "送出时间") |
||||
private LocalDateTime sendDate; |
||||
/** |
||||
* 接收[用户]id |
||||
*/ |
||||
@Schema(description = "接收[用户]id") |
||||
private BigDecimal receiveUserId; |
||||
/** |
||||
* 接收时间 |
||||
*/ |
||||
@Schema(description = "接收时间") |
||||
private LocalDateTime receiveDate; |
||||
/** |
||||
* 处理[用户]id |
||||
*/ |
||||
@Schema(description = "处理[用户]id") |
||||
private BigDecimal handleUserId; |
||||
/** |
||||
* 处理时间 |
||||
*/ |
||||
@Schema(description = "处理时间") |
||||
private LocalDateTime handleDate; |
||||
/** |
||||
* 来源类型 |
||||
*/ |
||||
@Schema(description = "来源类型") |
||||
private Integer fromType; |
||||
|
||||
} |
||||
@ -0,0 +1,8 @@ |
||||
package org.springblade.desk.quality.constant; |
||||
|
||||
public interface ColBase { |
||||
|
||||
String STATUS = "STATUS"; |
||||
|
||||
String ID = "ID"; |
||||
} |
||||
@ -0,0 +1,13 @@ |
||||
package org.springblade.desk.quality.constant; |
||||
|
||||
public interface ColValue { |
||||
|
||||
/** |
||||
* 启用 |
||||
*/ |
||||
Integer STATE_ENABLE = 1; |
||||
/** |
||||
* 禁用 |
||||
*/ |
||||
Integer STATE_DISABLE = 0; |
||||
} |
||||
@ -0,0 +1,5 @@ |
||||
package org.springblade.desk.quality.constant; |
||||
|
||||
public interface LiquidTankConst { |
||||
|
||||
} |
||||
@ -0,0 +1,79 @@ |
||||
package org.springblade.desk.quality.constant; |
||||
|
||||
public interface LiquidTankTaskConst { |
||||
|
||||
/** |
||||
* 来源类型-手动 |
||||
*/ |
||||
Integer FROM_TYPE_MANUAL = 1; |
||||
|
||||
/** |
||||
* 来源类型-定时任务周期性 |
||||
*/ |
||||
Integer FROM_TYPE_PERIODIC = 2; |
||||
|
||||
/** |
||||
* 来源类型-生产计算 |
||||
*/ |
||||
Integer FROM_TYPE_CAL = 3; |
||||
|
||||
/** |
||||
* 状态-初始化 |
||||
*/ |
||||
Integer STATE_INIT = 0; |
||||
|
||||
/** |
||||
* 状态-程序生成 或 试验化验班长手动:待接收 |
||||
*/ |
||||
Integer STATE_PENDING_OPEN = 1; |
||||
|
||||
/** |
||||
* 状态-待检测 |
||||
*/ |
||||
Integer STATE_PENDING_TEST = 2; |
||||
|
||||
/** |
||||
* 状态-检测员:已填报 |
||||
*/ |
||||
Integer STATE_REC = 3; |
||||
|
||||
/** |
||||
* 状态-已自动计算加药量 |
||||
*/ |
||||
Integer STATE_AFTER_CAL = 4; |
||||
|
||||
/** |
||||
* 状态-检测员:加药量待审核 |
||||
*/ |
||||
Integer STATE_PENDING_REVIEW = 5; |
||||
|
||||
/** |
||||
* 状态-工艺员:待发放药,已经通过加药量审核 |
||||
*/ |
||||
Integer STATE_PENDING_SEND = 6; |
||||
|
||||
/** |
||||
* 状态- |
||||
*/ |
||||
Integer STATE_7 = 7; |
||||
|
||||
/** |
||||
* 状态-待下发,没有分派至检测员 |
||||
*/ |
||||
Integer STATE_NO_TESTER = 11; |
||||
|
||||
/** |
||||
* 状态-已完成,异常结束 |
||||
*/ |
||||
Integer STATE_FINISH_FAILED = 21; |
||||
|
||||
/** |
||||
* 状态-已完成,正常结束 |
||||
*/ |
||||
Integer STATE_FINISH_OK = 22; |
||||
|
||||
/** |
||||
* 班组已处理 todo: |
||||
*/ |
||||
Integer STATUS_HANDLED = 10; |
||||
} |
||||
@ -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.InspectionResultGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.InspectionResult; |
||||
import org.springblade.desk.quality.pojo.vo.gen.InspectionResultGenVO; |
||||
import org.springblade.desk.quality.service.gen.IInspectionResultGenService; |
||||
import org.springblade.desk.quality.wrapper.gen.InspectionResultGenWrapper; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* [检验结果] 控制器 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-14 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/inspectionResult") |
||||
@Tag(name = "[检验结果]", description = "[检验结果]接口") |
||||
public class InspectionResultController extends BladeController { |
||||
|
||||
private final IInspectionResultGenService inspectionResultGenService; |
||||
|
||||
/** |
||||
* [检验结果] 详情 |
||||
*/ |
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 1) |
||||
@Operation(summary = "详情", description = "传入inspectionResult") |
||||
public R<InspectionResultGenVO> detail(InspectionResult inspectionResult) { |
||||
InspectionResult detail = inspectionResultGenService.getOne(Condition.getQueryWrapper(inspectionResult)); |
||||
return R.data(InspectionResultGenWrapper.build().entityVO(detail)); |
||||
} |
||||
|
||||
/** |
||||
* [检验结果] 分页 |
||||
*/ |
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 2) |
||||
@Operation(summary = "分页", description = "传入inspectionResult") |
||||
public R<IPage<InspectionResultGenVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> inspectionResult, Query query) { |
||||
IPage<InspectionResult> pages = inspectionResultGenService.page(Condition.getPage(query), Condition.getQueryWrapper(inspectionResult, InspectionResult.class)); |
||||
return R.data(InspectionResultGenWrapper.build().pageVO(pages)); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* [检验结果] 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@ApiOperationSupport(order = 3) |
||||
@Operation(summary = "分页", description = "传入inspectionResult") |
||||
public R<IPage<InspectionResultGenVO>> page(InspectionResultGenVO inspectionResult, Query query) { |
||||
IPage<InspectionResultGenVO> pages = inspectionResultGenService.selectInspectionResultPage(Condition.getPage(query), inspectionResult); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* [检验结果] 新增 |
||||
*/ |
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 4) |
||||
@Operation(summary = "新增", description = "传入inspectionResult") |
||||
public R save(@Valid @RequestBody InspectionResult inspectionResult) { |
||||
return R.status(inspectionResultGenService.save(inspectionResult)); |
||||
} |
||||
|
||||
/** |
||||
* [检验结果] 修改 |
||||
*/ |
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 5) |
||||
@Operation(summary = "修改", description = "传入inspectionResult") |
||||
public R update(@Valid @RequestBody InspectionResult inspectionResult) { |
||||
return R.status(inspectionResultGenService.updateById(inspectionResult)); |
||||
} |
||||
|
||||
/** |
||||
* [检验结果] 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 6) |
||||
@Operation(summary = "新增或修改", description = "传入inspectionResult") |
||||
public R submit(@Valid @RequestBody InspectionResult inspectionResult) { |
||||
return R.status(inspectionResultGenService.saveOrUpdate(inspectionResult)); |
||||
} |
||||
|
||||
/** |
||||
* [检验结果] 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 7) |
||||
@Operation(summary = "逻辑删除", description = "传入ids") |
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(inspectionResultGenService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@IsAdmin |
||||
@GetMapping("/export-inspectionResult") |
||||
@ApiOperationSupport(order = 8) |
||||
@Operation(summary = "导出数据", description = "传入inspectionResult") |
||||
public void exportInspectionResult(@Parameter(hidden = true) @RequestParam Map<String, Object> inspectionResult, BladeUser bladeUser, HttpServletResponse response) { |
||||
QueryWrapper<InspectionResult> queryWrapper = Condition.getQueryWrapper(inspectionResult, InspectionResult.class); |
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(InspectionResult::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
//queryWrapper.lambda().eq(InspectionResultEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||
List<InspectionResultGenExcel> list = inspectionResultGenService.exportInspectionResult(queryWrapper); |
||||
ExcelUtil.export(response, "[检验结果]数据" + DateUtil.time(), "[检验结果]数据表", list, InspectionResultGenExcel.class); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,153 @@ |
||||
/** |
||||
* 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.annotation.Resource; |
||||
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.InspectionTaskGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.InspectionTask; |
||||
import org.springblade.desk.quality.pojo.request.InspectionTaskStart; |
||||
import org.springblade.desk.quality.pojo.vo.gen.InspectionTaskGenVO; |
||||
import org.springblade.desk.quality.service.InspectionTaskService; |
||||
import org.springblade.desk.quality.service.gen.IInspectionTaskGenService; |
||||
import org.springblade.desk.quality.wrapper.gen.InspectionTaskGenWrapper; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* [检验任务] 控制器 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-14 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/inspectionTask") |
||||
@Tag(name = "[检验任务]", description = "[检验任务]接口") |
||||
public class InspectionTaskController extends BladeController { |
||||
|
||||
@Resource |
||||
private IInspectionTaskGenService genService; |
||||
@Resource |
||||
private InspectionTaskService service; |
||||
|
||||
/** |
||||
* [检验任务] 详情 |
||||
*/ |
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 1) |
||||
@Operation(summary = "详情", description = "传入inspectionTask") |
||||
public R<InspectionTaskGenVO> detail(InspectionTask inspectionTask) { |
||||
InspectionTask detail = genService.getOne(Condition.getQueryWrapper(inspectionTask)); |
||||
return R.data(InspectionTaskGenWrapper.build().entityVO(detail)); |
||||
} |
||||
|
||||
/** |
||||
* [检验任务] 分页 |
||||
*/ |
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 2) |
||||
@Operation(summary = "分页", description = "传入inspectionTask") |
||||
public R<IPage<InspectionTaskGenVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> inspectionTask, Query query) { |
||||
IPage<InspectionTask> pages = genService.page(Condition.getPage(query), Condition.getQueryWrapper(inspectionTask, InspectionTask.class)); |
||||
return R.data(InspectionTaskGenWrapper.build().pageVO(pages)); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* [检验任务] 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@ApiOperationSupport(order = 3) |
||||
@Operation(summary = "分页", description = "传入inspectionTask") |
||||
public R<IPage<InspectionTaskGenVO>> page(InspectionTaskGenVO inspectionTask, Query query) { |
||||
IPage<InspectionTaskGenVO> pages = genService.selectInspectionTaskPage(Condition.getPage(query), inspectionTask); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* [检验任务] 新增 |
||||
*/ |
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 4) |
||||
@Operation(summary = "新增", description = "传入inspectionTask") |
||||
public R save(@Valid @RequestBody InspectionTask inspectionTask) { |
||||
return R.status(genService.save(inspectionTask)); |
||||
} |
||||
|
||||
/** |
||||
* [检验任务] 修改 |
||||
*/ |
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 5) |
||||
@Operation(summary = "修改", description = "传入inspectionTask") |
||||
public R update(@Valid @RequestBody InspectionTask inspectionTask) { |
||||
return R.status(genService.updateById(inspectionTask)); |
||||
} |
||||
|
||||
/** |
||||
* [检验任务] 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 6) |
||||
@Operation(summary = "新增或修改", description = "传入inspectionTask") |
||||
public R submit(@Valid @RequestBody InspectionTask inspectionTask) { |
||||
return R.status(genService.saveOrUpdate(inspectionTask)); |
||||
} |
||||
|
||||
/** |
||||
* [检验任务] 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 7) |
||||
@Operation(summary = "逻辑删除", description = "传入ids") |
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(genService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@IsAdmin |
||||
@GetMapping("/export-inspectionTask") |
||||
@ApiOperationSupport(order = 8) |
||||
@Operation(summary = "导出数据", description = "传入inspectionTask") |
||||
public void exportInspectionTask(@Parameter(hidden = true) @RequestParam Map<String, Object> inspectionTask, BladeUser bladeUser, HttpServletResponse response) { |
||||
QueryWrapper<InspectionTask> queryWrapper = Condition.getQueryWrapper(inspectionTask, InspectionTask.class); |
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(InspectionTask::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
//queryWrapper.lambda().eq(InspectionTaskEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||
List<InspectionTaskGenExcel> list = genService.exportInspectionTask(queryWrapper); |
||||
ExcelUtil.export(response, "[检验任务]数据" + DateUtil.time(), "[检验任务]数据表", list, InspectionTaskGenExcel.class); |
||||
} |
||||
|
||||
/** |
||||
* 工序开始,[检验任务]生成 |
||||
*/ |
||||
@PostMapping("/start") |
||||
@ApiOperationSupport(order = 100) |
||||
@Operation(summary = "", description = "传入inspectionTask") |
||||
public R start(@Valid @RequestBody InspectionTaskStart start) { |
||||
return service.start(start); |
||||
} |
||||
} |
||||
@ -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.LiquidTankTaskGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.LiquidTankTask; |
||||
import org.springblade.desk.quality.pojo.vo.gen.LiquidTankTaskGenVO; |
||||
import org.springblade.desk.quality.service.gen.ILiquidTankTaskGenService; |
||||
import org.springblade.desk.quality.wrapper.gen.LiquidTankTaskGenWrapper; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* [槽液检测任务] 控制器 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-14 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/liquidTankTask") |
||||
@Tag(name = "[槽液检测任务]", description = "[槽液检测任务]接口") |
||||
public class LiquidTankTaskController extends BladeController { |
||||
|
||||
private final ILiquidTankTaskGenService liquidTankTaskGenService; |
||||
|
||||
/** |
||||
* [槽液检测任务] 详情 |
||||
*/ |
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 1) |
||||
@Operation(summary = "详情", description = "传入liquidTankTask") |
||||
public R<LiquidTankTaskGenVO> detail(LiquidTankTask liquidTankTask) { |
||||
LiquidTankTask detail = liquidTankTaskGenService.getOne(Condition.getQueryWrapper(liquidTankTask)); |
||||
return R.data(LiquidTankTaskGenWrapper.build().entityVO(detail)); |
||||
} |
||||
|
||||
/** |
||||
* [槽液检测任务] 分页 |
||||
*/ |
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 2) |
||||
@Operation(summary = "分页", description = "传入liquidTankTask") |
||||
public R<IPage<LiquidTankTaskGenVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> liquidTankTask, Query query) { |
||||
IPage<LiquidTankTask> pages = liquidTankTaskGenService.page(Condition.getPage(query), Condition.getQueryWrapper(liquidTankTask, LiquidTankTask.class)); |
||||
return R.data(LiquidTankTaskGenWrapper.build().pageVO(pages)); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* [槽液检测任务] 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@ApiOperationSupport(order = 3) |
||||
@Operation(summary = "分页", description = "传入liquidTankTask") |
||||
public R<IPage<LiquidTankTaskGenVO>> page(LiquidTankTaskGenVO liquidTankTask, Query query) { |
||||
IPage<LiquidTankTaskGenVO> pages = liquidTankTaskGenService.selectLiquidTankTaskPage(Condition.getPage(query), liquidTankTask); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* [槽液检测任务] 新增 |
||||
*/ |
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 4) |
||||
@Operation(summary = "新增", description = "传入liquidTankTask") |
||||
public R save(@Valid @RequestBody LiquidTankTask liquidTankTask) { |
||||
return R.status(liquidTankTaskGenService.save(liquidTankTask)); |
||||
} |
||||
|
||||
/** |
||||
* [槽液检测任务] 修改 |
||||
*/ |
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 5) |
||||
@Operation(summary = "修改", description = "传入liquidTankTask") |
||||
public R update(@Valid @RequestBody LiquidTankTask liquidTankTask) { |
||||
return R.status(liquidTankTaskGenService.updateById(liquidTankTask)); |
||||
} |
||||
|
||||
/** |
||||
* [槽液检测任务] 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 6) |
||||
@Operation(summary = "新增或修改", description = "传入liquidTankTask") |
||||
public R submit(@Valid @RequestBody LiquidTankTask liquidTankTask) { |
||||
return R.status(liquidTankTaskGenService.saveOrUpdate(liquidTankTask)); |
||||
} |
||||
|
||||
/** |
||||
* [槽液检测任务] 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 7) |
||||
@Operation(summary = "逻辑删除", description = "传入ids") |
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(liquidTankTaskGenService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@IsAdmin |
||||
@GetMapping("/export-liquidTankTask") |
||||
@ApiOperationSupport(order = 8) |
||||
@Operation(summary = "导出数据", description = "传入liquidTankTask") |
||||
public void exportLiquidTankTask(@Parameter(hidden = true) @RequestParam Map<String, Object> liquidTankTask, BladeUser bladeUser, HttpServletResponse response) { |
||||
QueryWrapper<LiquidTankTask> queryWrapper = Condition.getQueryWrapper(liquidTankTask, LiquidTankTask.class); |
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(LiquidTankTask::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
//queryWrapper.lambda().eq(LiquidTankTaskEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||
List<LiquidTankTaskGenExcel> list = liquidTankTaskGenService.exportLiquidTankTask(queryWrapper); |
||||
ExcelUtil.export(response, "[槽液检测任务]数据" + DateUtil.time(), "[槽液检测任务]数据表", list, LiquidTankTaskGenExcel.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.NgGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.Ng; |
||||
import org.springblade.desk.quality.pojo.vo.gen.NgGenVO; |
||||
import org.springblade.desk.quality.service.gen.INgGenService; |
||||
import org.springblade.desk.quality.wrapper.gen.NgGenWrapper; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* [缺陷] 控制器 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-13 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/ng") |
||||
@Tag(name = "[缺陷]", description = "[缺陷]接口") |
||||
public class NgController extends BladeController { |
||||
|
||||
private final INgGenService ngGenService; |
||||
|
||||
/** |
||||
* [缺陷] 详情 |
||||
*/ |
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 1) |
||||
@Operation(summary = "详情", description = "传入ng") |
||||
public R<NgGenVO> detail(Ng ng) { |
||||
Ng detail = ngGenService.getOne(Condition.getQueryWrapper(ng)); |
||||
return R.data(NgGenWrapper.build().entityVO(detail)); |
||||
} |
||||
|
||||
/** |
||||
* [缺陷] 分页 |
||||
*/ |
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 2) |
||||
@Operation(summary = "分页", description = "传入ng") |
||||
public R<IPage<NgGenVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> ng, Query query) { |
||||
IPage<Ng> pages = ngGenService.page(Condition.getPage(query), Condition.getQueryWrapper(ng, Ng.class)); |
||||
return R.data(NgGenWrapper.build().pageVO(pages)); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* [缺陷] 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@ApiOperationSupport(order = 3) |
||||
@Operation(summary = "分页", description = "传入ng") |
||||
public R<IPage<NgGenVO>> page(NgGenVO ng, Query query) { |
||||
IPage<NgGenVO> pages = ngGenService.selectNgPage(Condition.getPage(query), ng); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* [缺陷] 新增 |
||||
*/ |
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 4) |
||||
@Operation(summary = "新增", description = "传入ng") |
||||
public R save(@Valid @RequestBody Ng ng) { |
||||
return R.status(ngGenService.save(ng)); |
||||
} |
||||
|
||||
/** |
||||
* [缺陷] 修改 |
||||
*/ |
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 5) |
||||
@Operation(summary = "修改", description = "传入ng") |
||||
public R update(@Valid @RequestBody Ng ng) { |
||||
return R.status(ngGenService.updateById(ng)); |
||||
} |
||||
|
||||
/** |
||||
* [缺陷] 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 6) |
||||
@Operation(summary = "新增或修改", description = "传入ng") |
||||
public R submit(@Valid @RequestBody Ng ng) { |
||||
return R.status(ngGenService.saveOrUpdate(ng)); |
||||
} |
||||
|
||||
/** |
||||
* [缺陷] 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 7) |
||||
@Operation(summary = "逻辑删除", description = "传入ids") |
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(ngGenService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@IsAdmin |
||||
@GetMapping("/export-ng") |
||||
@ApiOperationSupport(order = 8) |
||||
@Operation(summary = "导出数据", description = "传入ng") |
||||
public void exportNg(@Parameter(hidden = true) @RequestParam Map<String, Object> ng, BladeUser bladeUser, HttpServletResponse response) { |
||||
QueryWrapper<Ng> queryWrapper = Condition.getQueryWrapper(ng, Ng.class); |
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(Ng::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
//queryWrapper.lambda().eq(NgEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||
List<NgGenExcel> list = ngGenService.exportNg(queryWrapper); |
||||
ExcelUtil.export(response, "[缺陷]数据" + DateUtil.time(), "[缺陷]数据表", list, NgGenExcel.class); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,131 @@ |
||||
/** |
||||
* 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-14 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class InspectionResultGenExcel implements Serializable { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("编码") |
||||
private String code; |
||||
/** |
||||
* 类型 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("类型") |
||||
private Long inspectionResultType; |
||||
/** |
||||
* 名称 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("名称") |
||||
private String name; |
||||
/** |
||||
* [检验任务]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[检验任务]id") |
||||
private BigDecimal inspectionTaskId; |
||||
/** |
||||
* [检验项目]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[检验项目]id") |
||||
private BigDecimal inspectionItemId; |
||||
/** |
||||
* [缺陷]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[缺陷]id") |
||||
private BigDecimal ngId; |
||||
/** |
||||
* 质检员[用户]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("质检员[用户]id") |
||||
private BigDecimal testUserId; |
||||
/** |
||||
* 测量值 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("测量值") |
||||
private Long testValue; |
||||
/** |
||||
* 检测文本描述 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("检测文本描述") |
||||
private Long testDesc; |
||||
/** |
||||
* 检测结果 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("检测结果") |
||||
private Long result; |
||||
/** |
||||
* 是否缺陷 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("是否缺陷") |
||||
private Long isNg; |
||||
/** |
||||
* [缺陷]代码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[缺陷]代码") |
||||
private String ngCode; |
||||
/** |
||||
* [缺陷]描述 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[缺陷]描述") |
||||
private String ngDesc; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("排序") |
||||
private Long sort; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("备注") |
||||
private String remark; |
||||
/** |
||||
* 检验时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("检验时间") |
||||
private LocalDateTime testDate; |
||||
|
||||
} |
||||
@ -0,0 +1,161 @@ |
||||
/** |
||||
* 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-14 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class InspectionTaskGenExcel implements Serializable { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* [检验任务]编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[检验任务]编码") |
||||
private String code; |
||||
/** |
||||
* [检验任务]类型 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[检验任务]类型") |
||||
private Long inspectionTaskType; |
||||
/** |
||||
* [检验任务] |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[检验任务]") |
||||
private String name; |
||||
/** |
||||
* [工单]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[工单]id") |
||||
private BigDecimal workOrderId; |
||||
/** |
||||
* [制品]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[制品]id") |
||||
private BigDecimal productId; |
||||
/** |
||||
* [工序]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[工序]id") |
||||
private BigDecimal processId; |
||||
/** |
||||
* 质检员[用户]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("质检员[用户]id") |
||||
private BigDecimal testUserId; |
||||
/** |
||||
* [制品]编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[制品]编码") |
||||
private Long productCode; |
||||
/** |
||||
* [制品]序列号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[制品]序列号") |
||||
private Long productSn; |
||||
/** |
||||
* 生产批次号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("生产批次号") |
||||
private Long batchNumber; |
||||
/** |
||||
* [工单]编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[工单]编码") |
||||
private String workOrderCode; |
||||
/** |
||||
* [工序]编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[工序]编码") |
||||
private String processCode; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("排序") |
||||
private Long sort; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("备注") |
||||
private String remark; |
||||
/** |
||||
* 计划开始时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("计划开始时间") |
||||
private LocalDateTime plannedStartDate; |
||||
/** |
||||
* 计划结束时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("计划结束时间") |
||||
private LocalDateTime plannedEndDate; |
||||
/** |
||||
* 实际开始时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("实际开始时间") |
||||
private LocalDateTime actualStartDate; |
||||
/** |
||||
* 实际结束时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("实际结束时间") |
||||
private LocalDateTime actualEndDate; |
||||
/** |
||||
* 检验样本数量 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("检验样本数量") |
||||
private BigDecimal simpleCount; |
||||
/** |
||||
* 缺陷数量 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("缺陷数量") |
||||
private BigDecimal ngCount; |
||||
/** |
||||
* 检验结果 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("检验结果") |
||||
private Long result; |
||||
|
||||
} |
||||
@ -0,0 +1,293 @@ |
||||
/** |
||||
* 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-14 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class LiquidTankTaskGenExcel implements Serializable { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* [槽液检测任务]编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[槽液检测任务]编码") |
||||
private String code; |
||||
/** |
||||
* 类型 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("类型") |
||||
private Long liquidTankTaskType; |
||||
/** |
||||
* 名称 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("名称") |
||||
private String name; |
||||
/** |
||||
* [槽液]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[槽液]id") |
||||
private BigDecimal liquidTankId; |
||||
/** |
||||
* [作业中心]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[作业中心]id") |
||||
private BigDecimal workCenterId; |
||||
/** |
||||
* 药品[物料]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("药品[物料]id") |
||||
private BigDecimal drugMaterialId; |
||||
/** |
||||
* [槽液]编号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[槽液]编号") |
||||
private String liquidTankCode; |
||||
/** |
||||
* 待测成分 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("待测成分") |
||||
private String testElement; |
||||
/** |
||||
* 药品名称 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("药品名称") |
||||
private String drugName; |
||||
/** |
||||
* 药品[物料]编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("药品[物料]编码") |
||||
private String drugMaterialCode; |
||||
/** |
||||
* 药品物料名称 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("药品物料名称") |
||||
private String drugMaterialName; |
||||
/** |
||||
* 工艺含量 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("工艺含量") |
||||
private String processContent; |
||||
/** |
||||
* 目标值 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("目标值") |
||||
private BigDecimal targetValue; |
||||
/** |
||||
* 目标上下限 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("目标上下限") |
||||
private String bound; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("排序") |
||||
private Long sort; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("备注") |
||||
private String remark; |
||||
/** |
||||
* 添加点 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("添加点") |
||||
private BigDecimal fillingLocation; |
||||
/** |
||||
* 电导率测量值 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("电导率测量值") |
||||
private BigDecimal conductivityTestValue; |
||||
/** |
||||
* 体积 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("体积") |
||||
private BigDecimal volume; |
||||
/** |
||||
* 单位 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("单位") |
||||
private BigDecimal unit; |
||||
/** |
||||
* [计量单位]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[计量单位]id") |
||||
private BigDecimal unitId; |
||||
/** |
||||
* 加药量单位 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("加药量单位") |
||||
private String addUnit; |
||||
/** |
||||
* 加药量[计量单位]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("加药量[计量单位]id") |
||||
private BigDecimal addUnitId; |
||||
/** |
||||
* 分析周期 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("分析周期") |
||||
private Integer analysisCycle; |
||||
/** |
||||
* 有效期 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("有效期") |
||||
private LocalDateTime validDate; |
||||
/** |
||||
* 上次化验日期 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("上次化验日期") |
||||
private LocalDateTime lastTest; |
||||
/** |
||||
* 槽液到期日期 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("槽液到期日期") |
||||
private LocalDateTime expiryDate; |
||||
/** |
||||
* 化验人[用户]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("化验人[用户]id") |
||||
private BigDecimal testUserId; |
||||
/** |
||||
* 工艺主管[用户]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("工艺主管[用户]id") |
||||
private BigDecimal processUserId; |
||||
/** |
||||
* 测量值 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("测量值") |
||||
private BigDecimal testValue; |
||||
/** |
||||
* 需添加量 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("需添加量") |
||||
private BigDecimal needAddValue; |
||||
/** |
||||
* 实际添加量 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("实际添加量") |
||||
private BigDecimal actualAddValue; |
||||
/** |
||||
* 加药后含量 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("加药后含量") |
||||
private BigDecimal afterAddValue; |
||||
/** |
||||
* [班组]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[班组]id") |
||||
private BigDecimal teamId; |
||||
/** |
||||
* 参数录入时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("参数录入时间") |
||||
private LocalDateTime entryDate; |
||||
/** |
||||
* 确认时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("确认时间") |
||||
private LocalDateTime confirmDate; |
||||
/** |
||||
* 送出[用户]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("送出[用户]id") |
||||
private BigDecimal sendUserId; |
||||
/** |
||||
* 送出时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("送出时间") |
||||
private LocalDateTime sendDate; |
||||
/** |
||||
* 接收[用户]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("接收[用户]id") |
||||
private BigDecimal receiveUserId; |
||||
/** |
||||
* 接收时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("接收时间") |
||||
private LocalDateTime receiveDate; |
||||
/** |
||||
* 处理[用户]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("处理[用户]id") |
||||
private BigDecimal handleUserId; |
||||
/** |
||||
* 处理时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("处理时间") |
||||
private LocalDateTime handleDate; |
||||
/** |
||||
* 来源类型 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("来源类型") |
||||
private Long fromType; |
||||
|
||||
} |
||||
@ -0,0 +1,100 @@ |
||||
/** |
||||
* 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-13 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class NgGenExcel implements Serializable { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("编码") |
||||
private String code; |
||||
/** |
||||
* 类型1:故障特征 2:故障类别 3:问题大类 4:问题小类 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("类型1:故障特征 2:故障类别 3:问题大类 4:问题小类") |
||||
private Long ngType; |
||||
/** |
||||
* 名称 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("名称") |
||||
private String name; |
||||
/** |
||||
* 父级[不良原因]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("父级[不良原因]id") |
||||
private BigDecimal parentId; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("排序") |
||||
private Long sort; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("备注") |
||||
private String remark; |
||||
/** |
||||
* 缺陷描述 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("缺陷描述") |
||||
private String desc; |
||||
/** |
||||
* [制品]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[制品]id") |
||||
private BigDecimal productId; |
||||
/** |
||||
* [制品]编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[制品]编码") |
||||
private String productCode; |
||||
/** |
||||
* [工序]id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[工序]id") |
||||
private BigDecimal processId; |
||||
/** |
||||
* [工序]编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("[工序]编码") |
||||
private String processCode; |
||||
|
||||
} |
||||
@ -0,0 +1,23 @@ |
||||
package org.springblade.desk.quality.feign; |
||||
|
||||
import io.swagger.v3.oas.annotations.Hidden; |
||||
import jakarta.annotation.Resource; |
||||
import org.springblade.desk.quality.pojo.entity.LiquidTankTask; |
||||
import org.springblade.desk.quality.service.LiquidTankTaskService; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
import java.util.List; |
||||
|
||||
@RestController |
||||
@Hidden() |
||||
public class LiquidTankTaskClient implements ILquidTankTaskClient { |
||||
|
||||
@Resource |
||||
private LiquidTankTaskService service; |
||||
|
||||
@Override |
||||
public List<LiquidTankTask> generate() { |
||||
return service.generate(); |
||||
} |
||||
} |
||||
|
||||
@ -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.InspectionResultGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.InspectionResult; |
||||
import org.springblade.desk.quality.pojo.vo.gen.InspectionResultGenVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* [检验结果] Mapper 接口 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-14 |
||||
*/ |
||||
public interface InspectionResultGenMapper extends BaseMapper<InspectionResult> { |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param inspectionResult 查询参数 |
||||
* @return List<InspectionResultVO> |
||||
*/ |
||||
List<InspectionResultGenVO> selectInspectionResultPage(IPage page, InspectionResultGenVO inspectionResult); |
||||
|
||||
/** |
||||
* 获取导出数据 |
||||
* |
||||
* @param queryWrapper 查询条件 |
||||
* @return List<InspectionResultExcel> |
||||
*/ |
||||
List<InspectionResultGenExcel> exportInspectionResult(@Param("ew") Wrapper<InspectionResult> queryWrapper); |
||||
|
||||
} |
||||
@ -0,0 +1,33 @@ |
||||
<?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.InspectionResultGenMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="inspectionResultResultMap" type="org.springblade.desk.quality.pojo.entity.InspectionResult"> |
||||
<result column="CODE" property="code"/> |
||||
<result column="INSPECTION_RESULT_TYPE" property="inspectionResultType"/> |
||||
<result column="NAME" property="name"/> |
||||
<result column="INSPECTION_TASK_ID" property="inspectionTaskId"/> |
||||
<result column="INSPECTION_ITEM_ID" property="inspectionItemId"/> |
||||
<result column="NG_ID" property="ngId"/> |
||||
<result column="TEST_USER_ID" property="testUserId"/> |
||||
<result column="TEST_VALUE" property="testValue"/> |
||||
<result column="TEST_DESC" property="testDesc"/> |
||||
<result column="RESULT" property="result"/> |
||||
<result column="IS_NG" property="isNg"/> |
||||
<result column="NG_CODE" property="ngCode"/> |
||||
<result column="NG_DESC" property="ngDesc"/> |
||||
<result column="SORT" property="sort"/> |
||||
<result column="REMARK" property="remark"/> |
||||
<result column="TEST_DATE" property="testDate"/> |
||||
</resultMap> |
||||
|
||||
<select id="selectInspectionResultPage" resultMap="inspectionResultResultMap"> |
||||
SELECT * FROM QA_INSPECTION_RESULT WHERE is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="exportInspectionResult" resultType="org.springblade.desk.quality.excel.gen.InspectionResultGenExcel"> |
||||
SELECT * FROM QA_INSPECTION_RESULT ${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.InspectionResult; |
||||
|
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* [检验结果] 数据传输对象实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-14 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class InspectionResultGenDTO extends InspectionResult { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,112 @@ |
||||
/** |
||||
* 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-14 |
||||
*/ |
||||
@Data |
||||
@TableName("QA_INSPECTION_RESULT") |
||||
@Schema(description = "InspectionResult Entity对象") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class InspectionResult extends BaseEntity { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
@Schema(description = "编码") |
||||
private String code; |
||||
/** |
||||
* 类型 |
||||
*/ |
||||
@Schema(description = "类型") |
||||
private Long inspectionResultType; |
||||
/** |
||||
* 名称 |
||||
*/ |
||||
@Schema(description = "名称") |
||||
private String name; |
||||
/** |
||||
* [检验任务]id |
||||
*/ |
||||
@Schema(description = "[检验任务]id") |
||||
private Long inspectionTaskId; |
||||
/** |
||||
* [检验项目]id |
||||
*/ |
||||
@Schema(description = "[检验项目]id") |
||||
private Long inspectionItemId; |
||||
/** |
||||
* [缺陷]id |
||||
*/ |
||||
@Schema(description = "[缺陷]id") |
||||
private Long ngId; |
||||
/** |
||||
* 质检员[用户]id |
||||
*/ |
||||
@Schema(description = "质检员[用户]id") |
||||
private Long testUserId; |
||||
/** |
||||
* 测量值 |
||||
*/ |
||||
@Schema(description = "测量值") |
||||
private Long testValue; |
||||
/** |
||||
* 检测文本描述 |
||||
*/ |
||||
@Schema(description = "检测文本描述") |
||||
private Long testDesc; |
||||
/** |
||||
* 检测结果 |
||||
*/ |
||||
@Schema(description = "检测结果") |
||||
private Long result; |
||||
/** |
||||
* 是否缺陷 |
||||
*/ |
||||
@Schema(description = "是否缺陷") |
||||
private Long isNg; |
||||
/** |
||||
* [缺陷]代码 |
||||
*/ |
||||
@Schema(description = "[缺陷]代码") |
||||
private String ngCode; |
||||
/** |
||||
* [缺陷]描述 |
||||
*/ |
||||
@Schema(description = "[缺陷]描述") |
||||
private String ngDesc; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
@Schema(description = "排序") |
||||
private Long sort; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@Schema(description = "备注") |
||||
private String remark; |
||||
/** |
||||
* 检验时间 |
||||
*/ |
||||
@Schema(description = "检验时间") |
||||
private LocalDateTime testDate; |
||||
|
||||
} |
||||
@ -1,7 +1,30 @@ |
||||
/** |
||||
* 质量管理 Entity |
||||
* 质量管理 Entity |
||||
* 和一期系统对应关系。 |
||||
* v1 |
||||
* 故障类别 BsReviewSheetType |
||||
* |
||||
* 试验周期 QcTextCycle |
||||
* 试验项目 BsTextProject |
||||
* 测厚数据 QcThicknessIot |
||||
* |
||||
* |
||||
* |
||||
* |
||||
* PLANNED_START_DATE |
||||
* CONDITION |
||||
* |
||||
* |
||||
* SUPPLIER |
||||
* PLATE |
||||
* PROCESS_ENGINEER |
||||
* |
||||
* IOT_HARDNESS |
||||
* |
||||
* EQUIPMENT |
||||
* |
||||
* SIMPLE_SIZE |
||||
* |
||||
* RESULT |
||||
*/ |
||||
package org.springblade.desk.quality.pojo.entity; |
||||
@ -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.InspectionResult; |
||||
|
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* [检验结果] 视图实体类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-14 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class InspectionResultGenVO extends InspectionResult { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,39 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.service.gen; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.desk.quality.excel.gen.InspectionResultGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.InspectionResult; |
||||
import org.springblade.desk.quality.pojo.vo.gen.InspectionResultGenVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* [检验结果] 服务类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-14 |
||||
*/ |
||||
public interface IInspectionResultGenService extends BaseService<InspectionResult> { |
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param inspectionResult 查询参数 |
||||
* @return IPage<InspectionResultVO> |
||||
*/ |
||||
IPage<InspectionResultGenVO> selectInspectionResultPage(IPage<InspectionResultGenVO> page, InspectionResultGenVO inspectionResult); |
||||
|
||||
/** |
||||
* 导出数据 |
||||
* |
||||
* @param queryWrapper 查询条件 |
||||
* @return List<InspectionResultExcel> |
||||
*/ |
||||
List<InspectionResultGenExcel> exportInspectionResult(Wrapper<InspectionResult> queryWrapper); |
||||
|
||||
} |
||||
@ -0,0 +1,39 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.service.gen; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.desk.quality.excel.gen.LiquidTankTaskGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.LiquidTankTask; |
||||
import org.springblade.desk.quality.pojo.vo.gen.LiquidTankTaskGenVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* [槽液检测任务] 服务类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-14 |
||||
*/ |
||||
public interface ILiquidTankTaskGenService extends BaseService<LiquidTankTask> { |
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param liquidTankTask 查询参数 |
||||
* @return IPage<LiquidTankTaskVO> |
||||
*/ |
||||
IPage<LiquidTankTaskGenVO> selectLiquidTankTaskPage(IPage<LiquidTankTaskGenVO> page, LiquidTankTaskGenVO liquidTankTask); |
||||
|
||||
/** |
||||
* 导出数据 |
||||
* |
||||
* @param queryWrapper 查询条件 |
||||
* @return List<LiquidTankTaskExcel> |
||||
*/ |
||||
List<LiquidTankTaskGenExcel> exportLiquidTankTask(Wrapper<LiquidTankTask> queryWrapper); |
||||
|
||||
} |
||||
@ -0,0 +1,39 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.service.gen; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.desk.quality.excel.gen.NgGenExcel; |
||||
import org.springblade.desk.quality.pojo.entity.Ng; |
||||
import org.springblade.desk.quality.pojo.vo.gen.NgGenVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* [缺陷] 服务类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-13 |
||||
*/ |
||||
public interface INgGenService extends BaseService<Ng> { |
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param ng 查询参数 |
||||
* @return IPage<NgVO> |
||||
*/ |
||||
IPage<NgGenVO> selectNgPage(IPage<NgGenVO> page, NgGenVO ng); |
||||
|
||||
/** |
||||
* 导出数据 |
||||
* |
||||
* @param queryWrapper 查询条件 |
||||
* @return List<NgExcel> |
||||
*/ |
||||
List<NgGenExcel> exportNg(Wrapper<Ng> queryWrapper); |
||||
|
||||
} |
||||
@ -0,0 +1,41 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.service.impl.gen; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.desk.quality.excel.gen.InspectionResultGenExcel; |
||||
import org.springblade.desk.quality.mapper.gen.InspectionResultGenMapper; |
||||
import org.springblade.desk.quality.pojo.entity.InspectionResult; |
||||
import org.springblade.desk.quality.pojo.vo.gen.InspectionResultGenVO; |
||||
import org.springblade.desk.quality.service.gen.IInspectionResultGenService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* [检验结果] 服务实现类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-14 |
||||
*/ |
||||
@Service |
||||
public class InspectionResultGenServiceImpl extends BaseServiceImpl<InspectionResultGenMapper, InspectionResult> implements IInspectionResultGenService { |
||||
|
||||
@Override |
||||
public IPage<InspectionResultGenVO> selectInspectionResultPage(IPage<InspectionResultGenVO> page, InspectionResultGenVO inspectionResult) { |
||||
return page.setRecords(baseMapper.selectInspectionResultPage(page, inspectionResult)); |
||||
} |
||||
|
||||
@Override |
||||
public List<InspectionResultGenExcel> exportInspectionResult(Wrapper<InspectionResult> queryWrapper) { |
||||
List<InspectionResultGenExcel> inspectionResultList = baseMapper.exportInspectionResult(queryWrapper); |
||||
//inspectionResultList.forEach(inspectionResult -> {
|
||||
// inspectionResult.setTypeName(DictCache.getValue(DictEnum.YES_NO, InspectionResult.getType()));
|
||||
//});
|
||||
return inspectionResultList; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,41 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.service.impl.gen; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.desk.quality.excel.gen.InspectionTaskGenExcel; |
||||
import org.springblade.desk.quality.mapper.gen.InspectionTaskGenMapper; |
||||
import org.springblade.desk.quality.pojo.entity.InspectionTask; |
||||
import org.springblade.desk.quality.pojo.vo.gen.InspectionTaskGenVO; |
||||
import org.springblade.desk.quality.service.gen.IInspectionTaskGenService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* [检验任务] 服务实现类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-14 |
||||
*/ |
||||
@Service |
||||
public class InspectionTaskGenServiceImpl extends BaseServiceImpl<InspectionTaskGenMapper, InspectionTask> implements IInspectionTaskGenService { |
||||
|
||||
@Override |
||||
public IPage<InspectionTaskGenVO> selectInspectionTaskPage(IPage<InspectionTaskGenVO> page, InspectionTaskGenVO inspectionTask) { |
||||
return page.setRecords(baseMapper.selectInspectionTaskPage(page, inspectionTask)); |
||||
} |
||||
|
||||
@Override |
||||
public List<InspectionTaskGenExcel> exportInspectionTask(Wrapper<InspectionTask> queryWrapper) { |
||||
List<InspectionTaskGenExcel> inspectionTaskList = baseMapper.exportInspectionTask(queryWrapper); |
||||
//inspectionTaskList.forEach(inspectionTask -> {
|
||||
// inspectionTask.setTypeName(DictCache.getValue(DictEnum.YES_NO, InspectionTask.getType()));
|
||||
//});
|
||||
return inspectionTaskList; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,41 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.service.impl.gen; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.desk.quality.excel.gen.LiquidTankTaskGenExcel; |
||||
import org.springblade.desk.quality.mapper.gen.LiquidTankTaskGenMapper; |
||||
import org.springblade.desk.quality.pojo.entity.LiquidTankTask; |
||||
import org.springblade.desk.quality.pojo.vo.gen.LiquidTankTaskGenVO; |
||||
import org.springblade.desk.quality.service.gen.ILiquidTankTaskGenService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* [槽液检测任务] 服务实现类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-14 |
||||
*/ |
||||
@Service |
||||
public class LiquidTankTaskGenServiceImpl extends BaseServiceImpl<LiquidTankTaskGenMapper, LiquidTankTask> implements ILiquidTankTaskGenService { |
||||
|
||||
@Override |
||||
public IPage<LiquidTankTaskGenVO> selectLiquidTankTaskPage(IPage<LiquidTankTaskGenVO> page, LiquidTankTaskGenVO liquidTankTask) { |
||||
return page.setRecords(baseMapper.selectLiquidTankTaskPage(page, liquidTankTask)); |
||||
} |
||||
|
||||
@Override |
||||
public List<LiquidTankTaskGenExcel> exportLiquidTankTask(Wrapper<LiquidTankTask> queryWrapper) { |
||||
List<LiquidTankTaskGenExcel> liquidTankTaskList = baseMapper.exportLiquidTankTask(queryWrapper); |
||||
//liquidTankTaskList.forEach(liquidTankTask -> {
|
||||
// liquidTankTask.setTypeName(DictCache.getValue(DictEnum.YES_NO, LiquidTankTask.getType()));
|
||||
//});
|
||||
return liquidTankTaskList; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,41 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.service.impl.gen; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.desk.quality.excel.gen.NgGenExcel; |
||||
import org.springblade.desk.quality.mapper.gen.NgGenMapper; |
||||
import org.springblade.desk.quality.pojo.entity.Ng; |
||||
import org.springblade.desk.quality.pojo.vo.gen.NgGenVO; |
||||
import org.springblade.desk.quality.service.gen.INgGenService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* [缺陷] 服务实现类 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-13 |
||||
*/ |
||||
@Service |
||||
public class NgGenServiceImpl extends BaseServiceImpl<NgGenMapper, Ng> implements INgGenService { |
||||
|
||||
@Override |
||||
public IPage<NgGenVO> selectNgPage(IPage<NgGenVO> page, NgGenVO ng) { |
||||
return page.setRecords(baseMapper.selectNgPage(page, ng)); |
||||
} |
||||
|
||||
@Override |
||||
public List<NgGenExcel> exportNg(Wrapper<Ng> queryWrapper) { |
||||
List<NgGenExcel> ngList = baseMapper.exportNg(queryWrapper); |
||||
//ngList.forEach(ng -> {
|
||||
// ng.setTypeName(DictCache.getValue(DictEnum.YES_NO, Ng.getType()));
|
||||
//});
|
||||
return ngList; |
||||
} |
||||
|
||||
} |
||||
@ -1,22 +0,0 @@ |
||||
package org.springblade.desk.quality.service.scheduled; |
||||
|
||||
//import org.springframework.stereotype.Component;
|
||||
//import tech.powerjob.worker.annotation.PowerJobHandler;
|
||||
//import tech.powerjob.worker.core.processor.TaskContext;
|
||||
//import tech.powerjob.worker.log.OmsLogger;
|
||||
|
||||
//@Component("liquidTankScheduledService")
|
||||
public class LiquidTankScheduledService { |
||||
//
|
||||
// /**
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @PowerJobHandler(name = "testEvery2Min")
|
||||
// public String testEvery2Min(TaskContext tc) {
|
||||
// OmsLogger l = tc.getOmsLogger();
|
||||
// l.debug("test5Min debug level log ok!");
|
||||
// l.info("test5Min debug level log ok!");
|
||||
// return "test5Min OK.";
|
||||
// }
|
||||
} |
||||
@ -0,0 +1,41 @@ |
||||
package org.springblade.desk.quality.service.scheduled; |
||||
|
||||
//import org.springframework.stereotype.Component;
|
||||
//import tech.powerjob.worker.annotation.PowerJobHandler;
|
||||
//import tech.powerjob.worker.core.processor.TaskContext;
|
||||
//import tech.powerjob.worker.log.OmsLogger;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import jakarta.annotation.Resource; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.Data; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.desk.quality.constant.ColBase; |
||||
import org.springblade.desk.quality.constant.ColValue; |
||||
import org.springblade.desk.quality.constant.LiquidTankTaskConst; |
||||
import org.springblade.desk.quality.mapper.gen.LiquidTankGenMapper; |
||||
import org.springblade.desk.quality.mapper.gen.LiquidTankTaskGenMapper; |
||||
import org.springblade.desk.quality.pojo.entity.LiquidTank; |
||||
import org.springblade.desk.quality.pojo.entity.LiquidTankTask; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
@Service |
||||
@Data |
||||
@Slf4j |
||||
public class LiquidTankTaskScheduledService { |
||||
|
||||
// /**
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @PowerJobHandler(name = "testEvery2Min")
|
||||
// public String testEvery2Min(TaskContext tc) {
|
||||
// OmsLogger l = tc.getOmsLogger();
|
||||
// l.debug("test5Min debug level log ok!");
|
||||
// l.info("test5Min debug level log ok!");
|
||||
// return "test5Min OK.";
|
||||
// }
|
||||
} |
||||
@ -0,0 +1,6 @@ |
||||
package org.springblade.desk.quality.util; |
||||
|
||||
public class PowerJobUtil { |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,37 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.wrapper.gen; |
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||
import org.springblade.core.tool.utils.BeanUtil; |
||||
import org.springblade.desk.quality.pojo.entity.InspectionResult; |
||||
import org.springblade.desk.quality.pojo.vo.gen.InspectionResultGenVO; |
||||
|
||||
import java.util.Objects; |
||||
|
||||
/** |
||||
* [检验结果] 包装类,返回视图层所需的字段 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-14 |
||||
*/ |
||||
public class InspectionResultGenWrapper extends BaseEntityWrapper<InspectionResult, InspectionResultGenVO> { |
||||
|
||||
public static InspectionResultGenWrapper build() { |
||||
return new InspectionResultGenWrapper(); |
||||
} |
||||
|
||||
@Override |
||||
public InspectionResultGenVO entityVO(InspectionResult inspectionResult) { |
||||
InspectionResultGenVO inspectionResultVO = Objects.requireNonNull(BeanUtil.copyProperties(inspectionResult, InspectionResultGenVO.class)); |
||||
|
||||
//User createUser = UserCache.getUser(inspectionResult.getCreateUser());
|
||||
//User updateUser = UserCache.getUser(inspectionResult.getUpdateUser());
|
||||
//inspectionResultVO.setCreateUserName(createUser.getName());
|
||||
//inspectionResultVO.setUpdateUserName(updateUser.getName());
|
||||
|
||||
return inspectionResultVO; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,37 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.wrapper.gen; |
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||
import org.springblade.core.tool.utils.BeanUtil; |
||||
import org.springblade.desk.quality.pojo.entity.InspectionTask; |
||||
import org.springblade.desk.quality.pojo.vo.gen.InspectionTaskGenVO; |
||||
|
||||
import java.util.Objects; |
||||
|
||||
/** |
||||
* [检验任务] 包装类,返回视图层所需的字段 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-14 |
||||
*/ |
||||
public class InspectionTaskGenWrapper extends BaseEntityWrapper<InspectionTask, InspectionTaskGenVO> { |
||||
|
||||
public static InspectionTaskGenWrapper build() { |
||||
return new InspectionTaskGenWrapper(); |
||||
} |
||||
|
||||
@Override |
||||
public InspectionTaskGenVO entityVO(InspectionTask inspectionTask) { |
||||
InspectionTaskGenVO inspectionTaskVO = Objects.requireNonNull(BeanUtil.copyProperties(inspectionTask, InspectionTaskGenVO.class)); |
||||
|
||||
//User createUser = UserCache.getUser(inspectionTask.getCreateUser());
|
||||
//User updateUser = UserCache.getUser(inspectionTask.getUpdateUser());
|
||||
//inspectionTaskVO.setCreateUserName(createUser.getName());
|
||||
//inspectionTaskVO.setUpdateUserName(updateUser.getName());
|
||||
|
||||
return inspectionTaskVO; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,37 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.wrapper.gen; |
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||
import org.springblade.core.tool.utils.BeanUtil; |
||||
import org.springblade.desk.quality.pojo.entity.LiquidTankTask; |
||||
import org.springblade.desk.quality.pojo.vo.gen.LiquidTankTaskGenVO; |
||||
|
||||
import java.util.Objects; |
||||
|
||||
/** |
||||
* [槽液检测任务] 包装类,返回视图层所需的字段 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-14 |
||||
*/ |
||||
public class LiquidTankTaskGenWrapper extends BaseEntityWrapper<LiquidTankTask, LiquidTankTaskGenVO> { |
||||
|
||||
public static LiquidTankTaskGenWrapper build() { |
||||
return new LiquidTankTaskGenWrapper(); |
||||
} |
||||
|
||||
@Override |
||||
public LiquidTankTaskGenVO entityVO(LiquidTankTask liquidTankTask) { |
||||
LiquidTankTaskGenVO liquidTankTaskVO = Objects.requireNonNull(BeanUtil.copyProperties(liquidTankTask, LiquidTankTaskGenVO.class)); |
||||
|
||||
//User createUser = UserCache.getUser(liquidTankTask.getCreateUser());
|
||||
//User updateUser = UserCache.getUser(liquidTankTask.getUpdateUser());
|
||||
//liquidTankTaskVO.setCreateUserName(createUser.getName());
|
||||
//liquidTankTaskVO.setUpdateUserName(updateUser.getName());
|
||||
|
||||
return liquidTankTaskVO; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,37 @@ |
||||
/** |
||||
* Author: Tom Shuo |
||||
*/ |
||||
package org.springblade.desk.quality.wrapper.gen; |
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||
import org.springblade.core.tool.utils.BeanUtil; |
||||
import org.springblade.desk.quality.pojo.entity.Ng; |
||||
import org.springblade.desk.quality.pojo.vo.gen.NgGenVO; |
||||
|
||||
import java.util.Objects; |
||||
|
||||
/** |
||||
* [缺陷] 包装类,返回视图层所需的字段 |
||||
* |
||||
* @author Tom Shuo |
||||
* @since 2025-11-13 |
||||
*/ |
||||
public class NgGenWrapper extends BaseEntityWrapper<Ng, NgGenVO> { |
||||
|
||||
public static NgGenWrapper build() { |
||||
return new NgGenWrapper(); |
||||
} |
||||
|
||||
@Override |
||||
public NgGenVO entityVO(Ng ng) { |
||||
NgGenVO ngVO = Objects.requireNonNull(BeanUtil.copyProperties(ng, NgGenVO.class)); |
||||
|
||||
//User createUser = UserCache.getUser(ng.getCreateUser());
|
||||
//User updateUser = UserCache.getUser(ng.getUpdateUser());
|
||||
//ngVO.setCreateUserName(createUser.getName());
|
||||
//ngVO.setUpdateUserName(updateUser.getName());
|
||||
|
||||
return ngVO; |
||||
} |
||||
|
||||
} |
||||
Loading…
Reference in new issue