Commit f36f40dc by liulei

APP文件上传

parent 8d26570c
......@@ -76,19 +76,14 @@ public class ServiceHPMT002 extends ServiceBase {
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
sqlMap.put("projName", projName);
List count = this.dao.query("HPMT002.pmProjectCount", sqlMap);
List<Map> count = this.dao.query("HPMT002.pmProjectCount", sqlMap);
offset=(offset-1)*pageSize;
sqlMap.put("offset", offset);
sqlMap.put("pageSize", pageSize);
List<Map> rows = this.dao.query("HPMT002.pmProject", sqlMap);
List<Map> maps = new ArrayList<>();
for (Map row : rows) {
if (!row.get("actualCompletionNum").equals(row.get("num"))){
maps.add(row);
}
}
resultMap.put("result",maps);
resultMap.put("count",count.get(0));
resultMap.put("result",rows);
resultMap.put("count",count.size());
resultMap.put("status",EiConstant.STATUS_SUCCESS);
resultMap.put("message","SUCCESS");
return resultMap;
......
......@@ -3,6 +3,7 @@
<sqlMap namespace="HPMT002">
<select id="pmProject" resultClass="java.util.HashMap">
SELECT * FROM (
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
......@@ -42,16 +43,52 @@
PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
order by STATUS,PLAN_COMPLETION_DATE
) AS A WHERE actualCompletionNum!=num
limit #offset#, #pageSize#
</select>
<select id="pmProjectCount" resultClass="int">
<select id="pmProjectCount" resultClass="java.util.HashMap">
SELECT * FROM (
SELECT
COUNT(*)
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
PROJ_TYPE as "projType", <!-- 项目类型 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PLAN_INFO_NO as "planInfoNo", <!-- 生产计划单号 -->
PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 -->
STATUS as "status", <!-- 状态 0-计划中,1-生产中 -->
CONCAT((
SELECT
format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2)
FROM
hpjx.T_HPSC004
WHERE
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO
),'%') AS "schedule", <!-- 进度 -->
(
SELECT
IFNULL( SUM( ACTUAL_COMPLETION_UNIT_WT ), 0 )
FROM
hpjx.T_HPSC004
WHERE
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO
) AS "actualCompletionNum" <!-- 完成重量 -->
,
(
SELECT
IFNULL( SUM( TOTAL_WT ),2)
FROM
hpjx.T_HPSC004
WHERE
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO
) AS "num" <!-- 计划重量 -->
FROM hpjx.T_HPSC003 WHERE COMPANY_CODE= #companyCode#
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
order by STATUS,PLAN_COMPLETION_DATE
) AS A WHERE actualCompletionNum!=num
</select>
<select id="pmQuality" resultClass="java.util.HashMap">
......
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