Commit 9d11e9bcf98b23cb9524ae3808309e54dd55af09

Authored by chenhang4442024
1 parent 0b616ebb

fix:剔除多余代码

src/main/java/com/order/erp/domain/vo/order/OrderOpinionLogVO.java deleted 100644 → 0
1 -package com.order.erp.domain.vo.order;  
2 -  
3 -import lombok.*;  
4 -import lombok.experimental.SuperBuilder;  
5 -  
6 -/**  
7 - * @Author:ch  
8 - * @createTime:2024-08-07  
9 - */  
10 -@Data  
11 -@AllArgsConstructor  
12 -@ToString  
13 -@NoArgsConstructor  
14 -@EqualsAndHashCode(callSuper = false)  
15 -@SuperBuilder  
16 -public class OrderOpinionLogVO {  
17 - private Long id;  
18 -  
19 - /**  
20 - * 订单id  
21 - */  
22 - private Long orderId;  
23 - /**  
24 - * 意见类型(SGS/Aitex/SHIPPMENT/PP/产品意见)  
25 - */  
26 - private String opinionType;  
27 -  
28 - /**  
29 - * 更新字段  
30 - */  
31 - private String field;  
32 -}  
src/main/java/com/order/erp/service/admin/impl/AdminUserServiceImpl.java
@@ -215,14 +215,19 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser @@ -215,14 +215,19 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
215 } 215 }
216 //创建生产科角色顺便添加到dictionary的生产科中。 216 //创建生产科角色顺便添加到dictionary的生产科中。
217 if(Constant.SIX==adminUserVO.getRoleId().intValue()){ 217 if(Constant.SIX==adminUserVO.getRoleId().intValue()){
218 - DictionaryVO dictionaryVO = new DictionaryVO();  
219 - dictionaryVO.setRemark("生产科");  
220 - dictionaryVO.setDictCode("productionDepartment");  
221 - dictionaryVO.setDictName("生产科");  
222 - dictionaryVO.setDictValue(adminUserVO.getNickName());  
223 - int count = dictionaryService.count();  
224 - dictionaryVO.setSort(count+1);  
225 - dictionaryService.add(dictionaryVO); 218 + List<DictionaryDO> dictionaryDOList = dictionaryService.list(new LambdaQueryWrapper<DictionaryDO>()
  219 + .eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN)
  220 + .eq(DictionaryDO::getDictCode,RoleEnum.PRODUCE_USER.getName()));
  221 + if(CollectionUtils.isNotEmpty(dictionaryDOList) && !dictionaryDOList.contains(adminUserVO.getNickName())){
  222 + DictionaryVO dictionaryVO = new DictionaryVO();
  223 + dictionaryVO.setRemark("生产科");
  224 + dictionaryVO.setDictCode("productionDepartment");
  225 + dictionaryVO.setDictName("生产科");
  226 + dictionaryVO.setDictValue(adminUserVO.getNickName());
  227 + int count = dictionaryService.count();
  228 + dictionaryVO.setSort(count+1);
  229 + dictionaryService.add(dictionaryVO);
  230 + }
226 } 231 }
227 return ServerResult.success(); 232 return ServerResult.success();
228 } 233 }