laozt 1 year ago
commit 1fccc9ed3b

@ -6,14 +6,10 @@ import com.ruoyi.programManagement.entity.BPlanEnterprise;
import com.ruoyi.programManagement.mapper.BEnterpriseNewMapper; import com.ruoyi.programManagement.mapper.BEnterpriseNewMapper;
import com.ruoyi.programManagement.service.BPlanEnterpriseService; import com.ruoyi.programManagement.service.BPlanEnterpriseService;
import com.ruoyi.programManagement.service.IBEnterpriseNewService; import com.ruoyi.programManagement.service.IBEnterpriseNewService;
import com.ruoyi.programManagement.service.ISzEnforExamineService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
@ -21,12 +17,12 @@ import java.util.List;
/** /**
* *
*/ */
//@Configuration @Configuration
//@EnableScheduling @EnableScheduling
@Api(tags = "定时任务") //@Api(tags = "定时任务")
@RestController //@RestController
@Transactional(rollbackFor = Exception.class) //@Transactional(rollbackFor = Exception.class)
@RequestMapping("/pharmaceuticals/quartz") //@RequestMapping("/pharmaceuticals/quartz")
public class EnterpristQuartz { public class EnterpristQuartz {
@ -42,9 +38,9 @@ public class EnterpristQuartz {
// 每周一早上五点5点执行一次任务 生成企业新表 // 每周一早上五点5点执行一次任务 生成企业新表
// @Scheduled(cron = "0 0 17 ? * SUN") @Scheduled(cron = "0 0 17 ? * SUN")
@GetMapping("/getList") // @GetMapping("/getList")
@ApiOperation(value = "定时任务") // @ApiOperation(value = "定时任务")
public AjaxResult updateInformationData() { public AjaxResult updateInformationData() {
//三表关联查询数据 //三表关联查询数据
List<BEnterpriseNew> list = bEnterpriseNewMapper.seletAll(); List<BEnterpriseNew> list = bEnterpriseNewMapper.seletAll();
@ -55,9 +51,9 @@ public class EnterpristQuartz {
} }
// 定时任务修改更新计划表的检查状态、检查id、检查时效字段 // 定时任务修改更新计划表的检查状态、检查id、检查时效字段
// @Scheduled(cron = "0 0 1 * * ?") @Scheduled(cron = "0 0 1 * * ?")
@GetMapping("/updateExamine") // @GetMapping("/updateExamine")
@ApiOperation(value = "定时任务修改更新计划表的检查状态、检查id、检查时效字段") // @ApiOperation(value = "定时任务修改更新计划表的检查状态、检查id、检查时效字段")
public AjaxResult updateExamine() { public AjaxResult updateExamine() {
//查询计划表中的所有数据 //查询计划表中的所有数据
List<BPlanEnterprise> list = bPlanEnterpriseService.selectUpdateAll(); List<BPlanEnterprise> list = bPlanEnterpriseService.selectUpdateAll();

@ -82,11 +82,19 @@ public class SysLoginController
public AjaxResult getInfo() public AjaxResult getInfo()
{ {
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
// 角色集合 // 角色集合
Set<String> roles = permissionService.getRolePermission(user); Set<String> roles = permissionService.getRolePermission(user);
// 权限集合 // 权限集合
Set<String> permissions = permissionService.getMenuPermission(user); Set<String> permissions = permissionService.getMenuPermission(user);
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
//判断密码是否为初始密码
if (user.getPassword().equals("Yingji@123")){
ajax.put("status",1);
}else{
ajax.put("status",0);
}
ajax.put("user", user); ajax.put("user", user);
ajax.put("roles", roles); ajax.put("roles", roles);
ajax.put("permissions", permissions); ajax.put("permissions", permissions);

Loading…
Cancel
Save