Commit db80b9ef by 宋祥

Merge remote-tracking branch 'origin/dev' into dev

parents c709a41b 4ee9cd8e
package com.baosight.hpjx.hp.sb.domain; package com.baosight.hpjx.hp.sb.domain;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.iplat4j.core.data.DaoEPBase; import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn; import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils; import com.baosight.iplat4j.core.util.NumberUtils;
...@@ -530,11 +531,11 @@ public class HPSB006 extends DaoEPBase { ...@@ -530,11 +531,11 @@ public class HPSB006 extends DaoEPBase {
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag)); setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode)); setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName)); setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setInspecDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INSPEC_DATE)), inspecDate)); setInspecDate(StringUtils.defaultIfEmpty(StringUtils.toString(DateUtils.formatShort(map.get(FIELD_INSPEC_DATE))), inspecDate));
setInspecCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INSPEC_CODE)), inspecCode)); setInspecCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INSPEC_CODE)), inspecCode));
setPlanCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_CODE)), planCode)); setPlanCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_CODE)), planCode));
setPlanStartDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_START_DATE)), planStartDate)); setPlanStartDate(StringUtils.defaultIfEmpty(StringUtils.toString(DateUtils.formatShort(map.get(FIELD_PLAN_START_DATE))), planStartDate));
setPlanEndDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_END_DATE)), planEndDate)); setPlanEndDate(StringUtils.defaultIfEmpty(StringUtils.toString(DateUtils.formatShort(map.get(FIELD_PLAN_END_DATE))), planEndDate));
setInspecUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INSPEC_USER_ID)), inspecUserId)); setInspecUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INSPEC_USER_ID)), inspecUserId));
setInspecUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INSPEC_USER_NAME)), inspecUserName)); setInspecUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INSPEC_USER_NAME)), inspecUserName));
setCheckStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CHECK_STATUS)), checkStatus)); setCheckStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CHECK_STATUS)), checkStatus));
......
package com.baosight.hpjx.hp.sb.domain; package com.baosight.hpjx.hp.sb.domain;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.iplat4j.core.data.DaoEPBase; import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn; import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils; import com.baosight.iplat4j.core.util.NumberUtils;
...@@ -530,11 +531,11 @@ public class HPSB007 extends DaoEPBase { ...@@ -530,11 +531,11 @@ public class HPSB007 extends DaoEPBase {
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag)); setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode)); setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName)); setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setUpkeepDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPKEEP_DATE)), upkeepDate)); setUpkeepDate(StringUtils.defaultIfEmpty(StringUtils.toString(DateUtils.formatShort(map.get(FIELD_UPKEEP_DATE))), upkeepDate));
setUpkeepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPKEEP_CODE)), upkeepCode)); setUpkeepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPKEEP_CODE)), upkeepCode));
setPlanCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_CODE)), planCode)); setPlanCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_CODE)), planCode));
setPlanStartDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_START_DATE)), planStartDate)); setPlanStartDate(StringUtils.defaultIfEmpty(StringUtils.toString(DateUtils.formatShort(map.get(FIELD_PLAN_START_DATE))), planStartDate));
setPlanEndDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_END_DATE)), planEndDate)); setPlanEndDate(StringUtils.defaultIfEmpty(StringUtils.toString(DateUtils.formatShort(map.get(FIELD_PLAN_END_DATE))), planEndDate));
setUpkeepUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPKEEP_USER_ID)), upkeepUserId)); setUpkeepUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPKEEP_USER_ID)), upkeepUserId));
setUpkeepUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPKEEP_USER_NAME)), upkeepUserName)); setUpkeepUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPKEEP_USER_NAME)), upkeepUserName));
setCheckStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CHECK_STATUS)), checkStatus)); setCheckStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CHECK_STATUS)), checkStatus));
......
...@@ -85,7 +85,7 @@ public class ServiceHPSB006 extends ServiceEPBase { ...@@ -85,7 +85,7 @@ public class ServiceHPSB006 extends ServiceEPBase {
hpsb004.setTaskStatus(0); hpsb004.setTaskStatus(0);
DaoUtils.update(HPSB004.UPDATE, hpsb004); DaoUtils.update(HPSB004.UPDATE, hpsb004);
} }
DaoUtils.update(HPSB004.DELETE_FLAG, hgsb004.toMap()); DaoUtils.update(HPSB006.DELETE_FLAG, hgsb004.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")}); inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
......
...@@ -127,7 +127,7 @@ public class ServiceHPSB007 extends ServiceEPBase { ...@@ -127,7 +127,7 @@ public class ServiceHPSB007 extends ServiceEPBase {
*/ */
public void add(HPSB007 hgsb005) { public void add(HPSB007 hgsb005) {
//生成保养单号 //生成保养单号
hgsb005.setUpkeepDate(SequenceGenerator.getNextSequence(HPConstant.SequenceId.UPKEEP_CODE)); hgsb005.setUpkeepCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.UPKEEP_CODE));
DaoUtils.insert(HPSB007.INSERT, hgsb005); DaoUtils.insert(HPSB007.INSERT, hgsb005);
} }
......
...@@ -340,15 +340,14 @@ ...@@ -340,15 +340,14 @@
<select id="queryFactoryCodeBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryFactoryCodeBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT SELECT
FACTORY_CODE as "factoryCode", ORG_ID as "factoryCode",
FACTORY_NAME as "factoryName" ORG_CNAME as "factoryName"
FROM ${platSchema}.txsog01 FROM ${platSchema}.txsog01
WHERE IS_DELETED = '0' AND FACTORY_CODE IS NOT NULL WHERE IS_DELETED = '0' AND FACTORY_CODE IS NOT NULL AND ORG_TYPE = 'factory'
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
<!--and ORG_ID IN (<include refid="queryLoginNameBase"/>)--> <!--and ORG_ID IN (<include refid="queryLoginNameBase"/>)-->
</isNotEmpty> </isNotEmpty>
group by FACTORY_CODE,FACTORY_NAME
</select> </select>
<select id="queryGroupCodeBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryGroupCodeBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
......
...@@ -228,7 +228,9 @@ ...@@ -228,7 +228,9 @@
UPKEEP_USER_NAME, <!-- 保养人名称 --> UPKEEP_USER_NAME, <!-- 保养人名称 -->
CHECK_STATUS <!-- 审核状态 0-停止 1-启用 --> CHECK_STATUS <!-- 审核状态 0-停止 1-启用 -->
) )
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #upkeepDate#, #upkeepCode#, #planCode#, #planStartDate#, #planEndDate#, #upkeepUserId#, #upkeepUserName#, #checkStatus#) VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #upkeepDate#, #upkeepCode#, #planCode#,
#planStartDate#, #planEndDate#, #upkeepUserId#, #upkeepUserName#, #checkStatus#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
...@@ -60,7 +60,8 @@ ...@@ -60,7 +60,8 @@
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="userIdBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="userIdBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="checkStatus" cname="审核状态" width="80" align="center" enable="false" readonly="false" required="true" defaultValue="1"> <EF:EFComboColumn ename="checkStatus" cname="审核状态" width="80" align="center" enable="false"
readonly="false" required="true" defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpsb.approveStatus"/> <EF:EFCodeOption codeName="hpjx.hpsb.approveStatus"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<%--<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false" <%--<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
......
...@@ -84,10 +84,17 @@ $(function () { ...@@ -84,10 +84,17 @@ $(function () {
if (e.field === "deviceType") { if (e.field === "deviceType") {
loadChange(grid,e,"deviceCode"); loadChange(grid,e,"deviceCode");
}else if (e.field === "deviceCode") { }else if (e.field === "deviceCode") {
for (let i = 0; i < deviceCodeBox.length; i++) {
if (deviceCodeBox[i]['valueField'] === e.items[0]['deviceCode']){
resultGrid.setCellValue(e.items[0],"deviceName",deviceCodeBox[i]['textField']);
resultGrid.setCellValue(e.items[0],"groupCode",deviceCodeBox[i]['param3Field']);
if (e.items[0].deviceType.length===0){ if (e.items[0].deviceType.length===0){
loadChange(grid,e,"deviceType"); resultGrid.setCellValue(e.items[0],"deviceType",deviceCodeBox[i]['param1Field']);
}
break;
}
} }
//loadChange(grid,e,"userId"); loadChange(grid,e,"checkItem");
} }
}); });
}, },
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<EF:EFPage title="设备点检详情"> <EF:EFPage title="设备点检详情">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="工厂名称" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="工厂名称" colWidth="3" filter="contains" readonly="true">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factoryCodeBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="factoryCodeBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/> <EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/> <EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="groupCode" cname="设备区域" hidden="true"/>
<EF:EFColumn ename="groupName" cname="设备区域名称" hidden="true"/>
<EF:EFComboColumn ename="deviceType" cname="设备类型" <EF:EFComboColumn ename="deviceType" cname="设备类型"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
......
...@@ -217,14 +217,14 @@ let save = function (btnNode) { ...@@ -217,14 +217,14 @@ let save = function (btnNode) {
} }
let flag = true; let flag = true;
$.each(rows, function(index, item) { $.each(rows, function(index, item) {
let companyCode= item.get("companyCode"); let factoryCode= item.get("factoryCode");
let upkeepDate= item.get("upkeepDate"); let upkeepDate= item.get("upkeepDate");
let planStartDate= item.get("planStartDate"); let planStartDate= item.get("planStartDate");
let planEndDate= item.get("planEndDate"); let planEndDate= item.get("planEndDate");
let upkeepUserId= item.get("upkeepUserId"); let upkeepUserId= item.get("upkeepUserId");
let checkStatus= item.get("checkStatus"); let checkStatus= item.get("checkStatus");
if(isBlank(companyCode)){ if(isBlank(factoryCode)){
message("选中的第"+(index+1)+"行\"公司\",不能为空!"); message("选中的第"+(index+1)+"行\"工厂\",不能为空!");
flag = false; flag = false;
return false; return false;
} }
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="userIdBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="userIdBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="checkStatus" cname="审核状态" width="80" align="center" enable="false" required="true" defaultValue="1"> <EF:EFComboColumn ename="checkStatus" cname="审核状态" width="80" align="center" enable="false" required="true" defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpsb.approveStatus"/> <EF:EFCodeOption codeName="hpjx.hpsb.approveStatus"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<%--<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false" <%--<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
......
...@@ -78,10 +78,17 @@ $(function () { ...@@ -78,10 +78,17 @@ $(function () {
if (e.field === "deviceType") { if (e.field === "deviceType") {
loadChange(grid,e,"deviceCode"); loadChange(grid,e,"deviceCode");
}else if (e.field === "deviceCode") { }else if (e.field === "deviceCode") {
for (let i = 0; i < deviceCodeBox.length; i++) {
if (deviceCodeBox[i]['valueField'] === e.items[0]['deviceCode']){
resultGrid.setCellValue(e.items[0],"deviceName",deviceCodeBox[i]['textField']);
resultGrid.setCellValue(e.items[0],"groupCode",deviceCodeBox[i]['param3Field']);
if (e.items[0].deviceType.length===0){ if (e.items[0].deviceType.length===0){
loadChange(grid,e,"deviceType"); resultGrid.setCellValue(e.items[0],"deviceType",deviceCodeBox[i]['param1Field']);
}
break;
}
} }
//loadChange(grid,e,"userId"); loadChange(grid,e,"checkItem");
} }
}); });
}, },
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<EF:EFPage title="设备保养详情"> <EF:EFPage title="设备保养详情">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="工厂名称" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="工厂名称" colWidth="3" filter="contains" readonly="true">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factoryCodeBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="factoryCodeBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/> <EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/> <EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="groupCode" cname="设备区域" hidden="true"/>
<EF:EFColumn ename="groupName" cname="设备区域名称" hidden="true"/>
<EF:EFComboColumn ename="deviceType" cname="设备类型" <EF:EFComboColumn ename="deviceType" cname="设备类型"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
......
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