fix:配件价格库禁用按钮调用

This commit is contained in:
ljw 2024-09-20 21:05:21 +08:00
parent e257bc5cb5
commit 8c13ff38a2

View File

@ -104,9 +104,10 @@ public class OperationalUniversal {
*/ */
@ApiPostMapping("/PriceLibraryDisable") @ApiPostMapping("/PriceLibraryDisable")
public CustomApiResult<Object> PriceLibraryDisable(@NotNull @ApiParam("物料编码") @Valid List<String> number, public CustomApiResult<Object> PriceLibraryDisable(@NotNull @ApiParam("物料编码") @Valid List<String> number,
@NotNull @ApiParam("单据编号(配件)") @Valid String billno) throws IOException { @NotNull @ApiParam("单据编号(配件)") @Valid List<String> billno) throws IOException {
try { try {
QFilter qFilter = new QFilter("billno", QCP.equals, billno); for (String string : billno) {
QFilter qFilter = new QFilter("billno", QCP.equals, string);
qFilter.and(new QFilter("yem_billtype.number", QCP.equals, "yem_pricelibrary_PJ")); qFilter.and(new QFilter("yem_billtype.number", QCP.equals, "yem_pricelibrary_PJ"));
DynamicObject bill = BusinessDataServiceHelper.loadSingle("yem_pricelibrary", "id", qFilter.toArray()); DynamicObject bill = BusinessDataServiceHelper.loadSingle("yem_pricelibrary", "id", qFilter.toArray());
if (bill != null) { if (bill != null) {
@ -129,6 +130,7 @@ public class OperationalUniversal {
return fail; return fail;
} }
} }
}
} catch ( } catch (
Exception e) { Exception e) {
CustomApiResult<Object> fail = CustomApiResult.fail("501", e.getMessage()); CustomApiResult<Object> fail = CustomApiResult.fail("501", e.getMessage());
@ -139,7 +141,6 @@ public class OperationalUniversal {
} }
/** /**
* 配件价格库反审核调用 * 配件价格库反审核调用
* *