|
@@ -6,6 +6,7 @@ import com.alibaba.fastjson2.JSONWriter;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fjhx.account.service.account.AccountManagementService;
|
|
|
import com.fjhx.common.utils.Assert;
|
|
|
import com.fjhx.purchase.entity.purchase.dto.PurchasePayRecordDetailSelectDto;
|
|
|
import com.fjhx.purchase.entity.purchase.po.Purchase;
|
|
@@ -41,6 +42,8 @@ public class PurchasePayRecordDetailServiceImpl extends ServiceImpl<PurchasePayR
|
|
|
private PurchaseService purchaseService;
|
|
|
@Autowired
|
|
|
private PurchasePayRecordService purchasePayRecordService;
|
|
|
+ @Autowired
|
|
|
+ private AccountManagementService accountManagementService;
|
|
|
|
|
|
@Override
|
|
|
public Page<PurchasePayRecordDetailVo> getPage(PurchasePayRecordDetailSelectDto dto) {
|
|
@@ -49,6 +52,10 @@ public class PurchasePayRecordDetailServiceImpl extends ServiceImpl<PurchasePayR
|
|
|
wrapper.orderByDesc("pprd", PurchasePayRecordDetail::getId);
|
|
|
Page<PurchasePayRecordDetailVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
UserUtil.assignmentNickName(page.getRecords(), PurchasePayRecordDetailVo::getCreateUser, PurchasePayRecordDetailVo::setPayUserName);
|
|
|
+ //赋值付款账户名称
|
|
|
+ accountManagementService.attributeAssign(page.getRecords(), PurchasePayRecordDetailVo::getPayAccountId, (item, accountManagement) -> {
|
|
|
+ item.setPayAccountName(accountManagement.getName());
|
|
|
+ });
|
|
|
return page;
|
|
|
}
|
|
|
|
|
@@ -62,7 +69,7 @@ public class PurchasePayRecordDetailServiceImpl extends ServiceImpl<PurchasePayR
|
|
|
String victoriatouristJson = purchase.getVictoriatouristJson();
|
|
|
JSONObject json = ObjectUtil.isEmpty(victoriatouristJson) ? new JSONObject() : JSONObject.parseObject(victoriatouristJson);
|
|
|
json.put("paidAmount", BigDecimal.ZERO);
|
|
|
- purchase.setVictoriatouristJson(JSONObject.toJSONString(json,JSONWriter.Feature.WriteLongAsString));
|
|
|
+ purchase.setVictoriatouristJson(JSONObject.toJSONString(json, JSONWriter.Feature.WriteLongAsString));
|
|
|
purchaseService.updateById(purchase);
|
|
|
|
|
|
//清空付款记录记录信息
|