refactor: 优化采购订单相关功能及代码结构
重构采购订单模块,包括以下改进: 1. 移除PurchaseOrderItemVo中冗余字段 2. 在ContractCtx中添加调试日志 3. 修改InventoryTabSkinContracts和PurchaseOrderTabSkinBillVoucher中的equals比较逻辑 4. 调整PurchaseOrderVo的税率字段类型并添加锁定标志 5. 修正FXML文件中的控制器路径 6. 优化InventoryStringConverter的toString方法格式 7. 在PurchaseBillVoucherItemService中添加凭证查询条件 8. 改进ContractRepairTasker的进度更新逻辑 9. 修复AbstContractRepairTasker中的子合同同步问题 10. 优化PurchaseOrderTabSkinItems的表格列显示 11. 添加InventoryCatalogStringConverter及相关缓存支持 12. 完善PurchaseBillVoucherService的查询逻辑 13. 增强ContractService的库存查询功能 14. 改进PurchaseOrderItemService的合同项查询逻辑 15. 为InventoryService添加缓存支持 16. 优化ContractTabSkinPurchaseOrders的员工列显示 17. 改进ContractTabSkinItemsV2的数量显示逻辑 18. 重构PurchaseOrderViewModel的数据绑定逻辑
This commit is contained in:
@@ -178,6 +178,7 @@ public class ContractCtx extends AbstractYongYouU8Ctx {
|
||||
Map<String, Object> data;
|
||||
try {
|
||||
data = repository.queryContractDetail(guid);
|
||||
holder.debug("查询合同详情成功, guid=" + guid);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("查询合同详情失败, guid=" + guid, e);
|
||||
}
|
||||
|
||||
@@ -186,6 +186,14 @@ public class PurchaseOrderCtx extends AbstractYongYouU8Ctx {
|
||||
return new ArrayList<>(updateMap.keySet());
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步采购订单条目
|
||||
*
|
||||
* @param order
|
||||
* @param map
|
||||
* @param holder
|
||||
* @return
|
||||
*/
|
||||
private boolean applyPurchaseOrderDetail(PurchaseOrder order, Map<String, Object> map, MessageHolder holder) {
|
||||
String code = (String) map.get("cPOID");
|
||||
|
||||
@@ -203,6 +211,10 @@ public class PurchaseOrderCtx extends AbstractYongYouU8Ctx {
|
||||
modified = true;
|
||||
}
|
||||
|
||||
if (updateNumber(order::getTaxRate, order::setTaxRate, (float) map.get("iTaxRate"), holder, "税率")) {
|
||||
modified = true;
|
||||
}
|
||||
|
||||
if (updateEmployeeByCode(order::getEmployee, order::setEmployee, (String) map.get("cPersonCode"), holder,
|
||||
"业务员")) {
|
||||
modified = true;
|
||||
|
||||
Reference in New Issue
Block a user