Commit 831d36f9 by liuyang

2024-03-29 用工记录工时类型调整改为2位小数

parent b7b0df2a
...@@ -5,6 +5,7 @@ import com.baosight.iplat4j.core.ei.EiColumn; ...@@ -5,6 +5,7 @@ import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils; import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils; import com.baosight.iplat4j.core.util.StringUtils;
import java.math.BigDecimal;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
...@@ -86,7 +87,7 @@ public class HPPZ014 extends DaoEPBase { ...@@ -86,7 +87,7 @@ public class HPPZ014 extends DaoEPBase {
private String userId = " "; /* 用户ID*/ private String userId = " "; /* 用户ID*/
private String userName = " "; /* 用户名称*/ private String userName = " "; /* 用户名称*/
private String regDate; /* 登记日期*/ private String regDate; /* 登记日期*/
private Long manHour; private BigDecimal manHour = new BigDecimal(0.00);
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -169,7 +170,8 @@ public class HPPZ014 extends DaoEPBase { ...@@ -169,7 +170,8 @@ public class HPPZ014 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_MAN_HOUR); eiColumn = new EiColumn(FIELD_MAN_HOUR);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setFieldLength(20); eiColumn.setScaleLength(2);
eiColumn.setFieldLength(16);
eiColumn.setDescName("工时"); eiColumn.setDescName("工时");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -472,11 +474,11 @@ public class HPPZ014 extends DaoEPBase { ...@@ -472,11 +474,11 @@ public class HPPZ014 extends DaoEPBase {
this.regDate = regDate; this.regDate = regDate;
} }
public Long getManHour() { public BigDecimal getManHour() {
return manHour; return manHour;
} }
public void setManHour(Long manHour) { public void setManHour(BigDecimal manHour) {
this.manHour = manHour; this.manHour = manHour;
} }
...@@ -506,7 +508,7 @@ public class HPPZ014 extends DaoEPBase { ...@@ -506,7 +508,7 @@ public class HPPZ014 extends DaoEPBase {
setUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_USER_ID)), userId)); setUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_USER_ID)), userId));
setUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_USER_NAME)), userName)); setUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_USER_NAME)), userName));
setRegDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REG_DATE)), regDate)); setRegDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REG_DATE)), regDate));
setManHour(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAN_HOUR)), manHour)); setManHour(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_MAN_HOUR)), manHour));
} }
/** /**
......
...@@ -59,7 +59,9 @@ ...@@ -59,7 +59,9 @@
<EF:EFCodeOption codeName="xservices.xs.sex"/> <EF:EFCodeOption codeName="xservices.xs.sex"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="mobile" cname="联系方式" enable="false" width="120" align="center"/> <EF:EFColumn ename="mobile" cname="联系方式" enable="false" width="120" align="center"/>
<EF:EFColumn ename="manHour" cname="工时(小时)" enable="true" width="120" align="center"/> <EF:EFColumn ename="manHour" format="{0:N2}" cname="工时(小时)" maxLength="15" displayType="0.00"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,2})?$/" width="120"
data-errorprompt="请输入数字,该值最大可设置16位整数和2位小数!"/>
<EF:EFColumn cname="创建人" ename="createdName" enable="false" align="center"/> <EF:EFColumn cname="创建人" ename="createdName" enable="false" align="center"/>
<EF:EFColumn cname="创建时间" ename="createdTime" enable="false" width="140" align="center" <EF:EFColumn cname="创建时间" ename="createdTime" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment