Merge branch 'dev' into test

yun-zuoyi
王杰 6 years ago
commit 1d920627ec

@ -35,8 +35,7 @@ public class ExportProject extends BaseAPS {
@Column(name="LINK_ID")
@ApiParam(value ="数据连接对象")
@FieldAnnotation(property = false)
@JsonIgnore
@FieldAnnotation(relation = "Link", notEmpty = true)
private Long linkId;
public DataLink getLink() {

@ -34,7 +34,7 @@ public class ImportProject extends BaseAPS {
@Column(name="LINK_ID")
@ApiParam(value ="数据连接对象")
@FieldAnnotation(property = false)
@FieldAnnotation(relation = "Link", notEmpty = true)
private Long linkId;
public DataLink getLink() {

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
@ -27,17 +28,21 @@ import java.util.Date;
public class OvertimeCalendar extends BaseAPS {
@Column(name="RES_CODES")
@ApiParam(value ="资源代码")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true)
private String resCodes;
@Column(name="START")
@ApiParam(value ="开始时间")
@FieldAnnotation(notEmpty = true)
private Date start;
@Column(name="END")
@ApiParam(value ="结束时间")
@FieldAnnotation(notEmpty = true)
private Date end;
@Column(name="TYPE")
@ApiParam(value ="类型")
@FieldAnnotation(defaultValue = "ENABLE")
private ApsEnumUtil.CALENDAR_TYPE type;
}

@ -52,7 +52,7 @@ public class DateDuration {
* 0
* @return
*/
public boolean Valid() {
public boolean valid() {
return this.bValid;
}
@ -124,7 +124,7 @@ public class DateDuration {
return strExtraString.toString();
}
public void Divide(double val) {
public void divide(double val) {
if (val < PRECISION) {
return;
}
@ -165,7 +165,7 @@ public class DateDuration {
return;
}
if (!ValueValid()) {
if (!valueValid()) {
this.time = 0;
this.rate = 0.0f;
this.bValid = false;
@ -173,42 +173,35 @@ public class DateDuration {
}
ArrayList<EV_STRING> lst = new ArrayList<EV_STRING>();
Decompound(lst);
decompound(lst);
boolean oFlg = lst.size() == 1;
for (EV_STRING evs : lst) {
if (evs.type == EV_STRING_TYPE.EVS_GOOD)
{
AbstractMap.SimpleEntry<Boolean, Integer> extraTime = TransTime_Each(evs.value);
if (extraTime.getKey() || !oFlg)
{
if (evs.type == EV_STRING_TYPE.EVS_GOOD) {
AbstractMap.SimpleEntry<Boolean, Integer> extraTime = transTimeEach(evs.value);
if (extraTime.getKey() || !oFlg) {
this.time += extraTime.getValue();
}
else
{
} else {
this.time += extraTime.getValue() * 1;
}
}
else
{
AbstractMap.SimpleEntry<Boolean, Double> extraPer = TransRate_Each(evs.value);
if (extraPer.getKey())
{
else {
AbstractMap.SimpleEntry<Boolean, Double> extraPer = transRateEach(evs.value);
if (extraPer.getKey()) {
this.rate = extraPer.getValue();
}
}
}
if (this.time < 0)
{
if (this.time < 0) {
this.time = 0;
this.rate = 0.0f;
this.bValid = false;
}
}
private boolean ValueValid() {
private boolean valueValid() {
for (char ch : this.value.toCharArray()) {
if (ch <= 'z' && ch >= 'a') {
ch -= 32;
@ -232,61 +225,46 @@ public class DateDuration {
|| ch == 'M' || ch == 'S' || ch == '+'||ch == '-'||ch == 'P');
}
private void Decompound(ArrayList<EV_STRING> lst) {
private void decompound(ArrayList<EV_STRING> lst) {
int len = this.value.length();
int iStr = 0;
EV_STRING evs = new EV_STRING();
evs.type = EV_STRING_TYPE.EVS_GOOD;
while(iStr < len)
{
while(iStr < len) {
char ch = this.value.charAt(iStr);
if (ch == '+')
{
if (ch == '+') {
lst.add(evs.clone());
evs.value = "";
evs.type = EV_STRING_TYPE.EVS_GOOD;
iStr++;
continue;
}
else if (ch == '-')
{
} else if (ch == '-') {
int iPre = iStr;
if (iPre != 0)
{
if (iPre != 0) {
iPre--;
char cp = this.value.charAt(iPre);
if (!(cp == 'D' || cp == 'H'
|| cp == 'M' || cp == 'S'))
{
|| cp == 'M' || cp == 'S')) {
evs.value = evs.value + 'S';
}
}
}
else if (ch == 'P')
{
} else if (ch == 'P') {
int iTempIndex = 0;
StringBuffer temp1 = new StringBuffer();
StringBuffer temp2 = new StringBuffer();
int iTemp = evs.value.length() - 1;
for (;iTemp >= 0;iTemp--)
{
for (;iTemp >= 0;iTemp--) {
char cTemp = evs.value.charAt(iTemp);
if (cTemp == 'D' || cTemp == 'H'
|| cTemp == 'M' || cTemp == 'S')
{
|| cTemp == 'M' || cTemp == 'S') {
iTempIndex++;
}
if (iTempIndex >= 2)
{
} if (iTempIndex >= 2) {
temp1.insert(0,cTemp);
}
else
{
} else {
temp2.insert(0,cTemp);
}
}
if (!temp1.toString().isEmpty())
{
if (!temp1.toString().isEmpty()) {
EV_STRING evs1 = new EV_STRING();
evs1.type = EV_STRING_TYPE.EVS_GOOD;
evs1.value = temp1.toString();
@ -296,12 +274,10 @@ public class DateDuration {
evs.type = EV_STRING_TYPE.EVS_HAVE_P;
evs.value = evs.value + ch;
iStr++;
if (iStr != len)
{
if (iStr != len) {
char cp = this.value.charAt(iStr);
if (cp == 'D' || cp == 'H'
|| cp == 'M' || cp == 'S')
{
|| cp == 'M' || cp == 'S') {
evs.value = evs.value + cp;
iStr++;
}
@ -315,13 +291,12 @@ public class DateDuration {
evs.value = evs.value + ch;
iStr++;
}
if (!evs.value.isEmpty())
{
if (!evs.value.isEmpty()) {
lst.add(evs);
}
}
private AbstractMap.SimpleEntry<Boolean, Integer> TransTime_Each(String extraValue) {
private AbstractMap.SimpleEntry<Boolean, Integer> transTimeEach(String extraValue) {
if (extraValue.isEmpty())
return new AbstractMap.SimpleEntry<Boolean, Integer>(false, 0);
@ -330,16 +305,13 @@ public class DateDuration {
boolean flg = false;
for (int i = 0; i < extraValue.length(); i++) {
char ch = extraValue.charAt(i);
int rate = TimeUnit(ch);
if (rate > 0)
{
int rate = timeUnit(ch);
if (rate > 0) {
double iC = Double.parseDouble(temp.toString());
extraTime += (int)(iC*rate);
temp.setLength(0);
flg = true;
}
else
{
} else {
temp.append(ch);
}
}
@ -347,7 +319,7 @@ public class DateDuration {
extraTime += Double.parseDouble(temp.toString());
return new AbstractMap.SimpleEntry<Boolean, Integer>(flg, extraTime);
}
private AbstractMap.SimpleEntry<Boolean, Double> TransRate_Each(String extraValue) {
private AbstractMap.SimpleEntry<Boolean, Double> transRateEach(String extraValue) {
if (extraValue.isEmpty())
return new AbstractMap.SimpleEntry<Boolean, Double>(false, 0.0);
@ -356,8 +328,7 @@ public class DateDuration {
boolean flg = false;
for (int i = 0; i < extraValue.length(); i++) {
char ch = extraValue.charAt(i);
switch(ch)
{
switch(ch) {
case 'D': extraPer = flg ? (1 / Double.parseDouble(temp.toString())) * 86400 : Double.parseDouble(temp.toString()) * 86400; return new AbstractMap.SimpleEntry<Boolean, Double>(true, extraPer);
case 'H': extraPer = flg ? (1 / Double.parseDouble(temp.toString())) * 3600: Double.parseDouble(temp.toString()) * 3600; return new AbstractMap.SimpleEntry<Boolean, Double>(true, extraPer);
case 'M': extraPer = flg ? (1 / Double.parseDouble(temp.toString())) * 60 : Double.parseDouble(temp.toString()) * 60; return new AbstractMap.SimpleEntry<Boolean, Double>(true, extraPer);
@ -366,12 +337,11 @@ public class DateDuration {
default : temp.append(ch);
}
}
return new AbstractMap.SimpleEntry<Boolean, Double>(true, extraPer);
return new AbstractMap.SimpleEntry<>(true, extraPer);
}
private int TimeUnit(char ch) {
switch(ch)
{
private int timeUnit(char ch) {
switch(ch) {
case 'D': return 86400;
case 'H': return 3600;
case 'M': return 60;

@ -1,11 +1,20 @@
package cn.estsh.i3plus.pojo.aps.model;
import cn.estsh.i3plus.pojo.base.common.Pager;
import io.swagger.annotations.Api;
import lombok.Data;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-11-22
* @Modify:
**/
@Data
@Api("表格分页查询参数")
public class APSPager extends Pager {
public static class SortData {
// 排序对象

@ -0,0 +1,25 @@
package cn.estsh.i3plus.pojo.aps.model;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
import lombok.Data;
import java.util.Date;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-11-22
* @Modify:
**/
@Data
@Api("报表分页查询参数")
public class ReportPager extends Pager {
private String filter; // 物料筛选条件
private Date begin; // 统计开始时间
private Date end; // 统计结束时间
private ApsEnumUtil.MATERIAL_REPORT_TYPE type;
private ApsEnumUtil.REPORT_TIME_SPAN span; // 统计时间间隔
}

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="ExportProject">
<Relation field="Link" name="DataLink" type="MULTI_TO_ONE">
<Relation field="Link" name="DataLink" type="MULTI_TO_ONE" owner="false">
</Relation>
<Relation field="Details" name="ExportDetail" reverse="Project" type="ONE_TO_MULTI" owner="true">
</Relation>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="ImportProject">
<Relation field="Link" name="DataLink" type="MULTI_TO_ONE">
<Relation field="Link" name="DataLink" type="MULTI_TO_ONE" owner="false">
</Relation>
<Relation field="Details" name="ImportDetail" reverse="Project" type="ONE_TO_MULTI" owner="true">
</Relation>

@ -80,6 +80,61 @@ public class ApsEnumUtil {
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MATERIAL_REPORT_TYPE {
PRODUCE("PRODUCE", "生产"),
PURCHASE("PURCHASE", "采购"),
INVENTORY("INVENTORY", "库存");
private String value;
private String description;
MATERIAL_REPORT_TYPE(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum REPORT_TIME_SPAN {
ONE_HOUR("ONE_HOUR", "1小时"),
EIGHT_HOUR("EIGHT_HOUR", "8小时"),
TWELVE_HOUR("TWELVE_HOUR", "12小时"),
ONE_DAY("ONE_DAY", "一天"),
ONE_WEEK("ONE_WEEK", "一周"),
ONE_MONTH("ONE_MONTH", "一月");
private String value;
private String description;
REPORT_TIME_SPAN(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ -618,7 +673,6 @@ public class ApsEnumUtil {
MIN_OPERATION_REMAIN_TIME("MIN_OPERATION_REMAIN_TIME", "最小工序宽裕时间"),
WORK_LET("WORK_LET", "工作最晚结束时刻"),
WORK_EST("WORK_EST", "工作最早开始时刻"),
INVENTORY_RELA("INVENTORY_RELA", "订单物品库存量相对值"),
FIRST_WORK_BEGIN("FIRST_WORK_BEGIN", "订单首工作上次开始时刻"),
HAVE_HIGH_WORK("HAVE_HIGH_WORK", "订单中含有高级别工作"),
WORK_RESOURCE_SIZE("WORK_RESOURCE_SIZE", "工作的可用资源数"),

@ -55,7 +55,7 @@ public class IfDismantleRecord extends BaseBean {
@Column(name = "QTY")
@ApiParam("产品数量")
private Integer qty;
private Double qty;
@Column(name = "DISMANTLE_QTY")
@ApiParam("拆解数")

@ -50,7 +50,7 @@ public class IfPackageDetail extends BaseBean {
@Column(name = "QTY")
@ApiParam("数量")
private Integer qty;
private Double qty;
@Column(name = "PACKAGE_NO2")
@ApiParam("包装编号2")

@ -11,7 +11,6 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
/**
* @Description:
@ -43,7 +42,7 @@ public class IfProductOffLine extends BaseBean {
@Column(name = "QTY")
@ApiParam("数量")
private BigDecimal qty;
private Double qty;
@Column(name = "UNIT")
@ApiParam("单位")

@ -43,10 +43,16 @@ public class MesDefect extends BaseBean {
private String defectType;
@Transient
@ApiParam("缺陷类型名称")
private String defectTypeName;
@Transient
@ApiParam("缺陷位置")
private String defectLocation;
@Transient
@ApiParam("缺陷类型子集")
private List<MesDefect> mesDefectList;
}

@ -56,7 +56,7 @@ public class MesDismantleRecord extends BaseBean {
@Column(name = "QTY")
@ApiParam("产品数量")
private Integer qty;
private Double qty;
@Column(name = "DISMANTLE_QTY")
@ApiParam("拆解数")

@ -34,4 +34,12 @@ public class MesShiftGroup extends BaseBean {
@Column(name = "GROUP_NAME")
@ApiParam("班组名称")
private String groupName;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("产线")
private String workCenterCode;
@Column(name = "SQUAD_LEADER")
@ApiParam("班长")
private String squadLeader;
}

@ -0,0 +1,46 @@
package cn.estsh.i3plus.pojo.mes.pcn.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:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\11\22 16:56
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_TYPE_CFG")
@Api("类型信息表")
public class MesTypeCfg extends BaseBean {
@Column(name = "TYPE_CODE")
@ApiParam("类型代码")
private String typeCode;
@Column(name = "TYPE_NAME")
@ApiParam("类型名称")
private String typeName;
@Column(name = "BUSINESS_TYPE_CODE")
@ApiParam("业务类型代码")
private String businessTypeCode;
@Column(name = "BUSINESS_TYPE_NAME")
@ApiParam("业务类型名称")
private String businessTypeName;
}

@ -26,6 +26,10 @@ public class MesDefectModel {
private String defectType;
@Transient
@ApiParam("缺陷类型名称")
private String defectTypeName;
@Transient
@ApiParam("缺陷分类子集")
private List<MesDefect> mesDefectList;
}

@ -55,7 +55,7 @@ public class IfDismantleRecord extends BaseBean {
@Column(name = "QTY")
@ApiParam("产品数量")
private Integer qty;
private Double qty;
@Column(name = "DISMANTLE_QTY")
@ApiParam("拆解数")

@ -50,7 +50,7 @@ public class IfPackageDetail extends BaseBean {
@Column(name = "QTY")
@ApiParam("数量")
private Integer qty;
private Double qty;
@Column(name = "PACKAGE_NO2")
@ApiParam("包装编号2")

@ -11,7 +11,6 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
/**
* @Description:
@ -43,7 +42,7 @@ public class IfProductOffLine extends BaseBean {
@Column(name = "QTY")
@ApiParam("数量")
private BigDecimal qty;
private Double qty;
@Column(name = "UNIT")
@ApiParam("单位")

@ -34,4 +34,12 @@ public class MesShiftGroup extends BaseBean {
@Column(name = "GROUP_NAME")
@ApiParam("班组名称")
private String groupName;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("产线")
private String workCenterCode;
@Column(name = "SQUAD_LEADER")
@ApiParam("班长")
private String squadLeader;
}

@ -73,26 +73,21 @@ public class CoreHqlPack {
/**
*
* @param localeResource
* @param resource
* @return
*/
public static String packHqlSysLocaleResource(SysLocaleResource localeResource){
StringBuffer result = new StringBuffer();
//查询日期
// HqlPack.timeBuilder(sysLocaleResource.getCreateDateTimeStart(),sysLocaleResource.getCreateDateTimeEnd(),
// "createDateTime", result, false);
//数字类型封装
HqlPack.getNumEqualPack(localeResource.getResourceType(),"resourceType",result);
//字符串类型封装
HqlPack.getStringEqualPack(localeResource.getLanguageCode(),"languageCode",result);
//字符串类型封装
HqlPack.getStringLikerPack(localeResource.getResourceKey(),"resourceKey",result);
public static DdlPackBean packHqlSysLocaleResource(SysLocaleResource resource){
DdlPackBean result = DdlPackBean.getDdlPackBean();
// 添加默认排序
HqlPack.getOrderDefault(localeResource);
if(resource != null){
DdlPreparedPack.getNumEqualPack(resource.getResourceType(),"resourceType",result);
DdlPreparedPack.getNumEqualPack(resource.getIsSystem(),"isSystem",result);
DdlPreparedPack.getStringEqualPack(resource.getLanguageCode(),"languageCode",result);
DdlPreparedPack.getStringEqualPack(resource.getResourceKey(),"resourceKey",result);
DdlPreparedPack.getStringLikerPack(resource.getResourceValue(),"resourceValue",result);
}
return result.toString();
return result;
}
/**
@ -265,6 +260,14 @@ public class CoreHqlPack {
DdlPreparedPack.getStringLikerPack(menu.getMenuCode(),"menuCode",result);
result.setOrderByStr(menu.orderBy());
}else {
menu = new SysMenu();
}
if(!StringUtils.isNotBlank(menu.getOrderByParam())){
menu.setOrderByParam("menuSort");
menu.setAscOrDesc(CommonEnumUtil.ASC_OR_DESC.DESC.getValue());
result.setOrderByStr(menu.orderBy());
}
return result;

Loading…
Cancel
Save