Commit 17dc06ec by liulei

生产订单任务详情

parent c4ca7466
......@@ -5,6 +5,7 @@ import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.hpjx.hp.sc.domain.HPSC005C;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
......@@ -38,10 +39,10 @@ public class ServiceHPSC005C extends ServiceBase {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String prodOrderNo = MapUtils.getString(queryMap, "prodOrderNo");
HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo);
HPSC005C dbSc005 = HPSCTools.HpSc005.getDetails(prodOrderNo);
inInfo.addBlock("detail").addRow(dbSc005);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005A().eiMetadata);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUB_INVENT_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005C().eiMetadata);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPSC005C">
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PROD_ORDER_NO as "productionOrderNo", <!-- 生产订单号 -->
INVENT_RECORD_ID as "inventRecordId",
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 部件编码 -->
PRDT_NAME as "prdtName", <!-- 部件名称 -->
PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 -->
NUM as "num", <!-- 计划数量 -->
UNIT_WT as "unitWt", <!-- 单重 -->
TOTAL_WT as "totalWt", <!-- 计划重量 -->
STATUS as "status", <!-- 状态 0-未派工,1-已派工 -->
ORG_NO as "orgNo", <!-- 生产组编码 -->
ORG_NAME as "orgName", <!-- 生产组名称 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMARK as "remark", <!-- 备注 -->
FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
FILE_PATH2 as "filePath2", <!-- 文件地址2 -->
FILE_PATH3 as "filePath3", <!-- 文件地址3 -->
FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
PRDT_SPEC as "prdtSpec",
PART_TYPE as "partType",
PART_CODE as "partCode",
PART_NAME as "partName",
PART_SPEC as "partSpec",
REMARK1 as "remark1",
PRDT_LENGTH as "prdtLength", <!-- 长 -->
PRDT_WIDTH as "prdtWidth", <!-- 宽 -->
PRDT_THICK as "prdtThick", <!-- 厚 -->
PART_LENGTH as "partLength", <!-- 长 -->
PART_WIDTH as "partWidth", <!-- 宽 -->
PART_THICK as "partThick", <!-- 厚 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
ASSIGNED_NUM as "assignedNum", <!-- 已派工数量 -->
UNASSIGNED_NUM as "unassignedNum", <!-- 待派工数量 -->
DOCUMENT_TYPE as "documentType" <!-- 单据类型 0-非子母单;1-子母单 -->
</sql>
<sql id="column2">
A.ID as "id",
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
A.PROJ_CODE as "projCode", <!-- 项目编码 -->
A.PROJ_NAME as "projName", <!-- 项目名称 -->
A.PROD_ORDER_NO as "productionOrderNo", <!-- 生产订单号 -->
A.INVENT_RECORD_ID as "inventRecordId",
A.PRDT_TYPE as "prdtType",
A.PRDT_CODE as "prdtCode", <!-- 部件编码 -->
A.PRDT_NAME as "prdtName", <!-- 部件名称 -->
A.PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 -->
A.NUM as "num", <!-- 计划数量 -->
A.UNIT_WT as "unitWt", <!-- 单重 -->
A.TOTAL_WT as "totalWt", <!-- 计划重量 -->
A.STATUS as "status", <!-- 状态 0-未派工,1-已派工 -->
A.ORG_NO as "orgNo", <!-- 生产组编码 -->
A.ORG_NAME as "orgName", <!-- 生产组名称 -->
A.CREATED_BY as "createdBy", <!-- 创建人 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 更新人 -->
A.UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
A.DEP_CODE as "depCode", <!-- 部门编码 -->
A.REMARK as "remark", <!-- 备注 -->
A.FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
A.FILE_PATH2 as "filePath2", <!-- 文件地址2 -->
A.FILE_PATH3 as "filePath3", <!-- 文件地址3 -->
A.FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
A.FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
A.PRDT_SPEC as "prdtSpec",
A.PART_TYPE as "partType",
A.PART_CODE as "partCode",
A.PART_NAME as "partName",
A.PART_SPEC as "partSpec",
A.REMARK1 as "remark1",
A.PRDT_LENGTH as "prdtLength", <!-- 长 -->
A.PRDT_WIDTH as "prdtWidth", <!-- 宽 -->
A.PRDT_THICK as "prdtThick", <!-- 厚 -->
A.PART_LENGTH as "partLength", <!-- 长 -->
A.PART_WIDTH as "partWidth", <!-- 宽 -->
A.PART_THICK as "partThick", <!-- 厚 -->
A.FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
A.FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
A.ASSIGNED_NUM as "assignedNum", <!-- 已派工数量 -->
A.UNASSIGNED_NUM as "unassignedNum", <!-- 待派工数量 -->
A.DOCUMENT_TYPE as "documentType", <!-- 单据类型 0-非子母单;1-子母单 -->
B.COMPLETE_NUM as "completeNum", <!-- 已完成数量 -->
COALESCE(C.TOTAL_WT-C.ACTUAL_COMPLETION_NUM,0) as "unTotalWt", <!-- 剩余重量 -->
COALESCE(C.ACTUAL_COMPLETION_DATE,"") as "actualCompletionDate", <!-- 实际完工日期 -->
COALESCE(C.ACTUAL_COMPLETION_NUM,0) as "actualCompletionTotalWt"<!-- 实际完工重量 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE like CONCAT('%', #projCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME like CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNo">
A.PROD_ORDER_NO LIKE CONCAT('%', #prodOrderNo#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partName">
PART_NAME LIKE CONCAT('%', #partName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME LIKE CONCAT('%', #prdtName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planCompletionDate">
PLAN_COMPLETION_DATE = #planCompletionDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="num">
NUM = #num#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWt">
TOTAL_WT = #totalWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgNo">
ORG_NO like CONCAT('%', #orgNo#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgName">
ORG_NAME like CONCAT('%', #orgName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath1">
FILE_PATH1 = #filePath1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath2">
FILE_PATH2 = #filePath2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath3">
FILE_PATH3 = #filePath3#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath4">
FILE_PATH4 = #filePath4#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath5">
FILE_PATH5 = #filePath5#
</isNotEmpty>
</sql>
<!-- 公共修改字段 -->
<sql id="updateRevise">
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC005C">
SELECT
<include refid="column2"/>
FROM ${hpjxSchema}.T_HPSC005 A
LEFT JOIN (SELECT PROD_ORDER_NO,SUM(COMPLETE_NUM) AS COMPLETE_NUM
FROM ${hpjxSchema}.T_HPSC005A GROUP BY PROD_ORDER_NO) B ON A.PROD_ORDER_NO=B.PROD_ORDER_NO
LEFT JOIN ${hpjxSchema}.T_HPSC004 C ON A.PROD_ORDER_NO=C.PROD_ORDER_NO
WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC005 WHERE 1=1
<include refid="condition" />
</select>
</sqlMap>
......@@ -3,15 +3,7 @@ package com.baosight.hpjx.hp.sc.tools;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.hp.sc.domain.HPSC006;
import com.baosight.hpjx.hp.sc.domain.HPSC007;
import com.baosight.hpjx.hp.sc.domain.*;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.StringUtils;
......@@ -475,6 +467,21 @@ public class HPSCTools {
AssertUtils.isNull(results, String.format("生产订单[%s]信息不存在", prodOrderNo));
return results.get(0);
}
/**
* 查询
*
* @param prodOrderNo
* @return
*/
public static HPSC005C getDetails(String prodOrderNo) {
AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空");
Map queryMap = new HashMap();
queryMap.put("prodOrderNo", prodOrderNo);
List<HPSC005C> results = DaoBase.getInstance().query(HPSC005C.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产订单[%s]信息不存在", prodOrderNo));
return results.get(0);
}
}
......
......@@ -35,7 +35,21 @@ $(function () {
}
return template
}
}]
},
{
field: "prodOrderNo",
template: function (item) {
let prodOrderNo = item.prodOrderNo;
let template = '';
template += '<a style="cursor: pointer;display: inline-flex" '
+' onclick="tearDetails(\'' + prodOrderNo + '\')" >' + prodOrderNo + '</a>';
return template
}
}
]
}
});
......
......@@ -28,7 +28,7 @@
<EF:EFGrid blockId="result" autoDraw="override">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="170" locked="true" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center" onclick="tearDetails()"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="90" align="center">
<EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="部分派工" value="1"/>
......@@ -39,17 +39,17 @@
<%--<EF:EFColumn ename="prdtSpec" cname="部件规格" enable="false" width="120" align="center"/>--%>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="120" align="center"
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="assignedNum" cname="已派工数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="unassignedNum" cname="剩余数量" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="num" cname="数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="totalWt" cname="重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="assignedNum" cname="派工数量" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="unassignedNum" cname="剩余数量" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="num" cname="数量" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="totalWt" cname="重量" enable="false" width="80" align="right" format="{0:N3}"/>
<%--<EF:EFColumn ename="remark" cname="部件备注" enable="false"/>--%>
<EF:EFColumn ename="remark1" cname="零件备注" enable="false"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center" hidden="true"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="100" align="center" hidden="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
......@@ -47,7 +47,6 @@ $(function () {
}
}
$("#QUERY").on("click", query);
});
......
......@@ -15,17 +15,19 @@
</div>
<div class="row">
<EF:EFInput ename="detail-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partLength" cname="部件长" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partWidth" cname="部件宽" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-prdtLength" cname="部件长" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-prdtWidth" cname="部件宽" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-partThick" cname="部件厚" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-prdtThick" cname="部件厚" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-num" cname="部件数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-unitWt" cname="部件重量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-remark" cname="部件备注" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partType" cname="零件类型" colWidth="4" readonly="true"/>
<EF:EFSelect ename="detail-0-partType" cname="零件类型" colWidth="4" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFSelect>
<EF:EFInput ename="detail-0-partName" cname="零件名称" colWidth="4" readonly="true"/>
</div>
<div class="row">
......@@ -35,22 +37,22 @@
</div>
<div class="row">
<EF:EFInput ename="detail-0-remark1" cname="零件备注" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partType" cname="零件数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-num" cname="零件数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-unitWt" cname="零件重量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-assignedNum" cname="派工数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-totalWt" cname="派工重量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-totalWt" cname="剩余数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-unassignedNum" cname="剩余数量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-remark1" cname="剩余重量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partType" cname="完成数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-totalWt" cname="完成重量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-unTotalWt" cname="剩余重量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-completeNum" cname="完成数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-actualCompletionTotalWt" cname="完成重量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-planCompletionDate" cname="计划完成日期" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-planCompletionDate" cname="实际完成时间" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-actualCompletionDate" cname="实际完成时间" colWidth="4" readonly="true"/>
</div>
</EF:EFRegion>
</EF:EFPage>
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