fix 参会人没有保存企业和联系人
This commit is contained in:
+14
-10
@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
@@ -26,6 +27,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.meeting.vo.PayMeetingVO;
|
||||
import com.jero.meeting.vo.UploadFileVO;
|
||||
import com.jero.meeting.vo.WorkingGroupMeetingExel;
|
||||
import com.jero.modules.system.volid.group.UpdateGroup;
|
||||
import com.jero.project.entity.PayWorkingGroup;
|
||||
@@ -308,16 +310,18 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取对象ID
|
||||
*
|
||||
* @return
|
||||
* 上传资料
|
||||
*/
|
||||
private String getId(PayMeeting item) {
|
||||
try {
|
||||
return PropertyUtils.getProperty(item, "id").toString();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
@AutoLog(value = "上传资料")
|
||||
@ApiOperation(value="上传资料", notes="上传资料")
|
||||
@PostMapping(value = "/uploadFile")
|
||||
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
||||
String fileIds = uploadFileVO.getFileIds();
|
||||
String id = uploadFileVO.getId();
|
||||
LambdaUpdateWrapper<PayMeeting> wrapper = new LambdaUpdateWrapper<>();
|
||||
wrapper.eq(PayMeeting::getId,id);
|
||||
wrapper.set(PayMeeting::getMeetingData,fileIds);
|
||||
payMeetingService.update(wrapper);
|
||||
return Result.OK("上传资料成功!");
|
||||
}
|
||||
}
|
||||
|
||||
-11
@@ -59,7 +59,6 @@ public class PayMeetingSituationController extends JeroController<PayMeetingSitu
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, req.getParameterMap());
|
||||
queryWrapper.ne("status", MeetingSubitemCommon.STATUS_1);
|
||||
Page<PayMeetingSituation> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMeetingSituation> pageList = payMeetingSituationService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
@@ -170,16 +169,6 @@ public class PayMeetingSituationController extends JeroController<PayMeetingSitu
|
||||
public ModelAndView exportXls(HttpServletRequest request, PayMeetingSituation payMeetingSituation) {
|
||||
return super.exportXls(request, payMeetingSituation, PayMeetingSituation.class, "参会人员信息");
|
||||
}
|
||||
/**
|
||||
* 上传资料
|
||||
*/
|
||||
@AutoLog(value = "上传资料")
|
||||
@ApiOperation(value="上传资料", notes="上传资料")
|
||||
@PostMapping(value = "/uploadFile")
|
||||
public Result<?> uploadFile(@RequestBody AddDockVO addDockVO) {
|
||||
payMeetingSituationService.addDock(addDockVO);
|
||||
return Result.OK("上传资料成功!");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
+10
-21
@@ -68,6 +68,8 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
@Override
|
||||
public void add(PayMeetingSituation payMeetingSituation) {
|
||||
payMeetingSituation.setStatus(MeetingSubitemCommon.STATUS_3);
|
||||
payMeetingSituation.setNeedInvoice(PayProjectCommon.NO);
|
||||
payMeetingSituation.setAmountReceivable(new BigDecimal("0"));
|
||||
PayMeetingSituation payMeetingSituation1 = getPayMeetingSituation(payMeetingSituation);
|
||||
|
||||
saveMeetingSituation(payMeetingSituation1);
|
||||
@@ -157,7 +159,6 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
|
||||
@NotNull
|
||||
private PayMeetingSituation getPayMeetingSituation(PayMeetingSituation payMeetingSituation) {
|
||||
Integer status = payMeetingSituation.getStatus();
|
||||
String meetingId = payMeetingSituation.getMeetingId();
|
||||
PayMeeting payMeeting = meetingService.getById(meetingId);
|
||||
//会议类型
|
||||
@@ -174,21 +175,13 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
//校验企业
|
||||
String companyId = meetingEntity.getCompanyId();
|
||||
PayCompanyManagement companyManagement = companyManagementService.getById(companyId);
|
||||
//
|
||||
if (status.equals(MeetingSubitemCommon.STATUS_1)) {
|
||||
//处理报名时公司信息
|
||||
baoMingCompany(payMeetingSituation, companyId, companyManagement);
|
||||
}else {
|
||||
canHuiRenCompany(payMeetingSituation, companyManagement);
|
||||
}
|
||||
//处理企业
|
||||
canHuiRenCompany(payMeetingSituation1, companyManagement);
|
||||
//校验企业联系人
|
||||
String companyContactId = meetingEntity.getCompanyContactId();
|
||||
PayContactsManagement contactsManagement = contactsManagementService.getById(companyContactId);
|
||||
if (status.equals(MeetingSubitemCommon.STATUS_1)){
|
||||
baoMingContact(payMeetingSituation, companyId, companyContactId, contactsManagement);
|
||||
}else {
|
||||
canHuiContact(payMeetingSituation, companyId, contactsManagement);
|
||||
}
|
||||
//处理联系人
|
||||
canHuiContact(payMeetingSituation1, companyId, contactsManagement);
|
||||
|
||||
//判断身份
|
||||
Integer identity = payMeetingSituation.getIdentity();
|
||||
@@ -239,6 +232,7 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
CommonPeopleVO commonPeopleVO = new CommonPeopleVO();
|
||||
BeanUtils.copyProperties(payMeetingSituation, commonPeopleVO);
|
||||
Integer payMode = commonPeopleVO.getPayMode();
|
||||
payMeetingSituation1.setPayMode(payMode);
|
||||
//缴费方式为打包时,不处理邮寄联系人和地址
|
||||
if (payMode.equals(MeetingSubitemCommon.PAY_MODE_PACK)) {
|
||||
ValidUtil.validate(commonPeopleVO, NotPack.class);
|
||||
@@ -248,6 +242,7 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
} else {
|
||||
//存入打包字段
|
||||
payMeetingSituation1.setPack(PayProjectCommon.PACKAGING0);
|
||||
payMeetingSituation1.setNeedInvoice(payMeetingSituation.getNeedInvoice());
|
||||
//如果是标协会议判断会员类型
|
||||
if (meetingType.equals(Integer.parseInt(MeetingCommon.STANDARD_MEETING))){
|
||||
//根据企业名称和会员类型不为null判断是否为标协会员
|
||||
@@ -271,14 +266,8 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
//校验是否是选择的企业的联系人
|
||||
String companyId2 = postContact.getCompanyId();
|
||||
if (companyId2.equals(companyId)) {
|
||||
if (status.equals(MeetingSubitemCommon.STATUS_1)){
|
||||
PayContactsManagementTemporary contactsManagementTemporary = contactsManagementTemporaryService.insertContactsManagementTemporary(postContactId);
|
||||
payMeetingSituation.setCompanyContactTemporaryId(contactsManagementTemporary.getId());
|
||||
payMeetingSituation.setCompanyContactName(contactsManagementTemporary.getName());
|
||||
}else {
|
||||
payMeetingSituation.setCompanyContactTemporaryId(postContact.getId());
|
||||
payMeetingSituation.setCompanyContactName(postContact.getName());
|
||||
}
|
||||
payMeetingSituation.setCompanyContactTemporaryId(postContact.getId());
|
||||
payMeetingSituation.setCompanyContactName(postContact.getName());
|
||||
} else {
|
||||
throw new JeroBootException("邮寄联系人不是所选企业的企业联系人");
|
||||
}
|
||||
|
||||
@@ -174,14 +174,14 @@ public class PayMeetingVO implements Serializable {
|
||||
@Excel(name = "会议费用", width = 15)
|
||||
@ApiModelProperty(value = "会议费用")
|
||||
@NotNull(message = "会议费用不能为空")
|
||||
@DecimalMax(value = "10000000000",message = "会议费用格式错误")
|
||||
@DecimalMax(value = "9999999999.99",message = "会议费用格式错误")
|
||||
private BigDecimal meetingCosts;
|
||||
|
||||
/**会议费用(标协会员)*/
|
||||
@Excel(name = "会议费用(标协会员)", width = 15)
|
||||
@ApiModelProperty(value = "会议费用(标协会员)")
|
||||
@NotNull(message = "会议费用(标协会员)不能为空",groups = StandardMeeting.class)
|
||||
@DecimalMax(value = "10000000000",message = "会议费用(标协会员)格式错误",groups = StandardMeeting.class)
|
||||
@DecimalMax(value = "9999999999.99",message = "会议费用(标协会员)格式错误",groups = StandardMeeting.class)
|
||||
private BigDecimal meetingCostsVip;
|
||||
|
||||
/**会议负责人id*/
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.jero.meeting.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author liJiaRao
|
||||
* @date 2021-09-10 16:08
|
||||
*/
|
||||
@Data
|
||||
public class UploadFileVO {
|
||||
@ApiModelProperty(value = "会议id")
|
||||
private String id;
|
||||
@ApiModelProperty(value = "资料文件id")
|
||||
private String fileIds;
|
||||
}
|
||||
+1
-1
@@ -104,7 +104,7 @@ public class WorkingGroupMeetingExel {
|
||||
@Excel(name = "会议费用", width = 15)
|
||||
@ApiModelProperty(value = "会议费用")
|
||||
@NotNull(message = "会议费用不能为空")
|
||||
@DecimalMax(value = "10000000000",message = "会议费用格式错误")
|
||||
@DecimalMax(value = "9999999999.99",message = "会议费用格式错误")
|
||||
private Integer meetingCosts;
|
||||
|
||||
/**会议负责人id*/
|
||||
|
||||
+1
-1
@@ -149,7 +149,7 @@ public class PayMemberProjectSubitem implements Serializable {
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@ApiModelProperty(value = "应收金额")
|
||||
@NotNull(message = "应收金额不能为空")
|
||||
@DecimalMax(value = "10000000000",message = "应收金额格式错误")
|
||||
@DecimalMax(value = "9999999999.99",message = "应收金额格式错误")
|
||||
private BigDecimal amountReceivable;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user