Commit 5c38830e by liuyang

Merge branch 'dev' of http://git.pseer.com/platform/hp-smart into dev-ly

parents e8831ee6 edba8447
...@@ -665,7 +665,7 @@ public class ServiceHPBI002 extends ServiceBase { ...@@ -665,7 +665,7 @@ public class ServiceHPBI002 extends ServiceBase {
Map result1 = (Map) result.get("a02eed6a3e3f4dd39dbd0851e6a7572a"); Map result1 = (Map) result.get("a02eed6a3e3f4dd39dbd0851e6a7572a");
List<Map> list1 = (List) result1.get("data"); List<Map> list1 = (List) result1.get("data");
JSONArray tempArr = new JSONArray(); JSONArray tempArr = new JSONArray();
String json = "项目名称,计划完成时间,计划产量,实际产量,进度"; String json = "项目名称,计划完成时间,计划产量,实际产量,生产进度,发货进度";
List tempContentList = Arrays.asList(json.split(",")); List tempContentList = Arrays.asList(json.split(","));
tempArr.add(tempContentList); tempArr.add(tempContentList);
JSONObject item = new JSONObject(); JSONObject item = new JSONObject();
...@@ -676,7 +676,8 @@ public class ServiceHPBI002 extends ServiceBase { ...@@ -676,7 +676,8 @@ public class ServiceHPBI002 extends ServiceBase {
datalist.add(obj.get("计划完成时间")); datalist.add(obj.get("计划完成时间"));
datalist.add(obj.get("计划产量")); datalist.add(obj.get("计划产量"));
datalist.add(obj.get("实际产量")); datalist.add(obj.get("实际产量"));
datalist.add(obj.get("进度")); datalist.add(obj.get("生产进度"));
datalist.add(obj.get("发货进度"));
tempArr.add(datalist); tempArr.add(datalist);
}); });
JSONArray ids = new JSONArray(); JSONArray ids = new JSONArray();
......
...@@ -658,35 +658,31 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -658,35 +658,31 @@ public class ServiceHPSC002 extends ServiceBase {
inInfo.set("root",root); inInfo.set("root",root);
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "物料清单",operType = "查询",operDesc = "树查询服务")
//树查询服务 /**
public EiInfo queryTreeNode(EiInfo inInfo) { * 查询树
//1 获取参数 *
String pEname = inInfo.getCellStr(EiConstant.queryBlock, 0, "node"); * @param inInfo
if(StringUtils.equals("$",pEname)){ * @return
pEname = "root"; */
} @OperationLogAnnotation(operModul = "物料清单", operType = "查询", operDesc = "树查询服务")
String proj = inInfo.get(CommonConstant.Field.PROJ_ID).toString(); public EiInfo queryTreeNode(EiInfo inInfo) {
Long projId = NumberUtils.toLong(proj.split("&")[0]); Map queryRow = EiInfoUtils.getFirstRow(inInfo);
Map queryMap = new HashMap(); String node = MapUtils.getString(queryRow, "node");
queryMap.put("pEname", pEname); Map map = new HashMap();
if (projId != null) { map.put("id", queryRow.get(CommonConstant.Field.PROJ_ID));
Map map = new HashMap(); List<HPSC001> dbSc001s = dao.query("HPSC001.queryDomainById", map);
map.put("id", projId); // 查询节点
List list = dao.query("HPSC001.queryDomainById", map); Map queryMap = new HashMap();
if (list.size() > 0) { queryMap.put("projCode", CollectionUtils.isEmpty(dbSc001s) ? "null" : dbSc001s.get(0).getProjCode());
String projCode = ((HPSC001)list.get(0)).getProjCode(); queryMap.put("pEname", "$".equals(node) ? "root" : node);
queryMap.put("projCode", projCode); List rows = dao.query("HPSC002.queryTree", queryMap);
} // 增加节点block块
} EiInfo outInfo = new EiInfo();
//2 查询节点 EiBlock outBlock = outInfo.addBlock(node);
List rows = dao.query("HPSC002.queryTree", queryMap); outBlock.addRows(rows);
//3 增加节点block块 return outInfo;
EiInfo outInfo = new EiInfo(); }
EiBlock outBlock = outInfo.addBlock(BeanUtil.isEmpty(pEname) ? "" : pEname);
outBlock.addRows(rows);
return outInfo;
}
/** /**
* 修改节点状态,是叶子或非叶子节点 * 修改节点状态,是叶子或非叶子节点
...@@ -864,7 +860,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -864,7 +860,7 @@ public class ServiceHPSC002 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/** /**
* 部件类型下拉框 * 部件类型下拉框
......
...@@ -20,6 +20,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase; ...@@ -20,6 +20,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -184,4 +185,21 @@ public class ServiceHPSC008 extends ServiceEPBase { ...@@ -184,4 +185,21 @@ public class ServiceHPSC008 extends ServiceEPBase {
}}); }});
return inInfo; return inInfo;
} }
public EiInfo queryMaxDate(EiInfo inInfo) {
String companyCode = UserSessionUtils.getCompanyCode();
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
List<Map> result = this.dao.query("HPSC008.queryMaxDate", sqlMap);
String registerDate = (String) result.get(0).get("registerDate");
registerDate = registerDate.substring(0,4)+"-"+registerDate.substring(4,6)+"-"+registerDate.substring(6,8);
inInfo.set("registerDate",registerDate);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
return inInfo;
}
} }
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
$order$ $order$
</isNotEmpty> </isNotEmpty>
<isEmpty property="order"> <isEmpty property="order">
A.ID DESC A.ID ASC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</sql> </sql>
...@@ -335,7 +335,7 @@ ...@@ -335,7 +335,7 @@
<isNotEmpty prepend=" AND " property="projCode"> <isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode# PROJ_CODE = #projCode#
</isNotEmpty> </isNotEmpty>
ORDER BY CREATED_TIME DESC ORDER BY ID ASC
</select> </select>
......
...@@ -450,7 +450,18 @@ ...@@ -450,7 +450,18 @@
CREATED_TIME desc CREATED_TIME desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</select> </select>
<select id="queryMaxDate" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
MAX(REGISTER_DATE) as "registerDate" <!-- 最新登记日期 -->
FROM ${hpjxSchema}.T_HPXS001
WHERE 1=1 AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<!-- <isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>-->
</select>
</sqlMap> </sqlMap>
...@@ -943,6 +943,9 @@ public class HPSCTools { ...@@ -943,6 +943,9 @@ public class HPSCTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("id", id); queryMap.put("id", id);
List<HPSC006> results = DaoBase.getInstance().query(HPSC006.QUERY, queryMap); List<HPSC006> results = DaoBase.getInstance().query(HPSC006.QUERY, queryMap);
if(results!=null&&results.size()==0){
results = null;
}
AssertUtils.isNull(results, String.format("生产下料ID[%s]信息不存在", id)); AssertUtils.isNull(results, String.format("生产下料ID[%s]信息不存在", id));
return results.get(0); return results.get(0);
} }
......
...@@ -4,29 +4,27 @@ ...@@ -4,29 +4,27 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %> <%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="物料清单"> <EF:EFPage title="物料清单">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <EF:EFInput ename="inqu_status-0-projId" type="hidden"/>
<%--<EF:EFSelect ename="inqu_status-0-prdtType" cname="部件类型" colWidth="3" filter="contains" <div class="row">
template="#=textField#" valueTemplate="#=textField#"> <%--<EF:EFSelect ename="inqu_status-0-prdtType" cname="部件类型" colWidth="3" filter="contains"
<EF:EFOption label="全部" value=""/> template="#=textField#" valueTemplate="#=textField#">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/> <EF:EFOption label="全部" value=""/>
</EF:EFSelect>--%> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
<EF:EFSelect cname="部件名称" ename="inqu_status-0-prdtCode" colWidth="3" filter="contains" defultValue=""> </EF:EFSelect>--%>
<EF:EFOption label="全部" value=""/> <EF:EFSelect cname="部件名称" ename="inqu_status-0-prdtCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOption label="全部" value=""/>
</EF:EFSelect> <EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
<EF:EFSelect cname="状态" optionLabel="全部" ename="inqu_status-0-status" colWidth="3"> </EF:EFSelect>
<EF:EFOption label="未提交" value="0"/> <EF:EFSelect cname="状态" optionLabel="全部" ename="inqu_status-0-status" colWidth="3">
<EF:EFOption label="已提交" value="1"/> <EF:EFOption label="未提交" value="0"/>
</EF:EFSelect> <EF:EFOption label="已提交" value="1"/>
<EF:EFInput ename="inqu_status-0-projId" hidden="true"/> </EF:EFSelect>
</div> </div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion> </EF:EFRegion>
<div id="splitter" class="i-fit-height" style="display: inline"> <div id="splitter" class="i-fit-height" style="display: inline">
<div id="left-pane" class="i-fit-height" style="width: 20%;float:left;"> <div id="left-pane" class="i-fit-height" style="width: 20%;float:left;">
<EF:EFRegion id="projTree" title="BOM结构图" fitHeight="true"> <EF:EFRegion id="projTree" title="BOM结构图" fitHeight="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