Merge remote-tracking branch 'origin/0.8.X' into 0.8.X

# Conflicts:
#	klp-ui/src/views/wms/post/aps/schedule.vue
This commit is contained in:
朱昊天
2026-07-09 17:40:15 +08:00
22 changed files with 396 additions and 564 deletions

View File

@@ -22,6 +22,10 @@
<groupId>com.klp</groupId>
<artifactId>klp-common</artifactId>
</dependency>
<dependency>
<groupId>com.klp</groupId>
<artifactId>klp-wms</artifactId>
</dependency>
</dependencies>

View File

@@ -1,99 +0,0 @@
package com.klp.perf.controller;
import java.util.List;
import java.util.Arrays;
import lombok.RequiredArgsConstructor;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.*;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import com.klp.common.annotation.RepeatSubmit;
import com.klp.common.annotation.Log;
import com.klp.common.core.controller.BaseController;
import com.klp.common.core.domain.PageQuery;
import com.klp.common.core.domain.R;
import com.klp.common.core.validate.AddGroup;
import com.klp.common.core.validate.EditGroup;
import com.klp.common.enums.BusinessType;
import com.klp.common.utils.poi.ExcelUtil;
import com.klp.perf.domain.vo.PerfEmployeeInfoVo;
import com.klp.perf.domain.bo.PerfEmployeeInfoBo;
import com.klp.perf.service.IPerfEmployeeInfoService;
import com.klp.common.core.page.TableDataInfo;
/**
* 员工绩效薪资基本信息
*
* @author klp
* @date 2026-07-07
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/perf/employeeInfo")
public class PerfEmployeeInfoController extends BaseController {
private final IPerfEmployeeInfoService iPerfEmployeeInfoService;
/**
* 查询员工绩效薪资基本信息列表
*/
@GetMapping("/list")
public TableDataInfo<PerfEmployeeInfoVo> list(PerfEmployeeInfoBo bo, PageQuery pageQuery) {
return iPerfEmployeeInfoService.queryPageList(bo, pageQuery);
}
/**
* 导出员工绩效薪资基本信息列表
*/
@Log(title = "员工绩效薪资基本信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(PerfEmployeeInfoBo bo, HttpServletResponse response) {
List<PerfEmployeeInfoVo> list = iPerfEmployeeInfoService.queryList(bo);
ExcelUtil.exportExcel(list, "员工绩效薪资基本信息", PerfEmployeeInfoVo.class, response);
}
/**
* 获取员工绩效薪资基本信息详细信息
*
* @param id 主键
*/
@GetMapping("/{id}")
public R<PerfEmployeeInfoVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) {
return R.ok(iPerfEmployeeInfoService.queryById(id));
}
/**
* 新增员工绩效薪资基本信息
*/
@Log(title = "员工绩效薪资基本信息", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping()
public R<Void> add(@Validated(AddGroup.class) @RequestBody PerfEmployeeInfoBo bo) {
return toAjax(iPerfEmployeeInfoService.insertByBo(bo));
}
/**
* 修改员工绩效薪资基本信息
*/
@Log(title = "员工绩效薪资基本信息", businessType = BusinessType.UPDATE)
@RepeatSubmit()
@PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PerfEmployeeInfoBo bo) {
return toAjax(iPerfEmployeeInfoService.updateByBo(bo));
}
/**
* 删除员工绩效薪资基本信息
*
* @param ids 主键串
*/
@Log(title = "员工绩效薪资基本信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) {
return toAjax(iPerfEmployeeInfoService.deleteWithValidByIds(Arrays.asList(ids), true));
}
}

View File

@@ -1,66 +0,0 @@
package com.klp.perf.domain;
import com.baomidou.mybatisplus.annotation.*;
import com.klp.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
/**
* 员工绩效薪资基本信息对象 perf_employee_info
*
* @author klp
* @date 2026-07-07
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("perf_employee_info")
public class PerfEmployeeInfo extends BaseEntity {
private static final long serialVersionUID=1L;
/**
*
*/
@TableId(value = "id")
private Long id;
/**
* 关联现有员工表主键
*/
private Long employeeId;
/**
* 关联 perf_dept.id (冗余,便于按部门查询)
*/
private Long deptId;
/**
* 岗位/工种
*/
private String positionName;
/**
* 底薪(元)
*/
private BigDecimal baseSalary;
/**
* 岗位绩效基数(元), 默认≈底薪×20%
*/
private BigDecimal perfBase;
/**
* 默认岗位系数(初始值,后续月度由绩效自动覆盖)
*/
private BigDecimal posCoeffDefault;
/**
* 是否在职 1=在职 0=离职
*/
private Long isActive;
/**
* 删除标志0=正常1=已删除)
*/
@TableLogic
private Integer delFlag;
/**
* 备注
*/
private String remark;
}

View File

@@ -1,67 +0,0 @@
package com.klp.perf.domain.bo;
import com.klp.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;
import java.math.BigDecimal;
/**
* 员工绩效薪资基本信息业务对象 perf_employee_info
*
* @author klp
* @date 2026-07-07
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class PerfEmployeeInfoBo extends BaseEntity {
/**
*
*/
private Long id;
/**
* 关联现有员工表主键
*/
private Long employeeId;
/**
* 关联 perf_dept.id (冗余,便于按部门查询)
*/
private Long deptId;
/**
* 岗位/工种
*/
private String positionName;
/**
* 底薪(元)
*/
private BigDecimal baseSalary;
/**
* 岗位绩效基数(元), 默认≈底薪×20%
*/
private BigDecimal perfBase;
/**
* 默认岗位系数(初始值,后续月度由绩效自动覆盖)
*/
private BigDecimal posCoeffDefault;
/**
* 是否在职 1=在职 0=离职
*/
private Long isActive;
/**
* 备注
*/
private String remark;
}

View File

@@ -1,78 +0,0 @@
package com.klp.perf.domain.vo;
import java.math.BigDecimal;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.klp.common.annotation.ExcelDictFormat;
import com.klp.common.convert.ExcelDictConvert;
import lombok.Data;
/**
* 员工绩效薪资基本信息视图对象 perf_employee_info
*
* @author klp
* @date 2026-07-07
*/
@Data
@ExcelIgnoreUnannotated
public class PerfEmployeeInfoVo {
private static final long serialVersionUID = 1L;
/**
*
*/
@ExcelProperty(value = "")
private Long id;
/**
* 关联现有员工表主键
*/
@ExcelProperty(value = "关联现有员工表主键")
private Long employeeId;
/**
* 关联 perf_dept.id (冗余,便于按部门查询)
*/
@ExcelProperty(value = "关联 perf_dept.id (冗余,便于按部门查询)")
private Long deptId;
/**
* 岗位/工种
*/
@ExcelProperty(value = "岗位/工种")
private String positionName;
/**
* 底薪(元)
*/
@ExcelProperty(value = "底薪(元)")
private BigDecimal baseSalary;
/**
* 岗位绩效基数(元), 默认≈底薪×20%
*/
@ExcelProperty(value = "岗位绩效基数(元), 默认≈底薪×20%")
private BigDecimal perfBase;
/**
* 默认岗位系数(初始值,后续月度由绩效自动覆盖)
*/
@ExcelProperty(value = "默认岗位系数(初始值,后续月度由绩效自动覆盖)")
private BigDecimal posCoeffDefault;
/**
* 是否在职 1=在职 0=离职
*/
@ExcelProperty(value = "是否在职 1=在职 0=离职")
private Long isActive;
/**
* 备注
*/
@ExcelProperty(value = "备注")
private String remark;
}

View File

@@ -1,5 +1,6 @@
package com.klp.perf.domain.vo;
import java.util.List;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.klp.common.annotation.ExcelDictFormat;
@@ -55,5 +56,10 @@ public class PerfPositionTemplateVo {
@ExcelProperty(value = "备注")
private String remark;
/**
* 考核维度明细列表
*/
private List<PerfTemplateDimensionVo> dimensionList;
}

View File

@@ -7,6 +7,7 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.klp.common.annotation.ExcelDictFormat;
import com.klp.common.convert.ExcelDictConvert;
import com.klp.domain.WmsEmployeeInfo;
import lombok.Data;
@@ -208,5 +209,8 @@ public class PerfSalaryVo {
@ExcelProperty(value = "备注")
private String remark;
/**
* 关联员工简要信息 (联查 wms_employee_info)
*/
private WmsEmployeeInfo wmsEmployeeInfo;
}

View File

@@ -1,15 +0,0 @@
package com.klp.perf.mapper;
import com.klp.perf.domain.PerfEmployeeInfo;
import com.klp.perf.domain.vo.PerfEmployeeInfoVo;
import com.klp.common.core.mapper.BaseMapperPlus;
/**
* 员工绩效薪资基本信息Mapper接口
*
* @author klp
* @date 2026-07-07
*/
public interface PerfEmployeeInfoMapper extends BaseMapperPlus<PerfEmployeeInfoMapper, PerfEmployeeInfo, PerfEmployeeInfoVo> {
}

View File

@@ -1,49 +0,0 @@
package com.klp.perf.service;
import com.klp.perf.domain.PerfEmployeeInfo;
import com.klp.perf.domain.vo.PerfEmployeeInfoVo;
import com.klp.perf.domain.bo.PerfEmployeeInfoBo;
import com.klp.common.core.page.TableDataInfo;
import com.klp.common.core.domain.PageQuery;
import java.util.Collection;
import java.util.List;
/**
* 员工绩效薪资基本信息Service接口
*
* @author klp
* @date 2026-07-07
*/
public interface IPerfEmployeeInfoService {
/**
* 查询员工绩效薪资基本信息
*/
PerfEmployeeInfoVo queryById(Long id);
/**
* 查询员工绩效薪资基本信息列表
*/
TableDataInfo<PerfEmployeeInfoVo> queryPageList(PerfEmployeeInfoBo bo, PageQuery pageQuery);
/**
* 查询员工绩效薪资基本信息列表
*/
List<PerfEmployeeInfoVo> queryList(PerfEmployeeInfoBo bo);
/**
* 新增员工绩效薪资基本信息
*/
Boolean insertByBo(PerfEmployeeInfoBo bo);
/**
* 修改员工绩效薪资基本信息
*/
Boolean updateByBo(PerfEmployeeInfoBo bo);
/**
* 校验并批量删除员工绩效薪资基本信息信息
*/
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
}

View File

@@ -1,115 +0,0 @@
package com.klp.perf.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.klp.common.core.page.TableDataInfo;
import com.klp.common.core.domain.PageQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.klp.common.utils.StringUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import com.klp.perf.domain.bo.PerfEmployeeInfoBo;
import com.klp.perf.domain.vo.PerfEmployeeInfoVo;
import com.klp.perf.domain.PerfEmployeeInfo;
import com.klp.perf.mapper.PerfEmployeeInfoMapper;
import com.klp.perf.service.IPerfEmployeeInfoService;
import java.util.List;
import java.util.Map;
import java.util.Collection;
/**
* 员工绩效薪资基本信息Service业务层处理
*
* @author klp
* @date 2026-07-07
*/
@RequiredArgsConstructor
@Service
public class PerfEmployeeInfoServiceImpl implements IPerfEmployeeInfoService {
private final PerfEmployeeInfoMapper baseMapper;
/**
* 查询员工绩效薪资基本信息
*/
@Override
public PerfEmployeeInfoVo queryById(Long id){
return baseMapper.selectVoById(id);
}
/**
* 查询员工绩效薪资基本信息列表
*/
@Override
public TableDataInfo<PerfEmployeeInfoVo> queryPageList(PerfEmployeeInfoBo bo, PageQuery pageQuery) {
LambdaQueryWrapper<PerfEmployeeInfo> lqw = buildQueryWrapper(bo);
Page<PerfEmployeeInfoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
return TableDataInfo.build(result);
}
/**
* 查询员工绩效薪资基本信息列表
*/
@Override
public List<PerfEmployeeInfoVo> queryList(PerfEmployeeInfoBo bo) {
LambdaQueryWrapper<PerfEmployeeInfo> lqw = buildQueryWrapper(bo);
return baseMapper.selectVoList(lqw);
}
private LambdaQueryWrapper<PerfEmployeeInfo> buildQueryWrapper(PerfEmployeeInfoBo bo) {
Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<PerfEmployeeInfo> lqw = Wrappers.lambdaQuery();
lqw.eq(bo.getEmployeeId() != null, PerfEmployeeInfo::getEmployeeId, bo.getEmployeeId());
lqw.eq(bo.getDeptId() != null, PerfEmployeeInfo::getDeptId, bo.getDeptId());
lqw.like(StringUtils.isNotBlank(bo.getPositionName()), PerfEmployeeInfo::getPositionName, bo.getPositionName());
lqw.eq(bo.getBaseSalary() != null, PerfEmployeeInfo::getBaseSalary, bo.getBaseSalary());
lqw.eq(bo.getPerfBase() != null, PerfEmployeeInfo::getPerfBase, bo.getPerfBase());
lqw.eq(bo.getPosCoeffDefault() != null, PerfEmployeeInfo::getPosCoeffDefault, bo.getPosCoeffDefault());
lqw.eq(bo.getIsActive() != null, PerfEmployeeInfo::getIsActive, bo.getIsActive());
return lqw;
}
/**
* 新增员工绩效薪资基本信息
*/
@Override
public Boolean insertByBo(PerfEmployeeInfoBo bo) {
PerfEmployeeInfo add = BeanUtil.toBean(bo, PerfEmployeeInfo.class);
validEntityBeforeSave(add);
boolean flag = baseMapper.insert(add) > 0;
if (flag) {
bo.setId(add.getId());
}
return flag;
}
/**
* 修改员工绩效薪资基本信息
*/
@Override
public Boolean updateByBo(PerfEmployeeInfoBo bo) {
PerfEmployeeInfo update = BeanUtil.toBean(bo, PerfEmployeeInfo.class);
validEntityBeforeSave(update);
return baseMapper.updateById(update) > 0;
}
/**
* 保存前的数据校验
*/
private void validEntityBeforeSave(PerfEmployeeInfo entity){
//TODO 做一些数据校验,如唯一约束
}
/**
* 批量删除员工绩效薪资基本信息
*/
@Override
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if(isValid){
//TODO 做一些业务上的校验,判断是否需要校验
}
return baseMapper.deleteBatchIds(ids) > 0;
}
}

View File

@@ -11,13 +11,18 @@ import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import com.klp.perf.domain.bo.PerfPositionTemplateBo;
import com.klp.perf.domain.vo.PerfPositionTemplateVo;
import com.klp.perf.domain.vo.PerfTemplateDimensionVo;
import com.klp.perf.domain.PerfPositionTemplate;
import com.klp.perf.domain.PerfTemplateDimension;
import com.klp.perf.mapper.PerfPositionTemplateMapper;
import com.klp.perf.mapper.PerfTemplateDimensionMapper;
import com.klp.perf.service.IPerfPositionTemplateService;
import java.util.List;
import java.util.Map;
import java.util.Collection;
import java.util.Collections;
import java.util.stream.Collectors;
/**
* 岗位绩效考核模板Service业务层处理
@@ -30,32 +35,62 @@ import java.util.Collection;
public class PerfPositionTemplateServiceImpl implements IPerfPositionTemplateService {
private final PerfPositionTemplateMapper baseMapper;
private final PerfTemplateDimensionMapper dimensionMapper;
/**
* 查询岗位绩效考核模板
* 查询岗位绩效考核模板(含维度明细)
*/
@Override
public PerfPositionTemplateVo queryById(Long id){
return baseMapper.selectVoById(id);
PerfPositionTemplateVo vo = baseMapper.selectVoById(id);
if (vo != null) {
LambdaQueryWrapper<PerfTemplateDimension> dimLqw = Wrappers.lambdaQuery();
dimLqw.eq(PerfTemplateDimension::getTemplateId, id);
vo.setDimensionList(dimensionMapper.selectVoList(dimLqw));
}
return vo;
}
/**
* 查询岗位绩效考核模板列表
* 查询岗位绩效考核模板列表(含维度明细)
*/
@Override
public TableDataInfo<PerfPositionTemplateVo> queryPageList(PerfPositionTemplateBo bo, PageQuery pageQuery) {
LambdaQueryWrapper<PerfPositionTemplate> lqw = buildQueryWrapper(bo);
Page<PerfPositionTemplateVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
attachDimensionList(result.getRecords());
return TableDataInfo.build(result);
}
/**
* 查询岗位绩效考核模板列表
* 查询岗位绩效考核模板列表(含维度明细)
*/
@Override
public List<PerfPositionTemplateVo> queryList(PerfPositionTemplateBo bo) {
LambdaQueryWrapper<PerfPositionTemplate> lqw = buildQueryWrapper(bo);
return baseMapper.selectVoList(lqw);
List<PerfPositionTemplateVo> list = baseMapper.selectVoList(lqw);
attachDimensionList(list);
return list;
}
/**
* 批量填充维度明细到模板Vo列表
*/
private void attachDimensionList(List<PerfPositionTemplateVo> voList) {
if (voList == null || voList.isEmpty()) {
return;
}
List<Long> templateIds = voList.stream()
.map(PerfPositionTemplateVo::getId)
.collect(Collectors.toList());
LambdaQueryWrapper<PerfTemplateDimension> dimLqw = Wrappers.lambdaQuery();
dimLqw.in(PerfTemplateDimension::getTemplateId, templateIds);
List<PerfTemplateDimensionVo> allDimensions = dimensionMapper.selectVoList(dimLqw);
Map<Long, List<PerfTemplateDimensionVo>> dimMap = allDimensions.stream()
.collect(Collectors.groupingBy(PerfTemplateDimensionVo::getTemplateId));
for (PerfPositionTemplateVo vo : voList) {
vo.setDimensionList(dimMap.getOrDefault(vo.getId(), Collections.emptyList()));
}
}
private LambdaQueryWrapper<PerfPositionTemplate> buildQueryWrapper(PerfPositionTemplateBo bo) {

View File

@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.klp.common.utils.StringUtils;
import com.klp.domain.WmsEmployeeInfo;
import com.klp.mapper.WmsEmployeeInfoMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import com.klp.perf.domain.bo.PerfSalaryBo;
@@ -18,6 +20,8 @@ import com.klp.perf.service.IPerfSalaryService;
import java.util.List;
import java.util.Map;
import java.util.Collection;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* 月度薪资计算记录Service业务层处理
@@ -30,9 +34,10 @@ import java.util.Collection;
public class PerfSalaryServiceImpl implements IPerfSalaryService {
private final PerfSalaryMapper baseMapper;
private final WmsEmployeeInfoMapper employeeMapper;
/**
* 查询月度薪资计算记录
* 查询月度薪资计算记录(含员工信息)
*/
@Override
public PerfSalaryVo queryById(Long id){
@@ -40,22 +45,52 @@ public class PerfSalaryServiceImpl implements IPerfSalaryService {
}
/**
* 查询月度薪资计算记录列表
* 查询月度薪资计算记录列表(含员工信息)
*/
@Override
public TableDataInfo<PerfSalaryVo> queryPageList(PerfSalaryBo bo, PageQuery pageQuery) {
LambdaQueryWrapper<PerfSalary> lqw = buildQueryWrapper(bo);
Page<PerfSalaryVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
attachEmployeeInfo(result.getRecords());
return TableDataInfo.build(result);
}
/**
* 查询月度薪资计算记录列表
* 查询月度薪资计算记录列表(含员工信息)
*/
@Override
public List<PerfSalaryVo> queryList(PerfSalaryBo bo) {
LambdaQueryWrapper<PerfSalary> lqw = buildQueryWrapper(bo);
return baseMapper.selectVoList(lqw);
List<PerfSalaryVo> list = baseMapper.selectVoList(lqw);
attachEmployeeInfo(list);
return list;
}
/**
* 批量填充员工简要信息 (避免 N+1 查询)
*/
private void attachEmployeeInfo(List<PerfSalaryVo> voList) {
if (voList == null || voList.isEmpty()) {
return;
}
List<Long> employeeIds = voList.stream()
.map(PerfSalaryVo::getEmployeeId)
.filter(id -> id != null)
.distinct()
.collect(Collectors.toList());
if (employeeIds.isEmpty()) {
return;
}
LambdaQueryWrapper<WmsEmployeeInfo> lqw = Wrappers.lambdaQuery();
lqw.in(WmsEmployeeInfo::getInfoId, employeeIds);
List<WmsEmployeeInfo> employees = employeeMapper.selectList(lqw);
Map<Long, WmsEmployeeInfo> empMap = employees.stream()
.collect(Collectors.toMap(WmsEmployeeInfo::getInfoId, Function.identity()));
for (PerfSalaryVo vo : voList) {
if (vo.getEmployeeId() != null) {
vo.setWmsEmployeeInfo(empMap.get(vo.getEmployeeId()));
}
}
}
private LambdaQueryWrapper<PerfSalary> buildQueryWrapper(PerfSalaryBo bo) {

View File

@@ -1,25 +0,0 @@
<?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="com.klp.perf.mapper.PerfEmployeeInfoMapper">
<resultMap type="com.klp.perf.domain.PerfEmployeeInfo" id="PerfEmployeeInfoResult">
<result property="id" column="id"/>
<result property="employeeId" column="employee_id"/>
<result property="deptId" column="dept_id"/>
<result property="positionName" column="position_name"/>
<result property="baseSalary" column="base_salary"/>
<result property="perfBase" column="perf_base"/>
<result property="posCoeffDefault" column="pos_coeff_default"/>
<result property="isActive" column="is_active"/>
<result property="delFlag" column="del_flag"/>
<result property="remark" column="remark"/>
<result property="createTime" column="create_time"/>
<result property="createBy" column="create_by"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
</resultMap>
</mapper>

View File

@@ -183,6 +183,33 @@ export const dynamicRoutes = [
}
]
},
// APS 排产独立页面(用于产需单跳转排产单)
{
path: '/aps/requirement',
component: Layout,
hidden: true,
children: [
{
path: '',
component: () => import('@/views/wms/post/aps/requirement'),
name: 'ApsRequirement',
meta: { title: '产需单' }
}
]
},
{
path: '/aps/schedule',
component: Layout,
hidden: true,
children: [
{
path: '',
component: () => import('@/views/wms/post/aps/schedule'),
name: 'ApsSchedule',
meta: { title: '排产单' }
}
]
},
{
path: '/system/dict-data',
component: Layout,

View File

@@ -27,16 +27,23 @@
<div class="list-container">
<div v-for="item in reqList" :key="item.scheduleId" class="list-item"
:class="{ active: currentReq && currentReq.scheduleId === item.scheduleId }" @click="handleReqClick(item)">
<div class="item-title">
{{ item.scheduleNo }}
<span class="badge" :class="'badge-' + statusBadgeType(item.scheduleStatus)">{{
statusMap[item.scheduleStatus] || '未知' }}</span>
</div>
<div class="item-sub">
生产日期{{ item.prodDate || '-' }} 客户{{ item.customerName || '-' }} 业务员{{ item.businessUser || '-' }}
</div>
<div class="item-actions">
<button class="link-btn" @click.stop="handleDelete(item)">删除</button>
<div class="list-item-body">
<div class="list-item-left">
<div class="item-title">
{{ item.scheduleNo }}
<span class="badge" :class="'badge-' + statusBadgeType(item.scheduleStatus)">{{
statusMap[item.scheduleStatus] || '未知' }}</span>
</div>
<div class="item-sub">
生产日期{{ item.prodDate || '-' }} 客户{{ item.customerName || '-' }} 业务员{{ item.businessUser || '-' }}
</div>
<div class="item-actions">
<button class="link-btn" @click.stop="handleDelete(item)">删除</button>
</div>
</div>
<div class="list-item-right">
<el-button size="mini" plain @click.stop="handleJumpToSchedule(item)">跳转排产</el-button>
</div>
</div>
</div>
<div v-if="reqList.length === 0 && !reqLoading" style="padding: 40px; text-align: center; color: #909399;">
@@ -362,7 +369,7 @@
</div>
</div>
<!-- 右侧产品内容预览 -->
<!-- 右侧产品内容预览 + 已绑定产需单信息 -->
<div style="width: 55%; display: flex; flex-direction: column;">
<div
style="font-size:13px; font-weight:600; color:#2c3e50; margin-bottom:8px; padding-left:8px; border-left:3px solid #ff4d4f;">
@@ -382,6 +389,25 @@
<span>总数量{{ bindPreviewTotalQty }} </span>
<span>含税总额{{ bindPreviewTotalAmount }}</span>
</div>
<!-- 已绑定产需单信息 -->
<div v-if="bindPreviewExistingRels.length > 0" style="margin-top:12px; padding-top:10px; border-top:1px dashed #e4e7ed;">
<div style="font-size:12px; font-weight:600; color:#e74c3c; margin-bottom:6px;">
该订单已绑定以下产需单
</div>
<div style="display:flex; flex-wrap:wrap; gap:6px;">
<el-tag
v-for="rel in bindPreviewExistingRels"
:key="rel.scheduleId"
size="small"
:type="rel.scheduleStatus === 3 ? 'danger' : 'info'"
effect="plain"
:style="rel.scheduleStatus === 2 ? 'color:#555;border-color:#ccc;background:#f5f5f5;' : ''"
>
{{ rel.scheduleNo }}
<span style="margin-left:4px; opacity:0.7;">{{ bindPreviewRelStatusMap[rel.scheduleStatus] || '' }}</span>
</el-tag>
</div>
</div>
</div>
<div v-else
style="flex:1; display:flex; align-items:center; justify-content:center; color:#bfbfbf; font-size:13px;">
@@ -471,6 +497,10 @@ export default {
bindPreviewProductName: '',
bindPreviewTotalQty: 0,
bindPreviewTotalAmount: 0,
// 当前预览订单已绑定的产需单列表
bindPreviewExistingRels: [],
// 产需单状态映射(用于展示绑定状态)
bindPreviewRelStatusMap: { 0: '草稿', 1: '待审核', 2: '已下达', 3: '已退回' },
// 排产明细
detailLoading: false,
@@ -559,6 +589,18 @@ export default {
this.getList()
},
// 跳转到排产单页面(路由跳转)
handleJumpToSchedule(item) {
this.$router.push({
path: '/aps/schedule',
query: {
prodDate: item.prodDate || '',
scheduleNo: item.scheduleNo || '',
scheduleStatus: item.scheduleStatus
}
})
},
statusBadgeType(status) {
return this.statusBadgeMap[status] || 'gray'
},
@@ -738,6 +780,7 @@ export default {
this.bindPreviewProductName = ''
this.bindPreviewTotalQty = 0
this.bindPreviewTotalAmount = 0
this.bindPreviewExistingRels = []
this.searchBindOrders()
},
@@ -780,6 +823,29 @@ export default {
this.bindPreviewTotalQty = 0
this.bindPreviewTotalAmount = 0
}
// 查询该订单已关联了哪些产需单
this.bindPreviewExistingRels = []
listRel({ orderId: order.orderId }).then(res => {
const rows = res.rows || []
// 按 scheduleId 去重,并与当前已有的 reqList 匹配获取单号
const seen = new Set()
const reqMap = new Map()
;(this.reqList || []).forEach(r => reqMap.set(r.scheduleId, r))
const unique = []
rows.forEach(r => {
const key = r.scheduleId
if (!key || seen.has(key)) return
seen.add(key)
// 从已加载的 reqList 中找单号,找不到则不展示(已删除或不在当前页)
const match = reqMap.get(key)
if (match) {
unique.push({ ...r, scheduleNo: match.scheduleNo, scheduleStatus: match.scheduleStatus })
}
})
this.bindPreviewExistingRels = unique
}).catch(() => {
this.bindPreviewExistingRels = []
})
},
confirmBind() {
@@ -1038,6 +1104,31 @@ export default {
transition: background 0.15s;
}
.list-item-body {
display: flex;
align-items: stretch;
gap: 8px;
}
.list-item-left {
flex: 1;
min-width: 0;
}
.list-item-right {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
padding-left: 4px;
}
.item-actions {
display: flex;
gap: 8px;
margin-top: 4px;
}
.list-item:hover {
background: $aps-silver-1;
}
@@ -1063,10 +1154,6 @@ export default {
margin-bottom: 4px;
}
.list-item .item-actions {
display: flex;
gap: 8px;
}
// ====== 徽标 ======
.badge {

View File

@@ -626,7 +626,7 @@
<div style="margin-bottom:12px;font-size:13px;color:#e67e22;">
请为每条明细配置工序所有明细配置完成后才能接收
</div>
<el-table :data="receiveDetailList" border size="small" class="aps-table" max-height="400">
<el-table-column label="规格" prop="spec" min-width="120" show-overflow-tooltip />
<el-table-column label="材质" prop="material" width="90" align="center" show-overflow-tooltip />
@@ -634,8 +634,8 @@
<el-table-column label="品名" prop="productType" min-width="90" align="center" show-overflow-tooltip />
<el-table-column label="配置工序" min-width="200">
<template slot-scope="scope">
<ProcessSelect
v-model="scope.row.processId"
<ProcessSelect
v-model="scope.row.processId"
placeholder="请选择工序"
@change="(val, data) => handleReceiveProcessChange(scope.row, val, data)"
/>
@@ -682,6 +682,14 @@ import draggable from 'vuedraggable'
export default {
name: 'ApsSchedule',
components: { ProcessSelect, draggable },
components: { ProcessSelect },
props: {
// 由 flow.vue 通过 switchApsPage 传入的参数
apsParams: {
type: Object,
default: null
}
},
data() {
const today = new Date()
const y = today.getFullYear()
@@ -769,7 +777,49 @@ export default {
this.refreshScheduledStepItems()
}
},
watch: {
// 接收 flow.vue 传入的参数:设置日期并自动查询
apsParams: {
handler(val) {
if (val && val.prodDate) {
this.queryDate = val.prodDate
}
if (val && val.scheduleStatus !== undefined) {
// 根据产需单状态自动切换 Tab
// 1=待审核 2=已接收 4=已排产
const statusToTab = { 1: 'pending', 2: 'accepted', 4: 'scheduled' }
const tab = statusToTab[val.scheduleStatus] || 'pending'
this.activeTab = tab
}
this.$nextTick(() => {
this.handleQuery()
})
},
immediate: false
}
},
created() {
// 优先从路由参数获取(产需单点击"跳转排产"通过 $router.push 传参)
const query = this.$route.query
// 其次从 apsParams prop 获取(弹窗内由 flow.vue 切换组件传入)
const params = this.apsParams
let hasExternal = false
if (query && query.prodDate) {
this.queryDate = query.prodDate
hasExternal = true
if (query.scheduleStatus !== undefined) {
const statusToTab = { 1: 'pending', 2: 'accepted', 4: 'scheduled' }
this.activeTab = statusToTab[Number(query.scheduleStatus)] || 'pending'
}
} else if (params && params.prodDate) {
this.queryDate = params.prodDate
hasExternal = true
if (params.scheduleStatus !== undefined) {
const statusToTab = { 1: 'pending', 2: 'accepted', 4: 'scheduled' }
this.activeTab = statusToTab[params.scheduleStatus] || 'pending'
}
}
this.handleQuery()
},
methods: {

View File

@@ -44,6 +44,7 @@
v-if="dynamicComponent && !dialogLoading"
:is="dynamicComponent"
:key="dialogKey"
:aps-params="apsDialogParams"
/>
</div>
</el-dialog>
@@ -129,8 +130,7 @@ const NODE_EVENT_CONFIG = {
{ id: 'H', label: '选择工艺路线', handler: 'handleOpen', params: { componentPath: 'wms/post/aps/schedule' } },
{ id: 'I', label: '自动生成排产项', handler: 'handleOpen', params: { componentPath: 'wms/post/aps/schedule' } },
{ id: 'J', label: '已排产明细管理', handler: 'handleOpen', params: { componentPath: 'wms/post/aps/schedule' } },
{ id: 'K', label: '按工序绑定钢卷', handler: 'handleOpen', params: { componentPath: 'wms/post/aps/compare' } },
{ id: 'L', label: '执行生产', handler: 'handleOpen', params: { componentPath: 'wms/post/aps/schedule' } },
{ id: 'K', label: '执行生产', handler: 'handleOpen', params: { componentPath: 'wms/post/aps/schedule' } },
],
equipmentRepair: [
{ id: 'A', label: '创建维修计划', handler: 'handleOpen', params: { componentPath: 'wms/post/eqp/index' } },
@@ -164,11 +164,14 @@ const NODE_EVENT_CONFIG = {
inspection: [
{ id: 'A', label: '维护检验方案模板', handler: 'handleOpen', params: { componentPath: 'mes/qc/template/index' } },
{ id: 'B', label: '取样/检验数据录入', handler: 'handleOpen', params: { componentPath: 'mes/qc/inspectionSample/index' } },
{ id: 'D', label: '常规检验录入', handler: 'handleOpen', params: { componentPath: 'mes/qc/inspectionSample/index' } },
{ id: 'B', label: '检验数据录入', handler: 'handleOpen', params: { componentPath: 'mes/qc/inspectionSample/index' } },
{ id: 'D', label: '化学检验数据', handler: 'handleOpen', params: { componentPath: 'mes/qc/inspectionSample/index' } },
{ id: 'E', label: '拉伸检验(专项)', handler: 'handleOpen', params: { componentPath: 'mes/qc/inspectionTensile/index' } },
{ id: 'H', label: '生成质量证明书', handler: 'handleOpen', params: { componentPath: 'mes/qc/certificate/book' } },
{ id: 'I', label: '触发质量评审', handler: 'handleOpen', params: { componentPath: 'mes/qc/qualityReview/index' } },
{ id: 'F', label: '创建审批申请', handler: 'handleOpen', params: { componentPath: 'mes/qc/approval/index' } },
{ id: 'H', label: '审批中', handler: 'handleOpen', params: { componentPath: 'mes/qc/approval/index' } },
{ id: 'J', label: '填写检验数据', handler: 'handleOpen', params: { componentPath: 'mes/qc/approval/index' } },
{ id: 'M', label: '生成质量证明书', handler: 'handleOpen', params: { componentPath: 'mes/qc/certificate/book' } },
{ id: 'N', label: '触发质量评审', handler: 'handleOpen', params: { componentPath: 'mes/qc/qualityReview/index' } },
],
qualityReview: [
@@ -320,9 +323,8 @@ graph TD
H --> I["<b>自动生成排产项</b><br/>按工序步骤分组"]:::p7
I --> J["<b>已排产明细管理</b><br/>按步骤查看/编辑<br/>内联修改排产状态"]:::p7
J --> K["<b>按工序绑定钢卷</b><br/>将现存钢卷绑定到<br/>对应的排产明细"]:::p8
K --> L["<b>执行生产</b>"]:::p9
L --> M(["<b>排产完结</b>"]):::pend
J --> K["<b>执行生产</b>"]:::p8
K --> L(["<b>排产完结</b>"]):::pend
classDef p1 fill:#409eff,stroke:#337ecc,color:#fff,stroke-width:2px
classDef p2 fill:#e6fffa,stroke:#13c2c2,color:#303133,stroke-width:2px
@@ -332,7 +334,6 @@ graph TD
classDef p6 fill:#fffbe6,stroke:#fadb14,color:#606266,stroke-width:2px
classDef p7 fill:#fff0f6,stroke:#eb2f96,color:#303133,stroke-width:2px
classDef p8 fill:#f6ffed,stroke:#52c41a,color:#303133,stroke-width:2px
classDef p9 fill:#f0f5ff,stroke:#597ef7,color:#303133,stroke-width:2px
classDef dec fill:#f9f0ff,stroke:#722ed1,color:#303133,stroke-width:2px
classDef pend fill:#dcf7e8,stroke:#52c41a,color:#303133,stroke-width:2px,rx:10,ry:10
linkStyle default stroke:#bfbfbf,stroke-width:2px
@@ -427,25 +428,34 @@ graph TD
inspection: `
graph TD
A["<b>维护检验方案模板</b><br/>定义检验项/单位/标准"]:::i1
A --> B["<b>取样/检验数据录入</b><br/>选择方案模板<br/>动态生成检验项表格"]:::i2
B --> C{"检验类型"}:::dec
C -->|常规项| D["<b>常规检验录入</b><br/>直接在模板表格<br/>填写检测数据"]:::i3
C -->|拉伸试验| E["<b>拉伸检验(专项)</b><br/>独立试验记录<br/>管理明细数据"]:::i4
D --> F["<b>汇总检验结果</b>"]:::i5
A["<b>维护检验方案模板</b><br/>定义检验项/单位/标准"]:::i1
A --> B["<b>检验数据录入</b><br/>选择方案模板<br/>填写样品信息<br/>录入检验结果"]:::i2
B --> C{"检验类型"}:::dec
C -->|化学检验| D["<b>化学检验数据</b><br/>按模板动态生成<br/>检验项表格并填值"]:::i3
C -->|物理检验| E["<b>拉伸检验(专项)</b><br/>独立试验记录<br/>管理明细数据"]:::i4
D --> F["<b>创建审批申请</b><br/>关联检验记录<br/>填写申请信息"]:::i5
E --> F
F --> G{"判定"}:::dec
G -->|合格| H["<b>生成质量证明书</b><br/>汇总全部检验数据"]:::i6
G -->|不合格| I["<b>触发质量评审</b><br/>进入评审流程"]:::i7
H --> J(["检验归档"]):::iend
F --> G{"审批流转"}:::dec
G -->|送审| H["<b>审批中</b><br/>待审批"]:::i6
H --> I{"审批"}:::dec
I -->|通过| J["<b>填写检验数据</b><br/>录入详细检验结果<br/>含判定"]:::i7
I -->|驳回| K["<b>退回修改</b><br/>重新编辑后送审"]:::i8
K --> F
J --> L{"判定"}:::dec
L -->|合格| M["<b>生成质量证明书</b><br/>管理/编辑/打印<br/>支持化学/物理模板"]:::i9
L -->|不合格| N["<b>触发质量评审</b><br/>进入评审流程"]:::i10
M --> O(["检验归档"]):::iend
classDef i1 fill:#409eff,stroke:#337ecc,color:#fff,stroke-width:2px
classDef i2 fill:#e6fffa,stroke:#13c2c2,color:#303133,stroke-width:2px
classDef i3 fill:#fff7e6,stroke:#fa8c16,color:#303133,stroke-width:2px
classDef i4 fill:#f0f5ff,stroke:#597ef7,color:#303133,stroke-width:2px
classDef i5 fill:#fffbe6,stroke:#fadb14,color:#303133,stroke-width:2px
classDef i6 fill:#f6ffed,stroke:#52c41a,color:#303133,stroke-width:2px
classDef i7 fill:#fff1f0,stroke:#f5222d,color:#303133,stroke-width:2px
classDef i6 fill:#e6f7ff,stroke:#1890ff,color:#303133,stroke-width:2px
classDef i7 fill:#f6ffed,stroke:#52c41a,color:#303133,stroke-width:2px
classDef i8 fill:#fff1f0,stroke:#f5222d,color:#303133,stroke-width:2px
classDef i9 fill:#f0f5ff,stroke:#597ef7,color:#303133,stroke-width:2px
classDef i10 fill:#fff1f0,stroke:#f5222d,color:#303133,stroke-width:2px
classDef dec fill:#f9f0ff,stroke:#722ed1,color:#303133,stroke-width:2px
classDef iend fill:#dcf7e8,stroke:#52c41a,color:#303133,stroke-width:2px,rx:10,ry:10
linkStyle default stroke:#bfbfbf,stroke-width:2px
@@ -524,6 +534,8 @@ export default {
dialogLoading: false,
dynamicComponent: null,
dialogKey: 0,
// APS 页面切换参数(传递给子组件)
apsDialogParams: null,
}
},
@@ -692,6 +704,7 @@ export default {
this.dialogWidth = dialogWidth
this.dialogLoading = true
this.dynamicComponent = null
this.apsDialogParams = params || null
this.resolveImport(componentPath)
.then(module => {
@@ -707,6 +720,36 @@ export default {
})
},
/**
* APS 页面间切换(由子组件调用 this.$parent.switchApsPage
* @param {string} componentPath - 相对于 @/views/ 的路径,如 'wms/post/aps/schedule'
* @param {object} params - 传递给目标组件的参数
* @param {string} title - 弹窗标题
*/
switchApsPage(componentPath, params, title) {
if (!componentPath) {
this.$message.warning('组件路径不能为空')
return
}
this.dialogLoading = true
this.dynamicComponent = null
this.apsDialogParams = params || null
if (title) this.dialogTitle = title
this.resolveImport(componentPath)
.then(module => {
this.dynamicComponent = module.default || module
})
.catch(err => {
console.error('[FlowChart] switchApsPage error:', err)
this.$message.error('组件加载失败: ' + (err.message || '未知错误'))
})
.finally(() => {
this.dialogLoading = false
})
},
resolveImport(componentPath) {
// 与 src/store/modules/permission.js 的 loadView 同款模式
// componentPath 相对于 @/views/,如 'crm/order/index'
@@ -721,6 +764,7 @@ export default {
handleDialogClosed() {
this.dynamicComponent = null
this.dialogKey++
this.apsDialogParams = null
},
},
}

View File

@@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
@@ -86,6 +87,18 @@ public class WmsEmployeeInfo extends BaseEntity {
* 社保类型(三险/五险)
*/
private String socialInsuranceType;
/**
* 底薪(元)
*/
private BigDecimal baseSalary;
/**
* 岗位绩效基数(元), 默认≈底薪×20%
*/
private BigDecimal perfBase;
/**
* 默认岗位系数(初始值,后续月度由绩效自动覆盖)
*/
private BigDecimal posCoeffDefault;
/**
* 逻辑删除标识0=正常1=已删
*/

View File

@@ -6,6 +6,7 @@ import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;
import java.util.Date;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
@@ -114,6 +115,21 @@ public class WmsEmployeeInfoBo extends BaseEntity {
*/
private String socialInsuranceType;
/**
* 底薪(元)
*/
private BigDecimal baseSalary;
/**
* 岗位绩效基数(元), 默认≈底薪×20%
*/
private BigDecimal perfBase;
/**
* 默认岗位系数(初始值,后续月度由绩效自动覆盖)
*/
private BigDecimal posCoeffDefault;
/**
* 备注
*/

View File

@@ -1,6 +1,7 @@
package com.klp.domain.vo;
import java.util.Date;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
@@ -117,6 +118,24 @@ public class WmsEmployeeInfoVo {
*/
private String socialInsuranceType;
/**
* 底薪(元)
*/
@ExcelProperty(value = "底薪(元)")
private BigDecimal baseSalary;
/**
* 岗位绩效基数(元), 默认≈底薪×20%
*/
@ExcelProperty(value = "岗位绩效基数(元)")
private BigDecimal perfBase;
/**
* 默认岗位系数(初始值,后续月度由绩效自动覆盖)
*/
@ExcelProperty(value = "默认岗位系数")
private BigDecimal posCoeffDefault;
/**
* 备注
*/

View File

@@ -81,6 +81,9 @@ public class WmsEmployeeInfoServiceImpl implements IWmsEmployeeInfoService {
lqw.eq(StringUtils.isNotBlank(bo.getRelationship()), WmsEmployeeInfo::getRelationship, bo.getRelationship());
lqw.eq(StringUtils.isNotBlank(bo.getEmergencyContactPhone()), WmsEmployeeInfo::getEmergencyContactPhone, bo.getEmergencyContactPhone());
lqw.eq(StringUtils.isNotBlank(bo.getSocialInsuranceType()), WmsEmployeeInfo::getSocialInsuranceType, bo.getSocialInsuranceType());
lqw.eq(bo.getBaseSalary() != null, WmsEmployeeInfo::getBaseSalary, bo.getBaseSalary());
lqw.eq(bo.getPerfBase() != null, WmsEmployeeInfo::getPerfBase, bo.getPerfBase());
lqw.eq(bo.getPosCoeffDefault() != null, WmsEmployeeInfo::getPosCoeffDefault, bo.getPosCoeffDefault());
// 是否离职
lqw.eq(bo.getIsLeave() != null, WmsEmployeeInfo::getIsLeave, bo.getIsLeave());
// 离职时间范围查询

View File

@@ -21,6 +21,9 @@
<result property="relationship" column="relationship"/>
<result property="emergencyContactPhone" column="emergency_contact_phone"/>
<result property="socialInsuranceType" column="social_insurance_type"/>
<result property="baseSalary" column="base_salary"/>
<result property="perfBase" column="perf_base"/>
<result property="posCoeffDefault" column="pos_coeff_default"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>