xie.kaifeng hace 7 meses
padre
commit
10c75b6e6b

+ 19 - 12
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/OrganServiceImpl.java

@@ -579,7 +579,7 @@ public class OrganServiceImpl implements IOrganService {
             } else {
                 roletype.add(role);
             }
-            List<Market> markets = iMarketMapper.getMarketsNameByUseridAndrole(userid, roletype,null);
+            List<Market> markets = iMarketMapper.getMarketsNameByUseridAndrole(userid, roletype, null);
             result.setMarkets(markets);
         } else if (role == SysEnums.OrganRole.industry.getCode().intValue()) {
             String sm = iCommonService.getSysparmById(SysConstants.SYSPAMA_CODE_NINESERVENNINE);
@@ -588,7 +588,7 @@ public class OrganServiceImpl implements IOrganService {
                 //会员   已选市场
                 List<Integer> roletype = new ArrayList<Integer>();
                 roletype.add(6);
-                List<Market> markets = iMarketMapper.getMarketsNameByUseridAndrole(userid, roletype,null);
+                List<Market> markets = iMarketMapper.getMarketsNameByUseridAndrole(userid, roletype, null);
                 result.setMarkets(markets);
             }
         } else if (role == SysEnums.OrganRole.marketer.getCode().intValue()) {
@@ -720,8 +720,9 @@ public class OrganServiceImpl implements IOrganService {
             iArearolemarketMapper.delete(new QueryWrapper<Arearolemarket>().eq("areauserid", areaid).eq("roletype", role));
 
             Useraccount uc = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", areaid));
-            iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("accountid", uc.getReckonaccountid()));
-
+            if (uc.getReckonaccountid() != null) {
+                iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("accountid", uc.getReckonaccountid()));
+            }
             //Ms_ExtendRole
             iMsExtendroleMapper.delete(new QueryWrapper<MsExtendrole>().eq("areauserid", areaid).eq("roletypeid", 4L));
 
@@ -780,8 +781,9 @@ public class OrganServiceImpl implements IOrganService {
                 }
                 // 更新parentuserid为平台
                 Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", areaid));
-                iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("accountid", ua.getReckonaccountid()));
-
+                if (ua.getReckonaccountid() != null) {
+                    iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("accountid", ua.getReckonaccountid()));
+                }
                 return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
             }
         } else if (role == SysEnums.OrganRole.marketer.getCode().intValue()) {
@@ -800,7 +802,9 @@ public class OrganServiceImpl implements IOrganService {
             iArearolemarketMapper.delete(new QueryWrapper<Arearolemarket>().eq("areauserid", areaid).eq("roletype", 6));
 
             Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", areaid));
-            iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("accountid", ua.getReckonaccountid()));
+            if (ua.getReckonaccountid() != null) {
+                iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("accountid", ua.getReckonaccountid()));
+            }
 
             // 6 9 两个角色
             List<Integer> rs = new ArrayList<>();
@@ -994,6 +998,10 @@ public class OrganServiceImpl implements IOrganService {
             return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_034.getCode(), request.getHeader("Accept-Language"));
         }
 
+        if (vo.getAccountid() == null || CollectionUtils.isEmpty(vo.getAccountids())) {
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_036.getCode(), request.getHeader("Accept-Language"));
+        }
+
         if (vo.getType() == 1) {//新增
             if (vo.getRoleid() <= 5) {
                 addAreaRoleModifyFee(vo, systemmanager, request);
@@ -1635,7 +1643,7 @@ public class OrganServiceImpl implements IOrganService {
     public AjaxResult<OrganInitAccountAddResult> loadSelectOption(PersonalizationDelParam param, HttpServletRequest request) {
         OrganInitAccountAddResult result = new OrganInitAccountAddResult();
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
-        if(param.getMemberuserid() == 1){
+        if (param.getMemberuserid() == 1) {
             if (param.getGoodsid() != null) {
                 param.setMemberuserid(systemmanager.getAreauserid());
             }
@@ -1646,7 +1654,7 @@ public class OrganServiceImpl implements IOrganService {
             result.setResults(bzResults);
             List<FeesConfigVo> tradeFeeDescriptions = iUseraccountMapper.getTradeFeeDescriptions(param);
             for (FeesConfigVo tradeFeeDescription : tradeFeeDescriptions) {
-                if(tradeFeeDescription.getFeealgorithm() == 1){
+                if (tradeFeeDescription.getFeealgorithm() == 1) {
                     tradeFeeDescription.setExchangevalue(tradeFeeDescription.getExchangevalue().multiply(new BigDecimal("10000")));
                     tradeFeeDescription.setMembermaxvalue(tradeFeeDescription.getMembermaxvalue().multiply(new BigDecimal("10000")));
                     tradeFeeDescription.setMemberminvalue(tradeFeeDescription.getMemberminvalue().multiply(new BigDecimal("10000")));
@@ -1658,7 +1666,7 @@ public class OrganServiceImpl implements IOrganService {
             List<Goods> goods = iGoodsMapper.getNoTradeConfigGoodsForAccount(param);
             result.setGoods(goods);
         } else if (param.getAccountid() != null) {
-            if(param.getMemberuserid() == 1){
+            if (param.getMemberuserid() == 1) {
                 param.setAccountid(null);
                 param.setMemberuserid(null);
             }
@@ -1910,7 +1918,7 @@ public class OrganServiceImpl implements IOrganService {
     }
 
     @Override
-        public AjaxResult<String> getOragnDefaultManager(Long userid, HttpServletRequest request) {
+    public AjaxResult<String> getOragnDefaultManager(Long userid, HttpServletRequest request) {
         Systemmanager user = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>()
                 .eq("areauserid", userid)
                 .eq("isdefault", 1));
@@ -2050,7 +2058,6 @@ public class OrganServiceImpl implements IOrganService {
             //更新资金账户市场权限
             iTaaccountMapper.deleteUserMarket(vo.getUserid(), marketids);
 
-            Map<String, Object> properties = new HashMap<String, Object>();
             if (CollectionUtils.isNotEmpty(marketids)) {
                 Taaccount ta = iTaaccountMapper.selectOne(new QueryWrapper<Taaccount>().eq("userid", vo.getUserid()).eq("ismain", 1));
                 iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("accountid", ta.getAccountid()));

+ 1 - 0
mtp3-century/src/main/resources/message_en.properties

@@ -95,6 +95,7 @@ organ_error_code_032=There is a point type that cannot be deleted
 organ_error_code_033=The quotation agency has been cited and cannot be deleted
 organ_error_code_034=Superiors cannot do it for themselves
 organ_error_code_035=The ratio value cannot be greater than 100
+organ_error_code_036=No fund account selected   
 profit_shar_error_code_001=Please delete the profit sharing configuration first
 profit_shar_error_code_002=Please delete the group members first
 profit_shar_error_code_003=This expense type already has a profit sharing configuration

+ 1 - 0
mtp3-century/src/main/resources/message_th.properties

@@ -95,6 +95,7 @@ organ_error_code_032=\u0E21\u0E35\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E2
 organ_error_code_033=\u0E2D\u0E49\u0E32\u0E07\u0E2A\u0E16\u0E32\u0E1A\u0E31\u0E19\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E25\u0E1A\u0E44\u0E14\u0E49
 organ_error_code_034=\u0E1C\u0E39\u0E49\u0E1A\u0E31\u0E07\u0E04\u0E31\u0E1A\u0E1A\u0E31\u0E0D\u0E0A\u0E32\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E17\u0E33\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E15\u0E19\u0E40\u0E2D\u0E07\u0E44\u0E14\u0E49
 organ_error_code_035=\u0E04\u0E48\u0E32\u0E2D\u0E31\u0E15\u0E23\u0E32\u0E2A\u0E48\u0E27\u0E19\u0E15\u0E49\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 100
+organ_error_code_036=\u0E40\u0E25\u0E02\u0E17\u0E35\u0E48\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E01\u0E2D\u0E07\u0E17\u0E38\u0E19
 profit_shar_error_code_001=\u0E01\u0E23\u0E38\u0E13\u0E32\u0E25\u0E1A\u0E01\u0E32\u0E23\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E04\u0E48\u0E32\u0E01\u0E32\u0E23\u0E41\u0E1A\u0E48\u0E07\u0E07\u0E32\u0E19\u0E01\u0E48\u0E2D\u0E19
 profit_shar_error_code_002=\u0E01\u0E23\u0E38\u0E13\u0E32\u0E25\u0E1A\u0E04\u0E19\u0E01\u0E25\u0E38\u0E48\u0E21\u0E2D\u0E2D\u0E01\u0E01\u0E48\u0E2D\u0E19
 profit_shar_error_code_003=\u0E21\u0E35\u0E01\u0E32\u0E23\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E04\u0E48\u0E32\u0E01\u0E32\u0E23\u0E41\u0E1A\u0E48\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E2D\u0E07\u0E04\u0E48\u0E32\u0E18\u0E23\u0E23\u0E21\u0E40\u0E19\u0E35\u0E22\u0E21\u0E19\u0E35\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27

+ 1 - 0
mtp3-century/src/main/resources/message_vi.properties

@@ -95,6 +95,7 @@ organ_error_code_032=C\u00F3 lo\u1EA1i t\u00EDch ph\u00E2n v\u00E0 kh\u00F4ng th
 organ_error_code_033=Tr\u00EDch d\u1EABn c\u01A1 quan v\u00E0 kh\u00F4ng th\u1EC3 x\u00F3a
 organ_error_code_034=C\u1EA5p tr\u00EAn kh\u00F4ng th\u1EC3 t\u1EF1
 organ_error_code_035=Gi\u00E1 tr\u1ECB t\u1EF7 l\u1EC7 kh\u00F4ng \u0111\u01B0\u1EE3c l\u1EDBn h\u01A1n 100
+organ_error_code_036=S\u1ED1 t\u00E0i kho\u1EA3n ch\u01B0a ch\u1ECDn
 profit_shar_error_code_001=Vui l\u00F2ng x\u00F3a c\u1EA5u h\u00ECnh chia tr\u01B0\u1EDBc
 profit_shar_error_code_002=Vui l\u00F2ng x\u00F3a nh\u00F3m \u0111\u1EA7u ti\u00EAn
 profit_shar_error_code_003=\u0110\u00E3 c\u00F3 c\u1EA5u h\u00ECnh chia cho lo\u1EA1i ph\u00ED n\u00E0y

+ 1 - 0
mtp3-century/src/main/resources/message_zh-cn.properties

@@ -95,6 +95,7 @@ organ_error_code_032=\u5B58\u5728\u79EF\u5206\u7C7B\u578B,\u65E0\u6CD5\u5220\u96
 organ_error_code_033=\u62A5\u4EF7\u673A\u6784\u88AB\u5F15\u7528,\u65E0\u6CD5\u5220\u9664
 organ_error_code_034=\u4E0A\u7EA7\u4E0D\u80FD\u4E3A\u81EA\u5DF1
 organ_error_code_035=\u6BD4\u7387\u503C\u4E0D\u80FD\u5927\u4E8E100
+organ_error_code_036=\u672A\u9009\u62E9\u8D44\u91D1\u8D26\u53F7
 profit_shar_error_code_001=\u8BF7\u5148\u5220\u9664\u5206\u6DA6\u914D\u7F6E
 profit_shar_error_code_002=\u8BF7\u5148\u5220\u9664\u5206\u7EC4\u4EBA\u5458
 profit_shar_error_code_003=\u8BE5\u8D39\u7528\u7C7B\u578B\u5DF2\u5B58\u5728\u5206\u6DA6\u914D\u7F6E

+ 1 - 0
mtp3-century/src/main/resources/message_zh-hk.properties

@@ -95,6 +95,7 @@ organ_error_code_032=\u5B58\u5728\u7A4D\u5206\u985E\u578B\uFF0C\u7121\u6CD5\u522
 organ_error_code_033=\u5831\u50F9\u6A5F\u6784\u88AB\u5F15\u7528\uFF0C\u7121\u6CD5\u5220\u9664
 organ_error_code_034=\u4E0A\u7D1A\u4E0D\u80FD\u70BA\u81EA\u5DF1
 organ_error_code_035=\u6BD4\u7387\u503C\u4E0D\u80FD\u5927\u65BC100
+organ_error_code_036=\u672A\u9078\u64C7\u8CC7\u91D1\u5E33\u865F
 profit_shar_error_code_001=\u8ACB\u5148\u5220\u9664\u5206\u6F64\u914D\u5BD8
 profit_shar_error_code_002=\u8ACB\u5148\u5220\u9664\u5206\u7D44\u4EBA\u54E1
 profit_shar_error_code_003=\u8A72\u8CBB\u7528\u985E\u578B\u5DF2\u5B58\u5728\u5206\u6F64\u914D\u5BD8

+ 1 - 0
mtp3-century/src/main/resources/message_zh-tw.properties

@@ -95,6 +95,7 @@ organ_error_code_032=\u5B58\u5728\u7A4D\u5206\u985E\u578B\uFF0C\u7121\u6CD5\u522
 organ_error_code_033=\u5831\u50F9\u6A5F\u6784\u88AB\u5F15\u7528\uFF0C\u7121\u6CD5\u5220\u9664
 organ_error_code_034=\u4E0A\u7D1A\u4E0D\u80FD\u70BA\u81EA\u5DF1
 organ_error_code_035=\u6BD4\u7387\u503C\u4E0D\u80FD\u5927\u65BC100
+organ_error_code_036=\u672A\u9078\u64C7\u8CC7\u91D1\u5E33\u865F
 profit_shar_error_code_001=\u8ACB\u5148\u5220\u9664\u5206\u6F64\u914D\u5BD8
 profit_shar_error_code_002=\u8ACB\u5148\u5220\u9664\u5206\u7D44\u4EBA\u54E1
 profit_shar_error_code_003=\u8A72\u8CBB\u7528\u985E\u578B\u5DF2\u5B58\u5728\u5206\u6F64\u914D\u5BD8

+ 1 - 0
mtp3-common/src/main/java/com/muchinfo/mtp3common/enumtype/MessageType.java

@@ -105,6 +105,7 @@ public enum MessageType {
     ORGAN_ERROR_CODE_033("organ_error_code_033", "报价机构被引用,无法删除"),
     ORGAN_ERROR_CODE_034("organ_error_code_034", "上级不能为自己"),
     ORGAN_ERROR_CODE_035("organ_error_code_035", "比率值不能大于100"),
+    ORGAN_ERROR_CODE_036("organ_error_code_036", "未选择资金账号"),
 
     PROFIT_SHAR_ERROR_CODE_001("profit_shar_error_code_001", "请先删除分润配置"),
     PROFIT_SHAR_ERROR_CODE_002("profit_shar_error_code_002", "请先删除分组人员"),