Commit f757f9e5 by yukang

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

parents 4a41c971 bb664e92
...@@ -140,6 +140,8 @@ public class HPSqlConstant { ...@@ -140,6 +140,8 @@ public class HPSqlConstant {
*/ */
public class HPKC010A { public class HPKC010A {
// 按日期删除
public static final String DELETE_BY_TIME = "HPKC009.deleteByTime";
// 备份数量 // 备份数量
public static final String BACKUP = "HPKC010A.backup"; public static final String BACKUP = "HPKC010A.backup";
} }
......
...@@ -31,6 +31,9 @@ public class ServiceHPKC010A extends ServiceBase { ...@@ -31,6 +31,9 @@ public class ServiceHPKC010A extends ServiceBase {
try { try {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("dateProc", LocalDate.now().minusDays(1).format(DateUtils.SHORT_DATE)); queryMap.put("dateProc", LocalDate.now().minusDays(1).format(DateUtils.SHORT_DATE));
// 清除数据
dao.delete(HPSqlConstant.HPKC010A.DELETE_BY_TIME, queryMap);
// 备份数据
dao.insert(HPSqlConstant.HPKC010A.BACKUP, queryMap); dao.insert(HPSqlConstant.HPKC010A.BACKUP, queryMap);
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("备份数据成功"); inInfo.setMsg("备份数据成功");
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -83,6 +82,9 @@ ...@@ -83,6 +82,9 @@
<isNotEmpty prepend=" AND " property="depCode"> <isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode# DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -97,6 +99,12 @@ ...@@ -97,6 +99,12 @@
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#) INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#)
</isNotEqual> </isNotEqual>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql> </sql>
<sql id="order"> <sql id="order">
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -62,6 +61,9 @@ ...@@ -62,6 +61,9 @@
<isNotEmpty prepend=" AND " property="inventRecordId"> <isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId# INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -79,6 +81,12 @@ ...@@ -79,6 +81,12 @@
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#) INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#)
</isNotEqual> </isNotEqual>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql> </sql>
<sql id="order"> <sql id="order">
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -63,6 +62,9 @@ ...@@ -63,6 +62,9 @@
<isNotEmpty prepend=" AND " property="oldOuterNo"> <isNotEmpty prepend=" AND " property="oldOuterNo">
OLD_OUTER_NO = #oldOuterNo# OLD_OUTER_NO = #oldOuterNo#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -77,6 +79,12 @@ ...@@ -77,6 +79,12 @@
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#) INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#)
</isNotEqual> </isNotEqual>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql> </sql>
<sql id="order"> <sql id="order">
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="tHpkc010a"> <sqlMap namespace="HPKC010A">
<sql id="column"> <sql id="column">
ID as "id", ID as "id",
...@@ -109,6 +109,11 @@ ...@@ -109,6 +109,11 @@
<include refid="condition"/> <include refid="condition"/>
</select> </select>
<!-- 按时间删除数据 -->
<delete id="deleteByTime">
DELETE FROM ${hpjxSchema}.T_HPKC010A WHERE DATE_PROC = #dateProc#
</delete>
<!-- 备份数据 --> <!-- 备份数据 -->
<insert id="backup"> <insert id="backup">
INSERT INTO ${hpjxSchema}.T_HPKC010A ( INSERT INTO ${hpjxSchema}.T_HPKC010A (
......
...@@ -29,6 +29,14 @@ ...@@ -29,6 +29,14 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -29,6 +29,16 @@ ...@@ -29,6 +29,16 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
</div>
<div class="row">
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
...@@ -51,7 +61,7 @@ ...@@ -51,7 +61,7 @@
sumType="all" required="true" readonly="true"/> sumType="all" required="true" readonly="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" maxLength="255" readonly="true"/> <EF:EFColumn ename="remark" cname="备注" width="150" maxLength="255" readonly="true"/>
<EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建日期" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -29,6 +29,16 @@ ...@@ -29,6 +29,16 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
</div>
<div class="row">
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -5,7 +5,7 @@ $(function () { ...@@ -5,7 +5,7 @@ $(function () {
field: "operator", field: "operator",
template: function (item) { template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + IPLATUI.CONTEXT_PATH + '/EU/DM/EUDM06.jsp?docId=' + item.filePath + 'href="' + IPLATUI.CONTEXT_PATH + '/EU/DM/EUDM06.jsp?docId=' + item.docId
+ '" >附件下载</a>'; + '" >附件下载</a>';
return template; return template;
} }
...@@ -15,33 +15,6 @@ $(function () { ...@@ -15,33 +15,6 @@ $(function () {
} }
}; };
// 关闭事件
IPLATUI.EFWindow = {
"uploadFile": {
close: function (e) {
let $iframe = uploadFileWindow.element.children("iframe");
let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象
let uploadFile = iframejQuery("#fileDocId").val();
if (isBlank(uploadFile)) {
return;
}
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-matId", $("#inqu_status-0-matId").val());
inEiInfo.set("result-0-docId", uploadFile);
EiCommunicator.send('HPSC002A', 'insert', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
}
};
$("#ef_form_head").hide(); $("#ef_form_head").hide();
// 查询 // 查询
...@@ -72,9 +45,39 @@ var query = function (e) { ...@@ -72,9 +45,39 @@ var query = function (e) {
/** /**
* 文件上传 * 文件上传
* *
* @param id
*/ */
function uploadFile() { function uploadFile(id) {
uploadFileWindow.open().center(); JSColorbox.open({
href: "HPSC099?methodName=initLoad",
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "70%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(docId) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-matId", $("#inqu_status-0-matId").val());
inEiInfo.set("result-0-docId", docId);
EiCommunicator.send('HPSC002A', 'insert', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
// 关闭弹窗
JSColorbox.close();
} }
/** /**
......
...@@ -28,8 +28,4 @@ ...@@ -28,8 +28,4 @@
<EF:EFColumn ename="operator" cname="操作" enable="false" width="200" align="center"/> <EF:EFColumn ename="operator" cname="操作" enable="false" width="200" align="center"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
<%-- EEDM8010页面加载时,不会加载EEDM6000 (lazyload="true") --%>
<EF:EFWindow id="uploadFile" url="${ctx}/web/HPSC099" lazyload="true" refresh="true">
</EF:EFWindow>
</EF:EFPage> </EF:EFPage>
...@@ -7,7 +7,11 @@ $(function () { ...@@ -7,7 +7,11 @@ $(function () {
$("#fileDocId").val(e.response.docId); $("#fileDocId").val(e.response.docId);
NotificationUtil("附件上传成功"); NotificationUtil("附件上传成功");
console.log($("#fileDocId").val()) console.log($("#fileDocId").val())
try {
parent.JSColorbox.setValueCallback(e.response.docId);
} catch (e){
}
}, },
} }
}; };
}); });
\ No newline at end of file
let rowId;
$(function() { $(function() {
// 查询 // 查询
...@@ -43,33 +42,6 @@ $(function() { ...@@ -43,33 +42,6 @@ $(function() {
}] }]
} }
}; };
// 关闭事件
IPLATUI.EFWindow = {
"uploadFile": {
close: function (e) {
let $iframe = uploadFileWindow.element.children("iframe");
let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象
let uploadFile = iframejQuery("#fileDocId").val();
if (isBlank(uploadFile)) {
return;
}
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", rowId);
inEiInfo.set("result-0-affix", uploadFile);
EiCommunicator.send('HPZL001', 'bindDocIdById', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
},
}
};
}); });
/** /**
...@@ -78,8 +50,29 @@ $(function() { ...@@ -78,8 +50,29 @@ $(function() {
* @param id * @param id
*/ */
function openUploadFile(id) { function openUploadFile(id) {
uploadFileWindow.open().center(); JSColorbox.open({
rowId = id; href: "HPSC099?methodName=initLoad",
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "70%",
callbackName: function (docId) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-affix", docId);
EiCommunicator.send('HPZL001', 'bindDocIdById', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
});
} }
/** /**
......
...@@ -60,7 +60,4 @@ ...@@ -60,7 +60,4 @@
hidden="true"/> hidden="true"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
<%-- EEDM8010页面加载时,不会加载EEDM6000 (lazyload="true") --%>
<EF:EFWindow id="uploadFile" url="${ctx}/web/HPSC099" lazyload="true" refresh="true">
</EF:EFWindow>
</EF:EFPage> </EF:EFPage>
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