Commit 482118fc by 宋祥

1.fixBug:修复生产计划页面查询参数不生效问题

parent c308a9ea
...@@ -25,6 +25,8 @@ import com.baosight.iplat4j.core.service.soa.XLocalManager; ...@@ -25,6 +25,8 @@ import com.baosight.iplat4j.core.service.soa.XLocalManager;
import com.baosight.iplat4j.core.web.threadlocal.UserSession; import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
...@@ -59,11 +61,16 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -59,11 +61,16 @@ public class ServiceHPSC003 extends ServiceBase {
*/ */
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
EiInfo outInfo = super.query(inInfo, "HPSC003.query", new HPSC003()); try {
EiBlock blcok = outInfo.addBlock(HPConstants.BLOCK_DETAIL); Map queryRow = EiInfoUtils.getFirstRow(inInfo);
blcok.setBlockMeta(new HPSC004().eiMetadata); queryRow.put("planCompletionDate", DateUtils.formatShort(MapUtils.getString(queryRow,
return outInfo; "planCompletionDate")));
inInfo = super.query(inInfo, HPSC003.QUERY, new HPSC003());
inInfo.addBlock(HPConstants.BLOCK_DETAIL).addBlockMeta(new HPSC004().eiMetadata);
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
} }
/** /**
...@@ -151,9 +158,9 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -151,9 +158,9 @@ public class ServiceHPSC003 extends ServiceBase {
// 刷新明细数据 // 刷新明细数据
inInfo.getBlock(CommonConstant.Field.DETAIL).setRows(dbSc004s); inInfo.getBlock(CommonConstant.Field.DETAIL).setRows(dbSc004s);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败"); LogUtils.setDetailMsg(inInfo, e, "修改失败");
} }
return inInfo; return inInfo;
} }
......
...@@ -66,8 +66,7 @@ ...@@ -66,8 +66,7 @@
UPDATED_TIME = #updatedTime# <!-- 修改时间 --> UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
</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", <!-- 企业编码 预留 -->
......
...@@ -6,23 +6,21 @@ ...@@ -6,23 +6,21 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="生产计划"> <EF:EFPage title="生产计划">
<EF:EFRegion id="inqu" title="查询条件" align-item="center"> <EF:EFRegion id="inqu" title="查询条件" align-item="center">
<div class="row" > <div class="row">
<EF:EFInput blockId="inqu_status" ename="projCode" colWidth="3" cname="项目编号:" /> <EF:EFInput cname="项目编号" blockId="inqu_status" ename="projCode" row="0" colWidth="3"/>
<EF:EFInput blockId="inqu_status" ename="projName" colWidth="3" cname="项目名称:" /> <EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3"/>
<EF:EFSelect ename="inqu_status-0-prdtCode" cname="部件名称" filter="contains" required="false" colWidth="3" <EF:EFInput cname="部件名称" blockId="inqu_status" ename="prdtName" row="0" colWidth="3"/>
template="#=textField#" valueTemplate="#=valueField#" defaultValue="请选择"> <EF:EFInput cname="生产计划单号" blockId="inqu_status" ename="planInfoNo" row="0" colWidth="3"/>
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" ename="planInfoNo" colWidth="3" cname="生产计划单号:" />
<EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" colWidth="3" cname="计划完成日期:"
format="yyyy-MM-dd"/>
<EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" colWidth="3" ename="status" >
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="已提交" value="1"/>
</EF:EFSelect>
</div> </div>
<div class="row">
<EF:EFDatePicker cname="计划完成日期" blockId="inqu_status" ename="planCompletionDate" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect cname="状态" blockId="inqu_status" ename="status" row="0" colWidth="3" optionLabel="全部">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="已提交" value="1"/>
</EF:EFSelect>
</div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="基本信息"> <EF:EFRegion id="result" title="基本信息">
......
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