Commit 36fb83f6 by liuyang

2024-07-25

1、蓝图清单详情里的附件上传改在列表的操作增加附加上传
2、蓝图清单删除并删除附件
parent cf7e08e9
......@@ -6,6 +6,8 @@ import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.domain.HGSC003;
import com.baosight.hggp.hg.sc.domain.HGSC099;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiBlock;
......@@ -57,6 +59,14 @@ public class ServiceHGSC003 extends ServiceBase {
// 蓝图ids
List<Long> ids = ObjectUtils.listKey(resultRows, HGSC003.FIELD_id);
DaoUtils.update(HGSC003.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
// 删除附件明细
List<HGSC099> hgsc099List = HGSCTools.THGSC099.listByMatIds(ids, Arrays.asList("DWT","SYT"));
for (HGSC099 hgsc099: hgsc099List) {
DaoUtils.update(HGSC099.DELETE, hgsc099);
if (!hgsc099.getDocId().isEmpty()) {
HGSCTools.THGSC099.delectDoc(hgsc099.getDocId());
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
......
......@@ -72,6 +72,9 @@
<isNotEmpty prepend=" AND " property="matId">
A.MAT_ID = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matIds">
A.MAT_ID IN <iterate close=")" open="(" conjunction="," property="matIds">#matIds[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bizTypes">
A.BIZ_TYPE IN <iterate close=")" open="(" conjunction="," property="bizTypes">#bizTypes[]#</iterate>
</isNotEmpty>
......
......@@ -1130,6 +1130,20 @@ public class HGSCTools {
}
}
public static List<HGSC099> listByMatIds(List<Long> matIds, List<String> bizTypes) {
AssertUtils.isEmpty(matIds, "物料ID不能为空!");
Map queryMap = new HashMap();
queryMap.put("matIds", matIds);
queryMap.put("bizTypes", bizTypes);
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
return DaoBase.getInstance().query("HGSC099.queryRun", queryMap);
} else {
return DaoBase.getInstance().query("HGSC099.queryDev", queryMap);
}
}
public static void deleteByMatId(Long matId, String bizType){
List<HGSC099> hgsc099List = listByMatId(matId,bizType);
for (int i = 0; i < hgsc099List.size(); i++) {
......
......@@ -38,6 +38,8 @@ $(function (){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateBlueprintStatus(' + item.id + ',0)" >停用</a>';
}
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="showUploadFile(' + item.id + ')" >附件详情</a>';
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
// 'onclick="showUploadFile(' + item.id + ')" >附件详情</a>';
}
......@@ -240,14 +242,14 @@ function showDetail(id,blueprintCode,blueprintName,companyName) {
*
* @param id
*/
function showUploadFile(id) {
/*function showUploadFile(id) {
JSColorbox.open({
href: "HGSC099?methodName=initLoad&inqu_status-0-bizType=LTQD&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件详情</div>",
width: "85%",
height: "80%",
});
}
}*/
function loadChange(grid,e,field) {
var cell_label = field,that = grid;
......@@ -270,3 +272,17 @@ function loadChange(grid,e,field) {
// 触发 td.click 事件,
td.trigger("click");
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HGSC003B?methodName=initLoad&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件详情</div>",
width: "80%",
height: "80%",
});
}
\ No newline at end of file
......@@ -25,7 +25,7 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="170" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
......
......@@ -18,7 +18,7 @@ $(function (){
pageSizes: [10, 20, 50, 100],
},
columns: [
{
/*{
field: "operator",
title: "操作",
template: function (item) {
......@@ -29,7 +29,7 @@ $(function (){
}
return template;
}
},
},*/
{
field: "companyName",
template: function (item) {
......
......@@ -24,7 +24,7 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<%--<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>--%>
<EF:EFColumn ename="blueprintId" cname="蓝图id" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="blueprintCode" cname="蓝图编码" enable="false" width="120" align="center"/>
......
......@@ -54,7 +54,7 @@ function uploadFile(id) {
JSColorbox.open({
href: "HGSC003C?methodName=initLoad&inqu_status-0-matId="+$("#inqu_status-0-matId").val(),
title: "<div style='text-align: center;'>附件上传</div>",
width: "90%",
width: "80%",
height: "80%",
callbackName: uploadFileCallback
});
......
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