工作组变更
This commit is contained in:
+95
-86
@@ -39,6 +39,7 @@ import com.jero.project.entity.PayWorkingGroup;
|
|||||||
import com.jero.project.entity.PayWorkingGroupSubItem;
|
import com.jero.project.entity.PayWorkingGroupSubItem;
|
||||||
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
|
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
|
||||||
import com.jero.project.service.IPayWorkingGroupService;
|
import com.jero.project.service.IPayWorkingGroupService;
|
||||||
|
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
|
||||||
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
||||||
import com.jero.project.vo.SetChargeInput;
|
import com.jero.project.vo.SetChargeInput;
|
||||||
import com.jero.project.vo.excel.PayWorkingGroupSubItemExcel;
|
import com.jero.project.vo.excel.PayWorkingGroupSubItemExcel;
|
||||||
@@ -97,6 +98,8 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
|
|||||||
private RolePermissionService rolePermissionService;
|
private RolePermissionService rolePermissionService;
|
||||||
@Resource
|
@Resource
|
||||||
private ISysUserService sysUserService;
|
private ISysUserService sysUserService;
|
||||||
|
@Resource
|
||||||
|
private IPayWorkingGroupSubItemContactsService payWorkingGroupSubItemContactsService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
@@ -525,97 +528,103 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
|
|||||||
exportList = pageList;
|
exportList = pageList;
|
||||||
}
|
}
|
||||||
List<PayWorkingGroupSubItemExcel> excelList = new ArrayList<>();
|
List<PayWorkingGroupSubItemExcel> excelList = new ArrayList<>();
|
||||||
for (PayWorkingGroupSubItem workingGroupSubItem : exportList) {
|
if(!CollectionUtils.isEmpty(exportList)){
|
||||||
PayWorkingGroupSubItemExcel excel = new PayWorkingGroupSubItemExcel();
|
List<String> listWGSIds = exportList.stream().map(PayWorkingGroupSubItem::getId).collect(Collectors.toList());
|
||||||
BeanUtils.copyProperties(workingGroupSubItem,excel);
|
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
|
||||||
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = workingGroupSubItem.getPayWorkingGroupSubItemContactsList();
|
queryPayWorkingGroupSubItemContacts.in(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,listWGSIds);
|
||||||
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
|
List<PayWorkingGroupSubItemContacts> payWorkingGroupSubItemContactsList = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
|
||||||
listPayWorkingGroupSubItemContacts.sort(Comparator.comparing(PayWorkingGroupSubItemContacts::getOrderNum));
|
for (PayWorkingGroupSubItem workingGroupSubItem : exportList) {
|
||||||
List<String> listIds = listPayWorkingGroupSubItemContacts.stream().map(PayWorkingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
|
PayWorkingGroupSubItemExcel excel = new PayWorkingGroupSubItemExcel();
|
||||||
List<PayContactsManagementTemporary> listPayContactsManagementTemporary = payContactsManagementTemporaryService.listByIds(listIds);
|
BeanUtils.copyProperties(workingGroupSubItem,excel);
|
||||||
for (int i = 0; i < listPayWorkingGroupSubItemContacts.size(); i++) {
|
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = payWorkingGroupSubItemContactsList.stream().filter(o->Objects.equals(workingGroupSubItem.getId(),o.getWorkingGroupSubId())).collect(Collectors.toList());
|
||||||
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = listPayWorkingGroupSubItemContacts.get(i);
|
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
|
||||||
List<PayContactsManagementTemporary> temporary = listPayContactsManagementTemporary.stream().filter(s->Objects.equals(s.getId(),payWorkingGroupSubItemContacts.getContactsTemporaryId())).collect(Collectors.toList());
|
listPayWorkingGroupSubItemContacts.sort(Comparator.comparing(PayWorkingGroupSubItemContacts::getOrderNum));
|
||||||
String email = "";
|
List<String> listIds = listPayWorkingGroupSubItemContacts.stream().map(PayWorkingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
|
||||||
String phone = "";
|
List<PayContactsManagementTemporary> listPayContactsManagementTemporary = payContactsManagementTemporaryService.listByIds(listIds);
|
||||||
String name = payWorkingGroupSubItemContacts.getContactsTemporaryName();
|
for (int i = 0; i < listPayWorkingGroupSubItemContacts.size(); i++) {
|
||||||
String remark = payWorkingGroupSubItemContacts.getRemarks();
|
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = listPayWorkingGroupSubItemContacts.get(i);
|
||||||
if(!CollectionUtils.isEmpty(temporary)){
|
List<PayContactsManagementTemporary> temporary = listPayContactsManagementTemporary.stream().filter(s->Objects.equals(s.getId(),payWorkingGroupSubItemContacts.getContactsTemporaryId())).collect(Collectors.toList());
|
||||||
email = temporary.get(0).getEmail();
|
String email = "";
|
||||||
if (StringUtils.isNotBlank(email)){
|
String phone = "";
|
||||||
email = PasswordUtil.decrypt(email);
|
String name = payWorkingGroupSubItemContacts.getContactsTemporaryName();
|
||||||
|
String remark = payWorkingGroupSubItemContacts.getRemarks();
|
||||||
|
if(!CollectionUtils.isEmpty(temporary)){
|
||||||
|
email = temporary.get(0).getEmail();
|
||||||
|
if (StringUtils.isNotBlank(email)){
|
||||||
|
email = PasswordUtil.decrypt(email);
|
||||||
|
}
|
||||||
|
phone = temporary.get(0).getPhone();
|
||||||
|
if (StringUtils.isNotBlank(phone)){
|
||||||
|
phone = PasswordUtil.decrypt(phone);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
phone = temporary.get(0).getPhone();
|
switch (i){
|
||||||
if (StringUtils.isNotBlank(phone)){
|
case 0:
|
||||||
phone = PasswordUtil.decrypt(phone);
|
excel.setContactsNameOne(name);
|
||||||
|
excel.setRemarksOne(remark);
|
||||||
|
excel.setContactsEmailOne(email);
|
||||||
|
excel.setContactsPhoneOne(phone);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
excel.setContactsNameTwo(name);
|
||||||
|
excel.setRemarksTwo(remark);
|
||||||
|
excel.setContactsEmailTwo(email);
|
||||||
|
excel.setContactsPhoneTwo(phone);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
excel.setContactsNameThree(name);
|
||||||
|
excel.setRemarksThree(remark);
|
||||||
|
excel.setContactsEmailThree(email);
|
||||||
|
excel.setContactsPhoneThree(phone);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
excel.setContactsNameFour(name);
|
||||||
|
excel.setRemarksFour(remark);
|
||||||
|
excel.setContactsEmailFour(email);
|
||||||
|
excel.setContactsPhoneFour(phone);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
excel.setContactsNameFive(name);
|
||||||
|
excel.setRemarksFive(remark);
|
||||||
|
excel.setContactsEmailFive(email);
|
||||||
|
excel.setContactsPhoneFive(phone);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
excel.setContactsNameSix(name);
|
||||||
|
excel.setRemarksSix(remark);
|
||||||
|
excel.setContactsEmailSix(email);
|
||||||
|
excel.setContactsPhoneSix(phone);
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
excel.setContactsNameSeven(name);
|
||||||
|
excel.setRemarksSeven(remark);
|
||||||
|
excel.setContactsEmailSeven(email);
|
||||||
|
excel.setContactsPhoneSeven(phone);
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
excel.setContactsNameEight(name);
|
||||||
|
excel.setRemarksEight(remark);
|
||||||
|
excel.setContactsEmailEight(email);
|
||||||
|
excel.setContactsPhoneEight(phone);
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
excel.setContactsNameNine(name);
|
||||||
|
excel.setRemarksNine(remark);
|
||||||
|
excel.setContactsEmailNine(email);
|
||||||
|
excel.setContactsPhoneNine(phone);
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
excel.setContactsNameTen(name);
|
||||||
|
excel.setRemarksTen(remark);
|
||||||
|
excel.setContactsEmailTen(email);
|
||||||
|
excel.setContactsPhoneTen(phone);
|
||||||
|
break;
|
||||||
|
default:break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (i){
|
|
||||||
case 0:
|
|
||||||
excel.setContactsNameOne(name);
|
|
||||||
excel.setRemarksOne(remark);
|
|
||||||
excel.setContactsEmailOne(email);
|
|
||||||
excel.setContactsPhoneOne(phone);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
excel.setContactsNameTwo(name);
|
|
||||||
excel.setRemarksTwo(remark);
|
|
||||||
excel.setContactsEmailTwo(email);
|
|
||||||
excel.setContactsPhoneTwo(phone);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
excel.setContactsNameThree(name);
|
|
||||||
excel.setRemarksThree(remark);
|
|
||||||
excel.setContactsEmailThree(email);
|
|
||||||
excel.setContactsPhoneThree(phone);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
excel.setContactsNameFour(name);
|
|
||||||
excel.setRemarksFour(remark);
|
|
||||||
excel.setContactsEmailFour(email);
|
|
||||||
excel.setContactsPhoneFour(phone);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
excel.setContactsNameFive(name);
|
|
||||||
excel.setRemarksFive(remark);
|
|
||||||
excel.setContactsEmailFive(email);
|
|
||||||
excel.setContactsPhoneFive(phone);
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
excel.setContactsNameSix(name);
|
|
||||||
excel.setRemarksSix(remark);
|
|
||||||
excel.setContactsEmailSix(email);
|
|
||||||
excel.setContactsPhoneSix(phone);
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
excel.setContactsNameSeven(name);
|
|
||||||
excel.setRemarksSeven(remark);
|
|
||||||
excel.setContactsEmailSeven(email);
|
|
||||||
excel.setContactsPhoneSeven(phone);
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
excel.setContactsNameEight(name);
|
|
||||||
excel.setRemarksEight(remark);
|
|
||||||
excel.setContactsEmailEight(email);
|
|
||||||
excel.setContactsPhoneEight(phone);
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
excel.setContactsNameNine(name);
|
|
||||||
excel.setRemarksNine(remark);
|
|
||||||
excel.setContactsEmailNine(email);
|
|
||||||
excel.setContactsPhoneNine(phone);
|
|
||||||
break;
|
|
||||||
case 9:
|
|
||||||
excel.setContactsNameTen(name);
|
|
||||||
excel.setRemarksTen(remark);
|
|
||||||
excel.setContactsEmailTen(email);
|
|
||||||
excel.setContactsPhoneTen(phone);
|
|
||||||
break;
|
|
||||||
default:break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
excelList.add(excel);
|
||||||
}
|
}
|
||||||
excelList.add(excel);
|
|
||||||
}
|
}
|
||||||
return super.exportListXls(excelList, PayWorkingGroupSubItemExcel.class, "工作组成员");
|
return super.exportListXls(excelList, PayWorkingGroupSubItemExcel.class, "工作组成员");
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -65,16 +65,16 @@ public class PayWorkingGroupSubItemContacts implements Serializable {
|
|||||||
@ApiModelProperty(value = "创建人")
|
@ApiModelProperty(value = "创建人")
|
||||||
private String createBy;
|
private String createBy;
|
||||||
/**创建时间*/
|
/**创建时间*/
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "创建时间")
|
@ApiModelProperty(value = "创建时间")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
/**更新人*/
|
/**更新人*/
|
||||||
@ApiModelProperty(value = "更新人")
|
@ApiModelProperty(value = "更新人")
|
||||||
private String updateBy;
|
private String updateBy;
|
||||||
/**更新时间*/
|
/**更新时间*/
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "更新时间")
|
@ApiModelProperty(value = "更新时间")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
}
|
}
|
||||||
|
|||||||
+62
-43
@@ -124,31 +124,31 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
@Override
|
@Override
|
||||||
public IPage<PayWorkingGroupSubItem> queryPageList(Page<PayWorkingGroupSubItem> page, PayWorkingGroupSubItem payWorkingGroupSubitem,String paymentDate) {
|
public IPage<PayWorkingGroupSubItem> queryPageList(Page<PayWorkingGroupSubItem> page, PayWorkingGroupSubItem payWorkingGroupSubitem,String paymentDate) {
|
||||||
IPage<PayWorkingGroupSubItem> payWorkingGroupSubItemIPage = payWorkingGroupSubItemMapper.queryPageList(page, payWorkingGroupSubitem, paymentDate);
|
IPage<PayWorkingGroupSubItem> payWorkingGroupSubItemIPage = payWorkingGroupSubItemMapper.queryPageList(page, payWorkingGroupSubitem, paymentDate);
|
||||||
if (StringUtils.isNotBlank(payWorkingGroupSubitem.getMeetingId())){
|
List<PayWorkingGroupSubItem> records = payWorkingGroupSubItemIPage.getRecords();
|
||||||
List<PayWorkingGroupSubItem> records = payWorkingGroupSubItemIPage.getRecords();
|
if(!CollectionUtils.isEmpty(records)){
|
||||||
if(!CollectionUtils.isEmpty(records)){
|
// 获取企业联系人
|
||||||
// 获取企业联系人
|
List<String> listIds = records.stream().map(PayWorkingGroupSubItem::getId).collect(Collectors.toList());
|
||||||
List<String> listIds = records.stream().map(PayWorkingGroupSubItem::getId).collect(Collectors.toList());
|
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
|
||||||
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
|
queryPayWorkingGroupSubItemContacts.in(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,listIds);
|
||||||
queryPayWorkingGroupSubItemContacts.in(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,listIds);
|
List<PayWorkingGroupSubItemContacts> payWorkingGroupSubItemContactsList = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
|
||||||
List<PayWorkingGroupSubItemContacts> payWorkingGroupSubItemContactsList = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
|
for (PayWorkingGroupSubItem workingGroupSubItem : records) {
|
||||||
for (PayWorkingGroupSubItem workingGroupSubItem : records) {
|
if (StringUtils.isNotBlank(payWorkingGroupSubitem.getMeetingId())) {
|
||||||
String workingGroupSubItemId = workingGroupSubItem.getId();
|
String workingGroupSubItemId = workingGroupSubItem.getId();
|
||||||
LambdaQueryWrapper<PayMeetingRemindRecord> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<PayMeetingRemindRecord> wrapper = new LambdaQueryWrapper<>();
|
||||||
wrapper.eq(PayMeetingRemindRecord::getSubitemId,workingGroupSubItemId);
|
wrapper.eq(PayMeetingRemindRecord::getSubitemId, workingGroupSubItemId);
|
||||||
wrapper.eq(PayMeetingRemindRecord::getMeetingId,payWorkingGroupSubitem.getMeetingId());
|
wrapper.eq(PayMeetingRemindRecord::getMeetingId, payWorkingGroupSubitem.getMeetingId());
|
||||||
int count = payMeetingRemindRecordService.count(wrapper);
|
int count = payMeetingRemindRecordService.count(wrapper);
|
||||||
if (count>0){
|
if (count > 0) {
|
||||||
workingGroupSubItem.setRemind(PayProjectCommon.YES);
|
workingGroupSubItem.setRemind(PayProjectCommon.YES);
|
||||||
}else {
|
} else {
|
||||||
workingGroupSubItem.setRemind(PayProjectCommon.NO);
|
workingGroupSubItem.setRemind(PayProjectCommon.NO);
|
||||||
}
|
}
|
||||||
if(!CollectionUtils.isEmpty(payWorkingGroupSubItemContactsList)){
|
}
|
||||||
List<PayWorkingGroupSubItemContacts> pwg = payWorkingGroupSubItemContactsList.stream().filter(p->Objects.equals(p.getWorkingGroupSubId(),workingGroupSubItem.getId())).collect(Collectors.toList());
|
if(!CollectionUtils.isEmpty(payWorkingGroupSubItemContactsList)){
|
||||||
if(!CollectionUtils.isEmpty(pwg)){
|
List<PayWorkingGroupSubItemContacts> pwg = payWorkingGroupSubItemContactsList.stream().filter(p->Objects.equals(p.getWorkingGroupSubId(),workingGroupSubItem.getId())).collect(Collectors.toList());
|
||||||
pwg.sort(Comparator.comparing(PayWorkingGroupSubItemContacts::getOrderNum));
|
if(!CollectionUtils.isEmpty(pwg)){
|
||||||
workingGroupSubItem.setPayWorkingGroupSubItemContactsList(pwg);
|
pwg.sort(Comparator.comparing(PayWorkingGroupSubItemContacts::getOrderNum));
|
||||||
}
|
workingGroupSubItem.setPayWorkingGroupSubItemContactsList(pwg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -157,8 +157,17 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional(rollbackFor = JeroBootException.class)
|
||||||
public void addPayWorkingGroupSubItem(PayWorkingGroupSubItem payWorkingGroupSubItem) {
|
public void addPayWorkingGroupSubItem(PayWorkingGroupSubItem payWorkingGroupSubItem) {
|
||||||
|
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = payWorkingGroupSubItem.getPayWorkingGroupSubItemContactsList();
|
||||||
|
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
|
||||||
|
long oldNum = listPayWorkingGroupSubItemContacts.size();
|
||||||
|
long newNum = listPayWorkingGroupSubItemContacts.stream().map(PayWorkingGroupSubItemContacts::getContactsId).collect(Collectors.toList()).stream().distinct().count();
|
||||||
|
if(oldNum != newNum){
|
||||||
|
throw new JeroBootException("企业联系人重复");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(Objects.equals(payWorkingGroupSubItem.getChargeWay(),PayProjectCommon.CHARGE_WAY2)){
|
if(Objects.equals(payWorkingGroupSubItem.getChargeWay(),PayProjectCommon.CHARGE_WAY2)){
|
||||||
if(Objects.isNull(payWorkingGroupSubItem.getReceivableAmount())){
|
if(Objects.isNull(payWorkingGroupSubItem.getReceivableAmount())){
|
||||||
throw new JeroBootException("应收金额不能为空");
|
throw new JeroBootException("应收金额不能为空");
|
||||||
@@ -167,7 +176,7 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
throw new JeroBootException("合同号不能为空");
|
throw new JeroBootException("合同号不能为空");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(payWorkingGroupSubItem.getChargeWay() == PayProjectCommon.CHARGE_WAY3){
|
if(Objects.equals(payWorkingGroupSubItem.getChargeWay(),PayProjectCommon.CHARGE_WAY3)){
|
||||||
if(Objects.isNull(payWorkingGroupSubItem.getChargeNoticeNo())){
|
if(Objects.isNull(payWorkingGroupSubItem.getChargeNoticeNo())){
|
||||||
throw new JeroBootException("收费通知号不能为空");
|
throw new JeroBootException("收费通知号不能为空");
|
||||||
}
|
}
|
||||||
@@ -205,15 +214,15 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
payWorkingGroupSubItem.setMail(PayProjectCommon.MAIL0);
|
payWorkingGroupSubItem.setMail(PayProjectCommon.MAIL0);
|
||||||
payWorkingGroupSubItem.setChargeUse(PayProjectCommon.CHARGE_USE1);
|
payWorkingGroupSubItem.setChargeUse(PayProjectCommon.CHARGE_USE1);
|
||||||
payWorkingGroupSubItemService.save(payWorkingGroupSubItem);
|
payWorkingGroupSubItemService.save(payWorkingGroupSubItem);
|
||||||
|
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContactsNew = payWorkingGroupSubItem.getPayWorkingGroupSubItemContactsList();
|
||||||
// 添加联系人表
|
// 添加联系人表
|
||||||
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = payWorkingGroupSubItem.getPayWorkingGroupSubItemContactsList();
|
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContactsNew)){
|
||||||
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
|
for (int i = 0; i < listPayWorkingGroupSubItemContactsNew.size(); i++) {
|
||||||
for (int i = 0; i < listPayWorkingGroupSubItemContacts.size(); i++) {
|
listPayWorkingGroupSubItemContactsNew.get(i).setOrderNum(i+1);
|
||||||
listPayWorkingGroupSubItemContacts.get(i).setOrderNum(i+1);
|
listPayWorkingGroupSubItemContactsNew.get(i).setWorkingGroupId(payWorkingGroupSubItem.getWorkingGroupId());
|
||||||
listPayWorkingGroupSubItemContacts.get(i).setWorkingGroupId(payWorkingGroupSubItem.getWorkingGroupId());
|
listPayWorkingGroupSubItemContactsNew.get(i).setWorkingGroupSubId(payWorkingGroupSubItem.getId());
|
||||||
listPayWorkingGroupSubItemContacts.get(i).setWorkingGroupSubId(payWorkingGroupSubItem.getId());
|
|
||||||
}
|
}
|
||||||
payWorkingGroupSubItemContactsService.saveBatch(listPayWorkingGroupSubItemContacts);
|
payWorkingGroupSubItemContactsService.saveBatch(listPayWorkingGroupSubItemContactsNew);
|
||||||
}
|
}
|
||||||
List<String> listFile = new ArrayList<>();
|
List<String> listFile = new ArrayList<>();
|
||||||
// 获取收费通知
|
// 获取收费通知
|
||||||
@@ -325,6 +334,7 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void editPayWorkingGroupSubItem(PayWorkingGroupSubItem payWorkingGroupSubItem) {
|
public void editPayWorkingGroupSubItem(PayWorkingGroupSubItem payWorkingGroupSubItem) {
|
||||||
|
|
||||||
PayWorkingGroupSubItem payWorkingGroupSubItemOld = payWorkingGroupSubItemService.getById(payWorkingGroupSubItem.getId());
|
PayWorkingGroupSubItem payWorkingGroupSubItemOld = payWorkingGroupSubItemService.getById(payWorkingGroupSubItem.getId());
|
||||||
if(Objects.isNull(payWorkingGroupSubItemOld)){
|
if(Objects.isNull(payWorkingGroupSubItemOld)){
|
||||||
throw new JeroBootException("项目不存在!");
|
throw new JeroBootException("项目不存在!");
|
||||||
@@ -417,6 +427,16 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
payWorkingGroupSubItemOld.setPayWorkingGroupSubItemContactsList(listPayWorkingGroupSubItemContacts);
|
payWorkingGroupSubItemOld.setPayWorkingGroupSubItemContactsList(listPayWorkingGroupSubItemContacts);
|
||||||
}
|
}
|
||||||
setPayWorkingGroupSubItemEdit(payWorkingGroupSubItem,payWorkingGroupSubItemOld);
|
setPayWorkingGroupSubItemEdit(payWorkingGroupSubItem,payWorkingGroupSubItemOld);
|
||||||
|
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContactsNew = payWorkingGroupSubItem.getPayWorkingGroupSubItemContactsList();
|
||||||
|
// 添加联系人表
|
||||||
|
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContactsNew)){
|
||||||
|
for (int i = 0; i < listPayWorkingGroupSubItemContactsNew.size(); i++) {
|
||||||
|
listPayWorkingGroupSubItemContactsNew.get(i).setOrderNum(i+1);
|
||||||
|
listPayWorkingGroupSubItemContactsNew.get(i).setWorkingGroupId(payWorkingGroupSubItem.getWorkingGroupId());
|
||||||
|
listPayWorkingGroupSubItemContactsNew.get(i).setWorkingGroupSubId(payWorkingGroupSubItem.getId());
|
||||||
|
}
|
||||||
|
payWorkingGroupSubItemContactsService.saveBatch(listPayWorkingGroupSubItemContactsNew);
|
||||||
|
}
|
||||||
payWorkingGroupSubItem.setChargeUse(PayProjectCommon.CHARGE_USE1);
|
payWorkingGroupSubItem.setChargeUse(PayProjectCommon.CHARGE_USE1);
|
||||||
// 变更应收金额,重新校验状态
|
// 变更应收金额,重新校验状态
|
||||||
ProjectStatusVO projectStatusVO = projectDetailService.getStatus(payWorkingGroupSubItem.getId(),payWorkingGroupSubItem.getReceivableAmount(),payWorkingGroupSubItem.getNeedInvoice());
|
ProjectStatusVO projectStatusVO = projectDetailService.getStatus(payWorkingGroupSubItem.getId(),payWorkingGroupSubItem.getReceivableAmount(),payWorkingGroupSubItem.getNeedInvoice());
|
||||||
@@ -458,7 +478,7 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional(rollbackFor = JeroBootException.class)
|
||||||
public void importExcel(HttpServletRequest request) {
|
public void importExcel(HttpServletRequest request) {
|
||||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||||
String workGroupId;
|
String workGroupId;
|
||||||
@@ -686,10 +706,11 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
list.forEach(p->{
|
list.forEach(p->{
|
||||||
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = p.getPayWorkingGroupSubItemContactsList();
|
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = p.getPayWorkingGroupSubItemContactsList();
|
||||||
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
|
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
|
||||||
listPayWorkingGroupSubItemContacts.forEach(s->{
|
for (int i = 0; i < listPayWorkingGroupSubItemContacts.size(); i++) {
|
||||||
s.setWorkingGroupId(p.getWorkingGroupId());
|
listPayWorkingGroupSubItemContacts.get(i).setWorkingGroupId(p.getWorkingGroupId());
|
||||||
s.setWorkingGroupSubId(p.getId());
|
listPayWorkingGroupSubItemContacts.get(i).setWorkingGroupSubId(p.getId());
|
||||||
});
|
listPayWorkingGroupSubItemContacts.get(i).setOrderNum(i + 1);
|
||||||
|
}
|
||||||
payWorkingGroupSubItemContactsService.saveBatch(listPayWorkingGroupSubItemContacts);
|
payWorkingGroupSubItemContactsService.saveBatch(listPayWorkingGroupSubItemContacts);
|
||||||
}
|
}
|
||||||
PayIncomeContract payIncomeContract = p.getPayIncomeContract();
|
PayIncomeContract payIncomeContract = p.getPayIncomeContract();
|
||||||
@@ -794,9 +815,9 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = new PayWorkingGroupSubItemContacts();
|
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = new PayWorkingGroupSubItemContacts();
|
||||||
if(map.containsKey(name)){
|
if(map.containsKey(name)){
|
||||||
int c = map.get(name);
|
int c = map.get(name);
|
||||||
msg.append("第").append(count + 3).append("行:企业联系人").append(c).append("与企业联系人3重复,请修改。<br/>");
|
msg.append("第").append(count + 3).append("行:企业联系人").append(c).append("与企业联系人").append(num).append("重复,请修改。<br/>");
|
||||||
}else{
|
}else{
|
||||||
map.put(name,3);
|
map.put(name,num);
|
||||||
}
|
}
|
||||||
if (!CollectionUtils.isEmpty(listCompany)) {
|
if (!CollectionUtils.isEmpty(listCompany)) {
|
||||||
// 通过联系人获取联系人id
|
// 通过联系人获取联系人id
|
||||||
@@ -1158,15 +1179,13 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
payWorkingGroupSubItemContactsService.remove(updatePayWorkingGroupSubItemContacts);
|
payWorkingGroupSubItemContactsService.remove(updatePayWorkingGroupSubItemContacts);
|
||||||
// 新增
|
// 新增
|
||||||
for (int i = 0; i < payWorkingGroupSubItemContactsList.size(); i++) {
|
for (int i = 0; i < payWorkingGroupSubItemContactsList.size(); i++) {
|
||||||
if(!Objects.equals(payWorkingGroupSubItemOld.getContactsTemporaryIdOne(),payWorkingGroupSubItem.getContactsIdOne())) {
|
// 企业联系人
|
||||||
// 企业联系人
|
PayContactsManagementTemporary contactsName = payContactsManagementTemporaryService.insertContactsManagementTemporary(payWorkingGroupSubItemContactsList.get(i).getContactsId());
|
||||||
PayContactsManagementTemporary contactsName = payContactsManagementTemporaryService.insertContactsManagementTemporary(payWorkingGroupSubItemContactsList.get(i).getContactsId());
|
if (Objects.isNull(contactsName)) {
|
||||||
if (Objects.isNull(contactsName)) {
|
throw new JeroBootException("企业联系人" + (i + 1) + "名称为空!");
|
||||||
throw new JeroBootException("企业联系人" + (i + 1) + "名称为空!");
|
|
||||||
}
|
|
||||||
payWorkingGroupSubItemContactsList.get(i).setContactsTemporaryId(contactsName.getId());
|
|
||||||
payWorkingGroupSubItemContactsList.get(i).setContactsTemporaryName(contactsName.getName());
|
|
||||||
}
|
}
|
||||||
|
payWorkingGroupSubItemContactsList.get(i).setContactsTemporaryId(contactsName.getId());
|
||||||
|
payWorkingGroupSubItemContactsList.get(i).setContactsTemporaryName(contactsName.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!Objects.equals(payWorkingGroupSubItemOld.getMailContactsTemporaryId(),payWorkingGroupSubItem.getMailContactsId())){
|
if(!Objects.equals(payWorkingGroupSubItemOld.getMailContactsTemporaryId(),payWorkingGroupSubItem.getMailContactsId())){
|
||||||
|
|||||||
Reference in New Issue
Block a user