Commit ddefd6b2 by liuyang

2024-07-17 修复批量工艺流程bug

parent dece5d6a
...@@ -404,10 +404,11 @@ public class ServiceHGPZ005 extends ServiceBase { ...@@ -404,10 +404,11 @@ public class ServiceHGPZ005 extends ServiceBase {
@OperationLogAnnotation(operModul = "存货档案", operType = "修改", operDesc = "批量绑定流程") @OperationLogAnnotation(operModul = "存货档案", operType = "修改", operDesc = "批量绑定流程")
public EiInfo updateFlowIds(EiInfo inInfo) { public EiInfo updateFlowIds(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); //List<Map> resultRows = inInfo.getBlock(EiConstant.queryBlock).getRows();
Map<String,Object> map = EiInfoUtils.getFirstRow(inInfo); Map map = EiInfoUtils.getFirstRow(inInfo);
List<Long> ids = (List<Long>) map.get("ids"); String[] ids = map.get("ids").toString().split(",");
List<HGPZ005> hgpz005List = HGPZTools.HgPz005.getIds(ids);
List<HGPZ005> hgpz005List = HGPZTools.HgPz005.getIdStrs(Arrays.asList(ids));
Map flowMap = (Map) map.get("flow"); Map flowMap = (Map) map.get("flow");
HGSJ002 hgsj002 = new HGSJ002(); HGSJ002 hgsj002 = new HGSJ002();
hgsj002.fromMap(flowMap); hgsj002.fromMap(flowMap);
...@@ -417,7 +418,7 @@ public class ServiceHGPZ005 extends ServiceBase { ...@@ -417,7 +418,7 @@ public class ServiceHGPZ005 extends ServiceBase {
addHgpz005a(hgpz005,hgsj002); addHgpz005a(hgpz005,hgsj002);
} }
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!"); inInfo.setMsg("操作成功!本次对[" + hgpz005List.size() + "]条数据修改成功!");
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败"); LogUtils.setDetailMsg(inInfo, e, "修改失败");
} }
......
...@@ -61,6 +61,9 @@ ...@@ -61,6 +61,9 @@
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode# ACCOUNT_CODE = #accountCode#
</isNotEmpty> </isNotEmpty>
......
...@@ -259,6 +259,15 @@ public class HGPZTools { ...@@ -259,6 +259,15 @@ public class HGPZTools {
return DaoBase.getInstance().query(HGPZ005.QUERY, queryMap); return DaoBase.getInstance().query(HGPZ005.QUERY, queryMap);
} }
public static List<HGPZ005> getIdStrs(List<String> ids) {
if (CollectionUtils.isEmpty(ids)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("ids", ids);
return DaoBase.getInstance().query(HGPZ005.QUERY, queryMap);
}
/** /**
* 查询 * 查询
* *
......
...@@ -275,7 +275,7 @@ function showFlowDetail(id,inventCode,flowId) { ...@@ -275,7 +275,7 @@ function showFlowDetail(id,inventCode,flowId) {
function showFlowDetail() { function showFlowDetail() {
let rows = resultGrid.getCheckedRows(); let rows = resultGrid.getCheckedRows();
let selectIds = []; let selectIds = [];
saleIds.push(rows[i]['id']); //selectIds.push(rows[i]['id']);
if (rows.length < 1) { if (rows.length < 1) {
message("请选择数据") message("请选择数据")
return; return;
......
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