Commit 9ad8048c by wancheng

a项目档案概况

parent 60991619
......@@ -442,4 +442,30 @@ public class ServiceHPMT002 extends ServiceBase {
}
}
/**
* 生产管理-滚动图片
*
* @param inInfo
* @return
*/
public Map pmStatusList(EiInfo inInfo) {
Map resultMap = new HashMap();
try {
String companyCode = inInfo.getString("companyCode");
String projStatus = inInfo.getString("projStatus");
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
sqlMap.put("projStatus", projStatus);
List<Map> rows = this.dao.query("HPMT002.pmStatusList", sqlMap);
resultMap.put("result",rows);
resultMap.put("status",EiConstant.STATUS_SUCCESS);
resultMap.put("message","SUCCESS");
return resultMap;
} catch (Exception e) {
resultMap.put("status", 500);
resultMap.put("message",LogUtils.getMsg(e));
return resultMap;
}
}
}
......@@ -360,4 +360,24 @@
COMPANY_CODE = #companyCode#
</isNotEmpty>
</select>
<select id="pmStatusList" resultClass="java.util.HashMap">
select a.*
from hpjx.t_hpsc001 a
left join
(select A.COMPANY_CODE,A.PROJ_CODE ,sum(ifnull(A.NUM,0)) as JHNUM,sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) as CKNUM,sum(ifnull(B.AMOUNT,0)) as RKNUM,
case when sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(B.AMOUNT,0)) then 1
when sum(ifnull(A.NUM,0)) = sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(B.AMOUNT,0)) then 2
when sum(ifnull(A.NUM,0)) = sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) = sum(ifnull(B.AMOUNT,0)) then 3 else 0 end as PROJ_STATUS
from hpjx.T_HPSC004 a
left join hpjx.T_HPKC004 b on a.PROJ_CODE = b.PROJ_CODE and a.PRDT_CODE = b.SUB_INVENT_CODE
group by COMPANY_CODE,PROJ_CODE) b on a.COMPANY_CODE = b.COMPANY_CODE and a.PROJ_CODE = b.PROJ_CODE
WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projStatus">
b.PROJ_STATUS = #projStatus#
</isNotEmpty>
</select>
</sqlMap>
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