| | |
| | | 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.setRecordstatus(99); |
| | | serviceFund.setUploadStates(0); |
| | | 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(0); |
| | | serviceFund.setUploadStates(1); |
| | | } |
| | | System.out.println("serviceFund的值是--------:" + serviceFund); |
| | | log.info("开始更新的的值是--------"); |