工作组变更
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.PayWorkingGroupSubItemContacts;
|
||||
import com.jero.project.service.IPayWorkingGroupService;
|
||||
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
|
||||
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
||||
import com.jero.project.vo.SetChargeInput;
|
||||
import com.jero.project.vo.excel.PayWorkingGroupSubItemExcel;
|
||||
@@ -97,6 +98,8 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
|
||||
private RolePermissionService rolePermissionService;
|
||||
@Resource
|
||||
private ISysUserService sysUserService;
|
||||
@Resource
|
||||
private IPayWorkingGroupSubItemContactsService payWorkingGroupSubItemContactsService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@@ -525,97 +528,103 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
|
||||
exportList = pageList;
|
||||
}
|
||||
List<PayWorkingGroupSubItemExcel> excelList = new ArrayList<>();
|
||||
for (PayWorkingGroupSubItem workingGroupSubItem : exportList) {
|
||||
PayWorkingGroupSubItemExcel excel = new PayWorkingGroupSubItemExcel();
|
||||
BeanUtils.copyProperties(workingGroupSubItem,excel);
|
||||
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = workingGroupSubItem.getPayWorkingGroupSubItemContactsList();
|
||||
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
|
||||
listPayWorkingGroupSubItemContacts.sort(Comparator.comparing(PayWorkingGroupSubItemContacts::getOrderNum));
|
||||
List<String> listIds = listPayWorkingGroupSubItemContacts.stream().map(PayWorkingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
|
||||
List<PayContactsManagementTemporary> listPayContactsManagementTemporary = payContactsManagementTemporaryService.listByIds(listIds);
|
||||
for (int i = 0; i < listPayWorkingGroupSubItemContacts.size(); i++) {
|
||||
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = listPayWorkingGroupSubItemContacts.get(i);
|
||||
List<PayContactsManagementTemporary> temporary = listPayContactsManagementTemporary.stream().filter(s->Objects.equals(s.getId(),payWorkingGroupSubItemContacts.getContactsTemporaryId())).collect(Collectors.toList());
|
||||
String email = "";
|
||||
String phone = "";
|
||||
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);
|
||||
if(!CollectionUtils.isEmpty(exportList)){
|
||||
List<String> listWGSIds = exportList.stream().map(PayWorkingGroupSubItem::getId).collect(Collectors.toList());
|
||||
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
|
||||
queryPayWorkingGroupSubItemContacts.in(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,listWGSIds);
|
||||
List<PayWorkingGroupSubItemContacts> payWorkingGroupSubItemContactsList = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
|
||||
for (PayWorkingGroupSubItem workingGroupSubItem : exportList) {
|
||||
PayWorkingGroupSubItemExcel excel = new PayWorkingGroupSubItemExcel();
|
||||
BeanUtils.copyProperties(workingGroupSubItem,excel);
|
||||
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = payWorkingGroupSubItemContactsList.stream().filter(o->Objects.equals(workingGroupSubItem.getId(),o.getWorkingGroupSubId())).collect(Collectors.toList());
|
||||
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
|
||||
listPayWorkingGroupSubItemContacts.sort(Comparator.comparing(PayWorkingGroupSubItemContacts::getOrderNum));
|
||||
List<String> listIds = listPayWorkingGroupSubItemContacts.stream().map(PayWorkingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
|
||||
List<PayContactsManagementTemporary> listPayContactsManagementTemporary = payContactsManagementTemporaryService.listByIds(listIds);
|
||||
for (int i = 0; i < listPayWorkingGroupSubItemContacts.size(); i++) {
|
||||
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = listPayWorkingGroupSubItemContacts.get(i);
|
||||
List<PayContactsManagementTemporary> temporary = listPayContactsManagementTemporary.stream().filter(s->Objects.equals(s.getId(),payWorkingGroupSubItemContacts.getContactsTemporaryId())).collect(Collectors.toList());
|
||||
String email = "";
|
||||
String phone = "";
|
||||
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();
|
||||
if (StringUtils.isNotBlank(phone)){
|
||||
phone = PasswordUtil.decrypt(phone);
|
||||
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;
|
||||
}
|
||||
}
|
||||
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, "工作组成员");
|
||||
}
|
||||
|
||||
+4
-4
@@ -65,16 +65,16 @@ public class PayWorkingGroupSubItemContacts implements Serializable {
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**创建时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**更新时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
|
||||
+62
-43
@@ -124,31 +124,31 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
||||
@Override
|
||||
public IPage<PayWorkingGroupSubItem> queryPageList(Page<PayWorkingGroupSubItem> page, PayWorkingGroupSubItem payWorkingGroupSubitem,String paymentDate) {
|
||||
IPage<PayWorkingGroupSubItem> payWorkingGroupSubItemIPage = payWorkingGroupSubItemMapper.queryPageList(page, payWorkingGroupSubitem, paymentDate);
|
||||
if (StringUtils.isNotBlank(payWorkingGroupSubitem.getMeetingId())){
|
||||
List<PayWorkingGroupSubItem> records = payWorkingGroupSubItemIPage.getRecords();
|
||||
if(!CollectionUtils.isEmpty(records)){
|
||||
// 获取企业联系人
|
||||
List<String> listIds = records.stream().map(PayWorkingGroupSubItem::getId).collect(Collectors.toList());
|
||||
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
|
||||
queryPayWorkingGroupSubItemContacts.in(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,listIds);
|
||||
List<PayWorkingGroupSubItemContacts> payWorkingGroupSubItemContactsList = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
|
||||
for (PayWorkingGroupSubItem workingGroupSubItem : records) {
|
||||
List<PayWorkingGroupSubItem> records = payWorkingGroupSubItemIPage.getRecords();
|
||||
if(!CollectionUtils.isEmpty(records)){
|
||||
// 获取企业联系人
|
||||
List<String> listIds = records.stream().map(PayWorkingGroupSubItem::getId).collect(Collectors.toList());
|
||||
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
|
||||
queryPayWorkingGroupSubItemContacts.in(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,listIds);
|
||||
List<PayWorkingGroupSubItemContacts> payWorkingGroupSubItemContactsList = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
|
||||
for (PayWorkingGroupSubItem workingGroupSubItem : records) {
|
||||
if (StringUtils.isNotBlank(payWorkingGroupSubitem.getMeetingId())) {
|
||||
String workingGroupSubItemId = workingGroupSubItem.getId();
|
||||
LambdaQueryWrapper<PayMeetingRemindRecord> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingRemindRecord::getSubitemId,workingGroupSubItemId);
|
||||
wrapper.eq(PayMeetingRemindRecord::getMeetingId,payWorkingGroupSubitem.getMeetingId());
|
||||
wrapper.eq(PayMeetingRemindRecord::getSubitemId, workingGroupSubItemId);
|
||||
wrapper.eq(PayMeetingRemindRecord::getMeetingId, payWorkingGroupSubitem.getMeetingId());
|
||||
int count = payMeetingRemindRecordService.count(wrapper);
|
||||
if (count>0){
|
||||
if (count > 0) {
|
||||
workingGroupSubItem.setRemind(PayProjectCommon.YES);
|
||||
}else {
|
||||
} else {
|
||||
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(pwg)){
|
||||
pwg.sort(Comparator.comparing(PayWorkingGroupSubItemContacts::getOrderNum));
|
||||
workingGroupSubItem.setPayWorkingGroupSubItemContactsList(pwg);
|
||||
}
|
||||
}
|
||||
if(!CollectionUtils.isEmpty(payWorkingGroupSubItemContactsList)){
|
||||
List<PayWorkingGroupSubItemContacts> pwg = payWorkingGroupSubItemContactsList.stream().filter(p->Objects.equals(p.getWorkingGroupSubId(),workingGroupSubItem.getId())).collect(Collectors.toList());
|
||||
if(!CollectionUtils.isEmpty(pwg)){
|
||||
pwg.sort(Comparator.comparing(PayWorkingGroupSubItemContacts::getOrderNum));
|
||||
workingGroupSubItem.setPayWorkingGroupSubItemContactsList(pwg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -157,8 +157,17 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@Transactional(rollbackFor = JeroBootException.class)
|
||||
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.isNull(payWorkingGroupSubItem.getReceivableAmount())){
|
||||
throw new JeroBootException("应收金额不能为空");
|
||||
@@ -167,7 +176,7 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
||||
throw new JeroBootException("合同号不能为空");
|
||||
}
|
||||
}
|
||||
if(payWorkingGroupSubItem.getChargeWay() == PayProjectCommon.CHARGE_WAY3){
|
||||
if(Objects.equals(payWorkingGroupSubItem.getChargeWay(),PayProjectCommon.CHARGE_WAY3)){
|
||||
if(Objects.isNull(payWorkingGroupSubItem.getChargeNoticeNo())){
|
||||
throw new JeroBootException("收费通知号不能为空");
|
||||
}
|
||||
@@ -205,15 +214,15 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
||||
payWorkingGroupSubItem.setMail(PayProjectCommon.MAIL0);
|
||||
payWorkingGroupSubItem.setChargeUse(PayProjectCommon.CHARGE_USE1);
|
||||
payWorkingGroupSubItemService.save(payWorkingGroupSubItem);
|
||||
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContactsNew = payWorkingGroupSubItem.getPayWorkingGroupSubItemContactsList();
|
||||
// 添加联系人表
|
||||
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = payWorkingGroupSubItem.getPayWorkingGroupSubItemContactsList();
|
||||
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
|
||||
for (int i = 0; i < listPayWorkingGroupSubItemContacts.size(); i++) {
|
||||
listPayWorkingGroupSubItemContacts.get(i).setOrderNum(i+1);
|
||||
listPayWorkingGroupSubItemContacts.get(i).setWorkingGroupId(payWorkingGroupSubItem.getWorkingGroupId());
|
||||
listPayWorkingGroupSubItemContacts.get(i).setWorkingGroupSubId(payWorkingGroupSubItem.getId());
|
||||
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(listPayWorkingGroupSubItemContacts);
|
||||
payWorkingGroupSubItemContactsService.saveBatch(listPayWorkingGroupSubItemContactsNew);
|
||||
}
|
||||
List<String> listFile = new ArrayList<>();
|
||||
// 获取收费通知
|
||||
@@ -325,6 +334,7 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
||||
@Override
|
||||
@Transactional
|
||||
public void editPayWorkingGroupSubItem(PayWorkingGroupSubItem payWorkingGroupSubItem) {
|
||||
|
||||
PayWorkingGroupSubItem payWorkingGroupSubItemOld = payWorkingGroupSubItemService.getById(payWorkingGroupSubItem.getId());
|
||||
if(Objects.isNull(payWorkingGroupSubItemOld)){
|
||||
throw new JeroBootException("项目不存在!");
|
||||
@@ -417,6 +427,16 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
||||
payWorkingGroupSubItemOld.setPayWorkingGroupSubItemContactsList(listPayWorkingGroupSubItemContacts);
|
||||
}
|
||||
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);
|
||||
// 变更应收金额,重新校验状态
|
||||
ProjectStatusVO projectStatusVO = projectDetailService.getStatus(payWorkingGroupSubItem.getId(),payWorkingGroupSubItem.getReceivableAmount(),payWorkingGroupSubItem.getNeedInvoice());
|
||||
@@ -458,7 +478,7 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@Transactional(rollbackFor = JeroBootException.class)
|
||||
public void importExcel(HttpServletRequest request) {
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
String workGroupId;
|
||||
@@ -686,10 +706,11 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
||||
list.forEach(p->{
|
||||
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = p.getPayWorkingGroupSubItemContactsList();
|
||||
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
|
||||
listPayWorkingGroupSubItemContacts.forEach(s->{
|
||||
s.setWorkingGroupId(p.getWorkingGroupId());
|
||||
s.setWorkingGroupSubId(p.getId());
|
||||
});
|
||||
for (int i = 0; i < listPayWorkingGroupSubItemContacts.size(); i++) {
|
||||
listPayWorkingGroupSubItemContacts.get(i).setWorkingGroupId(p.getWorkingGroupId());
|
||||
listPayWorkingGroupSubItemContacts.get(i).setWorkingGroupSubId(p.getId());
|
||||
listPayWorkingGroupSubItemContacts.get(i).setOrderNum(i + 1);
|
||||
}
|
||||
payWorkingGroupSubItemContactsService.saveBatch(listPayWorkingGroupSubItemContacts);
|
||||
}
|
||||
PayIncomeContract payIncomeContract = p.getPayIncomeContract();
|
||||
@@ -794,9 +815,9 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
||||
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = new PayWorkingGroupSubItemContacts();
|
||||
if(map.containsKey(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{
|
||||
map.put(name,3);
|
||||
map.put(name,num);
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(listCompany)) {
|
||||
// 通过联系人获取联系人id
|
||||
@@ -1158,15 +1179,13 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
||||
payWorkingGroupSubItemContactsService.remove(updatePayWorkingGroupSubItemContacts);
|
||||
// 新增
|
||||
for (int i = 0; i < payWorkingGroupSubItemContactsList.size(); i++) {
|
||||
if(!Objects.equals(payWorkingGroupSubItemOld.getContactsTemporaryIdOne(),payWorkingGroupSubItem.getContactsIdOne())) {
|
||||
// 企业联系人
|
||||
PayContactsManagementTemporary contactsName = payContactsManagementTemporaryService.insertContactsManagementTemporary(payWorkingGroupSubItemContactsList.get(i).getContactsId());
|
||||
if (Objects.isNull(contactsName)) {
|
||||
throw new JeroBootException("企业联系人" + (i + 1) + "名称为空!");
|
||||
}
|
||||
payWorkingGroupSubItemContactsList.get(i).setContactsTemporaryId(contactsName.getId());
|
||||
payWorkingGroupSubItemContactsList.get(i).setContactsTemporaryName(contactsName.getName());
|
||||
// 企业联系人
|
||||
PayContactsManagementTemporary contactsName = payContactsManagementTemporaryService.insertContactsManagementTemporary(payWorkingGroupSubItemContactsList.get(i).getContactsId());
|
||||
if (Objects.isNull(contactsName)) {
|
||||
throw new JeroBootException("企业联系人" + (i + 1) + "名称为空!");
|
||||
}
|
||||
payWorkingGroupSubItemContactsList.get(i).setContactsTemporaryId(contactsName.getId());
|
||||
payWorkingGroupSubItemContactsList.get(i).setContactsTemporaryName(contactsName.getName());
|
||||
}
|
||||
}
|
||||
if(!Objects.equals(payWorkingGroupSubItemOld.getMailContactsTemporaryId(),payWorkingGroupSubItem.getMailContactsId())){
|
||||
|
||||
Reference in New Issue
Block a user