parent
e7c7984aa6
commit
b19099a417
15 changed files with 988 additions and 182 deletions
@ -0,0 +1,62 @@ |
|||||||
|
package org.springblade.scheduling.pojo.enums; |
||||||
|
|
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.Getter; |
||||||
|
import org.springblade.core.tool.utils.ObjectUtil; |
||||||
|
import org.springblade.core.tool.utils.StringPool; |
||||||
|
|
||||||
|
import java.util.Arrays; |
||||||
|
|
||||||
|
/** |
||||||
|
* 车间订单枚举 |
||||||
|
* |
||||||
|
* @author lqk |
||||||
|
* @date 2025-12-19 9:25 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
@AllArgsConstructor |
||||||
|
public enum WorkOrderEnum { |
||||||
|
EMPTY(StringPool.EMPTY, -1), |
||||||
|
|
||||||
|
/** |
||||||
|
* 状态枚举 |
||||||
|
*/ |
||||||
|
STATUS_PRODUCT_WAITING("待生产", 1), |
||||||
|
STATUS_PRODUCTING("生产中", 2), |
||||||
|
STATUS_INSPECTIONING("检验中", 3), |
||||||
|
STATUS_COMPLETED("已完工", 4), |
||||||
|
STATUS_ADJUDICATING("审理中", 5), |
||||||
|
STATUS_SCRAP("已报废", 6), |
||||||
|
STATUS_REWORK("已返工", 7) |
||||||
|
; |
||||||
|
final String name; |
||||||
|
final int category; |
||||||
|
|
||||||
|
/** |
||||||
|
* 匹配枚举值 |
||||||
|
* |
||||||
|
* @param name 名称 |
||||||
|
* @return BladeUserEnum |
||||||
|
*/ |
||||||
|
public static WorkOrderEnum of(String name) { |
||||||
|
return Arrays.stream(WorkOrderEnum.values()) |
||||||
|
.filter(userEnum -> userEnum.getName().equalsIgnoreCase(name != null ? name : "web")) |
||||||
|
.findFirst() |
||||||
|
// 在没有找到匹配项时返回默认值
|
||||||
|
.orElse(WorkOrderEnum.EMPTY); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 根据值获取名称 |
||||||
|
* |
||||||
|
* @param category |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static String getName(int category) { |
||||||
|
WorkOrderEnum item = Arrays.stream(WorkOrderEnum.values()) |
||||||
|
.filter(enumItem -> enumItem.getCategory() == category) |
||||||
|
.findFirst() |
||||||
|
.orElse(null); |
||||||
|
return ObjectUtil.isEmpty(item) ? StringPool.EMPTY : item.getName(); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,161 @@ |
|||||||
|
/** |
||||||
|
* 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 io.swagger.v3.oas.annotations.tags.Tag; |
||||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||||
|
import io.swagger.v3.oas.annotations.Parameter; |
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import jakarta.validation.Valid; |
||||||
|
|
||||||
|
import org.springblade.core.secure.BladeUser; |
||||||
|
import org.springblade.core.secure.annotation.IsAdmin; |
||||||
|
import org.springblade.core.mp.support.Condition; |
||||||
|
import org.springblade.core.mp.support.Query; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springblade.core.tool.utils.Func; |
||||||
|
import org.springblade.scheduling.scheduling.entity.OutsourceProcessEntity; |
||||||
|
import org.springblade.scheduling.scheduling.excel.OutsourceProcessExcel; |
||||||
|
import org.springblade.scheduling.scheduling.service.IOutsourceProcessService; |
||||||
|
import org.springblade.scheduling.scheduling.vo.OutsourceProcessVO; |
||||||
|
import org.springblade.scheduling.scheduling.wrapper.OutsourceProcessWrapper; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.springblade.core.boot.ctrl.BladeController; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springblade.core.excel.util.ExcelUtil; |
||||||
|
import org.springblade.core.tool.constant.BladeConstant; |
||||||
|
import java.util.Map; |
||||||
|
import java.util.List; |
||||||
|
import jakarta.servlet.http.HttpServletResponse; |
||||||
|
|
||||||
|
/** |
||||||
|
* 外协工序表 控制器 |
||||||
|
* |
||||||
|
* @author BladeX |
||||||
|
* @since 2025-12-24 |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
@RequestMapping("/outsourceProcess") |
||||||
|
@Tag(name = "外协工序表", description = "外协工序表接口") |
||||||
|
public class OutsourceProcessController extends BladeController { |
||||||
|
|
||||||
|
private final IOutsourceProcessService outsourceProcessService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 外协工序表 详情 |
||||||
|
*/ |
||||||
|
@GetMapping("/detail") |
||||||
|
@ApiOperationSupport(order = 1) |
||||||
|
@Operation(summary = "详情", description = "传入OutsourceProcess") |
||||||
|
public R<OutsourceProcessVO> detail(OutsourceProcessEntity OutsourceProcess) { |
||||||
|
OutsourceProcessEntity detail = outsourceProcessService.getOne(Condition.getQueryWrapper(OutsourceProcess)); |
||||||
|
return R.data(OutsourceProcessWrapper.build().entityVO(detail)); |
||||||
|
} |
||||||
|
/** |
||||||
|
* 外协工序表 分页 |
||||||
|
*/ |
||||||
|
@GetMapping("/list") |
||||||
|
@ApiOperationSupport(order = 2) |
||||||
|
@Operation(summary = "分页", description = "传入OutsourceProcess") |
||||||
|
public R<IPage<OutsourceProcessVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> OutsourceProcess, Query query) { |
||||||
|
IPage<OutsourceProcessEntity> pages = outsourceProcessService.page(Condition.getPage(query), Condition.getQueryWrapper(OutsourceProcess, OutsourceProcessEntity.class)); |
||||||
|
return R.data(OutsourceProcessWrapper.build().pageVO(pages)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 外协工序表 自定义分页 |
||||||
|
*/ |
||||||
|
@GetMapping("/page") |
||||||
|
@ApiOperationSupport(order = 3) |
||||||
|
@Operation(summary = "分页", description = "传入OutsourceProcess") |
||||||
|
public R<IPage<OutsourceProcessVO>> page(OutsourceProcessVO OutsourceProcess, Query query) { |
||||||
|
IPage<OutsourceProcessVO> pages = outsourceProcessService.selectOutsourceProcessPage(Condition.getPage(query), OutsourceProcess); |
||||||
|
return R.data(pages); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 外协工序表 新增 |
||||||
|
*/ |
||||||
|
@PostMapping("/save") |
||||||
|
@ApiOperationSupport(order = 4) |
||||||
|
@Operation(summary = "新增", description = "传入OutsourceProcess") |
||||||
|
public R save(@Valid @RequestBody OutsourceProcessEntity OutsourceProcess) { |
||||||
|
return R.status(outsourceProcessService.save(OutsourceProcess)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 外协工序表 修改 |
||||||
|
*/ |
||||||
|
@PostMapping("/update") |
||||||
|
@ApiOperationSupport(order = 5) |
||||||
|
@Operation(summary = "修改", description = "传入OutsourceProcess") |
||||||
|
public R update(@Valid @RequestBody OutsourceProcessEntity OutsourceProcess) { |
||||||
|
return R.status(outsourceProcessService.updateById(OutsourceProcess)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 外协工序表 新增或修改 |
||||||
|
*/ |
||||||
|
@PostMapping("/submit") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
@Operation(summary = "新增或修改", description = "传入OutsourceProcess") |
||||||
|
public R submit(@Valid @RequestBody OutsourceProcessEntity OutsourceProcess) { |
||||||
|
return R.status(outsourceProcessService.saveOrUpdate(OutsourceProcess)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 外协工序表 删除 |
||||||
|
*/ |
||||||
|
@PostMapping("/remove") |
||||||
|
@ApiOperationSupport(order = 7) |
||||||
|
@Operation(summary = "逻辑删除", description = "传入ids") |
||||||
|
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||||
|
return R.status(outsourceProcessService.deleteLogic(Func.toLongList(ids))); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 导出数据 |
||||||
|
*/ |
||||||
|
@IsAdmin |
||||||
|
@GetMapping("/export") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
@Operation(summary = "导出数据", description = "传入OutsourceProcess") |
||||||
|
public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> OutsourceProcess, BladeUser bladeUser, HttpServletResponse response) { |
||||||
|
QueryWrapper<OutsourceProcessEntity> queryWrapper = Condition.getQueryWrapper(OutsourceProcess, OutsourceProcessEntity.class); |
||||||
|
//if (!AuthUtil.isAdministrator()) {
|
||||||
|
// queryWrapper.lambda().eq(OutsourceProcess::getTenantId, bladeUser.getTenantId());
|
||||||
|
//}
|
||||||
|
//queryWrapper.lambda().eq(OutsourceProcessEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||||
|
List<OutsourceProcessExcel> list = outsourceProcessService.export(queryWrapper); |
||||||
|
ExcelUtil.export(response, "外协工序表数据" + DateUtil.time(), "外协工序表数据表", list, OutsourceProcessExcel.class); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,74 @@ |
|||||||
|
/** |
||||||
|
* 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.entity; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.Date; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
import org.springblade.core.tenant.mp.TenantEntity; |
||||||
|
import java.io.Serial; |
||||||
|
|
||||||
|
/** |
||||||
|
* 外协工序表 实体类 |
||||||
|
* |
||||||
|
* @author BladeX |
||||||
|
* @since 2025-12-24 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("MES_OUTSOURCE_PROCESS") |
||||||
|
@Schema(description = "MesOutsourceProcess对象") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class OutsourceProcessEntity extends BaseEntity { |
||||||
|
|
||||||
|
@Serial |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 工序id |
||||||
|
*/ |
||||||
|
@Schema(description = "工序id") |
||||||
|
private String processId; |
||||||
|
/** |
||||||
|
* 工序名称 |
||||||
|
*/ |
||||||
|
@Schema(description = "工序名称") |
||||||
|
private String processName; |
||||||
|
/** |
||||||
|
* 时间 |
||||||
|
*/ |
||||||
|
@Schema(description = "时间") |
||||||
|
private Integer days; |
||||||
|
/** |
||||||
|
* 备注 |
||||||
|
*/ |
||||||
|
@Schema(description = "备注") |
||||||
|
private String remarks; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,93 @@ |
|||||||
|
/** |
||||||
|
* 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 lombok.Data; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.Date; |
||||||
|
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 java.io.Serializable; |
||||||
|
import java.io.Serial; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 外协工序表 Excel实体类 |
||||||
|
* |
||||||
|
* @author BladeX |
||||||
|
* @since 2025-12-24 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@ColumnWidth(25) |
||||||
|
@HeadRowHeight(20) |
||||||
|
@ContentRowHeight(18) |
||||||
|
public class OutsourceProcessExcel implements Serializable { |
||||||
|
|
||||||
|
@Serial |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* ID |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("ID") |
||||||
|
private BigDecimal id; |
||||||
|
/** |
||||||
|
* 工序id |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("工序id") |
||||||
|
private BigDecimal processId; |
||||||
|
/** |
||||||
|
* 工序名称 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("工序名称") |
||||||
|
private String processName; |
||||||
|
/** |
||||||
|
* 时间 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("时间") |
||||||
|
private Long days; |
||||||
|
/** |
||||||
|
* 备注 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("备注") |
||||||
|
private String remarks; |
||||||
|
/** |
||||||
|
* 是否已删除 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("是否已删除") |
||||||
|
private Long isDeleted; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,64 @@ |
|||||||
|
/** |
||||||
|
* 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.mapper; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
import org.springblade.scheduling.scheduling.entity.OutsourceProcessEntity; |
||||||
|
import org.springblade.scheduling.scheduling.excel.OutsourceProcessExcel; |
||||||
|
import org.springblade.scheduling.scheduling.vo.OutsourceProcessVO; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 外协工序表 Mapper 接口 |
||||||
|
* |
||||||
|
* @author BladeX |
||||||
|
* @since 2025-12-24 |
||||||
|
*/ |
||||||
|
public interface OutsourceProcessMapper extends BaseMapper<OutsourceProcessEntity> { |
||||||
|
|
||||||
|
/** |
||||||
|
* 自定义分页 |
||||||
|
* |
||||||
|
* @param page 分页参数 |
||||||
|
* @param OutsourceProcess 查询参数 |
||||||
|
* @return List<OutsourceProcessVO> |
||||||
|
*/ |
||||||
|
List<OutsourceProcessVO> selectOutsourceProcessPage(IPage page, OutsourceProcessVO outsourceProcess); |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 获取导出数据 |
||||||
|
* |
||||||
|
* @param queryWrapper 查询条件 |
||||||
|
* @return List<OutsourceProcessExcel> |
||||||
|
*/ |
||||||
|
List<OutsourceProcessExcel> export(@Param("ew") Wrapper<OutsourceProcessEntity> queryWrapper); |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,37 @@ |
|||||||
|
<?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.scheduling.scheduling.mapper.OutsourceProcessMapper"> |
||||||
|
|
||||||
|
<!-- 通用查询映射结果 --> |
||||||
|
<resultMap id="outsourceProcessResultMap" type="org.springblade.scheduling.scheduling.entity.OutsourceProcessEntity"> |
||||||
|
<result column="ID" property="id"/> |
||||||
|
<result column="PROCESS_ID" property="processId"/> |
||||||
|
<result column="PROCESS_NAME" property="processName"/> |
||||||
|
<result column="DAYS" property="days"/> |
||||||
|
<result column="REMARKS" property="remarks"/> |
||||||
|
<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="selectOutsourceProcessPage" resultMap="outsourceProcessResultMap"> |
||||||
|
select * from MES_OUTSOURCE_PROCESS |
||||||
|
<where> |
||||||
|
is_deleted = 0 |
||||||
|
<if test="param2.processId !=null"> |
||||||
|
and process_id = #{param2.processId} |
||||||
|
</if> |
||||||
|
</where> |
||||||
|
</select> |
||||||
|
|
||||||
|
|
||||||
|
<select id="export" resultType="org.springblade.scheduling.scheduling.excel.OutsourceProcessExcel"> |
||||||
|
SELECT * FROM MES_OUTSOURCE_PROCESS ${ew.customSqlSegment} |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
||||||
@ -0,0 +1,62 @@ |
|||||||
|
/** |
||||||
|
* 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.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.scheduling.scheduling.entity.OutsourceProcessEntity; |
||||||
|
import org.springblade.scheduling.scheduling.excel.OutsourceProcessExcel; |
||||||
|
import org.springblade.scheduling.scheduling.vo.OutsourceProcessVO; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 外协工序表 服务类 |
||||||
|
* |
||||||
|
* @author BladeX |
||||||
|
* @since 2025-12-24 |
||||||
|
*/ |
||||||
|
public interface IOutsourceProcessService extends BaseService<OutsourceProcessEntity> { |
||||||
|
/** |
||||||
|
* 自定义分页 |
||||||
|
* |
||||||
|
* @param page 分页参数 |
||||||
|
* @param OutsourceProcess 查询参数 |
||||||
|
* @return IPage<OutsourceProcessVO> |
||||||
|
*/ |
||||||
|
IPage<OutsourceProcessVO> selectOutsourceProcessPage(IPage<OutsourceProcessVO> page, OutsourceProcessVO outsourceProcess); |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 导出数据 |
||||||
|
* |
||||||
|
* @param queryWrapper 查询条件 |
||||||
|
* @return List<OutsourceProcessExcel> |
||||||
|
*/ |
||||||
|
List<OutsourceProcessExcel> export(Wrapper<OutsourceProcessEntity> queryWrapper); |
||||||
|
|
||||||
|
} |
||||||
@ -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.scheduling.scheduling.service.impl; |
||||||
|
|
||||||
|
import org.springblade.scheduling.scheduling.entity.OutsourceProcessEntity; |
||||||
|
import org.springblade.scheduling.scheduling.excel.OutsourceProcessExcel; |
||||||
|
import org.springblade.scheduling.scheduling.mapper.OutsourceProcessMapper; |
||||||
|
import org.springblade.scheduling.scheduling.service.IOutsourceProcessService; |
||||||
|
import org.springblade.scheduling.scheduling.vo.OutsourceProcessVO; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.springblade.core.mp.base.BaseServiceImpl; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 外协工序表 服务实现类 |
||||||
|
* |
||||||
|
* @author BladeX |
||||||
|
* @since 2025-12-24 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class OutsourceProcessServiceImpl extends BaseServiceImpl<OutsourceProcessMapper, OutsourceProcessEntity> implements IOutsourceProcessService { |
||||||
|
|
||||||
|
@Override |
||||||
|
public IPage<OutsourceProcessVO> selectOutsourceProcessPage(IPage<OutsourceProcessVO> page, OutsourceProcessVO outsourceProcess) { |
||||||
|
return page.setRecords(baseMapper.selectOutsourceProcessPage(page, outsourceProcess)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@Override |
||||||
|
public List<OutsourceProcessExcel> export(Wrapper<OutsourceProcessEntity> queryWrapper) { |
||||||
|
List<OutsourceProcessExcel> OutsourceProcessList = baseMapper.export(queryWrapper); |
||||||
|
//OutsourceProcessList.forEach(OutsourceProcess -> {
|
||||||
|
// OutsourceProcess.setTypeName(DictCache.getValue(DictEnum.YES_NO, OutsourceProcess.getType()));
|
||||||
|
//});
|
||||||
|
return OutsourceProcessList; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -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.scheduling.scheduling.vo; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.scheduling.scheduling.entity.OutsourceProcessEntity; |
||||||
|
|
||||||
|
import java.io.Serial; |
||||||
|
|
||||||
|
/** |
||||||
|
* 外协工序表 视图实体类 |
||||||
|
* |
||||||
|
* @author BladeX |
||||||
|
* @since 2025-12-24 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class OutsourceProcessVO extends OutsourceProcessEntity { |
||||||
|
@Serial |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
} |
||||||
@ -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.scheduling.scheduling.wrapper; |
||||||
|
|
||||||
|
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||||
|
import org.springblade.core.tool.utils.BeanUtil; |
||||||
|
import org.springblade.scheduling.scheduling.entity.OutsourceProcessEntity; |
||||||
|
import org.springblade.scheduling.scheduling.vo.OutsourceProcessVO; |
||||||
|
|
||||||
|
import java.util.Objects; |
||||||
|
|
||||||
|
/** |
||||||
|
* 外协工序表 包装类,返回视图层所需的字段 |
||||||
|
* |
||||||
|
* @author BladeX |
||||||
|
* @since 2025-12-24 |
||||||
|
*/ |
||||||
|
public class OutsourceProcessWrapper extends BaseEntityWrapper<OutsourceProcessEntity, OutsourceProcessVO> { |
||||||
|
|
||||||
|
public static OutsourceProcessWrapper build() { |
||||||
|
return new OutsourceProcessWrapper(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public OutsourceProcessVO entityVO(OutsourceProcessEntity outsourceProcess) { |
||||||
|
OutsourceProcessVO OutsourceProcessVO = Objects.requireNonNull(BeanUtil.copyProperties(outsourceProcess, OutsourceProcessVO.class)); |
||||||
|
|
||||||
|
//User createUser = UserCache.getUser(OutsourceProcess.getCreateUser());
|
||||||
|
//User updateUser = UserCache.getUser(OutsourceProcess.getUpdateUser());
|
||||||
|
//OutsourceProcessVO.setCreateUserName(createUser.getName());
|
||||||
|
//OutsourceProcessVO.setUpdateUserName(updateUser.getName());
|
||||||
|
|
||||||
|
return OutsourceProcessVO; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
Loading…
Reference in new issue