| | |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.extra.pinyin.PinyinUtil; |
| | | import com.ltkj.common.core.domain.entity.SysMenu; |
| | | import com.ltkj.common.utils.SecurityUtils; |
| | | import com.ltkj.hosp.domain.DictHosp; |
| | | import com.ltkj.hosp.domain.TjProject; |
| | | import com.ltkj.hosp.service.IDictHospService; |
| | | import com.ltkj.hosp.service.ITjProjectService; |
| | | import com.ltkj.system.service.ISysMenuService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | private IDictHospService dictHospService; |
| | | @Value ("${token.secret_key}") |
| | | private String secret; |
| | | @Autowired |
| | | private ITjProjectService projectService; |
| | | |
| | | /** |
| | | * 获取参数配置列表 |
| | |
| | | config.setUpdateBy(getUsername()); |
| | | int i = configService.updateConfig(config); |
| | | if (i > 0) { |
| | | if (config.getConfigId() == 113) { |
| | | SysMenu byId = menuService.getById(2305); |
| | | if ("Y".equals(configValue)) { |
| | | byId.setVisible("0"); |
| | | } |
| | | if ("N".equals(configValue)) { |
| | | byId.setVisible("1"); |
| | | } |
| | | menuService.updateById(byId); |
| | | } |
| | | // if (config.getConfigId() == 113) { |
| | | // SysMenu byId = menuService.getById(2305); |
| | | // if ("Y".equals(configValue)) { |
| | | // byId.setVisible("0"); |
| | | // } |
| | | // if ("N".equals(configValue)) { |
| | | // byId.setVisible("1"); |
| | | // } |
| | | // menuService.updateById(byId); |
| | | // } |
| | | } |
| | | return toAjax(i); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | @GetMapping ("/zx")//执行 |
| | | @GetMapping ("/zxsq")//执行 |
| | | @ApiOperation(value = "zxsq") |
| | | public AjaxResult zx(@RequestParam int day) { |
| | | try { |
| | | List<DictHosp> list = dictHospService.list(); |
| | |
| | | } |
| | | |
| | | |
| | | @GetMapping ("/gxxmpym")//执行 |
| | | @ApiOperation(value = "一键同步更新项目拼音码") |
| | | public AjaxResult gxxmpym() { |
| | | try { |
| | | List<TjProject> list = projectService.list(); |
| | | for (TjProject project : list) { |
| | | project.setProEngName(PinyinUtil.getFirstLetter(project.getProName(),"")); |
| | | projectService.updateById(project); |
| | | } |
| | | return AjaxResult.success(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | |
| | | |
| | | @GetMapping ("/tbhisproprice")//同步his项目单价信息 |
| | | @PreAuthorize("@ss.hasPermi('system:config:tbhisproprice')") |