fix:配件价格库反审核调用
This commit is contained in:
parent
15fac20cfe
commit
622831c3f5
@ -94,10 +94,13 @@ public class OperationalUniversal {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
//PriceLibraryDisable
|
/**
|
||||||
//yem_pricelibrary
|
* 配件价格库禁用按钮调用
|
||||||
//GMPJJGD2403000051
|
*
|
||||||
//unaudit
|
* @param billno
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
@ApiPostMapping("/PriceLibraryDisable")
|
@ApiPostMapping("/PriceLibraryDisable")
|
||||||
public CustomApiResult<Object> PriceLibraryDisable(@NotNull @ApiParam("单据编号(配件)") @Valid String billno) throws IOException {
|
public CustomApiResult<Object> PriceLibraryDisable(@NotNull @ApiParam("单据编号(配件)") @Valid String billno) throws IOException {
|
||||||
try {
|
try {
|
||||||
@ -123,4 +126,41 @@ public class OperationalUniversal {
|
|||||||
CustomApiResult<Object> ces = CustomApiResult.success("成功");
|
CustomApiResult<Object> ces = CustomApiResult.success("成功");
|
||||||
return ces;
|
return ces;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配件价格库反审核调用
|
||||||
|
*
|
||||||
|
* @param billno
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
@ApiPostMapping("/PriceLibraryServre")
|
||||||
|
public CustomApiResult<Object> PriceLibraryServre(@NotNull @ApiParam("单据编号(配件)") @Valid String billno) throws IOException {
|
||||||
|
try {
|
||||||
|
QFilter qFilter = new QFilter("billno", QCP.equals, billno);
|
||||||
|
qFilter.and(new QFilter("yem_billtype.number", QCP.equals, "yem_pricelibrary_PJ"));
|
||||||
|
DynamicObject bill = BusinessDataServiceHelper.loadSingle("yem_pricelibrary", "id", qFilter.toArray());
|
||||||
|
if (bill != null) {
|
||||||
|
DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(bill.getPkValue(), bill.getDynamicObjectType().getName());
|
||||||
|
OperationResult audit = OperationServiceHelper.executeOperate("unaudit","yem_pricelibrary", new Object[]{dynamicObject.getPkValue()}, OperateOption.create());
|
||||||
|
if (!audit.isSuccess()) {
|
||||||
|
List<IOperateInfo> allErrorOrValidateInfo = audit.getAllErrorOrValidateInfo();
|
||||||
|
String message = audit.getMessage();
|
||||||
|
String msg = "【配件价格库】调用【反审核】操作失败,失败原因为:\r\n";
|
||||||
|
CustomApiResult<Object> fail = CustomApiResult.fail("501", msg + message + "\r\n" + allErrorOrValidateInfo);
|
||||||
|
return fail;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
String errorMessage = "【配件价格库】不存在编码为【" + billno + "】的操作编码,请核对后重试!";
|
||||||
|
CustomApiResult<Object> fail = CustomApiResult.fail("501", errorMessage);
|
||||||
|
return fail;
|
||||||
|
}
|
||||||
|
} catch (
|
||||||
|
Exception e) {
|
||||||
|
CustomApiResult<Object> fail = CustomApiResult.fail("501", e.getMessage());
|
||||||
|
return fail;
|
||||||
|
}
|
||||||
|
CustomApiResult<Object> ces = CustomApiResult.success("成功");
|
||||||
|
return ces;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user