diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/payment/controller/PayPaymentCheckController.java b/jero-boot-incoming-payment/src/main/java/com/jero/payment/controller/PayPaymentCheckController.java new file mode 100644 index 00000000..315a1ecc --- /dev/null +++ b/jero-boot-incoming-payment/src/main/java/com/jero/payment/controller/PayPaymentCheckController.java @@ -0,0 +1,58 @@ +package com.jero.payment.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.jero.common.api.vo.Result; +import com.jero.common.aspect.annotation.AutoLog; +import com.jero.common.common.ProjectCommon; +import com.jero.common.system.base.controller.JeroController; +import com.jero.common.util.AuthenticationUtils; +import com.jero.mail.PayMailBillVO; +import com.jero.mail.service.IPayMailBillService; +import com.jero.payment.entity.PayPaymentCheck; +import com.jero.payment.entity.PayPaymentRecord; +import com.jero.payment.service.IPayPaymentCheckService; +import com.jero.payment.service.IPayPaymentRecordService; +import com.jero.project.entity.PayCommonProject; +import com.jero.project.vo.PayCommonProjectOutput; +import com.jero.standards.memberinfo.entity.MemberInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.List; + + +@Api(tags="到账审核") +@RestController +@RequestMapping("/paymentCheck/payPaymentCheck") +@Slf4j +public class PayPaymentCheckController extends JeroController { + @Autowired + private IPayPaymentCheckService payPaymentCheckService; + + @ApiOperation(value="申请", notes="申请") + @PostMapping(value = "/applicant") + public Result applicant(@RequestBody PayPaymentCheck payPaymentCheck) { + try{ + payPaymentCheckService.applicant(payPaymentCheck); + }catch (Exception e){ + log.error("申请异常",e); + return Result.error(e.getMessage()); + } + return Result.OK("操作成功"); + } + + + + +} diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/payment/mapper/PayPaymentCheckMapper.java b/jero-boot-incoming-payment/src/main/java/com/jero/payment/mapper/PayPaymentCheckMapper.java new file mode 100644 index 00000000..f71f66fb --- /dev/null +++ b/jero-boot-incoming-payment/src/main/java/com/jero/payment/mapper/PayPaymentCheckMapper.java @@ -0,0 +1,19 @@ +package com.jero.payment.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.jero.payment.entity.PayPaymentCheck; +import com.jero.payment.entity.PayPaymentRecord; +import com.jero.project.entity.PayCommonProject; +import com.jero.project.vo.PayCommonProjectOutput; +import io.lettuce.core.dynamic.annotation.Param; + +import java.math.BigDecimal; +import java.util.List; + +/** + * 到账审核 + */ +public interface PayPaymentCheckMapper extends BaseMapper { + +} diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/payment/mapper/xml/PayPaymentCheckMapper.xml b/jero-boot-incoming-payment/src/main/java/com/jero/payment/mapper/xml/PayPaymentCheckMapper.xml new file mode 100644 index 00000000..a152efa2 --- /dev/null +++ b/jero-boot-incoming-payment/src/main/java/com/jero/payment/mapper/xml/PayPaymentCheckMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/payment/service/IPayPaymentCheckService.java b/jero-boot-incoming-payment/src/main/java/com/jero/payment/service/IPayPaymentCheckService.java new file mode 100644 index 00000000..c01da01e --- /dev/null +++ b/jero-boot-incoming-payment/src/main/java/com/jero/payment/service/IPayPaymentCheckService.java @@ -0,0 +1,30 @@ +package com.jero.payment.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.jero.common.api.vo.Result; +import com.jero.payment.entity.PayPaymentCheck; +import com.jero.payment.entity.PayPaymentRecord; +import com.jero.payment.vo.TbCheckVo; +import com.jero.project.entity.PayCommonProject; +import com.jero.project.vo.PayCommonProjectOutput; +import com.jero.standards.memberinfo.entity.MemberInfo; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import java.math.BigDecimal; +import java.util.List; + +/** + * 到账审核 + */ +public interface IPayPaymentCheckService extends IService { + + /** + * 申请 + * @param payPaymentCheck + */ + void applicant(PayPaymentCheck payPaymentCheck); + +} diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/payment/service/impl/PayPaymentCheckServiceImpl.java b/jero-boot-incoming-payment/src/main/java/com/jero/payment/service/impl/PayPaymentCheckServiceImpl.java new file mode 100644 index 00000000..770680f2 --- /dev/null +++ b/jero-boot-incoming-payment/src/main/java/com/jero/payment/service/impl/PayPaymentCheckServiceImpl.java @@ -0,0 +1,110 @@ +package com.jero.payment.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jero.common.api.vo.Result; +import com.jero.common.common.ProjectCommon; +import com.jero.common.dto.SendMessageDTO; +import com.jero.common.enums.CompanyMessageEnums; +import com.jero.common.enums.ManagementMessageEnums; +import com.jero.common.exception.JeroBootException; +import com.jero.common.service.SendMessageService; +import com.jero.common.system.api.ISysBaseAPI; +import com.jero.common.system.vo.LoginUser; +import com.jero.common.util.AuthenticationUtils; +import com.jero.common.util.PasswordUtil; +import com.jero.common.util.oConvertUtils; +import com.jero.company.entity.PayCompanyManagement; +import com.jero.company.entity.PayContactsManagement; +import com.jero.company.service.IPayCompanyManagementService; +import com.jero.company.service.IPayContactsManagementService; +import com.jero.contract.common.PayIncomeContractCommon; +import com.jero.meeting.common.MeetingSubitemCommon; +import com.jero.meeting.entity.PayMeeting; +import com.jero.meeting.entity.PayMeetingSituation; +import com.jero.meeting.mapper.PayMeetingSituationMapper; +import com.jero.meeting.service.IPayMeetingService; +import com.jero.member.entity.PayMemberProject; +import com.jero.member.entity.PayMemberProjectSubitem; +import com.jero.member.entity.TbMemberProject; +import com.jero.member.entity.TbMemberProjectSubitem; +import com.jero.member.mapper.PayMemberProjectSubitemMapper; +import com.jero.member.mapper.TbMemberProjectSubitemMapper; +import com.jero.member.service.IPayMemberProjectService; +import com.jero.member.service.ITbMemberProjectService; +import com.jero.modules.system.entity.SysUser; +import com.jero.modules.system.service.ISysUserService; +import com.jero.payment.entity.PayPaymentCheck; +import com.jero.payment.entity.PayPaymentRecord; +import com.jero.payment.mapper.PayPaymentCheckMapper; +import com.jero.payment.mapper.PayPaymentRecordMapper; +import com.jero.payment.service.IPayPaymentCheckService; +import com.jero.payment.service.IPayPaymentRecordService; +import com.jero.payment.vo.TbCheckVo; +import com.jero.project.entity.PayCommonProject; +import com.jero.project.entity.PayWorkingGroup; +import com.jero.project.entity.PayWorkingGroupSubItem; +import com.jero.project.mapper.PayCommonProjectMapper; +import com.jero.project.mapper.PayWorkingGroupSubItemMapper; +import com.jero.project.service.IPayWorkingGroupService; +import com.jero.project.vo.PayCommonProjectOutput; +import com.jero.standards.memberinfo.entity.MemberInfo; +import com.jero.temporary.entity.PayCompanyManagementTemporary; +import com.jero.temporary.entity.PayContactsManagementTemporary; +import com.jero.temporary.service.IPayCompanyManagementTemporaryService; +import com.jero.temporary.service.IPayContactsManagementTemporaryService; +import org.apache.commons.beanutils.PropertyUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.enmus.ExcelType; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +import org.springframework.web.servlet.ModelAndView; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.stream.Collectors; + +/** + * 到账审核 + */ +@Transactional(rollbackFor = Exception.class) +@Service +public class PayPaymentCheckServiceImpl extends ServiceImpl implements IPayPaymentCheckService { + @Resource + private PayPaymentCheckMapper payPaymentCheckMapper; + @Autowired + private IPayPaymentRecordService payPaymentRecordService; + + /** + * 申请 + * @param payPaymentCheck + */ + @Override + public void applicant(PayPaymentCheck payPaymentCheck){ + PayPaymentRecord payPaymentRecord = new PayPaymentRecord(); + BeanUtils.copyProperties(payPaymentCheck, payPaymentRecord); + + List typr5List = new ArrayList<>(); + payPaymentRecordService.addOneAmountReceived(payPaymentRecord,typr5List,ProjectCommon.PAYMENT_FLAG2); + + LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); + payPaymentCheck.setRecordId(payPaymentRecord.getId()); + payPaymentCheck.setApplicantName(sysUser.getRealname()); + + payPaymentCheckMapper.insert(payPaymentCheck); + } +}