Commit c8c6c7d0 by liuyang

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

parents de1d5b47 9bbb3cba
...@@ -5,6 +5,7 @@ import com.baosight.hggp.core.dao.DaoUtils; ...@@ -5,6 +5,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.tools.EDTools; import com.baosight.hggp.core.tools.EDTools;
import com.baosight.hggp.hg.ds.domain.HGDS002; import com.baosight.hggp.hg.ds.domain.HGDS002;
import com.baosight.hggp.hg.sc.domain.HGSC099; import com.baosight.hggp.hg.sc.domain.HGSC099;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.FileUtils; import com.baosight.hggp.util.FileUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
...@@ -109,7 +110,7 @@ public class ServiceHGSC003B extends ServiceEPBase { ...@@ -109,7 +110,7 @@ public class ServiceHGSC003B extends ServiceEPBase {
hgsc099.fromMap(resultRows.get(i)); hgsc099.fromMap(resultRows.get(i));
DaoUtils.update(HGSC099.DELETE, hgsc099); DaoUtils.update(HGSC099.DELETE, hgsc099);
if (!hgsc099.getDocId().isEmpty()) { if (!hgsc099.getDocId().isEmpty()) {
this.delectDoc(hgsc099.getDocId()); HGSCTools.THGSC099.delectDoc(hgsc099.getDocId());
} }
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
...@@ -120,44 +121,4 @@ public class ServiceHGSC003B extends ServiceEPBase { ...@@ -120,44 +121,4 @@ public class ServiceHGSC003B extends ServiceEPBase {
} }
return inInfo; return inInfo;
} }
/**
* 删除文件
* @param docId 文件ID
*/
public void delectDoc(String docId){
Map<String,Object> map = new HashMap<>();
map.put("docId",docId);
List<HGDS002> list = this.dao.query(HGDS002.QUERY,map);
if (list.size() > 0) {
String realPath = list.get(0).getRealPath();
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo queryInfo = new EiInfo();
queryInfo.set(HGSC099.FIELD_doc_id,list.get(0).getDocId());
//获取文档信息
queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库
Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo();
eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口
EiInfo outInfo = XServiceManager.call(eiInfo);
if(outInfo.getStatus() == EiConstant.STATUS_FAILURE){
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败");
}
}
}else {
FileUtils.deleteFile(realPath);
}
this.dao.delete(HGDS002.DELETE,map);
}
}
} }
...@@ -6,6 +6,7 @@ import com.baosight.hggp.core.dao.DaoUtils; ...@@ -6,6 +6,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.tools.EDTools; import com.baosight.hggp.core.tools.EDTools;
import com.baosight.hggp.hg.ds.domain.HGDS002; import com.baosight.hggp.hg.ds.domain.HGDS002;
import com.baosight.hggp.hg.sc.domain.HGSC099; import com.baosight.hggp.hg.sc.domain.HGSC099;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.sj.domain.HGSJ003; import com.baosight.hggp.hg.sj.domain.HGSJ003;
import com.baosight.hggp.util.FileUtils; import com.baosight.hggp.util.FileUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
...@@ -109,7 +110,7 @@ public class ServiceHGSC004B extends ServiceEPBase { ...@@ -109,7 +110,7 @@ public class ServiceHGSC004B extends ServiceEPBase {
hgsc099.fromMap(resultRows.get(i)); hgsc099.fromMap(resultRows.get(i));
DaoUtils.update(HGSC099.DELETE, hgsc099); DaoUtils.update(HGSC099.DELETE, hgsc099);
if (!hgsc099.getDocId().isEmpty()) { if (!hgsc099.getDocId().isEmpty()) {
this.delectDoc(hgsc099.getDocId()); HGSCTools.THGSC099.delectDoc(hgsc099.getDocId());
} }
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
...@@ -120,44 +121,4 @@ public class ServiceHGSC004B extends ServiceEPBase { ...@@ -120,44 +121,4 @@ public class ServiceHGSC004B extends ServiceEPBase {
} }
return inInfo; return inInfo;
} }
/**
* 删除文件
* @param docId 文件ID
*/
public void delectDoc(String docId){
Map<String,Object> map = new HashMap<>();
map.put("docId",docId);
List<HGDS002> list = this.dao.query(HGDS002.QUERY,map);
if (list.size() > 0) {
String realPath = list.get(0).getRealPath();
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo queryInfo = new EiInfo();
queryInfo.set(HGSC099.FIELD_doc_id,list.get(0).getDocId());
//获取文档信息
queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库
Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo();
eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口
EiInfo outInfo = XServiceManager.call(eiInfo);
if(outInfo.getStatus() == EiConstant.STATUS_FAILURE){
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败");
}
}
}else {
FileUtils.deleteFile(realPath);
}
this.dao.delete(HGDS002.DELETE,map);
}
}
} }
...@@ -1322,29 +1322,29 @@ public class HGSCTools { ...@@ -1322,29 +1322,29 @@ public class HGSCTools {
String realPath = list.get(0).getRealPath(); String realPath = list.get(0).getRealPath();
// 项目环境 // 项目环境
String projectEnv = ProjectInfo.getProjectEnv(); String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.projectEnv.RUN)) { // if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo queryInfo = new EiInfo(); // EiInfo queryInfo = new EiInfo();
queryInfo.set(HGSC099.FIELD_doc_id,list.get(0).getDocId()); // queryInfo.set(HGSC099.FIELD_doc_id,list.get(0).getDocId());
//获取文档信息 // //获取文档信息
queryInfo.set(EiConstant.serviceId,"S_EU_0102"); // queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo docInfo = XServiceManager.call(queryInfo); // EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库 // //数据库
Map docInfoMap = docInfo.getMap("docMap"); // Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) { // if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo(); // EiInfo eiInfo = new EiInfo();
eiInfo.set("data",docInfoMap.get("url")+"-"+0); // eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105"); // eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口 // //调用接口
EiInfo outInfo = XServiceManager.call(eiInfo); // EiInfo outInfo = XServiceManager.call(eiInfo);
//
if(outInfo.getStatus() == EiConstant.STATUS_FAILURE){ // if(outInfo.getStatus() == EiConstant.STATUS_FAILURE){
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败"); // LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败"); // outInfo.setMsg("失败");
} // }
} // }
}else { // }else {
FileUtils.deleteFile(realPath); FileUtils.deleteFile(realPath);
} // }
DaoBase.getInstance().delete(HGDS002.DELETE,map); DaoBase.getInstance().delete(HGDS002.DELETE,map);
} }
......
$(function () { $(function () {
IPLATUI.EFGrid = { IPLATUI.EFGrid = {
"result": { "result": {
pageable:false, pageable: {
pageSize: 20,
pageSizes: [20, 50, 70, 100],
},
columns: [ columns: [
], ],
loadComplete: function (grid) { loadComplete: function (grid) {
......
...@@ -6,7 +6,7 @@ $(function() { ...@@ -6,7 +6,7 @@ $(function() {
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
$("#BATCH_FLOW").on("click", function () { $("#BATCH_FLOW").on("click", function () {
showFlowDetail(); batchFlow();
}); });
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
...@@ -294,25 +294,45 @@ function showFlowDetail(id,inventCode,flowId) { ...@@ -294,25 +294,45 @@ function showFlowDetail(id,inventCode,flowId) {
}); });
} }
// function showFlowDetail() { function batchFlow() {
// let rows = resultGrid.getCheckedRows(); let rows = resultGrid.getCheckedRows();
// let selectIds = []; let selectIds = [];
// //selectIds.push(rows[i]['id']); if (rows.length < 1) {
// if (rows.length < 1) { message("请选择数据")
// message("请选择数据") return;
// return; }
// } let inventType;
// $.each(rows, function(index, item) { let flag = true;
// selectIds.push(item.get("id")); $.each(rows, function(index, item) {
// }); selectIds.push(item.get("id"));
// JSColorbox.open({ //不存在就直接赋值
// href: "HGPZ005B?methodName=initLoad&inqu_status-0-parentIds=" + selectIds, if(!inventType){
// title: "<div style='text-align: center;'>工艺流程</div>", inventType = item.get("inventType")
// width: "75%", }else{
// height: "80%", //存在就与当前类型对比
// callbackName: cllback2 if(inventType != item.get("inventType")){
// }); message("只能选择同一个类型存货")
// } flag = false;
return false;
}
}
if(item.get("flowId") >0 ){
message("只能选择未分配的存货")
flag = false;
return false;
}
});
if(flag){
JSColorbox.open({
href: "HGPZ005B?methodName=initLoad&inqu_status-0-parentIds=" + selectIds,
title: "<div style='text-align: center;'>工艺流程</div>",
width: "75%",
height: "80%",
callbackName: cllback2
});
}
}
/** /**
* 回调 * 回调
......
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