Commit aebb67c0 by liuyang

2024-05-15 工序单价

parent 13a6d086
...@@ -47,6 +47,7 @@ public class HGSJ003 extends DaoEPBase { ...@@ -47,6 +47,7 @@ public class HGSJ003 extends DaoEPBase {
public static final String FIELD_WIDTH = "width"; /* 宽*/ public static final String FIELD_WIDTH = "width"; /* 宽*/
public static final String FIELD_THICK = "thick"; /* 厚*/ public static final String FIELD_THICK = "thick"; /* 厚*/
public static final String FIELD_COEFFICIENT = "coefficient"; /* 系数*/ public static final String FIELD_COEFFICIENT = "coefficient"; /* 系数*/
public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_STATUS = "status"; /* 状态 0-启用 1-停止*/ public static final String FIELD_STATUS = "status"; /* 状态 0-启用 1-停止*/
public static final String COL_ID = "ID"; /* 主键id*/ public static final String COL_ID = "ID"; /* 主键id*/
...@@ -106,6 +107,7 @@ public class HGSJ003 extends DaoEPBase { ...@@ -106,6 +107,7 @@ public class HGSJ003 extends DaoEPBase {
private BigDecimal width = new BigDecimal(0.000); /* 宽*/ private BigDecimal width = new BigDecimal(0.000); /* 宽*/
private BigDecimal thick = new BigDecimal(0.000); /* 厚*/ private BigDecimal thick = new BigDecimal(0.000); /* 厚*/
private BigDecimal coefficient = new BigDecimal(0.000); /* 系数*/ private BigDecimal coefficient = new BigDecimal(0.000); /* 系数*/
private BigDecimal price = new BigDecimal(0.000); /* 单价*/
private Integer status = 0; /* 状态 0-启用 1-停止*/ private Integer status = 0; /* 状态 0-启用 1-停止*/
/** /**
...@@ -223,6 +225,13 @@ public class HGSJ003 extends DaoEPBase { ...@@ -223,6 +225,13 @@ public class HGSJ003 extends DaoEPBase {
eiColumn.setDescName("系数"); eiColumn.setDescName("系数");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("单价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS); eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0-启用 1-停止"); eiColumn.setDescName("状态 0-启用 1-停止");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -607,6 +616,15 @@ public class HGSJ003 extends DaoEPBase { ...@@ -607,6 +616,15 @@ public class HGSJ003 extends DaoEPBase {
public void setCoefficient(BigDecimal coefficient) { public void setCoefficient(BigDecimal coefficient) {
this.coefficient = coefficient; this.coefficient = coefficient;
} }
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
/** /**
* get the status - 状态 0-启用 1-停止. * get the status - 状态 0-启用 1-停止.
* @return the status * @return the status
...@@ -655,6 +673,7 @@ public class HGSJ003 extends DaoEPBase { ...@@ -655,6 +673,7 @@ public class HGSJ003 extends DaoEPBase {
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width)); setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick)); setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick));
setCoefficient(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COEFFICIENT)), coefficient)); setCoefficient(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COEFFICIENT)), coefficient));
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status)); setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
} }
...@@ -689,6 +708,7 @@ public class HGSJ003 extends DaoEPBase { ...@@ -689,6 +708,7 @@ public class HGSJ003 extends DaoEPBase {
map.put(FIELD_WIDTH, StringUtils.toString(width, eiMetadata.getMeta(FIELD_WIDTH))); map.put(FIELD_WIDTH, StringUtils.toString(width, eiMetadata.getMeta(FIELD_WIDTH)));
map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK))); map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK)));
map.put(FIELD_COEFFICIENT, StringUtils.toString(coefficient, eiMetadata.getMeta(FIELD_COEFFICIENT))); map.put(FIELD_COEFFICIENT, StringUtils.toString(coefficient, eiMetadata.getMeta(FIELD_COEFFICIENT)));
map.put(FIELD_PRICE, StringUtils.toString(price, eiMetadata.getMeta(FIELD_PRICE)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS))); map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
return map; return map;
......
...@@ -90,10 +90,7 @@ public class ServiceHGSJ003 extends ServiceEPBase { ...@@ -90,10 +90,7 @@ public class ServiceHGSJ003 extends ServiceEPBase {
hgsj003.setSpec(StringUtils.trimToEmpty(hgsj003.getSpec())); hgsj003.setSpec(StringUtils.trimToEmpty(hgsj003.getSpec()));
this.add(hgsj003); this.add(hgsj003);
} else { } else {
// 设置规格
hgsj003.setSpec(HGSJTools.Hgsj003.jointSpec(hgsj003.getLength(), hgsj003.getWidth(), hgsj003.getThick()));
// 去除空格
hgsj003.setSpec(StringUtils.trimToEmpty(hgsj003.getSpec()));
this.modify(hgsj003); this.modify(hgsj003);
} }
} }
...@@ -118,8 +115,14 @@ public class ServiceHGSJ003 extends ServiceEPBase { ...@@ -118,8 +115,14 @@ public class ServiceHGSJ003 extends ServiceEPBase {
* 修改操作 * 修改操作
*/ */
public void modify(HGSJ003 hgsj003) { public void modify(HGSJ003 hgsj003) {
// 校验数据 String spec = HGSJTools.Hgsj003.jointSpec(hgsj003.getLength(), hgsj003.getWidth(), hgsj003.getThick());
this.checkAddData(hgsj003); if (!StringUtils.trimToEmpty(hgsj003.getSpec()).equals(StringUtils.trimToEmpty(spec))){
// 设置规格,去除空格
hgsj003.setSpec(StringUtils.trimToEmpty(spec));
// 校验数据
this.checkAddData(hgsj003);
}
DaoUtils.update(HGSJ003.UPDATE, hgsj003); DaoUtils.update(HGSJ003.UPDATE, hgsj003);
} }
......
...@@ -293,8 +293,8 @@ ...@@ -293,8 +293,8 @@
select select
a.ORG_ENAME as "orgEname", a.ORG_ENAME as "orgEname",
a.ORG_CNAME as "orgCname" a.ORG_CNAME as "orgCname"
from iplat_hggp.txsog01 a from ${platSchema}.txsog01 a
left join iplat_hggp.txsog02 b on a.ORG_ID = b.ORG_ID left join ${platSchema}.txsog02 b on a.ORG_ID = b.ORG_ID
where where
a.ACCOUNT_CODE = #accountCode# a.ACCOUNT_CODE = #accountCode#
and a.ORG_TYPE = #orgType# and a.ORG_TYPE = #orgType#
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
WIDTH as "width", <!-- 宽 --> WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 --> THICK as "thick", <!-- 厚 -->
COEFFICIENT as "coefficient", <!-- 系数 --> COEFFICIENT as "coefficient", <!-- 系数 -->
PRICE as "price",
STATUS as "status" <!-- 状态 0-启用 1-停止 --> STATUS as "status" <!-- 状态 0-启用 1-停止 -->
</sql> </sql>
...@@ -291,9 +292,10 @@ ...@@ -291,9 +292,10 @@
WIDTH, <!-- 宽 --> WIDTH, <!-- 宽 -->
THICK, <!-- 厚 --> THICK, <!-- 厚 -->
COEFFICIENT, <!-- 系数 --> COEFFICIENT, <!-- 系数 -->
PRICE,
STATUS <!-- 状态 0-启用 1-停止 --> STATUS <!-- 状态 0-启用 1-停止 -->
) )
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #flowCode#, #flowName#, #processCode#, #processName#, #unit#, #processClass#, #spec#, #length#, #width#, #thick#, #coefficient#, #status#) VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #flowCode#, #flowName#, #processCode#, #processName#, #unit#, #processClass#, #spec#, #length#, #width#, #thick#, #coefficient#, #price#, #status#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -337,6 +339,7 @@ ...@@ -337,6 +339,7 @@
WIDTH = #width#, <!-- 宽 --> WIDTH = #width#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 --> THICK = #thick#, <!-- 厚 -->
COEFFICIENT = #coefficient#, <!-- 系数 --> COEFFICIENT = #coefficient#, <!-- 系数 -->
PRICE = #price#,
STATUS = #status# <!-- 状态 0-启用 1-停止 --> STATUS = #status# <!-- 状态 0-启用 1-停止 -->
WHERE WHERE
ID = #id# ID = #id#
...@@ -362,7 +365,7 @@ ...@@ -362,7 +365,7 @@
'' as "length", '' as "length",
'' as "width", '' as "width",
'' as "thick" '' as "thick"
from hggp.hggy001 from ${hggpSchema}.hggy001
where ACCOUNT_CODE = #accountCode# where ACCOUNT_CODE = #accountCode#
<isNotEmpty prepend=" AND " property="deleteFlag"> <isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag# DELETE_FLAG = #deleteFlag#
...@@ -378,8 +381,8 @@ ...@@ -378,8 +381,8 @@
FACTORY_NAME as "factoryName", FACTORY_NAME as "factoryName",
COMPANY_CODE as "companyCode", COMPANY_CODE as "companyCode",
COMPANY_NAME as "companyName" COMPANY_NAME as "companyName"
from iplat_hggp.txsog01 A from ${platSchema}.txsog01 A
inner join iplat_hggp.txsog02 B ON A.ORG_ID = B.ORG_ID inner join ${platSchema}.txsog02 B ON A.ORG_ID = B.ORG_ID
where A.ACCOUNT_CODE = #accountCode# and A.ORG_TYPE in (#orgType#) AND B.USER_ID = #loginName# and A.IS_DELETED = '0' where A.ACCOUNT_CODE = #accountCode# and A.ORG_TYPE in (#orgType#) AND B.USER_ID = #loginName# and A.IS_DELETED = '0'
</select> </select>
......
...@@ -260,17 +260,29 @@ let save = function (btnNode) { ...@@ -260,17 +260,29 @@ let save = function (btnNode) {
let flag = true; let flag = true;
$.each(rows, function(index, item) { $.each(rows, function(index, item) {
let factoryCode= item.get("factoryCode"); let factoryCode= item.get("factoryCode");
let processCode= item.get("processCode");
let processClass= item.get("processClass"); let processClass= item.get("processClass");
let price= item.get("price");
if(isBlank(factoryCode)){ if(isBlank(factoryCode)){
message("选中的第"+(index+1)+"行\"工厂\",不能为空!"); message("选中的第"+(index+1)+"行\"工厂\",不能为空!");
flag = false; flag = false;
return false; return false;
} }
if(isBlank(processCode)){
message("选中的第"+(index+1)+"行\"工序名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(processClass)){ if(isBlank(processClass)){
message("选中的第"+(index+1)+"行\"工序分类\",不能为空!"); message("选中的第"+(index+1)+"行\"工序分类\",不能为空!");
flag = false; flag = false;
return false; return false;
} }
if(isBlank(price)){
message("选中的第"+(index+1)+"行\"单价\",不能为空!");
flag = false;
return false;
}
}); });
if(flag) { if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
......
...@@ -59,6 +59,11 @@ ...@@ -59,6 +59,11 @@
<EF:EFColumn ename="length" cname="长(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/> <EF:EFColumn ename="length" cname="长(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/> <EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/> <EF:EFColumn ename="thick" cname="厚(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="price" cname="单价" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"
/>
<EF:EFComboColumn ename="status" cname="状态" width="80" enable="true" readonly="false" align="center" required="true" defaultValue="1"> <EF:EFComboColumn ename="status" cname="状态" width="80" enable="true" readonly="false" align="center" required="true" defaultValue="1">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn> </EF:EFComboColumn>
......
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