Commit 0add0e01 by wuwenlong

项目立项删除同时删除附件opt;

parent 560cbb37
......@@ -62,7 +62,8 @@ public class ServiceHGSC002 extends ServiceBase {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 销售单号
List<Long> ids = ObjectUtils.listKey(resultRows, HGSC002.FIELD_id);
List<Long> ids = ObjectUtils.listKey(resultRows, HGSC002.FIELD_id).stream().map(id -> Long.parseLong(String.valueOf(id))).collect(Collectors.toList());
DaoUtils.update(HGSC002.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
ids.forEach( id -> {
HGSCTools.THGSC099.deleteByMatId(id, HGConstant.FileBizType.XMRY);
......
......@@ -826,7 +826,13 @@ public class HGSCTools {
Map queryMap = new HashMap();
queryMap.put(HGSC099.FIELD_mat_id, matId);
queryMap.put(HGSC099.FIELD_biz_type, bizType);
return DaoBase.getInstance().query(HGSC099.QUERY, queryMap);
// 项目环境
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){
......
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