|
@@ -31,6 +31,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
+import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
@@ -279,7 +280,7 @@ public class WmPayOffController {
|
|
if (CollectionUtil.isEmpty(inputList)) {
|
|
if (CollectionUtil.isEmpty(inputList)) {
|
|
return R.failed("数据异常");
|
|
return R.failed("数据异常");
|
|
}
|
|
}
|
|
- List<String> msgList = new ArrayList<>();
|
|
|
|
|
|
+ List<Map<String, String>> msgList = new ArrayList<>();
|
|
for (WmScorePackageSettleInput input : inputList) {
|
|
for (WmScorePackageSettleInput input : inputList) {
|
|
if(StringUtils.isEmpty(input.getId()) || StringUtils.isEmpty(input.getSubType())
|
|
if(StringUtils.isEmpty(input.getId()) || StringUtils.isEmpty(input.getSubType())
|
|
|| null == input.getInvoiceCategory() || StringUtils.isEmpty(input.getScorePackageName())) {
|
|
|| null == input.getInvoiceCategory() || StringUtils.isEmpty(input.getScorePackageName())) {
|
|
@@ -310,16 +311,19 @@ public class WmPayOffController {
|
|
failFlag = true;
|
|
failFlag = true;
|
|
}
|
|
}
|
|
if (failFlag) {
|
|
if (failFlag) {
|
|
- msgList.add(String.format("%s:%s", input.getScorePackageName(), settleR.getMsg()));
|
|
|
|
|
|
+ Map<String, String> msgMap = new HashMap<>();
|
|
|
|
+ msgMap.put("packageName", input.getScorePackageName());
|
|
|
|
+ msgMap.put("reason", settleR.getMsg());
|
|
|
|
+ msgList.add(msgMap);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- msgList.add(String.format("%s:%s", input.getScorePackageName(), queryR.getMsg()));
|
|
|
|
|
|
+ Map<String, String> msgMap = new HashMap<>();
|
|
|
|
+ msgMap.put("packageName", input.getScorePackageName());
|
|
|
|
+ msgMap.put("reason", queryR.getMsg());
|
|
|
|
+ msgList.add(msgMap);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // 全部成功,则单独提示
|
|
|
|
- if (CollectionUtil.isEmpty(msgList)) {
|
|
|
|
- msgList.add("批量提交结算成功");
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
return R.ok(msgList);
|
|
return R.ok(msgList);
|
|
}
|
|
}
|
|
|
|
|