| | |
| | | serviceReimbursement.setFlowlevel(0L); |
| | | serviceReimbursement.setBackflowlevel(0L); |
| | | } |
| | | |
| | | } |
| | | |
| | | if (!postids.contains(2) && (serviceReimbursement.getBackflowlevel() == null || serviceReimbursement.getBackflowlevel() == 0)) { |
| | |
| | | |
| | | serviceFundflow.setFlowlevel(serviceFundflowrules.get(0).getFlowlevel() - 1); |
| | | serviceFundflowService.save(serviceFundflow); |
| | | |
| | | |
| | | SysUser sysUser = null; |
| | | if (serviceReimbursement.getFlowlevel() == 0L) { |
| | | //组长信息 |
| | | SysUser su = new SysUser(); |
| | | su.setNickName(serviceReimbursement.getManagername()); |
| | | List<SysUser> sysUserList = sysUserService.selectUserList(su); |
| | | if (sysUserList.size() > 0) { |
| | | sysUser = sysUserList.get(0); |
| | | } |
| | | } else if (serviceReimbursement.getFlowlevel() == 1L) { |
| | | //陈慕华信息 |
| | | sysUser = sysUserService.selectUserByUserName("047"); |
| | | } |
| | | ConcurrentHashMap map = new ConcurrentHashMap(); |
| | | ArrayList<ConcurrentHashMap<String, Object>> contentList = new ArrayList<>(); |
| | | map.put("提交人:", loginUser.getUser().getUserName()); |
| | | map.put("提交时间:", new Date()); |
| | | map.put("内容:", serviceReimbursement.getReason()); |
| | | contentList.add(map); |
| | | DingTalkReqVo dingTalkReqVo = new DingTalkReqVo(); |
| | | dingTalkReqVo.setTitle("差旅审批信息"); |
| | | dingTalkReqVo.setNumber(sysUser != null ? sysUser.getPhonenumber() : ""); |
| | | dingTalkReqVo.setContents(contentList); |
| | | dingTalkService.sendNotification(dingTalkReqVo); |
| | | } |
| | | |
| | | serviceReimbursementService.updateById(serviceReimbursement); |
| | |
| | | * @return 结果 |
| | | */ |
| | | public String login(String username, String password, String code, String uuid, String openId, String dingUserId) { |
| | | log.info("username是否为空:{},password是否为空:{},dingUserId是否为空:{}",username,password,dingUserId); |
| | | log.info("username是否为空:{},password是否为空:{},dingUserId是否为空:{}", username, password, dingUserId); |
| | | //免登 |
| | | if (StringUtils.isNotEmpty(dingUserId)) { |
| | | SysUser sysUser = sysUserMapper.selectUserByDingUserId(dingUserId); |
| | |
| | | } |
| | | |
| | | SysUser sysUser = sysUserMapper.selectUserByUserName(username); |
| | | if (sysUser.getErrorNums() >= 3) { |
| | | //获取锁定次数 |
| | | String s = configService.selectConfigByKey("sys.opo.lockpwd"); |
| | | if (sysUser.getErrorNums() >= Integer.valueOf(s)) { |
| | | //校验失败次数 |
| | | throw new BaseException("你的密码输入错误次数过多,请联系管理员处理"); |
| | | } |
| | |
| | | @ApiModelProperty("费用归属描述") |
| | | private String costtypename; |
| | | |
| | | @ApiModelProperty("家属人数(仅限costtypename是家属的时候)") |
| | | private Long personNum; |
| | | |
| | | @ApiModelProperty("捐献家属银行") |
| | | private String donorbank; |
| | | |
| | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("家属人数(仅限costtypename是家属的时候)") |
| | | private Long personNum; |
| | | |
| | | |
| | | /** |
| | | * 报销人编号 |
| | | */ |
| | |
| | | // 5.2.3 算税逻辑 |
| | | if (detail.getServicesscopename().contains("税后")) { |
| | | // 税后明细:累计税后金额,反推税前金额和税金 |
| | | if (idcard.equals("330103196704060019")) { |
| | | log.info("330103196704060019"); |
| | | } |
| | | // if (idcard.equals("362329199103224511")) { |
| | | // log.info("朱玮安"); |
| | | // } |
| | | BigDecimal newTaxedAmounts = BigDecimal.valueOf(taxSum.getTaxedAmounts()).add(BigDecimal.valueOf(detail.getTaxedamount())); |
| | | String taxationBefore = TaxtUtils.getTaxationBefore(newTaxedAmounts); |
| | | BigDecimal amountNow = new BigDecimal(taxationBefore).subtract(BigDecimal.valueOf(taxSum.getAmounts())); |
| | |
| | | } else { |
| | | detail.setTaxTime(serviceFund1.getFundtaxtime()); |
| | | } |
| | | if (tax.doubleValue() < 0) { |
| | | log.info("小于0了"); |
| | | } |
| | | taxSum.setAmounts((BigDecimal.valueOf(taxSum.getAmounts()).add(amountNow)).doubleValue()); |
| | | taxSum.setTaxAmounts((BigDecimal.valueOf(taxSum.getTaxAmounts()).add(tax)).doubleValue()); |
| | | taxSum.setTaxedAmounts(newTaxedAmounts.doubleValue()); |
| | | } else { |
| | | // 税前明细:累计税前金额,算总税金,再算本次税金和税后金额 |
| | | BigDecimal newAmounts = BigDecimal.valueOf(taxSum.getAmounts()).add(BigDecimal.valueOf(detail.getAmount())); |
| | | if (idcard.equals("330103196704060019")) { |
| | | log.info("330103196704060019"); |
| | | } |
| | | // if (idcard.equals("362329199103224511")) { |
| | | // log.info("朱玮安"); |
| | | // } |
| | | String taxation = TaxtUtils.getTaxation(newAmounts); |
| | | |
| | | BigDecimal taxAmountNow = new BigDecimal(taxation).subtract(new BigDecimal(String.valueOf(taxSum.getTaxAmounts()))); |
| | | BigDecimal texdAfterNow = BigDecimal.valueOf(detail.getAmount()).subtract(taxAmountNow); |
| | | detail.setTaxamount(taxAmountNow.doubleValue()); |
| | | detail.setTaxedamount(texdAfterNow.doubleValue()); |
| | | if (taxAmountNow.doubleValue() < 0) { |
| | | log.info("小于0了"); |
| | | } |
| | | |
| | | if (ObjectUtils.isEmpty(serviceFund1.getFundtaxtime())) { |
| | | detail.setTaxTime(new Date()); |
| | |
| | | <result property="applyTime" column="apply_time"/> |
| | | <result property="uploadStates" column="upload_states"/> |
| | | <result property="notes" column="notes"/> |
| | | <result property="personNum" column="person_num"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceReimbursementVo"> |
| | | select ID, |
| | | del_flag, |
| | | person_num, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | |
| | | <if test="recordstatus != null and recordstatus != ''">and RecordStatus = #{recordstatus}</if> |
| | | <if test="uploadflag != null and uploadflag != ''">and uploadflag = #{uploadflag}</if> |
| | | <if test="travelers != null and travelers != ''">and Travelers = #{travelers}</if> |
| | | <if test="personNum != null ">and person_num = #{personNum}</if> |
| | | </where> |
| | | </select> |
| | | <select id="getMaxId" resultType="java.lang.Long"> |
| | |
| | | </select> |
| | | |
| | | <select id="getRDInfoByItem" resultType="com.ruoyi.project.domain.ServiceReimbursementEo"> |
| | | SELECT a.id as id,a.apply_time as applyTime,a.UserNo as userno,a.FlowLevel as recordstatus,b.persontype as persontype,a.create_time as |
| | | createTime,a.managername as managername,a.bh as bh,a.OPOchecker as opochecker,a.FinVicePresident as finvicepresident,a.BusVicePresident as busvicepresident,a.OfficeDirector as officedirector,a.FinanceDirector as financedirector,a.FinanceChecher as financechecher, |
| | | SELECT a.id as id,a.apply_time as applyTime,a.UserNo as userno,a.FlowLevel as recordstatus,b.persontype as |
| | | persontype,a.create_time as |
| | | createTime,a.managername as managername,a.bh as bh,a.OPOchecker as opochecker,a.FinVicePresident as |
| | | finvicepresident,a.BusVicePresident as busvicepresident,a.OfficeDirector as officedirector,a.FinanceDirector as |
| | | financedirector,a.FinanceChecher as financechecher, |
| | | a.UserName as username,b.personname as travelers,a.AmountRequested as amountrequested,a.Reason as reason,a.Phone |
| | | as phone,a.DepositBank as depositbank,a.BankCardNo as bankcardno,a.DonorName as donorname,a.DeptmentName as deptmentname,b.trafficexpense as |
| | | as phone,a.DepositBank as depositbank,a.BankCardNo as bankcardno,a.DonorName as donorname,a.DeptmentName as |
| | | deptmentname,b.trafficexpense as |
| | | trafficexpense,b.hotelexpense as hotelexpense,b.FoodExpenses as foodexpenses, b.foodallowance as foodallowance, |
| | | b.otherexpense as otherexpense,b.otherfeeamount as otherfeeamount,b.CityFee as cityfee FROM service_reimbursement a LEFT JOIN |
| | | b.otherexpense as otherexpense,b.otherfeeamount as otherfeeamount,b.CityFee as cityfee,a.person_num as personNum FROM |
| | | service_reimbursement a LEFT JOIN |
| | | service_reimbursementdetail b on a.id=b.RBID where a.del_flag != 1 and b.del_flag!=1 |
| | | |
| | | <if test="id != null"> |
| | | and a.id = #{id} |
| | | </if> |
| | |
| | | <if test='starttime != null and endtime != ""'> |
| | | and a.create_time BETWEEN #{starttime} AND #{endtime} |
| | | </if> |
| | | <if test="personNum != null ">and a.person_num = #{personNum}</if> |
| | | |
| | | ORDER BY a.id desc |
| | | </select> |
| | | |
| | | </mapper> |
| | | </mapper> |