作业中心设置班组和工艺能力001

liweidong
pangyang 2 months ago
parent de69720d4d
commit d7bde53b07
  1. 4
      blade-service-api/blade-desk-api/pom.xml
  2. 46
      blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/basic/pojo/vo/CraftAbilityVO.java
  3. 6
      blade-service-api/blade-scheduling-api/src/main/java/org/springblade/scheduling/pojo/entity/CraftAbilityEntity.java
  4. 262
      blade-service/blade-desk/src/main/java/org/springblade/desk/basic/controller/CraftAbilityController.java
  5. 25
      blade-service/blade-desk/src/main/java/org/springblade/desk/basic/controller/WorkCenterController.java
  6. 92
      blade-service/blade-desk/src/main/java/org/springblade/desk/basic/excel/CraftAbilityExcel.java
  7. 65
      blade-service/blade-desk/src/main/java/org/springblade/desk/basic/mapper/CraftAbilityMapper.java
  8. 31
      blade-service/blade-desk/src/main/java/org/springblade/desk/basic/mapper/CraftAbilityMapper.xml
  9. 63
      blade-service/blade-desk/src/main/java/org/springblade/desk/basic/service/ICraftAbilityService.java
  10. 65
      blade-service/blade-desk/src/main/java/org/springblade/desk/basic/service/impl/CraftAbilityServiceImpl.java
  11. 60
      blade-service/blade-desk/src/main/java/org/springblade/desk/basic/wrapper/CraftAbilityWrapper.java

@ -32,6 +32,10 @@
<groupId>org.springblade</groupId>
<artifactId>blade-resource-api</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-scheduling-api</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
<dependency>

@ -0,0 +1,46 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.desk.basic.pojo.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.scheduling.pojo.entity.CraftAbilityEntity;
import java.io.Serial;
/**
* 工艺能力 视图实体类
*
* @author BladeX
* @since 2025-12-22
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class CraftAbilityVO extends CraftAbilityEntity {
@Serial
private static final long serialVersionUID = 1L;
}

@ -55,17 +55,17 @@ public class CraftAbilityEntity extends BaseEntity {
/**
* 作业中心
*/
@Schema(description = "作业中心")
@Schema(description = "编码")
private String caCode;
/**
* 设备编码
*/
@Schema(description = "设备编码")
@Schema(description = "名称")
private String caName;
/**
* 设备分类
*/
@Schema(description = "设备分类")
@Schema(description = "能力类型")
private Long wtId;
/**
* 设备名称

@ -0,0 +1,262 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.desk.basic.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.BeanUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.desk.basic.constant.BAModuleConst;
import org.springblade.desk.basic.excel.CraftAbilityExcel;
import org.springblade.desk.basic.pojo.vo.CraftAbilityVO;
import org.springblade.desk.basic.service.ICraftAbilityService;
import org.springblade.desk.basic.wrapper.CraftAbilityWrapper;
import org.springblade.scheduling.pojo.entity.CraftAbilityEntity;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 工艺能力 控制器
*
* @author BladeX
* @since 2025-12-22
*/
@RestController
@AllArgsConstructor
@RequestMapping(BAModuleConst.CONTROLLER_PREFIX + "/craftAbility")
@Tag(name = "工艺能力", description = "工艺能力接口")
public class CraftAbilityController extends BladeController {
private final ICraftAbilityService craftAbilityService;
// private final INoticeClient noticeClient;
/**
* 工艺能力 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@Operation(summary = "详情", description = "传入CraftAbility")
public R<CraftAbilityVO> detail(CraftAbilityEntity craftAbility) {
CraftAbilityEntity detail = craftAbilityService.getOne(Condition.getQueryWrapper(craftAbility));
return R.data(CraftAbilityWrapper.build().entityVO(detail));
}
// @PostMapping("/getSelectCraftAbility")
// @ApiOperationSupport(order = 31)
// @Operation(summary = "获取已选择工艺", description = "传入WorkCenter List")
// public R<List<CraftAbilityEntity>> getSelectCraftAbility(@Valid @RequestBody WorkCenter workCenter) {
// List<CraftAbilityEntity> teams = new ArrayList<>();
//
// WorkCenterVO detail = noticeClient.detail(workCenter);
// if(detail != null){
// String teamId = detail.getCraftAbilityId();
// if(null != teamId && !"".equals(teamId)){
// List<Long> ids = Func.toLongList(teamId);
// QueryWrapper<CraftAbilityEntity> queryWrapper = new QueryWrapper<>();
// queryWrapper.in("id",ids);
// teams = craftAbilityService.list(queryWrapper);
// }
//
// }
// return R.data(teams);
// }
/**
* 工艺能力 分页
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@Operation(summary = "分页", description = "传入CraftAbility")
public R<IPage<CraftAbilityVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> craftAbility, Query query) {
QueryWrapper<CraftAbilityEntity> qw = Condition.getQueryWrapper(craftAbility, CraftAbilityEntity.class);
// 名称
qw.like(craftAbility.containsKey("caName"), "CA_NAME", Func.toStr(craftAbility.get("caName")));
qw.eq(craftAbility.containsKey("caCode"), "CA_CODE", Func.toInt(craftAbility.get("caCode")));
qw.eq(craftAbility.containsKey("wtId"), "WT_ID", Func.toInt(craftAbility.get("wtId")));
IPage<CraftAbilityEntity> pages = craftAbilityService.page(Condition.getPage(query), qw);
IPage<CraftAbilityVO> pagesVO = CraftAbilityWrapper.build().pageVO(pages);
pagesVO.getRecords()
.stream()
.collect(Collectors.toList());
return R.data(pagesVO);
// IPage<CraftAbilityEntity> pages = craftAbilityService.page(Condition.getPage(query), Condition.getQueryWrapper(craftAbility, CraftAbilityEntity.class));
// return R.data(CraftAbilityWrapper.build().pageVO(pages));
}
/**
* 工艺能力 自定义分页
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@Operation(summary = "分页", description = "传入CraftAbility")
public R<IPage<CraftAbilityVO>> page(CraftAbilityVO craftAbility, Query query) {
IPage<CraftAbilityVO> pages = craftAbilityService.selectCraftAbilityPage(Condition.getPage(query), craftAbility);
return R.data(pages);
}
/**
* 工艺能力 新增
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@Operation(summary = "新增", description = "传入CraftAbility")
public R save(@Valid @RequestBody CraftAbilityEntity craftAbility) {
return R.status(craftAbilityService.save(craftAbility));
}
/**
* 工艺能力 修改
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@Operation(summary = "修改", description = "传入CraftAbility")
public R update(@Valid @RequestBody CraftAbilityEntity craftAbility) {
return R.status(craftAbilityService.updateById(craftAbility));
}
/**
* 工艺能力 新增或修改
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@Operation(summary = "新增或修改", description = "传入CraftAbility")
public R submit(@Valid @RequestBody CraftAbilityEntity craftAbility) {
return R.status(craftAbilityService.saveOrUpdate(craftAbility));
}
/**
* 工艺能力 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@Operation(summary = "逻辑删除", description = "传入ids")
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status(craftAbilityService.deleteLogic(Func.toLongList(ids)));
}
/**
* 导出数据
*/
@IsAdmin
@GetMapping("/export-CraftAbility")
@ApiOperationSupport(order = 9)
@Operation(summary = "导出数据", description = "传入CraftAbility")
public void exportCraftAbility(@Parameter(hidden = true) @RequestParam Map<String, Object> craftAbility, BladeUser bladeUser, HttpServletResponse response) {
QueryWrapper<CraftAbilityEntity> queryWrapper = Condition.getQueryWrapper(craftAbility, CraftAbilityEntity.class);
//if (!AuthUtil.isAdministrator()) {
// queryWrapper.lambda().eq(CraftAbility::getTenantId, bladeUser.getTenantId());
//}
//queryWrapper.lambda().eq(CraftAbilityEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<CraftAbilityExcel> list = craftAbilityService.export(queryWrapper);
ExcelUtil.export(response, "工艺能力数据" + DateUtil.time(), "工艺能力数据表", list, CraftAbilityExcel.class);
}
@PostMapping("/submitBatWt")
@ApiOperationSupport(order = 51)
@Operation(summary = "批量维护能力类型", description = "传入CoatingThickness List")
public R submitBatWt(@Valid @RequestBody CraftAbilityEntity mergeOne) {
List<Long> ids = mergeOne.getIds();
if(CollectionUtils.isEmpty(ids)){
return R.fail("数据为空");
}
for(Long id : ids){
CraftAbilityEntity one = craftAbilityService.getById(id);
one.setWtId(mergeOne.getWtId());
craftAbilityService.updateById(one);
}
return R.status(true);
}
@PostMapping("/importExcel")
@ApiOperationSupport(order = 72)
@Operation(summary = "导入Excel", description = "MultipartFile")
public R importExcel(@RequestParam("file") MultipartFile file) {
// R checkR = ExcelExtUtil.importExcelCheck(file);
// if (checkR != null) {
// return checkR;
// }
// List<PlatingSmall> importList = ExcelUtil.read(
// file, 0, 1, PlatingSmall.class
// );
// return R.status(service.saveBatch(importList));
List<CraftAbilityEntity> noticeList = new ArrayList<>();
List<CraftAbilityExcel> list = ExcelUtil.read(file, CraftAbilityExcel.class);
list.forEach(noticeExcel -> {
CraftAbilityEntity notice = BeanUtil.copy(noticeExcel, CraftAbilityEntity.class);
noticeList.add(notice);
});
return R.data(craftAbilityService.saveBatch(noticeList));
}
/**
* 工艺能力表查询列表
*/
@GetMapping("/findList")
@ApiOperationSupport(order = 2)
@Operation(summary = "列表", description = "传入CraftAbility")
public R<List<CraftAbilityEntity>> findList() {
List<CraftAbilityEntity> list = craftAbilityService.list();
return R.data(list);
}
}

@ -29,10 +29,12 @@ import org.springblade.desk.basic.pojo.entity.PlatingSmall;
import org.springblade.desk.basic.pojo.entity.TeamSet;
import org.springblade.desk.basic.pojo.entity.WorkCenter;
import org.springblade.desk.basic.pojo.vo.WorkCenterVO;
import org.springblade.desk.basic.service.ICraftAbilityService;
import org.springblade.desk.basic.service.ITeamSetService;
import org.springblade.desk.basic.service.IWorkCenterService;
import org.springblade.desk.basic.util.ExcelExtUtil;
import org.springblade.desk.basic.wrapper.WorkCenterWrapper;
import org.springblade.scheduling.pojo.entity.CraftAbilityEntity;
import org.springblade.scheduling.pojo.entity.TeamSetEntity;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
@ -64,6 +66,8 @@ public class WorkCenterController extends BladeController {
@Resource
private ITeamSetService teamService;
@Resource
private ICraftAbilityService craftAbilityService;
/**
@ -190,6 +194,27 @@ public class WorkCenterController extends BladeController {
}
@PostMapping("/getSelectCraftAbility")
@ApiOperationSupport(order = 31)
@Operation(summary = "获取已选择工艺", description = "传入WorkCenter List")
public R<List<CraftAbilityEntity>> getSelectCraftAbility(@Valid @RequestBody WorkCenter workCenter) {
List<CraftAbilityEntity> teams = new ArrayList<>();
QueryWrapper<WorkCenter> qw = Condition.getQueryWrapper(workCenter);
WorkCenter detail = service.getOne(qw);
if(detail != null){
String teamId = detail.getCraftAbilityId();
if(null != teamId && !"".equals(teamId)){
List<Long> ids = Func.toLongList(teamId);
QueryWrapper<CraftAbilityEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.in("id",ids);
teams = craftAbilityService.list(queryWrapper);
}
}
return R.data(teams);
}
@PostMapping("/updateTeamId")
@ApiOperationSupport(order = 31)
@Operation(summary = "设置班组Id保存", description = "传入WorkCenter List")

@ -0,0 +1,92 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.desk.basic.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;
/**
* 工艺能力 Excel实体类
*
* @author BladeX
* @since 2025-12-22
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class CraftAbilityExcel implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 产品ID
*/
@ColumnWidth(20)
@ExcelProperty("产品ID")
private BigDecimal id;
/**
* 作业中心
*/
@ColumnWidth(20)
@ExcelProperty("编码")
private String caCode;
/**
* 设备编码
*/
@ColumnWidth(20)
@ExcelProperty("名称")
private String caName;
/**
* 设备分类
*/
@ColumnWidth(20)
@ExcelProperty("能力类型")
private Long wtId;
/**
* 设备名称
*/
@ColumnWidth(20)
@ExcelProperty("设备名称")
private Long bpsId;
/**
* 是否已删除
*/
@ColumnWidth(20)
@ExcelProperty("是否已删除")
private Long isDeleted;
}

@ -0,0 +1,65 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.desk.basic.mapper;
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.basic.excel.CraftAbilityExcel;
import org.springblade.desk.basic.pojo.vo.CraftAbilityVO;
import org.springblade.scheduling.pojo.entity.CraftAbilityEntity;
import java.util.List;
/**
* 工艺能力 Mapper 接口
*
* @author BladeX
* @since 2025-12-22
*/
public interface CraftAbilityMapper extends BaseMapper<CraftAbilityEntity> {
/**
* 自定义分页
*
* @param page 分页参数
* @param CraftAbility 查询参数
* @return List<CraftAbilityVO>
*/
List<CraftAbilityVO> selectCraftAbilityPage(IPage page, CraftAbilityVO craftAbility);
/**
* 获取导出数据
*
* @param queryWrapper 查询条件
* @return List<CraftAbilityExcel>
*/
List<CraftAbilityExcel> export(@Param("ew") Wrapper<CraftAbilityEntity> 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.basic.mapper.CraftAbilityMapper">
<!-- 通用查询映射结果 -->
<resultMap id="craftAbilityResultMap" type="org.springblade.scheduling.pojo.entity.CraftAbilityEntity">
<result column="ID" property="id"/>
<result column="CA_CODE" property="caCode"/>
<result column="CA_NAME" property="caName"/>
<result column="WT_ID" property="wtId"/>
<result column="BPS_ID" property="bpsId"/>
<result column="CREATE_USER" property="createUser"/>
<result column="CREATE_DEPT" property="createDept"/>
<result column="CREATE_TIME" property="createTime"/>
<result column="UPDATE_USER" property="updateUser"/>
<result column="UPDATE_TIME" property="updateTime"/>
<result column="STATUS" property="status"/>
<result column="IS_DELETED" property="isDeleted"/>
</resultMap>
<select id="selectCraftAbilityPage" resultMap="craftAbilityResultMap">
select * from BS_CRAFT_ABILITY where is_deleted = 0
</select>
<select id="export" resultType="org.springblade.desk.basic.excel.CraftAbilityExcel">
SELECT * FROM BS_CRAFT_ABILITY ${ew.customSqlSegment}
</select>
</mapper>

@ -0,0 +1,63 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.desk.basic.service;
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.basic.excel.CraftAbilityExcel;
import org.springblade.desk.basic.pojo.vo.CraftAbilityVO;
import org.springblade.scheduling.pojo.entity.CraftAbilityEntity;
import java.util.List;
/**
* 工艺能力 服务类
*
* @author BladeX
* @since 2025-12-22
*/
public interface ICraftAbilityService extends BaseService<CraftAbilityEntity> {
/**
* 自定义分页
*
* @param page 分页参数
* @param CraftAbility 查询参数
* @return IPage<CraftAbilityVO>
*/
IPage<CraftAbilityVO> selectCraftAbilityPage(IPage<CraftAbilityVO> page, CraftAbilityVO craftAbility);
/**
* 导出数据
*
* @param queryWrapper 查询条件
* @return List<CraftAbilityExcel>
*/
List<CraftAbilityExcel> export(Wrapper<CraftAbilityEntity> queryWrapper);
}

@ -0,0 +1,65 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.desk.basic.service.impl;
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.basic.excel.CraftAbilityExcel;
import org.springblade.desk.basic.mapper.CraftAbilityMapper;
import org.springblade.desk.basic.pojo.vo.CraftAbilityVO;
import org.springblade.desk.basic.service.ICraftAbilityService;
import org.springblade.scheduling.pojo.entity.CraftAbilityEntity;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 工艺能力 服务实现类
*
* @author BladeX
* @since 2025-12-22
*/
@Service
public class CraftAbilityServiceImpl extends BaseServiceImpl<CraftAbilityMapper, CraftAbilityEntity> implements ICraftAbilityService {
@Override
public IPage<CraftAbilityVO> selectCraftAbilityPage(IPage<CraftAbilityVO> page, CraftAbilityVO craftAbility) {
return page.setRecords(baseMapper.selectCraftAbilityPage(page, craftAbility));
}
@Override
public List<CraftAbilityExcel> export(Wrapper<CraftAbilityEntity> queryWrapper) {
List<CraftAbilityExcel> CraftAbilityList = baseMapper.export(queryWrapper);
//CraftAbilityList.forEach(CraftAbility -> {
// CraftAbility.setTypeName(DictCache.getValue(DictEnum.YES_NO, CraftAbility.getType()));
//});
return CraftAbilityList;
}
}

@ -0,0 +1,60 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.desk.basic.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.desk.basic.pojo.vo.CraftAbilityVO;
import org.springblade.scheduling.pojo.entity.CraftAbilityEntity;
import java.util.Objects;
/**
* 工艺能力 包装类,返回视图层所需的字段
*
* @author BladeX
* @since 2025-12-22
*/
public class CraftAbilityWrapper extends BaseEntityWrapper<CraftAbilityEntity, CraftAbilityVO> {
public static CraftAbilityWrapper build() {
return new CraftAbilityWrapper();
}
@Override
public CraftAbilityVO entityVO(CraftAbilityEntity CraftAbility) {
CraftAbilityVO craftAbilityVO = Objects.requireNonNull(BeanUtil.copyProperties(CraftAbility, CraftAbilityVO.class));
//User createUser = UserCache.getUser(CraftAbility.getCreateUser());
//User updateUser = UserCache.getUser(CraftAbility.getUpdateUser());
//CraftAbilityVO.setCreateUserName(createUser.getName());
//CraftAbilityVO.setUpdateUserName(updateUser.getName());
return craftAbilityVO;
}
}
Loading…
Cancel
Save