parent
b9ee4d31f6
commit
ed69dfaf1b
14 changed files with 458 additions and 18 deletions
@ -0,0 +1,168 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.scheduling.scheduling.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.scheduling.scheduling.entity.TeamSetEntity; |
||||
import org.springblade.scheduling.scheduling.excel.TeamSetExcel; |
||||
import org.springblade.scheduling.scheduling.service.ITeamSetService; |
||||
import org.springblade.scheduling.scheduling.vo.TeamSetVO; |
||||
import org.springblade.scheduling.scheduling.wrapper.TeamSetWrapper; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* 班组设置表 控制器 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-12-22 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/teamSet") |
||||
@Tag(name = "班组设置表", description = "班组设置表接口") |
||||
public class TeamSetController extends BladeController { |
||||
|
||||
private final ITeamSetService teamSetService; |
||||
|
||||
/** |
||||
* 班组设置表 详情 |
||||
*/ |
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 1) |
||||
@Operation(summary = "详情", description = "传入TeamSet") |
||||
public R<TeamSetVO> detail(TeamSetEntity TeamSet) { |
||||
TeamSetEntity detail = teamSetService.getOne(Condition.getQueryWrapper(TeamSet)); |
||||
return R.data(TeamSetWrapper.build().entityVO(detail)); |
||||
} |
||||
/** |
||||
* 班组设置表 分页 |
||||
*/ |
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 2) |
||||
@Operation(summary = "分页", description = "传入TeamSet") |
||||
public R<IPage<TeamSetVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> TeamSet, Query query) { |
||||
IPage<TeamSetEntity> pages = teamSetService.page(Condition.getPage(query), Condition.getQueryWrapper(TeamSet, TeamSetEntity.class)); |
||||
return R.data(TeamSetWrapper.build().pageVO(pages)); |
||||
} |
||||
|
||||
/** |
||||
* 班组设置表 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@ApiOperationSupport(order = 3) |
||||
@Operation(summary = "分页", description = "传入TeamSet") |
||||
public R<IPage<TeamSetVO>> page(TeamSetVO TeamSet, Query query) { |
||||
IPage<TeamSetVO> pages = teamSetService.selectTeamSetPage(Condition.getPage(query), TeamSet); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* 班组设置表 新增 |
||||
*/ |
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 4) |
||||
@Operation(summary = "新增", description = "传入TeamSet") |
||||
public R save(@Valid @RequestBody TeamSetEntity TeamSet) { |
||||
return R.status(teamSetService.save(TeamSet)); |
||||
} |
||||
|
||||
/** |
||||
* 班组设置表 修改 |
||||
*/ |
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 5) |
||||
@Operation(summary = "修改", description = "传入TeamSet") |
||||
public R update(@Valid @RequestBody TeamSetEntity TeamSet) { |
||||
return R.status(teamSetService.updateById(TeamSet)); |
||||
} |
||||
|
||||
/** |
||||
* 班组设置表 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 6) |
||||
@Operation(summary = "新增或修改", description = "传入TeamSet") |
||||
public R submit(@Valid @RequestBody TeamSetEntity TeamSet) { |
||||
return R.status(teamSetService.saveOrUpdate(TeamSet)); |
||||
} |
||||
|
||||
/** |
||||
* 班组设置表 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 7) |
||||
@Operation(summary = "逻辑删除", description = "传入ids") |
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(teamSetService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@IsAdmin |
||||
@GetMapping("/export-TeamSet") |
||||
@ApiOperationSupport(order = 9) |
||||
@Operation(summary = "导出数据", description = "传入TeamSet") |
||||
public void exportTeamSet(@Parameter(hidden = true) @RequestParam Map<String, Object> TeamSet, BladeUser bladeUser, HttpServletResponse response) { |
||||
QueryWrapper<TeamSetEntity> queryWrapper = Condition.getQueryWrapper(TeamSet, TeamSetEntity.class); |
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(TeamSet::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
//queryWrapper.lambda().eq(TeamSetEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||
List<TeamSetExcel> list = teamSetService.export(queryWrapper); |
||||
ExcelUtil.export(response, "班组设置表数据" + DateUtil.time(), "班组设置表数据表", list, TeamSetExcel.class); |
||||
} |
||||
|
||||
@GetMapping("/findList") |
||||
@ApiOperationSupport(order = 2) |
||||
@Operation(summary = "列表", description = "传入Equipment") |
||||
public R<List<TeamSetEntity>> findList() { |
||||
List<TeamSetEntity> list = teamSetService.list(); |
||||
return R.data(list); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,171 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.scheduling.scheduling.excel; |
||||
|
||||
|
||||
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.util.Date; |
||||
|
||||
|
||||
/** |
||||
* 车间订单表 Excel实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-28 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class SchedulingBoardExcel implements Serializable { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 车间订单号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("车间订单号") |
||||
private String woCode; |
||||
|
||||
/** |
||||
* 流程卡号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("流程卡号") |
||||
private String cardNo; |
||||
|
||||
/** |
||||
* 零件号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("零件号") |
||||
private String partCode; |
||||
|
||||
/** |
||||
* 产品名称 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("产品名称") |
||||
private String partName; |
||||
|
||||
/** |
||||
* 批次号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("批次号") |
||||
private String batchNo; |
||||
|
||||
/** |
||||
* 质量等级 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("质量等级") |
||||
private String productIdent; |
||||
|
||||
/** |
||||
* 镀种信息 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("镀种信息") |
||||
private String plate; |
||||
|
||||
/** |
||||
* 面积 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("面积(dm2)") |
||||
private String ypArea; |
||||
|
||||
/** |
||||
* 生产数量 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("生产数量") |
||||
private String makeQty; |
||||
|
||||
/** |
||||
* 下达时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("下达时间") |
||||
private String releaseDate; |
||||
|
||||
|
||||
/** |
||||
* 当前工序 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("当前工序") |
||||
private String currentProcess; |
||||
|
||||
/** |
||||
* 加工班组 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("加工班组") |
||||
private String teamName; |
||||
|
||||
/** |
||||
* 下一工序 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("下一工序") |
||||
private String nextProcess; |
||||
|
||||
/** |
||||
* 计划开始时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("计划开始时间") |
||||
private String planStartDate; |
||||
|
||||
/** |
||||
* 计划结束时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("计划结束时间") |
||||
private String planEndDate; |
||||
|
||||
/** |
||||
* 需求交期 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("需求交期") |
||||
private String demandDate; |
||||
|
||||
|
||||
|
||||
} |
||||
Loading…
Reference in new issue