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

@ -82,11 +82,19 @@ public class SysLoginController
public AjaxResult getInfo()
{
SysUser user = SecurityUtils.getLoginUser().getUser();
// 角色集合
Set<String> roles = permissionService.getRolePermission(user);
// 权限集合
Set<String> permissions = permissionService.getMenuPermission(user);
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("roles", roles);
ajax.put("permissions", permissions);

Loading…
Cancel
Save