Commit dd9952e8 by liuyang

2024-10-12

1.设备点检和设备保养,增加增行功能,可以手工录入
parent db7a2fae
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.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
......@@ -530,11 +531,11 @@ public class HPSB006 extends DaoEPBase {
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
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));
setPlanCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_CODE)), planCode));
setPlanStartDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_START_DATE)), planStartDate));
setPlanEndDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_END_DATE)), planEndDate));
setPlanStartDate(StringUtils.defaultIfEmpty(StringUtils.toString(DateUtils.formatShort(map.get(FIELD_PLAN_START_DATE))), planStartDate));
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));
setInspecUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INSPEC_USER_NAME)), inspecUserName));
setCheckStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CHECK_STATUS)), checkStatus));
......
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.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
......@@ -530,11 +531,11 @@ public class HPSB007 extends DaoEPBase {
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
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));
setPlanCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_CODE)), planCode));
setPlanStartDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_START_DATE)), planStartDate));
setPlanEndDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_END_DATE)), planEndDate));
setPlanStartDate(StringUtils.defaultIfEmpty(StringUtils.toString(DateUtils.formatShort(map.get(FIELD_PLAN_START_DATE))), planStartDate));
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));
setUpkeepUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPKEEP_USER_NAME)), upkeepUserName));
setCheckStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CHECK_STATUS)), checkStatus));
......
......@@ -127,7 +127,7 @@ public class ServiceHPSB007 extends ServiceEPBase {
*/
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);
}
......
......@@ -340,15 +340,14 @@
<select id="queryFactoryCodeBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
FACTORY_CODE as "factoryCode",
FACTORY_NAME as "factoryName"
ORG_ID as "factoryCode",
ORG_CNAME as "factoryName"
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">
COMPANY_CODE = #companyCode#
<!--and ORG_ID IN (<include refid="queryLoginNameBase"/>)-->
</isNotEmpty>
group by FACTORY_CODE,FACTORY_NAME
</select>
<select id="queryGroupCodeBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
......
......@@ -228,7 +228,9 @@
UPKEEP_USER_NAME, <!-- 保养人名称 -->
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>
<delete id="delete">
......
......@@ -60,7 +60,8 @@
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="userIdBox_block_id" textField="textField" valueField="valueField"/>
</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:EFComboColumn>
<%--<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
......
......@@ -84,10 +84,17 @@ $(function () {
if (e.field === "deviceType") {
loadChange(grid,e,"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){
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 @@
<EF:EFPage title="设备点检详情">
<EF:EFRegion id="inqu" title="查询条件">
<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:EFOptions blockId="factoryCodeBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
......@@ -39,6 +39,8 @@
<EF:EFColumn ename="id" primaryKey="true" 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="groupCode" cname="设备区域" hidden="true"/>
<EF:EFColumn ename="groupName" cname="设备区域名称" hidden="true"/>
<EF:EFComboColumn ename="deviceType" cname="设备类型"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
......
......@@ -217,14 +217,14 @@ let save = function (btnNode) {
}
let flag = true;
$.each(rows, function(index, item) {
let companyCode= item.get("companyCode");
let factoryCode= item.get("factoryCode");
let upkeepDate= item.get("upkeepDate");
let planStartDate= item.get("planStartDate");
let planEndDate= item.get("planEndDate");
let upkeepUserId= item.get("upkeepUserId");
let checkStatus= item.get("checkStatus");
if(isBlank(companyCode)){
message("选中的第"+(index+1)+"行\"公司\",不能为空!");
if(isBlank(factoryCode)){
message("选中的第"+(index+1)+"行\"工厂\",不能为空!");
flag = false;
return false;
}
......
......@@ -58,7 +58,7 @@
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="userIdBox_block_id" textField="textField" valueField="valueField"/>
</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:EFComboColumn>
<%--<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
......
......@@ -78,10 +78,17 @@ $(function () {
if (e.field === "deviceType") {
loadChange(grid,e,"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){
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 @@
<EF:EFPage title="设备保养详情">
<EF:EFRegion id="inqu" title="查询条件">
<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:EFOptions blockId="factoryCodeBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
......@@ -34,6 +34,8 @@
<EF:EFColumn ename="id" primaryKey="true" 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="groupCode" cname="设备区域" hidden="true"/>
<EF:EFColumn ename="groupName" cname="设备区域名称" hidden="true"/>
<EF:EFComboColumn ename="deviceType" cname="设备类型"
columnTemplate="#=textField#" itemTemplate="#=textField#"
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