|
@@ -327,8 +327,8 @@ public class NhIVController {
|
|
|
if (idList.size() > 0) {
|
|
|
McException.exceptionAccess(serial + "已存在, 请勿重复提交!");
|
|
|
}
|
|
|
- // prd 仅仅识别增值税普通发票
|
|
|
- if (dto.getName().contains("普通发票")) {
|
|
|
+ // prd 仅仅识别 报销 用途的发票
|
|
|
+ if (dto.getType().equals("报销")) {
|
|
|
String serialTips = serial + "有疑问";
|
|
|
try {
|
|
|
// ppExt: 识别与验真后抬头对比 [全电票, 新版本识别接口, 返回名称为: 电子发票(普通发票) 不包含全电标识, 发类型为: 全电发票. 注意取值]
|
|
@@ -372,12 +372,21 @@ public class NhIVController {
|
|
|
String status = UtilMap.getString(data, "status");
|
|
|
|
|
|
// 读取关联表单
|
|
|
- List<String> associationForm = (List<String>) JSON.parse(UtilMap.getString(data, "multiAssociation"));
|
|
|
+ String formUUid="";
|
|
|
List<String> formInstanceIds = new ArrayList<>();
|
|
|
- for (String record : associationForm) {
|
|
|
- // 解析关联表单
|
|
|
- List<Map> associationData = (List<Map>) JSON.parse(record);
|
|
|
+ if(compId.equals("selectField_lzs0bpk2")){
|
|
|
+ // 采购表单
|
|
|
+ formUUid="FORM-B5A7B20013AE4CD09AD87FAB9A3E145FS3P6";
|
|
|
+ List<Map> associationData = (List<Map>) JSON.parse(UtilMap.getString(data, "multiAssociation"));
|
|
|
formInstanceIds.addAll(associationData.stream().map(form -> UtilMap.getString(form, "instanceId")).collect(Collectors.toList()));
|
|
|
+ }else{
|
|
|
+ formUUid="FORM-442A54C312A64FCA9C1D19C7C1AD7314MXAJ";
|
|
|
+ List<String> associationForm = (List<String>) JSON.parse(UtilMap.getString(data, "multiAssociation"));
|
|
|
+ for (String record : associationForm) {
|
|
|
+ // 解析关联表单
|
|
|
+ List<Map> associationData = (List<Map>) JSON.parse(record);
|
|
|
+ formInstanceIds.addAll(associationData.stream().map(form -> UtilMap.getString(form, "instanceId")).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
}
|
|
|
// 宜搭批量更新
|
|
|
Map update = UtilMap.map(compId, status);
|
|
@@ -387,7 +396,7 @@ public class NhIVController {
|
|
|
|
|
|
// prd 9.10 更新报销单, 关联到发票:: ppExt 宜搭服务注册, 提交规则系统默认字段 [详见 YDService]
|
|
|
ydService.operateData3(data, update, YDParam.builder().systemToken(SYSTEM_TOKEN).appType(APP_TYPE)
|
|
|
- .formUuid("FORM-442A54C312A64FCA9C1D19C7C1AD7314MXAJ")
|
|
|
+ .formUuid(formUUid)
|
|
|
.formInstanceIdList(formInstanceIds)
|
|
|
.updateFormDataJson(JSON.toJSONString(update))
|
|
|
.build(), YDConf.FORM_OPERATION.multi_update);
|