修改报错提示

This commit is contained in:
lihao 2025-11-24 16:53:32 +08:00
parent c0277b9954
commit 0070e5c725
1 changed files with 19 additions and 3 deletions

View File

@ -71,6 +71,7 @@ public class ApplytaskRestResource extends AbstractNCCRestResource {
List<String> ids = new ArrayList<String>();
List<String> bids= new ArrayList<>();
List<AggTaskAVO> aggTaskAVOS = new ArrayList<>();
try {
for (Map<String, Object> param : paramList) {
Object orderId= param.get("billcode") +"";
@ -90,7 +91,9 @@ public class ApplytaskRestResource extends AbstractNCCRestResource {
// if(pmoItemVO.getCmaterialvid().equals(mrlid)){
ids.add(pmoaggvo.getParentVO().getCpmohid()) ;
bids.add(pmoItemVO.getCmoid());
AggTaskAVO[] aggvos = pushActivity((String[]) ids.toArray(new String[ids.size()]), (String[]) bids.toArray(new String[ids.size()]));
AggTaskAVO[] aggvos =pushActivity((String[]) ids.toArray(new String[ids.size()]), (String[]) bids.toArray(new String[ids.size()]));
if (aggvos == null || aggvos.length == 0) {
}else {
@ -130,6 +133,15 @@ public class ApplytaskRestResource extends AbstractNCCRestResource {
errojson.put("codeList", "");
// 返回表示操作成功的JSON字符串
return ResultMessageUtil.toJSON(errojson);
}catch (BusinessException e){
JSONObject errojson = new JSONObject();
errojson.put("data", null);
errojson.put("status", "2");
errojson.put("message", e.getMessage());
errojson.put("codeList", "");
// 返回表示操作成功的JSON字符串
return ResultMessageUtil.toJSON(errojson);
}
}
public AggTaskAVO[] pushActivity(String[] ids, String[] bids) throws BusinessException {
PMOAggVO[] pmoaggvos = ((IPMOQueryService)NCLocator.getInstance().lookup(IPMOQueryService.class)).queryByPks(ids);
@ -158,9 +170,13 @@ public class ApplytaskRestResource extends AbstractNCCRestResource {
cardAggvo.setChildrenVO((CircularlyAccessibleValueObject[])filterList.toArray(new PMOItemVO[filterList.size()]));
}
}
try{
AggTaskAVO[] taskvos = ((ITaskABusinessService)NCLocator.getInstance().lookup(ITaskABusinessService.class)).fillTaskPmoInfo(pmoaggvos);
return taskvos;
}catch (BusinessException e) {
throw new BusinessException(e.getMessage());
}
AggTaskAVO[] taskvos = ((ITaskABusinessService)NCLocator.getInstance().lookup(ITaskABusinessService.class)).fillTaskPmoInfo(pmoaggvos);
return taskvos;
}
}
public static String get25thOfMonth(String yearMonthStr) throws DateTimeParseException {