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,49 +75,53 @@ ...@@ -75,49 +75,53 @@
<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"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC003"> resultClass="com.baosight.hpjx.hp.sc.domain.HPSC003">
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
PROJ_TYPE as "projType", <!-- 项目类型 --> PROJ_TYPE as "projType", <!-- 项目类型 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PLAN_INFO_NO as "planInfoNo", <!-- 生产计划单号 --> PLAN_INFO_NO as "planInfoNo", <!-- 生产计划单号 -->
INVENT_RECORD_ID as "inventRecordId", INVENT_RECORD_ID as "inventRecordId",
PRDT_TYPE as "prdtType", PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 --> PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 --> PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 -->
STATUS as "status", <!-- 状态 0-计划中,1-生产中 --> STATUS as "status", <!-- 状态 0-计划中,1-生产中 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
REMARK as "remark", <!-- 备注 --> REMARK as "remark", <!-- 备注 -->
SPEC as "spec", SPEC as "spec",
LENGTH as "length", <!-- 长 --> LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 --> WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 --> THICK as "thick", <!-- 厚 -->
CONCAT(( MAT_ID AS "matId",
SELECT CONCAT((
format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2) SELECT
FROM format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2)
hpjx.T_HPSC004 FROM
WHERE hpjx.T_HPSC004
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO WHERE
),'%') AS "schedule" PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO
),'%') 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$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc ID asc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -178,31 +182,33 @@ ...@@ -178,31 +182,33 @@
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.T_HPSC003 (ID, INSERT INTO hpjx.T_HPSC003 (ID,
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
PROJ_TYPE, <!-- 项目类型 --> PROJ_TYPE, <!-- 项目类型 -->
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 --> PROJ_NAME, <!-- 项目名称 -->
PLAN_INFO_NO, <!-- 生产计划单号 --> PLAN_INFO_NO, <!-- 生产计划单号 -->
INVENT_RECORD_ID, INVENT_RECORD_ID,
SPEC, SPEC,
LENGTH, <!-- 长 --> LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 --> WIDTH, <!-- 宽 -->
THICK, <!-- 厚 --> THICK, <!-- 厚 -->
PRDT_TYPE, PRDT_TYPE,
PRDT_CODE, <!-- 产品编码 --> PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 --> PRDT_NAME, <!-- 产品名称 -->
PLAN_COMPLETION_DATE, <!-- 计划完成日期 --> PLAN_COMPLETION_DATE, <!-- 计划完成日期 -->
STATUS, <!-- 状态 0-计划中,1-生产中 --> STATUS, <!-- 状态 0-计划中,1-生产中 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 --> UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 --> UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
REMARK <!-- 备注 --> REMARK, <!-- 备注 -->
) MAT_ID
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #planInfoNo#,#inventRecordId#, )
#spec#, #length#, #width#, #thick#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #status#, #createdBy#, VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #planInfoNo#,#inventRecordId#,
#createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#) #spec#, #length#, #width#, #thick#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #status#,
#createdBy#,
#createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#,#matId#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -213,28 +219,28 @@ ...@@ -213,28 +219,28 @@
<update id="update"> <update id="update">
UPDATE hpjx.T_HPSC003 UPDATE hpjx.T_HPSC003
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 --> COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
PROJ_TYPE = #projType#, <!-- 项目类型 --> PROJ_TYPE = #projType#, <!-- 项目类型 -->
PROJ_CODE = #projCode#, <!-- 项目编码 --> PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目编码 --> PROJ_NAME = #projName#, <!-- 项目编码 -->
PLAN_INFO_NO = #planInfoNo#, <!-- 生产计划单号 --> PLAN_INFO_NO = #planInfoNo#, <!-- 生产计划单号 -->
PRDT_TYPE = #prdtType#, PRDT_TYPE = #prdtType#,
SPEC = #spec#, <!-- 规格 --> SPEC = #spec#, <!-- 规格 -->
LENGTH = #length#, <!-- 长 --> LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 --> WIDTH = #width#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 --> THICK = #thick#, <!-- 厚 -->
PRDT_CODE = #prdtCode#, <!-- 产品编码 --> PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 --> PRDT_NAME = #prdtName#, <!-- 产品名称 -->
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 --> PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 -->
STATUS = #status#, <!-- 状态 0-计划中,1-生产中 --> STATUS = #status#, <!-- 状态 0-计划中,1-生产中 -->
CREATED_BY = #createdBy#, <!-- 创建人 --> CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 --> CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 --> UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DEP_CODE = #depCode#, <!-- 部门编码 --> DEP_CODE = #depCode#, <!-- 部门编码 -->
REMARK = #remark# <!-- 备注 --> REMARK = #remark# <!-- 备注 -->
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
<!-- 部件下拉框 --> <!-- 部件下拉框 -->
......
...@@ -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>';
...@@ -283,4 +287,4 @@ function check_time(model,rows){ ...@@ -283,4 +287,4 @@ function check_time(model,rows){
} }
} }
return true; return true;
} }
\ No newline at end of file
...@@ -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