添加人员技能功能

yun-zuoyi
宋军超 5 years ago
parent 2c50fceec9
commit b96eb1b669

@ -5085,4 +5085,43 @@ public class MesEnumUtil {
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SKILL_LEVEL {
TRAINING("10", "培训中"),
QUALIFIED("20", "合格"),
GOOD("30", "良好"),
CAN_GUIDE_OTHERS("40", "可指导他人");
private String value;
private String description;
SKILL_LEVEL(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value.equals(val)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
}

@ -0,0 +1,40 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
/**
* @Description:
* @Reference:
* @Author: adair.song
* @CreateDate: 2020\04\21 13:34
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_SHIFT_CLASS")
@Api("MES_班制表")
public class MesShiftClass extends BaseBean implements Serializable {
private static final long serialVersionUID = 1222874834741345978L;
@Column(name = "SHIFT_CLASS_CODE")
@ApiParam("班制代码")
private String shiftClassCode;
@Column(name = "SHIFT_CLASS_NAME")
@ApiParam("班制名称")
private String shiftClassName;
}

@ -0,0 +1,53 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
/**
* @Description:
* @Reference:
* @Author: adair.song
* @CreateDate: 2020\04\21 13:34
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_SHIFT_CLASS_DETAIL")
@Api("MES_班制班次表")
public class MesShiftClassDetail extends BaseBean implements Serializable {
private static final long serialVersionUID = 1222874274741347278L;
@Column(name = "SHIFT_CLASS_CODE")
@ApiParam("班制代码")
private String shiftClassCode;
@Column(name = "SHIFT_CLASS_NAME")
@ApiParam("班制名称")
private String shiftClassName;
@Column(name = "SHIFT_CODE")
@ApiParam("班次代码")
private String shiftCode;
@Column(name = "SHIFT_NAME")
@ApiParam("班次名称")
private String shiftName;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
}

@ -0,0 +1,40 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
/**
* @Description:
* @Reference:
* @Author: adair.song
* @CreateDate: 2020\04\21 13:34
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_SKILLS")
@Api("MES_技能表")
public class MesSkills extends BaseBean implements Serializable {
private static final long serialVersionUID = 1229825214741345978L;
@Column(name = "SKILL_CODE")
@ApiParam("技能代码")
private String skillCode;
@Column(name = "SKILL_NAME")
@ApiParam("技能名称")
private String skillName;
}

@ -0,0 +1,52 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
/**
* @Description:
* @Reference:
* @Author: adair.song
* @CreateDate: 2020\04\21 13:34
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_USER_SKILL")
@Api("MES_人员技能表")
public class MesUserSkill extends BaseBean implements Serializable {
private static final long serialVersionUID = 1222847514741345978L;
@Column(name = "USER_EMP_NO")
@ApiParam("员工编码")
private String userEmpNo;
@Column(name = "USER_NAME")
@ApiParam("员工名称")
private String userName;
@Column(name = "SKILL_CODE")
@ApiParam("技能代码")
private String skillCode;
@Column(name = "SKILL_NAME")
@ApiParam("技能名称")
private String skillName;
@Column(name = "SKILL_LEVEL")
@ApiParam("技能等级")
private String skillLevel;
}

@ -0,0 +1,52 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
/**
* @Description:
* @Reference:
* @Author: adair.song
* @CreateDate: 2020\04\21 13:34
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_WORK_CELL_SKILL")
@Api("MES_工位技能表")
public class MesWorkCellSkill extends BaseBean implements Serializable {
private static final long serialVersionUID = 1239825214741345208L;
@Column(name = "SKILL_CODE")
@ApiParam("技能代码")
private String skillCode;
@Column(name = "SKILL_NAME")
@ApiParam("技能名称")
private String skillName;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name = "WORK_CELL_NAME")
@ApiParam("工作单元名称")
private String workCellName;
}

@ -0,0 +1,45 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
* @Description:
* @Reference:
* @Author: adair.song
* @CreateDate: 2020\04\21 13:34
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_WORKDAY")
@Api("MES_工作日历表")
public class MesWorkDay extends BaseBean implements Serializable {
private static final long serialVersionUID = 1222899824741345978L;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name = "WORK_DATE")
@ApiParam("日期")
private String workDate;
@Column(name = "SHIFT_CLASS_CODE")
@ApiParam("班制代码")
private String shiftClassCode;
}

@ -0,0 +1,34 @@
package cn.estsh.i3plus.pojo.mes.model;
import cn.estsh.i3plus.pojo.mes.bean.MesUserSkill;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @Description : -
* @Reference :
* @Author : alwaysfrin
* @CreateDate : 2018-10-11 11:02
* @Modify:
**/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("用户信息model")
public class SkillsUserModel {
@ApiParam(value ="姓名")
private String userName;
@ApiParam(value ="工号")
private String userEmpNo;
@ApiParam("技能矩阵信息")
private List<MesUserSkill> mesUserSkillList;
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesShiftClassDetail;
/**
* @Description:
* @Reference:
* @Author: adair
* @CreateDate: 2020\04\21
* @Modify:
**/
public interface MesShiftClassDetailRepository extends BaseRepository<MesShiftClassDetail, Long> {
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesShiftClass;
/**
* @Description:
* @Reference:
* @Author: adair
* @CreateDate: 2020\04\21
* @Modify:
**/
public interface MesShiftClassRepository extends BaseRepository<MesShiftClass, Long> {
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesSkills;
/**
* @Description:
* @Reference:
* @Author: adair
* @CreateDate: 2020\04\21
* @Modify:
**/
public interface MesSkillsRepository extends BaseRepository<MesSkills, Long> {
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesUserSkill;
/**
* @Description:
* @Reference:
* @Author: adair
* @CreateDate: 2020\04\21
* @Modify:
**/
public interface MesUserSkillRepository extends BaseRepository<MesUserSkill, Long> {
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesWorkCellSkill;
/**
* @Description:
* @Reference:
* @Author: adair
* @CreateDate: 2020\04\21
* @Modify:
**/
public interface MesWorkCellSkillRepository extends BaseRepository<MesWorkCellSkill, Long> {
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesWorkDay;
/**
* @Description:
* @Reference:
* @Author: adair
* @CreateDate: 2020\04\21
* @Modify:
**/
public interface MesWorkDayRepository extends BaseRepository<MesWorkDay, Long> {
}

@ -2508,4 +2508,121 @@ public class MesHqlPack {
DdlPreparedPack.getNumEqualPack(mesBoardEquStatus.getIsValid(), "isValid", packBean);
return packBean;
}
/**
* MES
*
* @param mesSkills
* @param organizeCode
* @return
*/
public static DdlPackBean getMesSkills(MesSkills mesSkills, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesSkills, organizeCode);
if (!StringUtils.isEmpty(mesSkills.getSkillCode())) {
DdlPreparedPack.getStringLikerPack(mesSkills.getSkillCode(), "skillCode", packBean);
}
if (!StringUtils.isEmpty(mesSkills.getSkillName())) {
DdlPreparedPack.getStringLikerPack(mesSkills.getSkillName(), "skillName", packBean);
}
return packBean;
}
/**
* MES
*
* @param mesWorkCellSkill
* @param organizeCode
* @return
*/
public static DdlPackBean getMesWorkCellSkill(MesWorkCellSkill mesWorkCellSkill, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesWorkCellSkill, organizeCode);
if (!StringUtils.isEmpty(mesWorkCellSkill.getSkillCode())) {
DdlPreparedPack.getStringLikerPack(mesWorkCellSkill.getSkillCode(), "skillCode", packBean);
}
if (!StringUtils.isEmpty(mesWorkCellSkill.getSkillName())) {
DdlPreparedPack.getStringLikerPack(mesWorkCellSkill.getSkillName(), "skillName", packBean);
}
if (!StringUtils.isEmpty(mesWorkCellSkill.getWorkCenterCode())) {
DdlPreparedPack.getStringLikerPack(mesWorkCellSkill.getWorkCenterCode(), "workCenterCode", packBean);
}
if (!StringUtils.isEmpty(mesWorkCellSkill.getWorkCellCode())) {
DdlPreparedPack.getStringLikerPack(mesWorkCellSkill.getWorkCellCode(), "workCellCode", packBean);
}
if (!StringUtils.isEmpty(mesWorkCellSkill.getWorkCellName())) {
DdlPreparedPack.getStringLikerPack(mesWorkCellSkill.getWorkCellName(), "workCellName", packBean);
}
return packBean;
}
/**
* MES
*
* @param mesUserSkill
* @param organizeCode
* @return
*/
public static DdlPackBean getMesUserSkill(MesUserSkill mesUserSkill, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesUserSkill, organizeCode);
if (!StringUtils.isEmpty(mesUserSkill.getSkillCode())) {
DdlPreparedPack.getStringLikerPack(mesUserSkill.getSkillCode(), "skillCode", packBean);
}
if (!StringUtils.isEmpty(mesUserSkill.getSkillName())) {
DdlPreparedPack.getStringLikerPack(mesUserSkill.getSkillName(), "skillName", packBean);
}
if (!StringUtils.isEmpty(mesUserSkill.getSkillLevel())) {
DdlPreparedPack.getStringLikerPack(mesUserSkill.getSkillLevel(), "skillLevel", packBean);
}
if (!StringUtils.isEmpty(mesUserSkill.getUserEmpNo())) {
DdlPreparedPack.getStringLikerPack(mesUserSkill.getUserEmpNo(), "userEmpNo", packBean);
}
if (!StringUtils.isEmpty(mesUserSkill.getUserName())) {
DdlPreparedPack.getStringLikerPack(mesUserSkill.getUserName(), "userName", packBean);
}
return packBean;
}
/**
* MES
*
* @param mesShiftClass
* @param organizeCode
* @return
*/
public static DdlPackBean getMesShiftClass(MesShiftClass mesShiftClass, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesShiftClass, organizeCode);
if (!StringUtils.isEmpty(mesShiftClass.getShiftClassCode())) {
DdlPreparedPack.getStringLikerPack(mesShiftClass.getShiftClassCode(), "shiftClassCode", packBean);
}
if (!StringUtils.isEmpty(mesShiftClass.getShiftClassName())) {
DdlPreparedPack.getStringLikerPack(mesShiftClass.getShiftClassName(), "shiftClassName", packBean);
}
return packBean;
}
/**
* MES
*
* @param mesShiftClassDetail
* @param organizeCode
* @return
*/
public static DdlPackBean getMesShiftDetailClass(MesShiftClassDetail mesShiftClassDetail, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesShiftClassDetail, organizeCode);
if (!StringUtils.isEmpty(mesShiftClassDetail.getShiftClassCode())) {
DdlPreparedPack.getStringEqualPack(mesShiftClassDetail.getShiftClassCode(), "shiftClassCode", packBean);
}
if (!StringUtils.isEmpty(mesShiftClassDetail.getShiftClassName())) {
DdlPreparedPack.getStringLikerPack(mesShiftClassDetail.getShiftClassName(), "shiftClassName", packBean);
}
if (!StringUtils.isEmpty(mesShiftClassDetail.getShiftCode())) {
DdlPreparedPack.getStringEqualPack(mesShiftClassDetail.getShiftCode(), "shiftCode", packBean);
}
if (!StringUtils.isEmpty(mesShiftClassDetail.getShiftName())) {
DdlPreparedPack.getStringLikerPack(mesShiftClassDetail.getShiftName(), "shiftName", packBean);
}
if (!StringUtils.isEmpty(mesShiftClassDetail.getWorkCenterCode())) {
DdlPreparedPack.getStringLikerPack(mesShiftClassDetail.getWorkCenterCode(), "workCenterCode", packBean);
}
return packBean;
}
}

Loading…
Cancel
Save