Commit 7fb9eb76 by liuyang

生产计划附件优化

parent 46c4433b
...@@ -87,6 +87,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -87,6 +87,7 @@ public class HPSC003 extends DaoEPBase {
private String updatedTime ; /* 更新时间*/ private String updatedTime ; /* 更新时间*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private String remark = " "; /* 备注*/ private String remark = " "; /* 备注*/
private Long matId = null; /* 物料ID*/
private String schedule = ""; private String schedule = "";
...@@ -207,6 +208,10 @@ public class HPSC003 extends DaoEPBase { ...@@ -207,6 +208,10 @@ public class HPSC003 extends DaoEPBase {
eiColumn.setDescName("厚"); eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("matId");
eiColumn.setDescName("物料ID");
eiMetadata.addMeta(eiColumn);
} }
...@@ -317,7 +322,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -317,7 +322,7 @@ public class HPSC003 extends DaoEPBase {
/** /**
* set the prdtCode - 部件编码. * set the prdtCode - 部件编码.
* *
* @param prdtCode - 部件编码 * @param prdtType - 部件编码
*/ */
public void setPrdtType(Integer prdtType) { public void setPrdtType(Integer prdtType) {
this.prdtType = prdtType; this.prdtType = prdtType;
...@@ -561,6 +566,15 @@ public class HPSC003 extends DaoEPBase { ...@@ -561,6 +566,15 @@ public class HPSC003 extends DaoEPBase {
public void setThick(BigDecimal thick) { public void setThick(BigDecimal thick) {
this.thick = thick; this.thick = thick;
} }
public Long getMatId() {
return matId;
}
public void setMatId(Long matId) {
this.matId = matId;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -592,6 +606,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -592,6 +606,7 @@ public class HPSC003 extends DaoEPBase {
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get("length")), length)); setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get("length")), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get("width")), width)); setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get("width")), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get("thick")), thick)); setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get("thick")), thick));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get("matId")), matId));
} }
...@@ -625,6 +640,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -625,6 +640,7 @@ public class HPSC003 extends DaoEPBase {
map.put("length", StringUtils.toString(length, eiMetadata.getMeta("length"))); map.put("length", StringUtils.toString(length, eiMetadata.getMeta("length")));
map.put("width", StringUtils.toString(width, eiMetadata.getMeta("width"))); map.put("width", StringUtils.toString(width, eiMetadata.getMeta("width")));
map.put("thick", StringUtils.toString(thick, eiMetadata.getMeta("thick"))); map.put("thick", StringUtils.toString(thick, eiMetadata.getMeta("thick")));
map.put("matId", StringUtils.toString(matId, eiMetadata.getMeta("matId")));
return map; return map;
} }
......
...@@ -376,6 +376,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -376,6 +376,7 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC003.setRemark(THPSC002.getRemark()); HPSC003.setRemark(THPSC002.getRemark());
HPSC003.setPlanCompletionDate(""); HPSC003.setPlanCompletionDate("");
HPSC003.setStatus(0); HPSC003.setStatus(0);
HPSC003.setMatId(THPSC002.getId());
DaoUtils.insert("HPSC003.insert", HPSC003.toMap()); DaoUtils.insert("HPSC003.insert", HPSC003.toMap());
//生产计划详情 //生产计划详情
......
...@@ -75,6 +75,9 @@ ...@@ -75,6 +75,9 @@
<isNotEmpty prepend=" AND " property="remark"> <isNotEmpty prepend=" AND " property="remark">
REMARK = #remark# REMARK = #remark#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
MAT_ID = #matId#
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
...@@ -102,6 +105,7 @@ ...@@ -102,6 +105,7 @@
LENGTH as "length", <!-- 长 --> LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 --> WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 --> THICK as "thick", <!-- 厚 -->
MAT_ID AS "matId",
CONCAT(( CONCAT((
SELECT SELECT
format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2) format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2)
...@@ -111,7 +115,7 @@ ...@@ -111,7 +115,7 @@
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO
),'%') AS "schedule" ),'%') AS "schedule"
FROM hpjx.T_HPSC003 WHERE 1=1 FROM hpjx.T_HPSC003 WHERE 1=1
<include refid="condition" /> <include refid="condition"/>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -198,11 +202,13 @@ ...@@ -198,11 +202,13 @@
UPDATED_BY, <!-- 更新人 --> UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 --> UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
REMARK <!-- 备注 --> REMARK, <!-- 备注 -->
MAT_ID
) )
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #planInfoNo#,#inventRecordId#, VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #planInfoNo#,#inventRecordId#,
#spec#, #length#, #width#, #thick#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #status#, #createdBy#, #spec#, #length#, #width#, #thick#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #status#,
#createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#) #createdBy#,
#createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#,#matId#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
...@@ -19,6 +19,10 @@ $(function () { ...@@ -19,6 +19,10 @@ $(function () {
console.log(item) console.log(item)
let auditStatus = item.status; let auditStatus = item.status;
let template = ''; let template = '';
if (item.matId != null){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.matId + ')" >附件清单</a>';
}
if (auditStatus == 0) { if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' + template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',1)" >提交</a>'; 'onclick="check(' + item.id + ',1)" >提交</a>';
......
...@@ -44,9 +44,9 @@ ...@@ -44,9 +44,9 @@
<EF:EFComboColumn ename="prdtType" cname="部件类型" width="90" align="center" enable="false"> <EF:EFComboColumn ename="prdtType" cname="部件类型" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" /> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="部件编码" readonly="true"/> <EF:EFColumn enable="false" ename="prdtCode" cname="部件编码" readonly="true" hidden = "true"/>
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称" readonly="true"/> <EF:EFColumn enable="false" ename="prdtName" cname="部件名称" readonly="true"/>
<EF:EFColumn hidden="true" enable="false" ename="spec" cname="规格" readonly="true"/> <EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/> <EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150" <EF:EFColumn ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150"
required='true'/> required='true'/>
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<EF:EFComboColumn ename="prdtType" cname="零件类型" width="90" align="center" readonly="true"> <EF:EFComboColumn ename="prdtType" cname="零件类型" width="90" align="center" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" /> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="零件编码"/> <EF:EFColumn enable="false" ename="prdtCode" cname="零件编码" hidden = "true"/>
<EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="零件名称"/> <EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="零件名称"/>
<EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/> <EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/> <EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
......
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