| | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Map; |
| | |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | @GetMapping("{labelid}") |
| | | @PreAuthorize("hasAuthority('empAccessory:delete')") |
| | | public FebsResponse getLabelCount(@PathVariable(value = "labelid") String labelid) throws FebsException { |
| | | try { |
| | | return new FebsResponse().data(empAccessoryService.getLabelCount(Long.valueOf(labelid))); |
| | | } catch (Exception e) { |
| | | String message = "修改Label失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | } |
| | |
| | | void mvFiles(String accessoryids,Long labelid,Long empId); |
| | | |
| | | void singledownload(String empIds, Long labelid, HttpServletRequest request, HttpServletResponse response) throws Exception; |
| | | |
| | | |
| | | Integer getLabelCount(Long labelId); |
| | | } |
| | |
| | | FileUtil.del(new StringBuilder().append(mianFileStr, 0, mianFileStr.length() - 1).append(".zip").toString()); |
| | | FileUtil.del(mianFileStr); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Integer getLabelCount(Long labelId) { |
| | | LambdaQueryWrapper<EmpAccessory> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(EmpAccessory::getDelFlag,0); |
| | | wrapper.eq(EmpAccessory::getLabelid,labelId); |
| | | return this.count(wrapper); |
| | | } |
| | | } |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void createLabel(Label label) throws FebsException { |
| | | LambdaQueryWrapper<Label> queryWrapper = new LambdaQueryWrapper(); |
| | | queryWrapper.eq(Label::getLabelname, label.getLabelname()).or().eq(Label::getLabelcode, label.getLabelcode()); |
| | | queryWrapper.eq(Label::getDelFlag,0).and(i->i.eq(Label::getLabelname, label.getLabelname()).or().eq(Label::getLabelcode, label.getLabelcode())); |
| | | Label l = this.getOne(queryWrapper); |
| | | if (null != l && StrUtil.equals(label.getLabelname(), l.getLabelname())) { |
| | | throw new FebsException("标签名字重复"); |
| | |
| | | wapper.set(Label::getModifytime,new Date()); |
| | | this.update(wapper); |
| | | } |
| | | |
| | | } |
| | |
| | | config: |
| | | server-addr: ${nacos.url}:8848 |
| | | group: DEFAULT_GROUP |
| | | prefix: febs-server-Hr |
| | | prefix: febs-server-hr |
| | | file-extension: yaml |
| | | discovery: |
| | | server-addr: ${nacos.url}:8848 |