fix: 82886 工作组--不收费--工作组成员更换企业联系人1--导出的邮寄联系人没有更新

This commit is contained in:
2024-03-25 14:37:29 +08:00
parent 36ae1ca4e6
commit 80c98464e3
2 changed files with 17 additions and 0 deletions
@@ -141,6 +141,10 @@ public class PayProjectCommon {
* completed 已完结
*/
public final static String PAYMENT_STATUS = "toBeUploaded";
/**
* 0 不付费
*/
public static final Integer PAY_FLAG_0 = 0;
/**
* 确认收入((1:全额(对勾),0:0(X),2>0 && <总金额(半满标志)))
*/
@@ -23,6 +23,7 @@ import com.jero.common.util.ValidUtil;
import com.jero.common.vo.ProjectStatusVO;
import com.jero.company.entity.PayCompanyManagement;
import com.jero.company.entity.PayContactsManagement;
import com.jero.company.mapper.PayContactsManagementMapper;
import com.jero.company.service.IPayCompanyManagementService;
import com.jero.company.service.IPayContactsManagementService;
import com.jero.contract.entity.PayIncomeContract;
@@ -133,6 +134,8 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
PayWorkingGroupSubItemContactsMapper payWorkingGroupSubItemContactsMapper;
@Resource
IPayCommonProjectService payCommonProjectService;
@Resource
private PayContactsManagementMapper payContactsManagementMapper;
private static final String DATE_FORMAT = "yyyy-MM-dd";
@@ -467,6 +470,16 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
if (Objects.equals(payWorkingGroupSubItem.getChargeWay(), PayProjectCommon.CHARGE_WAY3)) {
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getContractNum, null);
}
String contactsId = payWorkingGroupSubItem.getPayWorkingGroupSubItemContactsList().get(0).getContactsId();
// 判断如果是不收费的工作组则更新子项目时同时更新邮寄联系人
if (Objects.equals(payWorkingGroup.getPayFlag(), PayProjectCommon.PAY_FLAG_0) &&
Objects.nonNull(contactsId)) {
// 如果有邮寄信息更新邮寄联系人信息
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getMailContactsId, contactsId);
// 根据contactsId获取用户名
PayContactsManagement contact= payContactsManagementMapper.selectById(contactsId);
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getMailContactsTemporaryName, contact.getName());
}
payWorkingGroupSubItemService.update(updatePayWorkingGroupSubItem);
// 如果有邮寄信息更新邮寄联系人信息
String mailContactsId = payWorkingGroupSubItem.getMailContactsId();