新增需求:自处理

yun-zuoyi
柯裕 6 years ago
parent 1adcd23c6f
commit f1e8f07a90

@ -0,0 +1,50 @@
package cn.estsh.i3plus.pojo.andon.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;
/**
* @Description : ANDON_
* @Reference :
* @Author : hansen.ke
* @CreateDate : 2019-05-31 14:08
* @Modify:
**/
@Data
@Entity
@Table(name="ANDON_DISPOSAL_CFG")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api("ANDON_自处理配置")
public class AndonDisposalCfg extends BaseBean {
@Column(name = "WORK_CENTER_CODE")
@ApiParam(value = "工作中心代码")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam(value = "工作单元代码")
private String workCellCode;
@Column(name = "ALARM_CODE")
@ApiParam(value = "安灯类型代码")
private String alarmCode;
@Column(name = "AC_CODE")
@ApiParam(value = "呼叫原因代码")
private String acCode;
@Column(name = "APPROVAL_STATUS")
@ApiParam(value = "审批状态")
private String approvalStatus;
}

@ -263,6 +263,13 @@ public class AndonManageQueue extends BaseBean {
@ApiParam(value = "处理类型")
private String disposalType;
/**
* 1 = 2 =
*/
@Transient
@ApiParam(value = "是否勾选加入自处理问题库", example = "2")
private Integer isDisposal;
@Column(name = "ALARM_DETAIL_CODE")
@ApiParam(value = "安灯子类型代码")
private String alarmDetailCode;
@ -283,6 +290,7 @@ public class AndonManageQueue extends BaseBean {
@ApiParam(value = "重要等级名称")
private String importanceNameRdd;
// 是否转呼
public Integer getIsShiftCall() {
return this.isShiftCall == null ? 0 : this.isShiftCall;

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.andon.repository;
import cn.estsh.i3plus.pojo.andon.bean.AndonDisposalCfg;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import org.springframework.stereotype.Repository;
/**
* @Description : ANDON_
* @Reference :
* @Author : hansen.ke
* @CreateDate : 2019-05-31 14:14
* @Modify:
**/
@Repository
public interface IAndonDisposalCfgRepository extends BaseRepository<AndonDisposalCfg, Long> {
}

@ -191,6 +191,23 @@ public class AndonHqlPack {
}
/**
*
* @param andonDisposalCfg
* @return
*/
public static DdlPackBean packHqlAndonDisposalCfg(AndonDisposalCfg andonDisposalCfg){
DdlPackBean result = new DdlPackBean();
DdlPreparedPack.getStringEqualPack(andonDisposalCfg.getWorkCenterCode(),"workCenterCode", result);
DdlPreparedPack.getStringEqualPack(andonDisposalCfg.getWorkCellCode(),"workCellCode", result);
DdlPreparedPack.getStringEqualPack(andonDisposalCfg.getAlarmCode(),"alarmCode", result);
DdlPreparedPack.getStringEqualPack(andonDisposalCfg.getAcCode(),"acCode", result);
getStringBuilderPack(andonDisposalCfg, result);
return result;
}
/**
*
* @param andonManageRecord
* @return

@ -11,6 +11,80 @@ import org.apache.commons.lang3.StringUtils;
* @Modify:
**/
public class AndonEnumUtil {
/**
* = 10 = 20
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DISPOSAL_TYPE{
STANDARD("10","标准处理"),
SELF("20","自处理");
private String value;
private String description;
DISPOSAL_TYPE(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 (StringUtils.equalsIgnoreCase(values()[i].value,val)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* 10=20=30=40=100=
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum APPROVAL_STATUS{
WAIT("10","待审批"),
SECOND_APPROVAL("20","二级审批"),
THIRD_APPROVAL("30","三级审批"),
FOUTH_APPROVAL("40","四级审批"),
FINISH("100","已审批");
private String value;
private String description;
APPROVAL_STATUS(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 (StringUtils.equalsIgnoreCase(values()[i].value,val)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
* 10-20-
@ -89,7 +163,9 @@ public class AndonEnumUtil {
CALL(1,"10","呼叫"),
SIGN(2,"20","响应"),
RESOLVE(3,"30","解决"),
CANCEL(4,"40", "撤销");
CANCEL(4,"40", "撤销"),
COMMIT(5,"50","提交"),
PASS(6,"60","审批");
private int value;
private String code;
@ -133,7 +209,9 @@ public class AndonEnumUtil {
SIGN_ACTION("20","签到动作"),
CANCEL_ACTION("30", "撤销动作"),
RESOLVE_ACTION("40", "解决动作"),
SHIFG_CALL_ACTION("50", "转呼动作");
SHIFG_CALL_ACTION("50", "转呼动作"),
COMMIT_ACTION("60","提交动作"),
PASS_ACTION("70","审批动作");
private String value;
private String description;

Loading…
Cancel
Save