| | |
| | | import com.ruoyi.project.service.*; |
| | | import com.ruoyi.system.service.ISysDeptService; |
| | | import com.ruoyi.system.service.ISysPostService; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import freemarker.template.Configuration; |
| | | import freemarker.template.Template; |
| | | import freemarker.template.TemplateException; |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.ruoyi.web.controller.project.ServiceReimbursementController.convert; |
| | |
| | | private TransactionDefinition transactionDefinition; |
| | | |
| | | @Autowired |
| | | private ISysDeptService sysDeptService; |
| | | private DingTalkService dingTalkService; |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | |
| | | public ServiceFundController() { |
| | | configuration = new Configuration(); |
| | |
| | | //说明是财务退回再提交的.需要出纳再看一遍,没问题之后,往分享表里新增 |
| | | // serviceFundService.addFundSharedInfo(serviceFund.getId()); |
| | | serviceFund.setFlowlevel(serviceFundflowrules.get(0).getTotallevel().longValue()); |
| | | serviceFund.setFlowlevel(100L); |
| | | serviceFund.setRecordstatus(99); |
| | | serviceFund.setUploadStates(1); |
| | | serviceFundService.updateById(serviceFund); |
| | | |
| | | //保存审批流程表 |
| | |
| | | FlowLevel = 0; |
| | | } |
| | | } |
| | | |
| | | SysUser sysUser = sysUserService.selectUserByUserName(serviceFund.getUserno()); |
| | | ArrayList<ConcurrentHashMap<String, Object>> contentList = new ArrayList<>(); |
| | | ConcurrentHashMap map = new ConcurrentHashMap(); |
| | | map.put("审批人:", loginUser.getUser().getUserName()); |
| | | map.put("审批时间:", new Date()); |
| | | map.put("意见:", "不通过"); |
| | | if (StringUtils.isNotBlank(checkFundVO.getFlowcontent())) map.put("意见:", checkFundVO.getFlowcontent()); |
| | | contentList.add(map); |
| | | DingTalkReqVo dingTalkReqVo = new DingTalkReqVo(); |
| | | dingTalkReqVo.setTitle("财务系统驳回信息"); |
| | | dingTalkReqVo.setNumber(sysUser.getPhonenumber()); |
| | | dingTalkReqVo.setContents(contentList); |
| | | dingTalkService.sendNotification(dingTalkReqVo); |
| | | } |
| | | |
| | | serviceFund.setRecordstatus(RecordStatus); |
| | |
| | | //001审批通过之后,就需要把“办公室主任”的名字填上 |
| | | if (checkFundVO.getFlowconclusion() == 1 && user.getUserName().equals("001")) { |
| | | serviceFund.setOfficedirector(user.getNickName()); |
| | | serviceFund.setUploadStates(1); |
| | | } |
| | | System.out.println("serviceFund的值是--------:" + serviceFund); |
| | | log.info("开始更新的的值是--------"); |
| | | ServiceFund updateServiceFund = new ServiceFund(); |
| | | updateServiceFund.setRecordstatus(serviceFund.getRecordstatus()); |
| | | updateServiceFund.setFlowlevel(serviceFund.getFlowlevel()); |
| | | // ServiceFund updateServiceFund = new ServiceFund(); |
| | | // updateServiceFund.setRecordstatus(serviceFund.getRecordstatus()); |
| | | // updateServiceFund.setFlowlevel(serviceFund.getFlowlevel()); |
| | | |
| | | Boolean aBoolean1 = serviceFundService.updateById(serviceFund); |
| | | log.info("integer更新的的值是-------- :{}", aBoolean1); |
| | |
| | | @Log(title = "费用上报", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/fundEdit") |
| | | @RepeatSubmit |
| | | public AjaxResult fundEdit(@RequestBody ServiceFund serviceFund) { |
| | | public AjaxResult fundEdit(@RequestBody ServiceFundVO serviceFundVO) { |
| | | ServiceFund serviceFund = DtoConversionUtils.sourceToTarget(serviceFundVO, ServiceFund.class); |
| | | log.info("修改费用申请入参:{}", serviceFund); |
| | | List<ServiceFund> infoByInfoIdList = serviceFundService.queryInfoById(serviceFund); |
| | | log.info("修改费用申请,通过入参查询 serviceFundService.queryInfoById数据为空,入参:{}", infoByInfoIdList.size()); |
| | | if (CollectionUtils.isEmpty(infoByInfoIdList)) { |
| | | return toAjax(false); |
| | | Long id = serviceFundService.addOrUpdateNew(serviceFundVO); |
| | | serviceFund.setId(id); |
| | | } |
| | | |
| | | Long flowLavel = null; |
| | | |
| | | LoginUser loginUser = getLoginUser(); |
| | | // SysUser user = loginUser.getUser(); |
| | | // //查询当前用户的组长 |
| | | // SysDept sysDept = new SysDept(); |
| | | // sysDept.setDeptId(loginUser.getDeptId()); |
| | | // List<SysDept> sysDepts = sysDeptService.selectDeptList(sysDept); |
| | | |
| | | //查询必审人 |
| | | ServiceFundflowrule serviceFundflowrule = new ServiceFundflowrule(); |